From 99f9df20bb7e48cb64ec2624925e7bd339edf108 Mon Sep 17 00:00:00 2001 From: Emmanuel Nelson Date: Fri, 8 Nov 2024 09:36:00 -0500 Subject: [PATCH] add build for release --- .gitignore | 3 - build/assets/Analysis-Bm3a7MSr.js | 1 + build/assets/ArcGISCachedService-B90n8xUT.js | 1 + build/assets/AttachmentInfo-CQ7iJxR0.js | 1 + build/assets/Basemap-drllXW5h.js | 2 + build/assets/BindType-BmZEZMMh.js | 1 + build/assets/BingMapsLayer-BKYZg17f.js | 1 + build/assets/BoundsStore-BShGRkMU.js | 1 + build/assets/BufferView-DOhKdt-N.js | 1 + build/assets/BuildingSceneLayer-BBmWR18K.js | 1 + build/assets/ByteSizeUnit-BsxeN7wM.js | 1 + build/assets/CSVLayer-BfiE75hl.js | 1 + build/assets/CSVSourceWorker-DF7Oy86a.js | 4 + build/assets/CatalogLayer-DXuB0ilj.js | 1 + .../assets/ClassBreaksDefinition-yZL3mlhg.js | 1 + build/assets/CollectionFlattener-BmCRFqHz.js | 1 + build/assets/Cyclical-CyXrdUt3.js | 1 + .../DefaultMaterial_COLOR_GAMMA-C6si8ymn.js | 1 + .../DeleteForwardEditsParameters-B8V2t6bp.js | 1 + build/assets/DimensionLayer-BzXgFFMi.js | 1 + build/assets/DoubleArray-D2IDWC15.js | 1 + build/assets/EdgeProcessingWorker-C7g3lLDX.js | 1 + build/assets/ElevationLayer-CJdvBfQg.js | 2 + build/assets/ElevationQuery-v0ijDjBO.js | 1 + .../assets/ElevationSamplerWorker-Be15mw3K.js | 1 + build/assets/FeatureLayerSource-DHybgE9g.js | 2 + .../assets/FeaturePipelineWorker-Duw9IYNq.js | 66 + ...ureServiceSnappingSourceWorker-C2uDe4AH.js | 1 + build/assets/FeatureStore-C3siChbH.js | 1 + build/assets/GeoJSONLayer-R05rpObK.js | 2 + build/assets/GeoJSONSourceWorker-CYe2sh7G.js | 1 + build/assets/GeoRSSLayer-BIhNdXpJ.js | 1 + build/assets/GeometryUtils-6Cd4d7Hy.js | 1 + build/assets/GroupLayer-zAHBnafB.js | 2 + build/assets/I3SBinaryReader-BNZLVsC-.js | 2 + build/assets/I3SLayerDefinitions-CR4J5n7u.js | 1 + build/assets/I3SUtil-7z-2YOel.js | 1 + build/assets/ImageryLayer-DADgS6XG.js | 2 + build/assets/ImageryTileLayer-CuBqAg13.js | 3 + build/assets/Indices-BhOjxL0t.js | 1 + .../IntegratedMesh3DTilesLayer-BSaTkEOZ.js | 1 + build/assets/IntegratedMeshLayer-BnVFVJDl.js | 1 + build/assets/InterleavedLayout-DiAet0DN.js | 1 + build/assets/KMLLayer-BeRWcV6T.js | 1 + build/assets/KnowledgeGraphLayer-Ddel9E7F.js | 1 + .../assets/KnowledgeGraphSublayer-vp2dcEj_.js | 1 + build/assets/LercWorker-CqHAIE7x.js | 1 + build/assets/LineOfSightLayer-Cn-2S3uI.js | 1 + build/assets/LinkChartLayer-BBNWdA8U.js | 2 + build/assets/Lyr3DWorker-CzF8y3dB.js | 2 + build/assets/MapImageLayer-BK7gkoyE.js | 1 + build/assets/MapNotesLayer-2ZcBqOZC.js | 1 + build/assets/MediaLayer-B4vgm461.js | 2 + build/assets/MemorySourceWorker-DNQM5G5E.js | 1 + build/assets/Mesh-DkA8R2dF.js | 2 + build/assets/MeshLocalVertexSpace-CZ-FLKyC.js | 1 + build/assets/MeshTransform-CnKLNqg-.js | 1 + build/assets/MeshVertexAttributes-CfiMg9vN.js | 1 + build/assets/NormalAttribute.glsl-DMc-kXcx.js | 11 + build/assets/OGCFeatureLayer-DI9u24Dw.js | 1 + build/assets/OpenStreetMapLayer-C6iOFUlM.js | 1 + build/assets/OptimizedFeature-DDMKj8Vq.js | 1 + build/assets/OptimizedFeatureSet-Blu9Ckm7.js | 1 + build/assets/OrientedImageryLayer-DsKvJ25C.js | 1 + build/assets/PBFDecoderWorker-BSA6vg2a.js | 1 + build/assets/PointCloudLayer-Dz6tFPWc.js | 11 + .../PointCloudUniqueValueRenderer-D8kmwCRw.js | 1 + build/assets/PointCloudWorker-CH9o2MwU.js | 1 + build/assets/PolynomialTransform-BIabQn8W.js | 1 + build/assets/PooledRBush-CdrRkOdh.js | 1 + build/assets/QueryEngine-CI3mggax.js | 2 + .../QueryEngineCapabilities-CTDe3LlQ.js | 1 + build/assets/QueryTask-CH4nGmOK.js | 2 + build/assets/QueueProcessor-DTdXzd4o.js | 1 + build/assets/RasterWorker-DW_GcoB6.js | 1 + build/assets/ReactiveMap-C7QHrros.js | 1 + build/assets/Relationship-DeeaK30J.js | 1 + build/assets/RouteLayer-BKU_ddZR.js | 2 + build/assets/SceneLayer-D_5ycsDz.js | 2 + ...SceneLayerSnappingSourceWorker-DR4W7bTo.js | 1 + build/assets/SceneLayerWorker-cfLEu3Xv.js | 2 + build/assets/SceneService-7YqMMGL5.js | 3 + build/assets/SpatialFilter-DCIoEGCD.js | 1 + build/assets/StreamLayer-BnhoAY1J.js | 2 + build/assets/StyleRepository-B96C0kSY.js | 9 + build/assets/SublayersOwner-Ez_yHYvH.js | 2 + build/assets/SubtypeGroupLayer-BasPes06.js | 2 + build/assets/TileInfo-Bx6eEWV4.js | 1 + build/assets/TileInfoTilemapCache-jg1X3Y95.js | 1 + build/assets/TileKey-D9UF-PsB.js | 1 + build/assets/TileLayer-BehC5UCA.js | 1 + build/assets/TilemapCache-6mrSWCBj.js | 1 + build/assets/TimeOnly-C2MfFEIr.js | 1 + build/assets/TurboLine-BJPIEzB-.js | 2 + build/assets/UnknownLayer-CpgQZHrw.js | 1 + build/assets/UnsupportedLayer-rrpNacvj.js | 1 + build/assets/UpdatingHandles-D3xBFsF5.js | 1 + build/assets/Util-DRlRfUCu.js | 1 + build/assets/VectorTileLayer-DyRSiboc.js | 1 + build/assets/VertexAttribute-BlT9lbVY.js | 1 + .../VertexElementDescriptor-BOD-G50G.js | 1 + build/assets/VideoLayer-BjkoUYhL.js | 203 + build/assets/VoxelLayer-UbXb4Bne.js | 1 + build/assets/WFSLayer-DRIJxC7T.js | 1 + build/assets/WFSSourceWorker-BjXlAna2.js | 1 + build/assets/WMSLayer-PlT1pQfO.js | 2 + build/assets/WMTSLayer-QqTxuCKI.js | 1 + build/assets/WebTileLayer-DDbix1qe.js | 1 + build/assets/WhereClause-CILeHwR9.js | 7 + build/assets/WorkerTileHandler-CMLMj5UP.js | 2 + build/assets/_commonjsHelpers-DCkdB7M8.js | 1 + build/assets/apng-S4giw3C0.js | 1 + build/assets/arcadeAsyncRuntime-C0WqkpWA.js | 2 + build/assets/arcadeUtils-BvZmzJL_.js | 183 + .../arcgis-knowledge-client-core-DBXFIJfG.js | 3 + ...gis-knowledge-client-core-simd-iXkxQjQw.js | 3 + build/assets/arcgisLayers-zn5ZTq8c.js | 2 + .../associatedFeatureServiceUtils-D9v5WjkL.js | 1 + build/assets/basis_transcoder-B40h2JNH.js | 20 + build/assets/calcite-button-tKmnUUcr.js | 19 + build/assets/calcite-input-D7abHyRn.js | 55 + build/assets/calcite-label-A-HJpZEQ.js | 9 + build/assets/calcite-modal-DHLYHRNO.js | 54 + build/assets/calcite-notice-Ck_wHSpF.js | 19 + build/assets/clientSideDefaults-B7fGShzo.js | 7 + build/assets/component-BUnDTGFH.js | 16 + ...TranslationToOriginAndRotation-BxPeFPaY.js | 1 + .../assets/convertMeshVertexSpace-BbnC0zgE.js | 1 + build/assets/createConnection-BFN_9xe7.js | 2 + build/assets/crsUtils-DAndLU68.js | 1 + build/assets/dataUtils-DYQC_Kql.js | 2 + build/assets/date-M6n_RqpC.js | 1 + build/assets/deduplicate-B_YKqNj1.js | 1 + build/assets/deleteForwardEdits-7rqcQUX6.js | 1 + build/assets/devEnvironmentUtils-D6qIi8Ky.js | 1 + build/assets/earcut-BqgeR2O3.js | 1 + build/assets/edgeProcessing-CU64r8kh.js | 1 + build/assets/editingSupport-BRaaDEoU.js | 1 + build/assets/elevationInfoUtils-CU9w6KS3.js | 1 + build/assets/enums-CxXC-vJk.js | 1 + build/assets/executeForTopCount-SMa27mo0.js | 1 + build/assets/executeForTopExtents-Bv6_wAbP.js | 1 + build/assets/executeForTopIds-BizsLta6.js | 1 + build/assets/executeQueryJSON-CCbDrFwh.js | 1 + build/assets/executeQueryPBF-B-eLVWOv.js | 1 + .../executeRelationshipQuery-F8Fprdd-.js | 1 + .../executeTopFeaturesQuery-Bwk1xqdY.js | 1 + .../assets/featureConversionUtils-CCATessr.js | 1 + build/assets/featureLayerUtils-CRRc6-7r.js | 1 + build/assets/featureSetUtils-sHviL1hk.js | 2 + build/assets/featuresetbase-OZ_O-s69.js | 1 + build/assets/featuresetgeom-CAjQZ5tM.js | 1 + build/assets/featuresetstats-ByHC7qtP.js | 1 + build/assets/featuresetstring-QnWvSAV8.js | 1 + build/assets/fetchRasterInfo-DWSe3scC.js | 2 + build/assets/geojson-BRJeQduY.js | 1 + build/assets/geomasync-C1XdD4eA.js | 1 + build/assets/geometryEngine-D2dsojOY.js | 1 + build/assets/geometryEngineAsync-BODJChyU.js | 1 + build/assets/geometryEngineBase-RmbNeFm7.js | 1 + build/assets/geometryEngineWorker-ClddcLz0.js | 1 + build/assets/gif-DmlPrKw5.js | 1 + build/assets/gltfexport-CoDBzAqk.js | 1 + build/assets/groupLayerUtils-4Z2LmSaU.js | 1 + build/assets/hydrated-awHE-vOn.js | 1 + build/assets/i3s-DfJIXEvM.js | 2 + build/assets/icon-ifbWMk17.js | 25 + build/assets/imageBitmapUtils-kF4U_Pyx.js | 1 + build/assets/imageUtils-D81CeaJ0.js | 2 + build/assets/imageryUtils-CVS5zy0-.js | 1 + build/assets/index-6Ap435l7.css | 1 + build/assets/index-DKOmzAMm.js | 4563 +++++++++++++++++ build/assets/infoFor3D-DsOdlPuA.js | 1 + build/assets/interactive-DaeLV7oq.js | 9 + build/assets/json-Wa8cmqdu.js | 1 + build/assets/jsonContext-SE-5k22x.js | 1 + .../assets/knowledgeGraphService-BFNZ__DV.js | 2 + build/assets/knowledgegraph-ptgt6-e4.js | 2 + build/assets/label-CXw43uCP.js | 5 + build/assets/layersCreator-B7QnC6RR.js | 1 + build/assets/layersLoader-7Bk9G4Kh.js | 1 + build/assets/lazyLayerLoader-BkbwrjyD.js | 2 + build/assets/lclayout-CDvAJV0i.js | 3 + build/assets/lerc-wasm-1FN8mB-S.js | 1 + build/assets/libtess-CoED-ECQ.js | 1 + build/assets/libtess-asm-CthFaaan.js | 1 + build/assets/lineSegment-3ivVGQNc.js | 1 + build/assets/loadAll-Cm5pWAv4.js | 1 + build/assets/loadGLTFMesh-DzrF9DGl.js | 8 + build/assets/loader-6rdpjGpy.js | 5 + build/assets/lyr3DWorker-XDXl96FL.js | 5 + build/assets/mat3-BNGRf_pC.js | 1 + build/assets/mat3f64-q3fE-ZOt.js | 1 + build/assets/mat4f64-CSKppSlJ.js | 1 + build/assets/mediaLayerUtils-MA8Smwz2.js | 1 + build/assets/meshFeatureSet-x5YtiVvA.js | 1 + build/assets/meshVertexSpaceUtils-CMKdridq.js | 1 + .../multiOriginJSONSupportUtils-C0wm8_Yw.js | 1 + build/assets/normalizeUtils-DIcj7CYy.js | 1 + build/assets/normalizeUtilsCommon-BatUY1sD.js | 1 + build/assets/number-NXsKqxkQ.js | 1 + build/assets/objectIdUtils-4dd1rf9p.js | 1 + build/assets/objectResourceUtils-fV3U3Nm6.js | 1095 ++++ build/assets/ogcFeatureUtils-CuyMjEno.js | 1 + build/assets/openCloseComponent-A5NL68VL.js | 9 + build/assets/orientedBoundingBox-RPlI7sU4.js | 1 + build/assets/originUtils-D69mHv66.js | 1 + build/assets/pbf-DwSF5Y_G.js | 1 + build/assets/pbfQueryUtils-D2YxxSfN.js | 1 + build/assets/pe-wasm-CCKBX_Eg.js | 1 + build/assets/persistable-DLZFVdWR.js | 1 + build/assets/plane-aHrUkISy.js | 1 + build/assets/popupUtils-CqjLs0mf.js | 1 + build/assets/portalLayers-CSGJfvg_.js | 1 + build/assets/portalUtils-DDekVd1c.js | 1 + build/assets/projection-Ch_noS-l.js | 1 + build/assets/quat-BYKy26Om.js | 1 + build/assets/quatf64-Bdb9ZJJK.js | 1 + build/assets/query-CQvaiR4K.js | 1 + build/assets/queryAttachments-yOc867_U.js | 1 + build/assets/queryTopFeatures-De5r1rPC.js | 1 + build/assets/quickselect-D0_cvEX6.js | 1 + build/assets/request-CIjms0zq.js | 1 + build/assets/resourceExtension-D3awQbhZ.js | 1 + build/assets/resourceUtils-CwAv7wd8.js | 2 + build/assets/resourceUtils-CxnhUS9W.js | 1 + build/assets/resourceUtils-Cz4P0EKM.js | 1 + build/assets/saveAPIKeyUtils-CqAN5-r5.js | 1 + build/assets/saveUtils-oCA1ZjYH.js | 1 + build/assets/scaleUtils-BN5HVCVS.js | 1 + build/assets/signal-swyOrDkM.js | 1 + build/assets/sourceUtils-DYgU-2mb.js | 2 + ...spatialReferenceEllipsoidUtils-BKSgV6gI.js | 1 + build/assets/sphere-DoGSV0K5.js | 1 + build/assets/statsWorker-DNhIb11T.js | 1 + build/assets/streamLayerUtils-CwdAycHZ.js | 1 + build/assets/symbolLayerUtils-9rptnLxz.js | 2 + build/assets/types-D0PSWh4d.js | 1 + build/assets/uploadAssetErrors-Bg66aMSE.js | 1 + build/assets/uploadAssets-DaOQPv-z.js | 1 + build/assets/utils-BCmi3vQB.js | 1 + build/assets/utils-C0Bk6fkM.js | 1 + build/assets/utils-CF4bGKhW.js | 1 + build/assets/utils-CqM6vUbj.js | 1 + build/assets/utils-V4fw_T9z.js | 1 + build/assets/vec2-CurFBDJu.js | 1 + build/assets/vec2f32-DxfkRbjY.js | 1 + build/assets/vec2f64-DA6GkJuH.js | 1 + build/assets/vec3-C6eb5QY9.js | 1 + build/assets/vec4-n1PBj5SL.js | 1 + .../assets/vertexSpaceConversion-DdxiyRap.js | 1 + build/assets/webStyleSymbolUtils-Bnn0aSrt.js | 1 + build/assets/wfsUtils-tW6kf0DT.js | 1 + build/assets/writeUtils-VdcK5efY.js | 1 + build/assets/xmlUtils-CtUoQO7q.js | 1 + build/assets/zipjs-wrapper-DnezS2lx.js | 2 + build/favicon.ico | Bin 0 -> 3870 bytes build/index.html | 14 + build/logo192.png | Bin 0 -> 5347 bytes build/logo512.png | Bin 0 -> 9664 bytes build/manifest.json | 25 + build/robots.txt | 3 + package.json | 2 +- 263 files changed, 6737 insertions(+), 4 deletions(-) create mode 100644 build/assets/Analysis-Bm3a7MSr.js create mode 100644 build/assets/ArcGISCachedService-B90n8xUT.js create mode 100644 build/assets/AttachmentInfo-CQ7iJxR0.js create mode 100644 build/assets/Basemap-drllXW5h.js create mode 100644 build/assets/BindType-BmZEZMMh.js create mode 100644 build/assets/BingMapsLayer-BKYZg17f.js create mode 100644 build/assets/BoundsStore-BShGRkMU.js create mode 100644 build/assets/BufferView-DOhKdt-N.js create mode 100644 build/assets/BuildingSceneLayer-BBmWR18K.js create mode 100644 build/assets/ByteSizeUnit-BsxeN7wM.js create mode 100644 build/assets/CSVLayer-BfiE75hl.js create mode 100644 build/assets/CSVSourceWorker-DF7Oy86a.js create mode 100644 build/assets/CatalogLayer-DXuB0ilj.js create mode 100644 build/assets/ClassBreaksDefinition-yZL3mlhg.js create mode 100644 build/assets/CollectionFlattener-BmCRFqHz.js create mode 100644 build/assets/Cyclical-CyXrdUt3.js create mode 100644 build/assets/DefaultMaterial_COLOR_GAMMA-C6si8ymn.js create mode 100644 build/assets/DeleteForwardEditsParameters-B8V2t6bp.js create mode 100644 build/assets/DimensionLayer-BzXgFFMi.js create mode 100644 build/assets/DoubleArray-D2IDWC15.js create mode 100644 build/assets/EdgeProcessingWorker-C7g3lLDX.js create mode 100644 build/assets/ElevationLayer-CJdvBfQg.js create mode 100644 build/assets/ElevationQuery-v0ijDjBO.js create mode 100644 build/assets/ElevationSamplerWorker-Be15mw3K.js create mode 100644 build/assets/FeatureLayerSource-DHybgE9g.js create mode 100644 build/assets/FeaturePipelineWorker-Duw9IYNq.js create mode 100644 build/assets/FeatureServiceSnappingSourceWorker-C2uDe4AH.js create mode 100644 build/assets/FeatureStore-C3siChbH.js create mode 100644 build/assets/GeoJSONLayer-R05rpObK.js create mode 100644 build/assets/GeoJSONSourceWorker-CYe2sh7G.js create mode 100644 build/assets/GeoRSSLayer-BIhNdXpJ.js create mode 100644 build/assets/GeometryUtils-6Cd4d7Hy.js create mode 100644 build/assets/GroupLayer-zAHBnafB.js create mode 100644 build/assets/I3SBinaryReader-BNZLVsC-.js create mode 100644 build/assets/I3SLayerDefinitions-CR4J5n7u.js create mode 100644 build/assets/I3SUtil-7z-2YOel.js create mode 100644 build/assets/ImageryLayer-DADgS6XG.js create mode 100644 build/assets/ImageryTileLayer-CuBqAg13.js create mode 100644 build/assets/Indices-BhOjxL0t.js create mode 100644 build/assets/IntegratedMesh3DTilesLayer-BSaTkEOZ.js create mode 100644 build/assets/IntegratedMeshLayer-BnVFVJDl.js create mode 100644 build/assets/InterleavedLayout-DiAet0DN.js create mode 100644 build/assets/KMLLayer-BeRWcV6T.js create mode 100644 build/assets/KnowledgeGraphLayer-Ddel9E7F.js create mode 100644 build/assets/KnowledgeGraphSublayer-vp2dcEj_.js create mode 100644 build/assets/LercWorker-CqHAIE7x.js create mode 100644 build/assets/LineOfSightLayer-Cn-2S3uI.js create mode 100644 build/assets/LinkChartLayer-BBNWdA8U.js create mode 100644 build/assets/Lyr3DWorker-CzF8y3dB.js create mode 100644 build/assets/MapImageLayer-BK7gkoyE.js create mode 100644 build/assets/MapNotesLayer-2ZcBqOZC.js create mode 100644 build/assets/MediaLayer-B4vgm461.js create mode 100644 build/assets/MemorySourceWorker-DNQM5G5E.js create mode 100644 build/assets/Mesh-DkA8R2dF.js create mode 100644 build/assets/MeshLocalVertexSpace-CZ-FLKyC.js create mode 100644 build/assets/MeshTransform-CnKLNqg-.js create mode 100644 build/assets/MeshVertexAttributes-CfiMg9vN.js create mode 100644 build/assets/NormalAttribute.glsl-DMc-kXcx.js create mode 100644 build/assets/OGCFeatureLayer-DI9u24Dw.js create mode 100644 build/assets/OpenStreetMapLayer-C6iOFUlM.js create mode 100644 build/assets/OptimizedFeature-DDMKj8Vq.js create mode 100644 build/assets/OptimizedFeatureSet-Blu9Ckm7.js create mode 100644 build/assets/OrientedImageryLayer-DsKvJ25C.js create mode 100644 build/assets/PBFDecoderWorker-BSA6vg2a.js create mode 100644 build/assets/PointCloudLayer-Dz6tFPWc.js create mode 100644 build/assets/PointCloudUniqueValueRenderer-D8kmwCRw.js create mode 100644 build/assets/PointCloudWorker-CH9o2MwU.js create mode 100644 build/assets/PolynomialTransform-BIabQn8W.js create mode 100644 build/assets/PooledRBush-CdrRkOdh.js create mode 100644 build/assets/QueryEngine-CI3mggax.js create mode 100644 build/assets/QueryEngineCapabilities-CTDe3LlQ.js create mode 100644 build/assets/QueryTask-CH4nGmOK.js create mode 100644 build/assets/QueueProcessor-DTdXzd4o.js create mode 100644 build/assets/RasterWorker-DW_GcoB6.js create mode 100644 build/assets/ReactiveMap-C7QHrros.js create mode 100644 build/assets/Relationship-DeeaK30J.js create mode 100644 build/assets/RouteLayer-BKU_ddZR.js create mode 100644 build/assets/SceneLayer-D_5ycsDz.js create mode 100644 build/assets/SceneLayerSnappingSourceWorker-DR4W7bTo.js create mode 100644 build/assets/SceneLayerWorker-cfLEu3Xv.js create mode 100644 build/assets/SceneService-7YqMMGL5.js create mode 100644 build/assets/SpatialFilter-DCIoEGCD.js create mode 100644 build/assets/StreamLayer-BnhoAY1J.js create mode 100644 build/assets/StyleRepository-B96C0kSY.js create mode 100644 build/assets/SublayersOwner-Ez_yHYvH.js create mode 100644 build/assets/SubtypeGroupLayer-BasPes06.js create mode 100644 build/assets/TileInfo-Bx6eEWV4.js create mode 100644 build/assets/TileInfoTilemapCache-jg1X3Y95.js create mode 100644 build/assets/TileKey-D9UF-PsB.js create mode 100644 build/assets/TileLayer-BehC5UCA.js create mode 100644 build/assets/TilemapCache-6mrSWCBj.js create mode 100644 build/assets/TimeOnly-C2MfFEIr.js create mode 100644 build/assets/TurboLine-BJPIEzB-.js create mode 100644 build/assets/UnknownLayer-CpgQZHrw.js create mode 100644 build/assets/UnsupportedLayer-rrpNacvj.js create mode 100644 build/assets/UpdatingHandles-D3xBFsF5.js create mode 100644 build/assets/Util-DRlRfUCu.js create mode 100644 build/assets/VectorTileLayer-DyRSiboc.js create mode 100644 build/assets/VertexAttribute-BlT9lbVY.js create mode 100644 build/assets/VertexElementDescriptor-BOD-G50G.js create mode 100644 build/assets/VideoLayer-BjkoUYhL.js create mode 100644 build/assets/VoxelLayer-UbXb4Bne.js create mode 100644 build/assets/WFSLayer-DRIJxC7T.js create mode 100644 build/assets/WFSSourceWorker-BjXlAna2.js create mode 100644 build/assets/WMSLayer-PlT1pQfO.js create mode 100644 build/assets/WMTSLayer-QqTxuCKI.js create mode 100644 build/assets/WebTileLayer-DDbix1qe.js create mode 100644 build/assets/WhereClause-CILeHwR9.js create mode 100644 build/assets/WorkerTileHandler-CMLMj5UP.js create mode 100644 build/assets/_commonjsHelpers-DCkdB7M8.js create mode 100644 build/assets/apng-S4giw3C0.js create mode 100644 build/assets/arcadeAsyncRuntime-C0WqkpWA.js create mode 100644 build/assets/arcadeUtils-BvZmzJL_.js create mode 100644 build/assets/arcgis-knowledge-client-core-DBXFIJfG.js create mode 100644 build/assets/arcgis-knowledge-client-core-simd-iXkxQjQw.js create mode 100644 build/assets/arcgisLayers-zn5ZTq8c.js create mode 100644 build/assets/associatedFeatureServiceUtils-D9v5WjkL.js create mode 100644 build/assets/basis_transcoder-B40h2JNH.js create mode 100644 build/assets/calcite-button-tKmnUUcr.js create mode 100644 build/assets/calcite-input-D7abHyRn.js create mode 100644 build/assets/calcite-label-A-HJpZEQ.js create mode 100644 build/assets/calcite-modal-DHLYHRNO.js create mode 100644 build/assets/calcite-notice-Ck_wHSpF.js create mode 100644 build/assets/clientSideDefaults-B7fGShzo.js create mode 100644 build/assets/component-BUnDTGFH.js create mode 100644 build/assets/computeTranslationToOriginAndRotation-BxPeFPaY.js create mode 100644 build/assets/convertMeshVertexSpace-BbnC0zgE.js create mode 100644 build/assets/createConnection-BFN_9xe7.js create mode 100644 build/assets/crsUtils-DAndLU68.js create mode 100644 build/assets/dataUtils-DYQC_Kql.js create mode 100644 build/assets/date-M6n_RqpC.js create mode 100644 build/assets/deduplicate-B_YKqNj1.js create mode 100644 build/assets/deleteForwardEdits-7rqcQUX6.js create mode 100644 build/assets/devEnvironmentUtils-D6qIi8Ky.js create mode 100644 build/assets/earcut-BqgeR2O3.js create mode 100644 build/assets/edgeProcessing-CU64r8kh.js create mode 100644 build/assets/editingSupport-BRaaDEoU.js create mode 100644 build/assets/elevationInfoUtils-CU9w6KS3.js create mode 100644 build/assets/enums-CxXC-vJk.js create mode 100644 build/assets/executeForTopCount-SMa27mo0.js create mode 100644 build/assets/executeForTopExtents-Bv6_wAbP.js create mode 100644 build/assets/executeForTopIds-BizsLta6.js create mode 100644 build/assets/executeQueryJSON-CCbDrFwh.js create mode 100644 build/assets/executeQueryPBF-B-eLVWOv.js create mode 100644 build/assets/executeRelationshipQuery-F8Fprdd-.js create mode 100644 build/assets/executeTopFeaturesQuery-Bwk1xqdY.js create mode 100644 build/assets/featureConversionUtils-CCATessr.js create mode 100644 build/assets/featureLayerUtils-CRRc6-7r.js create mode 100644 build/assets/featureSetUtils-sHviL1hk.js create mode 100644 build/assets/featuresetbase-OZ_O-s69.js create mode 100644 build/assets/featuresetgeom-CAjQZ5tM.js create mode 100644 build/assets/featuresetstats-ByHC7qtP.js create mode 100644 build/assets/featuresetstring-QnWvSAV8.js create mode 100644 build/assets/fetchRasterInfo-DWSe3scC.js create mode 100644 build/assets/geojson-BRJeQduY.js create mode 100644 build/assets/geomasync-C1XdD4eA.js create mode 100644 build/assets/geometryEngine-D2dsojOY.js create mode 100644 build/assets/geometryEngineAsync-BODJChyU.js create mode 100644 build/assets/geometryEngineBase-RmbNeFm7.js create mode 100644 build/assets/geometryEngineWorker-ClddcLz0.js create mode 100644 build/assets/gif-DmlPrKw5.js create mode 100644 build/assets/gltfexport-CoDBzAqk.js create mode 100644 build/assets/groupLayerUtils-4Z2LmSaU.js create mode 100644 build/assets/hydrated-awHE-vOn.js create mode 100644 build/assets/i3s-DfJIXEvM.js create mode 100644 build/assets/icon-ifbWMk17.js create mode 100644 build/assets/imageBitmapUtils-kF4U_Pyx.js create mode 100644 build/assets/imageUtils-D81CeaJ0.js create mode 100644 build/assets/imageryUtils-CVS5zy0-.js create mode 100644 build/assets/index-6Ap435l7.css create mode 100644 build/assets/index-DKOmzAMm.js create mode 100644 build/assets/infoFor3D-DsOdlPuA.js create mode 100644 build/assets/interactive-DaeLV7oq.js create mode 100644 build/assets/json-Wa8cmqdu.js create mode 100644 build/assets/jsonContext-SE-5k22x.js create mode 100644 build/assets/knowledgeGraphService-BFNZ__DV.js create mode 100644 build/assets/knowledgegraph-ptgt6-e4.js create mode 100644 build/assets/label-CXw43uCP.js create mode 100644 build/assets/layersCreator-B7QnC6RR.js create mode 100644 build/assets/layersLoader-7Bk9G4Kh.js create mode 100644 build/assets/lazyLayerLoader-BkbwrjyD.js create mode 100644 build/assets/lclayout-CDvAJV0i.js create mode 100644 build/assets/lerc-wasm-1FN8mB-S.js create mode 100644 build/assets/libtess-CoED-ECQ.js create mode 100644 build/assets/libtess-asm-CthFaaan.js create mode 100644 build/assets/lineSegment-3ivVGQNc.js create mode 100644 build/assets/loadAll-Cm5pWAv4.js create mode 100644 build/assets/loadGLTFMesh-DzrF9DGl.js create mode 100644 build/assets/loader-6rdpjGpy.js create mode 100644 build/assets/lyr3DWorker-XDXl96FL.js create mode 100644 build/assets/mat3-BNGRf_pC.js create mode 100644 build/assets/mat3f64-q3fE-ZOt.js create mode 100644 build/assets/mat4f64-CSKppSlJ.js create mode 100644 build/assets/mediaLayerUtils-MA8Smwz2.js create mode 100644 build/assets/meshFeatureSet-x5YtiVvA.js create mode 100644 build/assets/meshVertexSpaceUtils-CMKdridq.js create mode 100644 build/assets/multiOriginJSONSupportUtils-C0wm8_Yw.js create mode 100644 build/assets/normalizeUtils-DIcj7CYy.js create mode 100644 build/assets/normalizeUtilsCommon-BatUY1sD.js create mode 100644 build/assets/number-NXsKqxkQ.js create mode 100644 build/assets/objectIdUtils-4dd1rf9p.js create mode 100644 build/assets/objectResourceUtils-fV3U3Nm6.js create mode 100644 build/assets/ogcFeatureUtils-CuyMjEno.js create mode 100644 build/assets/openCloseComponent-A5NL68VL.js create mode 100644 build/assets/orientedBoundingBox-RPlI7sU4.js create mode 100644 build/assets/originUtils-D69mHv66.js create mode 100644 build/assets/pbf-DwSF5Y_G.js create mode 100644 build/assets/pbfQueryUtils-D2YxxSfN.js create mode 100644 build/assets/pe-wasm-CCKBX_Eg.js create mode 100644 build/assets/persistable-DLZFVdWR.js create mode 100644 build/assets/plane-aHrUkISy.js create mode 100644 build/assets/popupUtils-CqjLs0mf.js create mode 100644 build/assets/portalLayers-CSGJfvg_.js create mode 100644 build/assets/portalUtils-DDekVd1c.js create mode 100644 build/assets/projection-Ch_noS-l.js create mode 100644 build/assets/quat-BYKy26Om.js create mode 100644 build/assets/quatf64-Bdb9ZJJK.js create mode 100644 build/assets/query-CQvaiR4K.js create mode 100644 build/assets/queryAttachments-yOc867_U.js create mode 100644 build/assets/queryTopFeatures-De5r1rPC.js create mode 100644 build/assets/quickselect-D0_cvEX6.js create mode 100644 build/assets/request-CIjms0zq.js create mode 100644 build/assets/resourceExtension-D3awQbhZ.js create mode 100644 build/assets/resourceUtils-CwAv7wd8.js create mode 100644 build/assets/resourceUtils-CxnhUS9W.js create mode 100644 build/assets/resourceUtils-Cz4P0EKM.js create mode 100644 build/assets/saveAPIKeyUtils-CqAN5-r5.js create mode 100644 build/assets/saveUtils-oCA1ZjYH.js create mode 100644 build/assets/scaleUtils-BN5HVCVS.js create mode 100644 build/assets/signal-swyOrDkM.js create mode 100644 build/assets/sourceUtils-DYgU-2mb.js create mode 100644 build/assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js create mode 100644 build/assets/sphere-DoGSV0K5.js create mode 100644 build/assets/statsWorker-DNhIb11T.js create mode 100644 build/assets/streamLayerUtils-CwdAycHZ.js create mode 100644 build/assets/symbolLayerUtils-9rptnLxz.js create mode 100644 build/assets/types-D0PSWh4d.js create mode 100644 build/assets/uploadAssetErrors-Bg66aMSE.js create mode 100644 build/assets/uploadAssets-DaOQPv-z.js create mode 100644 build/assets/utils-BCmi3vQB.js create mode 100644 build/assets/utils-C0Bk6fkM.js create mode 100644 build/assets/utils-CF4bGKhW.js create mode 100644 build/assets/utils-CqM6vUbj.js create mode 100644 build/assets/utils-V4fw_T9z.js create mode 100644 build/assets/vec2-CurFBDJu.js create mode 100644 build/assets/vec2f32-DxfkRbjY.js create mode 100644 build/assets/vec2f64-DA6GkJuH.js create mode 100644 build/assets/vec3-C6eb5QY9.js create mode 100644 build/assets/vec4-n1PBj5SL.js create mode 100644 build/assets/vertexSpaceConversion-DdxiyRap.js create mode 100644 build/assets/webStyleSymbolUtils-Bnn0aSrt.js create mode 100644 build/assets/wfsUtils-tW6kf0DT.js create mode 100644 build/assets/writeUtils-VdcK5efY.js create mode 100644 build/assets/xmlUtils-CtUoQO7q.js create mode 100644 build/assets/zipjs-wrapper-DnezS2lx.js create mode 100644 build/favicon.ico create mode 100644 build/index.html create mode 100644 build/logo192.png create mode 100644 build/logo512.png create mode 100644 build/manifest.json create mode 100644 build/robots.txt diff --git a/.gitignore b/.gitignore index 48ff308..e6eea65 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ # testing /coverage -# production -/build - # misc .DS_Store .env.local diff --git a/build/assets/Analysis-Bm3a7MSr.js b/build/assets/Analysis-Bm3a7MSr.js new file mode 100644 index 0000000..6a81f43 --- /dev/null +++ b/build/assets/Analysis-Bm3a7MSr.js @@ -0,0 +1 @@ +import{cn as n,co as r,cp as l,O as o,B as s,D as i,E as p,bw as c}from"./index-DKOmzAMm.js";let y=0,t=class extends n(r(l(c))){constructor(a){super(a),this.id=`${Date.now().toString(16)}-analysis-${y++}`,this.title=null}get parent(){return this._get("parent")}set parent(a){const e=this.parent;if(e!=null)switch(e.type){case"line-of-sight":case"dimension":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",a)}get isEditable(){return this.requiredPropertiesForEditing.every(o)}};s([i({type:String,constructOnly:!0,clonable:!1})],t.prototype,"id",void 0),s([i({type:String})],t.prototype,"title",void 0),s([i({clonable:!1,value:null})],t.prototype,"parent",null),s([i({readOnly:!0})],t.prototype,"isEditable",null),t=s([p("esri.analysis.Analysis")],t);const u=t;export{u as c}; diff --git a/build/assets/ArcGISCachedService-B90n8xUT.js b/build/assets/ArcGISCachedService-B90n8xUT.js new file mode 100644 index 0000000..02db92d --- /dev/null +++ b/build/assets/ArcGISCachedService-B90n8xUT.js @@ -0,0 +1 @@ +import{B as l,D as i,aS as m,ay as S,E as x}from"./index-DKOmzAMm.js";import{z as y}from"./TileInfo-Bx6eEWV4.js";import{e as I}from"./TileInfoTilemapCache-jg1X3Y95.js";import{j as D}from"./TilemapCache-6mrSWCBj.js";const T=f=>{let t=class extends f{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){var a,e;(e=(a=this.tilemapCache)==null?void 0:a.destroy)==null||e.call(a)}readMinScale(a,e){return e.minLOD!=null&&e.maxLOD!=null?a:0}readMaxScale(a,e){return e.minLOD!=null&&e.maxLOD!=null?a:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(a,e,h){var u;const v=(u=e.capabilities)==null?void 0:u.includes("Tilemap");let{minLOD:n,maxLOD:o,minScale:p,maxScale:c}=e;if(n==null&&o==null&&p!==0&&c!==0){const r=s=>Math.round(1e4*s)/1e4;p=r(p||e.tileInfo.lods[0].scale),c=r(c||e.tileInfo.lods[e.tileInfo.lods.length-1].scale);for(const s of e.tileInfo.lods){const d=r(s.scale);n=d>=p?s.level:n,o=d>=c?s.level:o}}if(v)return new D({layer:this,minLOD:n,maxLOD:o});if(e.tileInfo){const r=new y;return r.read(e.tileInfo,h),new I(r,n,o)}return null}};return l([i({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),l([i()],t.prototype,"minScale",void 0),l([m("service","minScale")],t.prototype,"readMinScale",null),l([i()],t.prototype,"maxScale",void 0),l([m("service","maxScale")],t.prototype,"readMaxScale",null),l([i({type:S})],t.prototype,"spatialReference",void 0),l([i({readOnly:!0})],t.prototype,"supportsBlankTile",null),l([i({type:y})],t.prototype,"tileInfo",void 0),l([i()],t.prototype,"tilemapCache",void 0),l([m("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),l([i()],t.prototype,"version",void 0),t=l([x("esri.layers.mixins.ArcGISCachedService")],t),t};export{T as p}; diff --git a/build/assets/AttachmentInfo-CQ7iJxR0.js b/build/assets/AttachmentInfo-CQ7iJxR0.js new file mode 100644 index 0000000..cdf0363 --- /dev/null +++ b/build/assets/AttachmentInfo-CQ7iJxR0.js @@ -0,0 +1 @@ +import{B as o,D as e,ey as d,E as u,F as f}from"./index-DKOmzAMm.js";function y(n){const{exifInfo:r,exifName:a,tagName:i}=n;if(!r||!a||!i)return null;const l=r.find(p=>p.name===a);return l?m({tagName:i,tags:l.tags}):null}function m(n){const{tagName:r,tags:a}=n;if(!a||!r)return null;const i=a.find(l=>l.name===r);return(i==null?void 0:i.value)||null}var s;const I={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let t=s=class extends f{constructor(n){super(n),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:n}=this,r=y({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:n});return I[r]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};o([e({type:String})],t.prototype,"contentType",void 0),o([e()],t.prototype,"exifInfo",void 0),o([e({readOnly:!0})],t.prototype,"orientationInfo",null),o([e({type:d})],t.prototype,"id",void 0),o([e({type:String})],t.prototype,"globalId",void 0),o([e({type:String})],t.prototype,"keywords",void 0),o([e({type:String})],t.prototype,"name",void 0),o([e({json:{read:!1}})],t.prototype,"parentGlobalId",void 0),o([e({json:{read:!1}})],t.prototype,"parentObjectId",void 0),o([e({type:d})],t.prototype,"size",void 0),o([e({json:{read:!1}})],t.prototype,"url",void 0),t=s=o([u("esri.rest.query.support.AttachmentInfo")],t);const h=t;export{h as a}; diff --git a/build/assets/Basemap-drllXW5h.js b/build/assets/Basemap-drllXW5h.js new file mode 100644 index 0000000..ce688d4 --- /dev/null +++ b/build/assets/Basemap-drllXW5h.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/layersCreator-B7QnC6RR.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/portalLayers-CSGJfvg_.js","assets/associatedFeatureServiceUtils-D9v5WjkL.js","assets/lazyLayerLoader-BkbwrjyD.js"])))=>i.map(i=>d[i]); +import{fq as k,fr as i,B as l,D as c,E as _,bw as D,J as V,fs as W,cn as B,a7 as h,V as L,ft as R,fu as f,fv as T,$ as j,eD as M,c7 as I,_ as H,I as w,C as G,U as N,d2 as C,S as $,ay as P,aN as x}from"./index-DKOmzAMm.js";import{t as E}from"./loadAll-Cm5pWAv4.js";import{f as U}from"./writeUtils-VdcK5efY.js";async function F(e){if(!e)return;const r=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,s=await k("esri/t9n/basemaps");return s[e]||s[r]}const z={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return i("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return i("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return i("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return i("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return i("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return i("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"arcgis-imagery":{get thumbnailUrl(){return i("esri/images/basemap/hybrid.jpg")},title:"Imagery Hybrid",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-imagery-standard":{get thumbnailUrl(){return i("esri/images/basemap/satellite.jpg")},title:"Imagery",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"}]},"arcgis-imagery-labels":{title:"Hybrid [Reference]",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-light-gray":{get thumbnailUrl(){return i("esri/images/basemap/gray-vector.jpg")},title:"Light Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Base",title:"Light Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Labels",title:"Light Gray Canvas Labels",isReference:!0}]},"arcgis-dark-gray":{get thumbnailUrl(){return i("esri/images/basemap/dark-gray.jpg")},title:"Dark Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Base",title:"Dark Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Labels",title:"Dark Gray Canvas Labels",isReference:!0}]},"arcgis-navigation":{get thumbnailUrl(){return i("esri/images/basemap/streets-navigation.jpg")},title:"Navigation",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Navigation",title:"World Navigation Map"}]},"arcgis-navigation-night":{title:"Navigation (Dark Mode)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:NavigationNight",title:"World Navigation Map (Dark Mode)"}]},"arcgis-streets":{get thumbnailUrl(){return i("esri/images/basemap/streets-vector.jpg")},title:"Streets",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Streets",title:"World Street Map"}]},"arcgis-streets-night":{get thumbnailUrl(){return i("esri/images/basemap/streets-night.jpg")},title:"Streets (Night)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsNight",title:"World Street Map (Night)"}]},"arcgis-streets-relief":{get thumbnailUrl(){return i("esri/images/basemap/streets-relief.jpg")},title:"Streets (with Relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsRelief:Base",title:"World Street Map (with Relief)"}]},"arcgis-topographic":{get thumbnailUrl(){return i("esri/images/basemap/topo.jpg")},title:"Topographic",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Topographic:Base",title:"World Topographic Map"}]},"arcgis-oceans":{get thumbnailUrl(){return i("esri/images/basemap/oceans.jpg")},title:"Oceans",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Ocean Base",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Oceans:Labels",title:"World Ocean Reference",isReference:!0}]},"osm-standard":{title:"OpenStreetMap",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Standard",title:"OpenStreetMap"}]},"osm-standard-relief":{title:"OpenStreetMap (with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StandardRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-streets":{title:"OpenStreetMap (Streets)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Streets",title:"OpenStreetMap (Streets)"}]},"osm-streets-relief":{title:"OpenStreetMap (Streets with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StreetsRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-light-gray":{title:"OpenStreetMap (Light Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Base",title:"OSM (Light Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Labels",title:"OSM (Light Gray Reference)",isReference:!0}]},"osm-dark-gray":{title:"OpenStreetMap (Dark Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Base",title:"OSM (Dark Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Labels",title:"OSM (Dark Gray Reference)",isReference:!0}]},"arcgis-terrain":{title:"Terrain with Labels",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Base",title:"World Terrain Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Detail",title:"World Terrain Reference",isReference:!0}]},"arcgis-community":{title:"Community",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community",title:"Community"}]},"arcgis-charted-territory":{title:"Charted Territory",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ChartedTerritory:Base",title:"Charted Territory"}]},"arcgis-colored-pencil":{title:"Colored Pencil",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ColoredPencil",title:"Colored Pencil"}]},"arcgis-nova":{title:"Nova",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Nova",title:"Nova"}]},"arcgis-modern-antique":{title:"Modern Antique",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ModernAntique:Base",title:"Modern Antique"}]},"arcgis-midcentury":{title:"Mid-Century",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Midcentury",title:"Mid-Century"}]},"arcgis-newspaper":{title:"Newspaper",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Newspaper",title:"Newspaper"}]},"arcgis-hillshade-light":{title:"Hillshade",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"}]},"arcgis-hillshade-dark":{title:"Hillshade (Dark)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade (Dark)",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer"}]},"arcgis-human-geography":{title:"Human Geography",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Base",title:"Human Geography Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Detail",title:"Human Geography Detail",isReference:!0},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Label",title:"Human Geography Label",isReference:!0}]},"arcgis-human-geography-dark":{title:"Human Geography (Dark)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Base",title:"Human Geography Dark Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Detail",title:"Human Geography Dark Detail",isReference:!0},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Label",title:"Human Geography Dark Label",isReference:!0}]}},J=new Set(["ar","bs","ca","hr","cs","da","nl","en","et","fi","fr","de","el","he","hu","id","it","ja","ko","lv","lt","nb","pl","ro","ru","sr","es","sv","th","tr","uk","vi"]);let y=class extends D{constructor(e){super(e),this.id=null,this.language=null,this.places=null,this.serviceUrl="https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps",this.worldview=null}getLanguageParamValue(){if(this.language)return this.language;const e=V().toLowerCase();switch(e){case"pt-br":return"pt-BR";case"pt-pt":return"pt-PT";case"zh-cn":return"zh-CN";case"zh-hk":return"zh-HK";case"zh-tw":return"zh-TW"}const r=W(e);return r==="pt"?"pt-BR":r&&J.has(r)?r:"global"}};l([c()],y.prototype,"id",void 0),l([c()],y.prototype,"language",void 0),l([c()],y.prototype,"places",void 0),l([c()],y.prototype,"serviceUrl",void 0),l([c()],y.prototype,"worldview",void 0),y=l([_("esri.support.BasemapStyle")],y);const q=y;var d;let K=0,o=d=class extends B(x){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+K++,this.baseLayers=new h,this.referenceLayers=new h;const r=a=>{a.parent&&a.parent!==this&&"remove"in a.parent&&a.parent.remove(a),a.parent=this,a.type==="elevation"&&L.getLogger(this).error(`Layer '${a.title}, id:${a.id}' of type '${a.type}' is not supported as a basemap layer and will therefore be ignored.`)},s=a=>{a.parent=null};this.addHandles([this.baseLayers.on("after-add",a=>r(a.item)),this.referenceLayers.on("after-add",a=>r(a.item)),this.baseLayers.on("after-remove",a=>s(a.item)),this.referenceLayers.on("after-remove",a=>s(a.item))])}initialize(){this.when().catch(e=>{L.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const s of e)s.destroy();const r=this.referenceLayers.toArray();for(const s of r)s.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=R(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",f(e,this._get("baseLayers")))}_writeBaseLayers(e,r,s){const a=[];e&&(s={...s,layerContainerType:"basemap"},this.baseLayers.forEach(t=>{const p=U(t,s.webmap?s.webmap.getLayerJSONFromResourceInfo(t):null,s);p!=null&&a.push(p)}),this.referenceLayers.forEach(t=>{const p=U(t,s.webmap?s.webmap.getLayerJSONFromResourceInfo(t):null,s);p!=null&&(t.type!=="scene"&&(p.isReference=!0),a.push(p))})),r.baseMapLayers=a}set referenceLayers(e){this._set("referenceLayers",f(e,this._get("referenceLayers")))}writeTitle(e,r){r.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return E(this,e=>{e(this.baseLayers,this.referenceLayers)})}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map(r=>T(r)?r.clone():r),referenceLayers:this.referenceLayers.map(r=>T(r)?r.clone():r)};return this.loaded&&(e.loadStatus="loaded"),new d({resourceInfo:this.resourceInfo}).set(e)}read(e,r){this.resourceInfo||this._set("resourceInfo",{data:e,context:r}),super.read(e,r)}write(e,r){var s;return e=e||{},r!=null&&r.origin||(r={origin:"web-map",...r}),super.write(e,r),!this.loaded&&((s=this.resourceInfo)!=null&&s.data.baseMapLayers)&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(a=>{const t=j(a);return t.url&&M(t.url)&&(t.url=`https:${t.url}`),t.templateUrl&&M(t.templateUrl)&&(t.templateUrl=`https:${t.templateUrl}`),t})),e}async _loadFromSource(e){const{resourceInfo:r,portalItem:s,style:a}=this;I(e);const t=[];if(r){const p=r.context?r.context.url:null;if(t.push(this._loadLayersFromJSON(r.data,p,e)),r.data.id&&!r.data.title){const g=r.data.id;t.push(F(g).then(n=>{n&&this.read({title:n},r.context)}))}}else s?t.push(this._loadFromItem(s,e)):a&&t.push(this._loadFromStylesService(a,e));await Promise.all(t)}async _loadLayersFromJSON(e,r,s){var v,u;const a=(v=this.resourceInfo)==null?void 0:v.context,t=((u=this.portalItem)==null?void 0:u.portal)||(a==null?void 0:a.portal)||null,p=X[(a==null?void 0:a.origin)||""]??"web-map",{populateOperationalLayers:g}=await H(async()=>{const{populateOperationalLayers:b}=await import("./layersCreator-B7QnC6RR.js");return{populateOperationalLayers:b}},__vite__mapDeps([0,1,2,3,4,5])),n=[];if(I(s),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const b={context:{...a,origin:p,url:r,portal:t,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},S=m=>p==="web-scene"&&m.layerType==="ArcGISSceneServiceLayer"||m.isReference,A=g(this.baseLayers,e.baseMapLayers.filter(m=>!S(m)),b);n.push(A);const O=g(this.referenceLayers,e.baseMapLayers.filter(S),b);n.push(O)}await Promise.allSettled(n)}async _loadFromItem(e,r){const s=await e.load(r),a=await s.fetchData("json",r),t=w(e.itemUrl??"");return this._set("resourceInfo",{data:a.baseMap??{},context:{origin:Q[e.type||""]??"web-map",portal:e.portal||G.getDefault(),url:t}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:a.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||G.getDefault(),url:t}),this._loadLayersFromJSON(this.resourceInfo.data,t,r)}async _loadFromStylesService(e,r){const s=`${e.serviceUrl}/${e.id}`,a=(await N(s,{query:{language:e.getLanguageParamValue(),places:e.places,worldview:e.worldview},signal:r==null?void 0:r.signal})).data,t=w(s);return this._set("resourceInfo",{data:a.baseMap??{},context:{origin:"web-map",url:t}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:a.spatialReference},this.resourceInfo.context),this._loadLayersFromJSON(this.resourceInfo.data,t,r)}static fromId(e){const r=z[e];return r?r.itemId?new d({portalItem:{id:r.itemId,portal:{url:"https://www.arcgis.com"}}}):d.fromJSON(r,{origin:r.is3d?"web-scene":"web-map"}):null}};l([c({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,r,s,a){this._writeBaseLayers(e,r,a)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:h}},writer(e,r,s,a){this._writeBaseLayers(e,r,a)}}}}}})],o.prototype,"baseLayers",null),l([c({type:String,json:{origins:{"web-scene":{write:!0}}}})],o.prototype,"id",void 0),l([c({type:$})],o.prototype,"portalItem",void 0),l([c()],o.prototype,"referenceLayers",null),l([c({readOnly:!0})],o.prototype,"resourceInfo",void 0),l([c({type:P})],o.prototype,"spatialReference",void 0),l([c({type:q})],o.prototype,"style",void 0),l([c()],o.prototype,"thumbnailUrl",void 0),l([c({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],o.prototype,"title",void 0),l([C("title")],o.prototype,"writeTitle",null),o=d=l([_("esri.Basemap")],o);const Q={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},X={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},re=o;export{re as default}; diff --git a/build/assets/BindType-BmZEZMMh.js b/build/assets/BindType-BmZEZMMh.js new file mode 100644 index 0000000..ffab929 --- /dev/null +++ b/build/assets/BindType-BmZEZMMh.js @@ -0,0 +1 @@ +var s;(function(a){a[a.Pass=0]="Pass",a[a.Draw=1]="Draw"})(s||(s={}));export{s as a}; diff --git a/build/assets/BingMapsLayer-BKYZg17f.js b/build/assets/BingMapsLayer-BKYZg17f.js new file mode 100644 index 0000000..3fa3b18 --- /dev/null +++ b/build/assets/BingMapsLayer-BKYZg17f.js @@ -0,0 +1 @@ +import{cq as M,cu as j,cr as x,ay as c,aZ as B,b3 as U,U as h,s as u,B as r,D as s,E as T,cE as P,a_ as R,cs as k,cv as _,Q as I}from"./index-DKOmzAMm.js";import{o as f}from"./imageBitmapUtils-kF4U_Pyx.js";import{z as b,t as L,p as a}from"./TileInfo-Bx6eEWV4.js";var v;const y=new L("0/0/0",0,0,0,void 0);let g=v=class extends M(j(x(P))){constructor(){super(...arguments),this.tileInfo=b.create({spatialReference:c.WebMercator,size:256}),this.type="base-tile",this.fullExtent=new B(-20037508342787e-6,-2003750834278e-5,2003750834278e-5,20037508342787e-6,c.WebMercator),this.spatialReference=c.WebMercator}getTileBounds(e,t,i,l){const n=l||U();return y.level=e,y.row=t,y.col=i,y.extent=n,this.tileInfo.updateTileInfo(y),y.extent=void 0,n}fetchTile(e,t,i,l={}){const{signal:n}=l,p=this.getTileUrl(e,t,i),d={responseType:"image",signal:n,query:{...this.refreshParameters}};return h(p??"",d).then(m=>m.data)}async fetchImageBitmapTile(e,t,i,l={}){const{signal:n}=l;if(this.fetchTile!==v.prototype.fetchTile){const S=await this.fetchTile(e,t,i,l);return f(S,e,t,i,n)}const p=this.getTileUrl(e,t,i)??"",d={responseType:"blob",signal:n,query:{...this.refreshParameters}},{data:m}=await h(p,d);return f(m,e,t,i,n)}getTileUrl(){throw new u("basetilelayer:gettileurl-not-implemented","getTileUrl() is not implemented")}};r([s({type:b})],g.prototype,"tileInfo",void 0),r([s({type:["show","hide"]})],g.prototype,"listMode",void 0),r([s({readOnly:!0,value:"base-tile"})],g.prototype,"type",void 0),r([s({nonNullable:!0})],g.prototype,"fullExtent",void 0),r([s()],g.prototype,"spatialReference",void 0),g=v=r([T("esri.layers.BaseTileLayer")],g);const z=g,w=new R({BingMapsAerial:"aerial",BingMapsRoad:"road",BingMapsHybrid:"hybrid"}),A="https://dev.virtualearth.net";let o=class extends M(k(_(z))){constructor(e){super(e),this.type="bing-maps",this.tileInfo=new b({size:[256,256],dpi:96,origin:new I({x:-20037508342787e-6,y:20037508342787e-6,spatialReference:c.WebMercator}),spatialReference:c.WebMercator,lods:[new a({level:1,resolution:78271.5169639999,scale:295828763795777e-6}),new a({level:2,resolution:39135.7584820001,scale:147914381897889e-6}),new a({level:3,resolution:19567.8792409999,scale:73957190948944e-6}),new a({level:4,resolution:9783.93962049996,scale:36978595474472e-6}),new a({level:5,resolution:4891.96981024998,scale:18489297737236e-6}),new a({level:6,resolution:2445.98490512499,scale:9244648868618e-6}),new a({level:7,resolution:1222.99245256249,scale:4622324434309e-6}),new a({level:8,resolution:611.49622628138,scale:2311162217155e-6}),new a({level:9,resolution:305.748113140558,scale:1155581108577e-6}),new a({level:10,resolution:152.874056570411,scale:577790.554289}),new a({level:11,resolution:76.4370282850732,scale:288895.277144}),new a({level:12,resolution:38.2185141425366,scale:144447.638572}),new a({level:13,resolution:19.1092570712683,scale:72223.819286}),new a({level:14,resolution:9.55462853563415,scale:36111.909643}),new a({level:15,resolution:4.77731426794937,scale:18055.954822}),new a({level:16,resolution:2.38865713397468,scale:9027.977411}),new a({level:17,resolution:1.19432856685505,scale:4513.988705}),new a({level:18,resolution:.597164283559817,scale:2256.994353}),new a({level:19,resolution:.298582141647617,scale:1128.497176}),new a({level:20,resolution:.1492910708238085,scale:564.248588})]}),this.key=null,this.style="road",this.culture="en-US",this.region=null,this.portalUrl=null,this.hasAttributionData=!0}get bingMetadata(){return this._get("bingMetadata")}set bingMetadata(e){this._set("bingMetadata",e)}get copyright(){return this.bingMetadata!=null?this.bingMetadata.copyright:null}get operationalLayerType(){return w.toJSON(this.style)}get bingLogo(){return this.bingMetadata!=null?this.bingMetadata.brandLogoUri:null}load(e){return this.key?this.addResolvingPromise(this._getMetadata()):this.portalUrl?this.addResolvingPromise(this._getPortalBingKey().then(()=>this._getMetadata())):this.addResolvingPromise(Promise.reject(new u("bingmapslayer:load","Bing layer must have bing key."))),Promise.resolve(this)}getTileUrl(e,t,i){if(!this.loaded||this.bingMetadata==null)return null;const l=this.bingMetadata.resourceSets[0].resources[0],n=l.imageUrlSubdomains[t%l.imageUrlSubdomains.length],p=this._getQuadKey(e,t,i);return l.imageUrl.replace("{subdomain}",n).replace("{quadkey}",p)}async fetchAttributionData(){return this.load().then(()=>this.bingMetadata==null?null:{contributors:this.bingMetadata.resourceSets[0].resources[0].imageryProviders.map(e=>({attribution:e.attribution,coverageAreas:e.coverageAreas.map(t=>({zoomMin:t.zoomMin,zoomMax:t.zoomMax,score:1,bbox:[t.bbox[0],t.bbox[1],t.bbox[2],t.bbox[3]]}))}))})}_getMetadata(){const e={road:"roadOnDemand",aerial:"aerial",hybrid:"aerialWithLabelsOnDemand"}[this.style];return h(`${A}/REST/v1/Imagery/Metadata/${e}`,{responseType:"json",query:{include:"ImageryProviders",uriScheme:"https",key:this.key,suppressStatus:!0,output:"json",culture:this.culture,userRegion:this.region}}).then(t=>{const i=t.data;if(i.statusCode!==200)throw new u("bingmapslayer:getmetadata",i.statusDescription);if(this.bingMetadata=i,this.bingMetadata.resourceSets.length===0)throw new u("bingmapslayer:getmetadata","no bing resourcesets");if(this.bingMetadata.resourceSets[0].resources.length===0)throw new u("bingmapslayer:getmetadata","no bing resources")}).catch(t=>{throw new u("bingmapslayer:getmetadata",t.message)})}_getPortalBingKey(){return h(this.portalUrl??"",{responseType:"json",authMode:"no-prompt",query:{f:"json"}}).then(e=>{if(!e.data.bingKey)throw new u("bingmapslayer:getportalbingkey","The referenced Portal does not contain a valid bing key");this.key=e.data.bingKey}).catch(e=>{throw new u("bingmapslayer:getportalbingkey",e.message)})}_getQuadKey(e,t,i){let l="";for(let n=e;n>0;n--){let p=0;const d=1<({minX:s[0],minY:s[1],maxX:s[2],maxY:s[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const s=new Array(this._idByBounds.size);let i=0;this._idByBounds.forEach((n,e)=>{s[i++]=e}),this._indexInvalid=!1,this._index.clear(),this._index.load(s)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(s=>this._idByBounds.has(s))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const s=h();for(const i of this._boundsById.values())i&&(s[0]=Math.min(i[0],s[0]),s[1]=Math.min(i[1],s[1]),s[2]=Math.max(i[2],s[2]),s[3]=Math.max(i[3],s[3]));return s}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(s){const i=this._boundsById.get(s);this._boundsById.delete(s),i&&(this._idByBounds.delete(i),this._indexInvalid||this._index.remove(i))}forEachInBounds(s,i){this._loadIndex(),l(this._index,s,n=>i(this._idByBounds.get(n)))}get(s){return this._boundsById.get(s)}has(s){return this._boundsById.has(s)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(s,i){if(!this._indexInvalid){const n=this._boundsById.get(s);n&&(this._index.remove(n),this._idByBounds.delete(n))}this._boundsById.set(s,i),i&&(this._idByBounds.set(i,s),this._indexInvalid||(this._boundsToLoad.push(i),this._boundsToLoad.length>_&&this._loadIndex()))}}export{B as o}; diff --git a/build/assets/BufferView-DOhKdt-N.js b/build/assets/BufferView-DOhKdt-N.js new file mode 100644 index 0000000..9d926bd --- /dev/null +++ b/build/assets/BufferView-DOhKdt-N.js @@ -0,0 +1 @@ +import{o as G}from"./vec2-CurFBDJu.js";import{g7 as H,ag as _}from"./index-DKOmzAMm.js";let q=class{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.elementCount=9;const f=this.TypedArrayConstructor;r===void 0&&(r=9*f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}getMat(e,t){let s=e*this.typedBufferStride;for(let r=0;r<9;r++)t[r]=this.typedBuffer[s++];return t}setMat(e,t){let s=e*this.typedBufferStride;for(let r=0;r<9;r++)this.typedBuffer[s++]=t[r]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,s){this.typedBuffer[e*this.typedBufferStride+t]=s}copyFrom(e,t,s){const r=this.typedBuffer,i=t.typedBuffer;let f=e*this.typedBufferStride,u=s*t.typedBufferStride;for(let p=0;p<9;++p)r[f++]=i[u++]}get buffer(){return this.typedBuffer.buffer}};q.ElementCount=9;let z=class{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.elementCount=16;const f=this.TypedArrayConstructor;r===void 0&&(r=16*f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}getMat(e,t){let s=e*this.typedBufferStride;for(let r=0;r<16;r++)t[r]=this.typedBuffer[s++];return t}setMat(e,t){let s=e*this.typedBufferStride;for(let r=0;r<16;r++)this.typedBuffer[s++]=t[r]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,s){this.typedBuffer[e*this.typedBufferStride+t]=s}copyFrom(e,t,s){const r=this.typedBuffer,i=t.typedBuffer;let f=e*this.typedBufferStride,u=s*t.typedBufferStride;for(let p=0;p<16;++p)r[f++]=i[u++]}get buffer(){return this.typedBuffer.buffer}};z.ElementCount=16;class y{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.elementCount=1;const f=this.TypedArrayConstructor;r===void 0&&(r=f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.stride=r,this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}y.ElementCount=1;let n=class{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.elementCount=2;const f=this.TypedArrayConstructor;r===void 0&&(r=2*f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}getVec(e,t){return e*=this.typedBufferStride,G(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,s){this.typedBuffer[e*this.typedBufferStride+t]=s}setValues(e,t,s){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=s}copyFrom(e,t,s){const r=this.typedBuffer,i=t.typedBuffer;let f=e*this.typedBufferStride,u=s*t.typedBufferStride;r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}};n.ElementCount=2;let h=class{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.elementCount=3;const f=this.TypedArrayConstructor;r===void 0&&(r=3*f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}getVec(e,t){return e*=this.typedBufferStride,H(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,s){this.typedBuffer[e*this.typedBufferStride+t]=s}setValues(e,t,s,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=s,this.typedBuffer[e]=r}copyFrom(e,t,s){const r=this.typedBuffer,i=t.typedBuffer;let f=e*this.typedBufferStride,u=s*t.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}};h.ElementCount=3;class c{constructor(e,t,s=0,r,i){this.TypedArrayConstructor=e,this.start=s,this.elementCount=4;const f=this.TypedArrayConstructor;r===void 0&&(r=4*f.BYTES_PER_ELEMENT);const u=t.byteLength===0?0:s;this.typedBuffer=i==null?new f(t,u):new f(t,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,s=this.count-t){const r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+s*this.stride)}getVec(e,t){return e*=this.typedBufferStride,_(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,s){this.typedBuffer[e*this.typedBufferStride+t]=s}setValues(e,t,s,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=s,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}copyFrom(e,t,s){const r=this.typedBuffer,i=t.typedBuffer;let f=e*this.typedBufferStride,u=s*t.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}c.ElementCount=4;class D extends y{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}D.ElementType="f32";class l extends n{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}l.ElementType="f32";class o extends h{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}o.ElementType="f32";class a extends c{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}a.ElementType="f32";class B extends q{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}B.ElementType="f32";class b extends q{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}b.ElementType="f64";class T extends z{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}T.ElementType="f32";class E extends z{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}E.ElementType="f64";class m extends y{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}m.ElementType="f64";class A extends n{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}A.ElementType="f64";class O extends h{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}O.ElementType="f64";class S extends c{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}S.ElementType="f64";class g extends y{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}g.ElementType="u8";class L extends n{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}L.ElementType="u8";class w extends h{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}w.ElementType="u8";class x extends c{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}x.ElementType="u8";class M extends y{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}M.ElementType="u16";class C extends n{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}C.ElementType="u16";class N extends h{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}N.ElementType="u16";class P extends c{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}P.ElementType="u16";class R extends y{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(R,e,t)}static fromTypedArray(e,t){return new R(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}R.ElementType="u32";class Y extends n{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(Y,e,t)}static fromTypedArray(e,t){return new Y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Y.ElementType="u32";class F extends h{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}F.ElementType="u32";class I extends c{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}I.ElementType="u32";class U extends y{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}U.ElementType="i8";class V extends n{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}V.ElementType="i8";class $ extends h{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer($,e,t)}static fromTypedArray(e,t){return new $(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}$.ElementType="i8";class v extends c{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}v.ElementType="i8";class J extends y{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}J.ElementType="i16";class K extends n{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}K.ElementType="i16";class Q extends h{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Q,e,t)}static fromTypedArray(e,t){return new Q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Q.ElementType="i16";class W extends c{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(W,e,t)}static fromTypedArray(e,t){return new W(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}W.ElementType="i16";class X extends y{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(X,e,t)}static fromTypedArray(e,t){return new X(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}X.ElementType="i32";class Z extends n{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Z,e,t)}static fromTypedArray(e,t){return new Z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Z.ElementType="i32";class j extends h{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}j.ElementType="i32";class k extends c{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}k.ElementType="i32";export{L as A,R as B,X as C,Z as D,N as E,Y as F,j as G,k as H,F as I,P as L,$ as M,w as O,v as S,O as T,I as U,V,b as a,E as b,a as c,g as d,M as g,S as h,o as i,U as j,J as k,B as l,A as m,m as o,T as p,K as q,l as u,Q as v,C as w,x,D as y,W as z}; diff --git a/build/assets/BuildingSceneLayer-BBmWR18K.js b/build/assets/BuildingSceneLayer-BBmWR18K.js new file mode 100644 index 0000000..748e6a4 --- /dev/null +++ b/build/assets/BuildingSceneLayer-BBmWR18K.js @@ -0,0 +1 @@ +import{cp as de,B as t,D as s,aS as I,ey as ce,id as _,E as p,gJ as he,aN as ee,i0 as te,bE as me,dj as re,V as F,el as ge,U as se,dK as fe,hk as ve,s as x,a8 as be,aZ as Se,ay as ie,eK as we,eu as $e,er as Oe,es as Fe,a$ as oe,a_ as xe,ex as Ie,a7 as b,c8 as Le,F as g,$ as d,ie as je,ck as Te,cF as Be,cs as Ee,ct as Ae,cu as Pe,cv as _e,cG as qe,cH as Ne,aV as Re,aK as ke,ig as Me,cx as Ue,cN as Ke,cE as Qe}from"./index-DKOmzAMm.js";import{l as Ve}from"./CollectionFlattener-BmCRFqHz.js";import{a as Ce,t as De}from"./loadAll-Cm5pWAv4.js";import{s as Ze,n as He,p as Je}from"./popupUtils-CqjLs0mf.js";import{r as Ge,L as ze,C as Z}from"./SceneService-7YqMMGL5.js";import{p as We,a as Xe,y as Ye,m as et}from"./I3SLayerDefinitions-CR4J5n7u.js";import{$ as tt}from"./I3SUtil-7z-2YOel.js";import{s as rt}from"./associatedFeatureServiceUtils-D9v5WjkL.js";import{$ as H,Z as st,w as it}from"./elevationInfoUtils-CU9w6KS3.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./jsonContext-SE-5k22x.js";import"./resourceUtils-CwAv7wd8.js";import"./resourceUtils-Cz4P0EKM.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";import"./mat4f64-CSKppSlJ.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./sphere-DoGSV0K5.js";import"./plane-aHrUkISy.js";import"./mat3f64-q3fE-ZOt.js";import"./quatf64-Bdb9ZJJK.js";import"./vec2f64-DA6GkJuH.js";import"./I3SBinaryReader-BNZLVsC-.js";import"./VertexAttribute-BlT9lbVY.js";import"./NormalAttribute.glsl-DMc-kXcx.js";import"./BindType-BmZEZMMh.js";import"./orientedBoundingBox-RPlI7sU4.js";import"./mat3-BNGRf_pC.js";import"./quat-BYKy26Om.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";let y=class extends de(he){constructor(r){super(r),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(r,i){return typeof i.alias=="string"?i.alias:typeof i.name=="string"?i.name:""}readIdOnlyOnce(r){return this.id!==-1?this.id:typeof r=="number"?r:-1}};t([s({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],y.prototype,"title",void 0),t([I("service","title",["alias","name"])],y.prototype,"readTitle",null),t([s()],y.prototype,"layer",void 0),t([s({type:ce,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],y.prototype,"id",void 0),t([I("service","id")],y.prototype,"readIdOnlyOnce",null),t([s(_(String))],y.prototype,"modelName",void 0),t([s(_(Boolean))],y.prototype,"isEmpty",void 0),t([s({type:Boolean,nonNullable:!0})],y.prototype,"legendEnabled",void 0),t([s({type:Boolean,json:{name:"visibility",write:!0}})],y.prototype,"visible",void 0),t([s({type:Number,json:{write:!0}})],y.prototype,"opacity",void 0),y=t([p("esri.layers.buildingSublayers.BuildingSublayer")],y);const ae=y,J=Ie();let o=class extends ee.LoadableMixin(te(ae)){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){var e,r;return this.layer?{path:`${(e=this.layer.parsedUrl)==null?void 0:e.path}/sublayers/${this.id}`,query:(r=this.layer.parsedUrl)==null?void 0:r.query}:{path:""}}get fieldsIndex(){return new me(this.fields)}readAssociatedLayer(e,r){const i=this.layer.associatedFeatureServiceItem,a=r.associatedLayerID;return i!=null&&typeof a=="number"?new re({portalItem:i,customParameters:this.customParameters,layerId:a}):null}get objectIdField(){if(this.fields!=null){for(const e of this.fields)if(e.type==="oid")return e.name}return null}get displayField(){return this.associatedLayer!=null?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const r=e!=null?e.signal:null,i=this._fetchService(r).then(()=>{this.indexInfo=Ge(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,F.getLogger(this),r)});return this.addResolvingPromise(i),Promise.resolve(this)}createPopupTemplate(e){return ge(this,e)}async _fetchService(e){const r=(await se(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,r){var a,n,c;const i=(n=(a=this.getFeatureType(r==null?void 0:r.feature))==null?void 0:a.domains)==null?void 0:n[e];return i&&i.type!=="inherited"?i:((c=this.getField(e))==null?void 0:c.domain)??null}getFeatureType(e){return e&&this.associatedLayer!=null?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer!=null?this.associatedLayer.types??[]:[]}get typeIdField(){return this.associatedLayer!=null?this.associatedLayer.typeIdField:null}get geometryType(){return this.layerType==="3d-object"?"mesh":"point"}get profile(){return this.layerType==="3d-object"?"mesh-pyramids":"points"}get capabilities(){const e=this.associatedLayer!=null&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:Ze,{query:r,data:{supportsZ:i,supportsM:a,isVersioned:n}}=e;return{query:r,data:{supportsZ:i,supportsM:a,isVersioned:n}}}createQuery(){const e=new fe;return this.geometryType!=="mesh"&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,r){return this._getAssociatedLayerForQuery().then(i=>i.queryExtent(e||this.createQuery(),r))}queryFeatureCount(e,r){return this._getAssociatedLayerForQuery().then(i=>i.queryFeatureCount(e||this.createQuery(),r))}queryFeatures(e,r){return this._getAssociatedLayerForQuery().then(i=>i.queryFeatures(e||this.createQuery(),r)).then(i=>{if(i!=null&&i.features)for(const a of i.features)a.layer=this.layer,a.sourceLayer=this;return i})}queryObjectIds(e,r){return this._getAssociatedLayerForQuery().then(i=>i.queryObjectIds(e||this.createQuery(),r))}async queryCachedAttributes(e,r){const i=ve(this.fieldsIndex,await He(this,Je(this)));return tt(this.parsedUrl.path,this.attributeStorageInfo,e,r,i,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||i.length===0)throw new x("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new be({attributes:i[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:this.associatedLayer!=null}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e!=null&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),this.associatedLayer==null)throw new x("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new x("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};t([s({readOnly:!0})],o.prototype,"parsedUrl",null),t([s({type:We,readOnly:!0})],o.prototype,"nodePages",void 0),t([s({type:[Xe],readOnly:!0})],o.prototype,"materialDefinitions",void 0),t([s({type:[Ye],readOnly:!0})],o.prototype,"textureSetDefinitions",void 0),t([s({type:[et],readOnly:!0})],o.prototype,"geometryDefinitions",void 0),t([s({readOnly:!0})],o.prototype,"serviceUpdateTimeStamp",void 0),t([s({readOnly:!0})],o.prototype,"store",void 0),t([s({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],o.prototype,"rootNode",void 0),t([s({readOnly:!0})],o.prototype,"attributeStorageInfo",void 0),t([s(J.fields)],o.prototype,"fields",void 0),t([s({readOnly:!0})],o.prototype,"fieldsIndex",null),t([s({readOnly:!0,type:re})],o.prototype,"associatedLayer",void 0),t([I("service","associatedLayer",["associatedLayerID"])],o.prototype,"readAssociatedLayer",null),t([s(J.outFields)],o.prototype,"outFields",void 0),t([s({type:String,readOnly:!0})],o.prototype,"objectIdField",null),t([s({readOnly:!0,type:String,json:{read:!1}})],o.prototype,"displayField",null),t([s({readOnly:!0,type:String})],o.prototype,"apiKey",null),t([s({readOnly:!0,type:String})],o.prototype,"customParameters",null),t([s({readOnly:!0,type:Se})],o.prototype,"fullExtent",null),t([s({readOnly:!0,type:ie})],o.prototype,"spatialReference",null),t([s({readOnly:!0})],o.prototype,"version",null),t([s({readOnly:!0,type:we})],o.prototype,"elevationInfo",null),t([s({readOnly:!0,type:Number})],o.prototype,"minScale",null),t([s({readOnly:!0,type:Number})],o.prototype,"maxScale",null),t([s({readOnly:!0,type:Number})],o.prototype,"effectiveScaleRange",null),t([s({type:["hide","show"],json:{write:!0}})],o.prototype,"listMode",void 0),t([s({types:$e,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],o.prototype,"renderer",void 0),t([s({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],o.prototype,"definitionExpression",void 0),t([s(Oe)],o.prototype,"popupEnabled",void 0),t([s({type:Fe,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],o.prototype,"popupTemplate",void 0),t([s({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],o.prototype,"normalReferenceFrame",void 0),t([s({readOnly:!0,json:{read:!1}})],o.prototype,"defaultPopupTemplate",null),t([s()],o.prototype,"types",null),t([s()],o.prototype,"typeIdField",null),t([s({json:{write:!1}}),oe(new xe({"3DObject":"3d-object",Point:"point"}))],o.prototype,"layerType",void 0),t([s()],o.prototype,"geometryType",null),t([s()],o.prototype,"profile",null),t([s({readOnly:!0,json:{read:!1}})],o.prototype,"capabilities",null),t([s({readOnly:!0})],o.prototype,"statisticsInfo",void 0),o=t([p("esri.layers.buildingSublayers.BuildingComponentSublayer")],o);const q=o;var N;const G={type:b,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:ne}}},read:!1}};function ne(e,r,i){if(e&&Array.isArray(e))return new b(e.map(a=>{const n=ot(a);if(n){const c=new n;return c.read(a,i),c}return i!=null&&i.messages&&a&&i.messages.push(new Le("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(a.type||"unknown")+"' are not supported",{definition:a,context:i})),null}))}let m=N=class extends ae{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return Ce(this,e=>N.forEachSublayer(this.sublayers,r=>{r.type!=="building-group"&&e(r)}))}};function ot(e){return e.layerType==="group"?m:q}t([s({type:["hide","show","hide-children"],json:{write:!0}})],m.prototype,"listMode",void 0),t([s(G)],m.prototype,"sublayers",void 0),m=N=t([p("esri.layers.buildingSublayers.BuildingGroupSublayer")],m),function(e){function r(i,a){i.forEach(n=>{a(n),n.type==="building-group"&&r(n.sublayers,a)})}e.sublayersProperty=G,e.readSublayers=ne,e.forEachSublayer=r}(m||(m={}));const f=m;let L=class extends g{constructor(){super(...arguments),this.type=null}};t([s({type:String,readOnly:!0,json:{write:!0}})],L.prototype,"type",void 0),L=t([p("esri.layers.support.BuildingFilterAuthoringInfo")],L);const le=L;var R;let S=R=class extends g{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new R({filterType:this.filterType,filterValues:d(this.filterValues)})}};t([s({type:String,json:{write:!0}})],S.prototype,"filterType",void 0),t([s({type:[String],json:{write:!0}})],S.prototype,"filterValues",void 0),S=R=t([p("esri.layers.support.BuildingFilterAuthoringInfoType")],S);const at=S;var k;const nt=b.ofType(at);let j=k=class extends g{clone(){return new k({filterTypes:d(this.filterTypes)})}};t([s({type:nt,json:{write:!0}})],j.prototype,"filterTypes",void 0),j=k=t([p("esri.layers.support.BuildingFilterAuthoringInfoBlock")],j);const lt=j;var M;const pt=b.ofType(lt);let w=M=class extends le{constructor(){super(...arguments),this.type="checkbox"}clone(){return new M({filterBlocks:d(this.filterBlocks)})}};t([s({type:["checkbox"]})],w.prototype,"type",void 0),t([s({type:pt,json:{write:!0}})],w.prototype,"filterBlocks",void 0),w=M=t([p("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],w);const z=w;let T=class extends g{};t([s({readOnly:!0,json:{read:!1}})],T.prototype,"type",void 0),T=t([p("esri.layers.support.BuildingFilterMode")],T);const A=T;var U;let B=U=class extends A{constructor(){super(...arguments),this.type="solid"}clone(){return new U}};t([s({type:["solid"],readOnly:!0,json:{write:!0}})],B.prototype,"type",void 0),B=U=t([p("esri.layers.support.BuildingFilterModeSolid")],B);const K=B;var Q;let $=Q=class extends A{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Q({edges:d(this.edges)})}};t([oe({wireFrame:"wire-frame"})],$.prototype,"type",void 0),t([s(je)],$.prototype,"edges",void 0),$=Q=t([p("esri.layers.support.BuildingFilterModeWireFrame")],$);const W=$;var V;let E=V=class extends A{constructor(){super(...arguments),this.type="x-ray"}clone(){return new V}};t([s({type:["x-ray"],readOnly:!0,json:{write:!0}})],E.prototype,"type",void 0),E=V=t([p("esri.layers.support.BuildingFilterModeXRay")],E);const X=E;var C;const yt={nonNullable:!0,types:{key:"type",base:A,typeMap:{solid:K,"wire-frame":W,"x-ray":X}},json:{read:e=>{switch(e==null?void 0:e.type){case"solid":return K.fromJSON(e);case"wireFrame":return W.fromJSON(e);case"x-ray":return X.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let v=C=class extends g{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new K,this.title=""}clone(){return new C({filterExpression:this.filterExpression,filterMode:d(this.filterMode),title:this.title})}};t([s({type:String,json:{write:{enabled:!0,isRequired:!0}}})],v.prototype,"filterExpression",void 0),t([s(yt)],v.prototype,"filterMode",void 0),t([s({type:String,json:{write:{enabled:!0,isRequired:!0}}})],v.prototype,"title",void 0),v=C=t([p("esri.layers.support.BuildingFilterBlock")],v);const ut=v;var D;const dt=b.ofType(ut);let h=D=class extends g{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=Te(),this.name=null}clone(){return new D({description:this.description,filterBlocks:d(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:d(this.filterAuthoringInfo)})}};t([s({type:String,json:{write:!0}})],h.prototype,"description",void 0),t([s({type:dt,json:{write:{enabled:!0,isRequired:!0}}})],h.prototype,"filterBlocks",void 0),t([s({types:{key:"type",base:le,typeMap:{checkbox:z}},json:{read:e=>(e==null?void 0:e.type)==="checkbox"?z.fromJSON(e):null,write:!0}})],h.prototype,"filterAuthoringInfo",void 0),t([s({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],h.prototype,"id",void 0),t([s({type:String,json:{write:{enabled:!0,isRequired:!0}}})],h.prototype,"name",void 0),h=D=t([p("esri.layers.support.BuildingFilter")],h);const ct=h;let u=class extends g{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};t([s({type:String})],u.prototype,"fieldName",void 0),t([s({type:String})],u.prototype,"modelName",void 0),t([s({type:String})],u.prototype,"label",void 0),t([s({type:Number})],u.prototype,"min",void 0),t([s({type:Number})],u.prototype,"max",void 0),t([s({json:{read:e=>Array.isArray(e)&&(e.every(r=>typeof r=="string")||e.every(r=>typeof r=="number"))?e.slice():null}})],u.prototype,"mostFrequentValues",void 0),t([s({type:[Number]})],u.prototype,"subLayerIds",void 0),u=t([p("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],u);let O=class extends ee.LoadableMixin(te(g)){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||this.loadStatus==="loading"?this._get("fields"):(F.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const r=e!=null?e.signal:null;return this.addResolvingPromise(this._fetchService(r)),Promise.resolve(this)}async _fetchService(e){const r=(await se(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(r,{origin:"service"})}};t([s({constructOnly:!0,type:String})],O.prototype,"url",void 0),t([s({readOnly:!0,type:[u],json:{read:{source:"summary"}}})],O.prototype,"fields",null),O=t([p("esri.layers.support.BuildingSummaryStatistics")],O);const pe=O,ye=b.ofType(ct),ue=d(f.sublayersProperty);var Y;const P=(Y=ue.json)==null?void 0:Y.origins;P&&(P["web-scene"]={type:[q],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},P["portal-item"]={type:[q],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let l=class extends ze(Be(Ee(Ae(Pe(_e(qe(Ne(Qe)))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new Ve({getCollections:()=>[this.sublayers],getChildrenFunction:r=>r.type==="building-group"?r.sublayers:null}),this.sublayers=null,this._sublayerOverrides=null,this.filters=new ye,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return typeof e=="string"?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,r,i){const a=f.readSublayers(e,r,i);return f.forEachSublayer(a,n=>n.layer=this),this._sublayerOverrides&&(this.applySublayerOverrides(a,this._sublayerOverrides),this._sublayerOverrides=null),a}applySublayerOverrides(e,{overrides:r,context:i}){f.forEachSublayer(e,a=>a.read(r.get(a.id),i))}readSublayerOverrides(e,r){var a;const i=new Map;for(const n of e)n!=null&&typeof n=="object"&&typeof n.id=="number"?i.set(n.id,n):(a=r.messages)==null||a.push(new x("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:n}));return{overrides:i,context:r}}writeSublayerOverrides(e,r,i){const a=[];f.forEachSublayer(this.sublayers,n=>{const c=n.write({},i);Object.keys(c).length>1&&a.push(c)}),a.length>0&&(r.sublayers=a)}writeUnappliedOverrides(e,r){r.sublayers=[],e.overrides.forEach(i=>{r.sublayers.push(d(i))})}write(e,r){return e=super.write(e,r),!r||r.origin!=="web-scene"&&r.origin!=="portal-item"||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,r):this._sublayerOverrides&&this.writeUnappliedOverrides(this._sublayerOverrides,e)),e}read(e,r){if(super.read(e,r),r&&(r.origin==="web-scene"||r.origin==="portal-item")&&e!=null&&Array.isArray(e.sublayers)){const i=this.readSublayerOverrides(e.sublayers,r);this.sublayers?this.applySublayerOverrides(this.sublayers,i):this._sublayerOverrides=i}}readSummaryStatistics(e,r){var i;if(typeof r.statisticsHRef=="string"){const a=Re((i=this.parsedUrl)==null?void 0:i.path,r.statisticsHRef);return new pe({url:a})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const r=e!=null?e.signal:null,i=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(ke).then(()=>this._fetchService(r)).then(()=>this._fetchAssociatedFeatureService(r));return this.addResolvingPromise(i),Promise.resolve(this)}loadAll(){return De(this,e=>{f.forEachSublayer(this.sublayers,r=>{r.type!=="building-group"&&e(r)}),this.summaryStatistics&&e(this.summaryStatistics)})}async saveAs(e,r){return this._debouncedSaveOperations(Z.SAVE_AS,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(Z.SAVE,e)}validateLayer(e){if(!e.layerType||e.layerType!=="Building")throw new x("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:r}=await rt(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=r}catch(r){F.getLogger(this).warn("Associated feature service item could not be loaded",r)}}_validateElevationInfo(){const e=this.elevationInfo,r="Building scene layers";H(F.getLogger(this),st(r,"absolute-height",e)),H(F.getLogger(this),it(r,e))}};t([s({type:["BuildingSceneLayer"]})],l.prototype,"operationalLayerType",void 0),t([s({readOnly:!0})],l.prototype,"allSublayers",void 0),t([s(ue)],l.prototype,"sublayers",void 0),t([I("service","sublayers")],l.prototype,"readSublayers",null),t([s({type:ye,nonNullable:!0,json:{write:!0}})],l.prototype,"filters",void 0),t([s({type:String,json:{write:!0}})],l.prototype,"activeFilterId",void 0),t([s({readOnly:!0,type:pe})],l.prototype,"summaryStatistics",void 0),t([I("summaryStatistics",["statisticsHRef"])],l.prototype,"readSummaryStatistics",null),t([s({type:[String],json:{read:!1}})],l.prototype,"outFields",void 0),t([s(Me)],l.prototype,"fullExtent",void 0),t([s(Ue)],l.prototype,"legendEnabled",void 0),t([s({type:["show","hide","hide-children"]})],l.prototype,"listMode",void 0),t([s(_(ie))],l.prototype,"spatialReference",void 0),t([s(Ke)],l.prototype,"elevationInfo",null),t([s({json:{read:!1},readOnly:!0})],l.prototype,"type",void 0),t([s()],l.prototype,"associatedFeatureServiceItem",void 0),l=t([p("esri.layers.BuildingSceneLayer")],l);const Ht=l;export{Ht as default}; diff --git a/build/assets/ByteSizeUnit-BsxeN7wM.js b/build/assets/ByteSizeUnit-BsxeN7wM.js new file mode 100644 index 0000000..229d5c2 --- /dev/null +++ b/build/assets/ByteSizeUnit-BsxeN7wM.js @@ -0,0 +1 @@ +var G;(function(B){B[B.KILOBYTES=1024]="KILOBYTES",B[B.MEGABYTES=1048576]="MEGABYTES",B[B.GIGABYTES=1073741824]="GIGABYTES"})(G||(G={}));export{G as E}; diff --git a/build/assets/CSVLayer-BfiE75hl.js b/build/assets/CSVLayer-BfiE75hl.js new file mode 100644 index 0000000..07a3744 --- /dev/null +++ b/build/assets/CSVLayer-BfiE75hl.js @@ -0,0 +1 @@ +import{B as i,D as r,E as y,aN as v,dz as w,da as S,aZ as O,di as F,M as b,aS as I,cQ as q,ee as N,dj as _,ay as J,aK as j,I as C,dK as l,s as p}from"./index-DKOmzAMm.js";import{l as P}from"./clientSideDefaults-B7fGShzo.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";let n=class extends v{constructor(e){super(e),this.type="csv",this.refresh=w(async t=>{await this.load();const{extent:o,timeExtent:a}=await this._connection.invoke("refresh",t);return o&&(this.sourceJSON.extent=o),a&&(this.sourceJSON.timeInfo.timeExtent=[a.start,a.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=e!=null?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){var e;(e=this._connection)==null||e.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const o=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return S.fromJSON(o)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const o=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:o.count,extent:O.fromJSON(o.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _startWorker(e){this._connection=await F("CSVSourceWorker",{strategy:b("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{url:t,delimiter:o,fields:a,latitudeField:m,longitudeField:f,spatialReference:u,timeInfo:d}=this.loadOptions,c=await this._connection.invoke("load",{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:o,fields:a==null?void 0:a.map(g=>g.toJSON()),latitudeField:m,longitudeField:f,spatialReference:u==null?void 0:u.toJSON(),timeInfo:d==null?void 0:d.toJSON()}},{signal:e});this.locationInfo=c.locationInfo,this.sourceJSON=c.layerDefinition,this.delimiter=c.delimiter}};i([r()],n.prototype,"type",void 0),i([r()],n.prototype,"loadOptions",void 0),i([r()],n.prototype,"customParameters",void 0),i([r()],n.prototype,"locationInfo",void 0),i([r()],n.prototype,"sourceJSON",void 0),i([r()],n.prototype,"delimiter",void 0),n=i([y("esri.layers.graphics.sources.CSVSource")],n);function h(e,t){throw new p(t,`CSVLayer (title: ${e.title}, id: ${e.id}) cannot be saved to a portal item`)}let s=class extends _{constructor(...e){super(...e),this.geometryType="point",this.capabilities=P(!1,!1),this.delimiter=null,this.editingEnabled=!1,this.fields=null,this.latitudeField=null,this.locationType="coordinates",this.longitudeField=null,this.operationalLayerType="CSV",this.outFields=["*"],this.path=null,this.spatialReference=J.WGS84,this.source=null,this.type="csv"}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}load(e){const t=e!=null?e.signal:null,o=this.loadFromPortal({supportedTypes:["CSV"],supportsData:!1},e).catch(j).then(async()=>this.initLayerProperties(await this.createGraphicsSource(t)));return this.addResolvingPromise(o),Promise.resolve(this)}get isTable(){return this.loaded&&this.geometryType==null}readWebMapLabelsVisible(e,t){var o,a;return t.showLabels!=null?t.showLabels:!!((a=(o=t.layerDefinition)==null?void 0:o.drawingInfo)!=null&&a.labelingInfo)}set url(e){if(!e)return void this._set("url",e);const t=C(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async createGraphicsSource(e){const t=new n({loadOptions:{delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},customParameters:this.customParameters??void 0});return this._set("source",t),await t.load({signal:e}),this.read({locationInfo:t.locationInfo,columnDelimiter:t.delimiter},{origin:"service",url:this.parsedUrl}),t}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(l.from(e)||this.createQuery())).then(o=>{if(o!=null&&o.features)for(const a of o.features)a.layer=a.sourceLayer=this;return o})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(l.from(e)||this.createQuery()))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(l.from(e)||this.createQuery()))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(l.from(e)||this.createQuery()))}read(e,t){super.read(e,t),t&&t.origin==="service"&&this.revert(["latitudeField","longitudeField"],"service")}write(e,t){return super.write(e,{...t,writeLayerSchema:!0})}clone(){throw new p("csv-layer:clone",`CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`)}async save(e){return h(this,"csv-layer:save")}async saveAs(e,t){return h(this,"csv-layer:save-as")}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return t!=null&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_verifyFields(){}_verifySource(){}_hasMemorySource(){return!1}};i([r({readOnly:!0,json:{read:!1,write:!1}})],s.prototype,"capabilities",void 0),i([r({type:[","," ",";","|"," "],json:{read:{source:"columnDelimiter"},write:{target:"columnDelimiter",ignoreOrigin:!0}}})],s.prototype,"delimiter",void 0),i([r({readOnly:!0,type:Boolean,json:{origins:{"web-scene":{read:!1,write:!1}}}})],s.prototype,"editingEnabled",void 0),i([r({json:{read:{source:"layerDefinition.fields"},write:{target:"layerDefinition.fields"}}})],s.prototype,"fields",void 0),i([r({type:Boolean,readOnly:!0})],s.prototype,"isTable",null),i([I("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],s.prototype,"readWebMapLabelsVisible",null),i([r({type:String,json:{read:{source:"locationInfo.latitudeFieldName"},write:{target:"locationInfo.latitudeFieldName",ignoreOrigin:!0}}})],s.prototype,"latitudeField",void 0),i([r({type:["show","hide"]})],s.prototype,"listMode",void 0),i([r({type:["coordinates"],json:{read:{source:"locationInfo.locationType"},write:{target:"locationInfo.locationType",ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"locationType",void 0),i([r({type:String,json:{read:{source:"locationInfo.longitudeFieldName"},write:{target:"locationInfo.longitudeFieldName",ignoreOrigin:!0}}})],s.prototype,"longitudeField",void 0),i([r({type:["CSV"]})],s.prototype,"operationalLayerType",void 0),i([r()],s.prototype,"outFields",void 0),i([r({type:String,json:{origins:{"web-scene":{read:!1,write:!1}},read:!1,write:!1}})],s.prototype,"path",void 0),i([r({json:{read:!1},cast:null,type:n,readOnly:!0})],s.prototype,"source",void 0),i([r({json:{read:!1},value:"csv",readOnly:!0})],s.prototype,"type",void 0),i([r({json:{read:q,write:{isRequired:!0,ignoreOrigin:!0,writer:N}}})],s.prototype,"url",null),s=i([y("esri.layers.CSVLayer")],s);const D=s;export{D as default}; diff --git a/build/assets/CSVSourceWorker-DF7Oy86a.js b/build/assets/CSVSourceWorker-DF7Oy86a.js new file mode 100644 index 0000000..ef465d1 --- /dev/null +++ b/build/assets/CSVSourceWorker-DF7Oy86a.js @@ -0,0 +1,4 @@ +import{bK as _,bH as j,s as I,bJ as P,aU as R,V,I as L,U as A,bE as w,bI as E,bG as G,ab as Q,ad as M,dt as Z,du as J,ay as U,bD as Y,j as B}from"./index-DKOmzAMm.js";import{e as H,n as K}from"./date-M6n_RqpC.js";import{t as W}from"./json-Wa8cmqdu.js";import{a as z,e as X}from"./OptimizedFeature-DDMKj8Vq.js";import{m as ee}from"./FeatureStore-C3siChbH.js";import{$ as te,x as ie}from"./QueryEngine-CI3mggax.js";import{c as ne}from"./number-NXsKqxkQ.js";import{i as re,o as oe}from"./clientSideDefaults-B7fGShzo.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";const T=/^\s*"([\S\s]*)"\s*$/,S=/""/g,O=` +`,se=[","," ",";","|"," "];function*$(r,t,e){let i=0;for(;i<=r.length;){const n=r.indexOf(t,i),o=r.substring(i,n>-1?n:void 0);i+=o.length+t.length,e&&!o.trim()||(yield o)}}function q(r){const t=r.includes(`\r +`)?`\r +`:O;return $(r,t,!0)}function C(r,t){return $(r,t,!1)}function ae(r,t,e){r=r.trim(),t=t==null?void 0:t.trim();const i=[],n=Array.from(new Set([e==null?void 0:e.delimiter,...se])).filter(s=>s!=null);for(const s of n){const a=N(r,s).length,u=N(t,s).length??a;a>1&&i.push({weight:Math.min(a,u),delimiter:s})}const o=i.sort(({weight:s},{weight:a})=>a-s).map(({delimiter:s})=>s);for(const s of o){const a=le(k(r,s).names,e==null?void 0:e.longitudeField,e==null?void 0:e.latitudeField);if(a.longitudeFieldName&&a.latitudeFieldName)return{delimiter:s,locationInfo:a}}return{delimiter:o[0],locationInfo:null}}function*v(r,t,e,i=()=>Object.create(null)){const n=q(r);n.next();let o="",s="",a=0,u=i(),d=0;e:for(const h of n){const m=C(h,e);for(const y of m)if(o+=s+y,s="",a+=D(y),a%2==0){if(a>0){const g=T.exec(o);if(!g){u=i(),d=0,o="",a=0;continue e}u[t[d]]=g[1].replaceAll(S,'"'),d++}else u[t[d]]=o,d++;o="",a=0}else s=e;a===0?(yield u,u=i(),d=0):s=O}}function k(r,t){const e=N(r,t).filter(n=>n!=null),i=e.map(n=>_(n));for(let n=i.length-1;n>=0;n--)i[n]||(i.splice(n,1),e.splice(n,1));return{names:i,aliases:e}}function N(r,t){if(!(r!=null&&r.length))return[];const e=[];let i="",n="",o=0;const s=C(r,t);for(const a of s)if(i+=n+a,n="",o+=D(a),o%2==0){if(o>0){const u=T.exec(i);u&&e.push(u[1].replaceAll(S,'"'))}else e.push(i);i="",o=0}else n=t;return e}function D(r){let t=0,e=0;for(e=r.indexOf('"',e);e>=0;)t++,e=r.indexOf('"',e+1);return t}function le(r,t,e){var s,a;t=(s=_(t))==null?void 0:s.toLowerCase(),e=(a=_(e))==null?void 0:a.toLowerCase();const i=r.map(u=>u.toLowerCase()),n=t?r[i.indexOf(t)]:null,o=e?r[i.indexOf(e)]:null;return{longitudeFieldName:n||r[i.indexOf(fe.find(u=>i.includes(u)))],latitudeFieldName:o||r[i.indexOf(de.find(u=>i.includes(u)))]}}function ce(r,t,e,i,n){const o=[],s=v(r,e,t),a=[];for(const u of s){if(a.length===10)break;a.push(u)}for(let u=0;uy[d]))){case"integer":m="esriFieldTypeInteger";break;case"double":m="esriFieldTypeDouble";break;case"date":m="esriFieldTypeDate";break;default:m="esriFieldTypeString"}o.push({name:d,type:m,alias:h,length:j(m)})}}return o}function ue(r){if(!r.length)return"string";const t=/[^+\-.,0-9]/;return r.map(e=>{if(e!==""){if(!t.test(e)){let i=x(e);if(!isNaN(i))return/[.,]/.test(e)||!Number.isInteger(i)||i>214783647||i<-214783648?"double":"integer";if(e.includes("E")&&(i=Number(e),!Number.isNaN(i)||e.includes(",")&&(e=e.replace(",","."),i=Number(e),!Number.isNaN(i))))return"double"}return H(e)?"date":"string"}}).reduce((e,i)=>e===void 0?i:i===void 0?e:e===i?i:e==="string"||i==="string"?"string":e==="double"||i==="double"?"double":void 0)}const x=function(){const r=ne(),t=new RegExp("^"+r.regexp+"$"),e=new RegExp("["+r.group+"\\s\\xa0]","g"),i=r.factor;return n=>{const o=t.exec(n);if(r.factor=i,!o)return NaN;let s=o[1];if(!o[1]){if(!o[2])return NaN;s=o[2],r.factor*=-1}return s=s.replace(e,"").replace(r.decimal,"."),+s*r.factor}}(),de=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],fe=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],me=oe("esriGeometryPoint"),pe=["csv"],he=[0,0];class ye{constructor(t,e){this.x=t,this.y=e}}class Ue{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){var t;(t=this._queryEngine)==null||t.destroy(),this._queryEngine=null}async load(t,e={}){var u;this._loadOptions=t;const[i]=await Promise.all([this._fetch(e.signal),this._checkProjection((u=t==null?void 0:t.parsingOptions)==null?void 0:u.spatialReference)]),n=ge(i,t);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const o=await this._createFeatures(i);this._queryEngine.featureStore.addMany(o);const{fullExtent:s,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=s,a){const{start:d,end:h}=a;n.layerDefinition.timeInfo.timeExtent=[d,h]}return n}async applyEdits(){throw new I("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){var n;this._loadOptions.customParameters=t,(n=this._snapshotTask)==null||n.abort(),this._snapshotTask=P(this._snapshotFeatures),this._snapshotTask.promise.then(o=>{this._queryEngine.featureStore.clear(),o&&this._queryEngine.featureStore.addMany(o)},o=>{this._queryEngine.featureStore.clear(),R(o)||V.getLogger("esri.layers.CSVLayer").error(new I("csv-layer:refresh","An error occurred during refresh",{error:o}))}),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:i}=this._loadOptions;if(!e)throw new I("csv-layer:invalid-source","url not defined");const n=L(e);return(await A(n.path,{query:{...n.query,...i},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:i,extent:n,timeInfo:o}=t.layerDefinition,s=new ee({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new te({fieldsIndex:w.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:E}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:o,objectIdField:e,spatialReference:n.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:s})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:i}=this._locationInfo,{objectIdField:n,fieldsIndex:o,spatialReference:s}=this._queryEngine;let a=[];const u=[],d=o.fields.filter(l=>l.name!==n).map(l=>l.name);let h=0;const m={};for(const l of o.fields)if(l.type!=="esriFieldTypeOID"&&l.type!=="esriFieldTypeGlobalID"){const p=G(l);p!==void 0&&(m[l.name]=p)}const y=v(t,d,this._delimiter,re(m,n));for(const l of y){const p=this._parseCoordinateValue(l[e]),F=this._parseCoordinateValue(l[i]);if(F!=null&&p!=null&&!isNaN(p)&&!isNaN(F)){l[e]=p,l[i]=F;for(const c in l)if(c!==e&&c!==i){if(o.isDateField(c))l[c]=K(l[c]);else if(o.isNumericField(c)){const f=x(l[c]);isNaN(f)?l[c]=null:l[c]=f}}l[n]=h,h++,a.push(new ye(F,p)),u.push(l)}}if(!Q({wkid:4326},s))if(M(s))for(const l of a)[l.x,l.y]=Z(l.x,l.y,he);else a=J(W,a,U.WGS84,s,null,null);const g=[];for(let l=0;l181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await ie(Y,t)}catch{throw new I("csv-layer:projection-not-supported","Projection not supported")}}}function ge(r,t){var l,p,F;const e=t.parsingOptions||{},i={delimiter:e.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:e.latitudeField,longitudeFieldName:e.longitudeField}},n=i.layerDefinition={name:B(t.url,pe)||"csv",dateFieldsTimeReference:{timeZoneIANA:E},drawingInfo:me,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:e.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:e.spatialReference||{wkid:4326}}},o=q(r),s=(l=o.next().value)==null?void 0:l.trim(),a=(p=o.next().value)==null?void 0:p.trim();if(!s)throw new I("csv-layer:empty-csv","CSV is empty",{csv:r});const{delimiter:u,locationInfo:d}=ae(s,a,e);if(!u)throw new I("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:s,secondLine:a,parsingOptions:e});if(!d)throw new I("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:s,secondLine:a,parsingOptions:e});i.locationInfo=d,i.delimiter=u;const{names:h,aliases:m}=k(s,u),y=ce(r,i.delimiter,h,m,i.locationInfo);if((F=e.fields)!=null&&F.length){const c=new w(e.fields);for(const f of y){const b=c.get(f.name);b&&Object.assign(f,b)}}if(!y.some(c=>c.type==="esriFieldTypeOID"&&(n.objectIdField=c.name,!0))){const c={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=c.name,y.unshift(c)}n.fields=y;const g=new w(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=g.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=g.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const c=n.timeInfo;if(c.startTimeField){const f=g.get(c.startTimeField);f?(c.startTimeField=f.name,f.type="esriFieldTypeDate"):c.startTimeField=null}if(c.endTimeField){const f=g.get(c.endTimeField);f?(c.endTimeField=f.name,f.type="esriFieldTypeDate"):c.endTimeField=null}if(c.trackIdField){const f=g.get(c.trackIdField);c.trackIdField=f?f.name:null}c.startTimeField||c.endTimeField||(n.timeInfo=null)}return i}export{Ue as default}; diff --git a/build/assets/CatalogLayer-DXuB0ilj.js b/build/assets/CatalogLayer-DXuB0ilj.js new file mode 100644 index 0000000..7ec00b6 --- /dev/null +++ b/build/assets/CatalogLayer-DXuB0ilj.js @@ -0,0 +1 @@ +import{cu as b,cq as F,cv as I,dk as N,a7 as V,bx as A,fL as D,fM as M,bB as L,d1 as R,B as r,D as i,ey as U,eq as P,E as O,cE as c,eh as Q,ej as j,el as Z,$ as g,cN as G,eR as k,eo as K,ep as z,en as H,cx as J,eL as W,eM as Y,er as X,es as ee,et as te,eu as re,c$ as ie,cD as oe,eO as ne,eY as ae,eZ as se,ef as le,ei as pe,cr as de,cF as ye,cs as ue,ct as he,cG as ce,cH as me,aK as fe,s as f,dA as ge,I as ve,aV as we,f2 as be,dK as h,fN as Fe,fc as Ie,fb as Oe,U as _e,fO as Te,C as x,fP as E,S as Se,cw as Le,eA as je,ex as xe}from"./index-DKOmzAMm.js";import{s as Ee}from"./ReactiveMap-C7QHrros.js";import{r as $e}from"./signal-swyOrDkM.js";import{T as $}from"./utils-C0Bk6fkM.js";import Ce from"./FeatureLayerSource-DHybgE9g.js";import{a as Ve}from"./lazyLayerLoader-BkbwrjyD.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./MeshTransform-CnKLNqg-.js";import"./infoFor3D-DsOdlPuA.js";import"./mat4f64-CSKppSlJ.js";import"./quat-BYKy26Om.js";import"./mat3f64-q3fE-ZOt.js";import"./quatf64-Bdb9ZJJK.js";import"./editingSupport-BRaaDEoU.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./clientSideDefaults-B7fGShzo.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./QueryTask-CH4nGmOK.js";import"./executeQueryJSON-CCbDrFwh.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./executeQueryPBF-B-eLVWOv.js";import"./featureConversionUtils-CCATessr.js";let d=class extends b(F(I(c))){constructor(e){super(e),this._layerCache=new N(20,t=>t.destroy()),this._oidToReference=new Ee,this._layerToReference=new Map,this.layers=new V,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",({item:e})=>{e.parent=this}),this.layers.on("after-remove",({item:e})=>{e.parent=null}),A(()=>this._orderBy,()=>{this._updateLayerSortValues(),this._sortAllLayers()})])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){var e;return this.parent?((e=this.parent.orderBy)==null?void 0:e.find(t=>!t.valueExpression&&t.field))??new D({field:this.parent.objectIdField}):null}get _referenceComparator(){const e=this._orderBy;if(!this.parent||!e)return()=>0;const t=this.parent.fieldsIndex.get(e.field),a=$(t==null?void 0:t.toJSON().type,e.order==="descending"),n=$("esriFieldTypeOID",e.order==="descending");return(l,p)=>a(p.sortValue,l.sortValue)||n(p.objectId,l.objectId)}get fullExtent(){var e;return((e=this.parent)==null?void 0:e.fullExtent)??null}get updating(){return M(this._oidToReference,e=>e.pending!=null)}acquireLayer(e){if(this.destroyed)return L();const t=this._getLayerReference(e);return t.count++,L(()=>{t.count--,t.count||this._destroyLayerReference(t)})}_getLayerReference(e){const t=e.getObjectId();return R(this._oidToReference,t,()=>{const a=e.getObjectId(),n=`${a}`,l=e.getAttribute(this.parent.itemSourceField),p=new Re(e,a,l),y=this._layerCache.pop(n);return y?(this._addLayer(p,y),p):(p.pending=this.parent.createLayerFromFootprint(e).then(u=>{p.count?this._addLayer(p,u):(this.destroyed||this._layerCache.get(n)||this._layerCache.put(n,u),p.layer=null)}).catch(()=>{}).finally(()=>{p.pending=null}),p)})}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t)))}};r([i()],d.prototype,"_orderBy",null),r([i({readOnly:!0})],d.prototype,"_referenceComparator",null),r([i({type:["show","hide","hide-children"],json:{write:!0}})],d.prototype,"listMode",void 0),r([i({readOnly:!0})],d.prototype,"fullExtent",null),r([i({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],d.prototype,"id",void 0),r([i({readOnly:!0})],d.prototype,"layers",void 0),r([i({type:U,range:{min:0,max:50},json:{write:!0,default:10}})],d.prototype,"maximumVisibleSublayers",void 0),r([i(P)],d.prototype,"opacity",void 0),r([i({clonable:!1})],d.prototype,"parent",void 0),r([i({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],d.prototype,"title",void 0),r([i({json:{read:!1}})],d.prototype,"type",void 0),r([i({readOnly:!0})],d.prototype,"updating",null),r([i({type:Boolean,json:{name:"visibility",write:!0}})],d.prototype,"visible",void 0),d=r([O("esri.layers.catalog.CatalogDynamicGroupLayer")],d);const q=d;class Re{constructor(t,a,n){this.footprint=t,this.objectId=a,this.itemSource=n,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=$e(null)}get pending(){return this._pending.value}set pending(t){this._pending.value=t}}function Pe(){const e=new oe({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new ne({symbol:e})}let o=class extends b(Q(F(I(c)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),j(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",t=>this.emit("apply-edits",t)),this.parent.on("edits",t=>this.emit("edits",t)),this.parent.on("refresh",t=>this.emit("refresh",t))])}get apiKey(){var e;return(e=this.parent)==null?void 0:e.apiKey}get capabilities(){var e;return(e=this.parent)==null?void 0:e.capabilities}get customParameters(){var e;return(e=this.parent)==null?void 0:e.customParameters}get dateFieldsTimeZone(){var e;return((e=this.parent)==null?void 0:e.dateFieldsTimeZone)??null}get datesInUnknownTimezone(){var e;return((e=this.parent)==null?void 0:e.datesInUnknownTimezone)??!1}get definitionExpression(){var e;return(e=this.parent)==null?void 0:e.definitionExpression}get editingInfo(){var e;return(e=this.parent)==null?void 0:e.editingInfo}get effectiveCapabilities(){var e;return(e=this.parent)==null?void 0:e.effectiveCapabilities}get createQueryVersion(){var e;return(e=this.parent)==null?void 0:e.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){var e;return(e=this.parent)==null?void 0:e.displayField}get effectiveEditingEnabled(){return!1}get fields(){var e;return(e=this.parent)==null?void 0:e.fields}get fieldsIndex(){var e;return(e=this.parent)==null?void 0:e.fieldsIndex}get fullExtent(){var e;return(e=this.parent)==null?void 0:e.fullExtent}get geometryFieldsInfo(){var e;return(e=this.parent)==null?void 0:e.geometryFieldsInfo}get geometryType(){var e;return(e=this.parent)==null?void 0:e.geometryType}get globalIdField(){var e;return(e=this.parent)==null?void 0:e.globalIdField}get hasM(){var e;return((e=this.parent)==null?void 0:e.hasM)??!1}get hasZ(){var e;return((e=this.parent)==null?void 0:e.hasZ)??!1}get objectIdField(){var e;return(e=this.parent)==null?void 0:e.objectIdField}get orderBy(){var e;return((e=this.parent)==null?void 0:e.orderBy)??null}get outFields(){var e;return(e=this.parent)==null?void 0:e.outFields}get parsedUrl(){var e;return((e=this.parent)==null?void 0:e.parsedUrl)??null}get preferredTimeZone(){var e;return((e=this.parent)==null?void 0:e.preferredTimeZone)??null}set renderer(e){j(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):Pe()}get returnM(){var e;return(e=this.parent)==null?void 0:e.returnM}get returnZ(){var e;return(e=this.parent)==null?void 0:e.returnZ}get source(){var e;return(e=this.parent)==null?void 0:e.source}get timeExtent(){var e;return(e=this.parent)==null?void 0:e.timeExtent}get timeInfo(){var e;return(e=this.parent)==null?void 0:e.timeInfo}get timeOffset(){var e;return(e=this.parent)==null?void 0:e.timeOffset}get typeIdField(){var e;return(e=this.parent)==null?void 0:e.typeIdField}get types(){var e;return(e=this.parent)==null?void 0:e.types}get useViewTime(){var e;return((e=this.parent)==null?void 0:e.useViewTime)??!0}get version(){var e;return(e=this.parent)==null?void 0:e.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return Z(t,e)}createQuery(){var e;return(e=this.parent)==null?void 0:e.createQuery()}getField(e){var t;return(t=this.parent)==null?void 0:t.getField(e)}getFieldDomain(e,t){var a;return(a=this.parent)==null?void 0:a.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}};r([i({readOnly:!0})],o.prototype,"apiKey",null),r([i({readOnly:!0})],o.prototype,"capabilities",null),r([i({readOnly:!0})],o.prototype,"customParameters",null),r([i()],o.prototype,"dateFieldsTimeZone",null),r([i({readOnly:!0})],o.prototype,"datesInUnknownTimezone",null),r([i({readOnly:!0})],o.prototype,"definitionExpression",null),r([i({readOnly:!0})],o.prototype,"editingInfo",null),r([i({readOnly:!0})],o.prototype,"effectiveCapabilities",null),r([i({json:{origins:{"web-scene":{write:!1}},write:!0}})],o.prototype,"charts",void 0),r([i({readOnly:!0})],o.prototype,"createQueryVersion",null),r([i({readOnly:!0})],o.prototype,"defaultPopupTemplate",null),r([i()],o.prototype,"displayField",null),r([i({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],o.prototype,"editingEnabled",void 0),r([i({readOnly:!0})],o.prototype,"effectiveEditingEnabled",null),r([i((()=>{const e=g(G);return e.json.origins["web-map"]={read:!1,write:!1},e})())],o.prototype,"elevationInfo",void 0),r([i({readOnly:!0})],o.prototype,"fields",null),r([i({readOnly:!0})],o.prototype,"fieldsIndex",null),r([i({type:k,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],o.prototype,"formTemplate",void 0),r([i({readOnly:!0})],o.prototype,"fullExtent",null),r([i({readOnly:!0})],o.prototype,"geometryFieldsInfo",null),r([i({readOnly:!0})],o.prototype,"geometryType",null),r([i({readOnly:!0})],o.prototype,"globalIdField",null),r([i({readOnly:!0})],o.prototype,"hasM",null),r([i({readOnly:!0})],o.prototype,"hasZ",null),r([i({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],o.prototype,"id",void 0),r([i({type:[K],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:z,write:!0}})],o.prototype,"labelingInfo",void 0),r([i(H)],o.prototype,"labelsVisible",void 0),r([i(J)],o.prototype,"legendEnabled",void 0),r([i({type:["show","hide"],json:{write:!0}})],o.prototype,"listMode",void 0),r([i((()=>{const e=g(W);return e.json.origins.service.read=!1,e})())],o.prototype,"maxScale",void 0),r([i((()=>{const e=g(Y);return e.json.origins.service.read=!1,e})())],o.prototype,"minScale",void 0),r([i({readOnly:!0})],o.prototype,"objectIdField",null),r([i(P)],o.prototype,"opacity",void 0),r([i({readOnly:!0})],o.prototype,"orderBy",null),r([i({readOnly:!0})],o.prototype,"outFields",null),r([i({clonable:!1})],o.prototype,"parent",void 0),r([i({readOnly:!0})],o.prototype,"parsedUrl",null),r([i(X)],o.prototype,"popupEnabled",void 0),r([i({type:ee,json:{name:"popupInfo",write:!0}})],o.prototype,"popupTemplate",void 0),r([i({readOnly:!0})],o.prototype,"preferredTimeZone",null),r([i({types:te,json:{origins:{"web-scene":{types:re}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t){const{url:n,source:l,portalItem:p}=this;if(!n)throw new f("catalog-layer:missing-url","Catalog layer must be created with a url");if(this.layerId==null){const u=await this._fetchFirstValidLayerId(t);if(u==null)throw new f("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:n});this.layerId=u}await l.load({signal:t});const{sourceJSON:y}=l;y&&(this.sourceJSON=y,this.read(y,{origin:"service",portalItem:p,portal:p==null?void 0:p.portal,url:this.parsedUrl}))}).then(()=>{const n=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],l=n.filter(p=>!this.fieldsIndex.has(p));if(l.length)throw new f("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:n,missingFields:l})}).then(()=>ge(this,"load",e));return this.addResolvingPromise(a),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=ve(this.url);return e!=null&&this.layerId!=null&&(e.path=we(e.path,this.layerId.toString())),e}async applyEdits(e,t){return be(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){var t;return(t=this._layerToFootprint.get(e))==null?void 0:t.clone()}createQuery(){var l;const e=new h,t=(l=this.capabilities)==null?void 0:l.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:a,timeExtent:n}=this;return e.timeExtent=a!=null&&n!=null?n.offset(-a.value,a.unit):n||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return Fe(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){var l;const a=t==null?void 0:t.feature,n=this.getFeatureType(a);if(n){const p=n.domains&&n.domains[e];if(p&&p.type!=="inherited")return p}return(l=this.getField(e))==null?void 0:l.domain}async hasDataChanged(){return Ie(this)}async queryFeatures(e,t){const a=await this.load(),n=await a.source.queryFeatures(h.from(e)??a.createQuery(),t);if(n!=null&&n.features)for(const l of n.features)l.layer=l.sourceLayer=a.footprintLayer;return n}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(h.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(h.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(h.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&Oe(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:a,dynamicGroupLayer:n}=e;a&&this.footprintLayer.read(a,t),n&&this.dynamicGroupLayer.read(n,t)}}async _fetchFirstValidLayerId(e){var a;const{data:t}=await _e(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(t==null?void 0:t.layers))return(a=t.layers.find(({type:n})=>this.supportedSourceTypes.has(n)))==null?void 0:a.id}async _createLayer(e){var n;const t=e.getAttribute(this.itemSourceField);if(!t)throw new f("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const a=JSON.parse(t);if(qe(a)){const{itemId:l,portalUrl:p}=a,y=Te(p),u=(n=this.portalItem)==null?void 0:n.portal,_=x.getDefault();let m,T=!0;u&&E(p,u.url)?m=u:E(p,_.url)?m=_:(m=R(this._portals,y,()=>new x({url:y})),T=!1);const S=await c.fromPortalItem(new Se({id:l,portal:m}));return T||await w(S),S}return Be(a)?c.fromArcGISServerUrl({url:a.url}):new(await Ve.UnsupportedLayer())}_configureLayer(e,t){const a=t.getAttribute(this.itemNameField);a&&(e.title=a);const n=t.getAttribute(this.maxScaleField);n!=null&&"maxScale"in e&&(e.maxScale=n);const l=t.getAttribute(this.minScaleField);l!=null&&"minScale"in e&&(e.minScale=l)}};async function w(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,e.type==="group"&&await Promise.allSettled([...e.layers.map(t=>w(t)),...e.tables.map(t=>w(t))])}}r([i({readOnly:!0})],s.prototype,"createQueryVersion",null),r([i({readOnly:!0})],s.prototype,"drawOrderField",void 0),r([i({type:q,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:C}}})],s.prototype,"dynamicGroupLayer",void 0),r([i({readOnly:!0})],s.prototype,"editingEnabled",null),r([i({readOnly:!0})],s.prototype,"effectiveEditingEnabled",null),r([i({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],s.prototype,"elevationInfo",void 0),r([i({...v.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],s.prototype,"fields",void 0),r([i(v.fieldsIndex)],s.prototype,"fieldsIndex",void 0),r([i({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],s.prototype,"floorInfo",void 0),r([i({type:B,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:C}}})],s.prototype,"footprintLayer",void 0),r([i(Le)],s.prototype,"id",void 0),r([i({readOnly:!0})],s.prototype,"itemNameField",void 0),r([i({readOnly:!0})],s.prototype,"itemSourceField",void 0),r([i({readOnly:!0})],s.prototype,"itemTypeField",void 0),r([i({readOnly:!0})],s.prototype,"layers",void 0),r([i({type:["show","hide","hide-children"]})],s.prototype,"listMode",void 0),r([i({readOnly:!0})],s.prototype,"maxScaleField",void 0),r([i({readOnly:!0})],s.prototype,"minScaleField",void 0),r([i({value:"CatalogLayer",type:["CatalogLayer"]})],s.prototype,"operationalLayerType",void 0),r([i({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],s.prototype,"orderBy",void 0),r([i(v.outFields)],s.prototype,"outFields",void 0),r([i({readOnly:!0})],s.prototype,"parsedUrl",null),r([i({readOnly:!0})],s.prototype,"source",void 0),r([i({json:{read:!1}})],s.prototype,"type",void 0),r([i({type:String})],s.prototype,"typeIdField",void 0),r([i({type:[je]})],s.prototype,"types",void 0),s=r([O("esri.layers.CatalogLayer")],s);const ft=s;export{ft as default}; diff --git a/build/assets/ClassBreaksDefinition-yZL3mlhg.js b/build/assets/ClassBreaksDefinition-yZL3mlhg.js new file mode 100644 index 0000000..47a8502 --- /dev/null +++ b/build/assets/ClassBreaksDefinition-yZL3mlhg.js @@ -0,0 +1 @@ +import{a_ as r,B as i,a$ as o,D as t,E as l,F as d}from"./index-DKOmzAMm.js";const s=new r({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),n=new r({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let e=class extends d{constructor(a){super(a),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(a){this.classificationMethod==="standard-deviation"&&this._set("standardDeviationInterval",a)}set definedInterval(a){this.classificationMethod==="defined-interval"&&this._set("definedInterval",a)}};i([o({classBreaksDef:"class-breaks-definition"})],e.prototype,"type",void 0),i([t({json:{write:!0}})],e.prototype,"breakCount",void 0),i([t({json:{write:!0}})],e.prototype,"classificationField",void 0),i([t({type:String,json:{read:s.read,write:s.write}})],e.prototype,"classificationMethod",void 0),i([t({json:{write:!0}})],e.prototype,"normalizationField",void 0),i([t({json:{read:n.read,write:n.write}})],e.prototype,"normalizationType",void 0),i([t({value:null,json:{write:!0}})],e.prototype,"standardDeviationInterval",null),i([t({value:null,json:{write:!0}})],e.prototype,"definedInterval",null),e=i([l("esri.rest.support.ClassBreaksDefinition")],e);const p=e;export{p as d}; diff --git a/build/assets/CollectionFlattener-BmCRFqHz.js b/build/assets/CollectionFlattener-BmCRFqHz.js new file mode 100644 index 0000000..6261dc7 --- /dev/null +++ b/build/assets/CollectionFlattener-BmCRFqHz.js @@ -0,0 +1 @@ +import{B as l,D as r,E as a,a7 as c,cj as u}from"./index-DKOmzAMm.js";let s=class extends c{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles(u(()=>this._refresh()))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections!=null?this.getCollections():null;if(e==null)return void this.removeAll();let o=0;for(const n of e)n!=null&&(o=this._processCollection(o,n));this.splice(o,this.length)}_createNewInstance(e){return new c(e)}_processCollection(e,o){if(!o)return e;const n=this.itemFilterFunction??(t=>!!t);for(const t of o)if(t){if(n(t)){const i=this.indexOf(t,e);i>=0?i!==e&&this.reorder(t,e):this.add(t,e),++e}if(this.getChildrenFunction){const i=this.getChildrenFunction(t);if(Array.isArray(i))for(const h of i)e=this._processCollection(e,h);else e=this._processCollection(e,i)}}return e}};l([r()],s.prototype,"getCollections",void 0),l([r()],s.prototype,"getChildrenFunction",void 0),l([r()],s.prototype,"itemFilterFunction",void 0),s=l([a("esri.core.CollectionFlattener")],s);const f=s;export{f as l}; diff --git a/build/assets/Cyclical-CyXrdUt3.js b/build/assets/Cyclical-CyXrdUt3.js new file mode 100644 index 0000000..ba92ecc --- /dev/null +++ b/build/assets/Cyclical-CyXrdUt3.js @@ -0,0 +1 @@ +import{c5 as m}from"./index-DKOmzAMm.js";class h{constructor(n,i){this.min=n,this.max=i,this.range=i-n}normalize(n,i=0,o=!1){return a(this.range,this.min,this.max,n,i,o)}clamp(n,i=0){return m(n-i,this.min,this.max)+i}monotonic(n,i,o){return nn&&oi&&(o-=r(t,o-i)),e&&o===i&&(o=n),o+s}function r(t,n,i=0){return Math.ceil((n-i)/t)*t+i}const u=new h(0,360);export{u as a}; diff --git a/build/assets/DefaultMaterial_COLOR_GAMMA-C6si8ymn.js b/build/assets/DefaultMaterial_COLOR_GAMMA-C6si8ymn.js new file mode 100644 index 0000000..db84e76 --- /dev/null +++ b/build/assets/DefaultMaterial_COLOR_GAMMA-C6si8ymn.js @@ -0,0 +1 @@ +import{bc as se,i4 as ae,i5 as ie,i6 as ue,hQ as J,c7 as le,i7 as Y,U as fe,aO as ce,aK as de,s as l,i8 as pe,a5 as me,d1 as he,bq as Te,i9 as ye,ia as we,e1 as ge,bZ as be,gr as X,ib as V,V as I,ic as xe}from"./index-DKOmzAMm.js";import{e as Q,r as U}from"./mat4f64-CSKppSlJ.js";import{D as M,L,C as f,E as g}from"./enums-CxXC-vJk.js";import{v as _e}from"./quat-BYKy26Om.js";import{e as Se}from"./quatf64-Bdb9ZJJK.js";import{c as H,u as W,F as Ee,w as Oe,q as Re,A as Ne,V as Ae,B as ve,g as Ce,d as Ie,i as $,x as Me,L as Le,O as Fe,E as Be}from"./BufferView-DOhKdt-N.js";import{n as $e,t as Ue,o as De,r as Pe}from"./resourceUtils-CxnhUS9W.js";import{l as Ge,i as je}from"./Indices-BhOjxL0t.js";function C(r,e){const o=r.count;e||(e=new r.TypedArrayConstructor(o));for(let t=0;t{const e={...re,...r.pbrMetallicRoughness},o=Ze({...We,...r.extras});return{...Qe,...r,pbrMetallicRoughness:e,extras:o}};function Ze(r){switch(r.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:r.ESRI_externalColorMixMode="tint"}return r}const et={magFilter:L.LINEAR,minFilter:L.LINEAR_MIPMAP_LINEAR,wrapS:M.REPEAT,wrapT:M.REPEAT},tt=r=>({...et,...r});function rt(r){let e,o;return r.replace(/^(.*\/)?([^/]*)$/,(t,n,s)=>(e=n||"",o=s||"","")),{dirPart:e,filePart:o}}const A={MAGIC:1179937895,CHUNK_TYPE_JSON:1313821514,CHUNK_TYPE_BIN:5130562,MIN_HEADER_LENGTH:20};class w{constructor(e,o,t,n){if(this._context=e,this.uri=o,this.json=t,this._glbBuffer=n,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=rt(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.scenes==null)throw new l("gltf-loader-unsupported-feature","Scenes must be defined.");if(t.meshes==null)throw new l("gltf-loader-unsupported-feature","Meshes must be defined");if(t.nodes==null)throw new l("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,o,t){if(J(o)){const a=me(o);if(a&&a.mediaType!=="model/gltf-binary")try{const u=JSON.parse(a.isBase64?atob(a.data):a.data);return new w(e,o,u)}catch{}const i=Y(o);if(w._isGLBData(i))return this._fromGLBData(e,o,i)}if(ut.test(o)||(t==null?void 0:t.expectedType)==="gltf"){const a=await e.loadJSON(o,t);return new w(e,o,a)}const n=await e.loadBinary(o,t);if(w._isGLBData(n))return this._fromGLBData(e,o,n);if(lt.test(o)||(t==null?void 0:t.expectedType)==="glb")throw new l("gltf-loader-invalid-glb","This is not a valid glb file.");const s=await e.loadJSON(o,t);return new w(e,o,s)}static _isGLBData(e){if(e==null)return!1;const o=new k(e);return o.remainingBytes()>=4&&o.readUint32()===A.MAGIC}static async _fromGLBData(e,o,t){const n=await w._parseGLBData(t);return new w(e,o,n.json,n.binaryData)}static async _parseGLBData(e){const o=new k(e);if(o.remainingBytes()<12)throw new l("gltf-loader-error","glb binary data is insufficiently large.");const t=o.readUint32(),n=o.readUint32(),s=o.readUint32();if(t!==A.MAGIC)throw new l("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength=8;){const c=o.readUint32(),m=o.readUint32();if(u===0){if(m!==A.CHUNK_TYPE_JSON)throw new l("gltf-loader-error","First glb chunk must be JSON.");if(c<0)throw new l("gltf-loader-error","No JSON data found.");a=await $e(o.readUint8Array(c))}else if(u===1){if(m!==A.CHUNK_TYPE_BIN)throw new l("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");i=o.readUint8Array(c)}else I.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");u+=1}if(!a)throw new l("gltf-loader-error","No glb JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,o){const t=this.json.buffers[e];if(t.uri==null){if(this._glbBuffer==null)throw new l("gltf-loader-error","glb buffer not present");return this._glbBuffer}const n=await this._getBufferLoader(e,o);if(n.byteLength!==t.byteLength)throw new l("gltf-loader-error","Buffer byte lengths should match.");return n}async _getBufferLoader(e,o){const t=this._bufferLoaders.get(e);if(t)return t;const n=this.json.buffers[e].uri,s=this._context.loadBinary(this._resolveUri(n),o).then(a=>new Uint8Array(a));return this._bufferLoaders.set(e,s),s}async getAccessor(e,o){if(!this.json.accessors)throw new l("gltf-loader-unsupported-feature","Accessors missing.");const t=this.json.accessors[e];if((t==null?void 0:t.bufferView)==null)throw new l("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(t.type in[S.MAT2,S.MAT3,S.MAT4])throw new l("gltf-loader-unsupported-feature",`AttributeType ${t.type} is not supported`);const n=this.json.bufferViews[t.bufferView],s=await this.getBuffer(n.buffer,o),a=st[t.type],i=at[t.componentType],u=a*i,c=n.byteStride||u;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(n.byteOffset||0)+(t.byteOffset||0),entryCount:t.count,isDenselyPacked:c===u,componentCount:a,componentByteSize:i,componentType:t.componentType,min:t.min,max:t.max,normalized:!!t.normalized}}async getIndexData(e,o){if(e.indices==null)return;const t=await this.getAccessor(e.indices,o);if(t.isDenselyPacked)switch(t.componentType){case f.UNSIGNED_BYTE:return new Uint8Array(t.raw,t.byteOffset,t.entryCount);case f.UNSIGNED_SHORT:return new Uint16Array(t.raw,t.byteOffset,t.entryCount);case f.UNSIGNED_INT:return new Uint32Array(t.raw,t.byteOffset,t.entryCount)}else switch(t.componentType){case f.UNSIGNED_BYTE:return C(y(Ie,t));case f.UNSIGNED_SHORT:return C(y(Ce,t));case f.UNSIGNED_INT:return C(y(ve,t))}}async getPositionData(e,o){if(e.attributes.POSITION==null)throw new l("gltf-loader-unsupported-feature","No POSITION vertex data found.");const t=await this.getAccessor(e.attributes.POSITION,o);if(t.componentType!==f.FLOAT)throw new l("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+f[t.componentType]);if(t.componentCount!==3)throw new l("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+t.componentCount.toFixed());return y($,t)}async getNormalData(e,o){if(e.attributes.NORMAL==null)throw new l("gltf-loader-error","No NORMAL vertex data found.");const t=await this.getAccessor(e.attributes.NORMAL,o);if(t.componentType!==f.FLOAT)throw new l("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+f[t.componentType]);if(t.componentCount!==3)throw new l("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+t.componentCount.toFixed());return y($,t)}async getTangentData(e,o){if(e.attributes.TANGENT==null)throw new l("gltf-loader-error","No TANGENT vertex data found.");const t=await this.getAccessor(e.attributes.TANGENT,o);if(t.componentType!==f.FLOAT)throw new l("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+f[t.componentType]);if(t.componentCount!==4)throw new l("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+t.componentCount.toFixed());return new H(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*t.entryCount)}async getTextureCoordinates(e,o){if(e.attributes.TEXCOORD_0==null)throw new l("gltf-loader-error","No TEXCOORD_0 vertex data found.");const t=await this.getAccessor(e.attributes.TEXCOORD_0,o);if(t.componentCount!==2)throw new l("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+t.componentCount.toFixed());if(t.componentType===f.FLOAT)return y(W,t);if(!t.normalized)throw new l("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return it(t)}async getVertexColors(e,o){if(e.attributes.COLOR_0==null)throw new l("gltf-loader-error","No COLOR_0 vertex data found.");const t=await this.getAccessor(e.attributes.COLOR_0,o);if(t.componentCount!==4&&t.componentCount!==3)throw new l("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+t.componentCount.toFixed());if(t.componentCount===4){if(t.componentType===f.FLOAT)return y(H,t);if(t.componentType===f.UNSIGNED_BYTE)return y(Me,t);if(t.componentType===f.UNSIGNED_SHORT)return y(Le,t)}else if(t.componentCount===3){if(t.componentType===f.FLOAT)return y($,t);if(t.componentType===f.UNSIGNED_BYTE)return y(Fe,t);if(t.componentType===f.UNSIGNED_SHORT)return y(Be,t)}throw new l("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+f[t.componentType])}hasPositions(e){return e.attributes.POSITION!==void 0}hasNormals(e){return e.attributes.NORMAL!==void 0}hasVertexColors(e){return e.attributes.COLOR_0!==void 0}hasTextureCoordinates(e){return e.attributes.TEXCOORD_0!==void 0}hasTangents(e){return e.attributes.TANGENT!==void 0}async getMaterial(e,o,t){var s,a,i,u,c,m,h,b,p,_;let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const d=e.material!=null?q(this.json.materials[e.material]):q(),T=d.pbrMetallicRoughness,E=this.hasVertexColors(e),x=this.getTexture(T.baseColorTexture,o),O=this.getTexture(d.normalTexture,o),F=t?this.getTexture(d.occlusionTexture,o):void 0,B=t?this.getTexture(d.emissiveTexture,o):void 0,R=t?this.getTexture(T.metallicRoughnessTexture,o):void 0,N=e.material!=null?e.material:-1;n={alphaMode:d.alphaMode,alphaCutoff:d.alphaCutoff,color:T.baseColorFactor,doubleSided:!!d.doubleSided,colorTexture:await x,normalTexture:await O,name:d.name,id:N,occlusionTexture:await F,emissiveTexture:await B,emissiveFactor:d.emissiveFactor,metallicFactor:T.metallicFactor,roughnessFactor:T.roughnessFactor,metallicRoughnessTexture:await R,hasVertexColors:E,ESRI_externalColorMixMode:d.extras.ESRI_externalColorMixMode,colorTextureTransform:(a=(s=T==null?void 0:T.baseColorTexture)==null?void 0:s.extensions)==null?void 0:a.KHR_texture_transform,normalTextureTransform:(u=(i=d.normalTexture)==null?void 0:i.extensions)==null?void 0:u.KHR_texture_transform,occlusionTextureTransform:(m=(c=d.occlusionTexture)==null?void 0:c.extensions)==null?void 0:m.KHR_texture_transform,emissiveTextureTransform:(b=(h=d.emissiveTexture)==null?void 0:h.extensions)==null?void 0:b.KHR_texture_transform,metallicRoughnessTextureTransform:(_=(p=T==null?void 0:T.metallicRoughnessTexture)==null?void 0:p.extensions)==null?void 0:_.KHR_texture_transform,receiveAmbientOcclusion:d.extras.ESRI_receiveAmbientOcclusion,receiveShadows:d.extras.ESRI_receiveShadows}}return n}async getTexture(e,o){if(!e)return;if((e.texCoord||0)!==0)throw new l("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const t=e.index,n=this.json.textures[t],s=tt(n.sampler!=null?this.json.samplers[n.sampler]:{}),a=K(n),i=this.json.images[a],u=await this._loadTextureImageData(t,n,o);return he(this._textureCache,t,()=>{const c=h=>h===33071||h===33648||h===10497,m=h=>{throw new l("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${h}`)};return{data:u,wrapS:c(s.wrapS)?s.wrapS:m(s.wrapS),wrapT:c(s.wrapT)?s.wrapT:m(s.wrapT),minFilter:s.minFilter,name:i.name,id:t}})}getNodeTransform(e){if(e===void 0)return ot;let o=this._nodeTransformCache.get(e);if(!o){const t=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?o=Te(Q(),t,n.matrix):n.translation||n.rotation||n.scale?(o=U(t),n.translation&&ye(o,o,n.translation),n.rotation&&(v[3]=_e(v,n.rotation),we(o,o,v[3],v)),n.scale&&ge(o,o,n.scale)):o=U(t),this._nodeTransformCache.set(e,o)}return o}_resolveUri(e){return be(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=X.parse(this.json.asset.version,"glTF");nt.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every(o=>this._supportedExtensions.includes(o)))throw new l("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,o)=>{e.children&&e.children.forEach(t=>{this._nodeParentMap.set(t,o)})})}async _loadTextureImageData(e,o,t){const n=this._textureLoaders.get(e);if(n)return n;const s=this._createTextureLoader(o,t);return this._textureLoaders.set(e,s),s}async _createTextureLoader(e,o){const t=K(e),n=this.json.images[t];if(n.uri){if(n.uri.endsWith(".ktx2")){const u=await this._context.loadBinary(this._resolveUri(n.uri),o);return new Ue(new Uint8Array(u))}return this._context.loadImage(this._resolveUri(n.uri),o)}if(n.bufferView==null)throw new l("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(n.mimeType==null)throw new l("gltf-loader-unsupported-feature","Image mimeType must be defined.");const s=this.json.bufferViews[n.bufferView],a=await this.getBuffer(s.buffer,o);if(s.byteStride!=null)throw new l("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const i=a.byteOffset+(s.byteOffset||0);return De(new Uint8Array(a.buffer,i,s.byteLength),n.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await V(Array.from(this._bufferLoaders.values())),o=await V(Array.from(this._textureLoaders.values()));return e.reduce((t,n)=>t+((n==null?void 0:n.byteLength)??0),0)+o.reduce((t,n)=>t+(n?Pe(n)?n.data.byteLength:n.width*n.height*4:0),0)}}const ot=pe(Q(),Math.PI/2),nt=new X(2,0,"glTF"),v=Se(),st={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},at={[f.BYTE]:1,[f.UNSIGNED_BYTE]:1,[f.SHORT]:2,[f.UNSIGNED_SHORT]:2,[f.HALF_FLOAT]:2,[f.FLOAT]:4,[f.INT]:4,[f.UNSIGNED_INT]:4};function it(r){switch(r.componentType){case f.BYTE:return new Ae(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount);case f.UNSIGNED_BYTE:return new Ne(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount);case f.SHORT:return new Re(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount);case f.UNSIGNED_SHORT:return new Oe(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount);case f.UNSIGNED_INT:return new Ee(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount);case f.FLOAT:return new W(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount)}}function y(r,e){return new r(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*(e.entryCount-1)+e.componentByteSize*e.componentCount)}function K(r){var e;if(((e=r.extensions)==null?void 0:e.KHR_texture_basisu)!=null)return r.extensions.KHR_texture_basisu.source;if(r.source!==null)return r.source;throw new l("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const ut=/\.gltf$/i,lt=/\.glb$/i;let ft=0;async function Ct(r,e,o={},t=!0){var h,b;const n=await w.load(r,e,o),s="gltf_"+ft++,a={lods:[],materials:new Map,textures:new Map,meta:ct(n)},i=!(!n.json.asset.extras||n.json.asset.extras.ESRI_type!=="symbolResource"),u=(b=(h=n.json.asset.extras)==null?void 0:h.ESRI_webstyleSymbol)==null?void 0:b.webstyle,c=new Map;await dt(n,async(p,_,d,T)=>{var j;const E=c.get(d)??0;c.set(d,E+1);const x=p.mode!==void 0?p.mode:g.TRIANGLES,O=x===g.TRIANGLES||x===g.TRIANGLE_STRIP||x===g.TRIANGLE_FAN?x:null;if(O==null)return void I.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+g[x]+"). Skipping primitive.");if(!n.hasPositions(p))return void I.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const F=n.getPositionData(p,o),B=n.getMaterial(p,o,t),R=n.hasNormals(p)?n.getNormalData(p,o):null,N=n.hasTangents(p)?n.getTangentData(p,o):null,D=n.hasTextureCoordinates(p)?n.getTextureCoordinates(p,o):null,P=n.hasVertexColors(p)?n.getVertexColors(p,o):null,oe=n.getIndexData(p,o),ne={name:T,transform:U(_),attributes:{position:await F,normal:R?await R:null,texCoord0:D?await D:null,color:P?await P:null,tangent:N?await N:null},indices:await oe,primitiveType:O,material:mt(a,await B,s)};let G=null;((j=a.meta)==null?void 0:j.ESRI_lod)!=null&&a.meta.ESRI_lod.metric==="screenSpaceRadius"&&(G=a.meta.ESRI_lod.thresholds[d]),a.lods[d]=a.lods[d]||{parts:[],name:T,lodThreshold:G},a.lods[d].parts[E]=ne});for(const p of a.lods)p.parts=p.parts.filter(_=>!!_);const m=await n.getLoadedBuffersSize();return{model:a,meta:{isEsriSymbolResource:i,uri:n.uri,ESRI_webstyle:u},customMeta:{},size:m}}function ct(r){const e=r.json;let o=null;return e.nodes.forEach(t=>{const n=t.extras;n!=null&&(n.ESRI_proxyEllipsoid||n.ESRI_lod)&&(o=n)}),o}async function dt(r,e){const o=r.json,t=o.scenes[o.scene||0].nodes,n=t.length>1,s=[];for(const i of t){const u=o.nodes[i];s.push(a(i,0)),pt(u)&&!n&&u.extensions.MSFT_lod.ids.forEach((c,m)=>a(c,m+1))}async function a(i,u){const c=o.nodes[i],m=r.getNodeTransform(i);if(c.weights!=null&&I.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),c.mesh!=null){const h=o.meshes[c.mesh];for(const b of h.primitives)s.push(e(b,m,u,h.name))}for(const h of c.children||[])s.push(a(h,u))}await Promise.all(s)}function pt(r){var e;return((e=r.extensions)==null?void 0:e.MSFT_lod)&&Array.isArray(r.extensions.MSFT_lod.ids)}function mt(r,e,o){const t=s=>{const a=`${o}_tex_${s&&s.id}${s!=null&&s.name?"_"+s.name:""}`;if(s&&!r.textures.has(a)){const i=Xe(s.data,{wrap:{s:s.wrapS,t:s.wrapT},mipmap:ht.has(s.minFilter),noUnpackFlip:!0});r.textures.set(a,i)}return a},n=`${o}_mat_${e.id}_${e.name}`;if(!r.materials.has(n)){const s=Ye({color:[e.color[0],e.color[1],e.color[2]],opacity:e.color[3],alphaMode:e.alphaMode,alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,colorMixMode:e.ESRI_externalColorMixMode,textureColor:e.colorTexture?t(e.colorTexture):void 0,textureNormal:e.normalTexture?t(e.normalTexture):void 0,textureOcclusion:e.occlusionTexture?t(e.occlusionTexture):void 0,textureEmissive:e.emissiveTexture?t(e.emissiveTexture):void 0,textureMetallicRoughness:e.metallicRoughnessTexture?t(e.metallicRoughnessTexture):void 0,emissiveFactor:[e.emissiveFactor[0],e.emissiveFactor[1],e.emissiveFactor[2]],colorTextureTransform:e.colorTextureTransform,normalTextureTransform:e.normalTextureTransform,occlusionTextureTransform:e.occlusionTextureTransform,emissiveTextureTransform:e.emissiveTextureTransform,metallicRoughnessTextureTransform:e.metallicRoughnessTextureTransform,metallicFactor:e.metallicFactor,roughnessFactor:e.roughnessFactor,receiveShadows:e.receiveShadows,receiveAmbientOcclustion:e.receiveAmbientOcclusion});r.materials.set(n,s)}return n}const ht=new Set([L.LINEAR_MIPMAP_LINEAR,L.LINEAR_MIPMAP_NEAREST]);function It(r,e){switch(e){case g.TRIANGLES:return Tt(r);case g.TRIANGLE_STRIP:return yt(r);case g.TRIANGLE_FAN:return wt(r)}}function Tt(r){return typeof r=="number"?Ge(r):xe(r)?new Uint16Array(r):r}function yt(r){const e=typeof r=="number"?r:r.length;if(e<3)return[];const o=e-2,t=je(3*o);if(typeof r=="number"){let n=0;for(let s=0;s{i.moment=e?e.getTime():null}}}})],t.prototype,"moment",void 0),t=r=s([n("esri.rest.versionManagement.gdbVersion.support.DeleteForwardEditsParameters")],t);const d=t;export{d as default}; diff --git a/build/assets/DimensionLayer-BzXgFFMi.js b/build/assets/DimensionLayer-BzXgFFMi.js new file mode 100644 index 0000000..55dd048 --- /dev/null +++ b/build/assets/DimensionLayer-BzXgFFMi.js @@ -0,0 +1 @@ +import{cn as P,gR as d,B as t,D as n,ey as h,gS as w,gT as q,E as m,gU as R,Q as v,d7 as D,gV as S,a7 as N,gB as E,bx as j,gW as $,fu as z,gX as T,aZ as x,cs as _,cv as k,d2 as A,cE as C}from"./index-DKOmzAMm.js";import{c as L}from"./Analysis-Bm3a7MSr.js";import{a as B}from"./Cyclical-CyXrdUt3.js";let r=class extends P(R){constructor(e){super(e),this.type="simple",this.color=new d("black"),this.lineSize=2,this.fontSize=10,this.textColor=new d("black"),this.textBackgroundColor=new d([255,255,255,.6])}};t([n({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],r.prototype,"type",void 0),t([n({type:d,nonNullable:!0,json:{type:[h],write:{isRequired:!0}}})],r.prototype,"color",void 0),t([n({type:Number,cast:w,nonNullable:!0,range:{min:q(1)},json:{write:{isRequired:!0}}})],r.prototype,"lineSize",void 0),t([n({type:Number,cast:w,nonNullable:!0,json:{write:{isRequired:!0}}})],r.prototype,"fontSize",void 0),t([n({type:d,nonNullable:!0,json:{type:[h],write:{isRequired:!0}}})],r.prototype,"textColor",void 0),t([n({type:d,nonNullable:!0,json:{type:[h],write:{isRequired:!0}}})],r.prototype,"textBackgroundColor",void 0),r=t([m("esri.analysis.DimensionSimpleStyle")],r);const f=r;var y;(function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Direct="direct"})(y||(y={}));const H=[y.Horizontal,y.Vertical,y.Direct];let l=class extends P(R){constructor(e){super(e),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=y.Direct,this.offset=0,this.orientation=0}};t([n({type:["length"],json:{write:{isRequired:!0}}})],l.prototype,"type",void 0),t([n({type:v,json:{write:!0}})],l.prototype,"startPoint",void 0),t([n({type:v,json:{write:!0}})],l.prototype,"endPoint",void 0),t([n({type:H,nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"measureType",void 0),t([n({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"offset",void 0),t([n({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),D(e=>B.normalize(S(e),0,!0))],l.prototype,"orientation",void 0),l=t([m("esri.analysis.LengthDimension")],l);const O=l,g=N.ofType(O);let a=class extends L{constructor(e){super(e),this.type="dimension",this.style=new f,this.extent=null}initialize(){this.addHandles(j(()=>this._computeExtent(),e=>{(e==null?void 0:e.pending)==null&&this._set("extent",e!=null?e.extent:null)},$))}get dimensions(){return this._get("dimensions")||new g}set dimensions(e){this._set("dimensions",z(e,this.dimensions,g))}get spatialReference(){for(const e of this.dimensions){if(e.startPoint!=null)return e.startPoint.spatialReference;if(e.endPoint!=null)return e.endPoint.spatialReference}return null}get requiredPropertiesForEditing(){return this.dimensions.reduce((e,i)=>(e.push(i.startPoint,i.endPoint),e),[])}async waitComputeExtent(){const e=this._computeExtent();return e!=null?e.pending:Promise.resolve()}_computeExtent(){const e=this.spatialReference;if(e==null)return{pending:null,extent:null};const i=[];for(const o of this.dimensions)o.startPoint!=null&&i.push(o.startPoint),o.endPoint!=null&&i.push(o.endPoint);const p=T(i,e);if(p.pending!=null)return{pending:p.pending,extent:null};let c=null;return p.geometries!=null&&(c=p.geometries.reduce((o,u)=>o==null?u!=null?x.fromPoint(u):null:u!=null?o.union(x.fromPoint(u)):o,null)),{pending:null,extent:c}}clear(){this.dimensions.removeAll()}};t([n({type:["dimension"]})],a.prototype,"type",void 0),t([n({cast:E,type:g,nonNullable:!0})],a.prototype,"dimensions",null),t([n({readOnly:!0})],a.prototype,"spatialReference",null),t([n({types:{key:"type",base:null,typeMap:{simple:f}},nonNullable:!0})],a.prototype,"style",void 0),t([n({value:null,readOnly:!0})],a.prototype,"extent",void 0),t([n({readOnly:!0})],a.prototype,"requiredPropertiesForEditing",null),a=t([m("esri.analysis.DimensionAnalysis")],a);const b=a;let s=class extends _(k(C)){constructor(e){if(super(e),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new b,this.opacity=1,e){const{source:i,style:p}=e;i&&p&&(i.style=p)}}initialize(){this.addHandles([j(()=>this.source,(e,i)=>{i!=null&&i.parent===this&&(i.parent=null),e!=null&&(e.parent=this)},$)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(e){this.source.style=e}get fullExtent(){return this.source.extent}releaseAnalysis(e){this.source===e&&(this.source=new b)}get analysis(){return this.source}set analysis(e){this.source=e}get dimensions(){return this.source.dimensions}set dimensions(e){this.source.dimensions=e}writeDimensions(e,i,p,c){i.dimensions=e.filter(({startPoint:o,endPoint:u})=>o!=null&&u!=null).map(o=>o.toJSON(c)).toJSON()}};t([n({json:{read:!1},readOnly:!0})],s.prototype,"type",void 0),t([n({type:["ArcGISDimensionLayer"]})],s.prototype,"operationalLayerType",void 0),t([n({nonNullable:!0})],s.prototype,"source",void 0),t([n({readOnly:!0})],s.prototype,"spatialReference",null),t([n({types:{key:"type",base:null,typeMap:{simple:f}},json:{write:{ignoreOrigin:!0}}})],s.prototype,"style",null),t([n({readOnly:!0})],s.prototype,"fullExtent",null),t([n({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],s.prototype,"opacity",void 0),t([n({type:["show","hide"]})],s.prototype,"listMode",void 0),t([n({type:N.ofType(O),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],s.prototype,"dimensions",null),t([A("web-scene","dimensions")],s.prototype,"writeDimensions",null),s=t([m("esri.layers.DimensionLayer")],s);const G=s;export{G as default}; diff --git a/build/assets/DoubleArray-D2IDWC15.js b/build/assets/DoubleArray-D2IDWC15.js new file mode 100644 index 0000000..b299aa9 --- /dev/null +++ b/build/assets/DoubleArray-D2IDWC15.js @@ -0,0 +1 @@ +import{bd as t,bc as n}from"./index-DKOmzAMm.js";function y(r,a=!1){return r<=t?a?new Array(r).fill(0):new Array(r):new Float64Array(r)}function u(r){return(n(r)?r.length:r.byteLength/8)<=t?Array.from(r):new Float64Array(r)}function i(r,a,e){return Array.isArray(r)?r.slice(a,a+e):r.subarray(a,a+e)}function A(r,a){for(let e=0;ei.map(i=>d[i]); +import{di as f,V as g,bB as w,dH as b,c7 as u,cF as V,cs as T,ct as S,cv as D,g0 as L,s as $,aK as x,U as c,d8 as k,_ as y,B as o,D as l,aS as m,fH as E,cy as I,E as M,cE as N}from"./index-DKOmzAMm.js";import{p as O}from"./ArcGISCachedService-B90n8xUT.js";import"./TileInfo-Bx6eEWV4.js";import"./TileInfoTilemapCache-jg1X3Y95.js";import"./TilemapCache-6mrSWCBj.js";import"./ByteSizeUnit-BsxeN7wM.js";class j{constructor(e,t,i,a){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=a)}get hasNoDataValues(){if(this._hasNoDataValues==null){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(this._minValue!=null)return;const{noDataValue:e,values:t}=this;let i=1/0,a=-1/0,h=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=na?n:a,h=!1);h?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=a>-3e38?a:0)}}class P{constructor(e,t,i,a,h={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=f(e,{...h,schedule:a}).then(n=>{if(this._thread===void 0){this._thread=n,this._promise=null,h.hasInitialize&&this.broadcast({},"initialize");for(const d of this._listeners)this._connectListener(d)}else n.close()}),this._promise.catch(n=>g.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${n}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),w(()=>{i.removed=!0,b(this._listeners,i),this._thread&&i.threadHandle!=null&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const a=this._transferLists[e],h=a?a(t):[];return this._thread.invoke(e,t,{transferList:h,signal:i})}return this._promise?this._promise.then(()=>(u(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(()=>{}):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}class v extends P{constructor(e=null){super("LercWorker","_decode",{_decode:t=>[t.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&e.byteLength!==0?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(p.forEach((e,t)=>{e===this&&p.delete(t)}),this.destroy())}}const p=new Map;function A(s=null){let e=p.get(s);return e||(s!=null?(e=new v(t=>s.immediate.schedule(t)),p.set(s,e)):(e=new v,p.set(null,e))),++e.ref,e}let r=class extends O(V(T(S(D(N))))){constructor(...s){super(...s),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=A()}normalizeCtorArgs(s,e){return typeof s=="string"?{url:s,...e}:s}destroy(){this._lercDecoder=L(this._lercDecoder)}readCapabilities(s,e){const t=e.capabilities&&e.capabilities.split(",").map(i=>i.toLowerCase().trim());return t?{operations:{supportsTileMap:t.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(s,e){let t=e.currentVersion;return t||(t=9.3),t}load(s){const e=s!=null?s.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:t=>{if(t.typeKeywords){for(let i=0;ithis._fetchImageService(e))),Promise.resolve(this)}fetchTile(s,e,t,i){const a=(i=i||{signal:null}).signal!=null?i.signal:i.signal=new AbortController().signal,h={responseType:"array-buffer",signal:a},n={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(s,e,t,i)).then(()=>c(this.getTileUrl(s,e,t),h)).then(d=>this._lercDecoder.decode(d.data,n,a)).then(d=>new j(d))}getTileUrl(s,e,t){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,a=k({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${s}/${e}/${t}${a?"?"+a:""}`}async queryElevation(s,e){const{ElevationQuery:t}=await y(()=>import("./ElevationQuery-v0ijDjBO.js"),__vite__mapDeps([0,1,2,3]));return u(e),new t().query(this,s,e)}async createElevationSampler(s,e){const{ElevationQuery:t}=await y(()=>import("./ElevationQuery-v0ijDjBO.js"),__vite__mapDeps([0,1,2,3]));return u(e),new t().createSampler(this,s,e)}_fetchTileAvailability(s,e,t,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(s,e,t,i):Promise.resolve("unknown")}async _fetchImageService(s){var i;if(this.sourceJSON)return this.sourceJSON;const e={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:s},t=await c(this.parsedUrl.path,e);t.ssl&&(this.url=(i=this.url)==null?void 0:i.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[_]}};o([l({readOnly:!0})],r.prototype,"capabilities",void 0),o([m("service","capabilities",["capabilities"])],r.prototype,"readCapabilities",null),o([l({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),o([l({readOnly:!0,type:E})],r.prototype,"heightModelInfo",void 0),o([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],r.prototype,"path",void 0),o([l({type:["show","hide"]})],r.prototype,"listMode",void 0),o([l({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],r.prototype,"minScale",void 0),o([l({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],r.prototype,"maxScale",void 0),o([l({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],r.prototype,"opacity",void 0),o([l({type:["ArcGISTiledElevationServiceLayer"]})],r.prototype,"operationalLayerType",void 0),o([l()],r.prototype,"sourceJSON",void 0),o([l({json:{read:!1},value:"elevation",readOnly:!0})],r.prototype,"type",void 0),o([l(I)],r.prototype,"url",void 0),o([l()],r.prototype,"version",void 0),o([m("version",["currentVersion"])],r.prototype,"readVersion",null),r=o([M("esri.layers.ElevationLayer")],r);const _=Symbol("default-fetch-tile");r.prototype.fetchTile[_]=!0;const J=r;export{J as default}; diff --git a/build/assets/ElevationQuery-v0ijDjBO.js b/build/assets/ElevationQuery-v0ijDjBO.js new file mode 100644 index 0000000..eb37757 --- /dev/null +++ b/build/assets/ElevationQuery-v0ijDjBO.js @@ -0,0 +1 @@ +import{Q as $,gH as G,b3 as N,V as X,bB as ee,d3 as R,gO as te,b$ as ne,s as d,ce as C,cf as M,gP as ie,aG as U,dM as q,aK as O,aO as se,aY as D,ax as ae,gQ as Q}from"./index-DKOmzAMm.js";import{t as W}from"./TileInfo-Bx6eEWV4.js";const z=()=>X.getLogger("esri.layers.support.ElevationSampler");class K{queryElevation(e){return oe(e.clone(),this)}on(){return ee()}projectIfRequired(e,t){return B(e,t)}}class le extends K{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=G(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=R(t.spatialReference),a=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:a,max:a}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return t!=null&&this.containsAt(t.x,t.y)}containsAt(e,t){return te(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return z().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class P extends K{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),typeof t=="number"?(this.noDataValue=t,i=null):(i=t,this.noDataValue=n),this.samplers=i?e.map(a=>new le(a,i,this.noDataValue)):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:a,max:o}=s.demResolution;this.demResolution={min:a,max:o};for(let r=1;rt?t:l}class De{async queryAll(e,t,n){if(!(e=n!=null&&n.ignoreInvisibleLayers?e.filter(c=>c.visible):e.slice()).length)throw new d("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const i=x.fromGeometry(t);let s=!1;n!=null&&n.returnSampleInfo||(s=!0);const a={...g,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),s&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new d("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof x)&&t.type!=="point"&&t.type!=="multipoint"&&t.type!=="polyline")throw new d("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...g,...n},s=new fe(e,t.spatialReference,i),a=i.signal;return await e.load({signal:a}),await me(s,t,a),await this._selectTiles(s,a),await T(s,a),ge(s),Te(s,a)}async createSampler(e,t,n){if(!e)throw new d("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||t.type!=="extent")throw new d("elevation-query:invalid-extent","Invalid or undefined extent");const i={...g,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n!=null&&n.ignoreInvisibleLayers?e.filter(a=>a.visible):e.slice()).length)throw new d("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||t.type!=="extent")throw new d("elevation-query:invalid-extent","Invalid or undefined extent");const i={...g,...n,returnSampleInfo:!0},s=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,s,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const a=t.spatialReference,o=e.tileInfo.spatialReference;a.equals(o)||(await C([{source:a,dest:o}],{signal:s}),t=M(t,o));const r=new pe(e,t,n,i);return await this._selectTiles(r,s),await T(r,s),new P(r.elevationTiles,r.layer.tileInfo,r.options.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(c=>!c.tile.hasNoDataValues).map(c=>ie(c.extent)),a=await this._createSampler(e[e.length-1],t,i,s);if(a.samplers.length===0)return n;const o=n.samplers.concat(a.samplers),r=new P(o,i.noDataValue);return this._createSamplerAllContinue(e,t,r,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;U(a);const o=[],r=[];for(let f=0;f=0?h.source||(h.source=i):e.length&&(o.push(s[f]),r.push(f))}if(!e.length||o.length===0)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),m=u.sampleInfo;if(!m)throw new Error("no sampleInfo");return r.forEach((f,h)=>{s[f].z=u.geometry.coordinates[h].z,a[f].demResolution=m[h].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){e.type==="geometry"&&de(e);const n=e.options.demResolution;if(typeof n=="number")xe(e,n);else if(n==="finest-contiguous")await this._selectTilesFinestContiguous(e,t);else{if(n!=="auto")throw new d("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=J(n,i,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=i.tilemapCache,a=e.getTilesToFetch();try{if(s&&!I(s))await q(Promise.all(a.map(o=>s.fetchAvailability(o.level,o.row,o.col,{signal:n}))),n);else if(await T(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new d("elevation-query:has-unavailable-tiles")}catch(o){O(o),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){ve(e),we(e);const n=e.layer.tilemapCache;if(!n||I(n))return this._selectTilesAutoPrefetchUpsample(e,t);const i=e.getTilesToFetch(),s={},a=i.map(async o=>{const r=new W(null,0,0,0,N()),c=await se(n.fetchAvailabilityUpsample(o.level,o.row,o.col,r,{signal:t}));c.ok!==!1?o.id!=null&&(s[o.id]=r):O(c.error)});await q(Promise.all(a),t),e.remapTiles(s)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await T(e,t);let i=!1;e.forEachTileToFetch((s,a)=>{n.upsampleTile(s)?i=!0:a()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class x{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new x;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(n=>n.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await C([{source:this.spatialReference,dest:e}],{signal:t});const n=new D({spatialReference:this.spatialReference,points:this.coordinates.map(o=>[o.x,o.y])}),i=M(n,e);if(!i)return null;const s=this.coordinates.map((o,r)=>{const c=o.clone(),u=i.points[r];return c.x=u[0],c.y=u[1],c}),a=this.clone(s);return a.spatialReference=e,a}static fromGeometry(e){const t=new x;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof x)t.coordinates=e.coordinates.map(n=>n.clone()),t._exporter=(n,i)=>{const s=e.clone(n);return s.spatialReference=i,s};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new p(n.x,n.y,n.z,n.m)]:i?[new p(n.x,n.y,n.z)]:s?[new p(n.x,n.y,null,n.m)]:[new p(n.x,n.y)],t._exporter=(a,o)=>e.hasM?new $(a[0].x,a[0].y,a[0].z,a[0].m,o):new $(a[0].x,a[0].y,a[0].z,o);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(a=>new p(a[0],a[1],a[2],a[3])):i?n.points.map(a=>new p(a[0],a[1],a[2])):s?n.points.map(a=>new p(a[0],a[1],null,a[2])):n.points.map(a=>new p(a[0],a[1])),t._exporter=(a,o)=>e.hasM?new D({points:a.map(r=>[r.x,r.y,r.z,r.m]),hasZ:!0,hasM:!0,spatialReference:o}):new D(a.map(r=>[r.x,r.y,r.z]),o);break}case"polyline":{const n=e,i=[],s=[],{hasZ:a,hasM:o}=e;let r=0;for(const c of n.paths)if(s.push([r,r+c.length]),r+=c.length,a&&o)for(const u of c)i.push(new p(u[0],u[1],u[2],u[3]));else if(a)for(const u of c)i.push(new p(u[0],u[1],u[2]));else if(o)for(const u of c)i.push(new p(u[0],u[1],null,u[2]));else for(const u of c)i.push(new p(u[0],u[1]));t.coordinates=i,t._exporter=(c,u)=>{const m=e.hasM?c.map(h=>[h.x,h.y,h.z,h.m]):c.map(h=>[h.x,h.y,h.z]),f=s.map(h=>m.slice(h[0],h[1]));return new ae({paths:f,hasM:e.hasM,hasZ:!0,spatialReference:u})};break}}return t}}class p{constructor(e,t,n=null,i=null,s=null,a=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=a}clone(){return new p(this.x,this.y,this.z,this.m)}}class Y{constructor(e,t){this.layer=e,this.options=t}}class fe extends Y{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(t=>t.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=w(t,n)[e].level;this.geometry.coordinates.forEach(s=>s.tile=t.tileAt(i,s.x,s.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){var t;for(const n of this.geometry.coordinates)!n.elevationTile&&((t=n.tile)!=null&&t.id)&&(n.elevationTile=e[n.tile.id])}remapTiles(e){var t;for(const n of this.geometry.coordinates){const i=(t=n.tile)==null?void 0:t.id;n.tile=i?e[i]:null}}getTilesToFetch(){var n;const e={},t=[];for(const i of this.geometry.coordinates){const s=i.tile;if(!s)continue;const a=(n=i.tile)==null?void 0:n.id;i.elevationTile||!a||e[a]||(e[a]=s,t.push(s))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>{t.tile=null})}}class pe extends Y{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=w(t,n);if(!e)return i.length-1;const s=this.extent;if(s==null)return-1;for(let a=i.length-1;a>=0;a--){const o=i[a],r=o.resolution*t.size[0],c=o.resolution*t.size[1];if(Math.ceil(s.width/r)*Math.ceil(s.height/c)<=e)return a}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=j(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(i=>{if(this._fetchedCandidates.has(i))return void(t&&t(i));let s=!1;e(i,()=>s=!0),s?t&&t(i):this._candidateTiles.push(i)}),this._candidateTiles=j(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(t==null)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=w(n,i)[e],a=n.tileAt(s.level,t.xmin,t.ymin),o=a.extent;if(o==null)return;const r=s.resolution*n.size[0],c=s.resolution*n.size[1],u=Math.ceil((t.xmax-o[0])/r),m=Math.ceil((t.ymax-o[1])/c);for(let f=0;fe.extent&&Q(t,e.extent))}}function J(l,e,t=0){const n=w(l,e);let i=n.length-1;if(t>0){const s=t/R(l.spatialReference),a=n.findIndex(o=>o.resolution0&&(i=a-1)}return i}const g={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};async function me(l,e,t){let n;const i=l.layer.tileInfo.spatialReference;if(e instanceof x?n=await e.project(i,t):(await C([{source:e.spatialReference,dest:i}],{signal:t}),n=M(e,i)),!n)throw new d("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${e.spatialReference.wkid}' on an elevation service in '${i.wkid}'`);l.geometry=x.fromGeometry(n)}function de(l){if(l.layer.fullExtent==null)return;const e=new H(null);e.sample=()=>l.options.noDataValue,l.outsideExtentTile=e;const t=l.layer.fullExtent;l.geometry.coordinates.forEach(n=>{const i=n.x,s=n.y;(it.xmax||st.ymax)&&(n.elevationTile=e)})}function ye(l,e){const{tileInfo:t,tilemapCache:n}=l.layer,i=e/R(t.spatialReference),s=w(t,n);let a=s[0],o=0;for(let r=1;rs.level>=n&&s.level<=i)}return t}async function T(l,e){const t=l.getTilesToFetch(),n={},i=l.options.cache,s=l.options.noDataValue,a=t.map(async o=>{if(o.id==null)return;const r=`${l.layer.uid}:${o.id}:${s}`,c=i!=null?i.get(r):null,u=c??await l.layer.fetchTile(o.level,o.row,o.col,{noDataValue:s,signal:e});i!=null&&i.put(r,u),n[o.id]=new H(o,u)});await q(Promise.allSettled(a),e),l.populateElevationTiles(n)}function we(l){const e=l.layer.tileInfo;let t=0;const n={},i=o=>{o.id!=null&&(o.id in n?n[o.id]++:(n[o.id]=1,t++))},s=o=>{if(o.id==null)return;const r=n[o.id];r===1?(delete n[o.id],t--):n[o.id]=r-1};l.forEachTileToFetch(i,s);let a=!0;for(;a&&(a=!1,l.forEachTileToFetch(o=>{t<=l.options.maximumAutoTileRequests||(s(o),e.upsampleTile(o)&&(a=!0),i(o))},s),a););}function ge(l){l.geometry.coordinates.forEach(e=>{const t=e.elevationTile;let n=l.options.noDataValue;if(t){const i=t.sample(e.x,e.y);i!=null?n=i:e.elevationTile=null}e.z=n})}function j(l,e){const t={},n=[];for(const s of l){const a=s.id;a&&!t[a]?(t[a]=s,n.push(s)):e&&e(s)}const i=n.sort((s,a)=>s.level-a.level);return i.filter((s,a)=>{for(let o=0;o{i.tile=null,i.elevationTile=null}),n}function Re(l){const e=l.layer.tileInfo,t=R(e.spatialReference);return l.geometry.coordinates.map(n=>{let i=-1;return n.elevationTile&&n.elevationTile!==l.outsideExtentTile&&(i=e.lodAt(n.elevationTile.tile.level).resolution*t),{demResolution:i}})}function I(l){return(l==null?void 0:l.tileInfo)!=null}export{De as ElevationQuery,x as GeometryDescriptor,J as getFinestLodIndex}; diff --git a/build/assets/ElevationSamplerWorker-Be15mw3K.js b/build/assets/ElevationSamplerWorker-Be15mw3K.js new file mode 100644 index 0000000..0959b42 --- /dev/null +++ b/build/assets/ElevationSamplerWorker-Be15mw3K.js @@ -0,0 +1 @@ +import{M as f}from"./index-DKOmzAMm.js";import{h as p}from"./PooledRBush-CdrRkOdh.js";import{i as u}from"./MeshLocalVertexSpace-CZ-FLKyC.js";import{M as l}from"./vertexSpaceConversion-DdxiyRap.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./mat3-BNGRf_pC.js";import"./mat3f64-q3fE-ZOt.js";import"./mat4f64-CSKppSlJ.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./vec3-C6eb5QY9.js";import"./projection-Ch_noS-l.js";import"./DoubleArray-D2IDWC15.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./vec4-n1PBj5SL.js";class F{async createIndex(r,o){var e;const n=new Array;if(!((e=r.vertexAttributes)!=null&&e.position))return new p;const i=d(r),a=o!=null?await o.invoke("createIndexThread",i,{transferList:n}):this.createIndexThread(i).result;return m().fromJSON(a)}createIndexThread(r){const o=m();if(!r)return{result:o.toJSON()};const n=new Float64Array(r.position);return r.components?h(o,n,r.components.map(i=>new Uint32Array(i))):x(o,n)}}function x(t,r){const o=new Array(r.length/9);let n=0;for(let i=0;i!s.faces)?{position:a.buffer}:{position:a.buffer,components:t.components.map(s=>s.faces)}:null}function m(){return new p(9,f("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function c(t,r,o,n){return{minX:Math.min(t[r],t[o],t[n]),maxX:Math.max(t[r],t[o],t[n]),minY:Math.min(t[r+1],t[o+1],t[n+1]),maxY:Math.max(t[r+1],t[o+1],t[n+1]),p0:[t[r],t[r+1],t[r+2]],p1:[t[o],t[o+1],t[o+2]],p2:[t[n],t[n+1],t[n+2]]}}export{F as default}; diff --git a/build/assets/FeatureLayerSource-DHybgE9g.js b/build/assets/FeatureLayerSource-DHybgE9g.js new file mode 100644 index 0000000..d92317a --- /dev/null +++ b/build/assets/FeatureLayerSource-DHybgE9g.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/uploadAssets-DaOQPv-z.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/mat4f64-CSKppSlJ.js","assets/quat-BYKy26Om.js","assets/mat3f64-q3fE-ZOt.js","assets/quatf64-Bdb9ZJJK.js","assets/uploadAssetErrors-Bg66aMSE.js","assets/convertMeshVertexSpace-BbnC0zgE.js","assets/MeshVertexAttributes-CfiMg9vN.js","assets/vertexSpaceConversion-DdxiyRap.js","assets/mat3-BNGRf_pC.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/vec3-C6eb5QY9.js","assets/projection-Ch_noS-l.js","assets/DoubleArray-D2IDWC15.js","assets/BufferView-DOhKdt-N.js","assets/vec2-CurFBDJu.js","assets/vec4-n1PBj5SL.js"])))=>i.map(i=>d[i]); +import{ab as P,dv as Q,bp as V,dw as G,dx as D,dy as H,V as T,s as S,a8 as z,dh as $,a_ as j,B as O,D as A,aN as B,dz as Z,bx as W,M as J,dA as v,U as f,O as M,dB as X,dC as Y,dD as K,dE as ee,dF as te,aZ as ae,dG as se,d9 as re,aV as N,_ as C,N as L,dH as ie,dI as ne,dJ as oe,aK as ue,a6 as le,ay as de,dK as ce,E as pe}from"./index-DKOmzAMm.js";import{i as he}from"./MeshLocalVertexSpace-CZ-FLKyC.js";import{a as ye}from"./meshVertexSpaceUtils-CMKdridq.js";import{N as me,v as fe}from"./MeshTransform-CnKLNqg-.js";import{isFeatureIdentifierArrayWithGlobalId as ge,isFeatureIdentifierArrayWithObjectId as we}from"./editingSupport-BRaaDEoU.js";import{o as be}from"./clientSideDefaults-B7fGShzo.js";import{x as Ie}from"./QueryTask-CH4nGmOK.js";import{F as Re}from"./infoFor3D-DsOdlPuA.js";import{s as Se}from"./executeQueryJSON-CCbDrFwh.js";import"./mat4f64-CSKppSlJ.js";import"./quat-BYKy26Om.js";import"./mat3f64-q3fE-ZOt.js";import"./quatf64-Bdb9ZJJK.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./executeQueryPBF-B-eLVWOv.js";import"./featureConversionUtils-CCATessr.js";async function U(t,e,a){const{geometry:s}=e,r={...e.attributes};if(a!=null&&(s==null?void 0:s.type)==="mesh"){const{transformFieldRoles:i}=a,{origin:o,spatialReference:n,vertexSpace:u}=s,l=s.transform??new me,d=u.type==="local",c=t.spatialReference,b=c.isGeographic,I=P(c,n),h=Q(n,c)&&V(n,c);if(!(d&&b&&h||!d&&!b&&I))return null;const p=G(o,n,c);if(p==null)return null;if(r[i.originX]=p.x,r[i.originY]=p.y,r[i.originZ]=p.z??0,l!=null){const{translation:R,scale:y,rotation:g}=l,m=d?1:D(n)/D(c);r[i.translationX]=R[0]*m,r[i.translationY]=R[2]*m,r[i.translationZ]=-R[1]*m,r[i.scaleX]=y[0],r[i.scaleY]=y[2],r[i.scaleZ]=y[1],r[i.rotationX]=g[0],r[i.rotationY]=g[2],r[i.rotationZ]=-g[1],r[i.rotationDeg]=g[3]}return{attributes:r}}return s==null?{attributes:r}:s.type==="mesh"||s.type==="extent"?null:{geometry:s.toJSON(),attributes:r}}async function qe(t,e){const a=await Promise.all((e.addAttachments??[]).map(i=>k(t,i))),s=await Promise.all((e.updateAttachments??[]).map(i=>k(t,i))),r=e.deleteAttachments??[];return a.length||s.length||r.length?{adds:a,updates:s,deletes:[...r]}:null}async function k(t,e){var d;const{feature:a,attachment:s}=e,{globalId:r,name:i,contentType:o,data:n,uploadId:u}=s,l={globalId:r};if(a&&("attributes"in a?l.parentGlobalId=(d=a.attributes)==null?void 0:d[t.globalIdField]:a.globalId&&(l.parentGlobalId=a.globalId)),u)l.uploadId=u;else if(n){const c=await H(n);c&&(l.contentType=c.mediaType,l.data=c.data),n instanceof File&&(l.name=n.name)}return i&&(l.name=i),o&&(l.contentType=o),l}function _e(t,e,a){if(!e||e.length===0)return[];if(a&&ge(e))return e.map(r=>r.globalId);if(we(e))return e.map(r=>r.objectId);const s=a?t.globalIdField:t.objectIdField;return s?e.map(r=>r.getAttribute(s)):[]}function Ee(t){var r,i,o;const e=t==null?void 0:t.assetMaps;if(e){for(const n of e.addResults)n.success||T.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${n.globalId}.`);for(const n of e.updateResults)n.success||T.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${n.globalId}.`)}const a=t==null?void 0:t.attachments,s={addFeatureResults:((r=t==null?void 0:t.addResults)==null?void 0:r.map(w))??[],updateFeatureResults:((i=t==null?void 0:t.updateResults)==null?void 0:i.map(w))??[],deleteFeatureResults:((o=t==null?void 0:t.deleteResults)==null?void 0:o.map(w))??[],addAttachmentResults:a!=null&&a.addResults?a.addResults.map(w):[],updateAttachmentResults:a!=null&&a.updateResults?a.updateResults.map(w):[],deleteAttachmentResults:a!=null&&a.deleteResults?a.deleteResults.map(w):[]};return t!=null&&t.editMoment&&(s.editMoment=t.editMoment),s}function w(t){const e=t.success===!0?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:e?new S("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function x(t,e){return new z({attributes:t.attributes,geometry:$({...t.geometry,spatialReference:e})})}function Oe(t,e){var a,s,r;return{adds:((a=t==null?void 0:t.adds)==null?void 0:a.map(i=>x(i,e)))||[],updates:((s=t==null?void 0:t.updates)==null?void 0:s.map(i=>({original:x(i[0],e),current:x(i[1],e)})))||[],deletes:((r=t==null?void 0:t.deletes)==null?void 0:r.map(i=>x(i,e)))||[],spatialReference:e}}function Fe(t){const e=t.details.raw,a=+e.code,s=+e.extendedCode;return a===500&&(s===-2147217144||s===-2147467261)}const Ae=new j({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),ve=new j({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let q=class extends B{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=Z(async()=>{var s,r;await this.load();const e=(s=this.sourceJSON.editingInfo)==null?void 0:s.lastEditDate;if(e==null)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const a=e!==((r=this.sourceJSON.editingInfo)==null?void 0:r.lastEditDate);return{dataChanged:a,updates:a?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,a=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(a),Promise.resolve(this)}initialize(){this.addHandles([W(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){var l;const{capabilities:t,parsedUrl:e,gdbVersion:a,spatialReference:s,fieldsIndex:r}=this.layer,i="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,n=J("featurelayer-pbf")&&(t==null?void 0:t.query.supportsFormatPBF)&&i==null,u=((l=t==null?void 0:t.operations)==null?void 0:l.supportsQueryAttachments)??!1;return new Ie({url:e.path,pbfSupported:n,fieldsIndex:r,infoFor3D:i,dynamicDataSource:o,gdbVersion:a,sourceSpatialReference:s,queryAttachmentsSupported:u})}async addAttachment(t,e){await this.load();const{layer:a}=this;await v(a,"editing");const s=t.attributes[a.objectIdField],r=a.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,i.query);try{const n=await f(r,{body:o});return w(n.data.addAttachmentResult)}catch(n){throw this._createAttachmentErrorResult(s,n)}}async updateAttachment(t,e,a){await this.load();const{layer:s}=this;await v(s,"editing");const r=t.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+r+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),n=this._getFormDataForAttachment(a,o.query);try{const u=await f(i,{body:n});return w(u.data.updateAttachmentResult)}catch(u){throw this._createAttachmentErrorResult(r,u)}}async applyEdits(t,e){var _,F;await this.load();const{layer:a}=this;await v(a,"editing");const s="infoFor3D"in a?a.infoFor3D:null,r=s!=null,i=r||((e==null?void 0:e.globalIdUsed)??!1),o=r?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,n=((_=t.addFeatures)==null?void 0:_.map(E=>U(this.layer,E,s)))??[],u=(await Promise.all(n)).filter(M),l=((F=t.updateFeatures)==null?void 0:F.map(E=>U(this.layer,E,s)))??[],d=(await Promise.all(l)).filter(M),c=_e(this.layer,t.deleteFeatures,i);X(u,d,a.spatialReference);const b=await qe(this.layer,t),I=a.capabilities.editing.supportsAsyncApplyEdits&&r,h=(e==null?void 0:e.gdbVersion)||a.gdbVersion,p={gdbVersion:h,rollbackOnFailure:e==null?void 0:e.rollbackOnFailureEnabled,useGlobalIds:i,returnEditMoment:e==null?void 0:e.returnEditMoment,usePreviousEditMoment:e==null?void 0:e.usePreviousEditMoment,async:I};await Y(this.layer.url,h,!0);const R=K(this.layer.url,h||null);if(await ee(a.url,h,a.historicMoment))throw new S("feature-layer-source:historic-version","Editing a historic version is not allowed");e!=null&&e.returnServiceEditsOption?(p.edits=JSON.stringify([{id:a.layerId,adds:u.length?u:null,updates:d.length?d:null,deletes:c.length?c:null,attachments:b,assetMaps:o}]),p.returnServiceEditsOption=Ae.toJSON(e==null?void 0:e.returnServiceEditsOption),p.returnServiceEditsInSourceSR=e==null?void 0:e.returnServiceEditsInSourceSR):(p.adds=u.length?JSON.stringify(u):null,p.updates=d.length?JSON.stringify(d):null,p.deletes=c.length?i?JSON.stringify(c):c.join(","):null,p.attachments=b&&JSON.stringify(b),p.assetMaps=o!=null?JSON.stringify(o):void 0);const y=this._getLayerRequestOptions({method:"post",query:p});R&&(y.authMode="immediate",y.query.returnEditMoment=!0,y.query.sessionId=te);const g=e!=null&&e.returnServiceEditsOption?a.url:a.parsedUrl.path;let m;try{m=I?await this._asyncApplyEdits(g+"/applyEdits",y):await f(g+"/applyEdits",y)}catch(E){if(!Fe(E))throw E;y.authMode="immediate",m=I?await this._asyncApplyEdits(g+"/applyEdits",y):await f(g+"/applyEdits",y)}return this._createEditsResult(m)}async deleteAttachments(t,e){await this.load();const{layer:a}=this;await v(a,"editing");const s=t.attributes[a.objectIdField],r=a.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await f(r,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(w)}catch(i){throw this._createAttachmentErrorResult(s,i)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const a=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:i}=await f(`${r}/${s}`,a),{id:o,extent:n,fullExtent:u,timeExtent:l}=i,d=n||u;return{id:o,fullExtent:d&&ae.fromJSON(d),timeExtent:l&&se.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const a=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,a)}async queryFeatures(t,e){var s;await this.load();const a=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});return(s=t.outStatistics)!=null&&s.length&&a.features.length&&a.features.forEach(r=>{var o;const i=r.attributes;(o=t.outStatistics)==null||o.forEach(({outStatisticFieldName:n})=>{if(n){const u=n.toLowerCase();u&&u in i&&n!==u&&(i[n]=i[u],delete i[u])}})}),a}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!re(this.layer.url))return"unavailable";const t=N(this.layer.url,"status"),e=await f(t,{query:{f:"json"}});return ve.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:a}=await C(()=>import("./uploadAssets-DaOQPv-z.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return a(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){var s,r,i,o;const e=this.layer;if(t==null||!("capabilities"in e)||!("effectiveCapabilities"in e)||!(!((r=(s=e.capabilities)==null?void 0:s.operations)!=null&&r.supportsEditing)&&((o=(i=e.effectiveCapabilities)==null?void 0:i.operations)!=null&&o.supportsEditing)))return;const a=e.url;a!=null&&("layerId"in e&&N(a,e.layerId.toString()),this._getOrCreateEditInterceptor(a).before=n=>{const u=n.requestOptions.method??"auto";if(u==="auto"||u==="head"){const l=n.requestOptions.query??{};l._ts=t.getTime(),n.requestOptions.query=l}})}_getOrCreateEditInterceptor(t){return this._editInterceptor==null&&(this._editInterceptor={urls:t},L.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){this._editInterceptor!=null&&(ie(L.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const a=(await f(t,e)).data.statusUrl;for(;;){const s=(await f(a,{query:{f:"json"},responseType:"json"})).data;switch(s.status){case"Completed":return f(s.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new S("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new S("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await ne(xe)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t==null?void 0:t.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const s={};J("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),e!=null&&e.cacheBust&&(s._ts=Date.now());const{data:r}=await f(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:e==null?void 0:e.signal}));t=r}this.sourceJSON=await this._patchServiceJSON(t,e==null?void 0:e.signal);const a=t.type;if(!this.supportedSourceTypes.has(a))throw new S("feature-layer-source:unsupported-type",`Source type "${a}" is not supported`)}async _patchServiceJSON(t,e){var a;if(t.type!=="Table"&&t.geometryType&&!((a=t==null?void 0:t.drawingInfo)!=null&&a.renderer)&&!t.defaultSymbol){const s=be(t.geometryType).renderer;oe("drawingInfo.renderer",s,t)}if(t.geometryType==="esriGeometryMultiPatch"&&t.infoFor3D&&(t.geometryType="mesh"),t.extent==null)try{const{data:s}=await f(this.layer.url,this._getLayerRequestOptions({signal:e}));s.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(s){ue(s)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!(e!=null&&e.length)||await this._areAllAssetsAlreadyMapped(e))return null;const a=t.addFeatures.filter(i=>i.geometry);if(e.length!==a.length+t.updateFeatures.length)throw new S("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const s=new Array,r=new Map;for(const i of e){const{geometry:o}=i,{vertexSpace:n}=o;if(ye(n))s.push(o);else{const u=o.anchor,{convertMeshVertexSpace:l}=await C(async()=>{const{convertMeshVertexSpace:c}=await import("./convertMeshVertexSpace-BbnC0zgE.js");return{convertMeshVertexSpace:c}},__vite__mapDeps([10,1,2,11,12,13,7,5,14,15,16,17,18,19,20,21,22,23])),d=await l(o,new he({origin:[u.x,u.y,u.z??0]}));r.set(d,o),i.geometry=d,s.push(d)}}await this.uploadAssets(s);for(const[i,o]of r)o.addExternalSources(i.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,a=this.layer.globalIdField,s=this.layer.parsedUrl;for(const r of t){const i=r.geometry,{metadata:o}=i,n=o.getExternalSourcesOnService(s),u=r.getAttribute(a);if(n.length===0){T.getLogger(this).error(`Skipping feature ${u}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:l}=n.find(fe)??n[0];for(const d of l)d.parts.length===1?e.push({globalId:le(),parentGlobalId:u,assetName:d.assetName,assetHash:d.parts[0].partHash,flags:[]}):T.getLogger(this).error(`Skipping asset ${d.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:a}=this.layer,s=[];let r=null;if(Array.isArray(e))for(const o of e)s.push({id:o.id,editedFeatures:o.editedFeatures}),o.id===a&&(r={addResults:o.addResults??[],updateResults:o.updateResults??[],deleteResults:o.deleteResults??[],attachments:o.attachments,editMoment:o.editMoment});else r=e;const i=Ee(r);if(s.length>0){i.editedFeatureResults=[];for(const o of s){const{editedFeatures:n}=o,u=n!=null&&n.spatialReference?new de(n.spatialReference):null;i.editedFeatureResults.push({layerId:o.id,editedFeatures:Oe(n,u)})}}return i}_createAttachmentErrorResult(t,e){var r;const a=((r=e.details.messages)==null?void 0:r[0])||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new S("feature-layer-source:attachment-failure",a,{code:s})}}_getFormDataForAttachment(t,e){const a=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(a)for(const s in e){const r=e[s];r!=null&&(a.set?a.set(s,r):a.append(s,r))}return a}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:a,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...a.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:a,parsedUrl:s}=e,r="infoFor3D"in e?e.infoFor3D:null;if(r==null||a==null)return!1;const i=Re(r);if(i==null)return!1;const o=N(s.path,`../${i.id}`),n=new Array;for(const h of t){if(!(h.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;n.push(h)}const u=n.map(h=>h.getAttribute(a)).filter(M);if(u.length===0)return!1;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:d}}=r,c=new ce({where:`${l} IN (${u.map(h=>`'${h}'`)})`,outFields:[d,l],returnGeometry:!1}),b=await Se(o,c),{features:I}=b;return I.length!==0&&!n.some(h=>{const p=h.getAttribute(a);if(!p)return!0;const{metadata:R}=h.geometry,y=I.filter(m=>m.getAttribute(l)===p);if(y.length===0)return!0;const g=y.map(m=>m.getAttribute(d));return R.getExternalSourcesOnService(s).flatMap(({source:m})=>m.flatMap(_=>_.parts.map(F=>F.partHash))).some(m=>g.every(_=>m!==_))})}};O([A()],q.prototype,"type",void 0),O([A({constructOnly:!0})],q.prototype,"layer",void 0),O([A({constructOnly:!0})],q.prototype,"supportedSourceTypes",void 0),O([A({readOnly:!0})],q.prototype,"queryTask",null),q=O([pe("esri.layers.graphics.sources.FeatureLayerSource")],q);const xe=1e3,at=q;export{at as default}; diff --git a/build/assets/FeaturePipelineWorker-Duw9IYNq.js b/build/assets/FeaturePipelineWorker-Duw9IYNq.js new file mode 100644 index 0000000..b1cfb1f --- /dev/null +++ b/build/assets/FeaturePipelineWorker-Duw9IYNq.js @@ -0,0 +1,66 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/geometryEngineWorker-ClddcLz0.js","assets/geometryEngineBase-RmbNeFm7.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/json-Wa8cmqdu.js"])))=>i.map(i=>d[i]); +import{dR as Jh,aJ as Gu,B as x,D as ot,E as ci,bw as li,ft as To,jr as Co,s as rt,V as _t,hq as ui,js as Qe,az as Vu,aB as Uu,aC as qu,hY as tc,aA as ju,$ as ko,jt as ve,ay as ft,ju as Yu,jv as Wu,jw as Fr,he as Eo,jx as Xu,jy as Hu,b3 as di,jz as Zu,jf as Ku,jA as Qu,ae as Ju,jB as Sa,_ as td,M as k,gR as Xe,dX as E,aR as ed,jC as j,jD as ec,c5 as Pn,jE as sd,O as bi,b1 as Fo,b0 as Ao,jF as id,jG as rd,bP as nd,jH as od,jI as ad,bL as hd,jJ as cd,jK as ld,h4 as ud,aE as Mn,dK as zo,hZ as dd,bE as _r,aG as sc,dh as pd,jL as fd,jM as _d,d3 as md,d4 as gd,aX as yd,aZ as ic,cI as Pa,hF as Ma,jN as Oo,jO as wi,jP as Lo,c7 as Zs,eQ as xd,d9 as bd,dG as wd,bx as mr,iA as rc,jQ as vd,eI as Ar,bV as gr,fz as Id,jR as nc,jS as $a,jT as Ta,U as Sd,ix as Pd,jU as Md,fE as $d,a2 as Td}from"./index-DKOmzAMm.js";import{z as Cd}from"./TileInfo-Bx6eEWV4.js";import{e as ne}from"./TileKey-D9UF-PsB.js";import{m as kd,S as zt,o as ut,B as Ca,v as Zr,u as Ed,l as ka}from"./vec2-CurFBDJu.js";import{_ as Do}from"./QueueProcessor-DTdXzd4o.js";import{k as V,j as Ro,i as yr,O as me,l as Ki,m as z,q as yt,B as as,A as vi,X as Dt,t as Ii,Y as Kr,Z as hs,K as Si,U as Qr,e as Jr,w as tn,n as en,u as zr,v as He,x as Fd,R as Ad,y as zd,z as Od,V as Ld,C as Dd,D as oc,E as Rd,L as sn}from"./GeometryUtils-6Cd4d7Hy.js";import{e as Nd,c as Bd,t as $n,n as Tn,a as Cn}from"./vec2f32-DxfkRbjY.js";import{U as ge,C as I,H as Mt,V as ae}from"./enums-CxXC-vJk.js";import{o as No}from"./_commonjsHelpers-DCkdB7M8.js";import{a as Gd,t as Vd,i as Ud,c as qd}from"./TurboLine-BJPIEzB-.js";import"./earcut-BqgeR2O3.js";import{e as R,a as ye,s as Pi}from"./OptimizedFeature-DDMKj8Vq.js";import{a as Mi}from"./BindType-BmZEZMMh.js";import{s as jd}from"./Util-DRlRfUCu.js";import{n as Fe}from"./vec2f64-DA6GkJuH.js";import{h as Yd,r as Ye,g as Wd,p as kn,e as Xd,c as ac,N as Hd,n as hc,b as Zd,w as Kd,a as We,K as cc,O as Qd,f as lc}from"./featureConversionUtils-CCATessr.js";import{o as Jd,$ as uc,a as tp,v as ep,t as sp,n as ip,x as rp,j as xr}from"./QueryEngine-CI3mggax.js";import{m as $i,n as Ea,b as Fa}from"./TimeOnly-C2MfFEIr.js";import{f as np}from"./quickselect-D0_cvEX6.js";import{d as op,c as Aa,S as ap}from"./query-CQvaiR4K.js";import{$ as za}from"./ogcFeatureUtils-CuyMjEno.js";import{n as hp}from"./pbf-DwSF5Y_G.js";import{b as cp,h as lp}from"./pbfQueryUtils-D2YxxSfN.js";import{createConnection as up}from"./createConnection-BFN_9xe7.js";import{s as dp}from"./ReactiveMap-C7QHrros.js";import{h as pp}from"./UpdatingHandles-D3xBFsF5.js";import"./signal-swyOrDkM.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./geojson-BRJeQduY.js";import"./date-M6n_RqpC.js";import"./clientSideDefaults-B7fGShzo.js";import"./sourceUtils-DYgU-2mb.js";function Ht(r,t){return[r,t]}function he(r,t,e){return r[0]=t,r[1]=e,r}function fp(r,t,e,s,i){return r[0]=t,r[1]=e,r[2]=s,r[3]=i,r}const St=new ne("0/0/0/0");let _p=class dc{static create(t,e,s=null){const i=Jh(t.spatialReference),n=e.origin||Ht(t.origin.x,t.origin.y),o=Ht(t.size[0]*e.resolution,t.size[1]*e.resolution),a=Ht(-1/0,-1/0),h=Ht(1/0,1/0),c=Ht(1/0,1/0);s!=null&&(he(a,Math.max(0,Math.floor((s.xmin-n[0])/o[0])),Math.max(0,Math.floor((n[1]-s.ymax)/o[1]))),he(h,Math.max(0,Math.floor((s.xmax-n[0])/o[0])),Math.max(0,Math.floor((n[1]-s.ymin)/o[1]))),he(c,h[0]-a[0]+1,h[1]-a[1]+1));const{cols:l,rows:u}=e;let d,p,f,_;return!s&&l&&u&&(he(a,l[0],u[0]),he(h,l[1],u[1]),he(c,l[1]-l[0]+1,u[1]-u[0]+1)),t.isWrappable?(d=Ht(Math.ceil(Math.round((i.valid[1]-i.valid[0])/e.resolution)/t.size[0]),c[1]),p=Ht(Math.floor((i.origin[0]-n[0])/o[0]),a[1]),f=Ht(d[0]+p[0]-1,h[1]),_=!0):(p=a,f=h,d=c,_=!1),new dc(e.level,e.resolution,e.scale,n,a,h,c,o,p,f,d,_)}constructor(t,e,s,i,n,o,a,h,c,l,u,d){this.level=t,this.resolution=e,this.scale=s,this.origin=i,this.first=n,this.last=o,this.size=a,this.norm=h,this.worldStart=c,this.worldEnd=l,this.worldSize=u,this.wrap=d}normalizeCol(t){if(!this.wrap)return t;const e=this.worldSize[0];return t<0?e-1-Math.abs((t+1)%e):t%e}denormalizeCol(t,e){return this.wrap?this.worldSize[0]*e+t:t}getWorldForColumn(t){return this.wrap?Math.floor(t/this.worldSize[0]):0}getFirstColumnForWorld(t){return t*this.worldSize[0]+this.first[0]}getLastColumnForWorld(t){return t*this.worldSize[0]+this.first[0]+this.size[0]-1}getColumnForX(t){return(t-this.origin[0])/this.norm[0]}getXForColumn(t){return this.origin[0]+t*this.norm[0]}getRowForY(t){return(this.origin[1]-t)/this.norm[1]}getYForRow(t){return this.origin[1]-t*this.norm[1]}getTileBounds(t,e,s=!1){St.set(e);const i=s?St.col:this.denormalizeCol(St.col,St.world),n=St.row;return fp(t,this.getXForColumn(i),this.getYForRow(n+1),this.getXForColumn(i+1),this.getYForRow(n)),t}getTileCoords(t,e,s=!1){St.set(e);const i=s?St.col:this.denormalizeCol(St.col,St.world);return Array.isArray(t)?he(t,this.getXForColumn(i),this.getYForRow(St.row)):(t.x=this.getXForColumn(i),t.y=this.getYForRow(St.row)),t}},En=class{constructor(){this.spans=[]}acquire(t){this.lodInfo=t}release(){this.lodInfo=null,this.spans.length=0}*keys(){const t=this.lodInfo;for(const{row:e,colFrom:s,colTo:i}of this.spans)for(let n=s;n<=i;n++){const o=t.getWorldForColumn(n);yield new ne(t.level,e,t.normalizeCol(n),o)}}forEach(t,e){const{spans:s,lodInfo:i}=this,{level:n}=i;if(s.length!==0)for(const{row:o,colFrom:a,colTo:h}of s)for(let c=a;c<=h;c++)t.call(e,n,o,i.normalizeCol(c),i.getWorldForColumn(c))}};En.pool=new Gu(En);let rn=class{constructor(t,e,s){this.row=t,this.colFrom=e,this.colTo=s}};const B=new ne("0/0/0/0");let mp=class pc{static create(t,e){t[1]>e[1]&&([t,e]=[e,t]);const[s,i]=t,[n,o]=e,a=n-s,h=o-i,c=h!==0?a/h:0,l=(Math.ceil(i)-i)*c,u=(Math.floor(i)-i)*c;return new pc(s,Math.floor(i),Math.ceil(o),c,a<0?l:u,a<0?u:l,a<0?n:s,a<0?s:n)}constructor(t,e,s,i,n,o,a,h){this.x=t,this.ymin=e,this.ymax=s,this.invM=i,this.leftAdjust=n,this.rightAdjust=o,this.leftBound=a,this.rightBound=h}incrRow(){this.x+=this.invM}getLeftCol(){return Math.max(this.x+this.leftAdjust,this.leftBound)}getRightCol(){return Math.min(this.x+this.rightAdjust,this.rightBound)}};const lt=[[0,0],[0,0],[0,0],[0,0]],gp=1e-6;let yp=class{constructor(t,e=null,s=t.lods[0].level,i=t.lods[t.lods.length-1].level){this.tileInfo=t,this.fullExtent=e,this.scales=[],this._infoByScale={},this._infoByLevel={};const n=t.lods.filter(a=>a.level>=s&&a.level<=i);this.minScale=n[0].scale,this.maxScale=n[n.length-1].scale;const o=this._lodInfos=n.map(a=>_p.create(t,a,e));n.forEach((a,h)=>{this._infoByLevel[a.level]=o[h],this._infoByScale[a.scale]=o[h],this.scales[h]=a.scale},this),this._wrap=t.isWrappable}get spatialReference(){return this.tileInfo.spatialReference}getLODInfoAt(t){return this._infoByLevel[typeof t=="number"?t:t.level]}getTileBounds(t,e,s=!1){B.set(e);const i=this._infoByLevel[B.level];return i?i.getTileBounds(t,B,s):t}getTileCoords(t,e,s=!1){B.set(e);const i=this._infoByLevel[B.level];return i?i.getTileCoords(t,B,s):t}getTileCoverage(t,e=192,s=!0,i="closest"){if(!s&&(t.scale>this.minScale||t.scale100)return null;let m=[];for(h=u;h=0;g--){const y=m[g];c=Math.min(c,y.getLeftCol()),l=Math.max(l,y.getRightCol())}if(c=Math.floor(c),l=Math.floor(l),h>=n.first[1]&&h<=n.last[1])if(a)if(n.size[0]n.last[0]||l=0;g--){const y=m[g];y.ymax>=h?y.incrRow():m.splice(g,1)}}return o}getTileParentId(t){B.set(t);const e=this._infoByLevel[B.level],s=this._lodInfos.indexOf(e)-1;return s<0?null:(this._getTileIdAtLOD(B,this._lodInfos[s],B),B.id)}getTileResolution(t){const e=this._infoByLevel[typeof t=="object"?t.level:t];return e?e.resolution:-1}getTileScale(t){const e=this._infoByLevel[t.level];return e?e.scale:-1}intersects(t,e){B.set(e);const s=this._infoByLevel[B.level],i=t.lodInfo;if(i.resolution>s.resolution){this._getTileIdAtLOD(B,i,B);const o=i.denormalizeCol(B.col,B.world);for(const a of t.spans)if(a.row===B.row&&a.colFrom<=o&&a.colTo>=o)return!0}if(i.resolution(_[0]=Math.min(_[0],m.row),_[1]=Math.max(_[1],m.row),_[2]=Math.min(_[2],m.colFrom),_[3]=Math.max(_[3],m.colTo),_),[1/0,-1/0,1/0,-1/0]),l=s.denormalizeCol(B.col,B.world),u=i.getColumnForX(s.getXForColumn(l)),d=i.getRowForY(s.getYForRow(B.row)),p=i.getColumnForX(s.getXForColumn(l+1))-1,f=i.getRowForY(s.getYForRow(B.row+1))-1;return!(u>c||pa||fo.row===B.row&&o.colFrom<=n&&o.colTo>=n)}normalizeBounds(t,e,s){if(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._wrap){const i=Jh(this.tileInfo.spatialReference),n=-s*(i.valid[1]-i.valid[0]);t[0]+=n,t[2]+=n}return t}getSmallestInfoForScale(t){const e=this.scales;if(this._infoByScale[t])return this._infoByScale[t];if(t>e[0])return this._infoByScale[e[0]];for(let s=1;se[s]+gp)return this._infoByScale[e[s-1]];return this._infoByScale[e[e.length-1]]}getClosestInfoForScale(t){const e=this.scales;return this._infoByScale[t]||(t=e.reduce((s,i)=>Math.abs(i-t)=0;s--)if(tr.push(e)),r}const nn=new Set,Ti=[],Ae=new Map,Oa=[0,0];let ce=class extends li{constructor(t){super(t),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:t,process:e,strategy:s}=this;this._queue=new Do({concurrency:t,process:(i,n)=>{const o=this._keyToItem.get(i);return e(o,{signal:n})},peeker:s==="scale-first"?i=>this._peekByScaleFirst(i):i=>this._peekByCenterFirst(i)})}destroy(){this.clear(),this._queue=To(this._queue)}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}abort(t){const e=typeof t=="string"?t:t.id;this._queue.abort(e)}clear(){this._queue.clear(),this._keyToItem.clear()}has(t){return typeof t=="string"?this._keyToItem.has(t):this._keyToItem.has(t.id)}isOngoing(t){const e=typeof t=="string"?t:t.id;return this.has(e)&&this._queue.isOngoing(e)}pause(){this._queue.pause()}push(t){const e=t.key.id;if(this._queue.has(e))return this._queue.get(e);const s=this._queue.push(e),i=()=>{this._keyToItem.delete(e)};return this._keyToItem.set(e,t),s.then(i,i),s}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView;let s=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;t.forEach(l=>{const u=this._keyToItem.get(l),d=this.tileInfoView.getTileScale(u.key);Ae.has(d)||(Ae.set(d,[]),s=Math.max(d,s),i=Math.min(d,i)),Ae.get(d).push(u.key),nn.add(d)});let n=this.state.scale;Ae.has(n)||(xp(Ti,nn),Ti.sort((l,u)=>l-u),n=Ti.reduce((l,u)=>Math.abs(u-n){const d=a.denormalizeCol(l.col,l.world),p=a.denormalizeCol(u.col,u.world);return Math.sqrt((h-d)*(h-d)+(c-l.row)*(c-l.row))-Math.sqrt((h-p)*(h-p)+(c-u.row)*(c-u.row))}),nn.clear(),Ae.clear(),o[0].id}_peekByCenterFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView,s=this.state.center;let i,n=Number.POSITIVE_INFINITY;return t.forEach(o=>{const a=this._keyToItem.get(o);e.getTileCoords(Oa,a.key);const h=kd(Oa,s);h=this._buffer.length){const e=this._roundToNearest((this._array.byteLength+t*this._buffer.BYTES_PER_ELEMENT)*wp,this._buffer.BYTES_PER_ELEMENT),s=new ArrayBuffer(e),i=new this._ctor(s);i.set(this._buffer,0),this._array=s,this._buffer=i,this._i16View=new Int16Array(this._array)}}ensureSize(t){this._ensureSize(t)}writeF32(t){this._ensureSize(1);const e=this._pos;return new Float32Array(this._array,4*this._pos,1)[0]=t,this._pos++,e}push(t){this._ensureSize(1);const e=this._pos;return this._buffer[this._pos++]=t,e}writeFixed(t){this._buffer[this._pos++]=t}setValue(t,e){this._buffer[t]=e}i1616Add(t,e,s){this._i16View[2*t]+=e,this._i16View[2*t+1]+=s}getValue(t){return this._buffer[t]}getValueF32(t){return new Float32Array(this._array,4*t,1)[0]}incr(t){if(this._buffer.lengthh.name==="pos"||h.name==="position");if(!a)throw new Error("InternalError: Unable to find position attribute");this.layout={...e,position:a},this._indices=new Qi(Uint32Array,i),this._vertices=new Qi(Uint32Array,n),this._metrics=new Qi(Uint32Array,0),this._metricCountOffset=this._metrics.push(0),this._strideInt=o,this._instanceId=t}serialize(t){const e=this._indices.buffer(),s=this._vertices.buffer(),i=this._metrics.length?this._metrics.buffer():null;return t.push(e,s),{instanceId:this._instanceId,layout:this.layout,indices:e,vertices:s,metrics:i}}get strideInt(){return this._strideInt}get vertexCount(){return this._vertices.length/this._strideInt}get indexCount(){return this._indices.length}get indexWriter(){return this._indices}get vertexWriter(){return this._vertices}get metricWriter(){return this._metrics}vertexEnsureSize(t){this._vertices.ensureSize(t)}indexEnsureSize(t){this._indices.ensureSize(t)}writeIndex(t){this._indices.push(t)}writeVertex(t){this._vertices.push(t)}writeVertexRegion(t){this._vertices.writeRegion(t)}writeVertexF32(t){this._vertices.writeF32(t)}writeMetric(t){this._metrics.incr(this._metricCountOffset),t.serialize(this._metrics)}},La=class{constructor(t,e=0){this._id=t,this._sizeHint=e,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._didEntityStart=!1,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._entities=new Qi(Uint32Array,this._sizeHint*mc.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],s=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:s},transferList:t}}vertexCount(){var t;return((t=this._current.writer)==null?void 0:t.vertexCount)??0}indexCount(){var t;return((t=this._current.writer)==null?void 0:t.indexCount)??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,s,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t}metricEnd(){const t=this._current.writer;this._current.metric.bounds.length&&t.writeMetric(this._current.metric)}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0),this._didEntityStart=!0}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){this._didEntityStart&&(this.entityRecordCount()===0?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset),this._didEntityStart=!1)}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,s=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=s}recordEnd(t=0){const e=this._current.vertexStart,s=this._current.writer.vertexCount-e;if(!s)return!1;const i=this._current.indexStart,n=this._current.writer.indexCount-i;return this._recordIndexStart=i,this._recordIndexCount=n,this._recordVertexStart=e,this._recordVertexCount=s,this._entities.incr(this._entityRecordCountOffset),Ks.write(this._entities,this._current.instanceId,this._current.textureKey,i,n,e,s,t),!0}copyLast(t,e){const s=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset),Ks.write(this._entities,this._current.instanceId,this._current.textureKey,this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,s,this._recordVertexCount,0);const i=this._current.writer.indexWriter,n=this._current.writer.vertexWriter,o=this._recordIndexStart+this._recordIndexCount,a=this._recordVertexCount;for(let m=this._recordIndexStart;m!==o;m++){const g=i.getValue(m);i.push(g+a)}const h=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,c=this._recordVertexStart*h,l=(this._recordVertexStart+this._recordVertexCount)*h;for(let m=c;m!==l;m++){const g=n.getValue(m);n.push(g)}const u=this._current.writer.layout.position,d=u.packPrecisionFactor??1,p=u.offset/Uint32Array.BYTES_PER_ELEMENT,f=t*d,_=e*d;for(let m=s*h;m<=n.length;m+=h)n.i1616Add(m+p,f,_)}copyLastFrom(t,e,s){const i=t._entities.getValue(t._entityIdIndex);if(i!==this._entities.getValue(this._entityIdIndex)){const g=t._entities.getValueF32(t._entitySortKeyIndex);this.entityStart(i,g)}this.recordStart(t._current.instanceId,t._current.writer.layout,t._current.textureKey);const n=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,o=this._current.vertexStart,a=t._current.vertexStart-o,h=this._current.writer.indexWriter,c=this._current.writer.vertexWriter,l=t._current.writer.indexWriter,u=t._current.writer.vertexWriter;for(let g=t._current.indexStart;g!==l.length;g++){const y=l.getValue(g);h.push(y-a)}for(let g=t._current.vertexStart*n;g!==u.length;g++){const y=u.getValue(g);c.push(y)}const d=this._current.writer.layout.position,p=d.packPrecisionFactor??1,f=d.offset/Uint32Array.BYTES_PER_ELEMENT,_=e*p,m=s*p;for(let g=o*n;g<=c.length;g+=n)c.i1616Add(g+f,_,m);this.recordEnd()}_getVertexWriter(t,e){const s=this._instanceIdToVertexData;return s.has(t)||s.set(t,new Sp(t,e,this._sizeHint)),s.get(t)}};function Pp(r,t,e,s){const i=r.clone(),n=1<=n?(i.col=o-n,i.world+=1):i.col=o,i.row=a,i}const Or=1,Bo=2,Lr=4,Go=8,Vo=16,Dr=32,Uo=64,Rr=128;function on(r){switch(r){case Or:case Go:case Dr:return-1;case Bo:case Uo:return 0;case Lr:case Vo:case Rr:return 1}}function an(r){switch(r){case Or:case Bo:case Lr:return-1;case Go:case Vo:return 0;case Dr:case Uo:case Rr:return 1}}const Da=Or|Go|Dr,Ra=Lr|Vo|Rr,Na=Or|Bo|Lr,Ba=Dr|Uo|Rr;let Mp=class{constructor(t,e,s,i=0){this.tileKey=t,this._bufferingEnabled=e,this._sizeHint=i,this._meshes={self:new La(this.id,this._sizeHint),neighbors:new Array},this._currentRecordOverlaps=0,this._currentEntityOverlaps=0,this._copyBufferedDataIntoSelf=s&&this._bufferingEnabled&&t.level===0}get id(){return this.tileKey.id}vertexCount(){return this._meshes.self.vertexCount()}indexCount(){return this._meshes.self.indexCount()}indexEnsureSize(t){this._meshes.self.indexEnsureSize(t)}entityStart(t,e=t){this._currentEntityOverlaps=0,this._meshes.self.entityStart(t,e)}entityRecordCount(){return this._meshes.self.entityRecordCount()}entityEnd(){if(this._meshes.self.entityEnd(),this._bufferingEnabled){if(this._copyBufferedDataIntoSelf)return;for(let t=0;t<8;t++){const e=1<{const o=i.serialize(),a=1<=V-n?Da:Ra|Da)|(e<0+o?Ba:e>=V-o?Na:Ba|Na));this._currentRecordOverlaps|=a}_copyIntoNeighbors(){for(let t=0;t<8;t++){const e=1<0){const i=this.getBackgroundFill();if(i)return[...i,...s]}return s}getSortKey(t,e){return 0}doMatch(t,e){return null}async fetchResources(t,e){}},Tp=class xc extends Te{static async fromDictionaryRenderer(t,e){return new xc(t,e)}constructor(t,e){super(),this._context=t,this._schema=e,this._hashToGroup=new Map}get fieldMap(){return this._schema.fieldMap}async fetchResources(t,e){const s=e.getCursor(),i=[];for(;s.next();)i.push(this._updateMeshWriterGroup(t,s));await Promise.all(i)}match(t,e){const s=t.getAttributeHash();return this._hashToGroup.get(s)}async _updateMeshWriterGroup(t,e){const s=e.readLegacyFeatureForDisplay(),i=e.getAttributeHash();if(this._hashToGroup.has(i))return;this._hashToGroup.set(i,null);const n=await t.fetchDictionaryResourceImmediate({type:"dictionary-request",feature:s});if(!n)return;const o=await this._context.createMeshWriters(n.meshes);this._hashToGroup.set(i,o)}},Cp=class bc extends Te{constructor(t,e){super(),this._intervals=[],this._isMaxInclusive=e,this._field=t}static async fromIntervalSchema(t,e){const s=await t.storage.createComputedField(e),i=new bc(s,e.isMaxInclusive);await Promise.all(e.intervals.map(async a=>{const h=await t.createMeshWriters(a.meshes);i.add(a,h)}));const n=await t.createMeshWriters(e.defaultSymbol);i.setDefault(n);const o=await t.createMeshWriters(e.backgroundFill);return i.setBackgroundFill(o),i}add(t,e){this._intervals.push({interval:t,result:e}),this._intervals.sort((s,i)=>s.interval.min-i.interval.min)}size(){return super.size()+this._intervals.length}doMatch(t,e){var i;const s=(i=this._field)==null?void 0:i.read(t,e);if(s==null||isNaN(s)||s===1/0||s===-1/0)return null;for(let n=0;n=o.min,c=this._isMaxInclusive?s<=o.max:s{const o=await t.createMeshWriters(n.meshes);return{minScale:n.minScale,maxScale:n.maxScale,meshes:o,expression:null,where:await t.storage.createWhereClause(n.where)}}),i=await Promise.all(s);return new wc(i)}constructor(t){super(),this._labels=t}match(t,e){if(!this._labels.length)return null;const s=this._getLabels(e.$view.scale),i=[];for(const n of s)n.where&&!n.where(t)||i.push(...n.meshes);return i}_getLabels(t){return this._labels.filter(e=>this._validForTileScale(e,t))}_validForTileScale(t,e){const s=e-e/4,i=e+e/2;return(!t.minScale||t.minScale>=s)&&(!t.maxScale||t.maxScale<=i)}},Ep=class vc extends Te{constructor(t,e){super(),this._defaultSymbolSortKey=0,this._nullResult=null,this._resultsMap=new Map,this._fields=[],this._fields=t,this._separator=e||""}static async fromMatcherSchema(t,e){const s=e.expression?[t.storage.createComputedField({expression:e.expression})]:[e.field?t.storage.createComputedField({field:e.field}):null,e.field2?t.storage.createComputedField({field:e.field2}):null,e.field3?t.storage.createComputedField({field:e.field3}):null],i=(await Promise.all(s)).filter(h=>!!h),n=new vc(i,e.fieldDelimiter),o=await t.createMeshWriters(e.defaultSymbol);n.setDefault(o);const a=await t.createMeshWriters(e.backgroundFill);return n.setBackgroundFill(a),await Promise.all(e.map.map(async(h,c)=>{const l=await t.createMeshWriters(h.symbol);h.value===""?n.setNullResult(l):n.add(h.value,l,c+1)})),n}setNullResult(t){this._nullResult=t}getSortKey(t,e){const s=this._getValueFromFields(t,e);if(s==null||s===""||s==="")return 0;const i=this._resultsMap.get(s.toString());return i?i.sortKey:this._defaultSymbolSortKey}add(t,e,s){this._resultsMap.set(t.toString(),{meshWriters:e,sortKey:s}),this._defaultSymbolSortKey=Math.max(this._defaultSymbolSortKey,s+1)}size(){return super.size()+this._resultsMap.size}doMatch(t,e){var n;const s=this._getValueFromFields(t,e);if(this._nullResult!==null&&(s==null||s===""||s===""))return this._nullResult;if(s==null)return null;const i=s.toString();return(n=this._resultsMap.get(i))==null?void 0:n.meshWriters}_getValueFromFields(t,e){const s=[];for(const i of this._fields){const n=i.read(t,e);n==null||n===""?s.push(""):s.push(n)}return s.join(this._separator)}};async function Qs(r,t){switch(t.type){case"simple":case"heatmap":case"dot-density":case"pie-chart":return Te.from(r,t);case"interval":return Cp.fromIntervalSchema(r,t);case"dictionary":return Tp.fromDictionaryRenderer(r,t);case"label":return kp.fromLabelSchema(r,t);case"map":return Ep.fromMatcherSchema(r,t);case"subtype":return Fp.fromSubtypes(r,t);case"cluster":return Ap.fromClusterSchema(r,t);default:throw new Error("Impl")}}let Fp=class Ic extends Te{constructor(t,e){super(),this._subMatchers=t,this._subtypeField=e}static async fromSubtypes(t,e){const s=new Map,i=[];for(const n in e.renderers){const o=parseInt(n,10),a=Qs(t,e.renderers[n]).then(h=>s.set(o,h));i.push(a)}return await Promise.all(i),new Ic(s,e.subtypeField)}match(t,e){const s=t.readAttribute(this._subtypeField),i=this._subMatchers.get(s);return i?i.match(t,e):null}},Ap=class Sc extends Te{static async fromClusterSchema(t,e){const[s,i]=await Promise.all([Qs(t,e.feature),Qs(t,e.cluster)]);return new Sc(s,i)}constructor(t,e){super(),this._featureMatcher=t,this._clusterMatcher=e}match(t,e){return t.readAttribute("cluster_count")===1?this._featureMatcher.match(t,e):this._clusterMatcher.match(t,e)}},zp=class Pc extends $p{static async create(t,e){const s=await Qs(t,e.symbology),i=e.labels?await Qs(t,e.labels):null;return new Pc(s,i)}constructor(t,e){super(),this._symbology=t,this._labels=e}destroy(){}async enqueueMatcherRequests(t,e){var s;await Promise.all([this._symbology.fetchResources(t,e),(s=this._labels)==null?void 0:s.fetchResources(t,e)])}enqueueWriterRequests(t,e,s){const i=this._symbology.match(e,s);if(i){for(const n of i)n.enqueueRequest(t,e,s);if(this._labels){const n=this._labels.match(e,s);if(!n)return;for(const o of n)o.enqueueRequest(t,e,s)}}}write(t,e,s,i,n){const o=this._symbology.match(s,i);if(o){for(const a of o)a.write(t,e,s,i,n);if(t.entityRecordCount()>=1&&this._labels){const a=this._labels.match(s,i);if(!a)return;for(const h of a)h.setReferences(o),h.write(t,e,s,i,n)}}}getSortKey(t,e){return this._symbology.getSortKey(t,e)}};var Ga,Mc={exports:{}};(Ga=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"])!==void 0&&(Mc.exports=Ga);const Op=No(Mc.exports);var Va,$c={exports:{}};Va=$c,function(r){var t=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"];t!==void 0&&(Va.exports=t)}();const Ua=No($c.exports);var Tc={exports:{}};(function(r){(function(t){var e=function(){return["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT","textureSize","texelFetch"]}();e!==void 0&&(r.exports=e)})()})(Tc);const Lp=No(Tc.exports),Dp=()=>_t.getLogger("esri.views.2d.engine.webgl.Utils");function Rp(r){switch(r){case ge.UNSIGNED_BYTE:return Uint8Array;case ge.UNSIGNED_SHORT_4_4_4_4:return Uint16Array;case ge.FLOAT:return Float32Array;default:return void Dp().error(new rt("webgl-utils",`Unable to handle type ${r}`))}}function Np(r,t,e){const s=new Nd(t.width,t.height);return s.dataType=t.dataType,t.depth&&(s.depth=t.depth),t.flipped&&(s.flipped=t.flipped),t.hasMipmap&&(s.hasMipmap=t.hasMipmap),s.internalFormat=t.internalFormat,t.isImmutable&&(s.isImmutable=t.isImmutable),t.isOpaque&&(s.isOpaque=t.isOpaque),t.maxAnisotropy&&(s.maxAnisotropy=t.maxAnisotropy),s.pixelFormat=t.pixelFormat,t.preMultiplyAlpha&&(s.preMultiplyAlpha=t.preMultiplyAlpha),t.samplingMode&&(s.samplingMode=t.samplingMode),t.target&&(s.target=t.target),s.uniform=t.uniform,t.unpackAlignment&&(s.unpackAlignment=t.unpackAlignment),t.wrapMode&&(s.wrapMode=t.wrapMode),new Bd(r,s,e)}function Bp(r){return"url"in r&&"urlHash"in r?{...r,url:""}:r}let Gp=class{},Vp=class extends Gp{constructor(t){super(),this._fetcher=t,this._controller=new AbortController,this._pendingIds=new Set,this._pendingRequests=[],this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(t){const e=Bp(t.resource),s=ui(JSON.stringify(e));return this._pendingIds.has(s)||(this._pendingIds.add(s),this._pendingRequests.push({...t,resourceId:s})),s}async fetchEnqueuedResources(){const t=this._pendingRequests;this._pendingIds.clear(),this._pendingRequests=[];const e=await this._fetcher.fetch(t,this._abortOptions);for(let s=0;s80*n){l=d=t[0+e*n],u=p=t[1+e*n];for(let m=n;m0)for(let h=s;h=s;h-=n)a=qa(h+t*n,r[h+t*n],r[h+1+t*n],a);return a&&xe(a,a.next)&&(ei(a),a=a.next),a}function Js(r,t=r){if(!r)return r;let e,s=r;do if(e=!1,s.steiner||!xe(s,s.next)&&it(s.prev,s,s.next)!==0)s=s.next;else{if(ei(s),s=t=s.prev,s===s.next)break;e=!0}while(e||s!==t);return t}function ti(r,t,e,s,i,n,o,a){if(!r)return;!a&&n&&(r=kc(r,s,i,n));let h=r;for(;r.prev!==r.next;){const c=r.prev,l=r.next;if(n?jp(r,s,i,n):qp(r))t.push(c.index/e+o),t.push(r.index/e+o),t.push(l.index/e+o),ei(r),r=l.next,h=l.next;else if((r=l)===h){a?a===1?ti(r=tf(r,t,e,o),t,e,s,i,n,o,2):a===2&&ef(r,t,e,s,i,n,o):ti(Js(r),t,e,s,i,n,o,1);break}}}function qp(r){const t=r.prev,e=r,s=r.next;if(it(t,e,s)>=0)return!1;let i=r.next.next;const n=i;let o=0;for(;i!==r.prev&&(o===0||i!==n);){if(o++,qe(t.x,t.y,e.x,e.y,s.x,s.y,i.x,i.y)&&it(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function jp(r,t,e,s){const i=r.prev,n=r,o=r.next;if(it(i,n,o)>=0)return!1;const a=i.xn.x?i.x>o.x?i.x:o.x:n.x>o.x?n.x:o.x,l=i.y>n.y?i.y>o.y?i.y:o.y:n.y>o.y?n.y:o.y,u=An(a,h,t,e,s),d=An(c,l,t,e,s);let p=r.prevZ,f=r.nextZ;for(;p&&p.z>=u&&f&&f.z<=d;){if(p!==r.prev&&p!==r.next&&qe(i.x,i.y,n.x,n.y,o.x,o.y,p.x,p.y)&&it(p.prev,p,p.next)>=0||(p=p.prevZ,f!==r.prev&&f!==r.next&&qe(i.x,i.y,n.x,n.y,o.x,o.y,f.x,f.y)&&it(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==r.prev&&p!==r.next&&qe(i.x,i.y,n.x,n.y,o.x,o.y,p.x,p.y)&&it(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==r.prev&&f!==r.next&&qe(i.x,i.y,n.x,n.y,o.x,o.y,f.x,f.y)&&it(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function qa(r,t,e,s){const i=br.create(r,t,e);return s?(i.next=s.next,i.prev=s,s.next.prev=i,s.next=i):(i.prev=i,i.next=i),i}function ei(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Yp(r){let t=r,e=r;do(t.x=e.next.y&&e.next.y!==e.y){const d=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(d<=s&&d>o){if(o=d,d===s){if(i===e.y)return e;if(i===e.next.y)return e.next}n=e.x=e.x&&e.x>=h&&s!==e.x&&qe(in.x)&&si(e,r)&&(n=e,u=l)),e=e.next;return n}function kc(r,t,e,s){let i;for(;i!==r;i=i.next){if(i=i||r,i.z===null&&(i.z=An(i.x,i.y,t,e,s)),i.prev.next!==i||i.next.prev!==i)return i.prev.next=i,i.next.prev=i,kc(r,t,e,s);i.prevZ=i.prev,i.nextZ=i.next}return r.prevZ.nextZ=null,r.prevZ=null,Zp(r)}function Zp(r){let t,e=1;for(;;){let s,i=r;r=null,t=null;let n=0;for(;i;){n++,s=i;let o=0;for(;o0||a>0&&s;){let h;o===0?(h=s,s=s.nextZ,a--):a!==0&&s?i.z<=s.z?(h=i,i=i.nextZ,o--):(h=s,s=s.nextZ,a--):(h=i,i=i.nextZ,o--),t?t.nextZ=h:r=h,h.prevZ=t,t=h}i=s}if(t.nextZ=null,e*=2,n<2)return r}}function it(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function Ec(r,t,e,s){return!!(xe(r,t)&&xe(e,s)||xe(r,s)&&xe(e,t))||it(r,t,e)>0!=it(r,t,s)>0&&it(e,s,r)>0!=it(e,s,t)>0}function Kp(r,t){let e=r;do{if(e.index!==r.index&&e.next.index!==r.index&&e.index!==t.index&&e.next.index!==t.index&&Ec(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function Qp(r,t,e,s,i,n){let o=0;for(let a=s,h=i-n;a=0&&(r-o)*(s-a)-(e-o)*(t-a)>=0&&(e-o)*(n-a)-(i-o)*(s-a)>=0}function si(r,t){return it(r.prev,r,r.next)<0?it(r,t,r.next)>=0&&it(r,r.prev,t)>=0:it(r,t,r.prev)<0||it(r,r.next,t)<0}function An(r,t,e,s,i){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-e)*i)|r<<8))|r<<4))|r<<2))|r<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-s)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function xe(r,t){return r.x===t.x&&r.y===t.y}function Jp(r,t){return r.x-t.x}function tf(r,t,e,s){let i=r;do{const n=i.prev,o=i.next.next;!xe(n,o)&&Ec(n,i,i.next,o)&&si(n,o)&&si(o,n)&&(t.push(n.index/e+s),t.push(i.index/e+s),t.push(o.index/e+s),ei(i),ei(i.next),i=r=o),i=i.next}while(i!==r);return i}function ef(r,t,e,s,i,n,o){let a=r;do{let h=a.next.next;for(;h!==a.prev;){if(a.index!==h.index&&sf(a,h)){let c=Fc(a,h);return a=Js(a,a.next),c=Js(c,c.next),ti(a,t,e,s,i,n,o,0),void ti(c,t,e,s,i,n,o,0)}h=h.next}a=a.next}while(a!==r)}function sf(r,t){return r.next.index!==t.index&&r.prev.index!==t.index&&!Kp(r,t)&&si(r,t)&&si(t,r)&&rf(r,t)}function rf(r,t){let e=r,s=!1;const i=(r.x+t.x)/2,n=(r.y+t.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&i<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(s=!s),e=e.next;while(e!==r);return s}function Fc(r,t){const e=br.create(r.index,r.x,r.y),s=br.create(t.index,t.x,t.y),i=r.next,n=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,s.next=e,e.prev=s,n.next=s,s.prev=n,s}let br=class Ac{constructor(){this.index=0,this.x=0,this.y=0,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}static create(t,e,s){const i=On0))break;u+=g,d.push(a+l),l+=m}const p=o.length;Up(o,e,a,a+l,d,2,n);const f=af(o,e,p,o.length,n),_=Math.abs(u);if(Math.abs((f-_)/Math.max(1e-7,_))>of)return o.length=0,!1;h=c,a+=l}return!0}function cf(r){const{coords:t,lengths:e}=r,{buffer:s}=Gd(t,e);return s}function lf(r,t,e){let s=0;for(let i=0;ie||he)return!0}s+=n}return!1}function zc(r,t){if(r==null)return null;if(!lf(r,-128,V+128))return r;le.setPixelMargin(t),le.reset(yr.Polygon);let e=0;for(let o=0;oi||li){o=!0;continue}h.push({x:c,y:l})}let u=!1;for(;r.nextPoint();)if(c=r.x,l=r.y,o)e.lineTo(c,l);else{if(ci||li){u=!0;break}h.push({x:c,y:l})}if(u)o=!0;else{if(o){const d=e.resultWithStarts();if(d)for(const p of d)n.push(p)}else n.push({line:h,start:0});a=r.nextPath(),o=!1}}return n=n.filter(h=>h.line.length>1),n.length===0?null:n}le.setExtent(V),Ln.setExtent(V);let N=class{static fromOptimized(t,e,s=!1,i=!1,n=1){return new Dn().initialize(t,e,s,i,n)}static fromJSON(t,e=!1,s=!1){const[i,n]=Ya(t);return new Rn().initialize(i,n,e,s,1)}static fromOptimizedCIM(t,e,s=!1,i=!1,n=1){return new Wa().initialize(t,e,s,i,n)}static fromJSONCIM(t,e=!1,s=!1,i=1){const[n,o]=Ya(t);return new Xa().initialize(n,o,e,s,i)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return new Dn().initialize(new R,t,e,s,i)}static createEmptyJSON(t,e=!1,s=!1){return new Rn().initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return new Wa().initialize(new R,t,e,s,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return new Xa().initialize([],t,e,s,i)}asJSON(){const t=Qe(this);return this.geometryType==="esriGeometryEnvelope"?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:this.geometryType==="esriGeometryMultipoint"?{points:t.flat()}:this.geometryType==="esriGeometryPoint"?{x:t[0][0][0],y:t[0][0][1]}:this.geometryType==="esriGeometryPolygon"?{rings:t}:{paths:t}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,n=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+n),-.5*s}invertY(){this.yFactor*=-1}},Dn=class Oc extends N{constructor(){super(...arguments),this._end=-1}initialize(t,e,s,i,n){return this.hasZ=s,this.hasM=i,this.geometryType=e,this._stride=2+Number(s)+Number(i),this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=n,this}reset(){this.initialize(this._geometry,this.geometryType,this.hasZ,this.hasM,this.yFactor)}seekPath(t){if(t>=0&&tt)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1)&&(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,!0)}prevPath(){return!(this.pathIndex<=0)&&(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,!0)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let n=this._pathOffset+e;nt+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}};function df(r){const t=[r.x,r.y];return r.z&&t.push(r.z),r.m&&t.push(r.m),t}function Ya(r){return Vu(r)?[r.rings,"esriGeometryPolygon"]:Uu(r)?[r.paths,"esriGeometryPolyline"]:qu(r)?[[r.points],"esriGeometryMultipoint"]:tc(r)?[[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]],"esriGeometryEnvelope"]:ju(r)?[[[df(r)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}let Rn=class Lc extends N{initialize(t,e,s,i,n){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=n,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t=0&&t=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;it.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}};const Ci=4,ki=1;let Wa=class Dc extends Dn{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(o=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=new Dc().initialize(this._geometry.clone(),this.geometryType,this.hasZ,this.hasM,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}},Xa=class Rc extends Rn{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n)}clone(){return new Rc().initialize(ko(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][Ci]=ki}getControlPoint(){return this._paths[this.pathIndex][this._pointIndex][Ci]===ki}setControlPointAt(t){this._paths[this.pathIndex][t][Ci]=ki}getControlPointAt(t){return this._paths[this.pathIndex][t][Ci]===ki}};const pf=512;let Rt,Ha=class{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}};function Nr(r,t){Rt||(Rt=new Ro(0,0,0,1));const e=r.geometryType==="esriGeometryPolygon",s=e?yr.Polygon:yr.LineString,i=e?3:2;let n,o;for(Rt.reset(s),Rt.setPixelMargin(t+1),Rt.setExtent(pf);r.nextPath();)if(!(r.pathSize1&&y>0&&c>0&&(a*m+h*g)/y/c<=this._maxCosAngle&&t.setControlPointAt(p-1),p===1&&(l=m,u=g,d=y),y>0&&(i=f,n=_,a=m,h=g,c=y)}this._isClosed&&c>0&&d>0&&(a*l+h*u)/d/c<=this._maxCosAngle&&t.setControlPointAt(0)}}},qo=class{constructor(){this.setIdentity()}getAngle(){return(this.rz==null||this.rz===0&&this.rzCos!==1&&this.rzSin!==0)&&(this.rz=Math.atan2(this.rzSin,this.rzCos)),this.rz}setIdentity(){this.tx=0,this.ty=0,this.tz=0,this.s=1,this.rx=0,this.ry=0,this.rz=0,this.rzCos=1,this.rzSin=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rzCos=t,this.rzSin=e}setRotate(t){this.rz=t,this.rzCos=void 0,this.rzSin=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}};function hn(r,t){r[4]=t}let pi=class{constructor(t,e=!0,s=!0,i=0){this.isClosed=!1,this.geometryCursor=null,this.geometryCursor=!e&&t.geometryType==="esriGeometryPolygon"||!s&&t.geometryType==="esriGeometryPolyline"?null:t,this.geomUnitsPerPoint=i,this.iterateMultiPath=!1,this.iteratePath=!1,this.internalPlacement=new qo}next(){if(!this.geometryCursor)return null;const t=this.processMultiPath(this.geometryCursor);return this.iterateMultiPath&&t||(this.geometryCursor=null),t}processMultiPath(t){for(;this.iteratePath||t.pathIndex0?[o/h,a/h]:[1,0]}getSegAngleCS(t,e){const[[s,i],[n,o]]=t;return this.getAngleCS(s,i,n,o,e)}cut(t,e,s,i,n,o){return[n<=0?[t,e]:this.getCoord2D(t,e,s,i,n),o>=1?[s,i]:this.getCoord2D(t,e,s,i,o)]}getSubCurve(t,e,s){const i=N.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(i,t,e,s)?i:null}appendSubCurve(t,e,s,i){t.startPath(),e.seekPathStart();let n=0,o=!0;if(!e.nextPoint())return!1;let a=e.x,h=e.y;for(;e.nextPoint();){const c=this.getLength(a,h,e.x,e.y);if(c!==0){if(o){if(n+c>s){const l=(s-n)/c;let u=1,d=!1;n+c>=i&&(u=(i-n)/c,d=!0);const p=this.cut(a,h,e.x,e.y,l,u);if(p&&t.pushPoints(p),d)break;o=!1}}else{if(n+c>i){const l=this.cut(a,h,e.x,e.y,0,(i-n)/c);l&&t.pushPoint(l[1]);break}t.pushXY(e.x,e.y)}n+=c,a=e.x,h=e.y}else a=e.x,h=e.y}return!0}getCIMPointAlong(t,e){if(!t.nextPoint())return null;let s,i,n,o,a=0;for(s=t.x,i=t.y;t.nextPoint();s=n,i=o){n=t.x,o=t.y;const h=this.getLength(s,i,n,o);if(h!==0){if(a+h>e){const c=(e-a)/h;return this.getCoord2D(s,i,n,o,c)}a+=h}}return null}offset(t,e,s,i,n){if(!t||t.length<2)return null;let o=0,a=t[o++],h=o;for(;o=0==e<=0){if(g<1){const y=[f[0]-_[0],f[1]-_[1]];this.normalize(y);const b=Math.sqrt((1+g)/2);if(b>1/i){const v=-Math.abs(e)/b;l.push([u[0]-y[0]*v,u[1]-y[1]*v])}}}else switch(s){case me.Mitered:{const y=Math.sqrt((1+g)/2);if(y>0&&1/y0){const b=1/y;let v=b;for(let S=1;S0){const n=N.createEmptyOptimizedCIM(t.geometryType),o=Qe(t)[0],a=this._curveHelper.offset(o,this._size,me.Rounded,4,this._offsetFlattenError);if(a)return n.pushPath(a),n}else if(this._size<0){const n=t.asJSON();if(Math.min(n.xmax-n.xmin,n.ymax-n.ymin)+2*this._size>0)return N.fromJSONCIM({xmin:n.xmin-this._size,xmax:n.xmax+this._size,ymin:n.ymin-this._size,ymax:n.ymax+this._size})}}const e=this._geometryEngine;if(e==null)return null;const s=this._tileKey?Nr(t,this._maxInflateSize):t;if(!s)continue;const i=e.buffer(ft.WebMercator,s.asJSON(),this._size,1);return i?N.fromJSONCIM(i):null}return null}},Vc=class ws{static local(){return ws.instance===null&&(ws.instance=new ws),ws.instance}execute(t,e,s,i,n){return new xf(t,e,s)}};Vc.instance=null;let xf=class{constructor(t,e,s){this._defaultPointSize=20,this._inputGeometries=t,this._geomUnitsPerPoint=s,this._rule=e.rule??z.FullGeometry,this._defaultSize=this._defaultPointSize*s}next(){let t;for(;t=this._inputGeometries.next();){const e=this._processGeom(Qe(t));if(e!=null&&e.length)return N.fromJSONCIM({paths:e})}return null}_clone(t){return[t[0],t[1]]}_mid(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}_mix(t,e,s,i){return[t[0]*e+s[0]*i,t[1]*e+s[1]*i]}_add(t,e){return[t[0]+e[0],t[1]+e[1]]}_add2(t,e,s){return[t[0]+e,t[1]+s]}_sub(t,e){return[t[0]-e[0],t[1]-e[1]]}_dist(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}_norm(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}_normalize(t,e=1){const s=e/this._norm(t);t[0]*=s,t[1]*=s}_leftPerpendicular(t){const e=-t[1],s=t[0];t[0]=e,t[1]=s}_leftPerp(t){return[-t[1],t[0]]}_rightPerpendicular(t){const e=t[1],s=-t[0];t[0]=e,t[1]=s}_rightPerp(t){return[t[1],-t[0]]}_dotProduct(t,e){return t[0]*e[0]+t[1]*e[1]}_crossProduct(t,e){return t[0]*e[1]-t[1]*e[0]}_rotateDirect(t,e,s){const i=t[0]*e-t[1]*s,n=t[0]*s+t[1]*e;t[0]=i,t[1]=n}_makeCtrlPt(t){const e=[t[0],t[1]];return hn(e,1),e}_addAngledTicks(t,e,s,i){const n=this._sub(s,e);this._normalize(n);const o=this._crossProduct(n,this._sub(i,e));let a;a=o>0?this._rightPerp(n):this._leftPerp(n);const h=Math.abs(o)/2,c=[];c.push([e[0]+(a[0]-n[0])*h,e[1]+(a[1]-n[1])*h]),c.push(e),c.push(s),c.push([s[0]+(a[0]+n[0])*h,s[1]+(a[1]+n[1])*h]),t.push(c)}_addBezier2(t,e,s,i,n){if(n--==0)return void t.push(i);const o=this._mid(e,s),a=this._mid(s,i),h=this._mid(o,a);this._addBezier2(t,e,o,h,n),this._addBezier2(t,h,a,i,n)}_addBezier3(t,e,s,i,n,o){if(o--==0)return void t.push(n);const a=this._mid(e,s),h=this._mid(s,i),c=this._mid(i,n),l=this._mid(a,h),u=this._mid(h,c),d=this._mid(l,u);this._addBezier3(t,e,a,l,d,o),this._addBezier3(t,d,u,c,n,o)}_add90DegArc(t,e,s,i,n){const o=n??this._crossProduct(this._sub(s,e),this._sub(i,e))>0,a=this._mid(e,s),h=this._sub(a,e);o?this._leftPerpendicular(h):this._rightPerpendicular(h),a[0]+=h[0],a[1]+=h[1],this._addBezier3(t,e,this._mix(e,.33333,a,.66667),this._mix(s,.33333,a,.66667),s,4)}_addArrow(t,e,s){const i=e[0],n=e[1],o=e[e.length-1],a=this._sub(i,n),h=this._norm(a);this._normalize(a);const c=Math.abs(this._crossProduct(a,this._sub(o,n)));let l=this._dotProduct(a,this._sub(o,n));l<.05*h?l=.05*h:l>.95*h&&(l=.95*h);const u=.5*c,d=this._leftPerp(a),p=[n[0]+a[0]*l,n[1]+a[1]*l],f=e.length-1,_=[];_.push(s?[-d[0],-d[1]]:d);let m=[-a[0],-a[1]];for(let g=1;g0;g--)t.push([e[g][0]+_[g][0]*u,e[g][1]+_[g][1]*u]);t.push([p[0]+_[0][0]*u,p[1]+_[0][1]*u]),t.push([p[0]+_[0][0]*c,p[1]+_[0][1]*c]),t.push(i),t.push([p[0]-_[0][0]*c,p[1]-_[0][1]*c]),t.push([p[0]-_[0][0]*u,p[1]-_[0][1]*u]);for(let g=1;g<_.length;g++)t.push([e[g][0]-_[g][0]*u,e[g][1]-_[g][1]*u])}_cp2(t,e,s){return t.length>=2?t[1]:this._add2(t[0],e*this._defaultSize,s*this._defaultSize)}_cp3(t,e,s,i){if(t.length>=3)return t[2];const n=this._mix(t[0],1-s,e,s),o=this._sub(e,t[0]);return this._normalize(o),this._rightPerpendicular(o),[n[0]+o[0]*i*this._defaultSize,n[1]+o[1]*i*this._defaultSize]}_arrowPath(t){if(t.length>2)return t;const e=t[0],s=this._cp2(t,-4,0),i=this._sub(e,s);this._normalize(i);const n=this._rightPerp(i);return[e,s,[e[0]+(n[0]-i[0])*this._defaultSize,e[1]+(n[1]-i[1])*this._defaultSize]]}_arrowLastSeg(t){const e=t[0],s=this._cp2(t,-4,0);let i;if(t.length>=3)i=t[t.length-1];else{const n=this._sub(e,s);this._normalize(n);const o=this._rightPerp(n);i=[e[0]+(o[0]-n[0])*this._defaultSize,e[1]+(o[1]-n[1])*this._defaultSize]}return[s,i]}_processGeom(t){if(!t)return null;const e=[];for(const s of t){if(!s||s.length===0)continue;const i=s.length;let n=s[0];switch(this._rule){case z.PerpendicularFromFirstSegment:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,4),h=[];h.push(a),h.push(this._mid(n,o)),e.push(h);break}case z.ReversedFirstSegment:{const o=this._cp2(s,0,-1);e.push([o,n]);break}case z.PerpendicularToSecondSegment:{if(s.length<3)return[];const o=this._cp2(s,-4,1),a=this._cp3(s,o,.882353,-1.94),h=[];h.push(this._mid(o,a)),h.push(n),e.push(h);break}case z.SecondSegmentWithTicks:{if(s.length<3)return[];const o=this._cp2(s,-4,1),a=this._cp3(s,o,.882353,-1.94),h=this._sub(a,o);let c;c=this._crossProduct(h,this._sub(n,o))>0?this._rightPerp(h):this._leftPerp(h);const l=[];l.push([o[0]+(c[0]-h[0])/3,o[1]+(c[1]-h[1])/3]),l.push(o),l.push(a),l.push([a[0]+(c[0]+h[0])/3,a[1]+(c[1]+h[1])/3]),e.push(l);break}case z.DoublePerpendicular:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,3),h=this._mid(n,o),c=this._sub(h,a);this._normalize(c);const l=this._crossProduct(c,this._sub(n,a));this._leftPerpendicular(c);const u=[];u.push(n),u.push([a[0]+c[0]*l,a[1]+c[1]*l]),e.push(u);const d=[];d.push([a[0]-c[0]*l,a[1]-c[1]*l]),d.push(o),e.push(d);break}case z.OppositeToFirstSegment:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,3),h=this._mid(n,o),c=this._sub(h,a);this._normalize(c);const l=this._crossProduct(c,this._sub(n,a));this._leftPerpendicular(c);const u=[];u.push([a[0]+c[0]*l,a[1]+c[1]*l]),u.push([a[0]-c[0]*l,a[1]-c[1]*l]),e.push(u);break}case z.TriplePerpendicular:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,4),h=this._mid(n,o),c=this._sub(h,a);this._normalize(c);const l=this._crossProduct(c,this._sub(n,a));this._leftPerpendicular(c);const u=[];u.push([a[0]+c[0]*l*.8,a[1]+c[1]*l*.8]),u.push([h[0]+.8*(n[0]-h[0]),h[1]+.8*(n[1]-h[1])]),e.push(u),e.push([a,h]);const d=[];d.push([a[0]-c[0]*l*.8,a[1]-c[1]*l*.8]),d.push([h[0]+.8*(o[0]-h[0]),h[1]+.8*(o[1]-h[1])]),e.push(d);break}case z.HalfCircleFirstSegment:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,4),h=this._mid(n,o);let c=this._sub(o,n);const l=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),d=Math.sqrt((1+l)/2),p=Math.sqrt((1-l)/2),f=[];let _;this._crossProduct(c,this._sub(a,n))>0?(f.push(n),c=this._sub(n,h),_=o):(f.push(o),c=this._sub(o,h),_=n),this._rotateDirect(c,d,p),c[0]/=d,c[1]/=d;for(let m=1;m<=18;m++)f.push(this._add(h,c)),this._rotateDirect(c,l,u);f.push(_),e.push(f);break}case z.HalfCircleSecondSegment:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,1,-1);let h=this._sub(n,o);this._normalize(h);const c=this._crossProduct(h,this._sub(a,o))/2;this._leftPerpendicular(h);const l=[o[0]+h[0]*c,o[1]+h[1]*c];h=this._sub(o,l);const u=Math.cos(Math.PI/18);let d=Math.sin(Math.PI/18);c>0&&(d=-d);const p=[o];for(let f=1;f<=18;f++)this._rotateDirect(h,u,d),p.push(this._add(l,h));e.push(p);break}case z.HalfCircleExtended:{const o=this._cp2(s,0,-2),a=this._cp3(s,o,1,-1);let h;if(i>=4)h=s[3];else{const f=this._sub(n,o);h=this._add(a,f)}const c=this._dist(o,a)/2/.75,l=this._sub(o,n);this._normalize(l,c);const u=this._sub(a,h);this._normalize(u,c);const d=[h,a];e.push(d);const p=[this._clone(a)];this._addBezier3(p,a,this._add(a,u),this._add(o,l),o,4),p.push(n),e.push(p);break}case z.OpenCircle:{const o=this._cp2(s,-2,0),a=this._sub(o,n),h=Math.cos(Math.PI/18),c=-Math.sin(Math.PI/18),l=[o];for(let u=1;u<=33;u++)this._rotateDirect(a,h,c),l.push(this._add(n,a));e.push(l);break}case z.CoverageEdgesWithTicks:{const o=this._cp2(s,0,-1);let a,h;if(i>=3)a=s[2];else{const d=this._sub(o,n),p=this._leftPerp(d);a=[n[0]+p[0]-.25*d[0],n[1]+p[1]-.25*d[1]]}if(i>=4)h=s[3];else{const d=this._mid(n,o),p=this._sub(n,o);this._normalize(p),this._leftPerpendicular(p);const f=this._crossProduct(p,this._sub(a,d));this._rightPerpendicular(p),h=[a[0]+p[0]*f*2,a[1]+p[1]*f*2]}const c=this._sub(o,n);let l,u;l=this._crossProduct(c,this._sub(a,n))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push(a),u.push(n),u.push([n[0]+(l[0]-c[0])/3,n[1]+(l[1]-c[1])/3]),e.push(u),l=this._crossProduct(c,this._sub(h,o))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push([o[0]+(l[0]+c[0])/3,o[1]+(l[1]+c[1])/3]),u.push(o),u.push(h),e.push(u);break}case z.GapExtentWithDoubleTicks:{const o=this._cp2(s,0,2),a=this._cp3(s,o,0,1);let h;if(i>=4)h=s[3];else{const c=this._sub(o,n);h=this._add(a,c)}this._addAngledTicks(e,n,o,this._mid(a,h)),this._addAngledTicks(e,a,h,this._mid(n,o));break}case z.GapExtentMidline:{const o=this._cp2(s,2,0),a=this._cp3(s,o,0,1);let h;if(i>=4)h=s[3];else{const l=this._sub(o,n);h=this._add(a,l)}const c=[];c.push(this._mid(n,a)),c.push(this._mid(o,h)),e.push(c);break}case z.Chevron:{const o=this._cp2(s,-1,-1);let a;if(i>=3)a=s[2];else{const h=this._sub(o,n);this._leftPerpendicular(h),a=this._add(n,h)}e.push([o,this._makeCtrlPt(n),a]);break}case z.PerpendicularWithArc:{const o=this._cp2(s,0,-2),a=this._cp3(s,o,.5,-1),h=this._sub(o,n),c=this._norm(h);h[0]/=c,h[1]/=c;const l=this._crossProduct(h,this._sub(a,n));let u=this._dotProduct(h,this._sub(a,n));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const d=[n[0]+h[0]*u,n[1]+h[1]*u];let p=this._leftPerp(h),f=[];if(f.push([d[0]-p[0]*l,d[1]-p[1]*l]),f.push([d[0]+p[0]*l,d[1]+p[1]*l]),e.push(f),i>=4){const y=s[3];let b=this._dotProduct(h,this._sub(y,n));b<.1*c?b=.1*c:b>.9*c&&(b=.9*c);const v=[n[0]+h[0]*b,n[1]+h[1]*b],S=this._crossProduct(h,this._sub(y,n)),M=[];M.push([v[0]-p[0]*S,v[1]-p[1]*S]),M.push([v[0]+p[0]*S,v[1]+p[1]*S]),e.push(M)}const _=[o[0]+p[0]*l,o[1]+p[1]*l];p=this._sub(o,_);const m=Math.cos(Math.PI/18);let g=Math.sin(Math.PI/18);l<0&&(g=-g),f=[n,o];for(let y=1;y<=9;y++)this._rotateDirect(p,m,g),f.push(this._add(_,p));e.push(f);break}case z.ClosedHalfCircle:{const o=this._cp2(s,2,0),a=this._mid(n,o),h=this._sub(o,a),c=Math.cos(Math.PI/18),l=Math.sin(Math.PI/18),u=[n,o];for(let d=1;d<=18;d++)this._rotateDirect(h,c,l),u.push(this._add(a,h));e.push(u);break}case z.TripleParallelExtended:{const o=this._cp2(s,0,-2),a=this._cp3(s,o,1,-2),h=this._mid(n,o),c=this._sub(a,o);this._normalize(c);const l=Math.abs(this._crossProduct(c,this._sub(h,o)))/2,u=this._dist(o,a),d=[o,n];d.push([n[0]+c[0]*u*.5,n[1]+c[1]*u*.5]),e.push(d);const p=[];p.push([h[0]-c[0]*l,h[1]-c[1]*l]),p.push([h[0]+c[0]*u*.375,h[1]+c[1]*u*.375]),hn(p[p.length-1],1),p.push([h[0]+c[0]*u*.75,h[1]+c[1]*u*.75]),e.push(p);const f=[o,a];e.push(f);break}case z.ParallelWithTicks:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._sub(a,o);this._normalize(h);const c=this._crossProduct(h,this._sub(a,n));this._leftPerpendicular(h),this._addAngledTicks(e,n,o,a),this._addAngledTicks(e,this._mix(n,1,h,c),this._mix(o,1,h,c),this._mid(n,o));break}case z.Parallel:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._sub(o,n);this._normalize(h);const c=this._leftPerp(h),l=this._crossProduct(h,this._sub(a,n));let u=[n,o];e.push(u),u=[],u.push([n[0]+c[0]*l,n[1]+c[1]*l]),u.push([o[0]+c[0]*l,o[1]+c[1]*l]),e.push(u);break}case z.PerpendicularToFirstSegment:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._mid(n,o),c=this._sub(o,n);this._normalize(c);const l=this._crossProduct(c,this._sub(a,n));this._leftPerpendicular(c);const u=[];u.push([h[0]-c[0]*l*.25,h[1]-c[1]*l*.25]),u.push([h[0]+c[0]*l*1.25,h[1]+c[1]*l*1.25]),e.push(u);break}case z.ParallelOffset:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._sub(o,n);this._normalize(h);const c=this._crossProduct(h,this._sub(a,n));this._leftPerpendicular(h);const l=[];l.push([n[0]-h[0]*c,n[1]-h[1]*c]),l.push([o[0]-h[0]*c,o[1]-h[1]*c]),e.push(l);const u=[];u.push([n[0]+h[0]*c,n[1]+h[1]*c]),u.push([o[0]+h[0]*c,o[1]+h[1]*c]),e.push(u);break}case z.OffsetOpposite:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._sub(o,n);this._normalize(h);const c=this._crossProduct(h,this._sub(a,n));this._leftPerpendicular(h);const l=[];l.push([n[0]-h[0]*c,n[1]-h[1]*c]),l.push([o[0]-h[0]*c,o[1]-h[1]*c]),e.push(l);break}case z.OffsetSame:{const o=this._cp2(s,3,0),a=this._cp3(s,o,.5,-1),h=this._sub(o,n);this._normalize(h);const c=this._crossProduct(h,this._sub(a,n));this._leftPerpendicular(h);const l=[];l.push([n[0]+h[0]*c,n[1]+h[1]*c]),l.push([o[0]+h[0]*c,o[1]+h[1]*c]),e.push(l);break}case z.CircleWithArc:{let o=this._cp2(s,3,0);const a=this._cp3(s,o,.5,-1);let h,c;if(i>=4)h=s[3],c=this._crossProduct(this._sub(h,o),this._sub(a,o))>0;else{h=o,c=this._crossProduct(this._sub(h,n),this._sub(a,n))>0;const f=24*this._geomUnitsPerPoint,_=this._sub(h,n);this._normalize(_,f);const m=Math.sqrt(2)/2;this._rotateDirect(_,m,c?m:-m),o=this._add(n,_)}const l=this._sub(o,n),u=Math.cos(Math.PI/18),d=Math.sin(Math.PI/18),p=[o];for(let f=1;f<=36;f++)this._rotateDirect(l,u,d),p.push(this._add(n,l));this._add90DegArc(p,o,h,a,c),hn(p[p.length-8],1),e.push(p);break}case z.DoubleJog:{let o,a=this._cp2(s,-3,1),h=this._cp3(s,a,-1,-.5);if(i>=4)o=s[3];else{const g=n;n=a,o=h;const y=this._dist(n,g),b=this._dist(o,g);let v=30*this._geomUnitsPerPoint;.5*y0?this._rotateDirect(_,f,-f):this._rotateDirect(_,f,f);let m=[];m.push(a),m.push(this._add(c,_)),m.push(this._sub(c,_)),m.push(n),e.push(m),_=this._sub(o,h),this._normalize(_,p),this._crossProduct(_,this._sub(n,h))<0?this._rotateDirect(_,f,f):this._rotateDirect(_,f,-f),m=[],m.push(h),m.push(this._add(l,_)),m.push(this._sub(l,_)),m.push(o),e.push(m);break}case z.PerpendicularOffset:{const o=this._cp2(s,-4,1),a=this._cp3(s,o,.882353,-1.94),h=this._sub(a,o);this._crossProduct(h,this._sub(n,o))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const c=[h[0]/8,h[1]/8],l=this._sub(this._mid(o,a),c);e.push([l,n]);break}case z.LineExcludingLastSegment:{const o=this._arrowPath(s),a=[];let h=o.length-2;for(;h--;)a.push(o[h]);e.push(a);break}case z.MultivertexArrow:{const o=this._arrowPath(s),a=[];this._addArrow(a,o,!1),e.push(a);break}case z.CrossedArrow:{const o=this._arrowPath(s),a=[];this._addArrow(a,o,!0),e.push(a);break}case z.ChevronArrow:{const[o,a]=this._arrowLastSeg(s),h=10*this._geomUnitsPerPoint,c=this._sub(n,o),l=this._norm(c);this._normalize(c);const u=this._crossProduct(c,this._sub(a,o));let d=this._dotProduct(c,this._sub(a,o));d<.05*l?d=.05*l:d>.95*l-h&&(d=.95*l-h);const p=[o[0]+c[0]*d,o[1]+c[1]*d],f=this._leftPerp(c),_=[];_.push([p[0]+f[0]*u+c[0]*h,p[1]+f[1]*u+c[1]*h]),_.push(n),_.push([p[0]-f[0]*u+c[0]*h,p[1]-f[1]*u+c[1]*h]),e.push(_);break}case z.ChevronArrowOffset:{const[o,a]=this._arrowLastSeg(s),h=this._sub(n,o),c=this._norm(h);this._normalize(h);const l=this._crossProduct(h,this._sub(a,o));let u=this._dotProduct(h,this._sub(a,o));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const d=[o[0]+h[0]*u,o[1]+h[1]*u];this._leftPerpendicular(h);const p=[];p.push([d[0]+h[0]*l*.5,d[1]+h[1]*l*.5]),p.push(this._mid(d,n)),p.push([d[0]-h[0]*l*.5,d[1]-h[1]*l*.5]),e.push(p);break}case z.PartialFirstSegment:{const[o,a]=this._arrowLastSeg(s),h=this._sub(n,o),c=this._norm(h);this._normalize(h);let l=this._dotProduct(h,this._sub(a,o));l<.05*c?l=.05*c:l>.95*c&&(l=.95*c);const u=[o[0]+h[0]*l,o[1]+h[1]*l];e.push([o,u]);break}case z.Arch:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,1),h=this._sub(n,o),c=this._mix(a,1,h,.55),l=this._mix(a,1,h,-.55),u=[n];this._addBezier2(u,n,c,a,4),this._addBezier2(u,a,l,o,4),e.push(u);break}case z.CurvedParallelTicks:{const o=this._cp2(s,-4,1),a=this._cp3(s,o,.882353,-1.94),h=this._sub(a,o);this._crossProduct(h,this._sub(n,o))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const c=[h[0]/8,h[1]/8],l=this._sub(this._mid(o,a),c),u=this._sub(this._mix(o,.75,a,.25),c),d=this._sub(this._mix(o,.25,a,.75),c),p=[o];this._addBezier2(p,o,u,l,3),this._addBezier2(p,l,d,a,3),e.push(p);for(let f=0;f<8;f++){const _=p[2*f+1],m=[this._clone(_)];m.push(this._add(_,[h[0]/4,h[1]/4])),e.push(m)}break}case z.Arc90Degrees:{const o=this._cp2(s,0,-1),a=this._cp3(s,o,.5,1),h=[o];this._add90DegArc(h,o,n,a),e.push(h);break}case z.TipWithPerpendicularAndTicks:{const[o,a]=this._arrowLastSeg(s),h=10*this._geomUnitsPerPoint,c=this._sub(n,o),l=this._norm(c);this._normalize(c);let u=this._crossProduct(c,this._sub(a,o)),d=this._dotProduct(c,this._sub(a,o));d<.05*l?d=.05*l:d>.95*l-h&&(d=.95*l-h);const p=this._leftPerp(c),f=[n[0]-c[0]*h,n[1]-c[1]*h],_=.5*Math.max(l-d-h,h);u=Math.abs(u);const m=[];m.push([f[0]+p[0]*(u+_)-c[0]*_,f[1]+p[1]*(u+_)-c[1]*_]),m.push([f[0]+p[0]*u,f[1]+p[1]*u]),m.push([f[0]-p[0]*u,f[1]-p[1]*u]),m.push([f[0]-p[0]*(u+_)-c[0]*_,f[1]-p[1]*(u+_)-c[1]*_]),e.push(m),e.push([f,n]);break}case z.FullGeometry:default:e.push(s)}}return e}},Uc=class vs{static local(){return vs.instance===null&&(vs.instance=new vs),vs.instance}execute(t,e,s,i,n){return new bf(t,e,s)}};Uc.instance=null;let bf=class extends Br{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new Xt,this._beginCut=(e.beginCut!==void 0?e.beginCut:1)*s,this._endCut=(e.endCut!==void 0?e.endCut:1)*s,this._middleCut=(e.middleCut!==void 0?e.middleCut:0)*s,this._invert=e.invert!==void 0&&e.invert,this._beginCut<0&&(this._beginCut=0),this._endCut<0&&(this._endCut=0),this._middleCut<0&&(this._middleCut=0)}processPath(t){const{_beginCut:e,_endCut:s,_middleCut:i}=this,n=t.pathLength(),o=N.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(e!==0||s!==0||i!==0)if(e+s+i>=n)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(o,t,0,e),this._curveHelper.appendSubCurve(o,t,.5*(n-i),.5*(n+i)),this._curveHelper.appendSubCurve(o,t,n-s,s)}else if(e===0&&s===0&&i===0)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else e+s+i0&&(n/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(s){if(s.pathSize===0)if(n===0){const a=e.segment[0];s.pushXY(a[0],a[1])}else s.pushPoint(this.getSegCoord2D(e.segment,n));const o=e.segment[1];s.pushXY(o[0],o[1])}if(n=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.getSegLength(e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return i!==te.FAIL&&(e.segmentLength=this.getSegLength(e.segment),e.isPartEnd=!0,i===te.END?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,s){s.pathSize===0&&(n===0?s.pushPoint(e.segment[0]):s.pushPoint(this.getSegCoord2D(e.segment,n)));const o=e.abscissa/e.segmentLength;o===1?s.pushPoint(e.segment[1]):s.pushPoint(this.getSegCoord2D(e.segment,o))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)=this._pathCursor.pathSize&&(s=0),this._ctrlPtEnd=this._pathCursor.getControlPointAt(s),this._patternLength>0){const i=this._ctrlPtBegin?this._partCtrlPtGap:this._partExtPtGap,n=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap;let o=Math.round((this._partLength-(i+n))/this._patternLength);o<=0&&(o=i+n>0?0:1),this._partLengthRatio=this._partLength/(i+n+o*this._patternLength),this._partLengthRatio<.01&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0}_hasNextSegment(){return this._seg=e;)i-=e,e=this._pattern.nextValue(),o=!o;e-=i,o?(this._walker.nextPosition(e),e=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(e),e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue())}let s=this._walker.nextCurve(e);if(s)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)s.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(s.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,s=this._firstCurve,this._firstCurve=null;return s==null||s.reset(),s}isClippingRequired(t){const e=Qe(t);let s=0;for(const i of e)s+=Wu(i);return Math.round(this._numOfDashesPerPattern*(s/this._patternLength))>wf}},jc=class Ss{static local(){return Ss.instance===null&&(Ss.instance=new Ss),Ss.instance}execute(t,e,s,i,n,o){return new If(t,e,s,i,n,o)}};jc.instance=null;let If=class{constructor(t,e,s,i,n,o){switch(this._inputGeometries=t,this._tileKey=i,this._geometryEngine=n,this._maxInflateSize=o*s,this._width=(e.width!==void 0?e.width:2)*s,e.method){case as.Mitered:case as.Bevelled:case as.Rounded:case as.TrueBuffer:case as.Square:}this._option=e.option}next(){let t;for(;t=this._inputGeometries.next();){if(t.geometryType==="esriGeometryEnvelope"&&this._width>0){const e=t.asJSON();return Math.min(e.xmax-e.xmin,e.ymax-e.ymin)-2*this._width<0?t:N.fromJSONCIM({paths:[[[e.xmin+this._width,e.ymin+this._width],[e.xmax-this._width,e.ymin+this._width],[e.xmax-this._width,e.ymax-this._width],[e.xmin+this._width,e.ymax-this._width],[e.xmin+this._width,e.ymin+this._width]],[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}if(t.geometryType==="esriGeometryPolygon"){if(this._width===0)return t.clone();const e=this._geometryEngine;if(e==null)return null;const s=this._tileKey?Nr(t,this._maxInflateSize):t.clone();if(!s)continue;const i=e.buffer(ft.WebMercator,s.asJSON(),-this._width,1);if(i){for(const n of i.rings)if(n){s.startPath();for(const o of n.reverse())s.pushXY(o[0],s.yFactor*o[1])}}return s}}return null}},Yc=class Ps{static local(){return Ps.instance===null&&(Ps.instance=new Ps),Ps.instance}execute(t,e,s,i,n){return new Sf(t,e,s)}};Yc.instance=null;let Sf=class extends Br{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new Xt,this._length=(e.length!==void 0?e.length:20)*s,this._angle=e.angle!==void 0?e.angle:225,this._position=e.position!==void 0?e.position:50,this._length<0&&(this._length=-this._length),this._position<20&&(this._position=20),this._position>80&&(this._position=80),this._mirror=!1}processPath(t){const e=N.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(t))return null;t.seekInPath(0);const s=t.x,i=t.y;t.seekInPath(t.pathSize-1);const n=t.x,o=t.y,a=[n-s,o-i];this._curveHelper.normalize(a);const h=s+(n-s)*this._position/100,c=i+(o-i)*this._position/100,l=Math.cos((90-this._angle)/180*Math.PI);let u=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(u=-u),this._mirror=!this._mirror;const d=[h-this._length/2*l,c-this._length/2*u],p=[h+this._length/2*l,c+this._length/2*u];return e.pushPath([[s,i],d,p,[n,o]]),e}},Wc=class Ms{static local(){return Ms.instance===null&&(Ms.instance=new Ms),Ms.instance}execute(t,e,s,i,n){return new Pf(t,e,s)}};Wc.instance=null;let Pf=class{constructor(t,e,s){this._inputGeometries=t,this._offsetX=e.offsetX!==void 0?e.offsetX*s:0,this._offsetY=e.offsetY!==void 0?e.offsetY*s:0}next(){let t=this._inputGeometries.next();for(;t;){if(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+s;return t.reset(),t}};const Mf=10;let Xc=class $s{static local(){return $s.instance===null&&($s.instance=new $s),$s.instance}execute(t,e,s,i,n,o){return new $f(t,e,s,i,n,o)}};Xc.instance=null;let $f=class{constructor(t,e,s,i,n,o){this._inputGeometries=t,this._tileKey=i,this._geometryEngine=n,this._curveHelper=new Xt,this._offset=(e.offset??1)*s,this._method=e.method,this._maxInflateSize=Math.max(Math.abs(o*s),Mf),this._option=e.option,this._offsetFlattenError=ii*s}next(){let t;for(;t=this._inputGeometries.next();){if(this._offset===0)return t.clone();if(t.geometryType==="esriGeometryEnvelope"){if(this._method===me.Rounded&&this._offset>0){const o=ve(t),a=this._curveHelper.offset(o,-this._offset,this._method,4,this._offsetFlattenError);if(a){const h=N.createEmptyOptimizedCIM(t.geometryType);return h.pushPath(a),h}return null}const n=t.asJSON();if(tc(n)&&Math.min(n.xmax-n.xmin,n.ymax-n.ymin)+2*this._offset>0)return N.fromJSONCIM({xmin:n.xmin-this._offset,xmax:n.xmax+this._offset,ymin:n.ymin-this._offset,ymax:n.ymax+this._offset})}const e=this._geometryEngine;if(e==null)continue;const s=this._tileKey?Nr(t,this._maxInflateSize):t.clone();if(!s)continue;const i=e.offset(ft.WebMercator,s.asJSON(),-this._offset,1,this._method,4,this._offsetFlattenError);return i?N.fromJSONCIM(i):null}return null}},Hc=class Ts{static local(){return Ts.instance===null&&(Ts.instance=new Ts),Ts.instance}execute(t,e,s,i,n){return new Tf(t,e,s)}};Hc.instance=null;let Tf=class{constructor(t,e,s){this._inputGeometries=t,this._reverse=e.reverse===void 0||e.reverse}next(){let t=this._inputGeometries.next();for(;t;){if(!this._reverse)return t;if(t.geometryType==="esriGeometryPolyline")return Cf(t.clone());t=this._inputGeometries.next()}return null}};function Cf(r){for(;r.nextPath();)for(let t=0;t0){const e=Fr(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._rotate(t.clone(),s,i)}t=this._inputGeometries.next()}return null}_rotate(t,e,s){const i=Math.cos(this._rotateAngle),n=Math.sin(this._rotateAngle);for(;t.nextPath();)for(;t.nextPoint();){const o=t.x-e,a=t.y-s;t.x=e+o*i-a*n,t.y=s+o*n+a*i}return t.reset(),t}},Kc=class ks{static local(){return ks.instance===null&&(ks.instance=new ks),ks.instance}execute(t,e,s,i,n){return new Ef(t,e,s)}};Kc.instance=null;let Ef=class{constructor(t,e,s){this._inputGeometries=t,this._xFactor=e.xScaleFactor!==void 0?e.xScaleFactor:1.15,this._yFactor=e.yScaleFactor!==void 0?e.yScaleFactor:1.15}next(){const t=this._inputGeometries.next();if(t){if(this._xFactor===1&&this._yFactor===1||t.geometryType==="esriGeometryPoint")return t;if(t.totalSize>0){const e=Fr(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._scaleCursor(t.clone(),s,i)}}return null}_scaleCursor(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=s+(t.y-s)*this._yFactor;return t.reset(),t}},Qc=class Es{static local(){return Es.instance===null&&(Es.instance=new Es),Es.instance}execute(t,e,s,i,n){return new Ff(t,e,s)}};Qc.instance=null;let Ff=class{constructor(t,e,s){this._inputGeometries=t,this._height=(e.amplitude!==void 0?e.amplitude:2)*s,this._period=(e.period!==void 0?e.period:3)*s,this._style=e.waveform,this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new Gr,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new Vr,this._walker.updateTolerance(s)}next(){let t=this._inputGeometries.next();for(;t;){if(this._height===0||this._period===0)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(t){const e=N.createEmptyOptimizedCIM(t.geometryType);for(;t.nextPath();){e.startPath();const s=t.pathLength();if(this._walker.init(t,this._pattern))switch(this._style){case vi.Sinus:default:this._constructCurve(e,s,!1);break;case vi.Square:this._constructSquare(e,s);break;case vi.Triangle:this._constructTriangle(e,s);break;case vi.Random:this._constructCurve(e,s,!0)}else for(;t.nextPoint();)e.pushXY(t.x,t.y)}return e}_constructCurve(t,e,s){let i=Math.round(e/this._period);i===0&&(i=1);const n=i*16+1,o=e/i,a=this._period/16,h=1/n,c=2*Math.PI*e/o,l=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),d=2*Math.PI*Math.random(),p=.75-Math.random()/2,f=.75-Math.random()/2,_=new Vt;this._walker.curPointAndAngle(_),t.pushPoint(_.pt);let m=0;for(;;){if(!this._walker.nextPointAndAngle(a,_)){t.pushPoint(this._walker.getPathEnd());break}{const g=m;let y;if(m+=h,s){const b=this._height/2*(1+.3*Math.sin(p*c*g+l));y=b*Math.sin(c*g+u),y+=b*Math.sin(f*c*g+d),y/=2}else y=.5*this._height*Math.sin(.5*c*g);t.pushXY(_.pt[0]-y*_.sa,_.pt[1]+y*_.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let s=!0;for(;;){let i=!1;if(this._walker.curPositionIsValid()){const n=new Vt;this._walker.curPointAndAngle(n);const o=new Vt;if(this._walker.nextPointAndAngle(this._period,o)){const a=new Vt;this._walker.nextPointAndAngle(this._period,a)&&(s?(t.pushPoint(n.pt),s=!1):t.pushPoint(n.pt),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(o.pt[0]-this._height/2*o.sa,o.pt[1]+this._height/2*o.ca),t.pushXY(o.pt[0]+this._height/2*o.sa,o.pt[1]-this._height/2*o.ca),t.pushXY(a.pt[0]+this._height/2*a.sa,a.pt[1]-this._height/2*a.ca),i=!0)}}if(!i){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let s=!0;for(;;){let i=!1;if(this._walker.curPositionIsValid()){const n=new Vt;this._walker.curPointAndAngle(n);const o=new Vt;if(this._walker.nextPointAndAngle(this._period/2,o)){const a=new Vt;this._walker.nextPointAndAngle(this._period,a)&&(this._walker.nextPosition(this._period/2)&&(s?(t.pushPoint(n.pt),s=!1):t.pushPoint(n.pt),t.pushXY(o.pt[0]-this._height/2*o.sa,o.pt[1]+this._height/2*o.ca),t.pushXY(a.pt[0]+this._height/2*a.sa,a.pt[1]-this._height/2*a.ca)),i=!0)}}if(!i){t.pushPoint(this._walker.getPathEnd());break}}}},Jc=class Fs{static local(){return Fs.instance===null&&(Fs.instance=new Fs),Fs.instance}execute(t,e,s,i,n){return new Af(t,e,s)}};Jc.instance=null;let Af=class extends pi{constructor(t,e,s){super(t),this._geometryWalker=new Vr,this._geometryWalker.updateTolerance(s),this._angleToLine=e.angleToLine??!0,this._offset=(e.offset?e.offset:0)*s,this._originalEndings=e.endings,this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*s,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*s,this._pattern=new Gr,this._pattern.init(e.placementTemplate,!1),this._pattern.scale(s),this._endings=this._originalEndings}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath)e=this._pattern.nextValue();else{this._originalEndings===Dt.WithFullGap&&this.isClosed?this._endings=Dt.WithMarkers:this._endings=this._originalEndings,this._pattern.extPtGap=0;let i,n=!0;switch(this._endings){case Dt.NoConstraint:i=-this._position,i=this._adjustPosition(i),n=!1;break;case Dt.WithHalfGap:default:i=-this._pattern.lastValue()/2;break;case Dt.WithFullGap:i=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case Dt.WithMarkers:i=0;break;case Dt.Custom:i=-this._position,i=this._adjustPosition(i),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(t,this._pattern,n))return null;this._pattern.reset();let o=0;for(;i>o;)i-=o,o=this._pattern.nextValue();o-=i,e=o,this.iteratePath=!0}const s=new Vt;return this._geometryWalker.nextPointAndAngle(e,s)?this._endings===Dt.WithFullGap&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):this._endings===Dt.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed)?null:(this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca),this._angleToLine&&this.internalPlacement.setRotateCS(s.ca,s.sa),this.internalPlacement):(this.iteratePath=!1,null)}_adjustPosition(t){let e=t/this._pattern.length();return e-=Math.floor(e),e*this._pattern.length()}},tl=class As{static local(){return As.instance===null&&(As.instance=new As),As.instance}execute(t,e,s,i,n){return new zf(t,e,s)}};tl.instance=null;let zf=class extends pi{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new Xt,this._placePerPart=e.placePerPart??!1,this._angleToLine=e.angleToLine===void 0||e.angleToLine,this._offset=e.offset!==void 0?e.offset*s:0,this._type=e.extremityPlacement,this._position=e.offsetAlongLine!==void 0?e.offsetAlongLine*s:0,this._beginProcessed=!1}processMultiPath(t){return this._placePerPart?super.processMultiPath(t):this.processPath(t)}processPath(t){let e;switch(this._type){case Ii.Both:default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iterateMultiPath=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iterateMultiPath=!0,this.iteratePath=!0);break;case Ii.JustBegin:e=this._atExtremities(t,this._position,!0);break;case Ii.JustEnd:e=this._atExtremities(t,this._position,!1);case Ii.None:}return e}_atExtremities(t,e,s){if(this._placePerPart||(s?t.seekPath(0):t.seekPath(t.totalSize-1)),s||t.seekPathEnd(),s?t.nextPoint():t.prevPoint()){let i=0,[n,o]=[0,0],[a,h]=[t.x,t.y];for(;s?t.nextPoint():t.prevPoint();){n=a,o=h,a=t.x,h=t.y;const c=this._curveHelper.getLength(n,o,a,h);if(i+c>e){const l=(e-i)/c,[u,d]=this._curveHelper.getAngleCS(n,o,a,h,l),p=this._curveHelper.getCoord2D(n,o,a,h,l);return this.internalPlacement.setTranslate(p[0]-this._offset*d,p[1]+this._offset*u),this._angleToLine&&this.internalPlacement.setRotateCS(-u,-d),this.internalPlacement}i+=c}}return null}},el=class zs{static local(){return zs.instance===null&&(zs.instance=new zs),zs.instance}execute(t,e,s,i,n){return new Of(t,e,s)}};el.instance=null;let Of=class extends pi{constructor(t,e,s){super(t),this._walker=new Vr,this._walker.updateTolerance(s),this._angleToLine=e.angleToLine===void 0||e.angleToLine,this._offset=e.offset!==void 0?e.offset*s:0,this._beginGap=e.beginPosition!==void 0?e.beginPosition*s:0,this._endGap=e.endPosition!==void 0?e.endPosition*s:0,this._flipFirst=e.flipFirst===void 0||e.flipFirst,this._pattern=new Gr,this._pattern.init(e.positionArray,!1,!1),this._subPathLen=0,this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath){const a=this._pattern.nextValue()*this._subPathLen,h=this._beginGap+a;e=h-this._prevPos,this._prevPos=h}else{if(this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0,this._subPathLen=t.pathLength()-this._beginGap-this._endGap,this._subPathLen<0)return this.iteratePath=!1,null;if(!this._walker.init(t,this._pattern,!1))return null;this._pattern.reset();const a=this._pattern.nextValue()*this._subPathLen,h=this._beginGap+a;e=h-this._prevPos,this._prevPos=h,this.iteratePath=!0}const s=new Vt;if(!this._walker.nextPointAndAngle(e,s,te.END))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca);const i=this._isFirst&&this._flipFirst;let n,o;return this._angleToLine?(n=s.ca,o=s.sa):(n=1,o=0),i&&(n=-n,o=-o),this.internalPlacement.setRotateCS(n,o),this._isFirst=!1,this._posCount--,this._posCount===0&&(this.iteratePath=!1),this.internalPlacement}};const Zt=512,Lf=10,kt=24,wr=1e-6;let sl=class Os{static local(){return Os.instance===null&&(Os.instance=new Os),Os.instance}execute(t,e,s,i,n){return new Df(t,e,s,i,n)}};sl.instance=null;let Df=class ue{constructor(t,e,s,i,n){if(this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,this._currentX=0,this._currentY=0,this._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(e.stepX??16)*s,this._stepY=Math.abs(e.stepY??16)*s,this._stepX=Math.round(128*this._stepX)/128,this._stepY=Math.round(128*this._stepY)/128,this._stepX!==0&&this._stepY!==0){if(this._gridType=e.gridType??Kr.Fixed,this._gridType===Kr.Random){const o=e.seed??13,a=1;this._randomLCG=new Eo(o*a),this._randomness=(e.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=e.gridAngle??0,this._shiftOddRows=e.shiftOddRows??!1,this._offsetX=(e.offsetX??0)*s,this._offsetY=(e.offsetY??0)*s,this._cosAngle=Math.cos(this._gridAngle/180*Math.PI),this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI),this._stepX)if(this._offsetX<0)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(this._offsetY<0)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}if(this._graphicOriginX=0,this._graphicOriginY=0,i!=null){const[o,a,h,c]=i.split("/"),l=parseFloat(o),u=parseFloat(a),d=parseFloat(h),p=parseFloat(c);this._graphicOriginX=-(p*2**l+d)*Zt,this._graphicOriginY=u*Zt,this._testInsidePolygon=!0}this._internalPlacement=new qo,this._calculateMinMax(t),this._geometryCursor=t}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!ue._randValues){ue._randValues=[];for(let t=0;t=y,this._polygonMin=this._verticalSubdivision?d:f,this._testInsidePolygon){let b=0-this._graphicOriginX-this._offsetX-this._stepX,v=Zt-this._graphicOriginX-this._offsetX+this._stepX,S=-Zt-this._graphicOriginY-this._offsetY-this._stepY,M=0-this._graphicOriginY-this._offsetY+this._stepY;if(m){const C=[[b,S],[b,M],[v,S],[v,M]];b=S=Number.MAX_VALUE,v=M=-Number.MAX_VALUE;for(const F of C){const T=this._cosAngle*F[0]-this._sinAngle*F[1],L=this._sinAngle*F[0]+this._cosAngle*F[1];b=Math.min(b,T),v=Math.max(v,T),S=Math.min(S,L),M=Math.max(M,L)}}h=h!==Number.MAX_VALUE?Math.max(h,b):b,c=c!==Number.MAX_VALUE?Math.max(c,S):S,l=l!==-Number.MAX_VALUE?Math.min(l,v):v,u=u!==-Number.MAX_VALUE?Math.min(u,M):M}this._xMin=Math.round(h/this._stepX),this._xMax=Math.round(l/this._stepX),this._yMin=Math.round(c/this._stepY),this._yMax=Math.round(u/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,f,_,d,p)}_buildAccelerationMap(t,e,s,i,n){t.reset();const o=new Map,a=this._verticalSubdivision,h=a?n-i:s-e;let c=Math.ceil(h/Lf);if(c<=1)return;const l=Math.floor(h/c);let u,d,p,f,_,m,g,y,b,v,S;for(c++,this._delta=l,a?(b=-Zt-2*this._stepY,v=2*this._stepY,S=i):(b=-2*this._stepX,v=Zt+2*this._stepX,S=e);t.nextPath();)if(!(t.pathSize<2)&&t.nextPoint())for(u=t.x,d=t.y;t.nextPoint();u=p,d=f){if(p=t.x,f=t.y,a){if(d===f||dv&&f>v)continue;_=Math.min(d,f),m=Math.max(d,f)}else{if(u===p||uv&&p>v)continue;_=Math.min(u,p),m=Math.max(u,p)}for(;_g&&Qa(y,u,d,p,f,o)}this._accelerationMap=o}_nextInside(){for(;;){if(this._currentX>this._xMax){if(this._currentY++,this._currentY>this._yMax)return null;this._currentX=this._xMin,this._shiftOddRows&&this._currentY%2&&this._currentX--}let t=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(t+=.5*this._stepX);const e=this._currentY*this._stepY+this._offsetY;let s,i;if(this._currentX++,this._gridType===Kr.Random){const n=(this._currentX%kt+kt)%kt,o=(this._currentY%kt+kt)%kt;s=this._graphicOriginX+t+this._stepX*this._randomness*(.5-ue._randValues[o*kt+n])*2/3,i=this._graphicOriginY+e+this._stepY*this._randomness*(.5-ue._randValues[o*kt+n+1])*2/3}else s=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,i=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e;if(!this._testInsidePolygon||this._isInsidePolygon(s,i,this._geometryCursor))return this._internalPlacement.setTranslate(s,i),this._internalPlacement}}_isInsidePolygon(t,e,s){if(this._accelerationMap==null)return Rf(t,e,s);t+=wr,e+=wr;const i=this._verticalSubdivision,n=i?e:t,o=Math.floor((n-this._polygonMin)/this._delta),a=this._accelerationMap.get(o);if(!a)return!1;let h,c,l,u=0;for(const d of a){if(h=d[0],c=d[1],i){if(h[1]>e==c[1]>e)continue;l=(c[0]-h[0])*(e-h[1])-(c[1]-h[1])*(t-h[0])}else{if(h[0]>t==c[0]>t)continue;l=(c[1]-h[1])*(t-h[0])-(c[0]-h[0])*(e-h[1])}l>0?u++:u--}return u!==0}};function Rf(r,t,e){let s,i,n,o,a=0;for(r+=wr,t+=wr,e.reset();e.nextPath();)if(e.nextPoint())for(s=e.x,i=e.y;e.nextPoint();s=n,i=o)n=e.x,o=e.y,i>t!=o>t&&((n-s)*(t-i)-(o-i)*(r-s)>0?a++:a--);return a!==0}function Qa(r,t,e,s,i,n){let o=n.get(r);o||(o=[],n.set(r,o)),o.push([[t,e],[s,i]])}const Nf=.001;let il=class Ls{static local(){return Ls.instance===null&&(Ls.instance=new Ls),Ls.instance}execute(t,e,s,i,n){return new Bf(t,e,s)}};il.instance=null;let Bf=class extends pi{constructor(t,e,s){super(t),this._curveHelper=new Xt,this._angleToLine=e.angleToLine===void 0||e.angleToLine,this._offset=e.offset!==void 0?e.offset*s:0,this._relativeTo=e.relativeTo,this._position=e.startPointOffset!==void 0?e.startPointOffset*s:0,this._epsilon=Nf*s}processPath(t){const e=this._position;if(this._relativeTo===hs.SegmentMidpoint){if(this.iteratePath||(this.iteratePath=!0),t.nextPoint()){let[i,n]=[t.x,t.y],[o,a]=[0,0];for(;t.nextPoint();){o=t.x,a=t.y;const h=this._curveHelper.getLength(i,n,o,a);if(hi){const d=(i-o)/u,[p,f]=this._curveHelper.getAngleCS(a,h,c,l,d),_=this._curveHelper.getCoord2D(a,h,c,l,d),m=n?-this._offset:this._offset;return this.internalPlacement.setTranslate(_[0]-m*f,_[1]+m*p),this._angleToLine&&(n?this.internalPlacement.setRotateCS(-p,-f):this.internalPlacement.setRotateCS(p,f)),this.internalPlacement}a=c,h=l,o+=u}}return null}};const Gf=1e-15;let rl=class Ds{static local(){return Ds.instance===null&&(Ds.instance=new Ds),Ds.instance}execute(t,e,s,i,n){return new Vf(t,e,s)}};rl.instance=null;let Vf=class extends pi{constructor(t,e,s){super(t),this._curveHelper=new Xt,this._angleToLine=e.angleToLine===void 0||e.angleToLine,this._offset=e.offset!==void 0?e.offset*s:0,this._endPoints=e.placeOnEndPoints===void 0||e.placeOnEndPoints,this._controlPoints=e.placeOnControlPoints===void 0||e.placeOnControlPoints,this._regularVertices=e.placeOnRegularVertices===void 0||e.placeOnRegularVertices,this._tags=[],this._tagIterator=0}processPath(t){if(this.iteratePath||(this._preparePath(t),this.iteratePath=!0),this._tagIterator>=this._tags.length)return this._tags.length=0,this._tagIterator=0,this.iteratePath=!1,null;const e=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(e[2]);let s=e[0],i=e[1];if(this._offset!==0){const n=Math.cos(e[2]),o=Math.sin(e[2]);s-=this._offset*o,i+=this._offset*n}return this.internalPlacement.setTranslate(s,i),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0,t.seekPathStart();const e=t.isClosed();let s=0,i=!1,n=0,o=0;if(t.seekPathStart(),t.nextPoint()){let a=t.x,h=t.y,c=t.getControlPoint(),l=!0,u=t.nextPoint();for(;u;){const d=t.x,p=t.y,f=t.getControlPoint();(this._angleToLine||this._offset!==0)&&(n=this._curveHelper.getAngle(a,h,d,p,0)),l?(l=!1,e?(s=n,i=c):(this._endPoints||this._controlPoints&&c)&&this._tags.push([a,h,n])):c?this._controlPoints&&this._tags.push([a,h,Fi(o,n)]):this._regularVertices&&this._tags.push([a,h,Fi(o,n)]),(this._angleToLine||this._offset!==0)&&(o=this._curveHelper.getAngle(a,h,d,p,1)),u=t.nextPoint(),u||(e?f||i?this._controlPoints&&this._tags.push([d,p,Fi(o,s)]):this._regularVertices&&this._tags.push([d,p,Fi(o,s)]):(this._endPoints||this._controlPoints&&f)&&this._tags.push([d,p,o])),a=d,h=p,c=f}}this._tagIterator=0}};function Fi(r,t){const e=Math.PI;for(;Math.abs(t-r)>e+2*Gf;)t-r>e?t-=2*e:t+=2*e;return(r+t)/2}const Uf=100*222045e-21;function nl(r){if(r.totalSize===0)return null;const t=Fr(r);if(!t)return null;const e=4*(Math.abs(t[0])+Math.abs(t[2])+Math.abs(t[1])+Math.abs(t[3])+1)*Uf;let s=0,i=0;r.reset();for(let T=0;r.nextPath();T++){const L=r.getCurrentRingArea();L>i&&(i=L,s=T)}if(r.seekPath(s),r.pathSize===0)return null;r.seekPathStart();const n=Xu(r);if(Math.abs(i)<=2*e*e)return[(n[0]+n[2])/2,(n[1]+n[3])/2];r.seekPathStart();const o=Hu(r,di());if(o===null)return null;if(r.totalPoints<4)return o;const a=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],h=[NaN,NaN,NaN,NaN],c=[NaN,NaN,NaN,NaN];let l=!1,u=cs(o,r,!0);u.distance===0&&(l=!0,a[0][0]=o[0],a[0][1]=o[1],u=cs(o,r,!1)),h[0]=u.distance,c[0]=0;const d=[NaN,NaN];let p=!1,f=.25,_=-1,m=NaN;do if(m=NaN,a[1]=ln(r,un(n[0],n[2],f),e,t),isNaN(a[1][0])||isNaN(a[1][1])||(u=cs(a[1],r,!1),m=u.distance),!isNaN(m)&&m>e&&Ji(a[1],r))p=!0,h[1]=m,c[1]=de(a[1],o);else if(!isNaN(m)&&m>_&&(_=m,d[0]=a[1][0],d[1]=a[1][1]),f-=.01,f<.1){if(!(_>=0))break;p=!0,h[1]=_,a[1][0]=d[0],a[1][1]=d[1],c[1]=de(a[1],o)}while(!p);p=!1,f=.5,_=-1;let g=.01,y=1;do if(m=NaN,a[2]=ln(r,un(n[0],n[2],f),e,t),isNaN(a[2][0])||isNaN(a[2][1])||(u=cs(a[2],r,!1),m=u.distance),!isNaN(m)&&m>e&&Ji(a[2],r))p=!0,h[2]=m,c[2]=de(a[2],o);else if(!isNaN(m)&&m>_)_=m,d[0]=a[2][0],d[1]=a[2][1];else if(m>_&&(_=m,d[0]=a[2][0],d[1]=a[2][1]),f=.5+g*y,g+=.01,y*=-1,f<.3||f>.7){if(!(_>=0))break;p=!0,h[2]=_,a[2][0]=d[0],a[2][1]=d[1],c[2]=de(a[2],o)}while(!p);p=!1,f=.75,_=-1;do if(m=NaN,a[3]=ln(r,un(n[0],n[2],f),e,t),isNaN(a[3][0])||isNaN(a[3][1])||(u=cs(a[3],r,!1),m=u.distance),!isNaN(m)&&m>e&&Ji(a[3],r))p=!0,h[3]=m,c[3]=de(a[3],o);else if(m>_&&(_=m,d[0]=a[3][0],d[1]=a[3][1]),f+=.01,f>.9){if(!(_>=0))break;p=!0,h[3]=_,a[3][0]=d[0],a[3][1]=d[1],c[3]=de(a[3],o)}while(!p);const b=[0,1,2,3],v=l?0:1;let S;for(let T=v;T<4;T++)for(let L=v;L<3;L++){const H=c[L],A=c[L+1];Yf(H,A)>0&&(S=b[L],b[L]=b[L+1],b[L+1]=S,c[L]=A,c[L+1]=H)}let M=v,C=0,F=0;for(let T=v;T<4;T++){switch(T){case 0:F=2*h[b[T]];break;case 1:F=1.66666666*h[b[T]];break;case 2:F=1.33333333*h[b[T]];break;case 3:F=h[b[T]]}F>C&&(C=F,M=b[T])}return a[M]}function Ji(r,t){let e,s,i,n,o=0;for(t.reset();t.nextPath()&&t.nextPoint();)for(e=t.x,s=t.y;t.nextPoint();e=i,s=n)i=t.x,n=t.y,s>r[1]!=n>r[1]&&((i-e)*(r[1]-s)-(n-s)*(r[0]-e)>0?o++:o--);return o!==0}function cs(r,t,e){if(e&&Ji(r,t))return{coord:r,distance:0};let s=1/0,i=0,n=0,o=[0,0],a=[0,0];const h=[0,0];for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(o[0]=t.x,o[1]=t.y;t.nextPoint();o=a){a=[t.x,t.y],Zu(h,r,o,a);const c=de(r,h);co?_u)s&Ja?(s&Ai?(t[1]+=u*(n-t[0])/l,t[0]=n):(t[1]+=u*(a-t[0])/l,t[0]=a),s=Et(t,r)):i&Ja?(i&Ai?(e[1]+=u*(n-e[0])/l,e[0]=n):(e[1]+=u*(a-e[0])/l,e[0]=a),i=Et(e,r)):s?(s&zi?(t[0]+=l*(o-t[1])/u,t[1]=o):(t[0]+=l*(h-t[1])/u,t[1]=h),s=Et(t,r)):(i&zi?(e[0]+=l*(o-e[1])/u,e[1]=o):(e[0]+=l*(h-e[1])/u,e[1]=h),i=Et(e,r));else if(s&th?(s&zi?(t[0]+=l*(o-t[1])/u,t[1]=o):(t[0]+=l*(h-t[1])/u,t[1]=h),s=Et(t,r)):i&th?(i&zi?(e[0]+=l*(o-e[1])/u,e[1]=o):(e[0]+=l*(h-e[1])/u,e[1]=h),i=Et(e,r)):s?(s&Ai?(t[1]+=u*(n-t[0])/l,t[0]=n):(t[1]+=u*(a-t[0])/l,t[0]=a),s=Et(t,r)):(i&Ai?(e[1]+=u*(n-e[0])/l,e[0]=n):(e[1]+=u*(a-e[0])/l,e[0]=a),i=Et(e,r)),s&i)return 0}while(s|i);return c}function Et(r,t){return(r[0]t[2]?1:0)<<1|(r[1]t[3]?1:0)<<3}function un(r,t,e){return r+(t-r)*e}function de(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}function Yf(r,t){if(rt)return 1;if(r===t)return 0;const e=isNaN(r),s=isNaN(t);return es?1:0}let ol=class Rs{static local(){return Rs.instance===null&&(Rs.instance=new Rs),Rs.instance}execute(t,e,s,i,n){return new Wf(t,e,s)}};ol.instance=null;let Wf=class{constructor(t,e,s){this._geometryCursor=t,this._offsetX=e.offsetX!==void 0?e.offsetX*s:0,this._offsetY=e.offsetY!==void 0?e.offsetY*s:0,this._method=e.method!==void 0?e.method:Si.OnPolygon,this._internalPlacement=new qo}next(){const t=this._geometryCursor;return this._geometryCursor=null,t?this._polygonCenter(t):null}_polygonCenter(t){let e=!1;switch(this._method){case Si.CenterOfMass:{const s=Qu(t);s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}break;case Si.BoundingBoxCenter:{const s=Fr(t);s&&(this._internalPlacement.setTranslate((s[2]+s[0])/2+this._offsetX,(s[3]+s[1])/2+this._offsetY),e=!0)}break;case Si.OnPolygon:default:{const s=nl(t);s!==null&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}}return e?this._internalPlacement:null}};function eh(r){if(!r)return null;switch(r.type){case"CIMGeometricEffectAddControlPoints":return Nc.local();case"CIMGeometricEffectArrow":return Bc.local();case"CIMGeometricEffectBuffer":return Gc.local();case"CIMGeometricEffectControlMeasureLine":return Vc.local();case"CIMGeometricEffectCut":return Uc.local();case"CIMGeometricEffectDashes":return qc.local();case"CIMGeometricEffectDonut":return jc.local();case"CIMGeometricEffectJog":return Yc.local();case"CIMGeometricEffectMove":return Wc.local();case"CIMGeometricEffectOffset":return Xc.local();case"CIMGeometricEffectReverse":return Hc.local();case"CIMGeometricEffectRotate":return Zc.local();case"CIMGeometricEffectScale":return Kc.local();case"CIMGeometricEffectWave":return Qc.local()}return null}function Xf(r){if(!r)return null;switch(r.type){case"CIMMarkerPlacementAlongLineSameSize":return Jc.local();case"CIMMarkerPlacementAtExtremities":return tl.local();case"CIMMarkerPlacementAtRatioPositions":return el.local();case"CIMMarkerPlacementInsidePolygon":return sl.local();case"CIMMarkerPlacementOnLine":return il.local();case"CIMMarkerPlacementOnVertices":return rl.local();case"CIMMarkerPlacementPolygonCenter":return ol.local()}return null}function Hf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function al(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Zf(r,t,e,s,i,n,o){return r[0]=t,r[1]=e,r[2]=s,r[3]=i,r[4]=n,r[5]=o,r}function Kf(r,t){const e=t[0],s=t[1],i=t[2],n=t[3],o=t[4],a=t[5];let h=e*n-s*i;return h?(h=1/h,r[0]=n*h,r[1]=-s*h,r[2]=-i*h,r[3]=e*h,r[4]=(i*a-n*o)*h,r[5]=(s*o-e*a)*h,r):null}function Qf(r){return r[0]*r[3]-r[1]*r[2]}function ri(r,t,e){const s=t[0],i=t[1],n=t[2],o=t[3],a=t[4],h=t[5],c=e[0],l=e[1],u=e[2],d=e[3],p=e[4],f=e[5];return r[0]=s*c+n*l,r[1]=i*c+o*l,r[2]=s*u+n*d,r[3]=i*u+o*d,r[4]=s*p+n*f+a,r[5]=i*p+o*f+h,r}function vr(r,t,e){const s=t[0],i=t[1],n=t[2],o=t[3],a=t[4],h=t[5],c=Math.sin(e),l=Math.cos(e);return r[0]=s*l+n*c,r[1]=i*l+o*c,r[2]=s*-c+n*l,r[3]=i*-c+o*l,r[4]=a,r[5]=h,r}function Jf(r,t,e){const s=t[0],i=t[1],n=t[2],o=t[3],a=t[4],h=t[5],c=e[0],l=e[1];return r[0]=s*c,r[1]=i*c,r[2]=n*l,r[3]=o*l,r[4]=a,r[5]=h,r}function Ie(r,t,e){const s=t[0],i=t[1],n=t[2],o=t[3],a=t[4],h=t[5],c=e[0],l=e[1];return r[0]=s,r[1]=i,r[2]=n,r[3]=o,r[4]=s*c+n*l+a,r[5]=i*c+o*l+h,r}function Ur(r,t){const e=Math.sin(t),s=Math.cos(t);return r[0]=s,r[1]=e,r[2]=-e,r[3]=s,r[4]=0,r[5]=0,r}function t_(r,t){return r[0]=t[0],r[1]=0,r[2]=0,r[3]=t[1],r[4]=0,r[5]=0,r}function e_(r,t){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=t[0],r[5]=t[1],r}function s_(r){return"mat2d("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+")"}function i_(r){return Math.sqrt(r[0]**2+r[1]**2+r[2]**2+r[3]**2+r[4]**2+r[5]**2+1)}function r_(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r[4]=t[4]+e[4],r[5]=t[5]+e[5],r}function hl(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r[4]=t[4]-e[4],r[5]=t[5]-e[5],r}function n_(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r}function o_(r,t,e,s){return r[0]=t[0]+e[0]*s,r[1]=t[1]+e[1]*s,r[2]=t[2]+e[2]*s,r[3]=t[3]+e[3]*s,r[4]=t[4]+e[4]*s,r[5]=t[5]+e[5]*s,r}function a_(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]&&r[4]===t[4]&&r[5]===t[5]}function h_(r,t){const e=r[0],s=r[1],i=r[2],n=r[3],o=r[4],a=r[5],h=t[0],c=t[1],l=t[2],u=t[3],d=t[4],p=t[5],f=Ju();return Math.abs(e-h)<=f*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(s-c)<=f*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(i-l)<=f*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-u)<=f*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(o-d)<=f*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(a-p)<=f*Math.max(1,Math.abs(a),Math.abs(p))}const c_=ri,l_=hl;Object.freeze(Object.defineProperty({__proto__:null,add:r_,copy:Hf,determinant:Qf,equals:h_,exactEquals:a_,frob:i_,fromRotation:Ur,fromScaling:t_,fromTranslation:e_,identity:al,invert:Kf,mul:c_,multiply:ri,multiplyScalar:n_,multiplyScalarAndAdd:o_,rotate:vr,scale:Jf,set:Zf,str:s_,sub:l_,subtract:hl,translate:Ie},Symbol.toStringTag,{value:"Module"}));function Lt(){const r=new Float32Array(6);return r[0]=1,r[3]=1,r}function u_(r){const t=new Float32Array(6);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t}function d_(r,t,e,s,i,n){const o=new Float32Array(6);return o[0]=r,o[1]=t,o[2]=e,o[3]=s,o[4]=i,o[5]=n,o}function p_(r,t){return new Float32Array(r,t,6)}function cl(r,t,e,s){const i=t[s],n=t[s+1];r[s]=e[0]*i+e[2]*n+e[4],r[s+1]=e[1]*i+e[3]*n+e[5]}function ll(r,t,e,s=0,i=0,n=2){const o=i||t.length/n;for(let a=s;a_t.getLogger("esri.views.2d.engine.webgl.alignmentUtils");var At,xt;function ul(r){if(!r)return At.Center;switch(r){case"Left":case"left":return At.Left;case"Right":case"right":return At.Right;case"Justify":return f_().warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."),At.Center;case"Center":case"center":return At.Center}}function dl(r){if(!r)return xt.Center;switch(r){case"Top":case"top":return xt.Top;case"Center":case"middle":return xt.Center;case"Baseline":case"baseline":return xt.Baseline;case"Bottom":case"bottom":return xt.Bottom}}function __(r){switch(r){case At.Right:case"right":return-1;case At.Center:case"center":return 0;case At.Left:case"left":return 1;default:return console.debug(`Found invalid horizontal alignment ${r}`),0}}function m_(r){switch(r){case xt.Top:case"top":return 1;case xt.Center:case"middle":return 0;case xt.Bottom:case xt.Baseline:case"baseline":case"bottom":return-1;default:return console.debug(`Found invalid vertical alignment ${r}`),0}}(function(r){r[r.Left=-1]="Left",r[r.Center=0]="Center",r[r.Right=1]="Right"})(At||(At={})),function(r){r[r.Top=1]="Top",r[r.Center=0]="Center",r[r.Bottom=-1]="Bottom",r[r.Baseline=2]="Baseline"}(xt||(xt={}));let be=class Nn{constructor(t,e,s,i){this.computedX=0,this.computedY=0,this.center=$n(t,e),this.centerT=Tn(),this.halfWidth=s/2,this.halfHeight=i/2,this.width=s,this.height=i}get x(){return this.center[0]}get y(){return this.center[1]}get blX(){return this.center[0]+this.halfWidth}get blY(){return this.center[1]+this.halfHeight}get trX(){return this.center[0]-this.halfWidth}get trY(){return this.center[1]-this.halfHeight}get xmin(){return this.x-this.halfWidth}get xmax(){return this.x+this.halfWidth}get ymin(){return this.y-this.halfHeight}get ymax(){return this.y+this.halfHeight}set x(t){this.center[0]=t}set y(t){this.center[1]=t}clone(){return new Nn(this.x,this.y,this.width,this.height)}serialize(t){return t.writeF32(this.center[0]),t.writeF32(this.center[1]),t.push(this.width),t.push(this.height),t}findCollisionDelta(t,e=4){const s=Math.abs(t.centerT[0]-this.centerT[0]),i=Math.abs(t.centerT[1]-this.centerT[1]),n=(t.halfWidth+this.halfWidth+e)/s,o=(t.halfHeight+this.halfHeight+e)/i,a=Math.min(n,o);return Math.log2(a)}extend(t){const e=Math.min(this.xmin,t.xmin),s=Math.min(this.ymin,t.ymin),i=Math.max(this.xmax,t.xmax)-e,n=Math.max(this.ymax,t.ymax)-s,o=e+i/2,a=s+n/2;this.width=i,this.height=n,this.halfWidth=i/2,this.halfHeight=n/2,this.x=o,this.y=a}static deserialize(t){const e=t.readF32(),s=t.readF32(),i=t.readInt32(),n=t.readInt32();return new Nn(e,s,i,n)}};const jo=22,pl=4,g_=jo+pl,y_=jo-6,sh=3,x_=Math.PI/180,Kt=8,b_=1.5;let fl=class{constructor(t,e,s,i){this._rotationT=Lt(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const n=s.rect,o=new Float32Array(8);t*=i,e*=i;const a=s.code?n.width*i:s.metrics.width,h=s.code?n.height*i:s.metrics.height;this.width=a,this.height=h,o[0]=t,o[1]=e,o[2]=t+a,o[3]=e,o[4]=t,o[5]=e+h,o[6]=t+a,o[7]=e+h,this._data=o,this._setTextureCoords(n),this._scale=i,this._mosaic=s,this.x=t,this.y=e,this.maxOffset=Math.max(t+a,e+h)}get mosaic(){return this._mosaic}set angle(t){this._angle=t,Ur(this._rotationT,-t),this._setOffsets()}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,s=e*this._scale,i=Math.abs(t)*this._scale,n=new Float32Array(8);n[0]=this.x,n[1]=this.y,n[2]=this.x+s,n[3]=this.y,n[4]=this.x,n[5]=this.y+i,n[6]=this.x+s,n[7]=this.y+i;const o=ri(Lt(),this._rotationT,this._transform);ll(n,n,o);let a=1/0,h=1/0,c=0,l=0;for(let _=0;_<4;_++){const m=n[2*_],g=n[2*_+1];a=Math.min(a,m),h=Math.min(h,g),c=Math.max(c,m),l=Math.max(l,g)}const u=c-a,d=l-h,p=a+u/2,f=h+d/2;this._bounds=new be(p,f,u,d)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(){this._offsets||(this._offsets={topLeft:[0,0],topRight:[0,0],bottomLeft:[0,0],bottomRight:[0,0]});const t=ri(Lt(),this._rotationT,this._transform);this._offsets.topLeft[0]=this._data[0],this._offsets.topLeft[1]=this._data[1],this._offsets.topRight[0]=this._data[2],this._offsets.topRight[1]=this._data[3],this._offsets.bottomLeft[0]=this._data[4],this._offsets.bottomLeft[1]=this._data[5],this._offsets.bottomRight[0]=this._data[6],this._offsets.bottomRight[1]=this._data[7],zt(this._offsets.topLeft,this._offsets.topLeft,t),zt(this._offsets.topRight,this._offsets.topRight,t),zt(this._offsets.bottomLeft,this._offsets.bottomLeft,t),zt(this._offsets.bottomRight,this._offsets.bottomRight,t)}_setTextureCoords({x:t,y:e,width:s,height:i}){this._texcoords={topLeft:[t,e],topRight:[t+s,e],bottomLeft:[t,e+i],bottomRight:[t+s,e+i]}}};const w_=(r,t)=>({code:0,page:0,sdf:!0,rect:new Vd(0,0,11,8),textureBinding:t,metrics:{advance:0,height:4,width:r,left:0,top:0}});function ls(r,t){return r.forEach(e=>zt(e,e,t)),{topLeft:r[0],topRight:r[1],bottomLeft:r[2],bottomRight:r[3]}}let v_=class{constructor(t,e,s){this._rotation=0,this._decorate(t,e,s),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=s.angle!==0,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const i of t)i.setTransform(this._transform)}setRotation(t){if(t===0&&this._rotation===0)return;this._rotation=t;const e=this._transform,s=Ur(Lt(),t);ri(e,s,e);for(const i of this.glyphs)i.setTransform(this._transform)}_decorate(t,e,s){if(!s.decoration||s.decoration==="none"||!t.length)return;const i=s.scale,n=s.decoration==="underline"?g_:y_,o=t[0].textureBinding;for(const a of e){const h=a.startX*i,c=a.startY*i,l=(a.width+a.glyphWidthEnd)*i;t.push(new fl(h,c+n*i,w_(l,o),1))}}shapeBackground(t){const e=this._borderLineSizePx||0,s=(b_+e)/2,i=this._borderLineSizePx?s:0,{xmin:n,ymin:o,xmax:a,ymax:h,x:c,y:l,width:u,height:d}=this.bounds,p=[n-Kt,o-Kt],f=[a+Kt,o-Kt],_=[n-Kt,h+Kt],m=[a+Kt,h+Kt],g=ls([[p[0]-s,p[1]-s],[f[0]+s,f[1]-s],[p[0]+i,p[1]+i],[f[0]-i,f[1]+i]],t),y=ls([[_[0]+i,_[1]-i],[m[0]-i,m[1]-i],[_[0]-s,_[1]+s],[m[0]+s,m[1]+s]],t),b=ls([[p[0]-s,p[1]-s],[p[0]+i,p[1]+i],[_[0]-s,_[1]+s],[_[0]+i,_[1]-i]],t),v=ls([[f[0]-i,f[1]+i],[f[0]+s,f[1]-s],[m[0]-i,m[1]-i],[m[0]+s,m[1]+s]],t),S={main:ls([p,f,_,m],t),top:g,bot:y,left:b,right:v};return[new be(c,l,u+2*s,d+2*s),S]}get boundsT(){const t=this.bounds,e=ut(Tn(),t.x,t.y);if(zt(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new be(e[0],e[1],s,s)}return new be(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const h of t)e=Math.min(e,h.xTopLeft),s=Math.min(s,h.yTopLeft),i=Math.max(i,h.xBottomRight),n=Math.max(n,h.yBottomRight);const o=i-e,a=n-s;return new be(e+o/2,s+a/2,o,a)}_createGlyphTransform(t,e){const s=x_*e.angle,i=Lt(),n=Tn();return Ie(i,i,ut(n,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?vr(i,i,s):(Ie(i,i,ut(n,t.x,t.y)),vr(i,i,s),Ie(i,i,ut(n,-t.x,-t.y))),i}},Oi=class{constructor(t,e,s,i,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,s)),this.end=Math.max(0,Math.max(e,s)),this.endr===10,ih=r=>r===32;function I_(r,t,e){const s=new Array,i=1/e.scale,n=e.maxLineWidth*i,o=t?r.length-1:0,a=t?-1:r.length,h=t?-1:1;let c=o,l=0,u=0,d=c,p=d,f=0,_=1/0,m=0;for(;c!==a;){const{code:y,metrics:b}=r[c],v=Math.abs(b.top);if(Bn(y)||ih(y)||(_=Math.min(_,v),m=Math.max(m,v+b.height)),Bn(y))c!==o&&(s.push(new Oi(r,d,c-h,l,_===1/0?0:_,m)),_=1/0,m=0),l=0,d=c+h,p=c+h,u=0;else if(ih(y))p=c+h,u=0,f=b.advance,l+=b.advance;else if(l>n){if(p!==d){const S=p-2*h;l-=f,s.push(new Oi(r,d,S,l-u,_,m)),_=1/0,m=0,d=p,l=u}else s.push(new Oi(r,d,c-h,l,_,m)),_=1/0,m=0,d=c,p=c,l=0;l+=b.advance,u+=b.advance}else l+=b.advance,u+=b.advance;c+=h}const g=new Oi(r,d,c-h,l,_,m);return g.start>=0&&g.endimport("./geometryEngineWorker-ClddcLz0.js").then(r=>r.g),__vite__mapDeps([0,1,2,3]))}const ml=new Float32Array(1),k_=new Uint32Array(ml.buffer);function E_(r){return ml[0]=r,k_[0]}function F_(r,t){return 65535&r|t<<16}function nh(r){const t=E_(r),e=t>>>31;let s=t>>>23&255,i=8388607&t;return s-=127,s>15?e<<15|31744:s<-25?0:(s<-14&&(i+=8388608,i/=2**(-14-s),s=-15),s+=15,i/=8192,i=A_(i,1023),e<<15|s<<10|i)}function A_(r,t){const e=Math.floor(r),s=r-e;return e.5||s===.5&&e%2==1)?e+1:e}function z_(r){const t=r.map(({name:e,count:s,type:i})=>`${e}.${s}.${i}`).join(",");return ui(t)}function Ns(r,t,e,s,i,n,o){if(r.primitiveName===t){for(const a in r)if(a===e){let h=s==null?void 0:s.readWithDefault(i,n,r[a]&&o);return r.type==="text"&&(h=h.toString()),void(r[a]=h)}}if("type"in r&&r.type!=null)switch(r.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(r.symbolLayers)for(const a of r.symbolLayers)Ns(a,t,e,s,i,n,o);break;case"CIMHatchFill":r.lineSymbol&&Ns(r.lineSymbol,t,e,s,i,n,o);break;case"CIMSolidStroke":case"CIMSolidFill":case"CIMVectorMarker":if(r.type==="CIMVectorMarker"&&r.markerGraphics)for(const a of r.markerGraphics)Ns(a,t,e,s,i,n,o),Ns(a.symbol,t,e,s,i,n,o)}}const O_=400;function gl(r){const t=r.width;return r.effects!=null?O_:Math.max(1.25*t,8)}function yl(r){switch(r){case I.BYTE:case I.UNSIGNED_BYTE:return 1;case I.SHORT:case I.UNSIGNED_SHORT:case I.HALF_FLOAT:return 2;case I.FLOAT:case I.INT:case I.UNSIGNED_INT:return 4}}function L_(r){const t=[],e=[],s=[];for(const i of r){const n=yl(i.type)*i.count;switch(n%2||n%4||4){case 4:t.push(i);continue;case 2:e.push(i);continue;case 1:s.push(i);continue;default:throw new Error("Found unexpected dataType byte count")}}return t.push(...e),t.push(...s),t}let D_=class xl{static fromVertexSpec(t,e){const{attributes:s,optionalAttributes:i}=t;let n,o,a;const h=[];for(const _ in s){const m=s[_];m.pack==="position"?n={...m,name:_,offset:0}:m.pack==="id"?o={...m,name:_,offset:4}:_==="bitset"?a={...m,name:_,offset:7}:h.push({...m,name:_})}for(const _ in i)if(e[_]===!0){const m=i[_];h.push({...m,name:_})}const c=L_(h),l=[];let u=8,d=1;for(const _ of c)l.push({..._,offset:u}),u+=yl(_.type)*_.count,_.packAlternating&&(d=Math.max(_.packAlternating.count,d));const p=Uint32Array.BYTES_PER_ELEMENT,f=u%p;return new xl(n,o,a,l,u+(f?p-f:0),d)}constructor(t,e,s,i,n,o){this.position=t,this.id=e,this.bitset=s,this.standardAttributes=i,this.stride=n,this.packVertexCount=o,i.push(s),this._attributes=[t,e,s,...i]}get attributeLayout(){if(!this._attributeLayout){const t=z_(this._attributes),e=this._attributes.map(s=>({name:s.name,count:s.count,offset:s.offset,type:s.type,packPrecisionFactor:s.packPrecisionFactor,normalized:s.normalized??!1}));this._attributeLayout={attributes:e,hash:t,stride:this.stride}}return this._attributeLayout}};function R_(r,t,e,s){const i=e.packPrecisionFactor??1;switch(e.type){case I.BYTE:if(e.count===1)r.setInt8(s+e.offset,t*i);else for(let n=0;nthis.vertexSpec.createComputedParams(n)}get _vertexPack(){if(!this._cachedVertexPack){const t=N_.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||t.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=t}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}setReferences(t){this._references=t}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){var t;B_((t=this._evaluator.inputMeshParams.effects)==null?void 0:t.effectInfos)&&await C_()}enqueueRequest(t,e,s){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(t,e,s)}write(t,e,s,i,n){var p;this.ensurePacked(e,s,i);const o=this.evaluatedMeshParams.effects;if(!o||o.length===0)return void this._write(t,s,void 0,n);const a=(p=s.readGeometryForDisplay())==null?void 0:p.clone();if(!a)return;const h=N.fromOptimizedCIM(a,s.geometryType),c=Yo();h.invertY();const l=t.id||"",u=T_.executeEffects(o,h,l,c);let d;for(;d=u.next();)d.invertY(),this._write(t,s,d,n)}ensurePacked(t,e,s){if(!this._evaluator.hasDynamicProperties)return;const i=this._evaluator.evaluateMeshParams(t,e,s);this._vertexPack.pack(i,this._viewParams)}_writeVertex(t,e,s,i,n){const o=this.evaluatedMeshParams;this._vertexPack.writeVertex(t,e,s,i,o,n)}};const G_=100,V_=k("featurelayer-fast-triangulation-enabled");let wl=class extends Je{async loadDependencies(){await Promise.all([super.loadDependencies(),Ud()])}_write(t,e,s){const i=(s==null?void 0:s.asOptimized())??e.readGeometryForDisplay(),n=this._clip(i);n&&(t.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(t,e,n),t.recordEnd())}_clip(t){if(!t)return null;const e=this.hasEffects;return zc(t,e?256:8)}_writeGeometry(t,e,s){const i=s.maxLength>G_,n=[],o=this.createTesselationParams(e);if(!i&&V_&&hf(n,s))return void(n.length&&this._writeVertices(t,e,s.coords,o,n));const a=cf(s);this._writeVertices(t,e,a,o)}_writeVertices(t,e,s,i,n){const o=e.getDisplayId(),a=t.vertexCount(),h=this.hasEffects;let c=0;if(n)for(const l of n){const u=s[2*l],d=s[2*l+1];h&&t.recordBounds(u,d,0,0),this._writeVertex(t,o,u,d,i),c++}else for(let l=0;lr,optionalAttributes:{},attributes:{id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1},pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},inverseArea:{type:I.FLOAT,count:1,packTessellation:({inverseArea:r})=>r}}};let q_=class extends wl{constructor(){super(...arguments),this.vertexSpec=U_}createTesselationParams(t){return{inverseArea:1/t.readGeometryArea()}}};const j_=()=>_t.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.meshWriterUtils"),Y_=0,W_=100;function ts(r,t){return[!!(r!=null&&r.minScale)&&t.scaleToZoom(r.minScale)||Y_,!!(r!=null&&r.maxScale)&&t.scaleToZoom(r.maxScale)||W_]}function us(r){return 1<r,optionalAttributes:{zoomRange:{type:I.SHORT,count:2,packPrecisionFactor:zr,pack:({scaleInfo:r},{tileInfo:t})=>ts(r,t)}},attributes:{id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1},pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:r})=>J(r)}}};let Wo=class extends wl{constructor(){super(...arguments),this.vertexSpec=Gn}createTesselationParams(t){return null}};const Pe={createComputedParams:r=>r,optionalAttributes:Gn.optionalAttributes,attributes:{...Gn.attributes,tlbr:{count:4,type:I.UNSIGNED_SHORT,pack:({sprite:r})=>{const{rect:t,width:e,height:s}=r,i=t.x+He,n=t.y+He;return[i,n,i+e,n+s]}},inverseRasterizationScale:{count:1,type:I.BYTE,packPrecisionFactor:16,pack:({sprite:r})=>1/r.rasterizationScale}}};let vl=class extends Wo{constructor(){super(...arguments),this.vertexSpec=Pe}_write(t,e,s){var a;const i=(s==null?void 0:s.asOptimized())??e.readGeometryForDisplay(),n=this._clip(i);if(!n)return;const o=(a=this.evaluatedMeshParams.sprite)==null?void 0:a.textureBinding;t.recordStart(this.instanceId,this.attributeLayout,o),this._writeGeometry(t,e,n),t.recordEnd()}};var oh;(function(r){r[r.Geographic=0]="Geographic",r[r.Arithmatic=1]="Arithmatic"})(oh||(oh={}));const Z_=3.14159265359/128,K_=1.1,Q_=1,J_=1e-5,ah=.05,Il=1e-30,Xo=4,Ho=0,Sl=2,tm=2,em=3,sm=0,im=3,rm=16777216;function Ir(r){const{sprite:t,aspectRatio:e,scaleProportionally:s}=r,i=E(r.height),n=i>0?i:t.height;let o=i*e;return o<=0?o=t.width:s&&(o*=t.width/t.height),{width:o,height:n}}function Pl(r){const{applyRandomOffset:t,sampleAlphaOnly:e}=r;return fi([[Sl,t],[Xo,e]])}const Ml={createComputedParams:r=>r,optionalAttributes:Pe.optionalAttributes,attributes:{...Pe.attributes,bitset:{count:1,type:I.UNSIGNED_BYTE,pack:Pl},width:{count:1,type:I.HALF_FLOAT,pack:r=>Ir(r).width},height:{count:1,type:I.HALF_FLOAT,pack:r=>Ir(r).height},offset:{count:2,type:I.HALF_FLOAT,pack:({offsetX:r,offsetY:t})=>[E(r),-E(t)]},scale:{count:2,type:I.UNSIGNED_BYTE,packPrecisionFactor:16,pack:({scaleX:r,scaleY:t})=>[r,t]},angle:{count:1,type:I.UNSIGNED_BYTE,pack:({angle:r})=>Fd(r)}}};let nm=class extends vl{constructor(){super(...arguments),this.vertexSpec=Ml}},om=class{constructor(){this.extrusionOffsetX=0,this.extrusionOffsetY=0,this.normalX=0,this.normalY=0,this.directionX=0,this.directionY=0,this.distance=0}};const Me={createComputedParams:r=>r,optionalAttributes:{zoomRange:{type:I.SHORT,count:2,packPrecisionFactor:zr,pack:({scaleInfo:r},{tileInfo:t})=>ts(r,t)}},attributes:{id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},bitset:{type:I.UNSIGNED_BYTE,count:1},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:r})=>J(r)},offset:{type:I.BYTE,count:2,packPrecisionFactor:16,packTessellation:({extrusionOffsetX:r,extrusionOffsetY:t})=>[Li(r,16),Li(t,16)]},normal:{type:I.BYTE,count:2,packPrecisionFactor:16,packTessellation:({normalX:r,normalY:t})=>[Li(r,16),Li(t,16)]},halfWidth:{type:I.HALF_FLOAT,count:1,pack:({width:r})=>E(.5*r)},referenceHalfWidth:{type:I.HALF_FLOAT,count:1,pack:({referenceWidth:r})=>E(.5*r)}}};let am=class{constructor(){this.id=0,this.bitset=0,this.indexCount=0,this.vertexCount=0,this.vertexFrom=0,this.vertexBounds=0}};const hh=65535;let Zo=class extends Je{constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=Me,this._currentWrite=new am,this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:hh,textured:!1},this._tessParams=new om,this._initializeTessellator()}writeLineVertices(t,e,s){const i=this._getLines(e);i!=null&&this._writeVertices(t,s,i)}_initializeTessellator(){this._lineTessellator=new qd(this._writeTesselatedVertex.bind(this),this._writeTriangle.bind(this),!0)}_write(t,e,s){const i=s??N.fromFeatureSetReaderCIM(e);i&&this._writeGeometry(t,e,i)}_writeGeometry(t,e,s,i){t.recordStart(this.instanceId,this.attributeLayout,i),this.writeLineVertices(t,s,e),t.recordEnd()}_getLines(t){return uf(t,gl(this.evaluatedMeshParams))}_writeVertices(t,e,s){const{_currentWrite:i,_tessellationOptions:n,evaluatedMeshParams:o}=this,{width:a,capType:h,joinType:c,miterLimit:l,hasSizeVV:u}=o,d=E(.5*a);n.halfWidth=d,n.capType=X_(h),n.joinType=H_(c),n.miterLimit=l;const p=!u;i.out=t,i.id=e.getDisplayId(),i.vertexCount=0,i.indexCount=0,i.vertexFrom=t.vertexCount(),i.vertexBounds=p&&dr,optionalAttributes:Me.optionalAttributes,attributes:{...Me.attributes,bitset:{type:I.UNSIGNED_BYTE,count:1,pack:r=>0},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:r})=>J(r)}}},Ko={createComputedParams:r=>r,optionalAttributes:Me.optionalAttributes,attributes:{...Me.attributes,bitset:{type:I.UNSIGNED_BYTE,count:1,pack:r=>fi([[Ho,!0]])},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:r})=>J(r)}}};let Qo=class extends Zo{constructor(){super(...arguments),this.vertexSpec=Ko}},Jo=class extends Wo{constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=$l,this._lineMeshWriter=this._createOutlineWriter(t,e,s,i)}_createOutlineWriter(t,e,s,i){return new Qo(t,e,s,i)}_write(t,e,s){const i=(s==null?void 0:s.asOptimized())??e.readGeometryForDisplay(),n=this._clip(i);n&&(t.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(t,e,n),this._lineMeshWriter.writeLineVertices(t,N.fromOptimizedCIM(n,"esriGeometryPolyline"),e),t.recordEnd())}_clip(t){return t?zc(t,gl(this.evaluatedMeshParams)):null}ensurePacked(t,e,s){super.ensurePacked(t,e,s),this._lineMeshWriter.ensurePacked(t,e,s)}enqueueRequest(t,e,s){super.enqueueRequest(t,e,s),this._lineMeshWriter.enqueueRequest(t,e,s)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}};const hm=()=>_t.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");let Tl=class{constructor(){this._includedModules=new Map}include(t,e){this._includedModules.has(t)?this._includedModules.get(t):(this._includedModules.set(t,e),t(this.builder,e))}},cm=class extends Tl{constructor(){super(...arguments),this.vertex=new ch,this.fragment=new ch,this.attributes=new dm,this.varyings=new pm,this.extensions=new Vn,this.constants=new Cl}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(t,e=!0){const s=this.extensions.generateSource(t),i=this.attributes.generateSource(t),n=this.varyings.generateSource(t),o=t==="vertex"?this.vertex:this.fragment,a=o.uniforms.generateSource(),h=o.code.generateSource(),c=t==="vertex"?_m:fm(e),l=this.constants.generateSource().concat(o.constants.generateSource());return`${e?"#version 300 es":""} +${s.join(` +`)} +${c} +${l.join(` +`)} +${a.join(` +`)} +${i.join(` +`)} +${n.join(` +`)} +${h.join(` +`)}`}generateBindPass(t){const e=new Map;this.vertex.uniforms.entries.forEach(n=>{const o=n.bind[Mi.Pass];o&&e.set(n.name,o)}),this.fragment.uniforms.entries.forEach(n=>{const o=n.bind[Mi.Pass];o&&e.set(n.name,o)});const s=Array.from(e.values()),i=s.length;return(n,o)=>{for(let a=0;a{const o=n.bind[Mi.Draw];o&&e.set(n.name,o)}),this.fragment.uniforms.entries.forEach(n=>{const o=n.bind[Mi.Draw];o&&e.set(n.name,o)});const s=Array.from(e.values()),i=s.length;return(n,o,a)=>{for(let h=0;ht.arraySize!=null?`uniform ${t.type} ${t.name}[${t.arraySize}];`:`uniform ${t.type} ${t.name};`)}get entries(){return Array.from(this._entries.values())}},um=class{constructor(){this._entries=new Array}add(t){this._entries.push(t)}generateSource(){return this._entries}},ch=class extends Tl{constructor(){super(...arguments),this.uniforms=new lm,this.code=new um,this.constants=new Cl}get builder(){return this}},dm=class{constructor(){this._entries=new Array}add(t,e){this._entries.push([t,e])}generateSource(t){return t==="fragment"?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}},pm=class{constructor(){this._entries=new Map}add(t,e){this._entries.has(t)&&jd(this._entries.get(t)===e),this._entries.set(t,e)}generateSource(t){const e=new Array;return this._entries.forEach((s,i)=>e.push(t==="vertex"?`out ${s} ${i};`:`in ${s} ${i};`)),e}},Vn=class Un{constructor(){this._entries=new Set}add(t){this._entries.add(t)}generateSource(t){const e=t==="vertex"?Un.ALLOWLIST_VERTEX:Un.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(s=>e.includes(s)).map(s=>`#extension ${s} : enable`)}};Vn.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],Vn.ALLOWLIST_VERTEX=[];let Cl=class U{constructor(){this._entries=new Set}add(t,e,s){let i="ERROR_CONSTRUCTOR_STRING";switch(e){case"float":i=U._numberToFloatStr(s);break;case"int":i=U._numberToIntStr(s);break;case"bool":i=s.toString();break;case"vec2":i=`vec2(${U._numberToFloatStr(s[0])}, ${U._numberToFloatStr(s[1])})`;break;case"vec3":i=`vec3(${U._numberToFloatStr(s[0])}, ${U._numberToFloatStr(s[1])}, ${U._numberToFloatStr(s[2])})`;break;case"vec4":i=`vec4(${U._numberToFloatStr(s[0])}, ${U._numberToFloatStr(s[1])}, ${U._numberToFloatStr(s[2])}, ${U._numberToFloatStr(s[3])})`;break;case"ivec2":i=`ivec2(${U._numberToIntStr(s[0])}, ${U._numberToIntStr(s[1])})`;break;case"ivec3":i=`ivec3(${U._numberToIntStr(s[0])}, ${U._numberToIntStr(s[1])}, ${U._numberToIntStr(s[2])})`;break;case"ivec4":i=`ivec4(${U._numberToIntStr(s[0])}, ${U._numberToIntStr(s[1])}, ${U._numberToIntStr(s[2])}, ${U._numberToIntStr(s[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${e}(${Array.prototype.map.call(s,n=>U._numberToFloatStr(n)).join(", ")})`}return this._entries.add(`const ${e} ${t} = ${i};`),this}static _numberToIntStr(t){return t.toFixed(0)}static _numberToFloatStr(t){return Number.isInteger(t)?t.toFixed(1):t.toString()}generateSource(){return Array.from(this._entries)}};function fm(r=!0){return`#ifdef GL_FRAGMENT_PRECISION_HIGH + precision highp float; + precision highp sampler2D; +#else + precision mediump float; + precision mediump sampler2D; +#endif +${r?"out vec4 fragColor;":""} +`}const _m=`precision highp float; +precision highp sampler2D;`;function mm(r){return r.split(" ").map((t,e)=>e>0?t.charAt(0).toUpperCase()+t.slice(1):t).join("")}function gm(r,t){const e=[];for(e.push(t);e.length;){const s=e.pop();if(typeof s=="object"&&!r.has(s.uid)){r.add(s.uid);for(const i of s.children)e.push(i)}}}let Ce=class qn{constructor(){this.uid=qn.NodeCount++,this._debugName=null,this._isMutable=!1,this.isImplicit=!1}get isMutable(){return this._isMutable}setMutable(){return this._isMutable=!0,this}setDebugName(t){return t=mm(t),this._debugName=t,this.isImplicit&&this.children[0]instanceof qn&&this.children[0].setDebugName(t),this}get debugInfo(){return{name:this._debugName??""}}cloneInto(t){t._debugName=this._debugName,t._isMutable=this._isMutable,t.isImplicit=this.isImplicit,t.uid=this.uid}};function P(r){return typeof r=="object"?r.clone():r}Ce.NodeCount=0;let W=class extends Ce{constructor(){super(...arguments),this.shaderType="primitive-node"}},ym=class kl extends Ce{constructor(t){super(),this.child=t,this.shaderType="scope-node"}get children(){return[this.child]}clone(){const t=new kl(P(this.child));return this.cloneInto(t),t}},xm=class El extends Ce{constructor(t,e,s){super(),this.property=t,this.target=e,this.returnType=s,this.shaderType="property-access-node"}get children(){const t=[this.target];return typeof this.property!="string"&&t.push(this.property),t}clone(){const t=new El(this.property,P(this.target),this.returnType);return this.cloneInto(t),t}},bm=class Fl extends Ce{constructor(t,e,s){super(),this.condition=t,this.ifTrue=e,this.ifFalse=s,this.shaderType="condition-node"}get children(){return[this.condition,this.ifTrue,this.ifFalse]}clone(){const t=P(this.ifTrue),e=this.ifFalse?P(this.ifFalse):null,s=new Fl(this.condition,t,e);return this.cloneInto(s),s}},wm=class Al extends Ce{constructor(t,e,s,i){super(),this.captureList=t,this.returnType=e,this.generator=i,this.shaderType="block-node",s&&(this.subgraph=new ym(s))}get children(){return Object.keys(this.captureList).map(t=>this.captureList[t]).concat(this.subgraph??[])}clone(){const t={};for(const s in this.captureList)t[s]=P(this.captureList[s]);const e=new Al(t,this.returnType,this.subgraph?P(this.subgraph.child):this.subgraph,this.generator);return this.cloneInto(e),e}},we=class zl extends Ce{constructor(t,e,s,i,n,o=!1){super(),this.token=t,this._children=e,this.isInfix=s,this.isPropertyAccess=i,this.returnType=n,this.isTernary=o,this.shaderType="function-node"}get children(){return this._children}clone(){const t=new zl(this.token,this._children.map(P),this.isInfix,this.isPropertyAccess,this.returnType,this.isTernary);return this.cloneInto(t),t}};var Bs,jn,Yn,Wn,Xn,Hn,Zn,Kn,Qn,Jn,to,eo,so,io;function vm(r){const t=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const e of t)if(e.includes(r))return e.map(s=>Mm[s]);throw new Error("Unable to find type family")}function Ol(r){return new Proxy(r,{get(t,e){if(e==="constructor")return new Proxy(t.constructor,{construct:(s,i,n)=>Ol(new s(...i))});if(e in t)return t[e];if(typeof e=="string"){const s=vm(r.type);return pt(r,e,s[e.length-1])}}})}function mt(r){return new Proxy(r,{construct:(t,e,s)=>Ol(new t(...e))})}function Im(r){return new Proxy(r,{get(t,e){if(e in t)return t[e];if(typeof e=="string"){const s=parseInt(e,10);if(!isNaN(s))return pt(r,`[${s}]`,r.elementType.constructor)}}})}function Sm(r){return new Proxy(r,{construct:(t,e,s)=>Im(new t(...e))})}let ro=class extends Error{},$t=Bs=class extends W{constructor(r,t){super(),this.elementType=r,this.size=t,this.children=[],this.type="array"}clone(){const r=new Bs(this.elementType,this.size);return super.cloneInto(r),r}get(r){if(typeof r=="number"){const t=new ie(r);return t.isImplicit=!0,pt(this,t,this.elementType.constructor)}return pt(this,r,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(r,t,e){return Cm(this,r,t,e)}glslFindIndex(r,t,e){return km(this,r,t,e)}static ofType(r,t){const e={construct:(s,i)=>new Bs(new r,t)};return new Proxy(Bs,e)}};$t.type="array",$t=Bs=x([Sm],$t);let Ut=class Ll extends W{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}clone(){const t=new Ll;return t.children=this.children.map(P),super.cloneInto(t),t}};Ut.type="sampler2D";let w=class Be extends W{constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new Be(P(this.children[0]));return super.cloneInto(t),t}multiply(t){return oe(this,typeof t=="number"?X(t,Be):t)}divide(t){return mi(this,typeof t=="number"?X(t,Be):t)}add(t){return es(this,typeof t=="number"?X(t,Be):t)}subtract(t){return gi(this,typeof t=="number"?X(t,Be):t)}};w.type="float";let D=jn=class extends W{constructor(r,t){super(),this.type="vec2",this.children=[r,t].filter(e=>e!=null)}clone(){const r=new jn(P(this.children[0]),P(this.children[1]));return super.cloneInto(r),r}get 0(){return pt(this,"[0]",w)}get 1(){return pt(this,"[1]",w)}get 2(){throw new ro}get 3(){throw new ro}multiply(r){return oe(this,typeof r=="number"?X(r,w):r)}divide(r){return mi(this,typeof r=="number"?X(r,w):r)}add(r){return es(this,typeof r=="number"?X(r,w):r)}subtract(r){return gi(this,typeof r=="number"?X(r,w):r)}};D.type="vec2",D=jn=x([mt],D);let Z=Yn=class extends W{constructor(r,t,e){super(),this.type="vec3",this.children=[r,t,e].filter(s=>s!=null)}get 0(){return pt(this,"[0]",w)}get 1(){return pt(this,"[1]",w)}get 2(){return pt(this,"[2]",w)}get 3(){throw new ro}clone(){const r=new Yn(P(this.children[0]),P(this.children[1]),P(this.children[2]));return super.cloneInto(r),r}multiply(r){return oe(this,typeof r=="number"?X(r,w):r)}divide(r){return mi(this,typeof r=="number"?X(r,w):r)}add(r){return es(this,typeof r=="number"?X(r,w):r)}subtract(r){return gi(this,typeof r=="number"?X(r,w):r)}};Z.type="vec3",Z=Yn=x([mt],Z);let G=Wn=class extends W{constructor(r,t,e,s){super(),this.type="vec4",this.children=[r,t,e,s].filter(i=>i!=null)}clone(){const r=new Wn(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]));return super.cloneInto(r),r}get 0(){return pt(this,"[0]",w)}get 1(){return pt(this,"[1]",w)}get 2(){return pt(this,"[2]",w)}get 3(){return pt(this,"[3]",w)}multiply(r){return oe(this,typeof r=="number"?X(r,w):r)}divide(r){return mi(this,typeof r=="number"?X(r,w):r)}add(r){return es(this,typeof r=="number"?X(r,w):r)}subtract(r){return gi(this,typeof r=="number"?X(r,w):r)}};G.type="vec4",G=Wn=x([mt],G);let tr=Xn=class extends W{constructor(r){super(),this.type="uint",this.children=[r]}clone(){const r=new Xn(P(this.children[0]));return super.cloneInto(r),r}};tr.type="uint",tr=Xn=x([mt],tr);let er=Hn=class extends W{constructor(r,t){super(),this.type="uvec2",this.children=[r,t].filter(e=>e!=null)}clone(){const r=new Hn(P(this.children[0]),P(this.children[1]));return super.cloneInto(r),r}};er.type="uvec2",er=Hn=x([mt],er);let sr=Zn=class extends W{constructor(r,t,e){super(),this.type="uvec3",this.children=[r,t,e].filter(s=>s!=null)}clone(){const r=new Zn(P(this.children[0]),P(this.children[1]),P(this.children[2]));return super.cloneInto(r),r}};sr.type="uvec3",sr=Zn=x([mt],sr);let ir=Kn=class extends W{constructor(r,t,e,s){super(),this.type="uvec4",this.children=[r,t,e,s].filter(i=>i!=null)}clone(){const r=new Kn(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]));return super.cloneInto(r),r}};ir.type="uvec4",ir=Kn=x([mt],ir);let It=class Dl extends W{constructor(t){super(),this.type="bool",this.children=[t]}and(t){return oo(this,t)}or(t){return Gl(this,t)}clone(){const t=new Dl(P(this.children[0]));return super.cloneInto(t),t}};It.type="bool";let rr=Qn=class extends W{constructor(r,t){super(),this.type="bvec2",this.children=[r,t].filter(e=>e!=null)}all(){return ea(this)}any(){return sa(this)}clone(){const r=new Qn(P(this.children[0]),P(this.children[1]));return super.cloneInto(r),r}};rr.type="bvec2",rr=Qn=x([mt],rr);let nr=Jn=class extends W{constructor(r,t,e){super(),this.type="bvec3",this.children=[r,t,e].filter(s=>s!=null)}all(){return ea(this)}any(){return sa(this)}clone(){const r=new Jn(P(this.children[0]),P(this.children[1]),P(this.children[2]));return super.cloneInto(r),r}};function X(r,t){return typeof r=="number"?new t(r):r}nr.type="bvec3",nr=Jn=x([mt],nr);let or=to=class extends W{constructor(r,t,e,s){super(),this.type="bvec4",this.children=[r,t,e,s].filter(i=>i!=null)}all(){return ea(this)}any(){return sa(this)}clone(){const r=new to(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]));return super.cloneInto(r),r}};or.type="bvec4",or=to=x([mt],or);let ie=class Ge extends W{constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return oe(this,X(t,Ge))}add(t){return es(this,X(t,Ge))}subtract(t){return gi(this,X(t,Ge))}divide(t){return mi(this,X(t,Ge))}clone(){const t=new Ge(P(this.children[0]));return super.cloneInto(t),t}};ie.type="int";let ar=eo=class extends W{constructor(r,t){super(),this.type="ivec2",this.children=[r,t].filter(e=>e!=null)}clone(){const r=new eo(P(this.children[0]),P(this.children[1]));return super.cloneInto(r),r}};ar.type="ivec2",ar=eo=x([mt],ar);let hr=so=class extends W{constructor(r,t,e){super(),this.type="ivec3",this.children=[r,t,e].filter(s=>s!=null)}clone(){const r=new so(P(this.children[0]),P(this.children[1]),P(this.children[2]));return super.cloneInto(r),r}};hr.type="ivec3",hr=so=x([mt],hr);let cr=io=class extends W{constructor(r,t,e,s){super(),this.type="ivec4",this.children=[r,t,e,s].filter(i=>i!=null)}clone(){const r=new io(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]));return super.cloneInto(r),r}};cr.type="ivec4",cr=io=x([mt],cr);let Pm=class Rl extends W{constructor(t,e,s,i){super(),this.type="mat2",this.children=[t,e,s,i]}clone(){const t=new Rl(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]));return super.cloneInto(t),t}};Pm.type="mat2";class dt extends W{static identity(){return new dt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=oa(t),s=Vl(t);return new dt(s,e,0,Sr(e),s,0,0,0,1)}constructor(t,e,s,i,n,o,a,h,c){super(),this.type="mat3",this.children=[t,e,s,i,n,o,a,h,c]}add(t){return es(this,t)}multiply(t){return oe(this,t)}clone(){const t=new dt(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]),P(this.children[4]),P(this.children[5]),P(this.children[6]),P(this.children[7]),P(this.children[8]));return super.cloneInto(t),t}}dt.type="mat3";class Ys extends W{static identity(){return new Ys(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,s,i,n,o,a,h,c,l,u,d,p,f,_,m){super(),this.type="mat4",this.children=[t,e,s,i,n,o,a,h,c,l,u,d,p,f,_,m]}static fromColumns(t,e,s,i){return new Ys(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,s.x,s.y,s.z,s.w,i.x,i.y,i.z,i.w)}multiply(t){return oe(this,t)}clone(){const t=new Ys(P(this.children[0]),P(this.children[1]),P(this.children[2]),P(this.children[3]),P(this.children[4]),P(this.children[5]),P(this.children[6]),P(this.children[7]),P(this.children[8]),P(this.children[9]),P(this.children[10]),P(this.children[11]),P(this.children[12]),P(this.children[13]),P(this.children[14]),P(this.children[15]));return super.cloneInto(t),t}}Ys.type="mat4";const Mm={float:w,vec2:D,vec3:Z,vec4:G,int:ie,ivec2:ar,ivec3:hr,ivec4:cr,uint:tr,uvec2:er,uvec3:sr,uvec4:ir,bool:It,bvec2:rr,bvec3:nr,bvec4:or},ze=(...r)=>new ie(...r),q=(...r)=>new w(...r),no=(...r)=>new D(...r),$m=(...r)=>new Z(...r),Tm=(...r)=>new G(...r),lh=(...r)=>new dt(...r);function pt(r,t,e){const s=new e(new xm(t,r,e));return s.isImplicit=!0,s}function Tt(r,t,e,s=null){if(s){const n=new s,o=new s(new we(r,[t,e],!0,!1,n));return o.isImplicit=!0,o}if(t.type==="float"||t.type==="int"){const n=new e.constructor(new we(r,[t,e],!0,!1,e.constructor));return n.isImplicit=!0,n}if((t.type==="mat2"||t.type==="mat3"||t.type==="mat4")&&e.type!=="float"){const n=new e.constructor(new we(r,[t,e],!0,!1,e.constructor));return n.isImplicit=!0,n}const i=new t.constructor(new we(r,[t,e],!0,!1,t.constructor));return i.isImplicit=!0,i}function bt(r,t,e=t.constructor){const s=new e(new we(r,[t],!1,!1,e));return s.isImplicit=!0,s}function ke(r,t,e,s=t.constructor){const i=new s(new we(r,[t,e],!1,!1,s));return i.isImplicit=!0,i}function Nl(r,t,e,s,i=t.constructor){const n=new i(new we(r,[t,e,s],!1,!1,i));return n.isImplicit=!0,n}function Sr(r){return oe(r,q(-1))}function Bl(r,t,e,s){return new t(new wm(r,t,e,s))}function Cm(r,t,e=0,s=r.size){const i=new ie(e).setMutable().setDebugName("FindIndexIterator"),n=t(r.get(i)).setDebugName("FindIndexPredicate");return Bl({iter:i},ie,n,({out:a,iter:h,subgraph:c})=>` +${a} = -1; + +for (; ${h} < ${s}; ${h}++) { + +${c.body} + + if (${c.varName}) { + ${a} = ${h}; + break; + } + +} +`).setDebugName("FindIndexBlock")}function km(r,t,e=0,s=r.size){return Bl({array:r},ie,null,({out:n,array:o})=>` +${n} = -1; +for (int i = ${e}; i < ${s}; i++) { + bool condition; + ${t({array:o,i:"i",out:"condition"})} + if (condition) { + ${n} = i; + break; + } +} +`).setDebugName("GlslFindIndexBlock")}function K(r,t,e){const s=typeof t=="function"?t():t,i=typeof e=="function"?e():e,n=new s.constructor(new bm(r,s,i));return n.isImplicit=!0,n}function _i(...r){const t=r.map(([a,h])=>typeof h=="function"?[a,h()]:[a,h]),e=t[0][1].constructor,s=t.findIndex(a=>a[0]===!0);if(s===-1)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=t.slice(0,s),n=t[s][1],o=new e(i.reduceRight((a,h)=>K(h[0],h[1],a),n));return o.isImplicit=!0,o}function oe(r,t){return Tt("*",r,t)}function mi(r,t){return Tt("/",r,t)}function es(r,t){return Tt("+",r,t)}function gi(r,t){return Tt("-",r,t)}function ta(r,t){return Tt("==",r,t,It)}function Em(r,t){return Tt("<",r,t,It)}function qr(r,t){return Tt("<=",r,t,It)}function wt(r,t){return Tt(">",r,t,It)}function jr(r,t){return Tt(">=",r,t,It)}function Gl(...r){return r.length<=1?r[0]:r.slice(1).reduce((t,e)=>Fm(t,e),r[0])}function Fm(r,t){return Tt("||",r,t,It)}function oo(...r){return r.length<=1?r[0]:r.slice(1).reduce((t,e)=>Am(t,e),r[0])}function Am(r,t){return Tt("&&",r,t,It)}function zm(r){return bt("abs",r)}function ea(r){return bt("all",r,It)}function sa(r){return bt("any",r,It)}function Om(r){return bt("ceil",r)}function ia(r,t,e){return Nl("clamp",r,t,e,r.constructor)}function Vl(r){return bt("cos",r)}function Lm(r,t){return ke("distance",r,t,w)}function ra(r,t){return ke("dot",r,t,w)}function Dm(r){return bt("floor",r)}function Ul(r){return bt("fract",r)}function ql(r){return bt("length",r,w)}function na(r,t){return ke("max",r,t)}function ao(r,t){return ke("min",r,t)}function ss(r,t,e){return Nl("mix",r,t,e)}function is(r,t){return ke("mod",r,t)}function Rm(r){return bt("normalize",r)}function Nm(r){return r.type==="bool"?bt("!",r):bt("not",r)}function oa(r){return bt("sin",r)}function ee(r,t){return ke("step",r,t,t.constructor)}function qt(r,t){return ke("texture2D",r,t,G)}const ds=5;function tt(r,t,e){const s=t.split(` +`);for(const i of s)if(i.trim().length){{let n="";e!=null&&(n+=`/*id:${e??"000"}*/ `),r.body+=n.padEnd(14)}r.body+=" ".repeat(r.indent)+i+` +`}}let uh=class{write(t){for(const e of t.rootOutputNodes())t.shouldPruneOutputNode(e)||(e.variableName=this._write(t,e.node));return t}_createVarName(t,e){let s="";return typeof e!="boolean"&&typeof e!="number"&&e.debugInfo.name&&(s=`${e.debugInfo.name}_`),`${s}v${t.varCount++}`}_write(t,e,s=!1){if(typeof e=="number"||typeof e=="boolean")return e.toString();let i=t.getEmit(e);if(i)return i;switch(e.shaderType){case"scope-node":i=this._writeScopeNode(t,e);break;case"primitive-node":i=this._writePrimitiveNode(t,e,s);break;case"function-node":i=this._writeFunctionNode(t,e);break;case"property-access-node":i=this._writePropertyAccessNode(t,e);break;case"text-node":i=e.text;break;case"block-node":i=this._writeBlockNode(t,e);break;case"condition-node":i=this._writeConditionNode(t,e)}return t.setEmit(e,i),i}_writeScopeNode(t,e){const s=new e.child.constructor;s.setDebugName(e.debugInfo.name);const i=this._write(t,s,!0);return tt(t,`{ /*ScopeStart: ${e.uid} ${e.debugInfo.name}*/`),t.indent+=2,tt(t,`${i} = ${this._write(t,e.child)};`),t.indent-=2,tt(t,`} /*ScopeEnd: ${e.uid} ${e.debugInfo.name}*/`),i}_writeConditionNode(t,e){const s=new e.ifTrue.constructor,i=this._write(t,s,!0);tt(t,`if (${this._write(t,e.condition)}) {`),t.indent+=2;const n=t.createSubgraphContext(),o=this._write(n,e.ifTrue);if(t.body+=n.body,o&&tt(t,`${i} = ${o};`),t.indent-=2,tt(t,"}"),e.ifFalse){tt(t,"else {"),t.indent+=2;const a=t.createSubgraphContext(),h=this._write(a,e.ifFalse);t.body+=a.body,h&&tt(t,`${i} = ${h};`),t.indent-=2,tt(t,"}")}return i}_writeBlockNode(t,e){const{captureList:s,generator:i,returnType:n}=e,o={};for(const l in s){if(!s[l])continue;const u=this._write(t,s[l]);o[l]=u}const a=new n,h=this._write(t,a,!0);if(o.out=h,e.subgraph){const l=t.createSubgraphContext(),u=this._write(l,e.subgraph.child),d=l.body;o.subgraph={varName:u,body:d}}const c=i(o);return tt(t,`{ +`),t.indent+=2,tt(t,c),t.indent-=2,tt(t,`} +`),h}_writePropertyAccessNode(t,e){const s=this._write(t,e.target);return typeof e.property=="string"&&e.property.includes("[")?`${s}${e.property}`:typeof e.property!="string"?`${s}[${this._write(t,e.property)}]`:`${s}.${e.property}`}_writeFunctionNode(t,e){const s=e.returnType.type;if(e.isInfix){const[o,a]=e.children.map(c=>this._write(t,c)),h=this._createVarName(t,e);return tt(t,`${s.padEnd(ds)} ${h} = ${o} ${e.token} ${a};`,e.uid),h}const i=e.children.map(o=>this._write(t,o)).join(", "),n=this._createVarName(t,e);return tt(t,`${s.padEnd(ds)} ${n} = ${e.token}(${i});`,e.uid),n}_writePrimitiveNode(t,e,s=!1){var c;const i=t.getInput(e);if(i)return i.isUsed=!0,i.variableName;const n=e.children.length===1&&((c=e.children[0])==null?void 0:c.type)===e.type;if(e.isImplicit||n)return this._write(t,e.children[0]);const o=this._createVarName(t,e);if(s)return tt(t,`${e.type.padEnd(ds)} ${o};`,e.uid),o;const a=!e.debugInfo.name&&!e.isMutable;if(a&&e.type==="float"&&typeof e.children[0]=="number")return Number.isInteger(e.children[0])?e.children[0].toFixed(1):e.children[0].toString();if(a&&e.type==="int"&&typeof e.children[0]=="number"&&Number.isInteger(e.children[0]))return e.children[0].toString();const h=e.children.map(l=>this._write(t,l)).join(", ");return e.type==="array"?(tt(t,`${e.type.padEnd(ds)} ${o} = [${h}];`,e.uid),o):a?`${e.type}(${h})`:(tt(t,`${e.type.padEnd(ds)} ${o} = ${e.type}(${h});`,e.uid),o)}},Oe=class jl{constructor(t,e,s){this.variableName=t,this.variableInputType=e,this.node=s,this.type="shader-input",this.isUsed=!1}clone(){return new jl(this.variableName,this.variableInputType,P(this.node))}},ps=class Yl{constructor(t,e,s){this.outVariableName=t,this.outVariableType=e,this.node=s,this.type="shader-output"}clone(){const t=new Yl(this.outVariableName,this.outVariableType,P(this.node));return t.variableName=this.variableName,t}},dh=class lr{static createVertex(t,e,s,i,n,o){const a=[];for(const c in t){const l=t[c],u=s.get(c);u?a.push(new Oe(u,"builtin",l)):a.push(new Oe("a_"+c,"attribute",l))}for(const c of i){const l=c.uniformHydrated;a.push(new Oe(c.uniformName,"uniform",l))}const h=[];for(const c in e){const l=e[c];c==="glPosition"?h.push(new ps("gl_Position","builtin",l)):c==="glPointSize"?h.push(new ps("gl_PointSize","builtin",l)):h.push(new ps("v_"+c,"varying",l))}return new lr(a,h,n,o)}static createFragment(t,e,s,i,n,o){const a=[],h=Array.from(n.rootOutputNodes());for(const l in t){const u=t[l],d=s.get(l);if(d){a.push(new Oe(d,"builtin",u));continue}const p=h.find(f=>f.node===u);p&&a.push(new Oe(p.outVariableName,p.outVariableType,u))}for(const l of i){const u=l.uniformHydrated;a.push(new Oe(l.uniformName,"uniform",u))}const c=[];for(const l in e){const u=e[l],d=s.get(l);if(l==="discard")c.push(new ps(null,"discard",u));else{if(!d)throw new Error(`Member ${l} in shader fragment output shoule be tagged as builtin`);c.push(new ps(d,"builtin",u))}}return new lr(a,c,o)}constructor(t,e,s,i){this.type="shader-graph-context",this.indent=0,this.body="",this.varCount=0,this._inputShaderTypesByNodeUid=new Map,this._nodeEmitMap=new Map;for(const n of t)this._inputShaderTypesByNodeUid.set(n.node.uid,n);this._outputShaderTypes=e,this._transformFeedbackBindings=s,this._transformFeedbackNames=new Set(s.map(n=>"v_"+n.propertyKey)),this._usedInFragmentShader=i}shouldPruneOutputNode(t){return!!this._usedInFragmentShader&&t.outVariableType!=="builtin"&&!this._transformFeedbackNames.has(t.outVariableName)&&!this._usedInFragmentShader.has(t.node.uid)}setEmit(t,e){this._nodeEmitMap.set(t.uid,e)}getEmit(t){return this._nodeEmitMap.get(t.uid)}inputs(){return this._inputShaderTypesByNodeUid.values()}getInput(t){return this._inputShaderTypesByNodeUid.get(t.uid)}*rootOutputNodes(){for(const t of this._outputShaderTypes)yield t}*nodes(){const t=[];for(const e of this._outputShaderTypes.values())t.push(e.node);for(;t.length;){const e=t.pop();typeof e!="number"&&typeof e!="boolean"&&t.push(...e.children.filter(Boolean)),yield e}}*nodesOfTypeOrFunction(){for(const t of this.nodes())typeof t!="number"&&typeof t!="boolean"&&(yield t)}createSubgraphContext(){const t=this.clone();return t.body="",t.indent=this.indent+2,t._nodeEmitMap=new Map(this._nodeEmitMap),t}clone(){const t=new lr([],this._outputShaderTypes,this._transformFeedbackBindings,this._usedInFragmentShader);return t._inputShaderTypesByNodeUid=this._inputShaderTypesByNodeUid,t.indent=this.indent,t.body=this.body,t.varCount=this.varCount,t._nodeEmitMap=this._nodeEmitMap,t}insertVertexShader(t){t.vertex.code.add(""),this._insertInputs(t,"vertex"),t.vertex.code.add(""),t.vertex.code.add("// OUTPUTS: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this.rootOutputNodes()){const s=e.outVariableType==="builtin";this.shouldPruneOutputNode(e)||(s?t.vertex.code.add(`// ${e.outVariableType.padEnd(7)} ${e.node.type.padEnd(9)} ${e.outVariableName};`):t.vertex.code.add(`${e.outVariableType.padEnd(10)} ${e.node.type.padEnd(9)} ${e.outVariableName};`))}t.vertex.code.add(""),t.vertex.code.add("void main() {"),t.vertex.code.add(" "+this.body.split(` +`).join(` + `));for(const e of this.rootOutputNodes())this.shouldPruneOutputNode(e)||t.vertex.code.add(` ${e.outVariableName} = ${e.variableName};`);t.vertex.code.add("}")}insertFragmentShader(t){this._insertInputs(t,"fragment"),t.fragment.code.add(""),t.fragment.code.add("void main() {"),t.fragment.code.add(" "+this.body.split(` +`).join(` + `));for(const e of this.rootOutputNodes())e.outVariableType==="discard"?(t.fragment.code.add(" // TODO: Should ensure codegen for discard appears first in fragment shader"),t.fragment.code.add(` if (${e.variableName}) {`),t.fragment.code.add(" discard;"),t.fragment.code.add(" }"),t.fragment.code.add(" ")):t.fragment.code.add(` ${e.outVariableName} = ${e.variableName};`);t.fragment.code.add("}")}_insertInputs(t,e){t[e].code.add("// INPUTS: "),t[e].code.add("// --------------------------------------------------------- ");for(const s of this.inputs())s.isUsed&&s.variableInputType!=="builtin"&&(s.node.type==="array"?t[e].code.add(`${s.variableInputType.padEnd(10)} ${s.node.elementType.type.padEnd(9)} ${s.variableName}[${s.node.size}];`):t[e].code.add(`${s.variableInputType.padEnd(10)} ${s.node.type.padEnd(9)} ${s.variableName};`))}};const Bm=["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"];var Pt=999,ph=9999,pn=0,fn=1,fh=2,_h=3,mh=4,Di=5,Gm=6,Vm=7,Um=8,gh=9,qm=10,yh=11,jm=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function Ym(){var r,t,e,s=0,i=0,n=Pt,o=[],a=[],h=1,c=0,l=0,u=!1,d=!1,p="";return function(A){return a=[],A!==null?_(A.replace?A.replace(/\r\n/g,` +`):A):m()};function f(A){A.length&&a.push({type:jm[n],data:A,position:l,line:h,column:c})}function _(A){var Q;for(s=0,e=(p+=A).length;r=p[s],s0)continue;ct=A.slice(0,1).join("")}return f(ct),l+=ct.length,(o=o.slice(ct.length)).length}}function F(){return/[^a-fA-F0-9]/.test(r)?(f(o.join("")),n=Pt,s):(o.push(r),t=r,s+1)}function T(){return r==="."||/[eE]/.test(r)?(o.push(r),n=Di,t=r,s+1):r==="x"&&o.length===1&&o[0]==="0"?(n=yh,o.push(r),t=r,s+1):/[^\d]/.test(r)?(f(o.join("")),n=Pt,s):(o.push(r),t=r,s+1)}function L(){return r==="f"&&(o.push(r),t=r,s+=1),/[eE]/.test(r)||r==="-"&&/[eE]/.test(t)?(o.push(r),t=r,s+1):/[^\d]/.test(r)?(f(o.join("")),n=Pt,s):(o.push(r),t=r,s+1)}function H(){if(/[^\d\w_]/.test(r)){var A=o.join("");return n=Op.indexOf(A)>-1?Um:Lp.indexOf(A)>-1?Vm:Gm,f(o.join("")),n=Pt,s}return o.push(r),t=r,s+1}}function Wm(r){var t=Ym(),e=[];return e=(e=e.concat(t(r))).concat(t(null))}function Xm(r){return Wm(r)}function Hm(r){return r.map(t=>t.type!=="eof"?t.data:"").join("")}const _n=new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]);function Zm(r,t="100",e="300 es"){const s=/^\s*#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/;for(const i of r)if(i.type==="preprocessor"){const n=s.exec(i.data);if(n){const o=n[1].replaceAll(/\s{2,}/g," ");if(o===e)return o;if(o===t)return i.data="#version "+e,t;throw new Error("unknown glsl version: "+o)}}return r.splice(0,0,{type:"preprocessor",data:"#version "+e},{type:"whitespace",data:` +`}),null}function Km(r,t){for(let e=t-1;e>=0;e--){const s=r[e];if(s.type!=="whitespace"&&s.type!=="block-comment"){if(s.type!=="keyword")break;if(s.data==="attribute"||s.data==="in")return!0}}return!1}function Gs(r,t,e,s){s=s||e;for(const i of r)if(i.type==="ident"&&i.data===e)return s in t?t[s]++:t[s]=0,Gs(r,t,s+"_"+t[s],s);return e}function Wl(r,t,e="afterVersion"){function s(h,c){for(let l=c;lh=0;--a){const h=e[a];if(h.type==="preprocessor"){const c=h.data.match(/#extension\s+(.*):/);if(c!=null&&c[1]&&_n.has(c[1].trim())){const d=e[a+1];e.splice(a,d&&d.type==="whitespace"?2:1)}const l=h.data.match(/#ifdef\s+(.*)/);l!=null&&l[1]&&_n.has(l[1].trim())&&(h.data="#if 1");const u=h.data.match(/#ifndef\s+(.*)/);u!=null&&u[1]&&_n.has(u[1].trim())&&(h.data="#if 0")}}return eg(r,Hm(e))}function eg(r,t){return t}const sg=4294967295;let ig=class{constructor(t,e,s,i,n=new Map,o=[]){var c;this._context=t,this._locations=i,this._uniformBlockBindings=n,this._transformFeedbackVaryings=o,this._refCount=1,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,t||console.error("RenderingContext isn't initialized!"),e.length===0&&console.error("Shaders source should not be empty!"),e=xh(e,Mt.VERTEX_SHADER),s=xh(s,Mt.FRAGMENT_SHADER),this._vShader=bh(this._context,Mt.VERTEX_SHADER,e),this._fShader=bh(this._context,Mt.FRAGMENT_SHADER,s),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(ae.Shader,this),Cn()&&(this.vertexShader=e,this.fragmentShader=s),this.usedMemory=e.length+s.length;const a=this._context.gl,h=a.createProgram();a.attachShader(h,this._vShader),a.attachShader(h,this._fShader),this._locations.forEach((l,u)=>a.bindAttribLocation(h,l,u)),(c=this._transformFeedbackVaryings)!=null&&c.length&&a.transformFeedbackVaryings(h,this._transformFeedbackVaryings,a.SEPARATE_ATTRIBS),a.linkProgram(h),Cn()&&!a.getProgramParameter(h,a.LINK_STATUS)&&console.error(`Could not link shader +validated: ${a.getProgramParameter(h,a.VALIDATE_STATUS)}, gl error ${a.getError()}, vertex: ${a.getShaderParameter(this._vShader,a.COMPILE_STATUS)}, fragment: ${a.getShaderParameter(this._fShader,a.COMPILE_STATUS)}, info log: ${a.getProgramInfoLog(h)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(const[l,u]of this._uniformBlockBindings){const d=a.getUniformBlockIndex(h,l);d0)return;const t=this._context.gl,e=this._context.instanceCounter;this._nameToUniformLocation.forEach(s=>s&&e.decrement(ae.Uniform,s)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(e.decrement(ae.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),t.deleteShader(this._vShader),this._vShader=null,e.decrement(ae.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,e.decrement(ae.Program,this))}ref(){++this._refCount}_getUniformLocation(t){const e=this._nameToUniformLocation.get(t);if(e!==void 0)return e;if(this.glName){const s=this._context.gl.getUniformLocation(this.glName,t);return this._nameToUniformLocation.set(t,s),s&&this._context.instanceCounter.increment(ae.Uniform,s),s}return null}hasUniform(t){return this._getUniformLocation(t)!=null}setUniform1i(t,e){const s=this._nameToUniform1.get(t);s!==void 0&&e===s||(this._context.gl.uniform1i(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1iv(t,e){Ft(this._nameToUniform1v,t,e)&&this._context.gl.uniform1iv(this._getUniformLocation(t),e)}setUniform2iv(t,e){Ft(this._nameToUniform2,t,e)&&this._context.gl.uniform2iv(this._getUniformLocation(t),e)}setUniform3iv(t,e){Ft(this._nameToUniform3,t,e)&&this._context.gl.uniform3iv(this._getUniformLocation(t),e)}setUniform4iv(t,e){Ft(this._nameToUniform4,t,e)&&this._context.gl.uniform4iv(this._getUniformLocation(t),e)}setUniform1f(t,e){const s=this._nameToUniform1.get(t);s!==void 0&&e===s||(this._context.gl.uniform1f(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1fv(t,e){Ft(this._nameToUniform1v,t,e)&&this._context.gl.uniform1fv(this._getUniformLocation(t),e)}setUniform2f(t,e,s){const i=this._nameToUniform2.get(t);i===void 0?(this._context.gl.uniform2f(this._getUniformLocation(t),e,s),this._nameToUniform2.set(t,[e,s])):e===i[0]&&s===i[1]||(this._context.gl.uniform2f(this._getUniformLocation(t),e,s),i[0]=e,i[1]=s)}setUniform2fv(t,e){Ft(this._nameToUniform2,t,e)&&this._context.gl.uniform2fv(this._getUniformLocation(t),e)}setUniform3f(t,e,s,i){const n=this._nameToUniform3.get(t);n===void 0?(this._context.gl.uniform3f(this._getUniformLocation(t),e,s,i),this._nameToUniform3.set(t,[e,s,i])):e===n[0]&&s===n[1]&&i===n[2]||(this._context.gl.uniform3f(this._getUniformLocation(t),e,s,i),n[0]=e,n[1]=s,n[2]=i)}setUniform3fv(t,e){const s=this._getUniformLocation(t);s!=null&&Ft(this._nameToUniform3,t,e)&&this._context.gl.uniform3fv(s,e)}setUniform4f(t,e,s,i,n){const o=this._nameToUniform4.get(t);o===void 0?(this._context.gl.uniform4f(this._getUniformLocation(t),e,s,i,n),this._nameToUniform4.set(t,[e,s,i,n])):o!==void 0&&e===o[0]&&s===o[1]&&i===o[2]&&n===o[3]||(this._context.gl.uniform4f(this._getUniformLocation(t),e,s,i,n),o[0]=e,o[1]=s,o[2]=i,o[3]=n)}setUniform4fv(t,e){const s=this._getUniformLocation(t);s!=null&&Ft(this._nameToUniform4,t,e)&&this._context.gl.uniform4fv(s,e)}setUniformMatrix3fv(t,e,s=!1){const i=this._getUniformLocation(t);i!=null&&Ft(this._nameToUniformMatrix3,t,e)&&this._context.gl.uniformMatrix3fv(i,s,e)}setUniformMatrix4fv(t,e,s=!1){const i=this._getUniformLocation(t);i!=null&&Ft(this._nameToUniformMatrix4,t,e)&&this._context.gl.uniformMatrix4fv(i,s,e)}stop(){}};function bh(r,t,e){const s=r.gl,i=s.createShader(t);return s.shaderSource(i,e),s.compileShader(i),Cn()&&!s.getShaderParameter(i,s.COMPILE_STATUS)&&(console.error("Compile error in ".concat(t===Mt.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(s.getShaderInfoLog(i)),console.error(rg(e))),i}function rg(r){let t=2;return r.replaceAll(` +`,()=>` +`+ng(t++)+":")}function ng(r){return r>=1e3?r.toString():(" "+r).slice(-3)}function Ft(r,t,e){const s=r.get(t);if(!s)return r.set(t,Array.from(e)),!0;const i=e.length;if(s.length!==i)return r.set(t,Array.from(e)),!0;for(let n=0;n_t.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function fs(r,t,e){const s=t.length;if(s!==e){const i=new rt("Invalid Uniform",`Invalid length, expected ${e} but got ${s}`,{uniformName:r,values:t});og().errorOnce(i)}}let wh=class{constructor(t,e,s,i,n,o){this._program=null,this._vao=null,this._temporaryTextures=[],this.vertexShader=t,this.fragmentShader=e,this._locations=s,this._locationInfo=i,this._uniformBindings=n,this._transformFeedbackBindings=o}destroy(){this._program&&this._program.dispose(),this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(t){this._uniforms=t}cleanupTemporaryTextures(){for(const t of this._temporaryTextures)t.dispose();this._temporaryTextures=[]}bind(t){const e=this._uniforms;if(!this._program){const i=new Map;for(const[o,a]of this._locations)i.set(o,a);const n=[];for(const o of this._transformFeedbackBindings??[]){const{index:a,propertyKey:h}=o;n[a]=`v_${h}`}this._program=new ig(t,this.vertexShader,this.fragmentShader,i,new Map,n)}const s=this._program;t.useProgram(s);for(const i of this._uniformBindings){const{shaderModulePath:n,uniformName:o,uniformType:a,uniformArrayLength:h}=i,c=ed(n,e);if(c==null){if(a==="sampler2D")continue;throw new Error(`Failed to find uniform value for ${n}`)}switch(a==="array"?i.uniformArrayElementType:a){case"sampler2D":{const{unit:l,texture:u}=c;if(s.setUniform1i(o,l),"type"in u)t.bindTexture(u,l);else{const d=Np(t,u.descriptor,u.data);t.bindTexture(d,l)}break}case"int":if(!h){s.setUniform1i(o,c);break}fs(i.uniformName,c,h),s.setUniform1iv(o,c);break;case"float":if(!h){s.setUniform1f(o,c);break}fs(i.uniformName,c,h),s.setUniform1fv(o,c);break;case"vec2":if(!h){s.setUniform2f(o,c[0],c[1]);break}fs(i.uniformName,c,h),s.setUniform2fv(o,c.flat());break;case"vec3":if(!h){s.setUniform3f(o,c[0],c[1],c[2]);break}fs(i.uniformName,c,h),s.setUniform3fv(o,c.flat());break;case"vec4":if(!h){s.setUniform4f(o,c[0],c[1],c[2],c[3]);break}fs(i.uniformName,c,h),s.setUniform4fv(o,c.flat());break;case"mat3":s.setUniformMatrix3fv(o,c.flat());break;case"mat4":s.setUniformMatrix4fv(o,c.flat());break;default:throw new Error(`Unable to set uniform for type ${a}`)}}}};function _s(r){return new r}function rs(r,t,e){const s=r.constructor[t]??[];r.constructor.hasOwnProperty(t)||Object.defineProperty(r.constructor,t,{value:s.slice()}),r.constructor[t].push(e)}function O(r,t){return(e,s)=>{rs(e,"locations",{typeCtor:t,propertyKey:s,parameterIndex:null,index:r})}}const ag=r=>(t,e)=>{rs(t,"builtins",{builtin:r,propertyKey:e})},Y=r=>(t,e,s)=>{rs(t,"inputs",{inputCtor:r,propertyKey:e,parameterIndex:s})},$=r=>(t,e)=>{rs(t,"uniforms",{typeCtor:r,propertyKey:e})},nt=r=>(t,e)=>{rs(t,"options",{typeCtor:r,propertyKey:e})},vh=(r,t)=>{rs(r,"defines",{propertyKey:t})},ho=(r,t)=>(e,s)=>{e.constructor.builtins.push({builtin:r,propertyKey:s,typeCtor:t})};let co=class{};co.builtins=[],x([ho("gl_VertexID",ie)],co.prototype,"glVertexID",void 0);let hg=class{},Ws=class{};Ws.builtins=[],x([ho("gl_FragCoord",G)],Ws.prototype,"glFragCoord",void 0),x([ho("gl_PointCoord",D)],Ws.prototype,"glPointCoord",void 0);let Xl=class{};x([ag("gl_FragColor")],Xl.prototype,"glFragColor",void 0);let gt=class{constructor(){this.type="uniform-group"}get _uniforms(){return this.constructor.uniforms??[]}},cg=class{constructor(){this.logShader=!1,this.computeAttributes={}}get vertexInput(){const t=this._shaderModuleClass.inputs.findLast(e=>e.propertyKey==="vertex"&&e.parameterIndex===0);if(!t)throw new Error("Unable to find vertex input parameter");return t}get computeInput(){return this._shaderModuleClass.inputs.findLast(t=>t.propertyKey==="vertex"&&t.parameterIndex===1)}get fragmentInput(){const t=this._shaderModuleClass.inputs.findLast(e=>e.propertyKey==="fragment");if(!t)throw new Error("Unable to find fragment input parameter");return t}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){var t;return[...this.vertexInput.inputCtor.locations,...((t=this.computeInput)==null?void 0:t.inputCtor.locations)??[]]}get locationsMap(){const t=new Map,e=new Set;for(const s of this.locations)e.has(s.index)?_t.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${s.propertyKey} to ${s.index}. Index already in use`,{locationsMap:t}):(t.set(s.propertyKey,s.index),e.add(s.index));return t}get locationInfo(){if(!this._locationInfo){const t=this.locationsMap,e=Array.from(t.entries()).map(([n,o])=>`${n}.${o}`).join("."),s=ui(e),i=this.computeAttributes;this._locationInfo={hash:s,locations:t,computeAttributeMap:i}}return this._locationInfo}get renamedLocationsMap(){const t=new Map;for(const e of this.locations)t.set("a_"+e.propertyKey,e.index);return t}get optionPropertyKeys(){if(!this._optionPropertyKeys){const t=new Set;for(const e of this._options)t.add(e.propertyKey);this._optionPropertyKeys=t}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}getProgram(t,e,s,i){try{const{vertex:n,fragment:o,uniformBindings:a}=this._generateShaders(t,e,s,i);return new wh(n,o,this.renamedLocationsMap,this.locationInfo,a,this.transformFeedbackBindings)}catch{return new wh("","",this.renamedLocationsMap,this.locationInfo,[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(t){const e=this._options.find(i=>i.propertyKey===t);if(e)return{type:"option",className:e.typeCtor};const s=this._uniforms.find(i=>i.propertyKey===t);if(!s)throw new Error(`Unable to find uniform class type for property: ${t}`);return{type:"required",className:s.typeCtor}}getShaderKey(t,e,s,i){const n=Object.keys(t).map(c=>`${c}.${t[c]}`).join("."),o=Object.keys(s).map(c=>`${c}.${s[c]}`).join("."),a=Object.keys(i).map(c=>`${c}.${i[c]}`).join("."),h=Object.keys(e).filter(c=>this.optionPropertyKeys.has(c)&&e[c]).join(".");return`${this.constructor.name}.${n}.${o}.${a}.${h}`}_generateShaders(t,e,s,i){const n=[];this._setDefines(s),this._setOptionalUniforms(n,e),this._setRequiredUniforms(n);const o=this._hydrateVertexInput(i),a=this._injectPackPrecisionFactor(o,t),h=this._hydrateComputeInput(),c=h&&this._injectComputePackPrecisionFactor(h,t),l=this.vertex(a,c),u=this._hydrateFragmentInput(l),d=this.fragment(u),p=new Set;for(const S in d){const M=d[S];gm(p,M)}const f=this._getVertexInputBuiltins(),_=dh.createVertex({...o,...h},l,f,n,this.transformFeedbackBindings,p);new uh().write(_);const m=this._getFragmentInputBuiltins(d);m.set("glPointCoord","gl_PointCoord");const g=dh.createFragment(u,d,m,n,_,this.transformFeedbackBindings);new uh().write(g);const y=this._createShaderBuilder(_,g),b=y.generate("vertex",!1),v=y.generate("fragment",!1);return this.logShader&&(console.log(b),console.log(v)),{vertex:b,fragment:v,uniformBindings:n}}_setDefines(t){for(const e in t)this[e]=t[e]}_setOptionalUniforms(t,e){for(const s of this._options)e[s.propertyKey]?this[s.propertyKey]=this._hydrateUniformGroup(t,s):this[s.propertyKey]=null}_setRequiredUniforms(t){for(const e of this._uniforms)this[e.propertyKey]=this._hydrateUniformGroup(t,e)}_hydrateUniformGroup(t,e){const s=new e.typeCtor;for(const i of s._uniforms??[]){const n=_s(i.typeCtor),o=`u_${e.propertyKey}_${i.propertyKey}`,a=n.type,h=[e.propertyKey,i.propertyKey].join(".");if("type"in i.typeCtor&&i.typeCtor.type==="array"){const c=n;t.push({shaderModulePath:h,uniformName:o,uniformType:a,uniformArrayLength:c.size,uniformArrayElementType:c.elementType.type,uniformHydrated:n})}else t.push({shaderModulePath:h,uniformName:o,uniformType:a,uniformHydrated:n});s[i.propertyKey]=n}return s}_hydrateVertexInput(t){const e=this.vertexInput.inputCtor,s=e.locations.reduce((i,n)=>t[n.propertyKey]===!1?i:{...i,[n.propertyKey]:_s(n.typeCtor)},{});for(const{propertyKey:i,typeCtor:n}of e.builtins){const o=_s(n);s[i]=o}return s}_hydrateComputeInput(){return this.computeInput==null?null:this.computeInput.inputCtor.locations.reduce((t,e)=>({...t,[e.propertyKey]:_s(e.typeCtor)}),{})}_injectPackPrecisionFactor(t,e){const s={};for(const i in t){const n=t[i],o=e[i];if(o){if(n.type!=="float"&&n.type!=="vec2"&&n.type!=="vec3"&&n.type!=="vec4")throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${n.type}`);s[i]=n.divide(new w(o))}else s[i]=n}return s}_injectComputePackPrecisionFactor(t,e){const s={},i=new Map;for(const n in this.computeAttributes)for(const o of this.computeAttributes[n]??[])i.set(o,n);for(const n in t){const o=t[n],a=i.get(n);if(!a)continue;const h=e[a];if(h){if(o.type!=="float"&&o.type!=="vec2"&&o.type!=="vec3"&&o.type!=="vec4")throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${o.type}`);s[n]=o.divide(new w(h))}else s[n]=o}return s}_hydrateFragmentInput(t){const e={};for(const s in t)e[s]=t[s];for(const{propertyKey:s,typeCtor:i}of Ws.builtins){const n=_s(i);e[s]=n}return e}_getVertexInputBuiltins(){const t=this.vertexInput.inputCtor,e=new Map;for(const{builtin:s,propertyKey:i}of t.builtins)e.set(i,s);return e}_getFragmentInputBuiltins(t){const e=t.constructor,s=new Map;for(const i of e.builtins??[])s.set(i.propertyKey,i.builtin);return s}_createShaderBuilder(t,e){const s=new cm;return this._insertDebugInfo(s),t.insertVertexShader(s),e.insertFragmentShader(s),s}_insertDebugInfo(t){t.vertex.code.add("// DEFINES: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._defines)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`);t.vertex.code.add(""),t.vertex.code.add("// OPTIONS: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._options)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`)}},Qt=class extends li{constructor(){super(...arguments),this.color=new Xe([0,255,255]),this.haloOpacity=1,this.fillOpacity=.25,this.multiHighlightEnabled=!1}equals(t){return this.color.equals(t.color)&&(this.haloColor||this.color).equals(t.haloColor||t.color)&&this.haloOpacity===t.haloOpacity&&this.fillOpacity===t.fillOpacity&&this.multiHighlightEnabled===t.multiHighlightEnabled}};x([ot({type:Xe})],Qt.prototype,"color",void 0),x([ot({type:Xe})],Qt.prototype,"haloColor",void 0),x([ot()],Qt.prototype,"haloOpacity",void 0),x([ot()],Qt.prototype,"fillOpacity",void 0),x([ot()],Qt.prototype,"multiHighlightEnabled",void 0),Qt=x([ci("esri.views.2d.support.HighlightOptions")],Qt);const Ih=Qt,lg={selection:r=>new Ih({color:new Xe([r.color.r/2,r.color.g/2,r.color.b/2,r.color.a])}),highlight:r=>r,popup:r=>new Ih({color:new Xe([r.color.g,r.color.b,r.color.r,r.color.a])})},Xs=Object.keys(lg);function Sh(r){const t=q(12.9898),e=q(78.233),s=q(43758.5453),i=ra(r,no(t,e)),n=is(i,q(3.14));return Ul(oa(n).multiply(s))}function $e(r){return ta(r,q(Il))}function ug(r,t){return r.x.multiply(t.y).subtract(t.x.multiply(r.y))}function dg(r){return r.multiply(2).subtract(1)}function Ee(r,t){const e=q(2**t);return is(Dm(r.divide(e)),q(2))}function mn(r,t){return Ee(r,t+Xs.length)}function pg(r,t){return Ee(r,t)}function fg(r){const t=Ee(r.z,7),e=q(1).subtract(t),s=r.xyz.subtract($m(0,0,q(128)));return e.multiply(r).add(t.multiply(s))}function _g(r){const t=Tm(.99609375,.0038909912109375,1519918441772461e-20,59371814131736755e-24);return ra(r,t)}let Bt=class extends gt{getVisualVariableData(t){if(!this._vvData){const e=this.getAttributeDataCoords(t);this._vvData=qt(this.visualVariableData,e).setDebugName("storage2")}return this._vvData}getAttributeDataCoords(t){if(!this._uv){const e=fg(t),s=this.size,i=ze(e.x),n=ze(e.y).multiply(ze(256)),o=ze(e.z).multiply(ze(256)).multiply(ze(256)),a=q(i.add(n).add(o)),h=is(a,s),c=a.subtract(h).divide(s);this._uv=new D(h,c).add(.5).divide(s)}return this._uv}getFilterData(t){const e=this.getAttributeDataCoords(t);return qt(this.filterFlags,e).setDebugName("storage0")}getAnimationData(t){const e=this.getAttributeDataCoords(t);return qt(this.animation,e).setDebugName("storage1")}getVVData(t){return this.getVisualVariableData(t)}getDataDrivenData0(t){const e=this.getAttributeDataCoords(t);return qt(this.dataDriven0,e).setDebugName("storage30")}getDataDrivenData1(t){const e=this.getAttributeDataCoords(t);return qt(this.dataDriven1,e).setDebugName("storage31")}getDataDrivenData2(t){const e=this.getAttributeDataCoords(t);return qt(this.dataDriven2,e).setDebugName("storage32")}getGPGPUData(t){const e=this.getAttributeDataCoords(t);return qt(this.gpgpu,e).setDebugName("storage4")}getFilterFlags(t){return k("webgl-ignores-sampler-precision")?Om(this.getFilterData(t).x.multiply(q(255))):this.getFilterData(t).x.multiply(q(255))}getAnimationValue(t){return this.getAnimationData(t).x}getSizeValue(t){return this.getVisualVariableData(t).x}getColorValue(t){return this.getVisualVariableData(t).y}getOpacityValue(t){return this.getVisualVariableData(t).z}getRotationValue(t){return this.getVisualVariableData(t).w}};x([$(Ut)],Bt.prototype,"filterFlags",void 0),x([$(Ut)],Bt.prototype,"animation",void 0),x([$(Ut)],Bt.prototype,"gpgpu",void 0),x([$(Ut)],Bt.prototype,"visualVariableData",void 0),x([$(Ut)],Bt.prototype,"dataDriven0",void 0),x([$(Ut)],Bt.prototype,"dataDriven1",void 0),x([$(Ut)],Bt.prototype,"dataDriven2",void 0),x([$(w)],Bt.prototype,"size",void 0);let lo=class extends gt{};x([$(w)],lo.prototype,"activeReasons",void 0),x([$(w)],lo.prototype,"highlightAll",void 0);let Vs=class extends gt{};x([$(D)],Vs.prototype,"position",void 0),x([$(w)],Vs.prototype,"distance",void 0),x([$(w)],Vs.prototype,"smallSymbolDistance",void 0),x([$(w)],Vs.prototype,"smallSymbolSizeThreshold",void 0);let ht=class extends gt{};x([$(dt)],ht.prototype,"displayViewScreenMat3",void 0),x([$(dt)],ht.prototype,"displayViewMat3",void 0),x([$(dt)],ht.prototype,"displayMat3",void 0),x([$(dt)],ht.prototype,"viewMat3",void 0),x([$(dt)],ht.prototype,"tileMat3",void 0),x([$(w)],ht.prototype,"displayZoomFactor",void 0),x([$(w)],ht.prototype,"requiredZoomFactor",void 0),x([$(D)],ht.prototype,"tileOffset",void 0),x([$(w)],ht.prototype,"currentScale",void 0),x([$(w)],ht.prototype,"currentZoom",void 0),x([$(w)],ht.prototype,"metersPerSRUnit",void 0),x([$(w)],ht.prototype,"rotation",void 0),x([$(w)],ht.prototype,"pixelRatio",void 0);let Se=class extends co{};x([O(0,Z)],Se.prototype,"id",void 0),x([O(1,w)],Se.prototype,"bitset",void 0),x([O(2,D)],Se.prototype,"pos",void 0);let Wt=class extends hg{};x([O(14,D)],Wt.prototype,"nextPos1",void 0),x([O(15,D)],Wt.prototype,"nextPos2",void 0);let Yr=class extends Ws{},Yt=class extends cg{clip(t,e){let s=new w(0);const i=this.storage.getFilterFlags(t);if(s=s.add(q(2).multiply(q(1).subtract(mn(i,0)))),this.inside?s=s.add(q(2).multiply(q(1).subtract(mn(i,1)))):this.outside?s=s.add(q(2).multiply(mn(i,1))):this.highlight&&(s=s.add(q(2).multiply(q(1).subtract(this._checkHighlight(i))))),e!=null){const n=new w(1).subtract(ee(e.x,this.view.currentZoom)),o=ee(e.y,this.view.currentZoom);s=s.add(new w(2).multiply(n.add(o)))}return s}getFragmentOutput(t,e,s=new w(1/255)){const i=new Xl;return i.glFragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,s)??t,i}_maybeHighlight(t,e){return this.highlight?new G(t.rgb,ee(e,t.a)):null}_checkHighlight(t){let e=this._checkHighlightBit(t,0);for(let s=1;s{const h=Hs(r,t,e),c=Hs(r,e,s),l=Hs(r,s,t);return ao(ao(h,c),l)}])}function Hl(r){return r.distance.add(1)}function aa(r,t,e){const{viewMat3:s,tileMat3:i}=r.view,n=s.multiply(i),o=n.multiply(new Z(t.pos,1)),a=n.multiply(new Z(e.nextPos1,1)),h=n.multiply(new Z(e.nextPos2,1));return bg(r.hittestRequest.position,o.xy,a.xy,h.xy)}let ni=class extends gt{getColor(t,e,s){return _i([Gl($e(t),s),e],[qr(t,this.values.first()),this.colors.first()],[jr(t,this.values.last()),this.colors.last()],[!0,()=>{const i=this.values.findIndex(c=>wt(c,t)),n=this.values.get(i),o=i.subtract(1),a=this.values.get(o),h=t.subtract(a).divide(n.subtract(a));return ss(this.colors.get(o),this.colors.get(i),h)}])}};x([$($t.ofType(G,8))],ni.prototype,"colors",void 0),x([$($t.ofType(w,8))],ni.prototype,"values",void 0);let oi=class extends gt{getOpacity(t){return _i([$e(t),new w(1)],[qr(t,this.opacityValues.first()),this.opacities.first()],[jr(t,this.opacityValues.last()),this.opacities.last()],[!0,()=>{const e=this.opacityValues.findIndex(a=>wt(a,t)),s=this.opacityValues.get(e),i=e.subtract(1),n=this.opacityValues.get(i),o=t.subtract(n).divide(s.subtract(n));return ss(this.opacities.get(i),this.opacities.get(e),o)}])}};x([$($t.ofType(w,8))],oi.prototype,"opacities",void 0),x([$($t.ofType(w,8))],oi.prototype,"opacityValues",void 0);function Zl(r){return r.visualVariableSizeMinMaxValue!=null||r.visualVariableSizeScaleStops!=null||r.visualVariableSizeStops!=null||r.visualVariableSizeUnitValue!=null}function wg(r,t,e){var s,i,n,o;if(Zl(r)){const a=r.storage.getSizeValue(t);return((s=r.visualVariableSizeMinMaxValue)==null?void 0:s.getSize(a,e))??((i=r.visualVariableSizeScaleStops)==null?void 0:i.getSizeForViewScale(r.view.currentScale))??((n=r.visualVariableSizeStops)==null?void 0:n.getSize(a,e))??((o=r.visualVariableSizeUnitValue)==null?void 0:o.getSize(a,e))}return e}function ha(r,t,e,s=new It(!1)){if(r.visualVariableColor==null)return e;const i=r.storage.getColorValue(t);return r.visualVariableColor.getColor(i,e,s)}function ca(r,t){if(r.visualVariableOpacity==null)return new w(1);const e=r.storage.getOpacityValue(t);return r.visualVariableOpacity.getOpacity(e)}let ai=class extends Se{};x([O(3,G)],ai.prototype,"color",void 0),x([O(4,D)],ai.prototype,"zoomRange",void 0);let je=class extends Yt{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const s=ca(this,t.id),i=ha(this,t.id,t.color).multiply(s),n=this.view.displayViewScreenMat3.multiply(new Z(t.pos.xy,1)),o=this.clip(t.id,t.zoomRange);return{glPosition:new G(n.xy,o,1),color:i,...this.maybeRunHittest(t,e,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new w(0))}hittest(t,e){return aa(this,t,e)}};x([nt(ni)],je.prototype,"visualVariableColor",void 0),x([nt(oi)],je.prototype,"visualVariableOpacity",void 0),x([j(0,Y(ai)),j(1,Y(Wt))],je.prototype,"vertex",null),x([j(0,Y(Yr))],je.prototype,"fragment",null);let Ze=class extends gt{getPatternOffsetAtTileOrigin(t,e=new w(0),s=new w(1)){const i=new D(rm).divide(t);let n=t.multiply(Ul(this.maxIntsToLocalOrigin.multiply(i))).add(this.tileOffsetFromLocalOrigin).subtract(new w(.5).multiply(t));return n=new D(n.x.multiply(s).subtract(n.y.multiply(e)),n.x.multiply(e).add(n.y.multiply(s))),is(n,t)}};x([$(D)],Ze.prototype,"tileOffsetFromLocalOrigin",void 0),x([$(D)],Ze.prototype,"maxIntsToLocalOrigin",void 0);let Ke=class extends gt{};x([$(D)],Ke.prototype,"size",void 0),x([$(Ut)],Ke.prototype,"texture",void 0);let pe=class extends ai{};x([O(5,G)],pe.prototype,"tlbr",void 0),x([O(6,w)],pe.prototype,"width",void 0),x([O(7,w)],pe.prototype,"height",void 0),x([O(8,D)],pe.prototype,"offset",void 0),x([O(9,D)],pe.prototype,"scale",void 0),x([O(10,w)],pe.prototype,"angle",void 0);let vg=class extends Yr{};function Ig(r,t,e,s,i){const n=ta(Ee(i,Sl),q(1)),o=_g(new G(r,0));return K(n,lh(s.divide(t.x),e.divide(t.y),0,Sr(e.divide(t.x)),s.divide(t.y),0,Sh(no(o,0)),Sh(no(0,o)),1),lh(s.divide(t.x),e.divide(t.y),0,Sr(e.divide(t.x)),s.divide(t.y),0,0,0,1))}function Kl(r,t){const e=r.view.requiredZoomFactor,s=new D(t.width,t.height),i=s.multiply(t.scale).multiply(e),n=t.angle.multiply(Z_),o=oa(n),a=Vl(n),h=Ig(t.id,i,o,a,t.bitset),c=r.localTileOffset.getPatternOffsetAtTileOrigin(s,o,a),l=e.multiply(t.scale).multiply(t.offset.subtract(c)).divide(i),u=new Z(t.pos,1),d=h.multiply(u).xy.subtract(l),p=t.tlbr.divide(r.mosaicInfo.size.xyxy);let f=Ee(t.bitset,Xo);return r.visualVariableColor!=null&&(f=K($e(r.storage.getColorValue(t.id)),new w(0),f)),{tileTextureCoord:d,tlbr:p,sampleAlphaOnly:f}}function Ql(r,t){const e=is(t.tileTextureCoord,new w(1)),s=ss(t.tlbr.xy,t.tlbr.zw,e);let i=qt(r.mosaicInfo.texture,s);return i=K(wt(t.sampleAlphaOnly,new w(.5)),i.aaaa,i),t.color.multiply(i)}let Ri=class extends je{vertex(t,e){return{...super.vertex(t,e),...Kl(this,t)}}fragment(t){const e=Ql(this,t);return this.getFragmentOutput(e,t,new w(0))}};x([$(Ke)],Ri.prototype,"mosaicInfo",void 0),x([$(Ze)],Ri.prototype,"localTileOffset",void 0),x([j(0,Y(pe)),j(1,Y(Wt))],Ri.prototype,"vertex",null),x([j(0,Y(vg))],Ri.prototype,"fragment",null);let la=class extends gt{getSize(t,e){const s=this.minMaxValueAndSize.xy,i=this.minMaxValueAndSize.zw;return K($e(t),e,()=>{const n=t.subtract(s.x).divide(s.y.subtract(s.x)),o=ia(n,new w(0),new w(1));return i.x.add(o.multiply(i.y.subtract(i.x)))})}};x([$(G)],la.prototype,"minMaxValueAndSize",void 0);let Pr=class extends gt{getSizeForViewScale(t){return _i([qr(t,this.values.first()),this.sizes.first()],[jr(t,this.values.last()),this.sizes.last()],[!0,()=>{const e=this.values.findIndex(a=>wt(a,t)),s=this.values.get(e),i=e.subtract(1),n=this.values.get(i),o=t.subtract(n).divide(s.subtract(n));return ss(this.sizes.get(i),this.sizes.get(e),o)}])}};x([$($t.ofType(w,8))],Pr.prototype,"sizes",void 0),x([$($t.ofType(w,8))],Pr.prototype,"values",void 0);let Mr=class extends gt{getSize(t,e){const s=_i([$e(t),e],[qr(t,this.values.first()),this.sizes.first()],[jr(t,this.values.last()),this.sizes.last()],[!0,()=>{const i=this.values.findIndex(c=>wt(c,t)),n=this.values.get(i),o=i.subtract(1),a=this.values.get(o),h=t.subtract(a).divide(n.subtract(a));return ss(this.sizes.get(o),this.sizes.get(i),h)}]);return K($e(s),e,s)}};x([$($t.ofType(w,8))],Mr.prototype,"sizes",void 0),x([$($t.ofType(w,8))],Mr.prototype,"values",void 0);let ua=class extends gt{getSize(t,e){return K($e(t),e,t.multiply(this.unitValueToPixelsRatio))}};x([$(w)],ua.prototype,"unitValueToPixelsRatio",void 0);class fe extends Se{}x([O(3,G)],fe.prototype,"color",void 0),x([O(4,D)],fe.prototype,"offset",void 0),x([O(5,D)],fe.prototype,"normal",void 0),x([O(6,w)],fe.prototype,"halfWidth",void 0),x([O(7,w)],fe.prototype,"referenceHalfWidth",void 0),x([O(8,D)],fe.prototype,"zoomRange",void 0);let Jl=class extends Yr{},$r=class extends gt{};function tu(r){return na(new w(K_).multiply(ee(r,new w(Q_))),new w(1))}function Sg(r,t){const{halfWidth:e,normal:s}=r,i=tu(e),n=ql(s).multiply(e);return ia(i.multiply(e.subtract(n)).divide(t.add(i).subtract(new w(1))),new w(0),new w(1))}function Pg(r,t){const{id:e,halfWidth:s,referenceHalfWidth:i}=t;if(Zl(r)){const n=new w(2).multiply(i),o=wg(r,e,n);return new w(.5).multiply(s.divide(na(i,new w(J_)))).multiply(o)}return s}function eu(r,t){const{id:e,offset:s,pos:i,normal:n,zoomRange:o}=t,{displayViewScreenMat3:a,displayViewMat3:h}=r.view,c=ha(r,e,t.color),l=ca(r,e),u=Pg(r,t),d=new w(.5).multiply(r.antialiasingControls.antialiasing),p=na(u.add(d),new w(.45)).add(new w(.1).multiply(d)),f=tu(p).multiply(p).multiply(s),_=h.multiply(new Z(f,new w(0))),m=a.multiply(new Z(i,new w(1))).add(_),g=new w(2).multiply(ee(u,new w(0))).add(r.clip(e,o)),y=new G(m.xy,g,1);return{color:c,opacity:l,halfWidth:p,normal:n,scaledOffset:f,scaledHalfWidth:u,glPosition:new G(y.xy,g,1)}}function Wr(r,t){const{opacity:e,color:s}=r,i=Sg(r,t);return e.multiply(s).multiply(i)}x([$(w)],$r.prototype,"antialiasing",void 0),x([$(w)],$r.prototype,"blur",void 0);let Nt=class extends Yt{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const s=eu(this,t);return{...s,...this.maybeRunHittest(t,e,s.halfWidth)}}fragment(t){const e=Wr(t,this.antialiasingControls.blur);return this.getFragmentOutput(e,t)}hittest(t,e,s){const{viewMat3:i,tileMat3:n}=this.view,o=i.multiply(n),a=o.multiply(new Z(t.pos,1)),h=o.multiply(new Z(e.nextPos1,1)),c=o.multiply(new Z(e.nextPos2,1)),{distance:l,smallSymbolDistance:u,smallSymbolSizeThreshold:d}=this.hittestRequest,p=ee(s,d.multiply(.5)).multiply(l.subtract(u)),f=this.hittestRequest.position;return ao(Hs(f,a.xy,h.xy),Hs(f,a.xy,c.xy)).subtract(s).add(p)}};x([$($r)],Nt.prototype,"antialiasingControls",void 0),x([nt(ni)],Nt.prototype,"visualVariableColor",void 0),x([nt(oi)],Nt.prototype,"visualVariableOpacity",void 0),x([nt(la)],Nt.prototype,"visualVariableSizeMinMaxValue",void 0),x([nt(Pr)],Nt.prototype,"visualVariableSizeScaleStops",void 0),x([nt(Mr)],Nt.prototype,"visualVariableSizeStops",void 0),x([nt(ua)],Nt.prototype,"visualVariableSizeUnitValue",void 0),x([j(0,Y(fe)),j(1,Y(Wt))],Nt.prototype,"vertex",null),x([j(0,Y(Jl))],Nt.prototype,"fragment",null);let Jt=class extends Se{};x([O(3,D)],Jt.prototype,"offset",void 0),x([O(4,G)],Jt.prototype,"color",void 0),x([O(5,D)],Jt.prototype,"normal",void 0),x([O(6,w)],Jt.prototype,"halfWidth",void 0),x([O(7,w)],Jt.prototype,"referenceHalfWidth",void 0),x([O(8,D)],Jt.prototype,"zoomRange",void 0);let su=class extends Jl{};function da(r,t,e){const{id:s,bitset:i}=t,n=Ee(i,Ho),o=wt(n,new w(.5)),a=eu(r,t),h=K(o,a.halfWidth,new w(0)),c=ca(r,s),l=ha(r,s,t.color),u=K(o,t.color,l.multiply(c)),d=r.view.displayViewScreenMat3.multiply(new Z(t.pos.xy,1)),p=r.clip(t.id),f=new G(d.xy,p,1),_=K(o,a.glPosition,f),m=e&&r.maybeRunHittest(t,e,o);return{isOutline:n,color:u,opacity:new w(1),halfWidth:h,normal:a.normal,glPosition:_,...m}}let jt=class extends Yt{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}};x([$($r)],jt.prototype,"antialiasingControls",void 0),x([nt(ni)],jt.prototype,"visualVariableColor",void 0),x([nt(oi)],jt.prototype,"visualVariableOpacity",void 0),x([nt(la)],jt.prototype,"visualVariableSizeMinMaxValue",void 0),x([nt(Pr)],jt.prototype,"visualVariableSizeScaleStops",void 0),x([nt(Mr)],jt.prototype,"visualVariableSizeStops",void 0),x([nt(ua)],jt.prototype,"visualVariableSizeUnitValue",void 0);class uo extends jt{vertex(t,e){return da(this,t,e)}fragment(t){const{color:e,isOutline:s}=t,i=wt(s,new w(.5)),n=Wr(t,this.antialiasingControls.blur),o=K(i,n,e),a=K(i,new w(1/255),new w(0));return this.getFragmentOutput(o,t,a)}hittest(t,e,s){return K(s,Hl(this.hittestRequest),aa(this,t,e))}}x([j(0,Y(Jt)),j(1,Y(Wt))],uo.prototype,"vertex",null),x([j(0,Y(su))],uo.prototype,"fragment",null);let po=class extends ai{};x([O(5,G)],po.prototype,"tlbr",void 0),x([O(6,w)],po.prototype,"inverseRasterizationScale",void 0);let Mg=class extends Yr{};function $g(r){const t=new w(1),e=new w(0);return new dt(t.divide(r.x),e.divide(r.y),0,Sr(e.divide(r.x)),t.divide(r.y),0,0,0,1)}function iu(r,t){const e=t.tlbr.xy,s=t.tlbr.zw,i=s.x.subtract(e.x),n=e.y.subtract(s.y),o=new D(i,n).multiply(t.inverseRasterizationScale),a=o.multiply(r.view.requiredZoomFactor),h=$g(a),c=r.localTileOffset.getPatternOffsetAtTileOrigin(o).divide(a),l=new Z(t.pos,1);return{tileTextureCoord:h.multiply(l).xy.subtract(c),tlbr:t.tlbr.divide(r.mosaicInfo.size.xyxy)}}function ru(r,t){const e=is(r.tileTextureCoord,new w(1)),s=ss(r.tlbr.xy,r.tlbr.zw,e),i=qt(t.texture,s);return r.color.multiply(i)}let Ni=class extends je{vertex(t,e){return{...super.vertex(t,e),...iu(this,t)}}fragment(t){const e=ru(t,this.mosaicInfo);return this.getFragmentOutput(e,t,new w(0))}};x([$(Ke)],Ni.prototype,"mosaicInfo",void 0),x([$(Ze)],Ni.prototype,"localTileOffset",void 0),x([j(0,Y(po)),j(1,Y(Wt))],Ni.prototype,"vertex",null),x([j(0,Y(Mg))],Ni.prototype,"fragment",null);let fo=class extends Jt{};x([O(9,G)],fo.prototype,"tlbr",void 0),x([O(10,w)],fo.prototype,"inverseRasterizationScale",void 0);let nu=class extends su{},Bi=class extends uo{vertex(t,e){return{...da(this,t,e),...iu(this,t)}}fragment(t){const{isOutline:e}=t,s=wt(e,new w(.5)),i=Wr(t,this.antialiasingControls.blur),n=ru(t,this.mosaicInfo),o=K(s,i,n),a=K(s,new w(1/255),new w(0));return this.getFragmentOutput(o,t,a)}};x([$(Ke)],Bi.prototype,"mosaicInfo",void 0),x([$(Ze)],Bi.prototype,"localTileOffset",void 0),x([j(0,Y(fo)),j(1,Y(Wt))],Bi.prototype,"vertex",null),x([j(0,Y(nu))],Bi.prototype,"fragment",null);const hi=16,Ph=1/hi,_o=128;let Gt=class extends Se{};x([O(3,G)],Gt.prototype,"color",void 0),x([O(4,G)],Gt.prototype,"tlbr",void 0),x([O(5,w)],Gt.prototype,"angle",void 0),x([O(6,w)],Gt.prototype,"aux1",void 0),x([O(7,w)],Gt.prototype,"aux2",void 0),x([O(8,D)],Gt.prototype,"aux3",void 0),x([O(9,D)],Gt.prototype,"aux4",void 0),x([O(10,D)],Gt.prototype,"zoomRange",void 0);let Tg=class extends nu{},Gi=class extends jt{vertex(t,e){const{aux1:s,aux2:i,aux3:n,aux4:o}=t,a={...t,width:s,height:i,offset:n,scale:o.multiply(Ph)},h={...t,halfWidth:s,referenceHalfWidth:i,offset:n,normal:o.subtract(_o).multiply(Ph)},c=da(this,h),l=Kl(this,a),u=wt(c.isOutline,new w(.5));return{...c,...l,...this.maybeRunHittest(t,e,u)}}fragment(t){const{isOutline:e}=t,s=wt(e,new w(.5)),i=Wr(t,this.antialiasingControls.blur),n=Ql(this,t),o=K(s,i,n),a=K(s,new w(1/255),new w(0));return this.getFragmentOutput(o,t,a)}hittest(t,e,s){return K(s,Hl(this.hittestRequest),aa(this,t,e))}};x([$(Ke)],Gi.prototype,"mosaicInfo",void 0),x([$(Ze)],Gi.prototype,"localTileOffset",void 0),x([j(0,Y(Gt)),j(1,Y(Wt))],Gi.prototype,"vertex",null),x([j(0,Y(Tg))],Gi.prototype,"fragment",null);const Tr=Ml,Cg=Ko,kg={createComputedParams:r=>r,optionalAttributes:Tr.optionalAttributes,attributes:{...Tr.attributes,bitset:{type:I.UNSIGNED_BYTE,count:1,pack:r=>Pl(r)},aux1:{count:1,type:I.HALF_FLOAT,pack:r=>Ir(r).width},aux2:{count:1,type:I.HALF_FLOAT,pack:r=>Ir(r).height},aux3:{count:2,type:I.HALF_FLOAT,pack:({offsetX:r,offsetY:t})=>[E(r),E(t)]},aux4:{count:2,type:I.UNSIGNED_BYTE,pack:({scaleX:r,scaleY:t})=>[r*hi,t*hi]}}},Eg={createComputedParams:r=>r,optionalAttributes:Tr.optionalAttributes,attributes:{...Tr.attributes,color:Cg.attributes.color,bitset:{type:I.UNSIGNED_BYTE,count:1,pack:r=>fi([[Ho,!0]])},aux1:{count:1,type:I.HALF_FLOAT,pack:r=>E(.5*r.width)},aux2:{count:1,type:I.HALF_FLOAT,pack:r=>E(.5*r.referenceWidth)},aux3:{count:2,type:I.HALF_FLOAT,packTessellation:({extrusionOffsetX:r,extrusionOffsetY:t})=>[r,t]},aux4:{count:2,type:I.UNSIGNED_BYTE,packTessellation:({normalX:r,normalY:t})=>[r*hi+_o,t*hi+_o]}}};let Fg=class extends Qo{constructor(){super(...arguments),this.vertexSpec=Eg}},Ag=class extends Jo{constructor(){super(...arguments),this.vertexSpec=kg}_createOutlineWriter(t,e,s,i){return new Fg(t,e,s,i)}_write(t,e,s){var a;const i=(s==null?void 0:s.asOptimized())??e.readGeometryForDisplay(),n=this._clip(i);if(!n)return;const o=(a=this.evaluatedMeshParams.sprite)==null?void 0:a.textureBinding;t.recordStart(this.instanceId,this.attributeLayout,o),this._writeGeometry(t,e,n),this._lineMeshWriter.writeLineVertices(t,N.fromOptimizedCIM(n,"esriGeometryPolyline"),e),t.recordEnd()}ensurePacked(t,e,s){super.ensurePacked(t,e,s),this._lineMeshWriter.ensurePacked(t,e,s)}enqueueRequest(t,e,s){super.enqueueRequest(t,e,s),this._lineMeshWriter.enqueueRequest(t,e,s)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}};const zg={optionalAttributes:Pe.optionalAttributes,createComputedParams:r=>r,attributes:{...Pe.attributes,...$l.attributes}},Og={optionalAttributes:Pe.optionalAttributes,createComputedParams:r=>r,attributes:{...Pe.attributes,...Ko.attributes}};let Lg=class extends Qo{constructor(){super(...arguments),this.vertexSpec=Og}},Dg=class extends Jo{constructor(){super(...arguments),this.vertexSpec=zg}_createOutlineWriter(t,e,s,i){return new Lg(t,e,s,i)}_write(t,e,s){var a;const i=(s==null?void 0:s.asOptimized())??e.readGeometryForDisplay(),n=this._clip(i);if(!n)return;const o=(a=this.evaluatedMeshParams.sprite)==null?void 0:a.textureBinding;t.recordStart(this.instanceId,this.attributeLayout,o),this._writeGeometry(t,e,n),this._lineMeshWriter.writeLineVertices(t,N.fromOptimizedCIM(n,"esriGeometryPolyline"),e),t.recordEnd()}ensurePacked(t,e,s){super.ensurePacked(t,e,s),this._lineMeshWriter.ensurePacked(t,e,s)}enqueueRequest(t,e,s){super.enqueueRequest(t,e,s),this._lineMeshWriter.enqueueRequest(t,e,s)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}};const Rg={createComputedParams:r=>r,optionalAttributes:{},attributes:{pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1},offset:{type:I.BYTE,count:2,packAlternating:{count:4,pack:()=>[[-1,-1],[1,-1],[-1,1],[1,1]]}}}};let Ng=class extends Je{constructor(){super(...arguments),this.vertexSpec=Rg}_write(t,e){t.recordStart(this.instanceId,this.attributeLayout);const s=e.getDisplayId();if(e.geometryType==="esriGeometryPoint"){const i=e.readXForDisplay(),n=e.readYForDisplay();this._writeQuad(t,s,i,n)}else if(e.geometryType==="esriGeometryMultipoint"){const i=e.readGeometryForDisplay();i==null||i.forEachVertex((n,o)=>{n>=0&&n<=512&&o>=0&&o<=512&&this._writeQuad(t,s,n,o)})}t.recordEnd()}_writeQuad(t,e,s,i){const n=t.vertexCount();this._writeVertex(t,e,s,i),t.indexWrite(n+0),t.indexWrite(n+1),t.indexWrite(n+2),t.indexWrite(n+1),t.indexWrite(n+3),t.indexWrite(n+2)}};const et=8388607,Bg=8388608,Ot=r=>r&et;function Gg(r,t){return((t?Bg:0)|r)>>>0}let Vi=class ou{constructor(t,e,s,i,n,o,a,h,c=[]){this.entityTexel=t,this.anchorX=e,this.anchorY=s,this.directionX=i,this.directionY=n,this.maxScale=o,this.minScale=a,this.referenceBounds=h,this.bounds=c}serialize(t){t.push(this.entityTexel),t.writeF32(this.anchorX),t.writeF32(this.anchorY),t.writeF32(this.directionX),t.writeF32(this.directionY),t.writeF32(this.maxScale),t.writeF32(this.minScale),this.referenceBounds===null?(t.writeF32(0),t.writeF32(0),t.writeF32(0)):(t.writeF32(this.referenceBounds.size),t.writeF32(this.referenceBounds.offsetX),t.writeF32(this.referenceBounds.offsetY)),fc(t,this.bounds)}static deserialize(t){const e=t.readInt32(),s=t.readF32(),i=t.readF32(),n=t.readF32(),o=t.readF32(),a=t.readF32(),h=t.readF32(),c=t.readF32(),l=t.readF32(),u=t.readF32(),d=_c(t,be)??[];return new ou(e,s,i,n,o,a,h,{size:c,offsetX:l,offsetY:u},d)}};const se=1024;function Mh(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function au(r,t){return Math.sqrt(r*r+t*t)}function $h(r){const t=au(r[0],r[1]);r[0]/=t,r[1]/=t}function Vg(r,t){return au(r[0]-t[0],r[1]-t[1])}function Ug(r,t){return r[t+1]}function hu(r){return r.length-1}function qg(r){let t=0;for(let e=0;et._index||this._index===t._index&&this._distance>=t._distance}get _segment(){return this._segments[this._index+1]}get angle(){const t=this.dy,e=(0*t+-1*-this.dx)/(1*this.length);let s=Math.acos(e);return t>0&&(s=2*Math.PI-s),s}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const{dx:t,dy:e}=this;return Math.sqrt(t*t+e*e)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return this._index-1>=0}hasNext(){return this._index+1t)return this._seekBackwards(t-i);i+=this.length}return this._distance=0,e?this:null}seek(t,e=!1){if(t<0)return this._seekBackwards(Math.abs(t),e);if(t<=this.remainingLength)return this._distance=(this.backwardLength+t)/this.length,this;let s=this.remainingLength;for(;this.next();){if(s+this.length>t)return this.seek(t-s,e);s+=this.length}return this._distance=1,e?this:null}};function gn(r,t,e,s=!0){const i=qg(r),n=Yg.create(r),o=i/2;if(!s)return n.seek(o),void(Math.abs(n.x)=0&&!(i[_+1]i[u]+l);_++){const m=l-i[_-1]+i[u],g=i[_]-i[_-1],y=i[_]-i[u]1){const h=ec(n,i,!1,e,s,a);this.fontSize=Math.min(h.size,Th),this.postAngle=h.rotation,this.offsetX=h.offsetX,this.offsetY=h.offsetY}o&&(this.fontSize*=o,this.offsetX*=o,this.offsetY*=o)}};const ur=28,re=[4,4],Ui=[16,4],Hg={topLeft:Ui,topRight:Ui,bottomLeft:Ui,bottomRight:Ui},Cr=[4,2],vt=[4,6],Ch={topLeft:Cr,topRight:Cr,bottomLeft:vt,bottomRight:vt},kh={topLeft:Cr,topRight:vt,bottomLeft:Cr,bottomRight:vt},Zg={topLeft:vt,topRight:vt,bottomLeft:re,bottomRight:re},Kg={topLeft:re,topRight:re,bottomLeft:vt,bottomRight:vt},Qg={topLeft:vt,topRight:re,bottomLeft:vt,bottomRight:re},Jg={topLeft:re,topRight:vt,bottomLeft:re,bottomRight:vt},ty={createComputedParams:r=>r,optionalAttributes:{zoomRange:{type:I.UNSIGNED_SHORT,count:2,packPrecisionFactor:zr,packTessellation:({minZoom:r,maxZoom:t})=>[r||0,t||ur]},clipAngle:{type:I.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:r})=>ey(r||0)},referenceSymbol:{type:I.BYTE,count:4,packPrecisionFactor:1,packTessellation:(r,t)=>{if(!r.referenceBounds)return[0,0,0,0];const e=__(t.horizontalAlignment),s=m_(t.verticalAlignment),{offsetX:i,offsetY:n,size:o}=r.referenceBounds;return[E(i),-E(n),E(o),e+1<<2|s+1]}}},attributes:{pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:r,mapAligned:t})=>fi([[sm,r],[im,!!t]])},offset:{type:I.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:r})=>{const{bottomLeft:t,bottomRight:e,topLeft:s,topRight:i}=r;return[s,i,t,e]}}},textureUV:{type:I.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,packTessellation:({texcoords:r})=>{const{bottomLeft:t,bottomRight:e,topLeft:s,topRight:i}=r;return[s,i,t,e]}}},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:r})=>r},fontSize:{type:I.UNSIGNED_SHORT,count:1,packPrecisionFactor:4,packTessellation:({fontSize:r})=>E(r)},referenceSize:{type:I.UNSIGNED_BYTE,count:1,packPrecisionFactor:4,packTessellation:({fontSize:r},{referenceSize:t})=>E(t??r)},haloColor:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:r})=>J(r)},haloFontSize:{type:I.UNSIGNED_SHORT,count:1,packPrecisionFactor:4,pack:({haloFontSize:r})=>E(r)}}};class lu extends Je{constructor(){super(...arguments),this.vertexSpec=ty,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,s){super.ensurePacked(t,e,s),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new Xg(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,e,s){const i=this._getShaping();if(!i)return;const n=e.getDisplayId();if(this.evaluatedMeshParams.placement!=null)return this._writePlacedTextMarkers(t,e,i,s);if(s!=null&&s.nextPath())return s.nextPoint(),this._writeGlyphs(t,n,s.x,s.y,i,0);if(e.geometryType==="esriGeometryPolygon"){const h=e.readCentroidForDisplay();if(!h)return;const[c,l]=h.coords;return this._writeGlyphs(t,n,c,l,i,0)}if(e.geometryType==="esriGeometryMultipoint"){const h=e.readGeometryForDisplay();return void(h==null?void 0:h.forEachVertex((c,l)=>this._writeGlyphs(t,n,c,l,i,0)))}const o=e.readXForDisplay(),a=e.readYForDisplay();return this._writeGlyphs(t,n,o,a,i,0)}_writePlacedTextMarkers(t,e,s,i){const n=i??N.fromFeatureSetReaderCIM(e);if(!n)return;const o=-1,a=cu.getPlacement(n,o,this.evaluatedMeshParams.placement,E(1),t.id,Yo());if(!a)return;const h=e.getDisplayId();let c=a.next();for(;c!=null;){const l=c.tx,u=-c.ty,d=-c.getAngle();this._writeGlyphs(t,h,l,u,s,d),c=a.next()}}_getShaping(t){var c;const e=this._textMeshTransformProps,s=this.evaluatedMeshParams;if(!((c=s.glyphs)!=null&&c.glyphs.length))return null;const i=Math.round(E(e.fontSize)),n=E(e.offsetX),o=E(e.offsetY),a=Pn(E(s.lineWidth),Od,zd),h=Ld*Pn(s.lineHeightRatio,.25,4);return P_(s.glyphs,{scale:i/Dd,angle:e.postAngle,xOffset:n,yOffset:o,horizontalAlignment:s.horizontalAlignment,verticalAlignment:t||s.verticalAlignment,maxLineWidth:a,lineHeight:h,decoration:s.decoration,borderLineSizePx:E(s.boxBorderLineSize),hasBackground:!!s.boxBackgroundColor,useCIMAngleBehavior:s.useCIMAngleBehavior})}_writeGlyphs(t,e,s,i,n,o,a,h){const c=this.evaluatedMeshParams,l=this._textMeshTransformProps,u=l.fontSize,d=E(l.offsetX),p=E(l.offsetY),[f,_]=ts(c.scaleInfo,this.getTileInfo());o!==0&&n.setRotation(o);const m=n.bounds,g=s+m.x+d,y=i+m.y-p,b=2*(c.minPixelBuffer?c.minPixelBuffer/u:1),v=Math.max(m.width,m.height)*b;n.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,n.glyphs[0].textureBinding),t.recordBounds(g,y,v,v),this._writeTextBox(t,e,s,i,n.textBox,a,h),t.recordEnd());for(const S of n.glyphs){t.recordStart(this.instanceId,this.attributeLayout,S.textureBinding),t.recordBounds(g,y,v,v);const{texcoords:M,offsets:C}=S;this._writeQuad(t,e,s,i,{texcoords:M,offsets:C,fontSize:u,color:J(c.color),isBackground:!1,referenceBounds:a,minZoom:f,maxZoom:_,...h}),t.recordEnd()}o!==0&&n.setRotation(-o)}_writeTextBox(t,e,s,i,n,o,a){const h=this.evaluatedMeshParams,{fontSize:c}=this._textMeshTransformProps,{boxBackgroundColor:l,boxBorderLineColor:u}=h,d={isBackground:!0,fontSize:c,referenceBounds:o,...a};l&&(this._writeQuad(t,e,s,i,{texcoords:Hg,offsets:n.main,color:J(l),...d}),u||(this._writeQuad(t,e,s,i,{texcoords:Zg,offsets:n.top,color:J(l),...d}),this._writeQuad(t,e,s,i,{texcoords:Kg,offsets:n.bot,color:J(l),...d}),this._writeQuad(t,e,s,i,{texcoords:Qg,offsets:n.left,color:J(l),...d}),this._writeQuad(t,e,s,i,{texcoords:Jg,offsets:n.right,color:J(l),...d}))),u&&(this._writeQuad(t,e,s,i,{texcoords:Ch,offsets:n.top,color:J(u),...d}),this._writeQuad(t,e,s,i,{texcoords:Ch,offsets:n.bot,color:J(u),...d}),this._writeQuad(t,e,s,i,{texcoords:kh,offsets:n.left,color:J(u),...d}),this._writeQuad(t,e,s,i,{texcoords:kh,offsets:n.right,color:J(u),...d}))}_writeQuad(t,e,s,i,n){const o=t.vertexCount();this._writeVertex(t,e,s,i,n),t.indexWrite(o+0),t.indexWrite(o+1),t.indexWrite(o+2),t.indexWrite(o+1),t.indexWrite(o+3),t.indexWrite(o+2)}}const ey=r=>Math.round(r*(254/360)),qi=1,Le=0,sy=128,iy=sd(r=>{let t=0;if(r===0)return 1/0;for(;!(r%2);)t++,r/=2;return t});class ry extends lu{constructor(){super(...arguments),this._zoomLevel=0}_write(t,e,s,i){if(this._zoomLevel=i||0,s!=null)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(e.geometryType){case"esriGeometryPoint":{const n=e.readXForDisplay(),o=e.readYForDisplay();return this._writePoint(t,n,o,e)}case"esriGeometryEnvelope":case"esriGeometryPolygon":case"esriGeometryMultipoint":{const n=e.readCentroidForDisplay();if(!n)return;const[o,a]=n.coords;return this._writePoint(t,o,a,e)}case"esriGeometryPolyline":this._writeLines(t,e)}}_writePoint(t,e,s,i){var p,f;const n=this._getShaping();if(!n)return;let o=this._getPointReferenceBounds();o||(o={offsetX:0,offsetY:0,size:0});const a=n.boundsT,h=ul(this.evaluatedMeshParams.horizontalAlignment),c=dl(this.evaluatedMeshParams.verticalAlignment),l=((p=this.evaluatedMeshParams.scaleInfo)==null?void 0:p.maxScale)??0,u=((f=this.evaluatedMeshParams.scaleInfo)==null?void 0:f.minScale)??0,d=Ot(i.getDisplayId());t.metricStart(new Vi(d,e,s,h,c,l,u,o)),t.metricBoxWrite(a),this._writeGlyphs(t,i.getDisplayId(),e,s,n,0,o),t.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const t of this._references){const e=t.getBoundsInfo();if(e)return e}return null}_writeLines(t,e){const{scaleInfo:s,verticalAlignment:i}=this.evaluatedMeshParams,n=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const a=(c,l,u,d)=>this._placeSubdivGlyphs(c,l,u,d),h=(o.bounds.width+n)/(1<0&&!(!h&&!c)){const y=Math.max(e,o[0],0),b=Math.min(ur,o[1]),v=Ur(Lt(),-t.angle),S={minZoom:y,maxZoom:b,clipAngle:u,mapAligned:!0,isLineLabel:!0},M=E(this.evaluatedMeshParams.offsetX),C=E(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const F=$n(M,-1*C),[T,L]=n.shapeBackground(Ie(Lt(),v,F));s.recordStart(this.instanceId,this.attributeLayout,n.glyphs[0].textureBinding);const H=2*Math.max(T.width,T.height);s.recordBounds(t.x+T.x,t.y+T.y,H,H),this._writeTextBox(s,i,t.x,t.y,L,a,S),s.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const F=$n(M,C),[T,L]=n.shapeBackground(Ie(Lt(),v,F));S.clipAngle=d,s.recordStart(this.instanceId,this.attributeLayout,n.glyphs[0].textureBinding);const H=2*Math.max(T.width,T.height);s.recordBounds(t.x+T.x,t.y+T.y,H,H),this._writeTextBox(s,i,t.x,t.y,L,a,S),s.recordEnd()}}const p=Ot(i),f=((m=this.evaluatedMeshParams.scaleInfo)==null?void 0:m.maxScale)??0,_=((g=this.evaluatedMeshParams.scaleInfo)==null?void 0:g.minScale)??0;s.metricStart(new Vi(p,t.x,t.y,0,0,f,_,null)),this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(l,e,1,u,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(l,e,0,d,!0),s.metricEnd()}_placeBack(t,e,s,i,n,o){const a=t.clone();let h=t.backwardLength+Le;for(;a.prev()&&!(h>=i);)this._placeOnSegment(a,e,h,s,-1,n,o),h+=a.length+Le}_placeForward(t,e,s,i,n,o){const a=t.clone();let h=t.remainingLength+Le;for(;a.next()&&!(h>=i);)this._placeOnSegment(a,e,h,s,1,n,o),h+=a.length+Le}_placeFirst(t,e,s,i,n=!1){const{out:o,id:a,shaping:h,zoomRange:c,referenceBounds:l}=this._current,u=h.glyphs;for(const d of u){const p=d.x>h.bounds.x?s:1-s,f=p*t.remainingLength+(1-p)*t.backwardLength,_=Math.abs(d.x+d.width/2-h.bounds.x),m=Math.max(0,this._zoomLevel+Math.log2(_/(f+Le))),g=Math.max(e,n?0:m);d.maxZoom=Math.min(c[1],ur),d.angle=t.angle+(1-s)*Math.PI,d.minZoom=Math.max(c[0],g),this._writeLineGlyph(o,a,t.x,t.y,h.bounds,d,i,l,!0),s&&this._isVisible(d.minZoom,d.maxZoom)&&o.metricBoxWrite(d.bounds)}}_placeOnSegment(t,e,s,i,n,o,a){const{out:h,id:c,shaping:l,referenceBounds:u}=this._current,d=l.glyphs,p=t.dx/t.length,f=t.dy/t.length,_={x:t.x+s*-n*p,y:t.y+s*-n*f};for(const m of d){const g=m.x>l.bounds.x?o:1-o;if(!(g&&n===1||!g&&n===-1))continue;const y=Math.abs(m.x+m.width/2-l.bounds.x),b=Math.max(0,this._zoomLevel+Math.log2(y/s)-.1),v=Math.max(i,this._zoomLevel+Math.log2(y/(s+t.length+Le)));if(b!==0&&(m.angle=t.angle+(1-o)*Math.PI,m.minZoom=v,m.maxZoom=b,this._writeLineGlyph(h,c,_.x,_.y,l.bounds,m,a,u,!0),o&&this._isVisible(m.minZoom,m.maxZoom))){const S=m.bounds,M=t.x-e.x,C=t.y-e.y,F=new be(S.center[0]+M,S.center[1]+C,S.width,S.height);h.metricBoxWrite(F)}}}_writeLineGlyph(t,e,s,i,n,o,a,h,c){const l=s+n.x,u=i+n.y,d=2*(this.evaluatedMeshParams.minPixelBuffer?this.evaluatedMeshParams.minPixelBuffer/this._textMeshTransformProps.fontSize:1),p=Math.max(n.width,n.height)*d;t.recordStart(this.instanceId,this.attributeLayout,o.textureBinding),t.recordBounds(l,u,p,p);const{texcoords:f,offsets:_}=o,m=this._textMeshTransformProps.fontSize;this._writeQuad(t,e,s,i,{texcoords:f,offsets:_,fontSize:m,color:J(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:h,minZoom:Math.max(this._current.zoomRange[0],o.minZoom),maxZoom:Math.min(this._current.zoomRange[1],o.maxZoom),clipAngle:a,mapAligned:c,isLineLabel:!0}),t.recordEnd()}_isVisible(t,e){const s=this._zoomLevel;return t<=s&&s<=e}}function Eh(r,t,e){const{coords:s,lengths:i}=t,n=Fe(),o=Fe(),a=Fe(),h=Fe(),c=Fe(),l=Fe(),u=2;let d=0;for(let p=0;p0?ut(n,s[m],s[m+1]):ut(n,0,0),ut(o,s[g],s[g+1]),_r,optionalAttributes:Me.optionalAttributes,attributes:{...Me.attributes,bitset:{type:I.UNSIGNED_BYTE,count:1,pack:({shouldSampleAlphaOnly:r,shouldScaleDash:t,isSDF:e})=>fi([[Xo,r],[tm,t],[em,e]])},tlbr:{type:I.UNSIGNED_SHORT,count:4,pack:({sprite:r})=>{const{rect:t,width:e,height:s}=r,i=t.x+He,n=t.y+He;return[i,n,i+e,n+s]}},accumulatedDistance:{type:I.UNSIGNED_SHORT,count:1,packTessellation:({distance:r})=>r},segmentDirection:{type:I.BYTE,count:2,packPrecisionFactor:16,packTessellation:({directionX:r,directionY:t})=>[r,t]}}};let oy=class extends Zo{constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=ny,this._tessellationOptions.textured=!0}_write(t,e,s){const i=s??N.fromFeatureSetReaderCIM(e);if(!i)return;const{sprite:n}=this.evaluatedMeshParams;this._writeGeometry(t,e,i,n==null?void 0:n.textureBinding)}},ay=class go{static from(t){return"width"in t?this.fromSimpleMeshParams(t):this.fromComplexMeshParams(t)}static fromSimpleMeshParams(t){const e=new go(t.sprite,t.color,t.outlineColor,t.minPixelBuffer,t.placement,t.scaleInfo,t.effects),{type:s,width:i,height:n,angle:o,alignment:a,outlineSize:h,referenceSize:c,sprite:l,overrideOutlineColor:u}=t;e.rawWidth=E(i),e.rawHeight=E(n),e.angle=o,e.alignment=a,e.outlineSize=E(h),e.referenceSize=E(c),e.overrideOutlineColor=u,e.offsetX=E(t.offsetX),e.offsetY=E(t.offsetY),s!=="simple"||l.sdf||(e.rawWidth=l.width,e.rawHeight=l.height);const d=2;return e.sizeRatio=l.sdf?d:1,e._computeSize(t,!1),e}static fromComplexMeshParams(t){const e=new go(t.sprite,t.color,t.outlineColor,t.minPixelBuffer,t.placement,t.scaleInfo,t.effects);let{alignment:s,transforms:i,size:n,scaleX:o,anchorX:a,anchorY:h,angle:c,colorLocked:l,frameHeight:u,widthRatio:d,offsetX:p,offsetY:f,outlineSize:_,referenceSize:m,scaleFactor:g,sizeRatio:y,isAbsoluteAnchorPoint:b,rotateClockwise:v,scaleSymbolsProportionally:S,sprite:M}=t;if(i&&i.infos.length>0){const T=ec(n,c,v,p,f,i);n=T.size,c=T.rotation,p=T.offsetX,f=T.offsetY,v=!1}g&&(n*=g,p*=g,f*=g);const C=o*(M.width/M.height);e.alignment=s,e.rawHeight=E(n),e.rawWidth=e.rawHeight*C,e.referenceSize=E(m),e.sizeRatio=y,e.angle=c,e.rotateClockwise=v,e.anchorX=a,e.anchorY=h,e.offsetX=E(p),e.offsetY=E(f),b&&n&&(M.sdf?e.anchorX=a/(n*d):e.anchorX=a/(n*C),e.anchorY=h/n);const F=S&&u?n/u:1;return e.outlineSize=_===0||isNaN(_)?0:E(_)*F,e.scaleSymbolsProportionally=S,e.colorLocked=l,e._computeSize(t,!0),e}constructor(t,e,s,i,n,o,a){this.sprite=t,this.color=e,this.outlineColor=s,this.minPixelBuffer=i,this.placement=n,this.scaleInfo=o,this.effects=a,this.rawWidth=0,this.rawHeight=0,this.angle=0,this.outlineSize=0,this.referenceSize=0,this.sizeRatio=1,this.alignment=oc.SCREEN,this.scaleSymbolsProportionally=!1,this.overrideOutlineColor=!1,this.colorLocked=!1,this.anchorX=0,this.anchorY=0,this.computedWidth=0,this.computedHeight=0,this.texXmin=0,this.texYmin=0,this.texXmax=0,this.texYmax=0,this.offsetX=0,this.offsetY=0,this.rotateClockwise=!0}get boundsInfo(){return{size:Math.max(this.computedHeight,this.computedWidth),offsetX:this.offsetX,offsetY:this.offsetY}}_computeSize(t,e){const{sprite:s,hasSizeVV:i}=t,n=!!s.sdf,{rawWidth:o,rawHeight:a,sizeRatio:h,outlineSize:c}=this,l=o*h,u=a*h;if(n&&!i){const b=e&&o>a?l:o,v=a,S=c+2*1;this.computedWidth=Math.min(b+S,l),this.computedHeight=Math.min(v+S,u)}else this.computedWidth=l,this.computedHeight=u;const d=n?Math.max(s.width,s.height)/Math.max(l,u):1,p=.5*(l-this.computedWidth)*d,f=.5*(u-this.computedHeight)*d,_=s.rect.x+He+p,m=s.rect.y+He+f,g=_+s.width-2*p,y=m+s.height-2*f;this.texXmin=Math.floor(_),this.texYmin=Math.floor(m),this.texXmax=Math.ceil(g),this.texYmax=Math.ceil(y),this.computedWidth*=(this.texXmax-this.texXmin)/(g-_),this.computedHeight*=(this.texYmax-this.texYmin)/(y-m),this.anchorX*=l/this.computedWidth,this.anchorY*=u/this.computedHeight}};const ms={bitset:{isSDF:0,isMapAligned:1,scaleSymbolsProportionally:2,overrideOutlineColor:3,colorLocked:4}},hy=3.14159265359/180,cy=128/Math.PI;function ly(r,t){return r%=t,Math.abs(r>=0?r:r+t)}function uy(r){return ly(r*cy,256)}function dy(r,t,e,s,i=!1){const n=Lt(),o=i?1:-1;return al(n),(t||e)&&Ie(n,n,[t,-e]),s&&vr(n,n,o*hy*-s),n}const py={createComputedParams:r=>ay.from(r),optionalAttributes:{zoomRange:{type:I.SHORT,count:2,packPrecisionFactor:zr,pack:({scaleInfo:r},{tileInfo:t})=>ts(r,t)}},attributes:{pos:{type:I.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1,pack:({sprite:r,alignment:t,scaleSymbolsProportionally:e,overrideOutlineColor:s,colorLocked:i})=>{let n=0;return r.sdf&&(n|=us(ms.bitset.isSDF)),t===oc.MAP&&(n|=us(ms.bitset.isMapAligned)),e&&(n|=us(ms.bitset.scaleSymbolsProportionally)),s&&(n|=us(ms.bitset.overrideOutlineColor)),i&&(n|=us(ms.bitset.colorLocked)),n}},offset:{type:I.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:({angle:r,computedWidth:t,computedHeight:e,anchorX:s,anchorY:i,offsetX:n,offsetY:o,rotateClockwise:a})=>{const h=dy(0,n,o,-r,a),c=-(.5+s)*t,l=-(.5-i)*e,u=[c,l],d=[c+t,l],p=[c,l+e],f=[c+t,l+e];return zt(u,u,h),zt(d,d,h),zt(p,p,h),zt(f,f,h),[u,d,p,f]}}},textureUV:{type:I.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:({texXmax:r,texXmin:t,texYmax:e,texYmin:s})=>[[t,s],[r,s],[t,e],[r,e]]}},color:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:r})=>J(r)},outlineColor:{type:I.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:r})=>J(r)},sizing:{type:I.UNSIGNED_BYTE,count:4,pack:({rawWidth:r,rawHeight:t,outlineSize:e,referenceSize:s})=>{const i=Math.max(r,t);return[dn(i,128),dn(e,128),dn(s,128),0]}},placementAngle:{type:I.UNSIGNED_BYTE,count:1,packTessellation:({placementAngle:r})=>uy(r)},sizeRatio:{type:I.UNSIGNED_SHORT,count:1,packPrecisionFactor:64,pack:({sizeRatio:r})=>r}}};class fy extends Je{constructor(){super(...arguments),this.vertexSpec=py}getBoundsInfo(){return this.evaluatedMeshParams.boundsInfo}_write(t,e,s){var u;const i=(u=this.evaluatedMeshParams.sprite)==null?void 0:u.textureBinding,n=e.getDisplayId();t.recordStart(this.instanceId,this.attributeLayout,i);const o=this.evaluatedMeshParams.minPixelBuffer,a=Math.max(this.evaluatedMeshParams.computedWidth,o),h=Math.max(this.evaluatedMeshParams.computedHeight,o),c=this.evaluatedMeshParams.offsetX,l=-this.evaluatedMeshParams.offsetY;if(this.evaluatedMeshParams.placement!=null)this._writePlacedMarkers(t,e,s,a,h);else if(s!=null&&s.nextPath()){s.nextPoint();const d=s.x,p=s.y;t.recordBounds(d+c,p+l,a,h),this._writeQuad(t,n,d,p)}else if(e.geometryType==="esriGeometryPolygon"){const d=e.readCentroidForDisplay();if(!d)return;const[p,f]=d.coords;t.recordBounds(p+c,f+l,a,h),this._writeQuad(t,n,p,f)}else if(e.geometryType==="esriGeometryPoint"){const d=e.readXForDisplay(),p=e.readYForDisplay();t.recordBounds(d+c,p+l,a,h),this._writeQuad(t,n,d,p)}else{const d=e.readGeometryForDisplay();d==null||d.forEachVertex((p,f)=>{t.recordBounds(p+c,f+l,a,h),Math.abs(p)>se||Math.abs(f)>se||this._writeQuad(t,n,p,f)})}t.recordEnd()}_writePlacedMarkers(t,e,s,i,n){var p;const o=s??((p=N.fromFeatureSetReaderCIM(e))==null?void 0:p.clone());if(!o)return;const a=-1,h=cu.getPlacement(o,a,this.evaluatedMeshParams.placement,E(1),t.id,Yo());if(!h)return;const c=e.getDisplayId();let l=h.next();const u=this.evaluatedMeshParams.offsetX,d=-this.evaluatedMeshParams.offsetY;for(;l!=null;){const f=l.tx,_=-l.ty;if(Math.abs(f)>se||Math.abs(_)>se){l=h.next();continue}const m=-l.getAngle();t.recordBounds(f+u,_+d,i,n),this._writeQuad(t,c,f,_,m),l=h.next()}}_writeQuad(t,e,s,i,n){const o=t.vertexCount(),a=n==null?null:{placementAngle:n};this._writeVertex(t,e,s,i,a),t.indexWrite(o+0),t.indexWrite(o+1),t.indexWrite(o+2),t.indexWrite(o+1),t.indexWrite(o+3),t.indexWrite(o+2)}}function _y(r,t){let e;if(typeof r=="string")e=ui(r+`-seed(${t})`);else{let s=12;e=r^t;do e=107*(e>>8^e)+s|0;while(--s!=0)}return(1+e/(1<<31))/2}function my(r){return Math.floor(_y(r,gy)*yy)}const gy=53290320,yy=10;let yi=class{destroy(){}},uu=class extends yi{constructor(t){super(),this._value=t}resize(t){}read(t,e){return this._value}readWithDefault(t,e,s){return this._value}referencesScale(){return!1}referencesGeometry(){return!1}};const xy=()=>_t.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.mesh.MeshWriterInputEvaluator");async function ji(r,t,e=!1){const{defaultValue:s,valueExpressionInfo:i,value:n}=t;if(i){const{expression:o}=i,a=await r.createComputedField({expression:o},e);return a?{...t,computed:a,defaultValue:s}:null}return{...t,computed:new uu(n),defaultValue:s}}async function Fh(r,t){const{defaultValue:e,valueExpressionInfo:s}=t,{expression:i}=s,n=await r.createComputedField({expression:i});return n?{...t,computed:n,defaultValue:e}:null}const du=r=>typeof r!="boolean"&&typeof r!="number"&&"valueExpressionInfo"in r,by=r=>r.some(t=>{for(const e in t){const s=t[e];if(du(s))return!0}return!1});let wy=class pu{static async create(t,e,s){const i={},n=new Map,o=new Map,a=new Map,h=new Map,c=new Map;for(const l in s){const u=s[l];if(u!=null&&typeof u=="object")if(Array.isArray(u)){if(typeof u[0]=="object")throw new Error(`InternalError: Cannot handle ${l}. Nested array params are not supported`);i[l]=u}else if("valueExpressionInfo"in u){if(u.value){i[l]=u.value;continue}const d=await Fh(t,u);if(!d){i[l]=u.defaultValue;continue}n.set(l,d),i[l]=null}else switch(u.type){case"cim-effect-infos":if(u.effectInfos.some(d=>d.overrides.length)){o.set(l,{effects:await Promise.all(u.effectInfos.map(async d=>{const p=d.overrides.map(f=>ji(t,f));return{effect:d.effect,compiledOverrides:(await Promise.all(p)).filter(bi)}}))});break}i[l]=u.effectInfos.map(d=>d.effect);break;case"cim-marker-placement-param":u.overrides.length&&a.set(l,{placementInfo:u,compiledOverrides:(await Promise.all(u.overrides.map(d=>ji(t,d)))).filter(bi)}),i[l]=u.placement;break;case"text-rasterization-param":{if(u.overrides.length){const p=u.overrides.map(f=>ji(t,f,u.useLegacyLabelEvaluationRules));h.set(l,{compiledOverrides:(await Promise.all(p)).filter(bi),rasterizationParam:u,objectIdToResourceId:new Map});continue}const d={type:"cim-rasterization-info",resource:u.resource};i[l]=await e.fetchResourceImmediate(d)??null;break}case"sprite-rasterization-param":{if(u.overrides.length){const p=u.overrides.map(f=>ji(t,f));h.set(l,{compiledOverrides:(await Promise.all(p)).filter(bi),rasterizationParam:u,objectIdToResourceId:new Map});continue}if(u.resource.type==="animated"){h.set(l,{compiledOverrides:[],rasterizationParam:u,objectIdToResourceId:new Map});continue}const d={type:"cim-rasterization-info",resource:u.resource};i[l]=await e.fetchResourceImmediate(d)??null;break}case"cim-marker-transform-param":{const{params:d}=u;if(by(d)){const p={compiledMarkerInfos:[]};await Promise.all(d.map(async f=>{const _={props:{}};for(const m in f)if(du(f[m])){const g=await Fh(t,f[m]);_.compiledExpressionMap||(_.compiledExpressionMap=new Map);const y=_.compiledExpressionMap;g&&y.set(m,g)}else _.props[m]=f[m];p.compiledMarkerInfos.push(_)})),c.set(l,p)}else i[l]={type:"cim-marker-transform-info",infos:d};break}default:i[l]=u}else i[l]=u}return new pu(s,i,n,o,a,h,c)}constructor(t,e,s,i,n,o,a){this.inputMeshParams=t,this._resolvedMeshParams=e,this._dynamicProperties=s,this._dynamicEffectProperties=i,this._dynamicPlacementProperties=n,this._dynamicAsyncProperties=o,this._dynamicTransformProperties=a,this.evaluator=h=>h}get hasDynamicProperties(){return!!(this._dynamicProperties.size||this._dynamicAsyncProperties.size||this._dynamicEffectProperties.size||this._dynamicTransformProperties.size||this._dynamicPlacementProperties.size)}get evaluatedMeshParams(){return this._evaluatedMeshParams||(this._evaluatedMeshParams=this.evaluator(this._resolvedMeshParams)),this._evaluatedMeshParams}enqueueRequest(t,e,s){for(const i of this._dynamicAsyncProperties.values()){const n=ko(i.rasterizationParam.resource);i.rasterizationParam.resource.type==="animated"&&i.rasterizationParam.resource.randomizeStartTime&&(n.primitiveName="__RESERVED__PRIMITIVE__NAME__",n.startGroup=my(e.getObjectId()||0));for(const{primitiveName:a,propertyName:h,computed:c,defaultValue:l,valueExpressionInfo:u}of i.compiledOverrides)try{const d=i.rasterizationParam.resource.type==="animated"?n.primitiveName:a;Ns(n,d,h,c,e,s,l)}catch(d){xy().errorOnce(new rt("invalid-arcade-expression",`Encountered an error when evaluating the arcade expression '${u==null?void 0:u.expression}' (primitive: '${a}', property: '${h}')`,d))}const o=t.enqueueRequest({type:"cim-rasterization-info",resource:n});i.objectIdToResourceId.set(e.getObjectId(),o)}}evaluateMeshParams(t,e,s){for(const[i,n]of this._dynamicProperties.entries())this._resolvedMeshParams[i]=n.computed.readWithDefault(e,s,n.defaultValue);for(const[i,n]of this._dynamicPlacementProperties.entries())for(const{computed:o,defaultValue:a,propertyName:h}of n.compiledOverrides){const c=o.readWithDefault(e,s,a);n.placementInfo.placement[h]=c,this._resolvedMeshParams[i]=n.placementInfo.placement}for(const[i,n]of this._dynamicEffectProperties.entries())for(const o of n.effects){for(const{computed:a,defaultValue:h,propertyName:c}of o.compiledOverrides){const l=a.readWithDefault(e,s,h);o.effect[c]=l}this._resolvedMeshParams[i]=n.effects.map(a=>a.effect)}for(const[i,n]of this._dynamicTransformProperties.entries()){const o={type:"cim-marker-transform-info",infos:[]};for(const a of n.compiledMarkerInfos){const h={...a.props};if(a.compiledExpressionMap)for(const[c,l]of a.compiledExpressionMap){const u=l.computed.readWithDefault(e,s,l.defaultValue);h[c]=typeof u=="number"||typeof u=="boolean"?u:l.defaultValue}o.infos.push(h)}this._resolvedMeshParams[i]=o}for(const[i,n]of this._dynamicAsyncProperties.entries()){const o=n.objectIdToResourceId.get(e.getObjectId());if(o==null)continue;const a=t.getResource(o);this._resolvedMeshParams[i]=a}return this._evaluatedMeshParams=this.evaluator(this._resolvedMeshParams),this.evaluatedMeshParams}};const vy={createComputedParams:r=>r,optionalAttributes:{},attributes:{pos:{type:I.SHORT,count:2,packPrecisionFactor:10,pack:"position"},id:{type:I.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:I.UNSIGNED_BYTE,count:1,pack:r=>0},offset:{type:I.SHORT,count:2,packPrecisionFactor:16,packAlternating:{count:4,pack:({size:r})=>{const t=E(r),e=-t/2,s=-t/2;return[[e,s],[e+t,s],[e,s+t],[e+t,s+t]]}}},texCoords:{type:I.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:()=>[[0,1],[1,1],[0,0],[1,0]]}},size:{type:I.UNSIGNED_BYTE,count:2,pack:({size:r})=>[r,r]},referenceSize:{type:I.UNSIGNED_BYTE,count:1,pack:({size:r})=>E(r)},zoomRange:{type:I.UNSIGNED_BYTE,count:2,pack:({scaleInfo:r},{tileInfo:t})=>ts(r,t)}}};let Iy=class extends Je{constructor(){super(...arguments),this.vertexSpec=vy}_write(t,e){const s=e.getDisplayId(),i=this.evaluatedMeshParams.minPixelBuffer,n=Math.max(E(this.evaluatedMeshParams.size),i);let o,a;if(e.geometryType==="esriGeometryPoint")o=e.readXForDisplay(),a=e.readYForDisplay();else{const c=e.readCentroidForDisplay();if(!c)return;o=c==null?void 0:c.coords[0],a=c==null?void 0:c.coords[1]}t.recordStart(this.instanceId,this.attributeLayout),t.recordBounds(o,a,n,n);const h=t.vertexCount();this._writeVertex(t,s,o,a),t.indexWrite(h+0),t.indexWrite(h+1),t.indexWrite(h+2),t.indexWrite(h+1),t.indexWrite(h+3),t.indexWrite(h+2),t.recordEnd()}};class Sy{async createMeshWriter(t,e,s,i){const n=this._getMeshWriter(i.techniqueType),o=await wy.create(t,e,i.inputParams),a=new n(i.id,o,i.optionalAttributes,s);return await a.loadDependencies(),a}_getMeshWriter(t){switch(t){case st.Fill:return Wo;case st.DotDensity:return q_;case st.ComplexFill:return nm;case st.PatternFill:return vl;case st.OutlineFill:return Jo;case st.PatternOutlineFill:return Dg;case st.ComplexOutlineFill:return Ag;case st.Marker:return fy;case st.PieChart:return Iy;case st.Text:return lu;case st.Line:return Zo;case st.TexturedLine:return oy;case st.Heatmap:return Ng;case st.Label:return ry;case st.Test:throw new Error("Internal Error: Found invalid mesh writer")}}}let Py=class{constructor(t,e,s,i){this.storage=t,this.proxy=e,this.viewParams=s,this.registry=i}async createMeshWriters(t){const e=t.map(s=>this.registry.createMeshWriter(this.storage,this.proxy,this.viewParams,s));return Promise.all(e)}},My=class{constructor(t){this._outstandingMessages=[],this._queue=new Do({concurrency:t.concurrency,process:e=>t.process(e)})}async push(t){if(t.end)return await Promise.all(this._outstandingMessages),await this._queue.push(t),void(this._outstandingMessages=[]);const e=this._queue.push(t);return this._outstandingMessages.push(e),e}},fu=class yo{static async create(t,e){var i;if(e.statisticType==="count"){const n=new uu(1);return new yo(e.name,e.alias,e.type,e.statisticType,n)}const s=await t.createComputedField({expression:(i=e.onStatisticExpression)==null?void 0:i.expression,field:e.onStatisticField});return new yo(e.name,e.alias,e.type,e.statisticType,s)}constructor(t,e,s,i,n){this.name=t,this.alias=e,this.type=s,this.statisticType=i,this.computed=n}},pa=class{constructor(t){this.subscription=t,this.handledChunks=new Set}destroy(){}},_u=class{constructor(t,e){this._source=t,this._attributeStore=e,this._sendStates=new Map}destroy(){}get enablePixelBuffering(){return!0}onSubscribe(t){const e=this.createState(t);this._sendStates.set(t.key.id,e),this.updateChunks()}onUnsubscribe(t){var e;(e=this._sendStates.get(t.key.id))==null||e.destroy(),this._sendStates.delete(t.key.id)}invalidate(){const t=Array.from(this._sendStates.values());this._sendStates.clear();for(const e of t)e.destroy(),this.onSubscribe(e.subscription)}invalidateAttributeData(){}getFeatureObjectIdsForAggregate(t){throw new Error("InternalError: AggregateId lookup not supported")}getDisplayIds(t){return this.displayMap(t,e=>e,e=>e)}getDisplayAndObjectIds(t){return this.displayMap(t,e=>e,(e,s,i)=>[e,i])}afterUpdateChunks(){}},mu=class extends _u{constructor(t,e,s,i){super(t,e),this.spatialReference=s,this.aggregateFields=i,this.events=new Fo,this.featureAdapter=Jd}get aggregateQueryEngine(){return this._aggregateQueryEngine||(this._aggregateQueryEngine=new uc({featureStore:this,fieldsIndex:this._metadata.fieldsIndex,geometryType:this._metadata.geometryType,objectIdField:this._metadata.objectIdField,spatialReference:this.spatialReference})),this._aggregateQueryEngine}removeChunks(t){}forEach(t){return this.forEachAggregateWorldSpace(t)}forEachInBounds(t,e){}forEachBounds(t,e){const s=Ao();for(const i of t){const n=Wd(s,i.geometry,!1,!1);n&&e(n)}}},fa=class{constructor(t,e,s,i,n){this.subscription=t,this.reader=e,this.clear=s,this.end=i,this.debugInfo=n,this.type="append"}get id(){return this.subscription.tile.id}createMessage(t,e,s){return{type:"append",clear:this.clear,id:this.id,append:t,end:this.end,debugInfo:this.debugInfo,subscriptionVesrion:this.subscription.version,version:e,attributeEpoch:s}}},xo=class{constructor(t,e,s,i,n){this.subscription=t,this.reader=e,this.remove=s,this.end=i,this.debugInfo=n,this.type="update"}get id(){return this.subscription.tile.id}createMessage(t,e,s){return{type:"update",id:this.id,modify:t,debugInfo:this.debugInfo,remove:this.remove,version:e,subscriptionVesrion:this.subscription.version,end:this.end,attributeEpoch:s}}},$y=class extends yi{constructor(t){super(),this._field=t}resize(t){throw new Error("Method not implemented.")}read(t,e){return t.readAttribute(this._field)}readWithDefault(t,e){return t.readAttribute(this._field)}referencesScale(){return!1}referencesGeometry(){return!1}};function Ah(r,t,e){var i;if(r==null)return null;const s=t.readArcadeFeature();t.contextTimeZone=(i=e.$view)==null?void 0:i.timeZone;try{return r.evaluate({...e,$feature:s},r.services)}catch(n){return _t.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",n),null}}function _a(r){return r==null||r===1/0||r===-1/0||typeof r=="number"&&isNaN(r)}function zh(r,t,e,s){var o;if(r==null)return s??null;const i=t.readArcadeFeature();t.contextTimeZone=(o=e.$view)==null?void 0:o.timeZone;const n=r.evaluate({...e,$feature:i},r.services);return _a(n)?s??null:n}let Ty=class gu extends yi{static async create(t,e){const s=await id(t,e.spatialReference,e.fields),i=ui(t);return new gu(s,i)}constructor(t,e){super(),this._compiled=t,this._cacheKey=e}resize(t){}read(t,e){return this.referencesScale()||e.$view.timeZone!=="system"?Ah(this._compiled,t,e):this._readCached(t,e)}readWithDefault(t,e,s){return this.referencesScale()||e.$view.timeZone!=="system"?zh(this._compiled,t,e,s):this._readWithDefaultCached(t,e,s)}referencesScale(){var t;return((t=this._compiled)==null?void 0:t.referencesScale())??!1}referencesGeometry(){var t;return((t=this._compiled)==null?void 0:t.referencesGeometry())??!1}_readCached(t,e){if(t.setCache(this._cacheKey),t.hasCachedValue())return t.getCachedValue();const s=Ah(this._compiled,t,e);return t.setCachedValue(s),s}_readWithDefaultCached(t,e,s){if(t.setCache(this._cacheKey),t.hasCachedValue())return t.getCachedValue();const i=zh(this._compiled,t,e,s);return t.setCachedValue(i),i}};function Cy(r,t){if(r==null)return"";const e=t.domain;if(e){if(e.type==="codedValue"||e.type==="coded-value"){const i=r;for(const n of e.codedValues)if(n.code===i)return n.name}else if(e.type==="range"){const{max:i,min:n}=rd(t),o=+r;if(n!=null&&i!=null&&n<=o&&o<=i)return e.name}}let s=r;return nd(t)?s=od(s,ad("short-date")):hd(t)&&(s=cd(+s)),s||""}let ky=class yu extends yi{static async create(t,e){const s=ld(t);return new yu(i=>s.replaceAll(/{[^}]*}/g,n=>{const o=n.slice(1,-1),a=i.metadata.fieldsIndex.get(o);if(a==null)return n;const h=i.readAttribute(o);return h==null?"":Cy(h,a)}))}constructor(t){super(),this._evaluator=t}resize(t){}read(t,e){return this._evaluator(t)}readWithDefault(t,e,s){const i=this._evaluator(t);return _a(i)?s:i}referencesScale(){return!1}referencesGeometry(){return!1}},Ey=class extends yi{constructor(t,e){super(),this._field=t,this._normalizationInfo=e}resize(t){throw new Error("Method not implemented.")}read(t,e){return this._readNormalized(t)}readWithDefault(t,e){return this._readNormalized(t)}referencesScale(){return!1}referencesGeometry(){return!1}_readNormalized(t){const e=t.readAttribute(this._field);if(e==null)return null;const{normalizationField:s,normalizationTotal:i,normalizationType:n}=this._normalizationInfo,o=t.readAttribute(s);switch(n??"esriNormalizeByField"){case"esriNormalizeByField":return o?o?e/o:void 0:null;case"esriNormalizeByLog":return Math.log(e)*Math.LOG10E;case"esriNormalizeByPercentOfTotal":return i?e/i*100:null}}},ma=class dr{static fromBuffer(t,e){return new dr(t,e)}static create(t,e=4294967295){const s=new Uint32Array(Math.ceil(t/32));return new dr(s,e)}constructor(t,e){this._mask=0,this._buf=t,this._mask=e}_getIndex(t){return Math.floor(t/32)}has(t){const e=this._mask&t;return!!(this._buf[this._getIndex(e)]&1<>>=1,i++}}countSet(){let t=0;return this.forEachSet(e=>{t++}),t}};const xn=()=>_t.getLogger("esri.views.2d.layers.features.support.whereUtils"),Fy={getAttribute:(r,t)=>r.readAttribute(t)};async function xu(r,t){try{const e=await ud(r,t);if(!e.isStandardized){const s=new rt("mapview - bad input","Unable to apply filter's definition expression, as expression is not standardized.",e);xn().error(s)}return s=>{const i=s.readArcadeFeature();try{return e.testFeature(i,Fy)}catch{return xn().warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",r),!0}}}catch{return xn().warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",r),s=>!0}}const Oh=()=>_t.getLogger("esri.views.2d.layers.features.support.ComputedAttributeStorage"),De=4294967295;function Yi(r,t,e){if(!(r.length>t))for(;r.length<=t;)r.push(e)}let ga=class{constructor(t){this._numerics=[],this._strings=[],this._allocatedSize=256,this._bitsets=[],this._instanceIds=[],this._bounds=[],this._dirtyBitset=this.getBitset(this.createBitset()),this.compilationOptions=t}createBitset(){const t=this._bitsets.length;return this._bitsets.push(ma.create(this._allocatedSize,et)),t+1}async createComputedField(t,e=!1){if(t.expression)try{if(!this.compilationOptions)throw new Error("InternalError: Compilation options not defined");return e?ky.create(t.expression,this.compilationOptions):await Ty.create(t.expression,this.compilationOptions)}catch(i){const n=new rt("featurelayer","Failed to compile arcade expression",{error:i,expression:t.expression});return Oh().error(n),null}if(t.normalizationType||t.normalizationField)return new Ey(t.field,t);if(t.field)return new $y(t.field);const s=new rt("featurelayer","Unable to create computed field. No expression or field found",{info:t});return Oh().error(s),null}async createWhereClause(t){return t?xu(t,this.compilationOptions.fields):null}getBitset(t){return this._bitsets[t-1]}getComputedNumeric(t,e){return this.getComputedNumericAtIndex(t&et,0)}setComputedNumeric(t,e,s){return this.setComputedNumericAtIndex(t&et,s,0)}getComputedString(t,e){return this.getComputedStringAtIndex(t&et,0)}setComputedString(t,e,s){return this.setComputedStringAtIndex(t&et,0,s)}getComputedNumericAtIndex(t,e){const s=t&et;return this._ensureNumeric(e,s),this._numerics[e][s]}setComputedNumericAtIndex(t,e,s){const i=t&et;this._ensureNumeric(e,i),this._numerics[e][i]=s}getPackedChunkId(t){const e=t&et;return this._ensureInstanceId(e),this._instanceIds[e]}setPackedChunkId(t,e){const s=t&et;this._ensureInstanceId(s),this._instanceIds[s]=e}getComputedStringAtIndex(t,e){const s=t&et;return this._ensureString(e,s),this._strings[e][s]}setComputedStringAtIndex(t,e,s){const i=t&et;this._ensureString(e,i),this._strings[e][i]=s}getXMin(t){return this._bounds[4*(t&et)]}getYMin(t){return this._bounds[4*(t&et)+1]}getXMax(t){return this._bounds[4*(t&et)+2]}getYMax(t){return this._bounds[4*(t&et)+3]}setBounds(t,e,s=!1){const i=t&et;if(!s&&!this._dirtyBitset.has(t))return this._bounds[4*i]!==De;this._dirtyBitset.unset(t);const n=e.readGeometryWorldSpace();if(Yi(this._bounds,4*i+4,0),!n||!n.coords.length)return this._bounds[4*i]=De,this._bounds[4*i+1]=De,this._bounds[4*i+2]=De,this._bounds[4*i+3]=De,!1;let o=1/0,a=1/0,h=-1/0,c=-1/0;return n.forEachVertex((l,u)=>{o=Math.min(o,l),a=Math.min(a,u),h=Math.max(h,l),c=Math.max(c,u)}),this._bounds[4*i]=o,this._bounds[4*i+1]=a,this._bounds[4*i+2]=h,this._bounds[4*i+3]=c,!0}getBounds(t,e){const s=this.getXMin(e),i=this.getYMin(e),n=this.getXMax(e),o=this.getYMax(e);return Mn(t,s,i,n,o),s!==De}_ensureNumeric(t,e){this._numerics[t]||(this._numerics[t]=[]),Yi(this._numerics[t],e,0)}_ensureInstanceId(t){Yi(this._instanceIds,t,0)}_ensureString(t,e){this._strings[t]||(this._strings[t]=[]),Yi(this._strings[t],e,null)}},kr=class{getObjectId(t){return t.getObjectId()}getAttributes(t){return t.readAttributes()}getAttribute(t,e){return t.readAttribute(e)}getAttributeAsTimestamp(t,e){return t.readAttributeAsTimestamp(e)}cloneWithGeometry(t,e){return t}getGeometry(t){return t.readGeometryWorldSpace()}getCentroid(t,e){return t.readCentroidForDisplay()}};kr.Shared=new kr;const gs=1,Ay=2;let ya=class bu{constructor(t){this._geometryBounds=di(),this._idToVisibility=new Map,this._serviceInfo=t}static async create(t){const e=new bu(t);return await e.update(t.filterJSON,t.spatialReference),e}get hash(){return this._hash}check(t){return this._applyFilter(t)}clear(){const t=this._resetAllHiddenIds();return this.update(),{show:t,hide:[]}}invalidate(){this._idToVisibility.forEach((t,e)=>{this._idToVisibility.set(e,0)})}setKnownIds(t){for(const e of t)this._idToVisibility.set(e,gs)}setTrue(t){const e=[],s=[],i=new Set(t);return this._idToVisibility.forEach((n,o)=>{const a=!!(this._idToVisibility.get(o)&gs),h=i.has(o);!a&&h?e.push(o):a&&!h&&s.push(o),this._idToVisibility.set(o,h?gs|Ay:0)}),{show:e,hide:s}}createQuery(){const{geometry:t,spatialRel:e,where:s,timeExtent:i,objectIds:n}=this;return zo.fromJSON({geometry:t,spatialRel:e,where:s,timeExtent:i,objectIds:n})}async update(t,e){this._hash=JSON.stringify(t);const s=await tp(t,null,e);await Promise.all([this._setGeometryFilter(s),this._setIdFilter(s),this._setAttributeFilter(s),this._setTimeFilter(s)])}async _setAttributeFilter(t){if(!(t!=null&&t.where))return this._clause=null,void(this.where=null);this._clause=await xu(t.where,this._serviceInfo.fieldsIndex),this.where=t.where}_setIdFilter(t){this._idsToShow=(t==null?void 0:t.objectIds)&&new Set(t.objectIds),this._idsToHide=(t==null?void 0:t.hiddenIds)&&new Set(t.hiddenIds),this.objectIds=t==null?void 0:t.objectIds}async _setGeometryFilter(t){if(!(t!=null&&t.geometry))return this._spatialQueryOperator=null,this.geometry=null,void(this.spatialRel=null);const e=t.geometry,s=t.spatialRel||"esriSpatialRelIntersects",i=await ep(s,e,this._serviceInfo.geometryType,this._serviceInfo.hasZ,this._serviceInfo.hasM);dd(this._geometryBounds,e),this._spatialQueryOperator=i,this.geometry=e,this.spatialRel=s}_setTimeFilter(t){if(this.timeExtent=this._timeOperator=null,t==null?void 0:t.timeExtent)if(this._serviceInfo.timeInfo)this.timeExtent=t.timeExtent,this._timeOperator=sp(this._serviceInfo.timeInfo,t.timeExtent,kr.Shared);else{const e=new rt("feature-layer-view:time-filter-not-available","Unable to apply time filter, as layer doesn't have time metadata.",t.timeExtent);_t.getLogger("esri.views.2d.layers.features.controllers.FeatureFilter").error(e)}}_applyFilter(t){return this._filterByGeometry(t)&&this._filterById(t)&&this._filterByTime(t)&&this._filterByExpression(t)}_filterByExpression(t){return!this.where||this._clause(t)}_filterById(t){var e,s;return(!((e=this._idsToHide)!=null&&e.size)||!this._idsToHide.has(t.getObjectId()))&&(!((s=this._idsToShow)!=null&&s.size)||this._idsToShow.has(t.getObjectId()))}_filterByGeometry(t){if(!this.geometry)return!0;const e=t.readGeometryWorldSpace();return!!e&&this._spatialQueryOperator(e)}_filterByTime(t){return this._timeOperator==null||this._timeOperator(t)}_resetAllHiddenIds(){const t=[];return this._idToVisibility.forEach((e,s)=>{e&gs||(this._idToVisibility.set(s,gs),t.push(s))}),t}},xa=class wu{static minimal(t,e,s=[]){return new wu({geometryType:t,fields:s,objectIdField:e,subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,typeIdField:null})}constructor(t){this._options=t,this._fieldsIndex="fieldsIndex"in t?_r.fromJSON(t.fieldsIndex):new _r(t.fields),t.spatialReference&&(this._spatialReference=ft.fromJSON(t.spatialReference)),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:this.objectIdField,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get objectIdField(){return this._options.objectIdField}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}},vu=class{constructor(t){this._valid=ma.create(t),this._data=new Array(t)}has(t){return this._valid.has(t)}set(t,e){this._valid.set(t),this._data[t]=e}get(t){return this._data[t]}};const Xr=k("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],zy=Xr[0],Oy=Xr[1],Ly=Xr[2],Dy=Xr[3],ba=k("featurelayer-simplify-payload-size-factors")??[1,2,4],Ry=ba[0],Ny=ba[1],By=ba[2],Gy=k("featurelayer-simplify-mobile-factor")??2,Vy=k("esri-mobile"),Lh=4294967295;function Uy(r,t,e){if(!(r.length>t))for(;r.length<=t;)r.push(e)}class wa{constructor(t){this.metadata=t,this.type="FeatureSetReader",this._deleted=null,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}get isEmpty(){return this._deleted!=null&&this._deleted.countSet()===this.getSize()}getAreaSimplificationThreshold(t,e){let s=1;const i=Vy?Gy:1;e>4e6?s=By*i:e>1e6?s=Ny*i:e>5e5?s=Ry*i:e>1e5&&(s=i);let n=0;return t>4e3?n=Dy*s:t>2e3?n=Ly*s:t>100?n=Oy:t>15&&(n=zy),n}parseTimestampOffset(t){return t}getBounds(t){if(Uy(this._boundsBuffer,4*this.getIndex()+4,0),this.getBoundsXMin()===Lh)return!1;if(this.getBoundsXMin()===0){const o=this.readGeometryWorldSpace();if(!o)return this.setBoundsXMin(Lh),!1;let a=1/0,h=1/0,c=-1/0,l=-1/0;return o.forEachVertex((u,d)=>{a=Math.min(a,u),h=Math.min(h,d),c=Math.max(c,u),l=Math.max(l,d)}),this.setBoundsXMin(a),this.setBoundsYMin(h),this.setBoundsXMax(c),this.setBoundsYMax(l),Mn(t,a,h,c,l),!0}const e=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),n=this.getBoundsYMax();return Mn(t,e,s,i,n),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(t){this._boundsBuffer[4*this.getIndex()]=t}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(t){this._boundsBuffer[4*this.getIndex()+1]=t}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(t){this._boundsBuffer[4*this.getIndex()+2]=t}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(t){this._boundsBuffer[4*this.getIndex()+3]=t}readAttributeAsTimestamp(t){const e=this.readAttribute(t);return typeof e=="string"?new Date(e).getTime():typeof e=="number"||e==null?e:null}readAttribute(t,e=!1){const s=this._readAttribute(t,e);if(s!==void 0)return s;for(const i of this._joined){i.setIndex(this.getIndex());const n=i._readAttribute(t,e);if(n!==void 0)return n}}readAttributes(){const t=this._readAttributes();for(const e of this._joined){e.setIndex(this.getIndex());const s=e._readAttributes();for(const i of Object.keys(s))t[i]=s[i]}return t}joinAttributes(t){this._joined.push(t)}removeIds(t){if(this._objectIdToIndex==null){const s=new Map,i=this.getCursor();for(;i.next();){const n=i.getObjectId();sc(n),s.set(n,i.getIndex())}this._objectIdToIndex=s}const e=this._objectIdToIndex;for(const s of t.values())e.has(s)&&this._removeAtIndex(e.get(s))}readOptimizedFeatureWorldSpace(){const t=this.readGeometryWorldSpace(),e=this.readAttributes(),s=this.readCentroidWorldSpace(),i=new ye(t,e,s);return i.objectId=this.getObjectId(),i.displayId=this.getDisplayId(),i}readLegacyFeatureForDisplay(){const t=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(t&&{x:t.coords[0],y:t.coords[1]})??null}}readLegacyFeatureWorldSpace(){const t=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(t&&{x:t.coords[0],y:t.coords[1]})??null}}readLegacyGeometryForDisplay(){const t=this.readGeometryForDisplay();return Ye(t,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const t=this._readX(),e=this.getInTransform();return e==null?t:t*e.scale[0]+e.translate[0]}readYWorldSpace(){const t=this._readY(),e=this.getInTransform();return e==null?t:e.translate[1]-t*e.scale[1]}readGeometryForDisplay(){const t=this._readGeometryDeltaDecoded(!0);if(!t){const e=this._createGeometryFromServerCentroid();return e?e.deltaDecode():null}return t}readGeometryWorldSpace(){let t=this._readGeometry();if(t||(t=this._createGeometryFromServerCentroid()),!t)return null;const e=t.clone(),s=this.getInTransform();return s!=null&&kn(e,e,this.hasZ,this.hasM,s),e}readCentroidForDisplay(){const t=this.readGeometryForDisplay();return t?this._computeDisplayCentroid(t):this._readServerCentroid()}readCentroidWorldSpace(){const t=this.readGeometryForDisplay(),e=t?this._computeDisplayCentroid(t):this._readServerCentroid();if(!e)return null;const s=e.clone(),i=this.getInTransform();return i!=null&&kn(s,s,this.hasZ,this.hasM,i),s}setCache(t){let e=this._caches.get(t);e==null&&(e=new vu(this.getSize()),this._caches.set(t,e)),this._activeCache=e}setCachedValue(t){this._activeCache.set(this.getIndex(),t)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}_readGeometryDeltaDecoded(t){const e=this._readGeometry(t);return this.geometryType!=="esriGeometryPoint"&&e&&this.getInTransform()?e.deltaDecode():e}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(t){this._contextTimeZone=t}readArcadeFeature(){return this}hasField(t){return this.fields.has(t)||this._joined.some(e=>e.hasField(t))}geometry(){const t=this.readGeometryWorldSpace(),e=Ye(t,this.geometryType,this.hasZ,this.hasM),s=pd(e);if(s){if(!this.metadata.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");s.spatialReference=this.metadata.spatialReference}return s}autocastArcadeDate(t,e){return e&&e instanceof Date?this.isUnknownDateTimeField(t)?$i.unknownDateJSToArcadeDate(e):$i.dateJSAndZoneToArcadeDate(e,this.contextTimeZone??fd):e}isUnknownDateTimeField(t){return this.metadata.fieldsIndex.getTimeZone(t)===_d}field(t){let e=this.fields.get(t);if(e)switch(e.type){case"date-only":case"esriFieldTypeDateOnly":return Fa.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return Ea.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return $i.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const s of this._joined)if(s.setIndex(this.getIndex()),e=s.fields.get(t),e)switch(e.type){case"date-only":case"esriFieldTypeDateOnly":return Fa.fromReader(s._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return Ea.fromReader(s._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return $i.fromReaderAsTimeStampOffset(s._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,s._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(t,e){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(t=>t.name)}castToText(t=!1){if(!t)return JSON.stringify(this.readLegacyFeatureForDisplay());const e=this.readLegacyFeatureForDisplay();if(!e)return JSON.stringify(null);const s={geometry:e.geometry,attributes:{...e.attributes??{}}};for(const i in s.attributes){const n=s.attributes[i];n instanceof Date&&(s.attributes[i]=n.getTime())}return JSON.stringify(s)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(t=null){var e;return{attributes:this._readAttributes(),geometry:(t==null?void 0:t.keepGeometryType)===!0?this.geometry():((e=this.geometry())==null?void 0:e.toJSON())??null}}castAsJsonAsync(t=null,e=null){return Promise.resolve(this.castAsJson(e))}_getExists(){return this._deleted==null||!this._deleted.has(this.getIndex())}_computeDisplayCentroid(t){if(this.getInTransform()==null)return ip(new R,t,this.hasM,this.hasZ);const e=N.fromOptimized(t,this.geometryType);e.yFactor*=-1;const s=nl(e);return s?(s[1]*=-1,new R([],s)):null}copyInto(t){t._joined=this._joined,t._deleted=this._deleted,t._objectIdToIndex=this._objectIdToIndex,t._boundsBuffer=this._boundsBuffer,t._activeCache=this._activeCache,t._caches=this._caches,t._contextTimeZone=this._contextTimeZone}_readLegacyGeometryWorldSpace(){const t=this.readGeometryWorldSpace();return Ye(t,this.geometryType,!1,!1)}_createGeometryFromServerCentroid(){const t=this._readServerCentroid();if(!t)return null;const[e,s]=t.coords;return this._createQuantizedExtrudedGeometry(e,s)}_createQuantizedExtrudedGeometry(t,e){return this.geometryType==="esriGeometryPolyline"?this._createQuantizedExtrudedLine(t,e):this._createQuantizedExtrudedQuad(t,e)}_createQuantizedExtrudedQuad(t,e){return new R([5],[t-1,e,1,-1,1,1,-1,1,-1,-1])}_createQuantizedExtrudedLine(t,e){return new R([2],[t-1,e+1,1,-1])}_removeAtIndex(t){this._deleted==null&&(this._deleted=ma.create(this.getSize())),this._deleted.set(t)}}let at=class _e extends wa{static fromFeatures(t,e){const{objectIdField:s,geometryType:i}=e,n=Xd([],t,i,!1,!1,s);for(let o=0;o!(s.objectId!=null&&e.has(s.objectId)))}getSize(){return this._features.length}getCursor(){return this.copy()}getInTransform(){return this._transform}getAttributeHash(){let t="";for(const e in this._current.attributes)t+=this._current.attributes[e];return t}getIndex(){return this._featureIndex}setIndex(t){this._featureIndex=t}getObjectId(){var t;return(t=this._current)==null?void 0:t.objectId}getDisplayId(){return this._current.displayId}setDisplayId(t){this._current.displayId=t}copy(){const t=new _e(this._features,this.metadata);return this.copyInto(t),t}next(){for(;++this._featureIndexfu.create(o,c))),h=t.featureFilter?await ya.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:e,filterJSON:t.featureFilter}):null;return t.index.type==="geohash"&&await rp(e,ft.WGS84),new Iu(t,h,n,a,e,s,i)}constructor(t,e,s,i,n,o,a){super(o,a,n,i),this._schema=t,this._featureFilter=e,this._timeZone=s,this._metadata=new xa({geometryType:"esriGeometryPolygon",objectIdField:"aggregateId",fields:t.fields,globalIdField:null,spatialReference:o.metadata.spatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,typeIdField:null,types:null})}createState(t){return new qy(t,this._attributeStore)}async*applyLocalEdit(t){for(const e of this._sendStates.values())e.reset(),yield new fa(e.subscription,at.empty(this._source.metadata),!0,!1,{})}displayMap(t,e,s){const i=new Map(t.map(o=>[e(o),o])),n=[];for(const o of this._sendStates.values())for(const a of o.featuresWorldSpace()){const{objectId:h,displayId:c}=a,l=i.get(h);if(l!=null){const u=s(c,l,h);n.push(u),i.delete(h)}}return n}getDisplayFeatures(t){const e=new Set(t),s=new Set,i=[];for(const n of this._sendStates.values())for(const o of n.featuresWorldSpace())e.has(o.displayId)&&!s.has(o.objectId)&&(o.geometry&&i.push({...hc(o,this._metadata.geometryType,!1,!1),displayId:o.displayId}),s.add(o.objectId));return{features:[],aggregates:i}}getFeatureObjectIdsForAggregate(t){for(const e of this._sendStates.values())for(const s of e.bins.values())if(s.id===t)return Array.from(s.containedObjectIds);return[]}async*updateChunks(){if(this._source.chunks().length)for(const t of this._sendStates.values())yield*this._update(t,this._source)}forEachAggregateWorldSpace(t){for(const e of this._sendStates.values())for(const s of e.featuresWorldSpace())t(s)}_createIndexOptions(t){switch(this._schema.index.type){case"geohash":return{type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,timeZone:this._timeZone,scale:t.scale};case"grid":{const e=this._schema.index.fixedBinLevel,s=e!=null?t.tileInfoView.getLODInfoAt(e).scale:t.scale;return{type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,timeZone:this._timeZone,scale:s}}}}async*_update(t,e){const{handledChunks:s,subscription:i,bins:n,featureCache:o}=t,a=i.tile;if(t.done)return;for(const _ of e.chunks()){if(s.has(_.chunkId))continue;s.add(_.chunkId);const m=_.queryInfo;if("tileId"in m){const g=new ne(m.tileId);if(g.level!==a.level||g.world!==a.key.world)continue}_.getAggregateIndex(this._createIndexOptions(t.tile)).putBounded(n,t.tile.extent,t.tile.resolution)}const h=[],c=i.tile.transform,l=i.tile.key.level;for(const _ of n.values()){let m=o.get(_.id);if(m)m.attributes=_.getAttributes();else{const g=_.getGeometry(this.spatialReference,c);m=new ye(g,_.getAttributes(),null),g||(m.centroid=_.getGeometricCentroid(this.spatialReference,c)),m.objectId=_.id,m.displayId=this._attributeStore.createDisplayIdForObjectId(`${m.objectId}.${l}`),o.set(_.id,m)}h.push(m)}this.events.emit("changed"),t.done=!e.updateTracking.updating;const u=at.fromOptimizedFeatures(h,this._metadata,c),d=u.getCursor(),p=t.subscription.tile.createArcadeEvaluationOptions(this._timeZone);for(;d.next();)this._attributeStore.setAttributeData(d.getDisplayId(),d,p);yield new xo(t.subscription,u,[],t.done,{})}},Su=class{constructor(t){this._statistics=t}get statistics(){return this._statistics}};const Dh=Math.PI/180;let Pu=class bo{static create(t){return new bo(t.map(e=>Yy(e)))}constructor(t){this._statistics=t}values(){return this._statistics.values()}insert(t,e){for(const s of this._statistics)s.insert(t,e)}merge(t){for(let e=0;et.clone()))}};function Yy(r){switch(r.statisticType){case"min":return new Wy(r);case"max":return new Xy(r);case"avg":return new Zy(r);case"avg_angle":return new Ky(r);case"sum":case"count":return new Hy(r);case"mode":return new Qy(r)}}let ns=class{constructor(t){this.field=t}insert(t,e){if(!this.field.computed)return;const s=this.field.computed.read(t,e);_a(s)||this._insertValue(s)}},Wy=class Mu extends ns{constructor(){super(...arguments),this.type="min",this.value=Number.MAX_VALUE}_insertValue(t){this.value=Math.min(this.value,t)}merge(t){this.value=Math.min(this.value,t.value)}clone(){const t=new Mu(this.field);return t.value=this.value,t}},Xy=class $u extends ns{constructor(){super(...arguments),this.type="max",this.value=Number.MIN_VALUE}_insertValue(t){this.value=Math.max(this.value,t)}merge(t){this.value=Math.max(this.value,t.value)}clone(){const t=new $u(this.field);return t.value=this.value,t}},Hy=class Tu extends ns{constructor(){super(...arguments),this.type="sum",this.value=0}_insertValue(t){this.value+=t}merge(t){this.value+=t.value}clone(){const t=new Tu(this.field);return t.value=this.value,t}},Zy=class Cu extends ns{constructor(){super(...arguments),this.type="avg",this._total=0,this._count=0}get value(){return this._total/this._count}_insertValue(t){this._total+=t,this._count+=1}merge(t){this._total+=t._total,this._count+=t._count}clone(){const t=new Cu(this.field);return t._total=this._total,t._count=this._count,t}},Ky=class ku extends ns{constructor(){super(...arguments),this.type="avg_angle",this._x=0,this._y=0,this._count=0}get value(){const t=this._x/this._count,e=this._y/this._count,s=180/Math.PI;return Math.atan2(e,t)*s}_insertValue(t){this._x=this._x+Math.cos(t*Dh),this._y=this._y+Math.sin(t*Dh),this._count+=1}merge(t){this._x+=t._x,this._y+=t._y,this._count+=t._count}clone(){const t=new ku(this.field);return t._x=this._x,t._y=this._y,t._count=this._count,t}},Qy=class Eu extends ns{constructor(){super(...arguments),this._frequencies=new Map}get value(){let t,e=0;for(const[s,i]of this._frequencies.entries())i>e&&(e=i,t=s);return t}_insertValue(t){const e=this._frequencies.get(t);e!=null?this._frequencies.set(t,e+1):this._frequencies.set(t,1)}merge(t){for(const[e,s]of t._frequencies.entries()){const i=this._frequencies.get(e);i!=null?this._frequencies.set(e,i+s):this._frequencies.set(e,s)}}clone(){const t=new Eu(this.field);return t._frequencies=new Map(this._frequencies),t}},wo=class pr extends Su{static createId(t,e){return`${t}.${e}`}static create(t,e,s,i){return new pr(t,e,Pu.create(s),i)}constructor(t,e,s,i){super(s),this.gridX=t,this.gridY=e,this._worldUnitsPerCell=i,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return pr.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}clone(){const t=new pr(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return t._count=this._count,t._xWorldTotal=this._xWorldTotal,t._yWorldTotal=this._yWorldTotal,t._firstFeatureAttributes=this._firstFeatureAttributes,t._objectIds=new Set(this._objectIds),t}insert(t,e,s,i){this._count===0?this._firstFeatureAttributes=t.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=s,this._yWorldTotal+=i,this._statistics.insert(t,e),this._objectIds.add(t.getObjectId())}merge(t){if(t._count!==0){this._count+=t._count,this._firstFeatureAttributes=t._firstFeatureAttributes,this._xWorldTotal+=t._xWorldTotal,this._yWorldTotal+=t._yWorldTotal,this._statistics.merge(t._statistics);for(const e of t._objectIds.values())this._objectIds.add(e)}}getCentroidX(t){return t==null?this.centroidXWorld:Zd(t,this.centroidXWorld)}getCentroidY(t){return t==null?this.centroidYWorld:Kd(t,this.centroidYWorld)}getGeometry(t,e){const s=this.gridX*this._worldUnitsPerCell,i=this.gridY*this._worldUnitsPerCell,n=new R([4],[s,i,s+this._worldUnitsPerCell,i,s+this._worldUnitsPerCell,i+this._worldUnitsPerCell,s,i+this._worldUnitsPerCell]);if(e!=null){const o=new R;return We(o,n,!1,!1,"esriGeometryPolygon",e)}return n}getCentroid(t){const e=new R([],[this.centroidXWorld,this.centroidYWorld]);if(t!=null){const s=new R;return We(s,e,!1,!1,"esriGeometryPoint",t)}return e}getGeometricCentroid(t,e){const s=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,i=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,n=new R([],[s,i]);if(e!=null){const o=new R;return We(o,n,!1,!1,"esriGeometryPoint",e)}return n}getAttributes(){const t={aggregateId:this.id};for(const e of this._statistics.values())t[e.field.name]=e.value;return this._firstFeatureAttributes!=null?{...t,...this._firstFeatureAttributes}:t}},Fu=class{constructor(t){this._options=t}insert(t,e){const s=t.getCursor(),i={$view:{scale:this._options.scale,timeZone:this._options.timeZone}};for(;s.next();)this._insertFeature(s,i,e)}_insertFeature(t,e,s){const{featureFilter:i}=this._options;if(i!==null&&!i.check(t))return;let n=0,o=0;if(t.geometryType==="esriGeometryPoint")n=t.readXWorldSpace(),o=t.readYWorldSpace();else{if(s){const h=t.readCentroidForDisplay();if(h==null)return;const[c,l]=h.coords;if(c<0||c>V||l<0||l>V)return}const a=t.readCentroidWorldSpace();if(a==null)return;n=a.coords[0],o=a.coords[1]}this._insert(t,n,o,e)}};const Jy=96;function vo(r,t){return md(r)*gd*Jy/t}let tx=class extends Fu{constructor(t){super(t),this._cells=new Map,this._pixelsPerMapUnit=vo(t.spatialReference,t.scale)}put(t){for(const e of this._cells.values()){const s=t.get(e.id);s?s.merge(e):t.set(e.id,e.clone())}}putBounded(t,e,s){const i=[e.xmin,e.ymin,e.xmax,e.ymax],[n,o,a,h]=i,c=Math.floor(n*this._pixelsPerMapUnit/this._options.cellSize),l=Math.floor(o*this._pixelsPerMapUnit/this._options.cellSize),u=Math.ceil(a*this._pixelsPerMapUnit/this._options.cellSize),d=Math.ceil(h*this._pixelsPerMapUnit/this._options.cellSize);for(let p=l;p<=d;p++)for(let f=c;f<=u;f++){const _=`${f}.${p}`,m=this._cells.get(_);if(!m)continue;const g=t.get(m.id);g?m&&!t.has(m.id)&&g.merge(m):t.set(m.id,m.clone())}}_insert(t,e,s,i){const n=e*this._pixelsPerMapUnit,o=s*this._pixelsPerMapUnit,a=Math.floor(n/this._options.cellSize),h=Math.floor(o/this._options.cellSize);this._getCellOrCreate(a,h).insert(t,i,e,s)}_getCellOrCreate(t,e){const s=wo.createId(t,e);let i=this._cells.get(s);if(!i){const n=1*this._options.cellSize/this._pixelsPerMapUnit;i=wo.create(t,e,this._options.fields,n),this._cells.set(s,i)}return i}},ex=class{constructor(t,e){this.inner=t,this.displayId=e}};const Wi=128;let sx=class extends pa{constructor(t){super(t),this.didSend=!1,this.done=!1}},ix=class{constructor(t,e,s,i,n){this._level=t,this._scale=e,this._indexOptions=s,this._clusterRadius=i,this._store=n,this._cells=new Map,this._handledChunks=new Set,this._statistics=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const t of this._clusters.values())this._store.releaseDisplayIdForObjectId(t.inner.id);this._clusters.clear()}*aggregatesWorldSpace(){for(const t of this._clusters.values()){const e=t.inner.getCentroid(null),s=new ye(e,t.inner.getAttributes(),null);s.objectId=t.inner.id,s.displayId=t.displayId,yield s}}clusters(){return this._clusters.values()}updateChunks(t,e){let s=!1;for(const a of t){const h=a.queryInfo;"tileId"in h&&new ne(h.tileId).level!==this._level||this._handledChunks.has(a.normalizedChunkId)||(this._handledChunks.add(a.normalizedChunkId),s=!0,a.getAggregateIndex({...this._indexOptions,scale:this._scale}).put(this._cells))}const i={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},n=vo(this._indexOptions.spatialReference,this._scale),o=this._indexOptions.cellSize;for(const{subscription:a}of e){const h=a.tile.bounds,c=Math.floor(h[0]*n/o),l=Math.floor(h[1]*n/o),u=Math.ceil(h[2]*n/o),d=Math.ceil(h[3]*n/o);i.xMin=Math.min(i.xMin,c),i.yMin=Math.min(i.yMin,l),i.xMax=Math.max(i.xMax,u),i.yMax=Math.max(i.yMax,d)}return this._lastCellBounds!=null&&i.xMin===this._lastCellBounds.xMin&&i.yMin===this._lastCellBounds.yMin&&i.yMin===this._lastCellBounds.yMin&&i.yMax===this._lastCellBounds.yMax||(s=!0,this._lastCellBounds=i),s&&this._clusterCells(i),s}async updateStatistics(t){let e=!1;for(const s of this._clusters.values())s.inner.count>1&&(e=this._updateAggregateStatistics(this._statistics,s.inner)||e);if(e){const s=Array.from(this._statistics.entries()).map(([i,n])=>({fieldName:i,minValue:n.minValue,maxValue:n.maxValue}));await t.container.updateStatistics(this._level,s)}}createAggregateFeatures(t,e){const s=t.subscription,i=[],n=s.tile.transform;for(const o of this._clusters.values()){let a=o.inner.getCentroidX(n);const h=o.inner.getCentroidY(n),c=s.tile.lod,l=c.wrap?c.worldSize[0]:null,u=o.inner.count===1?o.inner.firstObjectId:o.inner.id,d=o.displayId;if(l!=null)if(l===1){const p=new R([],[a,h]),f=new ye(p,o.inner.getAttributes(),null);f.geometry.coords[0]-=V,f.objectId=u,f.displayId=d,i.push(f);const _=new R([],[a,h]),m=new ye(_,o.inner.getAttributes(),null);m.geometry.coords[0]+=V,m.objectId=u,m.displayId=d,i.push(m)}else a>V+V/2?a-=l*V:a<-V/2&&(a+=l*V);if(a=-Wi&&h=-Wi){const p=new R([],[a,h]),f=new ye(p,o.inner.getAttributes(),null);f.objectId=u,f.displayId=d,i.push(f)}}return at.fromOptimizedFeatures(i,e,s.tile.transform)}_clusterCells(t){let e=Array.from(this._cells.values());e=e.sort((a,h)=>h.count-a.count);const s=[];for(const a of this._clusters.values())s.push(a.inner.id);this._clusters.clear();const i=this._clusterRadius*(1/vo(this._indexOptions.spatialReference,this._scale)),n=1+this._clusterRadius/this._indexOptions.cellSize,o=new Set;for(const a of e){if(o.has(a.id)||a.gridXt.xMax||a.gridYt.yMax)continue;const h=this._store.createDisplayIdForObjectId(a.id),c=new ex(a.clone(),h);o.add(a.id),this._clusters.set(a.id,c);const l=a.centroidXWorld,u=a.centroidYWorld;for(let d=a.gridY-n;d<=a.gridY+n;d++)for(let p=a.gridX-n;p<=a.gridX+n;p++){if(d===a.gridY&&p===a.gridX)continue;const f=this._cells.get(wo.createId(p,d));if(!f||o.has(f.id))continue;const _=Math.abs(f.centroidXWorld-l),m=Math.abs(f.centroidYWorld-u);_fu.create(a,c))),spatialReference:s,featureFilter:e.featureFilter?await ya.create({geometryType:i.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:i.metadata.timeInfo,fieldsIndex:i.metadata.fieldsIndex,spatialReference:s,filterJSON:e.featureFilter}):null,cellSize:e.clusterRadius/4,timeZone:o};return new Au(t,e.clusterRadius,h,e.fields,i,n)}constructor(t,e,s,i,n,o){super(n,o,s.spatialReference,s.fields),this._connection=t,this._clusterRadius=e,this._indexOptions=s,this._cellsPerScale=new Map,this._metadata=new xa({geometryType:"esriGeometryPoint",objectIdField:"aggregateId",fields:[...i,...this._source.metadata.fieldsIndex.fields,{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],globalIdField:null,spatialReference:n.metadata.spatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,typeIdField:null,types:null})}get enablePixelBuffering(){return!1}invalidate(){super.invalidate();for(const t of this._cellsPerScale.values())t.destroy();this._cellsPerScale.clear()}onSubscribe(t){super.onSubscribe(t),this._requiredLevel=t.tile.level,this._requiredScale=t.tile.scale}createState(t){return new sx(t)}async*applyLocalEdit(t){for(const e of this._cellsPerScale.values())e.destroy();this._cellsPerScale.clear();for(const e of this._sendStates.values())e.done=!1}displayMap(t,e,s){const i=new Map(t.map(a=>[e(a),a])),n=[],o=this._getClusterState(this._requiredLevel,this._requiredScale);for(const a of o.clusters()){const h=i.get(a.inner.id);if(h==null){if(a.inner.count===1){const c=i.get(a.inner.firstObjectId);if(c!=null){const l=s(a.displayId,c,a.inner.firstObjectId);n.push(l),i.delete(a.inner.firstObjectId)}}}else{const c=s(a.displayId,h,a.inner.id);n.push(c),i.delete(a.inner.id)}}return n}getDisplayFeatures(t){const e=new Set(t),s=new Set,i=[],n=[],o=this._getClusterState(this._requiredLevel,this._requiredScale);for(const a of o.aggregatesWorldSpace())if(e.has(a.displayId)&&!s.has(a.displayId)){const h=hc(a,this._metadata.geometryType,!1,!1);if(s.add(a.displayId),h.attributes.cluster_count===1){i.push({...h,displayId:a.displayId});continue}n.push({...h,displayId:a.displayId})}return{features:i,aggregates:n}}getFeatureObjectIdsForAggregate(t){const e=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of e.clusters())if(s.inner.id===t)return Array.from(s.inner.containedObjectIds);return[]}async*updateChunks(){const t=this._source.chunks();if(!t.length)return;const e=this._getClusterState(this._requiredLevel,this._requiredScale),s=Array.from(this._sendStates.values()).filter(o=>o.subscription.tile.level===this._requiredLevel);if(e.updateChunks(t,s)||!this._source.updateTracking.updating)for(const o of s)o.subscription.tile.level===this._requiredLevel&&(o.didSend=!1,o.done=!1);const i=Array.from(this._sendStates.values()).filter(o=>o.done).map(o=>o.subscription.tile.key),n=new Set(i);for(const o of this._sendStates.values())this._source.updateTracking.updating&&(i.some(a=>a.containsChild(o.subscription.tile.key))||o.subscription.tile.key.getChildKeys().every(a=>n.has(a)))||o.didSend||o.subscription.tile.level!==this._requiredLevel||(o.didSend=!0,yield*this._update(o,e,this._source));await e.updateStatistics(this._connection)}forEachAggregateWorldSpace(t){if(this._requiredLevel==null||this._requiredScale==null)return;const e=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of e.aggregatesWorldSpace())t(s)}_getClusterState(t,e){if(t==null||e==null)throw new Error("InternalError: Level and scale must be defined");let s=this._cellsPerScale.get(e);return s||(s=new ix(t,e,this._indexOptions,this._clusterRadius,this._attributeStore),this._cellsPerScale.set(e,s)),s}async*_update(t,e,s){if(t.done)return;const i=e.createAggregateFeatures(t,this._metadata);this.events.emit("changed"),t.done=!s.updateTracking.updating;const n=i.getCursor(),o=t.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.timeZone);for(;n.next();)this._attributeStore.setAttributeData(n.getDisplayId(),n,o);yield new fa(t.subscription,i,!0,t.done,{})}};function Er(r,t){if(!(this instanceof Er))return new Er(r,t);this._maxEntries=Math.max(4,r||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&(typeof t=="function"?this.toBBox=t:this._initFormat(t)),this.clear()}function nx(r,t,e){if(!e)return t.indexOf(r);for(var s=0;s=r.minX&&t.maxY>=r.minY}function Ve(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Bh(r,t,e,s,i){for(var n,o=[t,e];o.length;)(e=o.pop())-(t=o.pop())<=s||(n=t+Math.ceil((e-t)/s/2)*s,np(r,n,t,e,i),o.push(t,n,n,e))}Er.prototype={all:function(){return this._all(this.data,[])},search:function(r){var t=this.data,e=[],s=this.toBBox;if(!Hi(r,t))return e;for(var i,n,o,a,h=[];t;){for(i=0,n=t.children.length;i=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(i,n,t)},_split:function(r,t){var e=r[t],s=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,s);var n=this._chooseSplitIndex(e,i,s),o=Ve(e.children.splice(n,e.children.length-n));o.height=e.height,o.leaf=e.leaf,Re(e,this.toBBox),Re(o,this.toBBox),t?r[t-1].children.push(o):this._splitRoot(e,o)},_splitRoot:function(r,t){this.data=Ve([r,t]),this.data.height=r.height+1,this.data.leaf=!1,Re(this.data,this.toBBox)},_chooseSplitIndex:function(r,t,e){var s,i,n,o,a,h,c,l;for(h=c=1/0,s=t;s<=e-t;s++)o=ax(i=Us(r,0,s,this.toBBox),n=Us(r,s,e,this.toBBox)),a=bn(i)+bn(n),o=t;i--)n=r.children[i],qs(h,r.leaf?o(n):n),c+=Xi(h);return c},_adjustParentBBoxes:function(r,t,e){for(var s=e;s>=0;s--)qs(t[s],r)},_condense:function(r){for(var t,e=r.length-1;e>=0;e--)r[e].children.length===0?e>0?(t=r[e-1].children).splice(t.indexOf(r[e]),1):this.clear():Re(r[e],this.toBBox)},_initFormat:function(r){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(r[0])),this.compareMinY=new Function("a","b",t.join(r[1])),this.toBBox=new Function("a","return {minX: a"+r[0]+", minY: a"+r[1]+", maxX: a"+r[2]+", maxY: a"+r[3]+"};")}};let hx=class zu{static fromReader(t){const e=[],s=t.copy(),i=Ao();for(;s.next();)s.getBounds(i)&&e.push(s.getIndex());const n=Er(9,o=>(s.setIndex(o),{minX:s.getBoundsXMin(),minY:s.getBoundsYMin(),maxX:s.getBoundsXMax(),maxY:s.getBoundsYMax()}));return n.load(e),new zu(n)}constructor(t){this._index=t}search(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this._index.search(e)}};const cx=64;function lx(r,t,e,s){const i=[r.xmin,r.ymin,r.xmax,r.ymax],n=yd.fromExtent(ic.fromBounds(i,s)),o=xr(n,s,ft.WGS84,{densificationStep:t*cx});if(!o)return null;const a=cc(new R,o,!1,!1),h=a.coords.filter((m,g)=>!(g%2)),c=a.coords.filter((m,g)=>g%2),l=Math.min(...h),u=Math.min(...c),d=Math.max(...h),p=Math.max(...c),f=Io(l,u,e,ft.WGS84),_=Io(d,p,e,ft.WGS84);return f&&_?{bounds:i,geohashBounds:{xLL:f[0],yLL:f[1],xTR:_[0],yTR:_[1]},level:e}:null}function Io(r,t,e,s){if(s.isWebMercator){const o=Pa(r/Ma.radius),a=o-360*Math.floor((o+180)/360),h=[0,0];return Gh(h,0,Pa(Math.PI/2-2*Math.atan(Math.exp(-t/Ma.radius))),a,e),h}const i=xr({x:r,y:t},s,ft.WGS84);if(!i)return null;const n=[0,0];return Gh(n,0,i.y,i.x,e),n}function ux(r,t){let e=-90,s=90,i=-180,n=180;for(let o=0;o>l,m=(f&r.geohashY)>>u;for(let g=d-1;g>=0;g--){const y=(i+n)/2,b=_&1<=0;g--){const y=(e+s)/2,b=m&1<p?1:0;n|=f<<29-(d+5*u),c=(1-f)*c+f*p,l=(1-f)*p+f*l}for(let d=0;d<5;d++){const p=(a+h)/2,f=e>p?1:0;o|=f<<29-(d+5*u),a=(1-f)*a+f*p,h=(1-f)*p+f*h}}r[2*t]=n,r[2*t+1]=o}let Vh=class So extends Su{static create(t,e,s,i){const n=Pu.create(t),o=new Array(32);for(let a=0;a=s)return this;const a=1-i%2,h=3*a+2*(1-a),c=2*a+3*(1-a),l=30-n-h,u=30-o-c,d=((t&7*a+3*(1-a)<>l)+((e&3*a+7*(1-a)<>u)*(8*a+4*(1-a)),p=this.children[d];return p==null?null:p.find(t,e,s,i+1,n+h,o+c)}_getLngLatBounds(){const t=this.depth,e=Math.ceil(t/2),s=Math.floor(t/2),i=30-(3*e+2*s),n=30-(2*e+3*s),o=this.xNode<=o)return;const d=Math.ceil((c+1)/2),p=Math.floor((c+1)/2),f=1-c%2,_=30-(3*d+2*p),m=30-(2*d+3*p),g=(i&7*f+3*(1-f)<<_)>>_,y=(n&3*f+7*(1-f)<>m,b=g+y*(8*f+4*(1-f));l=l<<3*f+2*(1-f)|g,u=u<<2*f+3*(1-f)|y,h.children[b]==null&&(h.children[b]=Vh.create(this._fields,l,u,c+1),this._depth=Math.max(this._depth,c+1),this._size+=1),c+=1,h=h.children[b]}}putBins(t,e){for(const s of this.getNodes(e)){const i=t.get(s.id);i?i.merge(s):t.set(s.id,s.clone())}}getNodes(t){const e=[],{geohashBounds:s,level:i}=t;let n=this._root;for(;n!==null;){const o=n.depth,a=n.xNode,h=n.yNode;if(o>=i){e.push(n),n=n.next;continue}const c=Math.ceil((o+1)/2),l=Math.floor((o+1)/2),u=1-o%2,d=30-(3*c+2*l),p=30-(2*c+3*l),f=~((1<>d,g=(s.yLL&_)>>p,y=(s.xTR&f)>>d,b=(s.yTR&_)>>p,v=a<<3*u+2*(1-u),S=h<<2*u+3*(1-u),M=v+8*u+4*(1-u),C=S+4*u+8*(1-u),F=Math.max(v,m),T=Math.max(S,g),L=Math.min(M,y),H=Math.min(C,b);let A=null,Q=null;for(let ct=T;ct<=H;ct++)for(let Ct=F;Ct<=L;Ct++){const Bu=Ct-v+(ct-S)*(8*u+4*(1-u)),os=n.children[Bu];os&&(A||(A=os,A.next=n.next),Q&&(Q.next=os),Q=os,os.next=n.next)}n=A||n.next}return e}}let px=class extends Fu{constructor(t){super(t),this._tree=new dx(this._options.fields)}put(t){throw new Error("Geohash tree does not support put")}putBounded(t,e,s){const{geohashLevel:i,spatialReference:n}=this._options,o=lx(e,s,i,n);o!=null&&this._tree.putBins(t,o)}_insert(t,e,s,i){const{geohashLevel:n,spatialReference:o}=this._options,a=Io(e,s,n,o);a&&this._tree.insert(t,e,s,a[0],a[1],n,i)}},fx=class Po extends wa{static from(t,e){return new Po(t.copy(),e)}constructor(t,e){super(t.metadata),this._currentIndex=-1,this._displayTranslationX=0,this._displayTranslationY=0,this._displayScaleX=1,this._displayScaleY=1,this._reader=t,this._indices=e,this._isPoint=t.geometryType==="esriGeometryPoint"}setTransformForDisplay(t){const e=this._reader.getInTransform();if(e==null){const[u,d]=t.scale,[p,f]=t.translate;return this._displayTranslationX=-p/u,this._displayScaleX=1/u,this._displayTranslationY=f/d,this._displayScaleY=1/-d,void(this._displayTransform=t)}const[s,i]=e.scale,[n,o]=e.translate,[a,h]=t.scale,[c,l]=t.translate;if(this._displayScaleX=s/a,this._displayTranslationX=(n-c)/a,this._displayScaleY=i/h,this._displayTranslationY=(-o+l)/h,!this._isPoint&&e)throw new Error("InternalError: Relative transformations not supported for non-point features");this._displayTransform=t}getInTransform(){return this._reader.getInTransform()}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1!s.has(i.objectId))}getTileReader(t){if(!this._features.length)return null;const e=this.queryFeaturesInBounds(t.bounds);return e.setTransformForDisplay(t.transform),e}},_x=class extends pa{},mx=class extends _u{constructor(t,e,s){super(t,e),this._timeZone=s,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(const t of this._source.chunks())this._cleanupChunkIds(t)}invalidateAttributeData(){this.handledChunksForAttributeData.clear()}onSubscribe(t){super.onSubscribe(t),this._evalOptions=t.tile.createArcadeEvaluationOptions(this._timeZone)}createState(t){return new _x(t)}get aggregateQueryEngine(){return null}displayMap(t,e,s){const i=new Map(t.map(o=>[e(o),o])),n=[];for(const o of this._source.chunks()){const a=o.reader.getCursor();for(;a.next();){const h=a.getObjectId(),c=a.getDisplayId(),l=i.get(h);if(l!=null){const u=s(c,l,h);n.push(u),i.delete(h)}}}return n}getDisplayFeatures(t){const e=new Set(t),s=new Set,i=[];for(const n of this._source.chunks()){const o=n.reader.getCursor();for(;o.next();){const a=o.getObjectId(),h=o.getDisplayId();e.has(h)&&!s.has(a)&&(i.push({...o.readLegacyFeatureWorldSpace(),displayId:h}),s.add(a))}}return{features:i,aggregates:[]}}async*applyLocalEdit(t){const e=[],s=t.reader.getCursor();for(;s.next();){const a=s.getObjectId();e.push(a);const h=this._attributeStore.createDisplayIdForObjectId(a);s.setDisplayId(h),this._attributeStore.setAttributeData(h,s,this._evalOptions)}const i=this.getDisplayIds(e),n=this.getDisplayIds(t.removed),o=new Mo(this._source.metadata,"localEdit");o.applyOverrides(t),this.handledChunks.add(o.chunkId),this.handledChunksForAttributeData.add(o.chunkId),this.handledChunksForIdCreation.add(o.chunkId);for(const a of this._sendStates.values())a.handledChunks.add(o.chunkId),yield new xo(a.subscription,null,i,!1,o.queryInfo);for(const a of this._sendStates.values()){const h=o.getTileReader(a.subscription.tile);yield new xo(a.subscription,h,n,!1,o.queryInfo)}for(const a of t.removed)this._attributeStore.releaseDisplayIdForObjectId(a)}async*updateChunks(){if(this._source.chunks().length){await this._updateAttributeData();for(const t of this._sendStates.values())yield*this._update(t)}}removeChunks(t){for(const e of t)this.handledChunks.delete(e.chunkId),this.handledChunksForAttributeData.delete(e.chunkId),this._cleanupChunkIds(e)}afterUpdateChunks(){for(const t of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(t);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(t){if(this.handledChunksForIdCreation.has(t.chunkId)){const e=t.reader.getCursor();for(;e.next();){const s=e.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(s):this._attributeStore.releaseDisplayIdForObjectId(s)}this.handledChunksForIdCreation.delete(t.chunkId)}}async _updateAttributeData(){for(const t of this._source.chunks()){const{chunkId:e,reader:s}=t;if(!this.handledChunksForIdCreation.has(e)){this.handledChunksForIdCreation.add(e);const i=s.getCursor();for(;i.next();){const n=this._attributeStore.createDisplayIdForObjectId(i.getObjectId());i.setDisplayId(n)}}}for(const t of this._source.chunks())if(!this.handledChunksForAttributeData.has(t.chunkId)){this.handledChunksForAttributeData.add(t.chunkId);const e=t.reader.getCursor();for(;e.next();){const s=e.getDisplayId();this._attributeStore.setAttributeData(s,e,this._evalOptions)}}}*_update(t){const{subscription:e,handledChunks:s}=t;for(const i of this._source.chunks()){const{chunkId:n}=i;if(s.has(n))continue;s.add(n);const o=i.getTileReader(e.tile);o&&(yield new fa(t.subscription,o,!1,i.end,i.queryInfo))}}};const gx=(r,t)=>()=>null,yx=!1;let xx=class{constructor(t){this.data=t,this._referenceCount=0}increment(){this._referenceCount+=1}decrement(){this._referenceCount-=1}empty(){return this._referenceCount===0}},bx=class{constructor(){this._freeIdsGenerationA=[],this._freeIdsGenerationB=[],this._idCounter=1,this._freeIds=this._freeIdsGenerationA,this._objectIdToDisplayId=new Map}createIdForObjectId(t){let e=this._objectIdToDisplayId.get(t);return e?e.increment():(e=new xx(Gg(this._getFreeId(),!1)),e.increment(),this._objectIdToDisplayId.set(t,e)),e.data}releaseIdForObjectId(t){const e=this._objectIdToDisplayId.get(t);e&&(e.decrement(),e.empty()&&(this._objectIdToDisplayId.delete(t),this._freeIds.push(e.data)))}releaseAll(){for(const t of this._objectIdToDisplayId.values())this._freeIds.push(t.data);this._objectIdToDisplayId.clear()}incrementGeneration(){this._freeIds=this._freeIds===this._freeIdsGenerationA?this._freeIdsGenerationB:this._freeIdsGenerationA}_getFreeId(){return this._freeIds.length?this._freeIds.pop():this._idCounter++}};function wx(r,t){if(!r||!t)return r;switch(t){case"radius":case"distance":return 2*r;case"diameter":case"width":return r;case"area":return Math.sqrt(r)}return r}const va=()=>_t.getLogger("esri.views.layers.2d.features.support.AttributeStore"),vx=gx(yx,va());k("esri-shared-array-buffer"),k("esri-atomics");let Ix=class{constructor(t,e,s){this.size=0,this.texelSize=4,this.dirtyStart=0,this.dirtyEnd=0;const{pixelType:i,layout:n,textureOnly:o}=e;this.textureOnly=o||!1,this.pixelType=i,this.layout=n,this._resetRange(),this.size=t,this.isLocal=s,o||(this.data=this._initData(i,t))}get buffer(){var t;return(t=this.data)==null?void 0:t.buffer}unsetComponentAllTexels(t,e){const s=this.data;for(let i=0;ie)return null;this._resetRange();const i=!this.isLocal,n=this.pixelType,o=this.layout,a=this.data;return{start:t,end:e,data:i&&a.slice(t*s,(e+1)*s)||null,pixelType:n,layout:o}}_initData(t,e){const s=ArrayBuffer,i=Rp(t),n=new i(new s(e*e*4*i.BYTES_PER_ELEMENT));for(let o=0;onull)}get referencesScale(){return this._referencesScale}get referencesGeometry(){return this._referencesGeometry}get hasHighlight(){return this._idsToHighlight.size>0}createDisplayIdForObjectId(t){return this._idGenerator.createIdForObjectId(t)}releaseDisplayIdForObjectId(t){return this._idGenerator.releaseIdForObjectId(t)}incrementDisplayIdGeneration(){this._idGenerator.incrementGeneration()}releaseAllIds(){this._idGenerator.releaseAll()}async update(t,e,s,i,n=0){const o=Oo(this._schema,t);if(this.version=n,o&&(k("esri-2d-update-debug")&&console.debug(`Version[${n}] AttributeStore.update`,{changed:o}),this._schema=t,this._attributeComputeInfo=null,this._initialize(),t!=null))if(s&&(this._filters=await Promise.all(t.filters.map(a=>a?ya.create({geometryType:s.geometryType,hasM:!1,hasZ:!1,timeInfo:s.timeInfo,fieldsIndex:s.fieldsIndex,spatialReference:i??s.spatialReference,filterJSON:a}):null))),t.type!=="subtype")this._attributeComputeInfo={isSubtype:!1,map:new Map},await Promise.all(t.bindings.map(async a=>{const h=await this._bind(e,a);this._referencesGeometry=this._referencesGeometry||((h==null?void 0:h.referencesGeometry())??!1),this._referencesScale=this._referencesScale||((h==null?void 0:h.referencesScale())??!1)}));else{this._attributeComputeInfo={isSubtype:!0,subtypeField:t.subtypeField,map:new Map},this._referencesScale=!1,this._referencesGeometry=!1;for(const a in t.bindings){const h=t.bindings[a];await Promise.all(h.map(async c=>{const l=await this._bind(e,c,parseInt(a,10));this._referencesGeometry=this._referencesGeometry||((l==null?void 0:l.referencesGeometry())??!1),this._referencesScale=this._referencesScale||((l==null?void 0:l.referencesScale())??!1)}))}}}setHighlight(t,e){const s=this._getBlock(0);s.unsetComponentAllTexels(0,(1<{var _;const u=l*o%a,d=Math.floor(l*o/a),p=this._getBlock(d+sn.VV);let f=(_=c.field)==null?void 0:_.read(e,s);c.valueRepresentation&&(f=wx(f,c.valueRepresentation)),(f===null||isNaN(f)||f===1/0||f===-1/0)&&(f=Il),p.setData(i,u,f)}))}get epoch(){return this._epoch}sendUpdates(){const t=this._blocks.map(s=>s!=null?s.toMessage():null),e=this._getInitArgs();k("esri-2d-log-updating")&&console.log("AttributeStore: _doSendUpdate.start"),this._client.update({initArgs:e,blockData:t,version:this.version,sendUpdateEpoch:this._epoch}),this._epoch+=1,k("esri-2d-log-updating")&&console.log("AttributeStore: _doSendUpdate.end")}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}async _bind(t,e,s){const i=await t.createComputedField(e),{valueRepresentation:n}=e,o=this._attributeComputeInfo;if(o.isSubtype){const a=o.map.get(s)??new Map;a.set(e.binding,{field:i,valueRepresentation:n}),o.map.set(s,a)}else o.map.set(e.binding,{field:i,valueRepresentation:n});return i}_getInitArgs(){return this._initialized?null:(this._initialized=!0,this._getBlock(sn.Animation),this._getBlock(sn.GPGPU),{blockSize:this._size,blockDescriptors:this._blocks.map(t=>t!=null?{textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType}:null)})}_getBlock(t){const e=this._blocks[t];if(e!=null)return e;const s=new Ix(this._size,this._blockDescriptors[t],this._client.isLocal);return this._blocks[t]=s,this._initialized=!1,s}_expand(){if(this._sizethis._connection.layerView.fetch(s,i),fetchDictionary:(s,i)=>this._connection.layerView.fetchDictionary(s,i)}),this._attributeStore=new Sx({isLocal:!1,update:s=>Co(this._connection.container.updateAttributeView(s))})}destroy(){var t;this._proxy.destroy(),(t=this._strategy)==null||t.destroy(),this._attributeStore.destroy()}get aggregateQueryEngine(){var t;return(t=this._strategy)==null?void 0:t.aggregateQueryEngine}getDisplayFeatures(t){return this._strategy?this._strategy.getDisplayFeatures(t):{features:[],aggregates:[]}}getFeatureObjectIdsForAggregate(t){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(t):[]}onSubscribe(t){var e;(e=this._strategy)==null||e.onSubscribe(t)}onUnsubscribe(t){var e;(e=this._strategy)==null||e.onUnsubscribe(t)}async update(t,e,s,i,n){var _,m,g,y,b;const o=t.processor,a=wi((_=this._schema)==null?void 0:_.storage,o.storage),h=wi((m=this._schema)==null?void 0:m.mesh.properties,o.mesh.properties),c=wi((g=this._schema)==null?void 0:g.mesh.factory,o.mesh.factory),l=wi((y=this._schema)==null?void 0:y.mesh.strategy,o.mesh.strategy),u=h||c||l;if(!(a||u)&&!i)return;k("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:Oo(this._schema,o),schema:o}),this._schema=o;const d=ft.fromJSON(this._source.service.outSpatialReference),p=new ga({fields:this._source.metadata.fieldsIndex,spatialReference:d});if(await this._attributeStore.update(o.storage,p,this._source.metadata,d,e),(b=this._strategy)==null||b.invalidateAttributeData(),!i&&!u)return;(l||h)&&await this._updateStrategy(o.mesh.strategy,d,n,o.mesh.properties.timeZone),this._updateSortKey(p,"sortKey"in o.mesh.properties?o.mesh.properties.sortKey:null);const f=new Py(p,this._proxy,s,this._registry);return(c||o.mesh.factory.symbology.type==="dictionary")&&(this._factory=await zp.create(f,o.mesh.factory)),this._invalidate(),this._version=e,this._connection.container.updateRenderState(this._version)}async applyLocalEdit(t){if(!this._strategy)return;const e=this._strategy.applyLocalEdit(t);for await(const s of e)try{await this._process(s)}catch{}}async updateChunks(){var t;await this._doUpdateChunks(),(t=this._strategy)==null||t.afterUpdateChunks()}async removeChunks(t){var e;(e=this._strategy)==null||e.removeChunks(t),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:t}){if(!this._strategy)return void this._attributeStore.setHighlight(t.map(({objectId:s,highlightFlags:i})=>({objectId:s,highlightFlags:i,displayId:-1})),t);const e=this._strategy.displayMap(t,({objectId:s})=>s,(s,{highlightFlags:i},n)=>({objectId:n,displayId:s,highlightFlags:i}));this._attributeStore.setHighlight(e,t)}async _doUpdateChunks(){if(!this._strategy)return;const t=this._strategy.updateChunks(),e=[],s=new Map;for await(const i of t){let n=s.get(i.id);n==null&&(n=new My({concurrency:16,process:a=>this._process(a)}),s.set(i.id,n));const o=n.push(i).catch(a=>Lo(a));e.push(o)}try{await Promise.all(e)}catch{}k("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),k("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(t,e,s,i){var n;switch((n=this._strategy)==null||n.destroy(),t.type){case"feature":this._strategy=new mx(this._source,this._attributeStore,i);break;case"binning":this._strategy=await jy.create(t,e,this._source,this._attributeStore,i);break;case"cluster":this._strategy=await rx.create(this._connection,t,e,this._source,this._attributeStore,i)}for(const o of s)this._strategy.onSubscribe(o)}async _updateSortKey(t,e){var s;if(this._sortInfo=To((s=this._sortInfo)==null?void 0:s.computed),e!=null){const i=e.byRenderer?null:await t.createComputedField(e);this._sortInfo={...e,computed:i}}}_invalidate(){this._strategy&&this._strategy.invalidate()}async _process(t){var h,c,l;const e=t.subscription;if(k("esri-2d-update-debug")){const u=e.tile;console.debug(`Version[${this._version}] Tile[${u.key.id}, end=${t.end}] Processor._process`)}await this._fetchResources(t),Zs(e.signal);const s=await this._write(t,e.tile.createArcadeEvaluationOptions((h=this._schema)==null?void 0:h.mesh.properties.timeZone)),i=e.tile.tileInfoView.tileInfo.isWrappable,{message:n,transferList:o}=s.serialize(i),a={objectIdMap:null,inner:t.createMessage(n,this._version,this._attributeStore.epoch)};if((c=this._schema)!=null&&c.mesh.properties.returnMeshObjectId){a.objectIdMap={};const u=(l=t.reader)==null?void 0:l.getCursor();if(u)for(;u.next();)a.objectIdMap[u.getDisplayId()]=u.getObjectId()}if(Zs(e.signal),await this._connection.container.onMessage(a,{signal:e.signal,transferList:o}),this._attributeStore.sendUpdates(),k("esri-2d-update-debug")){const u=e.tile;console.debug(`Version[${this._version}] Tile[${u.key.id}, end=${t.end}] Processor._process.await`)}}async _fetchResources(t){await this._fetchMatcherResources(t),await this._fetchWriterResources(t)}async _fetchMatcherResources(t){if(t.reader)return this._factory.enqueueMatcherRequests(this._proxy,t.reader)}async _fetchWriterResources(t){if(!t.reader)return;const e=t.reader.getCursor(),s=t.subscription.tile.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;e.next();)this._factory.enqueueWriterRequests(this._proxy,e,s);await this._proxy.fetchEnqueuedResources()}async _write(t,e){var c;const s=t.subscription.tile,i=(c=t.reader)==null?void 0:c.getCursor(),n=(i==null?void 0:i.getSize())??0,o=s.tileInfoView.tileInfo.isWrappable,a=new Mp(s.key,this._strategy.enablePixelBuffering,o,n);if(!i)return a;const h=s.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;i.next();){const l=this._getSortKeyValue(i,e);a.entityStart(i.getDisplayId(),l),this._factory.write(a,this._proxy,i,h,s.level),a.entityEnd()}return a}_getSortKeyValue(t,e){if(!this._sortInfo)return 0;const{computed:s,order:i,byRenderer:n}=this._sortInfo,o=n?this._factory.getSortKey(t,e):s==null?void 0:s.read(t,e);return o==null||isNaN(o)?0:o*(i==="asc"?-1:1)}},Mx=class Ou{static from(t){let e=0,s=0,i=0;return t.forEach(n=>{const o=n._readGeometry();o&&(s+=o.isPoint?1:o.lengths.reduce((a,h)=>a+h,0),i+=o.isPoint?1:o.lengths.length,e+=1)}),new Ou(e,s,i)}constructor(t,e,s){this.featureCount=t,this.vertexCount=e,this.ringCount=s}toJSON(){return{featureCount:this.featureCount,ringCount:this.featureCount,vertexCount:this.featureCount}}};const vn=4;function $x(r,t,e){const s=r.orderByFields??e.objectIdField+" ASC",i=r.source,n={returnCentroid:!(i!==null&&typeof i=="object"&&"path"in i&&bd(i.path))&&e.geometryType==="esriGeometryPolygon",returnGeometry:!0,timeReferenceUnknownClient:e.timeReferenceUnknownClient??void 0,outSpatialReference:ft.fromJSON(r.outSpatialReference),orderByFields:[s],where:t.mutable.dataFilter.definitionExpression??"1=1",outFields:t.mutable.availableFields};if(t.type==="feature"){const{gdbVersion:o,historicMoment:a,timeExtent:h}=t.mutable.dataFilter;return{...n,gdbVersion:o,historicMoment:a?new Date(a):null,timeExtent:h?wd.fromJSON(h):null,outFields:t.mutable.availableFields}}return n}let Tx=class Lu{static fromSchema(t,e,s){const i=e.type==="feature"?e.mutable.dataFilter.queryScaleRanges:[];return new Lu($x(t,e,s),i,s.subtypeField,e.mutable.dataFilter.customParameters,s.geometryType,t.queryMetadata)}constructor(t,e,s,i,n,o){this._queryParams=t,this._queryScaleRanges=e,this._subtypeField=s,this._customParameters=i,this._geometryType=n,this._queryMetadata=o}get pageSize(){if(this._queryMetadata==null)throw new Error("InternalError: Service does not support paged queries");const t=this._queryMetadata.supportsMaxRecordCountFactor?vn:null,e=(this._queryMetadata.maxRecordCount??8e3)*(t??1);return Math.min(8e3,e)}updateHistoricMoment(t){this._queryParams.historicMoment=t}updateFields(t){this._queryParams.outFields=t}createPatchFieldsQuery(t,e){if(!e.getSize())return null;const s=t.clone();if(this._queryParams.outFields[0]==="*"){if((s.outFields??[])[0]==="*")return null;s.outFields=this._queryParams.outFields}else{const i=new Set(this._queryParams.outFields),n=[];for(const o of i)e.hasField(o)||n.push(o);if(n.length===0)return null;s.outFields=n}return s.returnGeometry=!1,s.returnCentroid=!1,s.quantizationParameters=null,s.cacheHint=!0,{inner:s,customParameters:this._customParameters}}createQuery(t={}){if(!this._queryParams)throw new Error("InternalError: queryInfo should be defined");return{inner:new zo({...this._queryParams,...t}),customParameters:this._customParameters}}createTileQuery(t,e){if(this._queryMetadata==null)throw new Error("InternalError: Service does not support tile queries");const s=this.createQuery(e),i=s.inner;if(this._queryScaleRanges.length){const n=this._queryScaleRanges.filter(o=>(!o.minScale||o.minScale>=t.maxScale)&&(!o.maxScale||o.maxScale<=t.minScale)).map(o=>o.subtypeCode);if(n.length){const o=`${this._subtypeField} IN (${n})`;i.where=xd(i.where,o)}}if(i.quantizationParameters=e.quantizationParameters??t.getQuantizationParameters(),i.resultType="tile",i.geometry=t.extent,this._queryMetadata.supportsQuantization?this._geometryType==="esriGeometryPolyline"&&(i.maxAllowableOffset=t.resolution*k("feature-polyline-generalization-factor")):this._geometryType!=="esriGeometryPolyline"&&this._geometryType!=="esriGeometryPolygon"||(i.maxAllowableOffset=t.resolution,this._geometryType==="esriGeometryPolyline"&&(i.maxAllowableOffset*=k("feature-polyline-generalization-factor"))),i.defaultSpatialReferenceEnabled=this._queryMetadata.supportsDefaultSpatialReference,i.compactGeometryEnabled=this._queryMetadata.supportsCompactGeometry,this._queryMetadata.supportsMaxRecordCountFactor&&(i.maxRecordCountFactor=vn),k("esri-tiles-debug")){const n=t.id.replaceAll("/",".");s.customParameters=s.customParameters?{...s.customParameters,tileId:n}:{tileId:n}}return s}createPagedTileQuery(t,e){const s=this.pageSize;return this.createTileQuery(t,{start:s*e,num:s,returnExceededLimitFeatures:!0})}createPagedQuery(t){const e=this.pageSize;return this.createQuery({start:e*t,num:e,returnExceededLimitFeatures:!0,maxRecordCountFactor:vn})}};const Cx=2500;let fr=class extends li{constructor(t){super(),this._connection=t,this._enabledEventTypes=new Set,this._updateInfo={websocket:0,client:0},this._lastTime=performance.now(),this._queuedCommands=[],this.addHandles([mr(()=>{var e;return((e=this._strategy)==null?void 0:e.connectionStatus)??"disconnected"},e=>{this._layerView.setProperty({propertyName:"pipelineConnectionStatus",value:e})},{initial:!0}),mr(()=>{var e;return((e=this._strategy)==null?void 0:e.errorString)||null},e=>this._layerView.setProperty({propertyName:"pipelineErrorString",value:e}),{initial:!0})])}destroy(){this._strategy=null,this.removeAllHandles()}get _layerView(){return this._connection.layerView}set strategy(t){this._strategy==null&&this._resetUpdateInfo(performance.now());const e="event-handles";this.removeHandles(e),t!=null&&(this.addHandles([t.events.on("data-received",s=>this._onFeature(s)),t.events.on("message-received",s=>this._onWebSocketMessage(s)),t.events.on("features-updated",s=>this._onUpdate(s)),t.events.on("tick",()=>this._onTick())],e),this._queuedCommands.forEach(s=>s(t)),this._queuedCommands=[]),this._strategy=t}updateCustomParameters(t){t!=null&&this._callOrEnqueue(e=>e.updateCustomParameters(t))}sendMessageToSocket(t){this._callOrEnqueue(e=>e.sendMessageToSocket(t))}sendMessageToClient(t){this._callOrEnqueue(e=>e.sendMessageToClient(t))}enableEvent(t,e){e?this._enabledEventTypes.add(t):this._enabledEventTypes.delete(t)}disconnect(){var t;(t=this._strategy)==null||t.disconnect()}connect(){var t;(t=this._strategy)==null||t.connect()}clear(){var t;(t=this._strategy)==null||t.clear()}_onWebSocketMessage(t){this._enabledEventTypes.has("message-received")&&this._layerView.emitEvent({name:"message-received",event:t})}_onFeature(t){this._updateInfo.websocket++,this._enabledEventTypes.has("data-received")&&this._layerView.emitEvent({name:"data-received",event:{attributes:t.attributes,centroid:t.centroid,geometry:t.geometry}})}_onUpdate(t){this._updateInfo.client+=t}_onTick(){const t=performance.now(),e=t-this._lastTime;if(e>Cx){const s=Math.round(this._updateInfo.client/(e/1e3)),i=Math.round(this._updateInfo.websocket/(e/1e3));this._resetUpdateInfo(t),this._layerView.emitEvent({name:"update-rate",event:{client:s,websocket:i}})}}_resetUpdateInfo(t){this._lastTime=t,this._updateInfo.client=0,this._updateInfo.websocket=0}_callOrEnqueue(t){this._strategy!=null?t(this._strategy):this._queuedCommands.push(t)}};x([ot()],fr.prototype,"_strategy",void 0),fr=x([ci("esri.views.2d.layers.features.sources.StreamMessenger")],fr);let Du=class{constructor(t){this._store=t,this._controller=new AbortController}destroy(){this._controller.abort()}get _options(){return{signal:this._controller.signal}}unsafeSetQueryHistoricMoment(t){throw new Error("InternalError: LoadStrategy does not support query info")}async queryOverride(t){throw new Error("InternalError: LoadStrategy does not support fetching")}async queryByObjectId(t){throw new Error("InternalError: LoadStrategy does not support fetching")}};const In=268435455;let kx=class{constructor(){this.hasFeatures=!1,this.exceededTransferLimit=!1,this.fieldCount=0,this.featureCount=0,this.objectIdFieldIndex=0,this.vertexCount=0,this.offsets={attributes:new Array,geometry:new Array},this.centroid=new Array}};function Ex(r,t,e=!1){var F;const c=r.asUnsafe(),l=c.pos(),u=new kx;let d=0,p=0;const f=1,_=2,m=4,g=3;let y=null,b=null,v=null,S=!1;const M=[];for(;c.next();)switch(c.tag()){case 1:y=c.getString();break;case 3:b=c.getString();break;case 12:v=c.processMessage(lp);break;case 9:if(u.exceededTransferLimit=c.getBool(),u.exceededTransferLimit){u.offsets.geometry=e?new Float64Array(8e3):new Int32Array(8e3),u.centroid=e?new Float64Array(16e3):new Int32Array(16e3);for(let T=0;T0}let Dx=class $o extends wa{static fromBuffer(t,e,s=!1){const i=e.geometryType,n=Ax(t),o=Ex(n,i==="esriGeometryPoint",s);return new $o(n,o,e)}constructor(t,e,s){super(s),this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0,centroid:void 0,legacyFeature:void 0,optFeature:void 0},this._parseCaches=new Array,this._geometryType=s.geometryType,this._reader=t,this._header=e,this._hasNext=e.hasFeatures,this._isPoints=s.geometryType==="esriGeometryPoint"}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return!1}get hasM(){return!1}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(t){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._cache.centroid=void 0,this._cache.legacyFeature=void 0,this._cache.optFeature=void 0,this._featureIndex=t}getAttributeHash(){let t="";for(const e of this._header.fields.fields)t+=this._readAttributeAtIndex(e.index)+".";return t}getObjectId(){return this._readAttributeAtIndex(this._header.objectIdFieldIndex)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(t){this._header.displayIds[this._featureIndex]=t}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const t=this._reader.clone(),e=new $o(t,this._header,this.metadata);return this.copyInto(e),e}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._cache.centroid=void 0,this._cache.legacyFeature=void 0,this._cache.optFeature=void 0;++this._featureIndexu.length)for(let m=0;m<_;m++)i.getSInt32(),i.getSInt32(),this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32();else if(p&&Fx){const m=this.getAreaSimplificationThreshold(_,this._header.vertexCount);let g=2,y=1;const b=!1;let v=i.getSInt32(),S=i.getSInt32();u[l++]=v,u[l++]=S,this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32();let M=i.getSInt32(),C=i.getSInt32();for(this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32();g<_;){let F=i.getSInt32(),T=i.getSInt32();this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32();const L=v+M,H=S+C;Lx(v,S,L,H,L+F,H+T)>=m?(d+=-.5*(L-v)*(H+S),y>1&&Sn(u[l-2],u[l-1],M,C)?(u[l-2]+=M,u[l-1]+=C):(u[l++]=M,u[l++]=C,y++),v=L,S=H):(F+=M,T+=C),M=F,C=T,g++}y<3||b?l-=2*y:(d+=-.5*(v+M-v)*(S+C+S),Sn(u[l-2],u[l-1],M,C)?(u[l-2]+=M,u[l-1]+=C,h.push(y)):(u[l++]=M,u[l++]=C,h.push(++y)))}else{let m=0,g=i.getSInt32(),y=i.getSInt32();this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32(),u[l++]=g,u[l++]=y,m+=1;for(let b=1;b<_;b++){const v=i.getSInt32(),S=i.getSInt32(),M=g+v,C=y+S;d+=-.5*(M-g)*(C+y),this.hasZ&&i.getSInt32(),this.hasM&&i.getSInt32(),b>2&&Sn(u[l-2],u[l-1],v,S)?(u[l-2]+=v,u[l-1]+=S):(u[l++]=v,u[l++]=S,m+=1),g=M,y=C}h.push(m)}break}default:i.skip()}return this._cache.area=d,h.length?new R(h,u):u!=null?this._createQuantizedExtrudedGeometry(u[0],u[1]):null}};class Hr{constructor(t,e){this.service=t,this._metadata=e}destroy(){}}function Rx(r,t){switch(r.type){case"memory":return new Bx(r,t);case"ogc":return new Ux(r,t);case"feature-service":return r.queryMetadata.supportsFormatPBF&&k("featurelayer-pbf")?new Gx(r,t):new Vx(r,t)}}async function Nx(r){const t=new vd;return await t.open(r,{}),t}let Bx=class extends Hr{constructor(t,e){super(t,e),this._portsOpen=Nx(t.source).then(s=>this.client=s)}destroy(){this.client.close(),this.client=null}async executeQuery(t,e){await this._portsOpen;const s=await this.client.invoke("queryFeatures",t.toJSON(),e);return at.fromFeatureSet(s,this._metadata)}},Gx=class extends Hr{async executeQuery(t,e){const{data:s}=await op(this.service.source,t,e),i=!t.quantizationParameters;return Dx.fromBuffer(s,this._metadata,i)}};class Vx extends Hr{async executeQuery(t,e){var o;const{source:s,queryMetadata:i}=this.service;if(t.quantizationParameters!=null&&!i.supportsQuantization){const a=t.clone(),h=rc(a.quantizationParameters);a.quantizationParameters=null;const{data:c}=await Aa(s,a,this._metadata.spatialReference,e),l=ac(c,this._metadata.objectIdField);return lc(h,l),at.fromOptimizedFeatureSet(l,this._metadata)}const{data:n}=await Aa(s,t,this._metadata.spatialReference,e);return this._metadata.geometryType==="esriGeometryPoint"&&(n.features=(o=n.features)==null?void 0:o.filter(a=>{if(a.geometry!=null){const h=a.geometry;return Number.isFinite(h.x)&&Number.isFinite(h.y)}return!0})),at.fromFeatureSet(n,this._metadata)}}let Ux=class extends Hr{async executeQuery(t,e){if(t.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const i=t.clone(),n=rc(i.quantizationParameters);i.quantizationParameters=null;const o=await za(this.service.source,t,e);return lc(n,o),at.fromOptimizedFeatureSet(o,this._metadata)}const s=await za(this.service.source,t,e);return at.fromOptimizedFeatureSet(s,this._metadata)}},Ru=class extends Du{constructor(t,e,s,i,n){super(s),this._serviceInfo=t,this._queryInfo=e,this._metadata=i,this._connection=n,this._queue=new Do({concurrency:16,process:async o=>{var h;const a={signal:(h=o.options)==null?void 0:h.signal,query:o.query.customParameters};return this._adapter.executeQuery(o.query.inner,a)}}),this._adapter=Rx(t,i)}unsafeSetQueryHistoricMoment(t){this._queryInfo.updateHistoricMoment(t)}async updateFields(t){this._queryInfo.updateFields(t);const e=Array.from(this._store.chunks()).map(async i=>{const n=zo.fromJSON(i.queryInfo.queryJSON);if(n)try{return await this._tryUpdateFields(i.reader,n),null}catch(o){return o}}),s=(await Promise.all(e)).filter(i=>i);if(s.length)throw new rt("featurelayer-query","Encountered errors when downloading fields",{errors:s})}async queryByObjectId(t){if(t.length===0)return at.empty(this._metadata);const e=this._queryInfo.createQuery({objectIds:t});return this._fetch(e)}async _fetch(t,e){const s=await this._enqueue(t,e);return await this._tryUpdateFields(s,t.inner),s}async _tryUpdateFields(t,e){const s=this._queryInfo.createPatchFieldsQuery(e,t);if(!s)return;const i=await this._enqueue(s,this._options);t.joinAttributes(i)}async _enqueue(t,e){return this._connection.onEvent({type:"fetchStart"}),this._queue.push({query:t,options:e}).finally(()=>{this._connection.onEvent({type:"fetchEnd",done:this._queue.length===0})})}},Nu=class extends Ru{constructor(){super(...arguments),this._chunksById=new Map}unload(t){this._removeChunks(t.tile)}_addChunk(t){const e=t.tile.id;this._chunksById.has(e)||this._chunksById.set(e,[]);const s=t.size();(s||t.first||t.end)&&(k("esri-2d-update-debug")&&console.debug(`Chunk[${t.chunkId}] ATileLoadStrategy.addChunk [count=${s}]`),this._chunksById.get(e).push(t),this._store.insert(t))}_removeChunks(t){const e=this._chunksById.get(t.key.id)??[];for(const s of e)k("esri-2d-update-debug")&&console.debug(`Tile[${t.key.id}] Chunk[${s.chunkId}] ATileLoadStrategy.removeChunk`),this._store.remove(s);this._chunksById.delete(t.key.id)}},Wh=class extends xi{constructor(t,e,s,i,n,o){var a,h;super(),this._reader=t,this._queryJSON=e,this._tile=s,this._sourceTile=i,this._sourceTileDepth=n,this._end=o,this.chunkId=`${this._tile.key.id}.${(a=this._sourceTile)==null?void 0:a.key.id}${this._end?"e":""}`,this.normalizedChunkId=`${this._tile.key.normalizedId}.${(h=this._sourceTile)==null?void 0:h.key.normalizedId}${this._end?"e":""}`}get queryInfo(){var t;return{type:"drill-down-tile",chunkId:this.chunkId,tileId:this._tile.key.id,queryJSON:this._queryJSON,sourceTileDepth:this._sourceTileDepth,sourceTileId:(t=this._sourceTile)==null?void 0:t.key.id,size:this.size(),end:this.end}}get first(){return this._sourceTileDepth===0}get reader(){return this._reader}get end(){return this._end}get tile(){return this._tile}get isTiled(){return!0}getTileReader(t){return this._tile.key.id===t.key.id?this.reader:null}},qx=class{constructor(t,e){this.subscription=t,this._tileIdToResult=new Map,this._controller=new AbortController,this._handles=Ar([gr(t.signal,()=>this._controller.abort()),gr(e,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get(t){return this._tileIdToResult.get(t)}set(t,e){this._tileIdToResult.set(t,e)}get options(){return{signal:this._controller.signal}}},jx=class extends Nu{constructor(){super(...arguments),this._loadStates=new Map}destroy(){super.destroy();for(const t of this._loadStates.values())t.destroy();this._loadStates.clear()}get about(){return{willQueryAllFeatures:!1,willQueryFullResolutionGeometry:!1}}async load(t){this._loadStates.has(t.key.id)||this._loadStates.set(t.key.id,new qx(t,this._options));const e=this._loadStates.get(t.key.id);let s;try{for await(const n of this._fetchChunkInfos(e,t.tile,0)){const{queryJSON:o,reader:a,sourceTile:h,sourceTileDepth:c,tile:l}=n,u=new Wh(a,o,l,h,c,!1);Zs(e.options),this._addChunk(u)}}catch(n){s=n}const i=new Wh(at.empty(this._metadata),null,t.tile,null,-1,!0);if(this._addChunk(i),s)throw s}unload(t){var e;super.unload(t),(e=this._loadStates.get(t.key.id))==null||e.destroy(),this._loadStates.delete(t.key.id)}async*_fetchChunkInfos(t,e,s){let i=t.get(e.id);const n=!!i;if(i||(i=await this._fetchChunkInfo(t,e,s),t.set(e.id,i)),i.reader.exceededTransferLimit&&sthis._controller.abort()),gr(e,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get pageStart(){let t=-1;for(const e of this._pages.values())t=Math.max(t,e);return t+1}get done(){return this._done}get options(){return{signal:this._controller.signal}}add(t,e){this._pages.add(t),this._done=this._done||e}};class Wx extends Nu{constructor(){super(...arguments),this._loadStates=new Map}destroy(){super.destroy();for(const t of this._loadStates.values())t.destroy();this._loadStates.clear()}get about(){return{willQueryAllFeatures:!1,willQueryFullResolutionGeometry:!1}}async load(t){this._loadStates.has(t.key.id)||this._loadStates.set(t.key.id,new Yx(t,this._options));const e=this._loadStates.get(t.key.id);let s;try{await this._fetchPages(e)}catch(n){s=n}const i=new Xh(at.empty(this._metadata),null,t.tile,-1,!0);if(Id(e.options)||this._addChunk(i),s)throw s}unload(t){var e;super.unload(t),(e=this._loadStates.get(t.key.id))==null||e.destroy(),this._loadStates.delete(t.key.id)}async _fetchPages(t){let i=0,n=t.pageStart,o=1;for(;i<20&&!t.done;){const a=[];for(let c=0;ch).sort((a,h)=>this._random.getInt()-this._random.getInt()),i=await Promise.all(s.map(a=>this._downloadPage(a))),n=new Hh(at.empty(this._metadata),null,-1,!0);this._store.insert(n);const o=i.filter(a=>a);if(o.length)throw new rt("featurelayer-query","Encountered errors when downloading data",{errors:o})}async _downloadPage(t){try{const e=this._queryInfo.createPagedQuery(t),s=await this._fetch(e,this._options),i=new Hh(s,e.inner.toJSON(),t,!1);return Zs(this._options),this._store.insert(i),null}catch(e){return e}}}let Zh=class{constructor(t){this.size=0,this._start=0,this.maxSize=t,this._buffer=new Array(t)}get entries(){return this._buffer}enqueue(t){if(this.size===this.maxSize){const e=this._buffer[this._start];return this._buffer[this._start]=t,this._start=(this._start+1)%this.maxSize,e}return this._buffer[(this._start+this.size++)%this.maxSize]=t,null}dequeue(){if(this.size===0)return null;const t=this._buffer[this._start];return this._buffer[this._start]=null,this.size--,this._start=(this._start+1)%this.maxSize,t}peek(){return this.size===0?null:this._buffer[this._start]}peekLast(){return this.size===0?null:this._buffer[(this._start+(this.size-1))%this.maxSize]}find(t){if(this.size===0)return null;for(const e of this._buffer)if(e!=null&&t(e))return e;return null}clear(t){let e=this.dequeue();for(;e!=null;)t&&t(e),e=this.dequeue()}};const Hx="__esri_stream_id__",Kh="__esri_timestamp__",Qh=1e3;class Zx{constructor(t,e,s,i,n=128){this._trackIdToObservations=new Map,this._idCounter=0,this._lastPurge=performance.now(),this._addOrUpdated=new Map,this._removed=[],this._maxAge=0,this._timeInfo=s,this._purgeOptions=i,this.store=t,this.objectIdField=e,this.purgeInterval=n,this._useGeneratedIds=this.objectIdField===Hx}removeById(t){this._removed.push(t)}removeByTrackId(t){const e=this._trackIdToObservations.get(t);if(e)for(const s of e.entries)this._removed.push(s)}add(t){var o;if(this._useGeneratedIds){const a=this._nextId();t.attributes[this.objectIdField]=a,t.objectId=a}else t.objectId=t.attributes[this.objectIdField];const e=t.objectId;if(this._addOrUpdated.set(e,t),this._maxAge=Math.max(this._maxAge,t.attributes[this._timeInfo.startTimeField]),!this._timeInfo.trackIdField)return this._trackIdLessObservations==null&&(this._trackIdLessObservations=new Zh(1e5)),void this._trackIdLessObservations.enqueue(e);const s=t.attributes[this._timeInfo.trackIdField];if(!this._trackIdToObservations.has(s)){const a=((o=this._purgeOptions)==null?void 0:o.maxObservations)!=null?this._purgeOptions.maxObservations:Qh,h=Pn(a,0,Qh);this._trackIdToObservations.set(s,new Zh(h))}const i=this._trackIdToObservations.get(s),n=i==null?void 0:i.enqueue(e);n!=null&&(this._addOrUpdated.has(n)?this._addOrUpdated.delete(n):this._removed.push(n))}checkForUpdates(){const t=this._getToAdd(),e=this._getToRemove(),s=performance.now();s-this._lastPurge>=this.purgeInterval&&(this._purge(s),this._lastPurge=s);const i=[];if(e!=null)for(const o of e){const a=this.store.removeById(o);a!=null&&i.push(a)}const n=[];if(t!=null){const o=new Set(e??[]);for(const a of t)o.has(a.objectId)||(a.attributes[Kh]=s,this.store.add(a),n.push(a))}return!(!n.length&&!(i!=null&&i.length))&&(this.store.update(n,i),!0)}_getToAdd(){if(!this._addOrUpdated.size)return null;const t=new Array(this._addOrUpdated.size);let e=0;return this._addOrUpdated.forEach(s=>t[e++]=s),this._addOrUpdated.clear(),t}_getToRemove(){const t=this._removed;return this._removed.length?(this._removed=[],t):null}_nextId(){const t=this._idCounter;return this._idCounter=(this._idCounter+1)%4294967294+1,t}_purge(t){const e=this._purgeOptions;e!=null&&(this._purgeSomeByDisplayCount(e),this._purgeByAge(e),this._purgeByAgeReceived(t,e),this._purgeTracks())}_purgeSomeByDisplayCount(t){if(!t.displayCount)return;let e=this.store.size;if(e>t.displayCount){if(this._timeInfo.trackIdField){for(const s of this._trackIdToObservations.values())if(e>t.displayCount&&s.size){const i=s.dequeue();this._removed.push(i),e--}}if(this._trackIdLessObservations!=null){let s=e-t.displayCount;for(;s-- >0;){const i=this._trackIdLessObservations.dequeue();i!=null&&this._removed.push(i)}}}}_purgeByAge(t){var n;const e=(n=this._timeInfo)==null?void 0:n.startTimeField;if(!t.age||!e)return;const s=60*t.age*1e3,i=this._maxAge-s;this.store.forEach(o=>{o.attributes[e]{i.attributes[Kh]{t.size===0&&this._trackIdToObservations.delete(e)})}}let Ue=class extends li{constructor(r){super(r)}get connectionStatus(){var r;return(r=this.connection)==null?void 0:r.connectionStatus}get errorString(){var r;return(r=this.connection)==null?void 0:r.errorString}};x([ot()],Ue.prototype,"connection",void 0),x([ot()],Ue.prototype,"connectionStatus",null),x([ot()],Ue.prototype,"errorString",null),Ue=x([ci("esri.views.2d.layers.features.sources.StreamConnectionState")],Ue);let Kx=class{constructor(t,e){this._metadata=t,this._onUpdate=e,this._objectIdToFeature=new Map}get size(){return this._objectIdToFeature.size}get reader(){return at.fromFeatures([...this._objectIdToFeature.values()],this._metadata)}add(t){this._objectIdToFeature.set(t.objectId,t)}forEach(t){this._objectIdToFeature.forEach(t)}removeById(t){const e=this._objectIdToFeature.get(t);return e?(this._objectIdToFeature.delete(t),e):null}clear(){this._objectIdToFeature=new Map}update(t,e){this._onUpdate((t==null?void 0:t.length)??0)}};class Qx extends xi{constructor(t){super(),this._reader=t,this.chunkId="stream-chunk",this.normalizedChunkId="stream-chunk"}get reader(){return this._reader}get first(){return!0}get end(){return!0}get queryInfo(){return{type:"stream",chunkId:this.chunkId,size:this.size(),end:this.end}}get isTiled(){return!1}getTileReader(t){const e=this.queryFeaturesInBounds(t.bounds);return e.setTransformForDisplay(t.transform),e}}class Jx extends Du{constructor(t,e,s,i,n){super(s),this._service=t,this._dataFilter=e,this._streamOptions=i,this._metadata=n,this._connectionState=new Ue,this._forceRefresh=!1,this.events=new Fo;const{objectIdField:o,timeInfo:a}=this._metadata,{purgeOptions:h}=e;this._stagingStore=new Kx(this._metadata,c=>this.events.emit("features-updated",c)),this._manager=new Zx(this._stagingStore,o,a,h),this.connect()}destroy(){super.destroy(),this.disconnect()}get about(){return{willQueryAllFeatures:!1,willQueryFullResolutionGeometry:!1}}get connectionStatus(){return this._connectionState.connectionStatus}get errorString(){var t;return(t=this._connectionState)==null?void 0:t.errorString}async refresh(){const t=this._chunk!=null;this._manager.checkForUpdates()||!t||this._forceRefresh?(this._chunk&&this._store.remove(this._chunk),this._forceRefresh=!1,this._chunk=new Qx(this._stagingStore.reader),this._store.insert(this._chunk),this.events.emit("tick")):this.events.emit("tick")}async updateFields(t){throw new Error("Updating available fields not supported for StreamLayer")}async load(t){}unload(t){}disconnect(){var t;this._connection=To(this._connection),this._connectionState.connection=null,(t=this._handlesGroup)==null||t.remove()}connect(){if(this._connection!=null)return;const{geometryType:t,spatialReference:e}=this._metadata,{maxReconnectionAttempts:s,maxReconnectionInterval:i,geometryDefinition:n,definitionExpression:o,customParameters:a}=this._dataFilter;this._connection=up(this._service.source,e,this._streamOptions.outSR,t,o,n,s,i,a),this._handlesGroup=Ar([this._connection.on("data-received",h=>this._onFeature(h)),this._connection.on("message-received",h=>this._onWebSocketMessage(h))]),this._connectionState.connection=this._connection}clear(){this._manager.checkForUpdates(),this._stagingStore.clear(),this._forceRefresh=!0}updateCustomParameters(t){var e;(e=this._connection)==null||e.updateCustomParameters(t)}sendMessageToSocket(t){var e;(e=this._connection)==null||e.sendMessageToSocket(t)}sendMessageToClient(t){var e;(e=this._connection)==null||e.sendMessageToClient(t)}_onWebSocketMessage(t){if("type"in t)switch(t.type){case"delete":if(t.objectIds)for(const e of t.objectIds)this._manager.removeById(e);if(t.trackIds)for(const e of t.trackIds)this._manager.removeByTrackId(e);break;case"clear":this.clear()}this.events.emit("message-received",t)}_onFeature(t){try{this._manager.add(t),this.events.emit("data-received",t)}catch{}}}let t0=class{constructor(t){this._onChange=t,this._chunks=new Map,this._chunksToRemove=[],this.events=new Fo,this.featureAdapter=new kr}destroy(){this.clear()}clear(){for(const t of this._chunks.values())this._chunksToRemove.push(t);this._chunks.clear(),this._localEditChunk!=null&&this._chunksToRemove.push(this._localEditChunk),this._localEditChunk=null}*chunks(){this._localEditChunk&&(yield this._localEditChunk),this._localOverridesChunk&&(yield this._localOverridesChunk),yield*this._chunks.values()}insert(t){var e,s;k("esri-2d-update-debug")&&console.debug(`Chunk[${t.chunkId}] SourceChunkStore.insert`),(e=this._localOverridesChunk)!=null&&e.overriddenIds.size&&(t.reader.removeIds(this._localOverridesChunk.overriddenIds),t.invalidate()),(s=this._localEditChunk)!=null&&s.overriddenIds.size&&this._localEditChunk.removeOverrides(t),this._chunks.set(t.chunkId,t),this.events.emit("changed"),this._onChange()}remove(t){k("esri-2d-update-debug")&&console.debug(`Chunk[${t.chunkId}] SourceChunkStore.remove`),this._chunks.delete(t.chunkId),this._chunksToRemove.push(t)}cleanupRemovedChunks(){const t=this._chunksToRemove;return this._chunksToRemove=[],t}applyLocalOverrides(t,e){this._localOverridesChunk==null&&(this._localOverridesChunk=new Mo(e,"localOverride")),this._localOverridesChunk.applyOverrides(t);for(const s of this._chunks.values())s.reader.removeIds(this._localOverridesChunk.overriddenIds),s.invalidate()}applyLocalEdit(t,e){this._localEditChunk==null&&(this._localEditChunk=new Mo(e,"localEdit")),this._localEditChunk.applyOverrides(t);for(const s of this._chunks.values())s.reader.removeIds(this._localEditChunk.overriddenIds),s.invalidate()}forEach(t){const e=new Set;for(const s of this.chunks()){const i=s.reader.getCursor();for(;i.next();){const n=i.getObjectId();e.has(n)||(t(i.copy()),e.add(n))}}}forEachUnsafe(t){const e=new Set;for(const s of this.chunks()){const i=s.reader.getCursor();for(;i.next();){const n=i.getObjectId();e.has(n)||(t(i),e.add(n))}}}forEachInBounds(t,e){const s=new Set;for(const i of this.chunks()){const n=i.queryFeaturesInBounds(t);for(;n.next();){const o=n.getObjectId();s.has(o)||(e(n.copy()),s.add(o))}}}forEachBounds(t,e){const s=Ao();for(const i of t)i.getBounds(s)&&e(s)}},js=class extends li{constructor(r){super(r),this.debugName="",this._updatingHandles=new pp,this._idToUpdatingState=new dp}get updating(){const r=this._updatingHandles.updating||Array.from(this._idToUpdatingState.values()).some(t=>t);if(k("esri-2d-log-updating")){const t=Array.from(this._idToUpdatingState.entries()).map(([e,s])=>`-> ${e}: ${s}`).join(` +`);console.log(`${this.debugName}: Updating: ${r} +-> Handles: ${this._updatingHandles.updating} +${t}`)}return r}addUpdateTracking(r,t){const e=mr(()=>t.updating,s=>this._idToUpdatingState.set(r,s),{sync:!0});this.addHandles(e)}addPromise(r){return this._updatingHandles.addPromise(r)}};x([ot({constructOnly:!0})],js.prototype,"debugName",void 0),x([ot({readOnly:!0})],js.prototype,"updating",null),js=x([ci("esri.views.2d.layers.support.UpdateTracking2D")],js);class e0{constructor(t,e,s,i,n){this.service=t,this._aggregateAdapter=e,this._subscriptions=s,this._onChange=i,this._connection=n,this._updateTracking=new js({debugName:"FeatureSource"}),this._didInvalidateData=!1,this._store=new t0(this._onChange),this._metadata=new xa(t.metadata)}destroy(){var t,e;(t=this._strategy)==null||t.destroy(),this._store.destroy(),(e=this._streamMessenger)==null||e.destroy(),this.service.type==="memory"&&this.service.source.map(s=>s.close())}get metadata(){if(!this._metadata)throw new Error("InternalError: Metadata not defined. Was update called?");return this._metadata}get store(){return this._store}get streamMessenger(){return this._streamMessenger==null&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return Mx.from(this._store)}get updateTracking(){return this._updateTracking}get queryEngine(){if(!this._queryEngine){if(!this._schema)return null;const{dataFilter:t}=this._schema.mutable,e=this._schema.mutable.availableFields,s=this._metadata;this._queryEngine=new uc({featureStore:this._store,fieldsIndex:s.fieldsIndex,geometryType:s.geometryType,objectIdField:s.objectIdField,hasM:!1,hasZ:!1,spatialReference:this.service.outSpatialReference,cacheSpatialQueries:!0,aggregateAdapter:this._aggregateAdapter,timeInfo:s.timeInfo,definitionExpression:t.definitionExpression,availableFields:e})}return this._queryEngine}get isStream(){return this._schema.type==="stream"}chunks(){return Array.from(this._store.chunks())}cleanupRemovedChunks(){return this._store.cleanupRemovedChunks()}onSubscribe(t){var s;this._connection.onEvent({type:"subscribe",tile:t.tile.id});const e=(s=this._strategy)==null?void 0:s.load(t);e&&(e.then(()=>this._connection.onEvent({type:"loaded",tile:t.tile.id})).catch(i=>this._connection.onEvent({type:"error",tile:t.tile.id,error:i})),this._updateTracking.addPromise(e))}onResume(t){var e;this._updateTracking.addPromise(nc((e=this._strategy)==null?void 0:e.load(t)))}onUnsubscribe(t){var e;this._connection.onEvent({type:"unsubscribe",tile:t.tile.id}),(e=this._strategy)==null||e.unload(t)}getLocalEdit(t){return this._updateTracking.addPromise(this._getGetLocalEdit(t))}applyLocalEdit(t){this._didInvalidateData=!0,this._store.applyLocalEdit(t,this.metadata)}async update(t,e){var n,o,a;const s=t.source,i=Oo((n=this._schema)==null?void 0:n.mutable,s.mutable);if(!i)return!1;if(k("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.update`,{changes:i}),this._schema=s,(o=this._queryEngine)==null||o.destroy(),this._queryEngine=null,this.service.type==="feature-service"&&this.service.queryMetadata.lastEditDate!=null&&(this._lastEditDate=this.service.queryMetadata.lastEditDate),this._streamMessenger==null&&this._schema.type==="stream"&&this._initStreamMessenger(),$a(i,"sourceRefreshVersion")&&((a=this._strategy)==null?void 0:a.refresh))return await this._strategy.refresh(),!0;if(s.type==="feature"&&$a(i,"availableFields")){if(await this._queryLastEditDateChanged()||this._didInvalidateData)this._didInvalidateData=!1,await this._updateStrategy(e);else{this._connection.onEvent({type:"updateFieldsStart"});try{await this._strategy.updateFields(s.mutable.availableFields),this._connection.onEvent({type:"updateFieldsEnd"})}catch(h){this._connection.onEvent({type:"updateFieldsError",error:h})}}return!1}return!(!Ta(i,"dataFilter")&&!Ta(i,"sourceRefreshVersion"))&&(await this._updateStrategy(e),!0)}_initStreamMessenger(){this._streamMessenger==null&&(this._streamMessenger=new fr(this._connection))}async _getGetLocalEdit(t){if(t.historicMoment&&this._schema.type==="feature"&&(this._schema.mutable.dataFilter.historicMoment=t.historicMoment,this._strategy.unsafeSetQueryHistoricMoment(new Date(t.historicMoment))),t.type==="edit-by-feature"){const i=[...t.added,...t.updated].map(n=>ye.fromJSON(n,this.metadata.objectIdField));return{reader:at.fromOptimizedFeatures(i,this.metadata),removed:this._resolveIdentifiers(t.removed)}}const e=this._resolveIdentifiers(t.removed);if(!t.updated.length&&!t.added.length)return{reader:at.empty(this.metadata),removed:e};const s=this._resolveIdentifiers([...t.added,...t.updated]);return{reader:await this._strategy.queryByObjectId(s),removed:e}}_resolveIdentifiers(t){const e=[],s=[];for(const i of t)i.objectId!=null&&i.objectId!==-1?s.push(i.objectId):e.push(i.globalId);if(e.length){const i=new Set(e),n=this.metadata.globalIdField;if(n==null)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");this._store.forEachUnsafe(o=>{const a=o.readAttribute(n);i.has(a)&&s.push(o.getObjectId())})}return s}async _queryLastEditDateChanged(){if(this._lastEditDate==null)return!1;const t=this.service.source,e={...t.query,f:"json"},s=(await Sd(t.path,{query:e,responseType:"json"})).data.editingInfo.lastEditDate;return s!==this._lastEditDate&&(this._lastEditDate=s,!0)}async _createStrategy(){const t="isSourceHosted"in this.service&&this.service.isSourceHosted,e=Array.isArray(this.service.source),s=this.service.source&&"collection"in this.service.source,i=t||e||s;if(this._schema.type==="stream"){const h=new Jx(this.service,this._schema.mutable.dataFilter,this._store,{outSR:this.service.outSpatialReference},this.metadata);return this._streamMessenger.strategy=h,h}const n=this.service,o=Tx.fromSchema(n,this._schema,this._metadata),a=await this._supportSnapshotMode(n,o);return a?new Xx(n,o,this._store,a.featureCount,this.metadata,this._connection):i?new Wx(n,o,this._store,this.metadata,this._connection):new jx(n,o,this._store,this.metadata,this._connection)}async _updateStrategy(t){var o;const e=await this._createStrategy();this._connection.onEvent({type:"updateStrategyStart",about:e.about});const s=!!this._strategy;this._store.clear(),(o=this._strategy)==null||o.destroy(),this._strategy=e,k("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.updateStrategy`,{strategy:e});const i=Array.from(this._subscriptions.values());if(!i.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const n=Promise.all(i.map(a=>this._strategy.load(a).then(()=>this._connection.onEvent({type:"loaded",tile:a.tile.id})).catch(h=>this._connection.onEvent({type:"error",tile:a.tile.id,error:h}))));this._updateTracking.addPromise(n);try{s&&await n}catch(a){Lo(a)}this._connection.onEvent({type:"updateStrategyEnd"}),k("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.updateStrategyEnd`,{strategy:e})}async _supportSnapshotMode(t,e){const{queryMetadata:s}=t,i=s.snapshotInfo;if(!i||!i.supportsSnapshotMinThreshold||!i.snapshotCountThresholds)return null;const n=t.source,o=e.createQuery();o.inner.orderByFields=[],o.inner.returnGeometry=!1;const a=(await ap(n,o.inner,{query:o.customParameters})).data.count,{min:h,max:c}=i.snapshotCountThresholds;return a<=h||i.supportsSnapshotMaxThreshold&&athis._processor.getFeatureObjectIdsForAggregate(t)},this._subscriptions=new Map,this._updateRequested=!1,this._updateSubscriptionRequests=[],this._updateHighlightRequests=[]}destroy(){this._subscriptions.clear(),this._processor.destroy(),this._source.destroy(),this._handles.remove(),this._updateLocalEditsRequest=null,this._tileInfoView=null}onAttach(t){k("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const e=this._connection,s=Cd.fromJSON(t.tileInfoJSON);this._tileInfoView=new yp(s),this._source=new e0(t.service,this._aggregateAdapter,this._subscriptions,()=>this._requestUpdate(),e),this._processor=new Px(e,this._source),this._handles=Ar([mr(()=>this._source.updateTracking.updating,()=>{this._requestUpdate(),nc(this._connection.layerView.setUpdating({data:this._source.updateTracking.updating,pipeline:!0}))})])}onDetach(){k("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(t){this._connection=new bp(t)}get features(){var e;const t=(e=this._source)==null?void 0:e.queryEngine;if(!t)throw new rt("no-queryEngine","No query engine defined");return t}get aggregates(){var e;const t=(e=this._processor)==null?void 0:e.aggregateQueryEngine;if(!t)throw new rt("no-queryEngine","No aggregate query engine defined");return t}get processor(){return this._processor}get streamMessenger(){return this._source.streamMessenger}getDisplayFeatures(t){return this._processor.getDisplayFeatures(t)}async updateSchema(t,e){return k("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new Zi({schema:t,version:e}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(t){const e=new Zi(t);return this._updateSubscriptionRequests.push(e),this._requestUpdate(),e.resolver.promise}updateHighlight(t){const e=new Zi(t);return this._updateHighlightRequests.push(e),this._requestUpdate(),e.resolver.promise}async onEdits(t){if(this._updateLocalEditsRequest!=null)throw new rt("InternalError - Already processing an edit");this._updateLocalEditsRequest=new Zi(t);const e=this._updateLocalEditsRequest.resolver.promise;return this._requestUpdate(),e}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(t,e){return this.features.executeQuery(t,e)}async queryHeatmapStatistics(t){const e=Math.round(E(t.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const n=typeof t.fieldOffset=="string",o=t.fieldOffset??0,a=Array.from(this._subscriptions.values()),h=this._source.chunks(),c=e**2,l=3/(Math.PI*c),u=2*e,d=Math.ceil(V/u);for(const p of a){const f=p.tile,_=new Float64Array(d*d);for(const m of h){const g=m.getTileReader(f);if(!g)continue;const y=g.getCursor();for(;y.next();){let b=1;if(t.field!=null){const L=y.readAttribute(t.field);b=n?-1*+L:+L+o}const v=y.readXForDisplay()/u,S=y.readYForDisplay()/u,M=Math.floor(v),C=Math.floor(S);if(M<0||C<0||M>=d||C>=d)continue;const F=((.5+M-v)*u)**2+((.5+C-S)*u)**2;if(F>c)continue;const T=b*(l*(1-F/c)**2);_[C+M*d]+=T}}for(let m=0;m<_.length;m++)s=Math.min(s,_[m]),i=Math.max(i,_[m])}return{max:i,min:s}}async getSampleFeatures(t){const e=this._source.chunks();if(e.reduce((h,c)=>h+c.size(),0)<=t.minFeatureCount){if(!this._source.updateTracking.updating){const h=[];return this._source.store.forEachUnsafe(c=>h.push(c.readLegacyFeatureWorldSpace())),h}return null}const s=new Set,i=[],n=e.map(h=>h.reader.getCursor()),o=new Eo,a=3*t.sampleSize;for(let h=0;h=t.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,$d(()=>this._scheduleNextUpdate()))}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=Co(this._doUpdate()).finally(()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()}),this._updateRequested=!1))}_subscribe(t){const e=t.tileId;if(this._subscriptions.has(e))return;k("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.subscribe`);const s=new Ia(this._tileInfoView,e),i=new s0(s,t.version);this._subscriptions.set(e,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(t){const e=this._subscriptions.get(t);e&&(k("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.unsubscribe`),e.abort(),this._source.onUnsubscribe(e),this._processor.onUnsubscribe(e),this._subscriptions.delete(e.key.id))}async _doUpdate(){if(k("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({data:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const i=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const n of i)this._doUpdateSubscriptions(n.inner),n.resolver.resolve()}const t=this._updateSchemaRequest;if(this._updateSchemaRequest=null,t!=null){const{schema:i,version:n}=t.inner;await this._doUpdateSchema(i,n)}const e=this._updateLocalEditsRequest;if(this._updateLocalEditsRequest=null,e!=null){k("esri-2d-update-debug")&&console.debug("Pipeline.applyEditOverride",e.inner);const i=await this._source.getLocalEdit(e.inner);await this._processor.applyLocalEdit(i),this._source.applyLocalEdit(i),k("esri-2d-update-debug")&&console.debug("Pipeline.endEditOverride",e.inner)}if(this._updateHighlightRequests.length){const i=this._updateHighlightRequests;this._updateHighlightRequests=[];for(const n of i)this._processor.updateHighlight(n.inner),n.resolver.resolve()}const s=this._source.cleanupRemovedChunks();this._processor.removeChunks(s);try{this._subscriptions.size&&(k("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(),k("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(i){Lo(i)}e!=null&&e.resolver.resolve(),t!=null&&t.resolver.resolve(),this._updateRequested?(k("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({data:this._source.updateTracking.updating,pipeline:!0})):(k("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({data:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(t,e){var o;k("esri-2d-update-debug")&&console.debug(`Version[${e}] Pipeline.updateStart`,{schema:t});const s={tileInfo:(o=this._tileInfoView)==null?void 0:o.tileInfo},i=await this._source.update(t,e),n=Array.from(this._subscriptions.values());await this._processor.update(t,e,s,i,n),k("esri-2d-update-debug")&&console.debug(`Version[${e}] Pipeline.updateEnd`)}_doUpdateSubscriptions(t){k("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",t);for(const e of t.subscribe)this._subscribe(e);for(const e of t.unsubscribe)this._unsubscribe(e)}}export{ev as default}; diff --git a/build/assets/FeatureServiceSnappingSourceWorker-C2uDe4AH.js b/build/assets/FeatureServiceSnappingSourceWorker-C2uDe4AH.js new file mode 100644 index 0000000..babb9e6 --- /dev/null +++ b/build/assets/FeatureServiceSnappingSourceWorker-C2uDe4AH.js @@ -0,0 +1 @@ +import{dk as X,d1 as st,c7 as y,fp as it,hp as nt,$ as N,hq as M,B as h,D as d,E as O,bw as P,b3 as Y,bJ as $,hr as j,gP as z,hs as D,ht as U,hu as rt,hv as A,h as at,bA as tt,by as ot,d9 as lt,dK as v,aZ as ut,aK as ct,V as ht,bB as dt,hw as pt,gH as ft,hx as q,hy as _t,hz as B,hA as et,b1 as gt,a2 as k,ay as S,eK as yt,bx as V,fV as mt,dh as Et}from"./index-DKOmzAMm.js";import{h as R}from"./UpdatingHandles-D3xBFsF5.js";import{m as Ft}from"./FeatureStore-C3siChbH.js";import{$ as Ct}from"./QueryEngine-CI3mggax.js";import{z as I,t as Tt}from"./TileInfo-Bx6eEWV4.js";import{i as bt,c as St,g as vt}from"./featureConversionUtils-CCATessr.js";import{a as wt}from"./pbfQueryUtils-D2YxxSfN.js";import{x as It,f as Ot,c as xt,S as $t}from"./query-CQvaiR4K.js";import{E as At}from"./ByteSizeUnit-BsxeN7wM.js";import{o as Rt}from"./BoundsStore-BShGRkMU.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./pbf-DwSF5Y_G.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";function J(e=!1,t){if(e){const{elevationInfo:s,alignPointsInFeatures:i}=t;return new zt(s,i)}return new Ht}let Ht=class{async alignCandidates(t,s,i){return t}notifyElevationSourceChange(){}};const Pt=1024;let zt=class{constructor(t,s){this._elevationInfo=t,this._alignPointsInFeatures=s,this._alignmentsCache=new X(Pt),this._cacheVersion=0}async alignCandidates(t,s,i){const n=this._elevationInfo;return n==null||n.mode!=="absolute-height"||n.featureExpressionInfo?this._alignComputedElevationCandidates(t,s,i):(Nt(t,s,n),t)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(t,s,i){const n=new Map;for(const _ of t)st(n,_.objectId,Mt).push(_);const[r,a,o]=this._prepareQuery(n,s),l=await this._alignPointsInFeatures(r,i);if(y(i),o!==this._cacheVersion)return this._alignComputedElevationCandidates(t,s,i);this._applyCacheAndResponse(r,l,a);const{drapedObjectIds:c,failedObjectIds:p}=l,g=[];for(const _ of t){const{objectId:m}=_;c.has(m)&&_.type==="edge"&&(_.draped=!0),p.has(m)||g.push(_)}return g}_prepareQuery(t,s){const i=[],n=[];for(const[r,a]of t){const o=[];for(const l of a)this._addToQueriesOrCachedResult(r,l.target,o,n),l.type==="edge"&&(this._addToQueriesOrCachedResult(r,l.start,o,n),this._addToQueriesOrCachedResult(r,l.end,o,n));o.length!==0&&i.push({objectId:r,points:o})}return[{spatialReference:s.toJSON(),pointsInFeatures:i},n,this._cacheVersion]}_addToQueriesOrCachedResult(t,s,i,n){const r=L(t,s),a=this._alignmentsCache.get(r);a==null?i.push(s):n.push(new Dt(s,a))}_applyCacheAndResponse(t,{elevations:s,drapedObjectIds:i,failedObjectIds:n},r){for(const l of r)l.apply();let a=0;const o=this._alignmentsCache;for(const{objectId:l,points:c}of t.pointsInFeatures){if(n.has(l)){a+=c.length;continue}const p=!i.has(l);for(const g of c){const _=L(l,g),m=s[a++];g.z=m,p&&o.put(_,m,1)}}}};class Dt{constructor(t,s){this.point=t,this.z=s}apply(){this.point.z=this.z}}function L(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n==null?void 0:n.wkid}`}function Nt(e,t,s){const{offset:i,unit:n}=s;if(i==null)return;const r=it(t),a=i*(nt(n??"meters")/r);for(const o of e)switch(o.type){case"edge":o.start.z+=a,o.end.z+=a;continue;case"vertex":o.target.z+=a;continue}}function Mt(){return[]}let jt=class{filter(t,s){return s}notifyElevationSourceChange(){}},Ut=class{filter(t,s){const{point:i,distance:n}=t,{z:r}=i;if(r==null||s.length===0)return s;const a=Jt(n),o=this._updateCandidatesTo3D(s,i,a).filter(qt);return o.sort(Lt),o}_updateCandidatesTo3D(t,s,i){for(const n of t)switch(n.type){case"edge":Bt(n,s,i);continue;case"vertex":Vt(n,s,i);continue}return t}};function qt(e){return e.distance<=1}function Q(e=!1){return e?new Ut:new jt}function Bt(e,t,{x:s,y:i,z:n}){const{start:r,end:a,target:o}=e;e.draped||kt(o,t,r,a);const l=(t.x-o.x)/s,c=(t.y-o.y)/i,p=(t.z-o.z)/n;e.distance=Math.sqrt(l*l+c*c+p*p)}function kt(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,a=i.z-s.z,o=n*n+r*r+a*a,l=(t.x-s.x)*n+(t.y-s.y)*r+a*(t.z-s.z),c=Math.min(1,Math.max(0,l/o)),p=s.x+n*c,g=s.y+r*c,_=s.z+a*c;e.x=p,e.y=g,e.z=_}function Vt(e,t,{x:s,y:i,z:n}){const{target:r}=e,a=(t.x-r.x)/s,o=(t.y-r.y)/i,l=(t.z-r.z)/n,c=Math.sqrt(a*a+o*o+l*l);e.distance=c}function Jt(e){return typeof e=="number"?{x:e,y:e,z:e}:e}function Lt(e,t){return e.distance-t.distance}function G(e=!1,t){return e?new Zt(t):new Qt}class Qt{async fetch(){return[]}notifySymbologyChange(){}}const Gt=1024;let Zt=class{constructor(t){this._getSymbologyCandidates=t,this._candidatesCache=new X(Gt),this._cacheVersion=0}async fetch(t,s){if(t.length===0)return[];const i=[],n=[],r=this._candidatesCache;for(const g of t){const _=Z(g),m=r.get(_);if(m)for(const b of m)n.push(N(b));else i.push(g),r.put(_,[],1)}if(i.length===0)return n;const a=this._cacheVersion,{candidates:o,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,s);if(y(s),a!==this._cacheVersion)return this.fetch(t,s);const c=[],{length:p}=o;for(let g=0;gt.callback(s)).catch(()=>{}).then(()=>{this._pending.shift(),this._process()})}};h([d()],w.prototype,"updating",void 0),w=h([O("esri.core.AsyncSequence")],w);class Wt{constructor(t,s){this.data=t,this.resolution=s,this.state={type:u.CREATED},this.alive=!0}process(t){switch(this.state.type){case u.CREATED:return this.state=this._gotoFetchCount(this.state,t),this.state.task.promise.then(t.resume,t.resume);case u.FETCH_COUNT:break;case u.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,t),this.state.task.promise.then(t.resume,t.resume);case u.FETCH_FEATURES:break;case u.FETCHED_FEATURES:this.state=this._goToDone(this.state,t);case u.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case u.CREATED:case u.FETCH_COUNT:return 0;case u.FETCHED_COUNT:return this.state.featureCount;case u.FETCH_FEATURES:return this.state.previous.featureCount;case u.FETCHED_FEATURES:return this.state.features.length;case u.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case u.CREATED:return"created";case u.FETCH_COUNT:return"fetch-count";case u.FETCHED_COUNT:return"fetched-count";case u.FETCH_FEATURES:return"fetch-features";case u.FETCHED_FEATURES:return"fetched-features";case u.DONE:return"done"}}_gotoFetchCount(t,s){return{type:u.FETCH_COUNT,previous:t,task:$(async i=>{const n=await j(s.fetchCount(this,i));this.state.type===u.FETCH_COUNT&&(this.state=Kt(this.state,n.ok?n.value:1/0))})}}_gotoFetchFeatures(t,s){return{type:u.FETCH_FEATURES,previous:t,task:$(async i=>{const n=await j(s.fetchFeatures(this,t.featureCount,i));this.state.type===u.FETCH_FEATURES&&(this.state=Xt(this.state,n.ok?n.value:[]))})}}_goToDone(t,s){return s.finish(this,t.features),{type:u.DONE,previous:t}}reset(){const t=this.state;switch(this.state={type:u.CREATED},t.type){case u.CREATED:case u.FETCHED_COUNT:case u.FETCHED_FEATURES:case u.DONE:break;case u.FETCH_COUNT:case u.FETCH_FEATURES:t.task.abort()}}intersects(t){return t==null||!this.data.extent||(z(t,W),D(this.data.extent,W))}}function Kt(e,t){return{type:u.FETCHED_COUNT,featureCount:t,previous:e}}function Xt(e,t){return{type:u.FETCHED_FEATURES,previous:e,features:t}}var u;(function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"})(u||(u={}));const W=Y();let f=class extends P{get _minimumVerticesPerFeature(){var t;switch((t=this.store)==null?void 0:t.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const t=new Set;return this.objectIdField&&t.add(this.objectIdField),this.globalIdField&&t.add(this.globalIdField),t}set outFields(t){const s=this._get("outFields"),i=U(t,this._mandatoryOutFields);rt(i,s)||(this._set("outFields",i),A(i,s)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(t){const s=this._get("filter"),i=this._filterProperties(t);JSON.stringify(s)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(t){const s=this._get("customParameters");JSON.stringify(s)!==JSON.stringify(t)&&this._set("customParameters",t)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(t){const s=this._get("tileInfo");s!==t&&(t!=null&&s!=null&&JSON.stringify(t)===JSON.stringify(s)||(this._set("tileInfo",t),this.store.tileInfo=t))}set tileSize(t){this._get("tileSize")!==t&&this._set("tileSize",t)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(t){super(t),this.suspended=!0,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new R,this._pendingEdits=new w,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,(t,s)=>{at(t,s,({id:i},{id:n})=>i===n)||this._process()},tt),this.addHandles(ot(()=>!this.suspended,()=>this._process()))}destroy(){this._pendingTiles.forEach(t=>this._deletePendingTile(t)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(t=>this._deletePendingTile(t)),this._process()}applyEdits(t){this._pendingEdits.push(t,async s=>{if(s.addedFeatures.length===0&&s.updatedFeatures.length===0&&s.deletedFeatures.length===0)return;for(const[,n]of this._pendingTiles)n.reset();const i={...s,deletedFeatures:s.deletedFeatures.map(({objectId:n,globalId:r})=>n&&n!==-1?n:this._lookupObjectIdByGlobalId(r))};await this._updatingHandles.addPromise(this.store.processEdits(i,(n,r)=>this._queryFeaturesById(n,r),this._pendingEditsAbortController.signal)),this._processPendingTiles()})}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!lt(this.url))return;const t=$(async s=>{var i;try{const n=await It(this.url,new v({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:s});this.store.extent=ut.fromJSON((i=n.data)==null?void 0:i.extent)}catch(n){ct(n),ht.getLogger(this).warn("Failed to fetch data extent",n)}});this._updatingHandles.addPromise(t.promise.then(()=>this._process())),this.addHandles(dt(()=>t.abort()))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(t=>t.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,t]of this._pendingTiles)t.alive=!1}_createPendingTiles(){if(this.suspended)return;const t=this._collectMissingTilesInfo();if(this._setAvailability(t==null?1:t.coveredArea/t.fullArea),t!=null)for(const{data:s,resolution:i}of t.missingTiles){const n=this._pendingTiles.get(s.id);n?(n.resolution=i,n.alive=!0):this._createPendingTile(s,i)}}_collectMissingTilesInfo(){let t=null;for(let s=this.tilesOfInterest.length-1;s>=0;s--){const i=this.tilesOfInterest[s],n=this.store.process(i,(r,a)=>this._verifyTileComplexity(r,a),this.outFields);t==null?t=n:t.prepend(n)}return t}_deletePendingTiles(){for(const[,t]of this._pendingTiles)t.alive||this._deletePendingTile(t)}_processPendingTiles(){const t={fetchCount:(s,i)=>this._fetchCount(s,i),fetchFeatures:(s,i,n)=>this._fetchFeatures(s,i,n),finish:(s,i)=>this._finishPendingTile(s,i),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(t))for(const[,s]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(s.data),s.resolution)&&this._updatingHandles.addPromise(s.process(t))}_verifyTileComplexity(t,s){return this._verifyVertexComplexity(t)&&this._verifyFeatureDensity(t,s)}_verifyVertexComplexity(t){return t*this._minimumVerticesPerFeature{t===r.attributes[s]&&(n=r.objectId??r.attributes[i])}),n==null)throw new Error(`Expected to find a feature with globalId ${t}`);return n}_queryFeaturesById(t,s){const i=this._createFeaturesQuery();return i.objectIds=t,this._queryFeatures(i,s)}_queryFeatures(t,s){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(t,s):this._queryFeaturesJSON(t,s)}async _queryFeaturesPBF(t,s){const{sourceSpatialReference:i}=this,{data:n}=await Ot(this.url,t,new wt({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:x,signal:s});return bt(n)}async _queryFeaturesJSON(t,s){const{sourceSpatialReference:i}=this,{data:n}=await xt(this.url,t,i,{query:this._configuration.customParameters,timeout:x,signal:s});return St(n,this.objectIdField)}_createCountQuery(t){const s=this._createBaseQuery(t);return this.capabilities.query.supportsCacheHint&&(s.cacheHint=!0),s}_createFeaturesQuery(t=null){var r;const s=this._createBaseQuery(t),i=(t==null?void 0:t.data)!=null?this.store.getAttributesForTile((r=t==null?void 0:t.data)==null?void 0:r.id):null,n=U(pt(this.outFields,i??new Set),this._mandatoryOutFields);return s.outFields=Array.from(n),s.returnGeometry=!0,t!=null&&(this.capabilities.query.supportsResultType?s.resultType="tile":this.capabilities.query.supportsCacheHint&&(s.cacheHint=!0)),s}_createBaseQuery(t){const s=new v({returnZ:this.hasZ,returnM:!1,geometry:this.tileInfo!=null&&t!=null?ft(t.data.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return i!=null&&(s.where=i.where,s.gdbVersion=i.gdbVersion,s.timeExtent=i.timeExtent),s.outSpatialReference=this.spatialReference,s}_setPagingParameters(t,s,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:n,supportsCacheHint:r,tileMaxRecordCount:a,maxRecordCount:o,supportsResultType:l}=this.capabilities.query,c=n?v.MAX_MAX_RECORD_COUNT_FACTOR:1,p=c*((l||r)&&a?a:o||Yt);return t.start=s,n?(t.maxRecordCountFactor=Math.min(c,Math.ceil(i/p)),t.num=Math.min(i,t.maxRecordCountFactor*p)):t.num=Math.min(i,p),!0}};h([d({constructOnly:!0})],f.prototype,"url",void 0),h([d({constructOnly:!0})],f.prototype,"objectIdField",void 0),h([d({constructOnly:!0})],f.prototype,"globalIdField",void 0),h([d({constructOnly:!0})],f.prototype,"capabilities",void 0),h([d({constructOnly:!0})],f.prototype,"sourceSpatialReference",void 0),h([d({constructOnly:!0})],f.prototype,"spatialReference",void 0),h([d({constructOnly:!0})],f.prototype,"store",void 0),h([d({readOnly:!0})],f.prototype,"_minimumVerticesPerFeature",null),h([d()],f.prototype,"_mandatoryOutFields",null),h([d()],f.prototype,"outFields",null),h([d()],f.prototype,"suspended",void 0),h([d()],f.prototype,"filter",null),h([d()],f.prototype,"customParameters",null),h([d({readOnly:!0})],f.prototype,"_configuration",null),h([d()],f.prototype,"tileInfo",null),h([d()],f.prototype,"tileSize",null),h([d()],f.prototype,"tilesOfInterest",void 0),h([d({readOnly:!0})],f.prototype,"updating",null),h([d({readOnly:!0})],f.prototype,"updatingExcludingEdits",null),h([d({readOnly:!0})],f.prototype,"availability",void 0),h([d()],f.prototype,"hasZ",null),f=h([O("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],f);const Yt=2e3,x=6e5,te=1e6,ee=25,se=1;class ie{constructor(){this._store=new Map,this._byteSize=0}set(t,s){this.delete(t),this._store.set(t,s),this._byteSize+=s.byteSize}delete(t){const s=this._store.get(t);return!!this._store.delete(t)&&(s!=null&&(this._byteSize-=s.byteSize),!0)}get(t){return this._used(t),this._store.get(t)}has(t){return this._used(t),this._store.has(t)}clear(){this._store.clear()}applyByteSizeLimit(t,s){for(const[i,n]of this._store){if(this._byteSize<=t)break;this.delete(i),s(n)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(t){const s=this._store.get(t);s&&(this._store.delete(t),this._store.set(t,s))}}let F=class extends P{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*At.MEGABYTES,this._tileBounds=new Rt,this._tiles=new ie,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=Y()}add(e,t){var n;for(const r of t)this._referenceFeature(r.objectId);const s=this.featureStore.upsertMany(t),i=s.map(r=>new Set(Object.keys(r.attributes))).reduce((r,a)=>q(r,a),new Set(Object.keys(((n=s[0])==null?void 0:n.attributes)??[])));this._addTileStorage(e,new Set(s.map(r=>r.objectId)),re(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,r=>this._removeTileStorage(r))}getAttributesForTile(e){var t;return e?(t=this._tiles.get(e))==null?void 0:t.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new le(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)this._unreferenceFeature(i)===C.REMOVED&&t.push(i);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const a of i){const o=vt(this._tmpBoundingRect,a.geometry,n,r);o!=null&&this._tileBounds.forEachInBounds(o,l=>{const c=this._tiles.get(l);this.featureStore.add(a);const p=a.objectId;c.objectIds.has(p)||(c.objectIds.add(p),this._referenceFeature(p),this._tileFeatureCounts.set(c.data.id,c.objectIds.size))})}}process(e,t=()=>!0,s){if(this.tileInfo==null||!e.extent||this.extent!=null&&!D(z(this.extent,this._tmpBoundingRect),e.extent))return new H(e);const i=this.getAttributesForTile(e.id);if(A(s,i))return new H(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(n!=null)return n;const r=await $t(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new K(e.level,e.row,e.col);return t.updateTileInfo(s,I.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,i=>{var r;const n=(r=this._tiles.get(i))==null?void 0:r.data;n&&ne(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)}),s}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,a=t.col>>n,o=e.row<<1,l=a-(e.col<<1)+(r-o<<1),c=e.children[l];if(c!=null)this._populateChildren(c,t,s,i);else{const p=new K(e.level+1,r,a);s.updateTileInfo(p,I.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=p,this._populateChildren(p,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),s!=null&&(s.children[i]=null),r);const a=n/2,o=a*a;let l=0;for(let c=0;c{const r=this._tiles.get(n.id);if(r){s=s?q(s,r.attributeKeys):new Set(r.attributeKeys),i+=r.byteSize;for(const a of r.objectIds)t.has(a)||(t.add(a),this._referenceFeature(a));this._remove(n)}}),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)s!=null&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(e!=null)if(e.isLeaf)this._remove(e);else for(let t=0;t>1),(e.col<<1)+(1&o),a):this._collectMissingTilesRecurse(l,t,a,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),t===1?C.ADDED:C.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return t===0?(this._refCounts.delete(e),C.REMOVED):(t>0&&this._refCounts.set(e,t),C.UNCHANGED)}get test(){}};function ne(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.levelt+ae(s),0)}function ae(e){return 32+oe(e.geometry)+_t(e.attributes)}function oe(e){if(e==null)return 0;const t=B(e.lengths,4);return 32+B(e.coords,8)+t}h([d({constructOnly:!0})],F.prototype,"featureStore",void 0),h([d()],F.prototype,"tileInfo",void 0),h([d()],F.prototype,"extent",void 0),h([d()],F.prototype,"maximumByteSize",void 0),F=h([O("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],F);let le=class{constructor(t,s,i,n){this.data=t,this.objectIds=s,this.byteSize=i,this.attributeKeys=n}};class K{constructor(t,s,i){this.level=t,this.row=s,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(this.children[0]!=null||this.children[1]!=null||this.children[2]!=null||this.children[3]!=null)}}let H=class{constructor(t,s=[]){this.missingTiles=s,this.fullArea=0,this.coveredArea=0,this.fullArea=et(t.extent),this.coveredArea=this.fullArea}prepend(t){this.missingTiles=t.missingTiles.concat(this.missingTiles),this.coveredArea+=t.coveredArea,this.fullArea+=t.fullArea}},ue=class{constructor(t,s,i){this._tileInfo=t,this._extent=null,this.info=new H(s),i!=null&&(this._extent=z(i))}addMissing(t,s,i,n){const r=new Tt(null,t,s,i);this._tileInfo.updateTileInfo(r,I.ExtrapolateOptions.POWER_OF_TWO),r.extent==null||this._extent!=null&&!D(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:n}),this.info.coveredArea-=et(r.extent))}};const ce=.18751;var C;(function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"})(C||(C={}));let T=class extends gt.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=k(),this._elevationAligner=J(),this._elevationFilter=Q(),this._symbologyCandidatesFetcher=G(),this._updatingHandles=new R,this._editsUpdatingHandles=new R,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return y(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return y(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){var e,t,s;(e=this._featureFetcher)==null||e.destroy(),(t=this._queryEngine)==null||t.destroy(),(s=this._featureStore)==null||s.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=S.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new Ft({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new Ct({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new f({store:new F({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:S.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const o=e.configuration.viewType==="3d";return this._elevationAligner=J(o,{elevationInfo:e.elevationInfo!=null?yt.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=Q(o),this.addHandles([V(()=>this._featureFetcher.availability,l=>this.emit("notify-availability",{availability:l}),tt),V(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),E}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),y(t),this._featureFetcher.suspended=e,E}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),y(t),this._featureFetcher.outFields=new Set(e??[]),E}async fetchCandidates(e,t){await this._whenSetup.promise,y(t);const s=he(e),i=t==null?void 0:t.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);y(i);const r=await this._elevationAligner.alignCandidates(n.candidates,S.fromJSON(e.point.spatialReference)??S.WGS84,i);y(i);const a=await this._symbologyCandidatesFetcher.fetch(r,i);y(i);const o=a.length===0?r:r.concat(a);return{result:{candidates:this._elevationFilter.filter(s,o)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),y(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=e.tileInfo!=null?I.fromJSON(e.tileInfo):null,E}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),y(t),this._featureFetcher.refresh(),E}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),y(t),await mt(()=>!this.updatingExcludingEdits,t),y(t),E}async getDebugInfo(e,t){return y(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),y(t);const s=k();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),E}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),y(t),E}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),E}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),E}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=G(e,this._getSymbologyCandidates),E}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=e.filter!=null?v.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};h([d({readOnly:!0})],T.prototype,"updating",null),h([d({readOnly:!0})],T.prototype,"updatingExcludingEdits",null),h([d()],T.prototype,"_isInitializing",void 0),T=h([O("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],T);const Ye=T;function he(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:a}=e.filter,o={geometry:e.filter.geometry?Et(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:a,where:n??"1=1"};return{...e,query:o}}const E={result:{}};export{Ye as default}; diff --git a/build/assets/FeatureStore-C3siChbH.js b/build/assets/FeatureStore-C3siChbH.js new file mode 100644 index 0000000..4fabf93 --- /dev/null +++ b/build/assets/FeatureStore-C3siChbH.js @@ -0,0 +1 @@ +import{b0 as u,b1 as f,O as l,b2 as m,V as a,s as n,b3 as d}from"./index-DKOmzAMm.js";import{g as h}from"./featureConversionUtils-CCATessr.js";import{o as g}from"./BoundsStore-BShGRkMU.js";import{o as _,h as y}from"./QueryEngine-CI3mggax.js";const I=u();class S{constructor(e){this.geometryInfo=e,this._boundsStore=new g,this._featuresById=new Map,this._markedIds=new Set,this.events=new f,this.featureAdapter=_}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{t.geometry!=null&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(this.fullBounds==null)return null;const[t,s,r,o]=this.fullBounds;return{xmin:t,ymin:s,xmax:r,ymax:o,spatialReference:y(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(s=>this._upsert(s));return this._emitChanged(),t.filter(l)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const s=this._featuresById.get(t);s&&this._remove(s)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const r=this._boundsStore.get(s.objectId);r&&t(m(I,r))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,s=>{t(this._featuresById.get(s))})}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))}),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){var o,i;if(!e)return;const t=e.objectId;if(t==null)return void a.getLogger("esri.layers.graphics.data.FeatureStore").error(new n("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let r;if(this._markedIds.add(t),s?(e.displayId=s.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):this.onFeatureAdd!=null&&this.onFeatureAdd(e),!((i=(o=e.geometry)==null?void 0:o.coords)!=null&&i.length))return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=h(r??d(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),r!=null&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_upsert(e){const t=e==null?void 0:e.objectId;if(t==null)return a.getLogger("esri.layers.graphics.data.FeatureStore").error(new n("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:r,attributes:o}=e;for(const i in o)s.attributes[i]=o[i];return r&&(s.geometry=r,this._boundsStore.set(t,h(d(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){this.onFeatureRemove!=null&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}export{S as m}; diff --git a/build/assets/GeoJSONLayer-R05rpObK.js b/build/assets/GeoJSONLayer-R05rpObK.js new file mode 100644 index 0000000..dfe127e --- /dev/null +++ b/build/assets/GeoJSONLayer-R05rpObK.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editingSupport-BRaaDEoU.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-CF4bGKhW.js","assets/utils-BCmi3vQB.js","assets/infoFor3D-DsOdlPuA.js"])))=>i.map(i=>d[i]); +import{B as r,D as s,E as F,aN as $,dz as w,da as j,aZ as O,s as f,aX as N,di as J,M as R,ch as E,V as m,ef as q,cG as P,eg as T,eh as k,cq as D,ei as G,cu as Z,cr as z,cs as C,ct as Q,cv as L,ay as I,aK as V,ej as g,ek as B,I as v,_ as A,el as M,dK as c,em as U,cN as W,cg as K,cw as X,en as H,eo as Y,ep as ee,cx as te,eq as re,er as se,es as ie,et as oe,eu as ne,ev as ae,ew as le,cy as ue,ex as de,cE as pe}from"./index-DKOmzAMm.js";import{l as ce}from"./clientSideDefaults-B7fGShzo.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";let u=class extends ${constructor(){super(...arguments),this.type="geojson",this.refresh=w(async e=>{await this.load();const{extent:t,timeExtent:o}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,o&&(this.sourceJSON.timeInfo.timeExtent=[o.start,o.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=e!=null?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){var e;(e=this._connection)==null||e.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(o=>j.fromJSON(o))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(o=>({count:o.count,extent:O.fromJSON(o.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}_applyEdits(e){if(!this._connection)throw new f("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,o=[],n=[],l=[];if(e.addFeatures)for(const a of e.addFeatures)o.push(this._serializeFeature(a));if(e.deleteFeatures)for(const a of e.deleteFeatures)"objectId"in a&&a.objectId!=null?n.push(a.objectId):"attributes"in a&&a.attributes[t]!=null&&n.push(a.attributes[t]);if(e.updateFeatures)for(const a of e.updateFeatures)l.push(this._serializeFeature(a));return this._connection.invoke("applyEdits",{adds:o,updates:l,deletes:n}).then(({extent:a,timeExtent:d,featureEditResults:h})=>(this.sourceJSON.extent=a,d&&(this.sourceJSON.timeInfo.timeExtent=[d.start,d.end]),this._createEditsResult(h)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=e.success===!0?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new f("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,o=this._geometryForSerialization(e);return o?{geometry:o.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return t==null?null:t.type==="mesh"||t.type==="extent"?N.fromExtent(t.extent):t}async _startWorker(e){this._connection=await J("GeoJSONSourceWorker",{strategy:R("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:o,hasZ:n,geometryType:l,objectIdField:a,url:d,timeInfo:h,customParameters:S}=this.layer,x=this.layer.originOf("spatialReference")==="defaults",_={url:d,customParameters:S,fields:t&&t.map(y=>y.toJSON()),geometryType:E.toJSON(l),hasZ:n,objectIdField:a,timeInfo:h?h.toJSON():null,spatialReference:x?null:o&&o.toJSON()},p=await this._connection.invoke("load",_,{signal:e});for(const y of p.warnings)m.getLogger(this.layer).warn("#load()",`$${y.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:y});p.featureErrors.length&&m.getLogger(this.layer).warn("#load()",`Encountered ${p.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:p.featureErrors}),this.sourceJSON=p.layerDefinition,this.capabilities=ce(this.sourceJSON.hasZ,!0)}};r([s()],u.prototype,"capabilities",void 0),r([s()],u.prototype,"type",void 0),r([s({constructOnly:!0})],u.prototype,"layer",void 0),r([s()],u.prototype,"sourceJSON",void 0),u=r([F("esri.layers.graphics.sources.GeoJSONSource")],u);const b=de();let i=class extends q(P(T(k(D(G(Z(z(C(Q(L(pe))))))))))){constructor(e){super(e),this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new u({layer:this}),this.spatialReference=I.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){var e;(e=this.source)==null||e.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(V).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),g(this.renderer,this.fieldsIndex),B(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&this.geometryType==null}get parsedUrl(){return this.url?v(this.url):null}set renderer(e){g(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=v(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:o}=await A(()=>import("./editingSupport-BRaaDEoU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]));await this.load();const n=await o(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),n}on(e,t){return super.on(e,t)}createPopupTemplate(e){return M(this,e)}createQuery(){var l;const e=new c,t=(l=this.capabilities)==null?void 0:l.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:o,timeExtent:n}=this;return e.timeExtent=o!=null&&n!=null?n.offset(-o.value,o.unit):n||null,e}getFieldDomain(e,t){var o;return(o=this.getField(e))==null?void 0:o.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(c.from(e)||this.createQuery(),t)).then(o=>{if(o!=null&&o.features)for(const n of o.features)n.layer=n.sourceLayer=this;return o})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(c.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(c.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(c.from(e)||this.createQuery(),t))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return t!=null&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};r([s({readOnly:!0,json:{read:!1,write:!1}})],i.prototype,"capabilities",null),r([s({type:String})],i.prototype,"copyright",void 0),r([s({readOnly:!0})],i.prototype,"createQueryVersion",null),r([s(U("dateFieldsTimeReference"))],i.prototype,"dateFieldsTimeZone",void 0),r([s({readOnly:!0})],i.prototype,"defaultPopupTemplate",null),r([s({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),r([s({type:String})],i.prototype,"displayField",void 0),r([s({type:Boolean})],i.prototype,"editingEnabled",void 0),r([s(W)],i.prototype,"elevationInfo",void 0),r([s({type:[K],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],i.prototype,"fields",void 0),r([s(b.fieldsIndex)],i.prototype,"fieldsIndex",void 0),r([s({type:O,json:{name:"extent"}})],i.prototype,"fullExtent",void 0),r([s({type:["point","polygon","polyline","multipoint"],json:{read:{reader:E.read}}})],i.prototype,"geometryType",void 0),r([s({type:Boolean})],i.prototype,"hasZ",void 0),r([s(X)],i.prototype,"id",void 0),r([s({type:Boolean,readOnly:!0})],i.prototype,"isTable",null),r([s(H)],i.prototype,"labelsVisible",void 0),r([s({type:[Y],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ee},write:!0}})],i.prototype,"labelingInfo",void 0),r([s(te)],i.prototype,"legendEnabled",void 0),r([s({type:["show","hide"]})],i.prototype,"listMode",void 0),r([s({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],i.prototype,"objectIdField",void 0),r([s(re)],i.prototype,"opacity",void 0),r([s({type:["GeoJSON"]})],i.prototype,"operationalLayerType",void 0),r([s(b.outFields)],i.prototype,"outFields",void 0),r([s({readOnly:!0})],i.prototype,"parsedUrl",null),r([s(se)],i.prototype,"popupEnabled",void 0),r([s({type:ie,json:{name:"popupInfo",write:!0}})],i.prototype,"popupTemplate",void 0),r([s({types:oe,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:ne}}}})],i.prototype,"renderer",null),r([s(ae)],i.prototype,"screenSizePerspectiveEnabled",void 0),r([s({readOnly:!0})],i.prototype,"source",void 0),r([s({type:I})],i.prototype,"spatialReference",void 0),r([s({type:[le]})],i.prototype,"templates",void 0),r([s()],i.prototype,"title",void 0),r([s({json:{read:!1},readOnly:!0})],i.prototype,"type",void 0),r([s(ue)],i.prototype,"url",null),i=r([F("esri.layers.GeoJSONLayer")],i);const me=i;export{me as default}; diff --git a/build/assets/GeoJSONSourceWorker-CYe2sh7G.js b/build/assets/GeoJSONSourceWorker-CYe2sh7G.js new file mode 100644 index 0000000..83b3812 --- /dev/null +++ b/build/assets/GeoJSONSourceWorker-CYe2sh7G.js @@ -0,0 +1 @@ +import{bD as _,bE as R,s as I,bF as C,bG as Q,bH as v,bI as G,bJ as Z,aU as A,V as P,ab as M,U as N,aH as O}from"./index-DKOmzAMm.js";import{o as z,r as H,e as J,n as U,t as B}from"./featureConversionUtils-CCATessr.js";import{m as L}from"./FeatureStore-C3siChbH.js";import{$ as V,x as E,j as b}from"./QueryEngine-CI3mggax.js";import{I as W,N as K,E as Y}from"./geojson-BRJeQduY.js";import{c as X,i as ee,o as te}from"./clientSideDefaults-B7fGShzo.js";import{j as ie,p as T,d as w,f as F,y as k}from"./sourceUtils-DYgU-2mb.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./date-M6n_RqpC.js";const se={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class Ce{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){var e;(e=this._queryEngine)==null||e.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const n=[],[i]=await Promise.all([e.url?this._fetch(t==null?void 0:t.signal):null,this._checkProjection(e.spatialReference)]),s=W(i,{geometryType:e.geometryType}),o=e.fields||s.fields||[],d=e.hasZ!=null?e.hasZ:s.hasZ,p=s.geometryType;let m=e.objectIdField||s.objectIdFieldName||"__OBJECTID";const h=e.spatialReference||_;let r=e.timeInfo;o===s.fields&&s.unknownFields.length>0&&n.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:s.unknownFields}});const l=new R(o);let u=l.get(m);u?(u.type!=="esriFieldTypeString"&&(u.type="esriFieldTypeOID"),u.editable=!1,u.nullable=!1,m=u.name):(u={alias:m,name:m,type:s.objectIdFieldType==="string"?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(u));const y={};for(const a of o){if(a.name==null&&(a.name=a.alias),a.alias==null&&(a.alias=a.name),!a.name)throw new I("geojson-layer:invalid-field-name","field name is missing",{field:a});if(!C.jsonValues.includes(a.type))throw new I("geojson-layer:invalid-field-type",`invalid type for field "${a.name}"`,{field:a});if(a.name!==u.name){const g=Q(a);g!==void 0&&(y[a.name]=g)}a.length==null&&(a.length=v(a))}if(r){if(r.startTimeField){const a=l.get(r.startTimeField);a?(r.startTimeField=a.name,a.type="esriFieldTypeDate"):r.startTimeField=null}if(r.endTimeField){const a=l.get(r.endTimeField);a?(r.endTimeField=a.name,a.type="esriFieldTypeDate"):r.endTimeField=null}if(r.trackIdField){const a=l.get(r.trackIdField);a?r.trackIdField=a.name:(r.trackIdField=null,n.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:r}}))}r.startTimeField||r.endTimeField||(n.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:r}}),r=null)}const c=p?te(p):void 0,j=l.dateFields.length?{timeZoneIANA:G}:null,f={warnings:n,featureErrors:[],layerDefinition:{...se,drawingInfo:c??void 0,templates:X(y),extent:void 0,geometryType:p,objectIdField:m,fields:o,hasZ:!!d,timeInfo:r,dateFieldsTimeReference:j}};this._queryEngine=new V({fieldsIndex:R.fromLayerJSON({fields:o,timeInfo:r,dateFieldsTimeReference:j}),geometryType:p,hasM:!1,hasZ:d,objectIdField:m,spatialReference:h,timeInfo:r,featureStore:new L({geometryType:p,hasM:!1,hasZ:d}),cacheSpatialQueries:!0});const q=this._queryEngine.fieldsIndex.requiredFields.indexOf(u);q>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(q,1),this._createDefaultAttributes=ee(y,m);const x=await this._createFeatures(i);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,x);const D=this._normalizeFeatures(x,f.featureErrors);this._queryEngine.featureStore.addMany(D);const{fullExtent:$,timeExtent:S}=await this._queryEngine.fetchRecomputedExtents();if(f.layerDefinition.extent=$,S){const{start:a,end:g}=S;f.layerDefinition.timeInfo.timeExtent=[a,g]}return f}async applyEdits(e){const{spatialReference:t,geometryType:n}=this._queryEngine;return await Promise.all([ie(t,n),E(e.adds,t),E(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){var i;this._loadOptions.customParameters=e,(i=this._snapshotTask)==null||i.abort(),this._snapshotTask=Z(this._snapshotFeatures),this._snapshotTask.promise.then(s=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,s);const o=this._normalizeFeatures(s);o&&this._queryEngine.featureStore.addMany(o)},s=>{this._queryEngine.featureStore.clear(),A(s)||P.getLogger("esri.layers.GeoJSONLayer").error(new I("geojson-layer:refresh","An error occurred during refresh",{error:s}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _createFeatures(e){if(e==null)return[];const{geometryType:t,hasZ:n,objectIdField:i}=this._queryEngine,s=K(e,{geometryType:t,hasZ:n,objectIdField:i});if(!M(this._queryEngine.spatialReference,_))for(const o of s)o.geometry!=null&&(o.geometry=z(b(H(o.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),_,this._queryEngine.spatialReference)));return s}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions,i=(await N(t??"",{responseType:"json",query:{...n},signal:e})).data;return Y(i),i}_normalizeFeatures(e,t){const{objectIdField:n,fieldsIndex:i}=this._queryEngine,s=[];for(const o of e){const d=this._createDefaultAttributes(),p=T(i,d,o.attributes,!0);p?t==null||t.push(p):(this._assignObjectId(d,o.attributes,!0),o.attributes=d,o.objectId=d[n],s.push(o))}return s}async _applyEdits(e){const{adds:t,updates:n,deletes:i}=e,s={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t!=null&&t.length&&this._applyAddEdits(s,t),n!=null&&n.length&&this._applyUpdateEdits(s,n),i==null?void 0:i.length){for(const p of i)s.deleteResults.push(w(p));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:o,timeExtent:d}=await this._queryEngine.fetchRecomputedExtents();return{extent:o,timeExtent:d,featureEditResults:s}}_applyAddEdits(e,t){const{addResults:n}=e,{geometryType:i,hasM:s,hasZ:o,objectIdField:d,spatialReference:p,featureStore:m,fieldsIndex:h}=this._queryEngine,r=[];for(const l of t){if(l.geometry&&i!==O(l.geometry)){n.push(F("Incorrect geometry type."));continue}const u=this._createDefaultAttributes(),y=T(h,u,l.attributes);if(y)n.push(y);else{if(this._assignObjectId(u,l.attributes),l.attributes=u,l.uid!=null){const c=l.attributes[d];e.uidToObjectId[l.uid]=c}if(l.geometry!=null){const c=l.geometry.spatialReference??p;l.geometry=b(k(l.geometry,c),c,p)}r.push(l),n.push(w(l.attributes[d]))}}m.addMany(J([],r,i,o,s,d))}_applyUpdateEdits({updateResults:e},t){const{geometryType:n,hasM:i,hasZ:s,objectIdField:o,spatialReference:d,featureStore:p,fieldsIndex:m}=this._queryEngine;for(const h of t){const{attributes:r,geometry:l}=h,u=r==null?void 0:r[o];if(u==null){e.push(F(`Identifier field ${o} missing`));continue}if(!p.has(u)){e.push(F(`Feature with object id ${u} missing`));continue}const y=U(p.getFeature(u),n,s,i);if(l!=null){if(n!==O(l)){e.push(F("Incorrect geometry type."));continue}const c=l.spatialReference??d;y.geometry=b(k(l,c),c,d)}if(r){const c=T(m,y.attributes,r);if(c){e.push(c);continue}}p.add(B(y,n,s,i,o)),e.push(w(u))}}_createObjectIdGenerator(e,t){const n=e.fieldsIndex.get(e.objectIdField);if(n.type==="esriFieldTypeString")return()=>n.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const s of t)s.objectId&&(i=Math.max(i,s.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(e,t,n=!1){const i=this._queryEngine.objectIdField;e[i]=n&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await E(_,e)}catch{throw new I("geojson-layer","Projection not supported")}}}export{Ce as default}; diff --git a/build/assets/GeoRSSLayer-BIhNdXpJ.js b/build/assets/GeoRSSLayer-BIhNdXpJ.js new file mode 100644 index 0000000..8c438e1 --- /dev/null +++ b/build/assets/GeoRSSLayer-BIhNdXpJ.js @@ -0,0 +1 @@ +import{cq as y,cr as p,cs as c,ct as u,cu as d,cv as h,j as S,aK as m,U as g,ac as v,N as f,B as o,D as s,aS as b,aZ as C,cw as G,cx as w,cy as x,E as P,cz as n,cA as _,cB as R,cC as j,cD as k,cE as E}from"./index-DKOmzAMm.js";const $=["atom","xml"],F={base:n,key:"type",typeMap:{"simple-line":_},errorContext:"symbol"},D={base:n,key:"type",typeMap:{"picture-marker":R,"simple-marker":j},errorContext:"symbol"},M={base:n,key:"type",typeMap:{"simple-fill":k},errorContext:"symbol"};let t=class extends y(p(c(u(d(h(E)))))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.legendEnabled=!0,this.lineSymbol=null,this.pointSymbol=null,this.polygonSymbol=null,this.operationalLayerType="GeoRSS",this.url=null,this.type="geo-rss"}normalizeCtorArgs(e,r){return typeof e=="string"?{url:e,...r}:e}readFeatureCollections(e,r){return r.featureCollection.layers.forEach(i=>{var a;const l=i.layerDefinition.drawingInfo.renderer.symbol;l&&l.type==="esriSFS"&&((a=l.outline)!=null&&a.style.includes("esriSFS"))&&(l.outline.style="esriSLSSolid")}),r.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const e=this._get("title");return e&&this.originOf("title")!=="defaults"?e:this.url?S(this.url,$)||"GeoRSS":e}set title(e){this._set("title",e)}load(e){const r=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},e).catch(m).then(()=>this._fetchService(r)).then(i=>{this.read(i,{origin:"service"})})),Promise.resolve(this)}async hasDataChanged(){const e=await this._fetchService();return this.read(e,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(e){const r=this.spatialReference,{data:i}=await g(f.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:v(r)?void 0:r.wkid??JSON.stringify(r)},signal:e});return i}_hasGeometry(e){var r;return((r=this.featureCollections)==null?void 0:r.some(i=>{var l,a;return((l=i.featureSet)==null?void 0:l.geometryType)===e&&((a=i.featureSet.features)==null?void 0:a.length)>0}))??!1}};o([s()],t.prototype,"description",void 0),o([s()],t.prototype,"featureCollections",void 0),o([b("service","featureCollections",["featureCollection.layers"])],t.prototype,"readFeatureCollections",null),o([s({type:C,json:{name:"lookAtExtent"}})],t.prototype,"fullExtent",void 0),o([s(G)],t.prototype,"id",void 0),o([s(w)],t.prototype,"legendEnabled",void 0),o([s({types:F,json:{write:!0}})],t.prototype,"lineSymbol",void 0),o([s({type:["show","hide"]})],t.prototype,"listMode",void 0),o([s({types:D,json:{write:!0}})],t.prototype,"pointSymbol",void 0),o([s({types:M,json:{write:!0}})],t.prototype,"polygonSymbol",void 0),o([s({type:["GeoRSS"]})],t.prototype,"operationalLayerType",void 0),o([s(x)],t.prototype,"url",void 0),o([s({json:{origins:{service:{read:{source:"name",reader:e=>e||void 0}}}}})],t.prototype,"title",null),o([s({readOnly:!0,json:{read:!1},value:"geo-rss"})],t.prototype,"type",void 0),t=o([P("esri.layers.GeoRSSLayer")],t);const T=t;export{T as default}; diff --git a/build/assets/GeometryUtils-6Cd4d7Hy.js b/build/assets/GeometryUtils-6Cd4d7Hy.js new file mode 100644 index 0000000..fd6e13c --- /dev/null +++ b/build/assets/GeometryUtils-6Cd4d7Hy.js @@ -0,0 +1 @@ +import{g6 as $i}from"./index-DKOmzAMm.js";const Yi=512,Ji=29,Xi=24;var N;(function(i){i[i.FilterFlags=0]="FilterFlags",i[i.Animation=1]="Animation",i[i.GPGPU=2]="GPGPU",i[i.VV=3]="VV",i[i.DD0=4]="DD0",i[i.DD1=5]="DD1",i[i.DD2=6]="DD2"})(N||(N={}));const Zi=1.05,Ki=2,Qi=10,ji=256,it=32,tt=512;var D,v,O,A,E,w,F,I,$,W,b,U,k,H,G,q,V,z,Y,J,X,Z,K,Q,j,ii,ti,ni,si,ei,hi,ri,oi,li,ai,ui,ci,_i,xi,yi,fi,di,pi,mi,gi,Ti,Pi,Ci,Si,Ri,Mi,Li,Bi,Ni,Di,vi,Oi,Ai,Ei,wi,Fi;(function(i){i[i.BUTT=0]="BUTT",i[i.ROUND=1]="ROUND",i[i.SQUARE=2]="SQUARE",i[i.UNKNOWN=4]="UNKNOWN"})(D||(D={})),function(i){i[i.BEVEL=0]="BEVEL",i[i.ROUND=1]="ROUND",i[i.MITER=2]="MITER",i[i.UNKNOWN=4]="UNKNOWN"}(v||(v={})),function(i){i[i.SCREEN=0]="SCREEN",i[i.MAP=1]="MAP"}(O||(O={})),function(i){i[i.Tint=0]="Tint",i[i.Ignore=1]="Ignore",i[i.Multiply=99]="Multiply"}(A||(A={})),function(i){i.Both="Both",i.JustBegin="JustBegin",i.JustEnd="JustEnd",i.None="None"}(E||(E={})),function(i){i[i.Mosaic=0]="Mosaic",i[i.Centered=1]="Centered"}(w||(w={})),function(i){i[i.Normal=0]="Normal",i[i.Superscript=1]="Superscript",i[i.Subscript=2]="Subscript"}(F||(F={})),function(i){i[i.MSSymbol=0]="MSSymbol",i[i.Unicode=1]="Unicode"}(I||(I={})),function(i){i[i.Unspecified=0]="Unspecified",i[i.TrueType=1]="TrueType",i[i.PSOpenType=2]="PSOpenType",i[i.TTOpenType=3]="TTOpenType",i[i.Type1=4]="Type1"}($||($={})),function(i){i[i.Display=0]="Display",i[i.Map=1]="Map"}(W||(W={})),function(i){i.None="None",i.Loop="Loop",i.Oscillate="Oscillate"}(b||(b={})),function(i){i[i.Z=0]="Z",i[i.X=1]="X",i[i.Y=2]="Y"}(U||(U={})),function(i){i[i.XYZ=0]="XYZ",i[i.ZXY=1]="ZXY",i[i.YXZ=2]="YXZ"}(k||(k={})),function(i){i[i.Rectangle=0]="Rectangle",i[i.RoundedRectangle=1]="RoundedRectangle",i[i.Oval=2]="Oval"}(H||(H={})),function(i){i[i.None=0]="None",i[i.Alpha=1]="Alpha",i[i.Screen=2]="Screen",i[i.Multiply=3]="Multiply",i[i.Add=4]="Add"}(G||(G={})),function(i){i[i.TTB=0]="TTB",i[i.RTL=1]="RTL",i[i.BTT=2]="BTT"}(q||(q={})),function(i){i[i.None=0]="None",i[i.SignPost=1]="SignPost",i[i.FaceNearPlane=2]="FaceNearPlane"}(V||(V={})),function(i){i[i.Float=0]="Float",i[i.String=1]="String",i[i.Boolean=2]="Boolean"}(z||(z={})),function(i){i[i.Intersect=0]="Intersect",i[i.Subtract=1]="Subtract"}(Y||(Y={})),function(i){i.OpenEnded="OpenEnded",i.Block="Block",i.Crossed="Crossed"}(J||(J={})),function(i){i.FullGeometry="FullGeometry",i.PerpendicularFromFirstSegment="PerpendicularFromFirstSegment",i.ReversedFirstSegment="ReversedFirstSegment",i.PerpendicularToSecondSegment="PerpendicularToSecondSegment",i.SecondSegmentWithTicks="SecondSegmentWithTicks",i.DoublePerpendicular="DoublePerpendicular",i.OppositeToFirstSegment="OppositeToFirstSegment",i.TriplePerpendicular="TriplePerpendicular",i.HalfCircleFirstSegment="HalfCircleFirstSegment",i.HalfCircleSecondSegment="HalfCircleSecondSegment",i.HalfCircleExtended="HalfCircleExtended",i.OpenCircle="OpenCircle",i.CoverageEdgesWithTicks="CoverageEdgesWithTicks",i.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks",i.GapExtentMidline="GapExtentMidline",i.Chevron="Chevron",i.PerpendicularWithArc="PerpendicularWithArc",i.ClosedHalfCircle="ClosedHalfCircle",i.TripleParallelExtended="TripleParallelExtended",i.ParallelWithTicks="ParallelWithTicks",i.Parallel="Parallel",i.PerpendicularToFirstSegment="PerpendicularToFirstSegment",i.ParallelOffset="ParallelOffset",i.OffsetOpposite="OffsetOpposite",i.OffsetSame="OffsetSame",i.CircleWithArc="CircleWithArc",i.DoubleJog="DoubleJog",i.PerpendicularOffset="PerpendicularOffset",i.LineExcludingLastSegment="LineExcludingLastSegment",i.MultivertexArrow="MultivertexArrow",i.CrossedArrow="CrossedArrow",i.ChevronArrow="ChevronArrow",i.ChevronArrowOffset="ChevronArrowOffset",i.PartialFirstSegment="PartialFirstSegment",i.Arch="Arch",i.CurvedParallelTicks="CurvedParallelTicks",i.Arc90Degrees="Arc90Degrees",i.TipWithPerpendicularAndTicks="TipWithPerpendicularAndTicks"}(X||(X={})),function(i){i.Mitered="Mitered",i.Bevelled="Bevelled",i.Rounded="Rounded",i.Square="Square",i.TrueBuffer="TrueBuffer"}(Z||(Z={})),function(i){i.ClosePath="ClosePath",i.ConvexHull="ConvexHull",i.RectangularBox="RectangularBox"}(K||(K={})),function(i){i.BeginningOfLine="BeginningOfLine",i.EndOfLine="EndOfLine"}(Q||(Q={})),function(i){i.Mitered="Mitered",i.Bevelled="Bevelled",i.Rounded="Rounded",i.Square="Square"}(j||(j={})),function(i){i.Fast="Fast",i.Accurate="Accurate"}(ii||(ii={})),function(i){i.BeginningOfLine="BeginningOfLine",i.EndOfLine="EndOfLine"}(ti||(ti={})),function(i){i.Sinus="Sinus",i.Square="Square",i.Triangle="Triangle",i.Random="Random"}(ni||(ni={})),function(i){i[i.None=0]="None",i[i.Default=1]="Default",i[i.Force=2]="Force"}(si||(si={})),function(i){i[i.Buffered=0]="Buffered",i[i.Left=1]="Left",i[i.Right=2]="Right",i[i.AlongLine=3]="AlongLine"}(ei||(ei={})),function(i){i[i.Linear=0]="Linear",i[i.Rectangular=1]="Rectangular",i[i.Circular=2]="Circular",i[i.Buffered=3]="Buffered"}(hi||(hi={})),function(i){i[i.Discrete=0]="Discrete",i[i.Continuous=1]="Continuous"}(ri||(ri={})),function(i){i[i.AcrossLine=0]="AcrossLine",i[i.AloneLine=1]="AloneLine"}(oi||(oi={})),function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.Center=2]="Center",i[i.Justify=3]="Justify"}(li||(li={})),function(i){i[i.Base=0]="Base",i[i.MidPoint=1]="MidPoint",i[i.ThreePoint=2]="ThreePoint",i[i.FourPoint=3]="FourPoint",i[i.Underline=4]="Underline",i[i.CircularCW=5]="CircularCW",i[i.CircularCCW=6]="CircularCCW"}(ai||(ai={})),function(i){i.Butt="Butt",i.Round="Round",i.Square="Square"}(ui||(ui={})),function(i){i.NoConstraint="NoConstraint",i.HalfPattern="HalfPattern",i.HalfGap="HalfGap",i.FullPattern="FullPattern",i.FullGap="FullGap",i.Custom="Custom"}(ci||(ci={})),function(i){i[i.None=-1]="None",i[i.Custom=0]="Custom",i[i.Circle=1]="Circle",i[i.OpenArrow=2]="OpenArrow",i[i.ClosedArrow=3]="ClosedArrow",i[i.Diamond=4]="Diamond"}(_i||(_i={})),function(i){i[i.ExtraLeading=0]="ExtraLeading",i[i.Multiple=1]="Multiple",i[i.Exact=2]="Exact"}(xi||(xi={})),function(i){i.Bevel="Bevel",i.Round="Round",i.Miter="Miter"}(yi||(yi={})),function(i){i[i.Default=0]="Default",i[i.String=1]="String",i[i.Numeric=2]="Numeric"}(fi||(fi={})),function(i){i[i.InsidePolygon=0]="InsidePolygon",i[i.PolygonCenter=1]="PolygonCenter",i[i.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"}(di||(di={})),function(i){i[i.Tint=0]="Tint",i[i.Replace=1]="Replace",i[i.Multiply=2]="Multiply"}(pi||(pi={})),function(i){i[i.ClipAtBoundary=0]="ClipAtBoundary",i[i.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary",i[i.DoNotTouchBoundary=2]="DoNotTouchBoundary",i[i.DoNotClip=3]="DoNotClip"}(mi||(mi={})),function(i){i.NoConstraint="NoConstraint",i.WithMarkers="WithMarkers",i.WithFullGap="WithFullGap",i.WithHalfGap="WithHalfGap",i.Custom="Custom"}(gi||(gi={})),function(i){i.Fixed="Fixed",i.Random="Random",i.RandomFixedQuantity="RandomFixedQuantity"}(Ti||(Ti={})),function(i){i.LineMiddle="LineMiddle",i.LineBeginning="LineBeginning",i.LineEnd="LineEnd",i.SegmentMidpoint="SegmentMidpoint"}(Pi||(Pi={})),function(i){i.OnPolygon="OnPolygon",i.CenterOfMass="CenterOfMass",i.BoundingBoxCenter="BoundingBoxCenter"}(Ci||(Ci={})),function(i){i[i.Low=0]="Low",i[i.Medium=1]="Medium",i[i.High=2]="High"}(Si||(Si={})),function(i){i[i.MarkerCenter=0]="MarkerCenter",i[i.MarkerBounds=1]="MarkerBounds"}(Ri||(Ri={})),function(i){i[i.None=0]="None",i[i.PropUniform=1]="PropUniform",i[i.PropNonuniform=2]="PropNonuniform",i[i.DifUniform=3]="DifUniform",i[i.DifNonuniform=4]="DifNonuniform"}(Mi||(Mi={})),function(i){i.Tube="Tube",i.Strip="Strip",i.Wall="Wall"}(Li||(Li={})),function(i){i[i.Random=0]="Random",i[i.Increasing=1]="Increasing",i[i.Decreasing=2]="Decreasing",i[i.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"}(Bi||(Bi={})),function(i){i[i.Relative=0]="Relative",i[i.Absolute=1]="Absolute"}(Ni||(Ni={})),function(i){i[i.Normal=0]="Normal",i[i.LowerCase=1]="LowerCase",i[i.Allcaps=2]="Allcaps"}(Di||(Di={})),function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"}(vi||(vi={})),function(i){i.Draft="Draft",i.Picture="Picture",i.Text="Text"}(Oi||(Oi={})),function(i){i[i.Top=0]="Top",i[i.Center=1]="Center",i[i.Baseline=2]="Baseline",i[i.Bottom=3]="Bottom"}(Ai||(Ai={})),function(i){i[i.Right=0]="Right",i[i.Upright=1]="Upright"}(Ei||(Ei={})),function(i){i[i.Small=0]="Small",i[i.Medium=1]="Medium",i[i.Large=2]="Large"}(wi||(wi={})),function(i){i[i.Calm=0]="Calm",i[i.Rippled=1]="Rippled",i[i.Slight=2]="Slight",i[i.Moderate=3]="Moderate"}(Fi||(Fi={}));const Wi=512;var T,p;(function(i){i[i.Unknown=0]="Unknown",i[i.Point=1]="Point",i[i.LineString=2]="LineString",i[i.Polygon=3]="Polygon"})(T||(T={}));let m=class L{constructor(t,n){this.x=t,this.y=n}clone(){return new L(this.x,this.y)}equals(t,n){return t===this.x&&n===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,n){return this.x=t,this.y=n,this}normalize(){const t=this.x,n=this.y,s=Math.sqrt(t*t+n*n);return this.x/=s,this.y/=s,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,n){return this.x+=t,this.y+=n,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this}assignSub(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this}rotate(t,n){const s=this.x,e=this.y;return this.x=s*t-e*n,this.y=s*n+e*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){const t=this.x,n=this.y;return Math.sqrt(t*t+n*n)}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,n){const s=n.x-t.x,e=n.y-t.y;return Math.sqrt(s*s+e*e)}static add(t,n){return new L(t.x+n.x,t.y+n.y)}static sub(t,n){return new L(t.x-n.x,t.y-n.y)}};class R{constructor(t,n,s){this.ratio=t,this.x=n,this.y=s}}let nt=class{constructor(t,n,s,e=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=e,this._pixelMargin=r,this._tileSize=Wi*e,this._dz=t,this._yPos=n,this._xPos=s}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;n>s&&(n=s),this._margin=n,this._xmin=s*this._xPos-n,this._ymin=s*this._yPos-n,this._xmax=this._xmin+s+2*n,this._ymax=this._ymin+s+2*n}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,n){this._pushLine(),this._prevIsIn=this._isIn(t,n),this._moveTo(t,n,this._prevIsIn),this._prevPt=new m(t,n),this._firstPt=new m(t,n),this._dist=0}lineTo(t,n){const s=this._isIn(t,n),e=new m(t,n),r=m.distance(this._prevPt,e);let h,l,o,a,g,y,_,d;if(s)this._prevIsIn?this._lineTo(t,n,!0):(h=this._prevPt,l=e,o=this._intersect(l,h),this._start=this._dist+r*(1-this._r),this._lineTo(o.x,o.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,h=e,o=this._intersect(l,h),this._lineTo(o.x,o.y,!0),this._lineTo(h.x,h.y,!1);else{const u=this._prevPt,c=e;if(u.x<=this._xmin&&c.x<=this._xmin||u.x>=this._xmax&&c.x>=this._xmax||u.y<=this._ymin&&c.y<=this._ymin||u.y>=this._ymax&&c.y>=this._ymax)this._lineTo(c.x,c.y,!1);else{const f=[];if((u.xthis._xmin||u.x>this._xmin&&c.x=this._ymax?y=!0:f.push(new R(a,this._xmin,d))),(u.xthis._xmax||u.x>this._xmax&&c.x=this._ymax?y=!0:f.push(new R(a,this._xmax,d))),(u.ythis._ymin||u.y>this._ymin&&c.y=this._xmax?g=!0:f.push(new R(a,_,this._ymin))),(u.ythis._ymax||u.y>this._ymax&&c.y=this._xmax?g=!0:f.push(new R(a,_,this._ymax))),f.length===0)g?y?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):y?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(f.length>1&&f[0].ratio>f[1].ratio)this._start=this._dist+r*f[1].ratio,this._lineTo(f[1].x,f[1].y,!0),this._lineTo(f[0].x,f[0].y,!0);else{this._start=this._dist+r*f[0].ratio;for(let x=0;x2){const t=this._firstPt,n=this._prevPt;t.x===n.x&&t.y===n.y||this.lineTo(t.x,t.y);const s=this._line;let e=s.length;for(;e>=4&&(s[0].x===s[1].x&&s[0].x===s[e-2].x||s[0].y===s[1].y&&s[0].y===s[e-2].y);)s.pop(),s[0].x=s[e-2].x,s[0].y=s[e-2].y,--e}}result(t=!0){return this._pushLine(),this._lines.length===0?null:(this._type===T.Polygon&&t&&bi.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==T.LineString)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,n=t.length;if(n===0)return null;const s=[];for(let e=0;e=this._xmin&&t<=this._xmax&&n>=this._ymin&&n<=this._ymax}_intersect(t,n){let s,e,r;if(n.x>=this._xmin&&n.x<=this._xmax)e=n.y<=this._ymin?this._ymin:this._ymax,r=(e-t.y)/(n.y-t.y),s=t.x+r*(n.x-t.x);else if(n.y>=this._ymin&&n.y<=this._ymax)s=n.x<=this._xmin?this._xmin:this._xmax,r=(s-t.x)/(n.x-t.x),e=t.y+r*(n.y-t.y);else{e=n.y<=this._ymin?this._ymin:this._ymax,s=n.x<=this._xmin?this._xmin:this._xmax;const h=(s-t.x)/(n.x-t.x),l=(e-t.y)/(n.y-t.y);h0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===T.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===T.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,n,s){this._type!==T.Polygon?s&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),n=Math.round((n-(this._ymin+this._margin))*this._finalRatio),this._line.push(new m(t,n))):(s||(tthis._xmax&&(t=this._xmax),nthis._ymax&&(n=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),n=Math.round((n-(this._ymin+this._margin))*this._finalRatio),this._line.push(new m(t,n)),this._isH=!1,this._isV=!1)}_lineTo(t,n,s){let e,r;if(this._type!==T.Polygon)if(s){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),n=Math.round((n-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(e=this._line[this._line.length-1],e.equals(t,n)))return;this._line.push(new m(t,n))}else this._line&&this._line.length>0&&this._pushLine();else if(s||(tthis._xmax&&(t=this._xmax),nthis._ymax&&(n=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),n=Math.round((n-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){e=this._line[this._line.length-1];const h=e.x===t,l=e.y===n;if(h&&l)return;this._isH&&h||this._isV&&l?(e.x=t,e.y=n,r=this._line[this._line.length-2],r.x===t&&r.y===n?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(r=this._line[this._line.length-2],this._isH=r.x===t,this._isV=r.y===n)):(this._isH=r.x===t,this._isV=r.y===n)):(this._line.push(new m(t,n)),this._isH=h,this._isV=l)}else this._line.push(new m(t,n))}};class et{setExtent(t){this._ratio=t===4096?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,n){this._line&&this._lines.push(this._line),this._line=[];const s=this._ratio;this._line.push(new m(t*s,n*s))}lineTo(t,n){const s=this._ratio;this._line.push(new m(t*s,n*s))}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),this._lines.length===0?null:this._lines}}(function(i){i[i.sideLeft=0]="sideLeft",i[i.sideRight=1]="sideRight",i[i.sideTop=2]="sideTop",i[i.sideBottom=3]="sideBottom"})(p||(p={}));let bi=class P{static simplify(t,n,s){if(!s)return;const e=-n,r=t+n,h=-n,l=t+n,o=[],a=[],g=s.length;for(let _=0;_u.y?(o.push(_),o.push(x),o.push(p.sideLeft),o.push(-1)):(a.push(_),a.push(x),a.push(p.sideLeft),a.push(-1))),c.x>=r&&(c.y=l&&(c.x>u.x?(o.push(_),o.push(x),o.push(p.sideBottom),o.push(-1)):(a.push(_),a.push(x),a.push(p.sideBottom),a.push(-1)))),c=u}if(o.length===0||a.length===0)return;P.fillParent(s,a,o),P.fillParent(s,o,a);const y=[];P.calcDeltas(y,a,o),P.calcDeltas(y,o,a),P.addDeltas(y,s)}static fillParent(t,n,s){const e=s.length,r=n.length;for(let h=0;h1&&e[h-2]===r?0:(e.push(r),P.calcDelta(r,s,n,e)+1)}static addDeltas(t,n){const s=t.length;let e=0;for(let r=0;re&&(e=h)}for(let r=0;ri>=t&&i<=n||i>=n&&i<=t,ht=Number.POSITIVE_INFINITY,B=Math.PI,rt=2*B,Ui=128/B,ki=256/360,ot=B/180,Hi=1/Math.LN2;function Ii(i,t){return(i%=t)>=0?i:i+t}function lt(i){return Ii(i*Ui,256)}function at(i){return Ii(i*ki,256)}function ut(i){return Math.log(i)*Hi}function ct(i,t,n){return i*(1-n)+t*n}const Gi=8,qi=14,Vi=16;function _t(i){return Gi+Math.max((i-qi)*Vi,0)}function xt(i,t,n){let s,e,r,h=0;for(const l of n){s=l.length;for(let o=1;ot!=r.y>t&&((r.x-e.x)*(t-e.y)-(r.y-e.y)*(i-e.x)>0?h++:h--)}return h!==0}function yt(i,t,n,s){let e,r,h,l;const o=s*s;for(const a of n){const g=a.length;if(!(g<2)){e=a[0].x,r=a[0].y;for(let y=1;yi.map(i=>d[i]); +import{B as n,D as y,E as v,a7 as g,V as h,fu as _,cE as L,bY as $,cq as I,cu as A,cs as S,ct as O,cv as x,dz as M,bx as u,c$ as V,S as E,aK as P,eJ as p,gw as C,d2 as f,aS as T,gW as R,bz as F,bA as m,_ as H}from"./index-DKOmzAMm.js";import{l as w}from"./CollectionFlattener-BmCRFqHz.js";import{t as G}from"./loadAll-Cm5pWAv4.js";import{a as j}from"./lazyLayerLoader-BkbwrjyD.js";import{r as B}from"./saveUtils-oCA1ZjYH.js";import{f as z}from"./writeUtils-VdcK5efY.js";function D(e){return new w({getCollections:()=>[e.tables,e.layers],getChildrenFunction:i=>{const s=[];return"tables"in i&&s.push(i.tables),"layers"in i&&s.push(i.layers),s},itemFilterFunction:i=>{const s=i.parent;return!!s&&"tables"in s&&s.tables.includes(i)}})}function c(e,i,s){let t,r;if(e)for(let o=0,l=e.length;o{let i=class extends e{constructor(...t){super(...t),this.layers=new g;const r=a=>{a.parent&&"remove"in a.parent&&a.parent.remove(a)},o=a=>{a.parent=this,this.layerAdded(a),a.type!=="elevation"&&a.type!=="base-elevation"||h.getLogger(this).error(`Layer 'title:${a.title}, id:${a.id}' of type '${a.type}' is not supported as an operational layer and will therefore be ignored.`)},l=a=>{a.parent=null,this.layerRemoved(a)};this.addHandles([this.layers.on("before-add",a=>{if(a.item===this)return a.preventDefault(),void h.getLogger(this).error("#add()","Cannot add layer to itself.");r(a.item)}),this.layers.on("after-add",a=>o(a.item)),this.layers.on("after-remove",a=>l(a.item))])}destroy(){const t=this.layers.toArray();for(const r of t)r.destroy();this.layers.destroy()}set layers(t){this._set("layers",_(t,this._get("layers")))}add(t,r){const o=this.layers;if(r=o.getNextIndex(r),t instanceof L){const l=t;l.parent===this?this.reorder(l,r):o.add(l,r)}else $(t)?t.then(l=>{this.destroyed||this.add(l,r)}):h.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(t,r){const o=this.layers;let l=o.getNextIndex(r);t.slice().forEach(a=>{a.parent!==this?(o.add(a,l),l+=1):this.reorder(a,l)})}findLayerById(t){return c(this.layers,"id",t)}findLayerByUid(t){return c(this.layers,"uid",t)}remove(t){return this.layers.remove(t)}removeMany(t){return this.layers.removeMany(t)}removeAll(){return this.layers.removeAll()}reorder(t,r){return this.layers.reorder(t,r)}layerAdded(t){}layerRemoved(t){}};return n([y()],i.prototype,"layers",null),i=n([v("esri.support.LayersMixin")],i),i};function b(e,i,s){if(e)for(let t=0,r=e.length;t{let i=class extends e{constructor(...s){super(...s),this.tables=new g,this.addHandles([this.tables.on("after-add",t=>{const r=t.item;r.parent&&r.parent!==this&&"tables"in r.parent&&r.parent.tables.remove(r),r.parent=this,r.type!=="feature"&&h.getLogger(this).error(`Layer 'title:${r.title}, id:${r.id}' of type '${r.type}' is not supported as a table and will therefore be ignored.`)}),this.tables.on("after-remove",t=>{t.item.parent=null})])}destroy(){const s=this.tables.toArray();for(const t of s)t.destroy();this.tables.destroy()}set tables(s){this._set("tables",_(s,this._get("tables")))}findTableById(s){return b(this.tables,"id",s)}findTableByUid(s){return b(this.tables,"uid",s)}};return n([y()],i.prototype,"tables",null),i=n([v("esri.support.TablesMixin")],i),i},U=Symbol("WebScene");let d=class extends I(A(S(O(N(k(x(L))))))){constructor(e){super(e),this.allLayers=new w({getCollections:()=>[this.layers],getChildrenFunction:i=>"layers"in i?i.layers:null}),this.allTables=D(this),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=M(async(i,s,t)=>{const{save:r,saveAs:o}=await H(()=>import("./groupLayerUtils-4Z2LmSaU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]));switch(i){case p.SAVE:return r(this,s);case p.SAVE_AS:return o(this,t,s)}})}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([u(()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&U in e},e=>{const i="prevent-adding-tables";this.removeHandles(i),e&&(this.tables.removeAll(),this.addHandles(F(()=>this.tables,"before-add",s=>{s.preventDefault(),h.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")}),i))},R),u(()=>this.visible,this._onVisibilityChange.bind(this),m)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}get sourceIsPortalItem(){return this.portalItem&&this.originIdOf("portalItem")===V.USER}_writeLayers(e,i,s,t){const r=[];if(!e)return r;e.forEach(o=>{const l=z(o,t.webmap?t.webmap.getLayerJSONFromResourceInfo(o):null,t);l!=null&&l.layerType&&r.push(l)}),i.layers=r}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,i,s){const{itemId:t,layerType:r}=i;if(r==="GroupLayer"&&t)return new E({id:t,portal:s==null?void 0:s.portal})}writePortalItem(e,i){e!=null&&e.id&&(i.itemId=e.id)}set visibilityMode(e){const i=this._get("visibilityMode")!==e;this._set("visibilityMode",e),i&&this._enforceVisibility(e,this.visible)}async beforeSave(){return B(this)}load(e){const i=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service"],layerModuleTypeMap:j},e).catch(s=>{if(P(s),this.sourceIsPortalItem)throw s});return this.addResolvingPromise(i),Promise.resolve(this)}async loadAll(){return G(this,e=>{e(this.layers,this.tables)})}async save(e){return this._debouncedSaveOperations(p.SAVE,e)}async saveAs(e,i){return this._debouncedSaveOperations(p.SAVE_AS,i,e)}layerAdded(e){e.visible&&this.visibilityMode==="exclusive"?this._turnOffOtherLayers(e):this.visibilityMode==="inherited"&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer read to Grouplayer: uid=${e.uid}`):this.addHandles(u(()=>e.visible,i=>this._onChildVisibilityChange(e,i),m),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach(i=>{i!==e&&(i.visible=!1)})}_enforceVisibility(e,i){if(!C(this).initialized)return;const s=this.layers;let t=s.find(r=>r.visible);switch(e){case"exclusive":s.length&&!t&&(t=s.at(0),t.visible=!0),this._turnOffOtherLayers(t);break;case"inherited":s.forEach(r=>{r.visible=i})}}_onVisibilityChange(e){this.visibilityMode==="inherited"&&this.layers.forEach(i=>{i.visible=e})}_onChildVisibilityChange(e,i){switch(this.visibilityMode){case"exclusive":i?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some(e=>e.visible)}};n([y({readOnly:!0,dependsOn:[]})],d.prototype,"allLayers",void 0),n([y({readOnly:!0})],d.prototype,"allTables",void 0),n([y({json:{read:!0,write:!0}})],d.prototype,"blendMode",void 0),n([y()],d.prototype,"fullExtent",void 0),n([y({readOnly:!0})],d.prototype,"sourceIsPortalItem",null),n([y({json:{read:!1,write:{ignoreOrigin:!0}}})],d.prototype,"layers",void 0),n([f("layers")],d.prototype,"_writeLayers",null),n([y({type:["GroupLayer"]})],d.prototype,"operationalLayerType",void 0),n([y({json:{origins:{"web-map":{read:!1,write:{overridePolicy(e,i,s){return{enabled:(e==null?void 0:e.type)==="Group Layer"&&(s==null?void 0:s.initiator)!==this}}}},"web-scene":{read:!1,write:!1}}}})],d.prototype,"portalItem",null),n([T("web-map","portalItem",["itemId"])],d.prototype,"readPortalItem",null),n([f("web-map","portalItem",{itemId:{type:String}})],d.prototype,"writePortalItem",null),n([y()],d.prototype,"spatialReference",void 0),n([y({json:{read:!1},readOnly:!0,value:"group"})],d.prototype,"type",void 0),n([y({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,i,s)=>{e!=="inherited"&&(i[s]=e)}}}}})],d.prototype,"visibilityMode",null),d=n([v("esri.layers.GroupLayer")],d);const Z=d;export{Z as default}; diff --git a/build/assets/I3SBinaryReader-BNZLVsC-.js b/build/assets/I3SBinaryReader-BNZLVsC-.js new file mode 100644 index 0000000..75de5c3 --- /dev/null +++ b/build/assets/I3SBinaryReader-BNZLVsC-.js @@ -0,0 +1,2 @@ +import{s as f,V as D,$ as S}from"./index-DKOmzAMm.js";import{e as U}from"./VertexAttribute-BlT9lbVY.js";const d=!0,m={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function L(t,e,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(t,r+m.identifierOffset,m.identifierLength)),version:e.getUint16(r+m.versionOffset,d),checksum:e.getUint32(r+m.checksumOffset,d)}}const w={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function k(t,e){return{sizeLo:t.getUint32(e+w.sizeLo,d),sizeHi:t.getUint32(e+w.sizeHi,d),minX:t.getFloat64(e+w.minX,d),minY:t.getFloat64(e+w.minY,d),minZ:t.getFloat64(e+w.minZ,d),maxX:t.getFloat64(e+w.maxX,d),maxY:t.getFloat64(e+w.maxY,d),maxZ:t.getFloat64(e+w.maxZ,d),errorX:t.getFloat64(e+w.errorX,d),errorY:t.getFloat64(e+w.errorY,d),errorZ:t.getFloat64(e+w.errorZ,d),count:t.getUint32(e+w.count,d),reserved:t.getUint32(e+w.reserved,d)}}function q(t){const e=new DataView(t,0);let r=0;const{identifier:c,version:o}=L(t,e,r);if(r+=m.byteCount,c!=="LEPCC ")throw new f("lepcc-decode-error","Bad identifier");if(o>1)throw new f("lepcc-decode-error","Unknown version");const n=k(e,r);if(r+=w.byteCount,n.sizeHi*2**32+n.sizeLo!==t.byteLength)throw new f("lepcc-decode-error","Bad size");const s=new Float64Array(3*n.count),a=[],i=[],u=[],l=[];if(r=I(t,r,a),r=I(t,r,i),r=I(t,r,u),r=I(t,r,l),r!==t.byteLength)throw new f("lepcc-decode-error","Bad length");let g=0,y=0;for(let b=0;b>6;let i=0;if(a===0)i=c.getUint32(1,d),e+=5;else if(a===1)i=c.getUint16(1,d),e+=3;else{if(a!==2)throw new f("lepcc-decode-error","Bad count type");i=c.getUint8(1),e+=2}if(s)throw new f("lepcc-decode-error","LUT not implemented");const u=Math.ceil(i*n/8),l=new Uint8Array(t,e,u);let g=0,y=0,b=0;const v=-1>>>32-n;for(let C=0;C>>=n,y-=n,y+n>32&&(g|=l[b-1]>>8-y)}return e+b}const h={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function V(t,e){return{sizeLo:t.getUint32(e+h.sizeLo,d),sizeHi:t.getUint32(e+h.sizeHi,d),count:t.getUint32(e+h.count,d),colorMapCount:t.getUint16(e+h.colorMapCount,d),lookupMethod:t.getUint8(e+h.lookupMethod),compressionMethod:t.getUint8(e+h.compressionMethod)}}function Y(t){const e=new DataView(t,0);let r=0;const{identifier:c,version:o}=L(t,e,r);if(r+=m.byteCount,c!=="ClusterRGB")throw new f("lepcc-decode-error","Bad identifier");if(o>1)throw new f("lepcc-decode-error","Unknown version");const n=V(e,r);if(r+=h.byteCount,n.sizeHi*2**32+n.sizeLo!==t.byteLength)throw new f("lepcc-decode-error","Bad size");if((n.lookupMethod===2||n.lookupMethod===1)&&n.compressionMethod===0){if(3*n.colorMapCount+n.count+r!==t.byteLength||n.colorMapCount>256)throw new f("lepcc-decode-error","Bad count");const s=new Uint8Array(t,r,3*n.colorMapCount),a=new Uint8Array(t,r+3*n.colorMapCount,n.count),i=new Uint8Array(3*n.count);for(let u=0;u1)throw new f("lepcc-decode-error","Unknown version");const n=$(e,r);if(r+=p.byteCount,n.sizeHi*2**32+n.sizeLo!==t.byteLength)throw new f("lepcc-decode-error","Bad size");const s=new Uint16Array(n.count);if(n.bitsPerPoint===8){if(n.count+r!==t.byteLength)throw new f("lepcc-decode-error","Bad size");const a=new Uint8Array(t,r,n.count);for(let i=0;iD.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function Z(t,e,r){let c="",o=0;for(;o=192&&n<224){if(o+1>=r)throw new f("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&n)<<6|63&t[e+o+1];c+=String.fromCharCode(s),o+=2}else if(n>=224&&n<240){if(o+2>=r)throw new f("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&n)<<12|(63&t[e+o+1])<<6|63&t[e+o+2];c+=String.fromCharCode(s),o+=3}else{if(!(n>=240&&n<248))throw new f("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(o+3>=r)throw new f("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&n)<<18|(63&t[e+o+1])<<12|(63&t[e+o+2])<<6|63&t[e+o+3];if(s>=65536){const a=55296+(s-65536>>10),i=56320+(1023&s);c+=String.fromCharCode(a,i)}else c+=String.fromCharCode(s);o+=4}}}return c}function B(t,e){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let c=0;for(let o=0;o{const o=c?Date.parse(c):null;return o==null||Number.isNaN(o)?null:o})}function T(t,e,r){const c=[];let o,n,s=0;for(n=0;n0){if(c.push(Z(r,s,o-1)),r[s+o-1]!==0)throw new f("string-array-error","Invalid string array: missing null termination.")}else c.push(null);s+=o}return c}function F(t,e){return new O[e.valueType](t,e.byteOffset,e.count*e.valuesPerElement)}function N(t,e){return new Uint8Array(t,e.byteOffset,e.byteCount)}function j(t,e,r){const c=e.header!=null?B(t,e.header):{byteOffset:0,byteCount:0,fields:{count:r}},o={header:c,byteOffset:c.byteCount,byteCount:0,entries:Object.create(null)};let n=c.byteCount;for(let s=0;snew DataView(t,0).getFloat32(e,!0),Float64:(t,e)=>new DataView(t,0).getFloat64(e,!0),UInt8:(t,e)=>new DataView(t,0).getUint8(e),Int8:(t,e)=>new DataView(t,0).getInt8(e),UInt16:(t,e)=>new DataView(t,0).getUint16(e,!0),Int16:(t,e)=>new DataView(t,0).getInt16(e,!0),UInt32:(t,e)=>new DataView(t,0).getUint32(e,!0),Int32:(t,e)=>new DataView(t,0).getInt32(e,!0)};function x(t){return O.hasOwnProperty(t)}function A(t){return x(t)?O[t].BYTES_PER_ELEMENT:0}export{K as I,q as c,F as l,J as w}; diff --git a/build/assets/I3SLayerDefinitions-CR4J5n7u.js b/build/assets/I3SLayerDefinitions-CR4J5n7u.js new file mode 100644 index 0000000..fc3f646 --- /dev/null +++ b/build/assets/I3SLayerDefinitions-CR4J5n7u.js @@ -0,0 +1 @@ +import{B as e,D as t,E as i,a$ as l,F as p}from"./index-DKOmzAMm.js";let y=class extends p{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};e([t({type:Number})],y.prototype,"nodesPerPage",void 0),e([t({type:Number})],y.prototype,"rootIndex",void 0),e([t({type:String})],y.prototype,"lodSelectionMetricType",void 0),y=e([i("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],y);let n=class extends p{constructor(){super(...arguments),this.factor=1}};e([t({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],n.prototype,"id",void 0),e([t({type:Number})],n.prototype,"factor",void 0),n=e([i("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],n);let a=class extends p{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};e([t({type:[Number]})],a.prototype,"baseColorFactor",void 0),e([t({type:n})],a.prototype,"baseColorTexture",void 0),e([t({type:n})],a.prototype,"metallicRoughnessTexture",void 0),e([t({type:Number})],a.prototype,"metallicFactor",void 0),e([t({type:Number})],a.prototype,"roughnessFactor",void 0),a=e([i("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],a);let o=class extends p{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};e([l({opaque:"opaque",mask:"mask",blend:"blend"})],o.prototype,"alphaMode",void 0),e([t({type:Number})],o.prototype,"alphaCutoff",void 0),e([t({type:Boolean})],o.prototype,"doubleSided",void 0),e([l({none:"none",back:"back",front:"front"})],o.prototype,"cullFace",void 0),e([t({type:n})],o.prototype,"normalTexture",void 0),e([t({type:n})],o.prototype,"occlusionTexture",void 0),e([t({type:n})],o.prototype,"emissiveTexture",void 0),e([t({type:[Number]})],o.prototype,"emissiveFactor",void 0),e([t({type:a})],o.prototype,"pbrMetallicRoughness",void 0),o=e([i("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],o);let u=class extends p{};e([t({type:String,json:{read:{source:["name","index"],reader:(v,f)=>v??`${f.index}`}}})],u.prototype,"name",void 0),e([l({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],u.prototype,"format",void 0),u=e([i("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],u);let c=class extends p{constructor(){super(...arguments),this.atlas=!1}};e([t({type:[u]})],c.prototype,"formats",void 0),e([t({type:Boolean})],c.prototype,"atlas",void 0),c=e([i("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],c);let s=class extends p{};e([l({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],s.prototype,"type",void 0),e([t({type:Number})],s.prototype,"component",void 0),s=e([i("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],s);let d=class extends p{};e([l({draco:"draco"})],d.prototype,"encoding",void 0),e([t({type:[String]})],d.prototype,"attributes",void 0),d=e([i("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],d);let r=class extends p{constructor(){super(...arguments),this.offset=0}};e([t({type:Number})],r.prototype,"offset",void 0),e([t({type:s})],r.prototype,"position",void 0),e([t({type:s})],r.prototype,"normal",void 0),e([t({type:s})],r.prototype,"uv0",void 0),e([t({type:s})],r.prototype,"color",void 0),e([t({type:s})],r.prototype,"uvRegion",void 0),e([t({type:s})],r.prototype,"featureId",void 0),e([t({type:s})],r.prototype,"faceRange",void 0),e([t({type:d})],r.prototype,"compressedAttributes",void 0),r=e([i("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],r);let m=class extends p{};e([l({triangle:"triangle"})],m.prototype,"topology",void 0),e([t()],m.prototype,"geometryBuffers",void 0),m=e([i("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],m);export{o as a,m,y as p,c as y}; diff --git a/build/assets/I3SUtil-7z-2YOel.js b/build/assets/I3SUtil-7z-2YOel.js new file mode 100644 index 0000000..09cd570 --- /dev/null +++ b/build/assets/I3SUtil-7z-2YOel.js @@ -0,0 +1 @@ +import{ay as O,gk as m,b3 as u,U as d,hf as g,hg as C}from"./index-DKOmzAMm.js";import"./mat4f64-CSKppSlJ.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./sphere-DoGSV0K5.js";import{I as P}from"./I3SBinaryReader-BNZLVsC-.js";import"./NormalAttribute.glsl-DMc-kXcx.js";import"./BindType-BmZEZMMh.js";import"./VertexAttribute-BlT9lbVY.js";import{I as $}from"./orientedBoundingBox-RPlI7sU4.js";function x(n,o,t,e){return{x:n,y:o,z:t,hasZ:t!=null,hasM:!1,spatialReference:e,type:"point"}}x(0,0,0,O.WGS84);var s;(function(n){n[n.INVISIBLE=0]="INVISIBLE",n[n.TRANSPARENT=1]="TRANSPARENT",n[n.OPAQUE=2]="OPAQUE"})(s||(s={}));function A(n,o=0){let t=0;for(let e=0;e<4;e++)t+=n[o+e]*D[e];return t}const D=[1/256,1/65536,1/16777216,1/4294967296];A(new Uint8ClampedArray([255,255,255,255]));var I;(function(n){n[n.Uniform=0]="Uniform",n[n.Varying=1]="Varying",n[n.COUNT=2]="COUNT"})(I||(I={}));var f,p;(function(n){n[n.Solid=0]="Solid",n[n.Sketch=1]="Sketch",n[n.Mixed=2]="Mixed",n[n.COUNT=3]="COUNT"})(f||(f={})),function(n){n[n.REGULAR=0]="REGULAR",n[n.SILHOUETTE=1]="SILHOUETTE"}(p||(p={}));function L(n){return{..._,...n,type:f.Solid}}const _={color:m(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:s.OPAQUE,hasSlicePlane:!1};m(0,0,0,.2),s.OPAQUE;u();var N;async function q(n,o,t,e,U,y,R,c){const E=[];for(const r of o)if(r&&U.includes(r.name)){const i=`${n}/nodes/${t}/attributes/${r.key}/0`;E.push({url:i,storageInfo:r})}const l=await Promise.allSettled(E.map(r=>d(r.url,{responseType:"array-buffer",query:{...R,token:y},signal:c==null?void 0:c.signal}).then(i=>P(r.storageInfo,i.data)))),S=[];for(const r of e){const i={};for(let a=0;ai.map(i=>d[i]); +import{$ as C,j0 as Qt,B as r,D as o,d2 as T,E as v,F as j,co as Se,Q as $,ay as se,ey as Qe,a_ as kt,j8 as oe,jg as be,jh as ot,aH as te,ji as lt,aS as M,aX as Ke,aZ as Ue,dh as ie,a$ as Wt,jj as Zt,dG as Tt,iv as Ve,V as we,da as At,aY as Kt,G as A,U as D,df as gt,cg as Fe,eq as Xt,cy as Yt,bE as ei,I as ti,s as I,dK as mt,bx as ii,a8 as ri,jk as si,gV as ni,cq as ai,ei as oi,cu as li,cs as ui,ct as pi,cr as ci,cG as mi,cF as di,cv as yi,dz as hi,aK as gi,el as fi,eJ as Ze,fb as wi,cx as Ri,er as vi,es as bi,cE as Si,_ as xi}from"./index-DKOmzAMm.js";import{N as S,n as ve,r as He,s as k,e as Ii,c as Fi,l as Di,d as Ti,u as dt,b as ji,v as Pi,w as yt,j as Ni,m as _i,k as Oi,p as Ci,B as $i,U as Ai,L as Vi,$ as Mi,f as Ji,t as Ei}from"./fetchRasterInfo-DWSe3scC.js";import{M as Vt,t as Mt,v as qi,O as Gi,Q as Li,S as zi,n as Ui,c as Jt,g as ht,s as Hi,L as Bi,j as _t,P as Qi,l as ki}from"./dataUtils-DYQC_Kql.js";import{t as Ot}from"./imageBitmapUtils-kF4U_Pyx.js";import{R as Ne}from"./normalizeUtils-DIcj7CYy.js";import{f as J,s as U,i as H}from"./utils-CF4bGKhW.js";import{s as Wi,c as Zi,b as Ki}from"./executeQueryJSON-CCbDrFwh.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./pbf-DwSF5Y_G.js";import"./AttachmentInfo-CQ7iJxR0.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./utils-BCmi3vQB.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";const Xi={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}},Yi=new Set(["u1","u2","u4","u8","s8","u16","s16"]),er={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},tr=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function Et(s){return tr.has(s.type)}function ft(s,i){var e;if(!s||!i)return C(s||i);const a=C(s);if(a.functionDefinition&&i.rasterFunctionDefinition){const t=i.rasterFunctionDefinition;(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=void 0),qt(a.functionDefinition.arguments,i),a.rasterFunctionDefinition=a.functionDefinition.toJSON()}else((e=i.functionName)==null?void 0:e.toLowerCase())!=="none"&&(Gt(a.functionArguments).Raster=i);return a}function qt(s,i){for(const a in s)a.toLowerCase()==="raster"&&(s[a].type==="RasterFunctionVariable"?(s[a]=i.rasterFunctionDefinition,s[a].type="RasterFunctionTemplate"):s[a].type==="RasterFunctionTemplate"&&qt(s[a].arguments,i))}function ne(s){const i=C(Xi[s.functionName+"Function"]),a=s.functionArguments;for(const e in a)e.toLowerCase()==="raster"?(i.arguments[e]=ne(a[e]),i.arguments[e].type="RasterFunctionTemplate"):e.toLowerCase()==="colormap"?(i.arguments[e].value=pr(a[e]),i.arguments.ColorSchemeType.value=0):i.arguments[e].value=a[e];return i}function ir(s,i){switch(i=i||{},s.type){case"raster-stretch":return nr(s,i);case"class-breaks":return ar(s,i);case"unique-value":return or(s,i);case"raster-colormap":return lr(s,i);case"vector-field":return rr(s,i);case"raster-shaded-relief":return sr(s,i);case"flow":throw new Error("Unsupported rendering rule.")}}function Gt(s){const i=(s==null?void 0:s.Raster)??(s==null?void 0:s.raster);return i&&i.declaredClass==="esri.layers.support.RasterFunction"?Gt(i.functionArguments):s}const Ee={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function rr(s,i){const a=new S;a.functionName="VectorFieldRenderer";const{dataType:e,bandNames:t}=i,n=e==="vector-uv";let l,u;if(t&&t.length===2){const w=t.map(R=>R.toLowerCase());l=w.indexOf("magnitude"),u=w.indexOf("direction")}l!==-1&&l!==null||(l=0,u=1);const p=s.rotationType==="arithmetic"?1:2,m=s.flowRepresentation==="flow-from"?0:1,c=s.visualVariables?s.visualVariables.find(w=>w.field==="Magnitude"):new Qt,d={magnitudeBandID:l,directionBandID:u,isUVComponents:n,referenceSystem:p,massFlowAngleRepresentation:m,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:er[s.style.toLowerCase().replace("-","_")],minimumMagnitude:c.minDataValue,maximumMagnitude:c.maxDataValue,minimumSymbolSize:c.minSize,maximumSymbolSize:c.maxSize};a.functionArguments=d;const h=ne(a);return i.convertToRFT?S.fromJSON({rasterFunctionDefinition:h}):a}function sr(s,i){const a=i.convertToRFT;if(i.dataType!=="elevation"&&(i.dataType!=="generic"||i.bandCount!==1||i.pixelType!=="s16"&&i.pixelType!=="s32"&&i.pixelType!=="f32"&&i.pixelType!=="f64"))return new S;const e=new S;e.functionName="Hillshade";const t=s.hillshadeType==="traditional"?0:1,n=s.scalingType==="none"?1:3,l={HillshadeType:t,SlopeType:n,ZFactor:s.zFactor};return t===0&&(l.Azimuth=s.azimuth,l.Altitude=s.altitude),n===3&&(l.PSPower=s.pixelSizePower,l.PSZFactor=s.pixelSizeFactor),e.functionArguments=l,e.variableName="Raster",s.colorRamp&&(e.functionName="ShadedRelief",a?l.ColorRamp=Vt(s.colorRamp):l.Colormap=Mt(s.colorRamp)),a?new S({rasterFunctionDefinition:ne(e)}):e}function nr(s,i){var u;const a=i.convertToRFT,e=new S;e.functionName="Stretch";const t=Ee[qi.toJSON(s.stretchType)],n="u8",l={StretchType:t,Statistics:ur(s.statistics??[]),DRA:s.dynamicRangeAdjustment,UseGamma:s.useGamma,Gamma:s.gamma,ComputeGamma:s.computeGamma};if(s.outputMin!=null&&(l.Min=s.outputMin),s.outputMax!=null&&(l.Max=s.outputMax),t===Ee.standardDeviation?(l.NumberOfStandardDeviations=s.numberOfStandardDeviations,e.outputPixelType=n):t===Ee.percentClip?(l.MinPercent=s.minPercent,l.MaxPercent=s.maxPercent,e.outputPixelType=n):t===Ee.minMax?e.outputPixelType=n:t===Ee.sigmoid&&(l.SigmoidStrengthLevel=s.sigmoidStrengthLevel),e.functionArguments=l,e.variableName="Raster",s.colorRamp){const p=s.colorRamp,m=new S;if(a)m.functionArguments={ColorRamp:Vt(p)};else{const c=Gi(p,!0);if(c)m.functionArguments={colorRampName:c};else if(!i.convertColorRampToColormap||p.type!=="algorithmic"&&p.type!=="multipart"){const d=s.colorRamp.toJSON();d.type==="algorithmic"?d.algorithm=d.algorithm||"esriCIELabAlgorithm":d.type==="multipart"&&((u=d.colorRamps)!=null&&u.length)&&d.colorRamps.forEach(h=>h.algorithm=h.algorithm||"esriCIELabAlgorithm"),m.functionArguments={colorRamp:d}}else m.functionArguments={Colormap:Mt(p)}}return m.variableName="Raster",m.functionName="Colormap",m.functionArguments.Raster=e,a?new S({rasterFunctionDefinition:ne(m)}):m}return a?new S({rasterFunctionDefinition:ne(e)}):e}function ar(s,i){const a=[],e=[],t=[],n=[],{pixelType:u,rasterAttributeTable:p}=i,m=p==null?null:p.features,c=Lt(p);if(c&&m&&Array.isArray(m)&&s.classBreakInfos){s.classBreakInfos.forEach((y,g)=>{var L;const b=(L=y.symbol)==null?void 0:L.color;let V;b!=null&&b.a&&y.minValue!=null&&y.maxValue!=null&&m.forEach(E=>{y.minValue!=null&&y.maxValue!=null&&(V=E.attributes[s.field],(V>=y.minValue&&V=y.minValue)&&n.push([E.attributes[c],b.r,b.g,b.b]))})});const R=u?ut(n,u):n,f=new S;return f.functionName="Colormap",f.functionArguments={},f.functionArguments.Colormap=R,f.variableName="Raster",i.convertToRFT?new S({rasterFunctionDefinition:ne(f)}):f}s.classBreakInfos.forEach((R,f)=>{if(R.minValue==null||R.maxValue==null)return;const y=R.symbol&&R.symbol.color;y!=null&&y.a?(f===0?a.push(R.minValue,R.maxValue+1e-4):a.push(R.minValue+1e-4,R.maxValue+1e-4),e.push(f),n.push([f,y.r,y.g,y.b])):t.push(R.minValue,R.maxValue)});const d=u?ut(n,u):n,h=new S;h.functionName="Remap",h.functionArguments={InputRanges:a,OutputValues:e,NoDataRanges:t},h.variableName="Raster";const w=new S;return w.functionName="Colormap",w.functionArguments={Colormap:d,Raster:h},i.convertToRFT?new S({rasterFunctionDefinition:ne(w)}):w}function ut(s,i){const a=Yi.has(i)?Li(i):null;return a&&s.push([Math.floor(a[0]-1),0,0,0],[Math.ceil(a[1]+1),0,0,0]),s}function Lt(s){if(s==null)return;const{fields:i}=s,a=i==null?void 0:i.find(e=>(e==null?void 0:e.name)&&e.name.toLowerCase()==="value");return a==null?void 0:a.name}function or(s,i){var d,h;const a=[],{pixelType:e,rasterAttributeTable:t}=i,n=t==null?null:t.features,l=Lt(t),u=(h=(d=s.defaultSymbol)==null?void 0:d.color)==null?void 0:h.toRgb(),p=s.uniqueValueInfos;if(p)if(n){if(l){const w=new Map;p.forEach(f=>{const y=f.value,g=Ct(f);y!=null&&(g!=null&&g.a)&&w.set(String(y),g.toRgb())});const R=s.field;R&&n.forEach(({attributes:f})=>{const y=String(f[R]),g=f[l],b=w.get(y);b?a.push([g,...b]):u&&a.push([g,...u])})}}else for(let w=0;wl.type==="fill"))==null?void 0:e.material)==null?void 0:t.color:(n=s.symbol)==null?void 0:n.color}function lr(s,i){const a=s.extractColormap();if(!a||a.length===0)return null;const{pixelType:e}=i,t=e?ut(a,e):a,n=new S;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=t,i.convertToRFT?new S({rasterFunctionDefinition:ne(n)}):n}function ur(s){const i=[];return s==null||s.forEach(a=>{const e=a;if(Array.isArray(e))i.push(e);else{if(e.min==null||e.max==null)return;const t=[e.min,e.max,e.avg||0,e.stddev||0];i.push(t)}}),i}function pr(s){const i=[],a=[];return s.forEach(e=>{i.push(e[0]),a.push(zi([...e.slice(1),255]))}),{type:"RasterColormap",values:i,colors:a}}let _=class extends j{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(i,a,e){this.layer.version<10.3||(a[e]=i)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(i,a,e){this.format&&this.format.toLowerCase().includes("jpg")&&i!=null&&(a[e]=i)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(i,a,e){this.format==="lerc"&&i!=null&&(a[e]=i)}get format(){var i;return((i=this.layer.renderer)==null?void 0:i.type)==="vector-field"?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(i,a,e){this.format==="lerc"&&this.layer.version>=10.5&&(a[e]=i)}get version(){const i=this.layer;return i.commitProperty("bandIds"),i.commitProperty("format"),i.commitProperty("compressionQuality"),i.commitProperty("compressionTolerance"),i.commitProperty("interpolation"),i.commitProperty("noData"),i.commitProperty("noDataInterpretation"),i.commitProperty("mosaicRule"),i.commitProperty("rasterFunction"),i.commitProperty("adjustAspectRatio"),i.commitProperty("pixelFilter"),i.commitProperty("definitionExpression"),i.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(i){this._set("version",i)}get mosaicRule(){const i=this.layer;let a=i.mosaicRule;const e=i.definitionExpression;return a?e&&e!==a.where&&(a=a.clone(),a.where=e):e&&(a=new k({where:e})),a}get rasterFunction(){var l,u;const i=this.layer;let{rasterFunction:a}=i;const e=i.pixelFilter,t=!i.format||i.format.includes("jpg")||i.format.includes("png");a=this._addResampleRasterFunction(a);const n=(l=i.multidimensionalSubset)==null?void 0:l.areaOfInterest;return n&&(a=cr(a,n)),t&&!e&&((u=i.renderer)==null?void 0:u.type)!=="vector-field"&&(a=this.combineRendererWithRenderingRule(a)),a}combineRendererWithRenderingRule(i){const a=this.layer,{rasterInfo:e,renderer:t}=a;return i=i||a.rasterFunction,!t||!Et(t)?i:ft(ir(t,{rasterAttributeTable:e.attributeTable,pixelType:e.pixelType,dataType:e.dataType,bandNames:e.bandInfos.map(({name:n})=>n),convertColorRampToColormap:a.version<10.6,convertToRFT:!!(i!=null&&i.rasterFunctionDefinition),bandCount:e.bandCount}),i)}_addResampleRasterFunction(i){var n;if(((n=this.layer.renderer)==null?void 0:n.type)!=="vector-field"||(i==null?void 0:i.functionName)==="Resample")return i;const a=this.layer.serviceDataType==="esriImageServiceDataTypeVector-UV"?7:10,e=this.layer.serviceRasterInfo.pixelSize;let t=new S({functionName:"Resample",functionArguments:{ResamplingType:a,InputCellSize:e}});return t=i!=null&&i.rasterFunctionDefinition?new S({rasterFunctionDefinition:ne(t)}):t,ft(t,i)}};function cr(s,i){const a=new S({functionName:"Clip",functionArguments:{ClippingGeometry:i.toJSON(),ClippingType:1}});return ft(a,s)}r([o()],_.prototype,"layer",void 0),r([o({json:{write:!0}})],_.prototype,"adjustAspectRatio",null),r([T("adjustAspectRatio")],_.prototype,"writeAdjustAspectRatio",null),r([o({json:{write:!0}})],_.prototype,"bandIds",null),r([o({json:{write:!0}})],_.prototype,"compression",void 0),r([o({json:{write:!0}})],_.prototype,"compressionQuality",null),r([T("compressionQuality")],_.prototype,"writeCompressionQuality",null),r([o({json:{write:!0}})],_.prototype,"compressionTolerance",null),r([T("compressionTolerance")],_.prototype,"writeCompressionTolerance",null),r([o({json:{write:!0}})],_.prototype,"format",null),r([o({type:String,json:{read:{reader:ve.read},write:{writer:ve.write}}})],_.prototype,"interpolation",null),r([o({json:{write:!0}})],_.prototype,"noData",null),r([o({type:String,json:{read:{reader:He.read},write:{writer:He.write}}})],_.prototype,"noDataInterpretation",null),r([o({json:{write:!0}})],_.prototype,"pixelType",void 0),r([o({json:{write:!0}})],_.prototype,"lercVersion",void 0),r([T("lercVersion")],_.prototype,"writeLercVersion",null),r([o({type:Number})],_.prototype,"version",null),r([o({json:{write:!0}})],_.prototype,"mosaicRule",null),r([o({json:{write:!0,name:"renderingRule"}})],_.prototype,"rasterFunction",null),_=r([v("esri.layers.support.ExportImageServiceParameters")],_);let he=class extends Se(j){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};r([o({type:$,json:{read:!0}})],he.prototype,"fromGeometry",void 0),r([o({type:$,json:{read:!0,write:!0}})],he.prototype,"toGeometry",void 0),r([o({json:{write:!0}})],he.prototype,"objectIds",void 0),r([o({type:String,json:{write:!0}})],he.prototype,"where",void 0),r([o({type:Number,json:{write:!0}})],he.prototype,"maxCount",void 0),he=r([v("esri.rest.support.FindImagesParameters")],he);const mr=he,zt=s=>{let i=class extends s{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return r([o({json:{write:!0}})],i.prototype,"make",void 0),r([o({json:{write:!0}})],i.prototype,"model",void 0),r([o({json:{write:!0}})],i.prototype,"focalLength",void 0),r([o({json:{write:!0}})],i.prototype,"pixelSize",void 0),r([o({json:{write:!0}})],i.prototype,"rows",void 0),r([o({json:{write:!0}})],i.prototype,"cols",void 0),i=r([v("esri.rest.support.CameraInfoMixin")],i),i};let K=class extends zt(j){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(i,a){a.acquisitionDate=i==null?void 0:i.getTime()}};r([o({json:{write:!0}})],K.prototype,"id",void 0),r([o({json:{name:"uri",write:!0}})],K.prototype,"referenceUri",void 0),r([o({type:Date,json:{write:!0}})],K.prototype,"acquisitionDate",void 0),r([T("acquisitionDate")],K.prototype,"writeAcquisitionDate",null),r([o({json:{write:!0}})],K.prototype,"cameraID",void 0),r([o({type:$,json:{write:!0}})],K.prototype,"center",void 0),r([o({type:$,json:{write:!0}})],K.prototype,"perspectiveCenter",void 0),r([o({json:{write:!0}})],K.prototype,"orientation",void 0),K=r([v("esri.rest.support.ImageInspectionInfo")],K);const dr=K;let Xe=class extends j{constructor(){super(...arguments),this.images=null}};r([o({type:[dr],json:{write:!0}})],Xe.prototype,"images",void 0),Xe=r([v("esri.rest.support.FindImagesResult")],Xe);const yr=Xe;var wt;let De=wt=class extends j{constructor(s){super(s),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new wt(C({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};r([o({type:[String],json:{name:"angleName",write:!0}})],De.prototype,"angleNames",void 0),r([o({type:$,json:{write:!0}})],De.prototype,"point",void 0),r([o({type:se,json:{write:!0}})],De.prototype,"spatialReference",void 0),r([o({type:Qe,json:{write:!0}})],De.prototype,"rasterId",void 0),De=wt=r([v("esri.rest.support.ImageAngleParameters")],De);const hr=De;let _e=class extends j{constructor(i){super(i),this.north=null,this.up=null,this.spatialReference=null}};r([o({type:Number,json:{write:!0}})],_e.prototype,"north",void 0),r([o({type:Number,json:{write:!0}})],_e.prototype,"up",void 0),r([o({type:se,json:{write:!0}})],_e.prototype,"spatialReference",void 0),_e=r([v("esri.rest.support.ImageAngleResult")],_e);const gr=_e,W=new kt({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let ee=class extends j{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};r([o()],ee.prototype,"type",void 0),r([o({type:W.apiValues,json:{read:W.read,write:W.write}})],ee.prototype,"measureOperation",void 0),r([o({type:k,json:{write:!0}})],ee.prototype,"mosaicRule",void 0),r([o({type:$,json:{write:!0}})],ee.prototype,"pixelSize",void 0),r([o({json:{write:!0}})],ee.prototype,"raster",void 0),ee=r([v("esri.rest.support.BaseImageMeasureParameters")],ee);var Rt;let ue=Rt=class extends ee{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=s.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Rt(C({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};r([o({types:oe,json:{name:"fromGeometry",read:!0,write:!0}})],ue.prototype,"geometry",void 0),r([T("geometry")],ue.prototype,"writeGeometry",null),r([o({type:W.apiValues,json:{write:W.write}})],ue.prototype,"measureOperation",null),r([o({json:{read:!0}})],ue.prototype,"is3D",void 0),r([o({type:String,json:{read:be.read,write:be.write}})],ue.prototype,"linearUnit",void 0),r([o({type:String,json:{read:ot.read,write:ot.write}})],ue.prototype,"areaUnit",void 0),ue=Rt=r([v("esri.rest.support.ImageAreaParameters")],ue);const fr=ue;let fe=class extends j{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};r([o({type:Number,json:{read:!0,write:!0}})],fe.prototype,"value",void 0),r([o({type:String,json:{read:!0,write:!0}})],fe.prototype,"displayValue",void 0),r([o({type:Number,json:{read:!0,write:!0}})],fe.prototype,"uncertainty",void 0),fe=r([v("esri.rest.support.BaseImageMeasureResult.BaseImageMeasureResultValue")],fe);let Me=class extends fe{constructor(){super(...arguments),this.unit=null}};r([o({type:String,json:{read:be.read,write:be.write}})],Me.prototype,"unit",void 0),Me=r([v("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultLengthValue")],Me);let Ye=class extends fe{constructor(){super(...arguments),this.unit=null}};r([o({type:String,json:{read:ot.read,write:ot.write}})],Ye.prototype,"unit",void 0),Ye=r([v("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultAreaValue")],Ye);let Be=class extends fe{constructor(){super(...arguments),this.unit=null}};r([o({type:String,json:{read:lt.read,write:lt.write}})],Be.prototype,"unit",void 0),Be=r([v("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultAngleValue")],Be);let Re=class extends j{constructor(){super(...arguments),this.name=null,this.sensorName=null}};r([o({type:String,json:{read:!0,write:!0}})],Re.prototype,"name",void 0),r([o({type:String,json:{read:!0,write:!0}})],Re.prototype,"sensorName",void 0),Re=r([v("esri.rest.support.BaseImageMeasureResult")],Re);let qe=class extends Re{constructor(){super(...arguments),this.area=null,this.perimeter=null}};r([o({type:Ye,json:{read:!0,write:!0}})],qe.prototype,"area",void 0),r([o({type:Me,json:{read:!0,write:!0}})],qe.prototype,"perimeter",void 0),qe=r([v("esri.rest.support.ImageAreaResult")],qe);const wr=qe;let et=class extends Se(j){constructor(){super(...arguments),this.outSpatialReference=null}};r([o({type:se,json:{name:"outSR",write:!0}})],et.prototype,"outSpatialReference",void 0),et=r([v("esri.rest.support.ImageBoundaryParameters")],et);const Rr=et;let Oe=class extends j{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(i,a){return i==null?null:i.rings?Ke.fromJSON(i):Ue.fromJSON(i)}};r([o({type:Number,json:{write:!0}})],Oe.prototype,"area",void 0),r([o({json:{name:"shape",write:!0}})],Oe.prototype,"geometry",void 0),r([M("geometry")],Oe.prototype,"readGeometry",null),Oe=r([v("esri.rest.support.ImageBoundaryResult")],Oe);const vr=Oe;var vt;let re=vt=class extends ee{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=s.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new vt(C({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};r([o({type:$,json:{read:!0,write:!0}})],re.prototype,"fromGeometry",void 0),r([T("fromGeometry")],re.prototype,"writeFromGeometry",null),r([o({type:$,json:{read:!0,write:!0}})],re.prototype,"toGeometry",void 0),r([o({type:W.apiValues,json:{write:W.write}})],re.prototype,"measureOperation",null),r([o({json:{read:!0}})],re.prototype,"is3D",void 0),r([o({type:String,json:{read:be.read,write:be.write}})],re.prototype,"linearUnit",void 0),r([o({type:String,json:{read:lt.read,write:lt.write}})],re.prototype,"angularUnit",void 0),re=vt=r([v("esri.rest.support.ImageDistanceParameters")],re);const br=re;let Ce=class extends Re{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};r([o({type:Me,json:{read:!0,write:!0}})],Ce.prototype,"distance",void 0),r([o({type:Be,json:{read:!0,write:!0}})],Ce.prototype,"azimuthAngle",void 0),r([o({type:Be,json:{read:!0,write:!0}})],Ce.prototype,"elevationAngle",void 0),Ce=r([v("esri.rest.support.ImageDistanceResult")],Ce);const Sr=Ce;let pe=class extends Se(j){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(i,a,e){i!=null&&(a.geometryType=te(i),a[e]=JSON.stringify(i.toJSON()))}};r([o({types:oe,json:{read:ie,write:!0}})],pe.prototype,"geometry",void 0),r([T("geometry")],pe.prototype,"writeGeometry",null),r([o({json:{write:!0}})],pe.prototype,"objectIds",void 0),r([Wt(Zt,{ignoreUnknown:!1,name:"spatialRel"})],pe.prototype,"spatialRelationship",void 0),r([o({type:Tt,json:{name:"time",write:!0}})],pe.prototype,"timeExtent",void 0),r([o({type:String,json:{write:!0}})],pe.prototype,"where",void 0),pe=r([v("esri.rest.support.ImageGPSInfoParameters")],pe);const xr=pe;let tt=class extends zt(j){constructor(){super(...arguments),this.id=null}};r([o({json:{write:!0}})],tt.prototype,"id",void 0),tt=r([v("esri.rest.support.CameraInfo")],tt);const Ir=tt;let X=class extends j{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(i,a){a.acquisitionDate=i==null?void 0:i.getTime()}};r([o({json:{write:!0}})],X.prototype,"id",void 0),r([o({json:{write:!0}})],X.prototype,"name",void 0),r([o({type:Date,json:{write:!0}})],X.prototype,"acquisitionDate",void 0),r([T("acquisitionDate")],X.prototype,"writeAcquisitionDate",null),r([o({json:{write:!0}})],X.prototype,"cameraID",void 0),r([o({type:$,json:{write:!0}})],X.prototype,"center",void 0),r([o({json:{write:!0}})],X.prototype,"gps",void 0),r([o({json:{write:!0}})],X.prototype,"orientation",void 0),X=r([v("esri.rest.support.ImageGPSInfo")],X);const Fr=X;let Ge=class extends j{constructor(){super(...arguments),this.images=null,this.cameras=null}};r([o({type:[Fr],json:{write:!0}})],Ge.prototype,"images",void 0),r([o({type:[Ir],json:{write:!0}})],Ge.prototype,"cameras",void 0),Ge=r([v("esri.rest.support.ImageGPSInfoResult")],Ge);const Dr=Ge;var bt;let ce=bt=class extends ee{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=s.toJSON())}get measureOperation(){return this.operationType}clone(){return new bt(C({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};r([o({type:$,json:{read:!0}})],ce.prototype,"fromGeometry",void 0),r([T("fromGeometry")],ce.prototype,"writeFromGeometry",null),r([o({type:$,json:{read:!0,write:!0}})],ce.prototype,"toGeometry",void 0),r([o({type:W.apiValues,json:{write:W.write}})],ce.prototype,"measureOperation",null),r([o({json:{read:!0}})],ce.prototype,"operationType",void 0),r([o({type:String,json:{read:be.read,write:be.write}})],ce.prototype,"linearUnit",void 0),ce=bt=r([v("esri.rest.support.ImageHeightParameters")],ce);const Tr=ce;let it=class extends Re{constructor(){super(...arguments),this.height=null}};r([o({type:Me,json:{read:!0,write:!0}})],it.prototype,"height",void 0),it=r([v("esri.rest.support.ImageHeightResult")],it);const jr=it;var St;let N=St=class extends j{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=JSON.stringify(s.toJSON()))}set mosaicRule(s){let i=s;i!=null&&i.mosaicMethod&&(i=k.fromJSON({...i.toJSON(),mosaicMethod:i.mosaicMethod,mosaicOperation:i.mosaicOperation})),this._set("mosaicRule",i)}writeMosaicRule(s,i,a){s!=null&&(i[a]=JSON.stringify(s.toJSON()))}get renderingRule(){return Ve(we.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(s){Ve(we.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",s)}get renderingRules(){return Ve(we.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(s){Ve(we.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",s)}set rasterFunction(s){let i=s;i!=null&&i.rasterFunction&&(i=S.fromJSON({...i.toJSON(),rasterFunction:i.rasterFunction,rasterFunctionArguments:i.rasterFunctionArguments})),this._set("rasterFunction",i)}writeRasterFunction(s,i,a){s!=null&&(i[a]=JSON.stringify(s.toJSON())),s.rasterFunctionDefinition&&(i[a]=JSON.stringify(s.rasterFunctionDefinition))}writeRasterFunctions(s,i,a){s!=null&&(i[a]=JSON.stringify(s.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(s,i,a){s!=null&&(i[a]=JSON.stringify(s))}writeTimeExtent(s,i,a){if(s!=null){const e=s.start!=null?s.start.getTime():null,t=s.end!=null?s.end.getTime():null;i[a]=e!=null?t!=null?`${e},${t}`:`${e}`:null}}clone(){return new St(C({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};r([o({json:{write:!0}})],N.prototype,"geometry",void 0),r([T("geometry")],N.prototype,"writeGeometry",null),r([o({type:k,json:{write:!0}})],N.prototype,"mosaicRule",null),r([T("mosaicRule")],N.prototype,"writeMosaicRule",null),r([o({type:S})],N.prototype,"renderingRule",null),r([o({type:[S]})],N.prototype,"renderingRules",null),r([o({type:S,json:{write:!0,name:"renderingRule"}})],N.prototype,"rasterFunction",null),r([T("rasterFunction")],N.prototype,"writeRasterFunction",null),r([o({type:[S],json:{write:!0,name:"renderingRules"}})],N.prototype,"rasterFunctions",void 0),r([T("rasterFunctions")],N.prototype,"writeRasterFunctions",null),r([o({type:$,json:{write:!0}})],N.prototype,"pixelSize",void 0),r([T("pixelSize")],N.prototype,"writePixelSize",null),r([o({type:Boolean,json:{write:!0}})],N.prototype,"returnGeometry",void 0),r([o({type:Boolean,json:{write:!0}})],N.prototype,"returnCatalogItems",void 0),r([o({type:Boolean,json:{write:!0}})],N.prototype,"returnPixelValues",void 0),r([o({type:Number,json:{write:!0}})],N.prototype,"maxItemCount",void 0),r([o({type:Tt,json:{write:{target:"time"}}})],N.prototype,"timeExtent",void 0),r([T("timeExtent")],N.prototype,"writeTimeExtent",null),r([o({json:{write:!0}})],N.prototype,"raster",void 0),r([o({json:{write:!0}})],N.prototype,"viewId",void 0),r([o({type:Boolean,json:{write:!0}})],N.prototype,"processAsMultidimensional",void 0),N=St=r([v("esri.rest.support.ImageIdentifyParameters")],N);const Ut=N;let Y=class extends j{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};r([o({json:{write:!0}})],Y.prototype,"catalogItemVisibilities",void 0),r([o({type:At,json:{write:!0}})],Y.prototype,"catalogItems",void 0),r([o({type:$,json:{write:!0}})],Y.prototype,"location",void 0),r([o({json:{write:!0}})],Y.prototype,"name",void 0),r([o({json:{write:!0}})],Y.prototype,"objectId",void 0),r([o({json:{write:!0}})],Y.prototype,"processedValues",void 0),r([o({json:{write:!0}})],Y.prototype,"properties",void 0),r([o({json:{write:!0}})],Y.prototype,"value",void 0),Y=r([v("esri.rest.support.ImageIdentifyResult")],Y);const Pr=Y;var xt;let $e=xt=class extends j{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(s,i,a){i.geometries={geometryType:"esriGeometryPoint",geometries:s.map(e=>e.toJSON())}}clone(){var s;return new xt({geometries:((s=this.geometries)==null?void 0:s.map(i=>i.clone()))??[],rasterId:this.rasterId})}};r([o({type:[$],json:{write:!0}})],$e.prototype,"geometries",void 0),r([T("geometries")],$e.prototype,"writeGeometry",null),r([o({type:Qe,json:{write:!0}})],$e.prototype,"rasterId",void 0),$e=xt=r([v("esri.rest.support.ImagePixelLocationParameters")],$e);const Nr=$e;let rt=class extends j{constructor(){super(...arguments),this.geometries=null}};r([o({json:{write:!0}})],rt.prototype,"geometries",void 0),rt=r([v("esri.rest.support.ImagePixelLocationResult")],rt);const _r=rt;var It;let Te=It=class extends ee{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=s.toJSON())}get measureOperation(){const{is3D:s,geometry:i}=this;return i.type==="point"?s?"point-3D":"point":s?"centroid-3D":"centroid"}clone(){return new It(C({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};r([o({types:oe,json:{name:"fromGeometry",read:ie}})],Te.prototype,"geometry",void 0),r([T("geometry")],Te.prototype,"writeGeometry",null),r([o({type:W.apiValues,json:{read:W.read,write:W.write}})],Te.prototype,"measureOperation",null),r([o({json:{read:!0}})],Te.prototype,"is3D",void 0),Te=It=r([v("esri.rest.support.ImagePointParameters")],Te);const Or=Te;let st=class extends Re{constructor(){super(...arguments),this.point=null}};r([o({type:$,json:{name:"point.value",read:!0,write:!0}})],st.prototype,"point",void 0),st=r([v("esri.rest.support.ImagePointResult")],st);const Cr=st;var Ft;let G=Ft=class extends j{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=s.toJSON())}set locations(s){if(s!=null&&s.length){const i=new Kt({spatialReference:s[0].spatialReference,points:s.map(({x:a,y:e})=>[a,e])});this._set("locations",s),this.geometry=i}}clone(){return new Ft(C({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};r([o({types:oe,json:{read:ie}})],G.prototype,"geometry",void 0),r([T("geometry")],G.prototype,"writeGeometry",null),r([o()],G.prototype,"locations",null),r([o({type:String,json:{type:ve.jsonValues,read:ve.read,write:ve.write}})],G.prototype,"interpolation",void 0),r([o({type:k,json:{write:!0}})],G.prototype,"mosaicRule",void 0),r([o({type:[String],json:{write:!0}})],G.prototype,"outFields",void 0),r([o({type:$,json:{write:!0}})],G.prototype,"pixelSize",void 0),r([o({type:String,json:{write:!0}})],G.prototype,"raster",void 0),r([o({type:Boolean,json:{write:!0}})],G.prototype,"returnFirstValueOnly",void 0),r([o({type:Number,json:{write:!0}})],G.prototype,"sampleDistance",void 0),r([o({type:Number,json:{write:!0}})],G.prototype,"sampleCount",void 0),r([o({type:Number,json:{write:!0}})],G.prototype,"sliceId",void 0),r([o({type:Tt,json:{read:{source:"time"},write:{target:"time"}}})],G.prototype,"timeExtent",void 0),G=Ft=r([v("esri.rest.support.ImageSampleParameters")],G);const $r=G;let me=class extends j{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};r([o({json:{write:!0}})],me.prototype,"attributes",void 0),r([o({type:$,json:{write:!0}})],me.prototype,"location",void 0),r([o({json:{write:!0}})],me.prototype,"locationId",void 0),r([o({json:{write:!0}})],me.prototype,"rasterId",void 0),r([o({json:{write:!0}})],me.prototype,"resolution",void 0),r([o({json:{write:!0}})],me.prototype,"pixelValue",void 0),me=r([v("esri.rest.support.ImageSample")],me);const Ar=me;let nt=class extends j{constructor(){super(...arguments),this.samples=null}};r([o({type:[Ar],json:{write:!0}})],nt.prototype,"samples",void 0),nt=r([v("esri.rest.support.ImageSampleResult")],nt);const Vr=nt;let je=class extends Se(j){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(i,a,e){a.geometries=i!=null&&i.length?{geometryType:te(i[0]),geometries:i.map(t=>({...t.toJSON(),spatialReference:void 0}))}:null}};r([o({types:[oe]})],je.prototype,"geometries",void 0),r([T("geometries")],je.prototype,"writeGeometries",null),r([o({type:[Qe],json:{write:!0}})],je.prototype,"rasterIds",void 0),r([o({type:se,json:{name:"outSR",write:!0}})],je.prototype,"outSpatialReference",void 0),je=r([v("esri.rest.support.ImageToMapMultirayParameters")],je);const Mr=je;let de=class extends Se(j){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(i,a,e){i!=null&&(a.geometryType=te(i),a[e]={...i.toJSON(),spatialReference:void 0})}};r([o({types:oe,json:{read:ie,write:!0}})],de.prototype,"geometry",void 0),r([T("geometry")],de.prototype,"writeGeometry",null),r([o({json:{write:!0}})],de.prototype,"rasterId",void 0),r([o({type:se,json:{name:"outSR",write:!0}})],de.prototype,"outSpatialReference",void 0),r([o({json:{name:"options.DOff",write:!0}})],de.prototype,"depthOffset",void 0),r([o({json:{name:"options.Adjust",write:!0}})],de.prototype,"adjust",void 0),de=r([v("esri.rest.support.ImageToMapParameters")],de);const Jr=de;let Le=class extends Se(j){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};r([o({type:String,json:{name:"uri",write:!0}})],Le.prototype,"referenceUri",void 0),r([o({type:Number,json:{write:!0}})],Le.prototype,"rasterId",void 0),Le=r([v("esri.rest.support.ImageUrlParameters")],Le);const Er=Le;let at=class extends j{constructor(){super(...arguments),this.url=null}};r([o({json:{name:"imageURL",write:!0}})],at.prototype,"url",void 0),at=r([v("esri.rest.support.ImageUrlResult")],at);const qr=at;let Pe=class extends Se(j){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]=JSON.stringify(s))}};r([o({types:oe,json:{read:ie,write:!0}})],Pe.prototype,"geometry",void 0),r([T("geometry")],Pe.prototype,"writeGeometry",null),r([o({json:{write:!0}})],Pe.prototype,"rasterId",void 0),r([o({json:{name:"options.VisibleOnly",write:!0}})],Pe.prototype,"visibleOnly",void 0),Pe=r([v("esri.rest.support.MapToImageParameters")],Pe);const Gr=Pe;let ge=class extends j{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(i,a){return i.spatialReference||(i={...i,spatialReference:a.Shape.spatialReference}),$.fromJSON(i)}};r([o({types:oe,json:{name:"Shape",read:ie,write:!0}})],ge.prototype,"geometry",void 0),r([o({json:{name:"Length",write:!0}})],ge.prototype,"length",void 0),r([o({json:{name:"Area",write:!0}})],ge.prototype,"area",void 0),r([o({json:{name:"Center",write:!0}})],ge.prototype,"center",void 0),r([M("center")],ge.prototype,"readCenter",null),ge=r([v("esri.rest.support.MeasureAreaFromImageResult")],ge);const Lr=ge;var Dt;let Ae=Dt=class extends j{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(s,i,a){s!=null&&(i.geometryType=te(s),i[a]={...s.toJSON(),spatialReference:void 0})}clone(){const s=C({geometry:this.geometry,rasterId:this.rasterId});return new Dt(s)}};r([o({types:oe,json:{name:"fromGeometry",read:ie,write:!0}})],Ae.prototype,"geometry",void 0),r([T("geometry")],Ae.prototype,"writeGeometry",null),r([o({json:{write:!0}})],Ae.prototype,"rasterId",void 0),Ae=Dt=r([v("esri.rest.support.MeasureFromImageParameters")],Ae);const zr=Ae;let ze=class extends j{constructor(){super(...arguments),this.geometry=null,this.length=null}};r([o({types:oe,json:{name:"Shape",read:ie,write:!0}})],ze.prototype,"geometry",void 0),r([o({json:{name:"Length",write:!0}})],ze.prototype,"length",void 0),ze=r([v("esri.rest.support.MeasureLengthFromImageResult")],ze);const Ur=ze;function jt(s){const i=s==null?void 0:s.time;if(i&&(i.start!=null||i.end!=null)){const a=[];i.start!=null&&a.push(i.start),i.end==null||a.includes(i.end)||a.push(i.end),s.time=a.join(",")}}async function Ht(s,i,a){i=A(Ii,i);const e=J(s),t=i.geometry?[i.geometry]:[],n=await Ne(t),l=i.toJSON();jt(l);const u=n==null?void 0:n[0];u!=null&&(l.geometry=ae(u));const p=U({...e.query,f:"json",...l});return H(p,a)}async function Hr(s,i,a){var p,m,c;const e=(i=A(hr,i)).toJSON();e.angleName!=null&&(e.angleName=e.angleName.join(",")),(m=(p=i==null?void 0:i.point)==null?void 0:p.spatialReference)!=null&&m.imageCoordinateSystem&&(e.point.spatialReference=ct(i.point.spatialReference)),(c=i==null?void 0:i.spatialReference)!=null&&c.imageCoordinateSystem&&(e.spatialReference=Je(i.spatialReference));const t=J(s),n=U({...t.query,f:"json",...e}),l=H(n,a),{data:u}=await D(`${t.path}/computeAngles`,l);return u.spatialReference=u.spatialReference?u.spatialReference.geodataXform!=null?new se({wkid:0,imageCoordinateSystem:u.spatialReference}):se.fromJSON(u.spatialReference):null,u.north==="NaN"&&(u.north=null),u.up==="NaN"&&(u.up=null),new gr(u)}async function Br(s,i,a){var m;const e=(i=A(Nr,i)).toJSON(),{geometries:t}=i;if(t)for(let c=0;c{u.avg=u.mean,u.stddev=u.standardDeviation}),{statistics:l,histograms:n.histograms}}async function kr(s,i,a){const e=await Ht(s,i,a),t=J(s),{data:n}=await D(`${t.path}/computeHistograms`,e);return{histograms:n.histograms}}async function Wr(s,i,a){var d,h;const e=(i=A($r,i)).toJSON();jt(e),(d=e.outFields)!=null&&d.length&&(e.outFields=e.outFields.join(","));const t=await Ne(i.geometry),n=t==null?void 0:t[0];n!=null&&(e.geometry=ae(n));const l=J(s),u=U({...l.query,f:"json",...e}),p=H(u,a),{data:m}=await D(`${l.path}/getSamples`,p),c=(h=m==null?void 0:m.samples)==null?void 0:h.map(w=>{const R=w.value==="NaN"||w.value===""?null:w.value.split(" ").map(f=>Number(f));return{...w,pixelValue:R}});return Vr.fromJSON({samples:c})}async function $t(s,i,a){i=A(Ut,i);const e=J(s),t=i.geometry?[i.geometry]:[];return Ne(t).then(n=>{const l=i.toJSON(),u=n==null?void 0:n[0];u!=null&&(l.geometry=JSON.stringify(ae(u)));const p=U({...e.query,f:"json",...l}),m=H(p,a);return D(e.path+"/identify",m)}).then(n=>Pr.fromJSON(n.data))}async function Zr(s,i,a){i=A(Tr,i);const e=await pt(s,i,[i.fromGeometry,i.toGeometry],a);return jr.fromJSON(e)}async function Kr(s,i,a){i=A(fr,i);const e=await pt(s,i,[i.geometry],a);return wr.fromJSON(e)}async function Xr(s,i,a){i=A(Or,i);const e=await pt(s,i,[i.geometry],a);return Cr.fromJSON(e)}async function Yr(s,i,a){i=A(br,i);const e=await pt(s,i,[i.fromGeometry,i.toGeometry],a);return Sr.fromJSON(e)}async function pt(s,i,a,e){const t=J(s),n=await Ne(a),l=i.toJSON();n[0]!=null&&(l.fromGeometry=JSON.stringify(ae(n[0]))),n[1]!=null&&(l.toGeometry=JSON.stringify(ae(n[1])));const u=U({...t.query,f:"json",...l}),p=H(u,e),{data:m}=await D(t.path+"/measure",p);return m}async function es(s,i,a){const e=await Bt(s,i,a);return Ur.fromJSON(e)}async function ts(s,i,a){const e=await Bt(s,i,a);return Lr.fromJSON(e)}async function Bt(s,i,a){i=A(zr,i);const e=J(s),t=i.toJSON(),n=U({...e.query,f:"json",...t}),l=H(n,a),{data:u}=await D(e.path+"/measureFromImage",l);return u}function ae(s){var a;const i=s.toJSON();return(a=s.spatialReference)!=null&&a.imageCoordinateSystem&&(i.spatialReference=ct(s.spatialReference)),i}function ct(s){const{imageCoordinateSystem:i}=s;if(i){const{id:a,referenceServiceName:e}=i;return a!=null?e?{icsid:a,icsns:e}:{icsid:a}:{ics:i}}return s.toJSON()}function Je(s,i){if(!s.imageCoordinateSystem)return gt(s);const a=ct(s),{icsid:e,icsns:t}=a;return e==null||t!=null&&!(i!=null&&i.toLowerCase().includes("/"+t.toLowerCase()+"/"))?JSON.stringify(a):`0:${e}`}async function is(s,i,a){i=A(Rr,i);const e=J(s),t=i.toJSON();i.outSpatialReference&&(t.outSR=Je(i.outSpatialReference));const n=U({...e.query,f:"json",...t}),l=H(n,a),{data:u}=await D(e.path+"/queryBoundary",l);return vr.fromJSON(u)}async function rs(s,i,a){var d,h;const e=(i=A(xr,i)).toJSON();jt(e),(d=e.objectIds)!=null&&d.length&&(e.objectIds=e.objectIds.join(",")),e.geometry||e.objectIds||e.time||e.where||(e.where="1=1");const t=await Ne(i.geometry),n=t==null?void 0:t[0];n!=null&&(e.geometry=ae(n));const l=(n==null?void 0:n.spatialReference)??((h=i.geometry)==null?void 0:h.spatialReference);l&&(e.inSR=Je(l));const u=J(s),p=U({...u.query,f:"json",...e}),m=H(p,a),{data:c}=await D(`${u.path}/queryGPSInfo`,m);return Dr.fromJSON(c)}async function ss(s,i,a){const e=(i=A(Jr,i)).toJSON();i.geometry.spatialReference.imageCoordinateSystem&&(e.geometry=ae(i.geometry)),i.depthOffset&&i.adjust||delete e.options;const t=J(s),n=U({...t.query,f:"json",...e}),l=H(n,a),{data:u}=await D(`${t.path}/imageToMap`,l);return ie(u)}async function ns(s,i,a){var p;const e=(i=A(Mr,i)).toJSON();(p=i.rasterIds)!=null&&p.length&&(e.rasterIds=i.rasterIds.join(","));const t=J(s),n=U({...t.query,f:"json",...e}),l=H(n,a),{data:u}=await D(`${t.path}/imageToMapMultiray`,l);return ie(u)}async function as(s,i,a){var d;const e=(i=A(Gr,i)).toJSON(),t=await Ne(i.geometry),n=t==null?void 0:t[0];n!=null&&(e.geometry=ae(n)),i.visibleOnly||delete e.options;const l=(n==null?void 0:n.spatialReference)??((d=i.geometry)==null?void 0:d.spatialReference);l&&(e.inSR=Je(l));const u=J(s),p=U({...u.query,f:"json",...e}),m=H(p,a),{data:c}=await D(`${u.path}/mapToImage`,m);return ie(c)}async function os(s,i,a){const e=(i=A(Er,i)).toJSON(),t=J(s),n=U({...t.query,f:"json",...e}),l=H(n,a),{data:u}=await D(`${t.path}/getImageUrl`,l);return qr.fromJSON(u)}async function ls(s,i,a){var m;const e=(i=A(mr,i)).toJSON(),t=await Ne([i.fromGeometry,i.toGeometry]);t[0]!=null&&(e.fromGeometry=ae(t[0]),t[0].spatialReference&&(e.inSR=Je(t[0].spatialReference))),t[1]!=null&&(e.toGeometry=ae(t[1])),(m=i.objectIds)!=null&&m.length&&(e.objectIds=e.objectIds.join(","));const n=J(s),l=U({...n.query,f:"json",...e}),u=H(l,a),{data:p}=await D(`${n.path}/find`,u);return yr.fromJSON(p)}async function us(s,i,a){var L,E;const e=J(s),t=U({...e==null?void 0:e.query,f:"json"}),n=H(t,a),l=`${e==null?void 0:e.path}/${i}/info`,u=D(`${l}`,n),p=D(`${l}/keyProperties`,n),m=await Promise.allSettled([u,p]),c=m[0].status==="fulfilled"?m[0].value.data:null,d=m[1].status==="fulfilled"?m[1].value.data:null;let h=null;(L=c.statistics)!=null&&L.length&&(h=c.statistics.map(F=>({min:F[0],max:F[1],avg:F[2],stddev:F[3]})));const w=Ue.fromJSON(c.extent),R=Math.ceil(w.width/c.pixelSizeX-.1),f=Math.ceil(w.height/c.pixelSizeY-.1),y=w.spatialReference,g=new $({x:c.pixelSizeX,y:c.pixelSizeY,spatialReference:y}),b=(E=c.histograms)!=null&&E.length?c.histograms:null,V=new Ui({origin:c.origin,blockWidth:c.blockWidth,blockHeight:c.blockHeight,firstPyramidLevel:c.firstPyramidLevel,maximumPyramidLevel:c.maxPyramidLevel});return new Jt({width:R,height:f,bandCount:c.bandCount,extent:w,spatialReference:y,pixelSize:g,pixelType:c.pixelType.toLowerCase(),statistics:h,histograms:b,keyProperties:d,storageInfo:V})}const ps=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),cs=si(ni,{min:0,max:255});function ms(s){if(!s)return null;const i=JSON.stringify(s).match(/"rasterFunction":"(.*?")/gi),a=i==null?void 0:i.map(e=>e.slice(18,-1));return a?a.join("/"):null}const ds=s=>{let i=class extends s{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new _({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||this.rasterFunctionInfos!=null&&this.rasterFunctionInfos.length<1||this.rasterFunctionInfos!=null&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(n=>typeof n=="number"))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,n){e!=null&&this.format!=="lerc"&&(t[n]=e)}writeCompressionTolerance(e,t,n){this.format==="lerc"&&e!=null&&(t[n]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?k.fromJSON(t):null}get fieldsIndex(){return this.fields?new ei(this.fields):null}set format(e){e&&ps.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return t.serviceDataType==="esriImageServiceDataTypeVector-UV"||t.serviceDataType==="esriImageServiceDataTypeVector-MagDir"||this.pixelFilter!=null?"lerc":"jpgpng"}readMinScale(e,t){return t.minLOD!=null&&t.maxLOD!=null?e:0}readMaxScale(e,t){return t.minLOD!=null&&t.maxLOD!=null?e:0}set mosaicRule(e){let t=e;t!=null&&t.mosaicMethod&&(t=k.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const n=e||t.mosaicRule;return n?k.fromJSON(n):this._isMosaicRuleSupported(t)?k.fromJSON(t):null}writeMosaicRule(e,t,n){let l=this.mosaicRule;const u=this.definitionExpression;l?u&&u!==l.where&&(l=l.clone(),l.where=u):u&&(l=new k({where:u})),this._isValidCustomizedMosaicRule(l)&&(t[n]=l.toJSON())}writeNoData(e,t,n){e!=null&&typeof e=="number"&&(t[n]=cs(e))}readObjectIdField(e,t){if(!e){const n=t.fields.find(l=>l.type==="esriFieldTypeOID"||l.type==="oid");e=n==null?void 0:n.name}return e}get parsedUrl(){return ti(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,n){var p,m;const l=(m=(p=t==null?void 0:t.layerDefinition)==null?void 0:p.drawingInfo)==null?void 0:m.renderer,u=ji(l,n);return u==null?null:(u.type==="vector-field"&&t.symbolTileSize&&!l.symbolTileSize&&(u.symbolTileSize=t.symbolTileSize),Et(u)||we.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),u)}writeRenderer(e,t,n){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),e.type==="vector-field"&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){var m;const e=this._rasterAttributeTableFieldPrefix,t=new Fe({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),n=new Fe({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),l=new Fe({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let u=this.fields?C(this.fields):[];u.push(n),(m=this.capabilities)!=null&&m.operations.supportsQuery&&this.fields&&this.fields.length>0&&u.push(t),this.version>=10.4&&this.rasterFunctionInfos!=null&&this.rasterFunctionInfos.some(c=>c.name.toLowerCase()==="none")&&u.push(l),this.rasterFunctionInfos!=null&&this.rasterFunctionInfos.filter(c=>c.name.toLowerCase()!=="none").forEach(c=>{u.push(new Fe({name:"Raster.ServicePixelValue."+c.name,alias:c.name,domain:null,editable:!1,length:50,type:"string"}))}),this._isVectorDataSet()&&(u.push(new Fe({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),u.push(new Fe({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:p}=this.rasterInfo??{};if(p!=null){const c=p.fields.filter(d=>d.type!=="esriFieldTypeOID"&&d.name.toLowerCase()!=="value").map(d=>{const h=C(d);return h.name=e+d.name,h});u=u.concat(c)}return u}get renderingRule(){return Ve(we.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){Ve(we.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t!=null&&t.rasterFunction&&(t=S.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const n=t.rasterFunctionInfos;return t.renderingRule||n!=null&&n.length&&n[0].name!=="None"?this._isRFTJson(t.renderingRule)?S.fromJSON({rasterFunctionDefinition:t.renderingRule}):S.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const n=e||t.extent.spatialReference;return n?se.fromJSON(n):null}readPixelType(e){return dt.fromJSON(e)||e}writePixelType(e,t,n){this.serviceRasterInfo!=null&&this.pixelType===this.serviceRasterInfo.pixelType||(t[n]=dt.toJSON(e))}readVersion(e,t){let n=t.currentVersion;return n||(n=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),n}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let n=e;const{renderer:l,symbolizer:u,pixelFilter:p,bandIds:m}=this;if(!this._isPicture()&&l&&u&&!p){const c=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(l.toJSON()),d=this._rasterJobHandler.instance;if(d){c&&(u.bind(),await d.updateSymbolizer(u,t),this._cachedRendererJson=l.toJSON());const h=await d.symbolize({bandIds:m,...e},t);n={extent:e.extent,pixelBlock:h}}else n={extent:e.extent,pixelBlock:u.symbolize({bandIds:m,...e})}}return n}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsComputeAngles)throw new I("imagery-layer:compute-angles","this operation is not supported on the input image service");return Hr(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsComputePixelLocation)throw new I("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return Br(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsComputeHistograms)throw new I("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),kr(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsComputeStatisticsHistograms)throw new I("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),Qr(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const n=await this._fetchCapabilities(t==null?void 0:t.signal);if(!(e.operationType==="base-and-top"?n.mensuration.supportsHeightFromBaseAndTop:e.operationType==="base-and-top-shadow"?n.mensuration.supportsHeightFromBaseAndTopShadow:n.mensuration.supportsHeightFromTopAndTopShadow))throw new I("imagery-layer:measure-height","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),Zr(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const n=await this._fetchCapabilities(t==null?void 0:t.signal);if(!(n.mensuration.supportsAreaAndPerimeter&&(!e.is3D||n.mensuration.supports3D)))throw new I("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),Kr(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const n=await this._fetchCapabilities(t==null?void 0:t.signal);if(!(n.mensuration.supportsDistanceAndAngle&&(!e.is3D||n.mensuration.supports3D)))throw new I("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),Yr(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const n=await this._fetchCapabilities(t==null?void 0:t.signal);if(!(n.mensuration.supportsPointOrCentroid&&(!e.is3D||n.mensuration.supports3D)))throw new I("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=C(e),this._applyMosaicAndRenderingRules(e),Xr(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsMeasureFromImage)throw new I("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if(e.geometry.type!=="polyline")throw new I("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return es(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsMeasureFromImage)throw new I("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if(e.geometry.type!=="polygon")throw new I("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return ts(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return t!=null?t.get(e):void 0}getFieldDomain(e,t){const n=this.getField(e);return n?n.domain:null}async fetchImage(e,t,n,l={}){if(e==null||t==null||n==null)throw new I("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const d=await this._generateRasterInfo(this.rasterFunction,{signal:l.signal});d&&(this.rasterInfo=d)}const u=this.getExportImageServiceParameters(e,t,n,l.timeExtent);if(u==null){if(l.requestAsImageElement&&this._canRequestImageElement(this.format)){const g=document.createElement("canvas");return g.width=t,g.height=n,l.returnImageBitmap?{imageBitmap:await Ot(g,`${a(this.parsedUrl)}/exportImage`,l.signal)}:{imageOrCanvasElement:g}}const{bandIds:d,rasterInfo:h}=this,w=((d==null?void 0:d.length)||h.bandCount)??0,R=t*n,f=h.pixelType,y=[];for(let g=0;g=10.3?e==null?void 0:e.rasterFunction:null})}).then(t=>t.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new I("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):D(a(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e==null?void 0:e.rasterFunction:null})}).then(t=>At.fromJSON(t.data))}getCatalogItemRasterInfo(e,t){const n={...t,query:this._getQueryParams()};return us(a(this.parsedUrl),e,n)}async getCatalogItemICSInfo(e,t){var xe,Ie,le,Pt,Nt;const{data:n}=await D(a(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),l=n==null?void 0:n.ics;if(!l)return;let u=null;try{u=(await D(a(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!(u!=null&&u.spatialReference))return{ics:l,icsToPixelTransform:null,icsExtent:null,northDirection:null};const p=this.version>=10.7?D(a(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(x=>x.data).catch(()=>({})):{},m=u.spatialReference,c={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[u]}),inSR:gt(m),outSR:"0:"+e},d=D(a(this.parsedUrl)+"/project",{query:this._getQueryParams(c),...t}).then(x=>x.data).catch(()=>({})),h=5,w=(u.xmin+u.xmax)/2,R=(u.ymax-u.ymin)/(h+1),f=u.ymin+R,y=[];for(let x=0;xx.data).catch(()=>({})),V=await Promise.all([p,d,b]);let L=V[0].ipxf;if(L==null){const x=(xe=l.geodataXform)==null?void 0:xe.xf_0;((Ie=x==null?void 0:x.name)==null?void 0:Ie.toLowerCase())==="topup"&&((le=x==null?void 0:x.coefficients)==null?void 0:le.length)===6&&(L={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:x.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const E=Ue.fromJSON((Nt=(Pt=V[1])==null?void 0:Pt.geometries)==null?void 0:Nt[0]);E&&(E.spatialReference=new se({wkid:0,imageCoordinateSystem:l}));const F=V[2].geometries?V[2].geometries.filter(x=>(x==null?void 0:x.x)!=null&&x.y!=null&&x.x!=="NaN"&&x.y!=="NaN"):[],B=F.length;if(B<3)return{ics:l,icsToPixelTransform:L,icsExtent:E,northDirection:null};let Z=0,O=0,P=0,z=0;for(let x=0;xF[0].x,We=F[h-1].y>F[0].y;return q===1/0?ye=We?90:270:q===0?ye=ke?0:180:q>0?ye=ke?180*Math.atan(q)/Math.PI:180*Math.atan(q)/Math.PI+180:q<0&&(ye=We?180+180*Math.atan(q)/Math.PI:360+180*Math.atan(q)/Math.PI),{ics:l,icsToPixelTransform:L,icsExtent:E,northDirection:ye}}async generateRasterInfo(e,t){var p;if(e=A(S,e),this.serviceRasterInfo&&(!e||((p=e.functionName)==null?void 0:p.toLowerCase())==="none"||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const n=ms(e);if(!n)throw new I("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[n])return this._functionRasterInfos[n];const l={...t,query:this._getQueryParams()},u=Pi(a(this.parsedUrl),e,l);this._functionRasterInfos[n]=u;try{return await u}catch(m){throw this._functionRasterInfos[n]=null,m}}getExportImageServiceParameters(e,t,n,l){var y;e=e.clone().shiftCentralMeridian();const u=Je(e.spatialReference,a(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const p=this.exportImageServiceParameters.toJSON(),{bandIds:m,noData:c}=p;let{renderingRule:d}=p;const h=(y=this.rasterFunction)==null?void 0:y.rasterFunctionDefinition,w=!this.renderer||this.renderer.type==="raster-stretch";if(m!=null&&m.length&&this._hasRasterFunction(this.rasterFunction)&&!h&&w){const g={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:m}};if(d.rasterFunction==="Stretch")g.rasterFunctionArguments.Raster=d.rasterFunctionArguments.Raster,d.rasterFunctionArguments.Raster=g;else if(d.rasterFunction==="Colormap"){const b=d.rasterFunctionArguments.Raster;(b==null?void 0:b.rasterFunction)==="Stretch"?(g.rasterFunctionArguments.Raster=b.rasterFunctionArguments.Raster,b.rasterFunctionArguments.Raster=g):(g.rasterFunctionArguments.Raster=b,d.rasterFunctionArguments.Raster=g)}else g.rasterFunctionArguments.Raster=d,d=g;p.bandIds=void 0}else p.bandIds=m==null?void 0:m.join(",");Array.isArray(c)&&c.length>0&&(p.noData=c.join(","));const R=this._processMultidimensionalIntersection(null,l,this.exportImageServiceParameters.mosaicRule);if(R.isOutSide)return null;p.mosaicRule=R.mosaicRule!=null?JSON.stringify(R.mosaicRule):null,l=R.timeExtent,p.renderingRule=this._getRenderingRuleString(S.fromJSON(d));const f={};if(l!=null){const{start:g,end:b}=l.toJSON();g&&b&&g===b?f.time=""+g:g==null&&b==null||(f.time=`${g??"null"},${b??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:u,imageSR:u,size:t+","+n,...p,...f}}async getSamples(e,t){const n=await this._fetchCapabilities(t==null?void 0:t.signal);if(!(n!=null&&n.operations.supportsGetSamples))throw new I("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=C(e);const{raster:l}=this;return l&&e.raster==null&&(e.raster=l),Wr(this.url,e,this._getRequestOptions(t))}async identify(e,t){var p;if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsIdentify)throw new I("imagery-layer:identify","identify operation is not supported on the input image service");e=C(e),this.version<10.91&&((p=e.geometry)==null?void 0:p.type)==="extent"&&(e.geometry=Ke.fromExtent(e.geometry));const n=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(n.isOutSide)throw new I("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=n.timeExtent,e.mosaicRule=n.mosaicRule;const{raster:l,rasterFunction:u}=this;return u&&e.rasterFunction==null&&(e.rasterFunction=u),l&&e.raster==null&&(e.raster=l),$t(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsImageToMap)throw new I("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return ss(a(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsImageToMapMultiray)throw new I("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return ns(a(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsMapToImage)throw new I("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return as(a(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsFindImages)throw new I("imagery-layer:find-images","findImages operation is not supported on the input image service");return ls(a(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsGetImageUrl)throw new I("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return os(a(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new mt({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsQueryBoundary)throw new I("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},is(a(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),Wi(this.url,e,t)}async queryObjectIds(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),Zi(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsQueryGPSInfo)throw new I("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},rs(a(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),Ki(this.url,e,t)}async queryVisibleRasters(e,t){var E,F,B,Z;if(!e)throw new I("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:n,returnDomainValues:l,returnTopmostRaster:u,showNoDataRecords:p}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let m=!1,c=null,d=null;const h="raster.servicepixelvalue",w=this._rasterFunctionNamesIndex;if(e.outFields!=null&&(m=e.outFields.some(O=>!O.toLowerCase().includes(h)),this.version>=10.4)){const O=e.outFields.filter(z=>z.toLowerCase().includes(h)&&z.length>h.length).map(z=>{const q=z.slice(h.length+1);return[this._updateRenderingRulesFunctionName(q,w),q]});c=O.map(z=>new S({functionName:z[0]})),d=O.map(z=>z[1]);const{rasterFunction:P}=this;c.length===0?P!=null&&P.functionName?(c.push(P),d.push(P.functionName)):c=null:P!=null&&P.functionName&&!c.some(z=>z.functionName===P.functionName)&&(c.push(P),d.push(P.functionName))}const R=e.outSpatialReference==null||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:f}=this;let y=e.timeExtent||this.timeExtent;if(f){const{isOutside:O,intersection:P}=yt(f,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:(E=this.exportImageServiceParameters.mosaicRule)==null?void 0:E.multidimensionalDefinition});if(O)throw new I("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");(P==null?void 0:P.timeExtent)!=null&&(y=P.timeExtent)}const g=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,y);let b=e.geometry;this.version<10.91&&(b==null?void 0:b.type)==="extent"&&(b=Ke.fromExtent(b));const V=this._getQueryParams({geometry:b,timeExtent:y,mosaicRule:g,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:c,pixelSize:n,returnCatalogItems:m,returnGeometry:R,raster:this.raster,maxItemCount:u?1:null});delete V.f;const L=new Ut(V);try{await this._generateRasterInfo(this.rasterFunction);const O=await $t(this.url,L,{signal:t==null?void 0:t.signal,query:{...this.customParameters}}),P=e.outFields,z=O.value!=null&&O.value.toLowerCase().includes("nodata");if(!(m&&!R&&((F=O==null?void 0:O.catalogItems)!=null&&F.features.length)&&(p||!z)))return this._processVisibleRastersResponse(O,{returnDomainValues:l,templateRRFunctionNames:d,showNoDataRecords:p,templateFields:P});const q=this.objectIdField||"ObjectId",ye=((B=O.catalogItems)==null?void 0:B.features)??[],ke=ye.map(Ie=>{var le;return(le=Ie.attributes)==null?void 0:le[q]}),We=new mt({objectIds:ke,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[q]}),xe=await this.queryRasters(We);return(Z=xe==null?void 0:xe.features)!=null&&Z.length&&xe.features.forEach(Ie=>{ye.forEach(le=>{le.attributes[q]===Ie.attributes[q]&&(le.geometry=new Ke(Ie.geometry),e.outSpatialReference!=null&&(le.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(O,{returnDomainValues:l,templateRRFunctionNames:d,showNoDataRecords:p,templateFields:P})}catch{throw new I("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const n=D(a(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(p=>{var m;return(m=p.data)==null?void 0:m.statistics}),l=D(a(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(p=>{var m;return(m=p.data)==null?void 0:m.histograms}),u=await Promise.all([n,l]);return u[0]&&u[0].forEach(p=>{p.avg=p.mean,p.stddev=p.standardDeviation}),{statistics:u[0]||null,histograms:u[1]||null}}async createFlowMesh(e,t){const n=this._rasterJobHandler.instance;return n?n.createFlowMesh(e,t):Hi(e.meshType,e.simulationSettings,e.flowData,t.signal!=null?t.signal:new AbortController().signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return Ni(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,n=this.serviceRasterInfo!=null?Promise.resolve(this.serviceRasterInfo):_i(a(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(p=>(this._set("serviceRasterInfo",p),this._set("multidimensionalInfo",p.multidimensionalInfo),Oi(p,t),p)),l=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,u=this._getRasterFunctionInfos();return Promise.all([n,l,u]).then(p=>{p[1]?this._set("rasterInfo",p[1]):this._set("rasterInfo",p[0]),p[2]&&this._set("rasterFunctionInfos",p[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),we.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([ii(()=>this.rasterFunction,c=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(c).then(d=>{d&&(this.rasterInfo=d)})})]);const{serviceRasterInfo:m}=this;m.multidimensionalInfo!=null&&this._updateMultidimensionalDefinition(m)})}_combineMosaicRuleWithTimeExtent(e,t){var f;const n=this.timeInfo,{multidimensionalInfo:l}=this.serviceRasterInfo;if(e==null||l==null||t==null||(n==null?void 0:n.startField)==null)return e;const{startField:u}=n,p=l.variables.some(y=>y.dimensions.some(g=>g.name===u))?u:"StdTime";if(e=e.clone(),this.sourceType==="mosaic-dataset")return e.multidimensionalDefinition=(f=e.multidimensionalDefinition)==null?void 0:f.filter(y=>y.dimensionName!==p),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const m=e.multidimensionalDefinition.filter(y=>y.dimensionName===p),c=t.start!=null?t.start.getTime():null,d=t.end!=null?t.end.getTime():null,h=c==null||d==null||c===d,w=h?[c||d]:[[c,d]],R=this.version>=10.8;if(m.length)m.forEach(y=>{y.dimensionName===p&&(R?(y.dimensionName=null,y.isSlice=!1,y.values=[]):(y.isSlice=h,y.values=w))});else if(!R){const y=e.multidimensionalDefinition.filter(g=>g.variableName!=null&&g.dimensionName==null);y.length?y.forEach(g=>{g.dimensionName=p,g.isSlice=h,g.values=w}):e.multidimensionalDefinition.push(new Ci({variableName:"",dimensionName:p,isSlice:h,values:w}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return e==null?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(t=>!(!t.variableName&&!t.dimensionName)),e.multidimensionalDefinition.length===0&&(e.multidimensionalDefinition=null)),this.sourceType!=="mosaic-dataset"&&e.multidimensionalDefinition==null?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t==null?void 0:t.signal)).operations.supportsQuery)throw new I("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=e!=null?A(mt,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(this._rasterJobHandler.connectionPromise!=null)return this._rasterJobHandler.connectionPromise;const e=new Ei;this._rasterJobHandler.connectionPromise=e.initialize().then(()=>{this._rasterJobHandler.instance=e},()=>{}),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:n}=this;return e.type==="unique-value"&&this._hasRasterFunction(n)&&(t==null?void 0:t.bandCount)===1&&["u8","s8"].includes(t.pixelType)||t!=null&&e!=null&&$i(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){var n;let t=this.sourceJSON;if(!t){const{data:l,ssl:u}=await D(a(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=l,this.sourceJSON=t,u&&(this.url=this.url.replace(/^http:/i,"https:"))}if(((n=t.capabilities)==null?void 0:n.toLowerCase().split(",").map(l=>l.trim()).indexOf("tilesonly"))>-1)throw new I("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){var t;return e.serviceSourceType?e.serviceSourceType==="esriImageServiceSourceTypeMosaicDataset":((t=e.fields)==null?void 0:t.length)>0}_isMosaicRuleSupported(e){var l;if(!e)return!1;const t=this._isMosaicDataset(e),n=e.currentVersion>=10.71&&e.hasMultidimensions&&!(((l=e.fields)==null?void 0:l.length)>1);return t||n}_isVectorFieldResampleFunction(e){if(e==null)return!1;const{functionName:t,functionArguments:n}=e,l=(t==null?void 0:t.toLowerCase())==="resample",u=(n==null?void 0:n.ResampleType)||(n==null?void 0:n.resampleType);return l&&(u===7||u===10)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){var l,u;const t=this._isPicture(),{rasterInfo:n}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&n.bandCount>=3){const m=Ai(n);!m||n.bandCount===3&&m[0]===0&&m[1]===1&&m[2]===2||(this.bandIds=m)}e||(e=Vi(n,{bandIds:this.bandIds,variableName:this.rasterFunction?null:(u=(l=this.mosaicRule)==null?void 0:l.multidimensionalDefinition)==null?void 0:u[0].variableName}));const p=Mi(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=p,this.symbolizer.rasterInfo=n):this.symbolizer=new Bi({rendererJSON:p,rasterInfo:n}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return e==null?e:{extent:e.extent&&e.extent.clone(),pixelBlock:e.pixelBlock!=null?e.pixelBlock.clone():null}}_getQueryParams(e){(e==null?void 0:e.renderingRule)!=null&&typeof e.renderingRule!="string"&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:n}=this;return{raster:t,viewId:n,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e==null?void 0:e.query,...this.customParameters}}}_decodePixelBlock(e,t,n){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):_t(e,t,n)}async _getRasterFunctionInfos(e){var n;const t=this.sourceJSON.rasterFunctionInfos;return this.loaded?t:t&&this.version>=10.3?t.length===1&&t[0].name.toLowerCase()==="none"?t:(n=(await D(a(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data)==null?void 0:n.rasterFunctionInfos:null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:n,returnImageBitmap:l,signal:u}=e;if(n&&this._canRequestImageElement(t.format)){const f=`${a(this.parsedUrl)}/exportImage`,{data:y}=await D(f,{responseType:l?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:u});return y instanceof Blob?{imageBitmap:await Ot(y,f,u),params:t}:{imageOrCanvasElement:y,params:t}}const p=this._initJobHandler(),m=D(a(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:u}),c=(await Promise.all([m,p]))[0].data,d=t.format||"jpgpng";let h=d;if(h!=="bsq"&&h!=="bip"&&(h=Qi(c)),!h)throw new I("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(c)));const w={signal:u};return{pixelData:{pixelBlock:await(d==="gif"||d==="bmp"||d.includes("png")&&(h==="png"||h==="jpg")?_t(c,{useCanvas:!0,...t},w):this._decodePixelBlock(c,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:d},w)),extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){var t;return e&&JSON.stringify(e.toJSON())!==JSON.stringify((t=this.defaultMosaicRule)==null?void 0:t.toJSON())}_updateMultidimensionalDefinition(e){var n;if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=Ji(e,{multidimensionalSubset:this.multidimensionalSubset});if(t!=null&&t.length>0){this.mosaicRule=this.mosaicRule||new k;const l=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&((n=this.rasterFunction.functionName)==null?void 0:n.toLowerCase())!=="none"&&t.forEach(u=>u.variableName=""),t=t.filter(({variableName:u,dimensionName:p})=>u&&u!=="*"||p),!(l!=null&&l.length)&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){var V,L,E;t=t||{};const n=e.value,{templateRRFunctionNames:l,showNoDataRecords:u,returnDomainValues:p,templateFields:m}=t,c=e.processedValues;let d=(V=e.catalogItems)==null?void 0:V.features,h=((E=(L=e.properties)==null?void 0:L.Values)==null?void 0:E.map(F=>F.replaceAll(/ /gi,", ")))||[];const w=this.objectIdField||"ObjectId",R=typeof n=="string"&&n.toLowerCase().includes("nodata"),f=[];if(n&&!d&&!R){const F={};F[w]=0,h=[n],d=[new ri({geometry:this.fullExtent,attributes:F})]}if(!d)return[];let y,g,b;this._updateResponseFieldNames(d,m),R&&!u&&(d=[]);for(let F=0;F0&&l&&l.length>0&&l.includes(this.rasterFunction.functionName)?c[l.indexOf(this.rasterFunction.functionName)]:n,g.toLowerCase()==="nodata"&&!u)continue;const B="Raster.ItemPixelValue",Z="Raster.ServicePixelValue";y.attributes[B]=g,y.attributes[Z]=b,this._updateFeatureWithMagDirValues(y,g);const O=this.fields&&this.fields.length>0;let P=this.rasterFunction&&this.serviceRasterInfo.attributeTable!=null?O?g:n:b;this.rasterFunction||(P=O?g:n),this._updateFeatureWithRasterAttributeTableValues(y,P)}if(y.sourceLayer=y.layer=this,p&&this._updateFeatureWithDomainValues(y),l&&c&&l.length===c.length)for(let B=0;Bc.name).find(c=>c.toLowerCase()==="value");if(!p)return;const m=l.filter(c=>c.attributes[p]===(t!=null?parseInt(t,10):null));m&&m[0]&&u.forEach(c=>{const d=this._rasterAttributeTableFieldPrefix+c.name;e.attributes[d]=m[0].attributes[c.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const n=t.split(/,\s*/).map(c=>parseFloat(c)),l=n.map(c=>[c]),u=n.map(c=>({minValue:c,maxValue:c,noDataValue:null})),p=new ht({height:1,width:1,pixelType:"f32",pixels:l,statistics:u});this.pixelFilter!=null&&this.pixelFilter({pixelBlock:p,extent:new Ue(0,0,0,0,this.spatialReference)});const m=this.serviceDataType==="esriImageServiceDataTypeVector-MagDir"?[p.pixels[0][0],p.pixels[1][0]]:ki([p.pixels[0][0],p.pixels[1][0]]);e.attributes["Raster.Magnitude"]=m[0],e.attributes["Raster.Direction"]=m[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(n=>n.domain&&n.domain.type==="coded-value");t!=null&&t.forEach(n=>{const l=e.attributes[n.name];if(l!=null){const u=n.domain.codedValues.find(p=>p.code===l);u&&(e.attributes[n.name]=u.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const n=this.fieldsIndex;n!=null&&e.forEach(l=>{var u;if(l!=null&&l.attributes)for(const p of t){const m=(u=n.get(p))==null?void 0:u.name;m&&m!==p&&(l.attributes[p]=l.attributes[m],delete l.attributes[m])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return(e==null?void 0:e.functionName)!=null&&e.functionName.toLowerCase()!=="none"}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if(e==="Raw")return e.replace("Raw","None");const n=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(n)?t.get(n):e}_isRFTJson(e){return(e==null?void 0:e.name)&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return this.serviceDataType==="esriImageServiceDataTypeVector-UV"||this.serviceDataType==="esriImageServiceDataTypeVector-MagDir"}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:n,rasterFunction:l}=this;l&&"rasterFunction"in e&&e.rasterFunction==null&&(e.rasterFunction=l),n&&e.mosaicRule==null&&(e.mosaicRule=n),t&&e.raster==null&&(e.raster=t)}_readCapabilities(e){var g;const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(b=>b.trim()):["image","catalog"],{currentVersion:n,advancedQueryCapabilities:l,maxRecordCount:u}=e,p=t.includes("image"),m=e.serviceDataType==="esriImageServiceDataTypeElevation",c=!(!e.spatialReference&&!((g=e.extent)!=null&&g.spatialReference)),d=t.includes("edit"),h=t.includes("mensuration")&&c,w=e.mensurationCapabilities==null?[]:e.mensurationCapabilities.toLowerCase().split(",").map(b=>b.trim()),R=h&&w.includes("basic"),f=this._isMosaicDataset(e)&&t.includes("catalog"),y=t.includes("download");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:p,supportsExportImage:p,supportsIdentify:p,supportsImageToMap:n>=11.2&&f,supportsImageToMapMultiray:n>=11.2&&f,supportsMapToImage:n>=11.2&&f,supportsFindImages:n>=11.2&&f,supportsGetImageUrl:n>=11.3&&y,supportsMeasure:h,supportsMeasureFromImage:n>=11.2,supportsDownload:y,supportsQuery:f&&e.fields&&e.fields.length>0,supportsGetSamples:n>=10.2&&p,supportsProject:n>=10.3&&p,supportsComputeStatisticsHistograms:n>=10.4&&p,supportsQueryBoundary:n>=10.6&&p,supportsCalculateVolume:n>=10.7&&m,supportsComputePixelLocation:n>=10.7&&f,supportsComputeAngles:n>=10.91,supportsQueryGPSInfo:n>=11.2&&f,supportsAdd:d,supportsDelete:d,supportsEditing:d,supportsUpdate:d,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:u,maxRecordCountFactor:void 0,supportsStatistics:!!(l!=null&&l.supportsStatistics),supportsOrderBy:!!(l!=null&&l.supportsOrderBy),supportsDistinct:!!(l!=null&&l.supportsDistinct),supportsPagination:!!(l!=null&&l.supportsPagination),supportsStandardizedQueriesOnly:!!(l!=null&&l.useStandardizedQueries),supportsPercentileStatistics:!!(l!=null&&l.supportsPercentileStatistics),supportsCentroid:!!(l!=null&&l.supportsReturningGeometryCentroid),supportsDistance:!!(l!=null&&l.supportsQueryWithDistance),supportsExtent:!!(l!=null&&l.supportsReturningQueryExtent),supportsGeometryProperties:!!(l!=null&&l.supportsReturningGeometryProperties),supportsHavingClause:!!(l!=null&&l.supportsHavingClause),supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!(l!=null&&l.supportsDefaultSR),supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:R,supportsAreaAndPerimeter:R,supportsPointOrCentroid:R,supportsHeightFromBaseAndTop:h&&w.includes("base-top height"),supportsHeightFromBaseAndTopShadow:h&&w.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:h&&w.includes("top-top shadow height"),supports3D:h&&w.includes("3d")}}}};function a(e){return(e==null?void 0:e.path)??""}return r([o({clonable:!1})],i.prototype,"_functionRasterInfos",void 0),r([o({clonable:!1})],i.prototype,"_rasterJobHandler",void 0),r([o({clonable:!1})],i.prototype,"_cachedRendererJson",void 0),r([o({readOnly:!0})],i.prototype,"_serviceSupportsMosaicRule",void 0),r([M("_serviceSupportsMosaicRule",["currentVersion","fields"])],i.prototype,"readServiceSupportsMosaicRule",null),r([o({readOnly:!0})],i.prototype,"_rasterAttributeTableFieldPrefix",void 0),r([o({readOnly:!0})],i.prototype,"_rasterFunctionNamesIndex",null),r([o()],i.prototype,"adjustAspectRatio",void 0),r([o({type:[Qe],json:{write:!0}})],i.prototype,"bandIds",void 0),r([M("bandIds")],i.prototype,"readBandIds",null),r([o({readOnly:!0,json:{read:!1}})],i.prototype,"capabilities",void 0),r([M("service","capabilities",["capabilities","currentVersion","serviceDataType"])],i.prototype,"readCapabilities",null),r([o({type:Number})],i.prototype,"compressionQuality",void 0),r([T("compressionQuality")],i.prototype,"writeCompressionQuality",null),r([o({type:Number})],i.prototype,"compressionTolerance",void 0),r([T("compressionTolerance")],i.prototype,"writeCompressionTolerance",null),r([o({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),r([o({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],i.prototype,"defaultMosaicRule",void 0),r([M("defaultMosaicRule",["defaultMosaicMethod"])],i.prototype,"readDefaultMosaicRule",null),r([o({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),r([o({readOnly:!0,constructOnly:!0})],i.prototype,"exportImageServiceParameters",void 0),r([o()],i.prototype,"rasterInfo",void 0),r([o({readOnly:!0,type:[Fe]})],i.prototype,"fields",void 0),r([o({readOnly:!0})],i.prototype,"fieldsIndex",null),r([o({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],i.prototype,"format",null),r([M("service","format",["serviceDataType"])],i.prototype,"readFormat",null),r([o({type:Ue})],i.prototype,"fullExtent",void 0),r([o({readOnly:!0})],i.prototype,"hasMultidimensions",void 0),r([o({json:{read:{source:"maxImageHeight"}}})],i.prototype,"imageMaxHeight",void 0),r([o({json:{read:{source:"maxImageWidth"}}})],i.prototype,"imageMaxWidth",void 0),r([o({type:String,json:{type:ve.jsonValues,read:ve.read,write:ve.write}})],i.prototype,"interpolation",void 0),r([o()],i.prototype,"minScale",void 0),r([M("service","minScale")],i.prototype,"readMinScale",null),r([o()],i.prototype,"maxScale",void 0),r([M("service","maxScale")],i.prototype,"readMaxScale",null),r([o({type:k})],i.prototype,"mosaicRule",null),r([M("mosaicRule",["mosaicRule","defaultMosaicMethod"])],i.prototype,"readMosaicRule",null),r([T("mosaicRule")],i.prototype,"writeMosaicRule",null),r([o()],i.prototype,"multidimensionalInfo",void 0),r([o({type:Fi,json:{write:!0}})],i.prototype,"multidimensionalSubset",void 0),r([o({json:{type:Qe}})],i.prototype,"noData",void 0),r([T("noData")],i.prototype,"writeNoData",null),r([o({type:String,json:{type:He.jsonValues,read:He.read,write:He.write}})],i.prototype,"noDataInterpretation",void 0),r([o({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],i.prototype,"objectIdField",void 0),r([M("objectIdField")],i.prototype,"readObjectIdField",null),r([o({readOnly:!0})],i.prototype,"geometryType",void 0),r([o({})],i.prototype,"typeIdField",void 0),r([o({})],i.prototype,"types",void 0),r([o({readOnly:!0})],i.prototype,"parsedUrl",null),r([o({type:Function})],i.prototype,"pixelFilter",void 0),r([o()],i.prototype,"raster",void 0),r([o({readOnly:!0})],i.prototype,"sourceType",void 0),r([M("sourceType",["serviceSourceType","fields"])],i.prototype,"readSourceType",null),r([o()],i.prototype,"viewId",void 0),r([o({types:Di,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:Ti,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&e.type!=="vector-field"&&e.type!=="flow"})}}}}})],i.prototype,"renderer",null),r([M("renderer")],i.prototype,"readRenderer",null),r([T("renderer")],i.prototype,"writeRenderer",null),r([o({clonable:!1})],i.prototype,"symbolizer",void 0),r([o(Xt)],i.prototype,"opacity",void 0),r([o({readOnly:!0})],i.prototype,"rasterFields",null),r([o({constructOnly:!0})],i.prototype,"rasterFunctionInfos",void 0),r([o({type:S})],i.prototype,"renderingRule",null),r([o({type:S,json:{name:"renderingRule"}})],i.prototype,"rasterFunction",null),r([M("rasterFunction",["renderingRule","rasterFunctionInfos"])],i.prototype,"readRasterFunction",null),r([o({readOnly:!0})],i.prototype,"serviceDataType",void 0),r([o({readOnly:!0,type:se})],i.prototype,"spatialReference",void 0),r([M("spatialReference",["spatialReference","extent"])],i.prototype,"readSpatialReference",null),r([o({json:{type:dt.jsonValues}})],i.prototype,"pixelType",void 0),r([M("pixelType")],i.prototype,"readPixelType",null),r([T("pixelType")],i.prototype,"writePixelType",null),r([o({constructOnly:!0,type:Jt})],i.prototype,"serviceRasterInfo",void 0),r([o()],i.prototype,"sourceJSON",void 0),r([o(Yt)],i.prototype,"url",void 0),r([o({readOnly:!0})],i.prototype,"version",void 0),r([M("version",["currentVersion","fields","timeInfo"])],i.prototype,"readVersion",null),i=r([v("esri.layers.mixins.ArcGISImageService")],i),i};let Q=class extends ai(oi(li(ui(pi(ds(ci(mi(di(yi(Se(Si))))))))))){constructor(...s){super(...s),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=hi(async(i,a,e)=>{const{save:t,saveAs:n}=await xi(()=>import("./imageryUtils-CVS5zy0-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]));switch(i){case Ze.SAVE:return t(this,a);case Ze.SAVE_AS:return n(this,e,a)}})}normalizeCtorArgs(s,i){return typeof s=="string"?{url:s,...i}:s}load(s){const i=s!=null?s.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},s).catch(gi).then(()=>this._fetchService(i))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(s){this._set("legendEnabled",s)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(s){this._set("listMode",s)}writeOperationalLayerType(s,i,a){var t;const e=((t=this.renderer)==null?void 0:t.type)==="vector-field";i[a]=e?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){var s;return!(!this.raster||!((s=this.url)!=null&&s.toLowerCase().includes("/rasterrendering/imageserver")))}createPopupTemplate(s){var p;const i=this.rasterFields,a=this.title,e=new Set;let t=!1,n=!1;this.capabilities&&(t=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n=this.serviceDataType==="esriImageServiceDataTypeVector-UV"||this.serviceDataType==="esriImageServiceDataTypeVector-MagDir");const l=new Set;t&&l.add("raster.itempixelvalue");for(const m of i){const c=m.name.toLowerCase();l.has(c)||c.includes("raster.servicepixelvalue.")||e.add(m.name)}n&&e.add("raster.magnitude").add("raster.direction");const u=fi({fields:i,title:a},{...s,visibleFieldNames:e});return u!=null&&u.fieldInfos&&((p=this.rasterInfo)!=null&&p.pixelType.startsWith("f"))&&u.fieldInfos.forEach(({format:m,fieldName:c})=>{m&&c&&/^raster\.(item|service)pixelvalue/i.test(c)&&(m.places=2)}),u}queryFeatures(s,i){return this.queryRasters(s,i).then(a=>{if(a!=null&&a.features)for(const e of a.features)e.layer=e.sourceLayer=this;return a})}queryFeatureCount(s,i){return this.queryRasterCount(s,i)}redraw(){this.emit("redraw")}async save(s){return this._debouncedSaveOperations(Ze.SAVE,s)}async saveAs(s,i){return this._debouncedSaveOperations(Ze.SAVE_AS,i,s)}serviceSupportsSpatialReference(s){return wi(this,s)}write(s,i){if(!this._isPreviewLayer)return super.write(s,i);if(i!=null&&i.messages){const a=`${i.origin}/${i.layerContainerType||"operational-layers"}`;i.messages.push(new I("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${a}'`,{layer:this}))}return null}};r([o(Ri)],Q.prototype,"legendEnabled",null),r([o({type:["show","hide"]})],Q.prototype,"listMode",null),r([o({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Q.prototype,"isReference",void 0),r([o({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Q.prototype,"operationalLayerType",void 0),r([T("web-map","operationalLayerType")],Q.prototype,"writeOperationalLayerType",null),r([o(vi)],Q.prototype,"popupEnabled",void 0),r([o({type:bi,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Q.prototype,"popupTemplate",void 0),r([o({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),r([o({readOnly:!0,json:{read:!1}})],Q.prototype,"type",void 0),r([o({readOnly:!0})],Q.prototype,"_isPreviewLayer",null),Q=r([v("esri.layers.ImageryLayer")],Q);const an=Q;export{an as default}; diff --git a/build/assets/ImageryTileLayer-CuBqAg13.js b/build/assets/ImageryTileLayer-CuBqAg13.js new file mode 100644 index 0000000..1681c8f --- /dev/null +++ b/build/assets/ImageryTileLayer-CuBqAg13.js @@ -0,0 +1,3 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/geometryEngine-D2dsojOY.js","assets/geometryEngineBase-RmbNeFm7.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/hydrated-awHE-vOn.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/imageryUtils-CVS5zy0-.js","assets/utils-V4fw_T9z.js","assets/originUtils-D69mHv66.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/jsonContext-SE-5k22x.js","assets/saveAPIKeyUtils-CqAN5-r5.js","assets/saveUtils-oCA1ZjYH.js"])))=>i.map(i=>d[i]); +import{i0 as Rt,iu as ut,V as ae,s as P,G as Le,Q as A,aZ as L,U as ht,ay as z,bV as vt,B as b,D as S,cy as ft,E as Q,F as St,_ as ze,d3 as Ye,da as He,aX as Tt,aS as _t,iv as kt,dR as Ft,gR as Mt,fs as Ct,cm as mt,iw as Ot,O as De,M as Pt,bX as $t,aG as Dt,I as Bt,cq as Nt,cu as Et,cs as Jt,ct as At,cG as Lt,ei as zt,cF as Ht,cr as Wt,cv as Gt,co as jt,dz as Ut,aK as qt,cg as he,el as Vt,eJ as ye,bx as Xt,ey as Yt,a$ as Kt,cx as Qt,es as Zt,cE as ei}from"./index-DKOmzAMm.js";import{h as dt,D as pt,i as ti,a as ii,p as We,c as si,N as Be,l as ni,d as ri,b as ai,e as oi,f as Ke,o as li,g as Qe,$ as Ze,W as et,j as ci,q as ui,U as hi,E as fi,L as tt,t as mi,k as di,m as pi,n as yi}from"./fetchRasterInfo-DWSe3scC.js";import{z as te,p as gi}from"./TileInfo-Bx6eEWV4.js";import{U as ke,j as xi,n as ve,D as yt,R as wi,u as Ii,l as bi,a as Ri,g as V,f as vi,m as Ge,s as Si,L as Ti,b as _i,c as Se,E as ki,W as Fi,h as Mi,d as je,P as Ci,T as Oi,r as Pi,e as it,F as $i,i as Di,N as Bi,k as ge,B as Ni,o as Ei,p as Ji,q as Ai}from"./dataUtils-DYQC_Kql.js";import{T as Ne,D as xe,j as st,r as nt,o as Li,V as Fe,J as be,e as zi,Z as Hi,C as Wi,U as Ee,S as gt,y as Ue,c as Gi,R as ji}from"./PolynomialTransform-BIabQn8W.js";import{_ as Ui}from"./QueueProcessor-DTdXzd4o.js";import{j as qi}from"./TilemapCache-6mrSWCBj.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./ReactiveMap-C7QHrros.js";import"./signal-swyOrDkM.js";import"./ByteSizeUnit-BsxeN7wM.js";let Vi=class{constructor(e=15e3,n=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,n)}decreaseRefCount(e,n){const i=e+"/"+n,s=this._cachedBlocks;if(s.has(i)){const a=s.get(i);return a.refCount--,a.refCount<=0&&(s.delete(i),a.controller&&a.controller.abort()),a.refCount}return 0}getBlock(e,n){const i=e+"/"+n,s=this._cachedBlocks;if(s.has(i)){const a=s.get(i);return a.ts=Date.now(),a.refCount++,s.delete(i),s.set(i,a),a.block}return null}putBlock(e,n,i,s){const a=this._cachedBlocks,r=e+"/"+n;if(a.has(r)){const l=a.get(r);l.ts=Date.now(),l.refCount++}else a.set(r,{block:i,ts:Date.now(),refCount:1,controller:s});this._trim(),this._updateTimer()}deleteBlock(e,n){const i=this._cachedBlocks,s=e+"/"+n;i.has(s)&&i.delete(s)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(this._timer!=null)return;const e=this._cachedBlocks;this._timer=setInterval(()=>{const n=Array.from(e),i=Date.now();for(let s=0;s=e.size)return;const n=Array.from(e);for(let i=0;ir.isResolved=!0).catch(()=>r.isRejected=!0),(l=a[e])==null||l.cache.set(n,r)}function Yi(t,e,n){var s;const i=Te.get(t);i?e!=null&&i[e]!=null?(s=i[e])==null||s.cache.delete(n):ie.deleteBlock(t,n):e==null&&ie.deleteBlock(t,n)}const lt=8,Ki=256;let Qi=0,J=class extends Rt(St){constructor(){super(...arguments),this._tileFetchQueue=new Ui({concurrency:32,process:(t,e)=>this._fetchRawTile(t.pyramidLevel,t.row,t.col,{...t.options,signal:e})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const t=Ne();this.addResolvingPromise(t),await this.when()}normalizeCtorArgs(t){return t!=null&&t.ioConfig&&(t={...t,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:te.create(),...t.ioConfig}}),t}get _isGlobalWrappableSource(){const{rasterInfo:t}=this,e=xe(t.spatialReference);return e!=null&&t.extent.width>=e/2}get _hasNoneOrGCSShiftTransform(){const{transform:t}=this.rasterInfo;return t==null||t.type==="gcs-shift"}set rasterJobHandler(t){var e,n;this._set("rasterJobHandler",t),this.datasetFormat==="Function"&&((n=(e=this.primaryRasters)==null?void 0:e.rasters)==null||n.forEach(i=>i.rasterJobHandler=t))}get rasterId(){return this.url||"rasterId-"+Qi++}set url(t){this._set("url",ut(t,ae.getLogger(this)))}async open(t){throw new P("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(t,e,n,i={}){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo,a=this.getTileExtentFromTileInfo(t,e,n,s);return i={noClip:!0,...i},this.fetchPixels(a,s.size[0],s.size[1],i)}async identify(t,e={}){var k;t=Le(A,t).clone().normalize();const{multidimensionalDefinition:n,timeExtent:i}=e,{rasterInfo:s}=this,{hasMultidimensionalTranspose:a,multidimensionalInfo:r}=s;let{transposedVariableName:l}=e;const o=r!=null&&a&&(i!=null||dt(n));o&&!l&&(l=n!=null&&n.length>0?n[0].variableName??void 0:r.variables[0].name,e={...e,transposedVariableName:l}),e=this._getRequestOptionsWithSliceId(e);const{spatialReference:c,extent:u}=s,{datumTransformation:h}=e;let f=st(t,c,h);if(!u.intersects(f))return{location:f,value:null};if(s.transform!=null){const C=s.transform.inverseTransform(f);if(!s.nativeExtent.intersects(C))return{location:C,value:null};f=C}let m=0;const g=l!=null&&r!=null&&s.hasMultidimensionalTranspose;if(this.datasetFormat==="Function"){const C=this.primaryRasters.rasters[0];if(g)return C.identify(f,e);const{pixelSize:E}=s,O=3,$=E.x*O/2,D=E.y*O/2,B=new L({xmin:f.x-$,xmax:f.x+$,ymin:f.y-D,ymax:f.y+D,spatialReference:c}),Z={interpolation:"nearest",multidimensionalDefinition:n,sliceId:e.sliceId},{pixelBlock:W}=await C.fetchPixels(B,O,O,Z),{pixelBlock:G}=await this.fetchPixels(B,O,O,Z);if(W==null)return{location:f,value:null};const U=Math.floor(O*O*.5),le=!W.mask||W.mask[U]?W.pixels.map(j=>j[U]):null;let X;return G!=null&&(X=!G.mask||G.mask[U]?G.pixels.map(j=>j[U]):void 0),{location:f,value:le,processedValue:X,pyramidLevel:0}}if(!g){if(e.srcResolution)m=nt(e.srcResolution,s,this.ioConfig.sampling).pyramidLevel;else if(m=await this.computeBestPyramidLevelForLocation(t,e),m==null)return{location:f,value:null}}const p=this.identifyPixelLocation(f,m,null,g);if(p===null)return{location:f,value:null};const{row:d,col:y,rowOffset:x,colOffset:w,blockWidth:I}=p,T=l??e.sliceId,R=rt(this.rasterId,T),_=`${m}/${d}/${y}`;let M=at(R,null,_);M==null&&(M=this.fetchRawTile(m,d,y,e),ot(R,null,_,M));const v=await M;if(!((k=v==null?void 0:v.pixels)!=null&&k.length))return{location:f,value:null};const F=x*I+w;return this._processIdentifyResult(v,{srcLocation:f,position:F,pyramidLevel:m,useTransposedTile:!!g,requestSomeSlices:o,identifyOptions:e})}async fetchPixels(t,e,n,i={}){t=Li(t),i=this._getRequestOptionsWithSliceId(i);const{_hasNoneOrGCSShiftTransform:s}=this;if(i.requestRawData&&s)return this._fetchPixels(t,e,n,i);const a=xe(t.spatialReference),r=Fe(t);if(a==null||r===0||r===1&&this._isGlobalWrappableSource&&s)return this._fetchPixels(t,e,n,i);if(r>=3)return{extent:t,pixelBlock:null};const l=[],{xmin:o,xmax:c}=t,u=Math.round(a/(c-o)*e),h=u-Math.round((a/2-o)/(c-o)*e);let f=0;const m=[];for(let y=0;y<=r;y++){const x=new L({xmin:y===0?o:-a/2,xmax:y===r?c-a*y:a/2,ymin:t.ymin,ymax:t.ymax,spatialReference:t.spatialReference}),w=y===0?u-h:y===r?e-f:u;f+=w,m.push(w);const I=i.disableWrapAround&&y>0?null:this._fetchPixels(x,w,n,i);l.push(I)}const g=(await Promise.all(l)).map(y=>y==null?void 0:y.pixelBlock);let p=null;const d={width:e,height:n};return this.rasterJobHandler?p=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:g,srcMosaicSize:d,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:m},i)).pixelBlock:p=ke(g,d,{blockWidths:m}),{extent:t,srcExtent:be(t,this.rasterInfo.spatialReference,i.datumTransformation),pixelBlock:p}}async fetchRawPixels(t,e,n,i={}){e={x:Math.floor(e.x),y:Math.floor(e.y)};const s=await this._fetchRawTiles(t,e,n,i),{nativeExtent:a,nativePixelSize:r,storageInfo:l}=this.rasterInfo,o=2**t,c=r.x*o,u=r.y*o,h=new L({xmin:a.xmin+c*e.x,xmax:a.xmin+c*(e.x+n.width-1),ymin:a.ymax-u*(e.y+n.height-1),ymax:a.ymax-u*e.y,spatialReference:a.spatialReference});if(!s)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:f,mosaicSize:m}=s;if(f.length===1&&f[0]!=null&&f[0].width===n.width&&f[0].height===n.height)return{extent:h,srcExtent:h,pixelBlock:s.pixelBlocks[0]};const g=t>0?l.pyramidBlockWidth:l.blockWidth,p=t>0?l.pyramidBlockHeight:l.blockHeight,d={x:e.x%g,y:e.y%p};let y;return this.rasterJobHandler?y=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:m,destDimension:n,clipOffset:d,clipSize:n,coefs:null,sampleSpacing:null,interpolation:i.interpolation,alignmentInfo:null,blockWidths:null},i)).pixelBlock:y=ke(f,m,{clipOffset:d,clipSize:n}),{extent:h,srcExtent:h,pixelBlock:y}}fetchRawTile(t,e,n,i){throw new P("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(t){return be(this.rasterInfo.extent,t)}decodePixelBlock(t,e){return!this.rasterJobHandler||e.useCanvas?xi(t,e):this.rasterJobHandler.decode({data:t,options:e})}async request(t,e,n=0){const{customFetchParameters:i}=this.ioConfig,{range:s,query:a,headers:r}=e;n=n??e.retryCount??this.ioConfig.retryCount;const l=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await ht(t,{...e,query:{...a,...i},headers:{...r,...l}})}catch(o){if(n>0)return n--,this.request(t,e,n);throw o}}getSliceIndex(t){const{multidimensionalInfo:e}=this.rasterInfo;return e==null||t==null||t.length===0?null:pt(t,e)}getTileExtentFromTileInfo(t,e,n,i){const s=i.lodAt(t);return this.getTileExtent({x:s.resolution,y:s.resolution},e,n,i.origin,i.spatialReference,i.size)}updateTileInfo(){const{storageInfo:t,spatialReference:e,extent:n,pixelSize:i}=this.rasterInfo,{pyramidResolutions:s}=t;if(!t.tileInfo){const a=[],r=t.maximumPyramidLevel||0;let l=(i.x+i.y)/2,o=1/.0254*96*l;for(let u=0;u<=r&&(a.unshift(new gi({level:r-u,resolution:l,scale:o})),u!==r);u++)if(s){const h=(s[u].x+s[u].y)/2;o*=h/l,l=h}else l*=2,o*=2;const c=new A({x:n.xmin,y:n.ymax,spatialReference:e});t.tileInfo=new te({origin:c,size:[t.blockWidth,t.blockHeight],spatialReference:e,lods:a}),t.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(t,e=512,n=512,i){const{width:s,height:a,nativeExtent:r,pixelSize:l,spatialReference:o}=t,c=new A({x:r.xmin,y:r.ymax,spatialReference:o});i==null&&(i=Math.max(0,Math.round(Math.log(Math.max(s,a))/Math.LN2-8)));const u=this.computeBlockBoundary(r,512,512,{x:r.xmin,y:r.ymax},[l],i);t.storageInfo=new ve({blockWidth:e,blockHeight:n,pyramidBlockWidth:e,pyramidBlockHeight:n,origin:c,firstPyramidLevel:1,maximumPyramidLevel:i,blockBoundary:u})}async computeBestPyramidLevelForLocation(t,e={}){return 0}computeBlockBoundary(t,e,n,i,s,a=0,r=2){if(s.length===1&&a>0){s=[...s];let{x:u,y:h}=s[0];for(let f=0;fl)return null;const m=this.getPyramidPixelSize(e),{x:g,y:p}=m,d=(o.y-f.y)/p/h,y=(f.x-o.x)/g/u,x=Math.min(h-1,Math.floor((d-Math.floor(d))*h)),w=Math.min(u-1,Math.floor((y-Math.floor(y))*u));return{pyramidLevel:e,row:Math.floor(d),col:Math.floor(y),rowOffset:x,colOffset:w,blockWidth:u,srcLocation:f}}getTileExtent(t,e,n,i,s,a){const[r,l]=a,o=i.x+n*r*t.x,c=o+r*t.x,u=i.y-e*l*t.y,h=u-l*t.y;return new L({xmin:o,xmax:c,ymin:h,ymax:u,spatialReference:s})}getBlockWidthHeight(t){return{blockWidth:t>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:t>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(t,e,n){const i=this.rasterInfo.storageInfo.blockBoundary[t];return!i||i.maxRowe||i.minCol>n}updateImageSpaceRasterInfo(t){const{extent:e,pixelSize:n}=t;if(e.xmin===-.5&&e.ymax===.5&&n.x===1&&n.y===1&&t.transform==null)return;const{width:i,height:s}=t,a=z.WebMercator;t.spatialReference=a,t.extent=t.nativeExtent=new L({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:a}),t.isPseudoSpatialReference=!0,t.transform=null,t.pixelSize=new A({x:1,y:1,spatialReference:a});const{extent:r,storageInfo:l}=t;if(l){l.origin=new A({x:r.xmin,y:r.ymax,spatialReference:a});const{pyramidResolutions:o,tileInfo:c}=l;if(o&&o.forEach(u=>{u.x/=n.x,u.y/=n.y}),c){c.origin=l.origin;const u=(t.nativePixelSize.x+t.nativePixelSize.y)/2;c.lods.forEach((h,f)=>{h.resolution=u*2**f,h.scale=96*h.resolution/.0254})}}}async _fetchPixels(t,e,n,i={}){let s=Fe(t);if(s>=2)return{extent:t,pixelBlock:null};const a=this._getSourceDataInfo(t,e,n,i),{pyramidLevel:r,srcResolution:l,srcExtent:o,srcWidth:c,srcHeight:u,ul:h}=a;if(c===0||u===0)return{extent:t,srcExtent:o,pixelBlock:null};const{rasterInfo:f}=this,m=f.transform,g=(m==null?void 0:m.type)==="gcs-shift",p=xe(t.spatialReference)!=null;!g&&p||(s=Fe(a.srcExtent,g));const d=await this._fetchRawTiles(r,h,{width:c,height:u,wrapCount:s},i);if(!d)return{extent:t,srcExtent:o,pixelBlock:null};const y=f.storageInfo,x=r>0?y.pyramidBlockWidth:y.blockWidth,w=r>0?y.pyramidBlockHeight:y.blockHeight;let{x:I,y:T}=f.pixelSize;if(r>0){const{pyramidResolutions:j,pyramidScalingFactor:bt}=y;if(j!=null&&j[r-1])({x:I,y:T}=j[r-1]);else{const Xe=bt**r;I*=Xe,T*=Xe}}const R=f.spatialReference,_=new A({x:I,y:T,spatialReference:R}),M=x===c&&w===u&&h.x%x==0&&h.y%w==0,v=new A({x:(t.xmax-t.xmin)/e,y:(t.ymax-t.ymin)/n,spatialReference:t.spatialReference}),F=!t.spatialReference.equals(R),k=R.isGeographic?1e-9:1e-4,{datumTransformation:C}=i;if(!F&&M&&d.pixelBlocks.length===1&&x===e&&w===n&&Zi(l,v,k))return{extent:t,srcExtent:o,srcTilePixelSize:_,pixelBlock:d.pixelBlocks[0]};const E=p&&xe(o.spatialReference)!=null&&this._hasNoneOrGCSShiftTransform,O=i.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");O&&!this.rasterJobHandler&&await Ne();const $=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:t,srcBufferExtent:d.extent,pixelSize:v.toJSON(),datumTransformation:C,rasterTransform:m,hasWrapAround:s>0||E,isAdaptive:this.ioConfig.optimizeProjectionAccuracy!==!1,includeGCSGrid:O},i):zi({projectedExtent:t,srcBufferExtent:d.extent,pixelSize:v,datumTransformation:C,rasterTransform:m,hasWrapAround:s>0||E,isAdaptive:!1,includeGCSGrid:O});let D;const B=!i.requestRawData,Z={rows:$.spacing[0],cols:$.spacing[1]},W=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(r,d.extent.xmin):void 0,{pixelBlocks:G,mosaicSize:U,isPartiallyFilled:le}=d;let X=null;if(this.rasterJobHandler)({pixelBlock:D,localNorthDirections:X}=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:G,srcMosaicSize:U,destDimension:B?{width:e,height:n}:null,coefs:B?$.coefficients:null,sampleSpacing:B?Z:null,projectDirections:O,gcsGrid:O?$.gcsGrid:null,isUV:this.rasterInfo.dataType==="vector-uv",interpolation:i.interpolation,alignmentInfo:W,blockWidths:null},i));else{const j=ke(G,U,{alignmentInfo:W});D=B?yt(j,{width:e,height:n},$.coefficients,Z,i.interpolation):j,O&&$.gcsGrid&&(X=wi({width:e,height:n},$.gcsGrid),D=Ii(D,this.rasterInfo.dataType,X))}return i.requestRawData||O?{extent:t,srcExtent:o,srcTilePixelSize:_,pixelBlock:D,transformGrid:$,localNorthDirections:X,isPartiallyFilled:le}:{extent:t,srcExtent:o,srcTilePixelSize:_,pixelBlock:D}}async _fetchRawTiles(t,e,n,i){const{origin:s,blockBoundary:a}=this.rasterInfo.storageInfo,{blockWidth:r,blockHeight:l}=this.getBlockWidthHeight(t);let{x:o,y:c}=e,{width:u,height:h,wrapCount:f}=n;const m=this._getRasterTileAlignmentInfo(t,0);i.buffer&&(o-=i.buffer.cols,c-=i.buffer.rows,u+=2*i.buffer.cols,h+=2*i.buffer.rows);let g=0,p=0,d=0;f&&m!=null&&({worldColumnCountFromOrigin:p,originColumnOffset:d,rightPadding:g}=m,p*m.blockWidth-g>=o+u&&(g=0));const y=Math.floor(o/r),x=Math.floor(c/l),w=Math.floor((o+u+g-1)/r),I=Math.floor((c+h+g-1)/l),T=a[t];if(!T)return null;const{minRow:R,minCol:_,maxCol:M,maxRow:v}=T;if(f===0&&(Iv||y>M))return null;const F=new Array;let k=!1;const C=this.ioConfig.allowPartialFill==null?i.allowPartialFill:this.ioConfig.allowPartialFill;for(let W=x;W<=I;W++)for(let G=y;G<=w;G++){let U=G;if(!i.disableWrapAround&&f&&m!=null&&p<=G&&(U=G-p-d),W>=R&&U>=_&&v>=W&&M>=U){const le=this._tileFetchQueue.push({pyramidLevel:t,row:W,col:U,options:i},{signal:i.signal});C?F.push(new Promise(X=>{le.then(j=>X(j)).catch(()=>{k=!0,X(null)})})):F.push(le)}else F.push(Promise.resolve(null))}if(F.length===0)return null;const E=await Promise.all(F),O={height:(I-x+1)*l,width:(w-y+1)*r},{spatialReference:$}=this.rasterInfo,D=this.getPyramidPixelSize(t),{x:B,y:Z}=D;return{extent:new L({xmin:s.x+y*r*B,xmax:s.x+(w+1)*r*B,ymin:s.y-(I+1)*l*Z,ymax:s.y-x*l*Z,spatialReference:$}),pixelBlocks:E,mosaicSize:O,isPartiallyFilled:k}}_fetchRawTile(t,e,n,i){const s=this.rasterInfo.storageInfo.blockBoundary[t];if(!s)return Promise.resolve(null);const{minRow:a,minCol:r,maxCol:l,maxRow:o}=s;if(eo||n>l)return Promise.resolve(null);const c=rt(this.rasterId,i.sliceId),u=`${t}/${e}/${n}`;let h=at(c,i.registryId,u);if(h==null){const f=new AbortController;h=this.fetchRawTile(t,e,n,{...i,signal:f.signal}),ot(c,i.registryId,u,h,f),h.catch(()=>Yi(c,i.registryId,u))}return i.signal&&vt(i,()=>{Xi(c,i.registryId,u)}),h}_computeMagDirValues(t){var o;const{bandCount:e,dataType:n}=this.rasterInfo;if(!(e===2&&n==="vector-magdir"||n==="vector-uv")||(t==null?void 0:t.length)!==2||!((o=t[0])!=null&&o.length))return null;const i=t[0].length;if(n==="vector-magdir"){const c=t[1].map(u=>(u+360)%360);return[t[0],c]}const[s,a]=t,r=[],l=[];for(let c=0;c=16,f=o===a&&this._requireTooManySrcTiles(r,l,e,n);if(h||f||r===0||l===0){const m=new A({x:(t.xmax-t.xmin)/e,y:(t.ymax-t.ymin)/n,spatialReference:t.spatialReference});let g=Wi(m,this.rasterInfo.spatialReference,t,s.datumTransformation);const p=!g||i.srcResolution&&g.x+g.y=d){const y=2**d;g={x:i.srcResolution.x*y,y:i.srcResolution.y*y}}}g&&(s.srcResolution=g,this._updateSourceDataInfo(t,s))}return this._requireTooManySrcTiles(s.srcWidth,s.srcHeight,e,n)&&(s.srcWidth=0,s.srcHeight=0),s}_requireTooManySrcTiles(t,e,n,i){const{tileInfo:s}=this.rasterInfo.storageInfo,a=Math.ceil(t/s.size[0])*Math.ceil(e/s.size[1]),r=t/n,l=e/i,o=Math.max(1,(n+i)/1024);return a>=Ki*o||r>lt||l>lt}_updateSourceDataInfo(t,e){e.srcWidth=0,e.srcHeight=0;const{rasterInfo:n}=this,i=n.spatialReference,{srcResolution:s,datumTransformation:a}=e,{pyramidLevel:r,pyramidResolution:l,excessiveReading:o}=nt(s,n,this.ioConfig.sampling);if(o)return;let c=e.srcExtent||be(t,i,a);if(c==null)return;const u=n.transform;u&&(c=u.inverseTransform(c)),e.srcExtent=c;const{x:h,y:f}=n.storageInfo.origin,m=Math.floor((c.xmin-h)/l.x+.1),g=Math.floor((f-c.ymax)/l.y+.1),p=Math.floor((c.xmax-h)/l.x-.1),d=Math.floor((f-c.ymin)/l.y-.1),y=c.width<.1*l.x?0:p-m+1,x=c.height<.1*l.y?0:d-g+1;e.pyramidLevel=r,e.pyramidResolution=l,e.srcWidth=y,e.srcHeight=x,e.ul={x:m,y:g}}_getRequestOptionsWithSliceId(t){return this.rasterInfo.multidimensionalInfo!=null&&t.sliceId==null&&(t={...t,sliceId:this.getSliceIndex(t.multidimensionalDefinition)}),t}_processIdentifyResult(t,e){const{srcLocation:n,position:i,pyramidLevel:s,useTransposedTile:a}=e,r=t.pixels[0].length/t.width/t.height;if(!(!t.mask||t.mask[i]))return{location:n,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(l==null||!a){const d=t.pixels.map(w=>w[i]),y={location:n,value:d,pyramidLevel:s},x=this._computeMagDirValues(d.map(w=>[w]));return x!=null&&x.length&&(y.magdirValue=x.map(w=>w[0])),y}let o=t.pixels.map(d=>d.slice(i*r,i*r+r)),c=this._computeMagDirValues(o);const{requestSomeSlices:u,identifyOptions:h}=e;let f=ti(l,h.transposedVariableName);if(u){const d=ii(f,h.multidimensionalDefinition,h.timeExtent);o=o.map(y=>d.map(x=>y[x])),c=c==null?void 0:c.map(y=>d.map(x=>y[x])),f=d.map(y=>f[y])}const m=t.noDataValues||this.rasterInfo.noDataValue,g={pixels:o,pixelType:t.pixelType};let p;return m!=null&&(Ri(g,m),p=g.mask),{location:n,value:null,dataSeries:f.map((d,y)=>{const x={value:(p==null?void 0:p[y])===0?null:o.map(w=>w[y]),multidimensionalDefinition:d.multidimensionalDefinition.map(w=>new We({...w,isSlice:!0}))};return c!=null&&c.length&&(x.magdirValue=[c[0][y],c[1][y]]),x}),pyramidLevel:s}}};function Zi(t,e,n){return Math.abs(t.x-e.x){const{contains:o,intersects:c}=await import("./geometryEngine-D2dsojOY.js");return{contains:o,intersects:c}},__vite__mapDeps([0,1,2,3,4,5]));return l(e,n)?n.type==="polyline"?ss(t,e,n):r(n,e)?t:ts(t,e,n):new V({pixelType:t.pixelType,width:i,height:s,mask:a,maskIsAlpha:!1,pixels:[...t.pixels]})}function ts(t,e,n){if(!t)return t;const{width:i,height:s}=t,a=e.width/i,r=e.height/s,{xmin:l,ymax:o}=e;let c;if(n.type==="extent"){const d=(n.xmin-l)/a,y=(n.xmax-l)/a,x=(o-n.ymax)/r,w=(o-n.ymin)/r;c=[[[d,x],[d,w],[y,w],[y,x],[d,x]]]}else c=n.rings.map(d=>d.map(([y,x])=>[(y-l)/a,(o-x)/r]));const u=document.createElement("canvas");u.width=i,u.height=s;const h=u.getContext("2d");h.fillStyle="#f00",h.beginPath(),c.forEach(d=>{h.moveTo(d[0][0],d[0][1]);for(let y=0;y127?255:0);return new V({pixelType:t.pixelType,width:i,height:s,mask:p,maskIsAlpha:!1,pixels:[...t.pixels]})}function is(t,e,n){const{width:i,height:s}=t,a=new Uint8Array(i*s),r=e.width/i,l=e.height/s;if(n.width/r<.5||n.height/l<.5)return new V({pixelType:t.pixelType,width:i,height:s,mask:a,pixels:[...t.pixels]});const{xmin:o,xmax:c,ymin:u,ymax:h}=e,{xmin:f,xmax:m,ymin:g,ymax:p}=n,d=Math.max(o,f),y=Math.min(c,m),x=Math.max(u,g),w=Math.min(h,p),I=.5*r,T=.5*l;if(y-dc-I||x>h-T||w.5&&_%1<.5||C===E&&M%1>.5&&v%1<.5)return new V({pixelType:t.pixelType,width:i,height:s,mask:a,pixels:[...t.pixels]});if(F===0&&C===0&&k===i&&E===s)return t;const O=t.mask;for(let $=C;$<=E;$++)for(let D=F;D<=k;D++){const B=$*i+D;a[B]=O?O[B]:255}return new V({pixelType:t.pixelType,width:i,height:s,mask:a,pixels:[...t.pixels]})}function ss(t,e,n){const{width:i,height:s}=t,a=new Uint8Array(i*s),r=e.width/i,l=e.height/s,{xmin:o,ymax:c}=e,{paths:u}=n,h=t.mask;for(let f=0;fp?a*Math.round((h-p)/a):0),m=d-(mp?a*Math.round((f-p)/a):0),g=d-(gp?a*Math.floor((h-p)/a+.1):0),m=d-(mg.rasterJobHandler=this.rasterJobHandler)));const{rasters:i,rasterIds:s}=this.primaryRasters,a=i.map(g=>g.rasterInfo?void 0:g.open(e));await Promise.all(a);const r=i.map(({rasterInfo:g})=>g),l=n.bind({rasterInfos:r,rasterIds:s});if(n.rawSourceRasterInfos=r,!l.success||r.length===0)throw new P("raster-function:open",`cannot bind the function: ${l.error??""}`);const o=n.functionName==="Table"?n:(m=n.functionArguments)==null?void 0:m.raster;(o==null?void 0:o.functionName)==="Table"&&(n.rasterInfo.attributeTable=He.fromJSON(o.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=r[0];this.hasUniqueSourceStorageInfo=r.length===1||r.slice(1).every(g=>as(g,c)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",n.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){var e;return(e=this.rasterJobHandler)==null?void 0:e.updateRasterFunction(this.rasterFunction)}async fetchPixels(e,n,i,s={}){var I,T;const{rasters:a,rasterIds:r}=this.primaryRasters;let l=!1;const{interpolation:o}=s,c=(I=this.rasterFunction.flatWebGLFunctionChain)==null?void 0:I.hasFocalFunction;!s.requestRawData&&c&&(l=a.length===1&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:l});const u=a.map(R=>R.fetchPixels(e,n,i,s)),h=await Promise.all(u),f=h.map(R=>R.pixelBlock),m=l||s.requestRawData?h.map(R=>R.srcTilePixelSize):null;if(s.skipRasterFunction||f.every(R=>R==null))return h[0];const g=((T=h.find(R=>R.pixelBlock!=null))==null?void 0:T.extent)??e;let p=this.rasterJobHandler?await this.rasterJobHandler.process({extent:g,primaryPixelBlocks:f,primaryPixelSizes:m,primaryRasterIds:r}):this.rasterFunction.process({extent:g,primaryPixelBlocks:f,primaryPixelSizes:m,primaryRasterIds:r});const{transformGrid:d}=h[0];if(!l||p==null||d==null){const R=s.noClip?null:this.getClippingGeometry(g.spatialReference);return s.noClip||s.requestRawData||p==null||!R||(p=await Je(p,g,R)),{...h[0],pixelBlock:p}}const y={rows:d.spacing[0],cols:d.spacing[1]};let x;this.rasterJobHandler?x=(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[p],srcMosaicSize:{width:p.width,height:p.height},destDimension:{width:n,height:i},coefs:d.coefficients,sampleSpacing:y,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:o,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:x=yt(p,{width:n,height:i},d.coefficients,y,o);const w=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||s.requestRawData||x==null||w==null||(x=await Je(x,e,w)),{extent:e,srcExtent:h[0].srcExtent,pixelBlock:x}}getClippingGeometry(e){const n=this._clippingGeometry.get("0");if(!e||!n)return n;const i=os(e);let s=this._clippingGeometry.get(i);return s!=null||(s=e.equals(n.spatialReference)?n:Ee(n,e),this._clippingGeometry.set(i,s)),s}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let n=e==null?void 0:e.clippingGeometry;if(n&&e.clippingType==="inside"){const{extent:i}=this.rasterInfo,{difference:s,densify:a}=await ze(async()=>{const{difference:l,densify:o}=await import("./geometryEngine-D2dsojOY.js");return{difference:l,densify:o}},__vite__mapDeps([0,1,2,3,4,5]));let r=a(Tt.fromExtent(i),2*(i.width+i.height)/rs);r=Ee(r,n.spatialReference),n=s(r,n)}this._clippingGeometry.clear(),n&&this._clippingGeometry.set("0",n)}};b([S({type:String,json:{write:!0}})],se.prototype,"datasetFormat",void 0),b([S()],se.prototype,"tileType",void 0),b([S()],se.prototype,"rasterFunction",void 0),b([S()],se.prototype,"primaryRasters",void 0),se=b([Q("esri.layers.support.rasterDatasets.FunctionRaster")],se);const xt=se;function as(t,e){const{storageInfo:n,pixelSize:i,spatialReference:s,extent:a}=t,{storageInfo:r,pixelSize:l,spatialReference:o,extent:c}=e;return i.x===l.x&&i.y===l.y&&s.equals(o)&&a.equals(c)&&n.blockHeight===r.blockHeight&&n.blockWidth===r.blockWidth&&n.maximumPyramidLevel===r.maximumPyramidLevel}function os(t){return String(t.wkid??t.wkt??t.wkt2)}const ls=t=>{let e=class extends t{constructor(...i){var s,a;super(...i),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation="nearest",this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=((a=(s=i[0])==null?void 0:s.raster)==null?void 0:a.datasetFormat)==="Function"}get fullExtent(){var i;return(i=this.serviceRasterInfo)==null?void 0:i.extent}set multidimensionalDefinition(i){this._set("multidimensionalDefinition",i),this.updateRenderer()}set rasterFunction(i){var s;((s=i==null?void 0:i.functionName)==null?void 0:s.toLowerCase())==="none"&&(i=void 0),this._set("rasterFunction",i),this.updateRasterFunction()}get rasterInfo(){return kt(ae.getLogger(this),"rasterInfo",{replacement:"serviceRasterInfo",version:"4.29",warnOnce:!0}),this._get("serviceRasterInfo")}set url(i){this._set("url",ut(i,ae.getLogger(this)))}set renderer(i){i==null&&this.rasterFunction==null?this._configDefaultRenderer("override"):(this._set("renderer",i),this.updateRenderer())}readRenderer(i,s,a){var l,o;const r=(o=(l=s==null?void 0:s.layerDefinition)==null?void 0:l.drawingInfo)==null?void 0:o.renderer;return ai(r,a)||void 0}async convertVectorFieldData(i,s){const{serviceRasterInfo:a}=this;if(i==null||!a)return null;const r=this._rasterJobHandler.instance,l=a.dataType;return r?r.convertVectorFieldData({pixelBlock:i,dataType:l},s):vi(i,l)}async computeStatisticsHistograms(i,s){await this.load(s),i=Le(oi,i).clone();const{serviceRasterInfo:a}=this;if(a==null)throw new P("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:r}=i;if(r==null)throw new P("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let l=r;const{spatialReference:o}=a;r.spatialReference.equals(o)||(await Ne(),l=r.type==="extent"?be(r,o):Ee(r,o));const c=i.pixelSize??new A({x:a.pixelSize.x,y:a.pixelSize.y,spatialReference:o}),{extent:u,width:h,height:f}=ns(a,l,c),m=await this.fetchPixels(u,h,f,{...s,interpolation:"nearest"});if(m.pixelBlock==null)throw new P("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const g=await Je(m.pixelBlock,u,l),p=this._rasterJobHandler.instance;return p?p.computeStatisticsHistograms({pixelBlock:g},s):Ge(g)}async createFlowMesh(i,s){const a=this._rasterJobHandler.instance;return a?a.createFlowMesh(i,s):Si(i.meshType,i.simulationSettings,i.flowData,s.signal!=null?s.signal:new AbortController().signal)}normalizeRasterFetchOptions(i){var l,o;const{multidimensionalInfo:s}=this.serviceRasterInfo??{};if(s==null)return i;let a=i.multidimensionalDefinition||this.multidimensionalDefinition;a!=null&&a.length||(a=Ke(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const r=i.timeExtent||this.timeExtent;if(a!=null&&r!=null&&(r.start!=null||r.end!=null)){a=a.map(y=>y.clone());const c=(o=(l=s.variables.find(({name:y})=>y===a[0].variableName))==null?void 0:l.dimensions)==null?void 0:o.find(({name:y})=>y==="StdTime"),u=a.find(({dimensionName:y})=>y==="StdTime");if(!c||!u)return{...i,multidimensionalDefinition:null};const{start:h,end:f}=r,m=h==null?null:h.getTime(),g=f==null?null:f.getTime(),p=m??g,d=g??m;if(c.values!=null){const y=c.values.filter(x=>{if(Array.isArray(x)){if(p===d)return x[0]<=p&&x[1]>=p;const w=x[0]<=p&&x[1]>p||x[0]=d,I=x[0]>=p&&x[1]<=d||x[0]d;return w||I}return p===d?x===p:x>=p&&x<=d});if(y.length){const x=y.sort((w,I)=>{const T=Array.isArray(w)?w[0]:w,R=Array.isArray(w)?w[1]:w,_=Array.isArray(I)?I[0]:I,M=Array.isArray(I)?I[1]:I;return p===d?T-_:Math.abs(R-d)-Math.abs(M-d)})[0];u.values=[x]}else a=null}else if(c.hasRegularIntervals&&c.extent){const[y,x]=c.extent;p>x||d1&&i.forEach(d=>m[d.url]=d);const g=gt(((h=r.functionDefinition)==null?void 0:h.toJSON())??r.toJSON(),m),p=new xt({rasterFunction:g});p.rasterJobHandler=this._rasterJobHandler.instance,await p.open(),this._cachedRasterFunctionJson=(f=this.rasterFunction)==null?void 0:f.toJSON(),this.raster=p}else this.raster=s,this._cachedRasterFunctionJson=null,await s.when();if(this._cachedRendererJson=null,!a&&!r)return;const{bandIds:l}=this,{bandCount:o}=this.raster.rasterInfo,c=l!=null&&l.length?l.some(m=>m>=o):o>=3;l&&(c||this.renderer&&this.renderer.type!=="raster-stretch")&&this._set("bandIds",null),this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:i,symbolizer:s}=this;if(!i||!s||!this.renderer)return;const{rasterInfo:a}=this.raster,r=Qe(a,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),l=r==null?void 0:r.name,o=Ze({...this.renderer.toJSON(),variableName:l});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(o))return;const c=this._rasterJobHandler.instance;c&&(s.rasterInfo=et(a,l),s.rendererJSON=o,s.bind(),await c.updateSymbolizer(s),this._cachedRendererJson=o)}async applyRenderer(i,s){const a=i==null?void 0:i.pixelBlock;if(!(a!=null&&a.pixels&&a.pixels.length>0))return null;let r;await this.updateRenderer();const l=this._rasterJobHandler.instance,o=this.bandIds??[];return r=l?await l.symbolize({...i,simpleStretchParams:s,bandIds:o}):this.symbolizer.symbolize({...i,simpleStretchParams:s,bandIds:o}),r}getTileUrl(i,s,a){return this.raster.datasetFormat==="RasterTileServer"?`${this.url}/tile/${i}/${s}/${a}`:""}getCompatibleTileInfo(i,s,a=!1){if(!this.loaded||s==null)return null;if(a&&i.equals(this.spatialReference))return this.tileInfo;const r=Ft(i);return te.create({size:256,spatialReference:i,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:s.xmin,y:s.ymax}})}getCompatibleFullExtent(i){var s;return this.loaded?((s=this._compatibleFullExtent)!=null&&s.spatialReference.equals(i)||(this._compatibleFullExtent=this.raster.computeExtent(i)),this._compatibleFullExtent):null}async fetchTile(i,s,a,r={}){var o;if(n(this),r.requestAsImageElement){const c=this.getTileUrl(i,s,a);return ht(c,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r.signal}).then(u=>u.data)}const{serviceRasterInfo:l}=this;if(l.multidimensionalInfo!=null&&(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition==null){const c=r.tileInfo||l.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(i,s,a,c),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),((o=this.renderer)==null?void 0:o.type)==="raster-shaded-relief"&&(r={...r,buffer:{cols:1,rows:1}}),this.raster.fetchTile(i,s,a,r)}async fetchPixels(i,s,a,r={}){return this.serviceRasterInfo.multidimensionalInfo!=null&&(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition==null?{extent:i,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),s=Math.round(s),a=Math.round(a),this.raster.fetchPixels(i,s,a,r))}async identify(i,s={}){var o;await this.load();const{raster:a,serviceRasterInfo:r}=this;if((r==null?void 0:r.multidimensionalInfo)!=null&&!(r.hasMultidimensionalTranspose&&(dt(s.multidimensionalDefinition)||s.transposedVariableName||s.timeExtent))&&(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition==null)return{location:i,value:null};const l=(o=this.multidimensionalSubset)==null?void 0:o.areaOfInterest;if(l&&!l.contains(i))throw new P("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return a.identify(i,s)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){var r,l,o;const i=(r=this.serviceRasterInfo)==null?void 0:r.multidimensionalInfo;if(i==null||((l=this.serviceRasterInfo)==null?void 0:l.dataType)!=="standard-time")return!1;const s=this.multidimensionalDefinition,a=(o=s==null?void 0:s[0])==null?void 0:o.variableName;return i.variables.some(c=>c.name===a&&(!(s!=null&&s[0].dimensionName)||c.dimensions.some(u=>u.name==="StdTime")))}getStandardTimeValue(i){return new Date(24*(i-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(i){var a;const s=i??((a=this.serviceRasterInfo)==null?void 0:a.multidimensionalInfo);return ci(this.multidimensionalSubset,s)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=Ke(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&this.raster.datasetFormat==="Function"&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}_initJobHandler(){if(this._rasterJobHandler.connectionPromise!=null)return this._rasterJobHandler.connectionPromise;const i=new mi;return this._rasterJobHandler.connectionPromise=i.initialize().then(async()=>{n(this),this._rasterJobHandler.instance=i,this.raster.rasterJobHandler=i,this.raster.datasetFormat==="Function"&&this.raster.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{}),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){var i;if(this.interpolation==null){n(this);const{raster:s}=this,a=ui(s.rasterInfo,s.tileType,(i=this.sourceJSON)==null?void 0:i.defaultResamplingMethod);this._set("interpolation",a)}}_configDefaultRenderer(i="no"){var h,f;n(this);const{rasterInfo:s}=this.raster;!this.bandIds&&s.bandCount>1&&(this.bandIds=hi(s));const a=Qe(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=a==null?void 0:a.name,l=fi(this.raster);if(!this.renderer||i==="override"){const m=tt(s,{bandIds:this.bandIds,variableName:r,rasterFunctionColorRamp:l}),g=s.statistics,p=g&&g.length>0?g[0]:null,d=(p==null?void 0:p.max)??0,y=(p==null?void 0:p.min)??0;this.raster.datasetFormat==="WCSServer"&&m.type==="raster-stretch"&&(d>1e24||y<-1e24)&&(m.dynamicRangeAdjustment=!0,m.statistics=null,m.stretchType==="none"&&(m.stretchType="min-max")),this.renderer=m}const o=Ze({...this.renderer.toJSON(),variableName:r}),c=et(s,r);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=c):this.symbolizer=new Ti({rendererJSON:o,rasterInfo:c});const u=this.symbolizer.bind();if(u.success){if(i==="auto"){const{colormap:m}=this.raster.rasterInfo,g=this.renderer;if(m!=null&&g.type==="raster-colormap"){const p=tt(this.raster.rasterInfo);JSON.stringify(p)!==JSON.stringify(g)&&this._configDefaultRenderer("override")}else if(g.type==="raster-stretch"){const p=(h=this.bandIds)==null?void 0:h.length,d=(f=g.statistics)==null?void 0:f.length;!g.dynamicRangeAdjustment&&d&&p&&d!==p&&this._configDefaultRenderer("override")}}}else ae.getLogger(this).warn("imagery-tile-mixin",u.error||"The given renderer is not supported by the layer."),i==="auto"&&this._configDefaultRenderer("override")}};function n(i){if(!i.raster||!i.serviceRasterInfo)throw new P("imagery-tile","no raster")}return b([S({clonable:!1})],e.prototype,"_cachedRendererJson",void 0),b([S({clonable:!1})],e.prototype,"_cachedRasterFunctionJson",void 0),b([S({clonable:!1})],e.prototype,"_compatibleFullExtent",void 0),b([S({clonable:!1})],e.prototype,"_isConstructedFromFunctionRaster",void 0),b([S({clonable:!1})],e.prototype,"_rasterJobHandler",void 0),b([S()],e.prototype,"bandIds",void 0),b([S({json:{origins:{service:{read:{source:"copyrightText"}}}}})],e.prototype,"copyright",void 0),b([S({json:{read:!1}})],e.prototype,"fullExtent",null),b([S()],e.prototype,"interpolation",void 0),b([S()],e.prototype,"ioConfig",void 0),b([S({type:[We],json:{write:!0}})],e.prototype,"multidimensionalDefinition",null),b([S({type:si,json:{write:!0}})],e.prototype,"multidimensionalSubset",void 0),b([S()],e.prototype,"raster",void 0),b([S({type:Be,json:{name:"renderingRule",write:!0}})],e.prototype,"rasterFunction",null),b([S({readOnly:!0})],e.prototype,"rasterInfo",null),b([S()],e.prototype,"serviceRasterInfo",void 0),b([S()],e.prototype,"sourceJSON",void 0),b([S({readOnly:!0,type:z,json:{read:!1}})],e.prototype,"spatialReference",void 0),b([S({type:te})],e.prototype,"tileInfo",void 0),b([S(ft)],e.prototype,"url",null),b([S({types:ni,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){var s;const i=((s=this.renderer)==null?void 0:s.type)==="raster-stretch"&&this.renderer.stretchType==="none"&&!this.renderer.useGamma;return{enabled:!this.loaded||this.raster.tileType==="Raster"||!i}}},origins:{"web-scene":{types:ri,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:i=>({enabled:i&&i.type!=="vector-field"&&i.type!=="flow"})}}}}})],e.prototype,"renderer",null),b([_t("renderer")],e.prototype,"readRenderer",null),b([S({clonable:!1})],e.prototype,"symbolizer",void 0),e=b([Q("esri.layers.mixins.ImageryTileMixin")],e),e};function wt(t){return["x","e","east","long","longitude"].includes(t.toLowerCase())}function It(t){return["y","n","west","lat","latitude"].includes(t.toLowerCase())}function cs(t){const{axes:e}=t.domain,n=Object.keys(e),i=[],s=[];let a=-1,r=-1,l=[];for(let x=0;xT.push(typeof _=="string"?new Date(_).getTime():_));const R=T[1]-T[0];i.push([T[0]-.5*R,T[T.length-1]+.5*R]),s.push(R)}else{const{start:R,stop:_,num:M}=I,v=(_-R)/(M-1);i.push([R-.5*v,_+.5*v]),s.push(v);for(let F=0;F-1&&r===-1?r=a===0?1:0:r>-1&&a===-1?a=r===0?1:0:r===-1&&a===-1&&(a=0,r=1),l=l.filter((x,w)=>!(w===a||w===r));const{referencing:o}=t.domain,c=o.find(x=>x.coordinates.includes(n[a])).system.id,u=c==null?void 0:c.slice(c.lastIndexOf("/")+1),h=u==null||u==="CRS84"?4326:Number(u),f=new z({wkid:h}),[m,g]=i[a],[p,d]=i[r],y=new L({xmin:m,xmax:g,ymin:p,ymax:d,spatialReference:f});return{width:Math.round(y.width/s[a]),height:Math.round(y.height/s[r]),extent:y,dimensions:l}}function Me(t){const e=Ct();return e?t[e]??Object.values(t)[0]:Object.values(t)[0]}function Ce(){return Math.round(255*Math.random())}function us(t){var i,s;const e={},{parameters:n}=t;if(!n)return e;for(const[a,r]of Object.entries(n)){const{type:l,description:o,unit:c,categoryEncoding:u,observedProperty:h}=r;if(l==="Parameter"&&(e[a]={},o&&(e[a].description=Me(o)),c&&(e[a].unit=c.label?Me(c.label):null,e[a].symbol=(i=c.symbol)==null?void 0:i.value),u)){const f=Object.entries(u).map((p,d)=>({OID:d,Value:Number(p[1]),ClassName:p[0].slice(p[0].lastIndexOf("/")+1),Count:1}));let m=!1;(s=h==null?void 0:h.categories)!=null&&s.length&&(h.categories.forEach(p=>{if(!p.id)return;const d=p.id.slice(p.id.lastIndexOf("/")+1),y=f.find(w=>w.ClassName===d);if(!y)return;const x=p.label?Me(p.label):null;if(y.Label=x,p.preferredColor){const w=Mt.fromHex(p.preferredColor);w&&(m=!0,y.Red=w.r,y.Green=w.g,y.Blue=w.b)}}),m&&f.forEach(p=>{p.Red==null&&(p.Red=Ce(),p.Green=Ce(),p.Blue=Ce())}));const g={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:f.map(p=>({attributes:p}))};m&&g.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),e[a].attributeTable=g}}return e}function hs(t){let e=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let i=0;in&&(n=s))}return _i(e,n)}function fs(t,e,n){const i=t.map((o,c)=>({name:o,count:e[c]})).sort((o,c)=>o.name>c.name?-1:1),s=(a=1,o=>a*=o.count);var a;const r=[...i.slice(1),{name:"",count:1}].reverse().map(s).reverse();let l=0;for(let o=t.length-1;o>=0;o--)l+=r[i.findIndex(({name:c})=>c===t[o])]*(n%e[o]),n=Math.floor(n/e[o]);return l}function ms(t){var f;const{width:e,height:n,extent:i,dimensions:s}=cs(t),{ranges:a}=t,r=Object.keys(a).sort((m,g)=>mo[m.name]&&Object.assign(m,o[m.name]));const c=l.length?{variables:l}:void 0,u=[];for(let m=0;m2?m*x.slice(0,-2).reduce((v,F)=>v*F):0,I=y.slice(0,-2),T=x.slice(0,-2),R=d==="float"?"f32":hs(p),_=e*n,M=p.length/_;for(let v=0;vm.attributeTable))==null?void 0:f.attributeTable;return{extent:i,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:r}}let ce=class extends oe{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}async open(t){await this.init();const e=this.source,{pixelBlocks:n,attributeTable:i,statistics:s,histograms:a,name:r,nativeExtent:l,transform:o}=e,c=n[0],{width:u,height:h,pixelType:f}=c,m=e.extent??new L({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new z({wkid:3857})}),g=e.isPseudoSpatialReference??!e.extent,p={x:m.width/u,y:m.height/h},d={...e.keyProperties};i&&(d.DataType="Thematic");const y=new Se({width:u,height:h,pixelType:f,extent:m,nativeExtent:l,attributeTable:i,transform:o,pixelSize:p,spatialReference:m.spatialReference,bandCount:c.pixels.length,keyProperties:d,multidimensionalInfo:e.multidimensionalInfo,statistics:s,isPseudoSpatialReference:g,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(y),this.createRemoteDatasetStorageInfo(y,512,512),this._set("rasterInfo",y),this.updateTileInfo(),y.multidimensionalInfo?await this._buildMDimStats(e.pixelBlocks,y.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},t),y.multidimensionalInfo||(this.source=null),this.datasetName=r}fetchRawTile(t,e,n,i={}){if(!this._pixelBlockTiles){const{rasterInfo:a}=this,[r,l]=a.storageInfo.tileInfo.size,{sliceId:o}=i,{pixelBlocks:c}=this.source,u={pixelBlock:o==null?c[0]:c[o],useBilinear:a.dataType!=="thematic",tileSize:{width:r,height:l},level:t,row:e,col:n},h=this.rasterJobHandler?this.rasterJobHandler.clipTile(u,i):ki(u);return Promise.resolve(h)}const s=this._pixelBlockTiles.get(`${t}/${e}/${n}`);return Promise.resolve(s)}async _buildInMemoryRaster(t,e,n){var h,f;const{rasterInfo:i}=this,s=i.storageInfo.maximumPyramidLevel??0,a=i.dataType!=="thematic",r=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:t,tileSize:e,maximumPyramidLevel:s,useBilinear:a},n):Promise.resolve(Fi(t,e,s,a)),l=i.statistics!=null,o=i.histograms!=null,c=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:t},n):Promise.resolve(Mi(t)),u=await mt([r,c]);if(!u[0].value&&u[1].value)throw new P("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=u[0].value,l||(i.statistics=(h=u[1].value)==null?void 0:h.statistics),o||(i.histograms=(f=u[1].value)==null?void 0:f.histograms)}async _buildMDimStats(t,e,n){for(let i=0;i{var u,h;return new We({variableName:s.name,dimensionName:c.name,values:[((u=c.values)==null?void 0:u[0])??((h=c.extent)==null?void 0:h[0])],isSlice:!0})}),r=pt(a,e),l=r==null?null:t[r];if(l==null)continue;const o=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:l},n):Ge(l);s.statistics=o.statistics,s.histograms||(s.histograms=o.histograms)}}};b([S({type:String,json:{write:!0}})],ce.prototype,"datasetFormat",void 0),b([S()],ce.prototype,"source",void 0),b([S()],ce.prototype,"url",null),ce=b([Q("esri.layers.support.rasterDatasets.InMemoryRaster")],ce);const qe=ce;let me=class extends oe{constructor(){super(...arguments),this.datasetFormat="CovJSON"}async open(e){await this.init();const{extent:n,pixelBlocks:i,multidimensionalInfo:s,attributeTable:a,bandNames:r}=await this._fetchData(e),{statistics:l,histograms:o}=Ge(i[0]),c=r==null?void 0:r.map(m=>({BandName:m})),u={DataType:a?"Thematic":s?"Scientific":"Generic",BandProperties:c},h=new qe({source:{extent:n,pixelBlocks:i,attributeTable:a?He.fromJSON(a):null,multidimensionalInfo:s,statistics:l,histograms:o,keyProperties:u,isPseudoSpatialReference:!1}});await h.open(),this._inMemoryRaster=h;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",h.rasterInfo)}fetchRawTile(e,n,i,s={}){return this._inMemoryRaster.fetchRawTile(e,n,i,s)}async _fetchData(e){var a,r,l,o;const n=this.source??(await this.request(this.url,{signal:e==null?void 0:e.signal})).data,i="imagery-tile-layer:open-coverage-json";if(((a=n.type)==null?void 0:a.toLowerCase())!=="coverage"||((l=(r=n.domain)==null?void 0:r.domainType)==null?void 0:l.toLowerCase())!=="grid")throw new P(i,"Only coverage with Grid domain type is supported");if(!n.ranges)throw new P(i,"Missing ranges in the grid coverage data");if(!((o=n.domain.referencing)!=null&&o.length))throw new P(i,"Missing domain referencing in the grid coverage data");const s=Object.values(n.ranges);for(let c=0;ci.push(l));return i}const s=t.getElementsByTagNameNS("*",n);if(!s||s.length===0)return[];for(let a=0;a0?e?q(i[0],e):i[0]:null}function K(t,e=null){const n=e?q(t,e):t;let i;return n?(i=n.textContent||n.nodeValue,i?i.trim():null):null}function ps(t,e){const n=fe(t,e),i=[];let s;for(let a=0;aNumber(n))}function re(t,e){const n=K(t,e);return Number(n)}function Oe(t,e){var s;const n=(s=t==null?void 0:t.nodeName)==null?void 0:s.toLowerCase(),i=e.toLowerCase();return n.slice(n.lastIndexOf(":")+1)===i}function ct(t,e){if(!t||!e)return null;const n=[];for(let i=0;iNumber(m));let l,o,c,u;fe(t,"Metadata/MDI").forEach(m=>{const g=Number(m.textContent??m.nodeValue);switch(m.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":l=g;break;case"STATISTICS_MAXIMUM":o=g;break;case"STATISTICS_MEAN":c=g;break;case"STATISTICS_STDDEV":u=g}});const h=re(t,"Metadata/SourceBandIndex");return{noDataValue:e,histogram:r!=null&&r.length&&i!=null&&s!=null?{min:i,max:s,size:a||r.length,counts:r}:null,sourceBandIndex:h,statistics:l!=null&&o!=null?{min:l,max:o,avg:c,stddev:u}:null}}function _e(t){if(!t)return null;let e=Number(t);if(!isNaN(e)&&e!==0)return new z({wkid:e});if(t=String(t).trim(),Ot(t))return new z({wkt2:t});const n=t.toUpperCase();if(n.startsWith("COMPD_CS")){if(!n.includes("VERTCS")||!n.includes("GEOGCS")&&!n.startsWith("PROJCS"))return null;const i=n.indexOf("VERTCS"),s=n.indexOf("PROJCS"),a=s>-1?s:n.indexOf("GEOGCS");if(a===-1)return null;const r=t.slice(a,t.lastIndexOf("]",i)+1).trim(),l=t.slice(i,t.lastIndexOf("]")).trim();e=Pe(r);const o=new z(e?{wkid:e}:{wkt:r}),c=Pe(l);return c&&(o.vcsWkid=c),o}return n.startsWith("GEOGCS")||n.startsWith("PROJCS")?(e=Pe(t),new z(e!==0?{wkid:e}:{wkt:t})):null}function Pe(t){var s;const e=t.replaceAll("]","[").replaceAll('"',"").split("[").map(a=>a.trim()).filter(a=>a!==""),n=e[e.length-1].split(","),i=(s=n[0])==null?void 0:s.toLowerCase();if((i==="epsg"||i==="esri")&&t.endsWith('"]]')){const a=Number(n[1]);if(!isNaN(a)&&a!==0)return a}return 0}function Ve(t){var i;if(((i=t==null?void 0:t.documentElement.tagName)==null?void 0:i.toLowerCase())!=="pamdataset")return{};const e={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};t.documentElement.childNodes.forEach(s=>{if(s.nodeType===1){if(Oe(s,"SRS")){if(!e.spatialReference){const a=K(s);e.spatialReference=_e(a)}}else if(Oe(s,"Metadata"))if(s.getAttribute("domain")==="xml:ESRI"){const{spatialReference:a,transform:r}=ys(s);e.transform=r,e.spatialReference||(e.spatialReference=a)}else fe(s,"MDI").forEach(a=>e.metadata[a.getAttribute("key")]=K(a));else if(Oe(s,"PAMRasterBand")){const a=gs(s);a.sourceBandIndex!=null&&e.rasterBands[a.sourceBandIndex]==null?e.rasterBands[a.sourceBandIndex]=a:e.rasterBands.push(a)}}});const n=e.rasterBands;if(n.length){const s=!!n[0].statistics;e.statistics=s?n.map(r=>r.statistics).filter(De):null;const a=!!n[0].histogram;e.histograms=a?n.map(r=>r.histogram).filter(De):null}return e}let Re=class extends oe{async open(t){await this.init();const e=await this._fetchData(t);let{spatialReference:n,statistics:i,histograms:s,transform:a}=await this._fetchAuxiliaryData(t);const r=!n;r&&(n=new z({wkid:3857})),s!=null&&s.length&&i==null&&(i=je(s));const{width:l,height:o}=e;let c=new L({xmin:-.5,ymin:.5-o,xmax:l-.5,ymax:.5,spatialReference:n});const u=a?a.forwardTransform(c):c;let h=!0;if(a){const m=a.forwardCoefficients;h=m&&m[1]===0&&m[2]===0,h&&(a=null,c=u)}const f=new qe({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[e],statistics:i,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:r},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}fetchRawTile(t,e,n,i={}){return this._inMemoryRaster.fetchRawTile(t,e,n,i)}async _fetchData(t){const{data:e}=await this.request(this.url,{responseType:"array-buffer",signal:t==null?void 0:t.signal}),n=Ci(e).toUpperCase();if(n!=="JPG"&&n!=="PNG"&&n!=="GIF"&&n!=="BMP")throw new P("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",n);const i=n.toLowerCase(),s=i==="gif"||i==="bmp"||!Pt("ios"),a=await this.decodePixelBlock(e,{format:i,useCanvas:s,hasNoZlibMask:!0});if(a==null)throw new P("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(t){var u;const e=t==null?void 0:t.signal,{skipExtensions:n=[],skipMapInfo:i}=this.ioConfig,s=i||n.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:e}),a=this.datasetFormat,r=a==="JPG"?"jgw":a==="PNG"?"pgw":a==="BMP"?"bpw":null,l=r&&n.includes(r)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+r,{responseType:"text",signal:e}),o=await mt([s,l]);if(e!=null&&e.aborted)throw $t();const c=Ve((u=o[0].value)==null?void 0:u.data);if(!c.transform){const h=o[1].value?o[1].value.data.split(` +`).slice(0,6).map(f=>Number(f)):null;c.transform=(h==null?void 0:h.length)===6?new Ue({forwardCoefficients:[h[4],h[5],h[0],-h[1],h[2],-h[3]]}):null}return c}};b([S({type:String,json:{write:!0}})],Re.prototype,"datasetFormat",void 0),Re=b([Q("esri.layers.support.rasterDatasets.ImageAuxRaster")],Re);const Ie=Re;let de=class extends oe{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async open(t){var _,M;await this.init();const e=t==null?void 0:t.signal,n=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:e});n.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const i=n.data;if(this.sourceJSON=i,!i)throw new P("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!i.tileInfo)throw new P("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();const s=["jpg","jpeg","png","png8","png24","png32","mixed"];this.tileType=i.cacheType,this.tileType==null&&(s.includes(i.tileInfo.format.toLowerCase())?this.tileType="Map":i.tileInfo.format.toLowerCase()==="lerc"?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=((_=i.name)==null?void 0:_.slice(i.name.indexOf("/")+1))??"";const a=await this._fetchRasterInfo({signal:e});if(a==null)throw new P("image-server-raster:open","cannot initialize image service");di(a,i);const r=this.tileType==="Map"?xs(i.tileInfo,i):te.fromJSON(i.tileInfo);Dt(r);const[l,o]=this._computeMinMaxLOD(a,r),{extent:c,pixelSize:u}=a,h=.5/a.width*u.x,f=Math.max(u.x,u.y),{lods:m}=r;(this.tileType!=="Map"&&i.maxScale!==0||Math.abs(u.x-u.y)>h||!m.some(v=>Math.abs(v.resolution-f){v.level>=o.level&&v.level<=l.level&&y.push({x:v.resolution,y:v.resolution}),Fv.x-F.x);const w=this.computeBlockBoundary(c,p,d,r.origin,y,g),I=y.length>1?y.slice(1):null;let T;i.transposeInfo&&(T={tileSize:[i.transposeInfo.rows,i.transposeInfo.cols],packetSize:((M=a.keyProperties)==null?void 0:M._yxs.PacketSize)??0});const R=x.length<=1||x.length>=3&&x.slice(0,-1).every(v=>v===x[0])?x[0]??2:Math.round(10/(o.resolution/l.resolution)**(-1/g))/10;if(a.storageInfo=new ve({blockWidth:r.size[0],blockHeight:r.size[1],pyramidBlockWidth:r.size[0],pyramidBlockHeight:r.size[1],pyramidResolutions:I,pyramidScalingFactor:R,compression:r.format,origin:r.origin,firstPyramidLevel:1,maximumPyramidLevel:g,tileInfo:r,transposeInfo:T,blockBoundary:w}),ws(a),this._set("rasterInfo",a),i.capabilities.toLowerCase().includes("tilemap")){const v={tileInfo:a.storageInfo.tileInfo,parsedUrl:Bt(this.url),url:this.url,tileServers:[]};this._tilemapCache=new qi({layer:v})}}async fetchRawTile(t,e,n,i={}){const{storageInfo:s,extent:a}=this.rasterInfo,{transposeInfo:r}=s,l=r!=null&&!!i.transposedVariableName;if(this._slices&&!l&&i.sliceId==null)return null;const o=l?0:s.maximumPyramidLevel-t+this._levelOffset,c=`${this.url}/tile/${o}/${e}/${n}`,u=this._slices?l?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:i.signal});if(!h)return null;const f=l?r.tileSize:s.tileInfo.size,m=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:this.tileType==="Elevation",returnInterleaved:l,noDataValue:this.rasterInfo.noDataValue});if(m==null)return null;const g=s.blockBoundary[t];if(s.compression!=="jpg"||n>g.minCol&&ng.minRow&&e{const a=e.find(r=>s.variableName===r.variableName&&r.dimensionName===s.dimensionName);return a?(Array.isArray(s.values[0])?`${s.values[0][0]}-${s.values[0][1]}`:s.values[0])!==(Array.isArray(a.values[0])?`${a.values[0][0]}-${a.values[0][1]}`:a.values[0]):!0}))return n}return null}async fetchVariableStatisticsHistograms(t,e){var a,r,l;const n=this.request(this.url+"/statistics",{query:{variable:t,f:"json"},signal:e}).then(o=>{var c;return(c=o.data)==null?void 0:c.statistics}),i=this.request(this.url+"/histograms",{query:{variable:t,f:"json"},signal:e}).then(o=>{var c;return(c=o.data)==null?void 0:c.histograms}),s=await Promise.all([n,i]);return s[0]&&s[0].forEach(o=>{o.avg=o.mean,o.stddev=o.standardDeviation}),(l=(r=(a=s[1])==null?void 0:a[0])==null?void 0:r.counts)!=null&&l.length||(s[1]=null),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(t,e={}){if(!this._tilemapCache)return 0;let n=this.identifyPixelLocation(t,0,e.datumTransformation);if(n===null)return null;let i=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let a=s-i+this._levelOffset;const r=n.srcLocation;for(;a>=0;){try{if(await this._tilemapCache.fetchAvailability(a,n.row,n.col,e)==="available")break}catch{}if(a--,i++,n=this.identifyPixelLocation(r,i,e.datumTransformation),n===null)return null}return a===-1||n==null?null:i}async _fetchRasterInfo(t){const e=this.sourceJSON;if(this.tileType==="Map"){const r=e.fullExtent||e.extent,l=Math.ceil((r.xmax-r.xmin)/e.pixelSizeX-.1),o=Math.ceil((r.ymax-r.ymin)/e.pixelSizeY-.1),c=z.fromJSON(e.spatialReference||r.spatialReference),u=new A({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:c});return new Se({width:l,height:o,bandCount:3,extent:L.fromJSON(r),spatialReference:c,pixelSize:u,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:n}=t,i=pi(this.url,this.sourceJSON,{signal:n,query:this.ioConfig.customFetchParameters}),s=e.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:n}).then(r=>{var l;return(l=r.data)==null?void 0:l.slices}).catch(()=>null):null,a=await Promise.all([i,s]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:t}=this;t.minScale&&t.minScale<0&&(t.minScale=0),t.maxScale&&t.maxScale<0&&(t.maxScale=0)}_computeMinMaxLOD(t,e){const{pixelSize:n}=t,i=.5/t.width*n.x,{lods:s}=e,a=e.lodAt(Math.max.apply(null,s.map(f=>f.level))),r=e.lodAt(Math.min.apply(null,s.map(f=>f.level))),{tileType:l}=this;if(l==="Map")return this._levelOffset=s[0].level,[a,r];if(l==="Raster")return[s.find(f=>f.resolution===n.x)??a,r];const{minScale:o,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=s.find(f=>Math.abs(f.scale-c)f.scale>c).sort((f,m)=>f.scale>m.scale?1:-1)[0]??a));let h=r;return o>0&&(h=s.find(f=>Math.abs(f.scale-o)r!=null&&r>=s&&r<=a)});if(n!==0&&i!==0){const r=c=>Math.round(1e4*c)/1e4,l=n?r(n):1/0,o=i?r(i):-1/0;return te.fromJSON({...t,lods:t.lods.filter(c=>{const u=r(c.scale);return u<=l&&u>=o})})}return te.fromJSON(t)}function ws(t){const{extent:e,spatialReference:n}=t;e.xmin>-1&&e.xmax>181&&(n!=null&&n.wkid)&&n.isGeographic&&(t.nativeExtent=t.extent,t.transform=new Gi,t.extent=t.transform.forwardTransform(e))}b([S({type:String,json:{write:!0}})],de.prototype,"datasetFormat",void 0),b([S()],de.prototype,"tileType",void 0),de=b([Q("esri.layers.support.rasterDatasets.ImageServerRaster")],de);const Is=de,Y=new Map;Y.set("Int8","s8"),Y.set("UInt8","u8"),Y.set("Int16","s16"),Y.set("UInt16","u16"),Y.set("Int32","s32"),Y.set("UInt32","u32"),Y.set("Float32","f32"),Y.set("Float64","f32"),Y.set("Double64","f32");const ee=new Map;ee.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),ee.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),ee.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),ee.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let ue=class extends oe{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(t){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const e=t?t.signal:null,n=await this.request(this.url,{responseType:"xml",signal:e}),{rasterInfo:i,files:s}=this._parseHeader(n.data),{skipMapInfo:a,skipExtensions:r=[]}=this.ioConfig;if(!r.includes("aux.xml")&&!a){const y=await this._fetchAuxiliaryData(t);y!=null&&(i.statistics=y.statistics??i.statistics,i.histograms=y.histograms,y.histograms&&i.statistics==null&&(i.statistics=je(y.histograms)))}a&&this.updateImageSpaceRasterInfo(i),this._set("rasterInfo",i),this._files=s;const l=await this.request(s.index,{responseType:"array-buffer",signal:e});this._storageIndex=bs(l.data);const{blockWidth:o,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,m=[],g=this._getBandSegmentCount();let p=0,d=-1;for(;p0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=d),this.updateTileInfo()}async fetchRawTile(t,e,n,i={}){const{blockWidth:s,blockHeight:a,blockBoundary:r}=this.rasterInfo.storageInfo,l=r[t];if(!l||l.maxRowe||l.minCol>n)return null;const{bandCount:o,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(t,e,n);if(!u||u.length===0)return null;if(u[0].from===0&&u[0].to===0){const k=new Uint8Array(s*a);return new V({width:s,height:a,pixels:void 0,mask:k,validPixelCount:0})}const{bandIds:m}=this.ioConfig,g=this._getBandSegmentCount(),p=[];let d=0;for(d=0;dk.data.byteLength).reduce((k,C)=>k+C),w=new Uint8Array(x),I=[];let T=0;for(d=0;d1e24)for(d=0;d1e-6&&(C[d]=1);else for(d=0;dparseFloat(k)))),q(t,"MRF_META/CachedSource"))throw new P("mrf:open","currently does not support MRF referencing other data files");const p=q(t,"MRF_META/GeoTags"),d=q(p,"BoundingBox");let y,x=!1;if(d!=null){const k=parseFloat(d.getAttribute("minx")),C=parseFloat(d.getAttribute("miny")),E=parseFloat(d.getAttribute("maxx")),O=parseFloat(d.getAttribute("maxy")),$=K(p,"Projection")||"";let D=z.WGS84;if($!=="LOCAL_CS[]")if($.toLowerCase().startsWith("epsg:")){const B=Number($.slice(5));isNaN(B)||B===0||(D=new z({wkid:B}))}else D=_e($)??z.WGS84;else x=!0,D=new z({wkid:3857});y=new L(k,C,E,O),y.spatialReference=D}else x=!0,y=new L({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:new z({wkid:3857})});const w=q(t,"MRF_META/Rsets"),I=parseInt((w==null?void 0:w.getAttribute("scale"))||"2",10),T=y.spatialReference,R=new ve({origin:new A({x:y.xmin,y:y.ymax,spatialReference:T}),blockWidth:u,blockHeight:h,pyramidBlockWidth:u,pyramidBlockHeight:h,compression:r,pyramidScalingFactor:I}),_=new A({x:y.width/i,y:y.height/s,spatialReference:T}),M=new Se({width:i,height:s,extent:y,isPseudoSpatialReference:x,spatialReference:T,bandCount:a,pixelType:o,pixelSize:_,noDataValue:m,storageInfo:R}),v=K(t,"datafile"),F=K(t,"IndexFile");return{rasterInfo:M,files:{mrf:this.url,index:F||this.url.replace(".mrf",".idx"),data:v||this.url.replace(".mrf",ee.get(r).blobExtension)}}}async _fetchAuxiliaryData(t){try{const{data:e}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:t==null?void 0:t.signal});return Ve(e)}catch{return null}}};function bs(t){if(t.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let e,n,i,s,a,r;if(Pi){for(n=new Uint8Array(t),s=new ArrayBuffer(t.byteLength),i=new Uint8Array(s),a=0;ac.name.toLowerCase()==="oid")?"OBJECTID":"OID",s=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(e.map(c=>({name:c.name,type:"esriFieldType"+c.typeName,alias:c.name}))),a=s.map(c=>c.name),r=[];let l=0,o=0;return n.forEach(c=>{const u={};for(u[i]=l++,o=1;o0)for(;u.lengthr;){const f=[];n.getUint8(o)===32?(o+=1,c.forEach(m=>{if(m.type==="C")f.push(it(new Uint8Array(e,o,m.length)).trim());else if(m.type==="N")f.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,m.length)).trim(),10));else if(m.type==="F")f.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,m.length)).trim()));else if(m.type==="D"){const g=String.fromCharCode.apply(null,new Uint8Array(e,o,m.length)).trim();f.push(new Date(parseInt(g.substring(0,4),10),parseInt(g.substring(4,6),10)-1,parseInt(g.substring(6,8),10)))}o+=m.length}),u.push(f)):o+=r}}return{header:l,fields:c,records:u,recordSet:vs({fields:c,records:u})}}}const Ae=(t,e)=>{var n;return(n=t.get(e))==null?void 0:n.values},pe=(t,e)=>{var n,i;return(i=(n=t.get(e))==null?void 0:n.values)==null?void 0:i[0]};let ne=class extends oe{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(t){var p,d,y,x;await this.init();const e=t?t.signal:null,{data:n}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:e});if(!n)throw new P("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:i,firstIFDPos:s,isBigTiff:a}=$i(n),r=[];await this._readIFDs(r,n,i,s,0,a?8:4,e);const{imageInfo:l,rasterInfo:o}=Ts(r),c=Di(r),u=Bi(r);if(this._headerInfo={littleEndian:i,isBigTiff:a,ifds:r,pyramidIFDs:c,maskIFDs:u,...l},this._set("rasterInfo",o),!l.isSupported)throw new P("tiffraster:open","this tiff is not supported: "+l.message);if(!l.tileWidth)throw new P("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");o.isPseudoSpatialReference&&ae.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const h=(d=(p=r[0].get("PREDICTOR"))==null?void 0:p.values)==null?void 0:d[0];if(((x=(y=r[0].get("SAMPLEFORMAT"))==null?void 0:y.values)==null?void 0:x[0])===3&&h===2)throw new P("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:g=[]}=this.ioConfig;if(!g.includes("aux.xml")&&!m){const w=await this._fetchAuxiliaryMetaData(t);w!=null&&_s(w,o)}g.includes("vat.dbf")||o.bandCount!==1||o.pixelType!=="u8"||m||(o.attributeTable=await this._fetchAuxiliaryTable(t),o.attributeTable!=null&&(o.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(o),this.updateTileInfo()}async fetchRawTile(t,e,n,i={}){var a;if(!((a=this._headerInfo)!=null&&a.isSupported)||this.isBlockOutside(t,e,n))return null;const s=await this._fetchRawTiffTile(t,e,n,!1,i);if(s!=null&&this._headerInfo.hasMaskBand){const r=await this._fetchRawTiffTile(t,e,n,!0,i);r!=null&&r.pixels[0]instanceof Uint8Array&&(s.mask=r.pixels[0])}return s}async _readIFDs(t,e,n,i,s,a=4,r){if(!i)return null;(i>=e.byteLength||i<0)&&(e=(await this.request(this.url,{range:{from:i+s,to:i+s+this._bufferSize},responseType:"array-buffer",signal:r})).data,s=i+s,i=0);const l=await this._readIFD(e,n,i,s,ge.tiffTags,a,r);if(t.push(l.ifd),!l.nextIFD)return null;await this._readIFDs(t,e,n,l.nextIFD-s,s,a,r)}async _readIFD(t,e,n,i,s=ge.tiffTags,a=4,r){var o,c;if(!t)return null;const l=Ni(t,e,n,i,s,a);if(l.success){const u=[];if((o=l.ifd)==null||o.forEach(h=>{h.values||u.push(h)}),u.length>0){const h=u.map(m=>m.offlineOffsetSize).filter(De),f=Math.min.apply(null,h.map(m=>m[0]));if(Math.min.apply(null,h.map(m=>m[0]+m[1]))-f<=this._bufferSize){const{data:m}=await this.request(this.url,{range:{from:f,to:f+this._bufferSize},responseType:"array-buffer",signal:r});t=m,i=f,u.forEach(g=>Ei(t,e,g,i))}}if((c=l.ifd)!=null&&c.has("GEOKEYDIRECTORY")){const h=l.ifd.get("GEOKEYDIRECTORY"),f=h==null?void 0:h.values;if(f&&f.length>4){const m=f[0]+"."+f[1]+"."+f[2],g=await this._readIFD(t,e,h.valueOffset+6-i,i,ge.geoKeys,2,r);h.data=g.ifd,h.data&&h.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[m]})}}return l}if(l.requiredBufferSize&&l.requiredBufferSize!==t.byteLength)return(t=(await this.request(this.url,{range:{from:i,to:i+l.requiredBufferSize+4},responseType:"array-buffer",signal:r})).data).byteLengththis.request(this.url,{range:R,responseType:"array-buffer",signal:s.signal})),h=await Promise.all(u),f=h.map(R=>R.data.byteLength).reduce((R,_)=>R+_),m=h.length===1?h[0].data:new ArrayBuffer(f),g=[0],p=[0];if(h.length>1){const R=new Uint8Array(m);for(let _=0,M=0;_g||n>p||e3&&k.length%3==0){v=[];const $=k.length/3;for(let D=0;D<$;D++)v.push([D,k[D]>>>8,k[D+$]>>>8,k[D+2*$]>>>8])}const C=new Se({width:n,height:i,bandCount:r,pixelType:l,pixelSize:_,storageInfo:R,spatialReference:x,isPseudoSpatialReference:w,keyProperties:M,extent:I,colormap:v,statistics:d?d.statistics:null});if(p!=null&&p.length&&(C.nativeExtent=new L({xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:x}),C.transform=new Ue({polynomialOrder:1,forwardCoefficients:[p[2]+p[0]/2,p[5]-p[3]/2,p[0],p[3],-p[1],-p[4]]}),C.extent=C.transform.forwardTransform(C.nativeExtent),C.pixelSize=new A({x:(I.xmax-I.xmin)/n,y:(I.ymax-I.ymin)/i,spatialReference:x}),R.origin.x=-.5,R.origin.y=.5),m){const{x:$,y:D}=C.pixelSize;m.forEach(B=>{B.x*=$,B.y*=D})}return{imageInfo:e,rasterInfo:C}}function _s(t,e){if(e.statistics=t.statistics??e.statistics,e.histograms=t.histograms,t.histograms&&e.statistics==null&&(e.statistics=je(t.histograms)),t.transform&&e.transform==null){e.transform=t.transform,e.nativeExtent=e.extent;const n=e.transform.forwardTransform(e.nativeExtent);e.pixelSize=new A({x:(n.xmax-n.xmin)/e.width,y:(n.ymax-n.ymin)/e.height,spatialReference:e.spatialReference}),e.extent=n}e.isPseudoSpatialReference&&t.spatialReference&&(e.spatialReference=t.spatialReference,e.extent.spatialReference=e.nativeExtent.spatialReference=e.storageInfo.origin.spatialReference=e.spatialReference)}b([S()],ne.prototype,"_files",void 0),b([S()],ne.prototype,"_headerInfo",void 0),b([S()],ne.prototype,"_bufferSize",void 0),b([S({type:String,json:{write:!0}})],ne.prototype,"datasetFormat",void 0),ne=b([Q("esri.layers.support.rasterDatasets.TIFFRaster")],ne);const ks=ne,H=new Map;H.set("MRF",{desc:"Meta Raster Format",constructor:Rs}),H.set("TIFF",{desc:"GeoTIFF",constructor:ks}),H.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Is}),H.set("JPG",{desc:"JPG Raster Format",constructor:Ie}),H.set("PNG",{desc:"PNG Raster Format",constructor:Ie}),H.set("GIF",{desc:"GIF Raster Format",constructor:Ie}),H.set("BMP",{desc:"BMP Raster Format",constructor:Ie}),H.set("CovJSON",{desc:"COVJSON Raster Format",constructor:ds}),H.set("MEMORY",{desc:"In Memory Raster Format",constructor:qe});class $e{static get supportedFormats(){const e=new Set;return H.forEach((n,i)=>e.add(i)),e}static async open(e){var h;const{url:n,ioConfig:i,source:s,sourceJSON:a}=e;let r=e.datasetFormat??(i==null?void 0:i.datasetFormat);r==null&&(n.includes(".")?r=n.slice(n.lastIndexOf(".")+1).toUpperCase():((h=s==null?void 0:s.type)==null?void 0:h.toLowerCase())==="coverage"?r="CovJSON":s!=null&&s.extent&&s.pixelblocks&&(r="MEMORY")),r==="OVR"||r==="TIF"?r="TIFF":r==="JPG"||r==="JPEG"||r==="JFIF"?r="JPG":r==="COVJSON"&&(r="CovJSON"),n.toLowerCase().includes("/imageserver")&&!n.toLowerCase().includes("/wcsserver")&&(r="RasterTileServer");const l={url:n,source:s,sourceJSON:a,datasetFormat:r,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(l).forEach(f=>{l[f]==null&&delete l[f]}),r){if(!this.supportedFormats.has(r))throw new P("rasterfactory:open","not a supported format "+r);if(r==="CRF")throw new P("rasterfactory:open",`cannot open raster: ${n}`);const f=new(H.get(r)).constructor(l);return await f.open({signal:e.signal}),f}const o=Array.from(H.keys()).filter(f=>f!=="CovJSON"&&f!=="Memory");let c=0;const u=()=>{if(r=o[c++],!r||r==="CRF")return null;const f=new(H.get(r)).constructor(l);return f.open({signal:e.signal}).then(()=>f).catch(()=>u())};return u()}static register(e,n,i){H.has(e.toUpperCase())||H.set(e.toUpperCase(),{desc:n,constructor:i})}}let N=class extends Nt(Et(Jt(At(Lt(ls(zt(Ht(Wt(Gt(jt(ei))))))))))){constructor(...t){super(...t),this._primaryRasters=[],this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=Ut(async(e,n,i)=>{const{save:s,saveAs:a}=await ze(()=>import("./imageryUtils-CVS5zy0-.js"),__vite__mapDeps([6,7,4,5,8,9,10,11,12]));switch(e){case ye.SAVE:return s(this,n);case ye.SAVE_AS:return a(this,i,n)}})}normalizeCtorArgs(t,e){return typeof t=="string"?{url:t,...e}:t}load(t){const e=t!=null?t.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},t).catch(qt).then(()=>this._openRaster(e))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){var l,o;const t=[new he({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new he({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],e=((l=this.raster)==null?void 0:l.rasterInfo)??this.serviceRasterInfo,n=e==null?void 0:e.attributeTable,i=n!=null?n.fields:null,s="Raster.";if(i){const c=i.filter(u=>u.type!=="oid"&&u.name.toLowerCase()!=="value").map(u=>{const h=u.clone();return h.name=s+u.name,h});t.push(...c)}const a=e==null?void 0:e.dataType,r=e==null?void 0:e.multidimensionalInfo;if((a==="vector-magdir"||a==="vector-uv")&&r!=null){const c=(o=r.variables[0].unit)==null?void 0:o.trim(),u="Magnitude"+(c?` (${c})`:"");t.push(new he({name:"Raster.Magnitude",alias:u,domain:null,editable:!1,type:"double"})),t.push(new he({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return t}createPopupTemplate(t){const{rasterFields:e}=this,n=new Set(e.map(({name:i})=>i).filter(i=>i.toLowerCase()!=="raster.servicepixelvalue.raw"));return Vt({fields:e,title:this.title},{...t,visibleFieldNames:n})}async generateRasterInfo(t,e){var n;if(t=Le(Be,t),await this.load(),!t||((n=t.functionName)==null?void 0:n.toLowerCase())==="none")return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(t,e);return i}catch(i){throw i instanceof P?i:new P("imagery-tile-layer","the given raster function is not supported")}}async save(t){return this._debouncedSaveOperations(ye.SAVE,t)}async saveAs(t,e){return this._debouncedSaveOperations(ye.SAVE_AS,e,t)}write(t,e){const n=this._primaryRasters[0]??this.raster;if(this.loaded?n.datasetFormat==="RasterTileServer"&&(n.tileType==="Raster"||n.tileType==="Map"):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(t,e);if(e!=null&&e.messages){const i=`${e.origin}/${e.layerContainerType||"operational-layers"}`;e.messages.push(new P("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${i}'`,{layer:this}))}return null}async _openRaster(t){var i;let e=!1;if(this.raster)await this._openFromRaster(this.raster,t),e=this.raster.datasetFormat==="Function";else{const{url:s,rasterFunction:a,source:r}=this;if(!s&&!r)throw new P("imagery-tile-layer:open","missing url or source parameter");r?await this._openFromSource(r,t):a?await this._openFromUrlWithRasterFunction(s,a,t):await this._openFromUrl(s,t)}const n=this.raster.rasterInfo;if(!n)throw new P("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",e?n:this._primaryRasters[0].rasterInfo),this._set("spatialReference",n.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,this.sourceJSON!=null){const s=this.raster.tileType==="Map"&&this.sourceJSON.minLOD!=null&&this.sourceJSON.maxLOD!=null?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(s,{origin:"service"})}else this.read({tileInfo:(i=this.serviceRasterInfo)==null?void 0:i.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),this.raster.tileType==="Map"&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(Xt(()=>this.customParameters,s=>{this.raster&&(this.raster.ioConfig.customFetchParameters=s)}))}async _openFromRaster(t,e){t.rasterInfo||await t.open({signal:e}),this._primaryRasters=t.datasetFormat==="Function"?t.primaryRasters.rasters:[t],this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(t,e,n){const i=[t];e&&ji(e.toJSON(),i);const s=await Promise.all(i.map(r=>$e.open({url:r,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:n}))),a=s.findIndex(r=>r==null);if(a>-1)throw new P("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=s,this._initializeWithFunctionRaster(e)}async _openFromUrl(t,e){const n=await $e.open({url:t,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});if(n==null)throw new P("imagery-tile-layer:open",`cannot open raster: ${t}`);this._primaryRasters=[n],this.raster=n}async _openFromSource(t,e){var a;const n="the tiled imagery data source is not supported",i=((a=t.type)==null?void 0:a.toLowerCase())==="coverage"?"CovJSON":t.extent&&t.pixelBlock?"MEMORY":null;if(!i)throw new P("imagery-tile-layer:open",n);i==="MEMORY"&&(t={extent:t.extent,pixelBlocks:[t.pixelBlock]});const s=await $e.open({url:"",source:t,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});if(s==null)throw new P("imagery-tile-layer:open",n);this._primaryRasters=[s],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=s}async _openFunctionRaster(t,e){var a;const n={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(r=>n[r.url]=r);const i=gt(((a=t.functionDefinition)==null?void 0:a.toJSON())??t.toJSON(),n),s=new xt({rasterFunction:i});return await s.open(e),s}async _initializeWithFunctionRaster(t,e){try{this.raster=await this._openFunctionRaster(t,e)}catch(n){n instanceof P&&ae.getLogger(this).error("imagery-tile-layer:open",n.message),ae.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};b([S({clonable:!1})],N.prototype,"_primaryRasters",void 0),b([S({type:[Yt],json:{write:{overridePolicy(){var t;return{enabled:!this.loaded||this.raster.tileType==="Raster"||((t=this.bandIds)==null?void 0:t.join(","))!=="0,1,2"}}}}})],N.prototype,"bandIds",void 0),b([S({json:{write:{overridePolicy(){return{enabled:!this.loaded||this.raster.tileType==="Raster"||this.interpolation!=="bilinear"}}}}}),Kt(yi)],N.prototype,"interpolation",void 0),b([S(Qt)],N.prototype,"legendEnabled",void 0),b([S({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],N.prototype,"isReference",void 0),b([S({type:["show","hide"]})],N.prototype,"listMode",void 0),b([S({json:{read:!0,write:!0}})],N.prototype,"blendMode",void 0),b([S()],N.prototype,"sourceJSON",void 0),b([S({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],N.prototype,"version",void 0),b([S({readOnly:!0,json:{read:!1}})],N.prototype,"type",void 0),b([S({type:["ArcGISTiledImageServiceLayer"]})],N.prototype,"operationalLayerType",void 0),b([S({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(t,e)=>!e.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||this.raster.tileType==="Raster"}},writer(t,e,n){e[n]=!t}}}})],N.prototype,"popupEnabled",void 0),b([S({type:Zt,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||this.raster.tileType==="Raster"}}}}})],N.prototype,"popupTemplate",void 0),b([S({readOnly:!0})],N.prototype,"defaultPopupTemplate",null),b([S({readOnly:!0,type:[he]})],N.prototype,"fields",void 0),b([S({readOnly:!0,type:[he]})],N.prototype,"rasterFields",null),b([S({constructOnly:!0})],N.prototype,"source",void 0),N=b([Q("esri.layers.ImageryTileLayer")],N);const qs=N;export{qs as default}; diff --git a/build/assets/Indices-BhOjxL0t.js b/build/assets/Indices-BhOjxL0t.js new file mode 100644 index 0000000..4556688 --- /dev/null +++ b/build/assets/Indices-BhOjxL0t.js @@ -0,0 +1 @@ +import{bc as u,bd as i}from"./index-DKOmzAMm.js";function c(n){if(u(n)){if(n.length(r=r&&l===0,e=e&&l===y,!r&&!e)),r?U(n.length):e?w(n.length):u(n)||n.BYTES_PER_ELEMENT!==Uint16Array.BYTES_PER_ELEMENT?A(n):n}function A(n){let r=!0;for(const e of n){if(e>=65536)return u(n)?new Uint32Array(n):n;e>=256&&(r=!1)}return r?new Uint8Array(n):new Uint16Array(n)}function g(n){return n<=i?new Array(n):n<=65536?new Uint16Array(n):new Uint32Array(n)}let t=(()=>{const n=new Uint32Array(131072);for(let r=0;r{const n=new Uint16Array(65536);for(let r=0;rt.length){const r=Math.max(2*t.length,n);t=new Uint32Array(r);for(let e=0;ef.length){const r=Math.max(2*f.length,n);f=new Uint8Array(r)}return new Uint8Array(f.buffer,0,n)}export{g as i,w as l,c as t}; diff --git a/build/assets/IntegratedMesh3DTilesLayer-BSaTkEOZ.js b/build/assets/IntegratedMesh3DTilesLayer-BSaTkEOZ.js new file mode 100644 index 0000000..0f9c49f --- /dev/null +++ b/build/assets/IntegratedMesh3DTilesLayer-BSaTkEOZ.js @@ -0,0 +1 @@ +import{cF as z,cs as U,ct as j,cu as X,cv as K,cG as k,cH as F,ay as b,aZ as w,cI as _,av as x,c2 as G,c6 as c,cJ as $,c1 as S,bk as E,bh as L,cK as T,cL as D,cM as h,s as W,aK as R,U as P,V as N,B as d,D as u,cN as q,cy as O,E as Z,cE as B,au as g}from"./index-DKOmzAMm.js";import{$ as V,Z as H,w as J}from"./elevationInfoUtils-CU9w6KS3.js";let p=class extends z(U(j(X(K(k(F(B))))))){constructor(a){super(a),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.spatialReference=new b({wkid:4326,vcsWkid:115700}),this.fullExtent=new w(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0}set elevationInfo(a){this._set("elevationInfo",a),this._validateElevationInfo()}_verifyArray(a,i){if(!Array.isArray(a)||a.length7972671&&t[7]>7972671&&t[11]>7945940)return}const o=(M=a.root)==null?void 0:M.transform,m=g();if(i.region&&this._verifyArray(i.region,6)){const t=i.region,l=_(t[0]),n=_(t[1]),s=t[4],r=_(t[2]),e=_(t[3]),y=t[5];this.fullExtent=new w({xmin:l,ymin:n,zmin:s,xmax:r,ymax:e,zmax:y,spatialReference:this.spatialReference})}else if(i.sphere&&this._verifyArray(i.sphere,4)){const t=i.sphere,l=x(t[0],t[1],t[2]),n=t[3]/Math.sqrt(3),s=g();G(s,l,x(n,n,n));const r=g();if(c(r,l,x(n,n,n)),o&&this._verifyArray(o,16)){const v=o;$(m,s,v),S(s,m),$(m,r,v),S(r,m)}E(s,L,0,s,b.WGS84,0,1),E(r,L,0,r,b.WGS84,0,1);const e=g(),y=g();T(e,s,r),D(y,s,r),this.fullExtent=new w({xmin:e[0],ymin:e[1],zmin:e[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:this.spatialReference})}else if(i.box&&this._verifyArray(i.box,12)){const t=i.box,l=x(t[0],t[1],t[2]),n=x(t[3],t[4],t[5]),s=x(t[6],t[7],t[8]),r=x(t[9],t[10],t[11]),e=[];for(let f=0;f<8;++f)e.push(g());if(c(e[0],l,n),c(e[0],e[0],s),c(e[0],e[0],r),h(e[1],l,n),c(e[1],e[1],s),c(e[1],e[1],r),c(e[2],l,n),h(e[2],e[2],s),c(e[2],e[2],r),h(e[3],l,n),h(e[3],e[3],s),c(e[3],e[3],r),c(e[4],l,n),c(e[4],e[4],s),h(e[4],e[4],r),h(e[5],l,n),c(e[5],e[5],s),h(e[5],e[5],r),c(e[6],l,n),h(e[6],e[6],s),h(e[6],e[6],r),h(e[7],l,n),h(e[7],e[7],s),h(e[7],e[7],r),o&&this._verifyArray(o,16)){const f=o;for(let A=0;A<8;++A)$(e[A],e[A],f)}const y=x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),v=x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let f=0;f<8;++f)E(e[f],L,0,e[f],b.WGS84,0,1),T(v,v,e[f]),D(y,y,e[f]);this.fullExtent=new w({xmin:v[0],ymin:v[1],zmin:v[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:this.spatialReference})}}async load(a){return this.addResolvingPromise(this._doLoad(a)),this}async _doLoad(a){const i=a!=null?a.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:o=>{var m;if((m=o.typeKeywords)!=null&&m.includes("IntegratedMesh"))return!0;throw new W("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},a)}catch(o){R(o)}this.url&&await P(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:i}).then(m=>{this._initFullExtent(m.data)},m=>{R(m)})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(){const a=this.elevationInfo,i="Integrated mesh 3d tiles layers";V(N.getLogger(this),H(i,"absolute-height",a)),V(N.getLogger(this),J(i,a))}};d([u({type:["IntegratedMesh3DTilesLayer"]})],p.prototype,"operationalLayerType",void 0),d([u({type:b})],p.prototype,"spatialReference",void 0),d([u({type:w})],p.prototype,"fullExtent",void 0),d([u(q)],p.prototype,"elevationInfo",null),d([u({type:["show","hide"]})],p.prototype,"listMode",void 0),d([u(O)],p.prototype,"url",void 0),d([u({readOnly:!0})],p.prototype,"type",void 0),d([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],p.prototype,"path",void 0),d([u({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],p.prototype,"minScale",void 0),d([u({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],p.prototype,"maxScale",void 0),p=d([Z("esri.layers.IntegratedMesh3DTilesLayer")],p);const Y=p;export{Y as default}; diff --git a/build/assets/IntegratedMeshLayer-BnVFVJDl.js b/build/assets/IntegratedMeshLayer-BnVFVJDl.js new file mode 100644 index 0000000..f5b1603 --- /dev/null +++ b/build/assets/IntegratedMeshLayer-BnVFVJDl.js @@ -0,0 +1 @@ +import{B as i,D as a,aX as _,d2 as I,E as u,F as L,bp as b,c8 as x,fQ as N,$ as R,cn as M,a7 as A,I as j,U as J,cF as V,cs as D,ct as E,cu as K,cv as P,cG as U,cH as $,bz as z,n as C,aK as F,s as d,V as S,aS as G,cN as H,cE as k,bA as q}from"./index-DKOmzAMm.js";import{j as h}from"./persistable-DLZFVdWR.js";import{L as B,C as w}from"./SceneService-7YqMMGL5.js";import{p as Q,a as X,y as Z,m as W}from"./I3SLayerDefinitions-CR4J5n7u.js";import{$ as T,Z as Y,w as ee}from"./elevationInfoUtils-CU9w6KS3.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./resourceExtension-D3awQbhZ.js";import"./originUtils-D69mHv66.js";import"./jsonContext-SE-5k22x.js";import"./resourceUtils-CwAv7wd8.js";import"./resourceUtils-Cz4P0EKM.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";var f;let n=f=class extends L{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,o,r){var l;if((l=r.layer)!=null&&l.spatialReference&&!r.layer.spatialReference.equals(this.geometry.spatialReference)){if(!b(e.spatialReference,r.layer.spatialReference))return void((r==null?void 0:r.messages)&&r.messages.push(new x("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:r.layer.spatialReference,context:r})));const y=new _;N(e,y,r.layer.spatialReference),t[o]=y.toJSON(r)}else t[o]=e.toJSON(r);delete t[o].spatialReference}clone(){return new f({geometry:R(this.geometry),type:this.type})}};i([a({type:_}),h()],n.prototype,"geometry",void 0),i([I(["web-scene","portal-item"],"geometry")],n.prototype,"writeGeometry",null),i([a({type:["clip","mask","replace"],nonNullable:!0}),h()],n.prototype,"type",void 0),n=f=i([u("esri.layers.support.SceneModification")],n);const m=n;var p;let c=p=class extends M(A.ofType(m)){constructor(e){super(e),this.url=null}clone(){return new p({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(t=>!!t.geometry)}static fromJSON(e,t){const o=new p;for(const r of e)o.add(m.fromJSON(r,t));return o}static async fromUrl(e,t,o){const r={url:j(e),origin:"service"},l=await J(e,{responseType:"json",signal:o==null?void 0:o.signal}),y=t.toJSON(),g=[];for(const v of l.data)g.push(m.fromJSON({...v,geometry:{...v.geometry,spatialReference:y}},r));return new p({url:e,items:g})}};i([a({type:String})],c.prototype,"url",void 0),c=p=i([u("esri.layers.support.SceneModifications")],c);const O=c;let s=class extends B(V(D(E(K(P(U($(k)))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null}initialize(){this.addHandles(z(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,q))}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:C(e,o),context:o}}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e==null?void 0:e.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){F(o)}if(await this._fetchService(t),this._modificationsSource!=null){const o=await O.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",o,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(this._modificationsSource!=null)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(w.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(w.SAVE,e)}validateLayer(e){if(e.layerType&&e.layerType!=="IntegratedMesh")throw new d("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new d("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(){const e=this.elevationInfo,t="Integrated mesh layers";T(S.getLogger(this),Y(t,"absolute-height",e)),T(S.getLogger(this),ee(t,e))}};i([a({type:String,readOnly:!0})],s.prototype,"geometryType",void 0),i([a({type:["show","hide"]})],s.prototype,"listMode",void 0),i([a({type:["IntegratedMeshLayer"]})],s.prototype,"operationalLayerType",void 0),i([a({json:{read:!1},readOnly:!0})],s.prototype,"type",void 0),i([a({type:Q,readOnly:!0})],s.prototype,"nodePages",void 0),i([a({type:[X],readOnly:!0})],s.prototype,"materialDefinitions",void 0),i([a({type:[Z],readOnly:!0})],s.prototype,"textureSetDefinitions",void 0),i([a({type:[W],readOnly:!0})],s.prototype,"geometryDefinitions",void 0),i([a({readOnly:!0})],s.prototype,"serviceUpdateTimeStamp",void 0),i([a({type:O}),h({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],s.prototype,"modifications",void 0),i([G(["web-scene","portal-item"],"modifications")],s.prototype,"readModifications",null),i([a(H)],s.prototype,"elevationInfo",null),i([a({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],s.prototype,"path",void 0),s=i([u("esri.layers.IntegratedMeshLayer")],s);const he=s;export{he as default}; diff --git a/build/assets/InterleavedLayout-DiAet0DN.js b/build/assets/InterleavedLayout-DiAet0DN.js new file mode 100644 index 0000000..f28315e --- /dev/null +++ b/build/assets/InterleavedLayout-DiAet0DN.js @@ -0,0 +1 @@ +import{y as l,u as o,i as a,c as p,l as c,p as _,o as y,m as F,T as m,h as g,a as w,b,d as v,A as E,O as x,x as A,g as T,w as H,E as I,L as M,B as $,F as O,I as k,U as D,j as z,V as B,M as G,S as V,k as j,q as C,v as q,z as J,C as K,D as N,G as S,H as P}from"./BufferView-DOhKdt-N.js";import{e as f}from"./types-D0PSWh4d.js";import{s as Q}from"./Util-DRlRfUCu.js";class h{constructor(t,e){this.layout=t,this.buffer=typeof e=="number"?new ArrayBuffer(e*t.stride):e;for(const s of t.fields.keys()){const i=t.fields.get(s);this[s]=new i.constructor(this.buffer,i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const s=this[t];return s&&s.elementCount===e.ElementCount&&s.elementType===e.ElementType?s:null}slice(t,e){return new h(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e=0,s=0,i=t.count){const r=this.stride;if(r%4==0){const d=new Uint32Array(t.buffer,e*r,i*r/4);new Uint32Array(this.buffer,s*r,i*r/4).set(d)}else{const d=new Uint8Array(t.buffer,e*r,i*r);new Uint8Array(this.buffer,s*r,i*r).set(d)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(t=null){this._stride=0,this._lastAligned=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:W(e[1].constructor)})))}freeze(){return this}vec2f(t,e){return this._appendField(t,o,e),this}vec2f64(t,e){return this._appendField(t,F,e),this}vec3f(t,e){return this._appendField(t,a,e),this}vec3f64(t,e){return this._appendField(t,m,e),this}vec4f(t,e){return this._appendField(t,p,e),this}vec4f64(t,e){return this._appendField(t,g,e),this}mat3f(t,e){return this._appendField(t,c,e),this}mat3f64(t,e){return this._appendField(t,w,e),this}mat4f(t,e){return this._appendField(t,_,e),this}mat4f64(t,e){return this._appendField(t,b,e),this}vec4u8(t,e){return this._appendField(t,A,e),this}f32(t,e){return this._appendField(t,l,e),this}f64(t,e){return this._appendField(t,y,e),this}u8(t,e){return this._appendField(t,v,e),this}u16(t,e){return this._appendField(t,T,e),this}i8(t,e){return this._appendField(t,z,e),this}vec2i8(t,e){return this._appendField(t,B,e),this}vec2i16(t,e){return this._appendField(t,C,e),this}vec2u8(t,e){return this._appendField(t,E,e),this}vec4u16(t,e){return this._appendField(t,M,e),this}u32(t,e){return this._appendField(t,$,e),this}_appendField(t,e,s){if(this._fields.has(t))return void Q(!1,`${t} already added to vertex buffer layout`);const i=e.ElementCount*f(e.ElementType),r=this._stride;this._stride+=i,this._fields.set(t,{size:i,constructor:e,offset:r,optional:s})}createBuffer(t){return new h(this,t)}createView(t){return new h(this,t)}clone(){const t=new u;return t._stride=this._stride,t._fields=new Map,this._fields.forEach((e,s)=>t._fields.set(s,e)),t.BufferType=this.BufferType,t}get stride(){if(this._lastAligned!==this._fields.size){let t=1;this._fields.forEach(e=>t=Math.max(t,f(e.constructor.ElementType))),this._stride=Math.floor((this._stride+t-1)/t)*t,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function tt(){return new u}class et{constructor(t){this.fields=new Array,t.fields.forEach((e,s)=>{const i={...e,constructor:L(e.constructor)};this.fields.push([s,i])}),this.stride=t.stride}}const R=[l,o,a,p,c,_,y,F,m,g,w,b,v,E,x,A,T,H,I,M,$,O,k,D,z,B,G,V,j,C,q,J,K,N,S,P];function L(n){return`${n.ElementType}_${n.ElementCount}`}function W(n){return U.get(n)}const U=new Map;R.forEach(n=>U.set(L(n),n));export{tt as H,et as I}; diff --git a/build/assets/KMLLayer-BeRWcV6T.js b/build/assets/KMLLayer-BeRWcV6T.js new file mode 100644 index 0000000..fe95238 --- /dev/null +++ b/build/assets/KMLLayer-BeRWcV6T.js @@ -0,0 +1 @@ +import{$ as S,aL as z,b_ as J,N as W,U as A,b0 as M,fR as x,fS as w,fT as E,fU as V,ay as G,b1 as D,cn as U,bz as _,bx as $,bA as g,fV as j,aZ as I,fW as q,a7 as O,B as i,D as l,fX as B,aS as L,E as C,aN as H,cq as X,cr as Z,cu as Q,cs as Y,ct as ee,cv as te,j as se,aK as re,d2 as ie,cy as oe,cE as le}from"./index-DKOmzAMm.js";import{l as ae}from"./CollectionFlattener-BmCRFqHz.js";const ne={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function N(e){var h;const t=e.folders||[],s=t.slice(),r=new Map,a=new Map,c=new Map,p=new Map,b=new Map,f={esriGeometryPoint:a,esriGeometryPolyline:c,esriGeometryPolygon:p};(((h=e.featureCollection)==null?void 0:h.layers)||[]).forEach(o=>{const m=S(o);m.featureSet.features=[];const d=o.featureSet.geometryType;r.set(d,m);const v=o.layerDefinition.objectIdField;d==="esriGeometryPoint"?P(a,v,o.featureSet.features):d==="esriGeometryPolyline"?P(c,v,o.featureSet.features):d==="esriGeometryPolygon"&&P(p,v,o.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(o=>{b.set(o.id,o)}),t.forEach(o=>{o.networkLinkIds.forEach(m=>{const d=ye(m,o.id,e.networkLinks);d&&s.push(d)})}),s.forEach(o=>{var m;if(o.featureInfos){o.points=S(r.get("esriGeometryPoint")),o.polylines=S(r.get("esriGeometryPolyline")),o.polygons=S(r.get("esriGeometryPolygon")),o.mapImages=[];for(const d of o.featureInfos)switch(d.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const v=f[d.type].get(d.id);v&&((m=o[ne[d.type]])==null||m.featureSet.features.push(v));break}case"GroundOverlay":{const v=b.get(d.id);v&&o.mapImages.push(v);break}}o.fullExtent=F([o])}});const u=F(s);return{folders:t,sublayers:s,extent:u}}function R(e,t,s,r){var p;const a=(p=z)==null?void 0:p.findCredential(e);e=J(e,{token:a==null?void 0:a.token});const c=W.kmlServiceUrl;return A(c,{query:{url:e,model:"simple",folders:"",refresh:s!==0||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:r})}function T(e,t,s=null,r=[]){const a=[],c={},p=t.sublayers,b=new Set(t.folders.map(f=>f.id));return p.forEach(f=>{var h;const u=new e;if(s?u.read(f,s):u.read(f),r.length&&b.has(u.id)&&(u.visible=r.includes(u.id)),c[f.id]=u,f.parentFolderId!=null&&f.parentFolderId!==-1){const o=c[f.parentFolderId];o.sublayers||(o.sublayers=[]),(h=o.sublayers)==null||h.unshift(u)}else a.unshift(u)}),a}function P(e,t,s){s.forEach(r=>{e.set(r.attributes[t],r)})}function ue(e,t){let s;return t.some(r=>r.id===e&&(s=r,!0)),s}function ye(e,t,s){const r=ue(e,s);return r&&(r.parentFolderId=t,r.networkLink=r),r}function F(e){var r,a,c,p,b,f;const t=M(x),s=M(x);for(const u of e){if((a=(r=u.polygons)==null?void 0:r.featureSet)!=null&&a.features)for(const h of u.polygons.featureSet.features)w(t,h.geometry),E(s,t);if((p=(c=u.polylines)==null?void 0:c.featureSet)!=null&&p.features)for(const h of u.polylines.featureSet.features)w(t,h.geometry),E(s,t);if((f=(b=u.points)==null?void 0:b.featureSet)!=null&&f.features)for(const h of u.points.featureSet.features)w(t,h.geometry),E(s,t);if(u.mapImages)for(const h of u.mapImages)w(t,h.extent),E(s,t)}return V(s,x)?void 0:{xmin:s[0],ymin:s[1],zmin:s[2],xmax:s[3],ymax:s[4],zmax:s[5],spatialReference:G.WGS84}}var k;let y=k=class extends D.EventedMixin(U(H)){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([_(()=>this.sublayers,"after-add",({item:t})=>{t.parent=this,t.layer=this.layer},g),_(()=>this.sublayers,"after-remove",({item:t})=>{t.layer=t.parent=null},g),$(()=>this.sublayers,(t,s)=>{if(s)for(const r of s)r.layer=r.parent=null;if(t)for(const r of t)r.parent=this,r.layer=this.layer},g),$(()=>this.layer,t=>{if(this.sublayers)for(const s of this.sublayers)s.layer=t},g)])}initialize(){j(()=>this.networkLink).then(()=>j(()=>this.visible===!0)).then(()=>this.load())}load(e){var r;if(!this.networkLink||this.networkLink.viewFormat)return;const t=e!=null?e.signal:null,s=this._fetchService(((r=this._get("networkLink"))==null?void 0:r.href)??"",t).then(a=>{var b;const c=F(a.sublayers);this.fullExtent=I.fromJSON(c),this.sourceJSON=a;const p=q(O.ofType(k),T(k,a));this.sublayers?this.sublayers.addMany(p):this.sublayers=p,(b=this.layer)==null||b.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(s),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return R(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(s=>N(s.data))}};i([l()],y.prototype,"description",void 0),i([l({type:I})],y.prototype,"fullExtent",void 0),i([l()],y.prototype,"id",void 0),i([l({readOnly:!0,value:null})],y.prototype,"networkLink",void 0),i([l({json:{write:{allowNull:!0}}})],y.prototype,"parent",void 0),i([l({type:O.ofType(y),json:{write:{allowNull:!0}}})],y.prototype,"sublayers",void 0),i([l({value:null,json:{read:{source:"name",reader:e=>B(e)}}})],y.prototype,"title",void 0),i([l({value:!0})],y.prototype,"visible",null),i([L("visible",["visibility"])],y.prototype,"readVisible",null),i([l()],y.prototype,"sourceJSON",void 0),i([l()],y.prototype,"layer",void 0),y=k=i([C("esri.layers.support.KMLSublayer")],y);const K=y,pe=["kml","xml"];let n=class extends X(Z(Q(Y(ee(te(le)))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new ae({getCollections:()=>[this.sublayers],getChildrenFunction:t=>t.sublayers}),this.outSpatialReference=G.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([$(()=>this.sublayers,(e,t)=>{t&&t.forEach(s=>{s.parent=null,s.layer=null}),e&&e.forEach(s=>{s.parent=this,s.layer=this})},g),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,s){return T(K,t,s,this._visibleFolders)}writeSublayers(e,t){const s=[],r=e.toArray();for(;r.length;){const a=r[0];a.networkLink||(a.visible&&s.push(a.id),a.sublayers&&r.push(...a.sublayers.toArray())),r.shift()}t.visibleFolders=s}get title(){const e=this._get("title");return e&&this.originOf("title")!=="defaults"?e:this.url?se(this.url,pe)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],s=r=>{r.visible&&(t.push(r),r.sublayers&&r.sublayers.forEach(s))};return e&&e.forEach(s),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(re).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:R(this.url??"",this.outSpatialReference,this.refreshInterval,e)),s=N(t.data);s&&this.read(s,{origin:"service"})}_recomputeFullExtent(){let e=null;this.extent!=null&&(e=this.extent.clone());const t=s=>{if(s.sublayers)for(const r of s.sublayers.items)t(r),r.visible&&r.fullExtent&&(e!=null?e.union(r.fullExtent):e=r.fullExtent.clone())};return t(this),e}};i([l({readOnly:!0})],n.prototype,"allSublayers",void 0),i([l({type:G})],n.prototype,"outSpatialReference",void 0),i([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],n.prototype,"path",void 0),i([l({readOnly:!0,json:{read:!1,write:!1}})],n.prototype,"legendEnabled",void 0),i([l({type:["show","hide","hide-children"]})],n.prototype,"listMode",void 0),i([l({type:["KML"]})],n.prototype,"operationalLayerType",void 0),i([l({})],n.prototype,"resourceInfo",void 0),i([l({type:O.ofType(K),json:{write:{ignoreOrigin:!0}}})],n.prototype,"sublayers",void 0),i([L(["web-map","portal-item"],"sublayers",["visibleFolders"])],n.prototype,"readSublayersFromItemOrWebMap",null),i([L("service","sublayers",["sublayers"])],n.prototype,"readSublayers",null),i([ie("sublayers")],n.prototype,"writeSublayers",null),i([l({readOnly:!0,json:{read:!1}})],n.prototype,"type",void 0),i([l({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],n.prototype,"title",null),i([l(oe)],n.prototype,"url",void 0),i([l({readOnly:!0})],n.prototype,"visibleSublayers",null),i([l({type:I})],n.prototype,"extent",void 0),i([l()],n.prototype,"fullExtent",null),n=i([C("esri.layers.KMLLayer")],n);const de=n;export{de as default}; diff --git a/build/assets/KnowledgeGraphLayer-Ddel9E7F.js b/build/assets/KnowledgeGraphLayer-Ddel9E7F.js new file mode 100644 index 0000000..7f488ed --- /dev/null +++ b/build/assets/KnowledgeGraphLayer-Ddel9E7F.js @@ -0,0 +1 @@ +import{cq as b,cu as T,cr as _,cF as D,cs as S,ct as L,cv as v,cG as E,a7 as f,aK as k,s as M,c$ as m,d0 as A,V as g,n as N,cT as R,cR as w,cU as I,d1 as C,B as o,D as l,aS as G,d2 as $,cy as O,E as U,ck as j,aV as z,cE as F}from"./index-DKOmzAMm.js";import{a as u,M as K,T as P,E as x}from"./KnowledgeGraphSublayer-vp2dcEj_.js";import{R as V}from"./knowledgeGraphService-BFNZ__DV.js";import"./FeatureStore-C3siChbH.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./QueryEngine-CI3mggax.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./clientSideDefaults-B7fGShzo.js";import"./Relationship-DeeaK30J.js";let n=class extends b(T(_(D(S(L(v(E(F)))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(f.ofType(u)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(f.ofType(u)),this.type="knowledge-graph",this.url=null}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(t){k(t)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache()}async _fetchMetadata(){if(!this.url)throw new M("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await V(this.url);this.knowledgeGraph=e,this._forEachGraphType(t=>{t.name&&this._graphTypeLookup.set(t.name,t)})}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===m.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new K({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await P(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach(t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})}),this.setAtOrigin("inclusionModeDefinition",e,A(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if((t==null?void 0:t.size)>0)t.forEach((i,a)=>{const s=this._graphTypeLookup.get(a);if(!s)return g.getLogger(this).warn(`A named type, ${a}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(a);s.type!=="relationship"&&s.type!=="entity"&&(g.getLogger(this).warn(`A named type, ${a}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(a))});else if(!e.generateAllSublayers)throw new M("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){var s,r;let e=[],t=[];const{inclusionModeDefinition:i}=this,a=i==null?void 0:i.namedTypeDefinitions;!i||i.generateAllSublayers?(e=((s=this.knowledgeGraph.dataModel)==null?void 0:s.entityTypes)??[],t=((r=this.knowledgeGraph.dataModel)==null?void 0:r.relationshipTypes)??[]):a&&a.size>0&&a.forEach((p,h)=>{const d=this._graphTypeLookup.get(h);switch(d==null?void 0:d.type){case"relationship":t.push(d);break;case"entity":e.push(d)}}),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){var t,i;[...((t=this.knowledgeGraph.dataModel)==null?void 0:t.entityTypes)??[],...((i=this.knowledgeGraph.dataModel)==null?void 0:i.relationshipTypes)??[]].forEach(a=>{e(a)})}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const i of e)this.sublayerIdsCache.has(i.typeName)||(this.sublayerIdsCache.set(i.typeName,new Set),t.push(i.typeName)),this.sublayerIdsCache.get(i.typeName).add(i.id);for(const i of t){const a=this._graphTypeLookup.get(i);a&&(this._addSublayer(a).title=i,a.type==="entity"?this.dataManager.entityTypeNames.add(i):this.dataManager.relationshipTypeNames.add(i),this.dataManager.sublayerCaches.set(i,new Map))}this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach(a=>{const s=this._createSublayer(a);i(s)&&t.push(s),this._updateSublayerCaches(a)})}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new u({objectType:e,parentCompositeLayer:this,graphType:e.type,title:e.name})}_updateSublayers(e,t){t.forEach(i=>{i.parentCompositeLayer=this;const a=e.find(s=>s.type===i.graphType&&s.name===i.graphTypeName);a&&(i.objectType=a,i.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))})}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_saveUrlAsNewResource(e,t,i,a){e[t]="",i.pendingOperations.push(B(this.inclusionModeDefinition).then(s=>{const r=q(a);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:s},compress:!1,finish:p=>{this.definitionSetMap=p.url}})}))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}readDefinitionSetMap(e,t,i){return N(e,i)}writeDefinitionSetMap(e,t,i,a){const s=a==null?void 0:a.portalItem,r=a==null?void 0:a.resources,p=R(a==null?void 0:a.origin);if(!s||!r||p==null)return void(e&&(t[i]=w(e,a)));const{inclusionModeDefinition:h}=this;if(!h||this._displaysAllRecords(h))return void(this.definitionSetMap=null);const d=this.originIdOf("inclusionModeDefinition");if(d===m.USER||this._namedTypesModified||p!!a.geometryType):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.DEFAULTS?this._createSublayers(e,this.tables,a=>!a.geometryType):this._updateSublayers(e,this.tables),(i=(t=this.dataManager.inclusionModeDefinition)==null?void 0:t.namedTypeDefinitions)==null||i.forEach((a,s)=>{var p;const r=C(this.sublayerIdsCache,s,()=>new Set);(p=a.members)==null||p.forEach(h=>{r.add(h.id)})})}async addRecords(e){await this._handleNewRecords(e)}async removeRecords(e){var i,a,s,r,p,h,d,c;const t=[];for(const y of e)((s=(a=(i=this.dataManager.inclusionModeDefinition)==null?void 0:i.namedTypeDefinitions)==null?void 0:a.get(y.typeName))==null?void 0:s.useAllData)===!1&&((d=(h=(p=(r=this.dataManager.inclusionModeDefinition)==null?void 0:r.namedTypeDefinitions)==null?void 0:p.get(y.typeName))==null?void 0:h.members)!=null&&d.has(y.id))&&t.push(y);this.dataManager.removeFromLayer(t);for(const y of t)(c=this.sublayerIdsCache.get(y.typeName))==null||c.delete(y.id);return this._refreshNamedTypes(),t}};o([l()],n.prototype,"dataManager",void 0),o([l({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],n.prototype,"definitionSetMap",void 0),o([G("definitionSetMap")],n.prototype,"readDefinitionSetMap",null),o([$("definitionSetMap")],n.prototype,"writeDefinitionSetMap",null),o([l()],n.prototype,"inclusionModeDefinition",null),o([l()],n.prototype,"knowledgeGraph",void 0),o([l({type:f.ofType(u),json:{write:{ignoreOrigin:!0}}})],n.prototype,"layers",void 0),o([l()],n.prototype,"memberEntityTypes",void 0),o([l()],n.prototype,"memberRelationshipTypes",void 0),o([l({type:["KnowledgeGraphLayer"]})],n.prototype,"operationalLayerType",void 0),o([l()],n.prototype,"sublayerIdsCache",void 0),o([l({type:f.ofType(u),json:{write:{ignoreOrigin:!0}}})],n.prototype,"tables",void 0),o([l({json:{read:!1}})],n.prototype,"type",void 0),o([l(O)],n.prototype,"url",void 0),n=o([U("esri.layers.KnowledgeGraphLayer")],n);const _e=n;async function B(e){const t=await x(e);return new Blob([t],{type:"application/x-protobuf"})}function q(e){const t=`definitionSetMap-${j()}.dat`,i=z("knowledgeGraphLayer",t);return e.resourceFromPath(i)}export{_e as default}; diff --git a/build/assets/KnowledgeGraphSublayer-vp2dcEj_.js b/build/assets/KnowledgeGraphSublayer-vp2dcEj_.js new file mode 100644 index 0000000..37b9aa8 --- /dev/null +++ b/build/assets/KnowledgeGraphSublayer-vp2dcEj_.js @@ -0,0 +1 @@ +import{dh as _e,s as G,U as ke,d1 as F,B as l,D as y,E as ce,bw as ve,V as ae,dK as B,ce as Ne,bD as ne,cf as ye,aZ as ue,h4 as he,aX as Me,ex as Ce,eg as xe,eh as je,cq as Oe,ef as qe,ei as Ae,cu as Fe,cr as Ge,cv as Qe,h5 as Je,cg as pe,ch as U,ej as Pe,h6 as le,ay as Ue,el as Be,da as Ye,ax as Ve,$ as C,h7 as He,h8 as We,h9 as Ke,ha as ze,en as Ze,eo as Xe,ep as et,cx as tt,eL as nt,eM as it,eq as rt,hb as ot,er as st,es as at,et as pt,d2 as lt,hc as dt,c$ as yt,cE as ut}from"./index-DKOmzAMm.js";import{m as ct}from"./FeatureStore-C3siChbH.js";import{$ as ht}from"./QueryEngine-CI3mggax.js";import{l as mt,o as de}from"./clientSideDefaults-B7fGShzo.js";import{o as ft}from"./featureConversionUtils-CCATessr.js";import{a as me}from"./OptimizedFeature-DDMKj8Vq.js";import{T as ee,r as Se}from"./knowledgeGraphService-BFNZ__DV.js";import{s as Y}from"./Relationship-DeeaK30J.js";const gt="ESRI__DESTINATION_ID",Tt="ESRI__ORIGIN_ID";class q{constructor(){this._featureLookup=new Map}static getInstance(){return q.instance||(q.instance=new q),q.instance}static resetInstance(){q.instance&&(q.instance=null)}deleteFromStore(t){t.forEach(i=>{this._featureLookup.delete(i)})}readFromStoreByList(t){const i=[];return t.forEach(n=>{const s=this.readFromStoreById(n);s&&i.push(s)}),i}readFromStoreById(t){return this._featureLookup.get(t)??null}writeToStore(t,i,n){const s=[];return t.forEach(r=>{if(!(r!=null&&r.id))return;r.properties||(r.properties=[]);let o,a=null;if(n&&r.properties[n]&&(a=ft(r.properties[n])),"originId"in r&&"destinationId"in r&&(r.properties[Tt]=r.originId,r.properties[gt]=r.destinationId),r.properties[i]=r.id,r.id&&this._featureLookup.has(r.id)&&this._featureLookup.get(r.id).attributes){const p=this._featureLookup.get(r.id),h=JSON.parse(JSON.stringify(Object.assign(p.attributes,r.properties)));n&&r.properties[n]&&(h[n]=_e(r.properties[n])),o=new me(a?JSON.parse(JSON.stringify(a)):p!=null&&p.geometry?JSON.parse(JSON.stringify(p.geometry)):null,h,null,r.properties[i])}else o=new me(a?JSON.parse(JSON.stringify(a)):null,r.properties,null,r.properties[i]);this._featureLookup.set(r.id,o),s.push(o)}),s}}var re;(function(e){e.ELEMENTUID="ELEMENTUID",e.TYPENAME="TYPENAME"})(re||(re={}));re.ELEMENTUID,re.TYPENAME;var fe,ge;(function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"})(fe||(fe={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(ge||(ge={}));var Te,we,be,oe;(function(e){e[e.featureResult=0]="featureResult",e[e.countResult=1]="countResult",e[e.idsResult=2]="idsResult"})(Te||(Te={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(we||(we={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(be||(be={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(oe||(oe={}));function wt(e){if(!e.spatialReference.isWGS84)throw new G("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}async function xt(e,t){var r,o;const i=[],n=new Map,s=[];if((r=t.dataModel)!=null&&r.relationshipTypes)for(const a of t.dataModel.relationshipTypes)a.name&&n.set(a.name,[]);for(const a of e)n.has(a.typeName)&&((o=n.get(a.typeName))==null||o.push(a.id));for(const[a,p]of n){if(p.length<1)continue;const h=new Y({openCypherQuery:`MATCH (n)-[r:${a}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:p}});s.push(ee(t,h).then(async w=>{const g=w.resultRowsStream.getReader();for(;;){const{done:b,value:S}=await g.read();if(b)break;for(const R of S)i.push({id:R[0],typeName:R[1]}),i.push({id:R[2],typeName:R[3]})}}))}return await Promise.all(s),i}async function jt(e,t){t??(t=!1);const i={generateAllSublayers:t,namedTypeDefinitions:new Map};return await It(e).then(n=>{Dt(n,i)}),i}async function Ot(e){const t=await Se(),i=new t.MapOfObjectIdentifierSets;bt(i,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(i),n.encode();const s=n.get_encoding_result();if(s.error.error_code!==0)throw new G("knowledge-graph:layer-support-utils",s.error.error_message);const r=structuredClone(s.get_byte_buffer());return n.delete(),r}finally{i.delete()}}function bt(e,t,i){for(const[n,s]of i.namedTypeDefinitions){if(!s.members||s.useAllData)continue;const r=s.members.keys(),o=new t.GlobalIdArray,a=new t.ObjectIdentifierSet;for(const p of r)o.add_globalid(p);a.set_globalid_array(o),o.delete(),e.put_identifier_set(n,a),a.delete()}return e}async function It(e){const t=await ke(e,{responseType:"array-buffer"}),i=await t.data;return Et(new Uint8Array(i))}async function Et(e){const t=new(await Se()).MapOfObjectIdentifierSetsDecoder,i=t.decode(new Uint8Array(e)),n=new Map;if(i.error_code!==0)throw new G("knowledge-graph:layer-support-utils",i.error_message);const s=t.get_map_of_identifier_sets(),r=s.keys,o=r.size();for(let a=0;a({useAllData:!1,members:new Map}));for(const r of n)s.members.has(r)||s.members.set(r,{id:r})}return t}const O="ESRI__ID",qt="ESRI__ORIGIN_ID",At="ESRI__DESTINATION_ID",Le="ESRI__LAYOUT_GEOMETRY",Ie="ESRI__AGGREGATION_COUNT";let j=class extends ve{constructor(e){var i,n,s;super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;(i=e.knowledgeGraph.dataModel.entityTypes)==null||i.forEach(r=>{var o,a;r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!((o=e.inclusionModeDefinition)!=null&&o.generateAllSublayers)||this.entityTypeNames.add(r.name),(a=r.properties)==null||a.forEach(p=>{p.geometryType&&p.geometryType!=="esriGeometryNull"&&this.geographicLookup.set(r.name,{name:p.name??"",geometryType:p.geometryType})}))}),(n=e.knowledgeGraph.dataModel.relationshipTypes)==null||n.forEach(r=>{var o,a;r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!((o=e.inclusionModeDefinition)!=null&&o.generateAllSublayers)||this.relationshipTypeNames.add(r.name),(a=r.properties)==null||a.forEach(p=>{p.geometryType&&p.geometryType!=="esriGeometryNull"&&this.geographicLookup.set(r.name,{name:p.name??"",geometryType:p.geometryType})}))}),(s=e.inclusionModeDefinition)==null||s.namedTypeDefinitions.forEach((r,o)=>{var p,h;if(t.get(o)==="entity")this.entityTypeNames.add(o);else{if(t.get(o)!=="relationship")return ae.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void((p=e.inclusionModeDefinition)==null?void 0:p.namedTypeDefinitions.delete(o));this.relationshipTypeNames.add(o)}const a=new Map;(h=r.members)==null||h.forEach(w=>{F(this.memberIdTypeLookup,w.id,()=>new Set).add(o);const g=this.getById(w.id);g&&a.set(w.id,g)}),this.sublayerCaches.set(o,a)})}addToLayer(e){e.forEach(({typeName:t,id:i})=>{if(!this.inclusionModeDefinition)throw new G("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(t)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(t)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(t);n.members||(n.members=new Map),n.members.set(i,{id:i}),F(this.memberIdTypeLookup,i,()=>new Set).add(t)}}else{const n=new Map;n.set(i,{id:i}),this.inclusionModeDefinition.namedTypeDefinitions.set(t,{useAllData:!1,members:n}),F(this.memberIdTypeLookup,i,()=>new Set).add(t)}})}getById(e){return q.getInstance().readFromStoreById(e)}async getData(e,t,i){var s,r;if(t.objectType.name&&((s=this.inclusionModeDefinition)!=null&&s.namedTypeDefinitions)&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new B({where:"1=1",outFields:["*"]}),t.parentCompositeLayer.type==="link-chart"){const o=t.parentCompositeLayer,a=this._processingCacheUpdatesLookup.get(t.objectType.name??""),p=n.outFields;p&&p.length===1&&p[0]===O&&n.where==="1=1"||await Promise.all(a??[]);const h=this.sublayerCaches.has(t.objectType.name??"")?Array.from((r=this.sublayerCaches.get(t.objectType.name))==null?void 0:r.values()):[],w=[];return h.forEach(g=>{this.relationshipTypeNames.has(t.objectType.name)?g.geometry=o.relationshipLinkChartDiagramLookup.get(g.attributes[t.objectIdField]):g.geometry=o.entityLinkChartDiagramLookup.get(g.attributes[t.objectIdField]),g.attributes[Le]=g.geometry,w.push(g)}),w}return this.retrieveDataFromService(n,t,i)}async getConnectedRecordIds(e,t){const i=[];let n="";const s=[],r=new Map;if(e.forEach(o=>{var a;if(this.memberIdTypeLookup.has(o))for(const p of this.memberIdTypeLookup.get(o)){if(!this.entityTypeNames.has(p))return;r.has(p)?(a=r.get(p))==null||a.push(o):r.set(p,[o])}}),t&&(t==null?void 0:t.length)!==0){for(const o of t)n=n+o+"|";n=n.slice(0,-1)}return r.forEach((o,a)=>{let p;p=t&&(t==null?void 0:t.length)!==0?`MATCH (n:${a})-[r:${n}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${a})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const h=new Promise(w=>{(async()=>{const g=(await ee(this.knowledgeGraph,new Y({openCypherQuery:p,bindParameters:{ids:o}}))).resultRowsStream.getReader();try{for(;;){const{done:b,value:S}=await g.read();if(b)break;for(let R=0;R{w()})});s.push(h)}),this.refreshCacheContent(),await Promise.all(s),i}async getAttachedRelationships(e,t){const i=[],n="MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",s=(await ee(this.knowledgeGraph,new Y({openCypherQuery:n,bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:r,value:o}=await s.read();if(r)break;for(let a=0;a{d.name&&a.set(d.name,d)}),(h=this.knowledgeGraph.dataModel.relationshipTypes)==null||h.forEach(d=>{d.name&&a.set(d.name,d)}),e||this.inclusionModeDefinition?e?e.forEach(d=>{var L;if(this.memberIdTypeLookup.has(d))for(const k of this.memberIdTypeLookup.get(d))o.has(k)?(L=o.get(k))==null||L.push(d):o.set(k,[d])}):(g=(w=this.inclusionModeDefinition)==null?void 0:w.namedTypeDefinitions)==null||g.forEach((d,L)=>{d.useAllData?o.set(L,null):d.members&&d.members.forEach(k=>{var Q;o.has(L)&&o.get(L)!==null?(Q=o.get(L))==null||Q.push(k.id):o.set(L,[k.id])})}):((b=this.knowledgeGraph.dataModel.entityTypes)==null||b.forEach(d=>{d.name&&o.set(d.name,null)}),(S=this.knowledgeGraph.dataModel.entityTypes)==null||S.forEach(d=>{d.name&&o.set(d.name,null)}));for(const[d,L]of o){const k=new Promise(Q=>{(async()=>{var W,K,z,Z,X,I,m;const J=new Set,P=[];let V,A="",H=!1;if(t||((K=(W=a.get(d))==null?void 0:W.properties)==null||K.forEach(T=>{T.name&&J.add(T.name)})),i&&this.geographicLookup.has(d)){const T=(z=this.geographicLookup.get(d))==null?void 0:z.name;T&&J.add(T)}if(this.entityTypeNames.has(d))A=`MATCH (n:${d}) ${L?"WHERE id(n) IN $ids ":""}return ID(n)`,J.forEach(T=>{A+=`, n.${T}`,P.push(T)});else{if(!this.relationshipTypeNames.has(d))throw new G("knowledge-graph:layer-data-manager",`The graph type of ${d} could not be determined. Was this type set in the KG data model and inclusion definition?`);H=!0,A=`MATCH ()-[n:${d}]->() ${L?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,J.forEach(T=>{A+=`, n.${T}`,P.push(T)})}V=new Y(L?{openCypherQuery:A,bindParameters:{ids:L}}:{openCypherQuery:A});const ie=(await ee(this.knowledgeGraph,V)).resultRowsStream.getReader();for(;;){const{done:T,value:$}=await ie.read();if(T)break;const M=[];for(let f=0;f<$.length;f++){const c=$[f];let N=0,_=0;const v={properties:{}};for(v.id=c[N],N++,_++,H&&(v.originId=c[N],N++,_++,v.destinationId=c[N],N++,_++,F(this.nodeConnectionsLookup,v.originId,()=>new Set).add(v.id),F(this.nodeConnectionsLookup,v.destinationId,()=>new Set).add(v.id),F(this.relationshipConnectionsLookup,v.id,()=>[v.originId,v.destinationId]));N{var c,N;D==null||D.set(f.attributes[O],f),n&&!((c=this.inclusionModeDefinition)!=null&&c.namedTypeDefinitions.get(d).members.has(f.attributes[O]))&&((N=this.inclusionModeDefinition)==null||N.namedTypeDefinitions.get(d).members.set(f.attributes[O],{id:f.attributes[O]}),F(this.memberIdTypeLookup,f.attributes[O],()=>new Set).add(d))})}})().then(()=>{Q(null)})});r.push(k),(R=this._processingCacheUpdatesLookup.get(d))==null||R.push(k)}await Promise.all(r)}removeFromLayer(e){var n,s,r;const t=new Set,i=new Set(e.map(o=>o.id));for(const o of e)t.add(o.typeName),((n=this.memberIdTypeLookup.get(o.id))==null?void 0:n.size)===1?this.memberIdTypeLookup.delete(o.id):(s=this.memberIdTypeLookup.get(o.id))==null||s.delete(o.typeName),(r=this.inclusionModeDefinition)==null||r.namedTypeDefinitions.forEach((a,p)=>{var h;p===o.typeName&&((h=a.members)!=null&&h.has(o.id))&&a.members.delete(o.id)});t.forEach(o=>{var a;(a=this.sublayerCaches.get(o))==null||a.forEach((p,h)=>{var w;i.has(h)&&((w=this.sublayerCaches.get(o))==null||w.delete(h))})})}async retrieveDataFromService(e,t,i){var R,d,L,k,Q,se,J,P,V,A,H,ie,W,K,z,Z,X;const n=q.getInstance(),s=new Set,r=[];let o,a="",p=[];const h=t.graphType==="relationship",w=(L=(d=(R=this.inclusionModeDefinition)==null?void 0:R.namedTypeDefinitions)==null?void 0:d.get(t.objectType.name))==null?void 0:L.useAllData,g=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let b=!w&&g?Array.from(g).sort():null;if((se=(Q=(k=this.inclusionModeDefinition)==null?void 0:k.namedTypeDefinitions)==null?void 0:Q.get(t.objectType.name))!=null&&se.useAllData)(V=(P=(J=this.inclusionModeDefinition)==null?void 0:J.namedTypeDefinitions)==null?void 0:P.get(t.objectType.name))!=null&&V.useAllData&&e.objectIds!=null&&(b=e.objectIds);else if(e.objectIds!=null&&b&&b.length>0){const I=e.objectIds;e.objectIds=b.filter(m=>I.includes(m))}else if(e.objectIds!=null)b=e.objectIds;else{if((A=this.inclusionModeDefinition)!=null&&A.namedTypeDefinitions.has(t.objectType.name)&&(!((H=this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name))!=null&&H.members)||((W=(ie=this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name))==null?void 0:ie.members)==null?void 0:W.size)<1))return e.objectIds=[],[];e.objectIds=b}if(e.outFields!=null){const I=e.outFields;I.includes("*")?t.fields.forEach(m=>{s.add(m.name)}):I.forEach(m=>{m!==O&&m!==t.geometryFieldName&&s.add(m)})}if(e.geometry!=null){const I=e.geometry;let m;const T=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,$=T==null?void 0:T.spatialReference,M=(K=T==null?void 0:T.serviceCapabilities)==null?void 0:K.geometryCapabilities;let E=M==null?void 0:M.geometryMaxBoundingRectangleSizeX,D=M==null?void 0:M.geometryMaxBoundingRectangleSizeY;if((z=I==null?void 0:I.extent)!=null&&z.spatialReference&&!((Z=I.spatialReference)!=null&&Z.isWGS84)?(await Ne(I.extent.spatialReference,ne),m=ye(I.extent,ne)):m=I.extent,E&&D&&$){if($.wkid!==4326){const f=new ue({spatialReference:$,xmax:E,ymax:D}),c=ye(f,ne);E=c.xmax,D=c.ymax}if(m.xmax-m.xmin>E)throw new G("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${E}° latitude, limit exceeded`);if(m.ymax-m.ymin>D)throw new G("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${D}° longitude, limit exceeded`)}if(e.where!=null&&e.where!=="1=1"){const f=await he(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(c=>{f.fieldNames.includes(c.name)&&s.add(c.name)})}a=h?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach(f=>{a+=`, n.${f}`,r.push(f)}),o=new Y({openCypherQuery:a,bindParameters:{param_filter_geom:new Me({rings:wt(m)})}})}else{let I="";if(e.where!=null&&e.where!=="1=1"){const $=await he(e.where,t.fieldsIndex);t.fields.forEach(c=>{$.fieldNames.includes(c.name)&&s.add(c.name)});const M=new Set(["column-reference","string","number","binary-expression"]),E=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let D=!1;const f=c=>{if(c.type==="column-reference")return`n.${c.column}`;if(c.type==="string")return`'${c.value}'`;if(c.type==="number")return`${c.value}`;if(c.type==="binary-expression"&&M.has(c.left.type)&&M.has(c.right.type)&&E.has(c.operator))return`${f(c.left)} ${c.operator} ${f(c.right)}`;if(c.type==="binary-expression"&&c.operator==="LIKE"){let N="";if(c.left.type==="function"&&c.left.args.value[0].type==="column-reference")N+=`lower(n.${c.left.args.value[0].column})`;else{if(c.left.type!=="column-reference")return D=!0,"";N+=`lower(n.${c.left.column})`}if(N+=" CONTAINS (",c.right.type!=="string")return D=!0,"";{let _=c.right.value;_.charAt(0)==="%"&&(_=_.slice(1)),_.charAt(_.length-1)==="%"&&(_=_.slice(0,-1)),N+=`'${_.toLowerCase()}')`}return N}return D=!0,""};I=f($.parseTree),D&&(I="")}let m="";m=h?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let T=!1;b&&(T=!0,m+=" WHERE ID(n) IN $ids"),I&&(m+=T?" AND":" WHERE",m+=` ${I}`),m+=" return ID(n)",h&&(m+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach($=>{m+=`, n.${$}`,r.push($)}),o=new Y(b?{openCypherQuery:m,bindParameters:{ids:b}}:{openCypherQuery:m})}const S=(await ee(t.parentCompositeLayer.dataManager.knowledgeGraph,o,i)).resultRowsStream.getReader();for(;;){const{done:I,value:m}=await S.read();if(I)break;const T=[];for(let $=0;${let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return l([y(Ee.fields)],t.prototype,"fields",void 0),l([y(Ee.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=l([ce("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};function x(e){if(!e.json)return e;e.json.write=De(e.json.write);const t=e.json.origins;if(!t)return e;let i;for(i in t){const n=t[i];n&&(n.write=De(n.write))}return e}function De(e){return typeof e=="object"&&e?(e.enabled!==!1&&(e.overridePolicy=Mt(e)),e):e===!0?te():e}function Mt(e){const{target:t,writer:i,overridePolicy:n,...s}=e;return function(r,o){const a=$e.call(this,r,o);return a.enabled?{...s,...a}:a}}function te(){return{overridePolicy:$e}}function $e(e,t){const i=!!this.geometryType;let n={enabled:i};return i&&(n={...n,...Re.call(this,e,t)}),n}function Re(e,t){return{ignoreOrigin:this.originIdOf(t)>yt.DEFAULTS}}let u=class extends Nt(xe(je(Oe(qe(Ae(Fe(Ge(Qe(ut))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=mt(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=O,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const t=new MessageChannel;return new Je(t.port1,{channel:t,client:{queryFeatures:(i,n={})=>{const s=B.fromJSON(i);return this.queryFeaturesJSON(s,n)}}}),[t.port2]})},this.title=null,this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){var t,i;const e=[];return(i=(t=this.objectType)==null?void 0:t.properties)==null||i.forEach(n=>{const s=n.fieldType==="esriFieldTypeOID"?"esriFieldTypeInteger":n.fieldType;e.push(pe.fromJSON({name:n.name,type:s,alias:n.alias,defaultValue:n.defaultValue,editable:n.editable,nullable:n.nullable}))}),e.push(pe.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),pe.fromJSON({name:Ie,type:"esriFieldTypeInteger",alias:Ie,editable:!1})),e}get geometryType(){var i,n,s;if(((i=this.parentCompositeLayer)==null?void 0:i.type)==="link-chart")return this.graphType==="relationship"?"polyline":"point";const e=(s=this.parentCompositeLayer)==null?void 0:s.dataManager.geographicLookup.get((n=this.objectType)==null?void 0:n.name),t=e==null?void 0:e.geometryType;return t&&t!=="esriGeometryNull"?U.fromJSON(t):null}get geometryFieldName(){var t,i,n;if(((t=this.parentCompositeLayer)==null?void 0:t.type)==="link-chart")return Le;const e=(n=this.parentCompositeLayer)==null?void 0:n.dataManager.geographicLookup.get((i=this.objectType)==null?void 0:i.name);return(e==null?void 0:e.name)??null}get graphTypeName(){var e;return(e=this.objectType)==null?void 0:e.name}get hasM(){var n,s,r,o;const e=(s=this.parentCompositeLayer)==null?void 0:s.dataManager.geographicLookup.get((n=this.objectType)==null?void 0:n.name),t=e==null?void 0:e.name,i=t?(o=(r=this.objectType)==null?void 0:r.properties)==null?void 0:o[t]:null;return(i==null?void 0:i.hasM)??!1}get hasZ(){var n,s,r,o;const e=(s=this.parentCompositeLayer)==null?void 0:s.dataManager.geographicLookup.get((n=this.objectType)==null?void 0:n.name),t=e==null?void 0:e.name,i=t?(o=(r=this.objectType)==null?void 0:r.properties)==null?void 0:o[t]:null;return(i==null?void 0:i.hasZ)??!1}set renderer(e){Pe(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){var e;return this._isOverridden("renderer")?this._get("renderer"):((e=this.parentCompositeLayer)==null?void 0:e.type)==="link-chart"?this.graphType==="relationship"?le(de(U.toJSON("polyline")).renderer):le(de(U.toJSON("point")).renderer):le(de(U.toJSON(this.geometryType)).renderer)}get spatialReference(){var e,t,i,n;return((n=(i=(t=(e=this.parentCompositeLayer)==null?void 0:e.dataManager)==null?void 0:t.knowledgeGraph)==null?void 0:i.dataModel)==null?void 0:n.spatialReference)??Ue.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return Be(this,e)}createQuery(){return new B({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t{r.sourceLayer=this}),s}async queryFeaturesJSON(e,t){const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(i.toJSON(),t==null?void 0:t.signal)}async queryFeatureCount(e,t){const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(i.toJSON(),t==null?void 0:t.signal)}async queryExtent(e={},t){var a,p,h,w;const i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(i),r=await s.executeQueryForExtent(n.toJSON(),t==null?void 0:t.signal);let o;return o=((a=r.extent)==null?void 0:a.xmin)!=null&&((p=r.extent)==null?void 0:p.xmax)!=null&&((h=r.extent)==null?void 0:h.ymin)!=null&&((w=r.extent)==null?void 0:w.ymax)!=null?new ue(r.extent):new ue,{count:r.count,extent:o}}async queryObjectIds(e,t){const i=B.from(e);let n;if(this.parentCompositeLayer.type==="link-chart"&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const s=await this.parentCompositeLayer.dataManager.getData(i,this,t);n=this.loadQueryEngine(s)}return n.executeQueryForIds(i.toJSON(),t==null?void 0:t.signal)}loadQueryEngine(e){const t=new ct({geometryType:U.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),i=new ht({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:U.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return i.featureStore.addMany(e),i}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new B({where:"1=1",outFields:[O]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){var r;const i=B.from(e),n=i.geometry;let s;if(n&&!((r=n.spatialReference)!=null&&r.isWGS84)&&(await Ne(n.spatialReference,ne),i.geometry=ye(n instanceof Me||n instanceof Ve?n:n.extent,ne)),this.parentCompositeLayer.type==="link-chart"&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const o=await this.parentCompositeLayer.dataManager.getData(i,this,t);s=this.loadQueryEngine(o)}return{resolvedQuery:i,queryEngine:s}}};l([y(x(C(He)))],u.prototype,"blendMode",void 0),l([y()],u.prototype,"capabilities",void 0),l([y({json:{origins:{"web-scene":{write:!1}},write:te()}})],u.prototype,"charts",void 0),l([y({readOnly:!0})],u.prototype,"defaultPopupTemplate",null),l([y({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],u.prototype,"definitionExpression",void 0),l([y()],u.prototype,"displayField",void 0),l([y(x(C(We)))],u.prototype,"effect",void 0),l([y()],u.prototype,"elevationInfo",void 0),l([y(x(C(Ke)))],u.prototype,"featureEffect",void 0),l([y(x(C(ze)))],u.prototype,"featureReduction",null),l([y()],u.prototype,"fields",null),l([y()],u.prototype,"geometryType",null),l([y()],u.prototype,"geometryFieldName",null),l([y({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],u.prototype,"graphType",void 0),l([y({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],u.prototype,"graphTypeName",null),l([y()],u.prototype,"hasM",null),l([y()],u.prototype,"hasZ",null),l([y({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],u.prototype,"id",void 0),l([y(x(C(Ze)))],u.prototype,"labelsVisible",void 0),l([y({type:[Xe],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:et,write:te()}})],u.prototype,"labelingInfo",void 0),l([y({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],u.prototype,"layerType",void 0),l([y(x(C(tt)))],u.prototype,"legendEnabled",void 0),l([y(x(C(nt)))],u.prototype,"maxScale",void 0),l([y(x(C(it)))],u.prototype,"minScale",void 0),l([y()],u.prototype,"objectIdField",void 0),l([y()],u.prototype,"objectType",void 0),l([y(x(C(rt)))],u.prototype,"opacity",void 0),l([y(x(C(ot)))],u.prototype,"orderBy",void 0),l([y()],u.prototype,"parentCompositeLayer",void 0),l([y(x(C(st)))],u.prototype,"popupEnabled",void 0),l([y({type:at,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],u.prototype,"popupTemplate",void 0),l([y({type:Number,json:{write:{overridePolicy:Re}}})],u.prototype,"refreshInterval",void 0),l([y({types:pt,json:{name:"layerDefinition.drawingInfo.renderer",write:te()}})],u.prototype,"renderer",null),l([y()],u.prototype,"source",void 0),l([y()],u.prototype,"spatialReference",null),l([y({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],u.prototype,"title",void 0),l([lt("title")],u.prototype,"writeTitle",null),l([y({json:{read:!1}})],u.prototype,"type",void 0),l([y(x(C(dt)))],u.prototype,"useViewTime",void 0),l([y({type:Boolean,json:{name:"visibility",write:te()}})],u.prototype,"visible",void 0),u=l([ce("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],u);const Ft=u;export{Le as D,Ot as E,Ie as I,j as M,jt as T,Ft as a,qt as b,At as c,xt as h,O as w}; diff --git a/build/assets/LercWorker-CqHAIE7x.js b/build/assets/LercWorker-CqHAIE7x.js new file mode 100644 index 0000000..7c5030d --- /dev/null +++ b/build/assets/LercWorker-CqHAIE7x.js @@ -0,0 +1 @@ +import{bS as Y}from"./index-DKOmzAMm.js";var A={};A.defaultNoDataValue=Y(-1/0),A.decode=function(i,t){var r=(t=t||{}).encodedMaskData||t.encodedMaskData===null,e=D(i,t.inputOffset||0,r),c=t.noDataValue!=null?Y(t.noDataValue):A.defaultNoDataValue,n=b(e,t.pixelType||Float32Array,t.encodedMaskData,c,t.returnMask),s={width:e.width,height:e.height,pixelData:n.resultPixels,minValue:e.pixels.minValue,maxValue:e.pixels.maxValue,noDataValue:c};return n.resultMask&&(s.maskData=n.resultMask),t.returnEncodedMask&&e.mask&&(s.encodedMaskData=e.mask.bitset?e.mask.bitset:null),t.returnFileInfo&&(s.fileInfo=F(e,c),t.computeUsedBitDepths&&(s.fileInfo.bitDepths=S(e))),s};var b=function(i,t,r,e,c){var n,s,d=0,m=i.pixels.numBlocksX,x=i.pixels.numBlocksY,y=Math.floor(i.width/m),v=Math.floor(i.height/x),p=2*i.maxZError;r=r||(i.mask?i.mask.bitset:null),n=new t(i.width*i.height),c&&r&&(s=new Uint8Array(i.width*i.height));for(var g,k,h=new Float32Array(y*v),M=0;M<=x;M++){var B=M!==x?v:i.height%x;if(B!==0)for(var I=0;I<=m;I++){var o=I!==m?y:i.width%m;if(o!==0){var P,a,f,w,l=M*i.width*v+I*y,U=i.width-o,u=i.pixels.blocks[d];if(u.encoding<2?(u.encoding===0?P=u.rawData:(E(u.stuffedData,u.bitsPerPixel,u.numValidPixels,u.offset,p,h,i.pixels.maxValue),P=h),a=0):f=u.encoding===2?0:u.offset,r)for(k=0;k>3],w<<=7&l),g=0;g>3]),128&w?(s&&(s[l]=1),n[l++]=u.encoding<2?P[a++]:f):(s&&(s[l]=0),n[l++]=e),w<<=1;l+=U}else if(u.encoding<2)for(k=0;k0){var s=new Uint8Array(Math.ceil(e.width*e.height/8)),d=(n=new DataView(i,t,e.mask.numBytes)).getInt16(0,!0),m=2,x=0;do{if(d>0)for(;d--;)s[x++]=n.getUint8(m++);else{var y=n.getUint8(m++);for(d=-d;d--;)s[x++]=y}d=n.getInt16(m,!0),m+=2}while(m0?1:0),k=p+(e.height%p>0?1:0);e.pixels.blocks=new Array(g*k);for(var h=1e9,M=0,B=0;B3)throw"Invalid block encoding ("+a.encoding+")";if(a.encoding!==2){if(f!==0&&f!==2){if(f>>=6,a.offsetType=f,f===2)a.offset=n.getInt8(1),o++;else if(f===1)a.offset=n.getInt16(1,!0),o+=2;else{if(f!==0)throw"Invalid block offset type";a.offset=n.getFloat32(1,!0),o+=4}if(h=Math.min(a.offset,h),a.encoding===1)if(f=n.getUint8(o),o++,a.bitsPerPixel=63&f,f>>=6,a.numValidPixelsType=f,f===2)a.numValidPixels=n.getUint8(o),o++;else if(f===1)a.numValidPixels=n.getUint16(o,!0),o+=2;else{if(f!==0)throw"Invalid valid pixel count type";a.numValidPixels=n.getUint32(o,!0),o+=4}}var w;if(t+=o,a.encoding!=3){if(a.encoding===0){var l=(e.pixels.numBytes-1)/4;if(l!==Math.floor(l))throw"uncompressed block has invalid length";w=new ArrayBuffer(4*l),new Uint8Array(w).set(new Uint8Array(i,t,4*l));for(var U=new Float32Array(w),u=0;u=t)m=x>>>p-t&y,p-=t;else{var h=t-p;m=(x&y)<>>(p=32-h)}n[d]=mthis._computeExtent(),t=>{(t==null?void 0:t.pending)==null&&this._set("extent",t!=null?t.extent:null)},E))}get targets(){return this._get("targets")||new f}set targets(t){this._set("targets",L(t,this.targets,f))}get spatialReference(){var t;return((t=this.observer)==null?void 0:t.position)!=null?this.observer.position.spatialReference:null}get requiredPropertiesForEditing(){var t;return[(t=this.observer)==null?void 0:t.position]}async waitComputeExtent(){const t=this._computeExtent();return t!=null?t.pending:Promise.resolve()}_computeExtent(){var m;const t=this.spatialReference;if(((m=this.observer)==null?void 0:m.position)==null||t==null)return null;const r=p=>W(p.position,p.elevationInfo)==="absolute-height",o=this.observer.position,b=C(o.x,o.y,o.z,o.x,o.y,o.z);for(const p of this.targets)if(p.position!=null){const y=H(p.position,t);if(y.pending!=null)return{pending:y.pending,extent:null};if(y.geometry!=null){const{x:z,y:q,z:A}=y.geometry;V(b,[z,q,A])}}const h=D(b,t);return r(this.observer)&&this.targets.every(r)||(h.zmin=void 0,h.zmax=void 0),{pending:null,extent:h}}clear(){this.observer=null,this.targets.removeAll()}};i([s({type:["line-of-sight"]})],l.prototype,"type",void 0),i([s({type:F,json:{read:!0,write:!0}})],l.prototype,"observer",void 0),i([s({cast:B,type:f,nonNullable:!0,json:{read:!0,write:!0}})],l.prototype,"targets",null),i([s({value:null,readOnly:!0})],l.prototype,"extent",void 0),i([s({readOnly:!0})],l.prototype,"spatialReference",null),i([s({readOnly:!0})],l.prototype,"requiredPropertiesForEditing",null),l=i([c("esri.analysis.LineOfSightAnalysis")],l);const j=l,k=v.ofType(_);let n=class extends K(M(Q)){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new j,this.opacity=1}initialize(){this.addHandles($(()=>this.analysis,(e,t)=>{t!=null&&t.parent===this&&(t.parent=null),e!=null&&(e.parent=this)},E))}async load(){return this.analysis!=null&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){var e;return(e=this.analysis)==null?void 0:e.observer}set observer(e){const{analysis:t}=this;t&&(t.observer=e)}get targets(){return this.analysis!=null?this.analysis.targets:new v}set targets(e){var t;L(e,(t=this.analysis)==null?void 0:t.targets)}get fullExtent(){return this.analysis!=null?this.analysis.extent:null}get spatialReference(){return this.analysis!=null?this.analysis.spatialReference:null}releaseAnalysis(e){this.analysis===e&&(this.analysis=new j)}};i([s({json:{read:!1},readOnly:!0})],n.prototype,"type",void 0),i([s({type:["LineOfSightLayer"]})],n.prototype,"operationalLayerType",void 0),i([s({type:F,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],n.prototype,"observer",null),i([s({type:k,json:{read:!0,write:{ignoreOrigin:!0}}})],n.prototype,"targets",null),i([s({nonNullable:!0,json:{read:!1,write:!1}})],n.prototype,"analysis",void 0),i([s({readOnly:!0})],n.prototype,"fullExtent",null),i([s({readOnly:!0})],n.prototype,"spatialReference",null),i([s({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],n.prototype,"opacity",void 0),i([s({type:["show","hide"]})],n.prototype,"listMode",void 0),n=i([c("esri.layers.LineOfSightLayer")],n);const re=n;export{re as default}; diff --git a/build/assets/LinkChartLayer-BBNWdA8U.js b/build/assets/LinkChartLayer-BBNWdA8U.js new file mode 100644 index 0000000..b74e977 --- /dev/null +++ b/build/assets/LinkChartLayer-BBNWdA8U.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lclayout-CDvAJV0i.js","assets/_commonjsHelpers-DCkdB7M8.js"])))=>i.map(i=>d[i]); +import{_ as Se,fr as He,cq as Oe,cu as $e,a7 as Ce,aZ as ke,s as ie,V as H,c7 as Be,d1 as Fe,Q as Me,ax as Ee,B as v,D as A,E as Ue,cE as ze}from"./index-DKOmzAMm.js";import{o as W}from"./featureConversionUtils-CCATessr.js";import{e as be}from"./OptimizedFeature-DDMKj8Vq.js";import{M as Qe,h as je,a as de,w as _,b as ne,c as se,D as x,I as Ve}from"./KnowledgeGraphSublayer-vp2dcEj_.js";import{R as Ye}from"./knowledgeGraphService-BFNZ__DV.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./FeatureStore-C3siChbH.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./QueryEngine-CI3mggax.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./clientSideDefaults-B7fGShzo.js";import"./Relationship-DeeaK30J.js";var re;(function(e){e.MULTIPLIER="multiplier",e.ABSOLUTE="absoluteValue"})(re||(re={}));let pe,L=null;function qe(){return pe||(pe=Se(()=>import("./lclayout-CDvAJV0i.js"),__vite__mapDeps([0,1])).then(e=>e.l).then(({default:e})=>e({locateFile:i=>He(`esri/libs/linkchartlayout/${i}`)})).then(e=>{We(e)}),pe)}function We(e){L=e}var O,oe;function V(e,i,a,t,o,l){const n=a.length,u=o.length,C=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,c=Uint8Array.BYTES_PER_ELEMENT,s=16,g=s+n*(c+2*C)+u*(2*p),f=L._malloc(g);try{const h=f+s-f%s,M=h+n*C,E=M+n*C,D=E+u*p,I=D+u*p,y=()=>[L.HEAPF64.subarray(h>>3,(h>>3)+n),L.HEAPF64.subarray(M>>3,(M>>3)+n),L.HEAPU32.subarray(E>>2,(E>>2)+u),L.HEAPU32.subarray(D>>2,(D>>2)+u),L.HEAPU8.subarray(I,I+n)],[R,F,$,U,B]=y();R.set(a),F.set(t),$.set(o),U.set(l),B.set(i);let S=e(n,I,h,M,u,E,D),T=null,P=null;if(S){const Y=L.getLayoutLinksTypes(),r=L.getLayoutLinksVerticesEndIndices(),d=L.getLayoutLinksVertices(),m=L.countLayoutLinksVertices();!u||Y&&r?m&&!d?S=!1:(T={types:new Uint8Array(L.HEAPU8.subarray(Y,Y+u)),vertexEndIndex:new Uint32Array(L.HEAPU32.subarray(r>>2,(r>>2)+u)),vertices:new Float64Array(L.HEAPF64.subarray(d>>3,(d>>3)+2*m))},P=L.getAuxiliaryGraphicElements()):S=!1}const[J,K,Z,X,ee]=y();return a.set(J),t.set(K),o.set(Z),l.set(X),i.set(ee),{success:S,links:T,graphics:P}}finally{L._free(f),L.cleanupLayout()}}(function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"})(O||(O={})),function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(oe||(oe={}));const we=2,Te=1,De=-1;var ce,ye,ge,me,fe,Le,xe,Ne,ve;(function(e){function i(){return L.getMinIdealEdgeLength()}function a(t,o,l,n,u,C=we,p=Te,c=De){return V((s,g,f,h,M,E,D)=>L.applyForceDirectedLayout(s,g,f,h,M,E,D,C,p,c),t,o,l,n,u)}e.getMinIdealEdgeLength=i,e.apply=a})(ce||(ce={})),function(e){function i(a,t,o,l,n,u=we,C=Te,p=De){return V((c,s,g,f,h,M,E)=>L.applyCommunityLayout(c,s,g,f,h,M,E,u,C,p),a,t,o,l,n)}e.apply=i}(ye||(ye={})),function(e){function i(a,t,o,l,n){return V(L.applySimpleLayout,a,t,o,l,n)}e.apply=i}(ge||(ge={})),function(e){function i(a,t,o,l,n){return V(L.applyHierarchicalLayout,a,t,o,l,n)}e.apply=i}(me||(me={})),function(e){function i(a,t,o,l,n){return V(L.applyRadialTreeLayout,a,t,o,l,n)}e.apply=i}(fe||(fe={})),function(e){function i(a,t,o,l,n){return V(L.applySmartTreeLayout,a,t,o,l,n)}e.apply=i}(Le||(Le={})),function(e){function i(a,t,o,l,n,u,C,p,c){return V((s,g,f,h,M,E,D)=>{if(l.length!==s||n.length!==s||p.length!==M||c.length!==M)return!1;const I=Float64Array.BYTES_PER_ELEMENT,y=16,R=L._malloc(y+s*I),F=L._malloc(y+s*I),$=L._malloc(y+M*I),U=L._malloc(y+M*I),B=R+y-R%y,S=F+y-F%y,T=$+y-$%y,P=U+y-U%y;try{return L.HEAPF64.subarray(B>>3,(B>>3)+s).set(l),L.HEAPF64.subarray(S>>3,(S>>3)+s).set(n),L.HEAPF64.subarray(T>>3,(T>>3)+M).set(p),L.HEAPF64.subarray(P>>3,(P>>3)+M).set(c),L.applyChronologicalLayout(s,g,f,h,B,S,M,E,D,T,P)}finally{L._free(R),L._free(F),L._free($),L._free(U)}},a,t,o,u,C)}e.apply=i}(xe||(xe={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(Ne||(Ne={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(ve||(ve={}));let N=class extends Oe($e(ze)){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new Ce,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new ke({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new Ce,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new ie("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){var l,n,u,C,p,c;if(!this.title&&this.url){const s=this.url.split("/");this.title=s[s.length-2]}const i=new Set;let a=[],t=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new ie("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");(l=e.knowledgeGraph.dataModel.entityTypes)==null||l.forEach(s=>{s.name&&this._graphTypeLookup.set(s.name,s)}),(n=e.knowledgeGraph.dataModel.relationshipTypes)==null||n.forEach(s=>{s.name&&this._graphTypeLookup.set(s.name,s)}),(u=e.inclusionModeDefinition)!=null&&u.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],t=e.knowledgeGraph.dataModel.relationshipTypes??[]):(C=e.inclusionModeDefinition)!=null&&C.namedTypeDefinitions&&((p=e.inclusionModeDefinition)==null?void 0:p.namedTypeDefinitions.size)>0?(c=e.inclusionModeDefinition)==null||c.namedTypeDefinitions.forEach((s,g)=>{var h,M;const f=this._graphTypeLookup.get(g);if(!f)return H.getLogger(this).warn(`A named type, ${g}, was in the inclusion list that wasn't in the data model and will be removed`),void((h=e.inclusionModeDefinition)==null?void 0:h.namedTypeDefinitions.delete(g));f.type==="relationship"?i.has(g)||(i.add(g),t.push(f)):f.type==="entity"?i.has(g)||(i.add(g),a.push(f)):(H.getLogger(this).warn(`A named type, ${g}, was in the inclusion list that wasn't properly modeled and will be removed`),(M=e.inclusionModeDefinition)==null||M.namedTypeDefinitions.delete(g))}):(a=e.knowledgeGraph.dataModel.entityTypes??[],t=e.knowledgeGraph.dataModel.relationshipTypes??[]);const o=new Qe({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=t,this.dataManager=o}load(e){return this.addResolvingPromise(new Promise(i=>{Ye(this.url).then(a=>{var t,o,l,n,u,C;if(this._initializeLayerProperties({knowledgeGraph:a,inclusionModeDefinition:this._originalInclusionList}),(o=(t=this.dataManager.inclusionModeDefinition)==null?void 0:t.namedTypeDefinitions)!=null&&o.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},(l=this.dataManager.knowledgeGraph.dataModel.entityTypes)==null||l.forEach(p=>{var c;p.name&&((c=this.dataManager.inclusionModeDefinition)==null||c.namedTypeDefinitions.set(p.name,{useAllData:!0}))}),(n=this.dataManager.knowledgeGraph.dataModel.relationshipTypes)==null||n.forEach(p=>{var c;p.name&&((c=this.dataManager.inclusionModeDefinition)==null||c.namedTypeDefinitions.set(p.name,{useAllData:!0}))})),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),(u=this.dataManager.inclusionModeDefinition)==null||u.namedTypeDefinitions.forEach(p=>{var c;p.useAllData=!1,(c=p.members)==null||c.forEach(s=>{let g;g=s.linkChartLocation instanceof be?s.linkChartLocation:s.linkChartLocation?W(s.linkChartLocation):null,g&&g.coords.length===2&&g.lengths.length===0?this.entityLinkChartDiagramLookup.set(s.id,g):this.relationshipLinkChartDiagramLookup.set(s.id,g)}),this.addResolvingPromise(this._initializeDiagram().then(async()=>{this.layers.forEach(async s=>{await s.refreshCachedQueryEngine()}),this.tables.forEach(async s=>{await s.refreshCachedQueryEngine()})}))});else{const p=((C=this.defaultLinkChartConfig)==null?void 0:C.layoutMode)==="GEOGRAPHIC";this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,p,!0).then(async()=>{Be(e);const c=[],s=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach(g=>{g.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach(g=>{s.push(g.refreshCachedQueryEngine()),c.push(new Promise(f=>{g.on("layerview-create",()=>{f(null)})}))}),this.tables.forEach(g=>{s.push(g.refreshCachedQueryEngine())}),await Promise.all(s)}))}i(null)})})),Promise.resolve(this)}async addRecords(e,i){let a=[];i!=null&&i.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await je(e,this.dataManager.knowledgeGraph));const t=e.concat(a).filter(o=>{var l;return!((l=this.sublayerIdsCache.get(o.typeName))!=null&&l.has(o.id))});await this._handleNewRecords(t)}async removeRecords(e,{cascadeRemoveRelationships:i=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){var l,n,u,C,p,c,s,g;let t=[];for(const f of e)((u=(n=(l=this.dataManager.inclusionModeDefinition)==null?void 0:l.namedTypeDefinitions)==null?void 0:n.get(f.typeName))==null?void 0:u.useAllData)===!1&&((s=(c=(p=(C=this.dataManager.inclusionModeDefinition)==null?void 0:C.namedTypeDefinitions)==null?void 0:p.get(f.typeName))==null?void 0:c.members)!=null&&s.has(f.id))&&t.push(f);if(i){const f=new Set,h=[];for(const M of t)if(this.dataManager.nodeConnectionsLookup.has(M.id))for(const E of this.dataManager.nodeConnectionsLookup.get(M.id))f.add(E);for(const M of f)if(this.dataManager.memberIdTypeLookup.has(M))for(const E of this.dataManager.memberIdTypeLookup.get(M))this.dataManager.relationshipTypeNames.has(E)&&h.push({id:M,typeName:E});t=t.concat(h)}this.dataManager.removeFromLayer(t);for(const f of t)(g=this.sublayerIdsCache.get(f.typeName))==null||g.delete(f.id),this.dataManager.relationshipTypeNames.has(f.typeName)?this.relationshipLinkChartDiagramLookup.delete(f.id):this.entityLinkChartDiagramLookup.delete(f.id);a&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions);const o=[];return this.layers.forEach(f=>{o.push(f.refreshCachedQueryEngine())}),await Promise.all(o),this._refreshNamedTypes(),t}async expand(e,i){const a=await this.dataManager.getConnectedRecordIds(e,i),t=a.filter(o=>{var l;return!((l=this.sublayerIdsCache.get(o.typeName))!=null&&l.has(o.id))});return await this._handleNewRecords(a),{records:t}}loadLayerAssumingLocalCache(){var e,i;this.memberRelationshipTypes.forEach(a=>{const t=new de({objectType:a,parentCompositeLayer:this,graphType:"relationship",title:a.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(a.name)||this.dataManager.sublayerCaches.set(a.name,new Map)}),this.memberEntityTypes.forEach(a=>{const t=new de({objectType:a,parentCompositeLayer:this,graphType:"entity",title:a.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(a.name)||this.dataManager.sublayerCaches.set(a.name,new Map)}),(e=this.dataManager.inclusionModeDefinition)!=null&&e.namedTypeDefinitions&&((i=this.dataManager.inclusionModeDefinition)==null||i.namedTypeDefinitions.forEach((a,t)=>{var l;const o=Fe(this.sublayerIdsCache,t,()=>new Set);(l=a.members)==null||l.forEach(n=>{if(o.add(n.id),n.linkChartLocation)if(n.linkChartLocation instanceof be)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n.id,n.linkChartLocation):this.entityLinkChartDiagramLookup.set(n.id,n.linkChartLocation);else{const u=W(n.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n.id,n.linkChartLocation?u:null):this.entityLinkChartDiagramLookup.set(n.id,n.linkChartLocation?u:null)}})}))}async calculateLinkChartLayout(e="RADIAL_TREE",i){var X,ee,Y;const a=[],t=[],o=[];this.dataManager.sublayerCaches.forEach((r,d)=>{this.dataManager.entityTypeNames.has(d)?r.forEach(m=>{a.push({typeName:d,feature:m})}):this.dataManager.relationshipTypeNames.has(d)&&r.forEach(m=>{t.push({typeName:d,feature:m})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const l=new Map,n=new Map,u=new Map,C=new Map,p=new Uint8Array(a.length),c=new Float64Array(a.length),s=new Float64Array(a.length),g=new Uint32Array(t.length),f=new Uint32Array(t.length),h=[],M="FORCE_DIRECTED",E=new ke({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let D,I="FORCE_DIRECTED",y=0,R=0;switch(I=e==="GEOGRAPHIC"?M:e,I){case"FORCE_DIRECTED":D=ce.apply;break;case"COMMUNITY":D=ye.apply;break;case"HIERARCHICAL":D=me.apply;break;case"RADIAL_TREE":D=fe.apply;break;case"SMART_TREE":D=Le.apply;break;default:D=ge.apply}a.forEach(({typeName:r,feature:d})=>{var m,z,Q;if((m=i==null?void 0:i.lockedNodeLocations)!=null&&m.has(d.attributes[_])){e==="GEOGRAPHIC"&&this.dataManager.geographicLookup.has(r)?p[y]=O.IsGeographic:p[y]=O.None;const k=i.lockedNodeLocations.get(d.attributes[_]);c[y]=k.x,s[y]=k.y}else if(e==="GEOGRAPHIC"&&this.dataManager.geographicLookup.has(r)){p[y]=O.IsGeographic;let k=null;const b=d.attributes[this.dataManager.geographicLookup.get(r).name];switch((z=this.dataManager.geographicLookup.get(r))==null?void 0:z.geometryType){case"esriGeometryPoint":c[y]=b==null?void 0:b.x,s[y]=b==null?void 0:b.y;break;case"esriGeometryPolygon":k=b==null?void 0:b.centroid,(k==null?void 0:k.x)!=null&&(k==null?void 0:k.y)!=null?(c[y]=k.x,s[y]=k.y):p[y]=O.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":k=(Q=b==null?void 0:b.extent)==null?void 0:Q.center,(k==null?void 0:k.x)!=null&&(k==null?void 0:k.y)!=null?(c[y]=k.x,s[y]=k.y):p[y]=O.IsMovable;break;default:p[y]=O.IsMovable}(c[y]==null||s[y]==null||Number.isNaN(c[y])||Number.isNaN(s[y]))&&(p[y]=O.IsMovable,c[y]=0,s[y]=0)}else p[y]=O.IsMovable,c[y]=0,s[y]=0;C.set(d.attributes[_],y),h[y]={feature:d,typeName:r},y++});let F=!1;const $=new Map;t.forEach(r=>{const d=r.feature.attributes[ne],m=r.feature.attributes[se],z=C.get(d),Q=C.get(m);if(z!==void 0&&Q!==void 0){const k=d+"-"+m,b=$.get(k);(b==null?void 0:b.has(r.typeName))||(g[R]=z,f[R]=Q,b===void 0?$.set(k,new Map([[r.typeName,R]])):b.set(r.typeName,R),R++),o.push(r)}else F=!0,this.relationshipLinkChartDiagramLookup.set(d,null)}),F&&H.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const U=this._validateLayoutSettings(e,i),B=this._convertLayoutSettingsToCalculationSettings(U);await qe();const{success:S,links:T}=D(p,c,s,g.subarray(0,R),f.subarray(0,R),B.computationBudgetTime,B.idealEdgeLengthMultiplier,B.repulsionRadiusMultiplier);if(!S)throw new ie("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let r=0;r84.9999?s[r]=84.9999:s[r]<-84.9999&&(s[r]=-84.9999),c[r]>179.9999?c[r]=179.9999:c[r]<-179.9999&&(c[r]=-179.9999),h[r].feature.attributes[x]=new Me(c[r],s[r]),l.has(h[r].typeName)){const m=l.get(h[r].typeName);m==null||m.set(h[r].feature.attributes[_],h[r].feature)}else{const m=new Map;m.set(h[r].feature.attributes[_],h[r].feature),l.set(h[r].typeName,m)}u.set(h[r].feature.attributes[_],h[r].feature);const d=W(h[r].feature.attributes[x]);this.entityLinkChartDiagramLookup.set(h[r].feature.attributes[_],h[r].feature.attributes[x]?d:null),h[r].feature.attributes[x].xE.xmax&&(E.xmax=h[r].feature.attributes[x].x),h[r].feature.attributes[x].yE.ymax&&(E.ymax=h[r].feature.attributes[x].y)}if(this.linkChartExtent.xmin=E.xmin,this.linkChartExtent.xmax=E.xmax,this.linkChartExtent.ymin=E.ymin,this.linkChartExtent.ymax=E.ymax,!T)throw new ie("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const P=new Map,J=new Map,K=new Map,Z=new Set;for(let r=0;r85.5?d[w][1]=85.5:d[w][1]<-85.5&&(d[w][1]=-85.5),d[w][0]>179.9999?d[w][0]=179.9999:d[w][0]<-179.9999&&(d[w][0]=-179.9999);P.has(k)?P.get(k).push(d):P.set(k,[d])}const Re=P.get(k);J.has(k)||(J.set(k,new Map),K.set(k,new Map));const le=J.get(k),he=K.get(k);le.has(m.typeName)||(le.set(m.typeName,Re.shift()),he.set(m.typeName,0));const Ae=le.get(m.typeName);he.set(m.typeName,he.get(m.typeName)+1);const _e=new Ee({paths:Ae});if(m.feature.attributes[x]=_e,n.has(m.typeName)){const G=n.get(m.typeName);G==null||G.set(m.feature.attributes[_],m.feature)}else{const G=new Map;G.set(m.feature.attributes[_],m.feature),n.set(m.typeName,G)}u.set(m.feature.attributes[_],m.feature);const Ie=W(m.feature.attributes[x]);this.relationshipLinkChartDiagramLookup.set(m.feature.attributes[_],m.feature.attributes[x]?Ie:null)}for(const r of o)r.feature.attributes[Ve]=((Y=K.get(r.feature.attributes[ne]+"-"+r.feature.attributes[se]))==null?void 0:Y.get(r.typeName))??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:U},{nodes:l,links:n,idMap:u}}async applyNewLinkChartLayout(e="RADIAL_TREE",i){const a=[];await this.calculateLinkChartLayout(e,i),this.layers.forEach(t=>{a.push(t.refreshCachedQueryEngine())}),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){var i,a;const e=new Map;return(a=(i=this.dataManager.inclusionModeDefinition)==null?void 0:i.namedTypeDefinitions)==null||a.forEach(t=>{var o;(o=t==null?void 0:t.members)==null||o.forEach(l=>{const n=l.linkChartLocation;let u;const C=l.id;n&&(u="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(C,new Me({x:u.x,y:u.y})))})}),e}async synchronizeInclusionListWithCache(){return new Promise(e=>{var i;(i=this.dataManager.inclusionModeDefinition)==null||i.namedTypeDefinitions.forEach((a,t)=>{if(a.useAllData=!1,a.members&&a.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const o=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(a.members.keys()).filter(l=>!o.has(l)).forEach(l=>{var n;(n=a.members)==null||n.delete(l)})}}),e()})}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const i=[];this.layers.forEach(a=>{i.push(a.refreshCachedQueryEngine())}),await Promise.all(i),this._refreshNamedTypes()}async connectEntities(e){let i=[];for(const t of this.dataManager.relationshipTypeNames){const o=this.sublayerIdsCache.get(t);o&&(i=i.concat(Array.from(o.keys())))}const a=await this.dataManager.getAttachedRelationships(e,i);return await this._handleNewRecords(a),{records:a}}async _handleNewRecords(e){const i=[];this.dataManager.addToLayer(e);for(const t of e)this.sublayerIdsCache.has(t.typeName)||(this.sublayerIdsCache.set(t.typeName,new Set),i.push(t.typeName)),this.sublayerIdsCache.get(t.typeName).add(t.id);for(const t of i){const o=this._graphTypeLookup.get(t);if(o){const l=new de({objectType:o,parentCompositeLayer:this,graphType:o.type,title:t});o.type==="entity"?this.dataManager.entityTypeNames.add(t):this.dataManager.relationshipTypeNames.add(t),l.geometryType?this.layers.push(l):this.tables.push(l),this.dataManager.sublayerCaches.set(t,new Map)}}await this.dataManager.refreshCacheContent(e.map(t=>t.id));const a=Object.assign({},this._currentLinkChartConfig.layoutOptions);a.lockedNodeLocations=this.getCurrentNodeLocations(),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,a)}async _initializeDiagram(){var e,i;this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?((i=(e=this.dataManager.inclusionModeDefinition)==null?void 0:e.namedTypeDefinitions)==null||i.forEach((a,t)=>{var o;(o=a==null?void 0:a.members)==null||o.forEach(l=>{const n=l.linkChartLocation;let u;const C=l.id;if(!n)return;u="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]};const p=W(u);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(C,p):this.entityLinkChartDiagramLookup.set(C,p),this.linkChartExtent.xmin>u.x&&(this.linkChartExtent.xmin=u.x),this.linkChartExtent.xmaxu.y&&(this.linkChartExtent.ymin=u.y),this.linkChartExtent.ymax{var t;a.name&&((t=this.dataManager.sublayerCaches.get(a.name))==null||t.forEach(o=>{const l=this.relationshipLinkChartDiagramLookup.get(o.attributes[ne]),n=this.relationshipLinkChartDiagramLookup.get(o.attributes[se]);if(l&&n){const u=W(new Ee({paths:[[l.coords[0],l.coords[1]],[n.coords[0],n.coords[1]]]}));this.relationshipLinkChartDiagramLookup.set(o.attributes[_],u)}else this.relationshipLinkChartDiagramLookup.set(o.attributes[_],null)}))})):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,i){const a=h=>typeof h=="number"&&!isNaN(h),t=h=>a(h)&&h>=1,o=h=>a(h)&&h>=1,l=h=>Object.values(re).includes(h),n=h=>a(h)&&h>=0,u=new Set(["FORCE_DIRECTED","COMMUNITY","GEOGRAPHIC"]),C={};if(!u.has(e)||!i)return!u.has(e)&&i&&H.getLogger(this).warn("Layout mode options were given for a layout mode that does not utilize them, settings will be ignored"),C;const{computationBudgetTime:p,repulsionRadiusMultiplier:c,idealEdgeLength:s,idealEdgeLengthType:g}=i;o(p)?C.computationBudgetTime=p:p!==void 0&&H.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),t(c)?C.repulsionRadiusMultiplier=c:c!==void 0&&H.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting");const f=s!==void 0||g!==void 0;return e!=="GEOGRAPHIC"&&f?H.getLogger(this).warn("Ideal edge length settings were specified for an incompatible layout mode, and will be ignored"):e==="GEOGRAPHIC"&&f&&(l(g)?C.idealEdgeLengthType=g:g!==void 0&&H.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),n(s)?C.idealEdgeLength=s:s!==void 0&&H.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),C}_convertLayoutSettingsToCalculationSettings(e){let i=e.idealEdgeLength;return e.idealEdgeLengthType===re.ABSOLUTE&&(i===void 0?i=-1:i*=-1),{computationBudgetTime:e.computationBudgetTime,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:i}}};v([A()],N.prototype,"dataPreloadedInLocalCache",void 0),v([A()],N.prototype,"defaultLinkChartConfig",void 0),v([A()],N.prototype,"dataManager",void 0),v([A()],N.prototype,"knowledgeGraph",void 0),v([A()],N.prototype,"layers",void 0),v([A()],N.prototype,"entityLinkChartDiagramLookup",void 0),v([A()],N.prototype,"relationshipLinkChartDiagramLookup",void 0),v([A()],N.prototype,"linkChartExtent",void 0),v([A()],N.prototype,"memberEntityTypes",void 0),v([A()],N.prototype,"memberRelationshipTypes",void 0),v([A()],N.prototype,"sublayerIdsCache",void 0),v([A()],N.prototype,"tables",void 0),v([A({json:{read:!1}})],N.prototype,"type",void 0),N=v([Ue("esri.layers.LinkChartLayer")],N);const Tt=N;export{Tt as default}; diff --git a/build/assets/Lyr3DWorker-CzF8y3dB.js b/build/assets/Lyr3DWorker-CzF8y3dB.js new file mode 100644 index 0000000..4d9d899 --- /dev/null +++ b/build/assets/Lyr3DWorker-CzF8y3dB.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lyr3DWorker-XDXl96FL.js","assets/_commonjsHelpers-DCkdB7M8.js"])))=>i.map(i=>d[i]); +import{_ as M,fr as y}from"./index-DKOmzAMm.js";var p,N,g,f,d,m,S,b,I,U,L,h,R,T,a;(function(t){t.U8="U8",t.I8="I8",t.U16="U16",t.I16="I16",t.U32="U32",t.I32="I32",t.F32="F32",t.F64="F64",t.Utf8String="Utf8String",t.NotSet="NotSet"})(p||(p={})),function(t){t.Png="Png",t.Jpeg="Jpeg",t.Dds="Dds",t.Raw="Raw",t.Dxt1="Dxt1",t.Dxt5="Dxt5",t.Etc2="Etc2",t.Astc="Astc",t.Pvrtc="Pvrtc",t.NotSet="NotSet"}(N||(N={})),function(t){t.Rgb8="Rgb8",t.Rgba8="Rgba8",t.R8="R8",t.Bgr8="Bgr8",t.Bgra8="Bgra8",t.Rg8="Rg8",t.NotSet="NotSet"}(g||(g={})),function(t){t.Position="Position",t.Normal="Normal",t.TexCoord="TexCoord",t.Color="Color",t.Tangent="Tangent",t.FeatureIndex="FeatureIndex",t.UvRegion="UvRegion",t.NotSet="NotSet"}(f||(f={})),function(t){t.Opaque="Opaque",t.Mask="Mask",t.Blend="Blend"}(d||(d={})),function(t){t.None="None",t.Mask="Mask",t.Alpha="Alpha",t.PreMultAlpha="PreMultAlpha",t.NotSet="NotSet"}(m||(m={})),function(t){t.Points="Points",t.Lines="Lines",t.LineStrip="LineStrip",t.Triangles="Triangles",t.TriangleStrip="TriangleStrip",t.NotSet="NotSet"}(S||(S={})),function(t){t.None="None",t.WrapXBit="WrapXBit",t.WrapYBit="WrapYBit",t.WrapXy="WrapXy",t.NotSet="NotSet"}(b||(b={})),function(t){t.Linear="Linear",t.Nearest="Nearest",t.NotSet="NotSet"}(I||(I={})),function(t){t.Linear="Linear",t.Nearest="Nearest",t.NearestMipmapNearest="NearestMipmapNearest",t.LinearMipmapNearest="LinearMipmapNearest",t.NearestMipmapLinear="NearestMipmapLinear",t.LinearMipmapLinear="LinearMipmapLinear",t.NotSet="NotSet"}(U||(U={})),function(t){t.FeatureId="FeatureId",t.GlobalUid="GlobalUid",t.UnspecifiedDateTime="UnspecifiedDateTime",t.EcmaIso8601DateTime="EcmaIso8601DateTime",t.EcmaIso8601DateOnly="EcmaIso8601DateOnly",t.TimeOnly="TimeOnly",t.TimeStamp="TimeStamp",t.ColorRgb="ColorRgb",t.ColorRgba="ColorRgba",t.Unrecognized="Unrecognized",t.NotSet="NotSet"}(L||(L={})),function(t){t.Texture="Texture",t.VertexAtrb="VertexAtrb",t.Implicit="Implicit",t.NotSet="NotSet"}(h||(h={})),function(t){t.Front="Front",t.Back="Back",t.None="None",t.NotSet="NotSet"}(R||(R={})),function(t){t.Pbr="Pbr",t.Unlit="Unlit"}(T||(T={})),function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.MissingInputs=2]="MissingInputs"}(a||(a={}));function D(){return new Promise(t=>M(()=>import("./lyr3DWorker-XDXl96FL.js"),__vite__mapDeps([0,1])).then(r=>r.l).then(({default:r})=>{const n=r({locateFile:P,onRuntimeInitialized:()=>t(n)})})).catch(t=>{throw t})}function P(t){return y(`esri/libs/lyr3d/${t}`)}let o,e;async function x(t){if(await _(),t.inputs.length<1)return{result:{status:a.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]},transferList:[]};const r={ptrs:[],sizes:[]};for(const i of t.inputs){const c=e._malloc(i.byteLength);new Uint8Array(e.HEAPU8.buffer,c,i.byteLength).set(new Uint8Array(i)),r.ptrs.push(c),r.sizes.push(i.byteLength)}const n=e.process(t.jobDescJson,r,t.isMissingResourceCase),l=n.status===a.Succeeded&&n.data,u=n.status===a.MissingInputs&&n.missingInputUrls.length>0;if(l){const i=n.data.slice();n.data=i}else u&&(n.jobDescJson=n.jobDescJson.slice(0),n.originalInputs=t.inputs);for(let i=0;i{e=t,e.initialize_lyr3d_worker_wasm(),o=null})),o)}export{A as destroyWasm,_ as initialize,x as process}; diff --git a/build/assets/MapImageLayer-BK7gkoyE.js b/build/assets/MapImageLayer-BK7gkoyE.js new file mode 100644 index 0000000..0a0e956 --- /dev/null +++ b/build/assets/MapImageLayer-BK7gkoyE.js @@ -0,0 +1 @@ +import{B as i,D as l,E as O,bw as P,eQ as E,cq as T,ei as F,cu as N,cF as D,cs as _,ct as J,cv as M,cr as R,cH as j,cG as U,aK as V,cT as S,c$ as f,df as q,U as b,aZ as A,dG as k,fb as H,s as x,aU as C,em as I,aS as G,d2 as Z,cy as z,cE as B,ey as K}from"./index-DKOmzAMm.js";import{t as W}from"./loadAll-Cm5pWAv4.js";import{d as Q,i as X}from"./scaleUtils-BN5HVCVS.js";import{n as Y,m as ee,f as te,e as L,t as re}from"./SublayersOwner-Ez_yHYvH.js";import{t as ie}from"./imageBitmapUtils-kF4U_Pyx.js";import"./CollectionFlattener-BmCRFqHz.js";import"./QueryTask-CH4nGmOK.js";import"./infoFor3D-DsOdlPuA.js";import"./utils-CF4bGKhW.js";import"./executeQueryJSON-CCbDrFwh.js";import"./query-CQvaiR4K.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./executeQueryPBF-B-eLVWOv.js";import"./featureConversionUtils-CCATessr.js";function $(e,t){var s;return"floorInfo"in t&&((s=t.floorInfo)!=null&&s.floorField)?se(e,t.floorInfo.floorField):null}function se(e,t){if(!(e!=null&&e.length))return null;const s=e.filter(r=>r!=="").map(r=>`'${r}'`);return s.push("''"),`${t} IN (${s.join(",")}) OR ${t} IS NULL`}const ae={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let c=class extends P{constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map(t=>{const s=$(this.floors,t);return t.toExportImageJSON(s)});return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&Y(this.visibleSublayers,this.layer.serviceSublayers,this.layer.gdbVersion)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.allSublayers.on("change",()=>this.notifyChange("visibleSublayers")),e.on("sublayer-update",t=>this.notifyChange(ae[t.propertyName]))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map(t=>t.id).join(","):"show:-1":null}get layerDefs(){var s;const e=!!((s=this.floors)!=null&&s.length),t=this.visibleSublayers.filter(r=>r.definitionExpression!=null||e&&r.floorInfo!=null);return t.length?JSON.stringify(t.reduce((r,o)=>{const a=$(this.floors,o),p=E(a,o.definitionExpression);return p!=null&&(r[o.id]=p),r},{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,s=this.scale,r=a=>{a.visible&&(s===0||Q(s,a.minScale,a.maxScale))&&(a.sublayers?a.sublayers.forEach(r):e.unshift(a))};t&&t.forEach(r);const o=this._get("visibleSublayers");return!o||o.length!==e.length||o.some((a,p)=>e[p]!==a)?e:o}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};i([l({readOnly:!0})],c.prototype,"dynamicLayers",null),i([l()],c.prototype,"floors",void 0),i([l({readOnly:!0})],c.prototype,"hasDynamicLayers",null),i([l()],c.prototype,"layer",null),i([l({readOnly:!0})],c.prototype,"layers",null),i([l({readOnly:!0})],c.prototype,"layerDefs",null),i([l({type:Number})],c.prototype,"scale",void 0),i([l({readOnly:!0})],c.prototype,"version",null),i([l({readOnly:!0})],c.prototype,"visibleSublayers",null),c=i([O("esri.layers.support.ExportImageParameters")],c);let n=class extends T(F(N(ee(te(D(_(J(M(R(j(U(B)))))))))))){constructor(...e){super(...e),this._exportImageParameters=new c({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}load(e){const t=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(V).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,t){const s=t.supportedImageFormatTypes;return s&&s.includes("PNG32")?"png32":"png24"}writeSublayers(e,t,s,r){var m,g,v;if(!this.loaded||!e)return;const o=e.slice().reverse().flatten(({sublayers:y})=>y&&y.toArray().reverse()).toArray();let a=!1;const p=S(r.origin);if((m=this.capabilities)!=null&&m.operations.supportsExportMap&&((v=(g=this.capabilities)==null?void 0:g.exportMap)!=null&&v.supportsDynamicLayers)){if(p===f.PORTAL_ITEM){const y=this.createSublayersForOrigin("service").sublayers;a=L(o,y,f.SERVICE)}else if(p>f.PORTAL_ITEM){const y=this.createSublayersForOrigin("portal-item");a=L(o,y.sublayers,S(y.origin))}}const u=[],d={writeSublayerStructure:a,...r};let h=a||this.hasVisibleLayersForOrigin(p);o.forEach(y=>{const w=y.write({},d);u.push(w),h=h||y.originOf("visible")==="user"}),u.some(y=>Object.keys(y).length>1)&&(t.layers=u),h&&(t.visibleLayers=o.filter(y=>y.visible).map(y=>y.id))}createExportImageParameters(e,t,s,r){const o=(r==null?void 0:r.pixelRatio)||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=(r==null?void 0:r.floors)??null,this._exportImageParameters.scale=X({extent:e,width:t})*o;const a=this._exportImageParameters.toJSON(),p=!(r!=null&&r.rotation)||this.version<10.3?{}:{rotation:-r.rotation},u=e==null?void 0:e.spatialReference,d=q(u);a.dpi*=o;const h={};if(r!=null&&r.timeExtent){const{start:m,end:g}=r.timeExtent.toJSON();h.time=m&&g&&m===g?""+m:`${m??"null"},${g??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(h.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:d,imageSR:d,size:t+","+s,...a,...p,...h}}async fetchImage(e,t,s,r){const{data:o}=await this._fetchImage("image",e,t,s,r);return o}async fetchImageBitmap(e,t,s,r){const{data:o,url:a}=await this._fetchImage("blob",e,t,s,r);return ie(o,a,r==null?void 0:r.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:s}=await b(this.url,t),{extent:r,fullExtent:o,timeExtent:a}=s,p=r||o;return{fullExtent:p&&A.fromJSON(p),timeExtent:a&&k.fromJSON({start:a[0],end:a[1]})}}loadAll(){return W(this,e=>{e(this.allSublayers),e(this.subtables)})}serviceSupportsSpatialReference(e){return H(this,e)}async _fetchImage(e,t,s,r,o){var u,d,h;const a={responseType:e,signal:(o==null?void 0:o.signal)??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,s,r,o),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},p=this.parsedUrl.path+"/export";if(((u=a.query)==null?void 0:u.dynamicLayers)!=null&&!((h=(d=this.capabilities)==null?void 0:d.exportMap)!=null&&h.supportsDynamicLayers))throw new x("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:a.query});try{const{data:m}=await b(p,a);return{data:m,url:p}}catch(m){throw C(m)?m:new x("mapimagelayer:image-fetch-error",`Unable to load image: ${p}`,{error:m})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:s}=await b(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});s&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){var t;return!(e==null||!((t=this.sublayersSourceJSON[e])!=null&&t.visibleLayers))}};i([l(I("dateFieldsTimeReference"))],n.prototype,"dateFieldsTimeZone",void 0),i([l({type:Boolean})],n.prototype,"datesInUnknownTimezone",void 0),i([l()],n.prototype,"dpi",void 0),i([l()],n.prototype,"gdbVersion",void 0),i([l()],n.prototype,"imageFormat",void 0),i([G("imageFormat",["supportedImageFormatTypes"])],n.prototype,"readImageFormat",null),i([l({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],n.prototype,"imageMaxHeight",void 0),i([l({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],n.prototype,"imageMaxWidth",void 0),i([l()],n.prototype,"imageTransparency",void 0),i([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],n.prototype,"isReference",void 0),i([l({json:{read:!1,write:!1}})],n.prototype,"labelsVisible",void 0),i([l({type:["ArcGISMapServiceLayer"]})],n.prototype,"operationalLayerType",void 0),i([l({json:{read:!1,write:!1}})],n.prototype,"popupEnabled",void 0),i([l(I("preferredTimeReference"))],n.prototype,"preferredTimeZone",void 0),i([l()],n.prototype,"sourceJSON",void 0),i([l({json:{write:{ignoreOrigin:!0}}})],n.prototype,"sublayers",void 0),i([Z("sublayers",{layers:{type:[re]},visibleLayers:{type:[K]}})],n.prototype,"writeSublayers",null),i([l({type:["show","hide","hide-children"]})],n.prototype,"listMode",void 0),i([l({json:{read:!1},readOnly:!0,value:"map-image"})],n.prototype,"type",void 0),i([l(z)],n.prototype,"url",void 0),n=i([O("esri.layers.MapImageLayer")],n);const we=n;export{we as default}; diff --git a/build/assets/MapNotesLayer-2ZcBqOZC.js b/build/assets/MapNotesLayer-2ZcBqOZC.js new file mode 100644 index 0000000..06f2a1c --- /dev/null +++ b/build/assets/MapNotesLayer-2ZcBqOZC.js @@ -0,0 +1 @@ +import{B as r,D as a,E as w,a7 as b,gB as H,fu as K,gC as Z,a8 as x,fW as q,cq as E,cu as D,eK as V,cE as R,cg as G,cD as U,cA as Y,cC as M,gD as Q,cs as X,ct as ee,cv as te,ay as v,dj as re,$ as C,b4 as j,gE as L,gF as T,gG as P,gH as A,s as oe,dJ as ie,ab as le,bp as ae,fY as ne,fZ as se,cf as ye,c8 as I,aS as h,d2 as pe,aZ as ue,gI as B}from"./index-DKOmzAMm.js";import{R as ce}from"./normalizeUtils-DIcj7CYy.js";import{n as de}from"./objectIdUtils-4dd1rf9p.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";let N=class extends b{constructor(e){super(e),this.addHandles([this.on("before-add",t=>{t.item==null&&t.preventDefault()}),this.on("after-add",t=>this._own(t.item)),this.on("after-remove",t=>this._release(t.item))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(b.ofType(this.itemType.Type))(e):new b(e)}};function me(e,t){return{type:e,cast:H,set(o){const i=K(o,this._get(t),e);i.owner=this,this._set(t,i)}}}r([a()],N.prototype,"owner",null),N=r([w("esri.core.support.OwningCollection")],N);let S=class extends N{_own(t){t.layer&&"remove"in t.layer&&t.layer!==this.owner&&t.layer.remove(t),t.layer=this.owner}_release(t){t.layer===this.owner&&(t.layer=null)}};r([Z({Type:x,ensureType:q(x)})],S.prototype,"itemType",void 0),S=r([w("esri.support.GraphicsCollection")],S);let d=class extends E(D(R)){constructor(e){super(e),this.elevationInfo=null,this.graphics=new S,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};r([a({type:V})],d.prototype,"elevationInfo",void 0),r([a(me(S,"graphics"))],d.prototype,"graphics",void 0),r([a({type:["show","hide"]})],d.prototype,"listMode",void 0),r([a()],d.prototype,"screenSizePerspectiveEnabled",void 0),r([a({readOnly:!0})],d.prototype,"type",void 0),r([a({constructOnly:!0})],d.prototype,"internal",void 0),d=r([w("esri.layers.GraphicsLayer")],d);const fe=d;function O(e){return e.featureCollectionType==="markup"||e.layers.some(t=>t.layerDefinition.visibilityField!=null||!F(t))}function F({layerDefinition:e,featureSet:t}){const o=e.geometryType??t.geometryType;return _.find(i=>{var l,s,y;return o===i.geometryTypeJSON&&((y=(s=(l=e.drawingInfo)==null?void 0:l.renderer)==null?void 0:s.symbol)==null?void 0:y.type)===i.identifyingSymbol.type})}function z(){return new ue({xmin:-180,ymin:-90,xmax:180,ymax:90})}const $=new G({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),he=new G({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let u=class extends fe{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",e=>{e.item.sourceLayer=this.layer}),this.graphics.on("after-remove",e=>{e.item.sourceLayer=null})}get fullExtent(){var o;const e=(o=this.layer)==null?void 0:o.spatialReference,t=this.fullBounds;return e?t==null?T(z(),e).geometry:A(t,e):null}get fullBounds(){var o;const e=(o=this.layer)==null?void 0:o.spatialReference;if(!e)return null;const t=j();return this.graphics.forEach(i=>{const l=i.geometry!=null?T(i.geometry,e).geometry:null;l!=null&&L(t,l.type==="point"?l:l.extent,t)}),P(t,B)?null:t}get sublayers(){return this.graphics}};r([a({readOnly:!0})],u.prototype,"fullExtent",null),r([a({readOnly:!0})],u.prototype,"fullBounds",null),r([a({readOnly:!0})],u.prototype,"sublayers",null),r([a()],u.prototype,"layer",void 0),r([a()],u.prototype,"layerId",void 0),r([a({readOnly:!0})],u.prototype,"visibilityMode",void 0),u=r([w("esri.layers.MapNotesLayer.MapNotesSublayer")],u);const _=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:new U().toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:new Y().toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:new M().toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:new M().toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:new Q().toJSON()}];let n=class extends E(D(X(ee(te(R))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=v.WGS84,this.sublayers=new b(_.map(t=>new u({id:t.id,layerId:t.layerId,title:t.title,layer:this}))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,o){return{operations:{supportsMapNotesEditing:!O(t)&&(o==null?void 0:o.origin)!=="portal-item"}}}readFeatureCollections(e,t,o){if(!O(t))return null;const i=t.layers.map(l=>{const s=new re;return s.read(l,o),s});return new b({items:i})}readLegacyfeatureCollectionJSON(e,t){return O(t)?C(t.featureCollection):null}get fullExtent(){var o;const e=this.spatialReference,t=j();return this.sublayers!=null?this.sublayers.forEach(({fullBounds:i})=>i!=null?L(t,i,t):t,t):(o=this.featureCollectionJSON)!=null&&o.layers.some(i=>i.layerDefinition.extent)&&this.featureCollectionJSON.layers.forEach(i=>{const l=T(i.layerDefinition.extent,e).geometry;l!=null&&L(t,l,t)}),P(t,B)?T(z(),e).geometry:A(t,e)}readMinScale(e,t){for(const o of t.layers)if(o.layerDefinition.minScale!=null)return o.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const o of t.layers)if(o.layerDefinition.maxScale!=null)return o.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?v.fromJSON(t.layers[0].layerDefinition.spatialReference):v.WGS84}readSublayers(e,t,o){if(O(t))return null;const i=[];let l=t.layers.reduce((s,y)=>Math.max(s,y.layerDefinition.id??-1),-1)+1;for(const s of t.layers){const{layerDefinition:y,featureSet:p}=s,c=y.id??l++,m=F(s);if(m!=null){const f=new u({id:m.id,title:y.name,layerId:c,layer:this,graphics:p.features.map(({geometry:g,symbol:J,attributes:W,popupInfo:k})=>x.fromJSON({attributes:W,geometry:g,symbol:J,popupTemplate:k}))});i.push(f)}}return new b(i)}writeSublayers(e,t,o,i){var m;const{minScale:l,maxScale:s}=this;if(e==null)return;const y=e.some(f=>f.graphics.length>0);if(!this.capabilities.operations.supportsMapNotesEditing)return void(y&&((m=i==null?void 0:i.messages)==null?void 0:m.push(new oe("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer"))));const p=[];let c=this.spatialReference.toJSON();e:for(const f of e)for(const g of f.graphics)if(g.geometry!=null){c=g.geometry.spatialReference.toJSON();break e}for(const f of _){const g=e.find(J=>f.id===J.id);this._writeMapNoteSublayer(p,g,f,l,s,c,i)}ie("featureCollection.layers",p,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=C(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(this.sublayers==null)return;let e=null;const t=[];for(const i of this.sublayers)for(const l of i.graphics)if(l.geometry!=null){const s=l.geometry;e?le(s.spatialReference,e)||(ae(s.spatialReference,e)||ne()||await se(),l.geometry=ye(s,e)):e=s.spatialReference,t.push(l)}const o=await ce(t.map(i=>i.geometry));t.forEach((i,l)=>i.geometry=o[l])}_findSublayer(e){var t;return this.sublayers==null?null:((t=this.sublayers)==null?void 0:t.find(o=>o.id===e))??null}_writeMapNoteSublayer(e,t,o,i,l,s,y){const p=[];if(t!=null){for(const c of t.graphics)this._writeMapNote(p,c,o.geometryType,y);this._normalizeObjectIds(p,$),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:C(o.identifyingSymbol)}},id:t.layerId,geometryType:o.geometryTypeJSON,minScale:i,maxScale:l,objectIdField:"OBJECTID",fields:[$.toJSON(),he.toJSON()],spatialReference:s},featureSet:{features:p,geometryType:o.geometryTypeJSON}})}}_writeMapNote(e,t,o,i){var c,m;if(t==null)return;const{geometry:l,symbol:s,popupTemplate:y}=t;if(l==null)return;if(l.type!==o)return void((c=i==null?void 0:i.messages)==null?void 0:c.push(new I("map-notes-layer:invalid-geometry-type",`Geometry "${l.type}" cannot be saved in "${o}" layer`,{graphic:t})));if(s==null)return void((m=i==null?void 0:i.messages)==null?void 0:m.push(new I("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t})));const p={attributes:{...t.attributes},geometry:l.toJSON(),symbol:s.toJSON()};y!=null&&(p.popupInfo=y.toJSON()),e.push(p)}_normalizeObjectIds(e,t){const o=t.name;let i=de(o,e)+1;const l=new Set;for(const s of e){s.attributes||(s.attributes={});const{attributes:y}=s;(y[o]==null||l.has(y[o]))&&(y[o]=i++),l.add(y[o])}}};r([a({readOnly:!0})],n.prototype,"capabilities",void 0),r([h(["portal-item","web-map"],"capabilities",["layers"])],n.prototype,"readCapabilities",null),r([a({readOnly:!0})],n.prototype,"featureCollections",void 0),r([h(["web-map","portal-item"],"featureCollections",["layers"])],n.prototype,"readFeatureCollections",null),r([a({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],n.prototype,"featureCollectionJSON",void 0),r([h(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],n.prototype,"readLegacyfeatureCollectionJSON",null),r([a({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],n.prototype,"featureCollectionType",void 0),r([a({readOnly:!0})],n.prototype,"fullExtent",null),r([a({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:this.featureCollectionJSON!=null}}}}}}})],n.prototype,"legendEnabled",void 0),r([a({type:["show","hide","hide-children"]})],n.prototype,"listMode",void 0),r([a({type:Number,nonNullable:!0,json:{write:!1}})],n.prototype,"minScale",void 0),r([h(["web-map","portal-item"],"minScale",["layers"])],n.prototype,"readMinScale",null),r([a({type:Number,nonNullable:!0,json:{write:!1}})],n.prototype,"maxScale",void 0),r([h(["web-map","portal-item"],"maxScale",["layers"])],n.prototype,"readMaxScale",null),r([a({readOnly:!0})],n.prototype,"multipointLayer",null),r([a({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],n.prototype,"operationalLayerType",void 0),r([a({readOnly:!0})],n.prototype,"pointLayer",null),r([a({readOnly:!0})],n.prototype,"polygonLayer",null),r([a({readOnly:!0})],n.prototype,"polylineLayer",null),r([a({type:v})],n.prototype,"spatialReference",void 0),r([h(["web-map","portal-item"],"spatialReference",["layers"])],n.prototype,"readSpatialReference",null),r([a({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],n.prototype,"sublayers",void 0),r([h("web-map","sublayers",["layers"])],n.prototype,"readSublayers",null),r([pe("web-map","sublayers")],n.prototype,"writeSublayers",null),r([a({readOnly:!0})],n.prototype,"textLayer",null),r([a()],n.prototype,"title",void 0),r([a({readOnly:!0,json:{read:!1}})],n.prototype,"type",void 0),n=r([w("esri.layers.MapNotesLayer")],n);const Te=n;export{Te as default}; diff --git a/build/assets/MediaLayer-B4vgm461.js b/build/assets/MediaLayer-B4vgm461.js new file mode 100644 index 0000000..99affd8 --- /dev/null +++ b/build/assets/MediaLayer-B4vgm461.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mediaLayerUtils-MA8Smwz2.js","assets/utils-V4fw_T9z.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/originUtils-D69mHv66.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/jsonContext-SE-5k22x.js","assets/saveAPIKeyUtils-CqAN5-r5.js","assets/saveUtils-oCA1ZjYH.js","assets/resourceUtils-CwAv7wd8.js","assets/resourceUtils-Cz4P0EKM.js"])))=>i.map(i=>d[i]); +import{g7 as Fe,bm as Je,au as rt,B as l,E as P,gU as De,gF as q,V as B,D as u,Q as f,cn as lt,ay as Oe,s as N,hS as R,aS as ne,d2 as me,aX as fe,F as at,aZ as Se,cI as ct,hT as Le,hU as ut,cT as ht,c$ as te,hV as pt,cv as Xe,aN as qe,n as dt,cR as Me,cV as mt,cS as ft,cU as yt,hQ as Ke,cW as gt,hW as xt,U as _t,ck as vt,aV as Pt,b3 as wt,dR as $t,hX as Rt,ad as It,aA as bt,aC as Ot,hY as St,az as Tt,aB as Qe,hZ as Et,h_ as Lt,bw as Mt,gP as Re,h$ as Ct,a7 as de,i0 as jt,b1 as Ht,bx as Nt,c7 as At,fu as Vt,ce as Wt,ab as zt,cf as Gt,i1 as Ut,cq as Bt,cu as kt,cs as Ft,ct as Jt,dz as Dt,eJ as ae,d7 as Xt,cE as qt,_ as Kt}from"./index-DKOmzAMm.js";import{u as Ze,i as Ye,c as et,r as Ce,s as Qt}from"./mat3-BNGRf_pC.js";import{e as k,t as Zt}from"./mat3f64-q3fE-ZOt.js";import{o as O,I as X,_ as je}from"./vec2-CurFBDJu.js";import{n as I,r as ce}from"./vec2f64-DA6GkJuH.js";import{p as Yt}from"./imageUtils-D81CeaJ0.js";import{p as en}from"./resourceExtension-D3awQbhZ.js";import{o as tn}from"./BoundsStore-BShGRkMU.js";import{r as He,s as nn,i as Z}from"./normalizeUtilsCommon-BatUY1sD.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";const v=rt(),F=k(),Pe=k(),Ne=k();function S(e,t,n){return Fe(v,t[0],t[1],1),Je(v,v,Ze(F,n)),v[2]===0?O(e,v[0],v[1]):O(e,v[0]/v[2],v[1]/v[2])}function tt(e,t,n){return Ae(Pe,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),Ae(Ne,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),Ye(e,et(Pe,Pe),Ne),e[8]!==0&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function Ae(e,t,n,s,o,i,r,a,c){Ce(e,t,s,i,n,o,r,1,1,1),Fe(v,a,c,1),et(F,e);const[h,p,d]=Je(v,v,Ze(F,F));return Ce(F,h,0,0,0,p,0,0,0,d),Ye(e,F,e)}let Ie=class extends De{projectOrWarn(e,t){if(e==null)return e;const{geometry:n,pending:s}=q(e,t);return s?null:s||n?n:(B.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};Ie=l([P("esri.layers.support.GeoreferenceBase")],Ie);const se=Ie,we=k(),m=I();let Y=class extends at{};l([u({type:Number,json:{write:!0}})],Y.prototype,"x",void 0),l([u({type:Number,json:{write:!0}})],Y.prototype,"y",void 0),Y=l([P("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],Y);let ee=class extends De{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};l([u()],ee.prototype,"sourcePoint",void 0),l([u({type:f})],ee.prototype,"mapPoint",void 0),ee=l([P("esri.layers.support.ControlPointsGeoreference.ControlPoint")],ee);let w=class extends lt(se){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,n){const s=Oe.fromJSON(n.spatialReference),o=Zt(...n.coefficients,1);return t.map(i=>(O(m,i.x,i.y),S(m,m,o),{sourcePoint:i,mapPoint:new f({x:m[0],y:m[1],spatialReference:s})}))}writeControlPoints(t,n,s,o){if(this.transform!=null)t!=null&&_(t[0])&&(n.controlPoints=t.map(i=>{const r=i.sourcePoint;return{x:r.x,y:r.y}}),n.spatialReference=t[0].mapPoint.spatialReference.toJSON(),n.coefficients=this.transform.slice(0,8));else{const i=new N("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:o==null?void 0:o.layer,georeference:this});o!=null&&o.messages?o.messages.push(i):B.getLogger(this).error(i.name,i.message)}}get coords(){if(this.controlPoints==null)return null;const t=this._updateTransform(we);if(t==null||!_(this.controlPoints[0]))return null;const n=this.controlPoints[0].mapPoint.spatialReference;return an(t,this.width,this.height,n)}set coords(t){if(this.controlPoints==null||!_(this.controlPoints[0]))return;const n=this.controlPoints[0].mapPoint.spatialReference;if((t=this.projectOrWarn(t,n))==null)return;const{width:s,height:o}=this,{rings:[[i,r,a,c]]}=t,h={sourcePoint:R(0,o),mapPoint:new f({x:i[0],y:i[1],spatialReference:n})},p={sourcePoint:R(0,0),mapPoint:new f({x:r[0],y:r[1],spatialReference:n})},d={sourcePoint:R(s,0),mapPoint:new f({x:a[0],y:a[1],spatialReference:n})},y={sourcePoint:R(s,o),mapPoint:new f({x:c[0],y:c[1],spatialReference:n})};_(h)&&_(p)&&_(d)&&_(y)&&(Ve(we,h,p,d,y),this.controlPoints=this.controlPoints.map(({sourcePoint:x})=>(O(m,x.x,x.y),S(m,m,we),{sourcePoint:x,mapPoint:new f({x:m[0],y:m[1],spatialReference:n})})))}get inverseTransform(){return this.transform==null?null:Qt(k(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(t==null||this.transform==null||this.controlPoints==null||!_(this.controlPoints[0]))return null;O(m,t.x,t.y);const n=this.controlPoints[0].mapPoint.spatialReference;return S(m,m,this.transform),new f({x:m[0],y:m[1],spatialReference:n})}toSource(t){if(t==null||this.inverseTransform==null||this.controlPoints==null||!_(this.controlPoints[0]))return null;const n=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),(t=q(t,n).geometry)==null?null:(O(m,t.x,t.y),S(m,m,this.inverseTransform),R(m[0],m[1]))}toSourceNormalized(t){const n=this.toSource(t);return n!=null&&(n.x/=this.width,n.y/=this.height),n}_updateTransform(t){const{controlPoints:n,width:s,height:o}=this;if(!(n!=null&&s>0&&o>0))return null;const[i,r,a,c]=n;if(!_(i))return null;const h=i.mapPoint.spatialReference,p=this._projectControlPoint(r,h),d=this._projectControlPoint(a,h),y=this._projectControlPoint(c,h);if(!p.valid||!d.valid||!y.valid||!_(p.controlPoint))return null;t==null&&(t=k());let x=null;return x=_(d.controlPoint)&&_(y.controlPoint)?Ve(t,i,p.controlPoint,d.controlPoint,y.controlPoint):_(d.controlPoint)?on(t,i,p.controlPoint,d.controlPoint):sn(t,i,p.controlPoint),x.every(ye=>ye===0)?null:x}_projectControlPoint(t,n){if(!_(t))return{valid:!0,controlPoint:t};const{sourcePoint:s,mapPoint:o}=t,{geometry:i,pending:r}=q(o,n);return r?{valid:!1,controlPoint:null}:r||i?{valid:!0,controlPoint:{sourcePoint:s,mapPoint:i}}:(B.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:o.spatialReference,targetSpatialReference:n}),{valid:!1,controlPoint:null})}};function _(e){return(e==null?void 0:e.sourcePoint)!=null&&e.mapPoint!=null}l([u({type:[ee],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[Y]},coefficients:{type:[Number]},spatialReference:{type:Oe}}}}})],w.prototype,"controlPoints",void 0),l([ne("controlPoints")],w.prototype,"readControlPoints",null),l([me("controlPoints")],w.prototype,"writeControlPoints",null),l([u({clonable:!1})],w.prototype,"coords",null),l([u({type:Number,nonNullable:!0,json:{write:!0}})],w.prototype,"height",void 0),l([u({readOnly:!0})],w.prototype,"inverseTransform",null),l([u({readOnly:!0})],w.prototype,"transform",null),l([u({type:Number,nonNullable:!0,json:{write:!0}})],w.prototype,"width",void 0),w=l([P("esri.layers.support.ControlPointsGeoreference")],w);const T=I(),E=I(),G=I(),A=I(),L=I(),M=I(),U=I(),V=I(),ue=Math.PI/2;function C(e,t,n){O(e,n.sourcePoint.x,n.sourcePoint.y),O(t,n.mapPoint.x,n.mapPoint.y)}function sn(e,t,n){return C(T,L,t),C(E,M,n),X(G,E,T,ue),X(A,T,E,ue),X(U,M,L,-ue),X(V,L,M,-ue),Te(e,T,E,G,A,L,M,U,V)}function on(e,t,n,s){return C(T,L,t),C(E,M,n),C(G,U,s),je(A,T,E,.5),X(A,G,A,Math.PI),je(V,L,M,.5),X(V,U,V,Math.PI),Te(e,T,E,G,A,L,M,U,V)}function Ve(e,t,n,s,o){return C(T,L,t),C(E,M,n),C(G,U,s),C(A,V,o),Te(e,T,E,G,A,L,M,U,V)}const rn=new Array(8).fill(0),ln=new Array(8).fill(0);function We(e,t,n,s,o){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=s[0],e[5]=s[1],e[6]=o[0],e[7]=o[1],e}function Te(e,t,n,s,o,i,r,a,c){return tt(e,We(rn,t,n,s,o),We(ln,i,r,a,c))}function an(e,t,n,s){const o=ce(0,n),i=ce(0,0),r=ce(t,0),a=ce(t,n);return S(o,o,e),S(i,i,e),S(r,r,e),S(a,a,e),new fe({rings:[[o,i,r,a,o]],spatialReference:s})}const oe=w,K=I();let j=class extends se{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:n,bottomLeft:s,bottomRight:o}=this;if(t==null||n==null||s==null||o==null)return null;const i=t.spatialReference;return n=this.projectOrWarn(n,i),s=this.projectOrWarn(s,i),o=this.projectOrWarn(o,i),n==null||s==null||o==null?null:new fe({rings:[[[s.x,s.y],[t.x,t.y],[n.x,n.y],[o.x,o.y],[s.x,s.y]]],spatialReference:i})}set coords(t){const{topLeft:n}=this;if(n==null)return;const s=n.spatialReference;if((t=this.projectOrWarn(t,s))==null)return;const{rings:[[o,i,r,a]]}=t;this.bottomLeft=new f({x:o[0],y:o[1],spatialReference:s}),this.topLeft=new f({x:i[0],y:i[1],spatialReference:s}),this.topRight=new f({x:r[0],y:r[1],spatialReference:s}),this.bottomRight=new f({x:a[0],y:a[1],spatialReference:s})}toSourceNormalized(t){const{topLeft:n,topRight:s,bottomRight:o,bottomLeft:i}=this;if(t==null||n==null||s==null||o==null||i==null)return null;const r=n.spatialReference;t=t.normalize();const a=q(t,r).geometry;if(a==null)return null;O(K,a.x,a.y);const c=tt(k(),[n.x,n.y,i.x,i.y,s.x,s.y,o.x,o.y],[0,0,0,1,1,0,1,1]);return S(K,K,c),R(K[0],K[1])}};l([u({clonable:!1})],j.prototype,"coords",null),l([u({type:f})],j.prototype,"bottomLeft",void 0),l([u({type:f})],j.prototype,"bottomRight",void 0),l([u({type:f})],j.prototype,"topLeft",void 0),l([u({type:f})],j.prototype,"topRight",void 0),j=l([P("esri.layers.support.CornersGeoreference")],j);const cn=j;let J=class extends se{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(this.extent==null)return null;const{xmin:t,ymin:n,xmax:s,ymax:o,spatialReference:i}=this.extent;let r;if(this.rotation){const{x:a,y:c}=this.extent.center,h=$e(a,c,this.rotation);r=[h(t,n),h(t,o),h(s,o),h(s,n)],r.push(r[0])}else r=[[t,n],[t,o],[s,o],[s,n],[t,n]];return new fe({rings:[r],spatialReference:i})}set coords(t){if(t==null||this.extent==null)return;const n=this.extent.spatialReference;if(t=this.projectOrWarn(t,n),(t==null?void 0:t.extent)==null)return;const{rings:[[s,o,i]],extent:{center:{x:r,y:a}}}=t,c=ct(Math.PI/2-Math.atan2(o[1]-s[1],o[0]-s[0])),h=$e(r,a,-c),[p,d]=h(s[0],s[1]),[y,x]=h(i[0],i[1]);this.extent=new Se({xmin:p,ymin:d,xmax:y,ymax:x,spatialReference:n}),this.rotation=c}toSourceNormalized(t){const{extent:n,rotation:s}=this;if(t==null||n==null)return null;const{xmin:o,ymin:i,xmax:r,ymax:a,center:c,spatialReference:h}=n;t=t.normalize();const p=q(t,h).geometry;if(p==null)return null;let d=p.x,y=p.y;return s&&([d,y]=$e(c.x,c.y,-s)(d,y)),R(Le(d,o,r,0,1),Le(y,a,i,0,1))}};function $e(e,t,n){const s=ut(n),o=Math.cos(s),i=Math.sin(s);return(r,a)=>[o*(r-e)+i*(a-t)+e,o*(a-t)-i*(r-e)+t]}l([u({clonable:!1})],J.prototype,"coords",null),l([u({type:Se})],J.prototype,"extent",void 0),l([u({type:Number})],J.prototype,"rotation",void 0),J=l([P("esri.layers.support.ExtentAndRotationGeoreference")],J);const un=J;function hn(e){return(e==null?void 0:e.type)==="media"}function nt(e,t){const n=ht(t);return hn(e)&&!!e.portalItem&&n!=null&&n>te.PORTAL_ITEM}function pn(e,t,n){var h;if(!e||e.type==="control-points")return e;const{coords:s}=e;if(((h=s==null?void 0:s.rings[0])==null?void 0:h.length)!==5)return null;const[o,i,r,a]=s.rings[0],{spatialReference:c}=s;return new oe({controlPoints:[{mapPoint:new f({x:o[0],y:o[1],spatialReference:c}),sourcePoint:R(0,n)},{mapPoint:new f({x:i[0],y:i[1],spatialReference:c}),sourcePoint:R(0,0)},{mapPoint:new f({x:r[0],y:r[1],spatialReference:c}),sourcePoint:R(t,0)},{mapPoint:new f({x:a[0],y:a[1],spatialReference:c}),sourcePoint:R(t,n)}],width:t,height:n})}const dn={key:"type",base:se,typeMap:{"control-points":oe,corners:cn,"extent-and-rotation":un}},mn={key:"type",base:se,typeMap:{"control-points":oe}};let z=class extends pt(Xe(qe)){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return oe.fromJSON(e)}writeGeoreference(e,t,n,s){var r;const o=(r=s==null?void 0:s.resources)==null?void 0:r.pendingOperations,i=()=>{var c;const a=pn(this.georeference,this.contentWidth,this.contentHeight);if(a){if(e.type!=="control-points"&&B.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),((c=a.controlPoints)==null?void 0:c.length)!==4&&(s==null?void 0:s.messages))return void s.messages.push(new N("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=a.write({},s)}};if(e.type!=="control-points"&&!this.loaded&&o)return t[n]={},void o.push(this.load().then(i));i()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:s}=this;if(e==null||t==null||n===0||s===0)return null;const o=t.toSourceNormalized(e);return o==null?null:(o.x*=n,o.y*=s,o)}};l([u({types:dn,json:{write:!0,types:mn}})],z.prototype,"georeference",void 0),l([ne("georeference")],z.prototype,"readGeoreference",null),l([me("georeference")],z.prototype,"writeGeoreference",null),l([u({json:{read:!1,write:!1}})],z.prototype,"opacity",void 0),z=l([P("esri.layers.support.MediaElementBase")],z);const Ee=z;let $=class extends Ee{constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if(typeof t=="string"){const n=Yt(t).then(s=>{this._set("content",s)});this.addResolvingPromise(n)}else if(t instanceof HTMLImageElement){const n=t.decode().then(()=>{this._set("content",t)});this.addResolvingPromise(n)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new N("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return this.content==null?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return this.content==null?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,n,s){return dt(n.url,s)}writeImage(t,n,s,o){if(t==null)return;const i=o==null?void 0:o.portalItem,r=o==null?void 0:o.resources;if(!i||!r)return void(typeof t=="string"&&(n[s]=Me(t,o)));const a=fn(t)?t:null;if(a){if(mt(a)==null)return void(n[s]=a);const c=Me(a,{...o,verifyItemRelativeUrls:o!=null&&o.verifyItemRelativeUrls?{writtenUrls:o.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},ft.NO);if(i&&c&&!yt(c))return r.toKeep.push({resource:i.resourceFromPath(c),compress:!1}),void(n[s]=c)}n[s]="",r.pendingOperations.push(yn(t).then(c=>{const h=xn(c,i);n[s]=h.itemRelativeUrl,r.toAdd.push({resource:h,content:{type:"blob",blob:c},compress:!1,finish:p=>{this.image=p.url}})}))}write(t,n){const s=super.write(t,n);return"mediaType"in s&&!s.url&&delete s.mediaType,s}};l([u()],$.prototype,"animationOptions",void 0),l([u({readOnly:!0})],$.prototype,"content",void 0),l([u({readOnly:!0})],$.prototype,"contentWidth",null),l([u({readOnly:!0})],$.prototype,"contentHeight",null),l([u({json:{name:"url",type:String,write:{overridePolicy:(e,t,n)=>({enabled:!nt(n==null?void 0:n.layer,n==null?void 0:n.origin)})}}})],$.prototype,"image",void 0),l([ne("image",["url"])],$.prototype,"readImage",null),l([me("image")],$.prototype,"writeImage",null),l([u({readOnly:!0,json:{read:!1,write:{target:"mediaType",ignoreOrigin:!0}}})],$.prototype,"type",void 0),$=l([P("esri.layers.support.ImageElement")],$);const st=$;function fn(e){return typeof e=="string"&&!Ke(e)&&!gt(e)}async function yn(e){return typeof e=="string"?Ke(e)?xt(e):(await _t(e,{responseType:"blob"})).data:new Promise(t=>gn(e).toBlob(t))}function gn(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,s=document.createElement("canvas"),o=s.getContext("2d");return s.width=t,s.height=n,e instanceof HTMLImageElement?o.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&o.putImageData(e,0,0),s}function xn(e,t){const n=vt(),s=`${Pt("media",n)}.${en({type:"blob",blob:e})}`;return t.resourceFromPath(s)}function _n(e){return vn(e,!0)}function vn(e,t){if(e==null)return null;const n=e.spatialReference,s=$t(n),o=Rt(e)?e.toJSON():e;if(!s)return o;const i=It(n)?102100:4326,r=He[i].maxX,a=He[i].minX;if(bt(o))return ze(o,r,a);if(Ot(o))return o.points=o.points.map(c=>ze(c,r,a)),o;if(St(o))return Pn(o,s);if(Tt(o)||Qe(o)){const c=Et($n,o),h={xmin:c[0],ymin:c[1],xmax:c[2],ymax:c[3]},p=Z(h.xmin,a)*(2*r),d=p===0?o:nn(o,p);return h.xmin+=p,h.xmax+=p,h.xmax>r?Ue(d,r,t):h.xmins.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(s=>[[s.xmin,s.ymin],[s.xmin,s.ymax],[s.xmax,s.ymax],[s.xmax,s.ymin],[s.xmin,s.ymin]])}}function ze(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const o=Z(s,t);e[0]=s+o*(-2*t)}else if(st){const o=Z(s,t);e.x+=o*(-2*t)}else if(s0;if(a>2*h){const ge={xmin:iy||ye?n.push(new W({xmin:p,ymin:s,xmax:h,ymax:o},[d]),new W({xmin:c,ymin:s,xmax:y,ymax:o},[x])):n.push(new W({xmin:p,ymin:s,xmax:y,ymax:o},[d]));return n}function Ge(e,t){const[n,s]=t.valid,o=2*s;let i,r=0;return e>s?(i=Math.ceil(Math.abs(e-s)/o),e-=i*o,r=i):e=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ue(e,t,n=!0){const s=!Qe(e);if(s&&Lt(e),n)return new Rn().cut(e,t);const o=s?e.rings:e.paths,i=s?4:2,r=o.length,a=-2*t;for(let c=0;c=i){const p=[];for(const d of h)p.push([d[0]+a,d[1]]);o.push(p)}}return s?e.rings=o:e.paths=o,e}class W{constructor(t,n){this.extent=t,this.frameIds=n}}const $n=wt();class Rn{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,n){let s;if(this._xCut=n,t.rings)this._closed=!0,s=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,s=t.paths,this._minPts=2}for(const i of s){if(!i||i.length=this._minPts&&s.push(i);const o=-2*this._xCut;for(const i of this._linesOut)if(i&&i.length>=this._minPts){for(const r of i)r[0]+=o;s.push(i)}return this._closed?t.rings=s:t.paths=s,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const n=this._side(t[0]);if(n*this._prevSide==-1){const s=this._intersect(this._prevPt,t);this._lineTo(this._xCut,s,0),this._prevSide=0,this._lineTo(t[0],t[1],n)}else this._lineTo(t[0],t[1],n);this._prevSide=n,this._prevPt=t}close(){const t=this._firstPt,n=this._prevPt;t[0]===n[0]&&t[1]===n[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,n,s){this._closed?(this._lineIn.push([s<=0?t:this._xCut,n]),this._lineOut.push([s>=0?t:this._xCut,n])):(s<=0&&this._lineIn.push([t,n]),s>=0&&this._lineOut.push([t,n]))}_lineTo(t,n,s){this._closed?(Be(this._lineIn,s<=0?t:this._xCut,n),Be(this._lineOut,s>=0?t:this._xCut,n)):s<0?(this._prevSide===0&&this._pushLineOut(),this._lineIn.push([t,n])):s>0?(this._prevSide===0&&this._pushLineIn(),this._lineOut.push([t,n])):this._prevSide<0?(this._lineIn.push([t,n]),this._lineOut.push([t,n])):this._prevSide>0&&(this._lineOut.push([t,n]),this._lineIn.push([t,n]))}_checkClosingPt(t){const n=t.length;n>3&&t[0][0]===this._xCut&&t[n-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[n-2][1],t.pop())}_side(t){return tthis._xCut?1:0}_intersect(t,n){const s=(this._xCut-t[0])/(n[0]-t[0]);return t[1]+s*(n[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function Be(e,t,n){const s=e.length;s>1&&e[s-1][0]===t&&e[s-2][0]===t?e[s-1][1]=n:e.push([t,n])}let b=class extends Mt{constructor(e){super(e)}get bounds(){const e=this.coords;return(e==null?void 0:e.extent)==null?null:Re(e.extent)}get coords(){var t;const e=(t=this.element.georeference)==null?void 0:t.coords;return q(e,this.spatialReference).geometry}get normalizedCoords(){return fe.fromJSON(_n(this.coords))}get normalizedBounds(){const e=this.normalizedCoords!=null?this.normalizedCoords.extent:null;return e!=null?Re(e):null}};l([u()],b.prototype,"spatialReference",void 0),l([u()],b.prototype,"element",void 0),l([u()],b.prototype,"bounds",null),l([u()],b.prototype,"coords",null),l([u()],b.prototype,"normalizedCoords",null),l([u()],b.prototype,"normalizedBounds",null),b=l([P("esri.layers.support.MediaElementView")],b);let H=class extends Ee{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if(typeof e=="string"){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then(()=>{this._set("content",t)}))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new N("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){var e;return((e=this.content)==null?void 0:e.videoWidth)??0}get contentHeight(){var e;return((e=this.content)==null?void 0:e.videoHeight)??0}set video(e){this.loadStatus==="not-loaded"?this._set("video",e):B.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise((t,n)=>{var o;const s=Ct(e,"canplay",()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()});this.addHandles(s,"canplay"),e.crossOrigin!=="anonymous"&&(e.crossOrigin="anonymous",(o=e.src)!=null&&o.includes("blob:")||(e.src=e.src))})}};l([u()],H.prototype,"autoplay",void 0),l([u({readOnly:!0})],H.prototype,"content",void 0),l([u({readOnly:!0})],H.prototype,"contentWidth",null),l([u({readOnly:!0})],H.prototype,"contentHeight",null),l([u()],H.prototype,"video",null),H=l([P("esri.layers.support.VideoElement")],H);const ot=H,In={key:"type",defaultKeyValue:"image",base:Ee,typeMap:{image:st,video:ot}},ke=de.ofType(In);let D=class extends qe.LoadableMixin(jt(Ht.EventedAccessor)){constructor(e){super(e),this._index=new tn,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const s of t.removed){const o=this._elementViewsMap.get(s);this._elementViewsMap.delete(s),this._index.delete(o),this.removeHandles(o),o.destroy(),this.notifyChange("fullExtent")}const{spatialReference:n}=this;for(const s of t.added){if(this._elementViewsMap.get(s))continue;const o=new b({spatialReference:n,element:s});this._elementViewsMap.set(s,o);const i=Nt(()=>o.coords,()=>this._updateIndexForElement(o,!1));this._updateIndexForElement(o,!0),this.addHandles(i,o)}this._elementsIndexes.clear(),this.elements.forEach((s,o)=>this._elementsIndexes.set(s,o)),this.emit("refresh")},this.elements=new ke}async load(e){if(At(e),!this.spatialReference){const t=this.elements.find(n=>{var s;return((s=n.georeference)==null?void 0:s.coords)!=null});this._set("spatialReference",t?t.georeference.coords.spatialReference:Oe.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",Vt(e,this._get("elements"),ke))}get fullExtent(){if(this.loadStatus==="not-loaded")return null;const e=this._index.fullBounds;return e==null?null:new Se({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){this.loadStatus==="not-loaded"?this._set("spatialReference",e):B.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await Wt(e.spatialReference,this.spatialReference,null,t);const n=zt(e.spatialReference,this.spatialReference)?e:Gt(e,this.spatialReference);if(!n)return[];const s=n.normalize(),o=[];for(const i of s)this._index.forEachInBounds(Re(i),({normalizedCoords:r,element:a})=>{r!=null&&Ut(i,r)&&o.push(a)});return o.sort((i,r)=>this._elementsIndexes.get(i)-this._elementsIndexes.get(r)),o}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,s=this._index.has(e),o=n!=null;this._index.delete(e),o&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(s!==o?this.emit("refresh"):this.emit("change",{element:e.element}))}};l([u()],D.prototype,"elements",null),l([u({readOnly:!0})],D.prototype,"fullExtent",null),l([u()],D.prototype,"spatialReference",null),D=l([P("esri.layers.support.LocalMediaElementSource")],D);const Q=D;function be(e){return typeof e=="object"&&e!=null&&"type"in e}function it(e){return be(e)&&e.type==="image"}let g=class extends Bt(kt(Ft(Jt(Xe(qt))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=Dt(async(t,n,s)=>{const{save:o,saveAs:i}=await Kt(()=>import("./mediaLayerUtils-MA8Smwz2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]));switch(t){case ae.SAVE:return o(this,n);case ae.SAVE_AS:return i(this,s,n)}}),this.source=new Q}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new N("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const s=be(t)?new Q({elements:new de([t])}):t;this._set("effectiveSource",s),this.spatialReference&&(s.spatialReference=this.spatialReference),await s.load(e),this.spatialReference=s.spatialReference}destroy(){var e,t;(e=this.effectiveSource)==null||e.destroy(),this.effectiveSource!==this.source&&((t=this.source)==null||t.destroy())}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){this.loadStatus!=="loaded"&&this.loadStatus!=="failed"?this._set("source",e):B.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Q({elements:new de(e)}):e instanceof de?new Q({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const s=this._createSource(t);return s==null||s.read(t,n),s}writeSource(e,t,n,s){if(e&&e instanceof Q){const o=e.elements.length;if(o!==1)return void((s==null?void 0:s.messages)&&s.messages.push(new N("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${o}.`)));e=e.elements.at(0)}it(e)?e.write(t,s):s!=null&&s.messages&&(e?s.messages.push(new N("media-layer:unsupported-source","only media elements of type 'ImageElement' can be persisted")):s.messages.push(new N("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ae.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ae.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new st;case"video":return new ot}return null}_getSourceOverride(e,t){if(be(e)&&this.originIdOf("source")===te.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===te.WEB_MAP||this.originIdOf("georeference")===te.WEB_SCENE)){const n=e.toJSON(),s=this._createSource(n);return s.read({...n},{origin:"portal-item"}),s.read({georeference:t},{origin:"web-map"}),s.read({georeference:t},{origin:"web-scene"}),s}return null}};l([u({readOnly:!0})],g.prototype,"effectiveSource",void 0),l([u({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],g.prototype,"georeference",void 0),l([ne("web-document","georeference")],g.prototype,"readGeoreference",null),l([u({type:String})],g.prototype,"copyright",void 0),l([u({readOnly:!0})],g.prototype,"fullExtent",null),l([u({type:["MediaLayer"]})],g.prototype,"operationalLayerType",void 0),l([u({type:["show","hide"]})],g.prototype,"listMode",void 0),l([u({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image"]},georeference:{type:oe}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:nt(this,n==null?void 0:n.origin)&&it(e)&&!!e.georeference&&e.originIdOf("georeference")>te.PORTAL_ITEM}}}}})],g.prototype,"source",null),l([Xt("source")],g.prototype,"castSource",null),l([ne("source",["url"])],g.prototype,"readSource",null),l([me("source")],g.prototype,"writeSource",null),l([u()],g.prototype,"spatialReference",void 0),l([u({readOnly:!0})],g.prototype,"type",void 0),g=l([P("esri.layers.MediaLayer")],g);const kn=g;export{kn as default}; diff --git a/build/assets/MemorySourceWorker-DNQM5G5E.js b/build/assets/MemorySourceWorker-DNQM5G5E.js new file mode 100644 index 0000000..922bd9e --- /dev/null +++ b/build/assets/MemorySourceWorker-DNQM5G5E.js @@ -0,0 +1 @@ +import{bE as O,s as I,bF as Q,bH as Z,bG as A,bI as k,aH as b,bD as S,aA as v}from"./index-DKOmzAMm.js";import{e as w,n as C,t as P}from"./featureConversionUtils-CCATessr.js";import{t as G,n as $}from"./objectIdUtils-4dd1rf9p.js";import{m as H}from"./FeatureStore-C3siChbH.js";import{$ as L,x as E,j as _}from"./QueryEngine-CI3mggax.js";import{i as z,o as W,c as B}from"./clientSideDefaults-B7fGShzo.js";import{j as N,f as g,p as T,d as j,y as D}from"./sourceUtils-DYgU-2mb.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./date-M6n_RqpC.js";const U=S,J={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:S},K={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function V(h){return v(h)?h.z!=null:!!h.hasZ}function X(h){return v(h)?h.m!=null:!!h.hasM}class Oe{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){var e;(e=this._queryEngine)==null||e.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const i=[],{features:a}=e,n=this._inferLayerProperties(a,e.fields),l=e.fields||[],u=e.hasM!=null?e.hasM:!!n.hasM,f=e.hasZ!=null?e.hasZ:!!n.hasZ,p=!e.spatialReference&&!n.spatialReference,d=p?U:e.spatialReference||n.spatialReference,y=p?J:null,c=e.geometryType||n.geometryType,o=!c;let t=e.objectIdField||n.objectIdField,r=e.timeInfo;const m=new O(l);if(!o&&(p&&i.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!c))throw new I("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!t)throw new I("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&t!==n.objectIdField&&(i.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${t}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),t=n.objectIdField),t&&!n.objectIdField){const s=m.get(t);s?(t=s.name,s.type="esriFieldTypeOID",s.editable=!1,s.nullable=!1):l.unshift({alias:t,name:t,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const s of l){if(s.name==null&&(s.name=s.alias),s.alias==null&&(s.alias=s.name),!s.name)throw new I("feature-layer:invalid-field-name","field name is missing",{field:s});if(s.name===t&&(s.type="esriFieldTypeOID"),!Q.jsonValues.includes(s.type))throw new I("feature-layer:invalid-field-type",`invalid type for field "${s.name}"`,{field:s});s.length==null&&(s.length=Z(s))}const F={};for(const s of l)if(s.type!=="esriFieldTypeOID"&&s.type!=="esriFieldTypeGlobalID"){const q=A(s);q!==void 0&&(F[s.name]=q)}if(r){if(r.startTimeField){const s=m.get(r.startTimeField);s?(r.startTimeField=s.name,s.type="esriFieldTypeDate"):r.startTimeField=null}if(r.endTimeField){const s=m.get(r.endTimeField);s?(r.endTimeField=s.name,s.type="esriFieldTypeDate"):r.endTimeField=null}if(r.trackIdField){const s=m.get(r.trackIdField);s?r.trackIdField=s.name:(r.trackIdField=null,i.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:r}}))}r.startTimeField||r.endTimeField||(i.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:r}}),r=null)}const x=m.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??k}:null;this._createDefaultAttributes=z(F,t);const R={warnings:i,featureErrors:[],layerDefinition:{...K,drawingInfo:W(c),templates:B(F),extent:y,geometryType:c,objectIdField:t,fields:l,hasZ:f,hasM:u,timeInfo:r,dateFieldsTimeReference:x},assignedObjectIds:{}};if(this._queryEngine=new L({fieldsIndex:O.fromLayerJSON({fields:l,timeInfo:r,dateFieldsTimeReference:x}),geometryType:c,hasM:u,hasZ:f,objectIdField:t,spatialReference:d,featureStore:new H({geometryType:c,hasM:u,hasZ:f}),timeInfo:r,cacheSpatialQueries:!0}),!(a!=null&&a.length))return this._nextObjectId=G,R;const M=$(t,a);return this._nextObjectId=M+1,await E(a,d),this._loadInitialFeatures(R,a)}async applyEdits(e){const{spatialReference:i,geometryType:a}=this._queryEngine;return await Promise.all([N(i,a),E(e.adds,i),E(e.updates,i)]),this._applyEdits(e)}queryFeatures(e,i={}){return this._queryEngine.executeQuery(e,i.signal)}queryFeatureCount(e,i={}){return this._queryEngine.executeQueryForCount(e,i.signal)}queryObjectIds(e,i={}){return this._queryEngine.executeQueryForIds(e,i.signal)}queryExtent(e,i={}){return this._queryEngine.executeQueryForExtent(e,i.signal)}querySnapping(e,i={}){return this._queryEngine.executeQueryForSnapping(e,i.signal)}_inferLayerProperties(e,i){let a,n,l=null,u=null,f=null;for(const p of e){const d=p.geometry;if(d!=null&&(l||(l=b(d)),u||(u=d.spatialReference),a==null&&(a=V(d)),n==null&&(n=X(d)),l&&u&&a!=null&&n!=null))break}if(i&&i.length){let p=null;i.some(d=>{const y=d.type==="esriFieldTypeOID",c=!d.type&&d.name&&d.name.toLowerCase()==="objectid";return p=d,y||c})&&(f=p.name)}return{geometryType:l,spatialReference:u,objectIdField:f,hasM:n,hasZ:a}}async _loadInitialFeatures(e,i){const{geometryType:a,hasM:n,hasZ:l,objectIdField:u,spatialReference:f,featureStore:p,fieldsIndex:d}=this._queryEngine,y=[];for(const t of i){if(t.uid!=null&&(e.assignedObjectIds[t.uid]=-1),t.geometry&&a!==b(t.geometry)){e.featureErrors.push(g("Incorrect geometry type."));continue}const r=this._createDefaultAttributes(),m=T(d,r,t.attributes,!0);m?e.featureErrors.push(m):(this._assignObjectId(r,t.attributes,!0),t.attributes=r,t.uid!=null&&(e.assignedObjectIds[t.uid]=t.attributes[u]),t.geometry!=null&&(t.geometry=_(t.geometry,t.geometry.spatialReference,f)),y.push(t))}p.addMany(w([],y,a,l,n,u));const{fullExtent:c,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=c,o){const{start:t,end:r}=o;e.layerDefinition.timeInfo.timeExtent=[t,r]}return e}async _applyEdits(e){const{adds:i,updates:a,deletes:n}=e,l={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(i!=null&&i.length&&this._applyAddEdits(l,i),a!=null&&a.length&&this._applyUpdateEdits(l,a),n==null?void 0:n.length){for(const p of n)l.deleteResults.push(j(p));this._queryEngine.featureStore.removeManyById(n)}const{fullExtent:u,timeExtent:f}=await this._queryEngine.fetchRecomputedExtents();return{extent:u,timeExtent:f,featureEditResults:l}}_applyAddEdits(e,i){const{addResults:a}=e,{geometryType:n,hasM:l,hasZ:u,objectIdField:f,spatialReference:p,featureStore:d,fieldsIndex:y}=this._queryEngine,c=[];for(const o of i){if(o.geometry&&n!==b(o.geometry)){a.push(g("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=T(y,t,o.attributes);if(r)a.push(r);else{if(this._assignObjectId(t,o.attributes),o.attributes=t,o.uid!=null){const m=o.attributes[f];e.uidToObjectId[o.uid]=m}if(o.geometry!=null){const m=o.geometry.spatialReference??p;o.geometry=_(D(o.geometry,m),m,p)}c.push(o),a.push(j(o.attributes[f]))}}d.addMany(w([],c,n,u,l,f))}_applyUpdateEdits({updateResults:e},i){const{geometryType:a,hasM:n,hasZ:l,objectIdField:u,spatialReference:f,featureStore:p,fieldsIndex:d}=this._queryEngine;for(const y of i){const{attributes:c,geometry:o}=y,t=c==null?void 0:c[u];if(t==null){e.push(g(`Identifier field ${u} missing`));continue}if(!p.has(t)){e.push(g(`Feature with object id ${t} missing`));continue}const r=C(p.getFeature(t),a,l,n);if(o!=null){if(a!==b(o)){e.push(g("Incorrect geometry type."));continue}const m=o.spatialReference??f;r.geometry=_(D(o,m),m,f)}if(c){const m=T(d,r.attributes,c);if(m){e.push(m);continue}}p.add(P(r,a,l,n,u)),e.push(j(t))}}_assignObjectId(e,i,a=!1){const n=this._queryEngine.objectIdField;a&&i&&isFinite(i[n])?e[n]=i[n]:e[n]=this._nextObjectId++}}export{Oe as default}; diff --git a/build/assets/Mesh-DkA8R2dF.js b/build/assets/Mesh-DkA8R2dF.js new file mode 100644 index 0000000..e65464a --- /dev/null +++ b/build/assets/Mesh-DkA8R2dF.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadGLTFMesh-DzrF9DGl.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/mat3-BNGRf_pC.js","assets/mat3f64-q3fE-ZOt.js","assets/MeshVertexAttributes-CfiMg9vN.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/BufferView-DOhKdt-N.js","assets/vec2-CurFBDJu.js","assets/vec3-C6eb5QY9.js","assets/vec4-n1PBj5SL.js","assets/types-D0PSWh4d.js","assets/DefaultMaterial_COLOR_GAMMA-C6si8ymn.js","assets/mat4f64-CSKppSlJ.js","assets/enums-CxXC-vJk.js","assets/quat-BYKy26Om.js","assets/quatf64-Bdb9ZJJK.js","assets/resourceUtils-CxnhUS9W.js","assets/Indices-BhOjxL0t.js","assets/vertexSpaceConversion-DdxiyRap.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/projection-Ch_noS-l.js","assets/DoubleArray-D2IDWC15.js","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/imageUtils-D81CeaJ0.js","assets/earcut-BqgeR2O3.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/plane-aHrUkISy.js","assets/vec2f64-DA6GkJuH.js","assets/deduplicate-B_YKqNj1.js","assets/gltfexport-CoDBzAqk.js"])))=>i.map(i=>d[i]); +import{B as u,D as f,ee as Ot,d2 as jt,aS as Pt,E as z,F as ve,cR as Oe,G as Ae,co as Ut,gR as Qe,d7 as je,V as le,$ as Te,s as oe,eb as Wt,gn as _,d3 as zt,fp as Ht,g7 as he,ik as ce,il as Vt,b0 as kt,im as Bt,aZ as et,T as Gt,c2 as Yt,c6 as Xt,au as S,av as Se,dM as tt,_ as Re,c7 as we,Q as E,R as qt,io as Zt,ib as Jt,fz as Kt,bX as Qt,gU as en,a7 as tn,bz as nn,bm as Me,at as rn,ip as nt,hR as on,bo as $e,bq as rt,iq as ot,e1 as st,ir as it,is as at,gm as sn,cJ as an,c4 as ln,aN as cn,i0 as un,bx as pn,aX as hn,it as fn,dg as mn}from"./index-DKOmzAMm.js";import{u as Pe,y as dn,h as gn,b as lt,N as se,c as ct,d as fe,k as ut,w as yn}from"./MeshTransform-CnKLNqg-.js";import{c as xn}from"./imageUtils-D81CeaJ0.js";import{c as vn,l as me}from"./MeshVertexAttributes-CfiMg9vN.js";import{a as _e,i as de}from"./MeshLocalVertexSpace-CZ-FLKyC.js";import{a as ie,s as ge,g as pt,u as Ue}from"./meshVertexSpaceUtils-CMKdridq.js";import{i as wn}from"./earcut-BqgeR2O3.js";import{a as $n,e as Tn,t as ht}from"./DoubleArray-D2IDWC15.js";import{t as ft}from"./Indices-BhOjxL0t.js";import{E as bn,F as An,X as Sn}from"./plane-aHrUkISy.js";import{e as We}from"./deduplicate-B_YKqNj1.js";import{project as Rn,logProjectionError as T,loadProjectErrorMessage as P,projectToPCPF as mt,projectNormalToPCPF as dt,projectTangentToPCPF as gt,projectFromPCPF as yt,projectNormalFromPCPF as xt,projectTangentFromPCPF as vt}from"./projection-Ch_noS-l.js";import{c as D,M as Fe,X as Mn,N as wt}from"./vertexSpaceConversion-DdxiyRap.js";import{e as $t}from"./mat3f64-q3fE-ZOt.js";import{n as _n}from"./mat3-BNGRf_pC.js";import{e as Ne}from"./mat4f64-CSKppSlJ.js";import{I as Fn}from"./quat-BYKy26Om.js";import{e as In,o as Cn}from"./quatf64-Bdb9ZJJK.js";import{a as Tt}from"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import{u as Ln}from"./computeTranslationToOriginAndRotation-BxPeFPaY.js";var G;const be=new WeakMap;let Nn=0,L=G=class extends ve{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:Oe(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const o={type:"canvas-element",imageData:ze(e.getContext("2d").getImageData(0,0,e.width,e.height))};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:Oe(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const o={type:"image-data",imageData:ze(e)};t[n]=o}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=He(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return He(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return Ve(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return Ve(e);if(t){const n=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(n===".png"||r==="data:image/png;")return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e=typeof this.wrap=="string"?this.wrap:typeof this.wrap=="object"?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(n="")=>`d:${n},t:${this.transparent},w:${e}`;return this.url!=null?t(this.url):this.data!=null?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(be.has(this.data)||be.set(this.data,++Nn),t(be.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=this.url!=null?this.url.length:0,this.data!=null){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new G(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return typeof this.wrap=="string"?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}static from(e){return typeof e=="string"?new G({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new G({data:e}):Ae(G,e)}};function ze(e){let t="";for(let n=0;nMath.cos(Wt(80))?_.Z:Math.abs(r[1])>Math.abs(r[0])?_.Y:_.X}function Un(e,t,n,r){const o=(i=>!Array.isArray(i[0]))(t)?(i,a)=>t[3*i+a]:(i,a)=>t[i][a],s=r?zt(r)/Ht(r):1;return Sn(e,(i,a)=>he(i,o(a,0)*s,o(a,1)*s,o(a,2)),n)}const Be=bn();function Wn(e){const t=Hn(e.rings,e.hasZ,ye.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,o=0;for(const a of t.polygons){const c=a.count,l=a.index,h=$n(t.position,3*l,3*c),d=a.holeIndices.map(p=>p-l),m=ft(wn(h,d,3));n.push({position:h,faces:m}),r+=h.length,o+=m.length}const s=zn(n,r,o),i=Array.isArray(s.position)?We(s.position,3,{originalIndices:s.faces}):We(s.position.buffer,6,{originalIndices:s.faces});return s.position=Tn(new Float64Array(i.buffer)),s.faces=i.indices,s}function zn(e,t,n){if(e.length===1)return e[0];const r=ht(t),o=new Array(n);let s=0,i=0,a=0;for(const c of e){for(let l=0;l=0;g--){const y=e[g],b=n===ye.CCW_IS_HOLE&&Vn(y,t,r);if(b&&o!==1)s[l++]=y;else{let I=y.length;for(let x=0;x0&&(a[d++]={index:p,count:y.length}),p=b?ue(y,y.length-1,-1,m,p,y.length,t):ue(y,0,1,m,p,y.length,t);for(let x=0;x0&&(a[d++]={index:p,count:A.length}),p=ue(A,0,1,m,p,A.length,t)}l=0,w.count>0&&(i[h++]=w)}}for(let g=0;g0&&(a[d++]={index:p,count:y.length}),p=ue(y,0,1,m,p,y.length,t)}return i.length=h,a.length=d,{position:m,polygons:i,outlines:a}}function ue(e,t,n,r,o,s,i){o*=3;for(let a=0;ale.getLogger("esri.geometry.support.meshUtils.centerAt");function Bn(e,t,n){var i;if(!((i=e.vertexAttributes)!=null&&i.position))return;const{vertexSpace:r}=e,o=(n==null?void 0:n.origin)??e.anchor,s=De(ae,r,o.spatialReference,n==null?void 0:n.geographic);ie(r)?Gn(e,t,o):s?Yn(e,t,o):Xn(e,t,o)}function Gn(e,t,n){const{vertexSpace:r}=e;if(!ie(r))return;const o=Rt,s=St;if(!D(t,s,e.spatialReference))return void T(ae(),t.spatialReference,e.spatialReference,P);if(!D(n,o,e.spatialReference)){const a=e.origin;return o[0]=a.x,o[1]=a.y,o[2]=a.z,void T(ae(),n.spatialReference,e.spatialReference,P)}const i=Yt(Zn,s,o);r.origin=Xt(S(),r.origin,i)}function Yn(e,t,n){const r=Se(n.x,n.y,n.z??0),o=Fe(e,new _e({origin:r}));if(!o)return;const s=Se(t.x,t.y,t.z??0),i=Fe({vertexAttributes:o,spatialReference:e.spatialReference,vertexSpace:new _e({origin:s})},new de);if(!i)return;const{position:a,normal:c,tangent:l}=i;e.vertexAttributes.position=a,e.vertexAttributes.normal=c,e.vertexAttributes.tangent=l,e.vertexAttributesChanged()}function Xn(e,t,n){const r=Rt,o=St;if(D(t,o,e.spatialReference)){if(!D(n,r,e.spatialReference)){const s=e.origin;return r[0]=s.x,r[1]=s.y,r[2]=s.z,void T(ae(),n.spatialReference,e.spatialReference,P)}qn(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else T(ae(),t.spatialReference,e.spatialReference,P)}function qn(e,t,n){if(e)for(let r=0;rimport("./loadGLTFMesh-DzrF9DGl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),n),s=await Qn(r,n);we(n);const i=o(new E({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:Kn(s),signal:n==null?void 0:n.signal,expectedType:s.type});i.then(()=>s.dispose(),()=>s.dispose());const{vertexAttributes:a,components:c}=await i;e.vertexAttributes=a,e.components=c}function Kn(e){const t=qt(e.url);return n=>{const r=Zt(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}async function Qn(e,t){if(Array.isArray(e)){if(!e.length)throw new oe("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?tr(e):nr(e,t)}return Mt(e)}async function er(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(n.length===1)return new K(n[0].partUrl);const s=await e.toBlob(t);return we(t),K.fromBlob(s,Ct(o,r))}function Mt(e){return K.fromBlob(e,Ct(e.name,e.type))}function tr(e){return It(e.map(t=>({name:t.name,mimeType:t.type,source:Mt(t)})))}async function nr(e,t){const n=await Jt(e.map(async r=>{const o=await er(r);return we(t),{name:r.assetName,mimeType:r.assetMimeType,source:o}}));if(Kt(t))throw n.forEach(r=>r.source.dispose()),Qt();return It(n)}const _t=/^model\/gltf\+json$/,Ft=/^model\/gltf-binary$/,Le=/\.gltf$/i,rr=/\.glb$/i;function It(e){const t=new Map;let n,r=null;for(const{name:o,mimeType:s,source:i}of e)r===null&&(_t.test(s)||Le.test(o)?(r=i.url,n="gltf"):(Ft.test(s)||rr.test(o))&&(r=i.url,n="glb")),t.set(o,i.url),i.files.forEach((a,c)=>t.set(c,a));if(r==null)throw new oe("mesh-load-external:missing-files","Missing files to load external mesh source");return new K(r,()=>e.forEach(({source:o})=>o.dispose()),t,n)}class K{constructor(t,n=()=>{},r=new Map,o){this.url=t,this.dispose=n,this.files=r,this.type=o}static fromBlob(t,n){const r=URL.createObjectURL(t);return new K(r,()=>URL.revokeObjectURL(r),void 0,n)}}function Ct(e,t){return _t.test(t)||Le.test(e)?"gltf":Ft.test(t)||Le.test(e)?"glb":void 0}let j=class extends en{constructor(e){super(e),this.externalSources=new tn,this._explicitDisplaySource=null,this.addHandles(nn(()=>this.externalSources,"after-remove",({item:t})=>{t===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(e!=null&&!Pe(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!dn(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>gn(t,e))}get _implicitDisplaySource(){return this.externalSources.find(Pe)}};u([f()],j.prototype,"externalSources",void 0),u([f()],j.prototype,"displaySource",null),u([f()],j.prototype,"_implicitDisplaySource",null),u([f()],j.prototype,"_explicitDisplaySource",void 0),j=u([z("esri.geometry.support.meshUtils.Metadata")],j);function or(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=fr,r=4*e.length,o=new Float64Array(3*r),s=new Float32Array(3*r),i=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let c=0,l=0,h=0,d=0;for(let m=0;m=s&&h=4,b=p===2||p===4,I=g?n-1:n;for(let w=0;w<=I;w++){const x=w/I*2*Math.PI,A=g?0:.5;v[0]=A*Math.sin(x),v[1]=A*-Math.cos(x),v[2]=p<=2?.5:-.5;for(let H=0;H<3;H++)o[c++]=v[H],s[l++]=y?H===2?p<=1?1:-1:0:H===2?0:v[H]/A;i[h++]=(w+(g?.5:0))/n,i[h++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,b||p===0||w===n||(p!==5&&(a[d++]=m,a[d++]=m+1,a[d++]=m-n),p!==1&&(a[d++]=m,a[d++]=m-n,a[d++]=m-n-1)),m++}}return{position:o,normal:s,uv:i,faces:a}}function lr(e,t){const n=typeof t=="number"?t:t!=null?t.width:1,r=typeof t=="number"?t:t!=null?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function cr(e){const t=Q.facingAxisOrderSwap[e],n=Q.position,r=Q.normal,o=new Float64Array(n.length),s=new Float32Array(r.length);let i=0;for(let a=0;a<4;a++){const c=i;for(let l=0;l<3;l++){const h=t[l],d=Math.abs(h)-1,m=h>=0?1:-1;o[i]=n[c+d]*m,s[i]=r[c+d]*m,i++}}return{position:o,normal:s,uv:new Float32Array(Q.uv),faces:new Uint32Array(Q.faces),isPlane:!0}}const V=1,k=2,B=3,Q={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[B,V,k],west:[-B,-V,k],north:[-V,B,k],south:[V,-B,k],up:[V,k,B],down:[V,-k,-B]}};function pe(e,t,n){e.isPlane||ur(e),hr(e,pr(n==null?void 0:n.size,n==null?void 0:n.unit,t.spatialReference));const r=ge(t,n),o=t.spatialReference.isGeographic?ge(t):r,s=Fe({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new me({...s,uv:e.uv}),vertexSpace:r,components:[new J({faces:e.faces,material:(n==null?void 0:n.material)||null})],spatialReference:t.spatialReference}}function ur(e){for(let t=0;tle.getLogger("esri.geometry.support.meshUtils.rotate");function dr(e,t,n){var c;if(!((c=e.vertexAttributes)!=null&&c.position)||t[3]===0)return;const{spatialReference:r,vertexSpace:o}=e,s=(n==null?void 0:n.origin)??e.anchor,i=n==null?void 0:n.geographic,a=De(U,o,r,i);pt(e)?gr(e,t,s):a?yr(e,t,s):xr(e,t,s)}function gr(e,t,n){e.transform??(e.transform=new se);const{vertexSpace:r,transform:o,spatialReference:s}=e,[i,a,c]=r.origin,l=new E({x:i,y:a,z:c,spatialReference:s}),h=X;if(l.equals(n))he(h,0,0,0);else if(!wt(h,n,e))return void T(U(),n.spatialReference,s,P);Fn(Ze,fe(t),ct(t));const d=nt(Ye,Ze,$e,on,h),{localMatrix:m}=o,p=rt(Ye,d,m);o.scale=ot(S(),p),st(p,p,it(X,o.scale));const g=o.rotationAxis;o.rotation=ut(p),o.rotationAngle===0&&(o.rotationAxis=g),o.translation=at(S(),p)}function yr(e,t,n){const r=e.spatialReference,o=Tt(r),s=Lt;if(!D(n,s,o)&&(T(U(),n.spatialReference,o,"Falling back to mesh origin"),!D(e.origin,s,o)))return void T(U(),e.origin.spatialReference,o);const i=e.vertexAttributes.position,a=e.vertexAttributes.normal,c=e.vertexAttributes.tangent,l=new Float64Array(i.length),h=a!=null?new Float32Array(a.length):null,d=c!=null?new Float32Array(c.length):null;Ln(o,s,xe,o),_n(qe,xe);const m=Xe;Me(fe(Xe),fe(t),qe),m[3]=t[3],mt(i,r,l)&&(a==null||h==null||dt(a,i,l,r,h))&&(c==null||d==null||gt(c,i,l,r,d))?(Z(l,m,3,s),yt(l,i,r)&&(a==null||h==null||(Z(h,m,3),xt(h,i,l,r,a)))&&(c==null||d==null||(Z(d,m,4),vt(d,i,l,r,c)))?e.vertexAttributesChanged():T(U(),o,r)):T(U(),r,o)}function xr(e,t,n){const r=Lt;if(!D(n,r,e.spatialReference)){const o=e.origin;return r[0]=o.x,r[1]=o.y,r[2]=o.z,void T(U(),n.spatialReference,e.spatialReference,P)}Z(e.vertexAttributes.position,t,3,r),Z(e.vertexAttributes.normal,t,3),Z(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}function Z(e,t,n,r=$e){if(e!=null){sn(xe,ct(t),fe(t));for(let o=0;ole.getLogger("esri.geometry.support.meshUtils.scale");function vr(e,t,n){var c;if(!((c=e.vertexAttributes)!=null&&c.position))return;const{vertexSpace:r,spatialReference:o}=e,s=(n==null?void 0:n.origin)??e.anchor,i=n==null?void 0:n.geographic,a=De(W,r,o,i);pt(e)?wr(e,t,s):a?$r(e,t,s):Tr(e,t,s)}function wr(e,t,n){e.transform??(e.transform=new se);const{vertexSpace:r,transform:o,spatialReference:s}=e,[i,a,c]=r.origin,l=new E({x:i,y:a,z:c,spatialReference:s}),h=q;if(l.equals(n))he(h,0,0,0);else if(!wt(h,n,e))return void T(W(),n.spatialReference,s,P);const d=he(br,t,t,t),m=nt(Je,Cn,$e,d,h),{localMatrix:p}=o,g=rt(Je,m,p);o.scale=ot(S(),g),st(g,g,it(q,o.scale));const y=o.rotationAxis;o.rotation=ut(g),o.rotationAngle===0&&(o.rotationAxis=y),o.translation=at(S(),g)}function $r(e,t,n){const r=e.spatialReference,o=Tt(r),s=Et;if(!D(n,s,o)&&(T(W(),n.spatialReference,o,"Falling back to mesh origin"),!D(e.origin,s,o)))return void T(W(),e.origin.spatialReference,o);const i=e.vertexAttributes.position,a=e.vertexAttributes.normal,c=e.vertexAttributes.tangent,l=new Float64Array(i.length),h=a!=null?new Float32Array(a.length):null,d=c!=null?new Float32Array(c.length):null;mt(i,r,l)&&(a==null||h==null||dt(a,i,l,r,h))&&(c==null||d==null||gt(c,i,l,r,d))?(Nt(l,t,s),yt(l,i,r)&&(a==null||h==null||xt(h,i,l,r,a))&&(c==null||d==null||vt(d,i,l,r,c))?e.vertexAttributesChanged():T(W(),o,r)):T(W(),r,o)}function Tr(e,t,n){const r=Et;if(!D(n,r,e.spatialReference)){const o=e.origin;return r[0]=o.x,r[1]=o.y,r[2]=o.z,void T(W(),n.spatialReference,e.spatialReference,P)}Nt(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}function Nt(e,t,n=$e){if(e)for(let r=0;r{this.addHandles(pn(()=>{var e;return{vertexAttributes:this.vertexAttributes,components:(e=this.components)==null?void 0:e.map(t=>t.clone())}},()=>this._clearSources(),{once:!0,sync:!0}))})}get hasExtent(){var e;return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):((e=this.metadata.displaySource)==null?void 0:e.extent)!=null}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,o=n.position;if(o.length===0||e&&e.length===0)return new et({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if(ie(r)){const{_untransformedBounds:s,transform:i}=this;return kn(s,i,r,t)}return At(o,t)}get _untransformedBounds(){return bt(this.vertexAttributes.position)}get anchor(){const e=Ue(this.vertexSpace,this.spatialReference);if(e!=null)return e;const{center:t,zmin:n}=this._transformedExtent;return new E({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const e=Ue(this.vertexSpace,this.spatialReference);return e??this._transformedExtent.center}get extent(){var e,t;return this.loaded||((t=(e=this.metadata)==null?void 0:e.displaySource)==null?void 0:t.extent)==null?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(J.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(t!==-1)return this.components.splice(t,1),void this.notifyChange("components")}C().error("removeComponent()",On)}}rotate(e,t,n,r){return yn(e,t,n,Ke),dr(this,Ke,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:r,vertexAttributes:o}=this,s=o==null?void 0:o.position;if(!s)return this;if(ie(r)){const[i,a,c]=r.origin;r.origin=Se(i+e,a+t,c+n)}else{for(let i=0;ia.cloneWithDeduplication(s,i))}const r={components:n,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:((o=this.transform)==null?void 0:o.clone())??null,metadata:this.metadata.clone()};return new M(r)}cloneShallow(){return new M({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([Re(()=>import("./gltfexport-CoDBzAqk.js"),__vite__mapDeps([33,1,2,16,4,17,20,3,14,21,22,6,7,10,23,24,8,9,11,15,18,25,26,27,5,28,29,19,30,31,32])),this.load(e)]);return we(e),await t(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,this.components!=null)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(C().error(e,Dn),!1)}static createBox(e,t){if(!(e instanceof E))return C().error(".createBox()",te),null;const n=new M(pe(or(),e,t));return t!=null&&t.imageFace&&t.imageFace!=="all"?sr(n,t.imageFace):n}static createSphere(e,t){return e instanceof E?new M(pe(ir((t==null?void 0:t.densificationFactor)||0),e,t)):(C().error(".createSphere()",te),null)}static createCylinder(e,t){return e instanceof E?new M(pe(ar((t==null?void 0:t.densificationFactor)||0),e,t)):(C().error(".createCylinder()",te),null)}static createPlane(e,t){if(!(e instanceof E))return C().error(".createPlane()",te),null;const n=(t==null?void 0:t.facing)??"up",r=lr(n,t==null?void 0:t.size);return new M(pe(cr(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof hn))return C().error(".createFromPolygon()",jn),null;const n=Wn(e);return new M({vertexAttributes:new me({position:n.position}),components:[new J({faces:n.faces,shading:"flat",material:(t==null?void 0:t.material)??null})],spatialReference:e.spatialReference,vertexSpace:new de})}static async createFromGLTF(e,t,n){if(!(e instanceof E)){const o=new ke;throw C().error(".createfromGLTF()",o.message),o}const{loadGLTFMesh:r}=await tt(Re(()=>import("./loadGLTFMesh-DzrF9DGl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),n);return new M(await r(e,t,n))}static async createFromFiles(e,t,n){fn(C(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"});const r=o=>C().error(".createFromFiles()",o.message);if(!(e instanceof E)){const o=new ke;throw r(o),o}if(!(n!=null&&n.layer))throw new oe("invalid:no-layer","SceneLayer required for file to mesh conversion.");return n.layer.convertMesh(t,{location:e,...n})}static createWithExternalSource(e,t,n){var l;const r=(n==null?void 0:n.extent)??null,{spatialReference:o}=e,s=((l=n==null?void 0:n.transform)==null?void 0:l.clone())??new se,i=ge(e,n),a={source:t,extent:r},c=new j;return c.externalSources.push(a),new M({metadata:c,transform:s,vertexSpace:i,spatialReference:o})}static createIncomplete(e,t){var i;const{spatialReference:n}=e,r=((i=t==null?void 0:t.transform)==null?void 0:i.clone())??new se,o=ge(e,t),s=new M({transform:r,vertexSpace:o,spatialReference:n});return s.addResolvingPromise(Promise.reject(new oe("mesh-incomplete","Mesh resources are not complete"))),s}};u([f({type:[J],json:{write:!0}})],$.prototype,"components",void 0),u([f({nonNullable:!0,types:Ar,constructOnly:!0,json:{write:!0}})],$.prototype,"vertexSpace",void 0),u([f({type:se,json:{write:!0}})],$.prototype,"transform",void 0),u([f({constructOnly:!0})],$.prototype,"metadata",void 0),u([f()],$.prototype,"hasExtent",null),u([f()],$.prototype,"_transformedExtent",null),u([f()],$.prototype,"_untransformedBounds",null),u([f()],$.prototype,"anchor",null),u([f()],$.prototype,"origin",null),u([f({readOnly:!0,json:{read:!1}})],$.prototype,"extent",null),u([f({readOnly:!0,json:{read:!1,write:!0,default:!0}})],$.prototype,"hasZ",void 0),u([f({readOnly:!0,json:{read:!1,write:!0,default:!1}})],$.prototype,"hasM",void 0),u([f({type:me,nonNullable:!0,json:{write:!0}})],$.prototype,"vertexAttributes",void 0),$=M=u([z(Dt)],$);const Ke=lt(),Yr=$;export{Yr as $,re as c,J as h,En as m,ne as w}; diff --git a/build/assets/MeshLocalVertexSpace-CZ-FLKyC.js b/build/assets/MeshLocalVertexSpace-CZ-FLKyC.js new file mode 100644 index 0000000..e10c4ac --- /dev/null +++ b/build/assets/MeshLocalVertexSpace-CZ-FLKyC.js @@ -0,0 +1 @@ +import{co as s,B as e,a$ as i,D as a,E as n,F as p,au as l}from"./index-DKOmzAMm.js";let o=class extends s(p){constructor(t){super(t),this.type="georeferenced",this.origin=null}};e([i({georeferenced:"georeferenced"},{readOnly:!0})],o.prototype,"type",void 0),e([a({type:[Number],nonNullable:!1,json:{write:!0}})],o.prototype,"origin",void 0),o=e([n("esri.geometry.support.MeshGeoreferencedVertexSpace")],o);const y=o;let r=class extends s(p){constructor(t){super(t),this.type="local",this.origin=l()}};e([i({local:"local"},{readOnly:!0})],r.prototype,"type",void 0),e([a({type:[Number],nonNullable:!0,json:{write:!0}})],r.prototype,"origin",void 0),r=e([n("esri.geometry.support.MeshLocalVertexSpace")],r);const d=r;export{d as a,y as i}; diff --git a/build/assets/MeshTransform-CnKLNqg-.js b/build/assets/MeshTransform-CnKLNqg-.js new file mode 100644 index 0000000..7fda5e4 --- /dev/null +++ b/build/assets/MeshTransform-CnKLNqg-.js @@ -0,0 +1 @@ +import{h as E,c7 as H,U as P,c1 as z,fh as C,fi as G,fj as W,eb as _,fk as J,cI as I,B as a,D as u,F as K,au as L,fl as Q,av as R,c0 as f,fm as V,bv as X,d_ as Y,E as Z}from"./index-DKOmzAMm.js";import{c as tt,u as rt,i as st}from"./infoFor3D-DsOdlPuA.js";import{e as v}from"./mat4f64-CSKppSlJ.js";import{v as O,I as m,x as et}from"./quat-BYKy26Om.js";import{e as A}from"./quatf64-Bdb9ZJJK.js";class S{constructor(r,s,e){this.assetName=r,this.assetMimeType=s,this.parts=e}equals(r){return this===r||this.assetName===r.assetName&&this.assetMimeType===r.assetMimeType&&E(this.parts,r.parts,(s,e)=>s.equals(e))}isOnService(r){return this.parts.every(s=>s.isOnService(r))}makeHash(){let r="";for(const s of this.parts)r+=s.partHash;return r}async toBlob(r){const{parts:s}=this;if(s.length===1)return s[0].toBlob(r);const e=await Promise.all(s.map(c=>c.toBlob(r)));return H(r),new Blob(e)}}class ht{constructor(r,s){this.partUrl=r,this.partHash=s}equals(r){return this===r||this.partUrl===r.partUrl&&this.partHash===r.partHash}isOnService(r){return this.partUrl.startsWith(`${r.path}/assets/`)}async toBlob(r){const{data:s}=await P(this.partUrl,{responseType:"blob"});return H(r),s}}function pt(t){return nt(t==null?void 0:t.source)}function N(t){return Array.isArray(t)?t.every(r=>r instanceof S):!1}const x=/^(model\/gltf\+json)|(model\/gltf-binary)$/,M=/\.(gltf|glb)/i;function nt(t){return t?Array.isArray(t)?t.some(d):d(t):!1}function d(t){if(t instanceof File){const{type:r,name:s}=t;return x.test(r)||M.test(s)}return x.test(t.assetMimeType)||M.test(t.assetName)}function mt(t,r){if(!t)return!1;const{source:s}=t;return at(s,r)}function yt(t,r){if(t===r)return!0;const{source:s}=t,{source:e}=r;if(s===e)return!0;if(N(s)&&N(e)){if(s.length!==e.length)return!1;const c=(i,g)=>i.assetNameg.assetName?1:0,b=[...s].sort(c),D=[...e].sort(c);for(let i=0;i0&&s.every(e=>w(e,r))}return w(t,r)}function w(t,r){return t instanceof S&&t.isOnService(r)}function $t(t,r){return t instanceof File?tt(t,r):rt(t.assetMimeType,r)??st(t.assetName,r)}function At(t){return Array.isArray(t)?t:[t]}function bt(t){return!!t.original}function o(t=F){return[t[0],t[1],t[2],t[3]]}function p(t,r,s=o()){return z(s,t),s[3]=r,s}function gt(t,r=o()){const s=J(l,t);return k(r,I(O(r,s))),r}function B(t,r,s=o()){return m(l,t,y(t)),m(U,r,y(r)),et(l,U,l),k(s,I(O(s,l)))}function vt(t,r,s,e=o()){return p(C,t,h),p(G,r,j),p(W,s,T),B(h,j,h),B(h,T,e),e}function Nt(t){return t}function ot(t){return t[3]}function y(t){return _(t[3])}function k(t,r){return t[3]=r,t}const F=[0,0,1,0],l=A(),U=A();o();const h=o(),j=o(),T=o();var $;let n=$=class extends K{constructor(t){super(t),this.translation=L(),this.rotationAxis=Q(F),this.rotationAngle=0,this.scale=R(1,1,1)}get rotation(){return p(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=f(t),this.rotationAngle=ot(t)}get localMatrix(){const t=v();return m(q,this.rotation,y(this.rotation)),V(t,q,this.translation,this.scale),t}get localMatrixInverse(){return X(v(),this.localMatrix)}equals(t){return this===t||t!=null&&Y(this.localMatrix,t.localMatrix)}clone(){const t={translation:f(this.translation),rotationAxis:f(this.rotationAxis),rotationAngle:this.rotationAngle,scale:f(this.scale)};return new $(t)}};a([u({type:[Number],nonNullable:!0,json:{write:!0}})],n.prototype,"translation",void 0),a([u({type:[Number],nonNullable:!0,json:{write:!0}})],n.prototype,"rotationAxis",void 0),a([u({type:Number,nonNullable:!0,json:{write:!0}})],n.prototype,"rotationAngle",void 0),a([u({type:[Number],nonNullable:!0,json:{write:!0}})],n.prototype,"scale",void 0),a([u()],n.prototype,"rotation",null),a([u()],n.prototype,"localMatrix",null),a([u()],n.prototype,"localMatrixInverse",null),n=$=a([Z("esri.geometry.support.MeshTransform")],n);const q=A(),xt=n;export{At as A,xt as N,$t as a,o as b,y as c,Nt as d,mt as h,S as i,gt as k,ht as o,pt as u,bt as v,vt as w,yt as y}; diff --git a/build/assets/MeshVertexAttributes-CfiMg9vN.js b/build/assets/MeshVertexAttributes-CfiMg9vN.js new file mode 100644 index 0000000..e84f761 --- /dev/null +++ b/build/assets/MeshVertexAttributes-CfiMg9vN.js @@ -0,0 +1 @@ +import{B as e,D as u,d7 as p,E as f,F as v,V as l,$ as a}from"./index-DKOmzAMm.js";var y;let r=y=class extends v{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return c(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},l.getLogger(this))}castPosition(t){return t&&t instanceof Float32Array&&l.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),c(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},l.getLogger(this))}castUv(t){return c(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},l.getLogger(this))}castNormal(t){return c(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},l.getLogger(this))}castTangent(t){return c(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},l.getLogger(this))}clone(){const t={position:a(this.position),uv:a(this.uv),normal:a(this.normal),tangent:a(this.tangent),color:a(this.color)};return new y(t)}clonePositional(){const t={position:a(this.position),normal:a(this.normal),tangent:a(this.tangent),uv:this.uv,color:this.color};return new y(t)}get memoryUsage(){let t=0;return t+=this.position.byteLength,this.uv!=null&&(t+=this.uv.byteLength),this.normal!=null&&(t+=this.normal.byteLength),this.tangent!=null&&(t+=this.tangent.byteLength),this.color!=null&&(t+=this.color.byteLength),t}};function m(t,o,n,g){const{loggerTag:i,stride:s}=o;return t.length%s!=0?(g.error(i,`Invalid array length, expected a multiple of ${s}`),new n([])):t}function c(t,o,n,g,i){if(!t)return t;if(t instanceof o)return m(t,g,o,i);for(const s of n)if(t instanceof s)return m(new o(t),g,o,i);if(Array.isArray(t))return m(new o(t),g,o,i);{const s=n.map(d=>`'${d.name}'`);return i.error(`Failed to set property, expected one of ${s}, but got ${t.constructor.name}`),new o([])}}function h(t,o,n){o[n]=A(t)}function A(t){const o=new Array(t.length);for(let n=0;nL.fromJSON(i))}queryFeaturesJSON(e,t={}){const i=this.getSource();return this.load(t).then(()=>Ce(i,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator)||!!this.featureDefinition.supportedCrs[e.wkid]}_conformsToType(e,t){const i=new RegExp(`^${b(t)}$`,"i");return e.conformsTo.some(n=>i.test(n))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){var i,n,p,l,a;const t=(i=e==null?void 0:e.components)==null?void 0:i.parameters;return((p=(n=t==null?void 0:t.limit)==null?void 0:n.schema)==null?void 0:p.maximum)??((a=(l=t==null?void 0:t.limitFeatures)==null?void 0:l.schema)==null?void 0:a.maximum)}_getStorageSpatialReference(e){const t=e.storageCrs??D,i=T(t);return i==null?C.WGS84:new C({wkid:i})}_getSupportedSpatialReferences(e,t){const i="#/crs",n=e.crs??[D],p=n.includes(i)?n.filter(a=>a!==i).concat(t.crs??[]):n,l=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return p.filter(a=>!l.test(a))}async _loadOGCServices(e,t){const i=t!=null?t.signal:null,{apiKey:n,collectionId:p,customParameters:l,fields:a,geometryType:h,hasZ:f,objectIdField:P,timeInfo:m,url:E}=e,_={fields:a==null?void 0:a.map(u=>u.toJSON()),geometryType:z.toJSON(h),hasZ:f??!1,objectIdField:P,timeInfo:m==null?void 0:m.toJSON()},c={apiKey:n,customParameters:l,signal:i},g=await we(E,c),[w,x]=await Promise.all([xe(g,c),Re(g,c)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new F("ogc-feature-layer:no-geojson-support","Server does not support geojson");const y=x.collections.find(({id:u})=>u===p);if(!y)throw new F("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const q=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await be(g,c):null,R=await Fe(y,_,c),A=this._getMaxRecordCount(q),G=this._getCapabilities(R.hasZ,A),B=this._getStorageSpatialReference(y).toJSON(),M=this._getSupportedSpatialReferences(y,x),Q=new RegExp(`^${b(Ie)}`,"i"),v={};for(const u of M){const S=T(u);S!=null&&(v[S]||(v[S]=u.replace(Q,"")))}this.featureDefinition={capabilities:G,collection:y,layerDefinition:R,spatialReference:B,supportedCrs:v}}};s([o()],d.prototype,"featureDefinition",void 0),s([o({constructOnly:!0})],d.prototype,"layer",void 0),s([o()],d.prototype,"type",void 0),d=s([j("esri.layers.graphics.sources.OGCFeatureSource")],d);const Oe=ve();let r=class extends H(Z(k(J(U(K(V(W(X(Y(ee(te(Se)))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new d({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){var e;(e=this.source)==null||e.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){var e;return this.maxRecordCount??((e=this.capabilities)==null?void 0:e.query.maxRecordCount)??5e3}get isTable(){return this.loaded&&this.geometryType==null}set renderer(e){I(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return se(this,e)}createQuery(){return new O}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){var a;let i,n=!1;const p=(a=t==null?void 0:t.feature)==null?void 0:a.attributes,l=this.typeIdField&&(p==null?void 0:p[this.typeIdField]);return l!=null&&this.types&&(n=this.types.some(h=>{var f;return h.id==l&&(i=(f=h.domains)==null?void 0:f[e],(i==null?void 0:i.type)==="inherited"&&(i=this._getLayerDomain(e)),!0)})),n||i||(i=this._getLayerDomain(e)),i}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(O.from(e)||this.createQuery(),t)).then(i=>{var n;return(n=i==null?void 0:i.features)==null||n.forEach(p=>{p.layer=p.sourceLayer=this}),i})}serviceSupportsSpatialReference(e){var t;return((t=this.source)==null?void 0:t.serviceSupportsSpatialReference(e))??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),I(this.renderer,this.fieldsIndex),re(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};s([o({readOnly:!0,json:{origins:{service:{read:!0}}}})],r.prototype,"capabilities",void 0),s([o({type:String,json:{write:!0}})],r.prototype,"collectionId",void 0),s([o({type:String})],r.prototype,"copyright",void 0),s([o({readOnly:!0})],r.prototype,"defaultPopupTemplate",null),s([o({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],r.prototype,"description",void 0),s([o({type:String})],r.prototype,"displayField",void 0),s([o({type:Number})],r.prototype,"effectiveMaxRecordCount",null),s([o(oe)],r.prototype,"elevationInfo",void 0),s([o({type:[ie],json:{origins:{service:{name:"layerDefinition.fields"}}}})],r.prototype,"fields",void 0),s([o(Oe.fieldsIndex)],r.prototype,"fieldsIndex",void 0),s([o({readOnly:!0,type:ne,json:{origins:{service:{name:"layerDefinition.extent"}}}})],r.prototype,"fullExtent",void 0),s([o({type:$.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:$.read}}}}})],r.prototype,"geometryType",void 0),s([o({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],r.prototype,"hasZ",void 0),s([o({type:Boolean,readOnly:!0})],r.prototype,"isTable",null),s([o({type:[pe],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ae},write:!0}}}})],r.prototype,"labelingInfo",void 0),s([o(le)],r.prototype,"labelsVisible",void 0),s([o(ue)],r.prototype,"legendEnabled",void 0),s([o({type:Number})],r.prototype,"maxRecordCount",void 0),s([o({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],r.prototype,"objectIdField",void 0),s([o({type:["OGCFeatureLayer"]})],r.prototype,"operationalLayerType",void 0),s([o(de)],r.prototype,"popupEnabled",void 0),s([o({type:ce,json:{name:"popupInfo",write:!0}})],r.prototype,"popupTemplate",void 0),s([o({types:ye,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:he,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],r.prototype,"renderer",null),s([o(fe)],r.prototype,"screenSizePerspectiveEnabled",void 0),s([o({readOnly:!0})],r.prototype,"source",void 0),s([o({readOnly:!0,type:C,json:{origins:{service:{read:!0}}}})],r.prototype,"spatialReference",void 0),s([o({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],r.prototype,"title",void 0),s([o({readOnly:!0,json:{read:!1}})],r.prototype,"type",void 0),s([o({type:String,readOnly:!0})],r.prototype,"typeIdField",void 0),s([o({type:[me]})],r.prototype,"types",void 0),s([o(ge)],r.prototype,"url",void 0),r=s([j("esri.layers.OGCFeatureLayer")],r);const Be=r;export{Be as default}; diff --git a/build/assets/OpenStreetMapLayer-C6iOFUlM.js b/build/assets/OpenStreetMapLayer-C6iOFUlM.js new file mode 100644 index 0000000..93ac3d7 --- /dev/null +++ b/build/assets/OpenStreetMapLayer-C6iOFUlM.js @@ -0,0 +1 @@ +import{B as t,D as l,S as a,E as i,Q as p,ay as r,aZ as c}from"./index-DKOmzAMm.js";import{I as u}from"./WebTileLayer-DDbix1qe.js";import{z as n,p as e}from"./TileInfo-Bx6eEWV4.js";import"./imageBitmapUtils-kF4U_Pyx.js";let o=class extends u{constructor(...s){super(...s),this.portalItem=null,this.isReference=null,this.tileInfo=new n({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new p({x:-20037508342787e-6,y:20037508342787e-6,spatialReference:r.WebMercator}),spatialReference:r.WebMercator,lods:[new e({level:0,scale:591657527591555e-6,resolution:156543.033928}),new e({level:1,scale:295828763795777e-6,resolution:78271.5169639999}),new e({level:2,scale:147914381897889e-6,resolution:39135.7584820001}),new e({level:3,scale:73957190948944e-6,resolution:19567.8792409999}),new e({level:4,scale:36978595474472e-6,resolution:9783.93962049996}),new e({level:5,scale:18489297737236e-6,resolution:4891.96981024998}),new e({level:6,scale:9244648868618e-6,resolution:2445.98490512499}),new e({level:7,scale:4622324434309e-6,resolution:1222.99245256249}),new e({level:8,scale:2311162217155e-6,resolution:611.49622628138}),new e({level:9,scale:1155581108577e-6,resolution:305.748113140558}),new e({level:10,scale:577790.554289,resolution:152.874056570411}),new e({level:11,scale:288895.277144,resolution:76.4370282850732}),new e({level:12,scale:144447.638572,resolution:38.2185141425366}),new e({level:13,scale:72223.819286,resolution:19.1092570712683}),new e({level:14,scale:36111.909643,resolution:9.55462853563415}),new e({level:15,scale:18055.954822,resolution:4.77731426794937}),new e({level:16,scale:9027.977411,resolution:2.38865713397468}),new e({level:17,scale:4513.988705,resolution:1.19432856685505}),new e({level:18,scale:2256.994353,resolution:.597164283559817}),new e({level:19,scale:1128.497176,resolution:.298582141647617})]}),this.subDomains=["a","b","c"],this.fullExtent=new c(-20037508342787e-6,-2003750834278e-5,2003750834278e-5,20037508342787e-6,r.WebMercator),this.urlTemplate="https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png",this.operationalLayerType="OpenStreetMap",this.type="open-street-map",this.copyright="Map data © OpenStreetMap contributors, CC-BY-SA"}get refreshInterval(){return 0}};t([l({type:a,json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],o.prototype,"portalItem",void 0),t([l({type:Boolean,json:{read:!1,write:!1}})],o.prototype,"isReference",void 0),t([l({type:Number,readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],o.prototype,"refreshInterval",null),t([l({type:n,json:{write:!1}})],o.prototype,"tileInfo",void 0),t([l({type:["show","hide"]})],o.prototype,"listMode",void 0),t([l({readOnly:!0,json:{read:!1,write:!1}})],o.prototype,"subDomains",void 0),t([l({readOnly:!0,json:{read:!1,write:!1},nonNullable:!0})],o.prototype,"fullExtent",void 0),t([l({readOnly:!0,json:{read:!1,write:!1}})],o.prototype,"urlTemplate",void 0),t([l({type:["OpenStreetMap"]})],o.prototype,"operationalLayerType",void 0),t([l({json:{read:!1}})],o.prototype,"type",void 0),t([l({json:{read:!1,write:!1}})],o.prototype,"copyright",void 0),t([l({json:{read:!1,write:!1}})],o.prototype,"wmtsInfo",void 0),o=t([i("esri.layers.OpenStreetMapLayer")],o);const m=o;export{m as default}; diff --git a/build/assets/OptimizedFeature-DDMKj8Vq.js b/build/assets/OptimizedFeature-DDMKj8Vq.js new file mode 100644 index 0000000..c4e7124 --- /dev/null +++ b/build/assets/OptimizedFeature-DDMKj8Vq.js @@ -0,0 +1 @@ +let l=class o{constructor(t=[],e=[],s=!1){this.lengths=t??[],this.coords=e??[],this.hasIndeterminateRingOrder=s}static fromJSON(t){return new o(t.lengths,t.coords,t.hasIndeterminateRingOrder)}static fromRect(t){const[e,s,h,r]=t,n=h-e,c=r-s;return new o([5],[e,s,n,0,0,c,-n,0,0,-c])}get isPoint(){return this.lengths.length===0}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce((t,e)=>t+e)}forEachVertex(t){let e=0;this.lengths.length||t(this.coords[0],this.coords[1]);for(let s=0;sh+r))*2,s=this.coords.slice(0,e);return t?(t.set(s),new o(this.lengths,t,this.hasIndeterminateRingOrder)):new o(Array.from(this.lengths),Array.from(s),this.hasIndeterminateRingOrder)}};class i{constructor(t=null,e={},s,h){this.geometry=t,this.attributes=e,this.centroid=s,this.objectId=h,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(t,e){const s=t.geometry?l.fromJSON(t.geometry):null,h=t.centroid?l.fromJSON(t.centroid):null,r=t.attributes[e];return new i(s,t.attributes,h,r)}weakClone(){const t=new i(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}clone(){var s,h;const t=(s=this.geometry)==null?void 0:s.clone(),e=new i(t,{...this.attributes},(h=this.centroid)==null?void 0:h.clone(),this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function g(a){var t,e;return!!((e=(t=a.geometry)==null?void 0:t.coords)!=null&&e.length)}export{i as a,l as e,g as s}; diff --git a/build/assets/OptimizedFeatureSet-Blu9Ckm7.js b/build/assets/OptimizedFeatureSet-Blu9Ckm7.js new file mode 100644 index 0000000..88701ec --- /dev/null +++ b/build/assets/OptimizedFeatureSet-Blu9Ckm7.js @@ -0,0 +1 @@ +class t{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new t;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}export{t as e}; diff --git a/build/assets/OrientedImageryLayer-DsKvJ25C.js b/build/assets/OrientedImageryLayer-DsKvJ25C.js new file mode 100644 index 0000000..466f979 --- /dev/null +++ b/build/assets/OrientedImageryLayer-DsKvJ25C.js @@ -0,0 +1 @@ +import{B as t,D as e,E as z,bw as J,co as k,cn as q,F as Z,a_ as _,hD as I,d7 as Q,dj as X,s as tt}from"./index-DKOmzAMm.js";const et=[2155,2194,2204,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2314,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2964,2965,2966,2967,2968,2992,2994,3080,3089,3091,3102,3359,3359,3361,3363,3365,3366,3404,3407,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3441,3442,3443,3444,3445,3446,3451,3452,3453,3454,3455,3456,3457,3458,3459,3479,3481,3483,3485,3487,3490,3492,3494,3496,3498,3500,3502,3504,3506,3508,3510,3512,3515,3517,3519,3521,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541,3543,3545,3547,3549,3551,3553,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3582,3584,3586,3588,3590,3593,3598,3600,3605,3608,3610,3612,3614,3616,3618,3620,3622,3624,3626,3628,3630,3632,3634,3636,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660,3662,3664,3668,3670,3672,3674,3676,3677,3679,3680,3682,3683,3686,3688,3690,3692,3696,3698,3700,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3753,3754,3755,3756,3757,3758,3759,3760,3991,3992,4217,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4438,4439,4455,4456,4457,5466,5588,5589,5623,5624,5625,5646,5654,5655,6128,6129,6141,6200,6201,6202,6391,6405,6407,6409,6411,6413,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6441,6443,6445,6447,6449,6451,6453,6455,6457,6459,6461,6463,6465,6467,6469,6471,6473,6475,6477,6479,6484,6486,6488,6490,6492,6494,6496,6499,6501,6503,6505,6507,6510,6515,6517,6519,6521,6523,6525,6527,6529,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,6553,6555,6557,6559,6561,6563,6565,6568,6570,6572,6574,6576,6578,6582,6584,6586,6588,6590,6593,6595,6597,6599,6601,6603,6605,6607,6609,6612,6614,6616,6618,6625,6626,6627,6633,6785,6787,6789,6791,6793,6795,6797,6799,6801,6803,6805,6807,6809,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841,6843,6845,6847,6849,6851,6853,6855,6857,6859,6861,6863,6868,6880,6885,6887,6923,6925,6966,6997,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7132,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7558,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,24100,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26814,26815,26819,26820,26821,26822,26825,26826,26830,26831,26832,26833,26836,26837,26841,26842,26843,26844,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32064,32065,32066,32067,32074,32075,32076,32077,32099,32164,32165,32166,32167,32664,32665,32666,32667,65061,102120,102121,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102700,102704,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102766],ot=[5614,5702,6130,6131,6132,6358,6359,6360],it=[115700,4326];function G(o){return et.includes(o)?"feet":"meters"}function rt(o,i){return typeof o=="number"?ot.includes(o)?"feet":"meters":G(i)}function nt(o,i){return o&&it.includes(o)||i===4326?"ellipsoidal":"gravity-related-height"}let N=class extends J{constructor(){super(...arguments),this.verticalWKID=null}get isAdvanced(){const{affineTransformations:i,focalLength:r,principalOffsetPoint:n,radialDistortionCoefficients:l,tangentialDistortionCoefficients:u}=this;return(i==null?void 0:i.length)>1&&!Number.isNaN(r)&&(n==null?void 0:n.length)>1&&(l==null?void 0:l.length)>1&&(u==null?void 0:u.length)>1}get unitAndHeightInfo(){const{horizontalWKID:i,verticalWKID:r}=this;let n=i,l=r;const u=this;if(u.type===4){const{properties:g}=u;n=4326,l=g.verticalWKID}return{heightModel:nt(l,n),heightUnit:rt(l,n),horizontalUnit:G(n)}}};t([e({json:{write:!0}})],N.prototype,"affineTransformations",void 0),t([e({json:{write:!0}})],N.prototype,"focalLength",void 0),t([e({json:{write:!0}})],N.prototype,"principalOffsetPoint",void 0),t([e({json:{write:!0}})],N.prototype,"radialDistortionCoefficients",void 0),t([e({json:{write:!0}})],N.prototype,"tangentialDistortionCoefficients",void 0),t([e({json:{write:!0}})],N.prototype,"horizontalWKID",void 0),t([e({json:{write:!0}})],N.prototype,"verticalWKID",void 0),t([e({json:{write:!0}})],N.prototype,"x",void 0),t([e({json:{write:!0}})],N.prototype,"y",void 0),t([e({json:{write:!0}})],N.prototype,"z",void 0),t([e({json:{write:!0}})],N.prototype,"type",void 0),t([e({readOnly:!0})],N.prototype,"unitAndHeightInfo",null),N=t([z("esri.layers.orientedImagery.core.CameraOrientation")],N);const B=N;let h=class extends k(q(B)){constructor(){super(...arguments),this.type=1}toString(){const{type:i,horizontalWKID:r,verticalWKID:n,x:l,y:u,z:g,heading:P,pitch:x,roll:b,affineTransformations:j,focalLength:D,principalOffsetPoint:c,radialDistortionCoefficients:d,tangentialDistortionCoefficients:f}=this,s=[i,r,n,l,u,g,P,x,b];return this.isAdvanced&&(j==null||j.forEach(p=>s.push(p)),s.push(D),c==null||c.forEach(p=>s.push(p)),d==null||d.forEach(p=>s.push(p)),f==null||f.forEach(p=>s.push(p))),s.map(p=>Number.isNaN(p)?"":p).join("|")}};t([e({json:{write:!0}})],h.prototype,"type",void 0),t([e({type:[Number],json:{write:!0}})],h.prototype,"affineTransformations",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"focalLength",void 0),t([e({type:[Number],json:{write:!0}})],h.prototype,"principalOffsetPoint",void 0),t([e({type:[Number],json:{write:!0}})],h.prototype,"radialDistortionCoefficients",void 0),t([e({type:[Number],json:{write:!0}})],h.prototype,"tangentialDistortionCoefficients",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"heading",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"pitch",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"roll",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"horizontalWKID",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"verticalWKID",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"x",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"y",void 0),t([e({type:Number,json:{write:!0}})],h.prototype,"z",void 0),h=t([z("esri.layers.orientedImagery.core.CameraOrientationHPR")],h);const at=h;let m=class extends k(q(B)){constructor(){super(...arguments),this.type=2,this.verticalWKID=null}toString(){const{type:o,horizontalWKID:i,verticalWKID:r,x:n,y:l,z:u,omega:g,phi:P,kappa:x,affineTransformations:b,focalLength:j,principalOffsetPoint:D,radialDistortionCoefficients:c,tangentialDistortionCoefficients:d}=this,f=[o,i,r,n,l,u,g,P,x];return this.isAdvanced&&(b==null||b.forEach(s=>f.push(s)),f.push(j),D==null||D.forEach(s=>f.push(s)),c==null||c.forEach(s=>f.push(s)),d==null||d.forEach(s=>f.push(s))),f.map(s=>isNaN(s)?"":s).join("|")}};t([e({json:{write:!0}})],m.prototype,"type",void 0),t([e({type:[Number],json:{write:!0}})],m.prototype,"affineTransformations",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"focalLength",void 0),t([e({type:[Number],json:{write:!0}})],m.prototype,"principalOffsetPoint",void 0),t([e({type:[Number],json:{write:!0}})],m.prototype,"radialDistortionCoefficients",void 0),t([e({type:[Number],json:{write:!0}})],m.prototype,"tangentialDistortionCoefficients",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"omega",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"phi",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"kappa",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"horizontalWKID",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"verticalWKID",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"x",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"y",void 0),t([e({type:Number,json:{write:!0}})],m.prototype,"z",void 0),m=t([z("esri.layers.orientedImagery.core.CameraOrientationOPK")],m);const st=m;let v=class extends k(q(B)){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:i,focalLength:r,principalOffsetPoint:n,radialDistortionCoefficients:l,tangentialDistortionCoefficients:u}=this;return(i==null?void 0:i.length)>1||!Number.isNaN(r)||(n==null?void 0:n.length)>1||(l==null?void 0:l.length)>1||(u==null?void 0:u.length)>1}toString(){const{type:i,horizontalWKID:r,verticalWKID:n,x:l,y:u,z:g,yaw:P,pitch:x,roll:b,affineTransformations:j,focalLength:D,principalOffsetPoint:c,radialDistortionCoefficients:d,tangentialDistortionCoefficients:f}=this,s=[i,r,n,l,u,g,P,x,b];return this.isAdvanced&&(j==null||j.forEach(p=>s.push(p)),s.push(D),c==null||c.forEach(p=>s.push(p)),c==null||c.forEach(p=>s.push(p)),d==null||d.forEach(p=>s.push(p)),f==null||f.forEach(p=>s.push(p))),s.map(p=>Number.isNaN(p)?"":p).join("|")}};t([e({json:{write:!0}})],v.prototype,"type",void 0),t([e({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),t([e({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),t([e({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),t([e({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"horizontalWKID",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"verticalWKID",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"x",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"y",void 0),t([e({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=t([z("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const pt=v;let W=class extends Z{constructor(){super(...arguments),this.url=null}};t([e({type:Number,json:{write:!0}})],W.prototype,"lod",void 0),t([e({type:String,json:{write:!0}})],W.prototype,"rasterFunction",void 0),t([e({type:String,json:{write:!0}})],W.prototype,"url",void 0),W=t([z("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],W);let A=class extends Z{constructor(){super(...arguments),this.constantElevation=null}};t([e({type:Number,json:{write:!0}})],A.prototype,"constantElevation",void 0),A=t([z("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],A);const lt=o=>o!=null&&"constantElevation"in o&&typeof o.constantElevation=="number";var S;(function(o){o[o.HPR=1]="HPR",o[o.OPK=2]="OPK",o[o.YPR=3]="YPR",o[o.LTP=4]="LTP"})(S||(S={}));function ut(o,i,r){return i&&(o=`${i}${o}`),r&&(o+=`${r}`),o}function yt(o,i,r){let{url:n}=o;return n?(n=ut(n,i,r),new W({...o,url:n})):null}function ct(o,i,r){return o&&(lt(o)?new A(o):yt(o,i,r))}const F=new _({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),V=new _({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),Y=new Map;Y.set(`${S.OPK}`,{desc:"Using Omega Phi Kappa",constructor:st}),Y.set(`${S.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:at}),Y.set(`${S.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:pt});const M=new Map;function ft(o){const[i,r,n,l,u,g,P,x,b,j,D,c,d,f,s,p,E,T,L,R,H,U]=o.slice(1),O=[b,j,D,c,d,f].map(w=>Number(w)),$=[p,E].map(w=>Number(w)),K=[T,L,R].map(w=>Number(w)),C=[H,U].map(w=>Number(w));return{horizontalWKID:i,verticalWKID:r,x:n,y:l,z:u,omega:g,phi:P,kappa:x,affineTransformations:O.filter(I).length===6?O:null,focalLength:s,principalOffsetPoint:$.filter(I).length!==2?null:$,radialDistortionCoefficients:K.filter(I).length!==3?[0,0,0]:K,tangentialDistortionCoefficients:C.filter(I).length!==2?[0,0]:C}}function dt(o){const[i,r,n,l,u,g,P,x,b,j,D,c,d,f,s,p,E,T,L,R,H,U]=o.slice(1),O=[b,j,D,c,d,f].map(w=>Number(w)),$=[p,E].map(w=>Number(w)),K=[T,L,R],C=[H,U];return{horizontalWKID:i,verticalWKID:r,x:n,y:l,z:u,heading:g,pitch:P,roll:x,affineTransformations:O.filter(I).length===6?O:null,focalLength:s,principalOffsetPoint:$.filter(I).length!==2?null:$,radialDistortionCoefficients:K.filter(I).length!==3?null:K,tangentialDistortionCoefficients:C.filter(I).length!==2?null:C}}function ht(o){const[i,r,n,l,u,g,P,x,b,j,D,c,d,f,s,p,E,T,L,R,H,U]=o.slice(1),O=[b,j,D,c,d,f].map(w=>Number(w)),$=[p,E].map(w=>Number(w)),K=[T,L,R],C=[H,U];return{horizontalWKID:i,verticalWKID:r,x:n,y:l,z:u,yaw:g,pitch:P,roll:x,affineTransformations:O.filter(I).length===6?O:null,focalLength:s,principalOffsetPoint:$.filter(I).length!==2?null:$,radialDistortionCoefficients:K.filter(I).length!==3?null:K,tangentialDistortionCoefficients:C.filter(I).length!==2?null:C}}function mt(o){const[i,r,n,l,u,...g]=o.slice(1),P=M.get(u);return P?{latitude:i,longitude:r,ellipsoidRadius:n,squaredEccentricity:l,properties:P([u,"",...g])}:null}M.set(`${S.HPR}`,dt),M.set(`${S.YPR}`,ht),M.set(`${S.OPK}`,ft),M.set(`${S.LTP}`,mt);function y(o,i,r){return{name:`orientedImageryProperties.${o}`,write:!i||{target:`orientedImageryProperties.${o}`,writer:i},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${o}`,write:i,read:r}}}}let a=class extends X{constructor(){super(...arguments),this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null}get effectiveElevationSource(){const{elevationSource:o,demPathPrefix:i,demPathSuffix:r}=this;return ct(o,i,r)}findFirstValidLayerId(o){var i,r;return(r=(i=o.layers)==null?void 0:i.find(n=>this.supportedSourceTypes.has(n.type)))==null?void 0:r.id}_verifySource(){if(super._verifySource(),this.geometryType!=="point")throw new tt("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};t([e({type:Number,json:y("cameraHeading")})],a.prototype,"cameraHeading",void 0),t([e({type:Number,json:y("cameraHeight")})],a.prototype,"cameraHeight",void 0),t([e({type:Number,json:y("cameraPitch")})],a.prototype,"cameraPitch",void 0),t([e({type:Number,json:y("cameraRoll")})],a.prototype,"cameraRoll",void 0),t([e({type:Number,json:y("coveragePercent")})],a.prototype,"coveragePercent",void 0),t([e({type:String,json:y("demPathPrefix")})],a.prototype,"demPathPrefix",void 0),t([e({type:String,json:y("demPathSuffix")})],a.prototype,"demPathSuffix",void 0),t([e({type:String,json:y("depthImagePathPrefix")})],a.prototype,"depthImagePathPrefix",void 0),t([e({type:String,json:y("depthImagePathSuffix")})],a.prototype,"depthImagePathSuffix",void 0),t([e({type:Object,json:y("elevationSource")})],a.prototype,"elevationSource",void 0),t([e()],a.prototype,"effectiveElevationSource",null),t([e({type:Number,json:y("farDistance")})],a.prototype,"farDistance",void 0),t([e({json:{write:!0}})],a.prototype,"geometryType",void 0),t([e({type:Number,json:y("horizontalFieldOfView")})],a.prototype,"horizontalFieldOfView",void 0),t([e({type:String,json:y("horizontalMeasurementUnit")})],a.prototype,"horizontalMeasurementUnit",void 0),t([e({type:String,json:y("imagePathPrefix")})],a.prototype,"imagePathPrefix",void 0),t([e({type:String,json:y("imagePathSuffix")})],a.prototype,"imagePathSuffix",void 0),t([e({type:Number,json:y("imageRotation")})],a.prototype,"imageRotation",void 0),t([e({type:Number,json:y("maximumDistance")})],a.prototype,"maximumDistance",void 0),t([e({type:Number,json:y("nearDistance")})],a.prototype,"nearDistance",void 0),t([e({type:["OrientedImageryLayer"]})],a.prototype,"operationalLayerType",void 0),t([e({json:y("orientationAccuracy",(o,i)=>{o&&(i.orientationAccuracy=o.join(","))})}),Q(o=>o?o.trim().split(",").map(Number):null)],a.prototype,"orientationAccuracy",void 0),t([e({json:{...y("orientedImageryType",V.write,V.read),type:V.apiValues}})],a.prototype,"orientedImageryType",void 0),t([e({json:{read:!1},value:"oriented-imagery",readOnly:!0})],a.prototype,"type",void 0),t([e({json:{...y("timeIntervalUnit",F.write,F.read),type:F.apiValues}})],a.prototype,"timeIntervalUnit",void 0),t([e({type:Number,json:y("verticalFieldOfView")})],a.prototype,"verticalFieldOfView",void 0),t([e({json:{...y("verticalMeasurementUnit"),type:new _({Feet:"feet",Meter:"meter"}).apiValues}})],a.prototype,"verticalMeasurementUnit",void 0),t([e({type:String,json:y("videoPathPrefix")})],a.prototype,"videoPathPrefix",void 0),t([e({type:String,json:y("videoPathSuffix")})],a.prototype,"videoPathSuffix",void 0),a=t([z("esri.layers.OrientedImageryLayer")],a);const Pt=a;export{Pt as default}; diff --git a/build/assets/PBFDecoderWorker-BSA6vg2a.js b/build/assets/PBFDecoderWorker-BSA6vg2a.js new file mode 100644 index 0000000..12e2151 --- /dev/null +++ b/build/assets/PBFDecoderWorker-BSA6vg2a.js @@ -0,0 +1 @@ +import{dN as c,ay as d,cg as p,fA as f,fB as m}from"./index-DKOmzAMm.js";import{p as y,r as _}from"./featureConversionUtils-CCATessr.js";import{t as g}from"./pbfQueryUtils-D2YxxSfN.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./pbf-DwSF5Y_G.js";let b=class{constructor(t,e,s){this.uid=t,this.geometry=e,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}};class P{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function C(i,t,e,s){if(t!=null&&t.size&&e!=null&&i)for(const r in i){if(!t.has(r))continue;const n=i[r];typeof n=="string"&&n.length>e&&(s(r),i[r]="")}}function A(i,t){return t}function l(i,t,e,s){switch(e){case 0:return h(i,t+s,0);case 1:return i.originPosition==="lowerLeft"?h(i,t+s,1):M(i,t+s,1)}}function u(i,t,e,s){return e===2?h(i,t,2):l(i,t,e,s)}function G(i,t,e,s){return e===2?h(i,t,3):l(i,t,e,s)}function v(i,t,e,s){return e===3?h(i,t,3):u(i,t,e,s)}function h({translate:i,scale:t},e,s){return i[s]+e*t[s]}function M({translate:i,scale:t},e,s){return i[s]-e*t[s]}class T{constructor(t){this._options=t,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=A,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{},this._missingAttributes=[]}get missingAttributes(){return this._missingAttributes}createFeatureResult(){return new P}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=c(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(e!=null)for(const s of t.features)e(s.geometry)}createSpatialReference(){return new d}addField(t,e){t.fields.push(p.fromJSON(e));const s=t.fields.map(r=>r.name);this._attributesConstructor=function(){for(const r of s)this[r]=null}}addFeature(t,e){const s=this._options.maxStringAttributeLength,r=this._options.maxStringAttributeFields;C(e.attributes,r,s,n=>{const o=e.attributes[t.objectIdFieldName];o!=null&&this._missingAttributes.push({objectId:o,attribute:n})}),t.features.push(e)}addQueryGeometry(t,e){const{queryGeometry:s,queryGeometryType:r}=e,n=y(s.clone(),s,!1,!1,this._transform),o=_(n,r,!1,!1);let a=null;switch(r){case"esriGeometryPoint":a="point";break;case"esriGeometryPolygon":a="polygon";break;case"esriGeometryPolyline":a="polyline";break;case"esriGeometryMultipoint":a="multipoint"}o.type=a,t.queryGeometryType=r,t.queryGeometry=o}prepareFeatures(t){switch(this._transform=t.transform??null,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&this._vertexDimension++,t.geometryType){case"point":this.addCoordinate=(e,s,r)=>this.addCoordinatePoint(e,s,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,s,r)=>this._addCoordinatePolygon(e,s,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,s,r)=>this._addCoordinatePolyline(e,s,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,s,r)=>this._addCoordinateMultipoint(e,s,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:f(t.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new b(m(),null,new this._attributesConstructor)}allocateCoordinates(){const t=this._lengths.reduce((e,s)=>e+s,0);this._coordinateBuffer=new Float64Array(t*this._vertexDimension),this._coordinateBufferPtr=0}addLength(t,e){this._lengths.length===0&&(this._toAddInCurrentPath=e),this._lengths.push(e)}createPointGeometry(t){const e={type:"point",x:0,y:0,spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM};return e.hasZ&&(e.z=0),e.hasM&&(e.m=0),e}addCoordinatePoint(t,e,s){const r=this._transform?this._applyTransform(this._transform,e,s,0):e;if(r!=null)switch(s){case 0:t.x=r;break;case 1:t.y=r;break;case 2:t.hasZ?t.z=r:t.m=r;break;case 3:t.m=r}}_transformPathLikeValue(t,e){let s=0;return e<=1&&(s=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._transform?this._applyTransform(this._transform,t,e,s):t}_addCoordinatePolyline(t,e,s){this._dehydratedAddPointsCoordinate(t.paths,e,s)}_addCoordinatePolygon(t,e,s){this._dehydratedAddPointsCoordinate(t.rings,e,s)}_addCoordinateMultipoint(t,e,s){s===0&&t.points.push([]);const r=this._transformPathLikeValue(e,s);t.points[t.points.length-1].push(r)}_createPolygonGeometry(t){return{type:"polygon",rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{type:"polyline",paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{type:"multipoint",points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,s){s===0&&this._toAddInCurrentPath--==0&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const r=this._transformPathLikeValue(e,s),n=t[t.length-1],o=this._coordinateBuffer;if(o){if(s===0){const a=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;n.push(new Float64Array(o.buffer,a,this._vertexDimension))}o[this._coordinateBufferPtr++]=r}}_deriveApplyTransform(t){const{hasZ:e,hasM:s}=t;return e&&s?v:e?u:s?G:l}}class R{_parseFeatureQuery(t){var n;const e=new T(t.options),s=g(t.buffer,e),r={...s,spatialReference:(n=s.spatialReference)==null?void 0:n.toJSON(),fields:s.fields?s.fields.map(o=>o.toJSON()):void 0,missingAttributes:e.missingAttributes};return Promise.resolve(r)}}function B(){return new R}export{B as default}; diff --git a/build/assets/PointCloudLayer-Dz6tFPWc.js b/build/assets/PointCloudLayer-Dz6tFPWc.js new file mode 100644 index 0000000..a02e1e0 --- /dev/null +++ b/build/assets/PointCloudLayer-Dz6tFPWc.js @@ -0,0 +1,11 @@ +import{B as r,D as i,E as y,F as V,ey as x,a$ as m,$ as u,cF as N,cs as _,ct as E,cu as L,cv as O,cG as A,cH as D,cg as w,dJ as K,aK as k,el as G,hh as C,s as l,aV as M,U,V as F,er as z,es as H,aS as J,cN as Z,cx as Q,d2 as W,ex as X,cE as Y}from"./index-DKOmzAMm.js";import{L as ee,C as T}from"./SceneService-7YqMMGL5.js";import{c as q,d as te,b as re,a as ie}from"./PointCloudUniqueValueRenderer-D8kmwCRw.js";import{$ as P,Z as oe,w as se}from"./elevationInfoUtils-CU9w6KS3.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./jsonContext-SE-5k22x.js";import"./resourceUtils-CwAv7wd8.js";import"./resourceUtils-Cz4P0EKM.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";let f=class extends V{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};r([i({type:String,json:{write:{enabled:!0,isRequired:!0}}})],f.prototype,"field",void 0),r([i({readOnly:!0,nonNullable:!0,json:{read:!1}})],f.prototype,"type",void 0),f=r([y("esri.layers.pointCloudFilters.PointCloudFilter")],f);const g=f;var b;let d=b=class extends g{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new b({field:this.field,requiredClearBits:u(this.requiredClearBits),requiredSetBits:u(this.requiredSetBits)})}};r([i({type:[x],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],d.prototype,"requiredClearBits",void 0),r([i({type:[x],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],d.prototype,"requiredSetBits",void 0),r([m({pointCloudBitfieldFilter:"bitfield"})],d.prototype,"type",void 0),d=b=r([y("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],d);const ne=d;var $;let h=$=class extends g{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new $({field:this.field,includedReturns:u(this.includedReturns)})}};r([i({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],h.prototype,"includedReturns",void 0),r([m({pointCloudReturnFilter:"return"})],h.prototype,"type",void 0),h=$=r([y("esri.layers.pointCloudFilters.PointCloudReturnFilter")],h);const ae=h;var I;let p=I=class extends g{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new I({field:this.field,mode:this.mode,values:u(this.values)})}};r([i({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],p.prototype,"mode",void 0),r([m({pointCloudValueFilter:"value"})],p.prototype,"type",void 0),r([i({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],p.prototype,"values",void 0),p=I=r([y("esri.layers.pointCloudFilters.PointCloudValueFilter")],p);const le=p,de={key:"type",base:g,typeMap:{value:le,bitfield:ne,return:ae}};var S;let v=S=class extends q{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new S({...this.cloneProperties(),field:u(this.field)})}};r([m({pointCloudRGBRenderer:"point-cloud-rgb"})],v.prototype,"type",void 0),r([i({type:String,json:{write:!0}})],v.prototype,"field",void 0),v=S=r([y("esri.renderers.PointCloudRGBRenderer")],v);const pe=v,R={key:"type",base:q,typeMap:{"point-cloud-class-breaks":te,"point-cloud-rgb":pe,"point-cloud-stretch":re,"point-cloud-unique-value":ie},errorContext:"renderer"},j=X();let o=class extends ee(N(_(E(L(O(A(D(Y)))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t!=null&&t.domain?t.domain:null}readServiceFields(e,t,n){return Array.isArray(e)?e.map(s=>{const a=new w;return s.type==="FieldTypeInteger"&&((s=u(s)).type="esriFieldTypeInteger"),a.read(s,n),a}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(s=>new w({name:s.name,type:s.name==="ELEVATION"?"double":"integer"})):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,n,s){K("layerDefinition.drawingInfo.renderer",e.write({},s),t)}load(e){const t=e!=null?e.signal:null,n=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(k).then(()=>this._fetchService(t));return this.addResolvingPromise(n),Promise.resolve(this)}createPopupTemplate(e){const t=G(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){var a;const t=this.fieldsIndex.get("RETURNS");if(!t)return;const n=(a=e.fieldInfos)==null?void 0:a.find(c=>c.fieldName===t.name);if(!n)return;const s=new C({name:"pcl-returns-decoded",title:t.alias||t.name,expression:` + var returnValue = $feature.${t.name}; + return (returnValue % 16) + " / " + Floor(returnValue / 16); + `});e.expressionInfos=[...e.expressionInfos||[],s],n.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){var a;const t=this.fieldsIndex.get("RGB");if(!t)return;const n=(a=e.fieldInfos)==null?void 0:a.find(c=>c.fieldName===t.name);if(!n)return;const s=new C({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:` + var rgb = $feature.${t.name}; + var red = Floor(rgb / 65536, 0); + var green = Floor((rgb - (red * 65536)) / 256,0); + var blue = rgb - (red * 65536) - (green * 256); + + return "rgb(" + red + "," + green + "," + blue + ")"; + `});e.expressionInfos=[...e.expressionInfos||[],s],n.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){var s;if(await this.load(t),!this.attributeStorageInfo)throw new l("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const n=this.fieldsIndex.get(e);if(!n)throw new l("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const a of this.attributeStorageInfo)if(a.name===n.name){const c=M(((s=this.parsedUrl)==null?void 0:s.path)??"",`./statistics/${a.key}`);return U(c,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(B=>B.data)}throw new l("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(T.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(T.SAVE,e)}validateLayer(e){if(e.layerType&&e.layerType!=="PointCloud")throw new l("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new l("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return this.attributeStorageInfo!=null&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;P(F.getLogger(this),oe("Point cloud layers","absolute-height",e)),P(F.getLogger(this),se("Point cloud layers",e))}};r([i({type:["PointCloudLayer"]})],o.prototype,"operationalLayerType",void 0),r([i(z)],o.prototype,"popupEnabled",void 0),r([i({type:H,json:{name:"popupInfo",write:!0}})],o.prototype,"popupTemplate",void 0),r([i({readOnly:!0,json:{read:!1}})],o.prototype,"defaultPopupTemplate",null),r([i({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],o.prototype,"opacity",void 0),r([i({type:["show","hide"]})],o.prototype,"listMode",void 0),r([i({types:[de],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],o.prototype,"filters",void 0),r([i({type:[w]})],o.prototype,"fields",void 0),r([i(j.fieldsIndex)],o.prototype,"fieldsIndex",void 0),r([J("service","fields",["fields","attributeStorageInfo"])],o.prototype,"readServiceFields",null),r([i(j.outFields)],o.prototype,"outFields",void 0),r([i({readOnly:!0})],o.prototype,"attributeStorageInfo",void 0),r([i(Z)],o.prototype,"elevationInfo",null),r([i({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],o.prototype,"path",void 0),r([i(Q)],o.prototype,"legendEnabled",void 0),r([i({types:R,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:R},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],o.prototype,"renderer",void 0),r([W("renderer")],o.prototype,"writeRenderer",null),r([i({json:{read:!1},readOnly:!0})],o.prototype,"type",void 0),o=r([y("esri.layers.PointCloudLayer")],o);const Ie=o;export{Ie as default}; diff --git a/build/assets/PointCloudUniqueValueRenderer-D8kmwCRw.js b/build/assets/PointCloudUniqueValueRenderer-D8kmwCRw.js new file mode 100644 index 0000000..6765960 --- /dev/null +++ b/build/assets/PointCloudUniqueValueRenderer-D8kmwCRw.js @@ -0,0 +1 @@ +import{B as e,D as t,E as r,F as f,a_ as I,a$ as m,hH as O,$ as o,gR as N,ey as P,hI as z,hJ as B}from"./index-DKOmzAMm.js";var w;let c=w=class extends f{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new w({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};e([t({type:String,json:{write:!0}})],c.prototype,"field",void 0),e([t({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"minValue",void 0),e([t({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"maxValue",void 0),c=w=e([r("esri.renderers.support.pointCloud.ColorModulation")],c);const K=c,v=new I({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let b=class extends f{};e([t({type:v.apiValues,readOnly:!0,nonNullable:!0,json:{type:v.jsonValues,read:!1,write:v.write}})],b.prototype,"type",void 0),b=e([r("esri.renderers.support.pointCloud.PointSizeAlgorithm")],b);const R=b;var g;let y=g=class extends R{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new g({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};e([m({pointCloudFixedSizeAlgorithm:"fixed-size"})],y.prototype,"type",void 0),e([t({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"size",void 0),e([t({type:Boolean,json:{write:!0}})],y.prototype,"useRealWorldSymbolSizes",void 0),y=g=e([r("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],y);const k=y;var V;let h=V=class extends R{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new V({scaleFactor:this.scaleFactor})}};e([m({pointCloudSplatAlgorithm:"splat"})],h.prototype,"type",void 0),e([t({type:Number,value:1,nonNullable:!0,json:{write:!0}})],h.prototype,"scaleFactor",void 0),h=V=e([r("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],h);const q=h,A={key:"type",base:R,typeMap:{"fixed-size":k,splat:q}},T=O()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let l=class extends f{constructor(D){super(D),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:o(this.pointSizeAlgorithm),colorModulation:o(this.colorModulation),pointsPerInch:o(this.pointsPerInch)}}};e([t({type:T.apiValues,readOnly:!0,nonNullable:!0,json:{type:T.jsonValues,read:!1,write:T.write}})],l.prototype,"type",void 0),e([t({types:A,json:{write:!0}})],l.prototype,"pointSizeAlgorithm",void 0),e([t({type:K,json:{write:!0}})],l.prototype,"colorModulation",void 0),e([t({json:{write:!0},nonNullable:!0,type:Number})],l.prototype,"pointsPerInch",void 0),l=e([r("esri.renderers.PointCloudRenderer")],l),function(s){s.fieldTransformTypeKebabDict=new I({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"})}(l||(l={}));const i=l;var j;let n=j=class extends f{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new j({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:o(this.color)})}};e([t({type:String,json:{write:!0}})],n.prototype,"description",void 0),e([t({type:String,json:{write:!0}})],n.prototype,"label",void 0),e([t({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],n.prototype,"minValue",void 0),e([t({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],n.prototype,"maxValue",void 0),e([t({type:N,json:{type:[P],write:!0}})],n.prototype,"color",void 0),n=j=e([r("esri.renderers.support.pointCloud.ColorClassBreakInfo")],n);const F=n;var C;let p=C=class extends i{constructor(s){super(s),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new C({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:o(this.colorClassBreakInfos),legendOptions:o(this.legendOptions)})}};e([m({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],p.prototype,"type",void 0),e([t({json:{write:!0},type:String})],p.prototype,"field",void 0),e([t({type:z,json:{write:!0}})],p.prototype,"legendOptions",void 0),e([t({type:i.fieldTransformTypeKebabDict.apiValues,json:{type:i.fieldTransformTypeKebabDict.jsonValues,read:i.fieldTransformTypeKebabDict.read,write:i.fieldTransformTypeKebabDict.write}})],p.prototype,"fieldTransformType",void 0),e([t({type:[F],json:{write:!0}})],p.prototype,"colorClassBreakInfos",void 0),p=C=e([r("esri.renderers.PointCloudClassBreaksRenderer")],p);const G=p;var S;let a=S=class extends i{constructor(s){super(s),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new S({...this.cloneProperties(),field:o(this.field),fieldTransformType:o(this.fieldTransformType),stops:o(this.stops),legendOptions:o(this.legendOptions)})}};e([m({pointCloudStretchRenderer:"point-cloud-stretch"})],a.prototype,"type",void 0),e([t({json:{write:!0},type:String})],a.prototype,"field",void 0),e([t({type:z,json:{write:!0}})],a.prototype,"legendOptions",void 0),e([t({type:i.fieldTransformTypeKebabDict.apiValues,json:{type:i.fieldTransformTypeKebabDict.jsonValues,read:i.fieldTransformTypeKebabDict.read,write:i.fieldTransformTypeKebabDict.write}})],a.prototype,"fieldTransformType",void 0),e([t({type:[B],json:{write:!0}})],a.prototype,"stops",void 0),a=S=e([r("esri.renderers.PointCloudStretchRenderer")],a);const H=a;var $;let u=$=class extends f{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new $({description:this.description,label:this.label,values:o(this.values),color:o(this.color)})}};e([t({type:String,json:{write:!0}})],u.prototype,"description",void 0),e([t({type:String,json:{write:!0}})],u.prototype,"label",void 0),e([t({type:[String],json:{write:!0}})],u.prototype,"values",void 0),e([t({type:N,json:{type:[P],write:!0}})],u.prototype,"color",void 0),u=$=e([r("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],u);const M=u;var x;let d=x=class extends i{constructor(s){super(s),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new x({...this.cloneProperties(),field:o(this.field),fieldTransformType:o(this.fieldTransformType),colorUniqueValueInfos:o(this.colorUniqueValueInfos),legendOptions:o(this.legendOptions)})}};e([m({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],d.prototype,"type",void 0),e([t({json:{write:!0},type:String})],d.prototype,"field",void 0),e([t({type:i.fieldTransformTypeKebabDict.apiValues,json:{type:i.fieldTransformTypeKebabDict.jsonValues,read:i.fieldTransformTypeKebabDict.read,write:i.fieldTransformTypeKebabDict.write}})],d.prototype,"fieldTransformType",void 0),e([t({type:[M],json:{write:!0}})],d.prototype,"colorUniqueValueInfos",void 0),e([t({type:z,json:{write:!0}})],d.prototype,"legendOptions",void 0),d=x=e([r("esri.renderers.PointCloudUniqueValueRenderer")],d);const J=d;export{J as a,H as b,i as c,G as d}; diff --git a/build/assets/PointCloudWorker-CH9o2MwU.js b/build/assets/PointCloudWorker-CH9o2MwU.js new file mode 100644 index 0000000..c2046c1 --- /dev/null +++ b/build/assets/PointCloudWorker-CH9o2MwU.js @@ -0,0 +1 @@ +import{fC as k,O as x,ay as O,bk as R,fD as T}from"./index-DKOmzAMm.js";import{O as _}from"./quat-BYKy26Om.js";import{e as V}from"./quatf64-Bdb9ZJJK.js";import{a as B,b as J,d as q}from"./PointCloudUniqueValueRenderer-D8kmwCRw.js";import{w as z,l as E,c as Z,I as X}from"./I3SBinaryReader-BNZLVsC-.js";import{I as Y}from"./orientedBoundingBox-RPlI7sU4.js";import"./mat3f64-q3fE-ZOt.js";import"./VertexAttribute-BlT9lbVY.js";import"./mat3-BNGRf_pC.js";import"./mat4f64-CSKppSlJ.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./plane-aHrUkISy.js";import"./vec2f64-DA6GkJuH.js";function g(){return new Float32Array(3)}function A(a){const t=new Float32Array(3);return t[0]=a[0],t[1]=a[1],t[2]=a[2],t}function d(a,t,l){const n=new Float32Array(3);return n[0]=a,n[1]=t,n[2]=l,n}function j(a,t){return new Float32Array(a,t,3)}function M(){return g()}function D(){return d(1,1,1)}function F(){return d(1,0,0)}function C(){return d(0,1,0)}function N(){return d(0,0,1)}const P=M(),G=D(),L=F(),H=C(),K=N();Object.freeze(Object.defineProperty({__proto__:null,ONES:G,UNIT_X:L,UNIT_Y:H,UNIT_Z:K,ZEROS:P,clone:A,create:g,createView:j,fromValues:d,ones:D,unitX:F,unitY:C,unitZ:N,zeros:M},Symbol.toStringTag,{value:"Module"}));function Q(a,t,l,n){const{rendererJSON:s,isRGBRenderer:p}=a;let r=null,u=null;if(t&&p)r=t;else if(t&&(s==null?void 0:s.type)==="pointCloudUniqueValueRenderer"){u=B.fromJSON(s);const e=u.colorUniqueValueInfos;r=new Uint8Array(3*n);const c=I(u.fieldTransformType);for(let o=0;o=e[f].value)r[3*o]=e[f].color.r,r[3*o+1]=e[f].color.g,r[3*o+2]=e[f].color.b;else for(let b=1;b=e[f].minValue&&i<=e[f].maxValue){r[3*o]=e[f].color.r,r[3*o+1]=e[f].color.g,r[3*o+2]=e[f].color.b;break}}}else r=new Uint8Array(3*n).fill(255);if(l&&(u!=null&&u.colorModulation)){const e=u.colorModulation.minValue,c=u.colorModulation.maxValue,o=.3;for(let i=0;i=c?1:f<=e?o:o+(1-o)*(f-e)/(c-e);r[3*i]=b*r[3*i],r[3*i+1]=b*r[3*i+1],r[3*i+2]=b*r[3*i+2]}}return r}function W(a,t){if(a.encoding==null||a.encoding===""){const l=z(t,a);if(l.vertexAttributes.position==null)return;const n=E(t,l.vertexAttributes.position),s=l.header.fields,p=[s.offsetX,s.offsetY,s.offsetZ],r=[s.scaleX,s.scaleY,s.scaleZ],u=n.length/3,e=new Float64Array(3*u);for(let c=0;c>>4&15,m=b>1,U=f===1,v=f===b;let w=!1;for(const h of o.includedReturns)if(h==="last"&&v||h==="firstOfMany"&&U&&m||h==="lastOfMany"&&v&&m||h==="single"&&!m){w=!0;break}w||(e=!1);break}}}e&&(l[r]=u,a[3*r]=a[3*u],a[3*r+1]=a[3*u+1],a[3*r+2]=a[3*u+2],t[3*r]=t[3*u],t[3*r+1]=t[3*u+1],t[3*r+2]=t[3*u+2],r++)}return r}function I(a){switch(a){default:case null:case"none":return t=>t;case"low-four-bit":return t=>15&t;case"high-four-bit":return t=>(240&t)>>4;case"absolute-value":return t=>Math.abs(t);case"modulo-ten":return t=>t%10}}function S(a){let t=0;for(const l of a||[])t|=1<0&&t.filterAttributesData!=null){const o=t.filterAttributesData.filter(x).map(i=>{const f=y(i,l,n),b={attributeInfo:i.attributeInfo,values:f};return p.push(b),b});s=new Uint32Array(n),n=et(l,e,s,t.filterInfo,o)}for(const o of t.userAttributesData){const i=y(o,l,n);p.push({attributeInfo:o.attributeInfo,values:i})}3*n=0;l--)e[l].isNoopProcess&&e.splice(l,1);let r=!1;for(let l=0;l1}const a=e.some(({name:l})=>jn.has(l.toLowerCase())),{rawSourceRasterInfos:i}=this;return{functions:e,hasBranches:r,hasFocalFunction:a,isSourceSingleBand:((u=i==null?void 0:i[0])==null?void 0:u.bandCount)===1}}bind(t,e=!1,n=-1){this.id=n+1;const o=this._getRasterValues();let r=!0;for(let a=0;athis._readRasterValue(o,t));return this._processPixels({...t,pixelBlocks:n})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let e;if(t.length>1){const r=t.map(i=>i.processInputBandIds()[0]);this.rawInputBandIds=r,this.isInputBandIdsSwizzled=this.rawInputBandIds.some((i,u)=>i!==u);const a=t.filter(i=>i.functionName==="ExtractBand");return a.length&&a.forEach((i,u)=>{i.isInputBandIdsSwizzled=!0,i.swizzledBandSelection=[u,u,u]}),this.rawInputBandIds}const n=t[0];if(n){if(e=n.processInputBandIds(),n.isInputBandIdsSwizzled)return this.rawInputBandIds=e,e}else{e=[];const{bandCount:r}=this.sourceRasterInfos[0];for(let a=0;ar!==a),this.rawInputBandIds=o,this.rawInputBandIds}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:n}=this.functionArguments;return n&&Array.isArray(n)&&n.length?(t.rasters=n.map(o=>this._isRasterFunctionValue(o)?o.getWebGLProcessorDefinition():typeof o=="number"?{name:"Constant",parameters:{value:o},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:o},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(o=>o!=null)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){const t=[];this.functionName==="Clip"&&t.push(this.functionArguments);const{raster:e,rasters:n}=this.functionArguments;if(n&&Array.isArray(n)&&n.length)n.forEach(o=>{if(this._isRasterFunctionValue(o)){const r=o.getClippingGeometries();t.push(...r)}});else if(this._isRasterFunctionValue(e)){const o=e.getClippingGeometries();t.push(...o)}return t}_getOutputPixelType(t){return this.outputPixelType==="unknown"?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null}_getRasterValues(){const{rasterArgumentNames:t}=this;return t[0]==="rasters"?this.functionArguments.rasters??[]:t.flatMap(e=>this.functionArguments[e])}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:n,rasterIds:o}=t;if(e.length===0)return n;const r=e.map(i=>i&&typeof i=="object"&&"bind"in i&&i.rasterInfo?i.rasterInfo:typeof i=="string"&&o.includes(i)?n[o.indexOf(i)]:typeof i!="number"?n[0]:void 0),a=r.find(i=>i)??n[0];return r.forEach((i,u)=>{i===void 0&&(r[u]=a)}),r}_getPrimaryRasterId(t){return t==null?void 0:t.rasterId}_getPrimaryRasters(t,e=[],n=[]){for(let o=0;oe?o.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),n.BAND_COUNT&&Number(n.BAND_COUNT)!==e&&(t.keyProperties={...n,BAND_COUNT:typeof n.BAND_COUNT=="string"?String(e):e})}};p([h({json:{write:!0}})],G.prototype,"functionName",void 0),p([h({json:{write:!0}})],G.prototype,"functionArguments",void 0),p([h()],G.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}}),Es(s=>s==null?void 0:s.toLowerCase())],G.prototype,"outputPixelType",void 0),p([h({json:{write:!0}})],G.prototype,"mainPrimaryRasterId",void 0),p([h()],G.prototype,"sourceRasters",void 0),p([h({type:[xn],json:{write:!0}})],G.prototype,"sourceRasterInfos",void 0),p([h({json:{write:!0}})],G.prototype,"rasterInfo",void 0),p([h({json:{write:!0}})],G.prototype,"readingBufferSize",void 0),p([h({json:{write:!0}})],G.prototype,"id",void 0),p([h()],G.prototype,"isNoopProcess",void 0),p([h()],G.prototype,"supportsGPU",null),p([h()],G.prototype,"rawInputBandIds",void 0),p([h()],G.prototype,"rawSourceRasterInfos",void 0),p([h()],G.prototype,"isInputBandIdsSwizzled",void 0),p([h()],G.prototype,"swizzledBandSelection",void 0),p([h()],G.prototype,"isBranch",void 0),p([h({readOnly:!0})],G.prototype,"flatWebGLFunctionChain",null),p([h()],G.prototype,"_bindingResult",void 0),G=p([R("esri.layers.support.rasterFunctions.BaseRasterFunction")],G);const E=G,C={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},Gn={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65},W={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},K={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},On={majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75},Ws={setNull:50,conditional:78},ls={...Gn,...W,...K,...On,...Ws},qs=new Map([[K.acos,{domain:[0,Math.PI],isInteger:!1}],[K.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[K.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[K.cos,{domain:[-1,1],isInteger:!1}],[K.sin,{domain:[-1,1],isInteger:!1}],[W.booleanAnd,{domain:[0,1],isInteger:!0}],[W.booleanNot,{domain:[0,1],isInteger:!0}],[W.booleanOr,{domain:[0,1],isInteger:!0}],[W.booleanXOr,{domain:[0,1],isInteger:!0}],[W.equalTo,{domain:[0,1],isInteger:!0}],[W.notEqual,{domain:[0,1],isInteger:!0}],[W.greaterThan,{domain:[0,1],isInteger:!0}],[W.greaterThanEqual,{domain:[0,1],isInteger:!0}],[W.lessThan,{domain:[0,1],isInteger:!0}],[W.lessThanEqual,{domain:[0,1],isInteger:!0}],[W.isNull,{domain:[0,1],isInteger:!0}]]);function cs(s){return qs.get(s)}const ps=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function En(s,t=!1){const e=s.map(i=>i.mask),n=e.filter(i=>i!=null),o=s[0].pixels[0].length;if(n.length===0||t&&n.length!==e.length)return new Uint8Array(o).fill(255);const r=n[0],a=new Uint8Array(r);if(n.length===1)return a;if(!t){for(let i=1;i=1?t[u]=0:a[u]=Math.atanh(l)}return a}const i=n===K.asin?Math.asin:Math.acos;for(let u=0;u1?t[u]=0:a[u]=i(l)}return a}function Yn(s,t,e,n){const[o]=s,r=o.length,a=$.createEmptyBand(e,r);for(let i=0;i>o[i]);return a}function sr(s,t,e){const[n,o]=s,r=n.length,a=$.createEmptyBand(e,r);for(let i=0;io[i]?1:0);return a}function dr(s,t,e){const[n,o]=s,r=n.length,a=$.createEmptyBand(e,r);for(let i=0;i=o[i]?1:0);return a}function gr(s,t,e){const[n,o]=s,r=n.length,a=$.createEmptyBand(e,r);for(let i=0;ic&&(u=c)}a[i]=u}return a}function ds(s,t,e){const n=s.length;if(n<2)return s[0];const[o]=s,r=o.length,a=$.createEmptyBand(e,r);for(let i=0;if&&(u=f)}a[i]=l-u}return a}function gs(s,t,e){const n=s.length;if(n<2)return s[0];const[o]=s,r=o.length,a=$.createEmptyBand(e,r);for(let i=0;ic&&(c=l,u=f);r[i]=u}return r}function vs(s,t,e){const n=s.length;if(n<=2)return Xs(s,t,e);const o=s[0].length,r=$.createEmptyBand(e,o),a=new Map;for(let i=0;ir?t[i]=0:n[i]=a?Math.round(u):u}}function Ys(s,t,e={}){Pr();let n=En(s,t>=66&&t<=75);const{outputPixelType:o="f32"}=e,r=!B.has(t)||e.processAsMultiband,a=r?s[0].pixels.length:1,i=[];for(let l=0;lg.pixels):s.map(g=>g.pixels[l]);let f,m=!0;if(t===Ws.setNull){const g=Ar(c,n,o);f=g.band,n=g.mask,m=!1}else k.has(t)?f=k.get(t)(c,n,"f64"):D.has(t)?f=t===K.asin||t===K.acos||t===K.atanh?Xn(c,n,"f64",t):Yn(c,n,"f64",D.get(t)):ue.has(t)?f=Jn(c,n,"f64",ue.get(t)):B.has(t)?f=B.get(t)(c,n,"f64"):(f=c[0],m=!1);if(m&&t!==W.isNull&&!qs.has(t)){const g=$.createEmptyBand(o,f.length);n||(n=new Uint8Array(f.length).fill(255)),Tr(f,n,o,g),f=g}i.push(f)}const u=s[0];return new $({width:u.width,height:u.height,pixelType:o,mask:t===W.isNull?null:n,pixels:i})}function $r(s,t,e){return Ys(s,t=[null,1,2,3,23,5,44][t]??1,{outputPixelType:e})}let jt=class extends E{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};const e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return(e==null?void 0:e[0])==null||(e==null?void 0:e[1])==null?null:$r(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],n=this.outputPixelType??"f32";let[o,r]=ht(n);const a=J(n);return a&&(o-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[o,r],isOutputRounded:a}}};p([h({json:{write:!0,name:"rasterFunction"}})],jt.prototype,"functionName",void 0),p([h({type:Bn,json:{write:!0,name:"rasterFunctionArguments"}})],jt.prototype,"functionArguments",void 0),p([h()],jt.prototype,"rasterArgumentNames",void 0),jt=p([R("esri.layers.support.rasterFunctions.ArithmeticFunction")],jt);const Nr=jt;var Ae;let Pe=Ae=class extends O{clone(){return new Ae({raster:this.raster})}};Pe=Ae=p([R("esri.layers.support.rasterFunctions.AspectFunctionArguments")],Pe);const Rr=Pe;let dt=class extends E{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){var n;const t=this.sourceRasterInfos[0];this.isGCS=((n=t.spatialReference)==null?void 0:n.isGeographic)??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.histograms=null,e.colormap=null,e.attributeTable=null,e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){var i;const e=(i=t.pixelBlocks)==null?void 0:i[0];if(e==null)return null;const{extent:n,primaryPixelSizes:o}=t,r=o==null?void 0:o[0],a=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1});return wn(e,{resolution:a})}};p([h({json:{write:!0,name:"rasterFunction"}})],dt.prototype,"functionName",void 0),p([h({type:Rr,json:{write:!0,name:"rasterFunctionArguments"}})],dt.prototype,"functionArguments",void 0),p([h()],dt.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],dt.prototype,"isGCS",void 0),dt=p([R("esri.layers.support.rasterFunctions.AspectFunction")],dt);const Fr=dt,kr=new Set(["+","-","*","/","(",")"]);function Cr(s,t){(s=s.replaceAll(" ","")).startsWith("-")&&(s="0"+s),s.startsWith("+")&&(s=s.slice(1,s.length));const e=s.split(""),n=[],o=[];let r="";for(let a=0;a-1)e>0&&(o+=t+1);else{for(let a=0;a0&&(o+=t+1)}let r=0;for(let a=0;a0;){const{numIndex:a,opIndex:i}=Mr(o);if(n=Ir(s,o[i],r[a],r[a+1]),o.length===1)break;o=_r(o,i),r.splice(a,2,n)}return[n]}const Br=new ft({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function jr(s,t){if(!bn(s))return s;const{equation:e,method:n}=t,o=t.bandIndexes.map(c=>c-1),{pixels:r,mask:a}=s;let i;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":i=Ts(a,r[o[0]],r[o[1]]);break;case"ndwi":i=Ts(a,r[o[1]],r[o[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":i=Or(a,r[o[0]],r[o[1]]);break;case"ci-g":case"ci-re":i=Er(a,r[o[0]],r[o[1]]);break;case"savi":i=Dr(a,r[o[0]],r[o[1]],o[2]+1);break;case"tsavi":i=zr(a,r[o[0]],r[o[1]],o[2]+1,o[3]+1,o[4]+1);break;case"msavi":i=Lr(a,r[o[0]],r[o[1]]);break;case"gemi":i=Vr(a,r[o[0]],r[o[1]]);break;case"pvi":i=Ur(a,r[o[0]],r[o[1]],o[2]+1,o[3]+1);break;case"gvitm":i=Wr(a,[r[o[0]],r[o[1]],r[o[2]],r[o[3]],r[o[4]],r[o[5]]]);break;case"sultan":i=qr(a,[r[o[0]],r[o[1]],r[o[2]],r[o[3]],r[o[4]]]);break;case"vari":i=Hr(a,[r[o[0]],r[o[1]],r[o[2]]]);break;case"mtvi2":i=Xr(a,[r[o[0]],r[o[1]],r[o[2]]]);break;case"rtvi-core":i=Yr(a,[r[o[0]],r[o[1]],r[o[2]]]);break;case"evi":i=Jr(a,[r[o[0]],r[o[1]],r[o[2]]]);break;case"wndwi":i=Kr(a,[r[o[0]],r[o[1]],r[o[2]]],o[3]?o[3]+1:.5);break;case"bai":i=Zr(a,r[o[0]],r[o[1]]);break;case"custom":i=Sr(a,r,e);break;default:return s}const u=a!=null?new Uint8Array(a.length):null;a!=null&&u!=null&&u.set(a);const l=new $({width:s.width,height:s.height,pixelType:"f32",pixels:i,mask:u});return l.updateStatistics(),l}function Gr(s,t,e,n){const{mask:o,pixels:r,width:a,height:i}=s,u=r[e],l=r[t],c=l.length,f=n?new Uint8Array(c):new Float32Array(c),m=n?100:1,g=n?100.5:0;for(let x=0;xparseFloat(i));return jr(e,{method:n,bandIndexes:r,equation:o})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map(i=>parseFloat(i)-1);t.length===2&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let n,o;const r=new Float32Array(3),{method:a}=this.functionArguments;switch(a){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":n=L([e[0],e[1],0]),o="ndxi";break;case"ndwi":n=L([e[1],e[0],0]),o="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=L([e[0],e[1],0]),o="sr";break;case"ci-g":case"ci-re":n=L([e[0],e[1],0]),o="ci";break;case"savi":n=L([e[0],e[1],0]),o="savi",r[0]=t[2]+1;break;case"tsavi":n=L([e[0],e[1],0]),o="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":n=L([e[0],e[1],0]),o="msavi";break;case"gemi":n=L([e[0],e[1],0]),o="gemi";break;case"pvi":n=L([e[0],e[1],0]),o="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=L([e[0],e[1],e[2]]),o="vari";break;case"mtvi2":n=L([e[0],e[1],e[2]]),o="mtvi";break;case"rtvi-core":n=L([e[0],e[1],e[2]]),o="rtvicore";break;case"evi":n=L([e[0],e[1],e[2]]),o="evi";break;case"wndwi":n=L([e[0],e[1],0]),o="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=L([e[1],e[0],0]),o="bai";break;default:n=L([0,1,2]),o="custom"}return{bandIndexMat3:n,indexType:o,adjustments:r}}_getInputBandIds(t){if(this.functionArguments.method==="custom")return t;const e=this.functionArguments.bandIndexes.split(" ").map(i=>parseFloat(i)-1),n=t.length,o=e.map(i=>i>=n?n-1:i),r=to.has(this.functionArguments.method)?3:2,a=o.slice(0,r).map(i=>t[i]);return a.length===2&&a.push(0),a}};p([h({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),p([h({type:Qr,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),p([h()],Gt.prototype,"rasterArgumentNames",void 0),Gt=p([R("esri.layers.support.rasterFunctions.BandArithmeticFunction")],Gt);const eo=Gt;var $e;const $s=new ft({1:"outside",2:"inside"},{useNumericKeys:!0});let Zt=$e=class extends O{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new $e({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};p([h({types:un,json:{read:ln,write:!0}})],Zt.prototype,"clippingGeometry",void 0),p([h({json:{read:$s.read,write:$s.write}})],Zt.prototype,"clippingType",void 0),Zt=$e=p([R("esri.layers.support.rasterFunctions.ClipFunctionArguments")],Zt);const so=Zt;let gt=class extends E{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(t){var e;return(e=t.pixelBlocks)==null?void 0:e[0]}_getWebGLParameters(){const{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};p([h({json:{write:!0,name:"rasterFunction"}})],gt.prototype,"functionName",void 0),p([h({type:so,json:{write:!0,name:"rasterFunctionArguments"}})],gt.prototype,"functionArguments",void 0),p([h()],gt.prototype,"rasterArgumentNames",void 0),p([h()],gt.prototype,"isNoopProcess",void 0),gt=p([R("esri.layers.support.rasterFunctions.ClipFunction")],gt);const no=gt;var Ne;let Z=Ne=class extends O{castColormapName(s){if(!s)return null;const t=s.toLowerCase();return vn.includes(t)?t:null}readColorRamp(s){return Ds(s)}readColorRampName(s,t){if(!s)return null;const e=ne.jsonValues.find(n=>n.toLowerCase()===s.toLowerCase());return e?ne.fromJSON(e):null}clone(){var s;return new Ne({colormap:X(this.colormap),colormapName:this.colormapName,colorRamp:(s=this.colorRamp)==null?void 0:s.clone(),colorRampName:this.colorRampName})}};p([h({type:[[Number]],json:{write:!0}})],Z.prototype,"colormap",void 0),p([h({type:String,json:{write:!0}})],Z.prototype,"colormapName",void 0),p([Es("colormapName")],Z.prototype,"castColormapName",null),p([h({types:cn,json:{write:!0}})],Z.prototype,"colorRamp",void 0),p([qt("colorRamp")],Z.prototype,"readColorRamp",null),p([h({type:ne.apiValues,json:{type:ne.jsonValues,write:ne.write}})],Z.prototype,"colorRampName",void 0),p([qt("colorRampName")],Z.prototype,"readColorRampName",null),Z=Ne=p([R("esri.layers.support.rasterFunctions.ColormapFunctionArguments")],Z);const ro=Z,oo=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],io=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function es(s,t){const e=[],n=[];for(let r=0;r[n,...e]),t):null}let st=class extends E{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:n,colorRamp:o,colorRampName:r}=this.functionArguments;if(!(e!=null&&e.length))if(o)this.colorRamp=o,e=us(o,{interpolateAlpha:!0});else if(r){const u=An(r);u&&(e=us(u),this.colorRamp=Ds(u))}else n&&(e=fo(n));if(!(e!=null&&e.length))return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};const a=this._getOutputPixelType(t.pixelType);this.outputPixelType=a.startsWith("f")?"s32":a;const i=t.clone();return i.pixelType=this.outputPixelType,i.colormap=e,i.bandCount=1,this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){var n;let e=(n=t.pixelBlocks)==null?void 0:n[0];return!e||J(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};p([h({json:{write:!0,name:"rasterFunction"}})],st.prototype,"functionName",void 0),p([h({type:ro,json:{write:!0,name:"rasterFunctionArguments"}})],st.prototype,"functionArguments",void 0),p([h()],st.prototype,"rasterArgumentNames",void 0),p([h()],st.prototype,"isNoopProcess",void 0),p([h({json:{write:!0}})],st.prototype,"indexedColormap",void 0),p([h()],st.prototype,"colorRamp",void 0),st=p([R("esri.layers.support.rasterFunctions.ColormapFunction")],st);const ho=st;var Re;let Qt=Re=class extends O{constructor(){super(...arguments),this.rasters=[]}writeRasters(s,t){t.rasters=s.map(e=>typeof e=="number"||typeof e=="string"?e:e.toJSON())}clone(){return new Re({rasters:X(this.rasters)})}};p([h({json:{write:!0}})],Qt.prototype,"rasters",void 0),p([Ht("rasters")],Qt.prototype,"writeRasters",null),Qt=Re=p([R("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")],Qt);const mo=Qt;let Ot=class extends E{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();if(n.attributeTable=null,n.colormap=null,n.pixelType=this.outputPixelType,n.bandCount=t.map(({bandCount:r})=>r).reduce((r,a)=>r+a),t.every(({statistics:r})=>r!=null&&r.length)){const r=[];t.forEach(({statistics:a})=>a!=null&&r.push(...a)),n.statistics=r}if(t.every(({histograms:r})=>r!=null&&r.length)){const r=[];t.forEach(({histograms:a})=>a!=null&&r.push(...a)),n.histograms=r}n.bandCount>1&&(n.colormap=null,n.attributeTable=null);const o=t.every(r=>{var a;return(a=r.keyProperties.BandProperties)==null?void 0:a.length})?t.flatMap(r=>r.keyProperties.BandProperties):void 0;return n.keyProperties={...n.keyProperties,BandProperties:o},this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return e?(e==null?void 0:e[0])==null?null:Pn(e):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};p([h({json:{write:!0,name:"rasterFunction"}})],Ot.prototype,"functionName",void 0),p([h({type:mo,json:{write:!0,name:"rasterFunctionArguments"}})],Ot.prototype,"functionArguments",void 0),p([h()],Ot.prototype,"rasterArgumentNames",void 0),Ot=p([R("esri.layers.support.rasterFunctions.CompositeBandFunction")],Ot);const go=Ot,yo=new ft({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),xo=new ft({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});function wo(s,t,e,n){const[o,r]=s,a=J(e)&&!J(o.pixelType)&&!J(r.pixelType),i=[o.mask,r.mask].filter(y=>y),u=$.combineBandMasks(i),l=s.map(y=>y.pixels[0]),{width:c,height:f}=o,m=$.createEmptyBand(e,c*f);switch(t){case"difference":case"relative-difference":bo({bands:l,mask:u,outBand:m,isRoundingNeeded:a,isRelative:t==="relative-difference"});break;case"categorical":vo({bands:l,mask:u,outBand:m,...n});break;case"euclidean-distance":Ao({pixels:s.map(y=>y.pixels),mask:u,outBand:m});break;case"angle-difference":Po({pixels:s.map(y=>y.pixels),mask:u,outBand:m});break;case"band-with-most-change":To({pixels:s.map(y=>y.pixels),mask:u,outBand:m})}const g=new $({width:c,height:f,pixels:[m],pixelType:e,mask:u});return g.updateStatistics(),g}function bo(s){const{bands:[t,e],mask:n,isRelative:o,isRoundingNeeded:r,outBand:a}=s,i=t.length;for(let u=0;u0?l/c:0}a[u]=r?Math.round(l):l}}function vo(s){const{bands:[t,e],categoryIndexLookups:[n,o],classNames:[r,a],mask:i,keepMethod:u,outBand:l}=s,c=t.length,f=r.length,m=a.length,g=f*m,y=g+1,x=g+2;for(let d=0;du&&(u=f,l=c)}o[i]=l}}var Fe;let yt=Fe=class extends O{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new Fe({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};p([et(yo)],yt.prototype,"method",void 0),p([et(xo)],yt.prototype,"keepMethod",void 0),p([h({json:{write:!0}})],yt.prototype,"raster2",void 0),p([h({readOnly:!0})],yt.prototype,"rasters",null),yt=Fe=p([R("esri.layers.support.rasterFunctions.ComputeChangeFunctionArguments")],yt);const $o=yt;let xt=class extends E{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),t==="categorical"){const n=this.sourceRasterInfos.map(a=>a.attributeTable),o=this._getFieldNames(n,"value"),r=n.map(a=>this._getClassFieldName(a));if(o[0]==null||o[1]==null||r[0]==null||r[1]==null)return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,o,r)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:t==="difference"||t==="relative-difference"}}_processPixels(t){const{pixelBlocks:e}=t;if((e==null?void 0:e[0])==null||(e==null?void 0:e[1])==null)return null;const{method:n}=this.functionArguments;return wo(e,n,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){const t=this.outputPixelType??"f32";let[e,n]=ht(t);const o=J(t);return o&&(e-=1e-4,n+=1e-4),{method:this.functionArguments.method,domainRange:[e,n],isOutputRounded:o}}_updateAttributeTable(t,e,n){const o=this.sourceRasterInfos.map(b=>b.attributeTable),r=o.map((b,P)=>b.features.map(T=>T.attributes[e[P]])),a=o.map((b,P)=>b.features.map(T=>T.attributes[n[P]])),i=r.map(b=>{const P=[];return b.forEach((T,N)=>P[T]=N),P}),{keepMethod:u}=this.functionArguments;this._categoryConfig={categoryIndexLookups:i,classNames:a,keepMethod:u};const l=o[0].clone();l.fields=[new at({name:"OID",type:"oid"}),new at({name:"Value",type:"integer"}),new at({name:"ClassName",type:"string"}),new at({name:"Class_From",type:"string"}),new at({name:"Class_To",type:"string"})];const c=this._getFieldNames(o,"red"),f=this._getFieldNames(o,"green"),m=this._getFieldNames(o,"blue"),g=[],y=c.length===2&&f.length===2&&m.length===2;y&&(g.push(...o.map((b,P)=>b.features.map(T=>[T.attributes[c[P]],T.attributes[f[P]],T.attributes[m[P]]]))),l.fields.push(new at({name:"Red",type:"integer"}),new at({name:"Green",type:"integer"}),new at({name:"Blue",type:"integer"})));const x=l.features[0].clone();x.geometry=null;const d=[],[A,w]=r.map(b=>b.length);let v=1;for(let b=0;b ${N}`,Class_From:P,Class_To:N},y&&(F.attributes.Red=g[0][b][0]+g[1][T][0]>>1,F.attributes.Green=g[0][b][1]+g[1][T][1]>>1,F.attributes.Blue=g[0][b][2]+g[1][T][2]>>1),d.push(F)}}if(u==="changed"){const b=x.clone();b.attributes={OID:v++,Value:A*w+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},d.push(b)}else if(u==="unchanged"){const b=x.clone();b.attributes={OID:v++,Value:A*w+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},d.push(b)}l.features=d,t.attributeTable=l}_getFieldNames(t,e){return t.map(({fields:n})=>{var o;return(o=n.find(r=>r.name.toLowerCase()===e))==null?void 0:o.name}).filter(n=>n)}_getClassFieldName(t){const e=t.fields.find(n=>n.type==="string"&&n.name.toLowerCase().startsWith("class"))??t.fields.find(n=>n.type==="string"&&n.name.toLowerCase().includes("class")||n.name.toLowerCase().includes("type")||n.name.toLowerCase().includes("name"))??t.fields.find(n=>n.type==="string");return e==null?void 0:e.name}};p([h({json:{write:!0,name:"rasterFunction"}})],xt.prototype,"functionName",void 0),p([h({type:$o,json:{write:!0,name:"rasterFunctionArguments"}})],xt.prototype,"functionArguments",void 0),p([h()],xt.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],xt.prototype,"_categoryConfig",void 0),xt=p([R("esri.layers.support.rasterFunctions.ComputeChangeFunction")],xt);const No=xt;var ke;let te=ke=class extends O{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};p([h({json:{write:!0}})],te.prototype,"contrastOffset",void 0),p([h({json:{write:!0}})],te.prototype,"brightnessOffset",void 0),te=ke=p([R("esri.layers.support.rasterFunctions.ContrastBrightnessFunctionArguments")],te);const Ro=te;let wt=class extends E{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if(e.pixelType!=="u8")return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const n=e.clone();this._removeStatsHistColormapVAT(n),this.rasterInfo=n;const{contrastOffset:o,brightnessOffset:r}=this.functionArguments;return this.lookup=Tn(o,r),{success:!0,supportsGPU:!0}}_processPixels(t){var n;const e=(n=t.pixelBlocks)==null?void 0:n[0];return e==null?null:Ze(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};p([h({json:{write:!0,name:"rasterFunction"}})],wt.prototype,"functionName",void 0),p([h({type:Ro,json:{write:!0,name:"rasterFunctionArguments"}})],wt.prototype,"functionArguments",void 0),p([h()],wt.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],wt.prototype,"lookup",void 0),wt=p([R("esri.layers.support.rasterFunctions.ContrastBrightnessFunction")],wt);const Fo=wt;function ss(s,t,e,n,o){const r=Math.floor(n/2);for(let i=0;io+r);return e===-1||n===0||n===1?t:t.map(o=>o/n)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:o}=this.functionArguments;if(!Object.values(C).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==C.none&&e*n!==o.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const a=r.clone();a.pixelType=this.outputPixelType;const i=[C.none,C.sharpen,C.sharpen2,C.sharpening3x3,C.sharpening5x5];return(t===-1||this.outputPixelType!=="u8"&&!i.includes(t))&&(a.statistics=null,a.histograms=null),a.colormap=null,a.attributeTable=null,this.rasterInfo=a,{success:!0,supportsGPU:o.length<=Rs}}_processPixels(t){var a;const e=(a=t.pixelBlocks)==null?void 0:a[0];if(e==null||this.functionArguments.convolutionType===C.none)return e;const{rows:n,cols:o}=this.functionArguments,{_normalizedKernel:r}=this;return Mo(e,{kernel:r,rows:n,cols:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(Rs);return t.set(this._normalizedKernel),{kernelRows:this.functionArguments.rows,kernelCols:this.functionArguments.cols,kernel:t,clampRange:ht(this.outputPixelType)}}};p([h({json:{write:!0,name:"rasterFunction"}})],vt.prototype,"functionName",void 0),p([h({type:So,json:{write:!0,name:"rasterFunctionArguments"}})],vt.prototype,"functionArguments",void 0),p([h()],vt.prototype,"rasterArgumentNames",void 0),p([h()],vt.prototype,"_normalizedKernel",null),vt=p([R("esri.layers.support.rasterFunctions.ConvolutionFunction")],vt);const Bo=vt;var Ie;const Js=new ft({0:"standard",1:"platform",2:"profile"},{useNumericKeys:!0});let Et=Ie=class extends O{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(s,t){return Js.fromJSON(t.type??t.curvatureType??0)}clone(){return new Ie({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};p([h({json:{write:{target:"type"}}}),et(Js)],Et.prototype,"curvatureType",void 0),p([qt("curvatureType",["type","curvatureType"])],Et.prototype,"readCurvatureType",null),p([h({type:Number,json:{write:!0}})],Et.prototype,"zFactor",void 0),Et=Ie=p([R("esri.layers.support.rasterFunctions.CurvatureFunctionArguments")],Et);const jo=Et;let At=class extends E{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){var e;this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=((e=t.spatialReference)==null?void 0:e.isGeographic)??!1,{success:!0,supportsGPU:!0}}_processPixels(t){var c;const e=(c=t.pixelBlocks)==null?void 0:c[0];if(e==null)return null;const{zFactor:n,curvatureType:o}=this.functionArguments,{extent:r,primaryPixelSizes:a}=t,i=a==null?void 0:a[0],u=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),l=this.isGCS&&n>=1?n*be:n;return $n(e,{zFactor:l,curvatureType:o,resolution:u})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*be:t}}};p([h({json:{write:!0,name:"rasterFunction"}})],At.prototype,"functionName",void 0),p([h({type:jo,json:{write:!0,name:"rasterFunctionArguments"}})],At.prototype,"functionArguments",void 0),p([h()],At.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],At.prototype,"isGCS",void 0),At=p([R("esri.layers.support.rasterFunctions.CurvatureFunction")],At);const Go=At;var _e;let nt=_e=class extends O{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=Vs.bestMatch}clone(){var s,t,e;return new _e({bandIds:(s=this.bandIds)==null?void 0:s.slice(),bandNames:(t=this.bandNames)==null?void 0:t.slice(),bandWavelengths:(e=this.bandWavelengths)==null?void 0:e.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};p([h({json:{write:!0}})],nt.prototype,"bandIds",void 0),p([h({json:{write:!0}})],nt.prototype,"bandNames",void 0),p([h({json:{write:!0}})],nt.prototype,"bandWavelengths",void 0),p([et({0:"name",1:"wavelength",2:"id"})],nt.prototype,"method",void 0),p([h({json:{write:!0}})],nt.prototype,"missingBandAction",void 0),p([h({json:{write:!0}})],nt.prototype,"wavelengthMatchTolerance",void 0),nt=_e=p([R("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")],nt);const Oo=nt;let Dt=class extends E{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){var A;const{functionArguments:t,sourceRasterInfos:e}=this,n=e[0],{method:o,bandNames:r,bandWavelengths:a,bandIds:i,missingBandAction:u}=t,l=(r==null?void 0:r.length)&&(o==="name"||o!=="id"&&!(i!=null&&i.length)),c=(a==null?void 0:a.length)&&(o==="wavelength"||o!=="id"&&!(i!=null&&i.length)),f=u===Vs.fail,m=l?Do(n,r):c?Lo(n,a,this.functionArguments,f):zo(n,i,f);if(m==null)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":c?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=m,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const g=n.clone();g.pixelType=this.outputPixelType,g.bandCount=m.length;const{statistics:y,histograms:x}=g;y!=null&&y.length&&(g.statistics=m.map(w=>y[w]||y[y.length-1])),x!=null&&x.length&&(g.histograms=m.map(w=>x[w]||x[x.length-1]));let d=(A=g.keyProperties)==null?void 0:A.BandProperties;return d!=null&&d.length&&(d=m.map(w=>w>=d.length?d[d.length-1]:d[w]),g.keyProperties={...g.keyProperties,BandProperties:d}),this.rasterInfo=g,{success:!0,supportsGPU:g.bandCount<=3}}_processPixels(t){var r;const e=(r=t.pixelBlocks)==null?void 0:r[0];if(e==null)return null;const n=e.pixels.length,o=this.functionArguments.bandIds.map(a=>a>=n?n-1:a);return e.extractBands(o)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],t.length===0?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:L(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map(n=>n>=e?e-1:n).map(n=>t[n])}};p([h({json:{write:!0,name:"rasterFunction"}})],Dt.prototype,"functionName",void 0),p([h({type:Oo,json:{write:!0,name:"rasterFunctionArguments"}})],Dt.prototype,"functionArguments",void 0),p([h()],Dt.prototype,"rasterArgumentNames",void 0),Dt=p([R("esri.layers.support.rasterFunctions.ExtractBandFunction")],Dt);const Eo=Dt;function Do(s,t){const e=s.bandInfos.map(({name:o})=>o.toLowerCase()),n=[];for(let o=0;oi.startsWith("nearinfrared_1")),a===-1&&(a=e.findIndex(i=>i.startsWith("nearinfrared")))),a===-1)return null;n.push(a)}return n}function zo(s,t,e){const{bandCount:n}=s;return!(t!=null&&t.length)||e&&t.some(o=>o<0||o>=n)?null:t}function Lo(s,t,{wavelengthMatchTolerance:e},n){const{bandInfos:o}=s,r=[];for(let i=0;i=g.minWavelength&&u<=g.maxWavelength,x=Math.abs(u-(g.minWavelength+g.maxWavelength)/2);y?xy?y:bn+o);return t.map(n=>n/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!(t!=null&&t.length))return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const n=t.length===3||e.bandCount===3&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:n}}_processPixels(t){var n;const e=(n=t.pixelBlocks)==null?void 0:n[0];return e==null?null:Vo(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};p([h({json:{write:!0,name:"rasterFunction"}})],Pt.prototype,"functionName",void 0),p([h({type:Uo,json:{write:!0,name:"rasterFunctionArguments"}})],Pt.prototype,"functionArguments",void 0),p([h()],Pt.prototype,"rasterArgumentNames",void 0),p([h()],Pt.prototype,"_normalizedWeights",null),Pt=p([R("esri.layers.support.rasterFunctions.GrayscaleFunction")],Pt);const Wo=Pt;var Se;let Tt=Se=class extends O{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(s,t){t.rasters=s.map(e=>typeof e=="number"||typeof e=="string"?e:e.toJSON())}clone(){return new Se({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:X(this.rasters)})}};p([h({json:{write:!0}})],Tt.prototype,"operation",void 0),p([h({json:{write:!0}})],Tt.prototype,"rasters",void 0),p([Ht("rasters")],Tt.prototype,"writeRasters",null),p([h({json:{write:!0}})],Tt.prototype,"processAsMultiband",void 0),Tt=Se=p([R("esri.layers.support.rasterFunctions.LocalFunctionArguments")],Tt);const qo=Tt;let zt=class extends E{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{processAsMultiband:o}=this.functionArguments;if(t.some(l=>l.bandCount!==n))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:a}=this.functionArguments,i=ps[r];if(!(i===999||a.length===i||a.length<=1&&i===1))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};const u=e.clone();return u.bandCount=i!==999||o?n:1,this._removeStatsHistColormapVAT(u),this._updateStatistics(u),this._updatePixelType(u),this.rasterInfo=u,{success:!0,supportsGPU:u.bandCount===1&&i<=3&&(r<11||r>16)}}_processPixels(t){const{pixelBlocks:e}=t;return e==null||e.some(n=>n==null)?null:Ys(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){var u;const{operation:t}=this.functionArguments,e=ps[t],n=((u=Object.keys(ls).find(l=>ls[l]===t))==null?void 0:u.toLowerCase())??"undefined",o=this.outputPixelType??"f32";let[r,a]=ht(o);const i=J(o);return i&&(r-=1e-4,a+=1e-4),{imageCount:e,operationName:n,domainRange:[r,a],isOutputRounded:i}}_updateStatistics(t){var r,a;const e=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,o=(r=cs(n))==null?void 0:r.domain;if(o){t.statistics=[];for(let i=0;i({min:-i.max,max:-i.min,avg:i.avg!=null?-i.avg:void 0,stddev:i.stddev!=null?-i.stddev:void 0})))}_updatePixelType(t){const{statistics:e,pixelType:n}=this.sourceRasterInfos[0],{operation:o}=this.functionArguments,{domain:r,isInteger:a}=cs(o)??{domain:null,isInteger:!1};let i="f32";if(r&&a)i=me(r[0],r[1]);else if(o===30){const u=e==null?void 0:e[0];i=u?me(u.min,u.max):J(n)?n:"s32"}else if(o===45&&J(n)){const u=e==null?void 0:e.map(({max:m})=>-m),l=e==null?void 0:e.map(({min:m})=>-m),c=u!=null&&u.length?Math.min(...u):null,f=l!=null&&l.length?Math.min(...l):null;i=c!=null&&f!=null?me(c,f):n.startsWith("s")?n.replace("s","u"):n==="u1"||n==="u2"||n==="u4"?"s8":n==="u8"?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};p([h({json:{write:!0,name:"rasterFunction"}})],zt.prototype,"functionName",void 0),p([h({type:qo,json:{write:!0,name:"rasterFunctionArguments"}})],zt.prototype,"functionArguments",void 0),p([h()],zt.prototype,"rasterArgumentNames",void 0),zt=p([R("esri.layers.support.rasterFunctions.LocalFunction")],zt);const Ho=zt;var Be;let $t=Be=class extends O{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=Us.matchAny}get normalizedNoDataValues(){const{noDataValues:s}=this;if(!(s!=null&&s.length))return null;let t=!1;const e=s.map(n=>{if(typeof n=="number")return t=!0,[n];if(typeof n=="string"){const o=n.trim().split(" ").filter(r=>r.trim()!=="").map(r=>Number(r));return t=t||o.length>0,o.length===0?null:o}return null});return t?e:null}clone(){var s,t;return new Be({includedRanges:((s=this.includedRanges)==null?void 0:s.slice())??[],noDataValues:((t=this.noDataValues)==null?void 0:t.slice())??[],noDataInterpretation:this.noDataInterpretation})}};p([h({json:{write:!0}})],$t.prototype,"includedRanges",void 0),p([h({json:{write:!0}})],$t.prototype,"noDataValues",void 0),p([h()],$t.prototype,"normalizedNoDataValues",null),p([h({json:{write:!0}})],$t.prototype,"noDataInterpretation",void 0),$t=Be=p([R("esri.layers.support.rasterFunctions.MaskFunctionArguments")],$t);const Xo=$t;let Nt=class extends E{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:n,normalizedNoDataValues:o}=this.functionArguments;if(!(n!=null&&n.length)&&!(o!=null&&o.length))return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let i=0;i{var u;return(i==null?void 0:i.length)===((u=o[0])==null?void 0:u.length)});return{success:!0,supportsGPU:(!n||n.length<=2*rt)&&(!o||a&&o[0].length<=rt)}}_processPixels(t){var l;const e=(l=t.pixelBlocks)==null?void 0:l[0];if(e==null)return null;const{outputPixelType:n,lookups:o}=this,{includedRanges:r,noDataInterpretation:a,normalizedNoDataValues:i}=this.functionArguments,u=a===Us.matchAll;return Rn(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:u,lookups:o})}_getWebGLParameters(){var r;const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array(rt);n.fill(Wt),(r=e==null?void 0:e[0])!=null&&r.length&&n.set(e[0]);const o=new Float32Array(rt);for(let a=0;a=o.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};const a=o.clone();a.pixelType=this.outputPixelType,a.colormap=null,a.histograms=null,a.bandCount=1,a.keyProperties={...a.keyProperties,BandProperties:void 0};const[i,u,l,c]=t?[-1,1,0,.1]:[0,200,100,10];return a.statistics=[{min:i,max:u,avg:l,stddev:c}],this.rasterInfo=a,{success:!0,supportsGPU:!0}}_processPixels(t){var a;const e=(a=t.pixelBlocks)==null?void 0:a[0];if(e==null)return null;const{visibleBandID:n,infraredBandID:o,scientificOutput:r}=this.functionArguments;return Gr(e,n,o,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this.functionArguments,o=this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0];return{bandIndexMat3:L(o),scaled:!n}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments;return[n,e,0].map(o=>t[o])}};p([h({json:{write:!0,name:"rasterFunction"}})],Vt.prototype,"functionName",void 0),p([h({type:Jo,json:{write:!0,name:"rasterFunctionArguments"}})],Vt.prototype,"functionArguments",void 0),p([h()],Vt.prototype,"rasterArgumentNames",void 0),Vt=p([R("esri.layers.support.rasterFunctions.NDVIFunction")],Vt);const Ko=Vt;var Ge;let ut=Ge=class extends O{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ge({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};p([h({json:{write:!0}})],ut.prototype,"inputRanges",void 0),p([h({json:{write:!0}})],ut.prototype,"outputValues",void 0),p([h({json:{write:!0}})],ut.prototype,"noDataRanges",void 0),p([h({json:{write:!0}})],ut.prototype,"allowUnmatched",void 0),p([h({json:{write:!0}})],ut.prototype,"isLastInputRangeInclusive",void 0),ut=Ge=p([R("esri.layers.support.rasterFunctions.RemapFunctionArguments")],ut);const Zo=ut;let Rt=class extends E{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,t.colormap=null,t.histograms=null,t.bandCount=1,t.attributeTable=null;const{statistics:n}=t,{allowUnmatched:o,outputValues:r,inputRanges:a,noDataRanges:i,isLastInputRangeInclusive:u}=this.functionArguments;if(n!=null&&n.length&&(r!=null&&r.length))if(o){const l=Math.min.apply(null,[...r,n[0].min]),c=Math.max.apply(null,[...r,n[0].max]);t.statistics=[{...n[0],min:l,max:c}]}else{let l=r[0],c=l;for(let f=0;fr[f]?r[f]:l,c=c>r[f]?c:r[f];t.statistics=[{...n[0],min:l,max:c}]}return this.rasterInfo=t,this.lookup=o?null:Fn({srcPixelType:e,inputRanges:a,outputValues:r,noDataRanges:i,allowUnmatched:o,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!r||r.length<=rt)&&(!i||i.length<=rt)}}_processPixels(t){var c;const e=(c=t.pixelBlocks)==null?void 0:c[0];if(e==null)return null;const{lookup:n,outputPixelType:o}=this;if(n){const f=Ze(e,{lut:[n.lut],offset:n.offset,outputPixelType:o});return f!=null&&n.mask&&(f.mask=kn(e.pixels[0],e.mask,n.mask,n.offset,"u8")),f}const{inputRanges:r,outputValues:a,noDataRanges:i,allowUnmatched:u,isLastInputRangeInclusive:l}=this.functionArguments;return Cn(e,{inputRanges:r,outputValues:a,noDataRanges:i,outputPixelType:o,allowUnmatched:u,isLastInputRangeInclusive:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:n}=this.functionArguments,o=new Float32Array(3*rt),r=1e-5,a=this.functionArguments.inputRanges??[],i=this.functionArguments.outputValues??[],u=i.length;for(let c=0;c0&&(o[3*c]-=r),(c=1?t*be:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:o??0}}};p([h({json:{write:!0,name:"rasterFunction"}})],Ft.prototype,"functionName",void 0),p([h({type:ei,json:{write:!0,name:"rasterFunctionArguments"}})],Ft.prototype,"functionArguments",void 0),p([h()],Ft.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],Ft.prototype,"isGCS",void 0),Ft=p([R("esri.layers.support.rasterFunctions.SlopeFunction")],Ft);const si=Ft,Fs=new ft({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function ni(s,t){const{fillNoDataOnly:e}=t,{band:n,width:o,height:r,mask:a,outBand:i}=s;if(e&&!a)return void i.set(n);const{statisticsType:u,kernelRows:l,kernelCols:c}=t,f=u==="stddev",m=o*r,g=new Float64Array(m),y=new Float64Array(m),x=new Uint32Array(m);for(let T=0;Tw-v),a?(m[x+d]=A[Math.floor((A.length-1)/2)],g[x+d]=A.length):i[x+d]=A[Math.floor((A.length-1)/2)])}}if(a)for(let y=c;yT&&(T=P,b=N);a?(y[A+w]=b,x[A+w]=v.size):i[A+w]=b}}if(a)for(let d=c;d1&&(i!=null&&i.length)&&(w=$.combineBandMasks(i));const v=new $({pixelType:d,width:r,height:a,pixels:f,bandMasks:i&&A.length?A:null,mask:w});return v.updateStatistics(),v}var Ee;let kt=Ee=class extends O{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new Ee({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:X(this.raster)})}};p([h({json:{write:!0,read:{source:["kernelRows","rows"],reader:(s,t)=>Number(s??(t==null?void 0:t.kernelRows)??3)}}})],kt.prototype,"rows",void 0),p([h({json:{write:!0,read:{source:["kernelCols","cols"],reader:(s,t)=>Number(s??(t==null?void 0:t.kernelCols)??3)}}})],kt.prototype,"cols",void 0),p([h({json:{write:!0}})],kt.prototype,"fillNoDataOnly",void 0),p([h({json:{read:{source:["statisticsType","type"],reader:(s,t)=>Fs.fromJSON((t==null?void 0:t.statisticsType)??(t==null?void 0:t.type))??"min"},write:{target:"type"}}}),et(Fs)],kt.prototype,"statisticsType",void 0),kt=Ee=p([R("esri.layers.support.rasterFunctions.StatisticsFunctionArguments")],kt);const ui=kt;let Ut=class extends E{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();n.pixelType=this.outputPixelType;const{statisticsType:o}=this.functionArguments;return o==="stddev"&&this._removeStatsHistColormapVAT(n),this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3&&t<5}}_processPixels(t){var i;const e=(i=t.pixelBlocks)==null?void 0:i[0];if(e==null)return e;const{statisticsType:n,rows:o,cols:r,fillNoDataOnly:a}=this.functionArguments;return ai(e,{kernelRows:o,kernelCols:r,fillNoDataOnly:a,outputPixelType:this.outputPixelType,statisticsType:n,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:n,fillNoDataOnly:o}=this.functionArguments;return{fillNoDataOnly:o,kernelRows:t,kernelCols:e,statisticsType:n,clampRange:ht(this.outputPixelType)}}};p([h({json:{write:!0,name:"rasterFunction"}})],Ut.prototype,"functionName",void 0),p([h({type:ui,json:{write:!0,name:"rasterFunctionArguments"}})],Ut.prototype,"functionArguments",void 0),p([h()],Ut.prototype,"rasterArgumentNames",void 0),Ut=p([R("esri.layers.support.rasterFunctions.StatisticsFunction")],Ut);const li=Ut;var De;let Ct=De=class extends O{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(s,t){if(!(s!=null&&s.length))return null;const e=[];return s.forEach(n=>{const o={min:n.min,max:n.max,avg:n.avg??n.mean,stddev:n.stddev??n.standardDeviation};e.push(o)}),e}writeStatistics(s,t,e){if(!(s!=null&&s.length))return;const n=[];s.forEach(o=>{const r={...o,mean:o.avg,standardDeviation:o.stddev};delete r.avg,delete r.stddev,n.push(r)}),t[e]=n}clone(){return new De({statistics:X(this.statistics),histograms:X(this.histograms)})}};p([h({json:{write:!0}})],Ct.prototype,"statistics",void 0),p([qt("statistics")],Ct.prototype,"readStatistics",null),p([Ht("statistics")],Ct.prototype,"writeStatistics",null),p([h({json:{write:!0}})],Ct.prototype,"histograms",void 0),Ct=De=p([R("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")],Ct);const ci=Ct;let ct=class extends E{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:n,histograms:o}=this.functionArguments;return o&&(e.histograms=o),n&&(e.statistics=n),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){var e;return(e=t.pixelBlocks)==null?void 0:e[0]}};p([h({json:{write:!0,name:"rasterFunction"}})],ct.prototype,"functionName",void 0),p([h({type:ci,json:{write:!0,name:"rasterFunctionArguments"}})],ct.prototype,"functionArguments",void 0),p([h()],ct.prototype,"rasterArgumentNames",void 0),p([h({json:{write:!0}})],ct.prototype,"indexedColormap",void 0),p([h()],ct.prototype,"isNoopProcess",void 0),ct=p([R("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")],ct);const pi=ct;var ze;const fi=new ft({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let V=ze=class extends O{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(s,t,e){s!=null&&s.length&&(Array.isArray(s[0])||(s=s.map(n=>[n.min,n.max,n.avg,n.stddev])),t[e]=s)}clone(){return new ze({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:X(this.statistics),gamma:X(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:X(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};p([h({type:Boolean,json:{write:!0}})],V.prototype,"computeGamma",void 0),p([h({type:Boolean,json:{name:"dra",write:!0}})],V.prototype,"dynamicRangeAdjustment",void 0),p([h({type:[Number],json:{write:!0}})],V.prototype,"gamma",void 0),p([h()],V.prototype,"histograms",void 0),p([h({type:Number,json:{write:!0}})],V.prototype,"maxPercent",void 0),p([h({type:Number,json:{write:!0}})],V.prototype,"minPercent",void 0),p([h({type:Number,json:{write:!0}})],V.prototype,"numberOfStandardDeviations",void 0),p([h({type:Number,json:{name:"max",write:!0}})],V.prototype,"outputMax",void 0),p([h({type:Number,json:{name:"min",write:!0}})],V.prototype,"outputMin",void 0),p([h({type:Number,json:{write:!0}})],V.prototype,"sigmoidStrengthLevel",void 0),p([h({json:{type:[[Number]],write:!0}})],V.prototype,"statistics",void 0),p([Ht("statistics")],V.prototype,"writeStatistics",null),p([et(fi)],V.prototype,"stretchType",void 0),p([h({type:Boolean,json:{write:!0}})],V.prototype,"useGamma",void 0),V=ze=p([R("esri.layers.support.rasterFunctions.StretchFunctionArguments")],V);const hi=V;let pt=class extends E{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:n}=this,{dynamicRangeAdjustment:o,gamma:r,useGamma:a}=n;if(!o&&["u8","u16","s8","s16"].includes(e)){const c=de(n.toJSON(),{rasterInfo:t}),f=J(this.outputPixelType)?"round":"float";this.lookup=_n({pixelType:e,...c,gamma:a?r:null,rounding:f}),this.cutOffs=c}else o||(this.cutOffs=de(n.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),this.outputPixelType==="u8"&&(i.keyProperties.DataType="processed");const{outputMin:u=0,outputMax:l=255}=this.functionArguments;i.statistics=[];for(let c=0;c=2?3:1,a=o&&(n!=null&&n.length)?Sn(r,n):[1,1,1],{minCutOff:i,maxCutOff:u}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};i.length===1&&(i[1]=i[2]=i[0],u[1]=u[2]=u[0]);const l=new Float32Array(r);let c;for(c=0;c1||s.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:t}=this.functionArguments;if(!t)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(s.pixelType);const e=s.clone();return e.pixelType=this.outputPixelType,e.bandCount=1,e.dataType!=="thematic"&&(e.keyProperties=e.keyProperties?{...e.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(s){var t;return(t=s.pixelBlocks)==null?void 0:t[0]}};p([h({json:{write:!0,name:"rasterFunction"}})],It.prototype,"functionName",void 0),p([h({type:di,json:{write:!0,name:"rasterFunctionArguments"}})],It.prototype,"functionArguments",void 0),p([h()],It.prototype,"rasterArgumentNames",void 0),p([h()],It.prototype,"isNoopProcess",void 0),It=p([R("esri.layers.support.rasterFunctions.TableFunction")],It);const gi=It,j=new Map;function yi(s,t){const{rasterFunctionArguments:e}=s;e&&(e.rasters||[e.raster,e.raster2]).forEach(n=>{n&&typeof n!="number"&&(typeof n=="string"?n.startsWith("http")&&(t.includes(n)||t.push(n)):"rasterFunctionArguments"in n&&yi(n,t))})}function ra(s,t){if(t=t??{},"function"in(s=X(s))&&"arguments"in s&&s.arguments){const e=Qs(s,new Map,t);if(We(e),!e.renderingRule)throw new _t("raster-function-helper","Unsupported raster function json.");s=e.renderingRule}if("rasterFunction"in s)return Ks(s=Ve(s),t);throw new _t("raster-function-helper","unsupported raster function json.")}function xi(s,t){return t[0]==="rasters"&&Array.isArray(s.rasters)?s.rasters:t.map(e=>s[e])}function ks(s){return!!(s&&typeof s=="object"&&s.rasterFunction&&s.rasterFunctionArguments)}function Ve(s){var o;const{rasterFunction:t,rasterFunctionArguments:e}=s,n={};for(const r in e){let a=e[r];const i=r.toLowerCase();if(i==="rasters"&&Array.isArray(a))n.rasters=a.map(u=>ks(u)?Ve(u):u);else switch(ks(a)&&(a=Ve(a)),i){case"dra":n.dra=a;break;case"pspower":n.psPower=a;break;case"pszfactor":n.psZFactor=a;break;case"bandids":n.bandIds=a;break;default:n[r[0].toLowerCase()+r.slice(1)]=a}}return t!=="Local"||(o=n.rasters)!=null&&o.length||(n.rasters=["$$"]),{...s,rasterFunctionArguments:n}}function Ks(s,t){var m,g;const{rasterFunction:e,rasterFunctionArguments:n}=s,o=(m=s.outputPixelType)==null?void 0:m.toLowerCase();if(e==null||!j.has(e))throw new _t("raster-function-helper",`unsupported raster function: ${e}`);const r=j.get(e),a=(typeof r.ctor=="function"?r.ctor:r.ctor.default).fromJSON({...s,outputPixelType:o}),{rasterArgumentNames:i}=a,u=[],l=xi(n,i),c=i[0]==="rasters"||i.length>1,f=[];for(let y=0;y{a.functionArguments[y]=f[x]})),t){a.sourceRasters=u;const y=(g=t.raster)==null?void 0:g.url;y&&(a.mainPrimaryRasterId=y)}return a}function Zs(s,t){if(s&&t)for(const e in s){const n=s[e];n&&typeof n=="object"&&"type"in n&&(n.type==="RasterFunctionTemplate"?Zs(n.arguments,t):n.type==="RasterFunctionVariable"&&t[n.name]!=null&&(n.value=t[n.name]))}}function Ue(s,t){var o;if(!s||typeof s!="object")return s;const{value:e}=s;if(!e||typeof e!="object")return s.isDataset?"$$":e;if(Array.isArray(e))return e.length===0?[]:e.map(r=>typeof r=="object"&&r.type==="RasterFunctionVariable"?Ue(r,t):r);if("value"in e&&["number","string","boolean"].includes(typeof e.value))return e.value;if(s.isDataset&&e.type!=="Scalar")return"$$";if(!("type"in e))return e;let n=e;switch(e.type){case"Scalar":n=e.value;break;case"AlgorithmicColorRamp":n=Cs(e);break;case"MultiPartColorRamp":n={type:"multipart",colorRamps:e.ArrayOfColorRamp.map(Cs)};break;case"ArgumentArray":if((o=e.elements)!=null&&o.length&&e.elements[0].type!=="RasterStatistics"){const r=[];for(let a=0;a{if(typeof i=="object")if(i._object_ref_id!=null){if(!e.has(i._object_ref_id))throw new _t("raster-function-helper",`unsupported raster function json. _object_ref_id: ${r} does not exist`);const l=e.get(a);l&&typeof l=="object"?Object.assign(i,l):r[u]=l}else We({renderingRule:i,templates:e})}));else{if(!e.has(a))throw new _t("raster-function-helper",`unsupported raster function json. _object_ref_id: ${a} does not exist`);const i=e.get(a);o!=="_object_ref_id"?n[o]=i:i&&typeof i=="object"&&Object.assign(n,i)}}}function wi(s){var t;(t=s.Statistics)!=null&&t.length&&typeof s.Statistics=="object"&&(s.Statistics=s.Statistics.map(e=>[e.min,e.max,e.mean,e.standardDeviation])),s.NumberOfStandardDeviation!=null&&(s.NumberOfStandardDeviations=s.NumberOfStandardDeviation,delete s.NumberOfStandardDeviation)}function bi(s){var t,e;((e=(t=s.ColorRamp)==null?void 0:t.type)==null?void 0:e.toLowerCase())==="randomcolorramp"&&(delete s.ColorRamp,s.ColormapName="Random"),s.ColorSchemeType===0&&delete s.ColorRamp}function vi(s){s.ConvolutionType!=null&&(s.Type=s.ConvolutionType,delete s.ConvolutionType)}function Ai(s){var t;(t=s.NoDataValues)!=null&&t.length&&typeof s.NoDataValues[0]=="string"&&(s.NoDataValues=s.NoDataValues.filter(e=>e!=="").map(e=>Number(e)))}j.set("Arithmetic",{desc:"Arithmetic Function",ctor:Nr,rasterArgumentNames:["rasters"]}),j.set("Aspect",{desc:"Aspect Function",ctor:Fr,rasterArgumentNames:["raster"]}),j.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:eo,rasterArgumentNames:["raster"]}),j.set("Colormap",{desc:"Colormap Function",ctor:ho,rasterArgumentNames:["raster"]}),j.set("CompositeBand",{desc:"CompositeBand Function",ctor:go,rasterArgumentNames:["rasters"]}),j.set("ComputeChange",{desc:"ComputeChange Function",ctor:No,rasterArgumentNames:["rasters"]}),j.set("Convolution",{desc:"Convolution Function",ctor:Bo,rasterArgumentNames:["raster"]}),j.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Fo,rasterArgumentNames:["raster"]}),j.set("ExtractBand",{desc:"ExtractBand Function",ctor:Eo,rasterArgumentNames:["raster"]}),j.set("Curvature",{desc:"Curvature Function",ctor:Go,rasterArgumentNames:["raster"]}),j.set("Grayscale",{desc:"Grayscale Function",ctor:Wo,rasterArgumentNames:["raster"]}),j.set("Clip",{desc:"Clip Function",ctor:no,rasterArgumentNames:["raster"]}),j.set("Local",{desc:"Local Function",ctor:Ho,rasterArgumentNames:["rasters"]}),j.set("Mask",{desc:"Mask Function",ctor:Yo,rasterArgumentNames:["raster"]}),j.set("NDVI",{desc:"NDVI Function",ctor:Ko,rasterArgumentNames:["raster"]}),j.set("Remap",{desc:"Remap Function",ctor:Qo,rasterArgumentNames:["raster"]}),j.set("Slope",{desc:"Slope Function",ctor:si,rasterArgumentNames:["raster"]}),j.set("Statistics",{desc:"Focal Statistics Function",ctor:li,rasterArgumentNames:["raster"]}),j.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:pi,rasterArgumentNames:["raster"]}),j.set("Stretch",{desc:"Stretch Function",ctor:mi,rasterArgumentNames:["raster"]}),j.set("Table",{desc:"Attribute Table Function",ctor:gi,rasterArgumentNames:["raster"]});var qe;function en(s,t,e){return!mn(s,t,e)}function Yt(s,t,e){const n=en(s,t,e);if(n&&!Ke())throw new _t("rasterprojectionhelper-project","projection engine is not loaded");return n}(function(s){s[s.None=0]="None",s[s.North=1]="North",s[s.South=2]="South",s[s.Both=3]="Both"})(qe||(qe={}));const Is=(s,t,e,n=0)=>{if(e[0]===1)return[0,0];let o=1,r=-1,a=1,i=-1;for(let d=0;ds[d]?s[d]:o,r=r>s[d]?r:s[d],a=a>s[d+1]?s[d+1]:a,i=i>s[d+1]?i:s[d+1]);const{cols:u,rows:l}=t,c=(r-o)/u/e[0],f=(i-a)/l/e[1],m=2*n;let g=0,y=!1,x=[0,0];for(let d=0;dg&&(g=P+T,x=[P,T]),m&&g>m){y=!0;break}}if(y)break}return x},Pi={3395:20037508342789244e-9,3410:17334193943686873e-9,3857:20037508342788905e-9,3975:17367530445161372e-9,4087:20037508342789244e-9,4088:20015108787169147e-9,6933:17367530445161372e-9,32662:20037508342789244e-9,53001:2001508679602057e-8,53002:1000754339801029e-8,53003:2001508679602057e-8,53004:2001508679602057e-8,53016:14152803599503474e-9,53017:17333573624304302e-9,53034:2001508679602057e-8,53079:20015114352186374e-9,53080:20015114352186374e-9,54001:20037508342789244e-9,54002:10018754171394624e-9,54003:20037508342789244e-9,54004:20037508342789244e-9,54016:14168658027268292e-9,54017:1736753044516137e-8,54034:20037508342789244e-9,54079:20037508342789244e-9,54080:20037508342789244e-9,54100:20037508342789244e-9,54101:20037508342789244e-9},le=32,ce=4,ge=ce,ye=new Map,xe=new Map,pe=500;async function oa(){Ke()||await pn()}function ia(s,t,e,n=null){const o=s.spatialReference;if(o.equals(t))return s;Yt(o,t,n);const r=e.center,a=new Xt({xmin:r.x-s.x/2,xmax:r.x+s.x/2,ymin:r.y-s.y/2,ymax:r.y+s.y/2,spatialReference:o}),i=St(a,t,n),u=ot(t);let l;if(i==null||u!=null&&i.width>=u){const c=re(o)/re(t);l={x:s.x*c,y:s.y*c}}else l={x:i.width,y:i.height};return l}function H(s,t=.01){return re(s)?t/re(s):0}function _s(s,t,e=null,n=!0){const o=s.spatialReference;if(o.equals(t))return s;Yt(o,t,e);const r=St(s,t,e);return n&&r&&sn([s],[r],o,t),r}function sn(s,t,e,n){const o=fe(e,!0),r=fe(n,!0),a=H(e,pe),i=H(n,pe);if(a&&o!=null&&r!=null)for(let u=0;u=r[1]-i&&Math.abs(c-o[0])new q(i[0],i[1],e)),a=St(r,n,o);return o&&sn(r,a,e,n),a.map(i=>i?[i.x,i.y]:[NaN,NaN])}function Ms(s){const{inSR:t,outSR:e,datumTransformation:n}=s,o=Mt(t),{points:r,mask:a}=ns(s,o);if(!t.isGeographic){const u=t.wkid?tt.coordsys(t.wkid):tt.fromString(t.isGeographic?Q.PE_TYPE_GEOGCS:Q.PE_TYPE_PROJCS,t.wkt2||t.wkt);as.projToGeog(u,r.length,r)}if(n!=null&&n.steps.length){let u;if(e.isGeographic&&(u=r.map(([c])=>c>179.9955?1:c<-179.9955?-1:0)),n.steps.forEach(c=>{const f=c.wkid?tt.geogtran(c.wkid):tt.fromString(Q.PE_TYPE_GEOGTRAN,c.wkt);dn.geogToGeog(f,r.length,r,null,c.isInverse?Q.PE_TRANSFORM_2_TO_1:Q.PE_TRANSFORM_1_TO_2)}),u)for(let c=0;c179.9955?1:m<-179.9955?-1:0;f&&g&&f!==g&&(r[c][0]=f>0?m+360:m-360)}}if(!e.isGeographic){const u=Mt(e,!0),l=u!=null&&u.isEnvelope?[u.bbox[1],u.bbox[3]]:[-90,90];Ri(r,l);const c=e.wkid?tt.coordsys(e.wkid):tt.fromString(e.isGeographic?Q.PE_TYPE_GEOGCS:Q.PE_TYPE_PROJCS,e.wkt2||e.wkt);as.geogToProj(c,r.length,r)}let i=r;if(a&&r.length!==a.length){i=[];for(let u=0,l=0;ud.getInclusive()===1&&d.getKind()===1);if(!a){if(a=o.find(d=>d.getInclusive()===1&&d.getKind()===0),!a)return null;r=!0}const i=e?0:(n.getNorthPoleLocation()===2?1:0)|(n.getSouthPoleLocation()===2?2:0),u=n.isPannableRectangle(),l=a.getCoord();if(r)return{isEnvelope:r,isPannable:u,vertices:l,coef:null,bbox:[l[0][0]-t,l[0][1]-t,l[1][0]+t,l[1][1]+t],poleLocation:i};let c=0;const f=[];let[m,g]=l[0],[y,x]=l[0];for(let d=0,A=l.length;dw?y:w,x=x>v?x:v}return{isEnvelope:!1,isPannable:u,vertices:l,coef:f,bbox:[m,g,y,x],poleLocation:i}}function ns(s,t){const e=[],{cols:n,rows:o,xres:r,yres:a,usePixelCenter:i}=s;let{xmin:u,ymax:l}=s;if(i&&(u+=r/2,l-=a/2),t==null){for(let g=0;g=g&&v<=x;for(let P=0;P=y&&T<=d&&(e.push([v,T]),c[w]=1)}}return{points:e,mask:c}}const f=t.coef,m=[];for(let g=0;g=P&&y<=T){const F=v*y+b;x.push(F),d.push(N)}}let A=x;if(x.length>2){let w=d[0]===2?0:d[0],v=x[0];A=[];for(let b=1;bb-P)}else x[0]>x[1]&&(A=[x[1],x[0]]);m.push(A)}for(let g=0,y=0;g=w[0]&&x<=w[1]&&(e.push([x,A]),c[y]=1);else if(w.length>2){let v=!1;for(let b=0;b=w[b]&&x<=w[b+1]){v=!0;break}v&&(e.push([x,A]),c[y]=1)}}}return{points:e,mask:c}}function Ri(s,t){const[e,n]=t;for(let o=0;on)&&(s[o]=[NaN,NaN])}}function Fi(s,t){const e=ot(s[0].spatialReference);if(s.length<2||e==null||(t=t??H(s[0].spatialReference),(s=s.filter(i=>i.width>t)).length===1))return s[0];let{xmin:n,xmax:o,ymin:r,ymax:a}=s[0];for(let i=1;iH(o)){const{xmin:l,xmax:c}=s;for(let f=0;f<=r;f++){const m=f===0?l:-a/2,g=f===r?c-a*f:a/2;u[f]=new Xt({xmin:m,xmax:g,ymin:s.ymin,ymax:s.ymax,spatialReference:o})}}return Fi(u.map(l=>Bs(l,t,e,n)).filter(fn))}function aa(s,t,e){if(s.type==="extent"){const{xmin:n,ymin:o,xmax:r,ymax:a,spatialReference:i}=s;s=new zs({rings:[[[n,a],[r,a],[r,o],[n,o],[n,a]]],spatialReference:i})}return s.spatialReference.equals(t)?s:(Yt(s.spatialReference,t,e),St(s,t,e))}function Ci(s,t){const e=ot(t);if(e==null)return null;let{xmin:n,ymin:o,xmax:r,ymax:a}=s;const i=s.spatialReference,u=new zs({spatialReference:i,rings:[[[n,o],[r,o],[r,a],[n,a],[n,o]]]}),l=St(u,t);if(l.rings.length!==2||!l.rings[0].length||!l.rings[1].length)return null;const{rings:c}=l,f=H(i),m=new Xt({spatialReference:t});for(let g=0;g<2;g++){n=r=c[g][0][0],o=a=c[g][0][1];for(let y=0;yc[g][y][0]?c[g][y][0]:n,r=rc[g][y][1]?c[g][y][1]:o,a=a=a.ymax))return null;if(!n||!a)return a;const i=fe(r,!0),u=fe(t,!0);if(i==null||u==null)return a;const l=H(r,.001),c=H(r,pe),f=H(t,.001);if(Math.abs(a.xmin-u[0])c){a.xmin=u[0];const y=[];y.push(new q(s.xmax,s.ymin,r)),y.push(new q(s.xmax,(s.ymin+s.ymax)/2,r)),y.push(new q(s.xmax,s.ymax,r));const x=y.map(d=>_s(d,t,e)).filter(d=>!isNaN(d==null?void 0:d.x)).map(d=>d.x);a.xmax=Math.max.apply(null,x)}if(gc){a.xmax=u[1];const y=[];y.push(new q(s.xmin,s.ymin,r)),y.push(new q(s.xmin,(s.ymin+s.ymax)/2,r)),y.push(new q(s.xmin,s.ymax,r));const x=y.map(d=>_s(d,t,e)).filter(d=>!isNaN(d==null?void 0:d.x)).map(d=>d.x);a.xmin=Math.min.apply(null,x)}}else{const m=H(t,.001);Math.abs(a.xmin-u[0])0&&n.outofBoundPointCountge)&&(en(u,l,s.datumTransformation)&&(u.isGeographic||Mt(u)),e=[ce,ce],n=we({...s,spacing:e}),o={cols:n.size[0]+1,rows:n.size[1]+1},a=Is(n.offsets,o,e,ge)),n.error=a,e[0]>1&&(n.coefficients=Gs(n.offsets,o,r)),s.includeGCSGrid&&!u.isGeographic&&!u.isWebMercator)if(l.isGeographic)n.gcsGrid={offsets:n.offsets,coefficients:n.coefficients,spacing:e};else{const c=Mt(u);if(c!=null&&!c.isEnvelope){const f=_i(u),m=ki(s.projectedExtent,f),{offsets:g}=we({...s,srcBufferExtent:m,spacing:e}),y=Gs(g,o,r);n.gcsGrid={offsets:g,coefficients:y,spacing:e}}}return n}function we(s){const{projectedExtent:t,srcBufferExtent:e,pixelSize:n,datumTransformation:o,rasterTransform:r}=s,a=t.spatialReference,i=e.spatialReference,u=Yt(a,i),{xmin:l,ymin:c,xmax:f,ymax:m}=t,g=ot(i),y=g!=null&&(s.hasWrapAround||(r==null?void 0:r.type)==="gcs-shift"),x=s.spacing||[le,le],d=x[0]*n.x,A=x[1]*n.y,w=x[0]===1,v=Math.ceil((f-l)/d-.1/x[0])+(w?0:1),b=Math.ceil((m-c)/A-.1/x[1])+(w?0:1),P=Ti({cols:v,rows:b,xmin:l,ymax:m,xres:d,yres:A,inSR:a,outSR:i,datumTransformation:o,preferPE:x[0]<=ce,usePixelCenter:w}),T=[];let N,F=0;const I=w?-1:NaN,{xmin:M,xmax:_,ymax:U,width:mt,height:rn}=e,on=H(i,pe),an=g!=null&&M>0&&_>g/2;let rs=!1;if(u){const it=Mt(a);rs=it!=null&&it.poleLocation>0}for(let it=0;it_&&z[0]>g/2-on?z[0]-=g:y&&it===0&&z[0]<0&&an&&!r&&(z[0]+=g),!z||isNaN(z[0])||isNaN(z[1]))T.push(I),T.push(I),he.push(null),F++;else{if(r){const os=r.inverseTransform(new q({x:z[0],y:z[1],spatialReference:i}));z=[os.x,os.y]}he.push(z),it>0&&y&&N[Jt]&&z[0]_&&z[0]>g&&(z[0]-=g)),T.push((z[0]-M)/mt),T.push((U-z[1])/rn)}}N=he}return{offsets:T,error:null,coefficients:null,outofBoundPointCount:F,spacing:x,size:w?[v,b]:[v-1,b-1]}}function Gs(s,t,e){const{cols:n,rows:o}=t,r=new Float32Array((n-1)*(o-1)*2*6),a=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),i=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let u=0;uo){const i=s.xmin-o;a=-Math.ceil(i/r)}return new Xt({spatialReference:s.spatialReference,xmin:s.xmin+a*r,ymin:s.ymin,xmax:s.xmax+a*r,ymax:s.ymax})}function pa(s,t,e){var y;const{storageInfo:n,pixelSize:o}=t;let r=0,a=!1;const{pyramidResolutions:i}=n,u=((y=n.tileInfo.format)==null?void 0:y.toLowerCase())==="mixed"?Math.max(1,Math.min(3,n.tileInfo.dpi/96)):1,l=(s.x+s.y)/2/u;if(i!=null&&i.length){const x=i[i.length-1],d=(x.x+x.y)/2,A=(o.x+o.y)/2;if(l<=A)r=0;else if(l>=d)r=i.length,a=l/d>8;else{let v,b=A;for(let P=1;P<=i.length;P++){if(v=(i[P-1].x+i[P-1].y)/2,l<=v){l===v?r=P:e==="down"?(r=P-1,a=l/b>8):r=e==="up"||l-b>v-l||l/b>2?P:P-1;break}b=v}}const w=r===0?o:i[r-1];return a&&Math.min(w.x,w.y)*re(t.spatialReference)>19567&&(a=!1),{pyramidLevel:r,pyramidResolution:new q({x:w.x,y:w.y,spatialReference:t.spatialReference}),excessiveReading:a}}const c=Math.log(s.x/o.x)/Math.LN2,f=Math.log(s.y/o.y)/Math.LN2,m=t.storageInfo.maximumPyramidLevel||0;r=e==="down"?Math.floor(Math.min(c,f)):e==="up"?Math.ceil(Math.max(c,f)):Math.round((c+f)/2),r<0?r=0:r>m&&(a=r>m+3,r=m);const g=2**r;return{pyramidLevel:r,pyramidResolution:new q({x:g*t.nativePixelSize.x,y:g*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}let ee=class extends Je{get affectsPixelSize(){return!1}forwardTransform(s){return s}inverseTransform(s){return s}};p([h()],ee.prototype,"affectsPixelSize",null),p([h({json:{write:!0}})],ee.prototype,"spatialReference",void 0),ee=p([R("esri.layers.support.rasterTransforms.BaseRasterTransform")],ee);const nn=ee;var He;let se=He=class extends nn{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(s){return(s=s.clone()).type==="point"?(s.x>180+this.tolerance&&(s.x-=360),s):(s.xmin>=180-this.tolerance?(s.xmax-=360,s.xmin-=360):s.xmax>180+this.tolerance&&(s.xmin=-180,s.xmax=180),s)}inverseTransform(s){return(s=s.clone()).type==="point"?(s.x<-this.tolerance&&(s.x+=360),s):(s.xmin<-this.tolerance&&(s.xmin+=360,s.xmax+=360),s)}clone(){return new He({tolerance:this.tolerance})}};p([et({GCSShiftXform:"gcs-shift"})],se.prototype,"type",void 0),p([h()],se.prototype,"tolerance",void 0),se=He=p([R("esri.layers.support.rasterTransforms.GCSShiftTransform")],se);const fa=se;var Xe;function Ye(s,t,e){const{x:n,y:o}=t;if(e<2)return{x:s[0]+n*s[2]+o*s[4],y:s[1]+n*s[3]+o*s[5]};if(e===2){const m=n*n,g=o*o,y=n*o;return{x:s[0]+n*s[2]+o*s[4]+m*s[6]+y*s[8]+g*s[10],y:s[1]+n*s[3]+o*s[5]+m*s[7]+y*s[9]+g*s[11]}}const r=n*n,a=o*o,i=n*o,u=r*n,l=r*o,c=n*a,f=o*a;return{x:s[0]+n*s[2]+o*s[4]+r*s[6]+i*s[8]+a*s[10]+u*s[12]+l*s[14]+c*s[16]+f*s[18],y:s[1]+n*s[3]+o*s[5]+r*s[7]+i*s[9]+a*s[11]+u*s[13]+l*s[15]+c*s[17]+f*s[19]}}function Os(s,t,e){const{xmin:n,ymin:o,xmax:r,ymax:a,spatialReference:i}=t;let u=[];if(e<2)u.push({x:n,y:a}),u.push({x:r,y:a}),u.push({x:n,y:o}),u.push({x:r,y:o});else{let f=10;for(let m=0;mYe(s,f,e));const l=u.map(f=>f.x),c=u.map(f=>f.y);return new Xt({xmin:Math.min.apply(null,l),xmax:Math.max.apply(null,l),ymin:Math.min.apply(null,c),ymax:Math.max.apply(null,c),spatialReference:i})}function Mi(s){const[t,e,n,o,r,a]=s,i=n*a-r*o,u=r*o-n*a;return[(r*e-t*a)/i,(n*e-t*o)/u,a/i,o/u,-r/i,-n/u]}let Y=Xe=class extends nn{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(s,t){const{coeffX:e,coeffY:n}=t;if(!(e!=null&&e.length)||!(n!=null&&n.length)||e.length!==n.length)return null;const o=[];for(let r=0;r0}forwardTransform(s){if(s.type==="point"){const t=Ye(this.forwardCoefficients,s,this.polynomialOrder);return new q({x:t.x,y:t.y,spatialReference:s.spatialReference})}return Os(this.forwardCoefficients,s,this.polynomialOrder)}inverseTransform(s){if(s.type==="point"){const t=Ye(this.inverseCoefficients,s,this.polynomialOrder);return new q({x:t.x,y:t.y,spatialReference:s.spatialReference})}return Os(this.inverseCoefficients,s,this.polynomialOrder)}clone(){return new Xe({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};p([h({json:{write:!0}})],Y.prototype,"polynomialOrder",void 0),p([h()],Y.prototype,"forwardCoefficients",void 0),p([qt("forwardCoefficients",["coeffX","coeffY"])],Y.prototype,"readForwardCoefficients",null),p([Ht("forwardCoefficients")],Y.prototype,"writeForwardCoefficients",null),p([h({json:{write:!0}})],Y.prototype,"inverseCoefficients",null),p([qt("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],Y.prototype,"readInverseCoefficients",null),p([Ht("inverseCoefficients")],Y.prototype,"writeInverseCoefficients",null),p([h()],Y.prototype,"affectsPixelSize",null),p([et({PolynomialXform:"polynomial"})],Y.prototype,"type",void 0),Y=Xe=p([R("esri.layers.support.rasterTransforms.PolynomialTransform")],Y);const ha=Y;export{ia as C,ot as D,ki as J,en as M,yi as R,ra as S,oa as T,aa as U,Ii as V,ua as Z,nn as a,fa as c,la as e,_s as j,ca as o,pa as r,ha as y}; diff --git a/build/assets/PooledRBush-CdrRkOdh.js b/build/assets/PooledRBush-CdrRkOdh.js new file mode 100644 index 0000000..bdfdcaa --- /dev/null +++ b/build/assets/PooledRBush-CdrRkOdh.js @@ -0,0 +1 @@ +import{b5 as w,b6 as F,b7 as R}from"./index-DKOmzAMm.js";import{f as I}from"./quickselect-D0_cvEX6.js";class C{constructor(t=9,i){this._compareMinX=j,this._compareMinY=v,this._toBBox=n=>n,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),i&&(typeof i=="function"?this._toBBox=i:this._initFormat(i)),this.clear()}destroy(){this.clear(),d.prune(),Y.prune(),m.prune(),X.prune()}all(t){y(this._data,t)}search(t,i){let n=this._data;const s=this._toBBox;if(M(t,n))for(d.clear();n;){for(let h=0,a=n.children.length;h0;){if(n||(n=m.pop(),s=m.data[m.length-1],h=X.pop()??0,a=!0),n.leaf&&(i=F(n.children,t,n.children.length,n.indexHint),i!==-1))return n.children.splice(i,1),m.push(n),this._condense(m),this;a||n.leaf||!b(n,r)?s?(h++,n=s.children[h],a=!1):n=null:(m.push(n),X.push(h),h=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,i,n,s){const h=n-i+1;let a=this._maxEntries;if(h<=a){const l=new B(t.slice(i,n+1));return f(l,this._toBBox),l}s||(s=Math.ceil(Math.log(h)/Math.log(a)),a=Math.ceil(h/a**(s-1)));const r=new E([]);r.height=s;const o=Math.ceil(h/a),c=o*Math.ceil(Math.sqrt(a));A(t,i,n,c,this._compareMinX);for(let l=i;l<=n;l+=c){const u=Math.min(l+c-1,n);A(t,l,u,o,this._compareMinY);for(let p=l;p<=u;p+=o){const H=Math.min(p+o-1,u);r.children.push(this._build(t,p,H,s-1))}}return f(r,this._toBBox),r}_insert(t,i,n){const s=this._toBBox,h=n?t:s(t);m.clear();const a=J(h,this._data,i,m);for(a.children.push(t),_(a,h);i>=0&&m.data[i].children.length>this._maxEntries;)this._split(m,i),i--;N(h,m,i)}_split(t,i){const n=t.data[i],s=n.children.length,h=this._minEntries;this._chooseSplitAxis(n,h,s);const a=this._chooseSplitIndex(n,h,s);if(!a)return;const r=n.children.splice(a,n.children.length-a),o=n.leaf?new B(r):new E(r);o.height=n.height,f(n,this._toBBox),f(o,this._toBBox),i?t.data[i-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,i){this._data=new E([t,i]),this._data.height=t.height+1,f(this._data,this._toBBox)}_chooseSplitIndex(t,i,n){let s,h,a;s=h=1/0;for(let r=i;r<=n-i;r++){const o=x(t,0,r,this._toBBox),c=x(t,r,n,this._toBBox),l=$(o,c),u=S(o)+S(c);l=i;c--){const l=t.children[c];_(r,t.leaf?h(l):l),o+=g(r)}return o}_condense(t){for(let i=t.length-1;i>=0;i--){const n=t.data[i];if(n.children.length===0)if(i>0){const s=t.data[i-1],h=s.children;h.splice(F(h,n,h.length,s.indexHint),1)}else this.clear();else f(n,this._toBBox)}}_initFormat(t){const i=["return a"," - b",";"];this._compareMinX=new Function("a","b",i.join(t[0])),this._compareMinY=new Function("a","b",i.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function J(e,t,i,n){for(;n.push(t),t.leaf!==!0&&n.length-1!==i;){let s,h=1/0,a=1/0;for(let r=0,o=t.children.length;r=0;n--)_(t.data[n],e)}function f(e,t){x(e,0,e.children.length,t,e)}function x(e,t,i,n,s){s||(s=new B([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let h,a=t;a=e.minX&&t.maxY>=e.minY}function A(e,t,i,n,s){const h=[t,i];for(;h.length;){const a=h.pop(),r=h.pop();if(a-r<=n)continue;const o=r+Math.ceil((a-r)/n/2)*n;I(e,o,r,a,s),h.push(r,o,o,a)}}const d=new w,Y=new w,m=new w,X=new w({deallocator:void 0});class q{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class D extends q{constructor(){super(...arguments),this.height=1,this.indexHint=new R}}class B extends D{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends D{constructor(t){super(),this.children=t,this.leaf=!1}}export{C as h}; diff --git a/build/assets/QueryEngine-CI3mggax.js b/build/assets/QueryEngine-CI3mggax.js new file mode 100644 index 0000000..34d70d7 --- /dev/null +++ b/build/assets/QueryEngine-CI3mggax.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/geometryEngineWorker-ClddcLz0.js","assets/geometryEngineBase-RmbNeFm7.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/json-Wa8cmqdu.js"])))=>i.map(i=>d[i]); +import{e as B,a as Mt}from"./OptimizedFeature-DDMKj8Vq.js";import{dt as kt,iy as Vt,ab as v,a2 as Qt,iz as ht,ad as Oe,du as dt,O as Ut,ce as qt,bR as j,dk as Qe,s as b,bF as Ue,dO as Ee,dP as Re,dV as ft,dW as mt,bP as qe,bO as de,iA as ze,_ as Pe,iB as zt,iC as Se,iD as jt,iE as Zt,$ as le,a_ as Bt,dh as Fe,hY as z,az as te,aB as Yt,bp as Ht,iF as Wt,aa as Jt,bD as je,iG as Xt,iH as Kt,iI as es,iJ as ts,aH as ss,fz as pt,bX as oe,bY as is,B as fe,D as Ze,E as rs,bw as as,iK as me,b5 as pe,bx as ns,fx as ls,bU as we,dn as C,V as os,iL as us,by as cs,iM as hs,iN as ds,iO as fs,hX as ms,bE as ps,ft as gs,iP as $,c7 as ys,iQ as _s,b0 as Is,fT as Ts,d3 as ge,b6 as xs,iR as Es,aF as Be,hZ as Rs,b3 as Ss,fR as Fs,b7 as ws}from"./index-DKOmzAMm.js";import{R as be}from"./normalizeUtils-DIcj7CYy.js";import{I as bs,x as Ae,$ as As,H as Ns,U as $s,a as Ne,h as vs,K as Ye,o as Cs}from"./featureConversionUtils-CCATessr.js";import{O as Os}from"./WhereClause-CILeHwR9.js";import{t as gt}from"./json-Wa8cmqdu.js";import{t as Ps}from"./QueryEngineCapabilities-CTDe3LlQ.js";import{w as Gs}from"./utils-CqM6vUbj.js";import{c as ye,B as Ds,d as He,p as We,C as Ls,k as Ms,$ as ks,E as Vs,P as Qs,U as Us,T as qs,v as zs,f as js}from"./utils-C0Bk6fkM.js";import{r as $e}from"./signal-swyOrDkM.js";const Je=new B,Zs=new B,ve=new B,G={esriGeometryPoint:Ae,esriGeometryPolyline:As,esriGeometryPolygon:Ns,esriGeometryMultipoint:$s};function _e(s,e,t,r=s.hasZ,a=s.hasM){if(e==null)return null;const i=s.hasZ&&r,n=s.hasM&&a;if(t){const l=Ne(ve,e,s.hasZ,s.hasM,"esriGeometryPoint",t,r,a);return Ae(l,i,n)}return Ae(e,i,n)}function L(s,e,t,r,a,i,n=e,l=t){var h,d,f;const o=e&&n,u=t&&l,c=r!=null?"coords"in r?r:r.geometry:null;if(c==null)return null;if(a){let p=vs(Zs,c,e,t,s,a,n,l);return i&&(p=Ne(ve,p,o,u,s,i)),((h=G[s])==null?void 0:h.call(G,p,o,u))??null}if(i){const p=Ne(ve,c,e,t,s,i,n,l);return((d=G[s])==null?void 0:d.call(G,p,o,u))??null}return bs(Je,c,e,t,n,l),((f=G[s])==null?void 0:f.call(G,Je,o,u))??null}function K(s){return s&&yt in s?JSON.parse(JSON.stringify(s,Bs)):s}const yt="_geVersion",Bs=(s,e)=>s!==yt?e:void 0;function Ge(s,e){return s?e?4:3:e?3:2}function Ys(s,e,t,r){if(!(e!=null&&e.lengths.length))return null;s.lengths.length&&(s.lengths.length=0),s.coords.length&&(s.coords.length=0);const a=s.coords,i=[],n=t?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:l,coords:o}=e,u=Ge(t,r);let c=0;for(const h of l){const d=Hs(n,o,c,h,t,r);d&&i.push(d),c+=h*u}if(i.sort((h,d)=>{let f=h[2]-d[2];return f===0&&t&&(f=h[4]-d[4]),f}),i.length){let h=6*i[0][2];a[0]=i[0][0]/h,a[1]=i[0][1]/h,t&&(h=6*i[0][4],a[2]=h!==0?i[0][3]/h:0),(a[0]n[1]||a[1]n[3]||t&&(a[2]n[5]))&&(a.length=0)}if(!a.length){const h=e.lengths[0]?Ws(o,0,l[0],t,r):null;if(!h)return null;a[0]=h[0],a[1]=h[1],t&&h.length>2&&(a[2]=h[2])}return s}function Hs(s,e,t,r,a,i){const n=Ge(a,i);let l=t,o=t+n,u=0,c=0,h=0,d=0,f=0;for(let m=0,x=r-1;ms[1]&&(s[1]=y),Es[3]&&(s[3]=E),a&&(Ss[5]&&(s[5]=S))}if(d>0&&(d*=-1),f>0&&(f*=-1),!d)return null;const p=[u,c,.5*d];return a&&(p[3]=h,p[4]=.5*f),p}function Ws(s,e,t,r,a){const i=Ge(r,a);let n=e,l=e+i,o=0,u=0,c=0,h=0;for(let d=0,f=t-1;d0?r?[u/o,c/o,h/o]:[u/o,c/o]:t>0?r?[s[e],s[e+1],s[e+2]]:[s[e],s[e+1]]:null}function Js(s,e,t,r){const a=t-s,i=r-e;return Math.sqrt(a*a+i*i)}function Xs(s,e,t,r,a,i){const n=r-s,l=a-e,o=i-t;return Math.sqrt(n*n+l*l+o*o)}function Ks(s,e,t,r){return[s+.5*(t-s),e+.5*(r-e)]}function ei(s,e,t,r,a,i){return[s+.5*(r-s),e+.5*(a-e),t+.5*(i-t)]}const tr={getObjectId:s=>s.objectId,getAttributes:s=>s.attributes,getAttribute:(s,e)=>s.attributes[e],cloneWithGeometry:(s,e)=>new Mt(e,s.attributes,null,s.objectId),getGeometry:s=>s.geometry,getCentroid:(s,e)=>(s.centroid==null&&(s.centroid=Ys(new B,s.geometry,e.hasZ,e.hasM)),s.centroid)},Ie=[0,0];function _t(s,e){if(!e)return null;if("x"in e){const t={x:0,y:0};return[t.x,t.y]=s(e.x,e.y,Ie),e.z!=null&&(t.z=e.z),e.m!=null&&(t.m=e.m),t}if("xmin"in e){const t={xmin:0,ymin:0,xmax:0,ymax:0};return[t.xmin,t.ymin]=s(e.xmin,e.ymin,Ie),[t.xmax,t.ymax]=s(e.xmax,e.ymax,Ie),e.hasZ&&(t.zmin=e.zmin,t.zmax=e.zmax,t.hasZ=!0),e.hasM&&(t.mmin=e.mmin,t.mmax=e.mmax,t.hasM=!0),t}return"rings"in e?{rings:Xe(e.rings,s),hasM:e.hasM,hasZ:e.hasZ}:"paths"in e?{paths:Xe(e.paths,s),hasM:e.hasM,hasZ:e.hasZ}:"points"in e?{points:It(e.points,s),hasM:e.hasM,hasZ:e.hasZ}:null}function Xe(s,e){const t=[];for(const r of s)t.push(It(r,e));return t}function It(s,e){const t=[];for(const r of s){const a=e(r[0],r[1],[0,0]);t.push(a),r.length>2&&a.push(r[2]),r.length>3&&a.push(r[3])}return t}async function H(s,e){if(!s||!e)return;const t=Array.isArray(s)?s.map(r=>r.geometry!=null?r.geometry.spatialReference:null).filter(Ut):[s];await qt(t.map(r=>({source:r,dest:e})))}const Tt=_t.bind(null,kt),xt=_t.bind(null,Vt);function D(s,e,t,r){if(!s||(t||(t=e,e=s.spatialReference),!j(e)||!j(t)||v(e,t)))return s;if(ht(e,t)){const a=Oe(t)?Tt(s):xt(s);return a.spatialReference=t,a}return dt(gt,[s],e,t,null,r)[0]}class ti{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,a){if(!(e!=null&&e.length)||!t||!r||v(t,r))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:r,geographicTransformation:a,resolve:Qt()};return this._jobs.push(i),this._timer??(this._timer=setTimeout(this._process,10)),i.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:r,outSpatialReference:a,resolve:i,geographicTransformation:n}=e;ht(r,a)?Oe(a)?i(t.map(Tt)):i(t.map(xt)):i(dt(gt,t,r,a,n,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}}const si=new ti;function ii(s,e,t,r){return si.push(s,e,t,r)}let ri=class{constructor(e,t){this._cache=new Qe(e),this._invalidCache=new Qe(t)}get(e,t){const r=`${t.uid}:${e}`,a=this._cache.get(r);if(a)return a;if(this._invalidCache.get(r)!=null)return null;try{const i=Os.create(e,t);return this._cache.put(r,i),i}catch(i){return this._invalidCache.put(r,i),null}}getError(e,t){const r=`${t.uid}:${e}`;return this._invalidCache.get(r)??null}};const Et=new ri(50,500),ee="unsupported-query",Rt=" as ",St=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),Ft=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),ai=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...St,...Ft]);function De(s,e,t={}){const r=q(e,s);if(!r){const i=Et.getError(e,s);throw new b(ee,"invalid SQL expression",{expression:e,error:i})}const a=t.expressionName||"expression";if(t.validateStandardized&&!r.isStandardized)throw new b(ee,`${a} is not standard`,{expression:e});if(t.validateAggregate&&!r.isAggregate)throw new b(ee,`${a} does not contain a valid aggregate function`,{expression:e});return r.fieldNames}function ni(s,e,t,r){if(!t)return!0;const a="where clause";return Q(s,e,De(s,t,{validateStandardized:!0,expressionName:a}),{expressionName:a,query:r}),!0}function li(s,e,t,r,a){if(!t)return!0;const i="having clause",n=De(s,t,{validateAggregate:!0,expressionName:i});Q(s,e,n,{expressionName:i,query:a});const l=q(t,s);if(!(l==null?void 0:l.getExpressions().every(u=>{var f;const{aggregateType:c,field:h}=u,d=(f=s.get(h))==null?void 0:f.name;return r.some(p=>{var E;const{onStatisticField:m,statisticType:x}=p;return((E=s.get(m))==null?void 0:E.name)===d&&x.toLowerCase().trim()===c})})))throw new b(ee,"expressions in having clause should also exist in outStatistics",{having:t});return!0}function q(s,e){return s?Et.get(s,e):null}function wt(s){return/\((.*?)\)/.test(s)?s:s.split(Rt)[0]}function oi(s){return s.split(Rt)[1]}function Q(s,e,t,r={}){const a=new Map;if(ui(a,s,e,r.allowedFieldTypes??ai,t),a.size){const i=r.expressionName??"expression";throw new b(ee,`${i} contains invalid or missing fields`,{errors:Array.from(a.values()),query:r.query})}}function ui(s,e,t,r,a){const i=a.includes("*")?[...t,...a.filter(n=>n!=="*")]:a;for(const n of i)if(e.get(n))Ke(s,e,t,r,n);else try{const l=De(e,wt(n),{validateStandardized:!0});for(const o of l)Ke(s,e,t,r,o)}catch(l){s.set(n,{type:"expression-error",expression:n,error:l})}}function Ke(s,e,t,r,a){const i=e.get(a);i?t.has(i.name)?r!=="all"&&(r==null?void 0:r.has(i.type))===!1&&s.set(a,{type:"invalid-type",fieldName:i.name,fieldType:Ue.fromJSON(i.type),allowedFieldTypes:Array.from(r,n=>Ue.fromJSON(n))}):s.set(a,{type:"missing-field",fieldName:i.name}):s.set(a,{type:"invalid-field",fieldName:a})}let ne=class{constructor(e,t,r){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=r,this.featureAdapter=t;const a=e.outFields;if(a&&!a.includes("*")){this.outFields=a;let i=0;for(const n of a){const l=wt(n),o=this.fieldsIndex.get(l),u=o?null:q(l,r),c=o?o.name:oi(n)||"FIELD_EXP_"+i++;this._fieldDataCache.set(n,{alias:c,clause:u})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(t=>this.getAttributes(t)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,r){var n;const a=r?r.name:t;let i=null;return this._fieldDataCache.has(a)?i=(n=this._fieldDataCache.get(a))==null?void 0:n.clause:r||(i=q(t,this.fieldsIndex),this._fieldDataCache.set(a,{alias:a,clause:i})),r?this.featureAdapter.getAttribute(e,a):i==null?void 0:i.calculateValue(e,this.featureAdapter)}getDataValues(e,t,r=!0){const a=t.normalizationType,i=t.normalizationTotal,n=this.fieldsIndex.get(t.field),l=Ee(n)||Re(n),o=ft(n);return e.map(u=>{let c=t.field&&this.getFieldValue(u,t.field,this.fieldsIndex.get(t.field));if(t.field2?(c=`${ye(c)}${t.fieldDelimiter}${ye(this.getFieldValue(u,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(c=`${c}${t.fieldDelimiter}${ye(this.getFieldValue(u,t.field3,this.fieldsIndex.get(t.field3)))}`)):typeof c=="string"&&r&&(l?c=c?new Date(c).getTime():null:o&&(c=c?Gs(c):null)),a&&Number.isFinite(c)){const h=a==="field"&&t.normalizationField?this.getFieldValue(u,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;c=Ds(c,a,h,i)}return c})}async getExpressionValues(e,t,r,a,i){const{arcadeUtils:n}=await mt(),l=n.hasGeometryOperations(t);l&&await n.enableGeometryOperations();const o=n.createFunction(t),u=n.getViewInfo(r),c={fields:this.fieldsIndex.fields};return e.map(h=>{const d={attributes:this.featureAdapter.getAttributes(h),layer:c,geometry:l?{...L(a.geometryType,a.hasZ,a.hasM,this.featureAdapter.getGeometry(h)),spatialReference:r==null?void 0:r.spatialReference}:null},f=n.createExecContext(d,u,i);return n.executeFunction(o,f)})}validateItem(e,t){var r,a;return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:q(t,this.fieldsIndex)}),((a=(r=this._fieldDataCache.get(t))==null?void 0:r.clause)==null?void 0:a.testFeature(e,this.featureAdapter))??!1}validateItems(e,t){var r,a;return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:q(t,this.fieldsIndex)}),((a=(r=this._fieldDataCache.get(t))==null?void 0:r.clause)==null?void 0:a.testSet(e,this.featureAdapter))??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!(t!=null&&t.length))return this.featureAdapter.getAttributes(e);const r={};for(const a of t){const{alias:i,clause:n}=this._fieldDataCache.get(a);r[i]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,i)}return r}_processAttributesForDistinctValues(e){if(e==null||!this.returnDistinctValues)return e;const t=this.outFields,r=[];if(t)for(const n of t){const{alias:l}=this._fieldDataCache.get(n);r.push(e[l])}else for(const n in e)r.push(e[n]);const a=`${(t||["*"]).join(",")}=${r.join(",")}`;let i=this._returnDistinctMap.get(a)||0;return this._returnDistinctMap.set(a,++i),i>1?null:e}};function et(s,e,t){return{objectId:s,target:e,distance:t,type:"vertex"}}function ci(s,e,t,r,a,i=!1){return{objectId:s,target:e,distance:t,type:"edge",start:r,end:a,draped:i}}class A{constructor(e,t,r){this.items=e,this.query=t,this.geometryType=r.geometryType,this.hasM=r.hasM,this.hasZ=r.hasZ,this.fieldsIndex=r.fieldsIndex,this.objectIdField=r.objectIdField,this.spatialReference=r.spatialReference,this.featureAdapter=r.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new ne(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:r,outStatistics:a}=this.query;if(!(t==null?void 0:t.length))return 1;const n=new Map,l=new Map,o=new Set;for(const u of a){const{statisticType:c}=u,h=c!=="exceedslimit"?u.onStatisticField:void 0;if(!l.has(h)){const f=[];for(const p of t){const m=this._getAttributeValues(e,p,n);f.push(m)}l.set(h,this._calculateUniqueValues(f,e.returnDistinctValues))}const d=l.get(h);for(const f in d){const{data:p,items:m}=d[f],x=p.join(",");r&&!e.validateItems(m,r)||o.add(x)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics?e=this.query.outStatistics.some(t=>t.statisticType==="exceedslimit")?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):e=this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;j(this.query.outSR)&&!v(t.spatialReference,this.query.outSR)?e.queryGeometry=K({spatialReference:this.query.outSR,...D(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=K({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const r=this.featureAdapter,a=tt(this.hasZ,this.hasM),{point:i,mode:n}=e,l=typeof e.distance=="number"?e.distance:e.distance.x,o=typeof e.distance=="number"?e.distance:e.distance.y,u={candidates:[]},c=this.geometryType==="esriGeometryPolygon",h=this._getPointCreator(n,this.spatialReference,t),d=new st(null,0),f=new st(null,0),p={x:0,y:0,z:0};for(const m of this.items){const x=r.getGeometry(m);if(x==null)continue;const{coords:y,lengths:E}=x;if(d.coords=y,f.coords=y,e.returnEdge){let S=0;for(let g=0;gm.distance-x.distance),u}_getPointCreator(e,t,r){const a=r==null||v(t,r)?l=>l:l=>D(l,t,r),{hasZ:i}=this,n=0;return e==="3d"?i?({x:l,y:o,z:u})=>a({x:l,y:o,z:u}):({x:l,y:o})=>a({x:l,y:o,z:n}):({x:l,y:o})=>a({x:l,y:o})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,minValue:l,maxValue:o,scale:u,timeZone:c}=e,h=this.fieldsIndex.get(t),d=qe(h)||Ee(h)||Re(h),f=await this._getDataValues({field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,scale:u,timeZone:c}),p=js({normalizationType:i,normalizationField:a,minValue:l,maxValue:o}),m={value:.5,fieldType:h==null?void 0:h.type},x=de(h)?He({values:f,supportsNullCount:p,percentileParams:m}):We({values:f,minValue:l,maxValue:o,useSampleStdDev:!i,supportsNullCount:p,percentileParams:m});return Ls(x,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:r,domains:a,returnAllCodedValues:i,scale:n,timeZone:l}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:r,scale:n,timeZone:l},!1),u=Ms(o);return ks(u,a,i,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,classificationMethod:l,standardDeviationInterval:o,minValue:u,maxValue:c,numClasses:h,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,scale:d,timeZone:f}),m=Vs(p,{field:t,normalizationField:a,normalizationType:i,normalizationTotal:n,classificationMethod:l,standardDeviationInterval:o,minValue:u,maxValue:c,numClasses:h});return Qs(m,l)}async createHistogramResponse(e){const{field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,classificationMethod:l,standardDeviationInterval:o,minValue:u,maxValue:c,numBins:h,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:r,normalizationField:a,normalizationType:i,normalizationTotal:n,scale:d,timeZone:f});return Us(p,{field:t,normalizationField:a,normalizationType:i,normalizationTotal:n,classificationMethod:l,standardDeviationInterval:o,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,r){if(e.length>1&&(t!=null&&t.length))for(const a of t.reverse()){const i=a.split(" "),n=i[0],l=this.fieldsIndex.get(n),o=!!i[1]&&i[1].toLowerCase()==="desc",u=qs(l==null?void 0:l.type,o);e.sort((c,h)=>{const d=r(c,n,l),f=r(h,n,l);return u(d,f)})}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:r,hasM:a,hasZ:i,objectIdField:n,spatialReference:l}=this,{outFields:o,outSR:u,quantizationParameters:c,resultRecordCount:h,resultOffset:d,returnZ:f,returnM:p}=e,m=h!=null&&t.length>(d||0)+h,x=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map(y=>this.fieldsIndex.get(y)));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:x,geometryType:r,hasM:a&&p,hasZ:i&&f,objectIdFieldName:n,spatialReference:K(u||l),transform:c&&ze(c)||null}}_createFeatures(e,t){const r=new ne(e,this.featureAdapter,this.fieldsIndex),{hasM:a,hasZ:i}=this,{orderByFields:n,quantizationParameters:l,returnGeometry:o,returnCentroid:u,maxAllowableOffset:c,resultOffset:h,resultRecordCount:d,returnZ:f=!1,returnM:p=!1}=e,m=i&&f,x=a&&p;let y=[],E=0;const S=[...t];if(this._sortFeatures(S,n,(_,R,I)=>r.getFieldValue(_,R,I)),this.geometryType&&(o||u)){const _=ze(l)??void 0,R=this.geometryType==="esriGeometryPolygon"||this.geometryType==="esriGeometryPolyline";if(o&&!u)for(const I of S){const F=this.featureAdapter.getGeometry(I),w={attributes:r.getAttributes(I),geometry:L(this.geometryType,this.hasZ,this.hasM,F,c,_,m,x)};R&&F&&!w.geometry&&(w.centroid=_e(this,this.featureAdapter.getCentroid(I,this),_)),y[E++]=w}else if(!o&&u)for(const I of S)y[E++]={attributes:r.getAttributes(I),centroid:_e(this,this.featureAdapter.getCentroid(I,this),_)};else for(const I of S)y[E++]={attributes:r.getAttributes(I),centroid:_e(this,this.featureAdapter.getCentroid(I,this),_),geometry:L(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(I),c,_,m,x)}}else for(const _ of S){const R=r.getAttributes(_);R&&(y[E++]={attributes:R})}const g=h||0;if(d!=null){const _=g+d;y=y.slice(g,Math.min(y.length,_))}return y}_createExceedsLimitQueryResponse(e){let t=!1,r=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const n of e.outStatistics??[])if(n.statisticType==="exceedslimit"){r=n.maxPointCount!=null?n.maxPointCount:Number.POSITIVE_INFINITY,a=n.maxRecordCount!=null?n.maxRecordCount:Number.POSITIVE_INFINITY,i=n.maxVertexCount!=null?n.maxVertexCount:Number.POSITIVE_INFINITY;break}if(this.geometryType==="esriGeometryPoint")t=this.items.length>r;else if(this.items.length>a)t=!0;else{const n=tt(this.hasZ,this.hasM),l=this.featureAdapter;t=this.items.reduce((o,u)=>{const c=l.getGeometry(u);return o+(c!=null&&c.coords.length||0)},0)/n>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){var S;const t={attributes:{}},r=[],a=new Map,i=new Map,n=new Map,l=new Map,o=new ne(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:h,orderByFields:d,resultRecordCount:f}=e,p=c==null?void 0:c.length,m=!!p,x=m?c[0]:null,y=m&&!this.fieldsIndex.get(x);for(const g of u??[]){const{outStatisticFieldName:_,statisticType:R}=g,I=g,F=R!=="exceedslimit"?g.onStatisticField:void 0,w=R==="percentile_disc"||R==="percentile_cont",P=R==="EnvelopeAggregate"||R==="CentroidAggregate"||R==="ConvexHullAggregate",se=m&&p===1&&(F===x||y)&&R==="count";if(m){if(!n.has(F)){const re=[];for(const he of c){const ae=this._getAttributeValues(o,he,a);re.push(ae)}n.set(F,this._calculateUniqueValues(re,!P&&o.returnDistinctValues))}const M=n.get(F);if(!M)continue;const ce=Object.keys(M);for(const re of ce){const{count:he,data:ae,items:Me,itemPositions:Gt}=M[re],ke=ae.join(",");if(!h||o.validateItems(Me,h)){const Z=l.get(ke)||{attributes:{}};if(P){Z.aggregateGeometries||(Z.aggregateGeometries={});const{aggregateGeometries:k,outStatisticFieldName:W}=await this._getAggregateGeometry(I,Me);Z.aggregateGeometries[W]=k}else{let k=null;if(se)k=he;else{const W=this._getAttributeValues(o,F,a),Ve=Gt.map(Lt=>W[Lt]);k=w&&"statisticParameters"in I?this._getPercentileValue(I,Ve):this._getStatisticValue(I,Ve,null,o.returnDistinctValues)}Z.attributes[_]=k}let Dt=0;c.forEach((k,W)=>Z.attributes[this.fieldsIndex.get(k)?k:"EXPR_"+ ++Dt]=ae[W]),l.set(ke,Z)}}}else if(P){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:M,outStatisticFieldName:ce}=await this._getAggregateGeometry(I,this.items);t.aggregateGeometries[ce]=M}else{const M=this._getAttributeValues(o,F,a);t.attributes[_]=w&&"statisticParameters"in I?this._getPercentileValue(I,M):this._getStatisticValue(I,M,i,o.returnDistinctValues)}const ie=R!=="min"&&R!=="max"||!de(this.fieldsIndex.get(F))&&!this._isAnyDateField(F)?null:(S=this.fieldsIndex.get(F))==null?void 0:S.type;r.push({name:_,alias:_,type:ie||"esriFieldTypeDouble"})}const E=m?Array.from(l.values()):[t];return this._sortFeatures(E,d,(g,_)=>g.attributes[_]),f&&(E.length=Math.min(f,E.length)),{fields:r,features:E}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return qe(t)||Ee(t)||Re(t)||ft(t)}async _getAggregateGeometry(e,t){const{convexHull:r,union:a}=await Pe(()=>import("./geometryEngineWorker-ClddcLz0.js").then(m=>m.g),__vite__mapDeps([0,1,2,3])),{statisticType:i,outStatisticFieldName:n}=e,{featureAdapter:l,spatialReference:o,geometryType:u,hasZ:c,hasM:h}=this,d=t.map(m=>L(u,c,h,l.getGeometry(m))),f=r(o,d,!0)[0],p={aggregateGeometries:null,outStatisticFieldName:null};if(i==="EnvelopeAggregate"){const m=f?zt(f):Se(a(o,d));p.aggregateGeometries={...m,spatialReference:o},p.outStatisticFieldName=n||"extent"}else if(i==="CentroidAggregate"){const m=f?jt(f):Zt(Se(a(o,d)));p.aggregateGeometries={x:m[0],y:m[1],spatialReference:o},p.outStatisticFieldName=n||"centroid"}else i==="ConvexHullAggregate"&&(p.aggregateGeometries=f,p.outStatisticFieldName=n||"convexHull");return p}_getStatisticValue(e,t,r,a){const{onStatisticField:i,statisticType:n}=e;let l=null;return l=r!=null&&r.has(i)?r.get(i):de(this.fieldsIndex.get(i))||this._isAnyDateField(i)?He({values:t,returnDistinct:a}):We({values:a?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),r&&r.set(i,l),l[n==="var"?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:r,statisticParameters:a,statisticType:i}=e,{value:n,orderBy:l}=a,o=this.fieldsIndex.get(r);return zs(t,{value:n,orderBy:l,fieldType:o==null?void 0:o.type,isDiscrete:i==="percentile_disc"})}_getAttributeValues(e,t,r){if(r.has(t))return r.get(t);const a=this.fieldsIndex.get(t),i=this.items.map(n=>e.getFieldValue(n,t,a));return r.set(t,i),i}_calculateUniqueValues(e,t){const r={},a=this.items,i=a.length;for(let n=0;nD(r,je));return(await pi())(n.spatialReference,n,e,i)}async function pi(){return(await Pe(async()=>{const{geodesicBuffer:s}=await import("./geometryEngineWorker-ClddcLz0.js").then(e=>e.g);return{geodesicBuffer:s}},__vite__mapDeps([0,1,2,3]))).geodesicBuffer}function gi(s){return s==="mesh"?Xt:Kt(s)}function Nt(s,e){return s?e?4:3:e?3:2}function yi(s,e,t,r){return $t(s,e,t,r.coords[0],r.coords[1])}function _i(s,e,t,r,a,i){const n=Nt(a,i),{coords:l,lengths:o}=r;if(!o)return!1;for(let u=0,c=0;u=n||p=n)&&h+(n-d)/(p-d)*(f-h)import("./geometryEngineWorker-ClddcLz0.js").then(s=>s.g),__vite__mapDeps([0,1,2,3]))}function J(s,e,t,r,a){if(te(e)&&t==="esriGeometryPoint"&&(s==="esriSpatialRelIntersects"||s==="esriSpatialRelContains")){const i=Ye(new B,e,!1,!1);return Promise.resolve(n=>yi(i,!1,!1,n))}if(te(e)&&t==="esriGeometryMultipoint"){const i=Ye(new B,e,!1,!1);if(s==="esriSpatialRelContains")return Promise.resolve(n=>_i(i,!1,!1,n,r,a))}if(z(e)&&t==="esriGeometryPoint"&&(s==="esriSpatialRelIntersects"||s==="esriSpatialRelContains"))return Promise.resolve(i=>es(e,L(t,r,a,i)));if(z(e)&&t==="esriGeometryMultipoint"&&s==="esriSpatialRelContains")return Promise.resolve(i=>ts(e,L(t,r,a,i)));if(z(e)&&s==="esriSpatialRelIntersects"){const i=gi(t);return Promise.resolve(n=>i(e,L(t,r,a,n)))}return Si().then(i=>{const n=i[Ti[s]].bind(null,e.spatialReference,e);return l=>n(L(t,r,a,l))})}async function vt(s,e,t){var i;const{spatialRel:r,geometry:a}=s;if(a){if(!xi(r))throw new b(Te,"Unsupported query spatial relationship",{query:s});if(j(a.spatialReference)&&j(t)){if(!Ei(a))throw new b(Te,"Unsupported query geometry type",{query:s});if(!Ri(e))throw new b(Te,"Unsupported layer geometry type",{query:s});if(s.outSR)return H((i=s.geometry)==null?void 0:i.spatialReference,s.outSR)}}}function Ct(s){if(z(s))return!0;if(te(s)){for(const e of s.rings)if(e.length!==5||e[0][0]!==e[1][0]||e[0][0]!==e[4][0]||e[2][0]!==e[3][0]||e[0][1]!==e[3][1]||e[0][1]!==e[4][1]||e[1][1]!==e[2][1])return!1;return!0}return!1}const Y="unsupported-query";async function rt(s,{fieldsIndex:e,geometryType:t,spatialReference:r,availableFields:a}){if((s.distance??0)<0||s.geometryPrecision!=null||s.multipatchOption&&s.multipatchOption!=="xyFootprint"||s.pixelSize||s.relationParam||s.text)throw new b(Y,"Unsupported query options",{query:s});return Ot(e,a,s),wi(e,a,s),Promise.all([vt(s,t,r),H(r,s.outSR)]).then(()=>s)}function Ot(s,e,t){const{outFields:r,orderByFields:a,returnDistinctValues:i,outStatistics:n}=t,l=n?n.map(o=>o.outStatisticFieldName&&o.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if(a&&a.length>0){const o=" asc",u=" desc",c=a.map(h=>{const d=h.toLowerCase();return d.includes(o)?d.split(o)[0]:d.includes(u)?d.split(u)[0]:h}).filter(h=>!l.includes(h));Q(s,e,c,{expressionName:"orderByFields",query:t})}if(r&&r.length>0)Q(s,e,r,{expressionName:"outFields",query:t,allowedFieldTypes:"all"});else if(i)throw new b(Y,"outFields should be specified for returnDistinctValues",{query:t});ni(s,e,t.where,t)}const Fi=new Set([...St,...Ft]);function wi(s,e,t){const{outStatistics:r,groupByFieldsForStatistics:a,having:i}=t,n=a==null?void 0:a.length,l=r==null?void 0:r.length;if(i){if(!n||!l)throw new b(Y,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:t});li(s,e,i,r,t)}if(l){if(!Ni(r))return;const o=r.map(u=>u.onStatisticField).filter(Boolean);Q(s,e,o,{expressionName:"onStatisticFields",query:t}),n&&Q(s,e,a,{expressionName:"groupByFieldsForStatistics",query:t});for(const u of r){const{onStatisticField:c,statisticType:h}=u;if((h==="percentile_disc"||h==="percentile_cont")&&"statisticParameters"in u){const{statisticParameters:d}=u;if(!d)throw new b(Y,"statisticParameters should be set for percentile type",{definition:u,query:t})}else s.get(c)&&h!=="count"&&h!=="min"&&h!=="max"&&Q(s,e,[c],{expressionName:`outStatistics with '${h}' statistic type`,allowedFieldTypes:Fi,query:t})}}}async function bi(s,e,{fieldsIndex:t,geometryType:r,spatialReference:a,availableFields:i}){if((s.distance??0)<0||s.geometryPrecision!=null||s.multipatchOption||s.pixelSize||s.relationParam||s.text||s.outStatistics||s.groupByFieldsForStatistics||s.having||s.orderByFields)throw new b(Y,"Unsupported query options",{query:s});return Ot(t,i,s),Promise.all([Ai(t,i,e,s),vt(s,r,a),H(a,s.outSR)]).then(()=>s)}async function Ai(s,e,t,r){let a=[];if(t.valueExpression){const{arcadeUtils:i}=await mt();a=i.extractFieldNames(t.valueExpression)}if(t.field&&a.push(t.field),t.field2&&a.push(t.field2),t.field3&&a.push(t.field3),t.normalizationField&&a.push(t.normalizationField),!a.length&&!t.valueExpression)throw new b(Y,"field or valueExpression is required",{params:t});Q(s,e,a,{expressionName:"statistics",query:r})}function Ni(s){return s!=null&&s.every(e=>e.statisticType!=="exceedslimit")}async function $i(s,e){if(!s)return null;const t=e.featureAdapter,{startTimeField:r,endTimeField:a}=s;let i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;if(r&&a)await e.forEach(l=>{const o=t.getAttribute(l,r),u=t.getAttribute(l,a);o==null||isNaN(o)||(i=Math.min(i,o)),u==null||isNaN(u)||(n=Math.max(n,u))});else{const l=r||a;await e.forEach(o=>{const u=t.getAttribute(o,l);u==null||isNaN(u)||(i=Math.min(i,u),n=Math.max(n,u))})}return{start:i,end:n}}function vi(s,e,t){var o;if(!e||!s)return null;const{startTimeField:r,endTimeField:a}=s;if(!r&&!a)return null;const{start:i,end:n}=e;if(i===null&&n===null)return null;if(i===void 0&&n===void 0)return Pi();const l=((o=t.getAttributeAsTimestamp)==null?void 0:o.bind(t))??t.getAttribute.bind(t);return r&&a?Ci(l,r,a,i,n):Oi(l,r||a,i,n)}function Ci(s,e,t,r,a){return r!=null&&a!=null?i=>{const n=s(i,e),l=s(i,t);return(n==null||n<=a)&&(l==null||l>=r)}:r!=null?i=>{const n=s(i,t);return n==null||n>=r}:a!=null?i=>{const n=s(i,e);return n==null||n<=a}:void 0}function Oi(s,e,t,r){return t!=null&&r!=null&&t===r?a=>s(a,e)===t:t!=null&&r!=null?a=>{const i=s(a,e);return i!=null&&i>=t&&i<=r}:t!=null?a=>{const i=s(a,e);return i!=null&&i>=t}:r!=null?a=>{const i=s(a,e);return i!=null&&i<=r}:void 0}function Pi(){return()=>!1}const Pt=Symbol("Yield");class Gi{constructor(){this._tasks=new Array,this._runningTasks=$e(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(this.length===0)return Pt;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,r){return++this._runningTasks.value,new Promise((a,i)=>this._tasks.push(new at(a,i,e,t,r))).finally(()=>--this._runningTasks.value)}unshift(e,t,r){return++this._runningTasks.value,new Promise((a,i)=>this._tasks.unshift(new at(a,i,e,t,r))).finally(()=>--this._runningTasks.value)}_process(e){var r;if(this._tasks.length===0)return!1;const t=this._tasks.shift();try{const a=pt(t.signal);if(a&&!t.abortCallback)t.reject(oe());else{const i=a?(r=t.abortCallback)==null?void 0:r.call(t,oe()):t.callback(e);is(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(a){t.reject(a)}return!0}cancelAll(){const e=oe();for(const t of this._tasks)if(t.abortCallback){const r=t.abortCallback(e);t.resolve(r)}else t.reject(e);this._tasks.length=0}}class at{constructor(e,t,r,a=void 0,i=void 0){this.resolve=e,this.reject=t,this.callback=r,this.signal=a,this.abortCallback=i}}let X=class extends as{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};fe([Ze()],X.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),fe([Ze()],X.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),X=fe([rs("esri.views.support.debugFlags")],X);const Di=new X;var N;(function(s){s[s.ANIMATING=0]="ANIMATING",s[s.INTERACTING=1]="INTERACTING",s[s.IDLE=2]="IDLE"})(N||(N={}));var T;(function(s){s.RESOURCE_CONTROLLER_IMMEDIATE="immediate",s.RESOURCE_CONTROLLER="schedule",s.SLIDE="slide",s.STREAM_DATA_LOADER="stream loader",s.ELEVATION_QUERY="elevation query",s.TERRAIN_SURFACE="terrain",s.SURFACE_GEOMETRY_UPDATES="surface geometry updates",s.LOD_RENDERER="LoD renderer",s.GRAPHICS_CORE="Graphics3D",s.I3S_CONTROLLER="I3S",s.POINT_CLOUD_LAYER="point cloud",s.FEATURE_TILE_FETCHER="feature fetcher",s.OVERLAY="overlay",s.STAGE="stage",s.GRAPHICS_DECONFLICTOR="graphics deconflictor",s.FILTER_VISIBILITY="Graphics3D filter visibility",s.SCALE_VISIBILITY="Graphics3D scale visibility",s.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",s.POINT_OF_INTEREST_FREQUENT="POI frequent",s.POINT_OF_INTEREST_INFREQUENT="POI infrequent",s.LABELER="labeler",s.FEATURE_QUERY_ENGINE="feature query",s.FEATURE_TILE_TREE="feature tile tree",s.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",s.ELEVATION_ALIGNMENT="elevation alignment",s.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",s.TEXT_TEXTURE_ATLAS="text texture atlas",s.TEXTURE_UNLOAD="texture unload",s.LINE_OF_SIGHT_TOOL="line of sight tool",s.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",s.ELEVATION_PROFILE="elevation profile",s.SNAPPING="snapping",s.SHADOW_ACCUMULATOR="shadow accumulator",s.CLOUDS_GENERATOR="clouds generator",s[s.NONE=0]="NONE",s[s.TEST_PRIO=1]="TEST_PRIO"})(T||(T={}));const O=0,nt=new Map([[T.RESOURCE_CONTROLLER_IMMEDIATE,O],[T.RESOURCE_CONTROLLER,4],[T.SLIDE,O],[T.STREAM_DATA_LOADER,O],[T.ELEVATION_QUERY,O],[T.TERRAIN_SURFACE,1],[T.SURFACE_GEOMETRY_UPDATES,1],[T.LOD_RENDERER,2],[T.GRAPHICS_CORE,2],[T.I3S_CONTROLLER,2],[T.POINT_CLOUD_LAYER,2],[T.FEATURE_TILE_FETCHER,2],[T.OVERLAY,4],[T.STAGE,4],[T.GRAPHICS_DECONFLICTOR,4],[T.FILTER_VISIBILITY,4],[T.SCALE_VISIBILITY,4],[T.FRUSTUM_VISIBILITY,4],[T.CLOUDS_GENERATOR,4],[T.POINT_OF_INTEREST_FREQUENT,6],[T.POINT_OF_INTEREST_INFREQUENT,30],[T.LABELER,8],[T.FEATURE_QUERY_ENGINE,8],[T.FEATURE_TILE_TREE,16],[T.FEATURE_TILE_TREE_ACTIVE,O],[T.ELEVATION_ALIGNMENT,12],[T.ELEVATION_ALIGNMENT_SCENE,14],[T.TEXT_TEXTURE_ATLAS,12],[T.TEXTURE_UNLOAD,12],[T.LINE_OF_SIGHT_TOOL,16],[T.LINE_OF_SIGHT_TOOL_INTERACTIVE,O],[T.SNAPPING,O],[T.SHADOW_ACCUMULATOR,30]]);function lt(s){return nt.has(s)?nt.get(s):typeof s=="number"?s:1}const Li=C(6.5),ot=C(1),Mi=C(30),ki=C(1e3/30),Vi=C(100),ut=.9;var Ce,U;(function(s){class e{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(i=>i.needsUpdate)}constructor(){this._updating=$e(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new me("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new r,this._state=N.INTERACTING,this._tasks=new pe,this._runQueue=new pe,this._load=0,this._idleStateCallbacks=new pe,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=ns(()=>Di.SCHEDULER_LOG_SLOW_TASKS,i=>this._debug=i,ls);for(const i of Object.keys(T))this.performanceInfo.tasks.set(T[i],new me(T[i]))}destroy(){this._tasks.toArray().forEach(i=>i.remove()),this._tasks.clear(),we(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(i){this._updatingChanged(),i&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())}))}registerTask(i,n){const l=new t(this,i,n);return this._tasks.push(l),this._updatingChanged(),this.performanceInfo.tasks.has(i)||this.performanceInfo.tasks.set(i,new me(i)),l}registerIdleStateCallbacks(i,n){const l={idleBegin:i,idleEnd:n};this._idleStateCallbacks.push(l),this.state===N.IDLE&&this._idleUpdatesStartFired&&l.idleBegin();const o=this;return{remove:()=>this._removeIdleStateCallbacks(l),set idleBegin(u){o._idleUpdatesStartFired&&(l.idleEnd(),o._state===N.IDLE&&u()),l.idleBegin=u},set idleEnd(u){l.idleEnd=u}}}get load(){return this._load}set state(i){this._state!==i&&(this._state=i,this.state!==N.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll(n=>n.idleEnd())))}get state(){return this._state}updateBudget(i){++this._frameNumber;let n=Li,l=i.frameDuration,o=ot;switch(this.state){case N.IDLE:n=C(0),l=C(Math.max(Vi,i.frameDuration)),o=Mi;break;case N.INTERACTING:l=C(Math.max(ki,i.frameDuration));case N.ANIMATING:}return l=C(l-i.elapsedFrameTime-n),this.state!==N.IDLE&&li.idleBegin())),this._runIdle();break;case N.INTERACTING:this._runInteracting();break;default:this._runAnimating()}}stopFrame(){this._budget.reset(C(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(i){this._idleUpdatesStartFired&&i.idleEnd(),this._idleStateCallbacks.removeUnordered(i)}removeTask(i){this._tasks.removeUnordered(i),this._runQueue.removeUnordered(i),this._updatingChanged()}_updateTask(i){this._tasks.forAll(n=>{n.name===i&&n.setPriority(i)})}_getState(i){if(this._runQueue.some(l=>l.name===i))return U.SCHEDULED;let n=U.IDLE;return this._tasks.forAll(l=>{l.name===i&&l.needsUpdate&&(l.schedulePriority<=1?n=U.READY:n!==U.READY&&(n=U.WAITING))}),n}_getRuntime(i){let n=0;return this._tasks.forAll(l=>{l.name===i&&(n+=l.runtime)}),n}_resetRuntimes(){this._tasks.forAll(i=>i.runtime=0)}_getRunning(){const i=new Map;if(this._tasks.forAll(l=>{l.needsUpdate&&i.set(l.name,(i.get(l.name)||0)+1)}),i.size===0)return null;let n="";return i.forEach((l,o)=>{n+=l>1?` ${l}x ${o}`:` ${o}`}),n}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const i=this._tasks.reduce((n,l)=>l.needsUpdate?++n:n,0);this._load=this._load*ut+i*(1-ut)}_schedule(){for(this._runQueue.filterInPlace(i=>!!i.needsUpdate||(i.schedulePriority=i.basePriority,!1)),this._tasks.forAll(i=>{i.basePriority===O&&i.needsUpdate&&!this._runQueue.includes(i)&&i.blockFrame!==this._frameNumber&&this._runQueue.unshift(i)});this._runQueue.length===0;){let i=!1,n=0;if(this._tasks.forAll(l=>{l.needsUpdate&&l.schedulePriority!==0&&l.basePriority!==O&&l.blockFrame!==this._frameNumber&&(i=!0,n=Math.max(n,l.basePriority),l.schedulePriority===1?(l.schedulePriority=0,this._runQueue.push(l)):--l.schedulePriority)}),!i)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const i=this._budget.now();this._startFrameTaskTimes();do for(;this._runQueue.length>0;){const n=this._budget.now(),l=this._runQueue.pop();this._budget.resetProgress();try{l.task.runTask(this._budget)===Pt&&(l.blockFrame=this._frameNumber)}catch(u){os.getLogger("esri.views.support.Scheduler").error(`Exception in task "${l.name}"`,u),l.blockFrame=this._frameNumber}!this._budget.hasProgressed&&l.blockFrame!==this._frameNumber&&l.needsUpdate&&(l.name,T.I3S_CONTROLLER,l.blockFrame=this._frameNumber),l.schedulePriority=l.basePriority;const o=this._budget.now()-n;if(l.runtime+=o,this._frameTaskTimes.set(l.priority,this._frameTaskTimes.get(l.priority)+o),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-i)}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-i)}_startFrameTaskTimes(){for(const i of Object.keys(T))this._frameTaskTimes.set(T[i],0)}_recordFrameTaskTimes(i){this._frameTaskTimes.forEach((n,l)=>this.performanceInfo.tasks.get(l).record(n)),this.performanceInfo.total.record(i)}get test(){}}s.Scheduler=e;class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(i,n,l){this._scheduler=i,this.name=n,this.blockFrame=0,this.runtime=0,this._queue=new Gi,this._handles=new us,this._basePriority=lt(n),this.schedulePriority=this._basePriority,this._task=$e(l??this._queue),this._handles.add(cs(()=>this.task.running,o=>i.taskRunningChanged(o)))}remove(){this.processQueue(ue),this._scheduler.removeTask(this),this.schedule=ct.schedule,this.reschedule=ct.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(i){if(this.name===i)return;this.name=i;const n=lt(i);this._basePriority!==O&&this.schedulePriority===0||(this.schedulePriority=n),this._basePriority=n}get priority(){return this.name}set priority(i){this.setPriority(i)}get needsUpdate(){return this.updating||this.task.running}schedule(i,n,l){return this._queue.push(i,n,l)}reschedule(i,n,l){return this._queue.unshift(i,n,l)}processQueue(i){return this._queue.runTask(i)}}class r{constructor(){this._begin=typeof performance<"u"?performance.now():0,this._budget=0,this._state=N.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(i){return!this.done&&(i()===!0&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(i){this._enabled=i}reset(i,n){this._begin=this.now(),this._budget=i,this._state=n,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}s.Budget=r})(Ce||(Ce={})),function(s){s.SCHEDULED="s",s.READY="r",s.WAITING="w",s.IDLE="i"}(U||(U={}));const ue=(()=>{const s=new Ce.Budget;return s.enabled=!1,s})();class Qi{remove(){}processQueue(){}schedule(e,t,r){try{if(pt(t)){const a=oe();return r?Promise.resolve(r(a)):Promise.reject(a)}return hs(e(ue))}catch(a){return Promise.reject(a)}}reschedule(e,t,r){return this.schedule(e,t,r)}}const ct=new Qi,Ui="unsupported-query",qi=new ds(2e6);let zi=0;class ar{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:Ps},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",()=>this.clearCache()),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new fs(zi+++"$$",qi)),this.fieldsIndex=ms(e.fieldsIndex)?e.fieldsIndex:ps.fromJSON(e.fieldsIndex),!e.availableFields||e.availableFields.length===1&&e.availableFields[0]==="*"?this.availableFields=new Set(this.fieldsIndex.fields.map(t=>t.name)):this.availableFields=new Set(e.availableFields.map(t=>{var r;return(r=this.fieldsIndex.get(t))==null?void 0:r.name}).filter(t=>t!=null)),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=we(this._frameTask),this.clearCache(),gs(this._geometryQueryCache),this._changeHandle=we(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){var e;(e=this._geometryQueryCache)==null||e.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const r=$(t);try{return(await this._executeQuery(e,{},r)).createQueryResponse()}catch(a){if(a!==V)throw a;return new A([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const r=$(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},r)).createQueryResponseForCount()}catch(a){if(a!==V)throw a;return 0}}async executeQueryForExtent(e,t){const r=$(t),a=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},r),n=i.size;return n?{count:n,extent:await this._getBounds(i.items,i.spatialReference,a||this.spatialReference)}:{count:0,extent:null}}catch(i){if(i===V)return{count:0,extent:null};throw i}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then(r=>Array.from(r))}async executeQueryForIdSet(e,t){const r=$(t);try{const a=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},r),i=a.items,n=new Set;return await this._reschedule(()=>{for(const l of i)n.add(a.featureAdapter.getObjectId(l))},r),n}catch(a){if(a===V)return new Set;throw a}}async executeQueryForSnapping(e,t){const r=$(t),{point:a,distance:i,returnEdge:n,vertexMode:l}=e;if(!n&&l==="none")return{candidates:[]};let o=le(e.query);o=await this._schedule(()=>bt(o,this.definitionExpression,this.spatialReference),r),o=await this._reschedule(()=>rt(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),r);const u=!v(a.spatialReference,this.spatialReference);u&&await H(a.spatialReference,this.spatialReference);const c=typeof i=="number"?i:i.x,h=typeof i=="number"?i:i.y,d={xmin:a.x-c,xmax:a.x+c,ymin:a.y-h,ymax:a.y+h,spatialReference:a.spatialReference},f=u?D(d,this.spatialReference):d;if(!f)return{candidates:[]};const p=(await be(Fe(a),null,{signal:r}))[0],m=(await be(Fe(f),null,{signal:r}))[0];if(p==null||m==null)return{candidates:[]};const x=new A(await this._reschedule(()=>this._searchFeatures(xe(m.toJSON())),r),o,this);await this._reschedule(()=>this._executeObjectIdsQuery(x),r),await this._reschedule(()=>this._executeTimeQuery(x),r),await this._reschedule(()=>this._executeAttributesQuery(x),r),await this._reschedule(()=>this._executeGeometryQueryForSnapping(x,r),r);const y=p.toJSON(),E=u?D(y,this.spatialReference):y,S=u?Math.max(f.xmax-f.xmin,f.ymax-f.ymin)/2:i;return x.createSnappingResponse({...e,point:E,distance:S},a.spatialReference)}async executeQueryForLatestObservations(e,t){var a;const r=$(t);if(!((a=this.timeInfo)!=null&&a.trackIdField))throw new b(Ui,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const i=await this._executeQuery(e,{},r);return await this._reschedule(()=>this._filterLatest(i),r),i.createQueryResponse()}catch(i){if(i!==V)throw i;return new A([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,r){const a=$(r),{field:i,normalizationField:n,valueExpression:l}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:l},a)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,r){const a=$(r),{field:i,field2:n,field3:l,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:i,field2:n,field3:l,valueExpression:o},a)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,r){const a=$(r),{field:i,normalizationField:n,valueExpression:l}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:l},a)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,r){const a=$(r),{field:i,normalizationField:n,valueExpression:l}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:l},a)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=$(e);this._timeExtentPromise||(this._timeExtentPromise=$i(this.timeInfo,this.featureStore));const[r,a]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return ys(t),{fullExtent:r,timeExtent:a}}async _getBounds(e,t,r){const a=_s(Is(),Fs);await this.featureStore.forEachBounds(e,l=>Ts(a,l));const i={xmin:a[0],ymin:a[1],xmax:a[3],ymax:a[4],spatialReference:K(this.spatialReference)};this.hasZ&&isFinite(a[2])&&isFinite(a[5])&&(i.zmin=a[2],i.zmax=a[5],i.hasZ=!0);const n=D(i,t,r);if(n.spatialReference=K(r),n.xmax-n.xmin==0){const l=ge(n.spatialReference);n.xmin-=l,n.xmax+=l}if(n.ymax-n.ymin==0){const l=ge(n.spatialReference);n.ymin-=l,n.ymax+=l}if(this.hasZ&&n.zmin!=null&&n.zmax!=null&&n.zmax-n.zmin==0){const l=ge(n.spatialReference);n.zmin-=l,n.zmax+=l}return n}_getFullExtent(){return this._fullExtentPromise||(this._fullExtentPromise="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return this._frameTask!=null?this._frameTask.schedule(e,t):e(ue)}async _reschedule(e,t){return this._frameTask!=null?this._frameTask.reschedule(e,t):e(ue)}async _getAllFeaturesQueryEngineResult(e){return new A(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(this._allFeaturesPromise==null){const r=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach(a=>r.push(a))})().then(()=>r)}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,r){e=le(e),e=await this._schedule(()=>it(e,this.definitionExpression,this.spatialReference),r),e=await this._reschedule(()=>rt(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),r),e={...e,...t};const a=await this._reschedule(()=>this._executeSceneFilterQuery(e,r),r),i=await this._reschedule(()=>this._executeGeometryQuery(e,a,r),r);return await this._reschedule(()=>this._executeAggregateIdsQuery(i),r),await this._reschedule(()=>this._executeObjectIdsQuery(i),r),await this._reschedule(()=>this._executeTimeQuery(i),r),await this._reschedule(()=>this._executeAttributesQuery(i),r),i}async _executeSceneFilterQuery(e,t){if(e.sceneFilter==null)return null;const{outSR:r,returnGeometry:a,returnCentroid:i}=e,n=this.featureStore.featureSpatialReference,l=e.sceneFilter.geometry,o=n==null||v(n,l.spatialReference)?l:D(l,n);if(!o)return null;const u=a||i,c=j(r)&&!v(this.spatialReference,r)&&u?async m=>this._project(m,r):m=>m,h=this.featureAdapter,d=await this._reschedule(()=>this._searchFeatures(xe(o)),t);if(e.sceneFilter.spatialRelationship==="disjoint"){if(!d.length)return null;const m=new Set;for(const E of d)m.add(h.getObjectId(E));const x=await this._reschedule(()=>this._getAllFeatures(),t),y=await this._reschedule(async()=>{const E=await J("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),S=_=>!m.has(h.getObjectId(_))||E(h.getGeometry(_)),g=await this._runSpatialFilter(x,S,t);return new A(g,e,this)},t);return c(y)}if(!d.length)return new A([],e,this);if(this._canExecuteSinglePass(o,e))return c(new A(d,e,this));const f=await J("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this._runSpatialFilter(d,m=>f(h.getGeometry(m)),t);return c(new A(p,e,this))}async _executeGeometryQuery(e,t,r){if(t!=null&&t.items.length===0)return t;e=t!=null?t.query:e;const{geometry:a,outSR:i,spatialRel:n,returnGeometry:l,returnCentroid:o}=e,u=this.featureStore.featureSpatialReference,c=!a||u==null||v(u,a.spatialReference)?a:D(a,u),h=l||o,d=j(i)&&!v(this.spatialReference,i),f=this._geometryQueryCache&&t==null?JSON.stringify(d&&h?{originalFilterGeometry:a,spatialRelationship:n,outSpatialReference:i}:{originalFilterGeometry:a,spatialRelationship:n}):null,p=f?this._geometryQueryCache.get(f):null;if(p!=null)return new A(p,e,this);const m=async g=>(d&&h&&await this._project(g,i),f&&this._geometryQueryCache.put(f,g.items,g.items.length+1),g);if(!c)return m(t??await this._getAllFeaturesQueryEngineResult(e));const x=this.featureAdapter;let y=await this._reschedule(()=>this._searchFeatures(xe(a)),r);if(n==="esriSpatialRelDisjoint"){if(!y.length)return m(t??await this._getAllFeaturesQueryEngineResult(e));const g=new Set;for(const I of y)g.add(x.getObjectId(I));const _=t!=null?t.items:await this._reschedule(()=>this._getAllFeatures(),r),R=await this._reschedule(async()=>{const I=await J(n,c,this.geometryType,this.hasZ,this.hasM),F=P=>!g.has(x.getObjectId(P))||I(x.getGeometry(P)),w=await this._runSpatialFilter(_,F,r);return new A(w,e,this)},r);return m(R)}if(t!=null){const g=new ws;y=y.filter(_=>xs(t.items,_,t.items.length,g)>=0)}if(!y.length){const g=new A([],e,this);return f&&this._geometryQueryCache.put(f,g.items,1),g}if(this._canExecuteSinglePass(c,e))return m(new A(y,e,this));const E=await J(n,c,this.geometryType,this.hasZ,this.hasM),S=await this._runSpatialFilter(y,g=>E(x.getGeometry(g)),r);return m(new A(S,e,this))}async _executeGeometryQueryForSnapping(e,t){var l;const{query:r}=e,{spatialRel:a}=r;if(!((l=e==null?void 0:e.items)!=null&&l.length)||!r.geometry||!a)return;const i=await J(a,r.geometry,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(e.items,o=>i(o.geometry),t);e.items=n}_executeAggregateIdsQuery(e){var a;if(e.items.length===0||!((a=e.query.aggregateIds)!=null&&a.length)||this.aggregateAdapter==null)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(n=>t.add(n));const r=this.featureAdapter.getObjectId;e.items=e.items.filter(i=>t.has(r(i)))}_executeObjectIdsQuery(e){var a;if(e.items.length===0||!((a=e.query.objectIds)!=null&&a.length))return;const t=new Set(e.query.objectIds),r=this.featureAdapter.getObjectId;e.items=e.items.filter(i=>t.has(r(i)))}_executeTimeQuery(e){if(e.items.length===0)return;const t=vi(this.timeInfo,e.query.timeExtent,this.featureAdapter);t!=null&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(e.items.length===0)return;const t=q(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(r=>t.testFeature(r,this.featureAdapter))}}async _runSpatialFilter(e,t,r){if(!t)return e;if(this._frameTask==null)return e.filter(l=>t(l));let a=0;const i=new Array,n=async l=>{for(;an(u),r)}};return this._reschedule(l=>n(l),r).then(()=>i)}_filterLatest(e){const{trackIdField:t,startTimeField:r,endTimeField:a}=this.timeInfo,i=a||r,n=new Map,l=this.featureAdapter.getAttribute;for(const o of e.items){const u=l(o,t),c=l(o,i),h=n.get(u);(!h||c>l(h,i))&&n.set(u,o)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:r}=t;return Ct(e)&&(r==="esriSpatialRelEnvelopeIntersects"||this.geometryType==="esriGeometryPoint"&&(r==="esriSpatialRelIntersects"||r==="esriSpatialRelContains"))}async _project(e,t){if(!t||v(this.spatialReference,t))return e;const r=this.featureAdapter;let a;try{const n=await this._getFullExtent();a=Es(this.spatialReference,t,n)}catch{}const i=await ii(e.items.map(n=>L(this.geometryType,this.hasZ,this.hasM,r.getGeometry(n))),this.spatialReference,t,a);return e.items=i.map((n,l)=>r.cloneWithGeometry(e.items[l],Cs(n,this.hasZ,this.hasM))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(a=>this.featureStore.forEachInBounds(a,i=>t.add(i))));const r=Array.from(t.values());return t.clear(),r}async _executeQueryForStatistics(e,t,r){e=le(e);try{e=await this._schedule(()=>it(e,this.definitionExpression,this.spatialReference),r),e=await this._reschedule(()=>bi(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),r);const a=await this._reschedule(()=>this._executeSceneFilterQuery(e,r),r),i=await this._reschedule(()=>this._executeGeometryQuery(e,a,r),r);return await this._reschedule(()=>this._executeAggregateIdsQuery(i),r),await this._reschedule(()=>this._executeObjectIdsQuery(i),r),await this._reschedule(()=>this._executeTimeQuery(i),r),await this._reschedule(()=>this._executeAttributesQuery(i),r),i}catch(a){if(a!==V)throw a;return new A([],e,this)}}}function xe(s){if(Ct(s)){if(z(s))return[Be(Math.min(s.xmin,s.xmax),Math.min(s.ymin,s.ymax),Math.max(s.xmin,s.xmax),Math.max(s.ymin,s.ymax))];if(te(s))return s.rings.map(e=>Be(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[Rs(Ss(),s)]}export{ar as $,bt as a,K as h,D as j,Ys as n,tr as o,vi as t,J as v,H as x}; diff --git a/build/assets/QueryEngineCapabilities-CTDe3LlQ.js b/build/assets/QueryEngineCapabilities-CTDe3LlQ.js new file mode 100644 index 0000000..68f84d8 --- /dev/null +++ b/build/assets/QueryEngineCapabilities-CTDe3LlQ.js @@ -0,0 +1 @@ +const t={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0};export{t}; diff --git a/build/assets/QueryTask-CH4nGmOK.js b/build/assets/QueryTask-CH4nGmOK.js new file mode 100644 index 0000000..199d54b --- /dev/null +++ b/build/assets/QueryTask-CH4nGmOK.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/meshFeatureSet-x5YtiVvA.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/Mesh-DkA8R2dF.js","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/mat4f64-CSKppSlJ.js","assets/quat-BYKy26Om.js","assets/mat3f64-q3fE-ZOt.js","assets/quatf64-Bdb9ZJJK.js","assets/imageUtils-D81CeaJ0.js","assets/MeshVertexAttributes-CfiMg9vN.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/earcut-BqgeR2O3.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/DoubleArray-D2IDWC15.js","assets/Indices-BhOjxL0t.js","assets/plane-aHrUkISy.js","assets/vec2f64-DA6GkJuH.js","assets/deduplicate-B_YKqNj1.js","assets/projection-Ch_noS-l.js","assets/mat3-BNGRf_pC.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/BufferView-DOhKdt-N.js","assets/vec2-CurFBDJu.js","assets/vec3-C6eb5QY9.js","assets/vec4-n1PBj5SL.js","assets/vertexSpaceConversion-DdxiyRap.js","assets/executeRelationshipQuery-F8Fprdd-.js","assets/utils-CF4bGKhW.js","assets/query-CQvaiR4K.js","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-BCmi3vQB.js","assets/pbfQueryUtils-D2YxxSfN.js","assets/pbf-DwSF5Y_G.js","assets/OptimizedFeature-DDMKj8Vq.js","assets/OptimizedFeatureSet-Blu9Ckm7.js","assets/queryAttachments-yOc867_U.js","assets/AttachmentInfo-CQ7iJxR0.js","assets/executeTopFeaturesQuery-Bwk1xqdY.js","assets/queryTopFeatures-De5r1rPC.js","assets/executeForTopIds-BizsLta6.js","assets/executeForTopExtents-Bv6_wAbP.js","assets/executeForTopCount-SMa27mo0.js"])))=>i.map(i=>d[i]); +import{dK as _,aZ as T,B as n,D as l,dL as S,E as A,bw as N,I as Q,M as j,da as P,dM as p,_ as u,s as f,ab as q}from"./index-DKOmzAMm.js";import{u as h,i as y}from"./infoFor3D-DsOdlPuA.js";import{f as D}from"./utils-CF4bGKhW.js";import{a as L,b as J,c as $}from"./executeQueryJSON-CCbDrFwh.js";import{x as z}from"./query-CQvaiR4K.js";import{n as C}from"./executeQueryPBF-B-eLVWOv.js";async function U(e,t,r){const o=D(e),i=await z(o,_.from(t),{...r}),s=i.data.extent;return!s||isNaN(s.xmin)||isNaN(s.ymin)||isNaN(s.xmax)||isNaN(s.ymax)?{count:i.data.count,extent:null}:{count:i.data.count,extent:T.fromJSON(s)}}let a=class extends N{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return Q(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){var c;const r=this._normalizeQuery(e),o=((c=e.outStatistics)==null?void 0:c[0])!=null,i=j("featurelayer-pbf-statistics"),s=!o||i;let d;if(this.pbfSupported&&s)try{d=await C(this.url,r,t)}catch(m){if(m.name!=="query:parsing-pbf")throw m;this.pbfSupported=!1}return this.pbfSupported&&s||(d=await L(this.url,r,t)),this._normalizeFields(d.fields),d}async featureSetFromJSON(e,t,r){if(!this._queryIs3DObjectFormat(e)||this.infoFor3D==null||!t.features)return P.fromJSON(t);const{meshFeatureSetFromJSON:o}=await p(u(()=>import("./meshFeatureSet-x5YtiVvA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),r);return o(e,this.infoFor3D,t)}executeForCount(e,t){return J(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return U(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return $(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:r},{executeRelationshipQuery:o}]=await p(Promise.all([u(()=>import("./index-DKOmzAMm.js").then(i=>i.k4),__vite__mapDeps([1,2])),u(()=>import("./executeRelationshipQuery-F8Fprdd-.js"),__vite__mapDeps([30,31,1,2,32,33,34,35,36,37,38,39]))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:r},{executeRelationshipQueryForCount:o}]=await p(Promise.all([u(()=>import("./index-DKOmzAMm.js").then(i=>i.k4),__vite__mapDeps([1,2])),u(()=>import("./executeRelationshipQuery-F8Fprdd-.js"),__vite__mapDeps([30,31,1,2,32,33,34,35,36,37,38,39]))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),o(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:r,fetchAttachments:o,processAttachmentQueryResult:i}=await p(u(()=>import("./queryAttachments-yOc867_U.js"),__vite__mapDeps([40,1,2,32,33,34,31,35,36,37,38,39,41])),t),s=D(this.url);return i(s,await(this.queryAttachmentsSupported?r(s,e,t):o(s,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:r}=await p(u(()=>import("./executeTopFeaturesQuery-Bwk1xqdY.js"),__vite__mapDeps([42,31,1,2,43,33,34,35,32,36,37,38,39])),t);return r(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:r}=await p(u(()=>import("./executeForTopIds-BizsLta6.js"),__vite__mapDeps([44,31,1,2,43,33,34,35,32,36,37,38,39])),t);return r(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:r}=await p(u(()=>import("./executeForTopExtents-Bv6_wAbP.js"),__vite__mapDeps([45,1,2,31,43,33,34,35,32,36,37,38,39])),t);return r(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:r}=await p(u(()=>import("./executeForTopCount-SMa27mo0.js"),__vite__mapDeps([46,31,1,2,43,33,34,35,32,36,37,38,39])),t);return r(this.parsedUrl,e,t)}_normalizeQuery(e){let t=_.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?S.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(r!=null&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:o,queryFormats:i}=r,s=h("model/gltf-binary",o)??y("glb",o),d=h("model/gltf+json",o)??y("gltf",o);for(const c of i){if(c===s){t.formatOf3DObjects=c;break}c!==d||t.formatOf3DObjects||(t.formatOf3DObjects=c)}if(!t.formatOf3DObjects)throw new f("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!q(t.outSpatialReference,this.sourceSpatialReference))throw new f("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(t.outFields==null||!t.outFields.includes("*")){t=t===e?t.clone():t,t.outFields==null&&(t.outFields=[]);const{originX:c,originY:m,originZ:b,translationX:x,translationY:F,translationZ:O,scaleX:g,scaleY:R,scaleZ:E,rotationX:V,rotationY:I,rotationZ:v,rotationDeg:w}=r.transformFieldRoles;t.outFields.push(c,m,b,x,F,O,g,R,E,V,I,v,w)}}return t}_normalizeFields(e){if(this.fieldsIndex!=null&&e!=null)for(const t of e){const r=this.fieldsIndex.get(t.name);r&&Object.assign(t,r.toJSON())}}_queryIs3DObjectFormat(e){return this.infoFor3D!=null&&e.returnGeometry===!0&&e.multipatchOption!=="xyFootprint"&&!e.outStatistics}};n([l({type:S})],a.prototype,"dynamicDataSource",void 0),n([l()],a.prototype,"fieldsIndex",void 0),n([l()],a.prototype,"gdbVersion",void 0),n([l()],a.prototype,"infoFor3D",void 0),n([l({readOnly:!0})],a.prototype,"parsedUrl",null),n([l()],a.prototype,"pbfSupported",void 0),n([l()],a.prototype,"queryAttachmentsSupported",void 0),n([l()],a.prototype,"sourceSpatialReference",void 0),n([l({type:String})],a.prototype,"url",void 0),a=n([A("esri.layers.graphics.sources.support.QueryTask")],a);const M=a;export{M as x}; diff --git a/build/assets/QueueProcessor-DTdXzd4o.js b/build/assets/QueueProcessor-DTdXzd4o.js new file mode 100644 index 0000000..999e05e --- /dev/null +++ b/build/assets/QueueProcessor-DTdXzd4o.js @@ -0,0 +1 @@ +import{bT as d,bU as u,bV as g,bW as m,a2 as f,bX as l,bC as q,bY as v}from"./index-DKOmzAMm.js";import{s as n}from"./ReactiveMap-C7QHrros.js";import{r as I}from"./signal-swyOrDkM.js";class b{constructor(e,s){this.item=e,this.controller=s,this.promise=null}}class N{constructor(e){this._schedule=null,this._task=null,this._deferreds=new n,this._controllers=new n,this._processingItems=new n,this._pausedSignal=I(!1),this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new d(e.peeker),this.process=e.process;const s=e.scheduler;e.priority&&s&&(this._task=s.registerTask(e.priority,this))}destroy(){this.clear(),this._schedule=u(this._schedule),this._task=u(this._task)}get updating(){var e;return!!((e=this._task)!=null&&e.updating)||this.running}get length(){return this._processingItems.size+this._queue.length}abort(e){const s=this._controllers.get(e);s&&s.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach(s=>e.push(s)),this._controllers.clear(),e.forEach(s=>s.abort()),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((s,i)=>e(i))}get(e){const s=this._deferreds.get(e);return s?s.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,s){const i=this.get(e);if(i)return i;const t=new AbortController;let r=null;s&&(r=g(s,()=>t.abort()));const a=()=>{const c=this._processingItems.get(e);c&&c.controller.abort(),o(),h.reject(l())},o=()=>{p.remove(),r!=null&&r.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},p=m(t.signal,a),h=f();return this._deferreds.set(e,h),this._controllers.set(e,t),h.promise.then(o,o),this._queue.push(e),this._scheduleNext(),h.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){var s;const e=this._queue.popLast();return e&&((s=this._deferreds.get(e))==null||s.reject(l("Removed from queue")),this._removeItem(e)),e}reset(){const e=[];this._processingItems.forEach(s=>e.push(s)),this._processingItems.clear();for(const s of e)this._queue.push(s.item),s.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size0&&this._processingItems.size{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.sizethis._processResult(t,r),r=>this._processError(t,r))):this._processResult(t,s)}get test(){}}export{N as _}; diff --git a/build/assets/RasterWorker-DW_GcoB6.js b/build/assets/RasterWorker-DW_GcoB6.js new file mode 100644 index 0000000..2be0a79 --- /dev/null +++ b/build/assets/RasterWorker-DW_GcoB6.js @@ -0,0 +1 @@ +import{B as f,a$ as u,E as p,aZ as a,Q as S,fG as d}from"./index-DKOmzAMm.js";import{g as i,f as y,m as x,j as h,L as O,h as J,W as N,E as B,U as g,D as P,R as k,u as w,s as b}from"./dataUtils-DYQC_Kql.js";import{a as v,c as z,y as D,S as T,M as $,T as E,e as F}from"./PolynomialTransform-BIabQn8W.js";import"./_commonjsHelpers-DCkdB7M8.js";var c;let l=c=class extends v{constructor(){super(...arguments),this.type="identity"}clone(){return new c}};f([u({IdentityXform:"identity"})],l.prototype,"type",void 0),l=c=f([p("esri.layers.support.rasterTransforms.IdentityTransform")],l);const G=l,I={GCSShiftXform:z,IdentityXform:G,PolynomialXform:D};function R(n){if(!(n==null?void 0:n.type))return null;const e=I[n==null?void 0:n.type];if(e){const s=new e;return s.read(n),s}return null}class M{convertVectorFieldData(t){const e=i.fromJSON(t.pixelBlock),s=y(e,t.type);return Promise.resolve(s!=null?s.toJSON():null)}computeStatisticsHistograms(t){const e=i.fromJSON(t.pixelBlock),s=x(e);return Promise.resolve(s)}async decode(t){const e=await h(t.data,t.options);return e&&e.toJSON()}symbolize(t){t.pixelBlock=i.fromJSON(t.pixelBlock),t.extent=t.extent?a.fromJSON(t.extent):null;const e=this.symbolizer.symbolize(t);return Promise.resolve(e!=null?e.toJSON():null)}async updateSymbolizer(t){var e;this.symbolizer=O.fromJSON(t.symbolizerJSON),t.histograms&&((e=this.symbolizer)==null?void 0:e.rendererJSON.type)==="rasterStretch"&&(this.symbolizer.rendererJSON.histograms=t.histograms)}async updateRasterFunction(t){this.rasterFunction=T(t.rasterFunctionJSON)}async process(t){var s;const e=this.rasterFunction.process({extent:a.fromJSON(t.extent),primaryPixelBlocks:t.primaryPixelBlocks.map(o=>o!=null?i.fromJSON(o):null),primaryPixelSizes:(s=t.primaryPixelSizes)==null?void 0:s.map(o=>o!=null?S.fromJSON(o):null),primaryRasterIds:t.primaryRasterIds});return e!=null?e.toJSON():null}stretch(t){const e=this.symbolizer.simpleStretch(i.fromJSON(t.srcPixelBlock),t.stretchParams);return Promise.resolve(e==null?void 0:e.toJSON())}estimateStatisticsHistograms(t){const e=J(i.fromJSON(t.srcPixelBlock));return Promise.resolve(e)}split(t){const e=N(i.fromJSON(t.srcPixelBlock),t.tileSize,t.maximumPyramidLevel??0,t.useBilinear===!1);return e&&e.forEach((s,o)=>{e.set(o,s==null?void 0:s.toJSON())}),Promise.resolve(e)}clipTile(t){const e=i.fromJSON(t.pixelBlock),s=B({...t,pixelBlock:e});return Promise.resolve(s==null?void 0:s.toJSON())}async mosaicAndTransform(t){const e=t.srcPixelBlocks.map(m=>m?new i(m):null),s=g(e,t.srcMosaicSize,{blockWidths:t.blockWidths,alignmentInfo:t.alignmentInfo,clipOffset:t.clipOffset,clipSize:t.clipSize});let o,r=s;return t.coefs&&(r=P(s,t.destDimension,t.coefs,t.sampleSpacing,t.interpolation)),t.projectDirections&&t.gcsGrid&&(o=k(t.destDimension,t.gcsGrid),r=w(r,t.isUV?"vector-uv":"vector-magdir",o)),{pixelBlock:r==null?void 0:r.toJSON(),localNorthDirections:o}}async createFlowMesh(t,e){const s={data:new Float32Array(t.flowData.buffer),mask:new Uint8Array(t.flowData.maskBuffer),width:t.flowData.width,height:t.flowData.height},{vertexData:o,indexData:r}=await b(t.meshType,t.simulationSettings,s,e.signal);return{result:{vertexBuffer:o.buffer,indexBuffer:r.buffer},transferList:[o.buffer,r.buffer]}}async getProjectionOffsetGrid(t){const e=a.fromJSON(t.projectedExtent),s=a.fromJSON(t.srcBufferExtent);let o=null;t.datumTransformationSteps&&(o=new d({steps:t.datumTransformationSteps})),(t.includeGCSGrid||$(e.spatialReference,s.spatialReference,o))&&await E();const r=t.rasterTransform?R(t.rasterTransform):null;return F({...t,projectedExtent:e,srcBufferExtent:s,datumTransformation:o,rasterTransform:r})}}export{M as default}; diff --git a/build/assets/ReactiveMap-C7QHrros.js b/build/assets/ReactiveMap-C7QHrros.js new file mode 100644 index 0000000..c682df6 --- /dev/null +++ b/build/assets/ReactiveMap-C7QHrros.js @@ -0,0 +1 @@ +import{b9 as i,ba as e}from"./index-DKOmzAMm.js";class b{constructor(t){this._observable=new i,this._map=new Map(t)}get size(){return e(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(t){const s=this._map.delete(t);return s&&this._observable.notify(),s}entries(){return e(this._observable),this._map.entries()}forEach(t,s){e(this._observable),this._map.forEach((r,a)=>t.call(s,r,a,this),s)}get(t){return e(this._observable),this._map.get(t)}has(t){return e(this._observable),this._map.has(t)}keys(){return e(this._observable),this._map.keys()}set(t,s){return this._map.set(t,s),this._observable.notify(),this}values(){return e(this._observable),this._map.values()}[Symbol.iterator](){return e(this._observable),this._map[Symbol.iterator]()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}export{b as s}; diff --git a/build/assets/Relationship-DeeaK30J.js b/build/assets/Relationship-DeeaK30J.js new file mode 100644 index 0000000..d1f5852 --- /dev/null +++ b/build/assets/Relationship-DeeaK30J.js @@ -0,0 +1 @@ +import{B as t,D as e,E as n,F as h,Q as v,bw as G,ax as w}from"./index-DKOmzAMm.js";let a=class extends h{constructor(o){super(o),this.properties=null}};t([e({json:{write:!0}})],a.prototype,"properties",void 0),a=t([n("esri.rest.knowledgeGraph.GraphObject")],a);const c=a;let i=class extends c{constructor(o){super(o),this.typeName=null,this.id=null}};t([e({type:String,json:{write:!0}})],i.prototype,"typeName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"id",void 0),i=t([n("esri.rest.knowledgeGraph.GraphNamedObject")],i);const m=i;let l=class extends m{constructor(o){super(o),this.layoutGeometry=null}};t([e({type:v,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=t([n("esri.rest.knowledgeGraph.Entity")],l);const b=l;let u=class extends G{constructor(o){super(o),this.openCypherQuery=""}};t([e()],u.prototype,"openCypherQuery",void 0),u=t([n("esri.rest.knowledgeGraph.GraphQuery")],u);const g=u;let s=class extends g{constructor(r){super(r),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};t([e()],s.prototype,"bindParameters",void 0),t([e()],s.prototype,"bindGeometryQuantizationParameters",void 0),t([e()],s.prototype,"outputQuantizationParameters",void 0),t([e()],s.prototype,"outputSpatialReference",void 0),t([e()],s.prototype,"provenanceBehavior",void 0),s=t([n("esri.rest.knowledgeGraph.GraphQueryStreaming")],s);const S=s;let y=class extends c{constructor(r){super(r)}};y=t([n("esri.rest.knowledgeGraph.ObjectValue")],y);const P=y;let d=class extends h{constructor(o){super(o),this.path=null}};t([e({type:[c],json:{write:!0}})],d.prototype,"path",void 0),d=t([n("esri.rest.knowledgeGraph.Path")],d);const z=d;let p=class extends m{constructor(r){super(r),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};t([e({type:String,json:{write:!0}})],p.prototype,"originId",void 0),t([e({type:String,json:{write:!0}})],p.prototype,"destinationId",void 0),t([e({type:w,json:{write:!0}})],p.prototype,"layoutGeometry",void 0),p=t([n("esri.rest.knowledgeGraph.Relationship")],p);const I=p;export{z as c,b as m,I as p,S as s,P as t}; diff --git a/build/assets/RouteLayer-BKU_ddZR.js b/build/assets/RouteLayer-BKU_ddZR.js new file mode 100644 index 0000000..5926b5e --- /dev/null +++ b/build/assets/RouteLayer-BKU_ddZR.js @@ -0,0 +1,2 @@ +import{B as t,D as i,ja as le,E as j,F as M,cC as ue,jb as Ve,jc as $t,cA as Ge,cD as _t,hH as O,a$ as F,co as Q,aS as f,d2 as J,s as H,U as he,hL as Ye,aR as qt,V as Dt,a_ as Ot,Q as je,a8 as q,ax as ve,aZ as It,da as re,ay as ae,O as Ct,jd as Vt,es as ce,je as ye,aX as Gt,j8 as zt,dh as Kt,G as Ht,a7 as E,cq as Zt,cu as Yt,cs as Xt,ct as Qt,cv as er,bz as tr,dJ as rr,aY as ir,bD as vt,N as ft,iu as or,I as sr,S as ar,C as nr,f as lr,aU as ur,eG as pr,ce as cr,cf as dr,e2 as yr,cE as mr}from"./index-DKOmzAMm.js";import{i as hr}from"./originUtils-D69mHv66.js";import{i as Je,f as jt}from"./utils-CF4bGKhW.js";import{R as vr}from"./normalizeUtils-DIcj7CYy.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";let oe=class extends M{constructor(r){super(r),this.break=new ue({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new ue({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new ue({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new ue({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new ue({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new ue({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};t([i({types:le})],oe.prototype,"break",void 0),t([i({types:le})],oe.prototype,"first",void 0),t([i({types:le})],oe.prototype,"unlocated",void 0),t([i({types:le})],oe.prototype,"last",void 0),t([i({types:le})],oe.prototype,"middle",void 0),t([i({types:le})],oe.prototype,"waypoint",void 0),oe=t([j("esri.layers.support.RouteStopSymbols")],oe);const Bt=oe;let ee=class extends M{constructor(r){super(r),this.directionLines=new Ge({color:[0,122,194],width:6}),this.directionPoints=new ue({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new ue({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new _t({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new Ge({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new Ge({width:8,color:[20,89,127]}),this.stops=new Bt}};t([i({types:Ve})],ee.prototype,"directionLines",void 0),t([i({types:le})],ee.prototype,"directionPoints",void 0),t([i({types:le})],ee.prototype,"pointBarriers",void 0),t([i({types:$t})],ee.prototype,"polygonBarriers",void 0),t([i({types:Ve})],ee.prototype,"polylineBarriers",void 0),t([i({types:Ve})],ee.prototype,"routeInfo",void 0),t([i({type:Bt})],ee.prototype,"stops",void 0),ee=t([j("esri.layers.support.RouteSymbols")],ee);const Ft=ee,Mt={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},Pt=O()(Mt);O()({...Mt,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"});O()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"});const Lt=O()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"});O()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"});const fr=O()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),br=O()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),Tr=O()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"});O()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"});const Rt=O()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"});O()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"});O()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"});const gr=O()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"}),k=O()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),we=O()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),pe=O()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),Ee=O()({1:"right",2:"left"},{useNumericKeys:!0}),V=O()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),Ne=O()({0:"permit",1:"restrict"},{useNumericKeys:!0}),xe=O()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),We=O()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),Sr=O()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),wr=O()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),_e=O()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),G=O()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),$e=O()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),Nr=O()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),Ar=O()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),Dr=O()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),Or=O()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Y=class extends M{constructor(r){super(r),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};t([i({type:String})],Y.prototype,"dataType",void 0),t([F(G,{ignoreUnknown:!1})],Y.prototype,"name",void 0),t([i({type:[String]})],Y.prototype,"parameterNames",void 0),t([i({type:String})],Y.prototype,"restrictionUsageParameterName",void 0),t([F(_e,{ignoreUnknown:!1})],Y.prototype,"timeNeutralAttributeName",void 0),t([i({type:String})],Y.prototype,"trafficSupport",void 0),t([F(fr)],Y.prototype,"units",void 0),t([F(Dr)],Y.prototype,"usageType",void 0),Y=t([j("esri.rest.support.NetworkAttribute")],Y);const Ir=Y;let ne=class extends M{constructor(r){super(r),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};t([i({type:Number})],ne.prototype,"buildTime",void 0),t([i({type:String})],ne.prototype,"name",void 0),t([i({type:[Ir]})],ne.prototype,"networkAttributes",void 0),t([i()],ne.prototype,"networkSources",void 0),t([i({type:String})],ne.prototype,"state",void 0),ne=t([j("esri.rest.support.NetworkDataset")],ne);const Cr=ne;let R=class extends Q(M){constructor(r){super(r),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(r,o){return o.id??o.itemId??null}readRestrictionAttributes(r,o){const{restrictionAttributeNames:s}=o;return s==null?null:s.map(a=>$e.fromJSON(a))}writeRestrictionAttributes(r,o,s){r!=null&&(o[s]=r.map(a=>$e.toJSON(a)))}};t([i({type:[Object],json:{write:!0}})],R.prototype,"attributeParameterValues",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"description",void 0),t([F(wr,{ignoreUnknown:!1})],R.prototype,"distanceAttributeName",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"id",void 0),t([f("id",["id","itemId"])],R.prototype,"readId",null),t([F(G,{ignoreUnknown:!1})],R.prototype,"impedanceAttributeName",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"name",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"restrictionAttributeNames",void 0),t([f("restrictionAttributeNames")],R.prototype,"readRestrictionAttributes",null),t([J("restrictionAttributeNames")],R.prototype,"writeRestrictionAttributes",null),t([i({type:Number,json:{write:{allowNull:!0}}})],R.prototype,"simplificationTolerance",void 0),t([F(Pt)],R.prototype,"simplificationToleranceUnits",void 0),t([F(_e,{ignoreUnknown:!1})],R.prototype,"timeAttributeName",void 0),t([F(gr)],R.prototype,"type",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"useHierarchy",void 0),t([F(Rt)],R.prototype,"uturnAtJunctions",void 0),R=t([j("esri.rest.support.TravelMode")],R);const qe=R;let U=class extends M{constructor(r){super(r),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(r){return r==null?null:r.map(o=>G.fromJSON(o))}writeAccumulateAttributes(r,o,s){r!=null&&r.length&&(o[s]=r.map(a=>G.toJSON(a)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(r,o){var a,u;const s=((a=o.supportedTravelModes)==null?void 0:a.find(({id:l})=>l===o.defaultTravelMode))??((u=o.supportedTravelModes)==null?void 0:u.find(({itemId:l})=>l===o.defaultTravelMode));return s?qe.fromJSON(s):null}};t([i()],U.prototype,"accumulateAttributeNames",void 0),t([f("accumulateAttributeNames")],U.prototype,"readAccumulateAttributes",null),t([J("accumulateAttributeNames")],U.prototype,"writeAccumulateAttributes",null),t([i()],U.prototype,"attributeParameterValues",void 0),t([i()],U.prototype,"capabilities",null),t([i()],U.prototype,"currentVersion",void 0),t([i()],U.prototype,"defaultTravelMode",void 0),t([f("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],U.prototype,"readDefaultTravelMode",null),t([i()],U.prototype,"directionsLanguage",void 0),t([F(Lt)],U.prototype,"directionsLengthUnits",void 0),t([i()],U.prototype,"directionsSupportedLanguages",void 0),t([F(_e,{ignoreUnknown:!1})],U.prototype,"directionsTimeAttribute",void 0),t([i()],U.prototype,"hasZ",void 0),t([F(G,{ignoreUnknown:!1})],U.prototype,"impedance",void 0),t([i({type:Cr})],U.prototype,"networkDataset",void 0),t([i({type:[qe]})],U.prototype,"supportedTravelModes",void 0),U=t([j("esri.rest.support.NetworkServiceDescription")],U);const jr=U,Br=()=>Dt.getLogger("esri.rest.networkService");function Be(e,r,o,s){s[o]=[r.length,r.length+e.length],e.forEach(a=>{r.push(a.geometry)})}function Fr(e,r){for(let o=0;o=10.4?Lr(e,r,o):Pr(e,o),{defaultTravelMode:l,supportedTravelModes:c}=await u;return a.defaultTravelMode=l,a.supportedTravelModes=c,jr.fromJSON(a)}async function Pr(e,r){var g,v,n;const o=Je({f:"json"},r),{data:s}=await he(e.replace(/\/rest\/.*$/i,"/info"),o);if(!(s!=null&&s.owningSystemUrl))return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:a}=s,u=Ye(a)+"/sharing/rest/portals/self",{data:l}=await he(u,o),c=qt("helperServices.routingUtilities.url",l);if(!c)return{supportedTravelModes:[],defaultTravelMode:null};const T=jt(a),w=/\/solve$/i.test(T.path)?"Route":/\/solveclosestfacility$/i.test(T.path)?"ClosestFacility":"ServiceAreas",p=Je({f:"json",serviceName:w},r),D=Ye(c)+"/GetTravelModes/execute",I=await he(D,p),C=[];let b=null;if((v=(g=I==null?void 0:I.data)==null?void 0:g.results)!=null&&v.length){const A=I.data.results;for(const h of A)if(h.paramName==="supportedTravelModes"){if((n=h.value)!=null&&n.features){for(const{attributes:P}of h.value.features)if(P){const Z=JSON.parse(P.TravelMode);C.push(Z)}}}else h.paramName==="defaultTravelMode"&&(b=h.value)}return{supportedTravelModes:C,defaultTravelMode:b}}async function Lr(e,r,o){try{const s=Je({f:"json",token:r},o),a=Ye(e)+"/retrieveTravelModes",{data:{supportedTravelModes:u,defaultTravelMode:l}}=await he(a,s);return{supportedTravelModes:u,defaultTravelMode:l}}catch(s){throw new H("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:s})}}function ie(e,r){if(e==null)return null;const o={},s=new RegExp(`^${r}`,"i");for(const a of Object.keys(e))if(s.test(a)){const u=a.substring(r.length);o[G.fromJSON(u)]=e[a]}return o}function lt(e,r,o){if(e!=null){r.attributes||(r.attributes={});for(const s in e){const a=G.toJSON(s);r.attributes[`${o}${a}`]=e[s]}}}function fe(e){const r={};for(const o of Object.keys(e)){const s=o;r[G.fromJSON(s)]=e[o]}return r}function be(e){const r={};for(const o of Object.keys(e)){const s=o;r[G.toJSON(s)]=e[o]}return r}function Ce(e,r){return e==null||r==null?null:Math.round((e-r)/6e4)}function Rr(e){var s,a,u;const r=e.toJSON(),o=r;return o.accumulateAttributeNames&&(o.accumulateAttributeNames=(s=r.accumulateAttributeNames)==null?void 0:s.join()),o.attributeParameterValues&&(o.attributeParameterValues=JSON.stringify(r.attributeParameterValues)),o.barriers&&(o.barriers=JSON.stringify(r.barriers)),o.outSR&&(o.outSR=(a=r.outSR)==null?void 0:a.wkid),o.overrides&&(o.overrides=JSON.stringify(r.overrides)),o.polygonBarriers&&(o.polygonBarriers=JSON.stringify(r.polygonBarriers)),o.polylineBarriers&&(o.polylineBarriers=JSON.stringify(r.polylineBarriers)),o.restrictionAttributeNames&&(o.restrictionAttributeNames=(u=r.restrictionAttributeNames)==null?void 0:u.join()),o.stops&&(o.stops=JSON.stringify(r.stops)),o.travelMode&&(o.travelMode=JSON.stringify(r.travelMode)),o}const bt=new Ot({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Te=class extends M{constructor(r){super(r),this.description=null,this.type=null}};t([i({type:String,json:{write:!0}})],Te.prototype,"description",void 0),t([i({type:String,json:{read:bt.read,write:bt.write}})],Te.prototype,"type",void 0),Te=t([j("esri.rest.support.GPMessage")],Te);const Ur=Te,Tt=new Ot({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Le=class extends Ur{constructor(r){super(r),this.type=null}};t([i({type:String,json:{read:Tt.read,write:Tt.write}})],Le.prototype,"type",void 0),Le=t([j("esri.rest.support.NAMessage")],Le);const kr=Le;let ge=class extends M{constructor(r){super(r)}};t([i({json:{read:{source:"string"}}})],ge.prototype,"text",void 0),t([F(Or,{name:"stringType"})],ge.prototype,"type",void 0),ge=t([j("esri.rest.support.DirectionsString")],ge);const kt=ge;let se=class extends M{constructor(r){super(r),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(r,o){return Ce(o.ETA,o.arriveTimeUTC)}readGeometry(r,o){return je.fromJSON(o.point)}};t([i({type:Date,json:{read:{source:"arriveTimeUTC"}}})],se.prototype,"arriveTime",void 0),t([i()],se.prototype,"arriveTimeOffset",void 0),t([f("arriveTimeOffset",["arriveTimeUTC","ETA"])],se.prototype,"readArriveTimeOffset",null),t([i({type:je})],se.prototype,"geometry",void 0),t([f("geometry",["point"])],se.prototype,"readGeometry",null),t([i({type:[kt]})],se.prototype,"strings",void 0),se=t([j("esri.rest.support.DirectionsEvent")],se);const Jr=se;function Er(e){if(e==null||e==="")return null;let r=0,o=0,s=0,a=0;const u=[];let l,c,T,w,p,D,I,C,b=0,g=0,v=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),parseInt(p[b],32)===0){b=2;const n=parseInt(p[b],32);b++,D=parseInt(p[b],32),b++,1&n&&(g=p.indexOf("|")+1,I=parseInt(p[g],32),g++),2&n&&(v=p.indexOf("|",g)+1,C=parseInt(p[v],32),v++)}else D=parseInt(p[b],32),b++;for(;b0,hasM:v>0}}let me=class extends q{constructor(r){super(r),this.events=null,this.strings=null}readGeometry(r,o){const s=Er(o.compressedGeometry);return s!=null?ve.fromJSON(s):null}};t([i({type:[Jr]})],me.prototype,"events",void 0),t([f("geometry",["compressedGeometry"])],me.prototype,"readGeometry",null),t([i({type:[kt]})],me.prototype,"strings",void 0),me=t([j("esri.rest.support.DirectionsFeature")],me);const xr=me;function Wr(e,r){if(e.length===0)return new ve({spatialReference:r});const o=[];for(const l of e)for(const c of l.paths)o.push(...c);const s=[];o.forEach((l,c)=>{c!==0&&l[0]===o[c-1][0]&&l[1]===o[c-1][1]||s.push(l)});const{hasM:a,hasZ:u}=e[0];return new ve({hasM:a,hasZ:u,paths:[s],spatialReference:r})}let $=class extends re{constructor(r){super(r),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(r,o){if(!r)return[];const s=o.summary.envelope.spatialReference??o.spatialReference,a=s&&ae.fromJSON(s);return r.map(u=>{const l=xr.fromJSON(u);if(l.geometry!=null&&(l.geometry.spatialReference=a),l.events!=null)for(const c of l.events)c.geometry!=null&&(c.geometry.spatialReference=a);return l})}get mergedGeometry(){return this.features?Wr(this.features.map(({geometry:r})=>r),this.extent.spatialReference):null}get strings(){return this.features.flatMap(({strings:r})=>r).filter(Ct)}};t([i({type:It,json:{read:{source:"summary.envelope"}}})],$.prototype,"extent",void 0),t([i({nonNullable:!0})],$.prototype,"features",void 0),t([f("features")],$.prototype,"readFeatures",null),t([i()],$.prototype,"geometryType",void 0),t([i({readOnly:!0})],$.prototype,"mergedGeometry",null),t([i()],$.prototype,"routeId",void 0),t([i()],$.prototype,"routeName",void 0),t([i({value:null,readOnly:!0})],$.prototype,"strings",null),t([i({json:{read:{source:"summary.totalDriveTime"}}})],$.prototype,"totalDriveTime",void 0),t([i({json:{read:{source:"summary.totalLength"}}})],$.prototype,"totalLength",void 0),t([i({json:{read:{source:"summary.totalTime"}}})],$.prototype,"totalTime",void 0),$=t([j("esri.rest.support.DirectionsFeatureSet")],$);const $r=$;let K=class extends M{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};t([i({type:re,json:{write:!0}})],K.prototype,"directionLines",void 0),t([i({type:re,json:{write:!0}})],K.prototype,"directionPoints",void 0),t([i({type:$r,json:{write:!0}})],K.prototype,"directions",void 0),t([i({type:q,json:{write:!0}})],K.prototype,"route",void 0),t([i({type:String,json:{write:!0}})],K.prototype,"routeName",void 0),t([i({type:[q],json:{write:!0}})],K.prototype,"stops",void 0),t([i({type:re,json:{write:!0}})],K.prototype,"traversedEdges",void 0),t([i({type:re,json:{write:!0}})],K.prototype,"traversedJunctions",void 0),t([i({type:re,json:{write:!0}})],K.prototype,"traversedTurns",void 0),K=t([j("esri.rest.support.RouteResult")],K);const _r=K;function ze(e){return e?re.fromJSON(e).features.filter(Ct):[]}let X=class extends M{constructor(r){super(r),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(r,o){return ze(o.barriers)}readPolylineBarriers(r){return ze(r)}readPolygonBarriers(r){return ze(r)}};t([i({type:[kr]})],X.prototype,"messages",void 0),t([i({type:[q]})],X.prototype,"pointBarriers",void 0),t([f("pointBarriers",["barriers"])],X.prototype,"readPointBarriers",null),t([i({type:[q]})],X.prototype,"polylineBarriers",void 0),t([f("polylineBarriers")],X.prototype,"readPolylineBarriers",null),t([i({type:[q]})],X.prototype,"polygonBarriers",void 0),t([f("polygonBarriers")],X.prototype,"readPolygonBarriers",null),t([i({type:[_r]})],X.prototype,"routeResults",void 0),X=t([j("esri.rest.support.RouteSolveResult")],X);const qr=X;function Fe(e){return e instanceof re}async function Vr(e,r,o){const s=[],a=[],u={},l={},c=jt(e),{path:T}=c;Fe(r.stops)&&Be(r.stops.features,a,"stops.features",u),Fe(r.pointBarriers)&&Be(r.pointBarriers.features,a,"pointBarriers.features",u),Fe(r.polylineBarriers)&&Be(r.polylineBarriers.features,a,"polylineBarriers.features",u),Fe(r.polygonBarriers)&&Be(r.polygonBarriers.features,a,"polygonBarriers.features",u);const w=await vr(a);for(const C in u){const b=u[C];s.push(C),l[C]=w.slice(b[0],b[1])}if(Mr(l,s)){let C=null;try{C=await Ut(T,r.apiKey,o)}catch{}C&&!C.hasZ&&Fr(l,s)}for(const C in l)l[C].forEach((b,g)=>{Vt(r,C)[g].geometry=b});const p={...o,query:{...c.query,...Rr(r),f:"json"}},D=T.endsWith("/solve")?T:`${T}/solve`,{data:I}=await he(D,p);return Gr(I)}function Gr(e){const{barriers:r,directionLines:o,directionPoints:s,directions:a,messages:u,polygonBarriers:l,polylineBarriers:c,routes:T,stops:w,traversedEdges:p,traversedJunctions:D,traversedTurns:I}=e,C=n=>{const A=g.find(P=>P.routeName===n);if(A!=null)return A;const h={routeId:g.length+1,routeName:n};return g.push(h),h},b=n=>{const A=g.find(P=>P.routeId===n);if(A!=null)return A;const h={routeId:n,routeName:null};return g.push(h),h},g=[];T==null||T.features.forEach((n,A)=>{n.geometry.spatialReference=T.spatialReference??void 0;const h=n.attributes.Name,P=A+1;g.push({routeId:P,routeName:h,route:n})}),a==null||a.forEach(n=>{const{routeName:A}=n;C(A).directions=n});const v=((w==null?void 0:w.features.every(n=>n.attributes.RouteName==null))??!1)&&g.length>0?g[0].routeName:null;return w==null||w.features.forEach(n=>{var P;n.geometry&&((P=n.geometry).spatialReference??(P.spatialReference=w.spatialReference??void 0));const A=v??n.attributes.RouteName,h=C(A);h.stops??(h.stops=[]),h.stops.push(n)}),o==null||o.features.forEach(n=>{const A=n.attributes.RouteID,h=b(A),{geometryType:P,spatialReference:Z}=o;h.directionLines??(h.directionLines={features:[],geometryType:P,spatialReference:Z}),h.directionLines.features.push(n)}),s==null||s.features.forEach(n=>{const A=n.attributes.RouteID,h=b(A),{geometryType:P,spatialReference:Z}=s;h.directionPoints??(h.directionPoints={features:[],geometryType:P,spatialReference:Z}),h.directionPoints.features.push(n)}),p==null||p.features.forEach(n=>{const A=n.attributes.RouteID,h=b(A),{geometryType:P,spatialReference:Z}=p;h.traversedEdges??(h.traversedEdges={features:[],geometryType:P,spatialReference:Z}),h.traversedEdges.features.push(n)}),D==null||D.features.forEach(n=>{const A=n.attributes.RouteID,h=b(A),{geometryType:P,spatialReference:Z}=D;h.traversedJunctions??(h.traversedJunctions={features:[],geometryType:P,spatialReference:Z}),h.traversedJunctions.features.push(n)}),I==null||I.features.forEach(n=>{const A=n.attributes.RouteID,h=b(A);h.traversedTurns??(h.traversedTurns={features:[]}),h.traversedTurns.features.push(n)}),qr.fromJSON({routeResults:g,barriers:r,polygonBarriers:l,polylineBarriers:c,messages:u})}var Xe;let x=Xe=class extends Q(M){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new Xe({directionLineType:We.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:this.directionLineType!=null?We.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return this.fromLevel!=null&&(e.FromLevel=this.fromLevel),this.toLevel!=null&&(e.ToLevel=this.toLevel),new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};x.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}],t([i({type:We.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:We.read}}})],x.prototype,"directionLineType",void 0),t([i({json:{read:{source:"attributes.DirectionPointID"}}})],x.prototype,"directionPointId",void 0),t([i({json:{read:{source:"attributes.Meters"}}})],x.prototype,"distance",void 0),t([i({json:{read:{source:"attributes.Minutes"}}})],x.prototype,"duration",void 0),t([i({json:{read:{source:"attributes.FromLevel"}}})],x.prototype,"fromLevel",void 0),t([i({type:ve})],x.prototype,"geometry",void 0),t([i({json:{read:{source:"attributes.ObjectID"}}})],x.prototype,"objectId",void 0),t([i({type:ce})],x.prototype,"popupTemplate",void 0),t([i({types:ye})],x.prototype,"symbol",void 0),t([i({json:{read:{source:"attributes.ToLevel"}}})],x.prototype,"toLevel",void 0),t([i({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),x=Xe=t([j("esri.rest.support.DirectionLine")],x);const Re=x;var Qe;let B=Qe=class extends Q(M){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,r){return r.attributes.ArrivalTime!=null?new Date(r.attributes.ArrivalTime):null}static fromGraphic(e){return new Qe({alternateName:e.attributes.AlternateName??null,arrivalTime:e.attributes.ArrivalTime!=null?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:xe.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:this.directionPointType!=null?xe.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return this.alternateName!=null&&(e.AlternateName=this.alternateName),this.arrivalTime!=null&&(e.ArrivalTime=this.arrivalTime.getTime()),this.arrivalTimeOffset!=null&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),this.azimuth!=null&&(e.Azimuth=this.azimuth),this.branchName!=null&&(e.BranchName=this.branchName),this.displayText!=null&&(e.DisplayText=this.displayText),this.exitName!=null&&(e.ExitName=this.exitName),this.intersectingName!=null&&(e.IntersectingName=this.intersectingName),this.level!=null&&(e.Level=this.level),this.name!=null&&(e.Name=this.name),this.shortVoiceInstruction!=null&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),this.towardName!=null&&(e.TowardName=this.towardName),this.voiceInstruction!=null&&(e.VoiceInstruction=this.voiceInstruction),new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};B.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}],t([i({json:{read:{source:"attributes.AlternateName"}}})],B.prototype,"alternateName",void 0),t([i()],B.prototype,"arrivalTime",void 0),t([f("arrivalTime",["attributes.ArrivalTime"])],B.prototype,"readArrivalTime",null),t([i({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],B.prototype,"arrivalTimeOffset",void 0),t([i({json:{read:{source:"attributes.Azimuth"}}})],B.prototype,"azimuth",void 0),t([i({json:{read:{source:"attributes.BranchName"}}})],B.prototype,"branchName",void 0),t([i({type:xe.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:xe.read}}})],B.prototype,"directionPointType",void 0),t([i({json:{read:{source:"attributes.DisplayText"}}})],B.prototype,"displayText",void 0),t([i({json:{read:{source:"attributes.ExitName"}}})],B.prototype,"exitName",void 0),t([i({type:je})],B.prototype,"geometry",void 0),t([i({json:{read:{source:"attributes.IntersectingName"}}})],B.prototype,"intersectingName",void 0),t([i()],B.prototype,"level",void 0),t([i({json:{read:{source:"attributes.Name"}}})],B.prototype,"name",void 0),t([i({json:{read:{source:"attributes.ObjectID"}}})],B.prototype,"objectId",void 0),t([i({type:ce})],B.prototype,"popupTemplate",void 0),t([i({json:{read:{source:"attributes.Sequence"}}})],B.prototype,"sequence",void 0),t([i({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],B.prototype,"shortVoiceInstruction",void 0),t([i({json:{read:{source:"attributes.StopID"}}})],B.prototype,"stopId",void 0),t([i({types:ye})],B.prototype,"symbol",void 0),t([i({json:{read:{source:"attributes.TowardName"}}})],B.prototype,"towardName",void 0),t([i({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),t([i({json:{read:{source:"attributes.VoiceInstruction"}}})],B.prototype,"voiceInstruction",void 0),B=Qe=t([j("esri.rest.support.DirectionPoint")],B);const Ue=B;var et;let L=et=class extends Q(M){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,r){return ie(r.attributes,"Attr_")}writeCosts(e,r){lt(e,r,"Attr_")}static fromGraphic(e){return new et({addedCost:e.attributes.AddedCost??null,barrierType:e.attributes.BarrierType!=null?V.fromJSON(e.attributes.BarrierType):null,costs:e.attributes.Costs!=null?fe(JSON.parse(e.attributes.Costs)):null,curbApproach:e.attributes.CurbApproach!=null?k.fromJSON(e.attributes.CurbApproach):null,fullEdge:e.attributes.FullEdge!=null?Ne.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:e.attributes.Status!=null?pe.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType!=null?V.toJSON(this.barrierType):null,Costs:this.costs!=null?JSON.stringify(be(this.costs)):null,CurbApproach:this.curbApproach!=null?k.toJSON(this.curbApproach):null,FullEdge:this.fullEdge!=null?Ne.toJSON(this.fullEdge):null,Name:this.name,Status:this.status!=null?pe.toJSON(this.status):null};return new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};L.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}],t([i()],L.prototype,"addedCost",void 0),t([i({type:V.apiValues,json:{name:"attributes.BarrierType",read:{reader:V.read},write:{writer:V.write}}})],L.prototype,"barrierType",void 0),t([i()],L.prototype,"costs",void 0),t([f("costs",["attributes"])],L.prototype,"readCosts",null),t([J("costs")],L.prototype,"writeCosts",null),t([i({constructOnly:!0,type:k.apiValues,json:{read:{source:"attributes.CurbApproach",reader:k.read}}})],L.prototype,"curbApproach",void 0),t([i({type:Ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:Ne.read},write:{writer:Ne.write}}})],L.prototype,"fullEdge",void 0),t([i({type:je,json:{write:!0}})],L.prototype,"geometry",void 0),t([i({json:{name:"attributes.Name"}})],L.prototype,"name",void 0),t([i({json:{name:"attributes.ObjectID"}})],L.prototype,"objectId",void 0),t([i({type:ce})],L.prototype,"popupTemplate",void 0),t([i({type:Ee.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:Ee.read}}})],L.prototype,"sideOfEdge",void 0),t([i({json:{read:{source:"attributes.SourceID"}}})],L.prototype,"sourceId",void 0),t([i({json:{read:{source:"attributes.SourceOID"}}})],L.prototype,"sourceOid",void 0),t([i({type:pe.apiValues,json:{read:{source:"attributes.Status",reader:pe.read}}})],L.prototype,"status",void 0),t([i({types:ye})],L.prototype,"symbol",void 0),t([i({readOnly:!0,json:{read:!1}})],L.prototype,"type",void 0),L=et=t([j("esri.rest.support.PointBarrier")],L);const Ae=L;var tt;let W=tt=class extends Q(M){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,r){return ie(r.attributes,"Attr_")}writeCosts(e,r){lt(e,r,"Attr_")}static fromGraphic(e){return new tt({barrierType:e.attributes.BarrierType!=null?V.fromJSON(e.attributes.BarrierType):null,costs:e.attributes.Costs!=null?fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:this.barrierType!=null?V.toJSON(this.barrierType):null,Costs:this.costs!=null?JSON.stringify(be(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};W.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],t([i({type:V.apiValues,json:{name:"attributes.BarrierType",read:{reader:V.read},write:{writer:V.write}}})],W.prototype,"barrierType",void 0),t([i()],W.prototype,"costs",void 0),t([f("costs",["attributes"])],W.prototype,"readCosts",null),t([J("costs")],W.prototype,"writeCosts",null),t([i({type:Gt,json:{write:!0}})],W.prototype,"geometry",void 0),t([i({json:{name:"attributes.Name"}})],W.prototype,"name",void 0),t([i({json:{name:"attributes.ObjectID"}})],W.prototype,"objectId",void 0),t([i({type:ce})],W.prototype,"popupTemplate",void 0),t([i()],W.prototype,"scaleFactor",void 0),t([i({types:ye})],W.prototype,"symbol",void 0),t([i({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=tt=t([j("esri.rest.support.PolygonBarrier")],W);const De=W;var rt;let _=rt=class extends Q(M){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,r){return ie(r.attributes,"Attr_")}static fromGraphic(e){return new rt({barrierType:e.attributes.BarrierType!=null?V.fromJSON(e.attributes.BarrierType):null,costs:e.attributes.Costs!=null?fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:this.barrierType!=null?V.toJSON(this.barrierType):null,Costs:this.costs!=null?JSON.stringify(be(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};_.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],t([i({type:V.apiValues,json:{read:{source:"attributes.BarrierType",reader:V.read}}})],_.prototype,"barrierType",void 0),t([i()],_.prototype,"costs",void 0),t([f("costs",["attributes"])],_.prototype,"readCosts",null),t([i({type:ve,json:{write:!0}})],_.prototype,"geometry",void 0),t([i({json:{name:"attributes.Name"}})],_.prototype,"name",void 0),t([i({json:{name:"attributes.ObjectID"}})],_.prototype,"objectId",void 0),t([i({type:ce})],_.prototype,"popupTemplate",void 0),t([i()],_.prototype,"scaleFactor",void 0),t([i({types:ye})],_.prototype,"symbol",void 0),t([i({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),_=rt=t([j("esri.rest.support.PolylineBarrier")],_);const Oe=_;let z=class extends M{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return e==null?null:e.map(r=>G.fromJSON(r))}writeAccumulateAttributes(e,r,o){e!=null&&e.length&&(r[o]=e.map(s=>G.toJSON(s)))}};t([i({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],z.prototype,"accumulateAttributes",void 0),t([f("accumulateAttributes")],z.prototype,"readAccumulateAttributes",null),t([J("accumulateAttributes")],z.prototype,"writeAccumulateAttributes",null),t([i({type:String,json:{write:!0}})],z.prototype,"directionsLanguage",void 0),t([i({type:Boolean,json:{write:!0}})],z.prototype,"findBestSequence",void 0),t([i({type:Boolean,json:{write:!0}})],z.prototype,"preserveFirstStop",void 0),t([i({type:Boolean,json:{write:!0}})],z.prototype,"preserveLastStop",void 0),t([i({type:Boolean,json:{write:!0}})],z.prototype,"startTimeIsUTC",void 0),t([i({type:Boolean,json:{write:!0}})],z.prototype,"timeWindowsAreUTC",void 0),t([i({type:qe,json:{write:!0}})],z.prototype,"travelMode",void 0),z=t([j("esri.rest.support.RouteSettings")],z);const Jt=z;var it;let N=it=class extends Q(M){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,r){return r.attributes.EndTimeUTC!=null?new Date(r.attributes.EndTimeUTC):null}readEndTimeOffset(e,r){return Ce(r.attributes.EndTime,r.attributes.EndTimeUTC)}readStartTime(e,r){return r.attributes.StartTimeUTC!=null?new Date(r.attributes.StartTimeUTC):null}readStartTimeOffset(e,r){return Ce(r.attributes.StartTime,r.attributes.StartTimeUTC)}readTotalCosts(e,r){return ie(r.attributes,"Total_")}readTotalViolations(e,r){return ie(r.attributes,"TotalViolation_")}readTotalWait(e,r){return ie(r.attributes,"TotalWait_")}static fromGraphic(e){return new it({analysisSettings:e.attributes.AnalysisSettings!=null?Jt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:e.attributes.EndTime!=null?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:e.attributes.Messages!=null?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:e.attributes.StartTime!=null?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:e.attributes.TotalCosts!=null?fe(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:this.analysisSettings!=null?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:this.endTime!=null?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:this.messages!=null?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:this.startTime!=null?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:this.totalCosts!=null?JSON.stringify(be(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};N.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}],t([i()],N.prototype,"analysisSettings",void 0),t([i()],N.prototype,"endTime",void 0),t([f("endTime",["attributes.EndTimeUTC"])],N.prototype,"readEndTime",null),t([i()],N.prototype,"endTimeOffset",void 0),t([f("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],N.prototype,"readEndTimeOffset",null),t([i({json:{read:{source:"attributes.FirstStopID"}}})],N.prototype,"firstStopId",void 0),t([i({type:ve})],N.prototype,"geometry",void 0),t([i({json:{read:{source:"attributes.LastStopID"}}})],N.prototype,"lastStopId",void 0),t([i()],N.prototype,"messages",void 0),t([i({json:{read:{source:"attributes.Name"}}})],N.prototype,"name",void 0),t([i({json:{read:{source:"attributes.ObjectID"}}})],N.prototype,"objectId",void 0),t([i({type:ce})],N.prototype,"popupTemplate",void 0),t([i()],N.prototype,"startTime",void 0),t([f("startTime",["attributes.StartTimeUTC"])],N.prototype,"readStartTime",null),t([i()],N.prototype,"startTimeOffset",void 0),t([f("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],N.prototype,"readStartTimeOffset",null),t([i({json:{read:{source:"attributes.StopCount"}}})],N.prototype,"stopCount",void 0),t([i({types:ye})],N.prototype,"symbol",void 0),t([i()],N.prototype,"totalCosts",void 0),t([f("totalCosts",["attributes"])],N.prototype,"readTotalCosts",null),t([i()],N.prototype,"totalDistance",void 0),t([i()],N.prototype,"totalDuration",void 0),t([i()],N.prototype,"totalLateDuration",void 0),t([i()],N.prototype,"totalViolations",void 0),t([f("totalViolations",["attributes"])],N.prototype,"readTotalViolations",null),t([i()],N.prototype,"totalWait",void 0),t([f("totalWait",["attributes"])],N.prototype,"readTotalWait",null),t([i()],N.prototype,"totalWaitDuration",void 0),t([i({readOnly:!0,json:{read:!1}})],N.prototype,"type",void 0),t([i()],N.prototype,"version",void 0),N=it=t([j("esri.rest.support.RouteInfo")],N);const Ke=N,zr={type:String,json:{read:{source:"token"},write:{target:"token"}}};let te=class extends Q(M){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};t([i({type:Boolean,json:{write:!0}})],te.prototype,"doNotLocateOnRestrictedElements",void 0),t([i({types:zt,json:{read:Kt,write:!0}})],te.prototype,"geometry",void 0),t([F(Ar)],te.prototype,"geometryType",void 0),t([i({type:String,json:{name:"layerName",write:!0}})],te.prototype,"name",void 0),t([F(Nr,{name:"spatialRel"})],te.prototype,"spatialRelationship",void 0),t([i({type:String,json:{write:!0}})],te.prototype,"type",void 0),t([i({type:String,json:{write:!0}})],te.prototype,"where",void 0),te=t([j("esri.rest.support.DataLayer")],te);const Kr=te;var ot;let ke=ot=class extends re{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new ot({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};t([i({type:Boolean,json:{write:!0}})],ke.prototype,"doNotLocateOnRestrictedElements",void 0),ke=ot=t([j("esri.rest.support.NetworkFeatureSet")],ke);const Hr=ke;let Se=class extends Q(M){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};t([i({type:Boolean,json:{write:!0}})],Se.prototype,"doNotLocateOnRestrictedElements",void 0),t([i({type:String,json:{write:!0}})],Se.prototype,"url",void 0),Se=t([j("esri.rest.support.NetworkUrl")],Se);const Zr=Se;var st;let d=st=class extends Q(M){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return Ht(st,e)}readAccumulateAttributes(e){return e==null?null:e.map(r=>G.fromJSON(r))}writeAccumulateAttributes(e,r,o){e!=null&&e.length&&(r[o]=e.map(s=>G.toJSON(s)))}writePointBarriers(e,r,o){Me(e,r,o)}writePolygonBarrier(e,r,o){Me(e,r,o)}writePolylineBarrier(e,r,o){Me(e,r,o)}readRestrictionAttributes(e){return e==null?null:e.map(r=>$e.fromJSON(r))}writeRestrictionAttributes(e,r,o){e!=null&&e.length&&(r[o]=e.map(s=>$e.toJSON(s)))}readStartTime(e,r){const{startTime:o}=r;return o==null?null:o==="now"?"now":new Date(o)}writeStartTime(e,r){e!=null&&(r.startTime=e==="now"?"now":e.getTime())}readStops(e,r){return ri(r.stops)}writeStops(e,r,o){Me(e,r,o)}};t([i({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],d.prototype,"accumulateAttributes",void 0),t([f("accumulateAttributes")],d.prototype,"readAccumulateAttributes",null),t([J("accumulateAttributes")],d.prototype,"writeAccumulateAttributes",null),t([i(zr)],d.prototype,"apiKey",void 0),t([i({json:{write:!0}})],d.prototype,"attributeParameterValues",void 0),t([i({type:String,json:{write:!0}})],d.prototype,"directionsLanguage",void 0),t([F(Lt)],d.prototype,"directionsLengthUnits",void 0),t([F(br)],d.prototype,"directionsOutputType",void 0),t([F(Sr)],d.prototype,"directionsStyleName",void 0),t([F(_e,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],d.prototype,"directionsTimeAttribute",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"findBestSequence",void 0),t([i({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0),t([i({type:Number,json:{write:!0}})],d.prototype,"geometryPrecisionM",void 0),t([i({type:Number,json:{write:!0}})],d.prototype,"geometryPrecisionZ",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"ignoreInvalidLocations",void 0),t([F(G,{name:"impedanceAttributeName",ignoreUnknown:!1})],d.prototype,"impedanceAttribute",void 0),t([i({type:Number,json:{write:!0}})],d.prototype,"outputGeometryPrecision",void 0),t([F(Pt)],d.prototype,"outputGeometryPrecisionUnits",void 0),t([F(Tr)],d.prototype,"outputLines",void 0),t([i({type:ae,json:{name:"outSR",write:!0}})],d.prototype,"outSpatialReference",void 0),t([i({json:{write:!0}})],d.prototype,"overrides",void 0),t([i({json:{name:"barriers",write:!0}})],d.prototype,"pointBarriers",void 0),t([J("pointBarriers")],d.prototype,"writePointBarriers",null),t([i({json:{write:!0}})],d.prototype,"polygonBarriers",void 0),t([J("polygonBarriers")],d.prototype,"writePolygonBarrier",null),t([i({json:{write:!0}})],d.prototype,"polylineBarriers",void 0),t([J("polylineBarriers")],d.prototype,"writePolylineBarrier",null),t([i({type:Boolean,json:{write:!0}})],d.prototype,"preserveFirstStop",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"preserveLastStop",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"preserveObjectID",void 0),t([i({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],d.prototype,"restrictionAttributes",void 0),t([f("restrictionAttributes")],d.prototype,"readRestrictionAttributes",null),t([J("restrictionAttributes")],d.prototype,"writeRestrictionAttributes",null),t([F(Rt)],d.prototype,"restrictUTurns",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnDirections",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnPolygonBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnPolylineBarriers",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnRoutes",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnStops",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnTraversedEdges",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnTraversedJunctions",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnTraversedTurns",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"returnZ",void 0),t([i({json:{write:!0}})],d.prototype,"startTime",void 0),t([f("startTime")],d.prototype,"readStartTime",null),t([J("startTime")],d.prototype,"writeStartTime",null),t([i({type:Boolean,json:{write:!0}})],d.prototype,"startTimeIsUTC",void 0),t([i({json:{write:!0}})],d.prototype,"stops",void 0),t([f("stops")],d.prototype,"readStops",null),t([J("stops")],d.prototype,"writeStops",null),t([i({type:Boolean,json:{write:!0}})],d.prototype,"timeWindowsAreUTC",void 0),t([i({type:qe,json:{write:!0}})],d.prototype,"travelMode",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"useHierarchy",void 0),t([i({type:Boolean,json:{write:!0}})],d.prototype,"useTimeWindows",void 0),d=st=t([j("esri.rest.support.RouteParameters")],d);const Yr=d;function Xr(e){return e&&"type"in e}function Qr(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}function ei(e){return e&&"url"in e}function ti(e){return e&&"features"in e}function ri(e){return Xr(e)?Kr.fromJSON(e):ei(e)?Zr.fromJSON(e):Qr(e)?Hr.fromJSON(e):ti(e)?re.fromJSON(e):null}function Me(e,r,o){e!=null&&(r[o]=E.isCollection(e)?{features:e.toArray().map(s=>s.toJSON())}:e.toJSON())}var at;let y=at=class extends Q(M){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,r){return Ce(r.attributes.ArriveTime,r.attributes.ArriveTimeUTC)}readCumulativeCosts(e,r){return ie(r.attributes,"Cumul_")}readDepartTimeOffset(e,r){return Ce(r.attributes.DepartTime,r.attributes.DepartTimeUTC)}readServiceCosts(e,r){return ie(r.attributes,"Attr_")}writeServiceCosts(e,r){lt(e,r,"Attr_")}writeTimeWindowEnd(e,r){e!=null&&(r.attributes||(r.attributes={}),r.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,r){e!=null&&(r.attributes||(r.attributes={}),r.attributes.TimeWindowStart=e.getTime())}readViolations(e,r){return ie(r.attributes,"Violation_")}readWait(e,r){return ie(r.attributes,"Wait_")}static fromGraphic(e){return new at({arriveCurbApproach:e.attributes.ArrivalCurbApproach!=null?k.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:e.attributes.ArrivalTime!=null?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:e.attributes.CumulativeCosts!=null?fe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:e.attributes.CurbApproach!=null?k.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:e.attributes.DepartureCurbApproach!=null?k.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:e.attributes.DepartureTime!=null?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:e.attributes.LocationType!=null?we.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:e.attributes.ServiceCosts!=null?fe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:e.attributes.Status!=null?pe.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:e.attributes.TimeWindowEnd!=null?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:e.attributes.TimeWindowStart!=null?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:this.arriveCurbApproach!=null?k.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime!=null?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts!=null?JSON.stringify(be(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach!=null?k.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach!=null?k.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime!=null?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType!=null?we.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts!=null?JSON.stringify(be(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status!=null?pe.toJSON(this.status):null,TimeWindowEnd:this.timeWindowEnd!=null?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:this.timeWindowStart!=null?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new q({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};y.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}],t([i({type:k.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:k.read}}})],y.prototype,"arriveCurbApproach",void 0),t([i({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],y.prototype,"arriveTime",void 0),t([i()],y.prototype,"arriveTimeOffset",void 0),t([f("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],y.prototype,"readArriveTimeOffset",null),t([i({json:{name:"attributes.Bearing",read:!1,write:!0}})],y.prototype,"bearing",void 0),t([i({json:{name:"attributes.BearingTol",read:!1,write:!0}})],y.prototype,"bearingTol",void 0),t([i()],y.prototype,"cumulativeCosts",void 0),t([f("cumulativeCosts",["attributes"])],y.prototype,"readCumulativeCosts",null),t([i()],y.prototype,"cumulativeDistance",void 0),t([i()],y.prototype,"cumulativeDuration",void 0),t([i({type:k.apiValues,json:{name:"attributes.CurbApproach",read:{reader:k.read},write:{writer:k.write}}})],y.prototype,"curbApproach",void 0),t([i({type:k.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:k.read}}})],y.prototype,"departCurbApproach",void 0),t([i({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],y.prototype,"departTime",void 0),t([i()],y.prototype,"departTimeOffset",void 0),t([f("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],y.prototype,"readDepartTimeOffset",null),t([i({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],y.prototype,"distanceToNetworkInMeters",void 0),t([i({type:je,json:{write:!0}})],y.prototype,"geometry",void 0),t([i()],y.prototype,"lateDuration",void 0),t([i({type:we.apiValues,json:{name:"attributes.LocationType",read:{reader:we.read},write:{writer:we.write}}})],y.prototype,"locationType",void 0),t([i({json:{name:"attributes.Name"}})],y.prototype,"name",void 0),t([i({json:{name:"attributes.NavLatency",read:!1,write:!0}})],y.prototype,"navLatency",void 0),t([i({json:{name:"attributes.ObjectID"}})],y.prototype,"objectId",void 0),t([i({type:ce})],y.prototype,"popupTemplate",void 0),t([i({json:{read:{source:"attributes.PosAlong"}}})],y.prototype,"posAlong",void 0),t([i({json:{name:"attributes.RouteName"}})],y.prototype,"routeName",void 0),t([i()],y.prototype,"serviceCosts",void 0),t([f("serviceCosts",["attributes"])],y.prototype,"readServiceCosts",null),t([J("serviceCosts")],y.prototype,"writeServiceCosts",null),t([i()],y.prototype,"serviceDistance",void 0),t([i()],y.prototype,"serviceDuration",void 0),t([i({json:{name:"attributes.Sequence"}})],y.prototype,"sequence",void 0),t([i({type:Ee.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:Ee.read}}})],y.prototype,"sideOfEdge",void 0),t([i({json:{read:{source:"attributes.SnapX"}}})],y.prototype,"snapX",void 0),t([i({json:{read:{source:"attributes.SnapY"}}})],y.prototype,"snapY",void 0),t([i({json:{read:{source:"attributes.SnapZ"}}})],y.prototype,"snapZ",void 0),t([i({json:{read:{source:"attributes.SourceID"}}})],y.prototype,"sourceId",void 0),t([i({json:{read:{source:"attributes.SourceOID"}}})],y.prototype,"sourceOid",void 0),t([i({type:pe.apiValues,json:{read:{source:"attributes.Status",reader:pe.read}}})],y.prototype,"status",void 0),t([i({types:ye})],y.prototype,"symbol",void 0),t([i({type:Date,json:{name:"attributes.TimeWindowEnd"}})],y.prototype,"timeWindowEnd",void 0),t([J("timeWindowEnd")],y.prototype,"writeTimeWindowEnd",null),t([i()],y.prototype,"timeWindowEndOffset",void 0),t([i({type:Date,json:{name:"attributes.TimeWindowStart"}})],y.prototype,"timeWindowStart",void 0),t([J("timeWindowStart")],y.prototype,"writeTimeWindowStart",null),t([i()],y.prototype,"timeWindowStartOffset",void 0),t([i({readOnly:!0,json:{read:!1}})],y.prototype,"type",void 0),t([i()],y.prototype,"violations",void 0),t([f("violations",["attributes"])],y.prototype,"readViolations",null),t([i()],y.prototype,"waitDuration",void 0),t([i()],y.prototype,"wait",void 0),t([f("wait",["attributes"])],y.prototype,"readWait",null),y=at=t([j("esri.rest.support.Stop")],y);const Ie=y;function He(e){return e.length?e:null}function nt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:nt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:nt("esriGeometryPolyline")}}}function Pe(e){return"layers"in e}function ii(e){return e.declaredClass==="esri.rest.support.FeatureSet"}function oi(e){return e.declaredClass==="esri.rest.support.NetworkFeatureSet"}function si(e,r,o){var ut,pt,ct,dt,yt,mt;const s=(ut=r.networkDataset)==null?void 0:ut.networkAttributes,a=(s==null?void 0:s.filter(({usageType:m})=>m==="cost"))??[],u=o.travelMode??r.defaultTravelMode;if(u==null)return void xt().warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:l,distanceAttributeName:c}=u,T=a.find(({name:m})=>m===l),w=a.find(({name:m})=>m===c),p=((pt=o.travelMode)==null?void 0:pt.impedanceAttributeName)??o.impedanceAttribute??r.impedance,D=T==null?void 0:T.units,I=w==null?void 0:w.units;if(!D||!I)throw new H("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const C=o.directionsLanguage??r.directionsLanguage,b=o.accumulateAttributes??r.accumulateAttributeNames??[],g=new Set(a.filter(({name:m})=>m===l||m===c||m===p||m!=null&&b.includes(m)).map(({name:m})=>m)),v=m=>{for(const ht in m)g.has(ht)||delete m[ht]};for(const m of e.pointBarriers)m.costs!=null&&(m.addedCost=m.costs[p]??0,v(m.costs));for(const m of e.polygonBarriers)m.costs!=null&&(m.scaleFactor=m.costs[p]??1,v(m.costs));for(const m of e.polylineBarriers)m.costs!=null&&(m.scaleFactor=m.costs[p]??1,v(m.costs));const{routeInfo:n}=e,{findBestSequence:A,preserveFirstStop:h,preserveLastStop:P,startTimeIsUTC:Z,timeWindowsAreUTC:Wt}=o;n.analysisSettings=new Jt({accumulateAttributes:b,directionsLanguage:C,findBestSequence:A,preserveFirstStop:h,preserveLastStop:P,startTimeIsUTC:Z,timeWindowsAreUTC:Wt,travelMode:u}),n.totalDuration=de(((ct=n.totalCosts)==null?void 0:ct[l])??0,D),n.totalDistance=Ze(((dt=n.totalCosts)==null?void 0:dt[c])??0,I),n.totalLateDuration=de(((yt=n.totalViolations)==null?void 0:yt[l])??0,D),n.totalWaitDuration=de(((mt=n.totalWait)==null?void 0:mt[l])??0,D),n.totalCosts!=null&&v(n.totalCosts),n.totalViolations!=null&&v(n.totalViolations),n.totalWait!=null&&v(n.totalWait);for(const m of e.stops)m.serviceCosts!=null&&(m.serviceDuration=de(m.serviceCosts[l]??0,D),m.serviceDistance=Ze(m.serviceCosts[c]??0,I),v(m.serviceCosts)),m.cumulativeCosts!=null&&(m.cumulativeDuration=de(m.cumulativeCosts[l]??0,D),m.cumulativeDistance=Ze(m.cumulativeCosts[c]??0,I),v(m.cumulativeCosts)),m.violations!=null&&(m.lateDuration=de(m.violations[l]??0,D),v(m.violations)),m.wait!=null&&(m.waitDuration=de(m.wait[l]??0,D),v(m.wait))}async function gt(e){const r=ae.WGS84;return await cr(e.spatialReference,r),dr(e,r)}function de(e,r){switch(r){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Ze(e,r){return r==="decimal-degrees"||r==="points"||r==="unknown"?e:yr(e,r,"meters")}function ai(e){const{attributes:r,geometry:o,popupTemplate:s,symbol:a}=e.toGraphic().toJSON();return{attributes:r,geometry:o,popupInfo:s,symbol:a}}const ni=E.ofType(Re),li=E.ofType(Ue),St=E.ofType(Ae),wt=E.ofType(De),Nt=E.ofType(Oe),At=E.ofType(Ie),Et="esri.layers.RouteLayer",xt=()=>Dt.getLogger(Et);let S=class extends Zt(Yt(Xt(Qt(er(mr))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new Ft,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new St,this.polygonBarriers=new wt,this.polylineBarriers=new Nt,this.routeInfo=null,this.spatialReference=ae.WGS84,this.stops=new At,this.type="route";const r=()=>{this._setStopSymbol(this.stops)};this.addHandles(tr(()=>this.stops,"change",r,{sync:!0,onListenerAdd:r}))}writeFeatureCollectionWebmap(e,r,o,s){const a=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(c=>!!c),u=a.map((c,T)=>T),l=s.origin==="web-map"?"featureCollection.layers":"layers";rr(l,a,r),r.opacity=this.opacity,r.visibility=this.visible,r.visibleLayers=u}readDirectionLines(e,r){return this._getNetworkFeatures(r,"DirectionLines",o=>Re.fromGraphic(o))}readDirectionPoints(e,r){return this._getNetworkFeatures(r,"DirectionPoints",o=>Ue.fromGraphic(o))}get fullExtent(){var a;const e=new It({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:ae.WGS84});if(((a=this.routeInfo)==null?void 0:a.geometry)!=null)return this.routeInfo.geometry.extent??e;if(this.stops==null)return e;const r=this.stops.filter(u=>u.geometry!=null);if(r.length<2)return e;const{spatialReference:o}=r.at(0).geometry;if(o==null)return e;const s=r.toArray().map(u=>{const l=u.geometry;return[l.x,l.y]});return new ir({points:s,spatialReference:o}).extent}readMaxScale(e,r){var a;const o=Pe(r)?r.layers:(a=r.featureCollection)==null?void 0:a.layers,s=o==null?void 0:o.find(u=>u.layerDefinition.maxScale!=null);return(s==null?void 0:s.layerDefinition.maxScale)??0}readMinScale(e,r){var a;const o=Pe(r)?r.layers:(a=r.featureCollection)==null?void 0:a.layers,s=o==null?void 0:o.find(u=>u.layerDefinition.minScale!=null);return(s==null?void 0:s.layerDefinition.minScale)??0}readPointBarriers(e,r){return this._getNetworkFeatures(r,"Barriers",o=>Ae.fromGraphic(o))}readPolygonBarriers(e,r){return this._getNetworkFeatures(r,"PolygonBarriers",o=>De.fromGraphic(o))}readPolylineBarriers(e,r){return this._getNetworkFeatures(r,"PolylineBarriers",o=>Oe.fromGraphic(o))}readRouteInfo(e,r){return this._getNetworkFeatures(r,"RouteInfo",o=>Ke.fromGraphic(o)).at(0)??null}readSpatialReference(e,r){var c,T;const o=Pe(r)?r.layers:(c=r.featureCollection)==null?void 0:c.layers;if(!(o!=null&&o.length))return ae.WGS84;const{layerDefinition:s,featureSet:a}=o[0],u=a.features[0],l=((T=u==null?void 0:u.geometry)==null?void 0:T.spatialReference)??a.spatialReference??s.spatialReference??s.extent.spatialReference??vt;return ae.fromJSON(l)}readStops(e,r){return this._getNetworkFeatures(r,"Stops",o=>Ie.fromGraphic(o),o=>this._setStopSymbol(o))}get title(){var e;return((e=this.routeInfo)==null?void 0:e.name)??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return ft.routeServiceUrl}set url(e){e!=null?this._set("url",or(e,xt())):this._set("url",ft.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){this.directionLines!=null&&(this.directionLines.removeAll(),this._set("directionLines",null)),this.directionPoints!=null&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),this.routeInfo!=null&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:r}=this;if(!r)throw new H("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!r.id)throw new H("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if(r.type!=="Feature Collection")throw new H("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(this.routeInfo==null)throw new H("routelayer:route-unsolved","save() requires a solved route");const{portal:o}=r;await o.signIn(),o.user||await r.reload();const{itemUrl:s,itemControl:a}=r;if(a!=="admin"&&a!=="update")throw new H("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const u={messages:[],origin:"portal-item",portal:o,url:s?sr(s):void 0,writtenProperties:[]},l=this.write(void 0,u);return r.extent=await gt(e),r.title=this.title,await r.update({data:l}),r}async saveAs(e,r={}){var c;if(await this.load(),this.routeInfo==null)throw new H("routelayer:route-unsolved","saveAs() requires a solved route");const o=ar.from(e).clone();o.extent??(o.extent=await gt(this.fullExtent)),o.id=null,o.portal??(o.portal=nr.getDefault()),o.title??(o.title=this.title),o.type="Feature Collection",o.typeKeywords=["Data","Feature Collection",lr.MULTI_LAYER,"Route Layer"];const{portal:s}=o,a={messages:[],origin:"portal-item",portal:s,url:null,writtenProperties:[]};await s.signIn();const u=r==null?void 0:r.folder,l=this.write(void 0,a);return await((c=s.user)==null?void 0:c.addItem({item:o,folder:u,data:l})),this.portalItem=o,hr(a),a.portalItem=o,o}async solve(e,r){const o=(e==null?void 0:e.stops)??this.stops,s=(e==null?void 0:e.pointBarriers)??He(this.pointBarriers),a=(e==null?void 0:e.polylineBarriers)??He(this.polylineBarriers),u=(e==null?void 0:e.polygonBarriers)??He(this.polygonBarriers);if(o==null)throw new H("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((ii(o)||oi(o))&&o.features.length<2||E.isCollection(o)&&o.length<2)throw new H("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(E.isCollection(o))for(const g of o)g.routeName=null;const l=e==null?void 0:e.apiKey,c=this.url,T=await this._getServiceDescription(c,l,r),w=(e==null?void 0:e.travelMode)??T.defaultTravelMode,p=(e==null?void 0:e.accumulateAttributes)??[];w!=null&&(p.push(w.distanceAttributeName),w.timeAttributeName&&p.push(w.timeAttributeName));const D={accumulateAttributes:p,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:s,polylineBarriers:a,polygonBarriers:u,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!s,returnDirections:!0,returnPolygonBarriers:!!u,returnPolylineBarriers:!!a,returnRoutes:!0,returnStops:!0,stops:o},I=Yr.from(e??{});let C;I.set(D);try{C=await Vr(c,I,r)}catch(g){throw ur(g)?g:new H("routelayer:failed-route-request","the routing request failed",{error:g})}const b=this._toRouteLayerSolution(C);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),si(b,T,I),b}update(e){const{stops:r,directionLines:o,directionPoints:s,pointBarriers:a,polylineBarriers:u,polygonBarriers:l,routeInfo:c}=e;this.set({stops:r,pointBarriers:a,polylineBarriers:u,polygonBarriers:l}),this._set("directionLines",o),this._set("directionPoints",s),this._set("routeInfo",c),c.geometry!=null&&(this.spatialReference=c.geometry.spatialReference)}_getNetworkFeatures(e,r,o,s){var g;const a=Pe(e)?e.layers:(g=e.featureCollection)==null?void 0:g.layers,u=a==null?void 0:a.find(v=>v.layerDefinition.name===r);if(u==null)return new E;const{layerDefinition:l,popupInfo:c,featureSet:T}=u,w=l.drawingInfo.renderer,{features:p}=T,D=T.spatialReference??l.spatialReference??l.extent.spatialReference??vt,I=w&&pr(w),C=ae.fromJSON(D),b=p.map(v=>{const n=q.fromJSON(v);n.geometry!=null&&v.geometry!=null&&v.geometry.spatialReference==null&&(n.geometry.spatialReference=C);const A=o(n);return A.symbol??(A.symbol=(I==null?void 0:I.getSymbol(n))??this._getNetworkSymbol(r)),A.popupTemplate??(A.popupTemplate=c&&ce.fromJSON(c)),A});return s&&b.some(({symbol:v})=>!v)&&s(b),new E(b)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,r,o){if(this._cachedServiceDescription!=null&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const s=await Ut(e,r,o);return this._cachedServiceDescription={serviceDescription:s,url:e},s}_setStopSymbol(e){if(!e||e.length===0||this.defaultSymbols.stops==null||e.every(({symbol:p})=>p!=null))return;const{first:r,last:o,middle:s,unlocated:a,waypoint:u,break:l}=this.defaultSymbols.stops;if(this.routeInfo==null||e.length===1)return void e.forEach((p,D)=>{switch(D){case 0:p.symbol=r;break;case e.length-1:p.symbol=o;break;default:p.symbol=s}});const c=e.map(({sequence:p})=>p).filter(p=>p!=null),T=Math.min(...c),w=Math.max(...c);for(const p of e)p.sequence!==T?p.sequence!==w?p.status==="ok"||p.status==="not-located-on-closest"?p.locationType!=="waypoint"?p.locationType!=="break"?p.symbol=s:p.symbol=l:p.symbol=u:p.symbol=a:p.symbol=o:p.symbol=r}_toRouteLayerSolution(e){var w,p,D,I,C,b,g;const r=(w=e.routeResults[0].stops)==null?void 0:w.map(v=>Ie.fromJSON(v.toJSON()));this._setStopSymbol(r);const o=new At(r),s=new wt((p=e.polygonBarriers)==null?void 0:p.map(v=>{const n=De.fromJSON(v.toJSON());return n.symbol=this.defaultSymbols.polygonBarriers,n})),a=new Nt((D=e.polylineBarriers)==null?void 0:D.map(v=>{const n=Oe.fromJSON(v.toJSON());return n.symbol=this.defaultSymbols.polylineBarriers,n})),u=new St((I=e.pointBarriers)==null?void 0:I.map(v=>{const n=Ae.fromJSON(v.toJSON());return n.symbol=this.defaultSymbols.pointBarriers,n})),l=(C=e.routeResults[0].route)==null?void 0:C.toJSON(),c=Ke.fromJSON(l);c.symbol=this.defaultSymbols.routeInfo;const T=new li((b=e.routeResults[0].directionPoints)==null?void 0:b.features.map(v=>{const n=Ue.fromJSON(v.toJSON());return n.symbol=this.defaultSymbols.directionPoints,n}));return{directionLines:new ni((g=e.routeResults[0].directionLines)==null?void 0:g.features.map(v=>{const n=Re.fromJSON(v.toJSON());return n.symbol=this.defaultSymbols.directionLines,n})),directionPoints:T,pointBarriers:u,polygonBarriers:s,polylineBarriers:a,routeInfo:c,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Re.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Ue.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,r,o,s,a,u){if(!(e!=null&&e.length))return null;const l=this.spatialReference.toJSON(),{fullExtent:c,maxScale:T,minScale:w}=this;return{featureSet:{features:e.toArray().map(p=>ai(p)),geometryType:o,spatialReference:l},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:r!=null?r.toJSON():nt(o)}},extent:c.toJSON(),fields:s,geometryType:o,hasM:!1,hasZ:!1,maxScale:T,minScale:w,name:a,objectIdField:"ObjectID",spatialReference:l,title:u,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ae.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",De.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Oe.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(this.routeInfo!=null?new E([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ke.fields,"RouteInfo","Route Details")}_writeStops(){var u,l,c;const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",Ie.fields,"Stops","Stops");if(e==null)return null;const{stops:r}=this.defaultSymbols,o=(u=r==null?void 0:r.first)==null?void 0:u.toJSON(),s=(l=r==null?void 0:r.middle)==null?void 0:l.toJSON(),a=(c=r==null?void 0:r.last)==null?void 0:c.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:s,uniqueValueInfos:[{value:"1",symbol:o,label:"First Stop"},{value:`${this.stops.length}`,symbol:a,label:"Last Stop"}]},e}};t([i({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:this.portalItem==null}}}}}}})],S.prototype,"_featureCollection",void 0),t([J(["web-map","portal-item"],"_featureCollection")],S.prototype,"writeFeatureCollectionWebmap",null),t([i({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:this.portalItem!=null}}}}}}})],S.prototype,"_type",void 0),t([i({nonNullable:!0,type:Ft})],S.prototype,"defaultSymbols",void 0),t([i({readOnly:!0})],S.prototype,"directionLines",void 0),t([f(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],S.prototype,"readDirectionLines",null),t([i({readOnly:!0})],S.prototype,"directionPoints",void 0),t([f(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],S.prototype,"readDirectionPoints",null),t([i({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],S.prototype,"featureCollectionType",void 0),t([i({readOnly:!0})],S.prototype,"fullExtent",null),t([i({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],S.prototype,"legendEnabled",void 0),t([i({type:["show","hide"]})],S.prototype,"listMode",void 0),t([i({type:Number,nonNullable:!0,json:{write:!1}})],S.prototype,"maxScale",void 0),t([f(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],S.prototype,"readMaxScale",null),t([i({type:Number,nonNullable:!0,json:{write:!1}})],S.prototype,"minScale",void 0),t([f(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],S.prototype,"readMinScale",null),t([i({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],S.prototype,"operationalLayerType",void 0),t([i({nonNullable:!0,type:E.ofType(Ae)})],S.prototype,"pointBarriers",void 0),t([f(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],S.prototype,"readPointBarriers",null),t([i({nonNullable:!0,type:E.ofType(De)})],S.prototype,"polygonBarriers",void 0),t([f(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],S.prototype,"readPolygonBarriers",null),t([i({nonNullable:!0,type:E.ofType(Oe)})],S.prototype,"polylineBarriers",void 0),t([f(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],S.prototype,"readPolylineBarriers",null),t([i({readOnly:!0})],S.prototype,"routeInfo",void 0),t([f(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],S.prototype,"readRouteInfo",null),t([i({type:ae})],S.prototype,"spatialReference",void 0),t([f(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],S.prototype,"readSpatialReference",null),t([i({nonNullable:!0,type:E.ofType(Ie)})],S.prototype,"stops",void 0),t([f(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],S.prototype,"readStops",null),t([i()],S.prototype,"title",null),t([i({readOnly:!0,json:{read:!1}})],S.prototype,"type",void 0),t([i()],S.prototype,"url",null),S=t([j(Et)],S);const ji=S;export{ji as default}; diff --git a/build/assets/SceneLayer-D_5ycsDz.js b/build/assets/SceneLayer-D_5ycsDz.js new file mode 100644 index 0000000..aa74764 --- /dev/null +++ b/build/assets/SceneLayer-D_5ycsDz.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editingSupport-BRaaDEoU.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-CF4bGKhW.js","assets/utils-BCmi3vQB.js","assets/infoFor3D-DsOdlPuA.js"])))=>i.map(i=>d[i]); +import{B as s,D as a,E as b,fd as G,dG as V,hi as ie,F as N,ek as Q,cn as se,a7 as q,aX as P,bp as ae,c8 as k,fQ as oe,aS as v,bz as ne,bA as le,n as pe,U as Y,$ as de,s as u,aV as ue,_ as ee,eZ as ce,cF as ye,cs as he,ct as fe,cu as me,cv as ge,cG as ve,cH as we,co as be,bE as Ie,e_ as Le,ej as z,hj as K,V as m,aK as Fe,t as Se,dK as _e,hk as $e,a8 as Te,el as Ee,d9 as J,hl as xe,Q as Oe,gw as H,c$ as R,aU as je,fV as Ae,hm as Pe,hn as Re,gz as De,cN as Ue,en as Ne,eo as qe,ep as M,cx as Ce,ho as Ge,eu as Ve,er as Qe,es as ke,ev as ze,hc as Ke,ex as Je,cE as He}from"./index-DKOmzAMm.js";import{$ as Me}from"./Mesh-DkA8R2dF.js";import{i as We,m as Ze}from"./uploadAssetErrors-Bg66aMSE.js";import{L as Be,C as W}from"./SceneService-7YqMMGL5.js";import{s as Xe}from"./associatedFeatureServiceUtils-D9v5WjkL.js";import{n as Ye,p as et,s as tt}from"./popupUtils-CqjLs0mf.js";import{p as te,a as rt,y as it,m as st}from"./I3SLayerDefinitions-CR4J5n7u.js";import{r as at,t as ot}from"./infoFor3D-DsOdlPuA.js";import{a as nt}from"./lazyLayerLoader-BkbwrjyD.js";import{j as lt}from"./persistable-DLZFVdWR.js";import{$ as Z,P as pt,w as dt}from"./elevationInfoUtils-CU9w6KS3.js";import{$ as ut}from"./I3SUtil-7z-2YOel.js";import"./MeshTransform-CnKLNqg-.js";import"./mat4f64-CSKppSlJ.js";import"./quat-BYKy26Om.js";import"./mat3f64-q3fE-ZOt.js";import"./quatf64-Bdb9ZJJK.js";import"./imageUtils-D81CeaJ0.js";import"./MeshVertexAttributes-CfiMg9vN.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./earcut-BqgeR2O3.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./DoubleArray-D2IDWC15.js";import"./Indices-BhOjxL0t.js";import"./plane-aHrUkISy.js";import"./vec2f64-DA6GkJuH.js";import"./deduplicate-B_YKqNj1.js";import"./projection-Ch_noS-l.js";import"./mat3-BNGRf_pC.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./vec3-C6eb5QY9.js";import"./vec4-n1PBj5SL.js";import"./vertexSpaceConversion-DdxiyRap.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./jsonContext-SE-5k22x.js";import"./resourceUtils-CwAv7wd8.js";import"./resourceUtils-Cz4P0EKM.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";import"./resourceExtension-D3awQbhZ.js";import"./sphere-DoGSV0K5.js";import"./I3SBinaryReader-BNZLVsC-.js";import"./VertexAttribute-BlT9lbVY.js";import"./NormalAttribute.glsl-DMc-kXcx.js";import"./BindType-BmZEZMMh.js";import"./orientedBoundingBox-RPlI7sU4.js";function re({associatedLayer:e,serviceUpdateTimeStamp:t}){var d;const r=(d=e==null?void 0:e.editingInfo)==null?void 0:d.lastEditDate,i=e==null?void 0:e.serverGens,n=r!=null,l=t!=null,p=n&&l&&t.lastUpdate!==r.getTime();return n&&(p||!l&&(i==null?void 0:i.minServerGen)!==(i==null?void 0:i.serverGen))}const ct=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){var n;const r=(n=this.associatedLayer)==null?void 0:n.timeInfo;if(r==null)return null;const i=r.clone();return Q(i,this.fieldsIndex),i}set timeInfo(r){Q(r,this.fieldsIndex),this._override("timeInfo",r)}get timeExtent(){var r;return(r=this.associatedLayer)==null?void 0:r.timeExtent}set timeExtent(r){this._override("timeExtent",r)}get timeOffset(){var r;return(r=this.associatedLayer)==null?void 0:r.timeOffset}set timeOffset(r){this._override("timeOffset",r)}get datesInUnknownTimezone(){var r;return((r=this.associatedLayer)==null?void 0:r.datesInUnknownTimezone)??!1}set datesInUnknownTimezone(r){this._override("datesInUnknownTimezone",r)}async loadTimeInfoFromService(r){const{serviceTimeInfo:i}=this;if(i==null)return;const{startTimeField:n,endTimeField:l}=i;if(n==null&&l==null||re({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const p=async c=>{var _;let f=null;try{const L=await((_=this.fetchStatistics)==null?void 0:_.call(this,c,r));f=L==null?void 0:L.stats}catch{}if(f==null)return null;const{minTimeStr:I,min:x,maxTimeStr:O,max:j}=f,S=c===n?I??x:O??j;return S!=null?new Date(S):null},[d,y]=await Promise.all([p(n),p(l)]);if(n!=null&&d==null||l!=null&&y==null)return;const h=new V({start:d,end:y});this.setAtOrigin("timeInfo",new G({endField:l,startField:n,fullTimeExtent:h}),"service")}};return s([a({type:G,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),s([a({type:V,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),s([a({type:ie,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),s([a({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),s([a({type:F,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=s([b("esri.layers.mixins.TemporalSceneLayer")],t),t};let F=class extends N{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};s([a({type:String})],F.prototype,"endTimeField",void 0),s([a({type:String})],F.prototype,"startTimeField",void 0),F=s([b("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],F);let g=class extends N{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};s([a({type:String,json:{read:!0,write:!0}})],g.prototype,"name",void 0),s([a({type:String,json:{read:!0,write:!0}})],g.prototype,"field",void 0),s([a({type:[Number],json:{read:!0,write:!0}})],g.prototype,"currentRangeExtent",void 0),s([a({type:[Number],json:{read:!0,write:!0}})],g.prototype,"fullRangeExtent",void 0),s([a({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0),g=s([b("esri.layers.support.RangeInfo")],g);var T;let D=T=class extends se(q.ofType(P)){constructor(e){super(e)}clone(){return new T(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){var r;const t=(r=e==null?void 0:e.layer)==null?void 0:r.spatialReference;return t?this.toArray().map(i=>{if(!t.equals(i.spatialReference)){if(!ae(i.spatialReference,t))return e!=null&&e.messages&&e.messages.push(new k("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const l=new P;oe(i,l,t),i=l}const n=i.toJSON(e);return delete n.spatialReference,n}).filter(i=>i!=null):(e!=null&&e.messages&&e.messages.push(new k("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map(i=>i.toJSON(e)))}static fromJSON(e,t){const r=new T;return e.forEach(i=>r.add(P.fromJSON(i,t))),r}};D=T=s([b("esri.layers.support.PolygonCollection")],D);const E=D;var U;let w=U=class extends N{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new E,this._geometriesSource=null}initialize(){this.addHandles(ne(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,le))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=E.fromJSON(e,r):this._geometriesSource={url:pe(e,r),context:r}}async loadGeometries(e,t){if(this._geometriesSource==null)return;const{url:r,context:i}=this._geometriesSource,n=await Y(r,{responseType:"json",signal:t==null?void 0:t.signal}),l=e.toJSON(),p=n.data.map(d=>({...d,spatialReference:l}));this.geometries=E.fromJSON(p,i),this._geometriesSource=null}clone(){const e=new U({geometries:de(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};s([a({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],w.prototype,"spatialRelationship",void 0),s([a({type:E,nonNullable:!0,json:{write:!0}}),lt({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],w.prototype,"geometries",void 0),s([v(["web-scene","portal-item"],"geometries")],w.prototype,"readGeometries",null),w=U=s([b("esri.layers.support.SceneFilter")],w);const yt=w;async function ht({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:n,customParameters:l,apiKey:p,signal:d}){if(t==null)throw new u(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const y=i.get(e);if(y==null)throw new u(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const h=t.find(I=>I.name===y.name);if(h==null)throw new u(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const c=ue(n,h.href),{data:f}=await Y(c,{query:{f:"json",...l,token:p},responseType:"json",signal:d});return f}async function ft(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(mt(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function mt(e){const{BlobReader:t,ZipReader:r,BlobWriter:i}=await ee(()=>import("./zipjs-wrapper-DnezS2lx.js"),[]),n=[];return(await new r(new t(e)).getEntries()).forEach(p=>{var h;if(p.directory||/^__MACOS/i.test(p.filename))return;const d=new i,y=(h=p.getData)==null?void 0:h.call(p,d).then(c=>new File([c],p.filename));y&&n.push(y)}),Promise.all(n)}const gt=new Set(["3DObject","Point"]),B=Je();let o=class extends ct(ce(Be(ye(he(fe(me(ge(ve(we(be(He))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new q,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){var i,n,l;const r=(n=(i=this.getFeatureType(t==null?void 0:t.feature))==null?void 0:i.domains)==null?void 0:n[e];return r&&r.type!=="inherited"?r:((l=this.getField(e))==null?void 0:l.domain)??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){var e;return((e=this.associatedLayer)==null?void 0:e.types)??[]}get typeIdField(){var e;return((e=this.associatedLayer)==null?void 0:e.typeIdField)??null}get templates(){var e;return((e=this.associatedLayer)==null?void 0:e.templates)??null}get formTemplate(){var e;return((e=this.associatedLayer)==null?void 0:e.formTemplate)??null}get fieldsIndex(){return new Ie(this.fields)}readNodePages(e,t,r){return t.layerType==="Point"&&(e=t.pointNodePages),e==null||typeof e!="object"?null:te.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){var e;return this._capabilitiesFromAssociatedFeatureLayer((e=this.associatedLayer)==null?void 0:e.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&Le(this.associatedLayer)}get geometryType(){return vt[this.profile]||"mesh"}set renderer(e){z(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return e!=null&&typeof e=="object"||(e={}),e.color==null&&(e.color=!1),e}get capabilities(){var e;return this._capabilitiesFromAssociatedFeatureLayer((e=this.associatedLayer)==null?void 0:e.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){var C;e=e??tt;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:n,supportsUploadWithItemId:l,supportsGeometryUpdate:p,supportsReturnServiceEditsInSourceSpatialReference:d},data:{supportsZ:y,supportsM:h,isVersioned:c,supportsAttachment:f},operations:{supportsEditing:I,supportsAdd:x,supportsUpdate:O,supportsDelete:j,supportsQuery:S,supportsQueryAttachments:_,supportsAsyncConvert3D:L}}=e,$=e.operations.supportsChangeTracking,A=!!((C=this.associatedLayer)!=null&&C.infoFor3D)&&K();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:d,supportsRollbackOnFailure:n,supportsGeometryUpdate:A&&p,supportsUploadWithItemId:l},data:{supportsAttachment:f,supportsZ:y,supportsM:h,isVersioned:c},operations:{supportsQuery:S,supportsQueryAttachments:_,supportsEditing:I&&$,supportsAdd:A&&x&&$,supportsDelete:A&&j&&$,supportsUpdate:O&&$,supportsAsyncConvert3D:L}}}get editingEnabled(){var e;return this._isOverridden("editingEnabled")?this._get("editingEnabled"):((e=this.associatedLayer)==null?void 0:e.editingEnabled)??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){var e;return((e=this.associatedLayer)==null?void 0:e.infoFor3D)??null}get relationships(){var e;return(e=this.associatedLayer)==null?void 0:e.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(r=>(r.type==="esriFieldTypeOID"&&(e=r.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(r=>(r.type==="esriFieldTypeGlobalID"&&(e=r.name),!!e)),e||void 0}get displayField(){var e;return((e=this.associatedLayer)==null?void 0:e.displayField)??null}readProfile(e,t){const r=t.store.profile;return r!=null&&X[r]?X[r]:(m.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){var e;return((e=this.associatedLayer)==null?void 0:e.useViewTime)??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e!=null?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(Fe),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:"service"},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){m.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){var t;const e=new _e;return this.geometryType==="mesh"?(t=this.associatedLayer)!=null&&t.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(r=>{if(r!=null&&r.features)for(const i of r.features)i.layer=this,i.sourceLayer=this;return r})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new u("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new u("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){var i;const r=$e(this.fieldsIndex,await Ye(this,et(this)));return ut(((i=this.parsedUrl)==null?void 0:i.path)??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||r.length===0)throw new u("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new Te;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(m.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Ee(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e!=null&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new u("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new u("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(W.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(W.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await ee(()=>import("./editingSupport-BRaaDEoU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]));let i=t;await this.load();const n=this.associatedLayer;if(!n)throw new u(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:l}=n,p=!!n.infoFor3D,d=(i==null?void 0:i.globalIdUsed)??!0;if(p&&l==null)throw new u(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(p&&!d)throw new u(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return J(n.url)&&p&&e.deleteFeatures!=null&&l!=null&&(i={...i,globalIdToObjectId:await xe(n,e.deleteFeatures,l)}),r(this,n.source,e,i)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new u(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=c=>{throw m.getLogger(this).error(".convertMesh()",c.message),c};await this.load(),this.infoFor3D||r(new u("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),n=i.reduce((c,f)=>at(this.infoFor3D,f)?c+1:c,0);n===0&&r(new We),n>1&&r(new Ze);const l=this.spatialReference,p=(t==null?void 0:t.location)??new Oe({x:0,y:0,z:0,spatialReference:l}),d=p.spatialReference.isGeographic?"local":"georeferenced",y=Me.createWithExternalSource(p,i,{vertexSpace:d}),[h]=await this.uploadAssets([y],t);return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await ft(e)).filter(r=>ot(t,r)):e}validateLayer(e){if(e.layerType&&!gt.has(e.layerType))throw new u("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new u("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new u("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(r,i){let n=!1,l=!1;if(r==null)n=!0,l=!0;else{const p=i&&i.isGeographic;switch(r){case"east-north-up":case"earth-centered":n=!0,l=p;break;case"vertex-reference-frame":n=!0,l=!p;break;default:n=!1}}if(!n)throw new u("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!l)throw new u("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if(this.profile==="points")e.push("Point");else{if(this.profile!=="mesh-pyramids")throw new u("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){var e,t,r;if(this._fieldUsageInfo={},this.fields)for(const i of this.fields){const n=!!((e=this.attributeStorageInfo)!=null&&e.some(d=>d.name===i.name)),l=!!((r=(t=this.associatedLayer)==null?void 0:t.fields)!=null&&r.some(d=>d&&i.name===d.name)),p={supportsLabelingInfo:n,supportsRenderer:n,supportsPopupTemplate:n||l,supportsLayerQuery:l};this._fieldUsageInfo[i.name]=p}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){var t;if(!((t=this.associatedLayer)!=null&&t.fields))return;let e=null;for(const r of this.associatedLayer.fields){const i=this.getField(r.name);i?(!i.domain&&r.domain&&(i.domain=r.domain.clone()),i.editable=r.editable,i.nullable=r.nullable,i.length=r.length):(e||(e=this.fields?this.fields.slice():[]),e.push(r.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=H(this);for(let r=0;rthis.popupEnabled&&this.popupTemplate!=null);const e=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?m.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):m.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;this.profile==="mesh-pyramids"&&Z(m.getLogger(this),pt("Mesh scene layers","relative-to-scene",e)),Z(m.getLogger(this),dt("Scene layers",e))}async fetchStatistics(e,t){var r;return await ht({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:((r=this.parsedUrl)==null?void 0:r.path)??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t==null?void 0:t.signal})}};s([a({types:{key:"type",base:Pe,typeMap:{selection:Re}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],o.prototype,"featureReduction",void 0),s([a({type:[g],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],o.prototype,"rangeInfos",void 0),s([a({json:{read:!1}})],o.prototype,"associatedLayer",void 0),s([a({type:["show","hide"]})],o.prototype,"listMode",void 0),s([a({type:["ArcGISSceneServiceLayer"]})],o.prototype,"operationalLayerType",void 0),s([a({json:{read:!1},readOnly:!0})],o.prototype,"type",void 0),s([a({...B.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],o.prototype,"fields",void 0),s([a()],o.prototype,"types",null),s([a()],o.prototype,"typeIdField",null),s([a()],o.prototype,"templates",null),s([a()],o.prototype,"formTemplate",null),s([a({readOnly:!0,clonable:!1})],o.prototype,"fieldsIndex",null),s([a({type:De,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],o.prototype,"floorInfo",void 0),s([a(B.outFields)],o.prototype,"outFields",void 0),s([a({type:te,readOnly:!0,json:{read:!1}})],o.prototype,"nodePages",void 0),s([v("service","nodePages",["nodePages","pointNodePages"])],o.prototype,"readNodePages",null),s([a({type:[rt],readOnly:!0})],o.prototype,"materialDefinitions",void 0),s([a({type:[it],readOnly:!0})],o.prototype,"textureSetDefinitions",void 0),s([a({type:[st],readOnly:!0})],o.prototype,"geometryDefinitions",void 0),s([a({readOnly:!0})],o.prototype,"serviceUpdateTimeStamp",void 0),s([a({readOnly:!0})],o.prototype,"attributeStorageInfo",void 0),s([a({readOnly:!0})],o.prototype,"statisticsInfo",void 0),s([a({type:q.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],o.prototype,"excludeObjectIds",void 0),s([a({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],o.prototype,"definitionExpression",void 0),s([a({type:yt,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],o.prototype,"filter",void 0),s([a({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],o.prototype,"path",void 0),s([a(Ue)],o.prototype,"elevationInfo",null),s([a({readOnly:!0,json:{read:!1}})],o.prototype,"effectiveCapabilities",null),s([a({readOnly:!0})],o.prototype,"effectiveEditingEnabled",null),s([a({type:String})],o.prototype,"geometryType",null),s([a(Ne)],o.prototype,"labelsVisible",void 0),s([a({type:[qe],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:M},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:M},write:!0}})],o.prototype,"labelingInfo",void 0),s([a(Ce)],o.prototype,"legendEnabled",void 0),s([a({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){var i,n;if(typeof e=="number"&&e>=0&&e<=1)return e;const r=(n=(i=t.layerDefinition)==null?void 0:i.drawingInfo)==null?void 0:n.transparency;return r!==void 0?Ge(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],o.prototype,"opacity",void 0),s([a({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],o.prototype,"priority",void 0),s([a({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],o.prototype,"semantic",void 0),s([a({types:Ve,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],o.prototype,"renderer",null),s([a({json:{read:!1}})],o.prototype,"cachedDrawingInfo",void 0),s([v("service","cachedDrawingInfo")],o.prototype,"readCachedDrawingInfo",null),s([a({readOnly:!0,json:{read:!1}})],o.prototype,"capabilities",null),s([a({type:Boolean,json:{read:!1}})],o.prototype,"editingEnabled",null),s([a({readOnly:!0,json:{write:!1,read:!1}})],o.prototype,"infoFor3D",null),s([a({readOnly:!0,json:{write:!1,read:!1}})],o.prototype,"relationships",null),s([a(Qe)],o.prototype,"popupEnabled",void 0),s([a({type:ke,json:{name:"popupInfo",write:!0}})],o.prototype,"popupTemplate",void 0),s([a({readOnly:!0,json:{read:!1}})],o.prototype,"defaultPopupTemplate",null),s([a({type:String,json:{read:!1}})],o.prototype,"objectIdField",void 0),s([v("service","objectIdField",["objectIdField","fields"])],o.prototype,"readObjectIdField",null),s([a({type:String,json:{read:!1}})],o.prototype,"globalIdField",void 0),s([v("service","globalIdField",["globalIdField","fields"])],o.prototype,"readGlobalIdField",null),s([a({readOnly:!0,type:String,json:{read:!1}})],o.prototype,"displayField",null),s([a({type:String,json:{read:!1}})],o.prototype,"profile",void 0),s([v("service","profile",["store.profile"])],o.prototype,"readProfile",null),s([a({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],o.prototype,"normalReferenceFrame",void 0),s([a(ze)],o.prototype,"screenSizePerspectiveEnabled",void 0),s([a({json:{read:!1,origins:{service:{read:!0}}}})],o.prototype,"serviceItemId",void 0),s([a(Ke)],o.prototype,"useViewTime",null),o=s([b("esri.layers.SceneLayer")],o);const X={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},vt={"mesh-pyramids":"mesh",points:"point"},gr=o;export{gr as default}; diff --git a/build/assets/SceneLayerSnappingSourceWorker-DR4W7bTo.js b/build/assets/SceneLayerSnappingSourceWorker-DR4W7bTo.js new file mode 100644 index 0000000..b984e73 --- /dev/null +++ b/build/assets/SceneLayerSnappingSourceWorker-DR4W7bTo.js @@ -0,0 +1 @@ +import{aJ as Rt,b5 as I,c1 as Z,gq as At,au as F,c4 as y,c6 as B,gp as tt,av as p,gg as et,gl as Q,B as Et,E as St,c7 as Ft,c0 as v}from"./index-DKOmzAMm.js";import{v as Nt,h as xt,M as Mt}from"./lineSegment-3ivVGQNc.js";import{s as lt,m as nt,T as w,l as ot,N as q,H as it,V as _,_ as j,a as _t}from"./sphere-DoGSV0K5.js";import"./plane-aHrUkISy.js";import{i as mt}from"./Util-DRlRfUCu.js";import{m as jt}from"./edgeProcessing-CU64r8kh.js";import"./mat3f64-q3fE-ZOt.js";import"./mat4f64-CSKppSlJ.js";import"./quatf64-Bdb9ZJJK.js";import"./vec2f64-DA6GkJuH.js";import"./deduplicate-B_YKqNj1.js";import"./Indices-BhOjxL0t.js";import"./InterleavedLayout-DiAet0DN.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./types-D0PSWh4d.js";import"./VertexAttribute-BlT9lbVY.js";import"./enums-CxXC-vJk.js";import"./VertexElementDescriptor-BOD-G50G.js";function ft(o){return o?{ray:nt(o.ray),c0:o.c0,c1:o.c1}:{ray:nt(),c0:0,c1:Number.MAX_VALUE}}new lt(()=>ft());function H(o,t){for(let e=0;e=t[3])return!1}return!0}var st,c;(function(o){o[o.LEFT=0]="LEFT",o[o.RIGHT=1]="RIGHT",o[o.BOTTOM=2]="BOTTOM",o[o.TOP=3]="TOP",o[o.NEAR=4]="NEAR",o[o.FAR=5]="FAR"})(st||(st={})),function(o){o[o.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",o[o.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",o[o.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",o[o.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",o[o.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",o[o.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",o[o.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",o[o.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(c||(c={}));c.FAR_BOTTOM_RIGHT,c.NEAR_BOTTOM_RIGHT,c.NEAR_BOTTOM_LEFT,c.FAR_BOTTOM_LEFT,c.NEAR_BOTTOM_LEFT,c.NEAR_BOTTOM_RIGHT,c.NEAR_TOP_RIGHT,c.NEAR_TOP_LEFT,c.FAR_BOTTOM_RIGHT,c.FAR_BOTTOM_LEFT,c.FAR_TOP_LEFT,c.FAR_TOP_RIGHT,c.NEAR_BOTTOM_RIGHT,c.FAR_BOTTOM_RIGHT,c.FAR_TOP_RIGHT,c.NEAR_TOP_RIGHT,c.FAR_BOTTOM_LEFT,c.NEAR_BOTTOM_LEFT,c.NEAR_TOP_LEFT,c.FAR_TOP_LEFT,c.FAR_TOP_LEFT,c.NEAR_TOP_LEFT,c.NEAR_TOP_RIGHT,c.FAR_TOP_RIGHT;const Bt=6;new lt(ft);let D=class W{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new u,this._objectCount=0,e&&(e.maximumObjectsPerNode!==void 0&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),e.maximumDepth!==void 0&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),u.clearPool(),U[0]=null,x.prune(),M.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=u.acquire();for(let i=0;i{if(!zt(i,s))return!1;const a=s.node;return a.terminals.forAll(h=>{this._intersectsObject(i,h)&&n(h)}),a.residents!==null&&a.residents.forAll(h=>{this._intersectsObject(i,h)&&n(h)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,i){const s=ot(t,e);N(this._root,a=>{if(!It(s,a,i))return!1;const h=a.node;return h.terminals.forAll(r=>{this._intersectsObjectWithOffset(s,r,i)&&n(r)}),h.residents!==null&&h.residents.forAll(r=>{this._intersectsObjectWithOffset(s,r,i)&&n(r)}),!0})}forEach(t){N(this._root,e=>{const n=e.node;return n.terminals.forAll(t),n.residents!==null&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,i=()=>!0,s=1/0){let a=1/0,h=1/0,r=null;const d=V(t,e),m=l=>{if(--s,!i(l))return;const T=this.objectToBoundingSphere(l);if(!H(n,T))return;const R=S(t,e,_(T)),P=R-T[3],f=R+T[3];P{if(s<=0||!H(n,l.bounds)||(y(g,d,l.halfSize),B(g,g,_(l.bounds)),S(t,e,g)>h))return!1;const T=l.node;return T.terminals.forAll(R=>m(R)),T.residents!==null&&T.residents.forAll(R=>m(R)),!0},t,e),r}forEachInDepthRange(t,e,n,i,s,a,h){let r=-1/0,d=1/0;const m={setRange:f=>{n===W.DepthOrder.FRONT_TO_BACK?(r=Math.max(r,f.near),d=Math.min(d,f.far)):(r=Math.max(r,-f.far),d=Math.min(d,-f.near))}};m.setRange(i);const l=S(e,n,t),T=V(e,n),R=V(e,-n),P=f=>{if(!h(f))return;const E=this.objectToBoundingSphere(f),L=_(E),Y=S(e,n,L)-l,bt=Y-E[3],gt=Y+E[3];bt>d||gt{if(!H(a,f.bounds)||(y(g,T,f.halfSize),B(g,g,_(f.bounds)),S(e,n,g)-l>d)||(y(g,R,f.halfSize),B(g,g,_(f.bounds)),S(e,n,g)-lP(L)),E.residents!==null&&E.residents.forAll(L=>P(L)),!0},e,n)}forEachNode(t){N(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=q(e),i=_(e),s=r=>{const d=this.objectToBoundingSphere(r),m=q(d),l=n+m;return!(tt(_(d),i)-l*l<=0)||t(r)};let a=!0;const h=r=>{a&&(a=s(r))};N(this._root,r=>{const d=q(r.bounds),m=n+d;if(tt(_(r.bounds),i)-m*m>0)return!1;const l=r.node;return l.terminals.forAll(h),a&&l.residents!==null&&l.residents.forAll(h),a}),a&&this.forEachDegenerateObject(h)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||it(n,t)}_intersectsObjectWithOffset(t,e,n){const i=this.objectToBoundingSphere(e);return!(i[3]>0)||it(n.applyToBoundingSphere(i),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depththis.objectToBoundingSphere(n),A),z(A[3])&&!this._fitsInsideTree(A)))if(pt(this._root.node))w(A,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const n=this._rootBoundsForRootAsSubNode(A);this._placingRootViolatesMaxDepth(n)?this._rebuildTree(A,n):this._growRootAsSubNode(n),u.release(n)}}_rebuildTree(t,e){Z(_(J),_(e.bounds)),J[3]=e.halfSize,at([t,J],2,i=>i,K);const n=u.acquire().init(this._root);this._root.initFrom(null,K,K[3]),this._root.increaseHalfSize(1.25),N(n,i=>(this.add(i.node.terminals.data,i.node.terminals.length),i.node.residents!==null&&this.add(i.node.residents.data,i.node.residents.length),!0)),u.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return N(this._root,i=>(n=Math.max(n,i.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let i=-1/0;const s=this._root.bounds,a=this._root.halfSize;for(let r=0;r<3;r++){const d=s[r]-a-(n[r]-e),m=n[r]+e-(s[r]+a),l=Math.max(0,Math.ceil(d/(2*a))),T=Math.max(0,Math.ceil(m/(2*a)))+1,R=2**Math.ceil(Math.log(l+T)*Math.LOG2E);i=Math.max(i,R),C[r].min=l,C[r].max=T}for(let r=0;r<3;r++){let d=C[r].min,m=C[r].max;const l=(i-(d+m))/2;d+=Math.ceil(l),m+=Math.floor(l);const T=s[r]-a-d*a*2;k[r]=T+(m+d)*a}const h=i*a;return k[3]=h*Ot,u.acquire().initFrom(null,k,h,0)}_growRootAsSubNode(t){const e=this._root.node;Z(_(A),_(this._root.bounds)),A[3]=this._root.halfSize,this._root.init(t),t.advanceTo(A,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(t===-1)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(this._root.node.terminals.length!==0||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,i=0;for(;i=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,i=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:i}}}_nodeToJSON(t){var s,a;const e=t.children.map(h=>h?this._nodeToJSON(h):null),n=(s=t.residents)==null?void 0:s.map(h=>this.objectToBoundingSphere(h)),i=(a=t.terminals)==null?void 0:a.map(h=>this.objectToBoundingSphere(h));return{children:e,residents:n,terminals:i}}static fromJSON(t){const e=new W(n=>n,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}};class u{constructor(){this.bounds=j(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,i=this.depth){return this.node=t??u.createEmptyNode(),e&&w(e,this.bounds),this.halfSize=n,this.depth=i,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*Ot}advance(t){let e=this.node.children[t];e||(e=u.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=Tt[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const i=this._childIndex(t);e&&e(this,i),this.advance(i)}}isLeaf(){return this.node.residents!=null}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]=0;--a){const h=dt[a];i.node.children[h]&&s.push(u.acquire().init(i).advance(h))}u.release(i)}}function Pt(o,t,e){x.clear();const n=e.advanceTo(t,(i,s)=>{x.push(i.node),x.push(s)})?e.node.terminals:e.node.residents;if(n.removeUnordered(o),n.length===0)for(let i=x.length-2;i>=0&&Lt(x.data[i],x.data[i+1]);i-=2);}function Lt(o,t){return t>=0&&(o.children[t]=null),!!pt(o)&&(o.residents===null&&(o.residents=new I({shrink:!0})),!0)}function zt(o,t){return G(_(t.bounds),2*-t.halfSize,O),G(_(t.bounds),2*t.halfSize,b),mt(o.origin,o.direction,O,b)}function It(o,t,e){return G(_(t.bounds),2*-t.halfSize,O),G(_(t.bounds),2*t.halfSize,b),e.applyToMinMax(O,b),mt(o.origin,o.direction,O,b)}function pt(o){if(o.terminals.length!==0)return!1;if(o.residents!==null)return o.residents.length===0;for(let t=0;tn.distance-i.distance);for(let n=0;n<8;++n)e[n]=M.data[n].index}function V(o,t){let e,n=1/0;for(let i=0;i<8;++i){const s=S(o,t,ht[i]);s0}u._pool=new Rt(u),function(o){var t;(t=o.DepthOrder||(o.DepthOrder={}))[t.FRONT_TO_BACK=1]="FRONT_TO_BACK",t[t.BACK_TO_FRONT=-1]="BACK_TO_FRONT"}(D||(D={}));const Tt=[p(-1,-1,-1),p(1,-1,-1),p(-1,1,-1),p(1,1,-1),p(-1,-1,1),p(1,-1,1),p(-1,1,1),p(1,1,1)],ht=[p(-1,-1,-1),p(-1,-1,1),p(-1,1,-1),p(-1,1,1),p(1,-1,-1),p(1,-1,1),p(1,1,-1),p(1,1,1)],Ot=Math.sqrt(3),U=[null];function wt(o){return U[0]=o,U}const k=j(),g=F(),O=F(),b=F(),x=new I,Dt=j(),A=j(),J=j(),K=j(),C=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],M=new I,dt=[0,0,0,0,0,0,0,0],ct=D,Gt=1e3;function $t(o,t,e){const n=j(),i=_(n);return et(i,i,o,.5),et(i,i,t,.5),n[3]=Q(i,o),B(i,i,e),n}let X=class{constructor(){this._idToComponent=new Map,this._components=new ct(o=>o.bounds),this._edges=new ct(o=>o.bounds),this._tmpLineSegment=Nt(),this._tmpP1=F(),this._tmpP2=F(),this._tmpP3=F(),this.remoteClient=null}async fetchCandidates(o,t){await Promise.resolve(),Ft(t),await this._ensureEdgeLocations(o,t);const e=[];return this._edges.forEachNeighbor(n=>(this._addCandidates(o,n,e),e.length{if(s.info==null){const{id:a,uid:h}=s;e.push({id:a,uid:h})}return!0},o.bounds),!e.length)return;const n={components:e},i=await this.remoteClient.invoke("fetchAllEdgeLocations",n,t??{});for(const s of i.components)this._setFetchEdgeLocations(s)}async add(o){const t=new $(o.id,o.bounds);return this._idToComponent.set(t.id,t),this._components.add([t]),{result:{}}}async remove(o){const t=this._idToComponent.get(o.id);if(t){const e=[];this._edges.forEachNeighbor(n=>(n.component===t&&e.push(n),!0),t.bounds),this._edges.remove(e),this._components.remove([t]),this._idToComponent.delete(t.id)}return{result:{}}}_setFetchEdgeLocations(o){const t=this._idToComponent.get(o.id);if(t==null||o.uid!==t.uid)return;const e=jt.createView(o.locations),n=new Array(e.count),i=F(),s=F();for(let r=0;ri.map(i=>d[i]); +import{_ as S,fr as K,ay as C,bl as Q}from"./index-DKOmzAMm.js";import{y as W}from"./DoubleArray-D2IDWC15.js";import{i as X,a as Z}from"./MeshLocalVertexSpace-CZ-FLKyC.js";import{f as ee,l as te}from"./vec3-C6eb5QY9.js";import"./sphere-DoGSV0K5.js";import"./I3SUtil-7z-2YOel.js";import"./plane-aHrUkISy.js";import"./mat3f64-q3fE-ZOt.js";import"./mat4f64-CSKppSlJ.js";import"./quatf64-Bdb9ZJJK.js";import"./vec2f64-DA6GkJuH.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./I3SBinaryReader-BNZLVsC-.js";import"./VertexAttribute-BlT9lbVY.js";import"./NormalAttribute.glsl-DMc-kXcx.js";import"./BindType-BmZEZMMh.js";import"./orientedBoundingBox-RPlI7sU4.js";import"./mat3-BNGRf_pC.js";import"./quat-BYKy26Om.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";var N,j;(function(e){e[e.None=0]="None",e[e.Int16=1]="Int16",e[e.Int32=2]="Int32"})(N||(N={})),function(e){e[e.Replace=0]="Replace",e[e.Outside=1]="Outside",e[e.Inside=2]="Inside",e[e.Finished=3]="Finished"}(j||(j={}));function oe(){return O||(O=new Promise(e=>S(()=>import("./i3s-DfJIXEvM.js"),__vite__mapDeps([0,1])).then(t=>t.i).then(({default:t})=>{const o=t({locateFile:re,onRuntimeInitialized:()=>e(o)});delete o.then})).catch(e=>{throw e})),O}function re(e){return K(`esri/libs/i3s/${e}`)}let O;var $,b,B,k,H;(function(e){e[e.Unmodified=0]="Unmodified",e[e.Culled=1]="Culled",e[e.NotChecked=2]="NotChecked"})($||($={})),function(e){e[e.Unmodified=0]="Unmodified",e[e.PotentiallyModified=1]="PotentiallyModified",e[e.Culled=2]="Culled",e[e.Unknown=3]="Unknown",e[e.NotChecked=4]="NotChecked"}(b||(b={}));(function(e){e[e.Unknown=0]="Unknown",e[e.Uncached=1]="Uncached",e[e.Cached=2]="Cached"})(B||(B={})),function(e){e[e.None=0]="None",e[e.MaxScreenThreshold=1]="MaxScreenThreshold",e[e.ScreenSpaceRelative=2]="ScreenSpaceRelative",e[e.RemovedFeatureDiameter=3]="RemovedFeatureDiameter",e[e.DistanceRangeFromDefaultCamera=4]="DistanceRangeFromDefaultCamera"}(k||(k={})),function(e){e[e.Hole=0]="Hole",e[e.Leaf=1]="Leaf"}(H||(H={}));async function Re(e){n=await g();const t=[e.geometryBuffer];return{result:V(n,e,t),transferList:t}}async function Se(e){var m;n=await g();const t=[e.geometryBuffer],{geometryBuffer:o}=e,f=o.byteLength,i=n._malloc(f),u=new Uint8Array(n.HEAPU8.buffer,i,f);u.set(new Uint8Array(o));const c=n.dracoDecompressPointCloudData(i,u.byteLength);if(n._free(i),c.error.length>0)throw new Error(`i3s.wasm: ${c.error}`);const l=((m=c.featureIds)==null?void 0:m.length)>0?c.featureIds.slice():null,s=c.positions.slice();return l&&t.push(l.buffer),t.push(s.buffer),{result:{positions:s,featureIds:l},transferList:t}}async function Ne(e){await g(),ie(e);const t={buffer:e.buffer};return{result:t,transferList:[t.buffer]}}async function Ue(e){await g(),ne(e)}async function Me(e){n=await g(),n.setLegacySchema(e.context,e.jsonSchema)}async function Fe(e){const{localMatrix:t,origin:o,positions:f,vertexSpace:i,localMode:u}=e,c=C.fromJSON(e.inSpatialReference),l=C.fromJSON(e.outSpatialReference);let s;const[{projectBuffer:m},{initializeProjection:U}]=await Promise.all([S(()=>import("./index-DKOmzAMm.js").then(a=>a.k5),__vite__mapDeps([2,3])),S(()=>import("./index-DKOmzAMm.js").then(a=>a.k6),__vite__mapDeps([2,3]))]);await U(c,l);const w=[0,0,0];if(!m(o,c,0,w,l,0,1))throw new Error("Failed to project");if(i.type==="georeferenced"&&i.origin==null){if(s=new Float64Array(f.length),!m(f,c,0,s,l,0,s.length/3))throw new Error("Failed to project")}else{const a=i.type==="georeferenced"?X.fromJSON(i):Z.fromJSON(i),{project:p}=await S(async()=>{const{project:L}=await import("./projection-Ch_noS-l.js");return{project:L}},__vite__mapDeps([4,2,3,5,6,7,8,9,10,11,12,13,14])),d=p({positions:f,transform:t?{localMatrix:t}:void 0,vertexSpace:a,inSpatialReference:c,outSpatialReference:l,localMode:u});if(!d)throw new Error("Failed to project");s=W(d)}const _=s.length,[I,E,A]=w;for(let a=0;a<_;a+=3)s[a]-=I,s[a+1]-=E,s[a+2]-=A;return{result:{projected:s,original:f,projectedOrigin:w},transferList:[s.buffer,f.buffer]}}async function Oe({normalMatrix:e,normals:t}){const o=new Float32Array(t.length);return ee(o,t,e),Q(e)&&te(o,o),{result:{transformed:o,original:t},transferList:[o.buffer,t.buffer]}}function ve(e){Y(e)}let P,n;function ne(e){if(!n)return;const t=e.modifications,o=n._malloc(8*t.length),f=new Float64Array(n.HEAPU8.buffer,o,t.length);for(let i=0;iy.some(h=>h.name==="color")),normal:t.needNormals&&t.layouts.some(y=>y.some(h=>h.name==="normalCompressed")),uv0:t.layouts.some(y=>y.some(h=>h.name==="uv0")),uvRegion:t.layouts.some(y=>y.some(h=>h.name==="uvRegion")),featureIndex:L.featureIndex},r=e.process(f,!!t.obbData,_,A.byteLength,L,J,E,l,U,w,t.normalReferenceFrame);if(e._free(E),e._free(_),r.error.length>0)throw new Error(`i3s.wasm: ${r.error}`);if(r.discarded)return null;const M=r.componentOffsets.length>0?r.componentOffsets.slice():null,F=r.featureIds.length>0?r.featureIds.slice():null,z=r.anchorIds.length>0?Array.from(r.anchorIds):null,G=r.anchors.length>0?Array.from(r.anchors):null,v=r.interleavedVertedData.slice().buffer,T=r.indicesType===N.Int16?new Uint16Array(r.indices.buffer,r.indices.byteOffset,r.indices.byteLength/2).slice():new Uint32Array(r.indices.buffer,r.indices.byteOffset,r.indices.byteLength/4).slice(),x=r.positions.slice(),D=r.positionIndicesType===N.Int16?new Uint16Array(r.positionIndices.buffer,r.positionIndices.byteOffset,r.positionIndices.byteLength/2).slice():new Uint32Array(r.positionIndices.buffer,r.positionIndices.byteOffset,r.positionIndices.byteLength/4).slice(),q={layout:t.layouts[0],interleavedVertexData:v,indices:T,hasColors:r.hasColors,hasModifications:r.hasModifications,positionData:{data:x,indices:D}};return F&&o.push(F.buffer),M&&o.push(M.buffer),o.push(v),o.push(T.buffer),o.push(x.buffer),o.push(D.buffer),{componentOffsets:M,featureIds:F,anchorIds:z,anchors:G,transformedGeometry:q,obb:r.obb,globalTrafo:i}}function Te(e){return e===0?b.Unmodified:e===1?b.PotentiallyModified:e===2?b.Culled:b.Unknown}function ie(e){if(!n)return;const{context:t,buffer:o}=e,f=n._malloc(o.byteLength),i=o.byteLength/Float64Array.BYTES_PER_ELEMENT,u=new Float64Array(n.HEAPU8.buffer,f,i),c=new Float64Array(o);u.set(c),n.filterOBBs(t,f,i),c.set(u),n._free(f)}function Y(e){n&&n.destroy(e)===0&&(n=null)}function R(e,t){for(let o=0;o(n=e,P=null,n))),P)}const De={transform:(e,t)=>n&&V(n,e,t),destroy:Y};export{ve as destroyContext,Se as dracoDecompressPointCloudData,Ne as filterObbsForModifications,ie as filterObbsForModificationsSync,xe as initialize,Te as interpretObbModificationResults,Re as process,Fe as project,Me as setLegacySchema,Ue as setModifications,ne as setModificationsSync,De as test,Oe as transformNormals}; diff --git a/build/assets/SceneService-7YqMMGL5.js b/build/assets/SceneService-7YqMMGL5.js new file mode 100644 index 0000000..db3ba09 --- /dev/null +++ b/build/assets/SceneService-7YqMMGL5.js @@ -0,0 +1,3 @@ +import{U as f,s as y,B as l,D as c,cw as $,ay as _,aS as m,aZ as S,fH as L,cy as O,d2 as U,E as K,dz as V,e$ as C,d as M,fI as q,fJ as z,V as w,fK as k,I as F,S as J,C as B}from"./index-DKOmzAMm.js";import{i as A}from"./originUtils-D69mHv66.js";import{o as T}from"./jsonContext-SE-5k22x.js";import{p as D,n as Z}from"./resourceUtils-CwAv7wd8.js";import{i as R}from"./saveAPIKeyUtils-CqAN5-r5.js";import{t as H}from"./saveUtils-oCA1ZjYH.js";async function G(o,a,e,t,i,r,n){let s=null;if(e!=null){const h=`${o}/nodepages/`,E=h+Math.floor(e.rootIndex/e.nodesPerPage);try{return{type:"page",rootPage:(await f(E,{query:{f:"json",...t,token:i},responseType:"json",signal:n})).data,rootIndex:e.rootIndex,pageSize:e.nodesPerPage,lodMetric:e.lodSelectionMetricType,urlPrefix:h}}catch(N){r!=null&&r.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",E,N),s=N}}if(!a)return null;const p=a==null?void 0:a.split("/").pop(),d=`${o}/nodes/`,u=d+p;try{return{type:"node",rootNode:(await f(u,{query:{f:"json",...t,token:i},responseType:"json",signal:n})).data,urlPrefix:d}}catch(h){throw new y("sceneservice:root-node-missing","Root node missing.",{pageError:s,nodeError:h,url:u})}}let Q=null;function W(){return Q}const ae=o=>{let a=class extends o{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=V(async(e,t,i)=>{switch(e){case g.SAVE:return this._save(t);case g.SAVE_AS:return this._saveAs(i,t)}})}readSpatialReference(e,t){return I(t)}readFullExtent(e,t,i){if(e!=null&&typeof e=="object"){const s=e.spatialReference==null?{...e,spatialReference:I(t)}:e;return S.fromJSON(s,i)}const r=t.store,n=I(t);return n==null||(r==null?void 0:r.extent)==null||!Array.isArray(r.extent)||r.extent.some(s=>s=2&&(t.major=parseInt(i[0],10),t.minor=parseInt(i[1],10)),t}readVersion(e,t){const i=t.store,r=i.version!=null?i.version.toString():"";return this.parseVersionString(r)}readTitlePortalItem(e){return this.sublayerTitleMode!=="item-title"?void 0:e}readTitleService(e,t){var n;const i=(n=this.portalItem)==null?void 0:n.title;if(this.sublayerTitleMode==="item-title")return this.url?C(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){const s=M(this.url);s!=null&&(r=s.title)}return this.sublayerTitleMode==="item-title-and-service-name"&&i&&(r=i+" - "+r),q(r)}set url(e){if(e==null)return void this._set("url",e);const t=z({layer:this,url:e,nonStandardUrlAllowed:!1,logger:w.getLogger(this)});this._set("url",t.url),t.layerId!=null&&this._set("layerId",t.layerId)}writeUrl(e,t,i,r){k(this,e,"layers",t,r)}get parsedUrl(){const e=this._get("url"),t=F(e);return t&&this.layerId!=null&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){var i;this.indexInfo=G(((i=this.parsedUrl)==null?void 0:i.path)??"",this.rootNode,e,this.customParameters,this.apiKey,w.getLogger(this),t),this.fullExtent==null||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){var t,i,r,n;if((e==null?void 0:e.type)==="page"){const s=e.rootIndex%e.pageSize,p=(i=(t=e.rootPage)==null?void 0:t.nodes)==null?void 0:i[s];if(((r=p==null?void 0:p.obb)==null?void 0:r.center)==null||p.obb.halfSize==null)throw new y("sceneservice:invalid-node-page","Invalid node page.");if(p.obb.center[0]0)return t.data.layers[0].id}async _fetchServiceLayer(e){var n;const t=await f(((n=this.parsedUrl)==null?void 0:n.path)??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let i=!1;if(t.data.layerType&&t.data.layerType==="Voxel"&&(i=!0),i)return this._fetchVoxelServiceLayer();const r=t.data;this.read(r,this._getServiceContext()),this.validateLayer(r)}async _fetchVoxelServiceLayer(e){var i;const t=(await f(((i=this.parsedUrl)==null?void 0:i.path)+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){var e;return{origin:"service",portalItem:this.portalItem,portal:(e=this.portalItem)==null?void 0:e.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&typeof this.beforeSave=="function"&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){var d;const i={...P,...t};let r=J.from(e);if(!r)throw new y("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");R(r),r.id&&(r=r.clone(),r.id=null);const n=r.portal||B.getDefault();await this._ensureLoadBeforeSave(),r.type=b,r.portal=n;const s=T(r,"portal-item",!0),p={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(p,s,i),this.url&&(r.url=this.url),r.title||(r.title=this.title),j(r,i,v.newItem),await n.signIn(),await((d=n.user)==null?void 0:d.addItem({item:r,folder:i==null?void 0:i.folder,data:p})),await D(this.resourceReferences,s),this.portalItem=r,A(s),s.portalItem=r,r}async _save(e){const t={...P,...e};if(!this.portalItem)throw new y("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(R(this.portalItem),this.portalItem.type!==b)throw new y("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${b}"`);await this._ensureLoadBeforeSave();const i=T(this.portalItem,"portal-item",!0),r={layers:[this.write({},i)]};return await Promise.all(i.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(r,i,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),j(this.portalItem,t,v.existingItem),await Z(this.portalItem,r,this.resourceReferences,i),A(i),this.portalItem}async _validateAgainstJSONSchema(e,t,i){const r=i==null?void 0:i.validationOptions;H(t,{errorName:"sceneservice:save"},{ignoreUnsupported:r==null?void 0:r.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const n=r==null?void 0:r.enabled,s=W();if(n&&s){const p=(await s()).validate(e,i.portalItemLayerType);if(!p.length)return;const d=`Layer item did not validate: +${p.join(` +`)}`;if(w.getLogger(this).error(`_validateAgainstJSONSchema(): ${d}`),r.failPolicy==="throw"){const u=p.map(h=>new y("sceneservice:schema-validation",h));throw new y("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:u})}}}};return l([c($)],a.prototype,"id",void 0),l([c({type:_})],a.prototype,"spatialReference",void 0),l([m("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],a.prototype,"readSpatialReference",null),l([c({type:S})],a.prototype,"fullExtent",void 0),l([m("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],a.prototype,"readFullExtent",null),l([c({readOnly:!0,type:L})],a.prototype,"heightModelInfo",void 0),l([c({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],a.prototype,"minScale",void 0),l([c({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],a.prototype,"maxScale",void 0),l([c({readOnly:!0})],a.prototype,"version",void 0),l([m("version",["store.version"])],a.prototype,"readVersion",null),l([c({type:String,json:{read:{source:"copyrightText"}}})],a.prototype,"copyright",void 0),l([c({type:String,json:{read:!1}})],a.prototype,"sublayerTitleMode",void 0),l([c({type:String})],a.prototype,"title",void 0),l([m("portal-item","title")],a.prototype,"readTitlePortalItem",null),l([m("service","title",["name"])],a.prototype,"readTitleService",null),l([c({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],a.prototype,"layerId",void 0),l([c(O)],a.prototype,"url",null),l([U("url")],a.prototype,"writeUrl",null),l([c()],a.prototype,"parsedUrl",null),l([c({readOnly:!0})],a.prototype,"store",void 0),l([c({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],a.prototype,"rootNode",void 0),a=l([K("esri.layers.mixins.SceneService")],a),a},x=-1e38;function I(o){if(o.spatialReference!=null)return _.fromJSON(o.spatialReference);const a=o.store,e=a.indexCRS||a.geographicCRS,t=e&&parseInt(e.substring(e.lastIndexOf("/")+1,e.length),10);return t!=null?new _(t):null}function j(o,a,e){o.typeKeywords||(o.typeKeywords=[]);const t=a.getTypeKeywords();for(const i of t)o.typeKeywords.push(i);o.typeKeywords&&(o.typeKeywords=o.typeKeywords.filter((i,r,n)=>n.indexOf(i)===r),e===v.newItem&&(o.typeKeywords=o.typeKeywords.filter(i=>i!=="Hosted Service")))}var v;(function(o){o[o.existingItem=0]="existingItem",o[o.newItem=1]="newItem"})(v||(v={}));const b="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var g;(function(o){o[o.SAVE=0]="SAVE",o[o.SAVE_AS=1]="SAVE_AS"})(g||(g={}));export{g as C,ae as L,G as r}; diff --git a/build/assets/SpatialFilter-DCIoEGCD.js b/build/assets/SpatialFilter-DCIoEGCD.js new file mode 100644 index 0000000..4981447 --- /dev/null +++ b/build/assets/SpatialFilter-DCIoEGCD.js @@ -0,0 +1 @@ +import{O as T,n as _,t as g,s as m,a as y,r as z}from"./WhereClause-CILeHwR9.js";import{D as ee,aq as h,ar as k,as as L,at as x,au as O,av as U,aw as te,ax as ne,ay as re,az as ae,aA as F,aB as se,aC as ie,aD as B,aE as H,aF as Y}from"./arcadeUtils-BvZmzJL_.js";import{n as G,m as le,b as V}from"./TimeOnly-C2MfFEIr.js";import{g1 as oe,ay as ue,bE as ce,bY as Z}from"./index-DKOmzAMm.js";import{b as he,K as de,W as pe,M as fe,F as _e,R as ge,m as me,S as ye,x as Se,O as we,p as Te,h as K}from"./geometryEngineAsync-BODJChyU.js";class v{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){this._databaseTypeMetaData[e]===void 0&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return e==="MUSTBESET"||this._databaseTypeMetaData[e]===void 0?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return this._layerInfo[e]===void 0?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){this._layerInfo[e]!==void 0&&delete this._layerInfo[e]}}v.applicationCache=null;class Ie{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}async nextBatchAsArcadeFeatures(e,t){const n=await this.nextBatch(e);return n===null?n:n.map(r=>ee.createFromGraphicLikeObject(r.geometry,r.attributes,this._parent,t))}nextBatch(e){if(this._parent._mainSetInUse!==null)return this._parent._mainSetInUse.then(r=>this.nextBatch(e),r=>this.nextBatch(e));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise((r,s)=>{this._parent._getSet(this._progress).then(i=>{const l=i._known;let o=l.length-1;if(l[l.length-1]==="GETPAGES"&&(o-=1),this._lastId+e>o&&l.length>0&&l[l.length-1]==="GETPAGES")return void this._parent._expandPagedSet(i,this._parent._maxQueryRate(),0,0,this._progress).then(c=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)},c=>{t.hasset=!0,this._parent._mainSetInUse=null,s(c)});const u=i._candidates;if(o>=this._lastId+e||u.length===0){for(let c=0;c=l.length)break;n[c]=l[p]}return this._lastId+=n.length,n.length===0&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then(c=>{t.hasset=!0,this._parent._mainSetInUse=null,r(c)},c=>{t.hasset=!0,this._parent._mainSetInUse=null,s(c)})}this._parent._refineSetBlock(i,this._parent._maxProcessingRate(),this._progress).then(()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)},c=>{t.hasset=!0,this._parent._mainSetInUse=null,s(c)})},i=>{t.hasset=!0,this._parent._mainSetInUse=null,s(i)})}),t.hasset===!1&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(this._parent._mainSetInUse!==null)return this._parent._mainSetInUse.then(t=>this.next(),t=>this.next());const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise((t,n)=>{this._parent._getSet(this._progress).then(r=>{const s=r._known;this._lastId(e.hasset=!0,this._parent._mainSetInUse=null,this.next())).then(t,n):(this._lastId+=1,this._parent._getFeature(r,s[this._lastId],this._progress).then(i=>{e.hasset=!0,this._parent._mainSetInUse=null,t(i)},i=>{e.hasset=!0,this._parent._mainSetInUse=null,n(i)})):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then(()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)},i=>{e.hasset=!0,this._parent._mainSetInUse=null,n(i)}):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))},r=>{e.hasset=!0,this._parent._mainSetInUse=null,n(r)})}),e.hasset===!1&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(this._parent._totalCount!==-1)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&e._known[e._known.length-1]==="GETPAGES")return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if(e._known[e._candidates.length-1]==="GETPAGES")return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}class D{constructor(e,t,n,r){this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}function Q(a,e){return d(a==null?void 0:a.parseTree,e,a==null?void 0:a.parameters)}function Ze(a,e,t){return d(a,e,t)}function Ke(a,e,t,n){return T.create(d(a.parseTree,h.Standardised,a.parameters,e,t),n,a.timeZone)}function Qe(a,e,t="AND"){return T.create("(("+Q(a,h.Standardised)+")"+t+"("+Q(e,h.Standardised)+"))",a.fieldsIndex,a.timeZone)}function d(a,e,t,n=null,r=null){let s,i,l,o;switch(a.type){case"interval":return ve(d(a.value,e,t,n,r),a.qualifier,a.op);case"case-expression":{let u=" CASE ";a.format==="simple"&&(u+=d(a.operand,e,t,n,r));for(let c=0;c":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+d(a.left,e,t,n,r)+" "+a.operator+" "+d(a.right,e,t,n,r)+") ";case"||":return" ("+d(a.left,e,t,n,r)+" "+(e===h.SqlServer?"+":a.operator)+" "+d(a.right,e,t,n,r)+") "}throw new _(g.UnsupportedOperator,{operator:a.operator});case"null":return"null";case"boolean":return a.value===!0?"1":"0";case"string":return"'"+a.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${a.value}'`;case"date":return`date '${a.value}'`;case"time":return`time '${a.value}'`;case"number":return a.value.toString();case"current-time":return be(a.mode==="date",e);case"column-reference":return n?n.toLowerCase()===a.column.toLowerCase()?"("+r+")":a.delimited===!0?`"${a.column.split('"').join('""')}"`:a.column:a.column;case"data-type":return a.value;case"function":{const u=d(a.args,e,t,n,r);return Fe(a.name,u,e)}}throw new _(g.UnsupportedSyntax,{node:a.type})}function Fe(a,e,t){switch(a.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(e.length!==1)throw new _(g.InvalidFunctionParameters,{function:a.toLowerCase().trim()});return`${a.toUpperCase().trim()}(${e[0]})`;case"ceiling":case"ceil":if(e.length!==1)throw new _(g.InvalidFunctionParameters,{function:"ceiling"});switch(t){case h.Standardised:case h.StandardisedNoInterval:}return"CEILING("+e[0]+")";case"mod":case"power":case"nullif":if(e.length!==2)throw new _(g.InvalidFunctionParameters,{function:a.toLowerCase().trim()});return`${a.toUpperCase().trim()}(${e[0]},${e[1]})`;case"round":if(e.length===2)return"ROUND("+e[0]+","+e[1]+")";if(e.length===1)return"ROUND("+e[0]+")";throw new _(g.InvalidFunctionParameters,{function:"round"});case"truncate":if(e.length<1||e.length>2)throw new _(g.InvalidFunctionParameters,{function:"truncate"});return t===h.SqlServer?"ROUND("+e[0]+(e.length===1?"0":","+e[1])+",1)":"TRUNCATE("+e[0]+(e.length===1?")":","+e[1]+")");case"char_length":case"len":if(e.length!==1)throw new _(g.InvalidFunctionParameters,{function:"char_length"});switch(t){case h.SqlServer:return"LEN("+e[0]+")";case h.Oracle:return"LENGTH("+e[0]+")";default:return"CHAR_LENGTH("+e[0]+")"}case"coalesce":case"concat":{if(e.length<1)throw new _(g.InvalidFunctionParameters,{function:a.toLowerCase()});let n=a.toUpperCase().trim()+"(";for(let r=0;r":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if(e.right.type!=="null")throw new _(g.UnsupportedIsRhs);return"boolean";case"*":case"-":case"+":case"/":return N([S(a,e.left,t,n),S(a,e.right,t,n)]);case"||":return"string";default:throw new _(g.UnsupportedOperator,{operator:e.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return e.value===null?"":e.value%1==0?"integer":"double";case"date":return"date";case"timestamp":return e.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"current-time":return"date";case"column-reference":{const c=a[e.column.toLowerCase()];return c===void 0?"":c}case"function":switch(e.name.toLowerCase()){case"cast":switch(((i=(s=e.args)==null?void 0:s.value[1])==null?void 0:i.value.type)??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return((u=(o=(l=e.args)==null?void 0:l.value[1])==null?void 0:o.value)==null?void 0:u.withtimezone)===!0?"timestamp-offset":"date";case"time":return"time-only";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(r=S(a,e.args,t,n),Array.isArray(r)){if(r.length<=0)return"double";r=r[0]}return r;case"sign":return"integer";case"ceiling":case"floor":case"abs":return r=S(a,e.args,t,n),Array.isArray(r)&&(r=N(r)),r==="integer"||r==="double"?r:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return r=S(a,e.args,t,n),Array.isArray(r)?r.length>0?r[0]:"":r}return""}throw new _(g.UnsupportedSyntax,{node:e.type})}const j={boolean:1,string:2,integer:3,double:4,date:5};function N(a){if(a){let e="";for(const t of a)t!==""&&(e=e===""||j[e]=e&&e!==-1)return t}return t}function Je(a){switch(a.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function je(a,e,t=1e3){switch(a.toLowerCase()){case"distinct":return Re(e,t);case"avg":case"mean":return R(e);case"min":return Math.min.apply(Math,e);case"sum":return X(e);case"max":return Math.max.apply(Math,e);case"stdev":case"stddev":return Math.sqrt(W(e));case"var":case"variance":return W(e);case"count":return e.length}return 0}async function Ce(a,e,t){const n=await A(a,e,t,!0);return n.length===0?null:Math.min.apply(Math,n)}async function Ne(a,e,t){const n=await A(a,e,t,!0);return n.length===0?null:Math.max.apply(Math,n)}async function Pe(a,e,t){let n="";e&&!Ee(e)&&(n=De(e,a.fields));const r=await A(a,e,t,!0);if(r.length===0)return null;const s=R(r);return s===null?s:n==="integer"?Ae(s):s}async function ke(a,e,t){const n=await A(a,e,t,!0);return n.length===0?null:$(n)}async function Le(a,e,t){const n=await A(a,e,t,!0);return n.length===0?null:Math.sqrt($(n))}async function xe(a,e,t){const n=await A(a,e,t,!0);return n.length===0?null:X(n)}async function Oe(a,e){return a.iterator(e).count()}async function A(a,e,t,n=!1){const r=a.iterator(t),s=[],i={ticker:0};let l=await r.next();for(;l!==null;){if(i.ticker++,t.aborted)throw new m(y.Cancelled);i.ticker%100==0&&(i.ticker=0,await new Promise(u=>{setTimeout(u,0)}));const o=e==null?void 0:e.calculateValue(l);o===null?n===!1&&(s[s.length]=o):s[s.length]=o instanceof V||o instanceof G?o.toNumber():o instanceof z?o.toMilliseconds():o,l=await r.next()}return s}async function Ue(a,e,t=1e3,n=null){const r=a.iterator(n),s=[],i={},l={ticker:0};let o=await r.next();for(;o!==null;){if(l.ticker++,n==null?void 0:n.aborted)throw new m(y.Cancelled);l.ticker%100==0&&(l.ticker=0,await new Promise(p=>{setTimeout(p,0)}));const u=e==null?void 0:e.calculateValue(o);let c=u;if(u instanceof V?c="!!DATEONLY!!-"+u.toString():u instanceof z?c="!!TSOFFSETONLY!!-"+u.toString():u instanceof G?c="!!TIMEONLY!!-"+u.toString():u instanceof Date&&(c="!!DATE!!-"+u.toString()),u!=null&&i[c]===void 0&&(s.push(u),i[c]=1),s.length>=t&&t!==-1)return s;o=await r.next()}return s}class f{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=h.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,this.fsetInfo=null,e!=null&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e!=null&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return t===void 0?this[e]:(this[e]!==void 0&&(this[e]=t),this)}end(){return this._parent!==null&&this._parent._transparent===!0?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return this._loadPromise===null&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){var e,t;return((e=this._parent)==null?void 0:e.loaded)===!0?(this._initialiseFeatureSet(),this):(await((t=this._parent)==null?void 0:t.load()),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){this._parent!==null?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new ue({wkid:4326}),this.geometryType=ae.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some(r=>(r&&r.name.toLowerCase()===e&&(n=r),!!n))),n}getFieldsIndex(){return this._fieldsIndex===null&&(this._fieldsIndex=ce.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return this._parent!==null?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return this._parent!==null?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(e!=null&&e.aborted)throw new m(y.Cancelled)}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,s){return this._parent!==null&&this._parent._canDoAggregates(e,t,n,r,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l){if(this._parent===null)throw new m(y.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l)}async _getAgregagtePhysicalPage(e,t,n){if(this._parent===null)throw new m(y.NeverReach);return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===h.NotEvaluated){if(v.applicationCache!==null){const e=v.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(e!==null)return e}if(this._databaseTypeProbed!==null)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),v.applicationCache!==null&&v.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw v.applicationCache!==null&&v.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:h.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:h.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:h.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(await this._runDatabaseProbe(t.testwhere)===!0)return t.thetype;return h.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(this._parent!==null)return this._parent._runDatabaseProbe(e);throw new m(y.NotImplemented)}isTable(){var e;return((e=this._parent)==null?void 0:e.isTable())??!1}_featureFromCache(e){if(this._featureCache[e]!==void 0)return this._featureCache[e]}_isInFeatureSet(e){return F.Unknown}_getSet(e){throw new m(y.NotImplemented)}async _getFeature(e,t,n){if(this._checkCancelled(n),this._featureFromCache(t)!==void 0)return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),this._featureFromCache(t)!==void 0)return this._featureFromCache(t);throw new m(y.MissingFeatures)}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new D([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const s of e)this._featureFromCache(s)!==void 0&&r.push(this._featureFromCache(s));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,s){throw new m(y.NotImplemented)}async _refineSetBlock(e,t,n){if(this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate())===!0)return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let s=r-e._candidates.length;if(e._candidates.length===0||s>=t)return e;if(await this._refineIfParentKnown(e,t-s,n),this._checkCancelled(n),this._refineKnowns(e,t-s),s=r-e._candidates.length,s0){const i=t-s,l=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(l,l.length>i?i:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-s),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n=t)break}r!==null&&s.push(r);for(let i=s.length-1;i>=0;i--)e._candidates.splice(s[i].start,s[i].end-s[i].start+1)}_refineIfParentKnown(e,t,n){const r=new D([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(e.pagesDefinition===null)return!1;let n=0;for(let r=e._lastFetchedIndex;r=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(e.pagesDefinition===null)return!1;let n=0;for(let r=0;r=t)break}return!1}async _expandPagedSet(e,t,n,r,s){if(this._parent===null)throw new m(y.NotImplemented);return this._parent._expandPagedSet(e,t,n,r,s)}async _expandPagedSetFeatureSet(e,t,n,r,s){if(e._known.length>0&&e._known[e._known.length-1]==="GETPAGES"&&(r=1),r===0&&e._candidates.length>0&&e._candidates[e._candidates.length-1]==="GETPAGES"&&(r=2),r===0)return"finished";const i=await this._getPage(e,r,s);return n+ie.pagesDefinition.resultOffset||e.pagesDefinition.internal.fullyResolved===!0){r.length=r.length-1;let s=0;for(let l=0;l=e.pagesDefinition.internal.set.length);l++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+l],s++;e.pagesDefinition.resultOffset+=s;let i=!1;return e.pagesDefinition.internal.fullyResolved===!0&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(i=!0),i===!1&&r.push("GETPAGES"),s}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return this._parent===null?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let s=await this._stat(e,t,"",null,null,n,r);return s.calculated===!1&&(s=await this._manualStat(e,t,n,r)),s.result}async _manualStat(e,t,n,r){let s=null;switch(e.toLowerCase()){case"count":return s=await Oe(this,r),{calculated:!0,result:s};case"distinct":return s=await Ue(this,t,n,r),{calculated:!0,result:s};case"avg":case"mean":return s=await Pe(this,t,r),{calculated:!0,result:s};case"stdev":return s=await Le(this,t,r),{calculated:!0,result:s};case"variance":return s=await ke(this,t,r),{calculated:!0,result:s};case"sum":return s=await xe(this,t,r),{calculated:!0,result:s};case"min":return s=await Ce(this,t,r),{calculated:!0,result:s};case"max":return s=await Ne(this,t,r),{calculated:!0,result:s};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,s,i,l){const o=await this._parent._stat(e,t,n,r,s,i,l);return o.calculated===!1?s===null&&n===""&&r===null?this._manualStat(e,t,i,l):{calculated:!1}:o}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise((r,s)=>{this._unionShapeInBatches(n,t,r,s)})}_unionAllGeom(e){return new Promise((t,n)=>{const r=this.iterator(this._defaultTracker(e)),s=[];this._unionShapeInBatches(s,r,t,n)})}_unionShapeInBatches(e,t,n,r){t.next().then(s=>{try{s!==null&&s.geometry!==null&&e.push(s.geometry),e.length>30||s===null&&e.length>1?he(e).then(i=>{try{s===null?n(i):(e=[i],this._unionShapeInBatches(e,t,n,r))}catch(l){r(l)}},r):s===null?e.length===1?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(i){r(i)}},r)}iterator(e){return new Ie(this,e)}intersection(e,t=!1){return f._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return f._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return f._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return f._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return f._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return f._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return f._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return f._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return f._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return f._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return f._featuresetFunctions.relate.bind(this)(e,t)}within(e){return f._featuresetFunctions.within.bind(this)(e)}touches(e){return f._featuresetFunctions.touches.bind(this)(e)}top(e){return f._featuresetFunctions.top.bind(this)(e)}crosses(e){return f._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return f._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return f._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return f._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return f._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return f._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)})}_reduceImpl(e,t,n,r,s,i,l){try{if(++l>1e3)return void setTimeout(()=>{l=0,this._reduceImpl(e,t,n,r,s,i,l)});e.next().then(o=>{try{if(o===null)s(n);else{const u=t(n,o,r,this);Z(u)?u.then(c=>{this._reduceImpl(e,t,c,r+1,s,i,l)},i):this._reduceImpl(e,t,u,r+1,s,i,l)}}catch(u){i(u)}},i)}catch(o){i(o)}}removeField(e){return f._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return f._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=se(e);return this.reduce((s,i)=>i.geometry===null?0:t?de(i.geometry,r).then(l=>s+l):pe(i.geometry,r).then(l=>s+l),0,n)}sumLength(e,t=!1,n){const r=ie(e);return this.reduce((s,i)=>i.geometry===null?0:t?fe(i.geometry,r).then(l=>s+l):_e(i.geometry,r).then(l=>s+l),0,n)}async distinct(e,t=1e3,n=null,r){await this.load();const s=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=T.create(e,this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC);return E(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",T.create("1",this.getFieldsIndex(),this.dateFieldsTimeZoneDefaultUTC),-1,this._defaultTracker(e))}_defaultTracker(e){return e??{aborted:!1}}forEach(e,t){return new Promise((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)})}_forEachImpl(e,t,n,r,s,i){try{if(++i>1e3)return void setTimeout(()=>{i=0,this._forEachImpl(e,t,n,r,s,i)},0);e.next().then(l=>{try{if(l===null)r(n);else{const o=t(l);o==null?this._forEachImpl(e,t,n,r,s,i):Z(o)?o.then(()=>{try{this._forEachImpl(e,t,n,r,s,i)}catch(u){s(u)}},s):this._forEachImpl(e,t,n,r,s,i)}}catch(o){s(o)}},s)}catch(l){s(l)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let n=0;n{var i;const s={geometry:(i=r.geometry)==null?void 0:i.toJSON(),attributes:{}};for(const l in r.attributes)s.attributes[l]=r.attributes[l];return t.featureSet.features.push(s),1},0,e).then(()=>t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetaData(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(B(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:H[this.geometryType]===void 0?"esriGeometryNull":H[this.geometryType],fields:e}}async convertToText(e,t){if(e==="schema")return await this._ensureLoaded(),JSON.stringify(this.schema());if(e==="featureset"){await this._ensureLoaded();const n=[];await this.reduce((s,i)=>{const l={geometry:i.geometry?i.geometry.toJSON():null,attributes:i.attributes};return l.geometry!==null&&l.geometry.spatialReference&&delete l.geometry.spatialReference,n.push(l),1},0,t);const r=this.schema();return r.features=n,r.spatialReference=this.spatialReference.toJSON(),JSON.stringify(r)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent!==null?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return this._parent!==null?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return(e==null?void 0:e.featureset)==="keeptype"?this:(e==null?void 0:e.featureset)==="none"?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){var s;if((t==null?void 0:t.featureset)==="keeptype")return this;if((t==null?void 0:t.featureset)==="schema")return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if((t==null?void 0:t.featureset)==="none")return null;await this._ensureLoaded();const n=[];await this.reduce((i,l)=>{const o={geometry:l.geometry?(t==null?void 0:t.keepGeometryType)===!0?l.geometry:l.geometry.toJSON():null,attributes:l.attributes};return o.geometry!==null&&o.geometry.spatialReference&&(t==null?void 0:t.keepGeometryType)!==!0&&delete o.geometry.spatialReference,n.push(o),1},0,e);const r=this.schema();return r.features=n,r.spatialReference=(t==null?void 0:t.keepGeometryType)===!0?this.spatialReference:(s=this.spatialReference)==null?void 0:s.toJSON(),r}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){var e;return((e=this._parent)==null?void 0:e.preferredTimeZone)??null}get dateFieldsTimeZone(){var e;return((e=this._parent)==null?void 0:e.dateFieldsTimeZone)??null}get dateFieldsTimeZoneDefaultUTC(){if(this.datesInUnknownTimezone)return"unknown";const e=this.dateFieldsTimeZone??"UTC";return e===""?"UTC":e}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){var e;return((e=this._parent)==null?void 0:e.editFieldsInfo)??null}get timeInfo(){var e;return((e=this._parent)==null?void 0:e.timeInfo)??null}set featureSetInfo(e){this.fsetInfo=e}async getFeatureSetInfo(){var e;return this.fsetInfo??await((e=this._parent)==null?void 0:e.getFeatureSetInfo())??null}}function E(a,e){if(e!==null){const t={};for(const n in e)t[n.toLowerCase()]=e[n];a.parameters=t}}f._featuresetFunctions={};class b extends f{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new D([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=h.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return F.NotInFeatureSet}async _getFeature(){throw new m(y.NeverReach)}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new m(y.NeverReach)}async _getFilteredSet(){return new D([],[],!1,null)}_stat(e,t,n,r,s,i,l){return this._manualStat(e,t,i,l)}async _canDoAggregates(){return!1}}class I extends f{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(this._wset===null){await this._ensureLoaded();const t=await this._parent._getFilteredSet(this._relation!=="esriSpatialRelRelation"?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new D(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===F.NotInFeatureSet?t:(t=this._idstates[e],t===void 0?F.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(e.geometry===null)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":return K(Y(this._relationGeom),Y(e.geometry));case"esriSpatialRelIntersects":return K(this._relationGeom,e.geometry);case"esriSpatialRelContains":return Te(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return we(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return Se(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return ye(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return me(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return ge(this._relationGeom,e.geometry,this._relationString??"")}}async _fetchAndRefineFeatures(e,t,n){var l;const r=new D([],e,!1,null),s=Math.min(t,e.length);await((l=this._parent)==null?void 0:l._getFeatures(r,-1,s,n)),this._checkCancelled(n);const i=[];for(let o=0;oi.map(i=>d[i]); +import{B as t,D as s,E as I,F,eg as E,eh as P,cq as A,ei as O,cu as k,cr as D,cF as U,cs as N,ct as C,cv as L,cG as V,co as G,ay as $,dz as J,s as d,aK as M,ej as f,eG as z,V as q,eH as K,_ as v,ch as h,eI as W,el as Z,dK as B,eJ as u,U as H,cg as Q,ek as Y,t as X,eK as ee,aZ as te,en as ie,eo as se,ep as re,cx as oe,ey as g,eL as ne,eM as ae,er as le,es as pe,et as de,eu as ce,aS as w,$ as ue,ev as ye,cy as he,ex as me,cE as fe}from"./index-DKOmzAMm.js";var m;let p=m=class extends F{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new m({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};t([s({type:Number,json:{write:!0}})],p.prototype,"age",void 0),t([s({type:Number,json:{write:!0}})],p.prototype,"ageReceived",void 0),t([s({type:Number,json:{write:!0}})],p.prototype,"displayCount",void 0),t([s({type:Number,json:{write:!0}})],p.prototype,"maxObservations",void 0),p=m=t([I("esri.layers.support.PurgeOptions")],p);const x=p,b=me();function S(e,r){return new d("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${r}`,{layer:e})}let i=class extends E(P(A(O(k(D(U(N(C(L(V(G(fe)))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new x,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=$.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=J(async(r,o,a)=>{const{save:n,saveAs:l}=await v(()=>import("./streamLayerUtils-CwdAycHZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]));switch(r){case u.SAVE:return n(this,o);case u.SAVE_AS:return l(this,a,o)}})}normalizeCtorArgs(e,r){return typeof e=="string"?{url:e,...r}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new d("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const r=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(M).then(()=>this._fetchService(r))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const r=this._normalizeFeatureReduction(e);this._set("featureReduction",r)}set renderer(e){f(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,r,o){var n;r=r.layerDefinition||r;const a=(n=r.drawingInfo)==null?void 0:n.renderer;if(a){const l=z(a,r,o)||void 0;return l||q.getLogger(this).error("Failed to create renderer",{rendererDefinition:r.drawingInfo.renderer,layer:this,context:o}),l}return K(r,o)}async connect(e){const[{createConnection:r}]=await Promise.all([v(()=>import("./createConnection-BFN_9xe7.js"),__vite__mapDeps([9,2,3,10,11,12,13,14,15,16,17,18])),this.load()]),o=this.geometryType?h.toJSON(this.geometryType):null,{customParameters:a=null,definitionExpression:n=null,geometryDefinition:l=null,maxReconnectionAttempts:j=0,maxReconnectionInterval:R=20,spatialReference:T=this.spatialReference}=e||this.createConnectionParameters(),c=r(this.parsedUrl,this.spatialReference,T,o,n,l,j,R,a??void 0),_=W([this.on("send-message-to-socket",y=>c.sendMessageToSocket(y)),this.on("send-message-to-client",y=>c.sendMessageToClient(y))]);return c.once("destroy",_.remove),c}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return Z(this,e)}createQuery(){const e=new B;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,r){if(!this.fields)return null;let o=null;return this.fields.some(a=>(a.name===e&&(o=a.domain),!!o)),o}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(u.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(u.SAVE_AS,r,e)}write(e,r){const o=r==null?void 0:r.messages;return this.webSocketUrl?(o==null||o.push(S(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,r):(o==null||o.push(S(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){var r,o,a;if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:n}=await H(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=n}}else{if(!((r=this.timeInfo)!=null&&r.trackIdField))throw new d("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const n=(o=this.fields.find(l=>l.type==="oid"))==null?void 0:o.name;if(!n)throw new d("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=n}if(!this.fields)throw new d("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some(n=>n.name===this.objectIdField)||this.fields.push(new Q({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new d("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:(a=this.portalItem)==null?void 0:a.portal,url:this.parsedUrl}),f(this.renderer,this.fieldsIndex),Y(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),X(this,{origin:"service"})}};t([s({type:String})],i.prototype,"copyright",void 0),t([s({readOnly:!0})],i.prototype,"defaultPopupTemplate",null),t([s({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),t([s({type:String})],i.prototype,"displayField",void 0),t([s({type:ee})],i.prototype,"elevationInfo",void 0),t([s({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],i.prototype,"featureReduction",null),t([s(b.fields)],i.prototype,"fields",void 0),t([s(b.fieldsIndex)],i.prototype,"fieldsIndex",void 0),t([s({type:te,json:{name:"layerDefinition.definitionGeometry",write:!0}})],i.prototype,"geometryDefinition",void 0),t([s({type:h.apiValues,json:{read:{reader:h.read}}})],i.prototype,"geometryType",void 0),t([s(ie)],i.prototype,"labelsVisible",void 0),t([s({type:[se],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:re},write:!0}})],i.prototype,"labelingInfo",void 0),t([s(oe)],i.prototype,"legendEnabled",void 0),t([s({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],i.prototype,"listMode",void 0),t([s({type:g})],i.prototype,"maxReconnectionAttempts",void 0),t([s({type:g})],i.prototype,"maxReconnectionInterval",void 0),t([s(ne)],i.prototype,"maxScale",void 0),t([s(ae)],i.prototype,"minScale",void 0),t([s({type:String})],i.prototype,"objectIdField",void 0),t([s({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],i.prototype,"operationalLayerType",void 0),t([s({readOnly:!0})],i.prototype,"outFields",void 0),t([s(le)],i.prototype,"popupEnabled",void 0),t([s({type:pe,json:{name:"popupInfo",write:!0}})],i.prototype,"popupTemplate",void 0),t([s({type:x})],i.prototype,"purgeOptions",void 0),t([s({json:{read:!1,write:!1}})],i.prototype,"refreshInterval",void 0),t([s({types:de,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:ce,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],i.prototype,"renderer",null),t([w("service","renderer",["drawingInfo.renderer","defaultSymbol"]),w("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],i.prototype,"readRenderer",null),t([s((()=>{const e=ue(ye);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],i.prototype,"screenSizePerspectiveEnabled",void 0),t([s()],i.prototype,"sourceJSON",void 0),t([s({type:$,json:{origins:{service:{read:{source:"spatialReference"}}}}})],i.prototype,"spatialReference",void 0),t([s({json:{read:!1}})],i.prototype,"type",void 0),t([s(he)],i.prototype,"url",void 0),t([s({type:Number})],i.prototype,"updateInterval",void 0),t([s({json:{read:!1,write:!1}})],i.prototype,"useViewTime",void 0),t([s({type:String})],i.prototype,"webSocketUrl",void 0),i=t([I("esri.layers.StreamLayer")],i);const ge=i;export{ge as default}; diff --git a/build/assets/StyleRepository-B96C0kSY.js b/build/assets/StyleRepository-B96C0kSY.js new file mode 100644 index 0000000..d402b91 --- /dev/null +++ b/build/assets/StyleRepository-B96C0kSY.js @@ -0,0 +1,9 @@ +import{e as Ne,n as Ae,p as U,i as Nt,b as kt,I as Le,N as pe,R as xe,P as Pe}from"./GeometryUtils-6Cd4d7Hy.js";import{gR as N,ih as ee,ii as re,ij as ae,aF as Oe}from"./index-DKOmzAMm.js";import{C as g}from"./enums-CxXC-vJk.js";import{t as x}from"./VertexElementDescriptor-BOD-G50G.js";var ne,j,ie;(function(i){i[i.FILL=1]="FILL",i[i.LINE=2]="LINE",i[i.SYMBOL=3]="SYMBOL",i[i.CIRCLE=4]="CIRCLE"})(ne||(ne={})),function(i){i[i.BACKGROUND=0]="BACKGROUND",i[i.FILL=1]="FILL",i[i.OUTLINE=2]="OUTLINE",i[i.LINE=3]="LINE",i[i.ICON=4]="ICON",i[i.CIRCLE=5]="CIRCLE",i[i.TEXT=6]="TEXT",i[i.TILEINFO=7]="TILEINFO"}(j||(j={})),function(i){i[i.PAINTER_CHANGED=0]="PAINTER_CHANGED",i[i.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",i[i.LAYER_CHANGED=2]="LAYER_CHANGED",i[i.LAYER_REMOVED=3]="LAYER_REMOVED",i[i.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(ie||(ie={}));var v,W,At,Y,Lt,bt,xt,Z,Pt;(function(i){i[i.BACKGROUND=0]="BACKGROUND",i[i.FILL=1]="FILL",i[i.LINE=2]="LINE",i[i.SYMBOL=3]="SYMBOL",i[i.CIRCLE=4]="CIRCLE"})(v||(v={})),function(i){i[i.VISIBLE=0]="VISIBLE",i[i.NONE=1]="NONE"}(W||(W={})),function(i){i[i.POINT=0]="POINT",i[i.LINE=1]="LINE",i[i.LINE_CENTER=2]="LINE_CENTER"}(At||(At={})),function(i){i[i.MAP=0]="MAP",i[i.VIEWPORT=1]="VIEWPORT",i[i.AUTO=2]="AUTO"}(Y||(Y={})),function(i){i[i.AUTO=0]="AUTO",i[i.LEFT=1]="LEFT",i[i.CENTER=2]="CENTER",i[i.RIGHT=3]="RIGHT"}(Lt||(Lt={})),function(i){i[i.CENTER=0]="CENTER",i[i.LEFT=1]="LEFT",i[i.RIGHT=2]="RIGHT",i[i.TOP=3]="TOP",i[i.BOTTOM=4]="BOTTOM",i[i.TOP_LEFT=5]="TOP_LEFT",i[i.TOP_RIGHT=6]="TOP_RIGHT",i[i.BOTTOM_LEFT=7]="BOTTOM_LEFT",i[i.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(bt||(bt={})),function(i){i[i.NONE=0]="NONE",i[i.UPPERCASE=1]="UPPERCASE",i[i.LOWERCASE=2]="LOWERCASE"}(xt||(xt={})),function(i){i[i.MAP=0]="MAP",i[i.VIEWPORT=1]="VIEWPORT"}(Z||(Z={})),function(i){i[i.HORIZONTAL=0]="HORIZONTAL",i[i.VERTICAL=1]="VERTICAL"}(Pt||(Pt={}));let R=class{};R.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:W.VISIBLE}},R.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:W.VISIBLE}},R.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:W.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:Ne.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:Ae.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},R.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:W.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:At.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:bt.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:Y.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:bt.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:Lt.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:Y.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:xt.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[Pt.HORIZONTAL]}},R.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:W.VISIBLE}},R.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},R.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:Z.MAP}},R.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:Z.MAP},"line-width":{type:"number",minimum:0,default:1}},R.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:Z.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:Z.MAP}},R.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},R.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:Z.MAP}};let Se=class{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,a){return 255&t|(255&e)<<8|(255&r)<<16|a<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}};var h,X;(function(i){i[i.R8_SIGNED=0]="R8_SIGNED",i[i.R8_UNSIGNED=1]="R8_UNSIGNED",i[i.R16_SIGNED=2]="R16_SIGNED",i[i.R16_UNSIGNED=3]="R16_UNSIGNED",i[i.R8G8_SIGNED=4]="R8G8_SIGNED",i[i.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",i[i.R16G16_SIGNED=6]="R16G16_SIGNED",i[i.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",i[i.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",i[i.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",i[i.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",i[i.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",i[i.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"})(h||(h={})),function(i){i[i.UNIFORM=0]="UNIFORM",i[i.DATA_DRIVEN=1]="DATA_DRIVEN",i[i.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",i[i.UNUSED=3]="UNUSED"}(X||(X={}));let q=class Ot{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return this._locations.size===0&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,a,n){const o=this.getUniforms();for(const s of o){const{name:l,type:u,getValue:p}=s,c=p(r,e,a,n);if(c!==null)switch(u){case"float":t.setUniform1f(l,c);break;case"vec2":t.setUniform2fv(l,c);break;case"vec4":t.setUniform4fv(l,c)}}}encodeAttributes(t,e,r,a){var p;const n=this.attributesInfo(),o=this.getEncodingInfos(),s=[];let l=0,u=0;for(const c of Object.keys(o)){const y=o[c],{type:_,precisionFactor:m,isLayout:D}=n[c],b=D?r.getLayoutProperty(c):r.getPaintProperty(c),O=(p=b.interpolator)==null?void 0:p.getInterpolationRange(e);let d=0;for(const w of y){const{offset:E,bufferElementsToAdd:S}=w;if(S>0){for(let L=0;L4)a++,L={dataIndex:a,count:0,offset:0},w!==4&&(r[A]=L),t.push({location:-1,name:"a_data_"+a,count:w,type:O,normalized:E}),M=Math.ceil(Math.max(S/4,1));else{const F=t[L.dataIndex];F.count+=w,M=Math.ceil(Math.max(F.count*d/4,1))-Math.ceil(Math.max(L.offset/4,1))}m.push({dataIndex:L.dataIndex,offset:L.offset,bufferElementsToAdd:M}),L.offset+=S,L.count+=w}}for(const c of t)switch(c.type){case g.BYTE:case g.UNSIGNED_BYTE:c.count=4;break;case g.SHORT:case g.UNSIGNED_SHORT:c.count+=c.count%2}this._buildVertexBufferLayout(t);let l=0;const u=this._layoutInfo.geometry;for(const c of u)this._locations.set(c.name,l++);const p=this._layoutInfo.opacity;if(p)for(const c of p)this._locations.set(c.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let a=r[0].stride;if(t.length===0)e.geometry=r;else{const n=[];let o=a;for(const s of t)a+=se(s.type)*s.count;for(const s of r)n.push(new x(s.name,s.count,s.type,s.offset,a,s.normalized));for(const s of t)n.push(new x(s.name,s.count,s.type,o,a,s.normalized)),o+=se(s.type)*s.count;e.geometry=n}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=a}_buildShaderInfo(t,e){let r=` +`,a=` +`;const n=[];for(const u of t)r+=`attribute ${this._getType(u.count)} ${u.name}; +`;const o=this.attributes(),s=this.attributesInfo();let l=-1;for(const u of o){l++;const{name:p,type:c,precisionFactor:y,isLayout:_}=s[u],m=y&&y!==1?" * "+1/y:"",{bytesPerElement:D,count:b}=Ot._encodingInfo[c],O=d=>`a_data_${d.dataIndex}${Ue(b,d.offset,D)}`;switch(this.getAtributeState(l)){case X.UNIFORM:{const d=this._getType(b),w=`u_${p}`;n.push({name:w,type:d,getValue:(E,S,A,L)=>{const M=_?E.getLayoutValue(u,S):E.getPaintValue(u,S);if(c===h.R16G16B16A16_DASHARRAY){const F=E.getDashKey(M,E.getLayoutValue("line-cap",S)),ot=L.getMosaicItemPosition(F,!1);if(ot==null)return null;const{tl:lt,br:te}=ot;return[lt[0],te[1],te[0],lt[1]]}if(c===h.R16G16B16A16_PATTERN){const F=L.getMosaicItemPosition(M,!u.includes("line-"));if(F==null)return null;const{tl:ot,br:lt}=F;return[ot[0],lt[1],lt[0],ot[1]]}if(c===h.R8G8B8A8_COLOR){const F=M[3];return[F*M[0],F*M[1],F*M[2],F]}return M}}),r+=`uniform ${d} ${w}; +`,a+=`${d} ${p} = ${w}; +`}break;case X.DATA_DRIVEN:{const d=O(e[u][0]);a+=`${this._getType(b)} ${p} = ${d}${m}; +`}break;case X.INTERPOLATED_DATA_DRIVEN:{const d=`u_t_${p}`;n.push({name:d,type:"float",getValue:(S,A,L,M)=>(_?S.getLayoutProperty(u):S.getPaintProperty(u)).interpolator.interpolationUniformValue(L,A)}),r+=`uniform float ${d}; +`;const w=O(e[u][0]),E=O(e[u][1]);a+=`${this._getType(b)} ${p} = mix(${w}${m}, ${E}${m}, ${d}); +`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=n}_bit(t){return(this._key&1<>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return Se.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!(r!=null&&r.rect))return;const a=2,n=r.rect,o=r.width,s=r.height;e[t]=this._encodeShort(n.x+a,0),e[t]|=this._encodeShort(n.y+a+s,16),e[t+1]=this._encodeShort(n.x+a+o,0),e[t+1]|=this._encodeShort(n.y+a,16)}_encodeByte(t,e){return(255&t)<{switch(i){case g.FLOAT:case g.INT:case g.UNSIGNED_INT:return 4;case g.SHORT:case g.UNSIGNED_SHORT:case g.HALF_FLOAT:return 2;case g.BYTE:case g.UNSIGNED_BYTE:return 1}},Ue=(i,t,e)=>{const r=t/e;if(i===1)switch(r){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(i===2)switch(r){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(i===3)switch(r){case 0:return".xyz";case 1:return".yzw"}return""};let tt=class mt extends q{constructor(t){super(t)}geometryInfo(){return mt.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return mt.ATTRIBUTES}attributesInfo(){return mt.ATTRIBUTES_INFO}};tt.ATTRIBUTES=[],tt.GEOMETRY_LAYOUT=[new x("a_pos",2,g.BYTE,0,2)],tt.ATTRIBUTES_INFO={};let et=class gt extends q{constructor(t){super(t)}geometryInfo(){return gt.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return gt.ATTRIBUTES}attributesInfo(){return gt.ATTRIBUTES_INFO}};et.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],et.GEOMETRY_LAYOUT=[new x("a_pos",2,g.SHORT,0,4)],et.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:h.R8_UNSIGNED},"circle-color":{name:"color",type:h.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:h.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:h.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:h.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:h.R8_UNSIGNED,precisionFactor:32}};let rt=class dt extends q{constructor(t){super(t)}geometryInfo(){return dt.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return dt.ATTRIBUTES}attributesInfo(){return dt.ATTRIBUTES_INFO}};rt.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],rt.GEOMETRY_LAYOUT=[new x("a_pos",2,g.SHORT,0,4)],rt.ATTRIBUTES_INFO={"fill-color":{name:"color",type:h.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:h.R16G16B16A16_PATTERN,isOptional:!0}};let $=class J extends q{constructor(t,e){super(t),this._usefillColor=e}geometryInfo(){return J.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?J.ATTRIBUTES_FILL:J.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?J.ATTRIBUTES_INFO_FILL:J.ATTRIBUTES_INFO_OUTLINE}};$.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],$.ATTRIBUTES_FILL=["fill-color","fill-opacity"],$.GEOMETRY_LAYOUT=[new x("a_pos",2,g.SHORT,0,8),new x("a_offset",2,g.BYTE,4,8),new x("a_xnormal",2,g.BYTE,6,8)],$.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:h.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100}},$.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:h.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100}};let at=class _t extends q{constructor(t){super(t)}geometryInfo(){return _t.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return _t.ATTRIBUTES}attributesInfo(){return _t.ATTRIBUTES_INFO}};at.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],at.GEOMETRY_LAYOUT=[new x("a_pos",2,g.SHORT,0,16),new x("a_extrude_offset",4,g.BYTE,4,16),new x("a_dir_normal",4,g.BYTE,8,16),new x("a_accumulatedDistance",2,g.UNSIGNED_SHORT,12,16)],at.ATTRIBUTES_INFO={"line-width":{name:"width",type:h.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:h.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:h.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:h.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:h.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:h.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:h.R16G16B16A16_DASHARRAY,isOptional:!0}};const ye=[new x("a_pos",2,g.SHORT,0,16),new x("a_vertexOffset",2,g.SHORT,4,16),new x("a_texAngleRange",4,g.UNSIGNED_BYTE,8,16),new x("a_levelInfo",4,g.UNSIGNED_BYTE,12,16)],fe=[new x("a_opacityInfo",1,g.UNSIGNED_BYTE,0,1)];let ct=class St extends q{constructor(t){super(t)}geometryInfo(){return ye}opacityInfo(){return fe}attributes(){return St.ATTRIBUTES}attributesInfo(){return St.ATTRIBUTES_INFO}};ct.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],ct.ATTRIBUTES_INFO={"icon-color":{name:"color",type:h.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:h.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:h.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:h.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:h.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};let ht=class Ut extends q{constructor(t){super(t)}geometryInfo(){return ye}opacityInfo(){return fe}attributes(){return Ut.ATTRIBUTES}attributesInfo(){return Ut.ATTRIBUTES_INFO}};ht.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],ht.ATTRIBUTES_INFO={"text-color":{name:"color",type:h.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:h.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:h.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:h.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:h.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:h.R8_UNSIGNED,isLayout:!0}};function Be(i,t,e,r){const a=3*i,n=3*(e-i)-a,o=1-a-n,s=3*t,l=3*(r-t)-s,u=1-s-l;function p(m){return((o*m+n)*m+a)*m}function c(m){return((u*m+l)*m+s)*m}function y(m){return(3*o*m+2*n)*m+a}function _(m,D){let b,O,d,w,E,S;for(d=m,S=0;S<8;S++){if(w=p(d)-m,Math.abs(w)O)return O;for(;bw?b=d:O=d,d=.5*(O-b)+b}return d}return function(m,D=1e-6){return c(_(m,D))}}const me={kind:"null"},I={kind:"number"},V={kind:"string"},P={kind:"boolean"},K={kind:"color"},Rt={kind:"object"},H={kind:"value"};function yt(i,t){return{kind:"array",itemType:i,n:t}}const Ge=[me,I,V,P,K,Rt,yt(H)];function nt(i){if(i.kind==="array"){const t=nt(i.itemType);return typeof i.n=="number"?`array<${t}, ${i.n}>`:i.itemType.kind==="value"?"array":`array<${t}>`}return i.kind}function Dt(i){if(i===null)return me;if(typeof i=="string")return V;if(typeof i=="boolean")return P;if(typeof i=="number")return I;if(i instanceof N)return K;if(Array.isArray(i)){let t;for(const e of i){const r=Dt(e);if(t){if(t!==r){t=H;break}}else t=r}return yt(t||H,i.length)}return typeof i=="object"?Rt:H}function Bt(i,t){if(t.kind==="array")return i.kind==="array"&&(i.n===0&&i.itemType.kind==="value"||Bt(i.itemType,t.itemType))&&(typeof t.n!="number"||t.n===i.n);if(t.kind==="value"){for(const e of Ge)if(Bt(i,e))return!0}return t.kind===i.kind}function Gt(i){if(i===null)return"";const t=typeof i;return t==="string"?i:t==="number"||t==="boolean"?String(i):i instanceof N?i.toString():JSON.stringify(i)}let ke=class{constructor(t){this._parent=t,this._vars={}}add(t,e){this._vars[t]=e}get(t){return this._vars[t]?this._vars[t]:this._parent?this._parent.get(t):null}},Ve=class ge{constructor(){this.type=H}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new ge}evaluate(t,e){return t==null?void 0:t.id}};class Vt{constructor(){this.type=V}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new Vt}evaluate(t,e){if(!t)return null;switch(t.type){case Nt.Point:return"Point";case Nt.LineString:return"LineString";case Nt.Polygon:return"Polygon";default:return null}}}let Me=class de{constructor(){this.type=Rt}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new de}evaluate(t,e){return t==null?void 0:t.values}},_e=class be{constructor(){this.type=I}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new be}evaluate(t,e){return e}};class k{constructor(t,e,r){this._lhs=t,this._rhs=e,this._compare=r,this.type=P}static parse(t,e,r){if(t.length!==3&&t.length!==4)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(t.length===4)throw new Error(`"${t[0]}" collator not supported`);return new k(f(t[1],e),f(t[2],e),r)}evaluate(t,e){return this._compare(this._lhs.evaluate(t,e),this._rhs.evaluate(t,e))}}class Fe extends k{static parse(t,e){return k.parse(t,e,(r,a)=>r===a)}}class Ce extends k{static parse(t,e){return k.parse(t,e,(r,a)=>r!==a)}}class ze extends k{static parse(t,e){return k.parse(t,e,(r,a)=>rr<=a)}};class Ye extends k{static parse(t,e){return k.parse(t,e,(r,a)=>r>a)}}class He extends k{static parse(t,e){return k.parse(t,e,(r,a)=>r>=a)}}class Mt{constructor(t){this._arg=t,this.type=P}static parse(t,e){if(t.length!==2)throw new Error('"!" expects 1 argument');return new Mt(f(t[1],e))}evaluate(t,e){return!this._arg.evaluate(t,e)}}class Ft{constructor(t){this._args=t,this.type=P}static parse(t,e){const r=[];for(let a=1;a1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${n[0]}"`)}if(t.length%2!=1)throw new Error(`"${a}" expects an even number of arguments`);const o=f(t[2],e,I);let s;a==="interpolate-hcl"||a==="interpolate-lab"?s=K:r&&r.kind!=="value"&&(s=r);const l=[];for(let u=3;u=p)throw new Error(`"${a}" requires strictly ascending stop inputs`);const c=f(t[u+1],e,s);s||(s=c.type),l.push([p,c])}if(s&&s!==K&&s!==I&&(s.kind!=="array"||s.itemType!==I))throw new Error(`"${a}" cannot interpolate type ${nt(s)}`);return new z(a,s,n,o,l)}evaluate(t,e){const r=this._stops;if(r.length===1)return r[0][1].evaluate(t,e);const a=this.input.evaluate(t,e);if(a<=r[0][0])return r[0][1].evaluate(t,e);if(a>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let n=0;for(;++nU(c,p[y],l));if(this.type.kind==="color"&&u instanceof N&&p instanceof N){const c=new N(u),y=new N(p);return new N([U(c.r,y.r,l),U(c.g,y.g,l),U(c.b,y.b,l),U(c.a,y.a,l)])}if(this.type.kind==="number"&&typeof u=="number"&&typeof p=="number")return U(u,p,l);throw new Error(`"${this._operator}" cannot interpolate type ${nt(this.type)}`)}if(this._operator==="interpolate-hcl"){const c=ee(u),y=ee(p),_=y.h-c.h,m=re({h:c.h+l*(_>180||_<-180?_-360*Math.round(_/360):_),c:U(c.c,y.c,l),l:U(c.l,y.l,l)});return new N({a:U(u.a,p.a,l),...m})}if(this._operator==="interpolate-lab"){const c=ae(u),y=ae(p),_=re({l:U(c.l,y.l,l),a:U(c.a,y.a,l),b:U(c.b,y.b,l)});return new N({a:U(u.a,p.a,l),..._})}throw new Error(`Unexpected operator "${this._operator}"`)}interpolationUniformValue(t,e){const r=this._stops;if(r.length===1||t>=r[r.length-1][0])return 0;let a=0;for(;++a=r)return[r,r];let a=0;for(;++a1&&(n=1),n}static _exponentialInterpolationRatio(t,e,r,a){const n=a-r;if(n===0)return 0;const o=t-r;return e===1?o/n:(e**o-1)/(e**n-1)}}class $t{constructor(t,e,r){this.type=t,this._input=e,this._stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=f(t[1],e,I);let a;const n=[];n.push([-1/0,f(t[2],e)]);for(let o=3;o=s)throw new Error('"step" requires strictly ascending stop inputs');const l=f(t[o+1],e);a||(a=l.type),n.push([s,l])}return new $t(a,r,n)}evaluate(t,e){const r=this._stops;if(r.length===1)return r[0][1].evaluate(t,e);const a=this._input.evaluate(t,e);let n=0;for(;++n=a.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return a[r]}};class Et{constructor(t,e){this._key=t,this._obj=e,this.type=H}static parse(t,e){let r,a;switch(t.length){case 2:return r=f(t[1],e),new Et(r);case 3:return r=f(t[1],e),a=f(t[2],e),new Et(r,a);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?this._obj.evaluate(t,e)[r]:t==null?void 0:t.values[r]}}class Tt{constructor(t,e){this._key=t,this._obj=e,this.type=P}static parse(t,e){let r,a;switch(t.length){case 2:return r=f(t[1],e),new Tt(r);case 3:return r=f(t[1],e),a=f(t[2],e),new Tt(r,a);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?r in this._obj.evaluate(t,e):!!(t!=null&&t.values[r])}}let Xe=class Re{constructor(t,e){this._key=t,this._vals=e,this.type=P}static parse(t,e){if(t.length!==3)throw new Error('"in" expects 2 arguments');return new Re(f(t[1],e),f(t[2],e))}evaluate(t,e){const r=this._key.evaluate(t,e);return this._vals.evaluate(t,e).includes(r)}};class It{constructor(t,e,r){this._item=t,this._array=e,this._from=r,this.type=I}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=f(t[1],e),a=f(t[2],e);if(t.length===4){const n=f(t[3],e,I);return new It(r,a,n)}return new It(r,a)}evaluate(t,e){const r=this._item.evaluate(t,e),a=this._array.evaluate(t,e);if(this._from){const n=this._from.evaluate(t,e);if(n!==Math.floor(n))throw new Error('"index-of" index must be an integer');return a.indexOf(r,n)}return a.indexOf(r)}}class Ht{constructor(t){this._arg=t,this.type=I}static parse(t,e){if(t.length!==2)throw new Error('"length" expects 2 arguments');const r=f(t[1],e);return new Ht(r)}evaluate(t,e){const r=this._arg.evaluate(t,e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class wt{constructor(t,e,r,a){this.type=t,this._array=e,this._from=r,this._to=a}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=f(t[1],e),a=f(t[2],e,I);if(a.type!==I)throw new Error('"slice" index must return a number');if(t.length===4){const n=f(t[3],e,I);if(n.type!==I)throw new Error('"slice" index must return a number');return new wt(r.type,r,a,n)}return new wt(r.type,r,a)}evaluate(t,e){const r=this._array.evaluate(t,e);if(!Array.isArray(r)&&typeof r!="string")throw new Error('"slice" input must be an array or a string');const a=this._from.evaluate(t,e);if(a<0||a>=r.length)throw new Error('"slice" index out of bounds');if(a!==Math.floor(a))throw new Error('"slice" index must be an integer');if(this._to){const n=this._to.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');return r.slice(a,n)}return r.slice(a)}}class jt{constructor(){this.type=P}static parse(t){if(t.length!==1)throw new Error('"has-id" expects no arguments');return new jt}evaluate(t,e){return(t==null?void 0:t.id)!==void 0}}class B{constructor(t,e){this._args=t,this._calculate=e,this.type=I}static parse(t,e,r){const a=t.slice(1).map(n=>f(n,e));return new B(a,r)}evaluate(t,e){let r;return this._args&&(r=this._args.map(a=>a.evaluate(t,e))),this._calculate(r)}}class Qe extends B{static parse(t,e){switch(t.length){case 2:return B.parse(t,e,r=>-r[0]);case 3:return B.parse(t,e,r=>r[0]-r[1]);default:throw new Error('"-" expects 1 or 2 arguments')}}}class Je extends B{static parse(t,e){return B.parse(t,e,r=>{let a=1;for(const n of r)a*=n;return a})}}class tr extends B{static parse(t,e){if(t.length===3)return B.parse(t,e,r=>r[0]/r[1]);throw new Error('"/" expects 2 arguments')}}class er extends B{static parse(t,e){if(t.length===3)return B.parse(t,e,r=>r[0]%r[1]);throw new Error('"%" expects 2 arguments')}}class rr extends B{static parse(t,e){if(t.length===3)return B.parse(t,e,r=>r[0]**r[1]);throw new Error('"^" expects 1 or 2 arguments')}}class ar extends B{static parse(t,e){return B.parse(t,e,r=>{let a=0;for(const n of r)a+=n;return a})}}class T{constructor(t,e){this._args=t,this._calculate=e,this.type=I}static parse(t,e){const r=t.slice(1).map(a=>f(a,e));return new T(r,T.ops[t[0]])}evaluate(t,e){let r;return this._args&&(r=this._args.map(a=>a.evaluate(t,e))),this._calculate(r)}}T.ops={abs:i=>Math.abs(i[0]),acos:i=>Math.acos(i[0]),asin:i=>Math.asin(i[0]),atan:i=>Math.atan(i[0]),ceil:i=>Math.ceil(i[0]),cos:i=>Math.cos(i[0]),e:()=>Math.E,floor:i=>Math.floor(i[0]),ln:i=>Math.log(i[0]),ln2:()=>Math.LN2,log10:i=>Math.log(i[0])/Math.LN10,log2:i=>Math.log(i[0])/Math.LN2,max:i=>Math.max(...i),min:i=>Math.min(...i),pi:()=>Math.PI,round:i=>Math.round(i[0]),sin:i=>Math.sin(i[0]),sqrt:i=>Math.sqrt(i[0]),tan:i=>Math.tan(i[0])};class Kt{constructor(t){this._args=t,this.type=V}static parse(t,e){return new Kt(t.slice(1).map(r=>f(r,e)))}evaluate(t,e){return this._args.map(r=>r.evaluate(t,e)).join("")}}class it{constructor(t,e){this._arg=t,this._calculate=e,this.type=V}static parse(t,e){if(t.length!==2)throw new Error(`${t[0]} expects 1 argument`);const r=f(t[1],e);return new it(r,it.ops[t[0]])}evaluate(t,e){return this._calculate(this._arg.evaluate(t,e))}}it.ops={downcase:i=>i.toLowerCase(),upcase:i=>i.toUpperCase()};class qt{constructor(t){this._args=t,this.type=K}static parse(t,e){if(t.length!==4)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map(a=>f(a,e));return new qt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),a=this._validate(this._args[1].evaluate(t,e)),n=this._validate(this._args[2].evaluate(t,e));return new N({r,g:a,b:n})}_validate(t){if(typeof t!="number"||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class Wt{constructor(t){this._args=t,this.type=K}static parse(t,e){if(t.length!==5)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map(a=>f(a,e));return new Wt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),a=this._validate(this._args[1].evaluate(t,e)),n=this._validate(this._args[2].evaluate(t,e)),o=this._validateAlpha(this._args[3].evaluate(t,e));return new N({r,g:a,b:n,a:o})}_validate(t){if(typeof t!="number"||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if(typeof t!="number"||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class Zt{constructor(t){this._color=t,this.type=yt(I,4)}static parse(t,e){if(t.length!==2)throw new Error('"to-rgba" expects 1 argument');const r=f(t[1],e);return new Zt(r)}evaluate(t,e){return new N(this._color.evaluate(t,e)).toRgba()}}class Q{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let a,n=1;if(r==="array"){if(t.length>2){switch(t[1]){case"string":a=V;break;case"number":a=I;break;case"boolean":a=P;break;default:throw new Error('"array" type argument must be string, number or boolean')}n++}else a=H;let s;if(t.length>3){if(s=t[2],s!==null&&(typeof s!="number"||s<0||s!==Math.floor(s)))throw new Error('"array" length argument must be a positive integer literal');n++}a=yt(a,s)}else switch(r){case"string":a=V;break;case"number":a=I;break;case"boolean":a=P;break;case"object":a=Rt}const o=[];for(;n":Ye,">=":He,all:Ft,any:je,case:Ke,coalesce:zt,match:qe,within:null,interpolate:z,"interpolate-hcl":z,"interpolate-lab":z,step:$t,let:Yt,var:We,concat:Kt,downcase:it,"is-supported-script":null,"resolved-locale":null,upcase:it,rgb:qt,rgba:Wt,"to-rgba":Zt,"-":Qe,"*":Je,"/":tr,"%":er,"^":rr,"+":ar,abs:T,acos:T,asin:T,atan:T,ceil:T,cos:T,e:T,floor:T,ln:T,ln2:T,log10:T,log2:T,max:T,min:T,pi:T,round:T,sin:T,sqrt:T,tan:T,zoom:_e,"heatmap-density":null,"has-id":jt,none:Ct};class G{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(r){return console.log(r.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=f(t,null,P);return new G(e)}catch(e){return console.log(e.message),null}}static isLegacyFilter(t){if(!Array.isArray(t)||t.length===0)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return t.length===3&&typeof t[1]=="string"&&!Array.isArray(t[2]);case"in":return t.length>=3&&typeof t[1]=="string"&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e":case"<":case">=":case"<=":return G.convertComparison(e,t[1],t[2]);case"in":return G.convertIn(t[1],t.slice(2));case"!in":return G.negate(G.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return G.convertCombining(e,t.slice(1));case"has":return G.convertHas(t[1]);case"!has":return G.negate(G.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}class vt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r=t.value==="number";break;default:r=!1}if(e==null&&(e=t.default),Array.isArray(e)&&e.length>0&&De[e[0]]){const n={number:I,color:K,string:V,boolean:P,enum:V};try{const o=t.type==="array"?yt(n[t.value]||H,t.length):n[t.type],s=f(e,null,o);this.getValue=this._buildExpression(s,t),this.isDataDriven=!0,s instanceof z&&s.input instanceof _e&&(this.interpolator=s)}catch(o){console.log(o.message),this.getValue=this._buildSimple(t.default)}return}r&&e.type==="interval"&&(r=!1);const a=(e==null?void 0:e.stops)&&e.stops.length>0;if(a)for(const n of e.stops)n[1]=this._validate(n[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(e.default!==void 0&&(e.default=this._validate(e.default,t)),a)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else a?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if(e.type==="number"){if(e.minimum!=null&&te.maximum)return e.maximum}else e.type==="color"?t=vt._parseColor(t):e.type==="enum"?typeof t=="string"&&(t=e.values.indexOf(t)):e.type==="array"&&e.value==="enum"?t=t.map(r=>typeof r=="string"?e.values.indexOf(r):r):e.type==="string"&&(t=Gt(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,a)=>{try{const n=t.evaluate(a,r);return n===void 0?e.default:this._validate(n,e)}catch(n){return console.log(n.message),e.default}}}_buildIdentity(t,e){return(r,a)=>{let n;return a&&(n=a.values[t.property]),n!==void 0&&(n=this._validate(n,e)),n??(t.default!==void 0?t.default:e.default)}}_buildCategorical(t,e){return(r,a)=>{let n;return a&&(n=a.values[t.property]),n=this._categorical(n,t.stops),n!==void 0?n:t.default!==void 0?t.default:e.default}}_buildInterval(t,e){return(r,a)=>{let n;return a&&(n=a.values[t.property]),typeof n=="number"?this._interval(n,t.stops):t.default!==void 0?t.default:e.default}}_buildInterpolate(t,e){return(r,a)=>{let n;return a&&(n=a.values[t.property]),typeof n=="number"?this._interpolate(n,t.stops,t.base||1):t.default!==void 0?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let a=0;athis._create(e,r,a)).filter(e=>!!e),this.layers)for(let e=0;e=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!(t!=null&&t.id))return;const r=this._style;e!=null&&e>=this.layers.length&&(e=this.layers.length-1);let a,n=!0;const o=this._layerByName[t.id];if(o){const s=this.layers.indexOf(o);e||(e=s),e===s?(n=!1,a=ut._recreateLayer(t,o),this.layers[e]=a,r.layers[e]=t):(this.layers.splice(s,1),r.layers.splice(s,1),a=this._create(t,e,this.layers),this.layers.splice(e,0,a),r.layers.splice(e,0,t))}else a=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(a),r.layers.push(t)):(this.layers.splice(e,0,a),r.layers.splice(e,0,t));this._layerByName[t.id]=a,this._uidToLayer.set(a.uid,a),n&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const a={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},n=ut._recreateLayer(a,r),o=this.layers.indexOf(r);this.layers[o]=n,this._style.layers[o].paint=e,this._layerByName[r.id]=n,this._uidToLayer.set(r.uid,n)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const a={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},n=ut._recreateLayer(a,r),o=this.layers.indexOf(r);this.layers[o]=n,this._style.layers[o].layout=e,this._layerByName[r.id]=n,this._uidToLayer.set(r.uid,n)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const a=r.layout||{};a.visibility=e;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:a,paint:r.paint},o=ut._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=o,this._style.layers[s].layout=a,this._layerByName[r.id]=o,this._uidToLayer.set(r.uid,o)}getStyleLayerVisibility(t){const e=this._layerByName[t];if(!e)return"none";const r=e.layout;return(r==null?void 0:r.visibility)??"visible"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;rn.keyo.key?1:0);const a=t.length;for(let n=0;ni.map(i=>d[i]); +import{B as a,D as n,aS as S,aZ as Z,cw as re,er as ie,ay as X,E as N,gr as se,gs as U,c7 as B,c$ as y,aV as J,U as R,d as K,d1 as ae,cv as oe,cp as le,s as f,gt as ne,bE as ue,gu as ye,M as pe,ej as de,x as ce,V as E,gv as M,fW as he,a7 as k,d8 as fe,gw as _,el as be,dK as me,_ as ge,$ as F,fN as Se,gx as Ie,eQ as we,gy as ve,ch as $,cg as Ee,gz as xe,ey as V,eo as Le,d2 as v,es as Oe,gA as Te,et as Fe,eu as Pe,dL as W,G,d7 as De,eA as _e,cT as x,aN as Ae,bx as H,bA as z,d0 as Ve}from"./index-DKOmzAMm.js";import{l as Ce}from"./CollectionFlattener-BmCRFqHz.js";import{x as qe}from"./QueryTask-CH4nGmOK.js";import{f as je}from"./utils-CF4bGKhW.js";const Je=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(r,i){const s=i.capabilities&&i.capabilities.split(",").map(te=>te.toLowerCase().trim());if(!s)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const o=this.type,p=o!=="tile"&&!!i.supportsDynamicLayers,u=s.includes("query"),d=s.includes("map"),h=!!i.exportTilesAllowed,m=s.includes("tilemap"),I=s.includes("data"),w=o!=="tile"&&(!i.tileInfo||p),L=o!=="tile"&&(!i.tileInfo||p),c=o!=="tile",b=i.cimVersion&&se.parse(i.cimVersion),O=(b==null?void 0:b.since(1,4))??!1,T=(b==null?void 0:b.since(2,0))??!1;return{operations:{supportsExportMap:d,supportsExportTiles:h,supportsIdentify:u,supportsQuery:I,supportsTileMap:m},exportMap:d?{supportsArcadeExpressionForLabeling:O,supportsSublayersChanges:c,supportsDynamicLayers:p,supportsSublayerVisibility:w,supportsSublayerDefinitionExpression:L,supportsCIMSymbols:T}:null,exportTiles:h?{maxExportTilesCount:+i.maxExportTilesCount}:null}}readVersion(r,i){let s=i.currentVersion;return s||(s=i.hasOwnProperty("capabilities")||i.hasOwnProperty("tables")?10:i.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),s}async fetchRelatedService(r){const i=this.portalItem;if(!i||!U(i))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=i.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},r).then(o=>o.find(p=>p.type==="Feature Service")??null,()=>null));const s=await this._relatedFeatureServicePromise;return B(r),s?{itemId:s.id,url:s.url}:null}async fetchSublayerInfo(r,i){var u;const{source:s}=r;if(this!=null&&this.portalItem&&this.type==="tile"&&(s==null?void 0:s.type)==="map-layer"&&U(this.portalItem)&&r.originIdOf("url")y.SERVICE)try{const d=await this._fetchAllLayersAndTablesFromService(o),h=((u=K(o))==null?void 0:u.sublayer)??s.mapLayerId;p=d.get(h)}catch{}else{let d=r.id;(s==null?void 0:s.type)==="map-layer"&&(d=s.mapLayerId);try{p=(await this.fetchAllLayersAndTables(i)).get(d)}catch{}}return p}async fetchAllLayersAndTables(r){var i;return this._fetchAllLayersAndTablesFromService((i=this.parsedUrl)==null?void 0:i.path,r)}async _fetchAllLayersAndTablesFromService(r,i){await this.load(i),this._allLayersAndTablesMap||(this._allLayersAndTablesMap=new Map);const s=K(r),o=ae(this._allLayersAndTablesMap,s==null?void 0:s.url.path,()=>R(J(s==null?void 0:s.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(u=>{const d=new Map,{layers:h,tables:m}=u.data,I=[...h??[],...m??[]];for(const w of I)d.set(w.id,w);return{result:d}},u=>({error:u}))),p=await o;if(B(i),"result"in p)return p.result;throw p.error}};return a([n({readOnly:!0})],t.prototype,"capabilities",void 0),a([S("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),a([n({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),a([n({type:Z})],t.prototype,"fullExtent",void 0),a([n(re)],t.prototype,"id",void 0),a([n({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),a([n(ie)],t.prototype,"popupEnabled",void 0),a([n({type:X})],t.prototype,"spatialReference",void 0),a([n({readOnly:!0})],t.prototype,"version",void 0),a([S("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=a([N("esri.layers.mixins.ArcGISMapService")],t),t};var A;function C(e){return(e==null?void 0:e.type)==="esriSMS"}function q(e,t,r){var s;const i=this.originIdOf(t)>=x(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&((s=r.layer)==null?void 0:s.type)==="map-image"&&(r.writeSublayerStructure||i)}}function j(e,t,r){var i;return{enabled:!!r&&((i=r.layer)==null?void 0:i.type)==="tile"&&(r.origin&&this.originIdOf(t)>=x(r.origin)||this._isOverridden(t))}}function g(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function P(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=x(r.origin))}}let Re=0;const Me=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let l=A=class extends oe(le(Ae)){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new f("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await R(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:je(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s,supportsOrderBy:o,supportsPagination:p},data:{supportsAttachment:u},queryRelated:d}=ne(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:u},query:{supportsFormatPBF:s,supportsOrderBy:o,supportsPagination:p},queryRelated:d}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new ue(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields){for(const r of t.fields)if(r.type==="esriFieldTypeGlobalID")return r.name}}get id(){return this._get("id")??Re++}set id(e){var t,r,i;this._get("id")!==e&&(((i=(r=(t=this.layer)==null?void 0:t.capabilities)==null?void 0:r.exportMap)==null?void 0:i.supportsDynamicLayers)!==!1?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return t.type==="Table"}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(s=>s.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){var t;this._set("layer",e),(t=this.sublayers)==null||t.forEach(r=>r.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){var r;return t.minScale||((r=t.layerDefinition)==null?void 0:r.minScale)||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){var r;return t.maxScale||((r=t.layerDefinition)==null?void 0:r.maxScale)||0}readObjectIdFieldFromService(e,t){var i;if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=(i=t.fields)==null?void 0:i.find(s=>s.type==="esriFieldTypeOID");return r==null?void 0:r.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){var i;const{layerDefinition:r}=t;return 1-.01*((r==null?void 0:r.transparency)??((i=r==null?void 0:r.drawingInfo)==null?void 0:i.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=ye(this.parent.id):t.parentLayerId=-1}get queryTask(){var u;if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:s}=r,o="gdbVersion"in r?r.gdbVersion:void 0,p=pe("featurelayer-pbf")&&(e==null?void 0:e.query.supportsFormatPBF);return new qe({fieldsIndex:t,gdbVersion:o,pbfSupported:p,queryAttachmentsSupported:((u=e==null?void 0:e.operations)==null?void 0:u.supportsQueryAttachments)??!1,sourceSpatialReference:s,url:i})}set renderer(e){if(de(e,this.fieldsIndex),e){for(const t of e.getSymbols())if(ce(t)){E.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new M({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return he(k.ofType(A),e)}writeSublayers(e,t,r){var i;(i=this.sublayers)!=null&&i.length&&(t[r]=this.sublayers.map(s=>s.id).toArray().reverse())}readTitle(e,t){var r;return((r=t.layerDefinition)==null?void 0:r.name)??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const i=t.fields.find(s=>s.name.toLowerCase()===r);i&&(r=i.name)}return r}get url(){var i;const e=((i=this.layer)==null?void 0:i.parsedUrl)??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,(t==null?void 0:t.type)==="map-layer")return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${fe(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=_(this),t=new A;return _(t).store=e.clone(Me),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return be(this,e)}createQuery(){return new me({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){var s;if(this.hasOwnProperty("sublayers"))return null;const e=(await ge(async()=>{const{default:o}=await import("./index-DKOmzAMm.js").then(p=>p.k7);return{default:o}},__vite__mapDeps([0,1]))).default,{layer:t,url:r}=this;let i;if(r&&this.originIdOf("url")>y.SERVICE)i=new e({url:r});else{if(!(t!=null&&t.parsedUrl))throw new f("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const o=t.parsedUrl;i=new e({url:o.path}),o&&this.source&&(this.source.type==="map-layer"?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return(t==null?void 0:t.refreshInterval)!=null&&(i.refreshInterval=t.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=F(this.floorInfo)),this.originIdOf("labelingInfo")>y.SERVICE&&(i.labelingInfo=F(this.labelingInfo)),this.originIdOf("labelsVisible")>y.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>y.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>y.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>y.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>y.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>y.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>y.DEFAULTS&&(i.popupTemplate=F(this.popupTemplate)),this.originIdOf("renderer")>y.SERVICE&&(i.renderer=F(this.renderer)),((s=this.source)==null?void 0:s.type)==="data-layer"&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>y.DEFAULTS&&(i.title=this.title),(t==null?void 0:t.type)==="map-image"&&t.originIdOf("customParameters")>y.DEFAULTS&&(i.customParameters=t.customParameters),(t==null?void 0:t.type)==="tile"&&t.originIdOf("customParameters")>y.DEFAULTS&&(i.customParameters=t.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return Se(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t==null?void 0:t.feature,i=this.getFeatureType(r);if(i){const s=i.domains&&i.domains[e];if(s&&s.type!=="inherited")return s}return this._getLayerDomain(e)}async queryAttachments(e,t){var m,I;await this.load(),e=Ie.from(e);const r=this.capabilities;if(!((m=r==null?void 0:r.data)!=null&&m.supportsAttachment))throw new f("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:p,size:u,start:d,where:h}=e;if(!((I=r==null?void 0:r.operations)!=null&&I.supportsQueryAttachments)&&((i==null?void 0:i.length)>0||(o==null?void 0:o.length)>0||(u==null?void 0:u.length)>0||p||d||h))throw new f("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s!=null&&s.length||o!=null&&o.length||h))throw new f("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){var i,s;if(await this.load(),!this.capabilities.operations.supportsQuery)throw new f("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new f("queryFeatureCount:not-supported","this layer has no url.");const r=(i=this.layer)==null?void 0:i.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...(s=this.layer)==null?void 0:s.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){var i,s;if(await this.load(),!this.capabilities.operations.supportsQuery)throw new f("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new f("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...(i=this.layer)==null?void 0:i.customParameters,token:(s=this.layer)==null?void 0:s.apiKey}});if(r!=null&&r.features)for(const o of r.features)o.sourceLayer=this;return r}async queryObjectIds(e=this.createQuery(),t){var i,s;if(await this.load(),!this.capabilities.operations.supportsQuery)throw new f("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new f("queryObjectIds:not-supported","this layer has no url.");const r=(i=this.layer)==null?void 0:i.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...(s=this.layer)==null?void 0:s.customParameters,token:r}})}async queryRelatedFeatures(e,t){var i,s;if(await this.load(),!this.capabilities.operations.supportsQuery)throw new f("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new f("queryRelatedFeatures:not-supported","this layer has no url.");const r=(i=this.layer)==null?void 0:i.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...(s=this.layer)==null?void 0:s.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){var i,s;if(await this.load(),!this.capabilities.operations.supportsQuery)throw new f("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new f("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new f("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=(i=this.layer)==null?void 0:i.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...(s=this.layer)==null?void 0:s.customParameters,token:r}})}toExportImageJSON(e){var o,p;const t={id:this.id,source:((o=this.source)==null?void 0:o.toJSON())||{mapLayerId:this.id,type:"mapLayer"}},r=we(e,this.definitionExpression);r!=null&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((u,d)=>(u[d]=this.originIdOf(d),u),{});if(Object.keys(i).some(u=>i[u]>y.SERVICE)){const u=t.drawingInfo={};if(i.renderer>y.SERVICE&&(u.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>y.SERVICE&&(u.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>y.SERVICE)if(this.labelingInfo){!this.loaded&&((p=this.labelingInfo)!=null&&p.some(h=>!h.labelPlacement))&&E.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let d=this.labelingInfo;this.geometryType!=null&&(d=ve(this.labelingInfo,$.toJSON(this.geometryType))),u.showLabels=!0,u.labelingInfo=d.filter(h=>h.labelPlacement).map(h=>h.toJSON({origin:"service",layer:this.layer}))}else u.showLabels=!1;i.opacity>y.SERVICE&&(u.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(u.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,t=>{var r;t.color||t.style!=="esriSMSX"&&t.style!=="esriSMSCross"||((r=t.outline)!=null&&r.color?t.color=t.outline.color:t.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const i of r)C(i.symbol)&&t(i.symbol);"symbol"in e&&C(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&C(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){var u,d,h,m;const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const p=_(this).getDefaultOrigin();if(p!=="service"){if(s&&((h=(d=(u=this.layer)==null?void 0:u.capabilities)==null?void 0:d.exportMap)==null?void 0:h[s])===!1)return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&((m=this.capabilities)==null?void 0:m.exportMap[o])===!1)return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}e!=="source"||this.loadStatus==="not-loaded"?(this._set(e,t),p!=="service"&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(r=>{r.parent=null,r.layer=null}),this.removeAllHandles()),e&&(e.forEach(r=>{r.parent=this,r.layer=this.layer}),this.addHandles([e.on("after-add",({item:r})=>{r.parent=this,r.layer=this.layer}),e.on("after-remove",({item:r})=>{r.parent=null,r.layer=null}),e.on("before-changes",r=>{var i,s,o;(((o=(s=(i=this.layer)==null?void 0:i.capabilities)==null?void 0:s.exportMap)==null?void 0:o.supportsSublayersChanges)??1)||(E.getLogger(this).error(new f("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),r.preventDefault())})]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;E.getLogger(i).error(new f("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r==null?void 0:r.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){var t;return((t=this.fieldsIndex.get(e))==null?void 0:t.domain)??null}};l.test={isMapImageLayerOverridePolicy:e=>e===g||e===q,isTileImageLayerOverridePolicy:e=>e===j},a([n({readOnly:!0})],l.prototype,"capabilities",void 0),a([S("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],l.prototype,"readCapabilities",null),a([n()],l.prototype,"defaultPopupTemplate",null),a([n({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:q}}})],l.prototype,"definitionExpression",null),a([n({readOnly:!0})],l.prototype,"effectiveScaleRange",null),a([S("service","maxScaleRange",["minScale","maxScale"])],l.prototype,"readMaxScaleRange",null),a([n({type:[Ee],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],l.prototype,"fields",void 0),a([n({readOnly:!0})],l.prototype,"fieldsIndex",null),a([n({type:xe,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:q},origins:{"web-scene":{read:!1,write:!1}}}})],l.prototype,"floorInfo",null),a([n({type:Z,json:{read:{source:"layerDefinition.extent"}}})],l.prototype,"fullExtent",void 0),a([n({type:$.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:$.read}}}}})],l.prototype,"geometryType",void 0),a([n({type:String})],l.prototype,"globalIdField",void 0),a([S("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],l.prototype,"readGlobalIdFieldFromService",null),a([n({type:V,json:{write:{ignoreOrigin:!0}}})],l.prototype,"id",null),a([n({readOnly:!0})],l.prototype,"isTable",void 0),a([S("service","isTable",["type"])],l.prototype,"readIsTable",null),a([n({value:null,type:[Le],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:g}}})],l.prototype,"labelingInfo",null),a([v("labelingInfo")],l.prototype,"writeLabelingInfo",null),a([n({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:g}}})],l.prototype,"labelsVisible",null),a([n({value:null})],l.prototype,"layer",null),a([n({type:String,json:{write:{overridePolicy:j}}})],l.prototype,"layerItemId",void 0),a([n({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:P}}})],l.prototype,"legendEnabled",void 0),a([n({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],l.prototype,"listMode",null),a([n({type:Number,value:0,json:{write:{overridePolicy:g}}})],l.prototype,"minScale",null),a([S("minScale",["minScale","layerDefinition.minScale"])],l.prototype,"readMinScale",null),a([n({type:Number,value:0,json:{write:{overridePolicy:g}}})],l.prototype,"maxScale",null),a([S("maxScale",["maxScale","layerDefinition.maxScale"])],l.prototype,"readMaxScale",null),a([n()],l.prototype,"objectIdField",void 0),a([S("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],l.prototype,"readObjectIdFieldFromService",null),a([n({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:g}}})],l.prototype,"opacity",null),a([S("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],l.prototype,"readOpacity",null),a([v("opacity")],l.prototype,"writeOpacity",null),a([n({json:{type:V,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:g}}})],l.prototype,"parent",void 0),a([v("parent")],l.prototype,"writeParent",null),a([n({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:P,writer(e,t,r){t[r]=!e}}}})],l.prototype,"popupEnabled",void 0),a([n({type:Oe,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:P}}})],l.prototype,"popupTemplate",void 0),a([n({readOnly:!0})],l.prototype,"queryTask",null),a([n({type:[Te],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],l.prototype,"relationships",void 0),a([n({types:Fe,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:g},origins:{"web-scene":{types:Pe,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:g}}}}})],l.prototype,"renderer",null),a([n({types:{key:"type",base:null,typeMap:{"data-layer":W,"map-layer":M}},cast(e){if(e){if("mapLayerId"in e)return G(M,e);if("dataSource"in e)return G(W,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:g}}})],l.prototype,"source",null),a([n()],l.prototype,"sourceJSON",void 0),a([n({type:X,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],l.prototype,"spatialReference",void 0),a([n({value:null,json:{type:[V],write:{target:"subLayerIds",allowNull:!0,overridePolicy:g}}})],l.prototype,"sublayers",null),a([De("sublayers")],l.prototype,"castSublayers",null),a([v("sublayers")],l.prototype,"writeSublayers",null),a([n({type:String,json:{name:"name",write:{overridePolicy:P}}})],l.prototype,"title",void 0),a([S("service","title",["name","layerDefinition.name"])],l.prototype,"readTitle",null),a([n({type:String})],l.prototype,"typeIdField",void 0),a([n({json:{read:!1},readOnly:!0,value:"sublayer"})],l.prototype,"type",void 0),a([S("typeIdField",["layerDefinition.typeIdField"])],l.prototype,"readTypeIdField",null),a([n({type:[_e],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],l.prototype,"types",void 0),a([n({type:String,json:{name:"layerUrl",write:{overridePolicy:j}}})],l.prototype,"url",null),a([n({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:g}}})],l.prototype,"visible",null),a([v("visible")],l.prototype,"writeVisible",null),l=A=a([N("esri.layers.support.Sublayer")],l);const Q=l;function Ke(e,t,r){return t.flatten(({sublayers:s})=>s).length!==e.length?!0:!!e.some(s=>s.originIdOf("minScale")>r||s.originIdOf("maxScale")>r||s.originIdOf("renderer")>r||s.originIdOf("labelingInfo")>r||s.originIdOf("opacity")>r||s.originIdOf("labelsVisible")>r||s.originIdOf("source")>r)||!Y(e,t)}function We(e,t,r){return!!e.some(i=>{const s=i.source,o=!s||s.type==="map-layer"&&s.mapLayerId===i.id&&(s.gdbVersion==null||s.gdbVersion===r);return i.commitProperty("renderer"),i.commitProperty("labelingInfo"),i.commitProperty("opacity"),i.commitProperty("labelsVisible"),!o||i.originIdOf("renderer")>y.SERVICE||i.originIdOf("labelingInfo")>y.SERVICE||i.originIdOf("opacity")>y.SERVICE||i.originIdOf("labelsVisible")>y.SERVICE})||!Y(e,t)}function Y(e,t){if(!(e!=null&&e.length)||t==null)return!0;const r=t.slice().reverse().flatten(({sublayers:o})=>o&&o.toArray().reverse()).map(o=>o.id).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:o}of e){for(;i=s)return!1}return!0}function $e(e){return!!e&&e.some(t=>{var r;return t.minScale!=null||((r=t.layerDefinition)==null?void 0:r.minScale)!=null})}function Ne(e,t){const r=[],i={};return e&&e.forEach(s=>{const o=new Q;if(o.read(s,t),i[o.id]=o,s.parentLayerId!=null&&s.parentLayerId!==-1){const p=i[s.parentLayerId];p.sublayers||(p.sublayers=[]),p.sublayers.unshift(o)}else r.unshift(o)}),r}const D=k.ofType(Q);function ee(e,t){e&&e.forEach(r=>{t(r),r.sublayers&&r.sublayers.length&&ee(r.sublayers,t)})}const Ge=e=>{let t=class extends e{constructor(...r){super(...r),this.allSublayers=new Ce({getCollections:()=>[this.sublayers],getChildrenFunction:i=>i.sublayers}),this.sublayersSourceJSON={[y.SERVICE]:{},[y.PORTAL_ITEM]:{},[y.WEB_SCENE]:{},[y.WEB_MAP]:{}},this.subtables=null,this.addHandles([H(()=>this.sublayers,(i,s)=>this._handleSublayersChange(i,s),z),H(()=>this.subtables,(i,s)=>this._handleSublayersChange(i,s),z)])}destroy(){this.allSublayers.destroy()}readSublayers(r,i){if(!i||!r)return;const{sublayersSourceJSON:s}=this,o=x(i.origin);if(oy.SERVICE))return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:p,origin:u}=this.createSublayersForOrigin("web-document"),d=_(this);d.setDefaultOrigin(u),this._set("sublayers",new D(p)),d.setDefaultOrigin("user")}findSublayerById(r){return this.allSublayers.find(i=>i.id===r)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(r){const i=x(r==="web-document"?"web-map":r);let s=y.SERVICE,o=this.sublayersSourceJSON[y.SERVICE].layers,p=this.sublayersSourceJSON[y.SERVICE].context,u=null;const d=[y.PORTAL_ITEM,y.WEB_SCENE,y.WEB_MAP].filter(c=>c<=i);for(const c of d){const b=this.sublayersSourceJSON[c];$e(b.layers)&&(s=c,o=b.layers,p=b.context,b.visibleLayers&&(u={visibleLayers:b.visibleLayers,context:b.context}))}const h=[y.PORTAL_ITEM,y.WEB_SCENE,y.WEB_MAP].filter(c=>c>s&&c<=i);let m=null;for(const c of h){const{layers:b,visibleLayers:O,context:T}=this.sublayersSourceJSON[c];b&&(m={layers:b,context:T}),O&&(u={visibleLayers:O,context:T})}const I=Ne(o,p),w=new Map,L=new Set;if(m)for(const c of m.layers)w.set(c.id,c);if(u!=null&&u.visibleLayers)for(const c of u.visibleLayers)L.add(c);return ee(I,c=>{m&&c.read(w.get(c.id),m.context),u&&c.read({defaultVisibility:L.has(c.id)},u.context)}),{origin:Ve(s),sublayers:new D({items:I})}}read(r,i){super.read(r,i),this.readSublayers(r,i)}_handleSublayersChange(r,i){i&&(i.forEach(s=>{s.parent=null,s.layer=null}),this.removeHandles("sublayers-owner")),r&&(r.forEach(s=>{s.parent=this,s.layer=this}),this.addHandles([r.on("after-add",({item:s})=>{s.parent=this,s.layer=this}),r.on("after-remove",({item:s})=>{s.parent=null,s.layer=null})],"sublayers-owner"),this.type==="tile"&&this.addHandles(r.on("before-changes",s=>{E.getLogger("esri.layers.TileLayer").error(new f("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),s.preventDefault()}),"sublayers-owner"))}};return a([n({readOnly:!0})],t.prototype,"allSublayers",void 0),a([n({readOnly:!0,type:k.ofType(Q)})],t.prototype,"serviceSublayers",void 0),a([n({value:null,type:D,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),a([n({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),a([n({type:D,json:{read:{source:"tables"}}})],t.prototype,"subtables",void 0),t=a([N("esri.layers.mixins.SublayersOwner")],t),t};export{Ke as e,Je as f,Ge as m,We as n,Q as t}; diff --git a/build/assets/SubtypeGroupLayer-BasPes06.js b/build/assets/SubtypeGroupLayer-BasPes06.js new file mode 100644 index 0000000..78ac16d --- /dev/null +++ b/build/assets/SubtypeGroupLayer-BasPes06.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/featureLayerUtils-CRRc6-7r.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/originUtils-D69mHv66.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/utils-V4fw_T9z.js","assets/jsonContext-SE-5k22x.js","assets/saveAPIKeyUtils-CqAN5-r5.js","assets/saveUtils-oCA1ZjYH.js","assets/lazyLayerLoader-BkbwrjyD.js","assets/FeatureLayerSource-DHybgE9g.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/mat4f64-CSKppSlJ.js","assets/quat-BYKy26Om.js","assets/mat3f64-q3fE-ZOt.js","assets/quatf64-Bdb9ZJJK.js","assets/editingSupport-BRaaDEoU.js","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-CF4bGKhW.js","assets/utils-BCmi3vQB.js","assets/clientSideDefaults-B7fGShzo.js","assets/QueryEngineCapabilities-CTDe3LlQ.js","assets/QueryTask-CH4nGmOK.js","assets/executeQueryJSON-CCbDrFwh.js","assets/query-CQvaiR4K.js","assets/pbfQueryUtils-D2YxxSfN.js","assets/pbf-DwSF5Y_G.js","assets/OptimizedFeature-DDMKj8Vq.js","assets/OptimizedFeatureSet-Blu9Ckm7.js","assets/executeQueryPBF-B-eLVWOv.js","assets/featureConversionUtils-CCATessr.js"])))=>i.map(i=>d[i]); +import{eN as K,cv as D,co as k,cp as W,ej as x,$ as S,dJ as Y,V as Z,eO as C,s as f,el as X,eP as N,eQ as L,dK as M,B as i,D as s,d2 as ee,eR as te,en as re,eo as ie,ep as se,cx as ne,eM as ae,eL as oe,er as le,es as ue,aS as I,ew as Q,E as H,eS as pe,eT as de,eU as ye,ex as U,eV as ce,eW as he,eX as be,aN as fe,eY as ge,eZ as me,cq as ve,ei as we,cu as Se,cr as Fe,cF as $e,cs as Ie,ct as Oe,cG as je,cH as Ee,a7 as A,dz as Te,bx as _e,bA as Ae,aK as Ce,dA as Le,e_ as xe,I as Pe,aV as Ve,e$ as Ge,f0 as qe,f1 as Re,f2 as De,dM as ke,_ as P,f3 as Ne,f4 as Me,f5 as Qe,f6 as He,f7 as Ue,f8 as Be,f9 as Je,fa as ze,eJ as E,fb as Ke,ek as We,fc as Ye,cw as Ze,fd as Xe,cE as et}from"./index-DKOmzAMm.js";import{t as tt}from"./loadAll-Cm5pWAv4.js";const B={key:"type",base:pe,errorContext:"renderer",typeMap:{simple:C,"unique-value":de,"class-breaks":ye}},V=U(),G=K({types:B});let rt=0;function $(e){const t=e.json.write;return typeof t=="object"?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function it(e){return new C({symbol:st(e)})}function st(e){switch(e){case"point":case"multipoint":return be.clone();case"polyline":return he.clone();case"polygon":case"multipatch":return ce.clone();default:return null}}function nt(e,t){return!!t&&(e==null?void 0:e.type)==="unique-value"&&e.field!=null&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression}function J(e,t){var r;return e==null?null:(r=t.subtypes)==null?void 0:r.find(n=>n.code===e)}function at(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},o=J(e,t);if(o!=null){const{defaultValues:l}=o;for(const u in l)n[u]=l[u]}return n[t.subtypeField]=e,new Q({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let a=class extends D(k(W(fe))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${rt++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return x(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){var e;return(e=this.parent)==null?void 0:e.capabilities}get effectiveCapabilities(){var e;return(e=this.parent)==null?void 0:e.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){var e;return(e=this.parent)==null?void 0:e.elevationInfo}writeFieldOverrides(e,t,r){const{fields:n,parent:o}=this;let l;if(n){l=[];let u=0;n.forEach(({name:y,alias:c,editable:g,visible:m})=>{var O;if(!m)return;const d=(O=o==null?void 0:o.fields)==null?void 0:O.find(F=>F.name===y);if(!d)return;const b={name:y};let w=!1;c!==d.alias&&(b.alias=c,w=!0),g!==d.editable&&(b.editable=g,w=!0),l.push(b),w&&u++}),u===0&&l.length===n.length&&(l=null)}else l=S(e);l!=null&&l.length&&Y(r,l,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e==null?void 0:e.fields;if(!e||!(n!=null&&n.length))return null;const{subtypes:o,subtypeField:l}=e,u=o==null?void 0:o.find(m=>m.code===r),y=u==null?void 0:u.defaultValues,c=u==null?void 0:u.domains,g=[];for(const m of n){const d=m.clone(),{name:b}=d,w=t==null?void 0:t.find(j=>j.name===b);if(d.visible=!t||!!w,w){const{alias:j,editable:z}=w;j&&(d.alias=j),z===!1&&(d.editable=!1)}const O=(y==null?void 0:y[b])??null;d.defaultValue=b===l?r:O;const F=(c==null?void 0:c[b])??null;d.domain=b===l?null:F?F.type==="inherited"?d.domain:F.clone():null,g.push(d)}return g}get floorInfo(){var e;return(e=this.parent)==null?void 0:e.floorInfo}get geometryType(){var e;return(e=this.parent)==null?void 0:e.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){var e;return this.parent||Z.getLogger(this).error(v("objectIdField")),(e=this.parent)==null?void 0:e.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){x(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&e.geometryType!=="mesh"?it(e.geometryType):null}readRendererFromService(e,t,r){var y,c,g;if(t.type==="Table")return null;const n=(y=t.drawingInfo)==null?void 0:y.renderer,o=G(n,t,r);let l;const{subtypeCode:u}=this;if(u!=null&&nt(o,t.subtypeField)){const m=(c=o.uniqueValueInfos)==null?void 0:c.find(({value:d})=>(d=typeof d=="number"?String(d):d)===String(u));m&&(l=new C({symbol:m.symbol}))}else(o==null?void 0:o.type)!=="simple"||(g=o.visualVariables)!=null&&g.length||(l=o);return l}readRenderer(e,t,r){var l,u,y;const n=(u=(l=t==null?void 0:t.layerDefinition)==null?void 0:l.drawingInfo)==null?void 0:u.renderer;return n?((y=n.visualVariables)==null?void 0:y.some(c=>c.type!=="rotationInfo"))?void 0:G(n,t,r)||void 0:void 0}get spatialReference(){var e;return(e=this.parent)==null?void 0:e.spatialReference}get subtypeField(){var e;return(e=this.parent)==null?void 0:e.subtypeField}readTemplatesFromService(e,t){return[at(this.subtypeCode,t)]}readTitleFromService(e,t){const r=J(this.subtypeCode,t);return r!=null?r.name:null}get url(){var e;return(e=this.parent)==null?void 0:e.url}get userHasUpdateItemPrivileges(){var e;return!!((e=this.parent)!=null&&e.userHasUpdateItemPrivileges)}async addAttachment(e,t){const{parent:r}=this;if(!r)throw v("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new f("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw v("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new f("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw v("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new f("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw v("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:o}=this;if(r){const{displayField:l,editFieldsInfo:u,objectIdField:y}=r;t={displayField:l,editFieldsInfo:u,fields:n,objectIdField:y,title:o}}return X(t,e)}createQuery(){if(!this.parent)throw v("createQuery");const e=N(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=L(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw v("queryAttachments");const n=e.clone();return n.where=q(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw v("queryFeatures");const n=M.from(e)??r.createQuery();return e!=null&&(n.where=q(n.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(n,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};i([s({readOnly:!0,json:{read:!1}})],a.prototype,"capabilities",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"effectiveCapabilities",null),i([s({json:{write:{ignoreOrigin:!0}}})],a.prototype,"charts",void 0),i([s({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],a.prototype,"editingEnabled",void 0),i([s({type:Boolean,readOnly:!0})],a.prototype,"effectiveEditingEnabled",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"elevationInfo",null),i([s({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],a.prototype,"fieldOverrides",void 0),i([ee("fieldOverrides")],a.prototype,"writeFieldOverrides",null),i([s({...V.fields,readOnly:!0,json:{read:!1}})],a.prototype,"fields",null),i([s(V.fieldsIndex)],a.prototype,"fieldsIndex",void 0),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"floorInfo",null),i([s({type:te,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],a.prototype,"formTemplate",void 0),i([s({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],a.prototype,"id",void 0),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"geometryType",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"type",void 0),i([s($(S(re)))],a.prototype,"labelsVisible",void 0),i([s({type:[ie],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:se},write:{ignoreOrigin:!0}}})],a.prototype,"labelingInfo",void 0),i([s({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],a.prototype,"layerType",void 0),i([s($(S(ne)))],a.prototype,"legendEnabled",void 0),i([s({type:["show","hide"]})],a.prototype,"listMode",void 0),i([s((()=>{const e=S(ae);return e.json.origins.service.read=!1,$(e)})())],a.prototype,"minScale",void 0),i([s((()=>{const e=S(oe);return e.json.origins.service.read=!1,$(e)})())],a.prototype,"maxScale",void 0),i([s({readOnly:!0})],a.prototype,"effectiveScaleRange",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"objectIdField",null),i([s({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],a.prototype,"opacity",void 0),i([s({clonable:!1})],a.prototype,"parent",void 0),i([s($(S(le)))],a.prototype,"popupEnabled",void 0),i([s({type:ue,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],a.prototype,"popupTemplate",void 0),i([s({readOnly:!0})],a.prototype,"defaultPopupTemplate",null),i([s({types:B,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],a.prototype,"renderer",null),i([I("service","renderer",["drawingInfo.renderer","subtypeField","type"])],a.prototype,"readRendererFromService",null),i([I("renderer",["layerDefinition.drawingInfo.renderer"])],a.prototype,"readRenderer",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"spatialReference",null),i([s({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],a.prototype,"subtypeCode",void 0),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"subtypeField",null),i([s({type:[Q],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],a.prototype,"templates",void 0),i([I("service","templates",["geometryType","subtypeField","subtypes","type"])],a.prototype,"readTemplatesFromService",null),i([s({type:String,json:{write:{ignoreOrigin:!0}}})],a.prototype,"title",void 0),i([I("service","title",["subtypes"])],a.prototype,"readTitleFromService",null),i([s({readOnly:!0,json:{read:!1}})],a.prototype,"url",null),i([s({readOnly:!0})],a.prototype,"userHasUpdateItemPrivileges",null),i([s({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],a.prototype,"visible",void 0),a=i([H("esri.layers.support.SubtypeSublayer")],a);const q=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),o=`${t}=${r}`,l=e??"";return n.test(l)?l.replace(n,o):L(o,l)},v=e=>new f(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),T=a,h="SubtypeGroupLayer",ot="esri.layers.SubtypeGroupLayer";function R(e,t){return new f("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const _=U();let p=class extends ge(me(ve(we(Se(Fe($e(Ie(Oe(D(je(Ee(k(et))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(A.ofType(T)),this.supportedSourceTypes=new Set(["Feature Layer"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=Te(async(t,r,n)=>{const{save:o,saveAs:l}=await P(()=>import("./featureLayerUtils-CRRc6-7r.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));switch(t){case E.SAVE:return o(this,r);case E.SAVE_AS:return l(this,n,r)}}),this.addHandles(_e(()=>this.sublayers,(t,r)=>this._handleSublayersChange(t,r),Ae))}destroy(){var e;(e=this.source)==null||e.destroy()}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}load(e){const t=e!=null?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(Ce).then(async()=>{if(!this.url)throw new f("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(this.layerId==null)throw new f("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>Le(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return xe(this)}get parsedUrl(){const e=Pe(this.url);return e!=null&&this.layerId!=null&&(e.path=Ve(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?Ge(this.url,t):t}async addAttachment(e,t){return qe(this,e,t,h)}async updateAttachment(e,t,r){return Re(this,e,t,r,h)}async applyEdits(e,t){return De(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await ke(P(()=>import("./FeatureLayerSource-DHybgE9g.js"),__vite__mapDeps([10,1,2,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34])),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=N(this),t=this.sublayers.map(r=>r.subtypeCode);return e.where=L(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return Ne(this,e,t,h)}async fetchRecomputedExtents(e){return Me(this,e,h)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return tt(this,e=>{e(this.sublayers)})}async queryAttachments(e,t){return Qe(this,e,t,h)}async queryFeatures(e,t){const r=await this.load(),n=M.from(e)??r.createQuery(),o=n.outFields??[];o.includes(this.subtypeField)||(o.push(this.subtypeField),n.outFields=o);const l=await r.source.queryFeatures(n,t);if(l!=null&&l.features)for(const u of l.features)u.layer=u.sourceLayer=this.findSublayerForFeature(u);return l}async queryObjectIds(e,t){return He(this,e,t,h)}async queryFeatureCount(e,t){return Ue(this,e,t,h)}async queryExtent(e,t){return Be(this,e,t,h)}async queryRelatedFeatures(e,t){return Je(this,e,t,h)}async queryRelatedFeaturesCount(e,t){return ze(this,e,t,h)}async save(e){return this._debouncedSaveOperations(E.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(E.SAVE_AS,t,e)}write(e,t){var l;const{origin:r,layerContainerType:n,messages:o}=t;if(this.isTable){if(r==="web-scene"||r==="web-map"&&n!=="tables")return o==null||o.push(R(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&r==="web-map"&&n==="tables")return o==null||o.push(R(this,"using a non-table source cannot be written to tables in web maps")),null;return(l=this.sublayers)!=null&&l.length?super.write(e,t):(o==null||o.push(new f("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&Ke(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){var r;this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!((r=this.subtypes)!=null&&r.length))throw new f("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),We(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return Ye(this)}_verifyFields(){var t,r;const e=((t=this.parsedUrl)==null?void 0:t.path)??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||e.search(/\/FeatureServer\//i)!==-1||(r=this.fields)!=null&&r.some(n=>n.type==="geometry")||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach(r=>{r.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(r=>{r.parent=this,this._sublayerLookup.set(r.subtypeCode,r)}),this.addHandles([e.on("after-add",({item:r})=>{r.parent=this,this._sublayerLookup.set(r.subtypeCode,r)}),e.on("after-remove",({item:r})=>{r.parent=null,this._sublayerLookup.delete(r.subtypeCode)})],"sublayers-owner"))}};i([s({readOnly:!0})],p.prototype,"createQueryVersion",null),i([s({readOnly:!0})],p.prototype,"editingEnabled",null),i([s({readOnly:!0})],p.prototype,"effectiveEditingEnabled",null),i([s({..._.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],p.prototype,"fields",void 0),i([s(_.fieldsIndex)],p.prototype,"fieldsIndex",void 0),i([s(Ze)],p.prototype,"id",void 0),i([s({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],p.prototype,"listMode",void 0),i([s({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],p.prototype,"operationalLayerType",void 0),i([s(_.outFields)],p.prototype,"outFields",void 0),i([s({readOnly:!0})],p.prototype,"parsedUrl",null),i([s({clonable:!1})],p.prototype,"source",null),i([s({type:A.ofType(T),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const n=e.map(({code:o})=>{const l=new T({subtypeCode:o});return l.read(t,r),l});return new(A.ofType(T))(n)}}}},name:"layers",write:{ignoreOrigin:!0}}})],p.prototype,"sublayers",void 0),i([s({type:Xe})],p.prototype,"timeInfo",void 0),i([s({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],p.prototype,"title",void 0),i([I("service","title",["name"])],p.prototype,"readTitleFromService",null),i([s({json:{read:!1}})],p.prototype,"type",void 0),p=i([H(ot)],p);const pt=p;export{pt as default}; diff --git a/build/assets/TileInfo-Bx6eEWV4.js b/build/assets/TileInfo-Bx6eEWV4.js new file mode 100644 index 0000000..7c91325 --- /dev/null +++ b/build/assets/TileInfo-Bx6eEWV4.js @@ -0,0 +1 @@ +import{B as r,D as a,F as j,ey as O,E as L,a_ as S,aS as b,d2 as W,ay as T,bR as F,Q as y,dR as N,d3 as G,aa as P,ab as A,b$ as D,b3 as E}from"./index-DKOmzAMm.js";var R;let d=R=class extends j{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new R({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};r([a({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype,"cols",void 0),r([a({type:O,json:{write:!0}})],d.prototype,"level",void 0),r([a({type:String,json:{write:!0}})],d.prototype,"levelValue",void 0),r([a({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype,"origin",void 0),r([a({type:Number,json:{write:!0}})],d.prototype,"resolution",void 0),r([a({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype,"rows",void 0),r([a({type:Number,json:{write:!0}})],d.prototype,"scale",void 0),d=R=r([L("esri.layers.support.LOD")],d);const v=d;class I{constructor(t,s,i,o,l=void 0){this.id=t,this.level=s,this.row=i,this.col=o,this.extent=l}}var f;const _=new S({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let n=f=class extends j{static create(e={}){const{resolutionFactor:t=1,scales:s,size:i=256,spatialReference:o=T.WebMercator,numLODs:l=24}=e;if(!F(o)){const c=[];if(s)for(let u=0;u=0;h--)c.unshift(new v({level:h,scale:u,resolution:u})),u*=2}return new f({dpi:96,lods:c,origin:new y(0,0,o),size:[i,i],spatialReference:o})}const p=N(o),g=e.origin?new y({x:e.origin.x,y:e.origin.y,spatialReference:o}):new y(p?{x:p.origin[0],y:p.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),m=96,w=1/(G(o)*39.37*m),x=[];if(s)for(let c=0;c{i.push(l.scale),t=l.scale>t?l.scale:t,s=l.scale=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;ie&&l=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new v({level:o,scale:p,resolution:g}))}return new f({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;sArray.isArray(e)?e:typeof e=="number"?[e,e]:[256,256]})],n.prototype,"size",void 0),r([b("size",["rows","cols"])],n.prototype,"readSize",null),r([W("size",{cols:{type:O},rows:{type:O}})],n.prototype,"writeSize",null),r([a({type:T,json:{write:!0}})],n.prototype,"spatialReference",void 0),n=f=r([L("esri.layers.support.TileInfo")],n),function(e){var t;(t=e.ExtrapolateOptions||(e.ExtrapolateOptions={}))[t.NONE=0]="NONE",t[t.POWER_OF_TWO=1]="POWER_OF_TWO"}(n||(n={}));const J=n;export{v as p,I as t,J as z}; diff --git a/build/assets/TileInfoTilemapCache-jg1X3Y95.js b/build/assets/TileInfoTilemapCache-jg1X3Y95.js new file mode 100644 index 0000000..79c863f --- /dev/null +++ b/build/assets/TileInfoTilemapCache-jg1X3Y95.js @@ -0,0 +1 @@ +import{aT as s,s as h,aU as r}from"./index-DKOmzAMm.js";class f{constructor(i,e=0,l=i.lods[i.lods.length-1].level){this.tileInfo=i,this.minLOD=e,this.maxLOD=l,i.lodAt(e)||(this.minLOD=i.lods[0].level),i.lodAt(l)||(this.maxLOD=i.lods[i.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(i,e,l){var a;const t=(a=this.tileInfo)==null?void 0:a.lodAt(i);return!t||ithis.maxLOD?"unavailable":t.cols&&t.rows?l>=t.cols[0]&&l<=t.cols[1]&&e>=t.rows[0]&&e<=t.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(i,e,l,t){await s(t);const a=this.getAvailability(i,e,l);if(a==="unavailable")throw new h("tile-map:tile-unavailable","Tile is not available",{level:i,row:e,col:l});return a}async fetchAvailabilityUpsample(i,e,l,t,a){await s(a),t.level=i,t.row=e,t.col=l;const n=this.tileInfo;return n.updateTileInfo(t),this.fetchAvailability(i,e,l,a).catch(o=>{if(r(o))throw o;if(n.upsampleTile(t))return this.fetchAvailabilityUpsample(t.level,t.row,t.col,t,a);throw o})}}export{f as e}; diff --git a/build/assets/TileKey-D9UF-PsB.js b/build/assets/TileKey-D9UF-PsB.js new file mode 100644 index 0000000..a296d06 --- /dev/null +++ b/build/assets/TileKey-D9UF-PsB.js @@ -0,0 +1 @@ +import{aJ as n}from"./index-DKOmzAMm.js";class o{static getId(l,e,t,s){return typeof l=="object"?`${l.level}/${l.row}/${l.col}/${l.world}`:`${l}/${e}/${t}/${s}`}constructor(l,e,t,s){this.set(l,e,t,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(l){this.set(l)}get hash(){const l=4095&this.row,e=4095&this.col,t=63&this.level;return(3&this.world)<<30|e<<22|l<<8|t}acquire(l,e,t,s){this.set(l,e,t,s)}contains(l){const e=l.level-this.level;return e>=0&&this.row===l.row>>e&&this.col===l.col>>e&&this.world===l.world}containsChild(l){const e=l.level-this.level;return e>0&&this.row===l.row>>e&&this.col===l.col>>e&&this.world===l.world}equals(l){return this.level===l.level&&this.row===l.row&&this.col===l.col&&this.world===l.world}clone(){return new o(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(l,e,t,s){if(l==null)this.level=0,this.row=0,this.col=0,this.world=0;else if(typeof l=="object")this.level=l.level||0,this.row=l.row||0,this.col=l.col||0,this.world=l.world||0;else if(typeof l=="string"){const[r,i,h,w]=l.split("/");this.level=parseFloat(r),this.row=parseFloat(i),this.col=parseFloat(h),this.world=parseFloat(w)}else this.level=+l,this.row=+e,this.col=+t,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new o(this.level-1,this.row>>1,this.col>>1,this.world)}getNeighborId(l,e){return`${this.level}/${this.row+e}/${this.col+l}/${this.world}`}getChildKeys(){const l=this.level+1,e=this.row<<1,t=this.col<<1,s=this.world;return[new o(l,e,t,s),new o(l,e,t+1,s),new o(l,e+1,t,s),new o(l,e+1,t+1,s)]}compareRowMajor(l){return this.rowl.row?1:this.coll.col?1:0}}o.pool=new n(o,null,null,25,50);export{o as e}; diff --git a/build/assets/TileLayer-BehC5UCA.js b/build/assets/TileLayer-BehC5UCA.js new file mode 100644 index 0000000..2662aa1 --- /dev/null +++ b/build/assets/TileLayer-BehC5UCA.js @@ -0,0 +1 @@ +import{cq as _,cu as S,cs as T,ct as b,cF as w,cv as O,cr as $,cH as R,cG as U,aK as W,ay as v,I as P,U as u,d8 as j,s as h,d as B,d9 as I,ci as L,bZ as A,B as a,D as o,aS as M,d2 as N,d7 as C,cy as D,E as k,cE as J}from"./index-DKOmzAMm.js";import{t as q}from"./loadAll-Cm5pWAv4.js";import{p as G}from"./ArcGISCachedService-B90n8xUT.js";import{m as E,f as V,t as K}from"./SublayersOwner-Ez_yHYvH.js";import{o as m}from"./imageBitmapUtils-kF4U_Pyx.js";import"./TileInfo-Bx6eEWV4.js";import"./TileInfoTilemapCache-jg1X3Y95.js";import"./TilemapCache-6mrSWCBj.js";import"./ByteSizeUnit-BsxeN7wM.js";import"./CollectionFlattener-BmCRFqHz.js";import"./QueryTask-CH4nGmOK.js";import"./infoFor3D-DsOdlPuA.js";import"./utils-CF4bGKhW.js";import"./executeQueryJSON-CCbDrFwh.js";import"./query-CQvaiR4K.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./executeQueryPBF-B-eLVWOv.js";import"./featureConversionUtils-CCATessr.js";var y;const f=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let s=y=class extends _(S(E(G(V(T(b(w(O($(R(U(J)))))))))))){constructor(...e){super(...e),this.listMode="show",this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,r){return typeof e=="string"?{url:e,...r}:e}load(e){const r=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(W).then(()=>this._fetchService(r))),Promise.resolve(this)}get attributionDataUrl(){var r;const e=(r=this.parsedUrl)==null?void 0:r.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}readSpatialReference(e,r){var t;return(e=e||((t=r.tileInfo)==null?void 0:t.spatialReference))&&v.fromJSON(e)}writeSublayers(e,r,t,i){if(!this.loaded||!e)return;const p=e.slice().reverse().flatten(({sublayers:l})=>l&&l.toArray().reverse()).toArray(),n=[],c={writeSublayerStructure:!1,...i};p.forEach(l=>{const d=l.write({},c);n.push(d)}),n.some(l=>Object.keys(l).length>1)&&(r.layers=n)}get tileServers(){var e;return this._getDefaultTileServers((e=this.parsedUrl)==null?void 0:e.path)}castTileServers(e){return Array.isArray(e)?e.map(r=>P(r).path):null}fetchTile(e,r,t,i={}){const{signal:p}=i,n=this.getTileUrl(e,r,t),c={responseType:"image",signal:p,query:{...this.refreshParameters}};return u(n,c).then(l=>l.data)}async fetchImageBitmapTile(e,r,t,i={}){const{signal:p}=i;if(this.fetchTile!==y.prototype.fetchTile){const d=await this.fetchTile(e,r,t,i);return m(d,e,r,t,p)}const n=this.getTileUrl(e,r,t),c={responseType:"blob",signal:p,query:{...this.refreshParameters}},{data:l}=await u(n,c);return m(l,e,r,t,p)}getTileUrl(e,r,t){var c,l;const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,p=j({...(c=this.parsedUrl)==null?void 0:c.query,blankTile:!i&&null,...this.customParameters,token:this.apiKey}),n=this.tileServers;return`${n&&n.length?n[r%n.length]:(l=this.parsedUrl)==null?void 0:l.path}/tile/${e}/${r}/${t}${p?"?"+p:""}`}loadAll(){return q(this,e=>{e(this.allSublayers)})}_fetchService(e){return new Promise((r,t)=>{if(this.sourceJSON){if(this.sourceJSON.bandCount!=null&&this.sourceJSON.pixelSizeX!=null)throw new h("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void r({data:this.sourceJSON})}if(!this.parsedUrl)throw new h("tile-layer:undefined-url","layer's url is not defined");const i=B(this.parsedUrl.path);if(i!=null&&i.serverType==="ImageServer")throw new h("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");u(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(r,t)}).then(r=>{let t=this.url;if(r.ssl&&(t=this.url=t.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl}),this.version===10.1&&!I(t))return this._fetchServerVersion(t,e).then(i=>{this.read({currentVersion:i})}).catch(()=>{})})}_fetchServerVersion(e,r){if(!L(e))return Promise.reject();const t=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return u(t,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:r}).then(i=>{if(i.data&&i.data.currentVersion)return i.data.currentVersion;throw new h("tile-layer:version-not-available")})}_getMapName(e){const r=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return r?r[2]:void 0}_getDefaultAttribution(e){if(e==null)return null;let r;e=e.toLowerCase();for(let t=0,i=f.length;t({enabled:!1})}}})],s.prototype,"isReference",void 0),a([o({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],s.prototype,"operationalLayerType",void 0),a([o({type:Boolean})],s.prototype,"resampling",void 0),a([o()],s.prototype,"sourceJSON",void 0),a([o({type:v})],s.prototype,"spatialReference",void 0),a([M("spatialReference",["spatialReference","tileInfo"])],s.prototype,"readSpatialReference",null),a([o({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],s.prototype,"path",void 0),a([o({readOnly:!0})],s.prototype,"sublayers",void 0),a([N("sublayers",{layers:{type:[K]}})],s.prototype,"writeSublayers",null),a([o({json:{read:!1,write:!1}})],s.prototype,"popupEnabled",void 0),a([o()],s.prototype,"tileServers",null),a([C("tileServers")],s.prototype,"castTileServers",null),a([o({readOnly:!0,json:{read:!1}})],s.prototype,"type",void 0),a([o(D)],s.prototype,"url",void 0),s=y=a([k("esri.layers.TileLayer")],s);const g=Symbol("default-fetch-tile");s.prototype.fetchTile[g]=!0;const fe=s;export{fe as default}; diff --git a/build/assets/TilemapCache-6mrSWCBj.js b/build/assets/TilemapCache-6mrSWCBj.js new file mode 100644 index 0000000..6b5a12d --- /dev/null +++ b/build/assets/TilemapCache-6mrSWCBj.js @@ -0,0 +1 @@ +import{bd as O,$ as T,fw as z,U as $,s as m,b5 as q,B as d,D as y,bw as S,dk as L,bx as x,fx as U,aU as _,fy as P,fz as M,bV as C,d8 as I,E as k,bB as j,bX as E}from"./index-DKOmzAMm.js";import{E as H}from"./ByteSizeUnit-BsxeN7wM.js";import{t as R}from"./TileInfo-Bx6eEWV4.js";function B(e,t=!1){return e<=O?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}class w{constructor(t){N(t);const{location:a,data:i}=t;this.location=Object.freeze(T(a));const l=this.location.width,n=this.location.height;let r=!0,o=!0;const c=Math.ceil(l*n/32),s=B(c);let h=0;for(let f=0;f>5,r=this._availability;return n<0||n>r.length?"unknown":r[n]&1<s.data).catch(s=>{var h;if(((h=s==null?void 0:s.details)==null?void 0:h.httpStatus)===422)return{location:{top:l,left:n,width:r,height:o},valid:!0,data:new Array(r*o).fill(0)};throw s}).then(s=>{if(s.location&&(s.location.top!==l||s.location.left!==n||s.location.width!==r||s.location.height!==o))throw new m("tilemap:location-mismatch","Tilemap response for different location than requested",{response:s,definition:{top:l,left:n,width:r,height:o}});return w.fromJSON(s)})}static fromJSON(t){return Object.freeze(new w(t))}}function A(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function F(e){var i;let t;if((i=e.service.tileServers)!=null&&i.length){const l=e.service.tileServers;t=`${l&&l.length?l[e.row%l.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const a=e.service.query;return a&&(t=`${t}?${a}`),t}function N(e){if(!(e!=null&&e.location))throw new m("tilemap:missing-location","Location missing from tilemap response");if(e.valid===!1)throw new m("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new m("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new m("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new m("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}var v;let p=v=class extends S{constructor(e){super(e),this._pendingTilemapRequests={},this.request=$,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new L(2*H.MEGABYTES),this.addHandles(x(()=>{const{layer:e}=this;return[e==null?void 0:e.parsedUrl,e==null?void 0:e.tileServers,e==null?void 0:e.apiKey,e==null?void 0:e.customParameters]},()=>this._initializeTilemapDefinition(),U))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,a){if(!this.layer.tileInfo.lodAt(e)||ethis.effectiveMaxLOD)return"unavailable";const i=this._tilemapFromCache(e,t,a,this._tmpTilemapDefinition);return i?i.getAvailability(t,a):"unknown"}fetchAvailability(e,t,a,i){return!this.layer.tileInfo.lodAt(e)||ethis.effectiveMaxLOD?Promise.reject(new m("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:a})):this._fetchTilemap(e,t,a,i).catch(l=>l).then(l=>{if(l instanceof w){const n=l.getAvailability(t,a);if(n==="unavailable")throw new m("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:a});return n}if(_(l))throw l;return"unknown"})}fetchAvailabilityUpsample(e,t,a,i,l){i.level=e,i.row=t,i.col=a;const n=this.layer.tileInfo;n.updateTileInfo(i);const r=this.fetchAvailability(e,t,a,l).catch(o=>{if(_(o))throw o;if(n.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw o});return this._fetchAvailabilityUpsamplePrefetch(i.id,e,t,a,l,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,a,i,l,n){if(!this._prefetchingEnabled||e==null)return;const r=`prefetch-${e}`;if(this.hasHandles(r))return;const o=new AbortController;n.then(()=>o.abort(),()=>o.abort());let c=!1;const s=j(()=>{c||(c=!0,o.abort())});if(this.addHandles(s,r),await P(10,o.signal).catch(()=>{}),c||(c=!0,this.removeHandles(r)),M(o))return;const h=new R(e,t,a,i),f={...l,signal:o.signal},u=this.layer.tileInfo;for(let D=0;v._prefetches.length{v._prefetches.removeUnordered(b)};b.then(g,g)}}_fetchTilemap(e,t,a,i){if(!this.layer.tileInfo.lodAt(e)||ethis.effectiveMaxLOD)return Promise.reject(new m("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const l=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,a,l);if(n)return Promise.resolve(n);const r=i==null?void 0:i.signal;return i={...i,signal:null},new Promise((o,c)=>{C(r,()=>c(E()));const s=A(l);let h=this._pendingTilemapRequests[s];if(!h){h=w.fromDefinition(l,i).then(u=>(this._tilemapCache.put(s,u,u.byteSize),u));const f=()=>{delete this._pendingTilemapRequests[s]};this._pendingTilemapRequests[s]=h,h.then(f,f)}h.then(o,c)})}_initializeTilemapDefinition(){var i;if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:a}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:I({...e.query,...a,token:t??((i=e.query)==null?void 0:i.token)}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,a,i){i.level=e,i.row=t-t%this.size,i.col=a-a%this.size;const l=A(i);return this._tilemapCache.get(l)}get test(){}};p._maxPrefetch=4,p._prefetches=new q({initialSize:v._maxPrefetch}),d([y({constructOnly:!0})],p.prototype,"layer",void 0),d([y({constructOnly:!0})],p.prototype,"minLOD",void 0),d([y({constructOnly:!0})],p.prototype,"maxLOD",void 0),d([y({constructOnly:!0})],p.prototype,"request",void 0),d([y({constructOnly:!0})],p.prototype,"size",void 0),p=v=d([k("esri.layers.support.TilemapCache")],p);export{p as j}; diff --git a/build/assets/TimeOnly-C2MfFEIr.js b/build/assets/TimeOnly-C2MfFEIr.js new file mode 100644 index 0000000..a1cc1ef --- /dev/null +++ b/build/assets/TimeOnly-C2MfFEIr.js @@ -0,0 +1 @@ +import{g1 as i,g2 as l,g3 as Z,g4 as g,g5 as M,eF as q,J as U,aZ as b}from"./index-DKOmzAMm.js";var y;(function(r){r.TimeZoneNotRecognized="TimeZoneNotRecognized"})(y||(y={}));const N={[y.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class w extends Error{constructor(e,t){super(q(N[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,w)}}function h(r,e,t){return rt?r-t:0}function d(r,e,t){return rt?t:r}class n{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,a=0,o=0,T=0,S=0,L){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(a)||isNaN(o)||isNaN(T)||isNaN(S))return null;const p=i.local(e,t).daysInMonth;let D=i.fromObject({day:d(s,1,p),year:e,month:d(t,1,12),hour:d(a,0,23),minute:d(o,0,59),second:d(T,0,59),millisecond:d(S,0,999)},{zone:m(L)});return D=D.plus({months:h(t,1,12),days:h(s,1,p),hours:h(a,0,23),minutes:h(o,0,59),seconds:h(T,0,59),milliseconds:h(S,0,999)}),new n(D)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const s=m(t);return e.isUnknownTimeZone||s===l.instance?n.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new n(e._date.setZone(s))}static dateJSToArcadeDate(e){return new n(i.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const s=m(t);return new n(i.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new n(i.fromMillis(e,{zone:l.instance}))}static unknownDateJSToArcadeDate(e){return new n(i.fromMillis(e.getTime(),{zone:l.instance}))}static epochToArcadeDate(e,t="system"){const s=m(t);return new n(i.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new n(e)}clone(){return new n(this._date)}changeTimeZone(e){const t=m(e);return n.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const s=m(t);return e.zone===l.instance||s===l.instance?n.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new n(e.setZone(s))}static nowToArcadeDate(e){const t=m(e);return new n(i.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new n(i.utc())}get isSystem(){return this.timeZone==="system"||this.timeZone===n.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===l.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if(this._date.zone.type==="system")return"system";const e=this.zone;return e.type==="fixed"?e.fixed===0?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new n(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new n(this._date.toUTC())}toLocal(){return new n(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=i.fromISO(e,{setZone:!0});return new n(t)}}function m(r,e=!0){if(r instanceof Z)return r;if(r.toLowerCase()==="system")return"system";if(r.toLowerCase()==="utc")return"UTC";if(r.toLowerCase()==="unknown")return l.instance;if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(r)){const s=g.parseSpecifier("UTC"+(r.startsWith("+")||r.startsWith("-")?"":"+")+r);if(s)return s}const t=M.create(r);if(!t.isValid){if(e)throw new w(y.TimeZoneNotRecognized);return null}return t}function k(r){r=r.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let e="";const t=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const s of r.match(t)||[])switch(s){case"D":e+="d";break;case"DD":e+="dd";break;case"DDD":e+="o";break;case"d":e+="c";break;case"ddd":e+="ccc";break;case"dddd":e+="cccc";break;case"M":e+="L";break;case"MM":e+="LL";break;case"MMM":e+="LLL";break;case"MMMM":e+="LLLL";break;case"YY":e+="yy";break;case"Y":case"YYYY":e+="yyyy";break;case"Q":e+="q";break;case"X":case"x":e+=s;break;default:s.length>=2&&s.slice(0,1)==="["&&s.slice(-1)==="]"?e+=`'${s.slice(1,-1)}'`:e+=`'${s}'`}return e}let A=class c{constructor(e,t,s){this._year=e,this._month=t,this._day=s,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return e instanceof c&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new c(this._year,this._month,this._day)}toDateTime(e){return i.fromObject({day:this.day,month:this.month,year:this.year},{zone:m(e)})}toDateTimeLuxon(e){return i.fromObject({day:this.day,month:this.month,year:this.year},{zone:m(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(e===null||e==="")return this.toString();if(t&&(e=k(e)),!e)return"";const s=this.toDateTime("unknown");return n.dateTimeToArcadeDate(s).toFormat(e,{locale:U(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return n.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return i.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return t==="M"?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=i.fromMillis(e,{zone:g.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=i.fromSeconds(e,{zone:g.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return t.length!==3?null:new c(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,s){const a=new c(e,t,s);return a.isValid===!1?null:a}static fromDateJS(e){return c.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return c.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(e===""||e===null)return null;const s=[];if(t)(t=k(t))&&s.push(t);else if(t===null||t===""){const a=i.fromISO(e,{setZone:!0});return a.isValid?c.fromParts(a.year,a.month,a.day):null}for(const a of s){const o=i.fromFormat(e,t??a);if(o.isValid)return new c(o.year,o.month,o.day)}return null}static fromNow(e="system"){const t=i.fromJSDate(new Date).setZone(m(e));return new c(t.year,t.month,t.day)}};function $(r){if(r==null)return null;if(typeof r=="number")return r;let e=r.toLowerCase();switch(e=e.replaceAll(/\s/g,""),e=e.replaceAll("-",""),e){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 109404;case"miles":case"mile":case"squaremile":case"squaremiles":return 109439;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 109414;case"acres":case"acre":case"ac":return 109402;case"hectares":case"hectare":case"ha":return 109401;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 109442;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 109405;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 109409}return null}function Y(r){if(r==null)return null;switch(r.type){case"polygon":case"multipoint":case"polyline":return r.extent;case"point":return new b({xmin:r.x,ymin:r.y,xmax:r.x,ymax:r.y,spatialReference:r.spatialReference});case"extent":return r}return null}function z(r){if(r==null)return null;if(typeof r=="number")return r;let e=r.toLowerCase();switch(e=e.replaceAll(/\s/g,""),e=e.replaceAll("-",""),e){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 9001;case"miles":case"mile":case"squaremile":case"squaremiles":return 9093;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 9036;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 9096;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 9002;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 9030}return null}function I(r){if(r==null)return null;const e=r.clone();return r.cache._geVersion!==void 0&&(e.cache._geVersion=r.cache._geVersion),e}function f(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r}function C(r){if(!r)return"";const e=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let t="";for(const s of r.match(e)||[])switch(s){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":t+=s;break;case"A":case"a":t+="a";break;default:t+=`'${s}'`}return t}class u{constructor(e,t,s,a){this._hour=e,this._minute=t,this._second=s,this._millisecond=a,this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return e instanceof u&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new u(this.hour,this.minute,this.second,this.millisecond)}isValid(){return f(this.hour)&&f(this.minute)&&f(this.second)&&f(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return e===null||e===""?this.toString():(e=C(e))?i.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:U(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,s,a){const o=new u(e,t,s,a);return o.isValid()?o:null}static fromReader(e){if(!e)return null;const t=e.split(":");return t.length!==3?null:new u(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),s=Math.floor(e/6e4%60),a=Math.floor(e/36e5%24),o=Math.floor(e%1e3);return new u(a,s,t,o)}static fromDateJS(e){return new u(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new u(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(e===""||e===null)return null;const s=[];t?(t=C(t))&&s.push(t):t!==null&&t!==""||(s.push("HH:mm:ss"),s.push("HH:mm:ss.SSS"),s.push("hh:mm:ss a"),s.push("hh:mm:ss.SSS a"),s.push("HH:mm"),s.push("hh:mm a"),s.push("H:mm"),s.push("h:mm a"),s.push("H:mm:ss"),s.push("h:mm:ss a"),s.push("H:mm:ss.SSS"),s.push("h:mm:ss.SSS a"));for(const a of s){const o=i.fromFormat(e,a);if(o.isValid)return new u(o.hour,o.minute,o.second,o.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return u.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return i.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return t==="M"?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}export{z as a,A as b,I as c,m as h,n as m,u as n,$ as r,Y as s}; diff --git a/build/assets/TurboLine-BJPIEzB-.js b/build/assets/TurboLine-BJPIEzB-.js new file mode 100644 index 0000000..5056113 --- /dev/null +++ b/build/assets/TurboLine-BJPIEzB-.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/libtess-asm-CthFaaan.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/libtess-CoED-ECQ.js"])))=>i.map(i=>d[i]); +import{M as bt,_ as ft,fr as Mt}from"./index-DKOmzAMm.js";import{R as Rt,e as I,n as D}from"./GeometryUtils-6Cd4d7Hy.js";const pt=128e3;let ut=null,mt=null;async function At(){return ut||(ut=Ut()),ut}async function Ut(){mt=await(bt("esri-csp-restrictions")?await ft(()=>import("./libtess-asm-CthFaaan.js"),__vite__mapDeps([0,1])).then(e=>e.l):await ft(()=>import("./libtess-CoED-ECQ.js"),__vite__mapDeps([2,1])).then(e=>e.l)).default({locateFile:e=>Mt(`esri/core/libs/libtess/${e}`)})}function Ot(s,e){const x=Math.max(s.length,pt);return mt.triangulate(s,e,x)}class Pt{constructor(e=0,x=0,_=0,m=0){this.x=e,this.y=x,this.width=_,this.height=m}get isEmpty(){return this.width<=0||this.height<=0}union(e){this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.width=Math.max(this.width,e.width),this.height=Math.max(this.height,e.height)}}function Vt(s,e){return s.x===e.x&&s.y===e.y}function kt(s){if(!s)return;const e=s.length;if(e<=1)return;let x=0;for(let _=1;__){$=!0;const t=(_-m)/T;T=_-m,W=(1-t)*C+t*W,X=(1-t)*F+t*X,--j}const h=this._writeVertex(C,F,0,0,b,v,v,-b,0,-1,m),y=this._writeVertex(C,F,0,0,b,v,-v,b,0,1,m);m+=T;const G=this._writeVertex(W,X,0,0,b,v,v,-b,0,-1,m),i=this._writeVertex(W,X,0,0,b,v,-v,b,0,1,m);this._writeTriangle(h,y,G),this._writeTriangle(y,G,i),C=W,F=X}}_tessellate(e,x){const _=e[0],m=e[e.length-1],$=Vt(_,m),C=$?3:2;if(e.length{const O=Et(h,y,c,d,H,V,R,nt,L,A,l);return u>=0&&o>=0&&O>=0&&Nt(u,o,O),u=o,o=O,O};$&&(T=e[e.length-2],t.x=m.x-T.x,t.y=m.y-T.y,Q=vt(t),t.x/=Q,t.y/=Q);let Y=!1;for(let R=0;R_t&&(Y=!0)),Y){const r=(_t-l)/K;K=_t-l,T={x:(1-r)*T.x+r*e[R].x,y:(1-r)*T.y+r*e[R].y},--R}else T=e[R];h=T.x,y=T.y;const nt=R<=0&&!Y,H=R===e.length-1;if(nt||(l+=K),G=H?$?e[1]:null:e[R+1],G?(t.x=G.x-h,t.y=G.y-y,Q=vt(t),t.x/=Q,t.y/=Q):(t.x=void 0,t.y=void 0),!$){if(nt){M(n,t),c=n.x,d=n.y,B===I.SQUARE&&(w(-t.y-t.x,t.x-t.y,t.x,t.y,0,-1),w(t.y-t.x,-t.x-t.y,t.x,t.y,0,1)),B===I.ROUND&&(w(-t.y-t.x,t.x-t.y,t.x,t.y,-1,-1),w(t.y-t.x,-t.x-t.y,t.x,t.y,-1,1)),B!==I.ROUND&&B!==I.BUTT||(w(-t.y,t.x,t.x,t.y,0,-1),w(t.y,-t.x,t.x,t.y,0,1));continue}if(H){k(n,i),c=n.x,d=n.y,B!==I.ROUND&&B!==I.BUTT||(w(i.y,-i.x,-i.x,-i.y,0,-1),w(-i.y,i.x,-i.x,-i.y,0,1)),B===I.SQUARE&&(w(i.y-i.x,-i.x-i.y,-i.x,-i.y,0,-1),w(-i.y-i.x,i.x-i.y,-i.x,-i.y,0,1)),B===I.ROUND&&(w(i.y-i.x,-i.x-i.y,-i.x,-i.y,1,-1),w(-i.y-i.x,i.x-i.y,-i.x,-i.y,1,1));continue}}let V,L,A=-Bt(i,t);if(Math.abs(A)<.01)gt(i,t)>0?(n.x=i.x,n.y=i.y,A=1,V=Number.MAX_VALUE,L=!0):(M(n,t),A=1,V=1,L=!1);else{n.x=(i.x+t.x)/A,n.y=(i.y+t.y)/A,V=vt(n);const r=(V-1)*b*F;L=V>4||r>K&&r>Q}c=n.x,d=n.y;let O=j;switch(j){case D.BEVEL:V<1.05&&(O=D.MITER);break;case D.ROUND:VW&&(O=D.BEVEL)}switch(O){case D.MITER:if(w(n.x,n.y,-i.x,-i.y,0,-1),w(-n.x,-n.y,-i.x,-i.y,0,1),H)break;if(v){const r=Y?0:l;u=this._writeVertex(h,y,c,d,t.x,t.y,n.x,n.y,0,-1,r),o=this._writeVertex(h,y,c,d,t.x,t.y,-n.x,-n.y,0,1,r)}break;case D.BEVEL:{const r=A<0;let g,E,q,p;if(r){const a=u;u=o,o=a,g=xt,E=rt}else g=rt,E=xt;if(L)q=r?M(this._innerPrev,i):k(this._innerPrev,i),p=r?k(this._innerNext,t):M(this._innerNext,t);else{const a=r?wt(this._inner,n):Tt(this._inner,n);q=a,p=a}const U=r?k(this._bevelStart,i):M(this._bevelStart,i);w(q.x,q.y,-i.x,-i.y,g.x,g.y);const yt=w(U.x,U.y,-i.x,-i.y,E.x,E.y);if(H)break;const P=r?M(this._bevelEnd,t):k(this._bevelEnd,t);if(L){const a=this._writeVertex(h,y,c,d,-i.x,-i.y,0,0,0,0,l);u=this._writeVertex(h,y,c,d,t.x,t.y,p.x,p.y,g.x,g.y,l),o=this._writeVertex(h,y,c,d,t.x,t.y,P.x,P.y,E.x,E.y,l),this._writeTriangle(yt,a,o)}else{if(v){const a=this._bevelMiddle;a.x=(U.x+P.x)/2,a.y=(U.y+P.y)/2,it(f,a,-i.x,-i.y),w(a.x,a.y,-i.x,-i.y,f.x,f.y),it(f,a,t.x,t.y),u=this._writeVertex(h,y,c,d,t.x,t.y,a.x,a.y,f.x,f.y,l),o=this._writeVertex(h,y,c,d,t.x,t.y,p.x,p.y,g.x,g.y,l)}else{const a=u;u=o,o=a}w(P.x,P.y,t.x,t.y,E.x,E.y)}if(r){const a=u;u=o,o=a}break}case D.ROUND:{const r=A<0;let g,E;if(r){const N=u;u=o,o=N,g=xt,E=rt}else g=rt,E=xt;const q=r?wt(this._inner,n):Tt(this._inner,n);let p,U;L?(p=r?M(this._innerPrev,i):k(this._innerPrev,i),U=r?k(this._innerNext,t):M(this._innerNext,t)):(p=q,U=q);const yt=r?k(this._roundStart,i):M(this._roundStart,i),P=r?M(this._roundEnd,t):k(this._roundEnd,t),a=w(p.x,p.y,-i.x,-i.y,g.x,g.y),ht=w(yt.x,yt.y,-i.x,-i.y,E.x,E.y);if(H)break;const z=this._writeVertex(h,y,c,d,-i.x,-i.y,0,0,0,0,l);L||this._writeTriangle(u,o,z);const S=wt(this._outer,q),J=this._writeVertex(h,y,c,d,t.x,t.y,P.x,P.y,E.x,E.y,l);let Z,tt;const ot=V>2;if(ot){let N;V!==Number.MAX_VALUE?(S.x/=V,S.y/=V,N=gt(i,S),N=(V*(N*N-1)+1)/N):N=-1,Z=r?k(this._startBreak,i):M(this._startBreak,i),Z.x+=i.x*N,Z.y+=i.y*N,tt=r?M(this._endBreak,t):k(this._endBreak,t),tt.x+=t.x*N,tt.y+=t.y*N}it(f,S,-i.x,-i.y);const lt=this._writeVertex(h,y,c,d,-i.x,-i.y,S.x,S.y,f.x,f.y,l);it(f,S,t.x,t.y);const ct=v?this._writeVertex(h,y,c,d,t.x,t.y,S.x,S.y,f.x,f.y,l):lt,dt=z,at=v?this._writeVertex(h,y,c,d,t.x,t.y,0,0,0,0,l):z;let et=-1,st=-1;if(ot&&(it(f,Z,-i.x,-i.y),et=this._writeVertex(h,y,c,d,-i.x,-i.y,Z.x,Z.y,f.x,f.y,l),it(f,tt,t.x,t.y),st=this._writeVertex(h,y,c,d,t.x,t.y,tt.x,tt.y,f.x,f.y,l)),v?ot?(this._writeTriangle(dt,ht,et),this._writeTriangle(dt,et,lt),this._writeTriangle(at,ct,st),this._writeTriangle(at,st,J)):(this._writeTriangle(dt,ht,lt),this._writeTriangle(at,ct,J)):ot?(this._writeTriangle(z,ht,et),this._writeTriangle(z,et,st),this._writeTriangle(z,st,J)):(this._writeTriangle(z,ht,lt),this._writeTriangle(z,ct,J)),L?(u=this._writeVertex(h,y,c,d,t.x,t.y,U.x,U.y,g.x,g.y,l),o=J):(u=v?this._writeVertex(h,y,c,d,t.x,t.y,U.x,U.y,g.x,g.y,l):a,this._writeTriangle(u,at,J),o=J),r){const N=u;u=o,o=N}break}}}}}export{Ot as a,St as c,At as i,Pt as t}; diff --git a/build/assets/UnknownLayer-CpgQZHrw.js b/build/assets/UnknownLayer-CpgQZHrw.js new file mode 100644 index 0000000..00cf46f --- /dev/null +++ b/build/assets/UnknownLayer-CpgQZHrw.js @@ -0,0 +1 @@ +import{ct as i,cv as y,bC as l,B as s,D as t,E as p,cE as u,s as c}from"./index-DKOmzAMm.js";let e=class extends i(y(u)){constructor(r){super(r),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise((r,o)=>{l(()=>{const n=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let a="Unknown layer type";n&&(a+=" "+n),o(new c("layer:unknown-layer-type",a,{layerType:n}))})}))}read(r,o){super.read({resourceInfo:r},o)}write(r,o){return null}};s([t({readOnly:!0})],e.prototype,"resourceInfo",void 0),s([t({type:["show","hide"]})],e.prototype,"listMode",void 0),s([t({json:{read:!1},readOnly:!0,value:"unknown"})],e.prototype,"type",void 0),e=s([p("esri.layers.UnknownLayer")],e);const f=e;export{f as default}; diff --git a/build/assets/UnsupportedLayer-rrpNacvj.js b/build/assets/UnsupportedLayer-rrpNacvj.js new file mode 100644 index 0000000..757d1cc --- /dev/null +++ b/build/assets/UnsupportedLayer-rrpNacvj.js @@ -0,0 +1 @@ +import{ct as p,cv as a,bC as l,B as r,D as i,E as d,cE as u,s as y}from"./index-DKOmzAMm.js";let t=class extends p(a(u)){constructor(e){super(e),this.resourceInfo=null,this.persistenceEnabled=!0,this.type="unsupported"}initialize(){this.addResolvingPromise(new Promise((e,o)=>{l(()=>{const s=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let n="Unsupported layer type";s&&(n+=" "+s),o(new y("layer:unsupported-layer-type",n,{layerType:s}))})}))}read(e,o){const s={resourceInfo:e};e.id!=null&&(s.id=e.id),e.title!=null&&(s.title=e.title),super.read(s,o)}write(e,o){return Object.assign(e||{},this.resourceInfo,{id:this.id})}};r([i({readOnly:!0})],t.prototype,"resourceInfo",void 0),r([i({type:["show","hide"]})],t.prototype,"listMode",void 0),r([i({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),r([i({json:{read:!1},readOnly:!0,value:"unsupported"})],t.prototype,"type",void 0),t=r([d("esri.layers.UnsupportedLayer")],t);const h=t;export{h as default}; diff --git a/build/assets/UpdatingHandles-D3xBFsF5.js b/build/assets/UpdatingHandles-D3xBFsF5.js new file mode 100644 index 0000000..412fcf2 --- /dev/null +++ b/build/assets/UpdatingHandles-D3xBFsF5.js @@ -0,0 +1 @@ +import{B as r,D as p,E as _,bw as u,bx as o,by as g,bz as c,bA as m,bB as h,bC as H}from"./index-DKOmzAMm.js";let l=class extends u{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o)}addWhen(e,t,s={}){return this._installWatch(e,t,s,g)}addOnCollectionChange(e,t,{initial:s=!1,final:n=!1}={}){const a=++this._handleId;return this.addHandles([c(e,"after-changes",this._createSyncUpdatingCallback(),m),c(e,"change",t,{onListenerAdd:s?d=>t({added:d.toArray(),removed:[]}):void 0,onListenerRemove:n?d=>t({added:[],removed:d.toArray()}):void 0})],a),h(()=>this.removeHandles(a))}addPromise(e){if(e==null)return e;const t=++this._handleId;this.addHandles(h(()=>{this._pendingPromises.delete(e)&&(this._pendingPromises.size!==0||this.hasHandles(i)||this._set("updating",!1))}),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},n){const a=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,a);const d=n(e,t,s);return this.addHandles(d,a),h(()=>this.removeHandles(a))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),n=o(e,s,{sync:!0,equals:()=>!1});return this.addHandles(n,t),n}_createSyncUpdatingCallback(){return()=>{this.removeHandles(i),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles(H(()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(i))}),i)}}};r([p({readOnly:!0})],l.prototype,"updating",void 0),l=r([_("esri.core.support.UpdatingHandles")],l);const i=-42;export{l as h}; diff --git a/build/assets/Util-DRlRfUCu.js b/build/assets/Util-DRlRfUCu.js new file mode 100644 index 0000000..b4f77a9 --- /dev/null +++ b/build/assets/Util-DRlRfUCu.js @@ -0,0 +1 @@ +import"./vec2f64-DA6GkJuH.js";import"./index-DKOmzAMm.js";class l{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function g(o,t){if(!o){t=t||"Assertion";const u=new Error(t).stack;throw new l(`${t} at ${u}`)}}function h(o,t,u,f){let i,e=(u[0]-o[0])/t[0],s=(f[0]-o[0])/t[0];e>s&&(i=e,e=s,s=i);let n=(u[1]-o[1])/t[1],r=(f[1]-o[1])/t[1];if(n>r&&(i=n,n=r,r=i),e>r||n>s)return!1;n>e&&(e=n),rc&&(i=a,a=c,c=i),!(e>c||a>s)&&(c{const s=new Image;s.onload=()=>{s.onload=s.onerror=null,r(s.width>0&&s.height>0)},s.onerror=()=>{s.onload=s.onerror=null,r(!1)},s.src="data:image/webp;base64,"+t[e]}),v}const M=1.15;let N=class{constructor(t,r){this._spriteSource=t,this._maxTextureSize=r,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded",t.type==="url"&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const r in this._spritesData)t.push(r);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>M;const{width:r,height:s,data:i,json:o}=await this._getSpriteData(this._spriteSource,t),l=Object.keys(o);if(!l||l.length===0||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=o,this.width=r,this.height=s;const n=Math.max(this._maxTextureSize,4096);if(r>n||s>n){const u=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw te.getLogger("esri.layers.support.SpriteSource").error(u),new I("SpriteSource",u)}let a;for(let u=0;ut.data.index)),this._tileIndexPromise}async dataKey(t,r){const s=await this.fetchTileIndex();return z(r),this._getIndexedDataKey(s,t)}_getIndexedDataKey(t,r){const s=[r];if(r.level<0||r.row<0||r.col<0||r.row>>r.level>0||r.col>>r.level>0)return null;let i=r;for(;i.level!==0;)i=new Y(i.level-1,i.row>>1,i.col>>1,i.world),s.push(i);let o,l,n=t,a=s.pop();if(n===1)return a;for(;s.length;)if(o=s.pop(),l=(1&o.col)+((1&o.row)<<1),n){if(n[l]===0){a=null;break}if(n[l]===1){a=o;break}a=o,n=n[l]}return a}},Oe=class{constructor(t,r){this._tilemap=t,this._tileIndexUrl=r}destroy(){this._tilemap=le(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=x(this._tileIndexUrl,{query:{...t==null?void 0:t.query}}).then(r=>r.data.index)),this._tileIndexPromise}dataKey(t,r){const{level:s,row:i,col:o}=t,l=new Y(t);return this._tilemap.fetchAvailabilityUpsample(s,i,o,l,r).then(()=>(l.world=t.world,l)).catch(n=>{if(oe(n))throw n;return null})}},De=class{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){var s;(this._promise==null||D((s=this._abortController)==null?void 0:s.signal))&&(this._promise=this._makeRequest(this._tileUrl));const r=this._abortOptions;return r.push(t),ne(t,()=>{r.every(i=>D(i))&&this._abortController.abort()}),this._promise.then(i=>g(i))}async _makeRequest(t){this._abortController=new AbortController;const{data:r}=await x(t,{responseType:"array-buffer",signal:this._abortController.signal});return r}};const k=new Map;function Ce(e,t,r,s,i){const o=_(e),l=o.query;if(l)for(const[a,u]of Object.entries(l))switch(u){case"{x}":l[a]=s.toString();break;case"{y}":l[a]=r.toString();break;case"{z}":l[a]=t.toString()}const n=o.path;return Le(A(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}function Le(e,t){return ae(k,e,()=>new De(e)).getData(t).finally(()=>k.delete(e))}class je{constructor(t,r,s){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=r;const i=_(this.sourceUrl),o=g(s),l=o.tiles;if(i)for(let f=0;ff.toLowerCase().trim()),a=(s==null?void 0:s.exportTilesAllowed)===!0,u=(n==null?void 0:n.includes("tilemap"))===!0,p=a&&s.hasOwnProperty("maxExportTilesCount")?s.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+p}:null},this.tileInfo=R.fromJSON(o.tileInfo);const d=s.tileMap?A(E(i.path,s.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new Oe(new H({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:o.minLOD??this.tileInfo.lods[0].level,maxLOD:o.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),d)):d&&(this.tilemap=new Pe(d)),this.fullExtent=U.fromJSON(s.fullExtent),this.initialExtent=U.fromJSON(s.initialExtent)}destroy(){var t;(t=this.tilemap)==null||t.destroy()}async getRefKey(t,r){var s;return await((s=this.tilemap)==null?void 0:s.dataKey(t,r))??t}requestTile(t,r,s,i){const o=this.tileServers[r%this.tileServers.length];return Ce(o,t,r,s,i)}isCompatibleWith(t){const r=this.tileInfo,s=t.tileInfo;if(!r.spatialReference.equals(s.spatialReference)||!r.origin.equals(s.origin)||Math.round(r.dpi)!==Math.round(s.dpi))return!1;const i=r.lods,o=s.lods,l=Math.min(i.length,o.length);for(let n=0;n=b||Math.abs(r.y-s.y)>=b)return!1;let i,o;e.lods[0].scale>t.lods[0].scale?(i=e,o=t):(o=e,i=t);for(let l=i.lods[0].scale;l>=o.lods[o.lods.length-1].scale-b;l/=2)if(Math.abs(l-o.lods[0].scale)t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,p=n.resolution,d=a.scale,f=[];let m=u,P=p,O=0;for(;m>d;)f.push(new Re({level:O,resolution:P,scale:m})),O++,m/=2,P/=2;return new R({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:f,spatialReference:l})}function q(e,t={}){return e.getContext("webgl2",t)||null}let $;function Q(){return $||($=Ge()),$}class Qe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}function ze(e){if(typeof WebGL2RenderingContext>"u")return null;const t=document.createElement("canvas");if(!t)return null;let r=q(t,{failIfMajorPerformanceCaveat:!0});if(r==null&&(r=q(t),r!=null&&(e.majorPerformanceCaveat=!0)),r==null)return r;e.available=!0,e.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return s&&(e.supportsHighPrecisionFragment=s.precision>0),r}function Ge(){const e=new Qe,t=ze(e);return t==null||(e.supportsColorBufferFloat=t.getExtension("EXT_color_buffer_float")!==null,e.supportsColorBufferFloatBlend=t.getExtension("EXT_float_blend")!==null,e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||t.getExtension("EXT_color_buffer_half_float")!==null),e}let c=class extends ce(he(Ue(ye(de(fe(me(ge(Se(Ie))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}destroy(){var e;if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t==null||t.destroy();(e=this.primarySource)==null||e.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(T).then(async()=>{var s;if(!((s=this.portalItem)!=null&&s.id))return;const r=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await x(r,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:r},Te(this.portalItem,"portal-item"))}).catch(T).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=(e==null?void 0:e.serviceUrl)&&_(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?A(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){var e;return((e=this.primarySource)==null?void 0:e.fullExtent)||null}get initialExtent(){var e;return((e=this.primarySource)==null?void 0:e.initialExtent)||null}get parsedUrl(){return this.serviceUrl?_(this.serviceUrl):null}get serviceUrl(){var e;return((e=this.currentStyleInfo)==null?void 0:e.serviceUrl)||null}get spatialReference(){var e;return((e=this.tileInfo)==null?void 0:e.spatialReference)??null}get styleUrl(){var e;return((e=this.currentStyleInfo)==null?void 0:e.styleUrl)||null}writeStyleUrl(e,t){e&&W(e)&&(e=`https:${e}`);const r=Ae(e);t.styleUrl=xe(e,r)}get tileInfo(){var r;const e=[];for(const s in this.sourceNameToSource)e.push(this.sourceNameToSource[s]);let t=((r=this.primarySource)==null?void 0:r.tileInfo)||new R;if(e.length>1)for(let s=0;s(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:i})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){var t;return g((t=this.styleRepository)==null?void 0:t.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const s=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||s})}getStyleLayer(e){return g(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return g(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t!=null&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new I("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await Be(e,{...t,query:{...this.customParameters,token:this.apiKey}});r.spriteFormat==="webp"&&(await Ee("lossy")||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),typeof e=="string"?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new $e(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const s=t[2]&&t[2].toLowerCase();if(!s)return;const i=t[1]||"";for(const o of r)if(o.toLowerCase().includes(s))return J(`//static.arcgis.com/attribution/Vector${i}/${o}`)}async _loadStyle(e){var t;return((t=this._loadingTask)==null?void 0:t.promise)??this.loadStyle(null,e)}};h([y({readOnly:!0})],c.prototype,"attributionDataUrl",null),h([y({type:["show","hide"]})],c.prototype,"listMode",void 0),h([y({json:{read:!0,write:!0}})],c.prototype,"blendMode",void 0),h([y({readOnly:!0,json:{read:!1}})],c.prototype,"capabilities",null),h([y({readOnly:!0})],c.prototype,"currentStyleInfo",void 0),h([y({json:{read:!1},readOnly:!0,type:U})],c.prototype,"fullExtent",null),h([y({json:{read:!1},readOnly:!0,type:U})],c.prototype,"initialExtent",null),h([y({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],c.prototype,"isReference",void 0),h([y({type:["VectorTileLayer"]})],c.prototype,"operationalLayerType",void 0),h([y({readOnly:!0})],c.prototype,"parsedUrl",null),h([y()],c.prototype,"style",void 0),h([y({readOnly:!0})],c.prototype,"serviceUrl",null),h([y({type:we,readOnly:!0})],c.prototype,"spatialReference",null),h([y({readOnly:!0})],c.prototype,"styleRepository",void 0),h([y({readOnly:!0})],c.prototype,"sourceNameToSource",void 0),h([y({readOnly:!0})],c.prototype,"primarySource",void 0),h([y({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],c.prototype,"styleUrl",null),h([ve(["portal-item","web-document"],"styleUrl")],c.prototype,"writeStyleUrl",null),h([y({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:R})],c.prototype,"tileInfo",null),h([y()],c.prototype,"tilemapCache",void 0),h([B("service","tilemapCache",["capabilities","tileInfo"])],c.prototype,"readTilemapCache",null),h([y({json:{read:!1},readOnly:!0,value:"vector-tile"})],c.prototype,"type",void 0),h([y({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],c.prototype,"url",void 0),h([y({readOnly:!0})],c.prototype,"version",void 0),h([B("version",["version","currentVersion"])],c.prototype,"readVersion",null),h([y({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],c.prototype,"path",void 0),c=h([be("esri.layers.VectorTileLayer")],c);const ut=c;export{ut as default}; diff --git a/build/assets/VertexAttribute-BlT9lbVY.js b/build/assets/VertexAttribute-BlT9lbVY.js new file mode 100644 index 0000000..e3d34b0 --- /dev/null +++ b/build/assets/VertexAttribute-BlT9lbVY.js @@ -0,0 +1 @@ +var O;(function(E){E.POSITION="position",E.NORMAL="normal",E.NORMALCOMPRESSED="normalCompressed",E.UV0="uv0",E.COLOR="color",E.SYMBOLCOLOR="symbolColor",E.SIZE="size",E.TANGENT="tangent",E.OFFSET="offset",E.PERSPECTIVEDIVIDE="perspectiveDivide",E.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",E.LENGTH="length",E.PREVPOSITION="prevPosition",E.NEXTPOSITION="nextPosition",E.SUBDIVISIONFACTOR="subdivisionFactor",E.COLORFEATUREATTRIBUTE="colorFeatureAttribute",E.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",E.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",E.DISTANCETOSTART="distanceToStart",E.UVMAPSPACE="uvMapSpace",E.BOUNDINGRECT="boundingRect",E.UVREGION="uvRegion",E.PROFILERIGHT="profileRight",E.PROFILEUP="profileUp",E.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",E.FEATUREVALUE="featureValue",E.INSTANCEMODELORIGINHI="instanceModelOriginHi",E.INSTANCEMODELORIGINLO="instanceModelOriginLo",E.INSTANCEMODEL="instanceModel",E.INSTANCEMODELNORMAL="instanceModelNormal",E.INSTANCECOLOR="instanceColor",E.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",E.LOCALTRANSFORM="localTransform",E.GLOBALTRANSFORM="globalTransform",E.BOUNDINGSPHERE="boundingSphere",E.MODELORIGIN="modelOrigin",E.MODELSCALEFACTORS="modelScaleFactors",E.FEATUREATTRIBUTE="featureAttribute",E.STATE="state",E.LODLEVEL="lodLevel",E.POSITION0="position0",E.POSITION1="position1",E.NORMAL2COMPRESSED="normal2Compressed",E.COMPONENTINDEX="componentIndex",E.VARIANTOFFSET="variantOffset",E.VARIANTSTROKE="variantStroke",E.VARIANTEXTENSION="variantExtension",E.SIDENESS="sideness",E.START="start",E.END="end",E.UP="up",E.EXTRUDE="extrude",E.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",E.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"})(O||(O={}));export{O as e}; diff --git a/build/assets/VertexElementDescriptor-BOD-G50G.js b/build/assets/VertexElementDescriptor-BOD-G50G.js new file mode 100644 index 0000000..3ef66ec --- /dev/null +++ b/build/assets/VertexElementDescriptor-BOD-G50G.js @@ -0,0 +1 @@ +class n{constructor(t,s,i,h,o,e=!1,r=0){this.name=t,this.count=s,this.type=i,this.offset=h,this.stride=o,this.normalized=e,this.divisor=r}}export{n as t}; diff --git a/build/assets/VideoLayer-BjkoUYhL.js b/build/assets/VideoLayer-BjkoUYhL.js new file mode 100644 index 0000000..4bd9ef2 --- /dev/null +++ b/build/assets/VideoLayer-BjkoUYhL.js @@ -0,0 +1,203 @@ +import{co as gn,B as R,D as B,E as Ye,F as fn,Q as Re,aX as yn,ax as yr,aS as on,d2 as So,bw as ll,U as Eo,hE as Cf,bk as Vh,ay as rr,hF as zh,aq as Pa,gg as kf,av as Bi,c2 as xf,bm as Wh,au as Da,V as If,bx as _r,fx as rc,bz as Af,c5 as ac,cq as Pf,cu as Df,cv as Lf,cG as Of,hG as Nf,d as Rf,s as Gh,aZ as Xh,cy as Mf,cE as Uf}from"./index-DKOmzAMm.js";import{t as Bf,e as Kh}from"./mat3f64-q3fE-ZOt.js";import{i as Ff,u as qf}from"./mat3-BNGRf_pC.js";import{w as La}from"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import{o as di,e as vr}from"./_commonjsHelpers-DCkdB7M8.js";let si=class extends gn(fn){constructor(t){super(t),this.framerate=null,this.containerFormat=null,this.gop=null,this.aspectRatio=null,this.klv=null}};R([B({type:String})],si.prototype,"framerate",void 0),R([B({type:String})],si.prototype,"containerFormat",void 0),R([B({type:Number})],si.prototype,"gop",void 0),R([B({type:String})],si.prototype,"aspectRatio",void 0),R([B({type:Object})],si.prototype,"klv",void 0),si=R([Ye("esri.layers.support.PlaybackInfo")],si);const jf=si;let ni=class extends gn(fn){constructor(t){super(t),this.frameCenter=null,this.frameOutline=null,this.lineOfSight=null,this.sensorLocation=null,this.sensorTrail=null}};R([B({type:Re})],ni.prototype,"frameCenter",void 0),R([B({type:yn})],ni.prototype,"frameOutline",void 0),R([B({type:yr})],ni.prototype,"lineOfSight",void 0),R([B({type:Re})],ni.prototype,"sensorLocation",void 0),R([B({type:yr})],ni.prototype,"sensorTrail",void 0),ni=R([Ye("esri.layers.support.TelemetryData")],ni);const wo=ni;let ri=class extends gn(fn){constructor(i){super(i),this.frameCenter=null,this.frameOutline=null,this.lineOfSight=null,this.sensorLocation=null,this.sensorTrail=null}};R([B({type:Boolean})],ri.prototype,"frameCenter",void 0),R([B({type:Boolean})],ri.prototype,"frameOutline",void 0),R([B({type:Boolean})],ri.prototype,"lineOfSight",void 0),R([B({type:Boolean})],ri.prototype,"sensorLocation",void 0),R([B({type:Boolean})],ri.prototype,"sensorTrail",void 0),ri=R([Ye("esri.layers.support.TelemetryDisplay")],ri);const oc=ri;let zs=class extends ll{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};function $f(i){return(i==null?void 0:i.sourcePoint)!=null&&i.mapPoint!=null}R([B()],zs.prototype,"sourcePoint",void 0),R([B({type:Re})],zs.prototype,"mapPoint",void 0),zs=R([Ye("esri.layers.support.VideoFrame.ControlPoint")],zs);let Si=class extends gn(fn){constructor(t){super(t),this.frame=null,this.controlPoints=null}readControlPoints(t){return t.map(e=>({sourcePoint:{x:e.frameX,y:e.frameY},mapPoint:new Re(e.point)}))}writeControlPoints(t,e){t!=null&&$f(t[0])&&(e.controlPoints=t.map(s=>{const n=s.sourcePoint,r=s.mapPoint;return{frameX:n.x,frameY:n.y,point:r.toJSON()}}))}};R([B({type:String})],Si.prototype,"frame",void 0),R([B({type:[zs],json:{write:{allowNull:!1,isRequired:!0}}})],Si.prototype,"controlPoints",void 0),R([on("controlPoints")],Si.prototype,"readControlPoints",null),R([So("controlPoints")],Si.prototype,"writeControlPoints",null),Si=R([Ye("esri.layers.support.VideoFrame")],Si);const Hf=Si;let zi=class extends EventTarget{constructor(){super(...arguments),this._readyState=0,this._responseType="",this.timeout=0,this._withCredentials=!1,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.onreadystatechange=null,this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this._abortController=null,this._error=null,this._options={},this._response=null,this._sendFlag=!1,this._url=""}get readyState(){return this._readyState}get response(){return this.responseType===""||this.responseType==="text"?this.responseText:this.readyState!==this.DONE||this._error||!this._response?null:this._response.data}get responseText(){var t;return this.responseType!==""&&this.responseType!=="text"&&this._throwDOMException(),this.readyState!==this.DONE?"":this._response?this._response.data:((t=this._error)==null?void 0:t.raw)!=null?typeof this._error.raw=="string"?this._error.raw:JSON.stringify(this._error.raw):""}get responseType(){return this._responseType}set responseType(t){(t!=="document"||globalThis instanceof Window)&&(this.readyState!==this.LOADING&&this.readyState!==this.DONE||this._throwDOMException(),this._responseType=t)}get responseURL(){var t;return((t=this._response||this._error)==null?void 0:t.url)??""}get responseXML(){var t;return this.responseType!==""&&this.responseType!=="document"&&this._throwDOMException(),this.readyState!==this.DONE?null:((t=this._response)==null?void 0:t.data)??null}get status(){var t;return((t=this._response||this._error)==null?void 0:t.httpStatus)??0}get statusText(){return""}get upload(){return console.warn("upload not implemented"),null}get withCredentials(){return this._withCredentials}set withCredentials(t){this.readyState!==this.UNSENT&&this.readyState!==this.OPENED&&this._throwDOMException(),this._withCredentials=t}abort(){var t;this.readyState===this.OPENED&&this._sendFlag||this.readyState===this.HEADERS_RECEIVED||this.readyState===this.LOADING?(this._sendFlag=!1,this._error=null,this._response=null,(t=this._abortController)==null||t.abort(),this._updateReadyState(this.DONE),this._dispatchProgressEvent("abort"),this._dispatchProgressEvent("loadend")):this.readyState===this.DONE&&this._updateReadyState(this.UNSENT)}getAllResponseHeaders(){var s,n;let t="";const e=(n=(s=this._response||this._error)==null?void 0:s.getAllHeaders)==null?void 0:n.call(s);if(e)for(const[r,a]of e)t+=`${r}: ${a}\r +`;return t}getResponseHeader(t){var e,s;return((s=(e=this._response||this._error)==null?void 0:e.getHeader)==null?void 0:s.call(e,t))??null}open(t,e){switch(this._sendFlag=!1,this._options={},t){case"GET":this._options.method="auto";break;case"POST":this._options.method="post";break;case"HEAD":this._options.method="head";break;case"DELETE":this._options.method="delete";break;case"PUT":this._options.method="put"}this._url=e,this._error=null,this._response=null,this._abortController=new AbortController,this._updateReadyState(this.OPENED)}overrideMimeType(t){throw new Error("overrideMimeType not implemented")}send(t){var s;(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._sendFlag=!0,this._updateReadyState(this.LOADING),this._dispatchProgressEvent("loadstart");const e=this._options;t instanceof URLSearchParams?e.body=t.toString():e.body=t,e.responseType=this.responseType===""?"text":this.responseType==="arraybuffer"?"array-buffer":this.responseType,e.signal=(s=this._abortController)==null?void 0:s.signal,this.timeout&&(e.timeout=this.timeout),this.withCredentials&&(e.withCredentials=!0),Eo(this._url,e).then(n=>{this._response=n,this._updateReadyState(this.DONE),this._dispatchProgressEvent("load")}).catch(n=>{this._sendFlag&&(this._error=n.details,this._updateReadyState(this.DONE),Cf(n)?this._dispatchProgressEvent("timeout"):n.name==="AbortError"?this._dispatchProgressEvent("abort"):this._dispatchProgressEvent("error"))}).finally(()=>{this._sendFlag&&this._dispatchProgressEvent("loadend")})}setRequestHeader(t,e){var s;(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),(s=this._options).headers??(s.headers={}),this._options.headers[t]=e}_dispatchProgressEvent(t){var s;const e=new ProgressEvent(t,{loaded:0,total:0});this.dispatchEvent(e),(s=this[`on${t}`])==null||s.call(this,e)}_throwDOMException(){throw new DOMException("","InvalidStateError")}_updateReadyState(t){var e;if(this._readyState!==t&&(this._readyState=t,t!==this.UNSENT)){const s=new Event("readystatechange");this.dispatchEvent(s),(e=this.onreadystatechange)==null||e.call(this,s)}}};zi.UNSENT=0,zi.OPENED=1,zi.HEADERS_RECEIVED=2,zi.LOADING=3,zi.DONE=4;let ye=class extends gn(fn){constructor(i){super(i),this.duration=null,this.end=null,this.start=null,this.timezone="UTC"}readEnd(i,t){return t.end!=null?new Date(t.end):null}writeEnd(i,t){t.end=i?i.getTime():null}readStart(i,t){return t.start!=null?new Date(t.start):null}writeStart(i,t){t.start=i?i.getTime():null}};R([B({type:Number,json:{write:{allowNull:!0}}})],ye.prototype,"duration",void 0),R([B({type:Date,json:{write:{allowNull:!0}}})],ye.prototype,"end",void 0),R([on("end")],ye.prototype,"readEnd",null),R([So("end")],ye.prototype,"writeEnd",null),R([B({type:Date,json:{write:{allowNull:!0}}})],ye.prototype,"start",void 0),R([on("start")],ye.prototype,"readStart",null),R([So("start")],ye.prototype,"writeStart",null),R([B({type:String})],ye.prototype,"timezone",void 0),ye=R([Ye("esri.layers.support.VideoTimeExtent")],ye);const Vf=ye,q={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function zf(i){const{duration:t,end:e,start:s,timezone:n="UTC"}=i||{};return typeof t!="number"?null:new Vf({duration:t||null,end:typeof e=="number"?new Date(e):null,start:typeof s=="number"?new Date(s):null,timezone:n})}function Wf(i,t){const e=[...t],s=e.findIndex(n=>n.equals(i));return s>-1&&e.splice(s),e.push(i),e}function Gf(i){if(!(i!=null&&i.size))return new wo;const t=sy(i),e=Yf(i),s=Zf(i),n=iy(t,e);return new wo({frameCenter:e,frameOutline:s,lineOfSight:n,sensorLocation:t})}function Xf(i){var t;return i!=null&&i.size?((t=i.get(q.EsriGroundControlPoints))==null?void 0:t.value)??null??null:null}function Kf(i){var t;return i!=null&&i.size?((t=i.get(q.EsriHorizonPixelPack))==null?void 0:t.value)??null:null}function Yf(i){return Qf(i)??Jf(i)}function Qf(i){return i&&i.has(q.EsriFrameCenterLatitude)&&i.has(q.EsriFrameCenterLongitude)?new Re({x:i.get(q.EsriFrameCenterLongitude).value,y:i.get(q.EsriFrameCenterLatitude).value,z:i.get(q.FrameCenterElevation).value}):null}function Jf(i){var t,e,s;return i&&i.has(q.FrameCenterLatitude)&&i.has(q.FrameCenterLongitude)?new Re({x:(t=i.get(q.FrameCenterLongitude))==null?void 0:t.value,y:(e=i.get(q.FrameCenterLatitude))==null?void 0:e.value,z:(s=i.get(q.FrameCenterElevation))==null?void 0:s.value}):null}function Zf(i){var e;if(!i)return null;const t=(e=i.get(q.EsriFrameOutline))==null?void 0:e.value;return t?yn.fromJSON(t.geometry):ty(i)??ey(i)}function ty(i){var r,a,l,u,p,g,y,T;if(!(i.has(q.EsriCornerLatitudePt1)&&i.has(q.EsriCornerLongitudePt1)&&i.has(q.EsriCornerLatitudePt2)&&i.has(q.EsriCornerLongitudePt2)&&i.has(q.EsriCornerLatitudePt3)&&i.has(q.EsriCornerLongitudePt3)&&i.has(q.EsriCornerLatitudePt4)&&i.has(q.EsriCornerLongitudePt4)))return null;const t=[(r=i.get(q.EsriCornerLongitudePt1))==null?void 0:r.value,(a=i.get(q.EsriCornerLatitudePt1))==null?void 0:a.value],e=[(l=i.get(q.EsriCornerLongitudePt2))==null?void 0:l.value,(u=i.get(q.EsriCornerLatitudePt2))==null?void 0:u.value],s=[(p=i.get(q.EsriCornerLongitudePt3))==null?void 0:p.value,(g=i.get(q.EsriCornerLatitudePt3))==null?void 0:g.value],n=[(y=i.get(q.EsriCornerLongitudePt4))==null?void 0:y.value,(T=i.get(q.EsriCornerLatitudePt4))==null?void 0:T.value];return new yn({rings:[[t,e,s,n]]})}function ey(i){var y,T,w,_,k,x,A,I,O,N;if(!(i.has(q.OffsetCorner1Latitude)&&i.has(q.OffsetCorner1Longitude)&&i.has(q.OffsetCorner2Latitude)&&i.has(q.OffsetCorner2Longitude)&&i.has(q.OffsetCorner3Latitude)&&i.has(q.OffsetCorner3Longitude)&&i.has(q.OffsetCorner4Latitude)&&i.has(q.OffsetCorner4Longitude)&&i.has(q.FrameCenterLatitude)&&i.has(q.FrameCenterLongitude)))return null;const t=(y=i.get(q.FrameCenterLatitude))==null?void 0:y.value,e=(T=i.get(q.FrameCenterLongitude))==null?void 0:T.value,s=t+((w=i.get(q.OffsetCorner1Latitude))==null?void 0:w.value),n=e+((_=i.get(q.OffsetCorner1Longitude))==null?void 0:_.value),r=t+((k=i.get(q.OffsetCorner2Latitude))==null?void 0:k.value),a=e+((x=i.get(q.OffsetCorner2Longitude))==null?void 0:x.value),l=t+((A=i.get(q.OffsetCorner3Latitude))==null?void 0:A.value),u=e+((I=i.get(q.OffsetCorner3Longitude))==null?void 0:I.value),p=t+((O=i.get(q.OffsetCorner4Latitude))==null?void 0:O.value),g=e+((N=i.get(q.OffsetCorner4Longitude))==null?void 0:N.value);return new yn({rings:[[[n,s],[a,r],[u,l],[g,p]]]})}function iy(i,t){if(!i||!t)return null;const e=[i.x,i.y,i.z],s=[t.x,t.y,t.z];return new yr({paths:[[e,s]]})}function sy(i){var t,e,s,n;if(!(i!=null&&i.size))return null;if(i.has(q.EsriSensorPosition)){const r=(t=i.get(q.EsriSensorPosition))==null?void 0:t.value;if(r)return Re.fromJSON(r.geometry)}return i.has(q.SensorLongitude)&&i.has(q.SensorLatitude)&&i.has(q.SensorTrueAltitude)?new Re({x:(e=i.get(q.SensorLongitude))==null?void 0:e.value,y:(s=i.get(q.SensorLatitude))==null?void 0:s.value,z:(n=i.get(q.SensorTrueAltitude))==null?void 0:n.value}):null}const zt=Math.PI/180;let At=class extends ll{constructor(t){super(),this.averageElevation=0,this.imageHeight=0,this.imageWidth=0,this.metadataSupportsTransforms=!1,this.platformHeadingAngle=0,this.platformPitchAngle=0,this.platformRollAngle=0,this.sensorHeadingAngle=0,this.sensorAltitude=0,this.sensorHorizontalFieldOfView=0,this.sensorLatitude=0,this.sensorLongitude=0,this.sensorPitchAngle=0,this.sensorRollAngle=0,this.sensorVerticalFieldOfView=0,this.vttMetadata=new Map,this._createMat3FromValues=s=>{const n=s[0],r=s[1],a=s[2];return Bf(n[0],r[0],a[0],n[1],r[1],a[1],n[2],r[2],a[2])},this._multiplyMat3=(s,n)=>{const r=Kh();return Ff(r,s,n),r},this._transposeMat3=s=>{const n=Kh();return qf(n,s),n},this._calculateCameraFovForward=()=>this._createMat3FromValues([[0,0,1],[Math.tan(.5*this.sensorHorizontalFieldOfView*zt),0,0],[0,Math.tan(.5*this.sensorVerticalFieldOfView*zt),0]]),this._calculateCameraFovReverse=()=>this._createMat3FromValues([[0,1/Math.tan(.5*this.sensorHorizontalFieldOfView*zt),0],[0,0,1/Math.tan(.5*this.sensorVerticalFieldOfView*zt)],[1,0,0]]),this._calculateCameraLook=()=>this._getRotationMatrixZYX(this.sensorHeadingAngle*zt,this.sensorPitchAngle*zt,this.sensorRollAngle*zt),this._calculateImageDimensionsForward=()=>this._createMat3FromValues([[2/this.imageWidth,0,-1],[0,-2/this.imageHeight,-1],[0,0,1]]),this._calculateImageDimensionsReverse=()=>this._createMat3FromValues([[this.imageWidth/2,0,this.imageWidth/2],[0,-this.imageHeight/2,-this.imageHeight/2],[0,0,1]]),this._calculatePlatformPositionMatrix=()=>{const s=Math.sin(this.sensorLatitude*zt),n=Math.cos(this.sensorLatitude*zt),r=Math.sin(this.sensorLongitude*zt),a=Math.cos(this.sensorLongitude*zt);return this._createMat3FromValues([[-s*a,-r,-n*a],[-s*r,a,-n*r],[n,0,-s]])},this._calculatePlatformOrientation=()=>this._getRotationMatrixZYX(this.platformHeadingAngle*zt,this.platformPitchAngle*zt,this.platformRollAngle*zt),this._extractValues=s=>{var r,a,l,u,p,g,y,T,w,_,k,x,A,I,O;this.imageWidth=(r=s.get(q.EsriVideoWidth))==null?void 0:r.value,this.imageHeight=(a=s.get(q.EsriVideoHeight))==null?void 0:a.value;const n=(l=s.get(q.SensorEllipsoidHeight))==null?void 0:l.value;this.sensorAltitude=n??((u=s.get(q.SensorTrueAltitude))==null?void 0:u.value),this.sensorLatitude=(p=s.get(q.SensorLatitude))==null?void 0:p.value,this.sensorLongitude=(g=s.get(q.SensorLongitude))==null?void 0:g.value,this.sensorHeadingAngle=(y=s.get(q.SensorAzimuthAngle))==null?void 0:y.value,this.sensorPitchAngle=(T=s.get(q.SensorElevationAngle))==null?void 0:T.value,this.sensorRollAngle=(w=s.get(q.SensorRollAngle))==null?void 0:w.value,this.sensorHorizontalFieldOfView=(_=s.get(q.SensorHorizontalFOV))==null?void 0:_.value,this.sensorVerticalFieldOfView=(k=s.get(q.SensorVerticalFOV))==null?void 0:k.value,this.platformHeadingAngle=(x=s.get(q.PlatformHeadingAngle))==null?void 0:x.value,this.platformPitchAngle=(A=s.get(q.PlatformPitchAngle))==null?void 0:A.value,this.platformRollAngle=(I=s.get(q.PlatformRollAngle))==null?void 0:I.value,this.averageElevation=((O=s.get(q.FrameCenterElevation))==null?void 0:O.value)||0},this._getRotationMatrixZYX=(s,n,r)=>{const a=Math.cos(s),l=Math.sin(s),u=Math.cos(n),p=Math.sin(n),g=Math.cos(r),y=Math.sin(r);return this._createMat3FromValues([[a*u,a*p*y-g*l,l*y+a*g*p],[u*l,a*g+l*p*y,g*l*p-a*y],[-p,u*y,u*g]])},this._initCameraSensor=()=>{const s=this._calculateCameraFovForward(),n=this._calculateCameraFovReverse(),r=this._calculateCameraLook(),a=this._calculateImageDimensionsForward(),l=this._calculateImageDimensionsReverse(),u=this._calculatePlatformPositionMatrix(),p=this._calculatePlatformOrientation(),g=this._multiplyMat3(this._multiplyMat3(u,p),r);this._imageToEarthTransform=this._multiplyMat3(this._multiplyMat3(g,s),a);const y=this._multiplyMat3(l,n);this._earthToImageTransform=this._multiplyMat3(y,this._transposeMat3(g)),this._platformPositionEcef=this._projectPointToECEF(this.sensorLongitude,this.sensorLatitude,this.sensorAltitude||this.averageElevation)},this._metadataSupportsTransforms=s=>{var I,O,N,P,F,$,dt,Z,ct,st,pt,tt,Nt,et;if(!(s!=null&&s.size))return!1;const n=((I=s.get(q.EsriVideoWidth))==null?void 0:I.value)??0,r=((O=s.get(q.EsriVideoHeight))==null?void 0:O.value)??0;if(n<=0||r<=0)return!1;const a=(N=s.get(q.SensorEllipsoidHeight))==null?void 0:N.value,l=(P=s.get(q.SensorTrueAltitude))==null?void 0:P.value,u=(F=s.get(q.SensorLatitude))==null?void 0:F.value,p=($=s.get(q.SensorLongitude))==null?void 0:$.value;if(a==null&&l==null||u==null||p==null)return!1;const g=(dt=s.get(q.PlatformHeadingAngle))==null?void 0:dt.value,y=(Z=s.get(q.PlatformPitchAngle))==null?void 0:Z.value,T=(ct=s.get(q.PlatformRollAngle))==null?void 0:ct.value;if(g==null||y==null||T==null)return!1;const w=(st=s.get(q.SensorHorizontalFOV))==null?void 0:st.value,_=(pt=s.get(q.SensorVerticalFOV))==null?void 0:pt.value;if(w==null||_==null)return!1;const k=(tt=s.get(q.SensorAzimuthAngle))==null?void 0:tt.value,x=(Nt=s.get(q.SensorElevationAngle))==null?void 0:Nt.value,A=(et=s.get(q.SensorRollAngle))==null?void 0:et.value;return k!=null&&x!=null&&A!=null},this._projectPointToECEF=(s,n,r)=>{const a=[];return Vh([s,n,r],rr.WGS84,0,a,La,0,1),new Re({x:a[0],y:a[1],z:a[2],spatialReference:La})},this._projectImageVectorToEllipsoid=(s,n)=>{const r=zh.semiMajorAxis+n,a=zh.semiMinorAxis+n,l=a/r,u=r/a,{x:p,y:g,z:y}=this._platformPositionEcef,T=y??this.averageElevation,w=Bi(p,g,u*T),_=Pa(s,s),k=Pa(s,w),x=Pa(w,w)-r*r,A=(-k-Math.sqrt(k*k-_*x))/_;if(A<0)return[NaN,NaN,NaN];const I=Da();return kf(I,w,s,A),I[2]=I[2]*l,I};const e=t==null?void 0:t.videoMetadata;this._set("metadataSupportsTransforms",this._metadataSupportsTransforms(e)),this.metadataSupportsTransforms&&(this._extractValues(e),this._initCameraSensor())}transformGeoToImage(t,e,s){const n=this._platformPositionEcef;if(!n)return[0,0];const{x:r,y:a,z:l}=n,u=Bi(r,a,l),p=this._projectPointToECEF(t,e,s||this.averageElevation),g=Da(),y=Bi(p.x,p.y,p.z);xf(g,y,u),Wh(g,g,this._earthToImageTransform);const T=g[0],w=g[1],_=g[2];let k=Bi(NaN,NaN,NaN);return isNaN(_)||(k=Bi(T/_,w/_,_/_)),[k[0],k[1]]}transformImageToGeo(t,e){const s=Bi(t,e,1),n=Da();Wh(n,s,this._imageToEarthTransform);const r=this._projectImageVectorToEllipsoid(n,this.averageElevation);let a;if(!isNaN(r[0])){const l=[];Vh([r[0],r[1],r[2]],La,0,l,rr.WGS84,0,1),a=new Re({x:l[0],y:l[1],z:l[2],spatialReference:rr.WGS84})}return a}};R([B()],At.prototype,"averageElevation",void 0),R([B()],At.prototype,"imageHeight",void 0),R([B()],At.prototype,"imageWidth",void 0),R([B({readOnly:!0})],At.prototype,"metadataSupportsTransforms",void 0),R([B()],At.prototype,"platformHeadingAngle",void 0),R([B()],At.prototype,"platformPitchAngle",void 0),R([B()],At.prototype,"platformRollAngle",void 0),R([B()],At.prototype,"sensorHeadingAngle",void 0),R([B()],At.prototype,"sensorAltitude",void 0),R([B()],At.prototype,"sensorHorizontalFieldOfView",void 0),R([B()],At.prototype,"sensorLatitude",void 0),R([B()],At.prototype,"sensorLongitude",void 0),R([B()],At.prototype,"sensorPitchAngle",void 0),R([B()],At.prototype,"sensorRollAngle",void 0),R([B()],At.prototype,"sensorVerticalFieldOfView",void 0),R([B()],At.prototype,"vttMetadata",void 0),At=R([Ye("esri.layers.video.VideoCameraSensorModel")],At);const ny=At;var $r=typeof window<"u"?window:vr!==void 0?vr:typeof self<"u"?self:{};const E=di($r);var Yh=Array.prototype.slice,lc=ry;function ry(i,t){for(("length"in i)||(i=[i]),i=Yh.call(i);i.length;){var e=i.shift(),s=t(e);if(s)return s;e.childNodes&&e.childNodes.length&&(i=Yh.call(e.childNodes).concat(i))}}var ay=ts;function ts(i,t){if(!(this instanceof ts))return new ts(i,t);this.data=i,this.nodeValue=i,this.length=i.length,this.ownerDocument=t||null}ts.prototype.nodeType=8,ts.prototype.nodeName="#comment",ts.prototype.toString=function(){return"[object Comment]"};var oy=li;function li(i,t){if(!(this instanceof li))return new li(i);this.data=i||"",this.length=this.data.length,this.ownerDocument=t||null}li.prototype.type="DOMTextNode",li.prototype.nodeType=3,li.prototype.nodeName="#text",li.prototype.toString=function(){return this.data},li.prototype.replaceData=function(i,t,e){var s=this.data,n=s.substring(0,i),r=s.substring(i+t,s.length);this.data=n+e+r,this.length=this.data.length};var hc=ly;function ly(i){var t=this,e=i.type;i.target||(i.target=t),t.listeners||(t.listeners={});var s=t.listeners[e];if(s)return s.forEach(function(n){i.currentTarget=t,typeof n=="function"?n(i):n.handleEvent(i)});t.parentNode&&t.parentNode.dispatchEvent(i)}var uc=hy;function hy(i,t){var e=this;e.listeners||(e.listeners={}),e.listeners[i]||(e.listeners[i]=[]),e.listeners[i].indexOf(t)===-1&&e.listeners[i].push(t)}var dc=uy;function uy(i,t){var e=this;if(e.listeners&&e.listeners[i]){var s=e.listeners[i],n=s.indexOf(t);n!==-1&&s.splice(n,1)}}var dy=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function cc(i){switch(i.nodeType){case 3:return hl(i.data);case 8:return"";default:return cy(i)}}function cy(i){var t=[],e=i.tagName;return i.namespaceURI==="http://www.w3.org/1999/xhtml"&&(e=e.toLowerCase()),t.push("<"+e+fy(i)+gy(i)),dy.indexOf(e)>-1?t.push(" />"):(t.push(">"),i.childNodes.length?t.push.apply(t,i.childNodes.map(cc)):i.textContent||i.innerText?t.push(hl(i.textContent||i.innerText)):i.innerHTML&&t.push(i.innerHTML),t.push("")),t.join("")}function py(i,t){var e=typeof i[t];return t==="style"&&Object.keys(i.style).length>0||i.hasOwnProperty(t)&&(e==="string"||e==="boolean"||e==="number")&&t!=="nodeName"&&t!=="className"&&t!=="tagName"&&t!=="textContent"&&t!=="innerText"&&t!=="namespaceURI"&&t!=="innerHTML"}function my(i){if(typeof i=="string")return i;var t="";return Object.keys(i).forEach(function(e){var s=i[e];e=e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()}),t+=e+":"+s+";"}),t}function gy(i){var t=i.dataset,e=[];for(var s in t)e.push({name:"data-"+s,value:t[s]});return e.length?pc(e):""}function pc(i){var t=[];return i.forEach(function(e){var s=e.name,n=e.value;s==="style"&&(n=my(n)),t.push(s+'="'+yy(n)+'"')}),t.length?" "+t.join(" "):""}function fy(i){var t=[];for(var e in i)py(i,e)&&t.push({name:e,value:i[e]});for(var s in i._attributes)for(var n in i._attributes[s]){var r=i._attributes[s][n],a=(r.prefix?r.prefix+":":"")+n;t.push({name:a,value:r.value})}return i.className&&t.push({name:"class",value:i.className}),t.length?pc(t):""}function hl(i){var t="";return typeof i=="string"?t=i:i&&(t=i.toString()),t.replace(/&/g,"&").replace(//g,">")}function yy(i){return hl(i).replace(/"/g,""")}var Oa=lc,_y=hc,vy=uc,by=dc,Ty=cc,Qh="http://www.w3.org/1999/xhtml",mc=gt;function gt(i,t,e){if(!(this instanceof gt))return new gt(i);var s=e===void 0?Qh:e||null;this.tagName=s===Qh?String(i).toUpperCase():i,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=s,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}gt.prototype.type="DOMElement",gt.prototype.nodeType=1,gt.prototype.appendChild=function(i){return i.parentNode&&i.parentNode.removeChild(i),this.childNodes.push(i),i.parentNode=this,i},gt.prototype.replaceChild=function(i,t){i.parentNode&&i.parentNode.removeChild(i);var e=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[e]=i,i.parentNode=this,t},gt.prototype.removeChild=function(i){var t=this.childNodes.indexOf(i);return this.childNodes.splice(t,1),i.parentNode=null,i},gt.prototype.insertBefore=function(i,t){i.parentNode&&i.parentNode.removeChild(i);var e=t==null?-1:this.childNodes.indexOf(t);return e>-1?this.childNodes.splice(e,0,i):this.childNodes.push(i),i.parentNode=this,i},gt.prototype.setAttributeNS=function(i,t,e){var s=null,n=t,r=t.indexOf(":");r>-1&&(s=t.substr(0,r),n=t.substr(r+1)),this.tagName==="INPUT"&&t==="type"?this.type=e:(this._attributes[i]||(this._attributes[i]={}))[n]={value:e,prefix:s}},gt.prototype.getAttributeNS=function(i,t){var e=this._attributes[i],s=e&&e[t]&&e[t].value;return this.tagName==="INPUT"&&t==="type"?this.type:typeof s!="string"?null:s},gt.prototype.removeAttributeNS=function(i,t){var e=this._attributes[i];e&&delete e[t]},gt.prototype.hasAttributeNS=function(i,t){var e=this._attributes[i];return!!e&&t in e},gt.prototype.setAttribute=function(i,t){return this.setAttributeNS(null,i,t)},gt.prototype.getAttribute=function(i){return this.getAttributeNS(null,i)},gt.prototype.removeAttribute=function(i){return this.removeAttributeNS(null,i)},gt.prototype.hasAttribute=function(i){return this.hasAttributeNS(null,i)},gt.prototype.removeEventListener=by,gt.prototype.addEventListener=vy,gt.prototype.dispatchEvent=_y,gt.prototype.focus=function(){},gt.prototype.toString=function(){return Ty(this)},gt.prototype.getElementsByClassName=function(i){var t=i.split(" "),e=[];return Oa(this,function(s){if(s.nodeType===1){var n=(s.className||"").split(" ");t.every(function(r){return n.indexOf(r)!==-1})&&e.push(s)}}),e},gt.prototype.getElementsByTagName=function(i){i=i.toLowerCase();var t=[];return Oa(this.childNodes,function(e){e.nodeType!==1||i!=="*"&&e.tagName.toLowerCase()!==i||t.push(e)}),t},gt.prototype.contains=function(i){return Oa(this,function(t){return i===t})||!1};var Na=mc,Sy=Ee;function Ee(i){if(!(this instanceof Ee))return new Ee;this.childNodes=[],this.parentNode=null,this.ownerDocument=i||null}Ee.prototype.type="DocumentFragment",Ee.prototype.nodeType=11,Ee.prototype.nodeName="#document-fragment",Ee.prototype.appendChild=Na.prototype.appendChild,Ee.prototype.replaceChild=Na.prototype.replaceChild,Ee.prototype.removeChild=Na.prototype.removeChild,Ee.prototype.toString=function(){return this.childNodes.map(function(i){return String(i)}).join("")};var Ey=Co;function Co(i){}Co.prototype.initEvent=function(i,t,e){this.type=i,this.bubbles=t,this.cancelable=e},Co.prototype.preventDefault=function(){};var wy=lc,Cy=ay,ky=oy,Ns=mc,xy=Sy,Iy=Ey,Ay=hc,Py=uc,Dy=dc,Ly=br;function br(){if(!(this instanceof br))return new br;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var te=br.prototype;te.createTextNode=function(i){return new ky(i,this)},te.createElementNS=function(i,t){var e=i===null?null:String(i);return new Ns(t,this,e)},te.createElement=function(i){return new Ns(i,this)},te.createDocumentFragment=function(){return new xy(this)},te.createEvent=function(i){return new Iy},te.createComment=function(i){return new Cy(i,this)},te.getElementById=function(i){return i=String(i),wy(this.childNodes,function(t){if(String(t.id)===i)return t})||null},te.getElementsByClassName=Ns.prototype.getElementsByClassName,te.getElementsByTagName=Ns.prototype.getElementsByTagName,te.contains=Ns.prototype.contains,te.removeEventListener=Dy,te.addEventListener=Py,te.dispatchEvent=Ay;var ar,Oy=new Ly,Jh=vr!==void 0?vr:typeof window<"u"?window:{},Ny=Oy;typeof document<"u"?ar=document:(ar=Jh["__GLOBAL_DOCUMENT_CACHE@4"])||(ar=Jh["__GLOBAL_DOCUMENT_CACHE@4"]=Ny);var gc=ar;const j=di(gc);var ko={exports:{}};(function(i,t){function e(u){if(u&&typeof u=="object"){var p=u.which||u.keyCode||u.charCode;p&&(u=p)}if(typeof u=="number")return a[u];var g,y=String(u);return(g=s[y.toLowerCase()])?g:(g=n[y.toLowerCase()])||(y.length===1?y.charCodeAt(0):void 0)}e.isEventKey=function(u,p){if(u&&typeof u=="object"){var g=u.which||u.keyCode||u.charCode;if(g==null)return!1;if(typeof p=="string"){var y;if((y=s[p.toLowerCase()])||(y=n[p.toLowerCase()]))return y===g}else if(typeof p=="number")return p===g;return!1}};var s=(t=i.exports=e).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)s[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)s[r-48]=r;for(r=1;r<13;r++)s["f"+r]=r+111;for(r=0;r<10;r++)s["numpad "+r]=r+96;var a=t.names=t.title={};for(r in s)a[s[r]]=r;for(var l in n)s[l]=n[l]})(ko,ko.exports);const X=di(ko.exports);function Ry(i,t){var e,s=null;try{e=JSON.parse(i,t)}catch(n){s=n}return[s,e]}const My=di(Ry);var xo={exports:{}},fc={exports:{}};(function(i){function t(){return i.exports=t=Object.assign?Object.assign.bind():function(e){for(var s=1;s=400&&s.statusCode<=599){var r=n;if(t)if(jy.TextDecoder){var a=$y(s.headers&&s.headers["content-type"]);try{r=new TextDecoder(a).decode(n)}catch{}}else r=String.fromCharCode.apply(null,new Uint8Array(n));i({cause:r})}else i(null,n)}},Zh=$r,Vy=Uy,zy=By;we.httpHandler=Hy;var Wy=function(i){var t={};return i&&i.trim().split(` +`).forEach(function(e){var s=e.indexOf(":"),n=e.slice(0,s).trim().toLowerCase(),r=e.slice(s+1).trim();t[n]===void 0?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]}),t};function Gy(i,t){for(var e=0;e0&&(g=setTimeout(function(){if(!u){u=!0,p.abort("timeout");var I=new Error("XMLHttpRequest timeout");I.code="ETIMEDOUT",r(I)}},i.timeout)),p.setRequestHeader)for(l in _)_.hasOwnProperty(l)&&p.setRequestHeader(l,_[l]);else if(i.headers&&!Xy(i.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in i&&(p.responseType=i.responseType),"beforeSend"in i&&typeof i.beforeSend=="function"&&i.beforeSend(p),p.send(w||null),p}function Ky(i){try{if(i.responseType==="document")return i.responseXML;var t=i.responseXML&&i.responseXML.documentElement.nodeName==="parsererror";if(i.responseType===""&&!t)return i.responseXML}catch{}return null}function Yy(){}xo.exports=we,xo.exports.default=we,we.XMLHttpRequest=Zh.XMLHttpRequest||Yy,we.XDomainRequest="withCredentials"in new we.XMLHttpRequest?we.XMLHttpRequest:Zh.XDomainRequest,Gy(["get","put","post","patch","head","delete"],function(i){we[i==="delete"?"del":i]=function(t,e,s){return(e=yc(t,e,s)).method=i.toUpperCase(),_c(e)}});const vc=di(xo.exports);var bc={exports:{}},tu=gc,ul=Object.create||function(){function i(){}return function(t){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return i.prototype=t,new i}}();function ne(i,t){this.name="ParsingError",this.code=i.code,this.message=t||i.message}function dl(i){function t(s,n,r,a){return 3600*(0|s)+60*(0|n)+(0|r)+(0|a)/1e3}var e=i.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return e?e[3]?t(e[1],e[2],e[3].replace(":",""),e[4]):e[1]>59?t(e[1],e[2],0,e[4]):t(0,e[1],e[2],e[4]):null}function Js(){this.values=ul(null)}function Ws(i,t,e,s){var n=s?i.split(s):[i];for(var r in n)if(typeof n[r]=="string"){var a=n[r].split(e);a.length===2&&t(a[0].trim(),a[1].trim())}}function Qy(i,t,e){var s=i;function n(){var l=dl(i);if(l===null)throw new ne(ne.Errors.BadTimeStamp,"Malformed timestamp: "+s);return i=i.replace(/^[^\sa-zA-Z-]+/,""),l}function r(l,u){var p=new Js;Ws(l,function(g,y){switch(g){case"region":for(var T=e.length-1;T>=0;T--)if(e[T].id===y){p.set(g,e[T].region);break}break;case"vertical":p.alt(g,y,["rl","lr"]);break;case"line":var w=y.split(","),_=w[0];p.integer(g,_),p.percent(g,_)&&p.set("snapToLines",!1),p.alt(g,_,["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start","center","end"]);break;case"position":w=y.split(","),p.percent(g,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start","center","end"]);break;case"size":p.percent(g,y);break;case"align":p.alt(g,y,["start","center","end","left","right"])}},/:/,/\s/),u.region=p.get("region",null),u.vertical=p.get("vertical","");try{u.line=p.get("line","auto")}catch{}u.lineAlign=p.get("lineAlign","start"),u.snapToLines=p.get("snapToLines",!0),u.size=p.get("size",100);try{u.align=p.get("align","center")}catch{u.align=p.get("align","middle")}try{u.position=p.get("position","auto")}catch{u.position=p.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},u.align)}u.positionAlign=p.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},u.align)}function a(){i=i.replace(/^\s+/,"")}if(a(),t.startTime=n(),a(),i.substr(0,3)!=="-->")throw new ne(ne.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+s);i=i.substr(3),a(),t.endTime=n(),a(),r(i,t)}ne.prototype=ul(Error.prototype),ne.prototype.constructor=ne,ne.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Js.prototype={set:function(i,t){this.get(i)||t===""||(this.values[i]=t)},get:function(i,t,e){return e?this.has(i)?this.values[i]:t[e]:this.has(i)?this.values[i]:t},has:function(i){return i in this.values},alt:function(i,t,e){for(var s=0;s=0&&t<=100)&&(this.set(i,t),!0)}};var Ra=tu.createElement&&tu.createElement("textarea"),Jy={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},eu={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Zy={v:"title",lang:"lang"},iu={rt:"ruby"};function Tc(i,t){function e(){if(!t)return null;function _(x){return t=t.substr(x.length),x}var k=t.match(/^([^<]*)(<[^>]*>?)?/);return _(k[1]?k[1]:k[2])}function s(_){return Ra.innerHTML=_,_=Ra.textContent,Ra.textContent="",_}function n(_,k){return!iu[k.localName]||iu[k.localName]===_.localName}function r(_,k){var x=Jy[_];if(!x)return null;var A=i.document.createElement(x),I=Zy[_];return I&&k&&(A[I]=k.trim()),A}for(var a,l=i.document.createElement("div"),u=l,p=[];(a=e())!==null;)if(a[0]!=="<")u.appendChild(i.document.createTextNode(s(a)));else{if(a[1]==="/"){p.length&&p[p.length-1]===a.substr(2).replace(">","")&&(p.pop(),u=u.parentNode);continue}var g,y=dl(a.substr(1,a.length-2));if(y){g=i.document.createProcessingInstruction("timestamp",y),u.appendChild(g);continue}var T=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!T||!(g=r(T[1],T[3]))||!n(u,g))continue;if(T[2]){var w=T[2].split(".");w.forEach(function(_){var k=/^bg_/.test(_),x=k?_.slice(3):_;if(eu.hasOwnProperty(x)){var A=k?"background-color":"color",I=eu[x];g.style[A]=I}}),g.className=w.join(" ")}p.push(T[1]),u.appendChild(g),u=g}return l}var su=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function t_(i){for(var t=0;t=e[0]&&i<=e[1])return!0}return!1}function e_(i){var t=[],e="";if(!i||!i.childNodes)return"ltr";function s(a,l){for(var u=l.childNodes.length-1;u>=0;u--)a.push(l.childNodes[u])}function n(a){if(!a||!a.length)return null;var l=a.pop(),u=l.textContent||l.innerText;if(u){var p=u.match(/^.*(\n|\r)/);return p?(a.length=0,p[0]):u}return l.tagName==="ruby"?n(a):l.childNodes?(s(a,l),n(a)):void 0}for(s(t,i);e=n(t);)for(var r=0;r=0&&i.line<=100))return i.line;if(!i.track||!i.track.textTrackList||!i.track.textTrackList.mediaElement)return-1;for(var t=i.track,e=t.textTrackList,s=0,n=0;nF&&(I=new qt(x),N=F),x=new qt(O)}return I||O}var r=new qt(t),a=t.cue,l=i_(a),u=[];if(a.snapToLines){var p;switch(a.vertical){case"":u=["+y","-y"],p="height";break;case"rl":u=["+x","-x"],p="width";break;case"lr":u=["-x","+x"],p="width"}var g=r.lineHeight,y=g*Math.round(l),T=e[p]+g,w=u[0];Math.abs(y)>T&&(y=y<0?-1:1,y*=Math.ceil(T/g)*g),l<0&&(y+=a.vertical===""?e.height:e.width,u=u.reverse()),r.move(w,y)}else{var _=r.lineHeight/e.height*100;switch(a.lineAlign){case"center":l-=_/2;break;case"end":l-=_}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(l,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(l,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(l,"%")})}u=["+y","-x","+x","-y"],r=new qt(t)}var k=n(r,u);t.move(k.toCSSCompatValues(e))}function es(){}or.prototype.applyStyles=function(i,t){for(var e in t=t||this.div,i)i.hasOwnProperty(e)&&(t.style[e]=i[e])},or.prototype.formatStyle=function(i,t){return i===0?0:i+t},lr.prototype=ul(or.prototype),lr.prototype.constructor=lr,qt.prototype.move=function(i,t){switch(t=t!==void 0?t:this.lineHeight,i){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},qt.prototype.overlaps=function(i){return this.lefti.left&&this.topi.top},qt.prototype.overlapsAny=function(i){for(var t=0;t=i.top&&this.bottom<=i.bottom&&this.left>=i.left&&this.right<=i.right},qt.prototype.overlapsOppositeAxis=function(i,t){switch(t){case"+x":return this.lefti.right;case"+y":return this.topi.bottom}},qt.prototype.intersectPercentage=function(i){return Math.max(0,Math.min(this.right,i.right)-Math.max(this.left,i.left))*Math.max(0,Math.min(this.bottom,i.bottom)-Math.max(this.top,i.top))/(this.height*this.width)},qt.prototype.toCSSCompatValues=function(i){return{top:this.top-i.top,bottom:i.bottom-this.bottom,left:this.left-i.left,right:i.right-this.right,height:this.height,width:this.width}},qt.getSimpleBoxPosition=function(i){var t=i.div?i.div.offsetHeight:i.tagName?i.offsetHeight:0,e=i.div?i.div.offsetWidth:i.tagName?i.offsetWidth:0,s=i.div?i.div.offsetTop:i.tagName?i.offsetTop:0;return{left:(i=i.div?i.div.getBoundingClientRect():i.tagName?i.getBoundingClientRect():i).left,right:i.right,top:i.top||s,height:i.height||t,bottom:i.bottom||s+(i.height||t),width:i.width||e}},es.StringDecoder=function(){return{decode:function(i){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))}}},es.convertCueToDOMTree=function(i,t){return i&&t?Tc(i,t):null};var n_=.05,r_="sans-serif",a_="1.5%";es.processCues=function(i,t,e){if(!i||!t||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var s=i.document.createElement("div");function n(p){for(var g=0;g")===-1){t.cue.id=a;continue}case"CUE":try{Qy(a,t.cue,t.regionList)}catch(g){t.reportOrThrowError(g),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var p=a.indexOf("-->")!==-1;if(!a||p&&(u=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+=` +`),t.cue.text+=a.replace(/\u2028/g,` +`).replace(/u2029/g,` +`);continue;case"BADCUE":a||(t.state="ID");continue}}}catch(g){t.reportOrThrowError(g),t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var i=this;try{if(i.buffer+=i.decoder.decode(),(i.cue||i.state==="HEADER")&&(i.buffer+=` + +`,i.parse()),i.state==="INITIAL")throw new ne(ne.Errors.BadSignature)}catch(t){i.reportOrThrowError(t)}return i.onflush&&i.onflush(),this}};var o_=es,l_="auto",h_={"":1,lr:1,rl:1},u_={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function d_(i){return typeof i=="string"&&!!h_[i.toLowerCase()]&&i.toLowerCase()}function Ma(i){return typeof i=="string"&&!!u_[i.toLowerCase()]&&i.toLowerCase()}function Sc(i,t,e){this.hasBeenReset=!1;var s="",n=!1,r=i,a=t,l=e,u=null,p="",g=!0,y="auto",T="start",w="auto",_="auto",k=100,x="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(A){s=""+A}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(A){n=!!A}},startTime:{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number")throw new TypeError("Start time must be set to a number.");r=A,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(A){if(typeof A!="number")throw new TypeError("End time must be set to a number.");a=A,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(A){l=""+A,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(A){u=A,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return p},set:function(A){var I=d_(A);if(I===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");p=I,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return g},set:function(A){g=!!A,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return y},set:function(A){if(typeof A!="number"&&A!==l_)throw new SyntaxError("Line: an invalid number or illegal string was specified.");y=A,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return T},set:function(A){var I=Ma(A);I?(T=I,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return w},set:function(A){if(A<0||A>100)throw new Error("Position must be between 0 and 100.");w=A,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return _},set:function(A){var I=Ma(A);I?(_=I,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return k},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");k=A,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return x},set:function(A){var I=Ma(A);if(!I)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");x=I,this.hasBeenReset=!0}}}),this.displayState=void 0}Sc.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var c_=Sc,p_={"":!0,up:!0};function m_(i){return typeof i=="string"&&!!p_[i.toLowerCase()]&&i.toLowerCase()}function Rs(i){return typeof i=="number"&&i>=0&&i<=100}function g_(){var i=100,t=3,e=0,s=100,n=0,r=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return i},set:function(l){if(!Rs(l))throw new Error("Width must be between 0 and 100.");i=l}},lines:{enumerable:!0,get:function(){return t},set:function(l){if(typeof l!="number")throw new TypeError("Lines must be set to a number.");t=l}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(l){if(!Rs(l))throw new Error("RegionAnchorX must be between 0 and 100.");s=l}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(l){if(!Rs(l))throw new Error("RegionAnchorY must be between 0 and 100.");e=l}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(l){if(!Rs(l))throw new Error("ViewportAnchorY must be between 0 and 100.");r=l}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(l){if(!Rs(l))throw new Error("ViewportAnchorX must be between 0 and 100.");n=l}},scroll:{enumerable:!0,get:function(){return a},set:function(l){var u=m_(l);u===!1?console.warn("Scroll: an invalid or illegal string was specified."):a=u}}})}var f_=g_,$e=$r,Ii=bc.exports={WebVTT:o_,VTTCue:c_,VTTRegion:f_};$e.vttjs=Ii,$e.WebVTT=Ii.WebVTT;var y_=Ii.VTTCue,__=Ii.VTTRegion,v_=$e.VTTCue,b_=$e.VTTRegion;Ii.shim=function(){$e.VTTCue=y_,$e.VTTRegion=__},Ii.restore=function(){$e.VTTCue=v_,$e.VTTRegion=b_},$e.VTTCue||Ii.shim();const nu=di(bc.exports);function ve(){return ve=Object.assign?Object.assign.bind():function(i){for(var t=1;t-1},t.trigger=function(e){var s=this.listeners[e];if(s)if(arguments.length===2)for(var n=s.length,r=0;r-1;e=this.buffer.indexOf(` +`))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}const w_=" ",Ua=function(i){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(i||""),e={};return t[1]&&(e.length=parseInt(t[1],10)),t[2]&&(e.offset=parseInt(t[2],10)),e},C_=function(){return new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')},ee=function(i){const t={};if(!i)return t;const e=i.split(C_());let s,n=e.length;for(;n--;)e[n]!==""&&(s=/([^=]*)=(.*)/.exec(e[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),t[s[0]]=s[1]);return t};class k_ extends cl{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,s;if((t=t.trim()).length!==0){if(t[0]!=="#")return void this.trigger("data",{type:"uri",uri:t});this.tagMappers.reduce((n,r)=>{const a=r(t);return a===t?n:n.concat([a])},[t]).forEach(n=>{for(let r=0;rr),this.customParsers.push(r=>{if(t.exec(r))return this.trigger("data",{type:"custom",data:s(r),customType:e,segment:n}),!0})}addTagMapper({expression:t,map:e}){const s=n=>t.test(n)?e(n):n;this.tagMappers.push(s)}}const x_=i=>i.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),ti=function(i){const t={};return Object.keys(i).forEach(function(e){t[x_(e)]=i[e]}),t},Ba=function(i){const{serverControl:t,targetDuration:e,partTargetDuration:s}=i;if(!t)return;const n="#EXT-X-SERVER-CONTROL",r="holdBack",a="partHoldBack",l=e&&3*e,u=s&&2*s;e&&!t.hasOwnProperty(r)&&(t[r]=l,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${l}).`})),l&&t[r]{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||typeof g!="number"||(r.timeline=g),this.manifest.preloadSegment=r)}),this.parseStream.on("data",function(_){let k,x;({tag(){({version(){_.version&&(this.manifest.version=_.version)},"allow-cache"(){this.manifest.allowCache=_.allowed,"allowed"in _||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const A={};"length"in _&&(r.byterange=A,A.length=_.length,"offset"in _||(_.offset=y)),"offset"in _&&(r.byterange=A,A.offset=_.offset),y=A.offset+A.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),_.title&&(r.title=_.title),_.duration>0&&(r.duration=_.duration),_.duration===0&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=e},key(){if(_.attributes)if(_.attributes.METHOD!=="NONE")if(_.attributes.URI){if(_.attributes.KEYFORMAT==="com.apple.streamingkeydelivery")return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:_.attributes});if(_.attributes.KEYFORMAT==="com.microsoft.playready")return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:_.attributes.URI});if(_.attributes.KEYFORMAT===p)return["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(_.attributes.METHOD)===-1?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):(_.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),_.attributes.URI.substring(0,23)!=="data:text/plain;base64,"?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):_.attributes.KEYID&&_.attributes.KEYID.substring(0,2)==="0x"?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:_.attributes.KEYFORMAT,keyId:_.attributes.KEYID.substring(2)},pssh:S_(_.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));_.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:_.attributes.METHOD||"AES-128",uri:_.attributes.URI},_.attributes.IV!==void 0&&(n.iv=_.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(_.number)?this.manifest.mediaSequence=_.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+_.number})},"discontinuity-sequence"(){isFinite(_.number)?(this.manifest.discontinuitySequence=_.number,g=_.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+_.number})},"playlist-type"(){/VOD|EVENT/.test(_.playlistType)?this.manifest.playlistType=_.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+_.playlist})},map(){s={},_.uri&&(s.uri=_.uri),_.byterange&&(s.byterange=_.byterange),n&&(s.key=n)},"stream-inf"(){this.manifest.playlists=e,this.manifest.mediaGroups=this.manifest.mediaGroups||u,_.attributes?(r.attributes||(r.attributes={}),ve(r.attributes,_.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(_.attributes&&_.attributes.TYPE&&_.attributes["GROUP-ID"]&&_.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const A=this.manifest.mediaGroups[_.attributes.TYPE];A[_.attributes["GROUP-ID"]]=A[_.attributes["GROUP-ID"]]||{},k=A[_.attributes["GROUP-ID"]],x={default:/yes/i.test(_.attributes.DEFAULT)},x.default?x.autoselect=!0:x.autoselect=/yes/i.test(_.attributes.AUTOSELECT),_.attributes.LANGUAGE&&(x.language=_.attributes.LANGUAGE),_.attributes.URI&&(x.uri=_.attributes.URI),_.attributes["INSTREAM-ID"]&&(x.instreamId=_.attributes["INSTREAM-ID"]),_.attributes.CHARACTERISTICS&&(x.characteristics=_.attributes.CHARACTERISTICS),_.attributes.FORCED&&(x.forced=/yes/i.test(_.attributes.FORCED)),k[_.attributes.NAME]=x},discontinuity(){g+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(e.length)},"program-date-time"(){this.manifest.dateTimeString===void 0&&(this.manifest.dateTimeString=_.dateTimeString,this.manifest.dateTimeObject=_.dateTimeObject),r.dateTimeString=_.dateTimeString,r.dateTimeObject=_.dateTimeObject;const{lastProgramDateTime:A}=this;this.lastProgramDateTime=new Date(_.dateTimeString).getTime(),A===null&&this.manifest.segments.reduceRight((I,O)=>(O.programDateTime=I-1e3*O.duration,O.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(_.duration)||_.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+_.duration}):(this.manifest.targetDuration=_.duration,Ba.call(this,this.manifest))},start(){_.attributes&&!isNaN(_.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:_.attributes["TIME-OFFSET"],precise:_.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){r.cueOut=_.data},"cue-out-cont"(){r.cueOutCont=_.data},"cue-in"(){r.cueIn=_.data},skip(){this.manifest.skip=ti(_.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",_.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;const A=this.manifest.segments.length,I=ti(_.attributes);r.parts=r.parts||[],r.parts.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=T),T=I.byterange.offset+I.byterange.length);const O=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${O} for segment #${A}`,_.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((N,P)=>{N.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${P} lacks required attribute(s): LAST-PART`})})},"server-control"(){const A=this.manifest.serverControl=ti(_.attributes);A.hasOwnProperty("canBlockReload")||(A.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Ba.call(this,this.manifest),A.canSkipDateranges&&!A.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const A=this.manifest.segments.length,I=ti(_.attributes),O=I.type&&I.type==="PART";r.preloadHints=r.preloadHints||[],r.preloadHints.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=O?T:0,O&&(T=I.byterange.offset+I.byterange.length)));const N=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${N} for segment #${A}`,_.attributes,["TYPE","URI"]),I.type)for(let P=0;PP.id===I.id);this.manifest.dateRanges[N]=ve(this.manifest.dateRanges[N],I),w[I.id]=ve(w[I.id],I),this.manifest.dateRanges.pop()}else w[I.id]=I},"independent-segments"(){this.manifest.independentSegments=!0},"content-steering"(){this.manifest.contentSteering=ti(_.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",_.attributes,["SERVER-URI"])}}[_.tagType]||l).call(t)},uri(){r.uri=_.uri,e.push(r),this.manifest.targetDuration&&!("duration"in r)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=g,s&&(r.map=s),T=0,this.lastProgramDateTime!==null&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){_.segment?(r.custom=r.custom||{},r.custom[_.customType]=_.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[_.customType]=_.data)}})[_.type].call(t)})}warnOnMissingAttributes_(t,e,s){const n=[];s.forEach(function(r){e.hasOwnProperty(r)||n.push(r)}),n.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${n.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push(` +`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}var Wn,lu,Ai={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},A_=["video","audio","text"],hu=["Video","Audio","Text"],wc=function(i){return i&&i.replace(/avc1\.(\d+)\.(\d+)/i,function(t,e,s){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(s).toString(16)).slice(-2)})},Ce=function(i){i===void 0&&(i="");var t=i.split(","),e=[];return t.forEach(function(s){var n;s=s.trim(),A_.forEach(function(r){var a=Ai[r].exec(s.toLowerCase());if(a&&!(a.length<=1)){n=r;var l=s.substring(0,a[1].length),u=s.replace(l,"");e.push({type:l,details:u,mediaType:r})}}),n||e.push({type:s,details:"",mediaType:"unknown"})}),e},P_=function(i,t){if(!i.mediaGroups.AUDIO||!t)return null;var e=i.mediaGroups.AUDIO[t];if(!e)return null;for(var s in e){var n=e[s];if(n.default&&n.playlists)return Ce(n.playlists[0].attributes.CODECS)}return null},Cc=function(i){return i===void 0&&(i=""),Ai.audio.test(i.trim().toLowerCase())},D_=function(i){return i===void 0&&(i=""),Ai.text.test(i.trim().toLowerCase())},ln=function(i){if(i&&typeof i=="string"){var t=i.toLowerCase().split(",").map(function(n){return wc(n.trim())}),e="video";t.length===1&&Cc(t[0])?e="audio":t.length===1&&D_(t[0])&&(e="application");var s="mp4";return t.every(function(n){return Ai.mp4.test(n)})?s="mp4":t.every(function(n){return Ai.webm.test(n)})?s="webm":t.every(function(n){return Ai.ogg.test(n)})&&(s="ogg"),e+"/"+s+';codecs="'+i+'"'}},hr=function(i){return i===void 0&&(i=""),E.MediaSource&&E.MediaSource.isTypeSupported&&E.MediaSource.isTypeSupported(ln(i))||!1},Fa=function(i){return i===void 0&&(i=""),i.toLowerCase().split(",").every(function(t){t=t.trim();for(var e=0;ep&&(u-=p,u-=p,u-=Ot(2))}return Number(u)},F_=function(i,t){var e={}.le,s=e!==void 0&&e;(typeof i!="bigint"&&typeof i!="number"||typeof i=="number"&&i!=i)&&(i=0),i=Ot(i);for(var n=M_(i),r=new Uint8Array(new ArrayBuffer(n)),a=0;a=t.length&&u.call(t,function(p,g){return p===(l[g]?l[g]&i[r+g]:i[r+g])})},j_=function(i,t,e){t.forEach(function(s){for(var n in i.mediaGroups[s])for(var r in i.mediaGroups[s][n]){var a=i.mediaGroups[s][n][r];e(a,s,n,r)}})},$_=function(i){return E.atob?E.atob(i):Buffer.from(i,"base64").toString("binary")};function H_(i){for(var t=$_(i),e=new Uint8Array(t.length),s=0;s=0))throw new xt(Bc,new Error(i.tagName+"@"+e));for(var n=t.length-1;s"&&">")||i=="&"&&"&"||i=='"'&&"""||"&#"+i.charCodeAt()+";"}function Gs(i,t){if(t(i))return!0;if(i=i.firstChild)do if(Gs(i,t))return!0;while(i=i.nextSibling)}function Ms(){this.ownerDocument=this}function J_(i,t,e){i&&i._inc++,e.namespaceURI===hn.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function $c(i,t,e,s){i&&i._inc++,e.namespaceURI===hn.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function gl(i,t,e){if(i&&i._inc){i._inc++;var s=t.childNodes;if(e)s[s.length++]=e;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function gu(i,t){var e=t.previousSibling,s=t.nextSibling;return e?e.nextSibling=s:i.firstChild=s,s?s.previousSibling=e:i.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,gl(i.ownerDocument,i),t}function Z_(i){return i&&(i.nodeType===ot.DOCUMENT_NODE||i.nodeType===ot.DOCUMENT_FRAGMENT_NODE||i.nodeType===ot.ELEMENT_NODE)}function tv(i){return i&&(Le(i)||fl(i)||Ke(i)||i.nodeType===ot.DOCUMENT_FRAGMENT_NODE||i.nodeType===ot.COMMENT_NODE||i.nodeType===ot.PROCESSING_INSTRUCTION_NODE)}function Ke(i){return i&&i.nodeType===ot.DOCUMENT_TYPE_NODE}function Le(i){return i&&i.nodeType===ot.ELEMENT_NODE}function fl(i){return i&&i.nodeType===ot.TEXT_NODE}function fu(i,t){var e=i.childNodes||[];if(De(e,Le)||Ke(t))return!1;var s=De(e,Ke);return!(t&&s&&e.indexOf(s)>e.indexOf(t))}function yu(i,t){var e=i.childNodes||[];function s(r){return Le(r)&&r!==t}if(De(e,s))return!1;var n=De(e,Ke);return!(t&&n&&e.indexOf(n)>e.indexOf(t))}function ev(i,t,e){if(!Z_(i))throw new xt(Xt,"Unexpected parent node type "+i.nodeType);if(e&&e.parentNode!==i)throw new xt(Bc,"child not in parent");if(!tv(t)||Ke(t)&&i.nodeType!==ot.DOCUMENT_NODE)throw new xt(Xt,"Unexpected node type "+t.nodeType+" for parent node type "+i.nodeType)}function iv(i,t,e){var s=i.childNodes||[],n=t.childNodes||[];if(t.nodeType===ot.DOCUMENT_FRAGMENT_NODE){var r=n.filter(Le);if(r.length>1||De(n,fl))throw new xt(Xt,"More than one element or text in fragment");if(r.length===1&&!fu(i,e))throw new xt(Xt,"Element in fragment can not be inserted before doctype")}if(Le(t)&&!fu(i,e))throw new xt(Xt,"Only one element can be added and only after doctype");if(Ke(t)){if(De(s,Ke))throw new xt(Xt,"Only one doctype is allowed");var a=De(s,Le);if(e&&s.indexOf(a)1||De(n,fl))throw new xt(Xt,"More than one element or text in fragment");if(r.length===1&&!yu(i,e))throw new xt(Xt,"Element in fragment can not be inserted before doctype")}if(Le(t)&&!yu(i,e))throw new xt(Xt,"Only one element can be added and only after doctype");if(Ke(t)){if(De(s,function(u){return Ke(u)&&u!==e}))throw new xt(Xt,"Only one doctype is allowed");var a=De(s,Le);if(e&&s.indexOf(a)=0;T--)if((w=n[T]).prefix===""&&w.namespace===i.namespaceURI){g=w.namespace;break}}if(g!==i.namespaceURI)for(T=n.length-1;T>=0;T--){var w;if((w=n[T]).namespace===i.namespaceURI){w.prefix&&(p=w.prefix+":"+u);break}}}t.push("<",p);for(var _=0;_"),e&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):Ki(l,t,e,s,n.slice()),l=l.nextSibling;else for(;l;)Ki(l,t,e,s,n.slice()),l=l.nextSibling;t.push("")}else t.push("/>");return;case Mc:case Ge:for(l=i.firstChild;l;)Ki(l,t,e,s,n.slice()),l=l.nextSibling;return;case is:return za(t,i.name,i.value);case ur:return t.push(i.data.replace(/[<&>]/g,jc));case Lc:return t.push("");case Rc:return t.push("");case Uc:var I=i.publicId,O=i.systemId;if(t.push("");else if(O&&O!=".")t.push(" SYSTEM ",O,">");else{var N=i.internalSubset;N&&t.push(" [",N,"]"),t.push(">")}return;case Nc:return t.push("");case Oc:return t.push("&",i.nodeName,";");default:t.push("??",i.nodeName)}}function Vc(i,t,e){var s;switch(t.nodeType){case _e:(s=t.cloneNode(!1)).ownerDocument=i;case Ge:break;case is:e=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=i,s.parentNode=null,e)for(var n=t.firstChild;n;)s.appendChild(Vc(i,n,e)),n=n.nextSibling;return s}function Ao(i,t,e){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];typeof r!="object"&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new je),s.ownerDocument=i,s.nodeType){case _e:var a=t.attributes,l=s.attributes=new dr,u=a.length;l._ownerElement=s;for(var p=0;p=0&&i0},lookupPrefix:function(i){for(var t=this;t;){var e=t._nsMap;if(e){for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]===i)return s}t=t.nodeType==is?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(i){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,i))return e[i];t=t.nodeType==is?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(i){return this.lookupPrefix(i)==null}},Zs(Jt,ot),Zs(Jt,ot.prototype),Ms.prototype={nodeName:"#document",nodeType:Mc,doctype:null,documentElement:null,_inc:1,insertBefore:function(i,t){if(i.nodeType==Ge){for(var e=i.firstChild;e;){var s=e.nextSibling;this.insertBefore(e,t),e=s}return i}return Gn(this,i,t),i.ownerDocument=this,this.documentElement===null&&i.nodeType===_e&&(this.documentElement=i),i},removeChild:function(i){return this.documentElement==i&&(this.documentElement=null),gu(this,i)},replaceChild:function(i,t){Gn(this,i,t,_u),i.ownerDocument=this,t&&this.removeChild(t),Le(i)&&(this.documentElement=i)},importNode:function(i,t){return Vc(this,i,t)},getElementById:function(i){var t=null;return Gs(this.documentElement,function(e){if(e.nodeType==_e&&e.getAttribute("id")==i)return t=e,!0}),t},getElementsByClassName:function(i){var t=du(i);return new Wi(this,function(e){var s=[];return t.length>0&&Gs(e.documentElement,function(n){if(n!==e&&n.nodeType===_e){var r=n.getAttribute("class");if(r){var a=i===r;if(!a){var l=du(r);a=t.every(K_(l))}a&&s.push(n)}}}),s})},createElement:function(i){var t=new Ei;return t.ownerDocument=this,t.nodeName=i,t.tagName=i,t.localName=i,t.childNodes=new je,(t.attributes=new dr)._ownerElement=t,t},createDocumentFragment:function(){var i=new Kn;return i.ownerDocument=this,i.childNodes=new je,i},createTextNode:function(i){var t=new qa;return t.ownerDocument=this,t.appendData(i),t},createComment:function(i){var t=new ja;return t.ownerDocument=this,t.appendData(i),t},createCDATASection:function(i){var t=new $a;return t.ownerDocument=this,t.appendData(i),t},createProcessingInstruction:function(i,t){var e=new Va;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=i,e.nodeValue=e.data=t,e},createAttribute:function(i){var t=new Xn;return t.ownerDocument=this,t.name=i,t.nodeName=i,t.localName=i,t.specified=!0,t},createEntityReference:function(i){var t=new Ha;return t.ownerDocument=this,t.nodeName=i,t},createElementNS:function(i,t){var e=new Ei,s=t.split(":"),n=e.attributes=new dr;return e.childNodes=new je,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=i,s.length==2?(e.prefix=s[0],e.localName=s[1]):e.localName=t,n._ownerElement=e,e},createAttributeNS:function(i,t){var e=new Xn,s=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=i,e.specified=!0,s.length==2?(e.prefix=s[0],e.localName=s[1]):e.localName=t,e}},Wt(Ms,ot),Ei.prototype={nodeType:_e,hasAttribute:function(i){return this.getAttributeNode(i)!=null},getAttribute:function(i){var t=this.getAttributeNode(i);return t&&t.value||""},getAttributeNode:function(i){return this.attributes.getNamedItem(i)},setAttribute:function(i,t){var e=this.ownerDocument.createAttribute(i);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(i){var t=this.getAttributeNode(i);t&&this.removeAttributeNode(t)},appendChild:function(i){return i.nodeType===Ge?this.insertBefore(i,null):sv(this,i)},setAttributeNode:function(i){return this.attributes.setNamedItem(i)},setAttributeNodeNS:function(i){return this.attributes.setNamedItemNS(i)},removeAttributeNode:function(i){return this.attributes.removeNamedItem(i.nodeName)},removeAttributeNS:function(i,t){var e=this.getAttributeNodeNS(i,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(i,t){return this.getAttributeNodeNS(i,t)!=null},getAttributeNS:function(i,t){var e=this.getAttributeNodeNS(i,t);return e&&e.value||""},setAttributeNS:function(i,t,e){var s=this.ownerDocument.createAttributeNS(i,t);s.value=s.nodeValue=""+e,this.setAttributeNode(s)},getAttributeNodeNS:function(i,t){return this.attributes.getNamedItemNS(i,t)},getElementsByTagName:function(i){return new Wi(this,function(t){var e=[];return Gs(t,function(s){s===t||s.nodeType!=_e||i!=="*"&&s.tagName!=i||e.push(s)}),e})},getElementsByTagNameNS:function(i,t){return new Wi(this,function(e){var s=[];return Gs(e,function(n){n===e||n.nodeType!==_e||i!=="*"&&n.namespaceURI!==i||t!=="*"&&n.localName!=t||s.push(n)}),s})}},Ms.prototype.getElementsByTagName=Ei.prototype.getElementsByTagName,Ms.prototype.getElementsByTagNameNS=Ei.prototype.getElementsByTagNameNS,Wt(Ei,ot),Xn.prototype.nodeType=is,Wt(Xn,ot),Us.prototype={data:"",substringData:function(i,t){return this.data.substring(i,i+t)},appendData:function(i){i=this.data+i,this.nodeValue=this.data=i,this.length=i.length},insertData:function(i,t){this.replaceData(i,0,t)},appendChild:function(i){throw new Error(Dt[Xt])},deleteData:function(i,t){this.replaceData(i,t,"")},replaceData:function(i,t,e){e=this.data.substring(0,i)+e+this.data.substring(i+t),this.nodeValue=this.data=e,this.length=e.length}},Wt(Us,ot),qa.prototype={nodeName:"#text",nodeType:ur,splitText:function(i){var t=this.data,e=t.substring(i);t=t.substring(0,i),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},Wt(qa,Us),ja.prototype={nodeName:"#comment",nodeType:Rc},Wt(ja,Us),$a.prototype={nodeName:"#cdata-section",nodeType:Lc},Wt($a,Us),cr.prototype.nodeType=Uc,Wt(cr,ot),vu.prototype.nodeType=Q_,Wt(vu,ot),bu.prototype.nodeType=Y_,Wt(bu,ot),Ha.prototype.nodeType=Oc,Wt(Ha,ot),Kn.prototype.nodeName="#document-fragment",Kn.prototype.nodeType=Ge,Wt(Kn,ot),Va.prototype.nodeType=Nc,Wt(Va,ot),Hc.prototype.serializeToString=function(i,t,e){return Tu.call(i,t,e)},ot.prototype.toString=Tu;try{if(Object.defineProperty){let i=function(t){switch(t.nodeType){case _e:case Ge:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(i(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Wi.prototype,"length",{get:function(){return ml(this),this.$$length}}),Object.defineProperty(ot.prototype,"textContent",{get:function(){return i(this)},set:function(t){switch(this.nodeType){case _e:case Ge:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),zc=function(t,e,s){t["$$"+e]=s}}}catch{}ai.DocumentType=cr,ai.DOMException=xt,ai.DOMImplementation=qc,ai.Element=Ei,ai.Node=ot,ai.NodeList=je,ai.XMLSerializer=Hc;var pr={},Wc={};(function(i){var t=He.freeze;i.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),i.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),i.entityMap=i.HTML_ENTITIES})(Wc);var Po={},un=He.NAMESPACE,Do=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Eu=new RegExp("[\\-\\.0-9"+Do.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),wu=new RegExp("^"+Do.source+Eu.source+"*(?::"+Do.source+Eu.source+"*)?$"),Bs=0,ei=1,Fi=2,Fs=3,qi=4,ji=5,qs=6,Yn=7;function Yi(i,t){this.message=i,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Yi)}function Cu(){}function nv(i,t,e,s,n){function r(et){if(et>65535){var wt=55296+((et-=65536)>>10),ce=56320+(1023&et);return String.fromCharCode(wt,ce)}return String.fromCharCode(et)}function a(et){var wt=et.slice(1,-1);return Object.hasOwnProperty.call(e,wt)?e[wt]:wt.charAt(0)==="#"?r(parseInt(wt.substr(1).replace("x","0x"))):(n.error("entity not found:"+et),et)}function l(et){if(et>k){var wt=i.substring(k,et).replace(/&#?\w+;/g,a);T&&u(k),s.characters(wt,0,et-k),k=et}}function u(et,wt){for(;et>=g&&(wt=y.exec(i));)p=wt.index,g=p+wt[0].length,T.lineNumber++;T.columnNumber=et-p+1}for(var p=0,g=0,y=/.*(?:\r\n?|\n)|.*$/g,T=s.locator,w=[{currentNSMap:t}],_={},k=0;;){try{var x=i.indexOf("<",k);if(x<0){if(!i.substr(k).match(/^\s*$/)){var A=s.doc,I=A.createTextNode(i.substr(k));A.appendChild(I),s.currentElement=I}return}switch(x>k&&l(x),i.charAt(x+1)){case"/":var O=i.indexOf(">",x+3),N=i.substring(x+2,O).replace(/[ \t\n\r]+$/g,""),P=w.pop();O<0?(N=i.substring(x+2).replace(/[\s<].*/,""),n.error("end tag name: "+N+" is not complete:"+P.tagName),O=x+1+N.length):N.match(/\sk?k=O:l(Math.max(x,k)+1)}}function ku(i,t){return t.lineNumber=i.lineNumber,t.columnNumber=i.columnNumber,t}function rv(i,t,e,s,n,r){function a(T,w,_){e.attributeNames.hasOwnProperty(T)&&r.fatalError("Attribute "+T+" redefined"),e.addValue(T,w.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),_)}for(var l,u=++t,p=Bs;;){var g=i.charAt(u);switch(g){case"=":if(p===ei)l=i.slice(t,u),p=Fs;else{if(p!==Fi)throw new Error("attribute equal must after attrName");p=Fs}break;case"'":case'"':if(p===Fs||p===ei){if(p===ei&&(r.warning('attribute value must after "="'),l=i.slice(t,u)),t=u+1,!((u=i.indexOf(g,t))>0))throw new Error("attribute value no end '"+g+"' match");a(l,y=i.slice(t,u),t-1),p=ji}else{if(p!=qi)throw new Error('attribute value must after "="');a(l,y=i.slice(t,u),t),r.warning('attribute "'+l+'" missed start quot('+g+")!!"),t=u+1,p=ji}break;case"/":switch(p){case Bs:e.setTagName(i.slice(t,u));case ji:case qs:case Yn:p=Yn,e.closed=!0;case qi:case ei:break;case Fi:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),p==Bs&&e.setTagName(i.slice(t,u)),u;case">":switch(p){case Bs:e.setTagName(i.slice(t,u));case ji:case qs:case Yn:break;case qi:case ei:(y=i.slice(t,u)).slice(-1)==="/"&&(e.closed=!0,y=y.slice(0,-1));case Fi:p===Fi&&(y=l),p==qi?(r.warning('attribute "'+y+'" missed quot(")!'),a(l,y,t)):(un.isHTML(s[""])&&y.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+y+'" missed value!! "'+y+'" instead!!'),a(y,y,t));break;case Fs:throw new Error("attribute value missed!!")}return u;case"€":g=" ";default:if(g<=" ")switch(p){case Bs:e.setTagName(i.slice(t,u)),p=qs;break;case ei:l=i.slice(t,u),p=Fi;break;case qi:var y=i.slice(t,u);r.warning('attribute "'+y+'" missed quot(")!!'),a(l,y,t);case ji:p=qs}else switch(p){case Fi:e.tagName,un.isHTML(s[""])&&l.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),a(l,l,t),t=u,p=ei;break;case ji:r.warning('attribute space is required"'+l+'"!!');case qs:p=ei,t=u;break;case Fs:p=qi,t=u;break;case Yn:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function xu(i,t,e){for(var s=i.tagName,n=null,r=i.length;r--;){var a=i[r],l=a.qName,u=a.value;if((T=l.indexOf(":"))>0)var p=a.prefix=l.slice(0,T),g=l.slice(T+1),y=p==="xmlns"&&g;else g=l,p=null,y=l==="xmlns"&&"";a.localName=g,y!==!1&&(n==null&&(n={},Gc(e,e={})),e[y]=n[y]=u,a.uri=un.XMLNS,t.startPrefixMapping(y,u))}for(r=i.length;r--;)(p=(a=i[r]).prefix)&&(p==="xml"&&(a.uri=un.XML),p!=="xmlns"&&(a.uri=e[p||""]));var T;(T=s.indexOf(":"))>0?(p=i.prefix=s.slice(0,T),g=i.localName=s.slice(T+1)):(p=null,g=i.localName=s);var w=i.uri=e[p||""];if(t.startElement(w,g,s,i),!i.closed)return i.currentNSMap=e,i.localNSMap=n,!0;if(t.endElement(w,g,s),n)for(p in n)Object.prototype.hasOwnProperty.call(n,p)&&t.endPrefixMapping(p)}function av(i,t,e,s,n){if(/^(?:script|textarea)$/i.test(e)){var r=i.indexOf("",t),a=i.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(e)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function ov(i,t,e,s){var n=s[e];return n==null&&((n=i.lastIndexOf(""))",t+4))>t?(e.comment(i,t+4,n-t-4),n+3):(s.error("Unclosed comment"),-1):-1;if(i.substr(t+3,6)=="CDATA["){var n=i.indexOf("]]>",t+9);return e.startCDATA(),e.characters(i,t+9,n-t-9),e.endCDATA(),n+3}var r=uv(i,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var l=r[1][0],u=!1,p=!1;a>3&&(/^public$/i.test(r[2][0])?(u=r[3][0],p=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(p=r[3][0]));var g=r[a-1];return e.startDTD(l,u,p),e.endDTD(),g.index+g[0].length}return-1}function hv(i,t,e){var s=i.indexOf("?>",t);if(s){var n=i.substring(t,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,e.processingInstruction(n[1],n[2]),s+2):-1}return-1}function Xc(){this.attributeNames={}}function uv(i,t){var e,s=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(i);e=n.exec(i);)if(s.push(e),e[1])return s}Yi.prototype=new Error,Yi.prototype.name=Yi.name,Cu.prototype={parse:function(i,t,e){var s=this.domBuilder;s.startDocument(),Gc(t,t={}),nv(i,t,e,s,this.errorHandler),s.endDocument()}},Xc.prototype={setTagName:function(i){if(!wu.test(i))throw new Error("invalid tagName:"+i);this.tagName=i},addValue:function(i,t,e){if(!wu.test(i))throw new Error("invalid attribute:"+i);this.attributeNames[i]=this.length,this[this.length++]={qName:i,value:t,offset:e}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}},Po.XMLReader=Cu,Po.ParseError=Yi;var dv=He,Iu=Wc,Kc=Po,cv=ai.DOMImplementation,Au=dv.NAMESPACE,pv=Kc.ParseError,mv=Kc.XMLReader;function Pu(i){return i.replace(/\r[\n\u0085]/g,` +`).replace(/[\r\u0085\u2028]/g,` +`)}function Du(i){this.options=i||{locator:{}}}function gv(i,t,e){if(!i){if(t instanceof Xs)return t;i=t}var s={},n=i instanceof Function;function r(a){var l=i[a];!l&&n&&(l=i.length==2?function(u){i(a,u)}:i),s[a]=l&&function(u){l("[xmldom "+a+"] "+u+Lo(e))}||function(){}}return e=e||{},r("warning"),r("error"),r("fatalError"),s}function Xs(){this.cdata=!1}function $i(i,t){t.lineNumber=i.lineNumber,t.columnNumber=i.columnNumber}function Lo(i){if(i)return` +@`+(i.systemId||"")+"#[line:"+i.lineNumber+",col:"+i.columnNumber+"]"}function Lu(i,t,e){return typeof i=="string"?i.substr(t,e):i.length>=t+e||t?new java.lang.String(i,t,e)+"":i}function Qn(i,t){i.currentElement?i.currentElement.appendChild(t):i.doc.appendChild(t)}Du.prototype.parseFromString=function(i,t){var e=this.options,s=new mv,n=e.domBuilder||new Xs,r=e.errorHandler,a=e.locator,l=e.xmlns||{},u=/\/x?html?$/.test(t),p=u?Iu.HTML_ENTITIES:Iu.XML_ENTITIES;a&&n.setDocumentLocator(a),s.errorHandler=gv(r,n,a),s.domBuilder=e.domBuilder||n,u&&(l[""]=Au.HTML),l.xml=l.xml||Au.XML;var g=e.normalizeLineEndings||Pu;return i&&typeof i=="string"?s.parse(g(i),l,p):s.errorHandler.error("invalid doc source"),n.doc},Xs.prototype={startDocument:function(){this.doc=new cv().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(i,t,e,s){var n=this.doc,r=n.createElementNS(i,e||t),a=s.length;Qn(this,r),this.currentElement=r,this.locator&&$i(this.locator,r);for(var l=0;l!!i&&typeof i=="object",Lt=(...i)=>i.reduce((t,e)=>(typeof e!="object"||Object.keys(e).forEach(s=>{Array.isArray(t[s])&&Array.isArray(e[s])?t[s]=t[s].concat(e[s]):Ou(t[s])&&Ou(e[s])?t[s]=Lt(t[s],e[s]):t[s]=e[s]}),t),{}),Yc=i=>Object.keys(i).map(t=>i[t]),yv=(i,t)=>{const e=[];for(let s=i;si.reduce((t,e)=>t.concat(e),[]),Qc=i=>{if(!i.length)return[];const t=[];for(let e=0;ei.reduce((e,s,n)=>(s[t]&&e.push(n),e),[]),vv=(i,t)=>Yc(i.reduce((e,s)=>(s.forEach(n=>{e[t(n)]=n}),e),{}));var ds={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const dn=({baseUrl:i="",source:t="",range:e="",indexRange:s=""})=>{const n={uri:t,resolvedUri:Hr(i||"",t)};if(e||s){const r=(e||s).split("-");let a,l=E.BigInt?E.BigInt(r[0]):parseInt(r[0],10),u=E.BigInt?E.BigInt(r[1]):parseInt(r[1],10);l{let t;return t=typeof i.offset=="bigint"||typeof i.length=="bigint"?E.BigInt(i.offset)+E.BigInt(i.length)-E.BigInt(1):i.offset+i.length-1,`${i.offset}-${t}`},Nu=i=>(i&&typeof i!="number"&&(i=parseInt(i,10)),isNaN(i)?null:i),Tv={static(i){const{duration:t,timescale:e=1,sourceDuration:s,periodDuration:n}=i,r=Nu(i.endNumber),a=t/e;return typeof r=="number"?{start:0,end:r}:typeof n=="number"?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(i){const{NOW:t,clientOffset:e,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:u=1/0}=i,p=Nu(i.endNumber),g=(t+e)/1e3,y=s+a,T=g+l-y,w=Math.ceil(T*n/r),_=Math.floor((g-y-u)*n/r),k=Math.floor((g-y)*n/r);return{start:Math.max(0,_),end:typeof p=="number"?p:Math.min(w,k)}}},Sv=i=>t=>{const{duration:e,timescale:s=1,periodStart:n,startNumber:r=1}=i;return{number:r+t,duration:e/s,timeline:n,time:t*e}},yl=i=>{const{type:t,duration:e,timescale:s=1,periodDuration:n,sourceDuration:r}=i,{start:a,end:l}=Tv[t](i),u=yv(a,l).map(Sv(i));if(t==="static"){const p=u.length-1,g=typeof n=="number"?n:r;u[p].duration=g-e/s*p}return u},Jc=i=>{const{baseUrl:t,initialization:e={},sourceDuration:s,indexRange:n="",periodStart:r,presentationTime:a,number:l=0,duration:u}=i;if(!t)throw new Error(ds.NO_BASE_URL);const p=dn({baseUrl:t,source:e.sourceURL,range:e.range}),g=dn({baseUrl:t,source:t,indexRange:n});if(g.map=p,u){const y=yl(i);y.length&&(g.duration=y[0].duration,g.timeline=y[0].timeline)}else s&&(g.duration=s,g.timeline=r);return g.presentationTime=a||r,g.number=l,[g]},_l=(i,t,e)=>{const s=i.sidx.map?i.sidx.map:null,n=i.sidx.duration,r=i.timeline||0,a=i.sidx.byterange,l=a.offset+a.length,u=t.timescale,p=t.references.filter(x=>x.referenceType!==1),g=[],y=i.endList?"static":"dynamic",T=i.sidx.timeline;let w,_=T,k=i.mediaSequence||0;w=typeof t.firstOffset=="bigint"?E.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let x=0;xvv(i,({timeline:t})=>t).sort((t,e)=>t.timeline>e.timeline?1:-1),Cv=(i,t)=>{for(let e=0;e{let t=[];return j_(i,Ev,(e,s,n,r)=>{t=t.concat(e.playlists||[])}),t},Mu=({playlist:i,mediaSequence:t})=>{i.mediaSequence=t,i.segments.forEach((e,s)=>{e.number=i.mediaSequence+s})},kv=({oldPlaylists:i,newPlaylists:t,timelineStarts:e})=>{t.forEach(s=>{s.discontinuitySequence=e.findIndex(function({timeline:l}){return l===s.timeline});const n=Cv(i,s.attributes.NAME);if(!n||s.sidx)return;const r=s.segments[0],a=n.segments.findIndex(function(l){return Math.abs(l.presentationTime-r.presentationTime)n.timeline||n.segments.length&&s.timeline>n.segments[n.segments.length-1].timeline)&&s.discontinuitySequence--);n.segments[a].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,s.discontinuityStarts.unshift(0),s.discontinuitySequence--),Mu({playlist:s,mediaSequence:n.segments[a].number})})},xv=({oldManifest:i,newManifest:t})=>{const e=i.playlists.concat(Ru(i)),s=t.playlists.concat(Ru(t));return t.timelineStarts=Zc([i.timelineStarts,t.timelineStarts]),kv({oldPlaylists:e,newPlaylists:s,timelineStarts:t.timelineStarts}),t},Vr=i=>i&&i.uri+"-"+bv(i.byterange),Wa=i=>{const t=i.reduce(function(s,n){return s[n.attributes.baseUrl]||(s[n.attributes.baseUrl]=[]),s[n.attributes.baseUrl].push(n),s},{});let e=[];return Object.values(t).forEach(s=>{const n=Yc(s.reduce((r,a)=>{const l=a.attributes.id+(a.attributes.lang||"");return r[l]?(a.segments&&(a.segments[0]&&(a.segments[0].discontinuity=!0),r[l].segments.push(...a.segments)),a.attributes.contentProtection&&(r[l].attributes.contentProtection=a.attributes.contentProtection)):(r[l]=a,r[l].attributes.timelineStarts=[]),r[l].attributes.timelineStarts.push({start:a.attributes.periodStart,timeline:a.attributes.periodStart}),r},{}));e=e.concat(n)}),e.map(s=>(s.discontinuityStarts=_v(s.segments||[],"discontinuity"),s))},vl=(i,t)=>{const e=Vr(i.sidx),s=e&&t[e]&&t[e].sidx;return s&&_l(i,s,i.sidx.resolvedUri),i},Iv=(i,t={})=>{if(!Object.keys(t).length)return i;for(const e in i)i[e]=vl(i[e],t);return i},Av=({attributes:i,segments:t,sidx:e,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const l={attributes:{NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs,"PROGRAM-ID":1},uri:"",endList:i.type==="static",timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:i.timelineStarts,mediaSequence:s,segments:t};return i.contentProtection&&(l.contentProtection=i.contentProtection),i.serviceLocation&&(l.attributes.serviceLocation=i.serviceLocation),e&&(l.sidx=e),a&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},Pv=({attributes:i,segments:t,mediaSequence:e,discontinuityStarts:s,discontinuitySequence:n})=>{t===void 0&&(t=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);const r={NAME:i.id,BANDWIDTH:i.bandwidth,"PROGRAM-ID":1};i.codecs&&(r.CODECS=i.codecs);const a={attributes:r,uri:"",endList:i.type==="static",timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:e,segments:t};return i.serviceLocation&&(a.attributes.serviceLocation=i.serviceLocation),a},Dv=(i,t={},e=!1)=>{let s;const n=i.reduce((r,a)=>{const l=a.attributes.role&&a.attributes.role.value||"",u=a.attributes.lang||"";let p=a.attributes.label||"main";if(u&&!a.attributes.label){const y=l?` (${l})`:"";p=`${a.attributes.lang}${y}`}r[p]||(r[p]={language:u,autoselect:!0,default:l==="main",playlists:[],uri:""});const g=vl(Av(a,e),t);return r[p].playlists.push(g),s===void 0&&l==="main"&&(s=a,s.default=!0),r},{});return s||(n[Object.keys(n)[0]].default=!0),n},Lv=(i,t={})=>i.reduce((e,s)=>{const n=s.attributes.label||s.attributes.lang||"text";return e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(vl(Pv(s),t)),e},{}),Ov=i=>i.reduce((t,e)=>(e&&e.forEach(s=>{const{channel:n,language:r}=s;t[r]={autoselect:!1,default:!1,instreamId:n,language:r},s.hasOwnProperty("aspectRatio")&&(t[r].aspectRatio=s.aspectRatio),s.hasOwnProperty("easyReader")&&(t[r].easyReader=s.easyReader),s.hasOwnProperty("3D")&&(t[r]["3D"]=s["3D"])}),t),{}),Nv=({attributes:i,segments:t,sidx:e,discontinuityStarts:s})=>{const n={attributes:{NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth,"PROGRAM-ID":1},uri:"",endList:i.type==="static",timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,discontinuityStarts:s,timelineStarts:i.timelineStarts,segments:t};return i.frameRate&&(n.attributes["FRAME-RATE"]=i.frameRate),i.contentProtection&&(n.contentProtection=i.contentProtection),i.serviceLocation&&(n.attributes.serviceLocation=i.serviceLocation),e&&(n.sidx=e),n},Rv=({attributes:i})=>i.mimeType==="video/mp4"||i.mimeType==="video/webm"||i.contentType==="video",Mv=({attributes:i})=>i.mimeType==="audio/mp4"||i.mimeType==="audio/webm"||i.contentType==="audio",Uv=({attributes:i})=>i.mimeType==="text/vtt"||i.contentType==="text",Bv=(i,t)=>{i.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex(function({timeline:s}){return s===e.timeline}),e.segments&&e.segments.forEach((s,n)=>{s.number=n})})},Uu=i=>i?Object.keys(i).reduce((t,e)=>{const s=i[e];return t.concat(s.playlists)},[]):[],Fv=({dashPlaylists:i,locations:t,contentSteering:e,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!i.length)return{};const{sourceDuration:a,type:l,suggestedPresentationDelay:u,minimumUpdatePeriod:p}=i[0].attributes,g=Wa(i.filter(Rv)).map(Nv),y=Wa(i.filter(Mv)),T=Wa(i.filter(Uv)),w=i.map(N=>N.attributes.captionServices).filter(Boolean),_={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:Iv(g,s)};p>=0&&(_.minimumUpdatePeriod=1e3*p),t&&(_.locations=t),e&&(_.contentSteering=e),l==="dynamic"&&(_.suggestedPresentationDelay=u),r&&r.length>0&&(_.eventStream=r);const k=_.playlists.length===0,x=y.length?Dv(y,s,k):null,A=T.length?Lv(T,s):null,I=g.concat(Uu(x),Uu(A)),O=I.map(({timelineStarts:N})=>N);return _.timelineStarts=Zc(O),Bv(I,_.timelineStarts),x&&(_.mediaGroups.AUDIO.audio=x),A&&(_.mediaGroups.SUBTITLES.subs=A),w.length&&(_.mediaGroups["CLOSED-CAPTIONS"].cc=Ov(w)),n?xv({oldManifest:n,newManifest:_}):_},qv=(i,t,e)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:l=0,minimumUpdatePeriod:u=0}=i,p=(s+n)/1e3+u-(r+l);return Math.ceil((p*a-t)/e)},tp=(i,t)=>{const{type:e,minimumUpdatePeriod:s=0,media:n="",sourceDuration:r,timescale:a=1,startNumber:l=1,periodStart:u}=i,p=[];let g=-1;for(let y=0;yg&&(g=k),_<0){const O=y+1;x=O===t.length?e==="dynamic"&&s>0&&n.indexOf("$Number$")>0?qv(i,g,w):(r*a-g)/w:(t[O].t-g)/w}else x=_+1;const A=l+p.length+x;let I=l+p.length;for(;I(t,e,s,n)=>{if(t==="$$")return"$";if(i[e]===void 0)return t;const r=""+i[e];return e==="RepresentationID"?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join("0")}${r}`)},Bu=(i,t)=>i.replace(jv,$v(t)),Hv=(i,t)=>i.duration||t?i.duration?yl(i):tp(i,t):[{number:i.startNumber||1,duration:i.sourceDuration,time:0,timeline:i.periodStart}],Vv=(i,t)=>{const e={RepresentationID:i.id,Bandwidth:i.bandwidth||0},{initialization:s={sourceURL:"",range:""}}=i,n=dn({baseUrl:i.baseUrl,source:Bu(s.sourceURL,e),range:s.range});return Hv(i,t).map(r=>{e.Number=r.number,e.Time=r.time;const a=Bu(i.media||"",e),l=i.timescale||1,u=i.presentationTimeOffset||0,p=i.periodStart+(r.time-u)/l;return{uri:a,timeline:r.timeline,duration:r.duration,resolvedUri:Hr(i.baseUrl||"",a),map:n,number:r.number,presentationTime:p}})},zv=(i,t)=>{const{baseUrl:e,initialization:s={}}=i,n=dn({baseUrl:e,source:s.sourceURL,range:s.range}),r=dn({baseUrl:e,source:t.media,range:t.mediaRange});return r.map=n,r},Wv=(i,t)=>{const{duration:e,segmentUrls:s=[],periodStart:n}=i;if(!e&&!t||e&&t)throw new Error(ds.SEGMENT_TIME_UNSPECIFIED);const r=s.map(l=>zv(i,l));let a;return e&&(a=yl(i)),t&&(a=tp(i,t)),a.map((l,u)=>{if(r[u]){const p=r[u],g=i.timescale||1,y=i.presentationTimeOffset||0;return p.timeline=l.timeline,p.duration=l.duration,p.number=l.number,p.presentationTime=n+(l.time-y)/g,p}}).filter(l=>l)},Gv=({attributes:i,segmentInfo:t})=>{let e,s;t.template?(s=Vv,e=Lt(i,t.template)):t.base?(s=Jc,e=Lt(i,t.base)):t.list&&(s=Wv,e=Lt(i,t.list));const n={attributes:i};if(!s)return n;const r=s(e,t.segmentTimeline);if(e.duration){const{duration:a,timescale:l=1}=e;e.duration=a/l}else r.length?e.duration=r.reduce((a,l)=>Math.max(a,Math.ceil(l.duration)),0):e.duration=0;return n.attributes=e,n.segments=r,t.base&&e.indexRange&&(n.sidx=r[0],n.segments=[]),n},Xv=i=>i.map(Gv),vt=(i,t)=>Qc(i.childNodes).filter(({tagName:e})=>e===t),_n=i=>i.textContent.trim(),Kv=i=>parseFloat(i.split("/").reduce((t,e)=>t/e)),Hi=i=>{const a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(i);if(!a)return 0;const[l,u,p,g,y,T]=a.slice(1);return parseFloat(l||0)*31536e3+parseFloat(u||0)*2592e3+parseFloat(p||0)*86400+parseFloat(g||0)*3600+parseFloat(y||0)*60+parseFloat(T||0)},Yv=i=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(i)&&(i+="Z"),Date.parse(i)),Fu={mediaPresentationDuration:i=>Hi(i),availabilityStartTime:i=>Yv(i)/1e3,minimumUpdatePeriod:i=>Hi(i),suggestedPresentationDelay:i=>Hi(i),type:i=>i,timeShiftBufferDepth:i=>Hi(i),start:i=>Hi(i),width:i=>parseInt(i,10),height:i=>parseInt(i,10),bandwidth:i=>parseInt(i,10),frameRate:i=>Kv(i),startNumber:i=>parseInt(i,10),timescale:i=>parseInt(i,10),presentationTimeOffset:i=>parseInt(i,10),duration(i){const t=parseInt(i,10);return isNaN(t)?Hi(i):t},d:i=>parseInt(i,10),t:i=>parseInt(i,10),r:i=>parseInt(i,10),presentationTime:i=>parseInt(i,10),DEFAULT:i=>i},It=i=>i&&i.attributes?Qc(i.attributes).reduce((t,e)=>{const s=Fu[e.name]||Fu.DEFAULT;return t[e.name]=s(e.value),t},{}):{},Qv={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},zr=(i,t)=>t.length?us(i.map(function(e){return t.map(function(s){const n=_n(s),r=Hr(e.baseUrl,n),a=Lt(It(s),{baseUrl:r});return r!==n&&!a.serviceLocation&&e.serviceLocation&&(a.serviceLocation=e.serviceLocation),a})})):i,bl=i=>{const t=vt(i,"SegmentTemplate")[0],e=vt(i,"SegmentList")[0],s=e&&vt(e,"SegmentURL").map(y=>Lt({tag:"SegmentURL"},It(y))),n=vt(i,"SegmentBase")[0],r=e||t,a=r&&vt(r,"SegmentTimeline")[0],l=e||n||t,u=l&&vt(l,"Initialization")[0],p=t&&It(t);p&&u?p.initialization=u&&It(u):p&&p.initialization&&(p.initialization={sourceURL:p.initialization});const g={template:p,segmentTimeline:a&&vt(a,"S").map(y=>It(y)),list:e&&Lt(It(e),{segmentUrls:s,initialization:It(u)}),base:n&&Lt(It(n),{initialization:It(u)})};return Object.keys(g).forEach(y=>{g[y]||delete g[y]}),g},Jv=(i,t,e)=>s=>{const n=vt(s,"BaseURL"),r=zr(t,n),a=Lt(i,It(s)),l=bl(s);return r.map(u=>({segmentInfo:Lt(e,l),attributes:Lt(a,u)}))},Zv=i=>i.reduce((t,e)=>{const s=It(e);s.schemeIdUri&&(s.schemeIdUri=s.schemeIdUri.toLowerCase());const n=Qv[s.schemeIdUri];if(n){t[n]={attributes:s};const r=vt(e,"cenc:pssh")[0];if(r){const a=_n(r);t[n].pssh=a&&H_(a)}}return t},{}),t0=i=>{if(i.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof i.value!="string"?[]:i.value.split(";")).map(t=>{let e,s;return s=t,/^CC\d=/.test(t)?[e,s]=t.split("="):/^CC\d$/.test(t)&&(e=t),{channel:e,language:s}});if(i.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof i.value!="string"?[]:i.value.split(";")).map(t=>{const e={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[s,n=""]=t.split("=");e.channel=s,e.language=t,n.split(",").forEach(r=>{const[a,l]=r.split(":");a==="lang"?e.language=l:a==="er"?e.easyReader=Number(l):a==="war"?e.aspectRatio=Number(l):a==="3D"&&(e["3D"]=Number(l))})}else e.language=t;return e.channel&&(e.channel="SERVICE"+e.channel),e})},e0=i=>us(vt(i.node,"EventStream").map(t=>{const e=It(t),s=e.schemeIdUri;return vt(t,"Event").map(n=>{const r=It(n),a=r.presentationTime||0,l=e.timescale||1,u=r.duration||0,p=a/l+i.attributes.start;return{schemeIdUri:s,value:e.value,id:r.id,start:p,end:p+u/l,messageData:_n(n)||r.messageData,contentEncoding:e.contentEncoding,presentationTimeOffset:e.presentationTimeOffset||0}})})),i0=(i,t,e)=>s=>{const n=It(s),r=zr(t,vt(s,"BaseURL")),a=vt(s,"Role")[0],l={role:It(a)};let u=Lt(i,n,l);const p=vt(s,"Accessibility")[0],g=t0(It(p));g&&(u=Lt(u,{captionServices:g}));const y=vt(s,"Label")[0];if(y&&y.childNodes.length){const x=y.childNodes[0].nodeValue.trim();u=Lt(u,{label:x})}const T=Zv(vt(s,"ContentProtection"));Object.keys(T).length&&(u=Lt(u,{contentProtection:T}));const w=bl(s),_=vt(s,"Representation"),k=Lt(e,w);return us(_.map(Jv(u,r,k)))},s0=(i,t)=>(e,s)=>{const n=zr(t,vt(e.node,"BaseURL")),r=Lt(i,{periodStart:e.attributes.start});typeof e.attributes.duration=="number"&&(r.periodDuration=e.attributes.duration);const a=vt(e.node,"AdaptationSet"),l=bl(e.node);return us(a.map(i0(r,n,l)))},n0=(i,t)=>{if(i.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!i.length)return null;const e=Lt({serverURL:_n(i[0])},It(i[0]));return e.queryBeforeStart=e.queryBeforeStart==="true",e},r0=({attributes:i,priorPeriodAttributes:t,mpdType:e})=>typeof i.start=="number"?i.start:t&&typeof t.start=="number"&&typeof t.duration=="number"?t.start+t.duration:t||e!=="static"?null:0,a0=(i,t={})=>{const{manifestUri:e="",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=vt(i,"Period");if(!a.length)throw new Error(ds.INVALID_NUMBER_OF_PERIOD);const l=vt(i,"Location"),u=It(i),p=zr([{baseUrl:e}],vt(i,"BaseURL")),g=vt(i,"ContentSteering");u.type=u.type||"static",u.sourceDuration=u.mediaPresentationDuration||0,u.NOW=s,u.clientOffset=n,l.length&&(u.locations=l.map(_n));const y=[];return a.forEach((T,w)=>{const _=It(T),k=y[w-1];_.start=r0({attributes:_,priorPeriodAttributes:k?k.attributes:null,mpdType:u.type}),y.push({node:T,attributes:_})}),{locations:u.locations,contentSteeringInfo:n0(g,r),representationInfo:us(y.map(s0(u,p))),eventStream:us(y.map(e0))}},ep=i=>{if(i==="")throw new Error(ds.DASH_EMPTY_MANIFEST);const t=new fv;let e,s;try{e=t.parseFromString(i,"application/xml"),s=e&&e.documentElement.tagName==="MPD"?e.documentElement:null}catch{}if(!s||s&&s.getElementsByTagName("parsererror").length>0)throw new Error(ds.DASH_INVALID_XML);return s},o0=i=>{const t=vt(i,"UTCTiming")[0];if(!t)return null;const e=It(t);switch(e.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":e.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":e.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":e.method="DIRECT",e.value=Date.parse(e.value);break;default:throw new Error(ds.UNSUPPORTED_UTC_TIMING_SCHEME)}return e},l0=(i,t={})=>{const e=a0(ep(i),t),s=Xv(e.representationInfo);return Fv({dashPlaylists:s,locations:e.locations,contentSteering:e.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:e.eventStream})},h0=i=>o0(ep(i));var qu=Math.pow(2,32),ju=function(i){var t,e=new DataView(i.buffer,i.byteOffset,i.byteLength);return e.getBigUint64?(t=e.getBigUint64(0))0;s+=12,n--)e.references.push({referenceType:(128&i[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&i[s+8]),sapType:(112&i[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return e});var d0=W([73,68,51]),c0=function(i,t){t===void 0&&(t=0);var e=(i=W(i))[t+5],s=i[t+6]<<21|i[t+7]<<14|i[t+8]<<7|i[t+9];return(16&e)>>4?s+20:s+10},Ks=function i(t,e){return e===void 0&&(e=0),(t=W(t)).length-e<10||!_t(t,d0,{offset:e})?e:i(t,e+=c0(t,e))},$u=function(i){return typeof i=="string"?Ic(i):i},p0=function(i){return Array.isArray(i)?i.map(function(t){return $u(t)}):[$u(i)]},m0=function i(t,e,s){s===void 0&&(s=!1),e=p0(e),t=W(t);var n=[];if(!e.length)return n;for(var r=0;r>>0,l=t.subarray(r+4,r+8);if(a===0)break;var u=r+a;if(u>t.length){if(s)break;u=t.length}var p=t.subarray(r+8,u);_t(l,e[0])&&(e.length===1?n.push(p):n.push.apply(n,i(p,e.slice(1),s))),r=u}return n},Jn={EBML:W([26,69,223,163]),DocType:W([66,130]),Segment:W([24,83,128,103]),SegmentInfo:W([21,73,169,102]),Tracks:W([22,84,174,107]),Track:W([174]),TrackNumber:W([215]),DefaultDuration:W([35,227,131]),TrackEntry:W([174]),TrackType:W([131]),FlagDefault:W([136]),CodecID:W([134]),CodecPrivate:W([99,162]),VideoTrack:W([224]),AudioTrack:W([225]),Cluster:W([31,67,182,117]),Timestamp:W([231]),TimestampScale:W([42,215,177]),BlockGroup:W([160]),BlockDuration:W([155]),Block:W([161]),SimpleBlock:W([163])},Oo=[128,64,32,16,8,4,2,1],g0=function(i){for(var t=1,e=0;e=e.length)return e.length;var n=Tr(e,s,!1);if(_t(t.bytes,n.bytes))return s;var r=Tr(e,s+n.length);return i(t,e,s+r.length+r.value+n.length)},Vu=function i(t,e){e=f0(e),t=W(t);var s=[];if(!e.length)return s;for(var n=0;nt.length?t.length:l+a.value,p=t.subarray(l,u);_t(e[0],r.bytes)&&(e.length===1?s.push(p):s=s.concat(i(p,e.slice(1)))),n+=r.length+a.length+p.length}return s},_0=W([0,0,0,1]),v0=W([0,0,1]),b0=W([0,0,3]),T0=function(i){for(var t=[],e=1;e>1&63),e.indexOf(u)!==-1&&(n=r+l),r+=l+(t==="h264"?1:2)}else r++}return i.subarray(0,0)},S0=function(i,t,e){return ip(i,"h264",t,e)},E0=function(i,t,e){return ip(i,"h265",t,e)},Ft={webm:W([119,101,98,109]),matroska:W([109,97,116,114,111,115,107,97]),flac:W([102,76,97,67]),ogg:W([79,103,103,83]),ac3:W([11,119]),riff:W([82,73,70,70]),avi:W([65,86,73]),wav:W([87,65,86,69]),"3gp":W([102,116,121,112,51,103]),mp4:W([102,116,121,112]),fmp4:W([115,116,121,112]),mov:W([102,116,121,112,113,116]),moov:W([109,111,111,118]),moof:W([109,111,111,102])},cs={aac:function(i){var t=Ks(i);return _t(i,[255,16],{offset:t,mask:[255,22]})},mp3:function(i){var t=Ks(i);return _t(i,[255,2],{offset:t,mask:[255,6]})},webm:function(i){var t=Vu(i,[Jn.EBML,Jn.DocType])[0];return _t(t,Ft.webm)},mkv:function(i){var t=Vu(i,[Jn.EBML,Jn.DocType])[0];return _t(t,Ft.matroska)},mp4:function(i){return!cs["3gp"](i)&&!cs.mov(i)&&(!(!_t(i,Ft.mp4,{offset:4})&&!_t(i,Ft.fmp4,{offset:4}))||!(!_t(i,Ft.moof,{offset:4})&&!_t(i,Ft.moov,{offset:4}))||void 0)},mov:function(i){return _t(i,Ft.mov,{offset:4})},"3gp":function(i){return _t(i,Ft["3gp"],{offset:4})},ac3:function(i){var t=Ks(i);return _t(i,Ft.ac3,{offset:t})},ts:function(i){if(i.length<189&&i.length>=1)return i[0]===71;for(var t=0;t+1880},Ga=9e4;ap=function(i,t){return sp(rp(i,t))},op=function(i,t){return np(Ro(i),t)},lp=function(i,t,e){return Ro(e?i:i-t)};var ki={ONE_SECOND_IN_TS:Ga,secondsToVideoTs:sp=function(i){return i*Ga},secondsToAudioTs:np=function(i,t){return i*t},videoTsToSeconds:Ro=function(i){return i/Ga},audioTsToSeconds:rp=function(i,t){return i/t},audioTsToVideoTs:ap,videoTsToAudioTs:op,metadataTsToSeconds:lp},Mo="8.12.0";const Ve={},hi=function(i,t){return Ve[i]=Ve[i]||[],t&&(Ve[i]=Ve[i].concat(t)),Ve[i]},k0=function(i,t){hi(i,t)},hp=function(i,t){const e=hi(i).indexOf(t);return!(e<=-1)&&(Ve[i]=Ve[i].slice(),Ve[i].splice(e,1),!0)},x0=function(i,t){hi(i,[].concat(t).map(e=>{const s=(...n)=>(hp(i,s),e(...n));return s}))},Sr={prefixed:!0},mr=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],zu=mr[0];let Ys;for(let i=0;i(s,n,r)=>{const a=t.levels[n],l=new RegExp(`^(${a})$`);let u=i;if(s!=="log"&&r.unshift(s.toUpperCase()+":"),e&&(u=`%c${i}`,r.unshift(e)),r.unshift(u+":"),Gt){Gt.push([].concat(r));const g=Gt.length-1e3;Gt.splice(0,g>0?g:0)}if(!E.console)return;let p=E.console[s];p||s!=="debug"||(p=E.console.info||E.console.log),p&&a&&l.test(s)&&p[Array.isArray(r)?"apply":"call"](E.console,r)};function Uo(i,t=":",e=""){let s,n="info";const r=function(...a){s("log",n,a)};return s=I0(i,r,e),r.createLogger=(a,l,u)=>{const p=l!==void 0?l:t;return Uo(`${i} ${p} ${a}`,p,u!==void 0?u:e)},r.createNewLogger=(a,l,u)=>Uo(a,l,u),r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=a=>{if(typeof a=="string"){if(!r.levels.hasOwnProperty(a))throw new Error(`"${a}" in not a valid log level`);n=a}return n},r.history=()=>Gt?[].concat(Gt):[],r.history.filter=a=>(Gt||[]).filter(l=>new RegExp(`.*${a}.*`).test(l[0])),r.history.clear=()=>{Gt&&(Gt.length=0)},r.history.disable=()=>{Gt!==null&&(Gt.length=0,Gt=null)},r.history.enable=()=>{Gt===null&&(Gt=[])},r.error=(...a)=>s("error",n,a),r.warn=(...a)=>s("warn",n,a),r.debug=(...a)=>s("debug",n,a),r}const J=Uo("VIDEOJS"),up=J.createLogger,A0=Object.prototype.toString,dp=function(i){return Me(i)?Object.keys(i):[]};function ss(i,t){dp(i).forEach(e=>t(i[e],e))}function cp(i,t,e=0){return dp(i).reduce((s,n)=>t(s,i[n],n),e)}function Me(i){return!!i&&typeof i=="object"}function ps(i){return Me(i)&&A0.call(i)==="[object Object]"&&i.constructor===Object}function ht(...i){const t={};return i.forEach(e=>{e&&ss(e,(s,n)=>{ps(s)?(ps(t[n])||(t[n]={}),t[n]=ht(t[n],s)):t[n]=s})}),t}function pp(i={}){const t=[];for(const e in i)if(i.hasOwnProperty(e)){const s=i[e];t.push(s)}return t}function Er(i,t,e,s=!0){const n=a=>Object.defineProperty(i,t,{value:a,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const a=e();return n(a),a}};return s&&(r.set=n),Object.defineProperty(i,t,r)}var P0=Object.freeze({__proto__:null,each:ss,reduce:cp,isObject:Me,isPlain:ps,merge:ht,values:pp,defineLazyProperty:Er});let mp,Sl=!1,gp=null,Oe=!1,fp=!1,Gi=!1,Xi=!1,Ne=!1,Bo=null,wr=null,yp=null,Cr=!1,kr=!1,xr=!1,Wr=!1,Fo=!1,qo=!1,jo=!1;const cn=!!(vs()&&("ontouchstart"in E||E.navigator.maxTouchPoints||E.DocumentTouch&&E.document instanceof E.DocumentTouch)),ii=E.navigator&&E.navigator.userAgentData;if(ii&&ii.platform&&ii.brands&&(Oe=ii.platform==="Android",Gi=!!ii.brands.find(i=>i.brand==="Microsoft Edge"),Xi=!!ii.brands.find(i=>i.brand==="Chromium"),Ne=!Gi&&Xi,Bo=wr=(ii.brands.find(i=>i.brand==="Chromium")||{}).version||null,kr=ii.platform==="Windows"),!Xi){const i=E.navigator&&E.navigator.userAgent||"";Sl=/iPod/i.test(i),gp=function(){const t=i.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),Oe=/Android/i.test(i),mp=function(){const t=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const e=t[1]&&parseFloat(t[1]),s=t[2]&&parseFloat(t[2]);return e&&s?parseFloat(t[1]+"."+t[2]):e||null}(),fp=/Firefox/i.test(i),Gi=/Edg/i.test(i),Xi=/Chrome/i.test(i)||/CriOS/i.test(i),Ne=!Gi&&Xi,Bo=wr=function(){const t=i.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),yp=function(){const t=/MSIE\s(\d+)\.\d/.exec(i);let e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(i)&&/rv:11.0/.test(i)&&(e=11),e}(),Fo=/Tizen/i.test(i),qo=/Web0S/i.test(i),jo=Fo||qo,Cr=/Safari/i.test(i)&&!Ne&&!Oe&&!Gi&&!jo,kr=/Windows/i.test(i),xr=/iPad/i.test(i)||Cr&&cn&&!/iPhone/i.test(i),Wr=/iPhone/i.test(i)&&!xr}const Ht=Wr||xr||Sl,Gr=(Cr||Ht)&&!Ne;var _p=Object.freeze({__proto__:null,get IS_IPOD(){return Sl},get IOS_VERSION(){return gp},get IS_ANDROID(){return Oe},get ANDROID_VERSION(){return mp},get IS_FIREFOX(){return fp},get IS_EDGE(){return Gi},get IS_CHROMIUM(){return Xi},get IS_CHROME(){return Ne},get CHROMIUM_VERSION(){return Bo},get CHROME_VERSION(){return wr},get IE_VERSION(){return yp},get IS_SAFARI(){return Cr},get IS_WINDOWS(){return kr},get IS_IPAD(){return xr},get IS_IPHONE(){return Wr},get IS_TIZEN(){return Fo},get IS_WEBOS(){return qo},get IS_SMART_TV(){return jo},TOUCH_ENABLED:cn,IS_IOS:Ht,IS_ANY_SAFARI:Gr});function Wu(i){return typeof i=="string"&&!!i.trim()}function D0(i){if(i.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function vs(){return j===E.document}function bs(i){return Me(i)&&i.nodeType===1}function vp(){try{return E.parent!==E.self}catch{return!0}}function bp(i){return function(t,e){if(!Wu(t))return j[i](null);Wu(e)&&(e=j.querySelector(e));const s=bs(e)?e:j;return s[i]&&s[i](t)}}function Y(i="div",t={},e={},s){const n=j.createElement(i);return Object.getOwnPropertyNames(t).forEach(function(r){const a=t[r];r==="textContent"?ci(n,a):n[r]===a&&r!=="tabIndex"||(n[r]=a)}),Object.getOwnPropertyNames(e).forEach(function(r){n.setAttribute(r,e[r])}),s&&El(n,s),n}function ci(i,t){return i.textContent===void 0?i.innerText=t:i.textContent=t,i}function $o(i,t){t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)}function tn(i,t){return D0(t),i.classList.contains(t)}function Pi(i,...t){return i.classList.add(...t.reduce((e,s)=>e.concat(s.split(/\s+/)),[])),i}function Xr(i,...t){return i?(i.classList.remove(...t.reduce((e,s)=>e.concat(s.split(/\s+/)),[])),i):(J.warn("removeClass was called with an element that doesn't exist"),null)}function Tp(i,t,e){return typeof e=="function"&&(e=e(i,t)),typeof e!="boolean"&&(e=void 0),t.split(/\s+/).forEach(s=>i.classList.toggle(s,e)),i}function Sp(i,t){Object.getOwnPropertyNames(t).forEach(function(e){const s=t[e];s==null||s===!1?i.removeAttribute(e):i.setAttribute(e,s===!0?"":s)})}function oi(i){const t={},e=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(i&&i.attributes&&i.attributes.length>0){const s=i.attributes;for(let n=s.length-1;n>=0;n--){const r=s[n].name;let a=s[n].value;e.includes(r)&&(a=a!==null),t[r]=a}}return t}function Ep(i,t){return i.getAttribute(t)}function ms(i,t,e){i.setAttribute(t,e)}function Kr(i,t){i.removeAttribute(t)}function wp(){j.body.focus(),j.onselectstart=function(){return!1}}function Cp(){j.onselectstart=function(){return!0}}function gs(i){if(i&&i.getBoundingClientRect&&i.parentNode){const t=i.getBoundingClientRect(),e={};return["bottom","height","left","right","top","width"].forEach(s=>{t[s]!==void 0&&(e[s]=t[s])}),e.height||(e.height=parseFloat(fs(i,"height"))),e.width||(e.width=parseFloat(fs(i,"width"))),e}}function pn(i){if(!i||i&&!i.offsetParent)return{left:0,top:0,width:0,height:0};const t=i.offsetWidth,e=i.offsetHeight;let s=0,n=0;for(;i.offsetParent&&i!==j[Sr.fullscreenElement];)s+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;return{left:s,top:n,width:t,height:e}}function Yr(i,t){const e={x:0,y:0};if(Ht){let g=i;for(;g&&g.nodeName.toLowerCase()!=="html";){const y=fs(g,"transform");if(/^matrix/.test(y)){const T=y.slice(7,-1).split(/,\s/).map(Number);e.x+=T[4],e.y+=T[5]}else if(/^matrix3d/.test(y)){const T=y.slice(9,-1).split(/,\s/).map(Number);e.x+=T[12],e.y+=T[13]}g=g.parentNode}}const s={},n=pn(t.target),r=pn(i),a=r.width,l=r.height;let u=t.offsetY-(r.top-n.top),p=t.offsetX-(r.left-n.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-r.left,u=t.changedTouches[0].pageY+r.top,Ht&&(p-=e.x,u-=e.y)),s.y=1-Math.max(0,Math.min(1,u/l)),s.x=Math.max(0,Math.min(1,p/a)),s}function kp(i){return Me(i)&&i.nodeType===3}function Qr(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function xp(i){return typeof i=="function"&&(i=i()),(Array.isArray(i)?i:[i]).map(t=>(typeof t=="function"&&(t=t()),bs(t)||kp(t)?t:typeof t=="string"&&/\S/.test(t)?j.createTextNode(t):void 0)).filter(t=>t)}function El(i,t){return xp(t).forEach(e=>i.appendChild(e)),i}function Ip(i,t){return El(Qr(i),t)}function mn(i){return i.button===void 0&&i.buttons===void 0||i.button===0&&i.buttons===void 0||i.type==="mouseup"&&i.button===0&&i.buttons===0||i.button===0&&i.buttons===1}const ui=bp("querySelector"),Ap=bp("querySelectorAll");function fs(i,t){if(!i||!t)return"";if(typeof E.getComputedStyle=="function"){let e;try{e=E.getComputedStyle(i)}catch{return""}return e?e.getPropertyValue(t)||e[t]:""}return""}function Pp(i){[...j.styleSheets].forEach(t=>{try{const e=[...t.cssRules].map(n=>n.cssText).join(""),s=j.createElement("style");s.textContent=e,i.document.head.appendChild(s)}catch{const s=j.createElement("link");s.rel="stylesheet",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,i.document.head.appendChild(s)}})}var Gu=Object.freeze({__proto__:null,isReal:vs,isEl:bs,isInFrame:vp,createEl:Y,textContent:ci,prependTo:$o,hasClass:tn,addClass:Pi,removeClass:Xr,toggleClass:Tp,setAttributes:Sp,getAttributes:oi,getAttribute:Ep,setAttribute:ms,removeAttribute:Kr,blockTextSelection:wp,unblockTextSelection:Cp,getBoundingClientRect:gs,findPosition:pn,getPointerPosition:Yr,isTextNode:kp,emptyEl:Qr,normalizeContent:xp,appendContent:El,insertContent:Ip,isSingleLeftClick:mn,$:ui,$$:Ap,computedStyle:fs,copyStyleSheetsToWindow:Pp});let Ho,Dp=!1;const L0=function(){if(Ho.options.autoSetup===!1)return;const i=Array.prototype.slice.call(j.getElementsByTagName("video")),t=Array.prototype.slice.call(j.getElementsByTagName("audio")),e=Array.prototype.slice.call(j.getElementsByTagName("video-js")),s=i.concat(t,e);if(s&&s.length>0)for(let n=0,r=s.length;n-1&&(n={passive:!0}),i.addEventListener(t,s.dispatcher,n)}else i.attachEvent&&i.attachEvent("on"+t,s.dispatcher)}function Ut(i,t,e){if(!$t.has(i))return;const s=$t.get(i);if(!s.handlers)return;if(Array.isArray(t))return wl(Ut,i,t,e);const n=function(a,l){s.handlers[l]=[],Xu(a,l)};if(t===void 0){for(const a in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},a)&&n(i,a);return}const r=s.handlers[t];if(r)if(e){if(e.guid)for(let a=0;a=t&&(i(...s),e=n)}},Np=function(i,t,e,s=E){let n;const r=()=>{s.clearTimeout(n),n=null},a=function(){const l=this,u=arguments;let p=function(){n=null,p=null,e||i.apply(l,u)};!n&&e&&i.apply(l,u),s.clearTimeout(n),n=s.setTimeout(p,t)};return a.cancel=r,a};var U0=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:ue,bind_:ut,throttle:Ue,debounce:Np});let js;class le{on(t,e){const s=this.addEventListener;this.addEventListener=()=>{},ae(this,t,e),this.addEventListener=s}off(t,e){Ut(this,t,e)}one(t,e){const s=this.addEventListener;this.addEventListener=()=>{},Zr(this,t,e),this.addEventListener=s}any(t,e){const s=this.addEventListener;this.addEventListener=()=>{},Cl(this,t,e),this.addEventListener=s}trigger(t){const e=t.type||t;typeof t=="string"&&(t={type:e}),t=Jr(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Ts(this,t)}queueTrigger(t){js||(js=new Map);const e=t.type||t;let s=js.get(this);s||(s=new Map,js.set(this,s));const n=s.get(e);s.delete(e),E.clearTimeout(n);const r=E.setTimeout(()=>{s.delete(e),s.size===0&&(s=null,js.delete(this)),this.trigger(t)},0);s.set(e,r)}}le.prototype.allowedEvents_={},le.prototype.addEventListener=le.prototype.on,le.prototype.removeEventListener=le.prototype.off,le.prototype.dispatchEvent=le.prototype.trigger;const ta=i=>typeof i.name=="function"?i.name():typeof i.name=="string"?i.name:i.name_?i.name_:i.constructor&&i.constructor.name?i.constructor.name:typeof i,Xe=i=>i instanceof le||!!i.eventBusEl_&&["on","one","off","trigger"].every(t=>typeof i[t]=="function"),B0=(i,t)=>{Xe(i)?t():(i.eventedCallbacks||(i.eventedCallbacks=[]),i.eventedCallbacks.push(t))},Wo=i=>typeof i=="string"&&/\S/.test(i)||Array.isArray(i)&&!!i.length,Ir=(i,t,e)=>{if(!i||!i.nodeName&&!Xe(i))throw new Error(`Invalid target for ${ta(t)}#${e}; must be a DOM node or evented object.`)},Rp=(i,t,e)=>{if(!Wo(i))throw new Error(`Invalid event type for ${ta(t)}#${e}; must be a non-empty string or array.`)},Mp=(i,t,e)=>{if(typeof i!="function")throw new Error(`Invalid listener for ${ta(t)}#${e}; must be a function.`)},Xa=(i,t,e)=>{const s=t.length<3||t[0]===i||t[0]===i.eventBusEl_;let n,r,a;return s?(n=i.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):[n,r,a]=t,Ir(n,i,e),Rp(r,i,e),Mp(a,i,e),a=ut(i,a),{isTargetingSelf:s,target:n,type:r,listener:a}},Ti=(i,t,e,s)=>{Ir(i,i,t),i.nodeName?M0[t](i,e,s):i[t](e,s)},F0={on(...i){const{isTargetingSelf:t,target:e,type:s,listener:n}=Xa(this,i,"on");if(Ti(e,"on",s,n),!t){const r=()=>this.off(e,s,n);r.guid=n.guid;const a=()=>this.off("dispose",r);a.guid=n.guid,Ti(this,"on","dispose",r),Ti(e,"on","dispose",a)}},one(...i){const{isTargetingSelf:t,target:e,type:s,listener:n}=Xa(this,i,"one");if(t)Ti(e,"one",s,n);else{const r=(...a)=>{this.off(e,s,r),n.apply(null,a)};r.guid=n.guid,Ti(e,"one",s,r)}},any(...i){const{isTargetingSelf:t,target:e,type:s,listener:n}=Xa(this,i,"any");if(t)Ti(e,"any",s,n);else{const r=(...a)=>{this.off(e,s,r),n.apply(null,a)};r.guid=n.guid,Ti(e,"any",s,r)}},off(i,t,e){if(!i||Wo(i))Ut(this.eventBusEl_,i,t);else{const s=i,n=t;Ir(s,this,"off"),Rp(n,this,"off"),Mp(e,this,"off"),e=ut(this,e),this.off("dispose",e),s.nodeName?(Ut(s,n,e),Ut(s,"dispose",e)):Xe(s)&&(s.off(n,e),s.off("dispose",e))}},trigger(i,t){Ir(this.eventBusEl_,this,"trigger");const e=i&&typeof i!="string"?i.type:i;if(!Wo(e))throw new Error(`Invalid event type for ${ta(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return Ts(this.eventBusEl_,i,t)}};function kl(i,t={}){const{eventBusKey:e}=t;if(e){if(!i[e].nodeName)throw new Error(`The eventBusKey "${e}" does not refer to an element.`);i.eventBusEl_=i[e]}else i.eventBusEl_=Y("span",{className:"vjs-event-bus"});return Object.assign(i,F0),i.eventedCallbacks&&i.eventedCallbacks.forEach(s=>{s()}),i.on("dispose",()=>{i.off(),[i,i.el_,i.eventBusEl_].forEach(function(s){s&&$t.has(s)&&$t.delete(s)}),E.setTimeout(()=>{i.eventBusEl_=null},0)}),i}const q0={state:{},setState(i){let t;return typeof i=="function"&&(i=i()),ss(i,(e,s)=>{this.state[s]!==e&&(t=t||{},t[s]={from:this.state[s],to:e}),this.state[s]=e}),t&&Xe(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Up(i,t){return Object.assign(i,q0),i.state=Object.assign({},i.state,t),typeof i.handleStateChanged=="function"&&Xe(i)&&i.on("statechanged",i.handleStateChanged),i}const en=function(i){return typeof i!="string"?i:i.replace(/./,t=>t.toLowerCase())},Et=function(i){return typeof i!="string"?i:i.replace(/./,t=>t.toUpperCase())},Bp=function(i,t){return Et(i)===Et(t)};var j0=Object.freeze({__proto__:null,toLowerCase:en,toTitleCase:Et,titleCaseEquals:Bp});class M{constructor(t,e,s){if(!t&&this.play?this.player_=t=this:this.player_=t,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ht({},this.options_),e=this.options_=ht(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){const n=t&&t.id&&t.id()||"no_player";this.id_=`${n}_component_${Te()}`}this.name_=e.name||null,e.el?this.el_=e.el:e.createEl!==!1&&(this.el_=this.createEl()),e.className&&this.el_&&e.className.split(" ").forEach(n=>this.addClass(n)),["on","off","one","any","trigger"].forEach(n=>{this[n]=void 0}),e.evented!==!1&&(kl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Up(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,e.initChildren!==!1&&this.initChildren(),this.ready(s),e.reportTouchActivity!==!1&&this.enableTouchActivity()}on(t,e){}off(t,e){}one(t,e){}any(t,e){}trigger(t,e){}dispose(t={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(t.restoreEl?this.el_.parentNode.replaceChild(t.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(t){return t?(this.options_=ht(this.options_,t),this.options_):this.options_}el(){return this.el_}createEl(t,e,s){return Y(t,e,s)}localize(t,e,s=t){const n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],l=n&&n.split("-")[0],u=r&&r[l];let p=s;return a&&a[t]?p=a[t]:u&&u[t]&&(p=u[t]),e&&(p=p.replace(/\{(\d+)\}/g,function(g,y){const T=e[y-1];let w=T;return T===void 0&&(w=g),w})),p}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(t){return this.childIndex_[t]}getChild(t){if(t)return this.childNameIndex_[t]}getDescendant(...t){t=t.reduce((s,n)=>s.concat(n),[]);let e=this;for(let s=0;s=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(!e)return;t.parentComponent_=null,this.childIndex_[t.id()]=null,this.childNameIndex_[Et(t.name())]=null,this.childNameIndex_[en(t.name())]=null;const s=t.el();s&&s.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}initChildren(){const t=this.options_.children;if(t){const e=this.options_,s=a=>{const l=a.name;let u=a.opts;if(e[l]!==void 0&&(u=e[l]),u===!1)return;u===!0&&(u={}),u.playerOptions=this.options_.playerOptions;const p=this.addChild(l,u);p&&(this[l]=p)};let n;const r=M.getComponent("Tech");n=Array.isArray(t)?t:Object.keys(t),n.concat(Object.keys(this.options_).filter(function(a){return!n.some(function(l){return typeof l=="string"?a===l:a===l.name})})).map(a=>{let l,u;return typeof a=="string"?(l=a,u=t[l]||this.options_[l]||{}):(l=a.name,u=a),{name:l,opts:u}}).filter(a=>{const l=M.getComponent(a.opts.componentClass||Et(a.name));return l&&!r.isTech(l)}).forEach(s)}}buildCSSClass(){return""}ready(t,e=!1){if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)}$(t,e){return ui(t,e||this.contentEl())}$$(t,e){return Ap(t,e||this.contentEl())}hasClass(t){return tn(this.el_,t)}addClass(...t){Pi(this.el_,...t)}removeClass(...t){Xr(this.el_,...t)}toggleClass(t,e){Tp(this.el_,t,e)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(t){return Ep(this.el_,t)}setAttribute(t,e){ms(this.el_,t,e)}removeAttribute(t){Kr(this.el_,t)}width(t,e){return this.dimension("width",t,e)}height(t,e){return this.dimension("height",t,e)}dimensions(t,e){this.width(t,!0),this.height(e)}dimension(t,e,s){if(e!==void 0)return e!==null&&e==e||(e=0),(""+e).indexOf("%")!==-1||(""+e).indexOf("px")!==-1?this.el_.style[t]=e:this.el_.style[t]=e==="auto"?"":e+"px",void(s||this.trigger("componentresize"));if(!this.el_)return 0;const n=this.el_.style[t],r=n.indexOf("px");return parseInt(r!==-1?n.slice(0,r):this.el_["offset"+Et(t)],10)}currentDimension(t){let e=0;if(t!=="width"&&t!=="height")throw new Error("currentDimension only accepts width or height value");if(e=fs(this.el_,t),e=parseFloat(e),e===0||isNaN(e)){const s=`offset${Et(t)}`;e=this.el_[s]}return e}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(t){this.player_&&(X.isEventKey(t,"Tab")||t.stopPropagation(),this.player_.handleKeyDown(t))}handleKeyPress(t){this.handleKeyDown(t)}emitTapEvents(){let t=0,e=null;const s=10,n=200;let r;this.on("touchstart",function(l){l.touches.length===1&&(e={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},t=E.performance.now(),r=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)r=!1;else if(e){const u=l.touches[0].pageX-e.pageX,p=l.touches[0].pageY-e.pageY;Math.sqrt(u*u+p*p)>s&&(r=!1)}});const a=function(){r=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",function(l){e=null,r===!0&&E.performance.now()-t{this.setTimeoutIds_.has(s)&&this.setTimeoutIds_.delete(s),t()},e),this.setTimeoutIds_.add(s),s}clearTimeout(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),E.clearTimeout(t)),t}setInterval(t,e){t=ut(this,t),this.clearTimersOnDispose_();const s=E.setInterval(t,e);return this.setIntervalIds_.add(s),s}clearInterval(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),E.clearInterval(t)),t}requestAnimationFrame(t){var e;return this.clearTimersOnDispose_(),t=ut(this,t),e=E.requestAnimationFrame(()=>{this.rafIds_.has(e)&&this.rafIds_.delete(e),t()}),this.rafIds_.add(e),e}requestNamedAnimationFrame(t,e){if(this.namedRafs_.has(t))return;this.clearTimersOnDispose_(),e=ut(this,e);const s=this.requestAnimationFrame(()=>{e(),this.namedRafs_.has(t)&&this.namedRafs_.delete(t)});return this.namedRafs_.set(t,s),t}cancelNamedAnimationFrame(t){this.namedRafs_.has(t)&&(this.cancelAnimationFrame(this.namedRafs_.get(t)),this.namedRafs_.delete(t))}cancelAnimationFrame(t){return this.rafIds_.has(t)&&(this.rafIds_.delete(t),E.cancelAnimationFrame(t)),t}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([t,e])=>{this[t].forEach((s,n)=>this[e](n))}),this.clearingTimersOnDispose_=!1}))}static registerComponent(t,e){if(typeof t!="string"||!t)throw new Error(`Illegal component name, "${t}"; must be a non-empty string.`);const s=M.getComponent("Tech"),n=s&&s.isTech(e),r=M===e||M.prototype.isPrototypeOf(e.prototype);if(n||!r){let l;throw l=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${t}"; ${l}.`)}t=Et(t),M.components_||(M.components_={});const a=M.getComponent("Player");if(t==="Player"&&a&&a.players){const l=a.players,u=Object.keys(l);if(l&&u.length>0&&u.map(p=>l[p]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return M.components_[t]=e,M.components_[en(t)]=e,e}static getComponent(t){if(t&&M.components_)return M.components_[t]}}function $0(i,t,e){if(typeof t!="number"||t<0||t>e)throw new Error(`Failed to execute '${i}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${e}).`)}function Ku(i,t,e,s){return $0(i,s,e.length-1),e[s][t]}function Ka(i){let t;return t=i===void 0||i.length===0?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:i.length,start:Ku.bind(null,"start",0,i),end:Ku.bind(null,"end",1,i)},E.Symbol&&E.Symbol.iterator&&(t[E.Symbol.iterator]=()=>(i||[]).values()),t}function be(i,t){return Array.isArray(i)?Ka(i):i===void 0||t===void 0?Ka():Ka([[i,t]])}M.registerComponent("Component",M);const Fp=function(i,t){i=i<0?0:i;let e=Math.floor(i%60),s=Math.floor(i/60%60),n=Math.floor(i/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(i)||i===1/0)&&(n=s=e="-"),n=n>0||a>0?n+":":"",s=((n||r>=10)&&s<10?"0"+s:s)+":",e=e<10?"0"+e:e,n+s+e};let xl=Fp;function qp(i){xl=i}function jp(){xl=Fp}function Li(i,t=i){return xl(i,t)}var H0=Object.freeze({__proto__:null,createTimeRanges:be,createTimeRange:be,setFormatTime:qp,resetFormatTime:jp,formatTime:Li});function $p(i,t){let e,s,n=0;if(!t)return 0;i&&i.length||(i=be(0,0));for(let r=0;rt&&(s=t),n+=s-e;return n/t}function Tt(i){if(i instanceof Tt)return i;typeof i=="number"?this.code=i:typeof i=="string"?this.message=i:Me(i)&&(typeof i.code=="number"&&(this.code=i.code),Object.assign(this,i)),this.message||(this.message=Tt.defaultMessages[this.code]||"")}function sn(i){return i!=null&&typeof i.then=="function"}function xe(i){sn(i)&&i.then(null,t=>{})}Tt.prototype.code=0,Tt.prototype.message="",Tt.prototype.status=null,Tt.prototype.metadata=null,Tt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Tt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Tt.MEDIA_ERR_CUSTOM=0,Tt.prototype.MEDIA_ERR_CUSTOM=0,Tt.MEDIA_ERR_ABORTED=1,Tt.prototype.MEDIA_ERR_ABORTED=1,Tt.MEDIA_ERR_NETWORK=2,Tt.prototype.MEDIA_ERR_NETWORK=2,Tt.MEDIA_ERR_DECODE=3,Tt.prototype.MEDIA_ERR_DECODE=3,Tt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Tt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Tt.MEDIA_ERR_ENCRYPTED=5,Tt.prototype.MEDIA_ERR_ENCRYPTED=5;const Ya=function(i){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,e,s)=>(i[e]&&(t[e]=i[e]),t),{cues:i.cues&&Array.prototype.map.call(i.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})};var Yu={textTracksToJson:function(i){const t=i.$$("track"),e=Array.prototype.map.call(t,s=>s.track);return Array.prototype.map.call(t,function(s){const n=Ya(s.track);return s.src&&(n.src=s.src),n}).concat(Array.prototype.filter.call(i.textTracks(),function(s){return e.indexOf(s)===-1}).map(Ya))},jsonToTextTracks:function(i,t){return i.forEach(function(e){const s=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(n=>s.addCue(n))}),t.textTracks()},trackToJson_:Ya};const Qa="vjs-modal-dialog";class ys extends M{constructor(t,e){super(t,e),this.handleKeyDown_=s=>this.handleKeyDown(s),this.close_=s=>this.close(s),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Y("div",{className:`${Qa}-content`},{role:"document"}),this.descEl_=Y("p",{className:`${Qa}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),ci(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Qa} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(t){return typeof t=="boolean"&&this[t?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(t){if(typeof t=="boolean"){const e=this.closeable_=!!t;let s=this.getChild("closeButton");if(e&&!s){const n=this.contentEl_;this.contentEl_=this.el_,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(s,"close",this.close_)}!e&&s&&(this.off(s,"close",this.close_),this.removeChild(s),s.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(t){const e=this.contentEl(),s=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,s.removeChild(e),this.empty(),Ip(e,t),this.trigger("modalfill"),n?s.insertBefore(e,n):s.appendChild(e);const r=this.getChild("closeButton");r&&s.appendChild(r.el_)}empty(){this.trigger("beforemodalempty"),Qr(this.contentEl()),this.trigger("modalempty")}content(t){return t!==void 0&&(this.content_=t),this.content_}conditionalFocus_(){const t=j.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(t){if(t.stopPropagation(),X.isEventKey(t,"Escape")&&this.closeable())return t.preventDefault(),void this.close();if(!X.isEventKey(t,"Tab"))return;const e=this.focusableEls_(),s=this.el_.querySelector(":focus");let n;for(let r=0;r(e instanceof E.HTMLAnchorElement||e instanceof E.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof E.HTMLInputElement||e instanceof E.HTMLSelectElement||e instanceof E.HTMLTextAreaElement||e instanceof E.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof E.HTMLIFrameElement||e instanceof E.HTMLObjectElement||e instanceof E.HTMLEmbedElement||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!==-1||e.hasAttribute("contenteditable"))}}ys.prototype.options_={pauseOnOpen:!0,temporary:!0},M.registerComponent("ModalDialog",ys);class _s extends le{constructor(t=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let e=0;e{this.trigger({track:t,type:"labelchange",target:this})},Xe(t)&&t.addEventListener("labelchange",t.labelchange_)}removeTrack(t){let e;for(let s=0,n=this.length;s=0;e--)if(t[e].enabled){Ja(t,t[e]);break}super(t),this.changing_=!1}addTrack(t){t.enabled&&Ja(this,t),super.addTrack(t),t.addEventListener&&(t.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ja(this,t),this.changing_=!1,this.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))}removeTrack(t){super.removeTrack(t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)}}const Za=function(i,t){for(let e=0;e=0;e--)if(t[e].selected){Za(t,t[e]);break}super(t),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e{this.changing_||(this.changing_=!0,Za(this,t),this.changing_=!1,this.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))}removeTrack(t){super.removeTrack(t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)}}class Hp extends _s{addTrack(t){super.addTrack(t),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),t.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(t.kind)===-1&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(t){super.removeTrack(t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class W0{constructor(t=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let e=0,s=t.length;ee[n],set(){}});Object.defineProperty(this,"label",{get:()=>s,set(n){n!==s&&(s=n,this.trigger("labelchange"))}})}}const Al=function(i){const t=["protocol","hostname","port","pathname","search","hash","host"],e=j.createElement("a");e.href=i;const s={};for(let n=0;n0&&(E.console&&E.console.groupCollapsed&&E.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach(n=>J.error(n)),E.console&&E.console.groupEnd&&E.console.groupEnd()),e.flush()},Zu=function(i,t){const e={uri:i},s=ea(i);s&&(e.cors=s);const n=t.tech_.crossOrigin()==="use-credentials";n&&(e.withCredentials=n),vc(e,ut(this,function(r,a,l){if(r)return J.error(r,a);t.loaded_=!0,typeof E.WebVTT!="function"?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],u=>{if(u.type!=="vttjserror")return Ju(l,t);J.error(`vttjs failed to load, stopping trying to process ${t.src}`)}):Ju(l,t)}))};class vn extends Il{constructor(t={}){if(!t.tech)throw new Error("A tech was not provided.");const e=ht(t,{kind:K0[t.kind]||"subtitles",language:t.language||t.srclang||""});let s=Qu[e.mode]||"disabled";const n=e.default;e.kind!=="metadata"&&e.kind!=="chapters"||(s="hidden"),super(e),this.tech_=e.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const r=new Ar(this.cues_),a=new Ar(this.activeCues_);let l=!1;this.timeupdateHandler=ut(this,function(p={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),p.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):p.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});const u=()=>{this.stopTracking()};this.tech_.one("dispose",u),s!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>n,set(){}},mode:{get:()=>s,set(p){Qu[p]&&s!==p&&(s=p,this.preload_||s==="disabled"||this.cues.length!==0||Zu(this.src,this),this.stopTracking(),s!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?r:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return a;const p=this.tech_.currentTime(),g=[];for(let y=0,T=this.cues.length;y=p&&g.push(w)}if(l=!1,g.length!==this.activeCues_.length)l=!0;else for(let y=0;ys,set(n){typeof n=="boolean"&&n!==s&&(s=n,this.trigger("enabledchange"))}}),e.enabled&&(this.enabled=e.enabled),this.loaded_=!0}}class Wp extends Il{constructor(t={}){const e=ht(t,{kind:G0[t.kind]||""});super(e);let s=!1;Object.defineProperty(this,"selected",{get:()=>s,set(n){typeof n=="boolean"&&n!==s&&(s=n,this.trigger("selectedchange"))}}),e.selected&&(this.selected=e.selected)}}class ze extends le{constructor(t={}){let e;super();const s=new vn(t);this.kind=s.kind,this.src=s.src,this.srclang=s.language,this.label=s.label,this.default=s.default,Object.defineProperties(this,{readyState:{get:()=>e},track:{get:()=>s}}),e=ze.NONE,s.addEventListener("loadeddata",()=>{e=ze.LOADED,this.trigger({type:"load",target:this})})}}ze.prototype.allowedEvents_={load:"load"},ze.NONE=0,ze.LOADING=1,ze.LOADED=2,ze.ERROR=3;const he={audio:{ListClass:V0,TrackClass:zp,capitalName:"Audio"},video:{ListClass:z0,TrackClass:Wp,capitalName:"Video"},text:{ListClass:Hp,TrackClass:vn,capitalName:"Text"}};Object.keys(he).forEach(function(i){he[i].getterName=`${i}Tracks`,he[i].privateName=`${i}Tracks_`});const ns={remoteText:{ListClass:Hp,TrackClass:vn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:W0,TrackClass:ze,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},jt=Object.assign({},he,ns);function Q0(i,t,e,s,n={}){const r=i.textTracks();n.kind=t,e&&(n.label=e),s&&(n.language=s),n.tech=i;const a=new jt.text.TrackClass(n);return r.addTrack(a),a}ns.names=Object.keys(ns),he.names=Object.keys(he),jt.names=[].concat(ns.names).concat(he.names);class K extends M{constructor(t={},e=function(){}){t.reportTouchActivity=!1,super(null,t,e),this.onDurationChange_=s=>this.onDurationChange(s),this.trackProgress_=s=>this.trackProgress(s),this.trackCurrentTime_=s=>this.trackCurrentTime(s),this.stopTrackingCurrentTime_=s=>this.stopTrackingCurrentTime(s),this.disposeSourceHandler_=s=>this.disposeSourceHandler(s),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),jt.names.forEach(s=>{const n=jt[s];t&&t[n.getterName]&&(this[n.privateName]=t[n.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(s=>{t[`native${s}Tracks`]===!1&&(this[`featuresNative${s}Tracks`]=!1)}),t.nativeCaptions===!1||t.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:t.nativeCaptions!==!0&&t.nativeTextTracks!==!0||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=t.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new jt.text.ListClass,this.initTrackListeners(),t.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(t){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(t),1)),this.trigger({src:t,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ut(this,function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,e===1&&this.stopTrackingProgress()}),500)}onDurationChange(t){this.duration_=this.duration()}buffered(){return be(0,0)}bufferedPercent(){return $p(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(he.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(t){(t=[].concat(t)).forEach(e=>{const s=this[`${e}Tracks`]()||[];let n=s.length;for(;n--;){const r=s[n];e==="text"&&this.removeRemoteTextTrack(r),s.removeTrack(r)}})}cleanupAutoTextTracks(){const t=this.autoRemoteTextTracks_||[];let e=t.length;for(;e--;){const s=t[e];this.removeRemoteTextTrack(s)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(t){return t!==void 0&&(this.error_=new Tt(t),this.trigger("error")),this.error_}played(){return this.hasStarted_?be(0,0):be()}play(){}setScrubbing(t){}scrubbing(){}setCurrentTime(t){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){he.names.forEach(t=>{const e=he[t],s=()=>{this.trigger(`${t}trackchange`)},n=this[e.getterName]();n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),this.on("dispose",()=>{n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s)})})}addWebVttScript_(){if(!E.WebVTT)if(j.body.contains(this.el())){if(!this.options_["vtt.js"]&&ps(nu)&&Object.keys(nu).length>0)return void this.trigger("vttjsloaded");const t=j.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=()=>{this.trigger("vttjsloaded")},t.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{t.onload=null,t.onerror=null}),E.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const t=this.textTracks(),e=this.remoteTextTracks(),s=l=>t.addTrack(l.track),n=l=>t.removeTrack(l.track);e.on("addtrack",s),e.on("removetrack",n),this.addWebVttScript_();const r=()=>this.trigger("texttrackchange"),a=()=>{r();for(let l=0;lthis.autoRemoteTextTracks_.addTrack(s.track)),s}removeRemoteTextTrack(t){const e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(t){const e=Te();return!this.isReady_||this.paused()?(this.queuedHanders_.add(e),this.one("playing",()=>{this.queuedHanders_.has(e)&&(this.queuedHanders_.delete(e),t())})):this.requestNamedAnimationFrame(e,t),e}cancelVideoFrameCallback(t){this.queuedHanders_.has(t)?this.queuedHanders_.delete(t):this.cancelNamedAnimationFrame(t)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(t){}overrideNativeVideoTracks(t){}canPlayType(t){return""}static canPlayType(t){return""}static canPlaySource(t,e){return K.canPlayType(t.type)}static isTech(t){return t.prototype instanceof K||t instanceof K||t===K}static registerTech(t,e){if(K.techs_||(K.techs_={}),!K.isTech(e))throw new Error(`Tech ${t} must be a Tech`);if(!K.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!K.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Et(t),K.techs_[t]=e,K.techs_[en(t)]=e,t!=="Tech"&&K.defaultTechOrder_.push(t),e}static getTech(t){if(t)return K.techs_&&K.techs_[t]?K.techs_[t]:(t=Et(t),E&&E.videojs&&E.videojs[t]?(J.warn(`The ${t} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),E.videojs[t]):void 0)}}jt.names.forEach(function(i){const t=jt[i];K.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),K.prototype.featuresVolumeControl=!0,K.prototype.featuresMuteControl=!0,K.prototype.featuresFullscreenResize=!1,K.prototype.featuresPlaybackRate=!1,K.prototype.featuresProgressEvents=!1,K.prototype.featuresSourceset=!1,K.prototype.featuresTimeupdateEvents=!1,K.prototype.featuresNativeTextTracks=!1,K.prototype.featuresVideoFrameCallback=!1,K.withSourceHandlers=function(i){i.registerSourceHandler=function(t,e){let s=i.sourceHandlers;s||(s=i.sourceHandlers=[]),e===void 0&&(e=s.length),s.splice(e,0,t)},i.canPlayType=function(t){const e=i.sourceHandlers||[];let s;for(let n=0;nwi(t,Di[t.type],e,i),1)}function tb(i,t){i.forEach(e=>e.setTech&&e.setTech(t))}function eb(i,t,e){return i.reduceRight(Dl(e),t[e]())}function ib(i,t,e,s){return t[e](i.reduce(Dl(e),s))}function td(i,t,e,s=null){const n="call"+Et(e),r=i.reduce(Dl(n),s),a=r===Pr,l=a?null:t[e](r);return rb(i,e,l,a),l}const sb={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},nb={setCurrentTime:1,setMuted:1,setVolume:1},ed={play:1,pause:1};function Dl(i){return(t,e)=>t===Pr?Pr:e[i]?e[i](t):t}function rb(i,t,e,s){for(let n=i.length-1;n>=0;n--){const r=i[n];r[t]&&r[t](s,e)}}function ab(i){Go[i.id()]=null}function ob(i,t){const e=Go[i.id()];let s=null;if(e==null)return s=t(i),Go[i.id()]=[[t,s]],s;for(let n=0;n{if(!t)return"";if(i.cache_.source.src===t&&i.cache_.source.type)return i.cache_.source.type;const e=i.cache_.sources.filter(n=>n.src===t);if(e.length)return e[0].type;const s=i.$$("source");for(let n=0;n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`;class db extends M{constructor(t,e,s){if(super(t,ht({createEl:!1},e),s),e.playerOptions.sources&&e.playerOptions.sources.length!==0)t.src(e.playerOptions.sources);else for(let n=0,r=e.playerOptions.techOrder;nthis.handleMouseOver(s),this.handleMouseOut_=s=>this.handleMouseOut(s),this.handleClick_=s=>this.handleClick(s),this.handleKeyDown_=s=>this.handleKeyDown(s),this.emitTapEvents(),this.enable()}createEl(t="div",e={},s={}){e=Object.assign({className:this.buildCSSClass(),tabIndex:0},e),t==="button"&&J.error(`Creating a ClickableComponent with an HTML element of ${t} is not supported; use a Button instead.`),s=Object.assign({role:"button"},s),this.tabIndex_=e.tabIndex;const n=Y(t,e,s);return this.player_.options_.experimentalSvgIcons||n.appendChild(Y("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(t){return this.controlTextEl_=Y("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_}controlText(t,e=this.el()){if(t===void 0)return this.controlText_||"Need Text";const s=this.localize(t);this.controlText_=t,ci(this.controlTextEl_,s),this.nonIconControl||this.player_.options_.noUITitleAttributes||e.setAttribute("title",s)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),this.tabIndex_!==void 0&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),this.tabIndex_!==void 0&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(t){X.isEventKey(t,"Space")||X.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):super.handleKeyDown(t)}}M.registerComponent("ClickableComponent",ia);class to extends ia{constructor(t,e){super(t,e),this.update(),this.update_=s=>this.update(s),t.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Y("div",{className:"vjs-poster"})}crossOrigin(t){if(t===void 0)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;t===null||t==="anonymous"||t==="use-credentials"?this.$("img")&&(this.$("img").crossOrigin=t):this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${t}"`)}update(t){const e=this.player().poster();this.setSrc(e),e?this.show():this.hide()}setSrc(t){t?(this.$("img")||this.el_.appendChild(Y("picture",{className:"vjs-poster",tabIndex:-1},{},Y("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=t):this.el_.textContent=""}handleClick(t){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?xe(this.player_.play()):this.player_.pause())}}to.prototype.crossorigin=to.prototype.crossOrigin,M.registerComponent("PosterImage",to);const oe="#222",sd="#ccc",cb={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function eo(i,t){let e;if(i.length===4)e=i[1]+i[1]+i[2]+i[2]+i[3]+i[3];else{if(i.length!==7)throw new Error("Invalid color code provided, "+i+"; must be formatted as e.g. #f0e or #f604e2.");e=i.slice(1)}return"rgba("+parseInt(e.slice(0,2),16)+","+parseInt(e.slice(2,4),16)+","+parseInt(e.slice(4,6),16)+","+t+")"}function $s(i,t,e){try{i.style[t]=e}catch{return}}function nd(i){return i?`${i}px`:""}class pb extends M{constructor(t,e,s){super(t,e,s);const n=a=>this.updateDisplay(a),r=a=>{this.updateDisplayOverlay(),this.updateDisplay(a)};t.on("loadstart",a=>this.toggleDisplay(a)),t.on("texttrackchange",n),t.on("loadedmetadata",a=>{this.updateDisplayOverlay(),this.preselectTrack(a)}),t.ready(ut(this,function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)return void this.hide();t.on("fullscreenchange",r),t.on("playerresize",r);const a=E.screen.orientation||E,l=E.screen.orientation?"change":"orientationchange";a.addEventListener(l,r),t.on("dispose",()=>a.removeEventListener(l,r));const u=this.options_.playerOptions.tracks||[];for(let p=0;p.1&&(s>n?r=Math.round((t-e*n)/2):a=Math.round((e-t/n)/2)),$s(this.el_,"insetInline",nd(r)),$s(this.el_,"insetBlock",nd(a))}updateDisplayState(t){const e=this.player_.textTrackSettings.getValues(),s=t.activeCues;let n=s.length;for(;n--;){const r=s[n];if(!r)continue;const a=r.displayState;if(e.color&&(a.firstChild.style.color=e.color),e.textOpacity&&$s(a.firstChild,"color",eo(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(a.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&$s(a.firstChild,"backgroundColor",eo(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?$s(a,"backgroundColor",eo(e.windowColor,e.windowOpacity)):a.style.backgroundColor=e.windowColor),e.edgeStyle&&(e.edgeStyle==="dropshadow"?a.firstChild.style.textShadow=`2px 2px 3px ${oe}, 2px 2px 4px ${oe}, 2px 2px 5px ${oe}`:e.edgeStyle==="raised"?a.firstChild.style.textShadow=`1px 1px ${oe}, 2px 2px ${oe}, 3px 3px ${oe}`:e.edgeStyle==="depressed"?a.firstChild.style.textShadow=`1px 1px ${sd}, 0 1px ${sd}, -1px -1px ${oe}, 0 -1px ${oe}`:e.edgeStyle==="uniform"&&(a.firstChild.style.textShadow=`0 0 4px ${oe}, 0 0 4px ${oe}, 0 0 4px ${oe}, 0 0 4px ${oe}`)),e.fontPercent&&e.fontPercent!==1){const l=E.parseFloat(a.style.fontSize);a.style.fontSize=l*e.fontPercent+"px",a.style.height="auto",a.style.top="auto"}e.fontFamily&&e.fontFamily!=="default"&&(e.fontFamily==="small-caps"?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=cb[e.fontFamily])}}updateForTrack(t){if(Array.isArray(t)||(t=[t]),typeof E.WebVTT!="function"||t.every(s=>!s.activeCues))return;const e=[];for(let s=0;sthis.handleMouseDown(s))}buildCSSClass(){return"vjs-big-play-button"}handleClick(t){const e=this.player_.play();if(this.mouseused_&&"clientX"in t&&"clientY"in t)return xe(e),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const s=this.player_.getChild("controlBar"),n=s&&s.getChild("playToggle");if(!n)return void this.player_.tech(!0).focus();const r=()=>n.focus();sn(e)?e.then(r,()=>{}):this.setTimeout(r,1)}handleKeyDown(t){this.mouseused_=!1,super.handleKeyDown(t)}handleMouseDown(t){this.mouseused_=!0}}rd.prototype.controlText_="Play Video",M.registerComponent("BigPlayButton",rd);class gb extends re{constructor(t,e){super(t,e),this.setIcon("cancel"),this.controlText(e&&e.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(t){this.trigger({type:"close",bubbles:!1})}handleKeyDown(t){X.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):super.handleKeyDown(t)}}M.registerComponent("CloseButton",gb);class ad extends re{constructor(t,e={}){super(t,e),e.replay=e.replay===void 0||e.replay,this.setIcon("play"),this.on(t,"play",s=>this.handlePlay(s)),this.on(t,"pause",s=>this.handlePause(s)),e.replay&&this.on(t,"ended",s=>this.handleEnded(s))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(t){this.player_.paused()?xe(this.player_.play()):this.player_.pause()}handleSeeked(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)}handlePlay(t){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}ad.prototype.controlText_="Play",M.registerComponent("PlayToggle",ad);class rs extends M{constructor(t,e){super(t,e),this.on(t,["timeupdate","ended","seeking"],s=>this.update(s)),this.updateTextNode_()}createEl(){const t=this.buildCSSClass(),e=super.createEl("div",{className:`${t} vjs-time-control vjs-control`}),s=Y("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return e.appendChild(s),this.contentEl_=Y("span",{className:`${t}-display`},{role:"presentation"}),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(t){(this.player_.options_.enableSmoothSeeking||t.type!=="seeking")&&this.updateContent(t)}updateTextNode_(t=0){t=Li(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,J.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=j.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(t){}}rs.prototype.labelText_="Time",rs.prototype.controlText_="Time",M.registerComponent("TimeDisplay",rs);class io extends rs{buildCSSClass(){return"vjs-current-time"}updateContent(t){let e;e=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(e)}}io.prototype.labelText_="Current Time",io.prototype.controlText_="Current Time",M.registerComponent("CurrentTimeDisplay",io);class so extends rs{constructor(t,e){super(t,e);const s=n=>this.updateContent(n);this.on(t,"durationchange",s),this.on(t,"loadstart",s),this.on(t,"loadedmetadata",s)}buildCSSClass(){return"vjs-duration"}updateContent(t){const e=this.player_.duration();this.updateTextNode_(e)}}so.prototype.labelText_="Duration",so.prototype.controlText_="Duration",M.registerComponent("DurationDisplay",so);class fb extends M{createEl(){const t=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),e=super.createEl("div"),s=super.createEl("span",{textContent:"/"});return e.appendChild(s),t.appendChild(e),t}}M.registerComponent("TimeDivider",fb);class no extends rs{constructor(t,e){super(t,e),this.on(t,"durationchange",s=>this.updateContent(s))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const t=super.createEl();return this.options_.displayNegative!==!1&&t.insertBefore(Y("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t}updateContent(t){if(typeof this.player_.duration()!="number")return;let e;e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e)}}no.prototype.labelText_="Remaining Time",no.prototype.controlText_="Remaining Time",M.registerComponent("RemainingTimeDisplay",no);class yb extends M{constructor(t,e){super(t,e),this.updateShowing(),this.on(this.player(),"durationchange",s=>this.updateShowing(s))}createEl(){const t=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Y("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Y("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(j.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,super.dispose()}updateShowing(t){this.player().duration()===1/0?this.show():this.hide()}}M.registerComponent("LiveDisplay",yb);class od extends re{constructor(t,e){super(t,e),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=s=>this.updateLiveEdgeStatus(s),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const t=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",t),this.textEl_=Y("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function bn(i,t,e){return i=Number(i),Math.min(e,Math.max(t,isNaN(i)?t:i))}od.prototype.controlText_="Seek to live, currently playing live",M.registerComponent("SeekToLive",od);var _b=Object.freeze({__proto__:null,clamp:bn});class Ll extends M{constructor(t,e){super(t,e),this.handleMouseDown_=s=>this.handleMouseDown(s),this.handleMouseUp_=s=>this.handleMouseUp(s),this.handleKeyDown_=s=>this.handleKeyDown(s),this.handleClick_=s=>this.handleClick(s),this.handleMouseMove_=s=>this.handleMouseMove(s),this.update_=s=>this.update(s),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(t,e={},s={}){return e.className=e.className+" vjs-slider",e=Object.assign({tabIndex:0},e),s=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},s),super.createEl(t,e,s)}handleMouseDown(t){const e=this.bar.el_.ownerDocument;t.type==="mousedown"&&t.preventDefault(),t.type!=="touchstart"||Ne||t.preventDefault(),wp(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove_),this.on(e,"mouseup",this.handleMouseUp_),this.on(e,"touchmove",this.handleMouseMove_),this.on(e,"touchend",this.handleMouseUp_),this.handleMouseMove(t,!0)}handleMouseMove(t){}handleMouseUp(t){const e=this.bar.el_.ownerDocument;Cp(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",()=>{const e=this.vertical()?"height":"width";this.bar.el().style[e]=(100*t).toFixed(2)+"%"})),t}getProgress(){return Number(bn(this.getPercent(),0,1).toFixed(4))}calculateDistance(t){const e=Yr(this.el_,t);return this.vertical()?e.y:e.x}handleKeyDown(t){X.isEventKey(t,"Left")||X.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):X.isEventKey(t,"Right")||X.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):super.handleKeyDown(t)}handleClick(t){t.stopPropagation(),t.preventDefault()}vertical(t){if(t===void 0)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}M.registerComponent("Slider",Ll);const ro=(i,t)=>bn(i/t*100,0,100).toFixed(2)+"%";class vb extends M{constructor(t,e){super(t,e),this.partEls_=[],this.on(t,"progress",s=>this.update(s))}createEl(){const t=super.createEl("div",{className:"vjs-load-progress"}),e=Y("span",{className:"vjs-control-text"}),s=Y("span",{textContent:this.localize("Loaded")}),n=j.createTextNode(": ");return this.percentageEl_=Y("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(e),e.appendChild(s),e.appendChild(n),e.appendChild(this.percentageEl_),t}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(t){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const e=this.player_.liveTracker,s=this.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),a=this.partEls_,l=ro(r,n);this.percent_!==l&&(this.el_.style.width=l,ci(this.percentageEl_,l),this.percent_=l);for(let u=0;us.length;u--)this.el_.removeChild(a[u-1]);a.length=s.length})}}M.registerComponent("LoadProgressBar",vb);class bb extends M{constructor(t,e){super(t,e),this.update=Ue(ut(this,this.update),ue)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(t,e,s){const n=pn(this.el_),r=gs(this.player_.el()),a=t.width*e;if(!r||!n)return;let l=t.left-r.left+a,u=t.width-a+(r.right-t.right);u||(u=t.width-a,l=a);let p=n.width/2;ln.width&&(p=n.width),p=Math.round(p),this.el_.style.right=`-${p}px`,this.write(s)}write(t){ci(this.el_,t)}updateTime(t,e,s,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let r;const a=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const l=this.player_.liveTracker.liveWindow(),u=l-e*l;r=(u<1?"":"-")+Li(u,l)}else r=Li(s,a);this.update(t,e,r),n&&n()})}}M.registerComponent("TimeTooltip",bb);class ao extends M{constructor(t,e){super(t,e),this.setIcon("circle"),this.update=Ue(ut(this,this.update),ue)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(t,e){const s=this.getChild("timeTooltip");if(!s)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(t,e,n)}}ao.prototype.options_={children:[]},Ht||Oe||ao.prototype.options_.children.push("timeTooltip"),M.registerComponent("PlayProgressBar",ao);class ld extends M{constructor(t,e){super(t,e),this.update=Ue(ut(this,this.update),ue)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(t,e){const s=e*this.player_.duration();this.getChild("timeTooltip").updateTime(t,e,s,()=>{this.el_.style.left=t.width*e+"px"})}}ld.prototype.options_={children:["timeTooltip"]},M.registerComponent("MouseTimeDisplay",ld);const tr=5,hd=12;class oo extends Ll{constructor(t,e){super(t,e),this.setEventHandlers_()}setEventHandlers_(){this.update_=ut(this,this.update),this.update=Ue(this.update_,ue),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=t=>this.enableInterval_(t),this.disableIntervalHandler_=t=>this.disableInterval_(t),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in j&&"visibilityState"in j&&this.on(j,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(t){j.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(t)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ue))}disableInterval_(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&t.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(t){if(j.visibilityState==="hidden")return;const e=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const s=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),n=this.player_.liveTracker;let r=this.player_.duration();n&&n.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.percent_!==e&&(this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.percent_=e),this.currentTime_===s&&this.duration_===r||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Li(s,r),Li(r,r)],"{1} of {2}")),this.currentTime_=s,this.duration_=r),this.bar&&this.bar.update(gs(this.el()),this.getProgress())}),e}userSeek_(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(t)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const t=this.getCurrentTime_();let e;const s=this.player_.liveTracker;return s&&s.isLive()?(e=(t-s.seekableStart())/s.liveWindow(),s.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e}handleMouseDown(t){mn(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(t))}handleMouseMove(t,e=!1){if(!mn(t)||isNaN(this.player_.duration()))return;let s;e||this.player_.scrubbing()||this.player_.scrubbing(!0);const n=this.calculateDistance(t),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();const a=r.seekableStart(),l=r.liveCurrentTime();if(s=a+n*r.liveWindow(),s>=l&&(s=l),s<=a&&(s=a+.1),s===1/0)return}else s=n*this.player_.duration(),s===this.player_.duration()&&(s-=.1);this.userSeek_(s),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const t=this.getChild("mouseTimeDisplay");t&&t.show()}disable(){super.disable();const t=this.getChild("mouseTimeDisplay");t&&t.hide()}handleMouseUp(t){super.handleMouseUp(t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?xe(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+tr)}stepBack(){this.userSeek_(this.player_.currentTime()-tr)}handleAction(t){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(t){const e=this.player_.liveTracker;if(X.isEventKey(t,"Space")||X.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(X.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(X.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),e&&e.isLive()?this.userSeek_(e.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(X(t))){t.preventDefault(),t.stopPropagation();const s=10*(X.codes[X(t)]-X.codes[0])/100;e&&e.isLive()?this.userSeek_(e.seekableStart()+e.liveWindow()*s):this.userSeek_(this.player_.duration()*s)}else X.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-tr*hd)):X.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+tr*hd)):super.handleKeyDown(t)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in j&&"visibilityState"in j&&this.off(j,"visibilitychange",this.toggleVisibility_),super.dispose()}}oo.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Ht||Oe||oo.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),M.registerComponent("SeekBar",oo);class ud extends M{constructor(t,e){super(t,e),this.handleMouseMove=Ue(ut(this,this.handleMouseMove),ue),this.throttledHandleMouseSeek=Ue(ut(this,this.handleMouseSeek),ue),this.handleMouseUpHandler_=s=>this.handleMouseUp(s),this.handleMouseDownHandler_=s=>this.handleMouseDown(s),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){const e=this.getChild("seekBar");if(!e)return;const s=e.getChild("playProgressBar"),n=e.getChild("mouseTimeDisplay");if(!s&&!n)return;const r=e.el(),a=pn(r);let l=Yr(r,t).x;l=bn(l,0,1),n&&n.update(a,l),s&&s.update(a,e.getProgress())}handleMouseSeek(t){const e=this.getChild("seekBar");e&&e.handleMouseMove(t)}enabled(){return this.enabled_}disable(){if(this.children().forEach(t=>t.disable&&t.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const t=this.getChild("seekBar");this.player_.scrubbing(!1),t.videoWasPlaying&&xe(this.player_.play())}}enable(){this.children().forEach(t=>t.enable&&t.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseDown(t){const e=this.el_.ownerDocument,s=this.getChild("seekBar");s&&s.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUpHandler_),this.on(e,"touchend",this.handleMouseUpHandler_)}handleMouseUp(t){const e=this.getChild("seekBar");e&&e.handleMouseUp(t),this.removeListenersAddedOnMousedownAndTouchstart()}}ud.prototype.options_={children:["seekBar"]},M.registerComponent("ProgressControl",ud);class dd extends re{constructor(t,e){super(t,e),this.setIcon("picture-in-picture-enter"),this.on(t,["enterpictureinpicture","leavepictureinpicture"],s=>this.handlePictureInPictureChange(s)),this.on(t,["disablepictureinpicturechanged","loadedmetadata"],s=>this.handlePictureInPictureEnabledChange(s)),this.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){j.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in E?this.enable():this.disable()}handlePictureInPictureChange(t){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof j.exitPictureInPicture=="function"&&super.show()}}dd.prototype.controlText_="Picture-in-Picture",M.registerComponent("PictureInPictureToggle",dd);class cd extends re{constructor(t,e){super(t,e),this.setIcon("fullscreen-enter"),this.on(t,"fullscreenchange",s=>this.handleFullscreenChange(s)),j[t.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(t){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}cd.prototype.controlText_="Fullscreen",M.registerComponent("FullscreenToggle",cd);const Tb=function(i,t){t.tech_&&!t.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")})};class Sb extends M{createEl(){const t=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",t),t.appendChild(super.createEl("span",{className:"vjs-control-text"})),t}}M.registerComponent("VolumeLevel",Sb);class Eb extends M{constructor(t,e){super(t,e),this.update=Ue(ut(this,this.update),ue)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(t,e,s,n){if(!s){const r=gs(this.el_),a=gs(this.player_.el()),l=t.width*e;if(!a||!r)return;const u=t.left-a.left+l,p=t.width-l+(a.right-t.right);let g=r.width/2;ur.width&&(g=r.width),this.el_.style.right=`-${g}px`}this.write(`${n}%`)}write(t){ci(this.el_,t)}updateVolume(t,e,s,n,r){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(t,e,s,n.toFixed(0)),r&&r()})}}M.registerComponent("VolumeLevelTooltip",Eb);class pd extends M{constructor(t,e){super(t,e),this.update=Ue(ut(this,this.update),ue)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(t,e,s){const n=100*e;this.getChild("volumeLevelTooltip").updateVolume(t,e,s,n,()=>{s?this.el_.style.bottom=t.height*e+"px":this.el_.style.left=t.width*e+"px"})}}pd.prototype.options_={children:["volumeLevelTooltip"]},M.registerComponent("MouseVolumeLevelDisplay",pd);class er extends Ll{constructor(t,e){super(t,e),this.on("slideractive",s=>this.updateLastVolume_(s)),this.on(t,"volumechange",s=>this.updateARIAAttributes(s)),t.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(t){mn(t)&&super.handleMouseDown(t)}handleMouseMove(t){const e=this.getChild("mouseVolumeLevelDisplay");if(e){const s=this.el(),n=gs(s),r=this.vertical();let a=Yr(s,t);a=r?a.y:a.x,a=bn(a,0,1),e.update(n,a,r)}mn(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(t){const e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const t=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(t)})}}er.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Ht||Oe||er.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),er.prototype.playerEvent="volumechange",M.registerComponent("VolumeBar",er);class md extends M{constructor(t,e={}){e.vertical=e.vertical||!1,(e.volumeBar===void 0||ps(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),super(t,e),Tb(this,t),this.throttledHandleMouseMove=Ue(ut(this,this.handleMouseMove),ue),this.handleMouseUpHandler_=s=>this.handleMouseUp(s),this.on("mousedown",s=>this.handleMouseDown(s)),this.on("touchstart",s=>this.handleMouseDown(s)),this.on("mousemove",s=>this.handleMouseMove(s)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${t}`})}handleMouseDown(t){const e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUpHandler_),this.on(e,"touchend",this.handleMouseUpHandler_)}handleMouseUp(t){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseMove(t){this.volumeBar.handleMouseMove(t)}}md.prototype.options_={children:["volumeBar"]},M.registerComponent("VolumeControl",md);const wb=function(i,t){t.tech_&&!t.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(t,"loadstart",function(){t.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")})};class gd extends re{constructor(t,e){super(t,e),wb(this,t),this.on(t,["loadstart","volumechange"],s=>this.update(s))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(t){const e=this.player_.volume(),s=this.player_.lastVolume_();if(e===0){const n=s<.1?.1:s;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(t){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const t=this.player_.volume();let e=3;this.setIcon("volume-high"),Ht&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),t===0||this.player_.muted()?(this.setIcon("volume-mute"),e=0):t<.33?(this.setIcon("volume-low"),e=1):t<.67&&(this.setIcon("volume-medium"),e=2),Xr(this.el_,[0,1,2,3].reduce((s,n)=>s+`${n?" ":""}vjs-vol-${n}`,"")),Pi(this.el_,`vjs-vol-${e}`)}updateControlText_(){const t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}gd.prototype.controlText_="Mute",M.registerComponent("MuteToggle",gd);class fd extends M{constructor(t,e={}){e.inline!==void 0?e.inline=e.inline:e.inline=!0,(e.volumeControl===void 0||ps(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),super(t,e),this.handleKeyPressHandler_=s=>this.handleKeyPress(s),this.on(t,["loadstart"],s=>this.volumePanelState_(s)),this.on(this.muteToggle,"keyup",s=>this.handleKeyPress(s)),this.on(this.volumeControl,"keyup",s=>this.handleVolumeControlKeyUp(s)),this.on("keydown",s=>this.handleKeyPress(s)),this.on("mouseover",s=>this.handleMouseOver(s)),this.on("mouseout",s=>this.handleMouseOut(s)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${t}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(t){X.isEventKey(t,"Esc")&&this.muteToggle.focus()}handleMouseOver(t){this.addClass("vjs-hover"),ae(j,"keyup",this.handleKeyPressHandler_)}handleMouseOut(t){this.removeClass("vjs-hover"),Ut(j,"keyup",this.handleKeyPressHandler_)}handleKeyPress(t){X.isEventKey(t,"Esc")&&this.handleMouseOut()}}fd.prototype.options_={children:["muteToggle","volumeControl"]},M.registerComponent("VolumePanel",fd);class yd extends re{constructor(t,e){super(t,e),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(t.language())])),this.show()):this.hide()}getSkipForwardTime(){const t=this.options_.playerOptions;return t.controlBar&&t.controlBar.skipButtons&&t.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(t){if(isNaN(this.player_.duration()))return;const e=this.player_.currentTime(),s=this.player_.liveTracker,n=s&&s.isLive()?s.seekableEnd():this.player_.duration();let r;r=e+this.skipTime<=n?e+this.skipTime:n,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}yd.prototype.controlText_="Skip Forward",M.registerComponent("SkipForward",yd);class _d extends re{constructor(t,e){super(t,e),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(t.language())])),this.show()):this.hide()}getSkipBackwardTime(){const t=this.options_.playerOptions;return t.controlBar&&t.controlBar.skipButtons&&t.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(t){const e=this.player_.currentTime(),s=this.player_.liveTracker,n=s&&s.isLive()&&s.seekableStart();let r;r=n&&e-this.skipTime<=n?n:e>=this.skipTime?e-this.skipTime:0,this.player_.currentTime(r)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}_d.prototype.controlText_="Skip Backward",M.registerComponent("SkipBackward",_d);class Xp extends M{constructor(t,e){super(t,e),e&&(this.menuButton_=e.menuButton),this.focusedChild_=-1,this.on("keydown",s=>this.handleKeyDown(s)),this.boundHandleBlur_=s=>this.handleBlur(s),this.boundHandleTapClick_=s=>this.handleTapClick(s)}addEventListenerForItem(t){t instanceof M&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(t){t instanceof M&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))}removeChild(t){typeof t=="string"&&(t=this.getChild(t)),this.removeEventListenerForItem(t),super.removeChild(t)}addItem(t){const e=this.addChild(t);e&&this.addEventListenerForItem(e)}createEl(){const t=this.options_.contentElType||"ul";this.contentEl_=Y(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const e=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),ae(e,"click",function(s){s.preventDefault(),s.stopImmediatePropagation()}),e}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(t){const e=t.relatedTarget||j.activeElement;if(!this.children().some(s=>s.el()===e)){const s=this.menuButton_;s&&s.buttonPressed_&&e!==s.el().firstChild&&s.unpressButton()}}handleTapClick(t){if(this.menuButton_){this.menuButton_.unpressButton();const e=this.children();if(!Array.isArray(e))return;const s=e.filter(n=>n.el()===t.target)[0];if(!s)return;s.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(t){X.isEventKey(t,"Left")||X.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(X.isEventKey(t,"Right")||X.isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())}stepForward(){let t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_+1),this.focus(t)}stepBack(){let t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_-1),this.focus(t)}focus(t=0){const e=this.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())}}M.registerComponent("Menu",Xp);class Ol extends M{constructor(t,e={}){super(t,e),this.menuButton_=new re(t,e),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const s=re.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+s,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=r=>this.handleClick(r);this.handleMenuKeyUp_=r=>this.handleMenuKeyUp(r),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",r=>this.handleKeyDown(r)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),ae(j,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",r=>this.handleMouseLeave(r)),this.on("keydown",r=>this.handleSubmenuKeyDown(r))}update(){const t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const t=new Xp(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const e=Y("li",{className:"vjs-menu-title",textContent:Et(this.options_.title),tabIndex:-1}),s=new M(this.player_,{el:e});t.addItem(s)}if(this.items=this.createItems(),this.items)for(let e=0;eX.isEventKey(t,e))||super.handleKeyDown(t)}handleClick(t){this.selected(!0)}selected(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}M.registerComponent("MenuItem",Tn);class Sn extends Tn{constructor(t,e){const s=e.track,n=t.textTracks();e.label=s.label||s.language||"Unknown",e.selected=s.mode==="showing",super(t,e),this.track=s,this.kinds=(e.kinds||[e.kind||this.track.kind]).filter(Boolean);const r=(...l)=>{this.handleTracksChange.apply(this,l)},a=(...l)=>{this.handleSelectedLanguageChange.apply(this,l)};if(t.on(["loadstart","texttrackchange"],r),n.addEventListener("change",r),n.addEventListener("selectedlanguagechange",a),this.on("dispose",function(){t.off(["loadstart","texttrackchange"],r),n.removeEventListener("change",r),n.removeEventListener("selectedlanguagechange",a)}),n.onchange===void 0){let l;this.on(["tap","click"],function(){if(typeof E.Event!="object")try{l=new E.Event("change")}catch{}l||(l=j.createEvent("Event"),l.initEvent("change",!0,!0)),n.dispatchEvent(l)})}this.handleTracksChange()}handleClick(t){const e=this.track,s=this.player_.textTracks();if(super.handleClick(t),s)for(let n=0;n-1&&a.mode==="showing"){s=!1;break}}s!==this.isSelected_&&this.selected(s)}handleSelectedLanguageChange(t){const e=this.player().textTracks();let s=!0;for(let n=0,r=e.length;n-1&&a.mode==="showing"){s=!1;break}}s&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}M.registerComponent("OffTextTrackMenuItem",Kp);class Ss extends Nl{constructor(t,e={}){e.tracks=t.textTracks(),super(t,e)}createItems(t=[],e=Sn){let s;this.label_&&(s=`${this.label_} off`),t.push(new Kp(this.player_,{kinds:this.kinds_,kind:this.kind_,label:s})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let r=0;r-1){const l=new e(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});l.addClass(`vjs-${a.kind}-menu-item`),t.push(l)}}return t}}M.registerComponent("TextTrackButton",Ss);class Yp extends Tn{constructor(t,e){const s=e.track,n=e.cue,r=t.currentTime();e.selectable=!0,e.multiSelectable=!1,e.label=n.text,e.selected=n.startTime<=r&&r{this.items.forEach(n=>{n.selected(this.track_.activeCues[0]===n.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(t){if(t&&t.track&&t.track.kind!=="chapters")return;const e=this.findChaptersTrack();e!==this.track_?(this.setTrack(e),super.update()):(!this.items||e&&e.cues&&e.cues.length!==this.items.length)&&super.update()}setTrack(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const t=this.player_.textTracks()||[];for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.kind===this.kind_)return s}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Et(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const t=[];if(!this.track_)return t;const e=this.track_.cues;if(!e)return t;for(let s=0,n=e.length;s-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Et(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Rl(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=super.createItems(t,Qp),t}}po.prototype.kinds_=["captions","subtitles"],po.prototype.controlText_="Subtitles",M.registerComponent("SubsCapsButton",po);class Jp extends Tn{constructor(t,e){const s=e.track,n=t.audioTracks();e.label=s.label||s.language||"Unknown",e.selected=s.enabled,super(t,e),this.track=s,this.addClass(`vjs-${s.kind}-menu-item`);const r=(...a)=>{this.handleTracksChange.apply(this,a)};n.addEventListener("change",r),this.on("dispose",()=>{n.removeEventListener("change",r)})}createEl(t,e,s){const n=super.createEl(t,e,s),r=n.querySelector(".vjs-menu-item-text");return["main-desc","description"].indexOf(this.options_.track.kind)>=0&&(r.appendChild(Y("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),r.appendChild(Y("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(t){if(super.handleClick(t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let s=0;sthis.update(r))}handleClick(t){super.handleClick(),this.player().playbackRate(this.rate)}update(t){this.selected(this.player().playbackRate()===this.rate)}}Xo.prototype.contentElType="button",M.registerComponent("PlaybackRateMenuItem",Xo);class bd extends Ol{constructor(t,e){super(t,e),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(t,"loadstart",s=>this.updateVisibility(s)),this.on(t,"ratechange",s=>this.updateLabel(s)),this.on(t,"playbackrateschange",s=>this.handlePlaybackRateschange(s))}createEl(){const t=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Y("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const t=this.playbackRates(),e=[];for(let s=t.length-1;s>=0;s--)e.push(new Xo(this.player(),{rate:t[s]+"x"}));return e}handlePlaybackRateschange(t){this.update()}playbackRates(){const t=this.player();return t.playbackRates&&t.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(t){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}bd.prototype.controlText_="Playback Rate",M.registerComponent("PlaybackRateMenuButton",bd);class Zp extends M{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(t="div",e={},s={}){return e.className||(e.className=this.buildCSSClass()),super.createEl(t,e,s)}}M.registerComponent("Spacer",Zp);class kb extends Zp{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}M.registerComponent("CustomControlSpacer",kb);class Td extends M{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Td.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},M.registerComponent("ControlBar",Td);class Sd extends ys{constructor(t,e){super(t,e),this.on(t,"error",s=>{this.open(s)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const t=this.player().error();return t?this.localize(t.message):""}}Sd.prototype.options_=Object.assign({},ys.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),M.registerComponent("ErrorDisplay",Sd);const mo="vjs-text-track-settings",Ed=["#000","Black"],wd=["#00F","Blue"],Cd=["#0FF","Cyan"],kd=["#0F0","Green"],xd=["#F0F","Magenta"],Id=["#F00","Red"],Ad=["#FFF","White"],Pd=["#FF0","Yellow"],go=["1","Opaque"],fo=["0.5","Semi-Transparent"],Dd=["0","Transparent"],Ci={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ed,Ad,Id,kd,wd,Pd,xd,Cd]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[go,fo,Dd]},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Ad,Ed,Id,kd,wd,Pd,xd,Cd]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:i=>i==="1.00"?null:Number(i)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[go,fo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[Dd,fo,go]}};function tm(i,t){if(t&&(i=t(i)),i&&i!=="none")return i}function xb(i,t){return tm(i.options[i.options.selectedIndex].value,t)}function Ib(i,t,e){if(t){for(let s=0;s{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),"click",()=>{this.setDefaults(),this.updateDisplay()}),ss(Ci,s=>{this.on(this.$(s.selector),"change",this.updateDisplay)}),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(t,e="",s="label"){const n=Ci[t],r=n.id.replace("%s",this.id_),a=[e,r].join(" ").trim(),l=`vjs_select_${Te()}`;return[`<${s} id="${r}"${s==="label"?` for="${l}" class="vjs-label"`:""}>`,this.localize(n.label),``,`").join("")}createElFgColor_(){const t=`captions-text-legend-${this.id_}`;return['
',``,this.localize("Text"),"",'',this.createElSelect_("color",t),"",'',this.createElSelect_("textOpacity",t),"","
"].join("")}createElBgColor_(){const t=`captions-background-${this.id_}`;return['
',``,this.localize("Text Background"),"",'',this.createElSelect_("backgroundColor",t),"",'',this.createElSelect_("backgroundOpacity",t),"","
"].join("")}createElWinColor_(){const t=`captions-window-${this.id_}`;return['
',``,this.localize("Caption Area Background"),"",'',this.createElSelect_("windowColor",t),"",'',this.createElSelect_("windowOpacity",t),"","
"].join("")}createElColors_(){return Y("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return Y("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})}createElControls_(){const t=this.localize("restore all settings to the default values");return Y("div",{className:"vjs-track-settings-controls",innerHTML:[`",``].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return cp(Ci,(t,e,s)=>{const n=xb(this.$(e.selector),e.parser);return n!==void 0&&(t[s]=n),t},{})}setValues(t){ss(Ci,(e,s)=>{Ib(this.$(e.selector),t[s],e.parser)})}setDefaults(){ss(Ci,t=>{const e=t.hasOwnProperty("default")?t.default:0;this.$(t.selector).selectedIndex=e})}restoreSettings(){let t;try{t=JSON.parse(E.localStorage.getItem(mo))}catch(e){J.warn(e)}t&&this.setValues(t)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const t=this.getValues();try{Object.keys(t).length?E.localStorage.setItem(mo,JSON.stringify(t)):E.localStorage.removeItem(mo)}catch(e){J.warn(e)}}updateDisplay(){const t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const t=this.player_.controlBar,e=t&&t.subsCapsButton,s=t&&t.captionsButton;e?e.focus():s&&s.focus()}handleLanguagechange(){this.fill()}}M.registerComponent("TextTrackSettings",Ab);class Pb extends M{constructor(t,e){let s=e.ResizeObserver||E.ResizeObserver;e.ResizeObserver===null&&(s=!1),super(t,ht({createEl:!s,reportTouchActivity:!1},e)),this.ResizeObserver=e.ResizeObserver||E.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Np(()=>{this.resizeHandler()},100,!1,this),s?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(t.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const n=this.debouncedHandler_;let r=this.unloadListener_=function(){Ut(this,"resize",n),Ut(this,"unload",r),r=null};ae(this.el_.contentWindow,"unload",r),ae(this.el_.contentWindow,"resize",n)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}M.registerComponent("ResizeManager",Pb);const Db={trackingThreshold:20,liveTolerance:15};class Lb extends M{constructor(t,e){super(t,ht(Db,e,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=s=>this.handlePlay(s),this.handleFirstTimeupdate_=s=>this.handleFirstTimeupdate(s),this.handleSeeked_=s=>this.handleSeeked(s),this.seekToLiveEdge_=s=>this.seekToLiveEdge(s),this.reset_(),this.on(this.player_,"durationchange",s=>this.handleDurationchange(s)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const t=this.player_.seekable();if(!t||!t.length)return;const e=Number(E.performance.now().toFixed(4)),s=this.lastTime_===-1?0:(e-this.lastTime_)/1e3;this.lastTime_=e,this.pastSeekEnd_=this.pastSeekEnd()+s;const n=this.liveCurrentTime(),r=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,ue),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&t>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const t=this.player_.seekable(),e=[];let s=t?t.length:0;for(;s--;)e.push(t.end(s));return e.length?e.sort()[e.length-1]:1/0}seekableStart(){const t=this.player_.seekable(),e=[];let s=t?t.length:0;for(;s--;)e.push(t.start(s));return e.length?e.sort()[0]:0}liveWindow(){const t=this.liveCurrentTime();return t===1/0?0:t-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const t=this.seekableEnd();return this.lastSeekEnd_!==-1&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}M.registerComponent("LiveTracker",Lb);class Ob extends M{constructor(t,e){super(t,e),this.on("statechanged",s=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Y("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Te()}`}),description:Y("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Te()}`})},Y("div",{className:"vjs-title-bar"},{},pp(this.els))}updateDom_(){const t=this.player_.tech_,e=t&&t.el_,s={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(n=>{const r=this.state[n],a=this.els[n],l=s[n];Qr(a),r&&ci(a,r),e&&(e.removeAttribute(l),r&&e.setAttribute(l,a.id))}),this.state.title||this.state.description?this.show():this.hide()}update(t){this.setState(t)}dispose(){const t=this.player_.tech_,e=t&&t.el_;e&&(e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}M.registerComponent("TitleBar",Ob);const Ko=i=>{const t=i.el();if(t.hasAttribute("src"))return i.triggerSourceset(t.src),!0;const e=i.$$("source"),s=[];let n="";if(!e.length)return!1;for(let r=0;r{let e={};for(let s=0;sem([i.el(),E.HTMLMediaElement.prototype,E.Element.prototype,Nb],"innerHTML"),Ld=function(i){const t=i.el();if(t.resetSourceWatch_)return;const e={},s=Rb(i),n=r=>(...a)=>{const l=r.apply(t,a);return Ko(i),l};["append","appendChild","insertAdjacentHTML"].forEach(r=>{t[r]&&(e[r]=t[r],t[r]=n(e[r]))}),Object.defineProperty(t,"innerHTML",ht(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(e).forEach(r=>{t[r]=e[r]}),Object.defineProperty(t,"innerHTML",s)},i.one("sourceset",t.resetSourceWatch_)},Mb=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Vp(E.Element.prototype.getAttribute.call(this,"src")):""},set(i){return E.Element.prototype.setAttribute.call(this,"src",i),i}}),Ub=i=>em([i.el(),E.HTMLMediaElement.prototype,Mb],"src"),Bb=function(i){if(!i.featuresSourceset)return;const t=i.el();if(t.resetSourceset_)return;const e=Ub(i),s=t.setAttribute,n=t.load;Object.defineProperty(t,"src",ht(e,{set:r=>{const a=e.set.call(t,r);return i.triggerSourceset(t.src),a}})),t.setAttribute=(r,a)=>{const l=s.call(t,r,a);return/src/i.test(r)&&i.triggerSourceset(t.src),l},t.load=()=>{const r=n.call(t);return Ko(i)||(i.triggerSourceset(""),Ld(i)),r},t.currentSrc?i.triggerSourceset(t.currentSrc):Ko(i)||Ld(i),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,"src",e),t.resetSourceWatch_&&t.resetSourceWatch_()}};class V extends K{constructor(t,e){super(t,e);const s=t.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",s&&(this.el_.currentSrc!==s.src||t.tag&&t.tag.initNetworkState_===3)?this.setSource(s):this.handleLateInit_(this.el_),t.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const r=this.el_.childNodes;let a=r.length;const l=[];for(;a--;){const u=r[a];u.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(u),this.remoteTextTracks().addTrack(u.track),this.textTracks().addTrack(u.track),n||this.el_.hasAttribute("crossorigin")||!ea(u.src)||(n=!0)):l.push(u))}for(let u=0;u{e=[];for(let r=0;rt.removeEventListener("change",s));const n=()=>{for(let r=0;r{t.removeEventListener("change",s),t.removeEventListener("change",n),t.addEventListener("change",n)}),this.on("webkitendfullscreen",()=>{t.removeEventListener("change",s),t.addEventListener("change",s),t.removeEventListener("change",n)})}overrideNative_(t,e){if(e!==this[`featuresNative${t}Tracks`])return;const s=t.toLowerCase();this[`${s}TracksListeners_`]&&Object.keys(this[`${s}TracksListeners_`]).forEach(n=>{this.el()[`${s}Tracks`].removeEventListener(n,this[`${s}TracksListeners_`][n])}),this[`featuresNative${t}Tracks`]=!e,this[`${s}TracksListeners_`]=null,this.proxyNativeTracksForType_(s)}overrideNativeAudioTracks(t){this.overrideNative_("Audio",t)}overrideNativeVideoTracks(t){this.overrideNative_("Video",t)}proxyNativeTracksForType_(t){const e=he[t],s=this.el()[e.getterName],n=this[e.getterName]();if(!this[`featuresNative${e.capitalName}Tracks`]||!s||!s.addEventListener)return;const r={change:l=>{const u={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(u),t==="text"&&this[ns.remoteText.getterName]().trigger(u)},addtrack(l){n.addTrack(l.track)},removetrack(l){n.removeTrack(l.track)}},a=function(){const l=[];for(let u=0;u{const u=r[l];s.addEventListener(l,u),this.on("dispose",p=>s.removeEventListener(l,u))}),this.on("loadstart",a),this.on("dispose",l=>this.off("loadstart",a))}proxyNativeTracks_(){he.names.forEach(t=>{this.proxyNativeTracksForType_(t)})}createEl(){let t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){const s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),V.disposeMediaElement(t),t=s}else{t=j.createElement("video");const s=ht({},this.options_.tag&&oi(this.options_.tag));cn&&this.options_.nativeControlsForTouch===!0||delete s.controls,Sp(t,Object.assign(s,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}this.options_.preload!==void 0&&ms(t,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);const e=["loop","muted","playsinline","autoplay"];for(let s=0;s=2&&e.push("loadeddata"),t.readyState>=3&&e.push("canplay"),t.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(s){this.trigger(s)},this)})}setScrubbing(t){this.isScrubbing_=t}scrubbing(){return this.isScrubbing_}setCurrentTime(t){try{this.isScrubbing_&&this.el_.fastSeek&&Gr?this.el_.fastSeek(t):this.el_.currentTime=t}catch(e){J(e,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Oe&&Ne&&this.el_.currentTime===0){const t=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",t))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},e=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",e),this.on("dispose",()=>{this.off("webkitbeginfullscreen",e),this.off("webkitendfullscreen",t)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)xe(this.el_.play()),this.setTimeout(function(){t.pause();try{t.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{t.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):super.requestVideoFrameCallback(t)}cancelVideoFrameCallback(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):super.cancelVideoFrameCallback(t)}src(t){if(t===void 0)return this.el_.src;this.setSrc(t)}reset(){V.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(t){this.el_.controls=!!t}addTextTrack(t,e,s){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,e,s):super.addTextTrack(t,e,s)}createRemoteTextTrack(t){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(t);const e=j.createElement("track");return t.kind&&(e.kind=t.kind),t.label&&(e.label=t.label),(t.language||t.srclang)&&(e.srclang=t.language||t.srclang),t.default&&(e.default=t.default),t.id&&(e.id=t.id),t.src&&(e.src=t.src),e}addRemoteTextTrack(t,e){const s=super.addRemoteTextTrack(t,e);return this.featuresNativeTextTracks&&this.el().appendChild(s),s}removeRemoteTextTrack(t){if(super.removeRemoteTextTrack(t),this.featuresNativeTextTracks){const e=this.$$("track");let s=e.length;for(;s--;)t!==e[s]&&t!==e[s].track||this.el().removeChild(e[s])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const t={};return this.el().webkitDroppedFrameCount!==void 0&&this.el().webkitDecodedFrameCount!==void 0&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),E.performance&&(t.creationTime=E.performance.now()),t}}Er(V,"TEST_VID",function(){if(!vs())return;const i=j.createElement("video"),t=j.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",i.appendChild(t),i}),V.isSupported=function(){try{V.TEST_VID.volume=.5}catch{return!1}return!(!V.TEST_VID||!V.TEST_VID.canPlayType)},V.canPlayType=function(i){return V.TEST_VID.canPlayType(i)},V.canPlaySource=function(i,t){return V.canPlayType(i.type)},V.canControlVolume=function(){try{const i=V.TEST_VID.volume;V.TEST_VID.volume=i/2+.1;const t=i!==V.TEST_VID.volume;return t&&Ht?(E.setTimeout(()=>{V&&V.prototype&&(V.prototype.featuresVolumeControl=i!==V.TEST_VID.volume)}),!1):t}catch{return!1}},V.canMuteVolume=function(){try{const i=V.TEST_VID.muted;return V.TEST_VID.muted=!i,V.TEST_VID.muted?ms(V.TEST_VID,"muted","muted"):Kr(V.TEST_VID,"muted","muted"),i!==V.TEST_VID.muted}catch{return!1}},V.canControlPlaybackRate=function(){if(Oe&&Ne&&wr<58)return!1;try{const i=V.TEST_VID.playbackRate;return V.TEST_VID.playbackRate=i/2+.1,i!==V.TEST_VID.playbackRate}catch{return!1}},V.canOverrideAttributes=function(){try{const i=()=>{};Object.defineProperty(j.createElement("video"),"src",{get:i,set:i}),Object.defineProperty(j.createElement("audio"),"src",{get:i,set:i}),Object.defineProperty(j.createElement("video"),"innerHTML",{get:i,set:i}),Object.defineProperty(j.createElement("audio"),"innerHTML",{get:i,set:i})}catch{return!1}return!0},V.supportsNativeTextTracks=function(){return Gr||Ht&&Ne},V.supportsNativeVideoTracks=function(){return!(!V.TEST_VID||!V.TEST_VID.videoTracks)},V.supportsNativeAudioTracks=function(){return!(!V.TEST_VID||!V.TEST_VID.audioTracks)},V.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([i,t]){Er(V.prototype,i,()=>V[t](),!0)}),V.prototype.featuresVolumeControl=V.canControlVolume(),V.prototype.movingMediaElementInDOM=!Ht,V.prototype.featuresFullscreenResize=!0,V.prototype.featuresProgressEvents=!0,V.prototype.featuresTimeupdateEvents=!0,V.prototype.featuresVideoFrameCallback=!(!V.TEST_VID||!V.TEST_VID.requestVideoFrameCallback),V.disposeMediaElement=function(i){if(i){for(i.parentNode&&i.parentNode.removeChild(i);i.hasChildNodes();)i.removeChild(i.firstChild);i.removeAttribute("src"),typeof i.load=="function"&&function(){try{i.load()}catch{}}()}},V.resetMediaElement=function(i){if(!i)return;const t=i.querySelectorAll("source");let e=t.length;for(;e--;)i.removeChild(t[e]);i.removeAttribute("src"),typeof i.load=="function"&&function(){try{i.load()}catch{}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(i){V.prototype[i]=function(){return this.el_[i]||this.el_.hasAttribute(i)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(i){V.prototype["set"+Et(i)]=function(t){this.el_[i]=t,t?this.el_.setAttribute(i,i):this.el_.removeAttribute(i)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(i){V.prototype[i]=function(){return this.el_[i]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(i){V.prototype["set"+Et(i)]=function(t){this.el_[i]=t}}),["pause","load","play"].forEach(function(i){V.prototype[i]=function(){return this.el_[i]()}}),K.withSourceHandlers(V),V.nativeSourceHandler={},V.nativeSourceHandler.canPlayType=function(i){try{return V.TEST_VID.canPlayType(i)}catch{return""}},V.nativeSourceHandler.canHandleSource=function(i,t){if(i.type)return V.nativeSourceHandler.canPlayType(i.type);if(i.src){const e=Pl(i.src);return V.nativeSourceHandler.canPlayType(`video/${e}`)}return""},V.nativeSourceHandler.handleSource=function(i,t,e){t.setSrc(i.src)},V.nativeSourceHandler.dispose=function(){},V.registerSourceHandler(V.nativeSourceHandler),K.registerTech("Html5",V);const im=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],yo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Yo=["tiny","xsmall","small","medium","large","xlarge","huge"],gr={};Yo.forEach(i=>{const t=i.charAt(0)==="x"?`x-${i.substring(1)}`:i;gr[i]=`vjs-layout-${t}`});const Fb={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class ft extends M{constructor(t,e,s){if(t.id=t.id||e.id||`vjs_video_${Te()}`,(e=Object.assign(ft.getTagSettings(t),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language){const a=t.closest("[lang]");a&&(e.language=a.getAttribute("lang"))}if(super(null,e,s),this.boundDocumentFullscreenChange_=a=>this.documentFullscreenChange_(a),this.boundFullWindowOnEscKey_=a=>this.fullWindowOnEscKey(a),this.boundUpdateStyleEl_=a=>this.updateStyleEl_(a),this.boundApplyInitTime_=a=>this.applyInitTime_(a),this.boundUpdateCurrentBreakpoint_=a=>this.updateCurrentBreakpoint_(a),this.boundHandleTechClick_=a=>this.handleTechClick_(a),this.boundHandleTechDoubleClick_=a=>this.handleTechDoubleClick_(a),this.boundHandleTechTouchStart_=a=>this.handleTechTouchStart_(a),this.boundHandleTechTouchMove_=a=>this.handleTechTouchMove_(a),this.boundHandleTechTouchEnd_=a=>this.handleTechTouchEnd_(a),this.boundHandleTechTap_=a=>this.handleTechTap_(a),this.isFullscreen_=!1,this.log=up(this.id_),this.fsApi_=Sr,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=t,this.tagAttributes=t&&oi(t),this.language(this.options_.language),e.languages){const a={};Object.getOwnPropertyNames(e.languages).forEach(function(l){a[l.toLowerCase()]=e.languages[l]}),this.languages_=a}else this.languages_=ft.prototype.options_.languages;this.resetCache_(),this.poster_=e.poster||"",this.controls_=!!e.controls,t.controls=!1,t.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],t.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(a=>{if(typeof this[a]!="function")throw new Error(`plugin "${a}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),kl(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ae(j,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=ht(this.options_);if(e.plugins&&Object.keys(e.plugins).forEach(a=>{this[a](e.plugins[a])}),e.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(e.playbackRates),e.experimentalSvgIcons){const a=new E.DOMParser().parseFromString(ub,"image/svg+xml");if(a.querySelector("parsererror"))J.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const l=a.documentElement;l.style.display="none",this.el_.appendChild(l),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(t.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),cn&&this.addClass("vjs-touch-enabled"),Ht||this.addClass("vjs-workinghover"),ft.players[this.id_]=this;const r=Mo.split(".")[0];this.addClass(`vjs-v${r}`),this.userActive(!0),this.reportUserActivity(),this.one("play",a=>this.listenForUserActivity_(a)),this.on("keydown",a=>this.handleKeyDown(a)),this.on("languagechange",a=>this.handleLanguagechange(a)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Ut(j,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ut(j,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),ft.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),ab(this),jt.names.forEach(t=>{const e=this[jt[t].getterName]();e&&e.off&&e.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let t,e=this.tag,s=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const n=this.tag.tagName.toLowerCase()==="video-js";s?t=this.el_=e.parentNode:n||(t=this.el_=super.createEl("div"));const r=oi(e);if(n){for(t=this.el_=e,e=this.tag=j.createElement("video");t.children.length;)e.appendChild(t.firstChild);tn(t,"video-js")||Pi(t,"video-js"),t.appendChild(e),s=this.playerElIngest_=t,Object.keys(t).forEach(u=>{try{e[u]=t[u]}catch{}})}e.setAttribute("tabindex","-1"),r.tabindex="-1",Ne&&kr&&(e.setAttribute("role","application"),r.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach(function(u){n&&u==="class"||t.setAttribute(u,r[u]),n&&e.setAttribute(u,r[u])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused");const a=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE"].filter(u=>_p[u]).map(u=>"vjs-device-"+u.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...a),E.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=Lp("vjs-styles-dimensions");const u=ui(".vjs-styles-defaults"),p=ui("head");p.insertBefore(this.styleEl_,u?u.nextSibling:p.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const l=e.getElementsByTagName("a");for(let u=0;u{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(t){if(t===void 0)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(t){if(t===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(E.VIDEOJS_NO_DYNAMIC_STYLE===!0){const l=typeof this.width_=="number"?this.width_:this.options_.width,u=typeof this.height_=="number"?this.height_:this.options_.height,p=this.tech_&&this.tech_.el();return void(p&&(l>=0&&(p.width=l),u>=0&&(p.height=u)))}let t,e,s,n;s=this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const r=s.split(":"),a=r[1]/r[0];t=this.width_!==void 0?this.width_:this.height_!==void 0?this.height_/a:this.videoWidth()||300,e=this.height_!==void 0?this.height_:t*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Op(this.styleEl_,` + .${n} { + width: ${t}px; + height: ${e}px; + } + + .${n}.vjs-fluid:not(.vjs-audio-only-mode) { + padding-top: ${100*a}%; + } + `)}loadTech_(t,e){this.tech_&&this.unloadTech_();const s=Et(t),n=t.charAt(0).toLowerCase()+t.slice(1);s!=="Html5"&&this.tag&&(K.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=s,this.isReady_=!1;let r=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(r=!1);const a={source:e,autoplay:r,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};jt.names.forEach(u=>{const p=jt[u];a[p.getterName]=this[p.privateName]}),Object.assign(a,this.options_[s]),Object.assign(a,this.options_[n]),Object.assign(a,this.options_[t.toLowerCase()]),this.tag&&(a.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);const l=K.getTech(t);if(!l)throw new Error(`No Tech named '${s}' exists! '${s}' should be registered using videojs.registerTech()'`);this.tech_=new l(a),this.tech_.ready(ut(this,this.handleTechReady_),!0),Yu.jsonToTextTracks(this.textTracksJson_||[],this.tech_),im.forEach(u=>{this.on(this.tech_,u,p=>this[`handleTech${Et(u)}_`](p))}),Object.keys(yo).forEach(u=>{this.on(this.tech_,u,p=>{this.tech_.playbackRate()===0&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${yo[u]}_`].bind(this),event:p}):this[`handleTech${yo[u]}_`](p)})}),this.on(this.tech_,"loadstart",u=>this.handleTechLoadStart_(u)),this.on(this.tech_,"sourceset",u=>this.handleTechSourceset_(u)),this.on(this.tech_,"waiting",u=>this.handleTechWaiting_(u)),this.on(this.tech_,"ended",u=>this.handleTechEnded_(u)),this.on(this.tech_,"seeking",u=>this.handleTechSeeking_(u)),this.on(this.tech_,"play",u=>this.handleTechPlay_(u)),this.on(this.tech_,"pause",u=>this.handleTechPause_(u)),this.on(this.tech_,"durationchange",u=>this.handleTechDurationChange_(u)),this.on(this.tech_,"fullscreenchange",(u,p)=>this.handleTechFullscreenChange_(u,p)),this.on(this.tech_,"fullscreenerror",(u,p)=>this.handleTechFullscreenError_(u,p)),this.on(this.tech_,"enterpictureinpicture",u=>this.handleTechEnterPictureInPicture_(u)),this.on(this.tech_,"leavepictureinpicture",u=>this.handleTechLeavePictureInPicture_(u)),this.on(this.tech_,"error",u=>this.handleTechError_(u)),this.on(this.tech_,"posterchange",u=>this.handleTechPosterChange_(u)),this.on(this.tech_,"textdata",u=>this.handleTechTextData_(u)),this.on(this.tech_,"ratechange",u=>this.handleTechRateChange_(u)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||s==="Html5"&&this.tag||$o(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){jt.names.forEach(t=>{const e=jt[t];this[e.privateName]=this[e.getterName]()}),this.textTracksJson_=Yu.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(t){return t===void 0&&J.warn(`Using the tech directly can be dangerous. I hope you know what you're doing. +See https://github.com/videojs/video.js/issues/2617 for more info. +`),this.tech_}version(){return{"video.js":Mo}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(t){if(!this.tech_||typeof t!="string")return;const e=()=>{const n=this.muted();this.muted(!0);const r=()=>{this.muted(n)};this.playTerminatedQueue_.push(r);const a=this.play();if(sn(a))return a.catch(l=>{throw r(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${l||""}`)})};let s;return t!=="any"||this.muted()?s=t!=="muted"||this.muted()?this.play():e():(s=this.play(),sn(s)&&(s=s.catch(e))),sn(s)?s.then(()=>{this.trigger({type:"autoplay-success",autoplay:t})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:t})}):void 0}updateSourceCaches_(t=""){let e=t,s="";typeof e!="string"&&(e=t.src,s=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!s&&(s=hb(this,e)),this.cache_.source=ht({},t,{src:e,type:s});const n=this.cache_.sources.filter(u=>u.src&&u.src===e),r=[],a=this.$$("source"),l=[];for(let u=0;uthis.updateSourceCaches_(r);const s=this.currentSource().src,n=t.src;s&&!/^blob:/.test(s)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==s)&&(e=()=>{}),e(n),t.src||this.tech_.any(["sourceset","loadstart"],r=>{if(r.type==="sourceset")return;const a=this.techGet_("currentSrc");this.lastSource_.tech=a,this.updateSourceCaches_(a)})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})}hasStarted(t){if(t===void 0)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(t=>t.callback(t.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const t=this.currentTime(),e=()=>{t!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",e))};this.on("timeupdate",e)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(t){this.controls_&&(this.options_!==void 0&&this.options_.userActions!==void 0&&this.options_.userActions.click!==void 0&&this.options_.userActions.click===!1||(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,t):this.paused()?xe(this.play()):this.pause()))}handleTechDoubleClick_(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),e=>e.contains(t.target))||this.options_!==void 0&&this.options_.userActions!==void 0&&this.options_.userActions.doubleClick!==void 0&&this.options_.userActions.doubleClick===!1||(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(t){t.cancelable&&t.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(t){const e=t.target.player;if(e&&e!==this)return;const s=this.el();let n=j[this.fsApi_.fullscreenElement]===s;!n&&s.matches&&(n=s.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(t,e){e&&(e.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(e.isFullscreen))}handleTechFullscreenError_(t,e){this.trigger("fullscreenerror",e)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(t){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(t){this.isInPictureInPicture(!1)}handleTechError_(){const t=this.tech_.error();t&&this.error(t)}handleTechTextData_(){let t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(t,e){this.ready(function(){if(t in nb)return ib(this.middleware_,this.tech_,t,e);if(t in ed)return td(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(s){throw J(s),s}},!0)}techGet_(t){if(this.tech_&&this.tech_.isReady_){if(t in sb)return eb(this.middleware_,this.tech_,t);if(t in ed)return td(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){throw this.tech_[t]===void 0?(J(`Video.js: ${t} method not defined for ${this.techName_} playback technology.`,e),e):e.name==="TypeError"?(J(`Video.js: ${t} unavailable on ${this.techName_} playback technology element.`,e),this.tech_.isReady_=!1,e):(J(e),e)}}}play(){return new Promise(t=>{this.play_(t)})}play_(t=xe){this.playCallbacks_.push(t);const e=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),s=!!(Gr||Ht);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!e)return this.waitToPlay_=r=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!e&&s&&this.load());const n=this.techGet_("play");s&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),n===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach(function(e){e()})}runPlayCallbacks_(t){const e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(s){s(t)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||be(0,0)}scrubbing(t){if(t===void 0)return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(t){return t===void 0?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(t<0&&(t=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",t),this.cache_.initTime=0,void(isFinite(t)&&(this.cache_.currentTime=Number(t)))):(this.cache_.initTime=t,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(t){if(t===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let t=this.techGet_("buffered");return t&&t.length||(t=be(0,0)),t}seekable(){let t=this.techGet_("seekable");return t&&t.length||(t=be(0,0)),t}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return $p(this.buffered(),this.duration())}bufferedEnd(){const t=this.buffered(),e=this.duration();let s=t.end(t.length-1);return s>e&&(s=e),s}volume(t){let e;return t!==void 0?(e=Math.max(0,Math.min(1,t)),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)}muted(t){if(t===void 0)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)}defaultMuted(t){return t!==void 0&&this.techCall_("setDefaultMuted",t),this.techGet_("defaultMuted")||!1}lastVolume_(t){if(t===void 0||t===0)return this.cache_.lastVolume;this.cache_.lastVolume=t}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(t){if(t!==void 0){const e=this.isFullscreen_;return this.isFullscreen_=!!t,this.isFullscreen_!==e&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(t){this.isInPictureInPicture()&&this.exitPictureInPicture();const e=this;return new Promise((s,n)=>{function r(){e.off("fullscreenerror",l),e.off("fullscreenchange",a)}function a(){r(),s()}function l(p,g){r(),n(g)}e.one("fullscreenchange",a),e.one("fullscreenerror",l);const u=e.requestFullscreenHelper_(t);u&&(u.then(r,r),u.then(s,n))})}requestFullscreenHelper_(t){let e;if(this.fsApi_.prefixed||(e=this.options_.fullscreen&&this.options_.fullscreen.options||{},t!==void 0&&(e=t)),this.fsApi_.requestFullscreen){const s=this.el_[this.fsApi_.requestFullscreen](e);return s&&s.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),s}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const t=this;return new Promise((e,s)=>{function n(){t.off("fullscreenerror",a),t.off("fullscreenchange",r)}function r(){n(),e()}function a(u,p){n(),s(p)}t.one("fullscreenchange",r),t.one("fullscreenerror",a);const l=t.exitFullscreenHelper_();l&&(l.then(n,n),l.then(e,s))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const t=j[this.fsApi_.exitFullscreen]();return t&&xe(t.then(()=>this.isFullscreen(!1))),t}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=j.documentElement.style.overflow,ae(j,"keydown",this.boundFullWindowOnEscKey_),j.documentElement.style.overflow="hidden",Pi(j.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(t){X.isEventKey(t,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Ut(j,"keydown",this.boundFullWindowOnEscKey_),j.documentElement.style.overflow=this.docOrigOverflow,Xr(j.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(t){if(t===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(t){return t!==void 0?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&E.documentPictureInPicture){const t=j.createElement(this.el().tagName);return t.classList=this.el().classList,t.classList.add("vjs-pip-container"),this.posterImage&&t.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&t.appendChild(this.titleBar.el().cloneNode(!0)),t.appendChild(Y("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),E.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(e=>(Pp(e),this.el_.parentNode.insertBefore(t,this.el_),e.document.body.appendChild(this.el_),e.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:e}),e.addEventListener("pagehide",s=>{const n=s.target.querySelector(".video-js");t.parentNode.replaceChild(n,t),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),e))}return"pictureInPictureEnabled"in j&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return E.documentPictureInPicture&&E.documentPictureInPicture.window?(E.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in j?j.exitPictureInPicture():void 0}handleKeyDown(t){const{userActions:e}=this.options_;!e||!e.hotkeys||(s=>{const n=s.tagName.toLowerCase();return s.isContentEditable?!0:n==="input"?["button","checkbox","hidden","radio","reset","submit"].indexOf(s.type)===-1:["textarea"].indexOf(n)!==-1})(this.el_.ownerDocument.activeElement)||(typeof e.hotkeys=="function"?e.hotkeys.call(this,t):this.handleHotkeys(t))}handleHotkeys(t){const e=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:s=a=>X.isEventKey(a,"f"),muteKey:n=a=>X.isEventKey(a,"m"),playPauseKey:r=a=>X.isEventKey(a,"k")||X.isEventKey(a,"Space")}=e;if(s.call(this,t)){t.preventDefault(),t.stopPropagation();const a=M.getComponent("FullscreenToggle");j[this.fsApi_.fullscreenEnabled]!==!1&&a.prototype.handleClick.call(this,t)}else n.call(this,t)?(t.preventDefault(),t.stopPropagation(),M.getComponent("MuteToggle").prototype.handleClick.call(this,t)):r.call(this,t)&&(t.preventDefault(),t.stopPropagation(),M.getComponent("PlayToggle").prototype.handleClick.call(this,t))}canPlayType(t){let e;for(let s=0,n=this.options_.techOrder;s[l,K.getTech(l)]).filter(([l,u])=>u?u.isSupported():(J.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),s=function(l,u,p){let g;return l.some(y=>u.some(T=>{if(g=p(y,T),g)return!0})),g};let n;const r=l=>(u,p)=>l(p,u),a=([l,u],p)=>{if(u.canPlaySource(p,this.options_[l.toLowerCase()]))return{source:p,tech:l}};return n=this.options_.sourceOrder?s(t,e,r(a)):s(e,t,a),n||!1}handleSrc_(t,e){if(t===void 0)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const s=Gp(t);if(s.length){if(this.changingSrc_=!0,e||(this.cache_.sources=s),this.updateSourceCaches_(s[0]),Z0(this,s[0],(n,r)=>{if(this.middleware_=r,e||(this.cache_.sources=s),this.updateSourceCaches_(n),this.src_(n))return s.length>1?this.handleSrc_(s.slice(1)):(this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void this.triggerReady());tb(r,this.tech_)}),s.length>1){const n=()=>{this.error(null),this.handleSrc_(s.slice(1),!0)},r=()=>{this.off("error",n)};this.one("error",n),this.one("playing",r),this.resetRetryOnError_=()=>{this.off("error",n),this.off("playing",r)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)}src(t){return this.handleSrc_(t,!1)}src_(t){const e=this.selectSource([t]);return!e||(Bp(e.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(e.tech,e.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():xe(this.play().then(()=>this.doReset_()))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Xe(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:t,durationDisplay:e,progressControl:s,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:r}=s||{};t&&t.updateContent(),e&&e.updateContent(),n&&n.updateContent(),r&&(r.update(),r.loadProgressBar&&r.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const t=this.currentSource(),e=[];return Object.keys(t).length!==0&&e.push(t),this.cache_.sources||e}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(t){return t!==void 0?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")}autoplay(t){if(t===void 0)return this.options_.autoplay||!1;let e;typeof t=="string"&&/(any|play|muted)/.test(t)||t===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=t,this.manualAutoplay_(typeof t=="string"?t:"play"),e=!1):this.options_.autoplay=!!t,e=e===void 0?this.options_.autoplay:e,this.tech_&&this.techCall_("setAutoplay",e)}playsinline(t){return t!==void 0&&(this.techCall_("setPlaysinline",t),this.options_.playsinline=t),this.techGet_("playsinline")}loop(t){return t!==void 0?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")}poster(t){if(t===void 0)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(t){if(t===void 0)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(t){if(t===void 0)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(t){if(t===void 0)return this.error_||null;if(hi("beforeerror").forEach(e=>{const s=e(this,t);Me(s)&&!Array.isArray(s)||typeof s=="string"||typeof s=="number"||s===null?t=s:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&t&&t.code===4){const e=function(){this.error(t)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",function(){this.off(["click","touchstart"],e)})}if(t===null)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Tt(t),this.addClass("vjs-error"),J.error(`(CODE:${this.error_.code} ${Tt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),hi("error").forEach(e=>e(this,this.error_))}reportUserActivity(t){this.userActivity_=!0}userActive(t){if(t===void 0)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let t,e,s;const n=ut(this,this.reportUserActivity),r=function(y){y.screenX===e&&y.screenY===s||(e=y.screenX,s=y.screenY,n())},a=function(){n(),this.clearInterval(t),t=this.setInterval(n,250)},l=function(y){n(),this.clearInterval(t)};this.on("mousedown",a),this.on("mousemove",r),this.on("mouseup",l),this.on("mouseleave",l);const u=this.getChild("controlBar");let p;!u||Ht||Oe||(u.on("mouseenter",function(y){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),u.on("mouseleave",function(y){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",n),this.on("keyup",n);const g=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(p);const y=this.options_.inactivityTimeout;y<=0||(p=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},y))};this.setInterval(g,250)}playbackRate(t){if(t===void 0)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)}defaultPlaybackRate(t){return t!==void 0?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(t){if(t===void 0)return!!this.isAudio_;this.isAudio_=!!t}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const t=this.children(),e=this.getChild("ControlBar"),s=e&&e.currentHeight();t.forEach(n=>{n!==e&&n.el_&&!n.hasClass("vjs-hidden")&&(n.hide(),this.audioOnlyCache_.hiddenChildren.push(n))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(s),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(t=>t.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(t){if(typeof t!="boolean"||t===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=t,t){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(t){return typeof t!="boolean"||t===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=t,t?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(t,e,s){if(this.tech_)return this.tech_.addTextTrack(t,e,s)}addRemoteTextTrack(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)}removeRemoteTextTrack(t={}){let{track:e}=t;if(e||(e=t),this.tech_)return this.tech_.removeRemoteTextTrack(e)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(t){if(t===void 0)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),Xe(this)&&this.trigger("languagechange"))}languages(){return ht(ft.prototype.options_.languages,this.languages_)}toJSON(){const t=ht(this.options_),e=t.tracks;t.tracks=[];for(let s=0;s{this.removeChild(s)}),s.open(),s}updateCurrentBreakpoint_(){if(!this.responsive())return;const t=this.currentBreakpoint(),e=this.currentWidth();for(let s=0;sthis.addRemoteTextTrack(y,!1)),this.titleBar&&this.titleBar.update({title:g,description:a||n||""}),this.ready(e)}getMedia(){if(!this.cache_.media){const t=this.poster(),e={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),s=>({kind:s.kind,label:s.label,language:s.language,src:s.src}))};return t&&(e.poster=t,e.artwork=[{src:e.poster,type:Dr(e.poster)}]),e}return ht(this.cache_.media)}static getTagSettings(t){const e={sources:[],tracks:[]},s=oi(t),n=s["data-setup"];if(tn(t,"vjs-fill")&&(s.fill=!0),tn(t,"vjs-fluid")&&(s.fluid=!0),n!==null){const[r,a]=My(n||"{}");r&&J.error(r),Object.assign(s,a)}if(Object.assign(e,s),t.hasChildNodes()){const r=t.childNodes;for(let a=0,l=r.length;atypeof e=="number")&&(this.cache_.playbackRates=t,this.trigger("playbackrateschange"))}}jt.names.forEach(function(i){const t=jt[i];ft.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),ft.prototype.crossorigin=ft.prototype.crossOrigin,ft.players={};const Hs=E.navigator;ft.prototype.options_={techOrder:K.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Hs&&(Hs.languages&&Hs.languages[0]||Hs.userLanguage||Hs.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,enableSmoothSeeking:!1},im.forEach(function(i){ft.prototype[`handleTech${Et(i)}_`]=function(){return this.trigger(i)}}),M.registerComponent("Player",ft);const Lr="plugin",as="activePlugins_",Qi={},Or=i=>Qi.hasOwnProperty(i),fr=i=>Or(i)?Qi[i]:void 0,sm=(i,t)=>{i[as]=i[as]||{},i[as][t]=!0},Nr=(i,t,e)=>{const s=(e?"before":"")+"pluginsetup";i.trigger(s,t),i.trigger(s+":"+t.name,t)},qb=function(i,t){const e=function(){Nr(this,{name:i,plugin:t,instance:null},!0);const s=t.apply(this,arguments);return sm(this,i),Nr(this,{name:i,plugin:t,instance:s}),s};return Object.keys(t).forEach(function(s){e[s]=t[s]}),e},Od=(i,t)=>(t.prototype.name=i,function(...e){Nr(this,{name:i,plugin:t,instance:null},!0);const s=new t(this,...e);return this[i]=()=>s,Nr(this,s.getEventHash()),s});class Kt{constructor(t){if(this.constructor===Kt)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),kl(this),delete this.trigger,Up(this,this.constructor.defaultState),sm(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(t={}){return t.name=this.name,t.plugin=this.constructor,t.instance=this,t}trigger(t,e={}){return Ts(this.eventBusEl_,t,this.getEventHash(e))}handleStateChanged(t){}dispose(){const{name:t,player:e}=this;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[as][t]=!1,this.player=this.state=null,e[t]=Od(t,Qi[t])}static isBasic(t){const e=typeof t=="string"?fr(t):t;return typeof e=="function"&&!Kt.prototype.isPrototypeOf(e.prototype)}static registerPlugin(t,e){if(typeof t!="string")throw new Error(`Illegal plugin name, "${t}", must be a string, was ${typeof t}.`);if(Or(t))J.warn(`A plugin named "${t}" already exists. You may want to avoid re-registering plugins!`);else if(ft.prototype.hasOwnProperty(t))throw new Error(`Illegal plugin name, "${t}", cannot share a name with an existing player method!`);if(typeof e!="function")throw new Error(`Illegal plugin for "${t}", must be a function, was ${typeof e}.`);return Qi[t]=e,t!==Lr&&(Kt.isBasic(e)?ft.prototype[t]=qb(t,e):ft.prototype[t]=Od(t,e)),e}static deregisterPlugin(t){if(t===Lr)throw new Error("Cannot de-register base plugin.");Or(t)&&(delete Qi[t],delete ft.prototype[t])}static getPlugins(t=Object.keys(Qi)){let e;return t.forEach(s=>{const n=fr(s);n&&(e=e||{},e[s]=n)}),e}static getPluginVersion(t){const e=fr(t);return e&&e.VERSION||""}}function jb(i,t){let e=!1;return function(...s){return e||J.warn(i),e=!0,t.apply(this,s)}}function fe(i,t,e,s){return jb(`${t} is deprecated and will be removed in ${i}.0; please use ${e} instead.`,s)}Kt.getPlugin=fr,Kt.BASE_PLUGIN_NAME=Lr,Kt.registerPlugin(Lr,Kt),ft.prototype.usingPlugin=function(i){return!!this[as]&&this[as][i]===!0},ft.prototype.hasPlugin=function(i){return!!Or(i)};var $b={UnsupportedSidxContainer:"unsupported-sidx-container-error",DashManifestSidxParsingError:"dash-manifest-sidx-parsing-error",HlsPlaylistRequestError:"hls-playlist-request-error",SegmentUnsupportedMediaFormat:"segment-unsupported-media-format-error",UnsupportedMediaInitialization:"unsupported-media-initialization-error",SegmentSwitchError:"segment-switch-error",SegmentExceedsSourceBufferQuota:"segment-exceeds-source-buffer-quota-error",SegmentAppendError:"segment-append-error",VttLoadError:"vtt-load-error",VttCueParsingError:"vtt-cue-parsing-error",AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed",EMEFailedToRequestMediaKeySystemAccess:"eme-failed-request-media-key-system-access",EMEFailedToCreateMediaKeys:"eme-failed-create-media-keys",EMEFailedToAttachMediaKeysToVideoElement:"eme-failed-attach-media-keys-to-video",EMEFailedToCreateMediaKeySession:"eme-failed-create-media-key-session",EMEFailedToSetServerCertificate:"eme-failed-set-server-certificate",EMEFailedToGenerateLicenseRequest:"eme-failed-generate-license-request",EMEFailedToUpdateSessionWithReceivedLicenseKeys:"eme-failed-update-session",EMEFailedToCloseSession:"eme-failed-close-session",EMEFailedToRemoveKeysFromSession:"eme-failed-remove-keys",EMEFailedToLoadSessionBySessionId:"eme-failed-load-session"};const nm=i=>i.indexOf("#")===0?i.slice(1):i;function D(i,t,e){let s=D.getPlayer(i);if(s)return t&&J.warn(`Player "${i}" is already initialised. Options will not be applied.`),e&&s.ready(e),s;const n=typeof i=="string"?ui("#"+nm(i)):i;if(!bs(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");const r="getRootNode"in n&&n.getRootNode()instanceof E.ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||J.warn("The element supplied is not included in the DOM"),(t=t||{}).restoreEl===!0&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute("data-vjs-player")?n.parentNode:n).cloneNode(!0)),hi("beforesetup").forEach(l=>{const u=l(n,ht(t));Me(u)&&!Array.isArray(u)?t=ht(t,u):J.error("please return an object in beforesetup hooks")});const a=M.getComponent("Player");return s=new a(n,t,e),hi("setup").forEach(l=>l(s)),s}if(D.hooks_=Ve,D.hooks=hi,D.hook=k0,D.hookOnce=x0,D.removeHook=hp,E.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&vs()){let i=ui(".vjs-styles-defaults");if(!i){i=Lp("vjs-styles-defaults");const t=ui("head");t&&t.insertBefore(i,t.firstChild),Op(i,` + .video-js { + width: 300px; + height: 150px; + } + + .vjs-fluid:not(.vjs-audio-only-mode) { + padding-top: 56.25% + } + `)}}Vo(1,D),D.VERSION=Mo,D.options=ft.prototype.options_,D.getPlayers=()=>ft.players,D.getPlayer=i=>{const t=ft.players;let e;if(typeof i=="string"){const s=nm(i),n=t[s];if(n)return n;e=ui("#"+s)}else e=i;if(bs(e)){const{player:s,playerId:n}=e;if(s||t[n])return s||t[n]}},D.getAllPlayers=()=>Object.keys(ft.players).map(i=>ft.players[i]).filter(Boolean),D.players=ft.players,D.getComponent=M.getComponent,D.registerComponent=(i,t)=>(K.isTech(t)&&J.warn(`The ${i} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),M.registerComponent.call(M,i,t)),D.getTech=K.getTech,D.registerTech=K.registerTech,D.use=J0,Object.defineProperty(D,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(D.middleware,"TERMINATOR",{value:Pr,writeable:!1,enumerable:!0}),D.browser=_p,D.obj=P0,D.mergeOptions=fe(9,"videojs.mergeOptions","videojs.obj.merge",ht),D.defineLazyProperty=fe(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Er),D.bind=fe(9,"videojs.bind","native Function.prototype.bind",ut),D.registerPlugin=Kt.registerPlugin,D.deregisterPlugin=Kt.deregisterPlugin,D.plugin=(i,t)=>(J.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Kt.registerPlugin(i,t)),D.getPlugins=Kt.getPlugins,D.getPlugin=Kt.getPlugin,D.getPluginVersion=Kt.getPluginVersion,D.addLanguage=function(i,t){return i=(""+i).toLowerCase(),D.options.languages=ht(D.options.languages,{[i]:t}),D.options.languages[i]},D.log=J,D.createLogger=up,D.time=H0,D.createTimeRange=fe(9,"videojs.createTimeRange","videojs.time.createTimeRanges",be),D.createTimeRanges=fe(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",be),D.formatTime=fe(9,"videojs.formatTime","videojs.time.formatTime",Li),D.setFormatTime=fe(9,"videojs.setFormatTime","videojs.time.setFormatTime",qp),D.resetFormatTime=fe(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",jp),D.parseUrl=fe(9,"videojs.parseUrl","videojs.url.parseUrl",Al),D.isCrossOrigin=fe(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",ea),D.EventTarget=le,D.any=Cl,D.on=ae,D.one=Zr,D.off=Ut,D.trigger=Ts,D.xhr=vc,D.TextTrack=vn,D.AudioTrack=zp,D.VideoTrack=Wp,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(i=>{D[i]=function(){return J.warn(`videojs.${i}() is deprecated; use videojs.dom.${i}() instead`),Gu[i].apply(null,arguments)}}),D.computedStyle=fe(9,"videojs.computedStyle","videojs.dom.computedStyle",fs),D.dom=Gu,D.fn=U0,D.num=_b,D.str=j0,D.url=Y0,D.Error=$b;class Hb{constructor(t){let e=this;return e.id=t.id,e.label=e.id,e.width=t.width,e.height=t.height,e.bitrate=t.bandwidth,e.frameRate=t.frameRate,e.enabled_=t.enabled,Object.defineProperty(e,"enabled",{get:()=>e.enabled_(),set(s){e.enabled_(s)}}),e}}class Rr extends D.EventTarget{constructor(){super();let t=this;return t.levels_=[],t.selectedIndex_=-1,Object.defineProperty(t,"selectedIndex",{get:()=>t.selectedIndex_}),Object.defineProperty(t,"length",{get:()=>t.levels_.length}),t[Symbol.iterator]=()=>t.levels_.values(),t}addQualityLevel(t){let e=this.getQualityLevelById(t.id);if(e)return e;const s=this.levels_.length;return e=new Hb(t),""+s in this||Object.defineProperty(this,s,{get(){return this.levels_[s]}}),this.levels_.push(e),this.trigger({qualityLevel:e,type:"addqualitylevel"}),e}removeQualityLevel(t){let e=null;for(let s=0,n=this.length;ss&&this.selectedIndex_--;break}return e&&this.trigger({qualityLevel:t,type:"removequalitylevel"}),e}getQualityLevelById(t){for(let e=0,s=this.length;es,i.qualityLevels.VERSION=rm,s},Nd=function(i){return Vb(this,D.obj.merge({},i))};D.registerPlugin("qualityLevels",Nd),Nd.VERSION=rm;const Yt=Hr,Mr=(i,t)=>t&&t.responseURL&&i!==t.responseURL?t.responseURL:i,de=i=>D.log.debug?D.log.debug.bind(D,"VHS:",`${i} >`):function(){};function nt(...i){const t=D.obj||D;return(t.merge||t.mergeOptions).apply(t,i)}function Zt(...i){const t=D.time||D;return(t.createTimeRanges||t.createTimeRanges).apply(t,i)}function zb(i){if(i.length===0)return"Buffered Ranges are empty";let t=`Buffered Ranges: +`;for(let e=0;e ${n}. Duration (${n-s}) +`}return t}const Ie=1/30,Ae=3*Ie,am=function(i,t){const e=[];let s;if(i&&i.length)for(s=0;s=t})},ir=function(i,t){return am(i,function(e){return e-Ie>=t})},Wb=function(i){if(i.length<2)return Zt();const t=[];for(let e=1;e{const t=[];if(!i||!i.length)return"";for(let e=0;e "+i.end(e));return t.join(", ")},Xb=function(i,t,e=1){return((i.length?i.end(i.length-1):0)-t)/e},xi=i=>{const t=[];for(let e=0;er||(e+=t>n&&t<=r?r-t:r-n)}return e},Ul=(i,t)=>{if(!t.preload)return t.duration;let e=0;return(t.parts||[]).forEach(function(s){e+=s.duration}),(t.preloadHints||[]).forEach(function(s){s.type==="PART"&&(e+=i.partTargetDuration)}),e},Qo=i=>(i.segments||[]).reduce((t,e,s)=>(e.parts?e.parts.forEach(function(n,r){t.push({duration:n.duration,segmentIndex:s,partIndex:r,part:n,segment:e})}):t.push({duration:e.duration,segmentIndex:s,partIndex:null,segment:e,part:null}),t),[]),lm=i=>{const t=i.segments&&i.segments.length&&i.segments[i.segments.length-1];return t&&t.parts||[]},hm=({preloadSegment:i})=>{if(!i)return;const{parts:t,preloadHints:e}=i;let s=(e||[]).reduce((n,r)=>n+(r.type==="PART"?1:0),0);return s+=t&&t.length?t.length:0,s},um=(i,t)=>{if(t.endList)return 0;if(i&&i.suggestedPresentationDelay)return i.suggestedPresentationDelay;const e=lm(t).length>0;return e&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:e&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Yb=function(i,t){let e=0,s=t-i.mediaSequence,n=i.segments[s];if(n){if(n.start!==void 0)return{result:n.start,precise:!0};if(n.end!==void 0)return{result:n.end-n.duration,precise:!0}}for(;s--;){if(n=i.segments[s],n.end!==void 0)return{result:e+n.end,precise:!0};if(e+=Ul(i,n),n.start!==void 0)return{result:e+n.start,precise:!0}}return{result:e,precise:!1}},Qb=function(i,t){let e,s=0,n=t-i.mediaSequence;for(;ns&&([e,s]=[s,e]),e<0){for(let r=e;rDate.now()},Bl=function(i){return i.excludeUntil&&i.excludeUntil===1/0},sa=function(i){const t=pm(i);return!i.disabled&&!t},mm=function(i,t){return t.attributes&&t.attributes[i]},Jb=function(i,t,e,s=0){return mm("BANDWIDTH",e)?(i*e.attributes.BANDWIDTH-8*s)/t:NaN},Jo=(i,t)=>{if(i.playlists.length===1)return!0;const e=t.attributes.BANDWIDTH||Number.MAX_VALUE;return i.playlists.filter(s=>!!sa(s)&&(s.attributes.BANDWIDTH||0)!(!i&&!t||!i&&t||i&&!t)&&(i===t||!(!i.id||!t.id||i.id!==t.id)||!(!i.resolvedUri||!t.resolvedUri||i.resolvedUri!==t.resolvedUri)||!(!i.uri||!t.uri||i.uri!==t.uri)),Md=function(i,t){const e=i&&i.mediaGroups&&i.mediaGroups.AUDIO||{};let s=!1;for(const n in e){for(const r in e[n])if(s=t(e[n][r]),s)break;if(s)break}return!!s},En=i=>{if(!i||!i.playlists||!i.playlists.length)return Md(i,t=>t.playlists&&t.playlists.length||t.uri);for(let t=0;tCc(n)))&&!Md(i,n=>Fl(e,n)))return!1}return!0};var Qt={liveEdgeDelay:um,duration:cm,seekable:function(i,t,e){const s=t||0;let n=Rd(i,t,!0,e);return n===null?Zt():(n0)for(let p=u-1;p>=0;p--){const g=l[p];if(a+=g.duration,r){if(a<0)continue}else if(a+Ie<=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:n-nn({defaultDuration:i.targetDuration,durationList:l,startIndex:u,endIndex:p})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:t}}if(u<0){for(let p=u;p<0;p++)if(a-=i.targetDuration,a<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:t};u=0}for(let p=u;pIe;if(a!==0&&!(y&&a+Ie>=0)||p===l.length-1){if(r){if(a>0)continue}else if(a-Ie>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:n+nn({defaultDuration:i.targetDuration,durationList:l,startIndex:u,endIndex:p})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:t}},isEnabled:sa,isDisabled:function(i){return i.disabled},isExcluded:pm,isIncompatible:Bl,playlistEnd:Rd,isAes:function(i){for(let t=0;t`${i}-${t}`,fm=(i,t,e)=>`placeholder-uri-${i}-${t}-${e}`,Zb=({onwarn:i,oninfo:t,manifestString:e,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new I_;i&&a.on("warn",i),t&&a.on("info",t),s.forEach(p=>a.addParser(p)),n.forEach(p=>a.addTagMapper(p)),a.push(e),a.end();const l=a.manifest;if(r||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(p){l.hasOwnProperty(p)&&delete l[p]}),l.segments&&l.segments.forEach(function(p){["parts","preloadHints"].forEach(function(g){p.hasOwnProperty(g)&&delete p[g]})})),!l.targetDuration){let p=10;l.segments&&l.segments.length&&(p=l.segments.reduce((g,y)=>Math.max(g,y.duration),0)),i&&i({message:`manifest has no targetDuration defaulting to ${p}`}),l.targetDuration=p}const u=lm(l);if(u.length&&!l.partTargetDuration){const p=u.reduce((g,y)=>Math.max(g,y.duration),0);i&&(i({message:`manifest has no partTargetDuration defaulting to ${p}`}),gm.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=p}return l},Es=(i,t)=>{i.mediaGroups&&["AUDIO","SUBTITLES"].forEach(e=>{if(i.mediaGroups[e])for(const s in i.mediaGroups[e])for(const n in i.mediaGroups[e][s]){const r=i.mediaGroups[e][s][n];t(r,e,s,n)}})},ym=({playlist:i,uri:t,id:e})=>{i.id=e,i.playlistErrors_=0,t&&(i.uri=t),i.attributes=i.attributes||{}},tT=i=>{let t=i.playlists.length;for(;t--;){const e=i.playlists[t];ym({playlist:e,id:os(t,e.uri)}),e.resolvedUri=Yt(i.uri,e.uri),i.playlists[e.id]=e,i.playlists[e.uri]=e,e.attributes.BANDWIDTH||gm.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},eT=i=>{Es(i,t=>{t.uri&&(t.resolvedUri=Yt(i.uri,t.uri))})},iT=(i,t)=>{const e=os(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:E.location.href,resolvedUri:E.location.href,playlists:[{uri:t,id:e,resolvedUri:t,attributes:{}}]};return s.playlists[e]=s.playlists[0],s.playlists[t]=s.playlists[0],s},_m=(i,t,e=fm)=>{i.uri=t;for(let n=0;n{if(!n.playlists||!n.playlists.length){if(s&&r==="AUDIO"&&!n.uri)for(let u=0;u(n.set(r.id,r),n),new Map)}processDateRange(t){this.pendingDateRanges_.delete(t.id),this.processedDateRanges_.set(t.id,t)}getDateRangesToProcess(){if(this.offset_===null)return[];const t={},e=[];this.pendingDateRanges_.forEach((s,n)=>{if(!this.processedDateRanges_.has(n)&&(s.startTime=s.startDate.getTime()/1e3-this.offset_,s.processDateRange=()=>this.processDateRange(s),e.push(s),s.class))if(t[s.class]){const r=t[s.class].push(s);s.classListIndex=r-1}else t[s.class]=[s],s.classListIndex=0});for(const s of e){const n=t[s.class]||[];s.endDate?s.endTime=s.endDate.getTime()/1e3-this.offset_:s.endOnNext&&n[s.classListIndex+1]?s.endTime=n[s.classListIndex+1].startTime:s.duration?s.endTime=s.startTime+s.duration:s.plannedDuration?s.endTime=s.startTime+s.plannedDuration:s.endTime=s.startTime}return e}trimProcessedDateRanges_(t){new Map(this.processedDateRanges_).forEach((e,s)=>{e.startDate.getTime(){if(t.endList||!t.serverControl)return i;const e={};if(t.serverControl.canBlockReload){const{preloadSegment:s}=t;let n=t.mediaSequence+t.segments.length;if(s){const r=s.parts||[],a=hm(t)-1;a>-1&&a!==r.length-1&&(e._HLS_part=a),(a>-1||r.length)&&n--}e._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(e._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(e).length){const s=new E.URL(i);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(n){e.hasOwnProperty(n)&&s.searchParams.set(n,e[n])}),i=s.toString()}return i},rT=(i,t)=>{if(!i)return t;const e=nt(i,t);if(i.preloadHints&&!t.preloadHints&&delete e.preloadHints,i.parts&&!t.parts)delete e.parts;else if(i.parts&&t.parts)for(let s=0;s{const s=i.slice(),n=t.slice();e=e||0;const r=[];let a;for(let l=0;l{!i.resolvedUri&&i.uri&&(i.resolvedUri=Yt(t,i.uri)),i.key&&!i.key.resolvedUri&&(i.key.resolvedUri=Yt(t,i.key.uri)),i.map&&!i.map.resolvedUri&&(i.map.resolvedUri=Yt(t,i.map.uri)),i.map&&i.map.key&&!i.map.key.resolvedUri&&(i.map.key.resolvedUri=Yt(t,i.map.key.uri)),i.parts&&i.parts.length&&i.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=Yt(t,e.uri))}),i.preloadHints&&i.preloadHints.length&&i.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=Yt(t,e.uri))})},bm=function(i){const t=i.segments||[],e=i.preloadSegment;if(e&&e.parts&&e.parts.length){if(e.preloadHints){for(let s=0;si===t||i.segments&&t.segments&&i.segments.length===t.segments.length&&i.endList===t.endList&&i.mediaSequence===t.mediaSequence&&i.preloadSegment===t.preloadSegment,Zo=(i,t,e=Tm)=>{const s=nt(i,{}),n=s.playlists[t.id];if(!n||e(n,t))return null;t.segments=bm(t);const r=nt(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let a=0;a{vm(a,r.resolvedUri)});for(let a=0;a{if(a.playlists)for(let g=0;g{const e=i.segments||[],s=e[e.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(i.partTargetDuration||i.targetDuration||10)};class Zi extends sT{constructor(t,e,s={}){if(super(),!t)throw new Error("A non-empty playlist URL or object is required");this.logger_=de("PlaylistLoader");const{withCredentials:n=!1}=s;this.src=t,this.vhs_=e,this.withCredentials=n,this.addDateRangesToTextTrack_=s.addDateRangesToTextTrack;const r=e.options_;this.customTagParsers=r&&r.customTagParsers||[],this.customTagMappers=r&&r.customTagMappers||[],this.llhls=r&&r.llhls,this.dateRangesStorage_=new Ud,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const t=this.media();if(!t)return;this.dateRangesStorage_.setOffset(t.segments),this.dateRangesStorage_.setPendingDateRanges(t.dateRanges);const e=this.dateRangesStorage_.getDateRangesToProcess();e.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(e)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const t=this.media();let e=Yt(this.main.uri,t.uri);this.llhls&&(e=nT(e,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:e,withCredentials:this.withCredentials,requestType:"hls-playlist"},(s,n)=>{if(this.request)return s?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(t,e,s){const{uri:n,id:r}=e;this.request=null,s&&(this.state=s),this.error={playlist:this.main.playlists[r],status:t.status,message:`HLS playlist request error at URL: ${n}.`,responseText:t.responseText,code:t.status>=500?4:2,metadata:{errorType:D.Error.HlsPlaylistRequestError}},this.trigger("error")}parseManifest_({url:t,manifestString:e}){return Zb({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${t}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${t}: ${s}`),manifestString:e,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:t,playlistObject:e,url:s,id:n}){this.request=null,this.state="HAVE_METADATA";const r=e||this.parseManifest_({url:s,manifestString:t});r.lastRequest=Date.now(),ym({playlist:r,uri:s,id:n});const a=Zo(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(tl(this.media(),!!a)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),E.clearTimeout(this.mediaUpdateTimeout),E.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Ud,this.off()}stopRequest(){if(this.request){const t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}media(t,e){if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof t=="string"){if(!this.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.main.playlists[t]}if(E.clearTimeout(this.finalRenditionTimeout),e){const a=(t.partTargetDuration||t.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=E.setTimeout(this.media.bind(this,t,!1),a))}const s=this.state,n=!this.media_||t.id!==this.media_.id,r=this.main.playlists[t.id];if(r&&r.endList||t.endList&&t.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(n&&(this.trigger("mediachanging"),s==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(tl(t,!0)),n){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=t,this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(a,l)=>{if(this.request){if(t.lastRequest=Date.now(),t.resolvedUri=Mr(t.resolvedUri,l),a)return this.playlistRequestError(this.request,t,s);this.haveMetadata({playlistString:l.responseText,url:t.uri,id:t.id}),s==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(t){this.mediaUpdateTimeout&&(E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const e=this.media();if(t){const s=e?(e.partTargetDuration||e.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=E.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},s)}else this.started?e&&!e.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(t){this.mediaUpdateTimeout&&(E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=E.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(t)},t))}start(){if(this.started=!0,typeof this.src=="object")return this.src.uri||(this.src.uri=E.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(t,e)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:e.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:e.responseText,code:2,metadata:{errorType:D.Error.HlsPlaylistRequestError}},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.src=Mr(this.src,e);const s=this.parseManifest_({manifestString:e.responseText,url:this.src});this.setupInitialPlaylist(s)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(t){if(this.state="HAVE_MAIN_MANIFEST",t.playlists)return this.main=t,_m(this.main,this.srcUri()),t.playlists.forEach(s=>{s.segments=bm(s),s.segments.forEach(n=>{vm(n,s.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const e=this.srcUri()||E.location.href;this.main=iT(t,e),this.haveMetadata({playlistObject:t,url:e,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(t,e){const s=this.main,n=t.ID;let r=s.playlists.length;for(;r--;){const a=s.playlists[r];if(a.attributes["PATHWAY-ID"]===n){const l=a.resolvedUri,u=a.id;if(e){const p=this.createCloneURI_(a.resolvedUri,t),g=os(n,p),y=this.createCloneAttributes_(n,a.attributes),T=this.createClonePlaylist_(a,g,t,y);s.playlists[r]=T,s.playlists[g]=T,s.playlists[p]=T}else s.playlists.splice(r,1);delete s.playlists[u],delete s.playlists[l]}}this.updateOrDeleteCloneMedia(t,e)}updateOrDeleteCloneMedia(t,e){const s=this.main,n=t.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(r=>{if(s.mediaGroups[r]&&s.mediaGroups[r][n]){for(const a in s.mediaGroups[r])if(a===n){for(const l in s.mediaGroups[r][a])s.mediaGroups[r][a][l].playlists.forEach((u,p)=>{const g=s.playlists[u.id],y=g.id,T=g.resolvedUri;delete s.playlists[y],delete s.playlists[T]});delete s.mediaGroups[r][a]}}}),e&&this.createClonedMediaGroups_(t)}addClonePathway(t,e={}){const s=this.main,n=s.playlists.length,r=this.createCloneURI_(e.resolvedUri,t),a=os(t.ID,r),l=this.createCloneAttributes_(t.ID,e.attributes),u=this.createClonePlaylist_(e,a,t,l);s.playlists[n]=u,s.playlists[a]=u,s.playlists[r]=u,this.createClonedMediaGroups_(t)}createClonedMediaGroups_(t){const e=t.ID,s=t["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(r=>{if(n.mediaGroups[r]&&!n.mediaGroups[r][e]){for(const a in n.mediaGroups[r])if(a===s){n.mediaGroups[r][e]={};for(const l in n.mediaGroups[r][a]){const u=n.mediaGroups[r][a][l];n.mediaGroups[r][e][l]=ve({},u);const p=n.mediaGroups[r][e][l],g=this.createCloneURI_(u.resolvedUri,t);p.resolvedUri=g,p.uri=g,p.playlists=[],u.playlists.forEach((y,T)=>{const w=n.playlists[y.id],_=fm(r,e,l),k=os(e,_);if(w&&!n.playlists[k]){const x=this.createClonePlaylist_(w,k,t),A=x.resolvedUri;n.playlists[k]=x,n.playlists[A]=x}p.playlists[T]=this.createClonePlaylist_(y,k,t)})}}}})}createClonePlaylist_(t,e,s,n){const r=this.createCloneURI_(t.resolvedUri,s),a={resolvedUri:r,uri:r,id:e};return t.segments&&(a.segments=[]),n&&(a.attributes=n),nt(t,a)}createCloneURI_(t,e){const s=new URL(t);s.hostname=e["URI-REPLACEMENT"].HOST;const n=e["URI-REPLACEMENT"].PARAMS;for(const r of Object.keys(n))s.searchParams.set(r,n[r]);return s.href}createCloneAttributes_(t,e){const s={"PATHWAY-ID":t};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{e[n]&&(s[n]=t)}),s}getKeyIdSet(t){if(t.contentProtection){const e=new Set;for(const s in t.contentProtection){const n=t.contentProtection[s].attributes.keyId;n&&e.add(n.toLowerCase())}return e}}}const el=function(i,t,e,s){const n=i.responseType==="arraybuffer"?i.response:i.responseText;!t&&n&&(i.responseTime=Date.now(),i.roundTripTime=i.responseTime-i.requestTime,i.bytesReceived=n.byteLength||n.length,i.bandwidth||(i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3))),e.headers&&(i.responseHeaders=e.headers),t&&t.code==="ETIMEDOUT"&&(i.timedout=!0),t||i.aborted||e.statusCode===200||e.statusCode===206||e.statusCode===0||(t=new Error("XHR Failed with a response of: "+(i&&(n||i.responseText)))),s(t,i)},oT=(i,t)=>{if(!i||!i.size)return;let e=t;return i.forEach(s=>{e=s(e)}),e},lT=(i,t,e,s)=>{i&&i.size&&i.forEach(n=>{n(t,e,s)})},Sm=function(){const i=function t(e,s){e=nt({timeout:45e3},e);const n=t.beforeRequest||D.Vhs.xhr.beforeRequest,r=t._requestCallbackSet||D.Vhs.xhr._requestCallbackSet||new Set,a=t._responseCallbackSet||D.Vhs.xhr._responseCallbackSet;n&&typeof n=="function"&&(D.log.warn("beforeRequest is deprecated, use onRequest instead."),r.add(n));const l=D.Vhs.xhr.original===!0?D.xhr:D.Vhs.xhr,u=oT(r,e);r.delete(n);const p=l(u||e,function(y,T){return lT(a,p,y,T),el(p,y,T,s)}),g=p.abort;return p.abort=function(){return p.aborted=!0,g.apply(p,arguments)},p.uri=e.uri,p.requestTime=Date.now(),p};return i.original=!0,i},hT=function(i){let t;const e=i.offset;return t=typeof i.offset=="bigint"||typeof i.length=="bigint"?E.BigInt(i.offset)+E.BigInt(i.length)-E.BigInt(1):i.offset+i.length-1,"bytes="+e+"-"+t},il=function(i){const t={};return i.byterange&&(t.Range=hT(i.byterange)),t},uT=function(i,t){return i.start(t)+"-"+i.end(t)},dT=function(i,t){const e=i.toString(16);return"00".substring(0,2-e.length)+e+(t%2?" ":"")},cT=function(i){return i>=32&&i<126?String.fromCharCode(i):"."},Em=function(i){const t={};return Object.keys(i).forEach(e=>{const s=i[e];xc(s)?t[e]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[e]=s}),t},Ur=function(i){const t=i.byterange||{length:1/0,offset:0};return[t.length,t.offset,i.resolvedUri].join(",")},wm=function(i){return i.resolvedUri},Cm=i=>{const t=Array.prototype.slice.call(i),e=16;let s,n,r="";for(let a=0;aCm(i),mT=i=>{let t,e="";for(t=0;t{if(!t.dateTimeObject)return null;const e=t.videoTimingInfo.transmuxerPrependedSeconds,s=i-(t.videoTimingInfo.transmuxedPresentationStart+e);return new Date(t.dateTimeObject.getTime()+1e3*s)},yT=i=>i.transmuxedPresentationEnd-i.transmuxedPresentationStart-i.transmuxerPrependedSeconds,_T=(i,t)=>{let e;try{e=new Date(i)}catch{return null}if(!t||!t.segments||t.segments.length===0)return null;let s=t.segments[0];if(enew Date(r.getTime()+1e3*a)?null:(e>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:Qt.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"})},vT=(i,t)=>{if(!t||!t.segments||t.segments.length===0)return null;let e,s=0;for(let r=0;rs){if(i>s+n.duration*km)return null;e=n}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:s-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}},bT=(i,t)=>{let e,s;try{e=new Date(i),s=new Date(t)}catch{}const n=e.getTime();return(s.getTime()-n)/1e3},TT=i=>{if(!i.segments||i.segments.length===0)return!1;for(let t=0;t{if(!e)throw new Error("getProgramTime: callback must be provided");if(!i||t===void 0)return e({message:"getProgramTime: playlist and time must be provided"});const s=vT(t,i);if(!s)return e({message:"valid programTime was not found"});if(s.type==="estimate")return e({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=fT(t,s.segment);return r&&(n.programDateTime=r.toISOString()),e(null,n)},xm=({programTime:i,playlist:t,retryCount:e=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(i===void 0||!t||!s)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!r.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!TT(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const l=_T(i,t);if(!l)return a({message:`${i} was not found in the stream`});const u=l.segment,p=bT(u.dateTimeObject,i);if(l.type==="estimate")return e===0?a({message:`${i} is not buffered yet. Try again`}):(s(l.estimatedStart+p),void r.one("seeked",()=>{xm({programTime:i,playlist:t,retryCount:e-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const g=u.start+p,y=()=>a(null,r.currentTime());r.one("seeked",y),n&&r.pause(),s(g)},Bd=(i,t)=>{if(i.readyState===4)return t()},ET=(i,t,e)=>{let s,n=[],r=!1;const a=function(g,y,T,w){return y.abort(),r=!0,e(g,y,T,w)},l=function(g,y){if(r)return;if(g)return a(g,y,"",n);const T=y.responseText.substring(n&&n.byteLength||0,y.responseText.length);if(n=q_(n,Ic(T,!0)),s=s||Ks(n),n.length<10||s&&n.lengtha(g,y,"",n));const w=Tl(n);return w==="ts"&&n.length<188||!w&&n.length<376?Bd(y,()=>a(g,y,"",n)):a(null,y,w,n)},u={uri:i,beforeSend(g){g.overrideMimeType("text/plain; charset=x-user-defined"),g.addEventListener("progress",function({total:y,loaded:T}){return el(g,null,{statusCode:g.status},l)})}},p=t(u,function(g,y){return el(p,g,y,l)});return p},{EventTarget:wT}=D,Fd=function(i,t){if(!Tm(i,t)||i.sidx&&t.sidx&&(i.sidx.offset!==t.sidx.offset||i.sidx.length!==t.sidx.length)||!i.sidx&&t.sidx||i.sidx&&!t.sidx||i.segments&&!t.segments||!i.segments&&t.segments)return!1;if(!i.segments&&!t.segments)return!0;for(let e=0;e`placeholder-uri-${i}-${t}-${s.attributes.NAME||e}`,kT=({mainXml:i,srcUrl:t,clientOffset:e,sidxMapping:s,previousManifest:n})=>{const r=l0(i,{manifestUri:t,clientOffset:e,sidxMapping:s,previousManifest:n});return _m(r,t,CT),r},xT=(i,t)=>{Es(i,(e,s,n,r)=>{r in t.mediaGroups[s][n]||delete i.mediaGroups[s][n][r]})},IT=(i,t,e)=>{let s=!0,n=nt(i,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let r=0;r{if(r.playlists&&r.playlists.length){const p=r.playlists[0].id,g=Zo(n,r.playlists[0],Fd);g&&(n=g,u in n.mediaGroups[a][l]||(n.mediaGroups[a][l][u]=r),n.mediaGroups[a][l][u].playlists[0]=n.playlists[p],s=!1)}}),xT(n,t),t.minimumUpdatePeriod!==i.minimumUpdatePeriod&&(s=!1),s?null:n},AT=(i,t)=>(!i.map&&!t.map||!!(i.map&&t.map&&i.map.byterange.offset===t.map.byterange.offset&&i.map.byterange.length===t.map.byterange.length))&&i.uri===t.uri&&i.byterange.offset===t.byterange.offset&&i.byterange.length===t.byterange.length,qd=(i,t)=>{const e={};for(const s in i){const n=i[s].sidx;if(n){const r=Vr(n);if(!t[r])break;const a=t[r].sidxInfo;AT(a,n)&&(e[r]=t[r])}}return e},PT=(i,t)=>{let e=qd(i.playlists,t);return Es(i,(s,n,r,a)=>{if(s.playlists&&s.playlists.length){const l=s.playlists;e=nt(e,qd(l,t))}}),e};class sl extends wT{constructor(t,e,s={},n){super(),this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:r=!1}=s;if(this.vhs_=e,this.withCredentials=r,this.addMetadataToTextTrack=s.addMetadataToTextTrack,!t)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=de("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=t,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=t}requestErrored_(t,e,s){return!this.request||(this.request=null,t?(this.error=typeof t!="object"||t instanceof Error?{status:e.status,message:"DASH request error at URL: "+e.uri,response:e.response,code:2,metadata:t.metadata}:t,s&&(this.state=s),this.trigger("error"),!0):void 0)}addSidxSegments_(t,e,s){const n=t.sidx&&Vr(t.sidx);if(!t.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n])return void(this.mediaRequest_=E.setTimeout(()=>s(!1),0));const r=Mr(t.sidx.resolvedUri),a=(l,u)=>{if(this.requestErrored_(l,u,e))return;const p=this.mainPlaylistLoader_.sidxMapping_;let g;try{g=u0(W(u.response).subarray(8))}catch(y){return y.metadata={errorType:D.Error.DashManifestSidxParsingError},void this.requestErrored_(y,u,e)}return p[n]={sidxInfo:t.sidx,sidx:g},_l(t,g,t.sidx.resolvedUri),s(!0)};this.request=ET(r,this.vhs_.xhr,(l,u,p,g)=>{if(l)return a(l,u);if(!p||p!=="mp4"){const w=p||"unknown";return a({status:u.status,message:`Unsupported ${w} container type for sidx segment at URL: ${r}`,response:"",playlist:t,internal:!0,playlistExclusionDuration:1/0,code:2,metadata:{errorType:D.Error.UnsupportedSidxContainer,sidxContainer:w}},u)}const{offset:y,length:T}=t.sidx.byterange;if(g.length>=T+y)return a(l,{response:g.subarray(y,y+T),status:u.status,uri:u.uri});this.request=this.vhs_.xhr({uri:r,responseType:"arraybuffer",headers:il({byterange:t.sidx.byterange})},a)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},E.clearTimeout(this.minimumUpdatePeriodTimeout_),E.clearTimeout(this.mediaRequest_),E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}media(t){if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const e=this.state;if(typeof t=="string"){if(!this.mainPlaylistLoader_.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.mainPlaylistLoader_.main.playlists[t]}const s=!this.media_||t.id!==this.media_.id;if(s&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(s&&(this.trigger("mediachanging"),this.trigger("mediachange")));s&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,e,n=>{this.haveMetadata({startingState:e,playlist:t})}))}haveMetadata({startingState:t,playlist:e}){this.state="HAVE_METADATA",this.loadedPlaylists_[e.id]=e,this.mediaRequest_=null,this.refreshMedia_(e.id),t==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(E.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(t){E.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const e=this.media();if(t){const s=e?e.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=E.setTimeout(()=>this.load(),s)}else this.started?e&&!e.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((t,e)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=E.setTimeout(()=>this.haveMain_(),0)}requestMain_(t){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(e,s)=>{if(this.requestErrored_(e,s))return void(this.state==="HAVE_NOTHING"&&(this.started=!1));const n=s.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Mr(this.mainPlaylistLoader_.srcUrl,s),n?(this.handleMain_(),void this.syncClientServerClock_(()=>t(s,n))):t(s,n)})}syncClientServerClock_(t){const e=h0(this.mainPlaylistLoader_.mainXml_);return e===null?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),t()):e.method==="DIRECT"?(this.mainPlaylistLoader_.clientOffset_=e.value-Date.now(),t()):void(this.request=this.vhs_.xhr({uri:Yt(this.mainPlaylistLoader_.srcUrl,e.value),method:e.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(s,n)=>{if(!this.request)return;if(s)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),t();let r;r=e.method==="HEAD"?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):this.mainLoaded_:Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=r-Date.now(),t()}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const t=this.mainPlaylistLoader_.main;let e=kT({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:t});t&&(e=IT(t,e,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=e||t;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!t||e&&e.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(e),!!e}updateMinimumUpdatePeriodTimeout_(){const t=this.mainPlaylistLoader_;t.createMupOnMedia_&&(t.off("loadedmetadata",t.createMupOnMedia_),t.createMupOnMedia_=null),t.minimumUpdatePeriodTimeout_&&(E.clearTimeout(t.minimumUpdatePeriodTimeout_),t.minimumUpdatePeriodTimeout_=null);let e=t.main&&t.main.minimumUpdatePeriod;e===0&&(t.media()?e=1e3*t.media().targetDuration:(t.createMupOnMedia_=t.updateMinimumUpdatePeriodTimeout_,t.one("loadedmetadata",t.createMupOnMedia_))),typeof e!="number"||e<=0?e<0&&this.logger_(`found invalid minimumUpdatePeriod of ${e}, not setting a timeout`):this.createMUPTimeout_(e)}createMUPTimeout_(t){const e=this.mainPlaylistLoader_;e.minimumUpdatePeriodTimeout_=E.setTimeout(()=>{e.minimumUpdatePeriodTimeout_=null,e.trigger("minimumUpdatePeriod"),e.createMUPTimeout_(t)},t)}refreshXml_(){this.requestMain_((t,e)=>{e&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=PT(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,s=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(t){if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const e=this.mainPlaylistLoader_.main.playlists,s=!this.media_||this.media_!==e[t];if(s?this.media_=e[t]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const n=()=>{this.media().endList||(this.mediaUpdateTimeout=E.setTimeout(()=>{this.trigger("mediaupdatetimeout"),n()},tl(this.media(),!!s)))};n()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(t){if(t&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(s=>({cueTime:s.start,frames:[{data:s.messageData}]}));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(t){if(t.contentProtection){const e=new Set;for(const s in t.contentProtection){const n=t.contentProtection[s].attributes["cenc:default_KID"];n&&e.add(n.replace(/-/g,"").toLowerCase())}return e}}}var Pt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const DT=i=>{const t=new Uint8Array(new ArrayBuffer(i.length));for(let e=0;e-1)},this.trigger=function(h){var c,d,m,f;if(c=o[h])if(arguments.length===2)for(m=c.length,d=0;d>>1,o.samplingfrequencyindex<<7|o.channelcount<<3,6,1,2]))},x=function(o){return e($.hdlr,tt[o])},k=function(o){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,o.duration>>>24&255,o.duration>>>16&255,o.duration>>>8&255,255&o.duration,85,196,0,0]);return o.samplerate&&(h[12]=o.samplerate>>>24&255,h[13]=o.samplerate>>>16&255,h[14]=o.samplerate>>>8&255,h[15]=255&o.samplerate),e($.mdhd,h)},_=function(o){return e($.mdia,k(o),x(o.type),l(o))},a=function(o){return e($.mfhd,new Uint8Array([0,0,0,0,(4278190080&o)>>24,(16711680&o)>>16,(65280&o)>>8,255&o]))},l=function(o){return e($.minf,o.type==="video"?e($.vmhd,Nt):e($.smhd,et),s(),I(o))},u=function(o,h){for(var c=[],d=h.length;d--;)c[d]=N(h[d]);return e.apply(null,[$.moof,a(o)].concat(c))},p=function(o){for(var h=o.length,c=[];h--;)c[h]=T(o[h]);return e.apply(null,[$.moov,y(4294967295)].concat(c).concat(g(o)))},g=function(o){for(var h=o.length,c=[];h--;)c[h]=P(o[h]);return e.apply(null,[$.mvex].concat(c))},y=function(o){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&o)>>24,(16711680&o)>>16,(65280&o)>>8,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e($.mvhd,h)},A=function(o){var h,c,d=o.samples||[],m=new Uint8Array(4+d.length);for(c=0;c>>8),f.push(255&d[h].byteLength),f=f.concat(Array.prototype.slice.call(d[h]));for(h=0;h>>8),v.push(255&m[h].byteLength),v=v.concat(Array.prototype.slice.call(m[h]));if(c=[$.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&o.width)>>8,255&o.width,(65280&o.height)>>8,255&o.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),e($.avcC,new Uint8Array([1,o.profileIdc,o.profileCompatibility,o.levelIdc,255].concat([d.length],f,[m.length],v))),e($.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],o.sarRatio){var S=o.sarRatio[0],b=o.sarRatio[1];c.push(e($.pasp,new Uint8Array([(4278190080&S)>>24,(16711680&S)>>16,(65280&S)>>8,255&S,(4278190080&b)>>24,(16711680&b)>>16,(65280&b)>>8,255&b])))}return e.apply(null,c)},$l=function(o){return e($.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&o.channelcount)>>8,255&o.channelcount,(65280&o.samplesize)>>8,255&o.samplesize,0,0,0,0,(65280&o.samplerate)>>8,255&o.samplerate,0,0]),n(o))},w=function(o){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&o.id)>>24,(16711680&o.id)>>16,(65280&o.id)>>8,255&o.id,0,0,0,0,(4278190080&o.duration)>>24,(16711680&o.duration)>>16,(65280&o.duration)>>8,255&o.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&o.width)>>8,255&o.width,0,0,(65280&o.height)>>8,255&o.height,0,0]);return e($.tkhd,h)},N=function(o){var h,c,d,m,f,v,S;return h=e($.tfhd,new Uint8Array([0,0,0,58,(4278190080&o.id)>>24,(16711680&o.id)>>16,(65280&o.id)>>8,255&o.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),v=Math.floor(o.baseMediaDecodeTime/Wl),S=Math.floor(o.baseMediaDecodeTime%Wl),c=e($.tfdt,new Uint8Array([1,0,0,0,v>>>24&255,v>>>16&255,v>>>8&255,255&v,S>>>24&255,S>>>16&255,S>>>8&255,255&S])),f=92,o.type==="audio"?(d=F(o,f),e($.traf,h,c,d)):(m=A(o),d=F(o,m.length+f),e($.traf,h,c,d,m))},T=function(o){return o.duration=o.duration||4294967295,e($.trak,w(o),_(o))},P=function(o){var h=new Uint8Array([0,0,0,0,(4278190080&o.id)>>24,(16711680&o.id)>>16,(65280&o.id)>>8,255&o.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return o.type!=="video"&&(h[h.length-1]=0),e($.trex,h)},na=function(o,h){var c=0,d=0,m=0,f=0;return o.length&&(o[0].duration!==void 0&&(c=1),o[0].size!==void 0&&(d=2),o[0].flags!==void 0&&(m=4),o[0].compositionTimeOffset!==void 0&&(f=8)),[0,0,c|d|m|f,1,(4278190080&o.length)>>>24,(16711680&o.length)>>>16,(65280&o.length)>>>8,255&o.length,(4278190080&h)>>>24,(16711680&h)>>>16,(65280&h)>>>8,255&h]},Vl=function(o,h){var c,d,m,f,v,S;for(h+=20+16*(f=o.samples||[]).length,m=na(f,h),(d=new Uint8Array(m.length+16*f.length)).set(m),c=m.length,S=0;S>>24,d[c++]=(16711680&v.duration)>>>16,d[c++]=(65280&v.duration)>>>8,d[c++]=255&v.duration,d[c++]=(4278190080&v.size)>>>24,d[c++]=(16711680&v.size)>>>16,d[c++]=(65280&v.size)>>>8,d[c++]=255&v.size,d[c++]=v.flags.isLeading<<2|v.flags.dependsOn,d[c++]=v.flags.isDependedOn<<6|v.flags.hasRedundancy<<4|v.flags.paddingValue<<1|v.flags.isNonSyncSample,d[c++]=61440&v.flags.degradationPriority,d[c++]=15&v.flags.degradationPriority,d[c++]=(4278190080&v.compositionTimeOffset)>>>24,d[c++]=(16711680&v.compositionTimeOffset)>>>16,d[c++]=(65280&v.compositionTimeOffset)>>>8,d[c++]=255&v.compositionTimeOffset;return e($.trun,d)},Hl=function(o,h){var c,d,m,f,v,S;for(h+=20+8*(f=o.samples||[]).length,m=na(f,h),(c=new Uint8Array(m.length+8*f.length)).set(m),d=m.length,S=0;S>>24,c[d++]=(16711680&v.duration)>>>16,c[d++]=(65280&v.duration)>>>8,c[d++]=255&v.duration,c[d++]=(4278190080&v.size)>>>24,c[d++]=(16711680&v.size)>>>16,c[d++]=(65280&v.size)>>>8,c[d++]=255&v.size;return e($.trun,c)},F=function(o,h){return o.type==="audio"?Hl(o,h):Vl(o,h)};var ra,Gl,Xl,aa,Kl,Yl,Ql,Jl,sg={ftyp:r=function(){return e($.ftyp,dt,Z,dt,ct)},mdat:function(o){return e($.mdat,o)},moof:u,moov:p,initSegment:function(o){var h,c=r(),d=p(o);return(h=new Uint8Array(c.byteLength+d.byteLength)).set(c),h.set(d,c.byteLength),h}},ng=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Zl=function(o,h){var c=ng();return c.dataOffset=h,c.compositionTimeOffset=o.pts-o.dts,c.duration=o.duration,c.size=4*o.length,c.size+=o.byteLength,o.keyFrame&&(c.flags.dependsOn=2,c.flags.isNonSyncSample=0),c},rg={groupNalsIntoFrames:function(o){var h,c,d=[],m=[];for(m.byteLength=0,m.nalCount=0,m.duration=0,d.byteLength=0,h=0;h1&&(h=o.shift(),o.byteLength-=h.byteLength,o.nalCount-=h.nalCount,o[0][0].dts=h.dts,o[0][0].pts=h.pts,o[0][0].duration+=h.duration),o},generateSampleTable:function(o,h){var c,d,m,f,v,S=h||0,b=[];for(c=0;cCn.ONE_SECOND_IN_TS/2))){for((f=lg()[o.samplerate])||(f=h[0].data),v=0;v=c?o:(h.minSegmentDts=1/0,o.filter(function(d){return d.dts>=c&&(h.minSegmentDts=Math.min(h.minSegmentDts,d.dts),h.minSegmentPts=h.minSegmentDts,!0)}))},generateSampleTable:function(o){var h,c,d=[];for(h=0;h=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(o),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Be.prototype.isEmpty=function(){return this.rows.length===0||this.rows.length===1&&this.rows[0]===""},Be.prototype.addText=function(o){this.rows[this.rowIdx]+=o},Be.prototype.backspace=function(){if(!this.isEmpty()){var o=this.rows[this.rowIdx];this.rows[this.rowIdx]=o.substr(0,o.length-1)}};var In=function(o,h,c){this.serviceNum=o,this.text="",this.currentWindow=new Be(-1),this.windows=[],this.stream=c,typeof h=="string"&&this.createTextDecoder(h)};In.prototype.init=function(o,h){this.startPts=o;for(var c=0;c<8;c++)this.windows[c]=new Be(c),typeof h=="function"&&(this.windows[c].beforeRowOverflow=h)},In.prototype.setCurrentWindow=function(o){this.currentWindow=this.windows[o]},In.prototype.createTextDecoder=function(o){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(o)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+o+" encoding. "+h})}};var lt=function(o){o=o||{},lt.prototype.init.call(this);var h,c=this,d=o.captionServices||{},m={};Object.keys(d).forEach(f=>{h=d[f],/^SERVICE/.test(f)&&(m[f]=h.encoding)}),this.serviceEncodings=m,this.current708Packet=null,this.services={},this.push=function(f){f.type===3?(c.new708Packet(),c.add708Bytes(f)):(c.current708Packet===null&&c.new708Packet(),c.add708Bytes(f))}};lt.prototype=new ha,lt.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},lt.prototype.add708Bytes=function(o){var h=o.ccData,c=h>>>8,d=255&h;this.current708Packet.ptsVals.push(o.pts),this.current708Packet.data.push(c),this.current708Packet.data.push(d)},lt.prototype.push708Packet=function(){var o=this.current708Packet,h=o.data,c=null,d=null,m=0,f=h[m++];for(o.seq=f>>6,o.sizeCode=63&f;m>5)===7&&d>0&&(c=f=h[m++]),this.pushServiceBlock(c,m,d),d>0&&(m+=d-1)},lt.prototype.pushServiceBlock=function(o,h,c){var d,m=h,f=this.current708Packet.data,v=this.services[o];for(v||(v=this.initService(o,m));m("0"+(255&Q).toString(16)).slice(-2)).join("")}if(v?(m=[C,L],o++):m=[C],h.textDecoder_&&!f)d=h.textDecoder_.decode(new Uint8Array(m));else if(v){const z=H(m);d=String.fromCharCode(parseInt(z,16))}else d=gg(b|C);return U.pendingNewLine&&!U.isEmpty()&&U.newLine(this.getPts(o)),U.pendingNewLine=!1,U.addText(d),o},lt.prototype.multiByteCharacter=function(o,h){var c=this.current708Packet.data,d=c[o+1],m=c[o+2];return xn(d)&&xn(m)&&(o=this.handleText(++o,h,{isMultiByte:!0})),o},lt.prototype.setCurrentWindow=function(o,h){var c=7&this.current708Packet.data[o];return h.setCurrentWindow(c),o},lt.prototype.defineWindow=function(o,h){var c=this.current708Packet.data,d=c[o],m=7&d;h.setCurrentWindow(m);var f=h.currentWindow;return d=c[++o],f.visible=(32&d)>>5,f.rowLock=(16&d)>>4,f.columnLock=(8&d)>>3,f.priority=7&d,d=c[++o],f.relativePositioning=(128&d)>>7,f.anchorVertical=127&d,d=c[++o],f.anchorHorizontal=d,d=c[++o],f.anchorPoint=(240&d)>>4,f.rowCount=15&d,d=c[++o],f.columnCount=63&d,d=c[++o],f.windowStyle=(56&d)>>3,f.penStyle=7&d,f.virtualRowCount=f.rowCount+1,o},lt.prototype.setWindowAttributes=function(o,h){var c=this.current708Packet.data,d=c[o],m=h.currentWindow.winAttr;return d=c[++o],m.fillOpacity=(192&d)>>6,m.fillRed=(48&d)>>4,m.fillGreen=(12&d)>>2,m.fillBlue=3&d,d=c[++o],m.borderType=(192&d)>>6,m.borderRed=(48&d)>>4,m.borderGreen=(12&d)>>2,m.borderBlue=3&d,d=c[++o],m.borderType+=(128&d)>>5,m.wordWrap=(64&d)>>6,m.printDirection=(48&d)>>4,m.scrollDirection=(12&d)>>2,m.justify=3&d,d=c[++o],m.effectSpeed=(240&d)>>4,m.effectDirection=(12&d)>>2,m.displayEffect=3&d,o},lt.prototype.flushDisplayed=function(o,h){for(var c=[],d=0;d<8;d++)h.windows[d].visible&&!h.windows[d].isEmpty()&&c.push(h.windows[d].getText());h.endPts=o,h.text=c.join(` + +`),this.pushCaption(h),h.startPts=o},lt.prototype.pushCaption=function(o){o.text!==""&&(this.trigger("data",{startPts:o.startPts,endPts:o.endPts,text:o.text,stream:"cc708_"+o.serviceNum}),o.text="",o.startPts=o.endPts)},lt.prototype.displayWindows=function(o,h){var c=this.current708Packet.data[++o],d=this.getPts(o);this.flushDisplayed(d,h);for(var m=0;m<8;m++)c&1<>4,m.offset=(12&d)>>2,m.penSize=3&d,d=c[++o],m.italics=(128&d)>>7,m.underline=(64&d)>>6,m.edgeType=(56&d)>>3,m.fontStyle=7&d,o},lt.prototype.setPenColor=function(o,h){var c=this.current708Packet.data,d=c[o],m=h.currentWindow.penColor;return d=c[++o],m.fgOpacity=(192&d)>>6,m.fgRed=(48&d)>>4,m.fgGreen=(12&d)>>2,m.fgBlue=3&d,d=c[++o],m.bgOpacity=(192&d)>>6,m.bgRed=(48&d)>>4,m.bgGreen=(12&d)>>2,m.bgBlue=3&d,d=c[++o],m.edgeRed=(48&d)>>4,m.edgeGreen=(12&d)>>2,m.edgeBlue=3&d,o},lt.prototype.setPenLocation=function(o,h){var c=this.current708Packet.data,d=c[o],m=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,d=c[++o],m.row=15&d,d=c[++o],m.column=63&d,o},lt.prototype.reset=function(o,h){var c=this.getPts(o);return this.flushDisplayed(c,h),this.initService(h.serviceNum,o)};var fg={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},An=function(o){return o===null?"":(o=fg[o]||o,String.fromCharCode(o))},Pn=14,yg=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],yi=function(){for(var o=[],h=Pn+1;h--;)o.push({text:"",indent:0,offset:0});return o},yt=function(o,h){yt.prototype.init.call(this),this.field_=o||0,this.dataChannel_=h||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(c){var d,m,f,v,S;if((d=32639&c.ccData)!==this.lastControlCode_){if((61440&d)==4096?this.lastControlCode_=d:d!==this.PADDING_&&(this.lastControlCode_=null),f=d>>>8,v=255&d,d!==this.PADDING_)if(d===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(d===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(c.pts),this.flushDisplayed(c.pts),m=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=m,this.startPts_=c.pts;else if(d===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(c.pts);else if(d===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(c.pts);else if(d===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(c.pts);else if(d===this.CARRIAGE_RETURN_)this.clearFormatting(c.pts),this.flushDisplayed(c.pts),this.shiftRowsUp_(),this.startPts_=c.pts;else if(d===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(d===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(c.pts),this.displayed_=yi();else if(d===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=yi();else if(d===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(c.pts),this.displayed_=yi()),this.mode_="paintOn",this.startPts_=c.pts;else if(this.isSpecialCharacter(f,v))S=An((f=(3&f)<<8)|v),this[this.mode_](c.pts,S),this.column_++;else if(this.isExtCharacter(f,v))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),S=An((f=(3&f)<<8)|v),this[this.mode_](c.pts,S),this.column_++;else if(this.isMidRowCode(f,v))this.clearFormatting(c.pts),this[this.mode_](c.pts," "),this.column_++,14&~v||this.addFormatting(c.pts,["i"]),1&~v||this.addFormatting(c.pts,["u"]);else if(this.isOffsetControlCode(f,v)){const C=3&v;this.nonDisplayed_[this.row_].offset=C,this.column_+=C}else if(this.isPAC(f,v)){var b=yg.indexOf(7968&d);if(this.mode_==="rollUp"&&(b-this.rollUpRows_+1<0&&(b=this.rollUpRows_-1),this.setRollUp(c.pts,b)),b!==this.row_&&b>=0&&b<=14&&(this.clearFormatting(c.pts),this.row_=b),1&v&&this.formatting_.indexOf("u")===-1&&this.addFormatting(c.pts,["u"]),!(16&~d)){const C=(14&d)>>1;this.column_=4*C,this.nonDisplayed_[this.row_].indent+=C}this.isColorPAC(v)&&(14&~v||this.addFormatting(c.pts,["i"]))}else this.isNormalChar(f)&&(v===0&&(v=null),S=An(f),S+=An(v),this[this.mode_](c.pts,S),this.column_+=S.length)}else this.lastControlCode_=null}};yt.prototype=new ha,yt.prototype.flushDisplayed=function(o){const h=d=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+d+"."})},c=[];this.displayed_.forEach((d,m)=>{if(d&&d.text&&d.text.length){try{d.text=d.text.trim()}catch{h(m)}d.text.length&&c.push({text:d.text,line:m+1,position:10+Math.min(70,10*d.indent)+2.5*d.offset})}else d==null&&h(m)}),c.length&&this.trigger("data",{startPts:this.startPts_,endPts:o,content:c,stream:this.name_})},yt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=yi(),this.nonDisplayed_=yi(),this.lastControlCode_=null,this.column_=0,this.row_=Pn,this.rollUpRows_=2,this.formatting_=[]},yt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},yt.prototype.isSpecialCharacter=function(o,h){return o===this.EXT_&&h>=48&&h<=63},yt.prototype.isExtCharacter=function(o,h){return(o===this.EXT_+1||o===this.EXT_+2)&&h>=32&&h<=63},yt.prototype.isMidRowCode=function(o,h){return o===this.EXT_&&h>=32&&h<=47},yt.prototype.isOffsetControlCode=function(o,h){return o===this.OFFSET_&&h>=33&&h<=35},yt.prototype.isPAC=function(o,h){return o>=this.BASE_&&o=64&&h<=127},yt.prototype.isColorPAC=function(o){return o>=64&&o<=79||o>=96&&o<=127},yt.prototype.isNormalChar=function(o){return o>=32&&o<=127},yt.prototype.setRollUp=function(o,h){if(this.mode_!=="rollUp"&&(this.row_=Pn,this.mode_="rollUp",this.flushDisplayed(o),this.nonDisplayed_=yi(),this.displayed_=yi()),h!==void 0&&h!==this.row_)for(var c=0;c"},"");this[this.mode_](o,c)},yt.prototype.clearFormatting=function(o){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(c,d){return c+""},"");this.formatting_=[],this[this.mode_](o,h)}},yt.prototype.popOn=function(o,h){var c=this.nonDisplayed_[this.row_].text;c+=h,this.nonDisplayed_[this.row_].text=c},yt.prototype.rollUp=function(o,h){var c=this.displayed_[this.row_].text;c+=h,this.displayed_[this.row_].text=c},yt.prototype.shiftRowsUp_=function(){var o;for(o=0;oh&&(c=-1);Math.abs(h-o)>bg;)o+=c*vg;return o},da=function(o){var h,c;da.prototype.init.call(this),this.type_=o||sh,this.push=function(d){d.type!=="metadata"?this.type_!==sh&&d.type!==this.type_||(c===void 0&&(c=d.dts),d.dts=ua(d.dts,c),d.pts=ua(d.pts,c),h=d.dts,this.trigger("data",d)):this.trigger("data",d)},this.flush=function(){c=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){c=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};da.prototype=new _g;var ca,nh={TimestampRolloverStream:da,handleRollover:ua},Tg=(o,h,c)=>{if(!o)return-1;for(var d=c;d";o.data[0]===On.Utf8&&((h=Ln(o.data,0,d))<0||(o.mimeType=Cs(o.data,d,h),d=h+1,o.pictureType=o.data[d],d++,(c=Ln(o.data,0,d))<0||(o.description=ws(o.data,d,c),d=c+1,o.mimeType===m?o.url=Cs(o.data,d,o.data.length):o.pictureData=o.data.subarray(d,o.data.length))))},"T*":function(o){o.data[0]===On.Utf8&&(o.value=ws(o.data,1,o.data.length).replace(/\0*$/,""),o.values=o.value.split("\0"))},TXXX:function(o){var h;o.data[0]===On.Utf8&&(h=Ln(o.data,0,1))!==-1&&(o.description=ws(o.data,1,h),o.value=ws(o.data,h+1,o.data.length).replace(/\0*$/,""),o.data=o.value)},"W*":function(o){o.url=Cs(o.data,0,o.data.length).replace(/\0.*$/,"")},WXXX:function(o){var h;o.data[0]===On.Utf8&&(h=Ln(o.data,0,1))!==-1&&(o.description=ws(o.data,1,h),o.url=Cs(o.data,h+1,o.data.length).replace(/\0.*$/,""))},PRIV:function(o){var h;for(h=0;h>>2;z*=4,z+=3&H[7],L.timeStamp=z,S.pts===void 0&&S.dts===void 0&&(S.pts=L.timeStamp,S.dts=L.timeStamp),this.trigger("timestamp",L)}S.frames.push(L),b+=10,b+=C}while(b>>4>1&&(v+=m[v]+1),f.pid===0)f.type="pat",o(m.subarray(v),f),this.trigger("data",f);else if(f.pid===this.pmtPid)for(f.type="pmt",o(m.subarray(v),f),this.trigger("data",f);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([m,v,f]):this.processPes_(m,v,f)},this.processPes_=function(m,f,v){v.pid===this.programMapTable.video?v.streamType=pe.H264_STREAM_TYPE:v.pid===this.programMapTable.audio?v.streamType=pe.ADTS_STREAM_TYPE:v.streamType=this.programMapTable["timed-metadata"][v.pid],v.type="pes",v.data=m.subarray(f),this.trigger("data",v)}},Is.prototype=new ma,Is.STREAM_TYPES={h264:27,adts:15},Nn=function(){var o,h=this,c=!1,d={data:[],size:0},m={data:[],size:0},f={data:[],size:0},v=function(b,C){var L;const U=b[0]<<16|b[1]<<8|b[2];C.data=new Uint8Array,U===1&&(C.packetLength=6+(b[4]<<8|b[5]),C.dataAlignmentIndicator=!!(4&b[6]),192&(L=b[7])&&(C.pts=(14&b[9])<<27|(255&b[10])<<20|(254&b[11])<<12|(255&b[12])<<5|(254&b[13])>>>3,C.pts*=4,C.pts+=(6&b[13])>>>1,C.dts=C.pts,64&L&&(C.dts=(14&b[14])<<27|(255&b[15])<<20|(254&b[16])<<12|(255&b[17])<<5|(254&b[18])>>>3,C.dts*=4,C.dts+=(6&b[18])>>>1)),C.data=b.subarray(9+b[8]))},S=function(b,C,L){var U,H=new Uint8Array(b.size),z={type:C},Q=0,it=0,Rt=!1;if(b.data.length&&!(b.size<9)){for(z.trackId=b.data[0].pid,Q=0;Q>5,b=(S=1024*(1+(3&h[C+6])))*xg/lh[(60&h[C+2])>>>2],h.byteLength-C>>6&3),channelcount:(1&h[C+2])<<2|(192&h[C+3])>>>6,samplerate:lh[(60&h[C+2])>>>2],samplingfrequencyindex:(60&h[C+2])>>>2,samplesize:16,data:h.subarray(C+7+f,C+m)}),c++,C+=m}else typeof L!="number"&&(L=C),C++;typeof L=="number"&&(this.skipWarn_(L,C),L=null),h=h.subarray(C)}},this.flush=function(){c=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}}).prototype=new kg;var hh,Ig=_a;hh=function(o){var h=o.byteLength,c=0,d=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+d},this.loadWord=function(){var m=o.byteLength-h,f=new Uint8Array(4),v=Math.min(4,h);if(v===0)throw new Error("no bytes available");f.set(o.subarray(m,m+v)),c=new DataView(f.buffer).getUint32(0),d=8*v,h-=v},this.skipBits=function(m){var f;d>m?(c<<=m,d-=m):(m-=d,m-=8*(f=Math.floor(m/8)),h-=f,this.loadWord(),c<<=m,d-=m)},this.readBits=function(m){var f=Math.min(d,m),v=c>>>32-f;return(d-=f)>0?c<<=f:h>0&&this.loadWord(),(f=m-f)>0?v<>>m)return c<<=m,d-=m,m;return this.loadWord(),m+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var m=this.skipLeadingZeros();return this.readBits(m+1)-1},this.readExpGolomb=function(){var m=this.readUnsignedExpGolomb();return 1&m?1+m>>>1:-1*(m>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Rn,Mn,uh,dh=Qe,Ag=hh;(Mn=function(){var o,h,c=0;Mn.prototype.init.call(this),this.push=function(d){var m;h?((m=new Uint8Array(h.byteLength+d.data.byteLength)).set(h),m.set(d.data,h.byteLength),h=m):h=d.data;for(var f=h.byteLength;c3&&this.trigger("data",h.subarray(c+3)),h=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new dh,uh={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Rn=function(){var o,h,c,d,m,f,v,S=new Mn;Rn.prototype.init.call(this),o=this,this.push=function(b){b.type==="video"&&(h=b.trackId,c=b.pts,d=b.dts,S.push(b))},S.on("data",function(b){var C={trackId:h,pts:c,dts:d,data:b,nalUnitTypeCode:31&b[0]};switch(C.nalUnitTypeCode){case 5:C.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:C.nalUnitType="sei_rbsp",C.escapedRBSP=m(b.subarray(1));break;case 7:C.nalUnitType="seq_parameter_set_rbsp",C.escapedRBSP=m(b.subarray(1)),C.config=f(C.escapedRBSP);break;case 8:C.nalUnitType="pic_parameter_set_rbsp";break;case 9:C.nalUnitType="access_unit_delimiter_rbsp"}o.trigger("data",C)}),S.on("done",function(){o.trigger("done")}),S.on("partialdone",function(){o.trigger("partialdone")}),S.on("reset",function(){o.trigger("reset")}),S.on("endedtimeline",function(){o.trigger("endedtimeline")}),this.flush=function(){S.flush()},this.partialFlush=function(){S.partialFlush()},this.reset=function(){S.reset()},this.endTimeline=function(){S.endTimeline()},v=function(b,C){var L,U=8,H=8;for(L=0;L=0?c:0,(16&o[h+5])>>4?c+20:c+10},ph=function(o,h){return o.length-h<10||o[h]!==73||o[h+1]!==68||o[h+2]!==51?h:(h+=ch(o,h),ph(o,h))},mh=function(o){return o[0]<<21|o[1]<<14|o[2]<<7|o[3]},Lg=function(o,h,c){var d,m="";for(d=h;d=h+2&&!(255&~o[h])&&!(240&~o[h+1])&&(22&o[h+1])==16},parseId3TagSize:ch,parseAdtsSize:function(o,h){var c=(224&o[h+5])>>5,d=o[h+4]<<3;return 6144&o[h+3]|d|c},parseType:function(o,h){return o[h]===73&&o[h+1]===68&&o[h+2]===51?"timed-metadata":!0&o[h]&&!(240&~o[h+1])?"audio":null},parseSampleRate:function(o){for(var h=0;h+5>>2];h++}return null},parseAacTimestamp:function(o){var h,c,d;h=10,64&o[5]&&(h+=4,h+=mh(o.subarray(10,14)));do{if((c=mh(o.subarray(h+4,h+8)))<1)return null;if(String.fromCharCode(o[h],o[h+1],o[h+2],o[h+3])==="PRIV"){d=o.subarray(h+10,h+c+10);for(var m=0;m>>2;return v*=4,v+=3&f[7]}break}}h+=10,h+=c}while(h=3;)if(o[b]!==73||o[b+1]!==68||o[b+2]!==51)if(255&~o[b]||240&~o[b+1])b++;else{if(o.length-b<7||b+(S=gh.parseAdtsSize(o,b))>o.length)break;f={type:"audio",data:o.subarray(b,b+S),pts:h,dts:h},this.trigger("data",f),b+=S}else{if(o.length-b<10||b+(S=gh.parseId3TagSize(o,b))>o.length)break;m={type:"timed-metadata",data:o.subarray(b,b+S)},this.trigger("data",m),b+=S}d=o.length-b,o=d>0?o.subarray(b):new Uint8Array},this.reset=function(){o=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){o=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Qe;var As,Ni,Un,_i,Ng=va,Rg=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Mg=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Bn=Qe,Ps=sg,Ds=rg,Fn=ug,me=cg,Fe=Cg,qn=mt,fh=Ig,Ug=Pg.H264Stream,Bg=Ng,Fg=ba.isLikelyAacData,qg=mt.ONE_SECOND_IN_TS,Ta=Rg,Sa=Mg,jg=function(o,h){h.stream=o,this.trigger("log",h)},yh=function(o,h){for(var c=Object.keys(h),d=0;d=-Q&&b<=z&&(!C||it>b)&&(C=U,it=b));return C?C.gop:null},this.alignGopsAtStart_=function(S){var b,C,L,U,H,z,Q,it;for(H=S.byteLength,z=S.nalCount,Q=S.duration,b=C=0;bL.pts?b++:(C++,H-=U.byteLength,z-=U.nalCount,Q-=U.duration);return C===0?S:C===S.length?null:((it=S.slice(C)).byteLength=H,it.duration=Q,it.nalCount=z,it.pts=it[0].pts,it.dts=it[0].dts,it)},this.alignGopsAtEnd_=function(S){var b,C,L,U,H,z,Q;for(b=v.length-1,C=S.length-1,H=null,z=!1;b>=0&&C>=0;){if(L=v[b],U=S[C],L.pts===U.pts){z=!0;break}L.pts>U.pts?b--:(b===v.length-1&&(H=C),C--)}if(!z&&H===null)return null;if((Q=z?C:H)===0)return S;var it=S.slice(Q),Rt=it.reduce(function(ge,Ui){return ge.byteLength+=Ui.byteLength,ge.duration+=Ui.duration,ge.nalCount+=Ui.nalCount,ge},{byteLength:0,duration:0,nalCount:0});return it.byteLength=Rt.byteLength,it.duration=Rt.duration,it.nalCount=Rt.nalCount,it.pts=it[0].pts,it.dts=it[0].dts,it},this.alignGopsWith=function(S){v=S}},As.prototype=new Bn,_i=function(o,h){this.numberOfTracks=0,this.metadataStream=h,(o=o||{}).remux!==void 0?this.remuxTracks=!!o.remux:this.remuxTracks=!0,typeof o.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=o.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,_i.prototype.init.call(this),this.push=function(c){return c.content||c.text?this.pendingCaptions.push(c):c.frames?this.pendingMetadata.push(c):(this.pendingTracks.push(c.track),this.pendingBytes+=c.boxes.byteLength,c.track.type==="video"&&(this.videoTrack=c.track,this.pendingBoxes.push(c.boxes)),void(c.track.type==="audio"&&(this.audioTrack=c.track,this.pendingBoxes.unshift(c.boxes))))}},_i.prototype=new Bn,_i.prototype.flush=function(o){var h,c,d,m,f=0,v={captions:[],captionStreams:{},metadata:[],info:{}},S=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(S=this.videoTrack.timelineStartInfo.pts,Sa.forEach(function(b){v.info[b]=this.videoTrack[b]},this)):this.audioTrack&&(S=this.audioTrack.timelineStartInfo.pts,Ta.forEach(function(b){v.info[b]=this.audioTrack[b]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?v.type=this.pendingTracks[0].type:v.type="combined",this.emittedTracks+=this.pendingTracks.length,d=Ps.initSegment(this.pendingTracks),v.initSegment=new Uint8Array(d.byteLength),v.initSegment.set(d),v.data=new Uint8Array(this.pendingBytes),m=0;m=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},_i.prototype.setRemux=function(o){this.remuxTracks=o},Un=function(o){var h,c,d=this,m=!0;Un.prototype.init.call(this),o=o||{},this.baseMediaDecodeTime=o.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var f={};this.transmuxPipeline_=f,f.type="aac",f.metadataStream=new Fe.MetadataStream,f.aacStream=new Bg,f.audioTimestampRolloverStream=new Fe.TimestampRolloverStream("audio"),f.timedMetadataTimestampRolloverStream=new Fe.TimestampRolloverStream("timed-metadata"),f.adtsStream=new fh,f.coalesceStream=new _i(o,f.metadataStream),f.headOfPipeline=f.aacStream,f.aacStream.pipe(f.audioTimestampRolloverStream).pipe(f.adtsStream),f.aacStream.pipe(f.timedMetadataTimestampRolloverStream).pipe(f.metadataStream).pipe(f.coalesceStream),f.metadataStream.on("timestamp",function(v){f.aacStream.setTimestamp(v.timeStamp)}),f.aacStream.on("data",function(v){v.type!=="timed-metadata"&&v.type!=="audio"||f.audioSegmentStream||(c=c||{timelineStartInfo:{baseMediaDecodeTime:d.baseMediaDecodeTime},codec:"adts",type:"audio"},f.coalesceStream.numberOfTracks++,f.audioSegmentStream=new Ni(c,o),f.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),f.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),f.adtsStream.pipe(f.audioSegmentStream).pipe(f.coalesceStream),d.trigger("trackinfo",{hasAudio:!!c,hasVideo:!!h}))}),f.coalesceStream.on("data",this.trigger.bind(this,"data")),f.coalesceStream.on("done",this.trigger.bind(this,"done")),yh(this,f)},this.setupTsPipeline=function(){var f={};this.transmuxPipeline_=f,f.type="ts",f.metadataStream=new Fe.MetadataStream,f.packetStream=new Fe.TransportPacketStream,f.parseStream=new Fe.TransportParseStream,f.elementaryStream=new Fe.ElementaryStream,f.timestampRolloverStream=new Fe.TimestampRolloverStream,f.adtsStream=new fh,f.h264Stream=new Ug,f.captionStream=new Fe.CaptionStream(o),f.coalesceStream=new _i(o,f.metadataStream),f.headOfPipeline=f.packetStream,f.packetStream.pipe(f.parseStream).pipe(f.elementaryStream).pipe(f.timestampRolloverStream),f.timestampRolloverStream.pipe(f.h264Stream),f.timestampRolloverStream.pipe(f.adtsStream),f.timestampRolloverStream.pipe(f.metadataStream).pipe(f.coalesceStream),f.h264Stream.pipe(f.captionStream).pipe(f.coalesceStream),f.elementaryStream.on("data",function(v){var S;if(v.type==="metadata"){for(S=v.tracks.length;S--;)h||v.tracks[S].type!=="video"?c||v.tracks[S].type!=="audio"||((c=v.tracks[S]).timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime):(h=v.tracks[S]).timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime;h&&!f.videoSegmentStream&&(f.coalesceStream.numberOfTracks++,f.videoSegmentStream=new As(h,o),f.videoSegmentStream.on("log",d.getLogTrigger_("videoSegmentStream")),f.videoSegmentStream.on("timelineStartInfo",function(b){c&&!o.keepOriginalTimestamps&&(c.timelineStartInfo=b,f.audioSegmentStream.setEarliestDts(b.dts-d.baseMediaDecodeTime))}),f.videoSegmentStream.on("processedGopsInfo",d.trigger.bind(d,"gopInfo")),f.videoSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"videoSegmentTimingInfo")),f.videoSegmentStream.on("baseMediaDecodeTime",function(b){c&&f.audioSegmentStream.setVideoBaseMediaDecodeTime(b)}),f.videoSegmentStream.on("timingInfo",d.trigger.bind(d,"videoTimingInfo")),f.h264Stream.pipe(f.videoSegmentStream).pipe(f.coalesceStream)),c&&!f.audioSegmentStream&&(f.coalesceStream.numberOfTracks++,f.audioSegmentStream=new Ni(c,o),f.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),f.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),f.audioSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"audioSegmentTimingInfo")),f.adtsStream.pipe(f.audioSegmentStream).pipe(f.coalesceStream)),d.trigger("trackinfo",{hasAudio:!!c,hasVideo:!!h})}}),f.coalesceStream.on("data",this.trigger.bind(this,"data")),f.coalesceStream.on("id3Frame",function(v){v.dispatchType=f.metadataStream.dispatchType,d.trigger("id3Frame",v)}),f.coalesceStream.on("caption",this.trigger.bind(this,"caption")),f.coalesceStream.on("done",this.trigger.bind(this,"done")),yh(this,f)},this.setBaseMediaDecodeTime=function(f){var v=this.transmuxPipeline_;o.keepOriginalTimestamps||(this.baseMediaDecodeTime=f),c&&(c.timelineStartInfo.dts=void 0,c.timelineStartInfo.pts=void 0,me.clearDtsInfo(c),v.audioTimestampRolloverStream&&v.audioTimestampRolloverStream.discontinuity()),h&&(v.videoSegmentStream&&(v.videoSegmentStream.gopCache_=[]),h.timelineStartInfo.dts=void 0,h.timelineStartInfo.pts=void 0,me.clearDtsInfo(h),v.captionStream.reset()),v.timestampRolloverStream&&v.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(f){c&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(f)},this.setRemux=function(f){var v=this.transmuxPipeline_;o.remux=f,v&&v.coalesceStream&&v.coalesceStream.setRemux(f)},this.alignGopsWith=function(f){h&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(f)},this.getLogTrigger_=function(f){var v=this;return function(S){S.stream=f,v.trigger("log",S)}},this.push=function(f){if(m){var v=Fg(f);v&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():v||this.transmuxPipeline_.type==="ts"||this.setupTsPipeline(),m=!1}this.transmuxPipeline_.headOfPipeline.push(f)},this.flush=function(){m=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Un.prototype=new Bn;var vh,bh,Th,Sh,Eh,wa,wh,$g={Transmuxer:Un,VideoSegmentStream:As,AudioSegmentStream:Ni,AUDIO_PROPERTIES:Ta,VIDEO_PROPERTIES:Sa,generateSegmentTimingInfo:Ea},jn={toUnsigned:function(o){return o>>>0},toHexString:function(o){return("00"+o.toString(16)).slice(-2)}},Ch=function(o){var h="";return h+=String.fromCharCode(o[0]),h+=String.fromCharCode(o[1]),h+=String.fromCharCode(o[2]),h+=String.fromCharCode(o[3])},Hg=jn.toUnsigned,Vg=Ch,kh=function(o,h){var c,d,m,f,v,S=[];if(!h.length)return null;for(c=0;c1?c+d:o.byteLength,m===h[0]&&(h.length===1?S.push(o.subarray(c+8,f)):(v=kh(o.subarray(c+8,f),h.slice(1))).length&&(S=S.concat(v))),c=f;return S},xh=kh,zg=jn.toUnsigned,Wg=wn.getUint64,Ih=function(o){var h={version:o[0],flags:new Uint8Array(o.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Wg(o.subarray(4)):h.baseMediaDecodeTime=zg(o[4]<<24|o[5]<<16|o[6]<<8|o[7]),h},Ah=function(o){return{isLeading:(12&o[0])>>>2,dependsOn:3&o[0],isDependedOn:(192&o[1])>>>6,hasRedundancy:(48&o[1])>>>4,paddingValue:(14&o[1])>>>1,isNonSyncSample:1&o[1],degradationPriority:o[2]<<8|o[3]}},Ph=function(o){var h,c={version:o[0],flags:new Uint8Array(o.subarray(1,4)),samples:[]},d=new DataView(o.buffer,o.byteOffset,o.byteLength),m=1&c.flags[2],f=4&c.flags[2],v=1&c.flags[1],S=2&c.flags[1],b=4&c.flags[1],C=8&c.flags[1],L=d.getUint32(4),U=8;for(m&&(c.dataOffset=d.getInt32(U),U+=4),f&&L&&(h={flags:Ah(o.subarray(U,U+4))},U+=4,v&&(h.duration=d.getUint32(U),U+=4),S&&(h.size=d.getUint32(U),U+=4),C&&(c.version===1?h.compositionTimeOffset=d.getInt32(U):h.compositionTimeOffset=d.getUint32(U),U+=4),c.samples.push(h),L--);L--;)h={},v&&(h.duration=d.getUint32(U),U+=4),S&&(h.size=d.getUint32(U),U+=4),b&&(h.flags=Ah(o.subarray(U,U+4)),U+=4),C&&(c.version===1?h.compositionTimeOffset=d.getInt32(U):h.compositionTimeOffset=d.getUint32(U),U+=4),c.samples.push(h);return c},Dh=function(o){var h,c=new DataView(o.buffer,o.byteOffset,o.byteLength),d={version:o[0],flags:new Uint8Array(o.subarray(1,4)),trackId:c.getUint32(4)},m=1&d.flags[2],f=2&d.flags[2],v=8&d.flags[2],S=16&d.flags[2],b=32&d.flags[2],C=65536&d.flags[0],L=131072&d.flags[0];return h=8,m&&(h+=4,d.baseDataOffset=c.getUint32(12),h+=4),f&&(d.sampleDescriptionIndex=c.getUint32(h),h+=4),v&&(d.defaultSampleDuration=c.getUint32(h),h+=4),S&&(d.defaultSampleSize=c.getUint32(h),h+=4),b&&(d.defaultSampleFlags=c.getUint32(h)),C&&(d.durationIsEmpty=!0),!m&&L&&(d.baseDataOffsetIsMoof=!0),d},Lh=typeof window<"u"?window:i!==void 0?i:typeof self<"u"?self:{},Gg=eh.discardEmulationPreventionBytes,Xg=ih.CaptionStream,Ls=xh,Kg=Ih,Yg=Ph,Qg=Dh,Oh=Lh,Jg=function(o,h){for(var c=o,d=0;d0?Kg(Q[0]).baseMediaDecodeTime:0,Rt=Ls(L,["trun"]);h===z&&Rt.length>0&&(S=tf(Rt,it,H),b=Zg(C,S,z),m[z]||(m[z]={seiNals:[],logs:[]}),m[z].seiNals=m[z].seiNals.concat(b.seiNals),m[z].logs=m[z].logs.concat(b.logs))}),m},sf=function(o,h,c){if(h===null)return null;var d=ef(o,h)[h]||{};return{seiNals:d.seiNals,logs:d.logs,timescale:c}},nf=function(){var o,h,c,d,m,f,v=!1;this.isInitialized=function(){return v},this.init=function(S){o=new Xg,v=!0,f=!!S&&S.isPartial,o.on("data",function(b){b.startTime=b.startPts/d,b.endTime=b.endPts/d,m.captions.push(b),m.captionStreams[b.stream]=!0}),o.on("log",function(b){m.logs.push(b)})},this.isNewInit=function(S,b){return!(S&&S.length===0||b&&typeof b=="object"&&Object.keys(b).length===0)&&(c!==S[0]||d!==b[c])},this.parse=function(S,b,C){var L;if(!this.isInitialized()||!b||!C)return null;if(this.isNewInit(b,C))c=b[0],d=C[c];else if(c===null||!d)return h.push(S),null;for(;h.length>0;){var U=h.shift();this.parse(U,b,C)}return(L=sf(S,c,d))&&L.logs&&(m.logs=m.logs.concat(L.logs)),L!==null&&L.seiNals?(this.pushNals(L.seiNals),this.flushStream(),m):m.logs.length?{logs:m.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(S){if(!this.isInitialized()||!S||S.length===0)return null;S.forEach(function(b){o.push(b)})},this.flushStream=function(){if(!this.isInitialized())return null;f?o.partialFlush():o.flush()},this.clearParsedCaptions=function(){m.captions=[],m.captionStreams={},m.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;o.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],c=null,d=null,m?this.clearParsedCaptions():m={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},rf=nf,$n=function(o){for(var h=0,c=String.fromCharCode(o[h]),d="";c!=="\0";)d+=c,h++,c=String.fromCharCode(o[h]);return d+=c},af=wn.getUint64,of=function(o){var h,c,d,m,f,v,S,b=4,C=o[0];if(C===0)b+=(h=$n(o.subarray(b))).length,b+=(c=$n(o.subarray(b))).length,d=(L=new DataView(o.buffer)).getUint32(b),b+=4,f=L.getUint32(b),b+=4,v=L.getUint32(b),b+=4,S=L.getUint32(b),b+=4;else if(C===1){var L;d=(L=new DataView(o.buffer)).getUint32(b),b+=4,m=af(o.subarray(b)),b+=8,v=L.getUint32(b),b+=4,S=L.getUint32(b),b+=4,b+=(h=$n(o.subarray(b))).length,b+=(c=$n(o.subarray(b))).length}var U={scheme_id_uri:h,value:c,timescale:d||1,presentation_time:m,presentation_time_delta:f,event_duration:v,id:S,message_data:new Uint8Array(o.subarray(b,o.byteLength))};return hf(C,U)?U:void 0},lf=function(o,h,c,d){return o||o===0?o/h:d+c/h},hf=function(o,h){var c=h.scheme_id_uri!=="\0",d=o===0&&Nh(h.presentation_time_delta)&&c,m=o===1&&Nh(h.presentation_time)&&c;return!(o>1)&&d||m},Nh=function(o){return o!==void 0||o!==null},uf={parseEmsgBox:of,scaleTime:lf},Hn=jn.toUnsigned,Os=jn.toHexString,Ct=xh,Ri=Ch,Ca=uf,df=Dh,cf=Ph,pf=Ih,mf=wn.getUint64,ka=Lh,gf=ah.parseId3Frames;vh=function(o){var h={};return Ct(o,["moov","trak"]).reduce(function(c,d){var m,f,v,S,b;return(m=Ct(d,["tkhd"])[0])?(f=m[0],S=Hn(m[v=f===0?12:20]<<24|m[v+1]<<16|m[v+2]<<8|m[v+3]),(b=Ct(d,["mdia","mdhd"])[0])?(v=(f=b[0])===0?12:20,c[S]=Hn(b[v]<<24|b[v+1]<<16|b[v+2]<<8|b[v+3]),c):null):null},h)},bh=function(o,h){var c=Ct(h,["moof","traf"]).reduce(function(d,m){var f,v=Ct(m,["tfhd"])[0],S=Hn(v[4]<<24|v[5]<<16|v[6]<<8|v[7]),b=o[S]||9e4,C=Ct(m,["tfdt"])[0],L=new DataView(C.buffer,C.byteOffset,C.byteLength);let U;return typeof(f=C[0]===1?mf(C.subarray(4,12)):L.getUint32(4))=="bigint"?U=f/ka.BigInt(b):typeof f!="number"||isNaN(f)||(U=f/b),U11?(v.codec+=".",v.codec+=Os(H[9]),v.codec+=Os(H[10]),v.codec+=Os(H[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(H=z.subarray(28),Ri(H.subarray(4,8))==="esds"&&H.length>20&&H[19]!==0?(v.codec+="."+Os(H[19]),v.codec+="."+Os(H[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var Q=Ct(d,["mdia","mdhd"])[0];Q&&(v.timescale=wa(Q)),c.push(v)}),c},wh=function(o,h=0){return Ct(o,["emsg"]).map(c=>{var d=Ca.parseEmsgBox(new Uint8Array(c)),m=gf(d.message_data);return{cueTime:Ca.scaleTime(d.presentation_time,d.timescale,d.presentation_time_delta,h),duration:Ca.scaleTime(d.event_duration,d.timescale),frames:m}})};var xa={findBox:Ct,parseType:Ri,timescale:vh,startTime:bh,compositionStartTime:Th,videoTrackIds:Sh,tracks:Eh,getTimescaleFromMediaHeader:wa,getEmsgID3:wh},Ia=Dn,Rh=function(o){var h=31&o[1];return h<<=8,h|=o[2]},Vn=function(o){return!!(64&o[1])},zn=function(o){var h=0;return(48&o[3])>>>4>1&&(h+=o[4]+1),h},ff=function(o){if(!Vn(o))return null;var h=4+zn(o);if(h>=o.byteLength)return null;var c,d=null;return 192&(c=o[h+7])&&((d={}).pts=(14&o[h+9])<<27|(255&o[h+10])<<20|(254&o[h+11])<<12|(255&o[h+12])<<5|(254&o[h+13])>>>3,d.pts*=4,d.pts+=(6&o[h+13])>>>1,d.dts=d.pts,64&c&&(d.dts=(14&o[h+14])<<27|(255&o[h+15])<<20|(254&o[h+16])<<12|(255&o[h+17])<<5|(254&o[h+18])>>>3,d.dts*=4,d.dts+=(6&o[h+18])>>>1)),d},Aa=function(o){switch(o){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},yf={parseType:function(o,h){var c=Rh(o);return c===0?"pat":c===h?"pmt":h?"pes":null},parsePat:function(o){var h=Vn(o),c=4+zn(o);return h&&(c+=o[c]+1),(31&o[c+10])<<8|o[c+11]},parsePmt:function(o){var h={},c=Vn(o),d=4+zn(o);if(c&&(d+=o[d]+1),1&o[d+5]){var m;m=3+((15&o[d+1])<<8|o[d+2])-4;for(var f=12+((15&o[d+10])<<8|o[d+11]);f3&&Aa(31&c[m+3])==="slice_layer_without_partitioning_rbsp_idr"&&(f=!0),f}},Mh=Dn,Mi=nh.handleRollover,at={};at.ts=yf,at.aac=ba;var vi=mt.ONE_SECOND_IN_TS,Bt=188,Se=71,_f=function(o,h){for(var c,d=0,m=Bt;m=0;)if(o[S]!==Se||o[b]!==Se&&b!==o.byteLength)S--,b--;else{if(d=o.subarray(S,b),at.ts.parseType(d,h.pid)==="pes"&&(m=at.ts.parsePesType(d,h.table),f=at.ts.parsePayloadUnitStartIndicator(d),m==="audio"&&f&&(v=at.ts.parsePesTime(d))&&(v.type="audio",c.audio.push(v),C=!0)),C)break;S-=Bt,b-=Bt}},vf=function(o,h,c){for(var d,m,f,v,S,b,C,L=0,U=Bt,H=!1,z={data:[],size:0};U=0;)if(o[L]!==Se||o[U]!==Se)L--,U--;else{if(d=o.subarray(L,U),at.ts.parseType(d,h.pid)==="pes"&&(m=at.ts.parsePesType(d,h.table),f=at.ts.parsePayloadUnitStartIndicator(d),m==="video"&&f&&(v=at.ts.parsePesTime(d))&&(v.type="video",c.video.push(v),H=!0)),H)break;L-=Bt,U-=Bt}},bf=function(o,h){if(o.audio&&o.audio.length){var c=h;(c===void 0||isNaN(c))&&(c=o.audio[0].dts),o.audio.forEach(function(f){f.dts=Mi(f.dts,c),f.pts=Mi(f.pts,c),f.dtsTime=f.dts/vi,f.ptsTime=f.pts/vi})}if(o.video&&o.video.length){var d=h;if((d===void 0||isNaN(d))&&(d=o.video[0].dts),o.video.forEach(function(f){f.dts=Mi(f.dts,d),f.pts=Mi(f.pts,d),f.dtsTime=f.dts/vi,f.ptsTime=f.pts/vi}),o.firstKeyFrame){var m=o.firstKeyFrame;m.dts=Mi(m.dts,d),m.pts=Mi(m.pts,d),m.dtsTime=m.dts/vi,m.ptsTime=m.pts/vi}}},Tf=function(o){for(var h,c=!1,d=0,m=null,f=null,v=0,S=0;o.length-S>=3;){switch(at.aac.parseType(o,S)){case"timed-metadata":if(o.length-S<10){c=!0;break}if((v=at.aac.parseId3TagSize(o,S))>o.length){c=!0;break}f===null&&(h=o.subarray(S,S+v),f=at.aac.parseAacTimestamp(h)),S+=v;break;case"audio":if(o.length-S<7){c=!0;break}if((v=at.aac.parseAdtsSize(o,S))>o.length){c=!0;break}m===null&&(h=o.subarray(S,S+v),m=at.aac.parseSampleRate(h)),d++,S+=v;break;default:S++}if(c)return null}if(m===null||f===null)return null;var b=vi/m;return{audio:[{type:"audio",dts:f,pts:f},{type:"audio",dts:f+1024*d*b,pts:f+1024*d*b}]}},Sf=function(o){var h={pid:null,table:null},c={};for(var d in _f(o,h),h.table)if(h.table.hasOwnProperty(d))switch(h.table[d]){case Mh.H264_STREAM_TYPE:c.video=[],vf(o,h,c),c.video.length===0&&delete c.video;break;case Mh.ADTS_STREAM_TYPE:c.audio=[],Uh(o,h,c),c.audio.length===0&&delete c.audio}return c},Ef={inspect:function(o,h){var c;return(c=at.aac.isLikelyAacData(o)?Tf(o):Sf(o))&&(c.audio||c.video)?(bf(c,h),c):null},parseAudioPes_:Uh};const wf=function(o,h){h.on("data",function(c){const d=c.initSegment;c.initSegment={data:d.buffer,byteOffset:d.byteOffset,byteLength:d.byteLength};const m=c.data;c.data=m.buffer,o.postMessage({action:"data",segment:c,byteOffset:m.byteOffset,byteLength:m.byteLength},[c.data])}),h.on("done",function(c){o.postMessage({action:"done"})}),h.on("gopInfo",function(c){o.postMessage({action:"gopInfo",gopInfo:c})}),h.on("videoSegmentTimingInfo",function(c){const d={start:{decode:mt.videoTsToSeconds(c.start.dts),presentation:mt.videoTsToSeconds(c.start.pts)},end:{decode:mt.videoTsToSeconds(c.end.dts),presentation:mt.videoTsToSeconds(c.end.pts)},baseMediaDecodeTime:mt.videoTsToSeconds(c.baseMediaDecodeTime)};c.prependedContentDuration&&(d.prependedContentDuration=mt.videoTsToSeconds(c.prependedContentDuration)),o.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:d})}),h.on("audioSegmentTimingInfo",function(c){const d={start:{decode:mt.videoTsToSeconds(c.start.dts),presentation:mt.videoTsToSeconds(c.start.pts)},end:{decode:mt.videoTsToSeconds(c.end.dts),presentation:mt.videoTsToSeconds(c.end.pts)},baseMediaDecodeTime:mt.videoTsToSeconds(c.baseMediaDecodeTime)};c.prependedContentDuration&&(d.prependedContentDuration=mt.videoTsToSeconds(c.prependedContentDuration)),o.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:d})}),h.on("id3Frame",function(c){o.postMessage({action:"id3Frame",id3Frame:c})}),h.on("caption",function(c){o.postMessage({action:"caption",caption:c})}),h.on("trackinfo",function(c){o.postMessage({action:"trackinfo",trackInfo:c})}),h.on("audioTimingInfo",function(c){o.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:mt.videoTsToSeconds(c.start),end:mt.videoTsToSeconds(c.end)}})}),h.on("videoTimingInfo",function(c){o.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:mt.videoTsToSeconds(c.start),end:mt.videoTsToSeconds(c.end)}})}),h.on("log",function(c){o.postMessage({action:"log",log:c})})};class Bh{constructor(h,c){this.options=c||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new $g.Transmuxer(this.options),wf(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new rf,this.captionParser.init());const c=new Uint8Array(h.data,h.byteOffset,h.byteLength),d=this.captionParser.parse(c,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:d&&d.captions||[],logs:d&&d.logs||[],data:c.buffer},[c.buffer])}probeMp4StartTime({timescales:h,data:c}){const d=xa.startTime(h,c);this.self.postMessage({action:"probeMp4StartTime",startTime:d,data:c},[c.buffer])}probeMp4Tracks({data:h}){const c=xa.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:c,data:h},[h.buffer])}probeEmsgID3({data:h,offset:c}){const d=xa.getEmsgID3(h,c);this.self.postMessage({action:"probeEmsgID3",id3Frames:d,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:c}){const d=typeof c!="number"||isNaN(c)?void 0:c*mt.ONE_SECOND_IN_TS,m=Ef.inspect(h,d);let f=null;m&&(f={hasVideo:m.video&&m.video.length===2||!1,hasAudio:m.audio&&m.audio.length===2||!1},f.hasVideo&&(f.videoStart=m.video[0].ptsTime),f.hasAudio&&(f.audioStart=m.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:f,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const c=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(c)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const c=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(mt.secondsToVideoTs(c)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(mt.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(o){o.data.action==="init"&&o.data.options?this.messageHandlers=new Bh(self,o.data.options):(this.messageHandlers||(this.messageHandlers=new Bh(self)),o.data&&o.data.action&&o.data.action!=="init"&&this.messageHandlers[o.data.action]&&this.messageHandlers[o.data.action](o.data))}}));var NT=Am(OT);const RT=(i,t,e)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:l,videoFrameDtsTime:u,videoFramePtsTime:p}=i.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:l});const g=i.data.segment.boxes||{data:i.data.segment.data},y={type:s,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};u!==void 0&&(y.videoFrameDtsTime=u),p!==void 0&&(y.videoFramePtsTime=p),e(y)},MT=({transmuxedData:i,callback:t})=>{i.buffer=[],t(i)},UT=(i,t)=>{t.gopInfo=i.data.gopInfo},Lm=i=>{const{transmuxer:t,bytes:e,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:l,onAudioTimingInfo:u,onVideoTimingInfo:p,onVideoSegmentTimingInfo:g,onAudioSegmentTimingInfo:y,onId3:T,onCaptions:w,onDone:_,onEndedTimeline:k,onTransmuxerLog:x,isEndOfTimeline:A}=i,I={buffer:[]};let O=A;const N=P=>{t.currentTransmux===i&&(P.data.action==="data"&&RT(P,I,a),P.data.action==="trackinfo"&&l(P.data.trackInfo),P.data.action==="gopInfo"&&UT(P,I),P.data.action==="audioTimingInfo"&&u(P.data.audioTimingInfo),P.data.action==="videoTimingInfo"&&p(P.data.videoTimingInfo),P.data.action==="videoSegmentTimingInfo"&&g(P.data.videoSegmentTimingInfo),P.data.action==="audioSegmentTimingInfo"&&y(P.data.audioSegmentTimingInfo),P.data.action==="id3Frame"&&T([P.data.id3Frame],P.data.id3Frame.dispatchType),P.data.action==="caption"&&w(P.data.caption),P.data.action==="endedtimeline"&&(O=!1,k()),P.data.action==="log"&&x(P.data.log),P.data.type==="transmuxed"&&(O||(t.onmessage=null,MT({transmuxedData:I,callback:_}),Om(t))))};if(t.onmessage=N,s&&t.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(n)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),r!==void 0&&t.postMessage({action:"setRemux",remux:r}),e.byteLength){const P=e instanceof ArrayBuffer?e:e.buffer,F=e instanceof ArrayBuffer?0:e.byteOffset;t.postMessage({action:"push",data:P,byteOffset:F,byteLength:e.byteLength},[P])}A&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Om=i=>{i.currentTransmux=null,i.transmuxQueue.length&&(i.currentTransmux=i.transmuxQueue.shift(),typeof i.currentTransmux=="function"?i.currentTransmux():Lm(i.currentTransmux))},jd=(i,t)=>{i.postMessage({action:t}),Om(i)},$d=(i,t)=>{if(!t.currentTransmux)return t.currentTransmux=i,void jd(t,i);t.transmuxQueue.push(jd.bind(null,t,i))},Nm=i=>{if(!i.transmuxer.currentTransmux)return i.transmuxer.currentTransmux=i,void Lm(i);i.transmuxer.transmuxQueue.push(i)};var vo={reset:i=>{$d("reset",i)},endTimeline:i=>{$d("endTimeline",i)},transmux:Nm,createTransmuxer:i=>{const t=new NT;t.currentTransmux=null,t.transmuxQueue=[];const e=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,e.call(t)),t.postMessage({action:"init",options:i}),t}};const rn=function(i){const t=i.transmuxer,e=i.endAction||i.action,s=i.callback,n=ve({},i,{endAction:null,transmuxer:null,callback:null}),r=a=>{a.data.action===e&&(t.removeEventListener("message",r),a.data.data&&(a.data.data=new Uint8Array(a.data.data,i.byteOffset||0,i.byteLength||a.data.data.byteLength),i.data&&(i.data=a.data.data)),s(a.data))};if(t.addEventListener("message",r),i.data){const a=i.data instanceof ArrayBuffer;n.byteOffset=a?0:i.data.byteOffset,n.byteLength=i.data.byteLength;const l=[a?i.data:i.data.buffer];t.postMessage(n,l)}else t.postMessage(n)},Pe={FAILURE:2,TIMEOUT:-101,ABORTED:-102},nl=i=>{i.forEach(t=>{t.abort()})},BT=i=>({bandwidth:i.bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0}),FT=i=>{const t=i.target,e={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return e.bytesReceived=i.loaded,e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3),e},ql=(i,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Pe.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Pe.ABORTED,xhr:t}:i?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Pe.FAILURE,xhr:t}:t.responseType==="arraybuffer"&&t.response.byteLength===0?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Pe.FAILURE,xhr:t}:null,Hd=(i,t,e)=>(s,n)=>{const r=n.response,a=ql(s,n);if(a)return e(a,i);if(r.byteLength!==16)return e({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:Pe.FAILURE,xhr:n},i);const l=new DataView(r),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let p=0;p{const e=Tl(i.map.bytes);if(e!=="mp4"){const s=i.map.resolvedUri||i.map.uri,n=e||"unknown";return t({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${s}`,code:Pe.FAILURE,metadata:{errorType:D.Error.UnsupportedMediaInitialization,mediaType:n}})}rn({action:"probeMp4Tracks",data:i.map.bytes,transmuxer:i.transmuxer,callback:({tracks:s,data:n})=>(i.map.bytes=n,s.forEach(function(r){i.map.tracks=i.map.tracks||{},i.map.tracks[r.type]||(i.map.tracks[r.type]=r,typeof r.id=="number"&&r.timescale&&(i.map.timescales=i.map.timescales||{},i.map.timescales[r.id]=r.timescale))}),t(null))})},qT=({segment:i,finishProcessingFn:t})=>(e,s)=>{const n=ql(e,s);if(n)return t(n,i);const r=new Uint8Array(s.response);if(i.map.key)return i.map.encryptedBytes=r,t(null,i);i.map.bytes=r,Rm(i,function(a){if(a)return a.xhr=s,a.status=s.status,t(a,i);t(null,i)})},jT=({segment:i,finishProcessingFn:t,responseType:e})=>(s,n)=>{const r=ql(s,n);if(r)return t(r,i);const a=e!=="arraybuffer"&&n.responseText?DT(n.responseText.substring(i.lastReachedChar||0)):n.response;return i.stats=BT(n),i.key?i.encryptedBytes=new Uint8Array(a):i.bytes=new Uint8Array(a),t(null,i)},$T=({segment:i,bytes:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})=>{const w=i.map&&i.map.tracks||{},_=!!(w.audio&&w.video);let k=s.bind(null,i,"audio","start");const x=s.bind(null,i,"audio","end");let A=s.bind(null,i,"video","start");const I=s.bind(null,i,"video","end"),O=()=>Nm({bytes:t,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,remux:_,onData:N=>{N.type=N.type==="combined"?"video":N.type,g(i,N)},onTrackInfo:N=>{e&&(_&&(N.isMuxed=!0),e(i,N))},onAudioTimingInfo:N=>{k&&N.start!==void 0&&(k(N.start),k=null),x&&N.end!==void 0&&x(N.end)},onVideoTimingInfo:N=>{A&&N.start!==void 0&&(A(N.start),A=null),I&&N.end!==void 0&&I(N.end)},onVideoSegmentTimingInfo:N=>{n(N)},onAudioSegmentTimingInfo:N=>{r(N)},onId3:(N,P)=>{a(i,N,P)},onCaptions:N=>{l(i,[N])},isEndOfTimeline:u,onEndedTimeline:()=>{p()},onTransmuxerLog:T,onDone:N=>{y&&(N.type=N.type==="combined"?"video":N.type,y(null,i,N))}});rn({action:"probeTs",transmuxer:i.transmuxer,data:t,baseStartTime:i.baseStartTime,callback:N=>{i.bytes=t=N.data;const P=N.result;P&&(e(i,{hasAudio:P.hasAudio,hasVideo:P.hasVideo,isMuxed:_}),e=null),O()}})},Mm=({segment:i,bytes:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})=>{let w=new Uint8Array(t);if(C0(w)){i.isFmp4=!0;const{tracks:_}=i.map,k={isFmp4:!0,hasVideo:!!_.video,hasAudio:!!_.audio};_.audio&&_.audio.codec&&_.audio.codec!=="enca"&&(k.audioCodec=_.audio.codec),_.video&&_.video.codec&&_.video.codec!=="encv"&&(k.videoCodec=_.video.codec),_.video&&_.audio&&(k.isMuxed=!0),e(i,k);const x=(A,I)=>{g(i,{data:w,type:k.hasAudio&&!k.isMuxed?"audio":"video"}),I&&I.length&&a(i,I),A&&A.length&&l(i,A),y(null,i,{})};rn({action:"probeMp4StartTime",timescales:i.map.timescales,data:w,transmuxer:i.transmuxer,callback:({data:A,startTime:I})=>{t=A.buffer,i.bytes=w=A,k.hasAudio&&!k.isMuxed&&s(i,"audio","start",I),k.hasVideo&&s(i,"video","start",I),rn({action:"probeEmsgID3",data:w,transmuxer:i.transmuxer,offset:I,callback:({emsgData:O,id3Frames:N})=>{t=O.buffer,i.bytes=w=O,_.video&&O.byteLength&&i.transmuxer?rn({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:i.transmuxer,data:w,timescales:i.map.timescales,trackIds:[_.video.id],callback:P=>{t=P.data.buffer,i.bytes=w=P.data,P.logs.forEach(function(F){T(nt(F,{stream:"mp4CaptionParser"}))}),x(P.captions,N)}}):x(void 0,N)}})}})}else if(i.transmuxer){if(i.container===void 0&&(i.container=Tl(w)),i.container!=="ts"&&i.container!=="aac")return e(i,{hasAudio:!1,hasVideo:!1}),void y(null,i,{});$T({segment:i,bytes:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})}else y(null,i,{})},Um=function({id:i,key:t,encryptedBytes:e,decryptionWorker:s},n){const r=l=>{if(l.data.source===i){s.removeEventListener("message",r);const u=l.data.decrypted;n(new Uint8Array(u.bytes,u.byteOffset,u.byteLength))}};let a;s.addEventListener("message",r),a=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Em({source:i,encrypted:e,key:a,iv:t.iv}),[e.buffer,a.buffer])},HT=({decryptionWorker:i,segment:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})=>{Um({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:i},w=>{t.bytes=w,Mm({segment:t,bytes:t.bytes,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})})},VT=({activeXhrs:i,decryptionWorker:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})=>{let w=0,_=!1;return(k,x)=>{if(!_){if(k)return _=!0,nl(i),y(k,x);if(w+=1,w===i.length){const A=function(){if(x.encryptedBytes)return HT({decryptionWorker:t,segment:x,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T});Mm({segment:x,bytes:x.bytes,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g,doneFn:y,onTransmuxerLog:T})};if(x.endOfAllRequests=Date.now(),x.map&&x.map.encryptedBytes&&!x.map.bytes)return Um({decryptionWorker:t,id:x.requestId+"-init",encryptedBytes:x.map.encryptedBytes,key:x.map.key},I=>{x.map.bytes=I,Rm(x,O=>{if(O)return nl(i),y(O,x);A()})});A()}}}},zT=({loadendState:i,abortFn:t})=>e=>{e.target.aborted&&t&&!i.calledAbortFn&&(t(),i.calledAbortFn=!0)},WT=({segment:i,progressFn:t,trackInfoFn:e,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:p,dataFn:g})=>y=>{if(!y.target.aborted)return i.stats=nt(i.stats,FT(y)),!i.stats.firstBytesReceivedAt&&i.stats.bytesReceived&&(i.stats.firstBytesReceivedAt=Date.now()),t(y,i)},GT=({xhr:i,xhrOptions:t,decryptionWorker:e,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:p,id3Fn:g,captionsFn:y,isEndOfTimeline:T,endedTimelineFn:w,dataFn:_,doneFn:k,onTransmuxerLog:x})=>{const A=[],I=VT({activeXhrs:A,decryptionWorker:e,trackInfoFn:a,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:p,id3Fn:g,captionsFn:y,isEndOfTimeline:T,endedTimelineFn:w,dataFn:_,doneFn:k,onTransmuxerLog:x});if(s.key&&!s.key.bytes){const F=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&F.push(s.map.key);const $=i(nt(t,{uri:s.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Hd(s,F,I));A.push($)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const $=i(nt(t,{uri:s.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Hd(s,[s.map.key],I));A.push($)}const F=i(nt(t,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:il(s.map),requestType:"segment-media-initialization"}),qT({segment:s,finishProcessingFn:I}));A.push(F)}const O=nt(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:il(s),requestType:"segment"}),N=i(O,jT({segment:s,finishProcessingFn:I,responseType:O.responseType}));N.addEventListener("progress",WT({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:p,id3Fn:g,captionsFn:y,isEndOfTimeline:T,endedTimelineFn:w,dataFn:_})),A.push(N);const P={};return A.forEach(F=>{F.addEventListener("loadend",zT({loadendState:P,abortFn:n}))}),()=>nl(A)},XT=de("CodecUtils"),KT=function(i){const t=i.attributes||{};if(t.CODECS)return Ce(t.CODECS)},Bm=(i,t)=>{const e=t.attributes||{};return i&&i.mediaGroups&&i.mediaGroups.AUDIO&&e.AUDIO&&i.mediaGroups.AUDIO[e.AUDIO]},YT=(i,t)=>{if(!Bm(i,t))return!0;const e=t.attributes||{},s=i.mediaGroups.AUDIO[e.AUDIO];for(const n in s)if(!s[n].uri&&!s[n].playlists)return!0;return!1},Br=function(i){const t={};return i.forEach(({mediaType:e,type:s,details:n})=>{t[e]=t[e]||[],t[e].push(wc(`${s}${n}`))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return XT(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]}),t},Vd=function(i){let t=0;return i.audio&&t++,i.video&&t++,t},an=function(i,t){const e=t.attributes||{},s=Br(KT(t)||[]);if(Bm(i,t)&&!s.audio&&!YT(i,t)){const n=Br(P_(i,e.AUDIO)||[]);n.audio&&(s.audio=n.audio)}return s},sr=de("PlaylistSelector"),zd=function(i){if(!i||!i.playlist)return;const t=i.playlist;return JSON.stringify({id:t.id,bandwidth:i.bandwidth,width:i.width,height:i.height,codecs:t.attributes&&t.attributes.CODECS||""})},Fr=function(i,t){if(!i)return"";const e=E.getComputedStyle(i);return e?e[t]:""},ls=function(i,t){const e=i.slice();i.sort(function(s,n){const r=t(s,n);return r===0?e.indexOf(s)-e.indexOf(n):r})},jl=function(i,t){let e,s;return i.attributes.BANDWIDTH&&(e=i.attributes.BANDWIDTH),e=e||E.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||E.Number.MAX_VALUE,e-s},QT=function(i,t){let e,s;return i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width&&(e=i.attributes.RESOLUTION.width),e=e||E.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||E.Number.MAX_VALUE,e===s&&i.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?i.attributes.BANDWIDTH-t.attributes.BANDWIDTH:e-s};let Fm=function(i,t,e,s,n,r){if(!i)return;const a={bandwidth:t,width:e,height:s,limitRenditionByPlayerDimensions:n};let l=i.playlists;Qt.isAudioOnly(i)&&(l=r.getAudioTrackPlaylists_(),a.audioOnly=!0);let u=l.map(P=>{let F;const $=P.attributes&&P.attributes.RESOLUTION&&P.attributes.RESOLUTION.width,dt=P.attributes&&P.attributes.RESOLUTION&&P.attributes.RESOLUTION.height;return F=P.attributes&&P.attributes.BANDWIDTH,F=F||E.Number.MAX_VALUE,{bandwidth:F,width:$,height:dt,playlist:P}});ls(u,(P,F)=>P.bandwidth-F.bandwidth),u=u.filter(P=>!Qt.isIncompatible(P.playlist));let p=u.filter(P=>Qt.isEnabled(P.playlist));p.length||(p=u.filter(P=>!Qt.isDisabled(P.playlist)));const g=p.filter(P=>P.bandwidth*Pt.BANDWIDTH_VARIANCEP.bandwidth===y.bandwidth)[0];if(n===!1){const P=T||p[0]||u[0];if(P&&P.playlist){let F="sortedPlaylistReps";return T&&(F="bandwidthBestRep"),p[0]&&(F="enabledPlaylistReps"),sr(`choosing ${zd(P)} using ${F} with options`,a),P.playlist}return sr("could not choose a playlist with options",a),null}const w=g.filter(P=>P.width&&P.height);ls(w,(P,F)=>P.width-F.width);const _=w.filter(P=>P.width===e&&P.height===s);y=_[_.length-1];const k=_.filter(P=>P.bandwidth===y.bandwidth)[0];let x,A,I,O;if(k||(x=w.filter(P=>P.width>e||P.height>s),A=x.filter(P=>P.width===x[0].width&&P.height===x[0].height),y=A[A.length-1],I=A.filter(P=>P.bandwidth===y.bandwidth)[0]),r.leastPixelDiffSelector){const P=w.map(F=>(F.pixelDiff=Math.abs(F.width-e)+Math.abs(F.height-s),F));ls(P,(F,$)=>F.pixelDiff===$.pixelDiff?$.bandwidth-F.bandwidth:F.pixelDiff-$.pixelDiff),O=P[0]}const N=O||I||k||T||p[0]||u[0];if(N&&N.playlist){let P="sortedPlaylistReps";return O?P="leastPixelDiffRep":I?P="resolutionPlusOneRep":k?P="resolutionBestRep":T?P="bandwidthBestRep":p[0]&&(P="enabledPlaylistReps"),sr(`choosing ${zd(N)} using ${P} with options`,a),N.playlist}return sr("could not choose a playlist with options",a),null};const Wd=function(){let i=this.useDevicePixelRatio&&E.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),Fm(this.playlists.main,this.systemBandwidth,parseInt(Fr(this.tech_.el(),"width"),10)*i,parseInt(Fr(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.playlistController_)},JT=function(i){let t=-1,e=-1;if(i<0||i>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let s=this.useDevicePixelRatio&&E.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),t<0&&(t=this.systemBandwidth,e=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==e&&(t=i*this.systemBandwidth+(1-i)*t,e=this.systemBandwidth),Fm(this.playlists.main,t,parseInt(Fr(this.tech_.el(),"width"),10)*s,parseInt(Fr(this.tech_.el(),"height"),10)*s,this.limitRenditionByPlayerDimensions,this.playlistController_)}},ZT=function(i){const{main:t,currentTime:e,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:l,syncController:u}=i,p=t.playlists.filter(w=>!Qt.isIncompatible(w));let g=p.filter(Qt.isEnabled);g.length||(g=p.filter(w=>!Qt.isDisabled(w)));const y=g.filter(Qt.hasAttribute.bind(null,"BANDWIDTH")).map(w=>{const _=u.getSyncPoint(w,n,l,e)?1:2;return{playlist:w,rebufferingImpact:Qt.estimateSegmentRequestTime(r,s,w)*_-a}}),T=y.filter(w=>w.rebufferingImpact<=0);return ls(T,(w,_)=>jl(_.playlist,w.playlist)),T.length?T[0]:(ls(y,(w,_)=>w.rebufferingImpact-_.rebufferingImpact),y[0]||null)},t1=function(){const i=this.playlists.main.playlists.filter(Qt.isEnabled);return ls(i,(t,e)=>jl(t,e)),i.filter(t=>!!an(this.playlists.main,t).video)[0]||null},e1=i=>{let t,e=0;return i.bytes&&(t=new Uint8Array(i.bytes),i.segments.forEach(s=>{t.set(s,e),e+=s.byteLength})),t};function qm(i){try{return new URL(i).pathname.split("/").slice(-2).join("/")}catch{return""}}const i1=function(i,t,e){if(!i[e]){t.trigger({type:"usage",name:"vhs-608"});let s=e;/^cc708_/.test(e)&&(s="SERVICE"+e.split("_")[1]);const n=t.textTracks().getTrackById(s);if(n)i[e]=n;else{let r=e,a=e,l=!1;const u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];u&&(r=u.label,a=u.language,l=u.default),i[e]=t.addRemoteTextTrack({kind:"captions",id:s,default:l,label:r,language:a},!1).track}}},s1=function({inbandTextTracks:i,captionArray:t,timestampOffset:e}){if(!t)return;const s=E.WebKitDataCue||E.VTTCue;t.forEach(n=>{const r=n.stream;n.content?n.content.forEach(a=>{const l=new s(n.startTime+e,n.endTime+e,a.text);l.line=a.line,l.align="left",l.position=a.position,l.positionAlign="line-left",i[r].addCue(l)}):i[r].addCue(new s(n.startTime+e,n.endTime+e,n.text))})},n1=function(i){Object.defineProperties(i.frame,{id:{get:()=>(D.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),i.value.key)},value:{get:()=>(D.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),i.value.data)},privateData:{get:()=>(D.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),i.value.data)}})},r1=({inbandTextTracks:i,metadataArray:t,timestampOffset:e,videoDuration:s})=>{if(!t)return;const n=E.WebKitDataCue||E.VTTCue,r=i.metadataTrack_;if(!r||(t.forEach(g=>{const y=g.cueTime+e;!(typeof y!="number"||E.isNaN(y)||y<0)&&y<1/0&&g.frames&&g.frames.length&&g.frames.forEach(T=>{const w=new n(y,y,T.value||T.url||T.data||"");w.frame=T,w.value=T,n1(w),r.addCue(w)})}),!r.cues||!r.cues.length))return;const a=r.cues,l=[];for(let g=0;g{const T=g[y.startTime]||[];return T.push(y),g[y.startTime]=T,g},{}),p=Object.keys(u).sort((g,y)=>Number(g)-Number(y));p.forEach((g,y)=>{const T=u[g],w=isFinite(s)?s:g,_=Number(p[y+1])||w;T.forEach(k=>{k.endTime=_})})},a1={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},o1=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),l1=({inbandTextTracks:i,dateRanges:t})=>{const e=i.metadataTrack_;if(!e)return;const s=E.WebKitDataCue||E.VTTCue;t.forEach(n=>{for(const r of Object.keys(n)){if(o1.has(r))continue;const a=new s(n.startTime,n.endTime,"");a.id=n.id,a.type="com.apple.quicktime.HLS",a.value={key:a1[r],data:n[r]},r!=="scte35Out"&&r!=="scte35In"||(a.value.data=new Uint8Array(a.value.data.match(/[\da-f]{2}/gi)).buffer),e.addCue(a)}n.processDateRange()})},Gd=(i,t,e)=>{i.metadataTrack_||(i.metadataTrack_=e.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,D.browser.IS_ANY_SAFARI||(i.metadataTrack_.inBandMetadataTrackDispatchType=t))},Qs=function(i,t,e){let s,n;if(e&&e.cues)for(s=e.cues.length;s--;)n=e.cues[s],n.startTime>=i&&n.endTime<=t&&e.removeCue(n)},h1=function(i){const t=i.cues;if(!t)return;const e={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;e[r]?i.removeCue(n):e[r]=n}},u1=(i,t,e)=>{if(t==null||!i.length)return[];const s=Math.ceil((t-e+3)*ki.ONE_SECOND_IN_TS);let n;for(n=0;ns);n++);return i.slice(n)},d1=(i,t,e)=>{if(!t.length)return i;if(e)return t.slice();const s=t[0].pts;let n=0;for(;n=s);n++);return i.slice(0,n).concat(t)},c1=(i,t,e,s)=>{const n=Math.ceil((t-s)*ki.ONE_SECOND_IN_TS),r=Math.ceil((e-s)*ki.ONE_SECOND_IN_TS),a=i.slice();let l=i.length;for(;l--&&!(i[l].pts<=r););if(l===-1)return a;let u=l+1;for(;u--&&!(i[u].pts<=n););return u=Math.max(u,0),a.splice(u,l-u+1),a},p1=function(i,t){if(!i&&!t||!i&&t||i&&!t)return!1;if(i===t)return!0;const e=Object.keys(i).sort(),s=Object.keys(t).sort();if(e.length!==s.length)return!1;for(let n=0;ne))return r}return s.length===0?0:s[s.length-1]},Vs=1,g1=500,Xd=i=>typeof i=="number"&&isFinite(i),nr=1/60,f1=(i,t,e)=>i==="main"&&t&&e?e.hasAudio||e.hasVideo?t.hasVideo&&!e.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&e.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null,y1=(i,t,e)=>{let s=t-Pt.BACK_BUFFER_LENGTH;i.length&&(s=Math.max(s,i.start(0)));const n=t-e;return Math.min(n,s)},Vi=i=>{const{startOfSegment:t,duration:e,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:l=[]},mediaIndex:u,partIndex:p,timeline:g}=i,y=l.length-1;let T="mediaIndex/partIndex increment";i.getMediaInfoForTime?T=`getMediaInfoForTime (${i.getMediaInfoForTime})`:i.isSyncRequest&&(T="getSyncSegmentCandidate (isSyncRequest)"),i.independent&&(T+=` with independent ${i.independent}`);const w=typeof p=="number",_=i.segment.uri?"segment":"pre-segment",k=w?hm({preloadSegment:s})-1:0;return`${_} [${r+u}/${r+y}]`+(w?` part [${p}/${k}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(w?` part start/end [${n.start} => ${n.end}]`:"")+` startOfSegment [${t}] duration [${e}] timeline [${g}] selected by [${T}] playlist [${a}]`},Kd=i=>`${i}TimingInfo`,_1=({segmentTimeline:i,currentTimeline:t,startOfSegment:e,buffered:s,overrideCheck:n})=>n||i!==t?i{if(t===e)return!1;if(s==="audio"){const r=i.lastTimelineChange({type:"main"});return!r||r.to!==e}if(s==="main"&&n){const r=i.pendingTimelineChange({type:"audio"});return!r||r.to!==e}return!1},v1=i=>{let t=0;return["video","audio"].forEach(function(e){const s=i[`${e}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;typeof n=="bigint"||typeof r=="bigint"?a=E.BigInt(r)-E.BigInt(n):typeof n=="number"&&typeof r=="number"&&(a=r-n),a!==void 0&&a>t&&(t=a)}),typeof t=="bigint"&&t!!i&&Math.round(i)>t+Ie,b1=(i,t)=>{if(t!=="hls")return null;const e=v1({audioTimingInfo:i.audioTimingInfo,videoTimingInfo:i.videoTimingInfo});if(!e)return null;const s=i.playlist.targetDuration,n=Qd({segmentDuration:e,maxDuration:2*s}),r=Qd({segmentDuration:e,maxDuration:s}),a=`Segment with index ${i.mediaIndex} from playlist ${i.playlist.id} has a duration of ${e} when the reported duration is ${i.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?"warn":"info",message:a}:null};class rl extends D.EventTarget{constructor(t,e={}){if(super(),!t)throw new TypeError("Initialization settings are required");if(typeof t.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=t.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=t.hasPlayed,this.currentTime_=t.currentTime,this.seekable_=t.seekable,this.seeking_=t.seeking,this.duration_=t.duration,this.mediaSource_=t.mediaSource,this.vhs_=t.vhs,this.loaderType_=t.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=t.segmentMetadataTrack,this.goalBufferLength_=t.goalBufferLength,this.sourceType_=t.sourceType,this.sourceUpdater_=t.sourceUpdater,this.inbandTextTracks_=t.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=t.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=t.parse708captions,this.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,this.captionServices_=t.captionServices,this.exactManifestTimings=t.exactManifestTimings,this.addMetadataToTextTrack=t.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=t.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=t.decrypter,this.syncController_=t.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=de(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(s){s!==this.state_&&(this.logger_(`${this.state_} -> ${s}`),this.state_=s,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return vo.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&E.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(t){this.audioDisabled_=!t,t?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){this.state==="WAITING"?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,E.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(t){return this.state!=="APPENDING"||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==t:(this.state="READY",!0)}error(t){return t!==void 0&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&vo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const t=this.getMediaInfo_();if(!this.sourceUpdater_||!t)return Zt();if(this.loaderType_==="main"){const{hasAudio:e,hasVideo:s,isMuxed:n}=t;if(s&&e&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(s)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(t,e=!1){if(!t)return null;const s=Ur(t);let n=this.initSegments_[s];return e&&!n&&t.bytes&&(this.initSegments_[s]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),n||t}segmentKey(t,e=!1){if(!t)return null;const s=wm(t);let n=this.keyCache_[s];this.cacheEncryptionKeys_&&e&&!n&&t.bytes&&(this.keyCache_[s]=n={resolvedUri:t.resolvedUri,bytes:t.bytes});const r={resolvedUri:(n||t).resolvedUri};return n&&(r.bytes=n.bytes),r}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return this.state==="INIT"&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(t,e={}){if(!t)return;const s=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,this.state==="INIT"&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(t));let r=null;if(s&&(s.id?r=s.id:s.uri&&(r=s.uri)),this.logger_(`playlist update [${r} => ${t.id||t.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(t,this.currentTime_()),this.logger_(`Playlist update: +currentTime: ${this.currentTime_()} +bufferedEnd: ${_o(this.buffered_())} +`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!s||s.uri!==t.uri)return this.mediaIndex!==null&&(!t.endList&&typeof t.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const a=t.mediaSequence-s.mediaSequence;if(this.logger_(`live window shift [${a}]`),this.mediaIndex!==null)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const l=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!l.parts||!l.parts.length||!l.parts[this.partIndex])){const u=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=u}}n&&(n.mediaIndex-=a,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=t.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(s,t)}pause(){this.checkBufferTimeout_&&(E.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(t){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&vo.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const t=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!t&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(t,e,s=()=>{},n=!1){if(e===1/0&&(e=this.duration_()),e<=t)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let r=1;const a=()=>{r--,r===0&&s()};!n&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(t,e,a)),(n||this.loaderType_==="main")&&(this.gopBuffer_=c1(this.gopBuffer_,t,e,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(t,e,a));for(const l in this.inbandTextTracks_)Qs(t,e,this.inbandTextTracks_[l]);Qs(t,e,this.segmentMetadataTrack_),a()}monitorBuffer_(){this.checkBufferTimeout_&&E.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=E.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&E.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=E.setTimeout(this.monitorBufferTick_.bind(this),g1)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const t=this.chooseNextRequest_();t&&(typeof t.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline})),this.loadSegment_(t))}isEndOfStream_(t=this.mediaIndex,e=this.playlist_,s=this.partIndex){if(!e||!this.mediaSource_)return!1;const n=typeof t=="number"&&e.segments[t],r=t+1===e.segments.length,a=!n||!n.parts||s+1===n.parts.length;return e.endList&&this.mediaSource_.readyState==="open"&&r&&a}chooseNextRequest_(){const t=this.buffered_(),e=_o(t)||0,s=Ml(t,this.currentTime_()),n=!this.hasPlayed_()&&s>=1,r=s>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const l={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(l.isSyncRequest)l.mediaIndex=m1(this.currentTimeline_,a,e),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const T=a[this.mediaIndex],w=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=T.end?T.end:e,T.parts&&T.parts[w+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=w+1):l.mediaIndex=this.mediaIndex+1}else{let T,w,_;const k=this.fetchAtBuffer_?e:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch: +For TargetTime: ${k}. +CurrentTime: ${this.currentTime_()} +BufferedEnd: ${e} +Fetch At Buffer: ${this.fetchAtBuffer_} +`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const x=this.getSyncInfoFromMediaSequenceSync_(k);if(!x)return this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null;this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${x.start} --> ${x.end})`),T=x.segmentIndex,w=x.partIndex,_=x.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const x=Qt.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:k,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});T=x.segmentIndex,w=x.partIndex,_=x.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${k}`:`currentTime ${k}`,l.mediaIndex=T,l.startOfSegment=_,l.partIndex=w,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${l.mediaIndex} `)}const u=a[l.mediaIndex];let p=u&&typeof l.partIndex=="number"&&u.parts&&u.parts[l.partIndex];if(!u||typeof l.partIndex=="number"&&!p)return null;typeof l.partIndex!="number"&&u.parts&&(l.partIndex=0,p=u.parts[0]);const g=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!s&&p&&!g&&!p.independent)if(l.partIndex===0){const T=a[l.mediaIndex-1],w=T.parts&&T.parts.length&&T.parts[T.parts.length-1];w&&w.independent&&(l.mediaIndex-=1,l.partIndex=T.parts.length-1,l.independent="previous segment")}else u.parts[l.partIndex-1].independent&&(l.partIndex-=1,l.independent="previous part");const y=this.mediaSource_&&this.mediaSource_.readyState==="ended";return l.mediaIndex>=a.length-1&&y&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,l.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(l))}getSyncInfoFromMediaSequenceSync_(t){if(!this.mediaSequenceSync_)return null;const e=Math.max(t,this.mediaSequenceSync_.start);t!==e&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${t} to ${e}`);const s=this.mediaSequenceSync_.getSyncInfoForTime(e);if(!s)return null;if(!s.isAppended)return s;const n=this.mediaSequenceSync_.getSyncInfoForTime(s.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(t){const{independent:e,playlist:s,mediaIndex:n,startOfSegment:r,isSyncRequest:a,partIndex:l,forceTimestampOffset:u,getMediaInfoForTime:p}=t,g=s.segments[n],y=typeof l=="number"&&g.parts[l],T={requestId:"segment-loader-"+Math.random(),uri:y&&y.resolvedUri||g.resolvedUri,mediaIndex:n,partIndex:y?l:null,isSyncRequest:a,startOfSegment:r,playlist:s,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:g.timeline,duration:y&&y.duration||g.duration,segment:g,part:y,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:p,independent:e},w=u!==void 0?u:this.isPendingTimestampOffset_;T.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:g.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:w});const _=_o(this.sourceUpdater_.audioBuffered());return typeof _=="number"&&(T.audioAppendStart=_-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(T.gopsToAlignWith=u1(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),T}timestampOffsetForSegment_(t){return _1(t)}earlyAbortWhenNeeded_(t){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return;const e=this.currentTime_(),s=t.bandwidth,n=this.pendingSegment_.duration,r=Qt.estimateSegmentRequestTime(n,s,this.playlist_,t.bytesReceived),a=Xb(this.buffered_(),e,this.vhs_.tech_.playbackRate())-1;if(r<=a)return;const l=ZT({main:this.vhs_.playlists.main,currentTime:e,bandwidth:s,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!l)return;const u=r-a-l.rebufferingImpact;let p=.5;a<=Ie&&(p=1),!l.playlist||l.playlist.uri===this.playlist_.uri||u{n[r.stream]=n[r.stream]||{startTime:1/0,captions:[],endTime:0};const a=n[r.stream];a.startTime=Math.min(a.startTime,r.startTime+s),a.endTime=Math.max(a.endTime,r.endTime+s),a.captions.push(r)}),Object.keys(n).forEach(r=>{const{startTime:a,endTime:l,captions:u}=n[r],p=this.inbandTextTracks_;this.logger_(`adding cues from ${a} -> ${l} for ${r}`),i1(p,this.vhs_.tech_,r),Qs(a,l,p[r]),s1({captionArray:u,inbandTextTracks:p,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(t,e,s){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(s,e,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,e,s)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(t=>t()),this.metadataQueue_.caption.forEach(t=>t()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const t=this.callQueue_;this.callQueue_=[],t.forEach(e=>e())}processLoadQueue_(){const t=this.loadQueue_;this.loadQueue_=[],t.forEach(e=>e())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const t=this.pendingSegment_;return!!t&&(!this.getCurrentMediaInfo_()||!Yd({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(t=this.pendingSegment_){return t&&t.trackInfo||this.currentMediaInfo_}getMediaInfo_(t=this.pendingSegment_){return this.getCurrentMediaInfo_(t)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const t=this.pendingSegment_,e=this.getCurrentMediaInfo_();if(!t||!e)return!1;const{hasAudio:s,hasVideo:n,isMuxed:r}=e;return!(n&&!t.videoTimingInfo)&&!(s&&!this.audioDisabled_&&!r&&!t.audioTimingInfo)&&!Yd({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})}handleData_(t,e){if(this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,t,e));const s=this.pendingSegment_;if(this.setTimeMapping_(s.timeline),this.updateMediaSecondsLoaded_(s.part||s.segment),this.mediaSource_.readyState!=="closed"){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),s.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),s.isFmp4=t.isFmp4,s.timingInfo=s.timingInfo||{},s.isFmp4)this.trigger("fmp4"),s.timingInfo.start=s[Kd(e.type)].start;else{const n=this.getCurrentMediaInfo_(),r=this.loaderType_==="main"&&n&&n.hasVideo;let a;r&&(a=s.videoTimingInfo.start),s.timingInfo.start=this.trueSegmentStart_({currentStart:s.timingInfo.start,playlist:s.playlist,mediaIndex:s.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:r,firstVideoFrameTimeForData:a,videoTimingInfo:s.videoTimingInfo,audioTimingInfo:s.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(s,e.type),this.updateSourceBufferTimestampOffset_(s),s.isSyncRequest){this.updateTimingInfoEnd_(s),this.syncController_.saveSegmentTimingInfo({segmentInfo:s,shouldSaveTimelineMapping:this.loaderType_==="main"});const n=this.chooseNextRequest_();if(n.mediaIndex!==s.mediaIndex||n.partIndex!==s.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}s.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(s,e)}}updateAppendInitSegmentStatus(t,e){this.loaderType_!=="main"||typeof t.timestampOffset!="number"||t.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[e]!==t.playlist&&(this.appendInitSegment_[e]=!0)}getInitSegmentAndUpdateState_({type:t,initSegment:e,map:s,playlist:n}){if(s){const r=Ur(s);if(this.activeInitSegmentId_===r)return null;e=this.initSegmentForMap(s,!0).bytes,this.activeInitSegmentId_=r}return e&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=n,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,e):null}handleQuotaExceededError_({segmentInfo:t,type:e,bytes:s},n){const r=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+xi(r).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+xi(a).join(", "));const l=r.length?r.start(0):0,u=r.length?r.end(r.length-1):0,p=a.length?a.start(0):0,g=a.length?a.end(a.length-1):0;if(u-l<=Vs&&g-p<=Vs)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${s.byteLength}, audio buffer: ${xi(r).join(", ")}, video buffer: ${xi(a).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0,metadata:{errorType:D.Error.SegmentExceedsSourceBufferQuota}}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:t,type:e,bytes:s}));const y=this.currentTime_()-Vs;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${y}`),this.remove(0,y,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Vs}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=E.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3*Vs)},!0)}handleAppendError_({segmentInfo:t,type:e,bytes:s},n){n&&(n.code!==jm?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${e} append of ${s.length}b failed for segment #${t.mediaIndex} in playlist ${t.playlist.id}`,metadata:{errorType:D.Error.SegmentAppendError}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:t,type:e,bytes:s}))}appendToSourceBuffer_({segmentInfo:t,type:e,initSegment:s,data:n,bytes:r}){if(!r){const a=[n];let l=n.byteLength;s&&(a.unshift(s),l+=s.byteLength),r=e1({bytes:l,segments:a})}this.sourceUpdater_.appendBuffer({segmentInfo:t,type:e,bytes:r},this.handleAppendError_.bind(this,{segmentInfo:t,type:e,bytes:r}))}handleSegmentTimingInfo_(t,e,s){if(!this.pendingSegment_||e!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,r=`${t}TimingInfo`;n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=s.prependedContentDuration||0,n[r].transmuxedPresentationStart=s.start.presentation,n[r].transmuxedDecodeStart=s.start.decode,n[r].transmuxedPresentationEnd=s.end.presentation,n[r].transmuxedDecodeEnd=s.end.decode,n[r].baseMediaDecodeTime=s.baseMediaDecodeTime}appendData_(t,e){const{type:s,data:n}=e;if(!n||!n.byteLength||s==="audio"&&this.audioDisabled_)return;const r=this.getInitSegmentAndUpdateState_({type:s,initSegment:e.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:s,initSegment:r,data:n})}loadSegment_(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),typeof t.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):this.loadQueue_.push(()=>{const e=ve({},t,{forceTimestampOffset:!0});ve(t,this.generateSegmentInfo_(e)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(t)})}updateTransmuxerAndRequestSegment_(t){this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));const e=this.createSimplifiedSegmentObj_(t),s=this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex),n=this.mediaIndex!==null,r=t.timeline!==this.currentTimeline_&&t.timeline>0,a=s||n&&r;this.logger_(`Requesting +${qm(t.uri)} +${Vi(t)}`),e.map&&!e.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),t.abortRequests=GT({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:e,abortFn:this.handleAbort_.bind(this,t),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:l,level:u,stream:p})=>{this.logger_(`${Vi(t)} logged from transmuxer stream ${p} as a ${u}: ${l}`)}})}trimBackBuffer_(t){const e=y1(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);e>0&&this.remove(0,e)}createSimplifiedSegmentObj_(t){const e=t.segment,s=t.part,n={resolvedUri:s?s.resolvedUri:e.resolvedUri,byterange:s?s.byterange:e.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,part:t.part},r=t.playlist.segments[t.mediaIndex-1];if(r&&r.timeline===e.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),e.key){const a=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);n.key=this.segmentKey(e.key),n.key.iv=a}return e.map&&(n.map=this.initSegmentForMap(e.map)),n}saveTransferStats_(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)}saveBandwidthRelatedStats_(t,e){this.pendingSegment_.byteLength=e.bytesReceived,t3*t.playlist.targetDuration,a=n&&n.end&&this.currentTime_()-n.end>3*t.playlist.partTargetDuration;if(r||a)return this.logger_(`bad ${r?"segment":"part"} ${Vi(t)}`),void this.resetEverything();this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.partIndex=t.partIndex,this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex)&&this.endOfStream(),this.trigger("appended"),t.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(t){if(t.durationt.toUpperCase())},T1=["video","audio"],al=(i,t)=>{const e=t[`${i}Buffer`];return e&&e.updating||t.queuePending[i]},S1=(i,t)=>{for(let e=0;e{if(t.queue.length===0)return;let e=0,s=t.queue[e];if(s.type!=="mediaSource"){if(i!=="mediaSource"&&t.ready()&&t.mediaSource.readyState!=="closed"&&!al(i,t)){if(s.type!==i){if(e=S1(i,t.queue),e===null)return;s=t.queue[e]}return t.queue.splice(e,1),t.queuePending[i]=s,s.action(i,t),s.doneFn?void 0:(t.queuePending[i]=null,void hs(i,t))}}else t.updating()||t.mediaSource.readyState==="closed"||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),hs("audio",t),hs("video",t))},Hm=(i,t)=>{const e=t[`${i}Buffer`],s=$m(i);e&&(e.removeEventListener("updateend",t[`on${s}UpdateEnd_`]),e.removeEventListener("error",t[`on${s}Error_`]),t.codecs[i]=null,t[`${i}Buffer`]=null)},ke=(i,t)=>i&&t&&Array.prototype.indexOf.call(i.sourceBuffers,t)!==-1,ie={appendBuffer:(i,t,e)=>(s,n)=>{const r=n[`${s}Buffer`];if(ke(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${i.length} bytes to ${s}Buffer`);try{r.appendBuffer(i)}catch(a){n.logger_(`Error with code ${a.code} `+(a.code===jm?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,e(a)}}},remove:(i,t)=>(e,s)=>{const n=s[`${e}Buffer`];if(ke(s.mediaSource,n)){s.logger_(`Removing ${i} to ${t} from ${e}Buffer`);try{n.remove(i,t)}catch{s.logger_(`Remove ${i} to ${t} from ${e}Buffer failed`)}}},timestampOffset:i=>(t,e)=>{const s=e[`${t}Buffer`];ke(e.mediaSource,s)&&(e.logger_(`Setting ${t}timestampOffset to ${i}`),s.timestampOffset=i)},callback:i=>(t,e)=>{i()},endOfStream:i=>t=>{if(t.mediaSource.readyState==="open"){t.logger_(`Calling mediaSource endOfStream(${i||""})`);try{t.mediaSource.endOfStream(i)}catch(e){D.log.warn("Failed to call media source endOfStream",e)}}},duration:i=>t=>{t.logger_(`Setting mediaSource duration to ${i}`);try{t.mediaSource.duration=i}catch(e){D.log.warn("Failed to set media source duration",e)}},abort:()=>(i,t)=>{if(t.mediaSource.readyState!=="open")return;const e=t[`${i}Buffer`];if(ke(t.mediaSource,e)){t.logger_(`calling abort on ${i}Buffer`);try{e.abort()}catch(s){D.log.warn(`Failed to abort on ${i}Buffer`,s)}}},addSourceBuffer:(i,t)=>e=>{const s=$m(i),n=ln(t);e.logger_(`Adding ${i}Buffer with codec ${t} to mediaSource`);const r=e.mediaSource.addSourceBuffer(n);r.addEventListener("updateend",e[`on${s}UpdateEnd_`]),r.addEventListener("error",e[`on${s}Error_`]),e.codecs[i]=t,e[`${i}Buffer`]=r},removeSourceBuffer:i=>t=>{const e=t[`${i}Buffer`];if(Hm(i,t),ke(t.mediaSource,e)){t.logger_(`Removing ${i}Buffer with codec ${t.codecs[i]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(e)}catch(s){D.log.warn(`Failed to removeSourceBuffer ${i}Buffer`,s)}}},changeType:i=>(t,e)=>{const s=e[`${t}Buffer`],n=ln(i);if(!ke(e.mediaSource,s))return;const r=i.substring(0,i.indexOf(".")),a=e.codecs[t];if(a.substring(0,a.indexOf("."))!==r){e.logger_(`changing ${t}Buffer codec from ${e.codecs[t]} to ${i}`);try{s.changeType(n),e.codecs[t]=i}catch(l){D.log.warn(`Failed to changeType on ${t}Buffer`,l)}}}},se=({type:i,sourceUpdater:t,action:e,doneFn:s,name:n})=>{t.queue.push({type:i,action:e,doneFn:s,name:n}),hs(i,t)},Jd=(i,t)=>e=>{const s=zb(t[`${i}Buffered`]());if(t.logger_(`received "updateend" event for ${i} Source Buffer: `,s),t.queuePending[i]){const n=t.queuePending[i].doneFn;t.queuePending[i]=null,n&&n(t[`${i}Error_`])}hs(i,t)};class Vm extends D.EventTarget{constructor(t){super(),this.mediaSource=t,this.sourceopenListener_=()=>hs("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=de("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Jd("video",this),this.onAudioUpdateEnd_=Jd("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(t,e){se({type:"mediaSource",sourceUpdater:this,action:ie.addSourceBuffer(t,e),name:"addSourceBuffer"})}abort(t){se({type:t,sourceUpdater:this,action:ie.abort(t),name:"abort"})}removeSourceBuffer(t){this.canRemoveSourceBuffer()?se({type:"mediaSource",sourceUpdater:this,action:ie.removeSourceBuffer(t),name:"removeSourceBuffer"}):D.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!D.browser.IS_FIREFOX&&E.MediaSource&&E.MediaSource.prototype&&typeof E.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return E.SourceBuffer&&E.SourceBuffer.prototype&&typeof E.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(t,e){this.canChangeType()?se({type:t,sourceUpdater:this,action:ie.changeType(e),name:"changeType"}):D.log.error("changeType is not supported!")}addOrChangeSourceBuffers(t){if(!t||typeof t!="object"||Object.keys(t).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach(e=>{const s=t[e];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(e,s);this.canChangeType()&&this.changeType(e,s)})}appendBuffer(t,e){const{segmentInfo:s,type:n,bytes:r}=t;if(this.processedAppend_=!0,n==="audio"&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([t,e]),void this.logger_(`delayed audio append of ${r.length} until video append`);const a=e;if(se({type:n,sourceUpdater:this,action:ie.appendBuffer(r,s||{mediaIndex:-1},a),doneFn:e,name:"appendBuffer"}),n==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const l=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${l.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,l.forEach(u=>{this.appendBuffer.apply(this,u)})}}audioBuffered(){return ke(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Zt()}videoBuffered(){return ke(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Zt()}buffered(){const t=ke(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,e=ke(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return e&&!t?this.audioBuffered():t&&!e?this.videoBuffered():Gb(this.audioBuffered(),this.videoBuffered())}setDuration(t,e=We){se({type:"mediaSource",sourceUpdater:this,action:ie.duration(t),name:"duration",doneFn:e})}endOfStream(t=null,e=We){typeof t!="string"&&(t=void 0),se({type:"mediaSource",sourceUpdater:this,action:ie.endOfStream(t),name:"endOfStream",doneFn:e})}removeAudio(t,e,s=We){this.audioBuffered().length&&this.audioBuffered().end(0)!==0?se({type:"audio",sourceUpdater:this,action:ie.remove(t,e),doneFn:s,name:"remove"}):s()}removeVideo(t,e,s=We){this.videoBuffered().length&&this.videoBuffered().end(0)!==0?se({type:"video",sourceUpdater:this,action:ie.remove(t,e),doneFn:s,name:"remove"}):s()}updating(){return!(!al("audio",this)&&!al("video",this))}audioTimestampOffset(t){return t!==void 0&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(se({type:"audio",sourceUpdater:this,action:ie.timestampOffset(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_}videoTimestampOffset(t){return t!==void 0&&this.videoBuffer&&this.videoTimestampOffset!==t&&(se({type:"video",sourceUpdater:this,action:ie.timestampOffset(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_}audioQueueCallback(t){this.audioBuffer&&se({type:"audio",sourceUpdater:this,action:ie.callback(t),name:"callback"})}videoQueueCallback(t){this.videoBuffer&&se({type:"video",sourceUpdater:this,action:ie.callback(t),name:"callback"})}dispose(){this.trigger("dispose"),T1.forEach(t=>{this.abort(t),this.canRemoveSourceBuffer()?this.removeSourceBuffer(t):this[`${t}QueueCallback`](()=>Hm(t,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Zd=i=>decodeURIComponent(escape(String.fromCharCode.apply(null,i))),E1=i=>{const t=new Uint8Array(i);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")},tc=new Uint8Array(` + +`.split("").map(i=>i.charCodeAt(0)));class w1 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class C1 extends rl{constructor(t,e={}){super(t,e),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=t.featuresNativeTextTracks,this.loadVttJs=t.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Zt();const t=this.subtitlesTrack_.cues;return Zt([[t[0].startTime,t[t.length-1].startTime]])}initSegmentForMap(t,e=!1){if(!t)return null;const s=Ur(t);let n=this.initSegments_[s];if(e&&!n&&t.bytes){const r=tc.byteLength+t.bytes.byteLength,a=new Uint8Array(r);a.set(t.bytes),a.set(tc,t.bytes.byteLength),this.initSegments_[s]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:a}}return n||t}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(t){return t===void 0||(this.subtitlesTrack_=t,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(t,e){Qs(t,e,this.subtitlesTrack_)}fillBuffer_(){const t=this.chooseNextRequest_();if(t){if(this.syncController_.timestampOffsetForTimeline(t.timeline)===null){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(t){for(;t&&t.segment.empty;){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t}stopForError(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(t,e,s){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(e.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(t)return t.code===Pe.TIMEOUT&&this.handleTimeout_(),t.code===Pe.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(t);const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,e.stats),e.key&&this.segmentKey(e.key,!0),this.state="APPENDING",this.trigger("appending");const r=n.segment;if(r.map&&(r.map.bytes=e.map.bytes),n.bytes=e.bytes,typeof E.WebVTT!="function"&&typeof this.loadVttJs=="function")return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(()=>this.segmentRequestFinished_(t,e,s),()=>this.stopForError({message:"Error loading vtt.js",metadata:{errorType:D.Error.VttLoadError}}));r.requested=!0;try{this.parseVTTCues_(n)}catch(a){return void this.stopForError({message:a.message,metadata:{errorType:D.Error.VttCueParsingError}})}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,n.cues.forEach(a=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new E.VTTCue(a.startTime,a.endTime,a.text):a)}),h1(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(t){let e,s=!1;if(typeof E.WebVTT!="function")throw new w1;typeof E.TextDecoder=="function"?e=new E.TextDecoder("utf8"):(e=E.WebVTT.StringDecoder(),s=!0);const n=new E.WebVTT.Parser(E,E.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=t.cues.push.bind(t.cues),n.ontimestampmap=a=>{t.timestampmap=a},n.onparsingerror=a=>{D.log.warn("Error encountered when parsing cues: "+a.message)},t.segment.map){let a=t.segment.map.bytes;s&&(a=Zd(a)),n.parse(a)}let r=t.bytes;s&&(r=Zd(r)),n.parse(r),n.flush()}updateTimeMapping_(t,e,s){const n=t.segment;if(!e)return;if(!t.cues.length)return void(n.empty=!0);const{MPEGTS:r,LOCAL:a}=t.timestampmap,l=r/ki.ONE_SECOND_IN_TS-a+e.mapping;if(t.cues.forEach(u=>{const p=u.endTime-u.startTime,g=r===0?u.startTime+l:this.handleRollover_(u.startTime+l,e.time);u.startTime=Math.max(g,0),u.endTime=Math.max(g+p,0)}),!s.syncInfo){const u=t.cues[0].startTime,p=t.cues[t.cues.length-1].startTime;s.syncInfo={mediaSequence:s.mediaSequence+t.mediaIndex,time:Math.min(u,p-n.duration)}}}handleRollover_(t,e){if(e===null)return t;let s=t*ki.ONE_SECOND_IN_TS;const n=e*ki.ONE_SECOND_IN_TS;let r;for(r=n4294967296;)s+=r;return s/ki.ONE_SECOND_IN_TS}}const k1=function(i,t){const e=i.cues;for(let s=0;s=n.adStartTime&&t<=n.adEndTime)return n}return null},x1=function(i,t,e=0){if(!i.segments)return;let s,n=e;for(let r=0;r=this.start&&t0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(t=>t.resetAppendedStatus())}}class bo{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(t=>t.resetAppendStatus())}update(t,e){const{mediaSequence:s,segments:n}=t;if(this.isReliable_=this.isReliablePlaylist_(s,n),this.isReliable_)return this.updateStorage_(n,s,this.calculateBaseTime_(s,e))}getSyncInfoForTime(t){for(const{segmentSyncInfo:e,partsSyncInfo:s}of this.storage_.values())if(s.length){for(const n of s)if(n.isInRange(t))return n}else if(e.isInRange(t))return e;return null}updateStorage_(t,e,s){const n=new Map;let r=` +`,a=s,l=e;this.start_=a,t.forEach((u,p)=>{const g=this.storage_.get(l),y=a,T=y+u.duration,w=!!(g&&g.segmentSyncInfo&&g.segmentSyncInfo.isAppended),_=new ec({start:y,end:T,appended:w,segmentIndex:p});u.syncInfo=_;let k=a;const x=(u.parts||[]).map((A,I)=>{const O=k,N=k+A.duration,P=!!(g&&g.partsSyncInfo&&g.partsSyncInfo[I]&&g.partsSyncInfo[I].isAppended),F=new ec({start:O,end:N,appended:P,segmentIndex:p,partIndex:I});return k=N,r+=`Media Sequence: ${l}.${I} | Range: ${O} --> ${N} | Appended: ${P} +`,A.syncInfo=F,F});n.set(l,new I1(_,x)),r+=`${qm(u.resolvedUri)} | Media Sequence: ${l} | Range: ${y} --> ${T} | Appended: ${w} +`,l++,a=T}),this.end_=a,this.storage_=n,this.diagnostics_=r}calculateBaseTime_(t,e){return this.storage_.size?this.storage_.has(t)?this.storage_.get(t).segmentSyncInfo.start:e:0}isReliablePlaylist_(t,e){return t!=null&&Array.isArray(e)&&e.length}}const A1=86400,To=[{name:"VOD",run:(i,t,e,s,n)=>e!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(i,t,e,s,n,r)=>{const a=i.getMediaSequenceSync(r);if(!a||!a.isReliable)return null;const l=a.getSyncInfoForTime(n);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(i,t,e,s,n)=>{if(!Object.keys(i.timelineToDatetimeMappings).length)return null;let r=null,a=null;const l=Qo(t);n=n||0;for(let u=0;u{let r=null,a=null;n=n||0;const l=Qo(t);for(let u=0;u=T)&&(a=T,r={time:y,segmentIndex:p.segmentIndex,partIndex:p.partIndex})}}return r}},{name:"Discontinuity",run:(i,t,e,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let a=null;for(let l=0;l=y)&&(a=y,r={time:g.time,segmentIndex:u,partIndex:null})}}}return r}},{name:"Playlist",run:(i,t,e,s,n)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class P1 extends D.EventTarget{constructor(t={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.mediaSequenceStorage_={main:new bo,audio:new bo,vtt:new bo},this.logger_=de("SyncController")}getMediaSequenceSync(t){return this.mediaSequenceStorage_[t]||null}getSyncPoint(t,e,s,n,r){if(e!==1/0)return To.find(({name:l})=>l==="VOD").run(this,t,e);const a=this.runStrategies_(t,e,s,n,r);if(!a.length)return null;for(const l of a){const{syncPoint:u,strategy:p}=l,{segmentIndex:g,time:y}=u;if(g<0)continue;const T=y,w=T+t.segments[g].duration;if(this.logger_(`Strategy: ${p}. Current time: ${n}. selected segment: ${g}. Time: [${T} -> ${w}]}`),n>=T&&n0&&(n.time*=-1),Math.abs(n.time+nn({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(t,e,s,n,r){const a=[];for(let l=0;lA1)D.log.warn(`Not saving expired segment info. Media sequence gap ${s} is too large.`);else for(let n=s-1;n>=0;n--){const r=t.segments[n];if(r&&r.start!==void 0){e.syncInfo={mediaSequence:t.mediaSequence+n,time:r.start},this.logger_(`playlist refresh sync: [time:${e.syncInfo.time}, mediaSequence: ${e.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){const e=t.segments[0],s=e.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[e.timeline]=-s}}saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:e}){const s=this.calculateSegmentTimeMapping_(t,t.timingInfo,e),n=t.segment;s&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:n.start}));const r=n.dateTimeObject;n.discontinuity&&e&&r&&(this.timelineToDatetimeMappings[n.timeline]=-r.getTime()/1e3)}timestampOffsetForTimeline(t){return this.timelines[t]===void 0?null:this.timelines[t].time}mappingForTimeline(t){return this.timelines[t]===void 0?null:this.timelines[t].mapping}calculateSegmentTimeMapping_(t,e,s){const n=t.segment,r=t.part;let a,l,u=this.timelines[t.timeline];if(typeof t.timestampOffset=="number")u={time:t.startOfSegment,mapping:t.startOfSegment-e.start},s&&(this.timelines[t.timeline]=u,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${t.timeline}: [time: ${u.time}] [mapping: ${u.mapping}]`)),a=t.startOfSegment,l=e.end+u.mapping;else{if(!u)return!1;a=e.start+u.mapping,l=e.end+u.mapping}return r&&(r.start=a,r.end=l),(!n.start||au){let p;p=l<0?s.start-nn({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:t.mediaIndex,endIndex:r}):s.end+nn({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:t.mediaIndex+1,endIndex:r}),this.discontinuities[a]={time:p,accuracy:u}}}}dispose(){this.trigger("dispose"),this.off()}}class D1 extends D.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:t,from:e,to:s}){return typeof e=="number"&&typeof s=="number"&&(this.pendingTimelineChanges_[t]={type:t,from:e,to:s},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange({type:t,from:e,to:s}){return typeof e=="number"&&typeof s=="number"&&(this.lastTimelineChanges_[t]={type:t,from:e,to:s},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const L1=Pm(Dm(function(){var i=function(){function _(){this.listeners={}}var k=_.prototype;return k.on=function(x,A){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push(A)},k.off=function(x,A){if(!this.listeners[x])return!1;var I=this.listeners[x].indexOf(A);return this.listeners[x]=this.listeners[x].slice(0),this.listeners[x].splice(I,1),I>-1},k.trigger=function(x){var A=this.listeners[x];if(A)if(arguments.length===2)for(var I=A.length,O=0;O>7))^O]=O;for(N=P=0;!A[N];N^=dt||1,P=$[P]||1)for(st=P^P<<1^P<<2^P<<3^P<<4,st=st>>8^255&st^99,A[N]=st,I[st]=N,ct=F[Z=F[dt=F[N]]],tt=16843009*ct^65537*Z^257*dt^16843008*N,pt=257*F[st]^16843008*st,O=0;O<4;O++)k[O][N]=pt=pt<<24^pt>>>8,x[O][st]=tt=tt<<24^tt>>>8;for(O=0;O<5;O++)k[O]=k[O].slice(0),x[O]=x[O].slice(0);return _};let s=null;class n{constructor(k){let x,A,I;s||(s=e()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];const O=this._tables[0][4],N=this._tables[1],P=k.length;let F=1;if(P!==4&&P!==6&&P!==8)throw new Error("Invalid aes key size");const $=k.slice(0),dt=[];for(this._key=[$,dt],x=P;x<4*P+28;x++)I=$[x-1],(x%P==0||P===8&&x%P==4)&&(I=O[I>>>24]<<24^O[I>>16&255]<<16^O[I>>8&255]<<8^O[255&I],x%P==0&&(I=I<<8^I>>>24^F<<24,F=F<<1^283*(F>>7))),$[x]=$[x-P]^I;for(A=0;x;A++,x--)I=$[3&A?x:x-4],dt[A]=x<=4||A<4?I:N[0][O[I>>>24]]^N[1][O[I>>16&255]]^N[2][O[I>>8&255]]^N[3][O[255&I]]}decrypt(k,x,A,I,O,N){const P=this._key[1];let F,$,dt,Z=k^P[0],ct=I^P[1],st=A^P[2],pt=x^P[3];const tt=P.length/4-2;let Nt,et=4;const wt=this._tables[1],ce=wt[0],pi=wt[1],mi=wt[2],gi=wt[3],fi=wt[4];for(Nt=0;Nt>>24]^pi[ct>>16&255]^mi[st>>8&255]^gi[255&pt]^P[et],$=ce[ct>>>24]^pi[st>>16&255]^mi[pt>>8&255]^gi[255&Z]^P[et+1],dt=ce[st>>>24]^pi[pt>>16&255]^mi[Z>>8&255]^gi[255&ct]^P[et+2],pt=ce[pt>>>24]^pi[Z>>16&255]^mi[ct>>8&255]^gi[255&st]^P[et+3],et+=4,Z=F,ct=$,st=dt;for(Nt=0;Nt<4;Nt++)O[(3&-Nt)+N]=fi[Z>>>24]<<24^fi[ct>>16&255]<<16^fi[st>>8&255]<<8^fi[255&pt]^P[et++],F=Z,Z=ct,ct=st,st=pt,pt=F}}class r extends i{constructor(){super(i),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(k){this.jobs.push(k),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const a=function(_){return _<<24|(65280&_)<<8|(16711680&_)>>8|_>>>24},l=function(_,k,x){const A=new Int32Array(_.buffer,_.byteOffset,_.byteLength>>2),I=new n(Array.prototype.slice.call(k)),O=new Uint8Array(_.byteLength),N=new Int32Array(O.buffer);let P,F,$,dt,Z,ct,st,pt,tt;for(P=x[0],F=x[1],$=x[2],dt=x[3],tt=0;tt{const A=_[x];y(A)?k[x]={bytes:A.buffer,byteOffset:A.byteOffset,byteLength:A.byteLength}:k[x]=A}),k};self.onmessage=function(_){const k=_.data,x=new Uint8Array(k.encrypted.bytes,k.encrypted.byteOffset,k.encrypted.byteLength),A=new Uint32Array(k.key.bytes,k.key.byteOffset,k.key.byteLength/4),I=new Uint32Array(k.iv.bytes,k.iv.byteOffset,k.iv.byteLength/4);new u(x,A,I,function(O,N){self.postMessage(w({source:k.source,decrypted:N}),[N.buffer])})}}));var O1=Am(L1);const N1=i=>{let t=i.default?"main":"alternative";return i.characteristics&&i.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},zm=(i,t)=>{i.abort(),i.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},ol=(i,t)=>{t.activePlaylistLoader=i,i.load()},R1=(i,t)=>()=>{const{segmentLoaders:{[i]:e,main:s},mediaTypes:{[i]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),l=n.activePlaylistLoader,u=n.lastGroup_;a&&u&&a.id===u.id||(n.lastGroup_=a,n.lastTrack_=r,zm(e,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(e.resyncLoader(),ol(a.playlistLoader,n)):l&&s.resetEverything()))},M1=(i,t)=>()=>{const{segmentLoaders:{[i]:e},mediaTypes:{[i]:s}}=t;s.lastGroup_=null,e.abort(),e.pause()},U1=(i,t)=>()=>{const{mainPlaylistLoader:e,segmentLoaders:{[i]:s,main:n},mediaTypes:{[i]:r}}=t,a=r.activeTrack(),l=r.getActiveGroup(),u=r.activePlaylistLoader,p=r.lastTrack_;if((!p||!a||p.id!==a.id)&&(r.lastGroup_=l,r.lastTrack_=a,zm(s,r),l)){if(l.isMainPlaylist){if(!a||!p||a.id===p.id)return;const g=t.vhs.playlistController_,y=g.selectPlaylist();return g.media()===y?void 0:(r.logger_(`track change. Switching main audio from ${p.id} to ${a.id}`),e.pause(),n.resetEverything(),void g.fastQualityChange_(y))}if(i==="AUDIO"){if(!l.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}u!==l.playlistLoader&&(s.track&&s.track(a),s.resetEverything()),ol(l.playlistLoader,r)}},qr={AUDIO:(i,t)=>()=>{const{mediaTypes:{[i]:e},excludePlaylist:s}=t,n=e.activeTrack(),r=e.activeGroup(),a=(r.filter(u=>u.default)[0]||r[0]).id,l=e.tracks[a];if(n!==l){D.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const u in e.tracks)e.tracks[u].enabled=e.tracks[u]===l;e.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(i,t)=>()=>{const{mediaTypes:{[i]:e}}=t;D.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const s=e.activeTrack();s&&(s.mode="disabled"),e.onTrackChanged()}},ic={AUDIO:(i,t,e)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[i]:r}}=e;t.on("loadedmetadata",()=>{const a=t.media();r.playlist(a,n),(!s.paused()||a.endList&&s.preload()!=="none")&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",qr[i](i,e))},SUBTITLES:(i,t,e)=>{const{tech:s,requestOptions:n,segmentLoaders:{[i]:r},mediaTypes:{[i]:a}}=e;t.on("loadedmetadata",()=>{const l=t.media();r.playlist(l,n),r.track(a.activeTrack()),(!s.paused()||l.endList&&s.preload()!=="none")&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",qr[i](i,e))}},B1={AUDIO:(i,t)=>{const{vhs:e,sourceType:s,segmentLoaders:{[i]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[i]:{groups:l,tracks:u,logger_:p}},mainPlaylistLoader:g}=t,y=En(g.main);a[i]&&Object.keys(a[i]).length!==0||(a[i]={main:{default:{default:!0}}},y&&(a[i].main.default.playlists=g.main.playlists));for(const T in a[i]){l[T]||(l[T]=[]);for(const w in a[i][T]){let _,k=a[i][T][w];if(y?(p(`AUDIO group '${T}' label '${w}' is a main playlist`),k.isMainPlaylist=!0,_=null):_=s==="vhs-json"&&k.playlists?new Zi(k.playlists[0],e,r):k.resolvedUri?new Zi(k.resolvedUri,e,r):k.playlists&&s==="dash"?new sl(k.playlists[0],e,r,g):null,k=nt({id:w,playlistLoader:_},k),ic[i](i,k.playlistLoader,t),l[T].push(k),u[w]===void 0){const x=new D.AudioTrack({id:w,kind:N1(k),enabled:!1,language:k.language,default:k.default,label:w});u[w]=x}}}n.on("error",qr[i](i,t))},SUBTITLES:(i,t)=>{const{tech:e,vhs:s,sourceType:n,segmentLoaders:{[i]:r},requestOptions:a,main:{mediaGroups:l},mediaTypes:{[i]:{groups:u,tracks:p}},mainPlaylistLoader:g}=t;for(const y in l[i]){u[y]||(u[y]=[]);for(const T in l[i][y]){if(!s.options_.useForcedSubtitles&&l[i][y][T].forced)continue;let w,_=l[i][y][T];if(n==="hls")w=new Zi(_.resolvedUri,s,a);else if(n==="dash"){if(!_.playlists.filter(k=>k.excludeUntil!==1/0).length)return;w=new sl(_.playlists[0],s,a,g)}else n==="vhs-json"&&(w=new Zi(_.playlists?_.playlists[0]:_.resolvedUri,s,a));if(_=nt({id:T,playlistLoader:w},_),ic[i](i,_.playlistLoader,t),u[y].push(_),p[T]===void 0){const k=e.addRemoteTextTrack({id:T,kind:"subtitles",default:_.default&&_.autoselect,language:_.language,label:T},!1).track;p[T]=k}}}r.on("error",qr[i](i,t))},"CLOSED-CAPTIONS":(i,t)=>{const{tech:e,main:{mediaGroups:s},mediaTypes:{[i]:{groups:n,tracks:r}}}=t;for(const a in s[i]){n[a]||(n[a]=[]);for(const l in s[i][a]){const u=s[i][a][l];if(!/^(?:CC|SERVICE)/.test(u.instreamId))continue;const p=e.options_.vhs&&e.options_.vhs.captionServices||{};let g={label:l,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(p[g.instreamId]&&(g=nt(g,p[g.instreamId])),g.default===void 0&&delete g.default,n[a].push(nt({id:l},u)),r[l]===void 0){const y=e.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;r[l]=y}}}}},Wm=(i,t)=>{for(let e=0;ee=>{const{mainPlaylistLoader:s,mediaTypes:{[i]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[i]&&(a=n[r.attributes[i]]);const l=Object.keys(n);if(!a)if(i==="AUDIO"&&l.length>1&&En(t.main))for(let u=0;uu.id===e.id)[0]||null},q1={AUDIO:(i,t)=>()=>{const{mediaTypes:{[i]:{tracks:e}}}=t;for(const s in e)if(e[s].enabled)return e[s];return null},SUBTITLES:(i,t)=>()=>{const{mediaTypes:{[i]:{tracks:e}}}=t;for(const s in e)if(e[s].mode==="showing"||e[s].mode==="hidden")return e[s];return null}},j1=(i,{mediaTypes:t})=>()=>{const e=t[i].activeTrack();return e?t[i].activeGroup(e):null},$1=i=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(p=>{B1[p](p,i)});const{mediaTypes:t,mainPlaylistLoader:e,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=i;["AUDIO","SUBTITLES"].forEach(p=>{t[p].activeGroup=F1(p,i),t[p].activeTrack=q1[p](p,i),t[p].onGroupChanged=R1(p,i),t[p].onGroupChanging=M1(p,i),t[p].onTrackChanged=U1(p,i),t[p].getActiveGroup=j1(p,i)});const l=t.AUDIO.activeGroup();if(l){const p=(l.filter(g=>g.default)[0]||l[0]).id;t.AUDIO.tracks[p].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}e.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(p=>t[p].onGroupChanged())}),e.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(p=>t[p].onGroupChanging())});const u=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:"usage",name:"vhs-audio-change"})};s.audioTracks().addEventListener("change",u),s.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),n.on("dispose",()=>{s.audioTracks().removeEventListener("change",u),s.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),s.clearTracks("audio");for(const p in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[p])},H1=()=>{const i={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{i[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:We,activeTrack:We,getActiveGroup:We,onGroupChanged:We,onTrackChanged:We,lastTrack_:null,logger_:de(`MediaGroups[${t}]`)}}),i};class sc{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(t){t===1&&(this.version_=t)}set ttl(t){this.ttl_=t||300}set reloadUri(t){t&&(this.reloadUri_=Yt(this.reloadUri_,t))}set priority(t){t&&t.length&&(this.priority_=t)}set pathwayClones(t){t&&t.length&&(this.pathwayClones_=new Map(t.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class V1 extends D.EventTarget{constructor(t,e){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new sc,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=de("Content Steering"),this.xhr_=t,this.getBandwidth_=e}assignTagProperties(t,e){this.manifestType_=e.serverUri?"HLS":"DASH";const s=e.serverUri||e.serverURL;if(!s)return this.logger_(`steering manifest URL is ${s}, cannot request steering manifest.`),void this.trigger("error");s.startsWith("data:")?this.decodeDataUriManifest_(s.substring(s.indexOf(",")+1)):(this.steeringManifest.reloadUri=Yt(t,s),this.defaultPathway=e.pathwayId||e.defaultServiceLocation,this.queryBeforeStart=e.queryBeforeStart,this.proxyServerUrl_=e.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(t){const e=this.steeringManifest.reloadUri;if(!e)return;const s=t?e:this.getRequestURI(e);if(!s)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();this.request_=this.xhr_({uri:s,requestType:"content-steering-manifest"},(n,r)=>{if(n){if(r.status===410)return this.logger_(`manifest request 410 ${n}.`),this.logger_(`There will be no more content steering requests to ${s} this session.`),void this.excludedSteeringManifestURLs.add(s);if(r.status===429){const l=r.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${n}.`),this.logger_(`content steering will retry in ${l} seconds.`),void this.startTTLTimeout_(parseInt(l,10))}return this.logger_(`manifest failed to load ${n}.`),void this.startTTLTimeout_()}const a=JSON.parse(this.request_.responseText);this.assignSteeringProperties_(a),this.startTTLTimeout_()})}setProxyServerUrl_(t){const e=new E.URL(t),s=new E.URL(this.proxyServerUrl_);return s.searchParams.set("url",encodeURI(e.toString())),this.setSteeringParams_(s.toString())}decodeDataUriManifest_(t){const e=JSON.parse(E.atob(t));this.assignSteeringProperties_(e)}setSteeringParams_(t){const e=new E.URL(t),s=this.getPathway(),n=this.getBandwidth_();if(s){const r=`_${this.manifestType_}_pathway`;e.searchParams.set(r,s)}if(n){const r=`_${this.manifestType_}_throughput`;e.searchParams.set(r,n)}return e.toString()}assignSteeringProperties_(t){if(this.steeringManifest.version=t.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${t.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=t.TTL,this.steeringManifest.reloadUri=t["RELOAD-URI"],this.steeringManifest.priority=t["PATHWAY-PRIORITY"]||t["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=t["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const e=(s=>{for(const n of s)if(this.availablePathways_.has(n))return n;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==e&&(this.currentPathway=e,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(t){if(!t)return null;const e=n=>this.excludedSteeringManifestURLs.has(n);if(this.proxyServerUrl_){const n=this.setProxyServerUrl_(t);if(!e(n))return n}const s=this.setSteeringParams_(t);return e(s)?null:s}startTTLTimeout_(t=this.steeringManifest.ttl){const e=1e3*t;this.ttlTimeout_=E.setTimeout(()=>{this.requestSteeringManifest()},e)}clearTTLTimeout_(){E.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new sc}addAvailablePathway(t){t&&this.availablePathways_.add(t)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(t){return this.availablePathways_.delete(t)}didDASHTagChange(t,e){return!e&&this.steeringManifest.reloadUri||e&&(Yt(t,e.serverURL)!==this.steeringManifest.reloadUri||e.defaultServiceLocation!==this.defaultPathway||e.queryBeforeStart!==this.queryBeforeStart||e.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const z1=10;let qe;const W1=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],G1=function(i){return this.audioSegmentLoader_[i]+this.mainSegmentLoader_[i]},X1=function({currentPlaylist:i,buffered:t,currentTime:e,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:l,log:u}){if(!s)return D.log.warn("We received no playlist to switch to. Please check your stream."),!1;const p=`allowing switch ${i&&i.id||"null"} -> ${s.id}`;if(!i)return u(`${p} as current playlist is not set`),!0;if(s.id===i.id)return!1;const g=!!Ji(t,e).length;if(!i.endList)return g||typeof i.partTargetDuration!="number"?(u(`${p} as current playlist is live`),!0):(u(`not ${p} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const y=Ml(t,e),T=l?Pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Pt.MAX_BUFFER_LOW_WATER_LINE;if(a_)&&y>=n){let k=`${p} as forwardBuffer >= bufferLowWaterLine (${y} >= ${n})`;return l&&(k+=` and next bandwidth > current bandwidth (${w} > ${_})`),u(k),!0}return u(`not ${p} as no switching criteria met`),!1};class K1 extends D.EventTarget{constructor(t){super();const{src:e,withCredentials:s,tech:n,bandwidth:r,externVhs:a,useCueTags:l,playlistExclusionDuration:u,enableLowInitialPlaylist:p,sourceType:g,cacheEncryptionKeys:y,bufferBasedABR:T,leastPixelDiffSelector:w,captionServices:_}=t;if(!e)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:k}=t;k==null&&(k=1/0),qe=a,this.bufferBasedABR=!!T,this.leastPixelDiffSelector=!!w,this.withCredentials=s,this.tech_=n,this.vhs_=n.vhs,this.sourceType_=g,this.useCueTags_=l,this.playlistExclusionDuration=u,this.maxPlaylistRetries=k,this.enableLowInitialPlaylist=p,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:s,maxPlaylistRetries:k,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=H1(),this.mediaSource=new E.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Zt(),this.hasPlayed_=!1,this.syncController_=new P1(t),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new O1,this.sourceUpdater_=new Vm(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new D1,this.keyStatusMap_=new Map;const x={vhs:this.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:r,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:y,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:t.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new sl(e,this.vhs_,nt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Zi(e,this.vhs_,nt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new rl(nt(x,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),t),this.audioSegmentLoader_=new rl(nt(x,{loaderType:"audio"}),t),this.subtitleSegmentLoader_=new C1(nt(x,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((O,N)=>{function P(){n.off("vttjserror",F),O()}function F(){n.off("vttjsloaded",P),N()}n.one("vttjsloaded",P),n.one("vttjserror",F),n.addWebVttScript_()})}),t);const A=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new V1(this.vhs_.xhr,A),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),W1.forEach(O=>{this[O+"_"]=G1.bind(this,O)}),this.logger_=de("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const I=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(I,()=>{const O=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-O,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const t=this.mainAppendsToLoadedData_(),e=this.audioAppendsToLoadedData_();return t===-1||e===-1?-1:t+e}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(t="abr"){const e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,t)}switchMedia_(t,e,s){const n=this.media(),r=n&&(n.id||n.uri),a=t&&(t.id||t.uri);r&&r!==a&&(this.logger_(`switch media ${r} -> ${a} from ${e}`),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${e}`})),this.mainPlaylistLoader_.media(t,s)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{const e=this.mediaTypes_[t],s=e?e.activeGroup():null,n=this.contentSteeringController_.getPathway();if(s&&n){const r=(s.length?s[0].playlists:s.playlists).filter(a=>a.attributes.serviceLocation===n);r.length&&this.mediaTypes_[t].activePlaylistLoader.media(r[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=E.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(E.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const t=this.main(),e=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return e;const s=t.mediaGroups.AUDIO,n=Object.keys(s);let r;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)r=this.mediaTypes_.AUDIO.activeTrack();else{const l=s.main||n.length&&s[n[0]];for(const u in l)if(l[u].default){r={label:u};break}}if(!r)return e;const a=[];for(const l in s)if(s[l][r.label]){const u=s[l][r.label];if(u.playlists&&u.playlists.length)a.push.apply(a,u.playlists);else if(u.uri)a.push(u);else if(t.playlists.length)for(let p=0;p{const t=this.mainPlaylistLoader_.media(),e=1.5*t.targetDuration*1e3;Jo(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=e,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),$1({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){let e;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(e=this.selectInitialPlaylist()),e||(e=this.selectPlaylist()),!e||!this.shouldSwitchToMedia_(e)||(this.initialMedia_=e,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),e=1.5*t.targetDuration*1e3;Jo(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=e,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();t.lastExcludeReason_!=="playlist-unchanged"&&this.stuckAtPlaylistEnd_(t)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(t,e){const s=t.mediaGroups||{};let n=!0;const r=Object.keys(s.AUDIO);for(const a in s.AUDIO)for(const l in s.AUDIO[a])s.AUDIO[a][l].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(s.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),qe.Playlist.isAes(e)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),r.length&&Object.keys(s.AUDIO[r[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(t){const e=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,s=this.tech_.currentTime(),n=this.bufferLowWaterLine(),r=this.bufferHighWaterLine(),a=this.tech_.buffered();return X1({buffered:a,currentTime:s,currentPlaylist:e,nextPlaylist:t,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:z1}))});const t=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(t=this.selectPlaylist()){t&&t===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(t,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.tech_.setCurrentTime(this.tech_.currentTime())})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime(){})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const t=this.inbandTextTracks_.metadataTrack_.cues;if(!t||!t.length)return;const e=this.duration();t[t.length-1].endTime=isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const e=this.mainSegmentLoader_.getCurrentMediaInfo_();t=!e||e.hasVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(t){if(!this.seekable().length)return!1;const e=this.syncController_.getExpiredTime(t,this.duration());if(e===null)return!1;const s=qe.Playlist.playlistEnd(t,e),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return s-n<=Ae;const a=r.end(r.length-1);return a-n<=Ae&&s-a<=Ae}excludePlaylist({playlistToExclude:t=this.mainPlaylistLoader_.media(),error:e={},playlistExclusionDuration:s}){if(t=t||this.mainPlaylistLoader_.media(),s=s||e.playlistExclusionDuration||this.playlistExclusionDuration,!t)return this.error=e,void(this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));t.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,r=n.filter(sa),a=r.length===1&&r[0]===t;if(n.length===1&&s!==1/0)return D.log.warn(`Problem encountered with playlist ${t.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){const _=this.pathwayAttribute_(t),k=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(_),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(_)},k)}let w=!1;n.forEach(_=>{if(_===t)return;const k=_.excludeUntil;k!==void 0&&k!==1/0&&(w=!0,delete _.excludeUntil)}),w&&(D.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;l=t.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*s,t.excludeUntil=l,e.reason&&(t.lastExcludeReason_=e.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const p=e.internal?this.logger_:D.log.warn,g=e.message?" "+e.message:"";p(`${e.internal?"Internal problem":"Problem"} encountered with playlist ${t.id}.${g} Switching to playlist ${u.id}.`),u.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const y=u.targetDuration/2*1e3||5e3,T=typeof u.lastRequest=="number"&&Date.now()-u.lastRequest<=y;return this.switchMedia_(u,"exclude",a||T)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(t,e){const s=[],n=t==="all";(n||t==="main")&&s.push(this.mainPlaylistLoader_);const r=[];(n||t==="audio")&&r.push("AUDIO"),(n||t==="subtitle")&&(r.push("CLOSED-CAPTIONS"),r.push("SUBTITLES")),r.forEach(a=>{const l=this.mediaTypes_[a]&&this.mediaTypes_[a].activePlaylistLoader;l&&s.push(l)}),["main","audio","subtitle"].forEach(a=>{const l=this[`${a}SegmentLoader_`];!l||t!==a&&t!=="all"||s.push(l)}),s.forEach(a=>e.forEach(l=>{typeof a[l]=="function"&&a[l]()}))}setCurrentTime(t){const e=Ji(this.tech_.buffered(),t);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?e&&e.length?t:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const t=this.mainPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:qe.Playlist.duration(t):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let t;if(!this.mainPlaylistLoader_)return;let e=this.mainPlaylistLoader_.media();if(!e)return;let s=this.syncController_.getExpiredTime(e,this.duration());if(s===null)return;const n=this.mainPlaylistLoader_.main,r=qe.Playlist.seekable(e,s,qe.Playlist.liveEdgeDelay(n,e));if(r.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),s=this.syncController_.getExpiredTime(e,this.duration()),s===null||(t=qe.Playlist.seekable(e,s,qe.Playlist.liveEdgeDelay(n,e)),t.length===0)))return;let a,l;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),l=this.seekable_.start(0)),t?t.start(0)>r.end(0)||r.start(0)>t.end(0)?this.seekable_=r:this.seekable_=Zt([[t.start(0)>r.start(0)?t.start(0):r.start(0),t.end(0)0&&(s=Math.max(s,e.end(e.length-1))),this.mediaSource.duration!==s&&this.sourceUpdater_.setDuration(s)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(t=>{const e=this.mediaTypes_[t].groups;for(const s in e)e[s].forEach(n=>{n.playlistLoader&&n.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,e=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),s=!t||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!e||!s)}getCodecsOrExclude_(){const t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},e=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;const s=an(this.main(),e),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(n.video=s.video||t.main.videoCodec||L_),t.main.isMuxed&&(n.video+=`,${s.audio||t.main.audioCodec||uu}`),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||r)&&(n.audio=s.audio||t.main.audioCodec||t.audio.audioCodec||uu,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),!n.audio&&!n.video)return void this.excludePlaylist({playlistToExclude:e,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const a=(p,g)=>p?hr(g):Fa(g),l={};let u;if(["video","audio"].forEach(function(p){if(n.hasOwnProperty(p)&&!a(t[p].isFmp4,n[p])){const g=t[p].isFmp4?"browser":"muxer";l[g]=l[g]||[],l[g].push(n[p]),p==="audio"&&(u=g)}}),r&&u&&e.attributes.AUDIO){const p=e.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===p&&g!==e&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${p} as ${u} does not support codec(s): "${n.audio}"`)}if(!Object.keys(l).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const p=[];if(["video","audio"].forEach(g=>{const y=(Ce(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,T=(Ce(n[g]||"")[0]||{}).type;y&&T&&y.toLowerCase()!==T.toLowerCase()&&p.push(`"${this.sourceUpdater_.codecs[g]}" -> "${n[g]}"`)}),p.length)return void this.excludePlaylist({playlistToExclude:e,error:{message:`Codec switching not supported: ${p.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return n}{const p=Object.keys(l).reduce((g,y)=>(g&&(g+=", "),g+=`${y} does not support codec(s): "${l[y].join(",")}"`),"")+".";this.excludePlaylist({playlistToExclude:e,error:{internal:!0,message:p},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const t=this.getCodecsOrExclude_();if(!t)return;this.sourceUpdater_.createSourceBuffers(t);const e=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(e)}excludeUnsupportedVariants_(){const t=this.main().playlists,e=[];Object.keys(t).forEach(s=>{const n=t[s];if(e.indexOf(n.id)!==-1)return;e.push(n.id);const r=an(this.main,n),a=[];!r.audio||Fa(r.audio)||hr(r.audio)||a.push(`audio codec ${r.audio}`),!r.video||Fa(r.video)||hr(r.video)||a.push(`video codec ${r.video}`),r.text&&r.text==="stpp.ttml.im1t"&&a.push(`text codec ${r.text}`),a.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${a.join(", ")}`))})}excludeIncompatibleVariants_(t){const e=[],s=this.main().playlists,n=Br(Ce(t)),r=Vd(n),a=n.video&&Ce(n.video)[0]||null,l=n.audio&&Ce(n.audio)[0]||null;Object.keys(s).forEach(u=>{const p=s[u];if(e.indexOf(p.id)!==-1||p.excludeUntil===1/0)return;e.push(p.id);const g=[],y=an(this.mainPlaylistLoader_.main,p),T=Vd(y);if(y.audio||y.video){if(T!==r&&g.push(`codec count "${T}" !== "${r}"`),!this.sourceUpdater_.canChangeType()){const w=y.video&&Ce(y.video)[0]||null,_=y.audio&&Ce(y.audio)[0]||null;w&&a&&w.type.toLowerCase()!==a.type.toLowerCase()&&g.push(`video codec "${w.type}" !== "${a.type}"`),_&&l&&_.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`audio codec "${_.type}" !== "${l.type}"`)}g.length&&(p.excludeUntil=1/0,this.logger_(`excluding ${p.id}: ${g.join(" && ")}`))}})}updateAdCues_(t){let e=0;const s=this.seekable();s.length&&(e=s.start(0)),x1(t,this.cueTagsTrack_,e)}goalBufferLength(){const t=this.tech_.currentTime(),e=Pt.GOAL_BUFFER_LENGTH,s=Pt.GOAL_BUFFER_LENGTH_RATE,n=Math.max(e,Pt.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*s,n)}bufferLowWaterLine(){const t=this.tech_.currentTime(),e=Pt.BUFFER_LOW_WATER_LINE,s=Pt.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(e,Pt.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(e,Pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*s,this.bufferBasedABR?r:n)}bufferHighWaterLine(){return Pt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(t){Gd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),l1({inbandTextTracks:this.inbandTextTracks_,dateRanges:t})}addMetadataToTextTrack(t,e,s){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Gd(this.inbandTextTracks_,t,this.tech_),r1({inbandTextTracks:this.inbandTextTracks_,metadataArray:e,timestampOffset:n,videoDuration:s})}pathwayAttribute_(t){return t.attributes["PATHWAY-ID"]||t.attributes.serviceLocation}initContentSteeringController_(){const t=this.main();if(t.contentSteering){for(const e of t.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(e));this.contentSteeringController_.assignTagProperties(t.uri,t.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const e=this.contentSteeringController_.getAvailablePathways(),s=[];for(const n of t.playlists){const r=n.attributes.serviceLocation;if(r&&(s.push(r),!e.has(r)))return!0}return!(s.length||!e.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const t=this.contentSteeringController_.getPathway();if(!t)return;this.handlePathwayClones_();const e=this.main().playlists,s=new Set;let n=!1;Object.keys(e).forEach(r=>{const a=e[r],l=this.pathwayAttribute_(a),u=l&&t!==l;a.excludeUntil===1/0&&a.lastExcludeReason_==="content-steering"&&!u&&(delete a.excludeUntil,delete a.lastExcludeReason_,n=!0);const p=!a.excludeUntil&&a.excludeUntil!==1/0;!s.has(a.id)&&u&&p&&(s.add(a.id),a.excludeUntil=1/0,a.lastExcludeReason_="content-steering",this.logger_(`excluding ${a.id} for ${a.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(r=>{const a=this.mediaTypes_[r];if(a.activePlaylistLoader){const l=a.activePlaylistLoader.media_;l&&l.attributes.serviceLocation!==t&&(n=!0)}}),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const t=this.main().playlists,e=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones;if(e&&e.size||s&&s.size){for(const[n,r]of e.entries())s.get(n)||(this.mainPlaylistLoader_.updateOrDeleteClone(r),this.contentSteeringController_.excludePathway(n));for(const[n,r]of s.entries()){const a=e.get(n);a?this.equalPathwayClones_(a,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(n)):(t.filter(l=>l.attributes["PATHWAY-ID"]===r["BASE-ID"]).forEach(l=>{this.mainPlaylistLoader_.addClonePathway(r,l)}),this.contentSteeringController_.addAvailablePathway(n))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}equalPathwayClones_(t,e){if(t["BASE-ID"]!==e["BASE-ID"]||t.ID!==e.ID||t["URI-REPLACEMENT"].HOST!==e["URI-REPLACEMENT"].HOST)return!1;const s=t["URI-REPLACEMENT"].PARAMS,n=e["URI-REPLACEMENT"].PARAMS;for(const r in s)if(s[r]!==n[r])return!1;for(const r in n)if(s[r]!==n[r])return!1;return!0}changeSegmentPathway_(){const t=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(t,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let t=0;const e="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(s=>{const n=this.mainPlaylistLoader_.getKeyIdSet(s);n&&n.size&&n.forEach(r=>{const a="usable",l=this.keyStatusMap_.has(r)&&this.keyStatusMap_.get(r)===a,u=s.lastExcludeReason_===e&&s.excludeUntil===1/0;l?l&&u&&(delete s.excludeUntil,delete s.lastExcludeReason_,this.logger_(`enabling playlist ${s.id} because key ID ${r} is ${a}`)):(s.excludeUntil!==1/0&&s.lastExcludeReason_!==e&&(s.excludeUntil=1/0,s.lastExcludeReason_=e,this.logger_(`excluding playlist ${s.id} because the key ID ${r} doesn't exist in the keyStatusMap or is not ${a}`)),t++)})}),t>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(s=>{const n=s&&s.attributes&&s.attributes.RESOLUTION&&s.attributes.RESOLUTION.height<720,r=s.excludeUntil===1/0&&s.lastExcludeReason_===e;n&&r&&(delete s.excludeUntil,D.log.warn(`enabling non-HD playlist ${s.id} because all playlists were excluded due to ${e} key IDs`))})}addKeyStatus_(t,e){const s=(typeof t=="string"?t:E1(t)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${e}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,e)}updatePlaylistByKeyStatus(t,e){this.addKeyStatus_(t,e),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const Y1=(i,t,e)=>s=>{const n=i.main.playlists[t],r=Bl(n),a=sa(n);return s===void 0?a:(s?delete n.disabled:n.disabled=!0,s===a||r||(e(n),s?i.trigger("renditionenabled"):i.trigger("renditiondisabled")),s)};class Q1{constructor(t,e,s){const{playlistController_:n}=t,r=n.fastQualityChange_.bind(n);if(e.attributes){const a=e.attributes.RESOLUTION;this.width=a&&a.width,this.height=a&&a.height,this.bandwidth=e.attributes.BANDWIDTH,this.frameRate=e.attributes["FRAME-RATE"]}this.codecs=an(n.main(),e),this.playlist=e,this.id=s,this.enabled=Y1(t.playlists,e.id,r)}}const J1=function(i){i.representations=()=>{const t=i.playlistController_.main(),e=En(t)?i.playlistController_.getAudioTrackPlaylists_():t.playlists;return e?e.filter(s=>!Bl(s)).map((s,n)=>new Q1(i,s,s.id)):[]}},nc=["seeking","seeked","pause","playing","error"];class Z1{constructor(t){this.playlistController_=t.playlistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=de("PlaybackWatcher"),this.logger_("initialize");const e=()=>this.monitorCurrentTime_(),s=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),a=this.playlistController_,l=["main","subtitle","audio"],u={};l.forEach(g=>{u[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},a[`${g}SegmentLoader_`].on("appendsdone",u[g].updateend),a[`${g}SegmentLoader_`].on("playlistupdate",u[g].reset),this.tech_.on(["seeked","seeking"],u[g].reset)});const p=g=>{["main","audio"].forEach(y=>{a[`${y}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),p("off"))},this.clearSeekingAppendCheck_=()=>p("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),p("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(nc,r),this.tech_.on("canplay",s),this.tech_.one("play",e),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(nc,r),this.tech_.off("canplay",s),this.tech_.off("play",e),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(g=>{a[`${g}SegmentLoader_`].off("appendsdone",u[g].updateend),a[`${g}SegmentLoader_`].off("playlistupdate",u[g].reset),this.tech_.off(["seeked","seeking"],u[g].reset)}),this.checkCurrentTimeTimeout_&&E.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&E.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=E.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(t){const e=this.playlistController_[`${t}SegmentLoader_`];this[`${t}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${t} loader`),this[`${t}StalledDownloads_`]=0,this[`${t}Buffered_`]=e.buffered_()}checkSegmentDownloads_(t){const e=this.playlistController_,s=e[`${t}SegmentLoader_`],n=s.buffered_(),r=Kb(this[`${t}Buffered_`],n);this[`${t}Buffered_`]=n,r?this.resetSegmentDownloads_(t):(this[`${t}StalledDownloads_`]++,this.logger_(`found #${this[`${t}StalledDownloads_`]} ${t} appends that did not increase buffer (possible stalled download)`,{playlistId:s.playlist_&&s.playlist_.id,buffered:xi(n)}),this[`${t}StalledDownloads_`]<10||(this.logger_(`${t} loader stalled download exclusion`),this.resetSegmentDownloads_(t),this.tech_.trigger({type:"usage",name:`vhs-${t}-download-exclusion`}),t!=="subtitle"&&e.excludePlaylist({error:{message:`Excessive ${t} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+Ae>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const t=this.seekable(),e=this.tech_.currentTime();let s;if(this.afterSeekableWindow_(t,e,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(s=t.end(t.length-1)),this.beforeSeekableWindow_(t,e)){const T=t.start(0);s=T+(T===t.end(0)?0:Ae)}if(s!==void 0)return this.logger_(`Trying to seek outside of seekable at time ${e} with seekable range ${om(t)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;const n=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),a=n.audioBuffer?n.audioBuffered():null,l=n.videoBuffer?n.videoBuffered():null,u=this.media(),p=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-Ie),g=[a,l];for(let T=0;T ${s.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(t,e)){const a=t.end(t.length-1);return this.logger_(`Fell out of live window at time ${e}. Seeking to live point (seekable end) ${a}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(a),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const s=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:s.audioBuffered(),videoBuffered:s.videoBuffered(),currentTime:e}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=ir(n,e);return r.length>0&&(this.logger_(`Stopped at ${e} and seeking to ${r.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(e),!0)}afterSeekableWindow_(t,e,s,n=!1){if(!t.length)return!1;let r=t.end(t.length-1)+Ae;const a=!s.endList,l=typeof s.partTargetDuration=="number";return a&&(l||n)&&(r=t.end(t.length-1)+3*s.targetDuration),e>r}beforeSeekableWindow_(t,e){return!!(t.length&&t.start(0)>0&&e2)return{start:r,end:a}}return null}}const tS={errorInterval:30,getSource(i){return i(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Gm=function(i,t){let e=0,s=0;const n=nt(tS,t);i.ready(()=>{i.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const r=function(){s&&i.currentTime(s)},a=function(g){g!=null&&(s=i.duration()!==1/0&&i.currentTime()||0,i.one("loadedmetadata",r),i.src(g),i.trigger({type:"usage",name:"vhs-error-reload"}),i.play())},l=function(){if(Date.now()-e<1e3*n.errorInterval)i.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(n.getSource&&typeof n.getSource=="function")return e=Date.now(),n.getSource.call(i,a);D.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},u=function(){i.off("loadedmetadata",r),i.off("error",l),i.off("dispose",u)},p=function(g){u(),Gm(i,g)};i.on("error",l),i.on("dispose",u),i.reloadSourceOnError=p},eS=function(i){Gm(this,i)};var Xm="3.12.1",iS="7.0.3",sS="1.3.0",nS="7.1.0",rS="4.0.1";const St={PlaylistLoader:Zi,Playlist:Qt,utils:gT,STANDARD_PLAYLIST_SELECTOR:Wd,INITIAL_PLAYLIST_SELECTOR:t1,lastBandwidthSelector:Wd,movingAverageBandwidthSelector:JT,comparePlaylistBandwidth:jl,comparePlaylistResolution:QT,xhr:Sm()};Object.keys(Pt).forEach(i=>{Object.defineProperty(St,i,{get:()=>(D.log.warn(`using Vhs.${i} is UNSAFE be sure you know what you are doing`),Pt[i]),set(t){D.log.warn(`using Vhs.${i} is UNSAFE be sure you know what you are doing`),typeof t!="number"||t<0?D.log.warn(`value of Vhs.${i} must be greater than or equal to 0`):Pt[i]=t}})});const Km="videojs-vhs",Ym=function(i,t){const e=t.media();let s=-1;for(let n=0;n{i.addQualityLevel(e)}),Ym(i,t.playlists)};St.canPlaySource=function(){return D.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const oS=(i,t,e)=>{if(!i)return i;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=Br(Ce(t.attributes.CODECS))),e&&e.attributes&&e.attributes.CODECS&&(s.audio=e.attributes.CODECS);const n=ln(s.video),r=ln(s.audio),a={};for(const l in i)a[l]={},r&&(a[l].audioContentType=r),n&&(a[l].videoContentType=n),t.contentProtection&&t.contentProtection[l]&&t.contentProtection[l].pssh&&(a[l].pssh=t.contentProtection[l].pssh),typeof i[l]=="string"&&(a[l].url=i[l]);return nt(i,a)},lS=(i,t)=>i.reduce((e,s)=>{if(!s.contentProtection)return e;const n=t.reduce((r,a)=>{const l=s.contentProtection[a];return l&&l.pssh&&(r[a]={pssh:l.pssh}),r},{});return Object.keys(n).length&&e.push(n),e},[]),hS=({player:i,sourceKeySystems:t,audioMedia:e,mainPlaylists:s})=>{if(!i.eme.initializeMediaKeys)return Promise.resolve();const n=e?s.concat([e]):s,r=lS(n,Object.keys(t)),a=[],l=[];return r.forEach(u=>{l.push(new Promise((p,g)=>{i.tech_.one("keysessioncreated",p)})),a.push(new Promise((p,g)=>{i.eme.initializeMediaKeys({keySystems:u},y=>{y?g(y):p()})}))}),Promise.race([Promise.all(a),Promise.race(l)])},uS=({player:i,sourceKeySystems:t,media:e,audioMedia:s})=>{const n=oS(t,e,s);return!!n&&(i.currentSource().keySystems=n,!(n&&!i.eme)||(D.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Qm=()=>{if(!E.localStorage)return null;const i=E.localStorage.getItem(Km);if(!i)return null;try{return JSON.parse(i)}catch{return null}},dS=i=>{if(!E.localStorage)return!1;let t=Qm();t=t?nt(t,i):i;try{E.localStorage.setItem(Km,JSON.stringify(t))}catch{return!1}return t},cS=i=>i.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(i.substring(i.indexOf(",")+1)):i,Jm=(i,t)=>{i._requestCallbackSet||(i._requestCallbackSet=new Set),i._requestCallbackSet.add(t)},Zm=(i,t)=>{i._responseCallbackSet||(i._responseCallbackSet=new Set),i._responseCallbackSet.add(t)},tg=(i,t)=>{i._requestCallbackSet&&(i._requestCallbackSet.delete(t),i._requestCallbackSet.size||delete i._requestCallbackSet)},eg=(i,t)=>{i._responseCallbackSet&&(i._responseCallbackSet.delete(t),i._responseCallbackSet.size||delete i._responseCallbackSet)};St.supportsNativeHls=function(){if(!j||!j.createElement)return!1;const i=j.createElement("video");return D.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(i.canPlayType(t))}):!1}(),St.supportsNativeDash=!!(j&&j.createElement&&D.getTech("Html5").isSupported())&&/maybe|probably/i.test(j.createElement("video").canPlayType("application/dash+xml")),St.supportsTypeNatively=i=>i==="hls"?St.supportsNativeHls:i==="dash"&&St.supportsNativeDash,St.isSupported=function(){return D.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},St.xhr.onRequest=function(i){Jm(St.xhr,i)},St.xhr.onResponse=function(i){Zm(St.xhr,i)},St.xhr.offRequest=function(i){tg(St.xhr,i)},St.xhr.offResponse=function(i){eg(St.xhr,i)};const pS=D.getComponent("Component");class ig extends pS{constructor(t,e,s){if(super(e,s.vhs),typeof s.initialBandwidth=="number"&&(this.options_.bandwidth=s.initialBandwidth),this.logger_=de("VhsHandler"),e.options_&&e.options_.playerId){const n=D.getPlayer(e.options_.playerId);this.player_=n}if(this.tech_=e,this.source_=t,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&e.overrideNativeAudioTracks&&e.overrideNativeVideoTracks)e.overrideNativeAudioTracks(!0),e.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(e.featuresNativeVideoTracks||e.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(j,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],n=>{const r=j.fullscreenElement||j.webkitFullscreenElement||j.mozFullScreenElement||j.msFullscreenElement;r&&r.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(t={}){if(this.options_=nt(this.options_,t),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=this.source_.useBandwidthFromLocalStorage!==void 0?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const s=Qm();s&&s.bandwidth&&(this.options_.bandwidth=s.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),s&&s.throughput&&(this.options_.throughput=s.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Pt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Pt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(s=>{this.source_[s]!==void 0&&(this.options_[s]=this.source_[s])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const e=this.options_.customPixelRatio;typeof e=="number"&&e>=0&&(this.customPixelRatio=e)}setOptions(t={}){this.setOptions_(t)}src(t,e){if(!t)return;this.setOptions_(),this.options_.src=cS(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=St,this.options_.sourceType=kc(e),this.options_.seekTo=r=>{this.tech_.setCurrentTime(r)},this.playlistController_=new K1(this.options_);const s=nt({liveRangeSafeTimeDelta:Ae},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Z1(s),this.playlistController_.on("error",()=>{const r=D.players[this.tech_.options_.playerId];let a=this.playlistController_.error;typeof a!="object"||a.code?typeof a=="string"&&(a={message:a,code:3}):a.code=3,r.error(a)});const n=this.options_.bufferBasedABR?St.movingAverageBandwidthSelector(.55):St.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=St.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(r){this.playlistController_.selectPlaylist=r.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(r){this.playlistController_.mainSegmentLoader_.throughput.rate=r,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let r=this.playlistController_.mainSegmentLoader_.bandwidth;const a=E.navigator.connection||E.navigator.mozConnection||E.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&a){const u=1e3*a.downlink*1e3;r=u>=l&&r>=l?Math.max(r,u):u}return r},set(r){this.playlistController_.mainSegmentLoader_.bandwidth=r,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const r=1/(this.bandwidth||1);let a;return a=this.throughput>0?1/this.throughput:0,Math.floor(1/(r+a))},set(){D.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>xi(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>xi(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&dS({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{J1(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=E.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),hS({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3,metadata:{errorType:D.Error.EMEKeySessionCreationError}})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,e=uS({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",s=>{this.playlistController_.updatePlaylistByKeyStatus(s.keyId,s.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),e?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const t=D.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{aS(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Ym(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Xm,"mux.js":iS,"mpd-parser":sS,"m3u8-parser":nS,"aes-decrypter":rS}}version(){return this.constructor.version()}canChangeType(){return Vm.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(t){this.playlistController_.setCurrentTime(t)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&E.URL.revokeObjectURL&&(E.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(t,e){return ST({playlist:this.playlistController_.media(),time:t,callback:e})}seekToProgramTime(t,e,s=!0,n=2){return xm({programTime:t,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:s,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:e})}setupXhrHooks_(){this.xhr.onRequest=t=>{Jm(this.xhr,t)},this.xhr.onResponse=t=>{Zm(this.xhr,t)},this.xhr.offRequest=t=>{tg(this.xhr,t)},this.xhr.offResponse=t=>{eg(this.xhr,t)},this.player_.trigger("xhr-hooks-ready")}}const jr={name:"videojs-http-streaming",VERSION:Xm,canHandleSource(i,t={}){const e=nt(D.options,t);return jr.canPlayType(i.type,e)},handleSource(i,t,e={}){const s=nt(D.options,e);return t.vhs=new ig(i,t,s),t.vhs.xhr=Sm(),t.vhs.setupXhrHooks_(),t.vhs.src(i.src,i.type),t.vhs},canPlayType(i,t){const e=kc(i);if(!e)return"";const s=jr.getOverrideNative(t);return!St.supportsTypeNatively(e)||s?"maybe":""},getOverrideNative(i={}){const{vhs:t={}}=i,e=!(D.browser.IS_ANY_SAFARI||D.browser.IS_IOS),{overrideNative:s=e}=t;return s}};hr("avc1.4d400d,mp4a.40.2")&&D.getTech("Html5").registerSourceHandler(jr,0),D.VhsHandler=ig,D.VhsSourceHandler=jr,D.Vhs=St,D.use||D.registerComponent("Vhs",St),D.options.vhs=D.options.vhs||{},D.getPlugin&&D.getPlugin("reloadSourceOnError")||D.registerPlugin("reloadSourceOnError",eS);const mS="application/x-mpegURL";let bt=class extends ll{constructor(){super(),this._defaultConfigs={autoplay:!1,fluid:!1,fullscreen:!1,loop:!1,muted:!1,preload:"auto",responsive:!1,startTime:0},this._prevPlayingState=!1,this.currentMetadata=null,this.element=null,this.sensorModel=null,this.state="not-ready",this.waitingTimestamp=null,this._initController=()=>{!this._controller&&this.playerUrl&&(this.element=document.createElement("video"),D.log.level("error"),this._controller=D(this.element,this._defaultConfigs),this._controller.muted(this.muted),this._controller.loop(this.loop),this._controller.playbackRate(this.rate),this._controller.ready(this._handleReady),this._controller.on("canplay",this._handleCanPlay),this._controller.on("durationchange",this._handleDurationChange),this._controller.on("ended",this._handleEnded),this._controller.on("error",this._handleError),this._controller.on("loadeddata",this._handleDataLoaded),this._controller.on("loadedmetadata",this._handleLoadedMetadata),this._controller.on("loadstart",this._handleLoadStart),this._controller.on("play",this._handlePlay),this._controller.on("timeupdate",this._handleTimeUpdate),this._controller.on("waiting",this._handleWaiting),this._controller.on("xhr-hooks-ready",this._handleXHRhooksReady))},this._handleReady=()=>{this.state="ready"},this._handleCanPlay=()=>{this._prevPlayingState=this.state==="playing",this.state="can-play"},this._handleCueChange=()=>{var n,r,a,l,u,p,g;if(!((r=(n=this.subtitleTrack)==null?void 0:n.activeCues)!=null&&r.length))return;const i=(a=this.subtitleTrack)==null?void 0:a.activeCues[0],t=i.text?JSON.parse(i.text):null;if(!((l=t==null?void 0:t.data)!=null&&l.length))return;const e=((u=t.data[0])==null?void 0:u.value)??[],s=new Map;for(const y of e)Array.isArray(y.value)?y.tagId===90064?s.set(y.tagId,y):y.value.forEach(T=>{s.set(T.tagId,T)}):s.set(y.tagId,y);s.set(q.EsriVideoWidth,{name:"Video Width",tagId:q.EsriVideoWidth,value:(p=this._controller)==null?void 0:p.videoWidth()}),s.set(q.EsriVideoHeight,{name:"Video Height",tagId:q.EsriVideoHeight,value:(g=this._controller)==null?void 0:g.videoHeight()}),this.currentMetadata=new Map(s),this.sensorModel=new ny({videoMetadata:this.currentMetadata})},this._handleDataLoaded=()=>{var i,t;this.state="data-loaded",this._set("videoWidth",(i=this._controller)==null?void 0:i.videoWidth()),this._set("videoHeight",(t=this._controller)==null?void 0:t.videoHeight())},this._handleDurationChange=()=>this.notifyChange("duration"),this._handleEnded=()=>{if(!this.loop)return this._set("ended",!0),this.notifyChange("buffered"),this.notifyChange("currentTime"),this.notifyChange("duration"),this.notifyChange("waiting"),void(this.state="can-play");this.setCurrentTime(0),this.play()},this._handleError=()=>{var i;If.getLogger(this).error("video stream error ::",(i=this._controller)==null?void 0:i.error())},this._handleLoadStart=()=>{this.state="can-play"},this._handleLoadedMetadata=()=>{this.notifyChange("subtitleTrack"),this.notifyChange("buffered")},this._handlePlay=()=>this.notifyChange("ended"),this._handleTimeUpdate=()=>{var i,t;this.notifyChange("currentTime"),this.notifyChange("buffered"),this.notifyChange("bufferedPercent"),this._set("videoWidth",(i=this._controller)==null?void 0:i.videoWidth()),this._set("videoHeight",(t=this._controller)==null?void 0:t.videoHeight())},this._handleWaiting=()=>{var i;this.waitingTimestamp=(i=this._controller)==null?void 0:i.currentTime()},this._handleXHRhooksReady=()=>{var t,e;const i=s=>(s.xhr=new zi,s);(e=(t=this._controller)==null?void 0:t.tech(!0))==null||e.vhs.xhr.onRequest(i)}}initialize(){this.addHandles([_r(()=>this.playerUrl,i=>{var t;i&&(this._initController(),(t=this._controller)==null||t.src({type:mS,src:this.playerUrl}))},rc),_r(()=>this.subtitleTrack,()=>{this.subtitleTrack&&(this.subtitleTrack.mode="showing")})]),this.addHandles(Af(()=>this.subtitleTrack,"cuechange",this._handleCueChange))}destroy(){var i;(i=this._controller)==null||i.dispose()}get buffered(){var i;return((i=this._controller)==null?void 0:i.bufferedEnd())??0}get bufferedPercent(){var i;return((i=this._controller)==null?void 0:i.bufferedPercent())??0}get currentTime(){var i;return((i=this._controller)==null?void 0:i.currentTime())??0}get duration(){var i;return((i=this._controller)==null?void 0:i.duration())??0}get ended(){var i;return((i=this._controller)==null?void 0:i.ended())??this._get("ended")??!0}set ended(i){var t;(t=this._controller)==null||t.ended(i),this._set("ended",i)}get loop(){var i;return((i=this._controller)==null?void 0:i.loop())??this._get("loop")??!1}set loop(i){var t;(t=this._controller)==null||t.loop(i),this._set("loop",i)}get muted(){var i;return((i=this._controller)==null?void 0:i.muted())??this._get("muted")??!1}set muted(i){var t;(t=this._controller)==null||t.muted(i),this._set("muted",i)}get playerUrl(){var i;return((i=this._controller)==null?void 0:i.src())||""}set playerUrl(i){this._set("playerUrl",i)}get playing(){return!this.ended&&(this.state==="can-play"?this._prevPlayingState:this.state==="playing")}get rate(){var i;return((i=this._controller)==null?void 0:i.playbackRate())??this._get("rate")??1}set rate(i){var t;(t=this._controller)==null||t.playbackRate(i),this._set("rate",i)}get started(){var i;return((i=this._controller)==null?void 0:i.hasStarted())||!1}get subtitleTrack(){var t;const i=(t=this._controller)==null?void 0:t.textTracks();return i!=null&&i.length?Array.from(i).find(e=>e.kind==="subtitles"):null}get waiting(){return!this.waitingTimestamp&&(this.waitingTimestamp===this.currentTime||(this.waitingTimestamp=null,!1))}pause(){var i;(i=this._controller)==null||i.pause(),this.state="paused"}play(){var i;(i=this._controller)==null||i.play(),this.state="playing"}reset(){this._controller&&(this.pause(),this.setCurrentTime(0),this._set("ended",!0))}setCurrentTime(i){var e;const t=ac(i,0,this.duration);(e=this._controller)==null||e.currentTime(t),this.notifyChange("currentTime")}};R([B()],bt.prototype,"buffered",null),R([B()],bt.prototype,"bufferedPercent",null),R([B({readOnly:!0})],bt.prototype,"currentTime",null),R([B()],bt.prototype,"currentMetadata",void 0),R([B({readOnly:!0})],bt.prototype,"duration",null),R([B()],bt.prototype,"element",void 0),R([B({readOnly:!0})],bt.prototype,"ended",null),R([B()],bt.prototype,"loop",null),R([B()],bt.prototype,"muted",null),R([B()],bt.prototype,"playerUrl",null),R([B({readOnly:!0})],bt.prototype,"playing",null),R([B()],bt.prototype,"rate",null),R([B()],bt.prototype,"sensorModel",void 0),R([B({readOnly:!0})],bt.prototype,"started",null),R([B()],bt.prototype,"state",void 0),R([B()],bt.prototype,"subtitleTrack",null),R([B({readOnly:!0})],bt.prototype,"videoHeight",void 0),R([B({readOnly:!0})],bt.prototype,"videoWidth",void 0),R([B({readOnly:!0})],bt.prototype,"waiting",null),R([B()],bt.prototype,"waitingTimestamp",void 0),bt=R([Ye("esri.layers.video.VideoController")],bt);const gS=bt;let G=class extends Pf(Df(Lf(Of(Uf)))){constructor(i){super(i),this._trailPoints=[],this.capabilities=null,this.connectionInfo=null,this.controller=new gS,this.copyright=null,this.coverage=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCount=null,this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.playbackInfo=null,this.posterUrl=null,this.protocol="hls",this.qualities=null,this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=rr.WGS84,this.telemetryDisplay=null,this.title=null,this.type="video",this.url=null,this.videoTimeExtent=null}initialize(){this.telemetryDisplay=new oc({frameCenter:!0,frameOutline:!0,lineOfSight:!0,sensorLocation:!0,sensorTrail:!0}),this.addHandles([_r(()=>this.metadata,()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")}),_r(()=>{var i;return(i=this.telemetry)==null?void 0:i.sensorLocation},i=>this._setSensorTrail(i),rc)])}load(i){const t=i!=null?i.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}get buffered(){return this.controller.buffered}readCapabilitiesFromService(i,t){return Nf(t)}readConnectionInfo(i,t){const e=t.connectionUrl;return this.controller.playerUrl=e&&this.protocol?e[this.protocol]:"",e}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return Kf(this.metadata)}get groundControlPoints(){return Xf(this.metadata)}get loop(){return this.controller.loop}set loop(i){this.controller.loop=i}get metadata(){var i;return(i=this.controller)==null?void 0:i.currentMetadata}get muted(){return this.controller.muted}set muted(i){this.controller.muted=i}get playbackRate(){return this.controller.rate}set playbackRate(i){this.controller.rate=i}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get state(){return this.controller.state}get telemetry(){return Gf(this.metadata)}get videoElement(){var i;return(i=this.controller)==null?void 0:i.element}get videoHeight(){var i;return(i=this.controller)==null?void 0:i.videoHeight}get videoWidth(){var i;return(i=this.controller)==null?void 0:i.videoWidth}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(i){if(!this.duration)return;const t=ac(i,0,this.duration);this.controller.setCurrentTime(t)}getCurrentFrame(){}toGround(i,t){var e,s;return(s=(e=this.controller)==null?void 0:e.sensorModel)!=null&&s.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(i,t):null}toVideo(i){var e,s;if(!((s=(e=this.controller)==null?void 0:e.sensorModel)!=null&&s.metadataSupportsTransforms))return null;const t=this.controller.sensorModel.transformGeoToImage(i.x,i.y,i.z);return{x:t[0],y:t[1]}}async _fetchService(i){var u,p;if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const t=Rf((u=this.parsedUrl)==null?void 0:u.path);if(t==null)throw new Gh("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");let e=null;const{data:s,ssl:n}=await Eo(t.url.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:i}),r=s;if(this.url=t.url.path,n&&(this.url=this.url.replace(/^http:/i,"https:")),!(r!=null&&r.currentVersion))return r.currentVersion="11.2",this.sourceJSON=r,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});let a=t==null?void 0:t.sublayer;if(a==null&&((p=r.layers)!=null&&p.length)&&(a=r.layers[0].id),a==null)throw new Gh("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");this.url=`${t.url.path}/${a}`,e=await Eo(this.url,{query:{f:"json",...this.customParameters},signal:i});const l={...r,...e.data};this.sourceJSON=l,this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(i){if(!i)return;const t=Wf(i,this._trailPoints);this._trailPoints=[...t];const e=this._trailPoints.map(n=>n.toArray()),s=new yr({hasZ:i.hasZ,paths:[e]});this.telemetry.sensorTrail=s.clone()}};R([B({readOnly:!0})],G.prototype,"buffered",null),R([B({readOnly:!0,json:{read:!1}})],G.prototype,"capabilities",void 0),R([on("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsUpdate"])],G.prototype,"readCapabilitiesFromService",null),R([B({readOnly:!0})],G.prototype,"connectionInfo",void 0),R([on("connectionInfo",["connectionUrl"])],G.prototype,"readConnectionInfo",null),R([B()],G.prototype,"controller",void 0),R([B({type:String})],G.prototype,"copyright",void 0),R([B({type:yn})],G.prototype,"coverage",void 0),R([B({type:Date})],G.prototype,"created",void 0),R([B({type:Number})],G.prototype,"currentTime",null),R([B({type:String})],G.prototype,"description",void 0),R([B({type:Number})],G.prototype,"duration",null),R([B({readOnly:!0})],G.prototype,"elevationSource",void 0),R([B({type:Boolean})],G.prototype,"ended",null),R([B({type:Hf})],G.prototype,"frame",void 0),R([B({type:Number})],G.prototype,"frameCount",void 0),R([B({type:Xh})],G.prototype,"fullExtent",void 0),R([B({readOnly:!0})],G.prototype,"frameHorizonPoints",null),R([B({readOnly:!0})],G.prototype,"groundControlPoints",null),R([B({type:Xh})],G.prototype,"initialExtent",void 0),R([B({readOnly:!0,json:{read:{source:"id"}}})],G.prototype,"layerId",void 0),R([B({type:Boolean})],G.prototype,"loop",null),R([B({readOnly:!0})],G.prototype,"metadata",null),R([B({type:Boolean})],G.prototype,"muted",null),R([B({type:jf})],G.prototype,"playbackInfo",void 0),R([B({type:Number})],G.prototype,"playbackRate",null),R([B({type:String})],G.prototype,"playerUrl",null),R([B({readOnly:!0})],G.prototype,"playing",null),R([B({readOnly:!0,json:{read:{source:"poster"}}})],G.prototype,"posterUrl",void 0),R([B({type:String})],G.prototype,"protocol",void 0),R([B({readOnly:!0})],G.prototype,"qualities",void 0),R([B({readOnly:!0})],G.prototype,"serviceItemId",void 0),R([B()],G.prototype,"sourceJSON",void 0),R([B()],G.prototype,"sourceQuality",void 0),R([B({readOnly:!0,json:{name:"serviceType"}})],G.prototype,"sourceType",void 0),R([B()],G.prototype,"spatialReference",void 0),R([B({type:String})],G.prototype,"state",null),R([B({type:wo})],G.prototype,"telemetry",null),R([B({type:oc})],G.prototype,"telemetryDisplay",void 0),R([B({readOnly:!1,json:{read:{source:"name"}}})],G.prototype,"title",void 0),R([B({readOnly:!0})],G.prototype,"type",void 0),R([B(Mf)],G.prototype,"url",void 0),R([B({readOnly:!0})],G.prototype,"videoElement",null),R([B({readOnly:!0})],G.prototype,"videoHeight",null),R([B({readOnly:!0,nonNullable:!1,json:{read:{reader:zf,source:"time"}}})],G.prototype,"videoTimeExtent",void 0),R([B({readOnly:!0})],G.prototype,"videoWidth",null),R([B({readOnly:!0})],G.prototype,"waiting",null),G=R([Ye("esri.layers.VideoLayer")],G);const xS=G;export{xS as default}; diff --git a/build/assets/VoxelLayer-UbXb4Bne.js b/build/assets/VoxelLayer-UbXb4Bne.js new file mode 100644 index 0000000..a0b1367 --- /dev/null +++ b/build/assets/VoxelLayer-UbXb4Bne.js @@ -0,0 +1 @@ +import{c1 as Me,at as Ie,fD as Ee,iS as Re,hU as Te,au as ot,av as ie,co as P,gV as $,B as i,D as r,d7 as ce,E as m,F as g,cQ as rt,ey as j,gR as k,a7 as d,fu as de,c5 as le,iT as ae,$ as te,ay as Be,iU as De,V as L,ab as st,c2 as nt,iV as lt,Q as fe,fl as at,gi as pt,c6 as ut,cF as ct,cs as dt,ct as yt,cu as ht,cv as mt,cG as gt,cH as vt,iu as ft,aK as bt,s as be,aZ as Oe,cg as W,el as St,dG as Ce,fd as ke,cx as xt,cy as wt,aS as Ae,es as Vt,hi as jt,cE as $t}from"./index-DKOmzAMm.js";import{L as Nt}from"./SceneService-7YqMMGL5.js";import{a as N}from"./Cyclical-CyXrdUt3.js";import{j as zt}from"./persistable-DLZFVdWR.js";import{I as Se,x as It}from"./quat-BYKy26Om.js";import{e as me}from"./quatf64-Bdb9ZJJK.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./jsonContext-SE-5k22x.js";import"./resourceUtils-CwAv7wd8.js";import"./resourceUtils-Cz4P0EKM.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";import"./resourceExtension-D3awQbhZ.js";import"./mat3f64-q3fE-ZOt.js";const v=ot(),Le=me(),Pe=me(),qe=me(),Ue=ie(0,0,1),Rt=ie(0,1,0),Tt=ie(1,0,0);function J(e){Me(v,e),Ie(v,v);const t=Math.atan2(v[1],v[0]),o=Se(me(),Ue,-t);Ee(v,v,o);const s=-1*Math.atan2(v[2],v[0]);return[Re(t)+270,Re(s)+90]}function ye(e,t){return Se(Pe,Ue,Te(e-270)),Se(qe,Rt,Te(t-90)),It(Le,Pe,qe),Me(v,Tt),Ee(v,v,Le),Ie(v,v),[v[0],v[1],v[2]]}let I=class extends P(g){constructor(t){super(t),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||this.normal.length!==3)return 0;const[t,o]=J(this.normal);return N.normalize($(t),0,!0)}set orientation(t){const o=ye(t,this.tilt);this._set("normal",o),this._set("orientation",t)}get tilt(){if(!Array.isArray(this.normal)||this.normal.length!==3)return 0;const[t,o]=J(this.normal);return N.normalize($(o),0,!0)}set tilt(t){const o=ye(this.orientation,t);this._set("normal",o),this._set("tilt",t)}};i([r({type:Boolean,json:{write:!0}})],I.prototype,"enabled",void 0),i([r({type:String,json:{write:!0}})],I.prototype,"label",void 0),i([r({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),ce(e=>N.normalize($(e),0,!0))],I.prototype,"orientation",null),i([r({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),ce(e=>N.normalize($(e),0,!0))],I.prototype,"tilt",null),i([r({type:[Number],json:{write:!0}})],I.prototype,"normal",void 0),i([r({type:[Number],json:{write:!0}})],I.prototype,"point",void 0),I=i([m("esri.layers.voxel.VoxelSlice")],I);const he=I;let b=class extends P(g){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||this.normal.length!==3)return 0;const[t,o]=J(this.normal);return N.normalize($(t),0,!0)}get tilt(){if(!Array.isArray(this.normal)||this.normal.length!==3)return 0;const[t,o]=J(this.normal);return N.normalize($(o),0,!0)}};i([r({type:Boolean,json:{default:!0,write:!0}})],b.prototype,"enabled",void 0),i([r({type:String,json:{origins:{service:{read:rt}},write:{enabled:!0,isRequired:!0}}}),zt({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],b.prototype,"href",void 0),i([r({type:j,json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"id",void 0),i([r({type:String,json:{write:!0}})],b.prototype,"label",void 0),i([r({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],b.prototype,"orientation",null),i([r({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],b.prototype,"tilt",null),i([r({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"normal",void 0),i([r({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"point",void 0),i([r({type:[j],json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"sizeInPixel",void 0),i([r({type:[he],json:{write:!0}})],b.prototype,"slices",void 0),i([r({type:j,json:{default:0,write:!0}})],b.prototype,"timeId",void 0),i([r({type:j,json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"variableId",void 0),b=i([m("esri.layers.voxel.VoxelSection")],b);const xe=b;let H=class extends g{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};i([r({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),i([r({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=i([m("esri.layers.voxel.VoxelSimpleShading")],H);const We=H;let R=class extends g{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};i([r({type:["discrete","continuous"],json:{write:!0}})],R.prototype,"continuity",void 0),i([r({type:Boolean,json:{write:!0}})],R.prototype,"hasNoData",void 0),i([r({type:Number,json:{write:!0}})],R.prototype,"noData",void 0),i([r({type:Number,json:{write:!0}})],R.prototype,"offset",void 0),i([r({type:Number,json:{write:!0}})],R.prototype,"scale",void 0),i([r({type:String,json:{write:{enabled:!0,isRequired:!0}}})],R.prototype,"type",void 0),R=i([m("esri.layers.voxel.VoxelFormat")],R);const Fe=R;let V=class extends g{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};i([r({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],V.prototype,"id",void 0),i([r({type:String,json:{write:!0}})],V.prototype,"description",void 0),i([r({type:String,json:{write:{enabled:!0,isRequired:!0}}})],V.prototype,"name",void 0),i([r({type:Fe,json:{write:!0}})],V.prototype,"originalFormat",void 0),i([r({type:Fe,json:{write:{enabled:!0,isRequired:!0}}})],V.prototype,"renderingFormat",void 0),i([r({type:String,json:{write:!0}})],V.prototype,"unit",void 0),i([r({type:Number,json:{write:!0}})],V.prototype,"volumeId",void 0),i([r({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],V.prototype,"type",void 0),V=i([m("esri.layers.voxel.VoxelVariable")],V);const Dt=V;let _=class extends P(g){constructor(){super(...arguments),this.color=k.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};i([r({type:k,json:{type:[j],write:{enabled:!0,isRequired:!0}}})],_.prototype,"color",void 0),i([r({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],_.prototype,"value",void 0),i([r({type:Boolean,json:{default:!0,write:!0}})],_.prototype,"enabled",void 0),i([r({type:String,json:{write:!0}})],_.prototype,"label",void 0),i([r({type:Boolean,json:{default:!1,write:!0}})],_.prototype,"colorLocked",void 0),_=i([m("esri.layers.voxel.VoxelIsosurface")],_);const Je=_;let K=class extends P(g){constructor(){super(...arguments),this.color=null,this.position=0}};i([r({type:k,json:{type:[j],write:{enabled:!0,isRequired:!0}}})],K.prototype,"color",void 0),i([r({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"position",void 0),K=i([m("esri.layers.voxel.VoxelColorStop")],K);const we=K;let X=class extends P(g){constructor(){super(...arguments),this.opacity=1,this.position=0}};i([r({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],X.prototype,"opacity",void 0),i([r({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"position",void 0),X=i([m("esri.layers.voxel.VoxelOpacityStop")],X);const Ve=X;let Y=class extends P(g){constructor(){super(...arguments),this.enabled=!1,this.range=null}};i([r({type:Boolean,json:{default:!1,write:!0}})],Y.prototype,"enabled",void 0),i([r({type:[Number],json:{write:!0}})],Y.prototype,"range",void 0),Y=i([m("esri.layers.voxel.VoxelRangeFilter")],Y);const At=Y;var w;(function(e){e[e.Color=1]="Color",e[e.Alpha=2]="Alpha",e[e.Both=3]="Both"})(w||(w={}));let T=class extends P(g){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(d.ofType(we)),this.opacityStops=new(d.ofType(Ve))}set colorStops(e){this._set("colorStops",de(e,this._get("colorStops"),d.ofType(we)))}set opacityStops(e){this._set("opacityStops",de(e,this._get("opacityStops"),d.ofType(Ve)))}getPreviousNext(e,t,o){let s=e;for(;--s>0&&t[s].type!==o&&t[s].type!==w.Both;);let n=e;const l=t.length;for(;++nu.position{c.color[F]=Math.round(ae(q[F],oe[F],h))})}else y!==-1?pe.forEach(h=>{c.color[h]=o[y].color[h]}):pe.forEach(h=>{c.color[h]=o[f].color[h]})}}for(const u of o)t.push({color:u.color,position:u.position})}t[0].position=0,t[t.length-1].position=1;let n=0,l=1;for(let a=0;at[l].position;)n=l++;const c=(u-t[n].position)/(t[l].position-t[n].position),y=t[n].color,f=t[l].color,h=new k;pe.forEach(q=>{h[q]=Math.round(ae(y[q],f[q],c))}),h.a=le(1-ae(y.a,f.a,c)/255,0,1),e.push(h)}return e}getColorForContinuousDataValue(e,t){const o=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||o.length<256)return null;let s=this.stretchRange[0],n=this.stretchRange[1];if(s>n){const a=s;s=n,n=a}e=le(e,s,n);const l=o[Math.round((e-s)/(n-s)*(this._colorMapSize-1))].clone();return t||(l.a=1),l}};i([r({type:["linear","nearest"],json:{write:!0}})],T.prototype,"interpolation",void 0),i([r({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],T.prototype,"stretchRange",void 0),i([r({type:d.ofType(we),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],T.prototype,"colorStops",null),i([r({type:d.ofType(Ve),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],T.prototype,"opacityStops",null),i([r({type:At,json:{write:!0}})],T.prototype,"rangeFilter",void 0),i([r({type:[k],clonable:!1,json:{read:!1}})],T.prototype,"rasterizedTransferFunction",null),T=i([m("esri.layers.voxel.VoxelTransferFunctionStyle")],T);const Lt=T,pe=["r","g","b"];let O=class extends P(g){constructor(){super(...arguments),this.color=k.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};i([r({type:k,json:{type:[j],write:{enabled:!0,isRequired:!0}}})],O.prototype,"color",void 0),i([r({type:j,json:{write:{enabled:!0,isRequired:!0}}})],O.prototype,"value",void 0),i([r({type:Boolean,json:{default:!0,write:!0}})],O.prototype,"enabled",void 0),i([r({type:String,json:{write:!0}})],O.prototype,"label",void 0),O=i([m("esri.layers.voxel.VoxelUniqueValue")],O);const Ge=O;var je;let M=je=class extends g{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(d.ofType(Ge)),this.isosurfaces=new(d.ofType(Je))}clone(){return new je({variableId:this.variableId,label:this.label,transferFunction:te(this.transferFunction),uniqueValues:te(this.uniqueValues),isosurfaces:te(this.isosurfaces)})}};i([r({type:j,json:{write:{enabled:!0,isRequired:!0}}})],M.prototype,"variableId",void 0),i([r({type:String,json:{write:!0}})],M.prototype,"label",void 0),i([r({type:Lt,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],M.prototype,"transferFunction",void 0),i([r({type:d.ofType(Ge),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],M.prototype,"uniqueValues",void 0),i([r({type:d.ofType(Je),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],M.prototype,"isosurfaces",void 0),M=je=i([m("esri.layers.voxel.VoxelVariableStyle")],M);const Ze=M;function _e(e){const t=/^(days?|hours?|minutes?|seconds?|d|h|m|s) since (\d{1,4})-(\d{1,2})-(\d{1,2})[ |T](\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[\s|Z]?(([+|\-|\s?])(\d{1,2}):(\d{1,2}))?$/i.exec(e);if(t==null)return{didParse:!1};const[,o,s,n,l,a,u,c,y,f,h,q,oe]=t;let F="seconds";const ge=o.charAt(0).toLowerCase();ge==="d"?F="days":ge==="h"?F="hours":ge==="m"&&(F="minutes");const G=parseInt(s,10);if(Number.isNaN(G))return{didParse:!1};const z=parseInt(n,10);if(Number.isNaN(z)||z<1||z>12)return{didParse:!1};const E=parseInt(l,10);if(Number.isNaN(E)||E<1||E>31)return{didParse:!1};if(z===2){const Q=G%4==0&&(G%100!=0||G%400==0);if(Q&&E>29||!Q&&E>28)return{didParse:!1}}else if((z===4||z===6||z===9||z===11)&&E>30)return{didParse:!1};const re=parseInt(a,10);if(Number.isNaN(re)||re<0||re>23)return{didParse:!1};const se=parseInt(u,10);if(Number.isNaN(se)||se<0||se>59)return{didParse:!1};const ne=parseInt(c,10);if(Number.isNaN(ne)||ne<0||ne>59)return{didParse:!1};let ve=1,B=0,U=0;if(h&&(ve=h==="-"?-1:1),q){if(B=parseInt(q,10),Number.isNaN(B)||B<0)return{didParse:!1};if(B!==0){const Q=ve*B;if(Q<-12||Q>14)return{didParse:!1}}}if(oe&&(U=parseInt(oe,10),Number.isNaN(U)||U<0||U>59))return{didParse:!1};const Ke=`${G}`.padStart(4,"0"),Xe=`${z}`.padStart(2,"0"),Ye=`${E}`.padStart(2,"0"),et=`${re}`.padStart(2,"0"),tt=`${se}`.padStart(2,"0"),it=`${ne}`.padStart(2,"0");let Z="Z";return B===0&&U===0||(Z=ve>0?"+":"-",Z+=`${B}`.padStart(2,"0"),Z+=":",Z+=`${U}`.padStart(2,"0")),{didParse:!0,unit:F,reference:new Date(`${Ke}-${Xe}-${Ye}T${et}:${tt}:${it}.000${Z}`)}}let ue=class extends g{constructor(){super(...arguments),this.values=null}};i([r({type:[Number],json:{write:!0}})],ue.prototype,"values",void 0),ue=i([m("esri.layers.voxel.VoxelIrregularSpacing")],ue);const Pt=ue;let ee=class extends g{constructor(){super(...arguments),this.scale=1,this.offset=0}};i([r({type:Number,json:{write:!0}})],ee.prototype,"scale",void 0),i([r({type:Number,json:{write:!0}})],ee.prototype,"offset",void 0),ee=i([m("esri.layers.voxel.VoxelRegularSpacing")],ee);const qt=ee;let S=class extends g{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(this.irregularSpacing==null||this.irregularSpacing===void 0)&&this.regularSpacing!==null}getRange(){var e;return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray((e=this.irregularSpacing)==null?void 0:e.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};i([r({type:Pt,json:{write:!0}})],S.prototype,"irregularSpacing",void 0),i([r({type:Boolean,json:{write:!0}})],S.prototype,"isPositiveUp",void 0),i([r({type:Boolean,json:{write:!0}})],S.prototype,"isWrappedDateLine",void 0),i([r({type:String,json:{write:!0}})],S.prototype,"label",void 0),i([r({type:String,json:{write:!0}})],S.prototype,"name",void 0),i([r({type:String,json:{write:!0}})],S.prototype,"quantity",void 0),i([r({type:qt,json:{write:!0}})],S.prototype,"regularSpacing",void 0),i([r({type:Number,json:{write:!0}})],S.prototype,"size",void 0),i([r({type:String,json:{write:!0}})],S.prototype,"unit",void 0),i([r({type:Boolean,json:{read:!1}})],S.prototype,"isRegular",null),S=i([m("esri.layers.voxel.VoxelDimension")],S);const Ft=S;let x=class extends g{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Be.WGS84}get zDimension(){if(!this.dimensions||!Array.isArray(this.dimensions)||this.dimensions.length!==4)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!!this.dimensions&&!!Array.isArray(this.dimensions)&&this.dimensions.length===4&&!(this.dimensions[0].size<1||this.dimensions[1].size<1)&&!(this.zDimension===-1||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||this.volumeType==="xyt")return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),o=this.dimensions[2],s=o.isRegular?o.getRange():[0,o.size];return[e[0],t[0],s[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||this.volumeType==="xyt")return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),o=this.dimensions[2],s=o.isRegular?o.getRange():[0,o.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let l=0;l<3;++l)n[l]<2?n[l]=1:n[l]-=1;return o.isRegular&&!o.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(s[1]-s[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0;let t=this.dimensions[3].size>0;if(t){const o=this.dimensions[3];t=o.quantity==="time",t&&o.unit!==null&&(t=_e(o.unit).didParse)}if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}get timeStops(){var s,n,l;if(this.volumeType!=="xyzt")return[];const e=this.dimensions[3],t=[],o=_e(e.unit);if(o.didParse){if(e.isRegular){const a=((s=e.regularSpacing)==null?void 0:s.offset)??0,u=((n=e.regularSpacing)==null?void 0:n.scale)||1;for(let c=0;c0)for(let a=0;a1){const n=e.z??0,l=o.irregularSpacing.values,a=o.isPositiveUp?1:-1,u=l.reduce((c,y)=>Math.abs(a*y-n)N.normalize($(e),0,!0))],D.prototype,"orientation",null),i([r({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),ce(e=>N.normalize($(e),0,!0))],D.prototype,"tilt",null),i([r({type:[Number],json:{write:!0}})],D.prototype,"normal",void 0),i([r({type:[Number],json:{write:!0}})],D.prototype,"point",void 0),D=i([m("esri.layers.voxel.VoxelDynamicSection")],D);const Ne=D;var ze;let A=ze=class extends g{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(d.ofType(he)),this.dynamicSections=new(d.ofType(Ne))}set slices(e){this._set("slices",de(e,this._get("slices"),d.ofType(he)))}set dynamicSections(e){this._set("dynamicSections",de(e,this._get("dynamicSections"),d.ofType(Ne)))}clone(){return new ze({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:te(this.slices),dynamicSections:te(this.dynamicSections)})}};i([r({type:j,json:{write:{enabled:!0,isRequired:!0}}})],A.prototype,"volumeId",void 0),i([r({type:Number,json:{default:1,write:!0}})],A.prototype,"verticalExaggeration",void 0),i([r({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],A.prototype,"exaggerationMode",void 0),i([r({type:Number,json:{default:0,write:!0}})],A.prototype,"verticalOffset",void 0),i([r({type:d.ofType(he),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],A.prototype,"slices",null),i([r({type:d.ofType(Ne),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],A.prototype,"dynamicSections",null),A=ze=i([m("esri.layers.voxel.VoxelVolumeStyle")],A);const He=A;let p=class extends Nt(ct(dt(yt(ht(mt(gt(vt($t)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new We,this.opacity=1,this.variables=new d,this.volumes=new d,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0,this.volumeStyles=new(d.ofType(He)),this.variableStyles=new(d.ofType(Ze)),this.sections=new(d.ofType(xe))}normalizeCtorArgs(e){return e!=null&&e.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",ft(e,L.getLogger(this)))}load(e){const t=e!=null?e.signal:null,o=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(bt).then(()=>this._fetchService(t)).then(()=>this.serviceRoot=this.url);return this.addResolvingPromise(o),Promise.resolve(this)}read(e,t){super.read(e,t);for(const o of this.volumes)o.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new be("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new be("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new be("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,o){if(e!=null&&typeof e=="object"){const s=Oe.fromJSON(e,o);if(s.zmin===0&&s.zmax===0&&Array.isArray(t.volumes)){const n=Qe.fromJSON(t.volumes[0]);if(n.isValid&&n.volumeType!=="xyt"){const l=n.dimensions[2];if(l.isRegular){let a=l.regularSpacing.offset,u=l.regularSpacing.offset+l.regularSpacing.scale*(l.size-1);if(a>u){const c=a;a=u,u=c}s.zmin=a,s.zmax=u}}}return s}return null}get voxelFields(){const e=[new W({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new W({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new W({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(t!=null){if(t.volumeType==="xyzt"||t.volumeType==="xyt"){const o=new W({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(o);const s=new W({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(s)}if(t.volumeType!=="xyt"){const o=new W({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(o)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,o=this.title;return St({fields:t,title:o},e)}getConfiguration(){var t,o;const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:(t=this.index)==null?void 0:t.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&((o=this.index)!=null&&o.isValid())?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=e??this.currentVariableId,!this.variableStyles||t===-1)return null;const o=this.variableStyles.findIndex(s=>s.variableId===t);return o<0?null:this.variableStyles.at(o)}getVariable(e){let t=-1;if(t=e??this.currentVariableId,!this.variables||t===-1)return null;const o=this.variables.findIndex(s=>s.id===t);return o<0?null:this.variables.at(o)}getVolume(e){const t=this.getVariable(e);return t!=null?this.volumes.find(({id:o})=>o===t.volumeId):null}get timeInfo(){const e=this.getVolume(null);if((e==null?void 0:e.volumeType)!=="xyzt")return null;const t=e.timeStops;if(!(t!=null&&t.length))return null;const o=new Ce({start:t[0],end:t.at(-1)});return new ke({fullTimeExtent:o,stops:t})}getVolumeStyle(e){const t=this.getVariable(e);return t!=null?this.volumeStyles.find(({volumeId:o})=>o===t.volumeId):null}getColorForContinuousDataValue(e,t,o){var a;const s=this.getVariable(e);if(s==null||((a=s.renderingFormat)==null?void 0:a.continuity)!=="continuous"||!this.variableStyles)return null;const n=this.variableStyles.findIndex(u=>u.variableId===e);if(n<0)return null;const l=this.variableStyles.at(n);return l!=null&&l.transferFunction?l.transferFunction.getColorForContinuousDataValue(t,o):null}getSections(){const e=[];for(const t of this.sections)e.push(new xe({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const o=this._getVariable(t);if(o!=null){const s=t.clone();s.isosurfaces.length>4&&(s.isosurfaces=s.isosurfaces.slice(0,3),L.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const n of s.isosurfaces)if(!n.colorLocked){const l=this.getColorForContinuousDataValue(s.variableId,n.value,!1);l===null||l.equals(n.color)||(n.color=l)}if(o.renderingFormat.continuity==="continuous")(s.transferFunction===null||s.transferFunction.colorStops.length<2)&&L.getLogger(this).error(`VoxelVariableStyle for variable ${o.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),s.transferFunction!==null&&(Array.isArray(s.transferFunction.stretchRange)&&s.transferFunction.stretchRange.length===2||(L.getLogger(this).error(`VoxelVariableStyle for variable ${o.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),s.transferFunction.stretchRange=[0,1],s.transferFunction.colorStops.removeAll()));else if(o.renderingFormat.continuity==="discrete")if(t.uniqueValues.length===0)L.getLogger(this).error(`VoxelVariableStyle for variable ${o.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const n of t.uniqueValues)n.label!==null&&n.label!==void 0||n.value===null||n.value===void 0||(n.label=n.value.toString());e.push(s)}else L.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const o=this._getVolumeFromVolumeId(t.volumeId);if(o!=null){const s=t.clone();for(const n of s.slices)this._isPlaneValid(n,[0,1,o.zDimension],o.dimensions)||(n.enabled=!1,n.label="invalid");for(const n of s.dynamicSections)this._isPlaneValid(n,[0,1,o.zDimension],o.dimensions)||(n.enabled=!1,n.label="invalid");e.push(s)}else L.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const o of this.variables)if(o.id===t)return o;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,o){if(!e.point||!Array.isArray(e.point)||e.point.length!==3||!e.normal||!Array.isArray(e.normal)||e.normal.length!==3)return!1;const s=ie(e.normal[0],e.normal[1],e.normal[2]);return Ie(s,s),!(Math.abs(s[0])+Math.abs(s[1])+Math.abs(s[2])<1e-6)&&(e.normal[0]=s[0],e.normal[1]=s[1],e.normal[2]=s[2],!0)}};i([r({type:["Voxel"]})],p.prototype,"operationalLayerType",void 0),i([r(xt)],p.prototype,"legendEnabled",void 0),i([r({json:{write:!0}})],p.prototype,"title",void 0),i([r(wt)],p.prototype,"url",null),i([r({type:d.ofType(xe),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],p.prototype,"sections",void 0),i([r({type:j,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],p.prototype,"currentVariableId",void 0),i([r({type:d.ofType(He),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],p.prototype,"volumeStyles",void 0),i([r({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],p.prototype,"renderMode",void 0),i([r({type:d.ofType(Ze),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],p.prototype,"variableStyles",void 0),i([r({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],p.prototype,"enableSlices",void 0),i([r({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],p.prototype,"enableSections",void 0),i([r({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],p.prototype,"enableDynamicSections",void 0),i([r({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],p.prototype,"enableIsosurfaces",void 0),i([r({type:We,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],p.prototype,"shading",void 0),i([r({type:["show","hide"]})],p.prototype,"listMode",void 0),i([r({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],p.prototype,"opacity",void 0),i([r({type:d.ofType(Dt)})],p.prototype,"variables",void 0),i([r({type:d.ofType(Qe)})],p.prototype,"volumes",void 0),i([r({type:_t})],p.prototype,"index",void 0),i([r({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],p.prototype,"minScale",void 0),i([r({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],p.prototype,"maxScale",void 0),i([r({json:{read:!1},readOnly:!0})],p.prototype,"type",void 0),i([r({readOnly:!0,json:{name:"serviceVersion"}})],p.prototype,"version",void 0),i([Ae("service","version")],p.prototype,"readVersion",null),i([r({type:Oe})],p.prototype,"fullExtent",void 0),i([Ae("service","fullExtent",["fullExtent"])],p.prototype,"readFullExtent",null),i([r({readOnly:!0,clonable:!1,json:{read:!1}})],p.prototype,"voxelFields",null),i([r({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,o){t[o]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],p.prototype,"popupEnabled",void 0),i([r({type:Vt,json:{read:!1}})],p.prototype,"popupTemplate",null),i([r({readOnly:!0})],p.prototype,"defaultPopupTemplate",null),i([r({type:ke,readOnly:!0,json:{read:!1}})],p.prototype,"timeInfo",null),i([r({type:Ce,json:{read:!1}})],p.prototype,"timeExtent",void 0),i([r({type:jt,json:{read:!1}})],p.prototype,"timeOffset",void 0),i([r({type:Boolean,nonNullable:!0,json:{origins:{"web-scene":{name:"timeAnimation",write:!0},service:{read:!1}}}})],p.prototype,"useViewTime",void 0),p=i([m("esri.layers.VoxelLayer")],p);const di=p;export{di as default}; diff --git a/build/assets/WFSLayer-DRIJxC7T.js b/build/assets/WFSLayer-DRIJxC7T.js new file mode 100644 index 0000000..635cf45 --- /dev/null +++ b/build/assets/WFSLayer-DRIJxC7T.js @@ -0,0 +1 @@ +import{B as t,D as i,E as C,aN as U,dz as k,da as J,aZ as T,s as W,ch as f,cm as Y,di as D,M as X,V as H,bI as L,ef as Q,cG as G,eg as V,eh as z,cq as Z,ei as B,cr as M,cu as A,cs as K,ct as ee,cv as te,ay as P,ej as I,ek as re,cg as j,dJ as ie,I as se,el as oe,dK as c,em as ae,cN as ne,d2 as le,en as pe,eo as de,ep as ue,cx as ye,ey as h,fe as ce,er as me,es as he,et as fe,eu as ge,ev as we,cy as ve,ex as Fe,cE as xe}from"./index-DKOmzAMm.js";import{l as be,o as Oe}from"./clientSideDefaults-B7fGShzo.js";import{v as Se,W as Ie,z as Re,Y as Ce,S as Te}from"./wfsUtils-tW6kf0DT.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./geojson-BRJeQduY.js";import"./date-M6n_RqpC.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./xmlUtils-CtUoQO7q.js";let d=class extends U{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=be(!1,!1),this.type="wfs",this.refresh=k(async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:r}=await this._workerHandler.refresh(e);return r&&(this.sourceJSON.extent=r),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}})}load(e){const r=e!=null?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:r})),Promise.resolve(this)}destroy(){var e;(e=this._connection)==null||e.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,r={}){const o=await this.queryFeaturesJSON(e,r);return J.fromJSON(o)}async queryFeaturesJSON(e,r={}){return await this.load(r),this._workerHandler.queryFeatures(e?e.toJSON():void 0,r)}async queryFeatureCount(e,r={}){return await this.load(r),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,r)}async queryObjectIds(e,r={}){return await this.load(r),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,r)}async queryExtent(e,r={}){await this.load(r);const o=await this._workerHandler.queryExtent(e?e.toJSON():void 0,r);return{count:o.count,extent:T.fromJSON(o.extent)}}async querySnapping(e,r={}){return await this.load(r),this._workerHandler.querySnapping(e,r)}async _createLoadOptions(e){var O,S;const{url:r,customParameters:o,name:n,namespaceUri:l,fields:a,geometryType:u,maxRecordCount:y,maxPageCount:g,maxTotalRecordCount:w,swapXY:v}=this.layer,m=this.layer.originOf("spatialReference")==="defaults"?void 0:this.layer.spatialReference;if(!r)throw new W("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await Se(r,{customParameters:o,...e}));const $=["fields","geometryType","name","namespaceUri","swapXY"].some(F=>this.layer[F]==null),p=$?await Ie(this.wfsCapabilities,n,l,{spatialReference:m,customParameters:o,signal:e==null?void 0:e.signal}):{...Re(a??[]),geometryType:u,name:n,namespaceUri:l,spatialReference:m,swapXY:v},q=Ce(this.wfsCapabilities.readFeatureTypes(),p.name,p.namespaceUri),N=f.toJSON(p.geometryType),{operations:b}=this.wfsCapabilities,E=b.GetFeature.url,_=b.GetFeature.outputFormat;return{customParameters:o,featureType:q,fields:((O=p.fields)==null?void 0:O.map(F=>F.toJSON()))??[],geometryField:p.geometryField,geometryType:N,getFeatureUrl:E,getFeatureOutputFormat:_,maxRecordCount:y,maxPageCount:g,maxTotalRecordCount:w,objectIdField:p.objectIdField,spatialReference:(S=p.spatialReference)==null?void 0:S.toJSON(),swapXY:!!p.swapXY}}async _startWorker(e){const[r,o]=await Y([this._createLoadOptions(e),D("WFSSourceWorker",{...e,strategy:X("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),n=r.error||o.error||null,l=o.value||null;if(n)throw l&&l.close(),n;const a=r.value;this._connection=o.value,this._workerHandler=this._connection.createInvokeProxy();const u=await this._workerHandler.load(a,e);for(const y of u.warnings)H.getLogger(this.layer).warn("#load()",`${y.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:y});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:L},extent:u.extent,fields:a.fields,geometryType:a.geometryType,objectIdField:a.objectIdField,geometryField:a.geometryField,drawingInfo:Oe(a.geometryType),name:a.featureType.title,wfsInfo:{name:a.featureType.name,featureUrl:a.getFeatureUrl,maxFeatures:a.maxRecordCount,swapXY:a.swapXY,supportedSpatialReferences:a.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:a.featureType.namespaceUri}}}};t([i()],d.prototype,"capabilities",void 0),t([i({constructOnly:!0})],d.prototype,"layer",void 0),t([i()],d.prototype,"sourceJSON",void 0),t([i()],d.prototype,"type",void 0),t([i()],d.prototype,"wfsCapabilities",void 0),d=t([C("esri.layers.graphics.sources.WFSSource")],d);var x;const R=Fe();let s=x=class extends Q(G(V(z(Z(B(M(A(K(ee(te(xe))))))))))){static fromWFSLayerInfo(e){const{customParameters:r,fields:o,geometryField:n,geometryType:l,name:a,namespaceUri:u,objectIdField:y,spatialReference:g,swapXY:w,url:v,wfsCapabilities:m}=e;return new x({customParameters:r,fields:o,geometryField:n,geometryType:l,name:a,namespaceUri:u,objectIdField:y,spatialReference:g,swapXY:w,url:v,wfsCapabilities:m})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new d({layer:this}),this.spatialReference=P.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){var e;(e=this.source)==null||e.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),I(this.renderer,this.fieldsIndex),re(this.timeInfo,this.fieldsIndex)})),Promise.resolve(this)}get capabilities(){var e;return(e=this.source)==null?void 0:e.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,o){const n=e.filter(l=>l.name!==Te);this.geometryField&&n.unshift(new j({name:this.geometryField,alias:this.geometryField,type:"geometry"})),ie(o,n.map(l=>l.toJSON()),r)}get parsedUrl(){return se(this.url)}set renderer(e){I(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){var e;return(e=this.source)==null?void 0:e.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return oe(this,e)}createQuery(){const e=new c({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:r,timeExtent:o}=this;return e.timeExtent=r!=null&&o!=null?o.offset(-r.value,r.unit):o||null,e}getFieldDomain(e,r){var o;return(o=this.getField(e))==null?void 0:o.domain}getField(e){var r;return(r=this.fieldsIndex)==null?void 0:r.get(e)}queryFeatures(e,r){return this.load().then(()=>this.source.queryFeatures(c.from(e)||this.createQuery(),r)).then(o=>{if(o!=null&&o.features)for(const n of o.features)n.layer=n.sourceLayer=this;return o})}queryObjectIds(e,r){return this.load().then(()=>this.source.queryObjectIds(c.from(e)||this.createQuery(),r))}queryFeatureCount(e,r){return this.load().then(()=>this.source.queryFeatureCount(c.from(e)||this.createQuery(),r))}queryExtent(e,r){return this.load().then(()=>this.source.queryExtent(c.from(e)||this.createQuery(),r))}async hasDataChanged(){try{const{dataChanged:e,updates:r}=await this.source.refresh();return r!=null&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};t([i({readOnly:!0})],s.prototype,"capabilities",null),t([i({type:String})],s.prototype,"copyright",void 0),t([i({readOnly:!0})],s.prototype,"createQueryVersion",null),t([i({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],s.prototype,"customParameters",void 0),t([i(ae("dateFieldsTimeReference"))],s.prototype,"dateFieldsTimeZone",void 0),t([i({readOnly:!0})],s.prototype,"defaultPopupTemplate",null),t([i({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],s.prototype,"definitionExpression",void 0),t([i({type:String})],s.prototype,"displayField",void 0),t([i(ne)],s.prototype,"elevationInfo",void 0),t([i({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"featureUrl",void 0),t([i({type:[j],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],s.prototype,"fields",void 0),t([le("fields")],s.prototype,"writeFields",null),t([i(R.fieldsIndex)],s.prototype,"fieldsIndex",void 0),t([i({type:T,json:{name:"extent"}})],s.prototype,"fullExtent",void 0),t([i()],s.prototype,"geometryField",void 0),t([i({type:String,json:{read:{source:"layerDefinition.geometryType",reader:f.read},write:{target:"layerDefinition.geometryType",writer:f.write,ignoreOrigin:!0},origins:{service:{read:f.read}}}})],s.prototype,"geometryType",void 0),t([i({type:String})],s.prototype,"id",void 0),t([i(pe)],s.prototype,"labelsVisible",void 0),t([i({type:[de],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ue},write:!0}})],s.prototype,"labelingInfo",void 0),t([i(ye)],s.prototype,"legendEnabled",void 0),t([i({type:["show","hide"]})],s.prototype,"listMode",void 0),t([i({type:String})],s.prototype,"objectIdField",void 0),t([i({type:["WFS"]})],s.prototype,"operationalLayerType",void 0),t([i({type:h,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"maxRecordCount",void 0),t([i({type:h})],s.prototype,"maxPageCount",void 0),t([i({type:h})],s.prototype,"maxTotalRecordCount",void 0),t([i({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],s.prototype,"mode",void 0),t([i({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"name",void 0),t([i({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"namespaceUri",void 0),t([i(ce)],s.prototype,"opacity",void 0),t([i(R.outFields)],s.prototype,"outFields",void 0),t([i({readOnly:!0})],s.prototype,"parsedUrl",null),t([i(me)],s.prototype,"popupEnabled",void 0),t([i({type:he,json:{name:"popupInfo",write:!0}})],s.prototype,"popupTemplate",void 0),t([i({types:fe,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:ge,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],s.prototype,"renderer",null),t([i(we)],s.prototype,"screenSizePerspectiveEnabled",void 0),t([i({readOnly:!0})],s.prototype,"source",void 0),t([i({type:P,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],s.prototype,"spatialReference",void 0),t([i({readOnly:!0,type:[h],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"spatialReferences",void 0),t([i({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"swapXY",void 0),t([i({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],s.prototype,"title",void 0),t([i({json:{read:!1},readOnly:!0})],s.prototype,"type",void 0),t([i(ve)],s.prototype,"url",void 0),t([i({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],s.prototype,"version",void 0),t([i()],s.prototype,"wfsCapabilities",null),s=x=t([C("esri.layers.WFSLayer")],s);const ke=s;export{ke as default}; diff --git a/build/assets/WFSSourceWorker-BjXlAna2.js b/build/assets/WFSSourceWorker-BjXlAna2.js new file mode 100644 index 0000000..eefdb28 --- /dev/null +++ b/build/assets/WFSSourceWorker-BjXlAna2.js @@ -0,0 +1 @@ +import{s as g,c7 as p,bE as T,bI as E,bJ as P,V as y,c8 as _,aU as R,ab as q}from"./index-DKOmzAMm.js";import{o as I,r as b}from"./featureConversionUtils-CCATessr.js";import{m as j}from"./FeatureStore-C3siChbH.js";import{x as $,$ as N,j as O}from"./QueryEngine-CI3mggax.js";import{E as Q,N as M}from"./geojson-BRJeQduY.js";import{p as k}from"./sourceUtils-DYgU-2mb.js";import{o as L,e as U,K as f}from"./wfsUtils-tW6kf0DT.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./BoundsStore-BShGRkMU.js";import"./PooledRBush-CdrRkOdh.js";import"./quickselect-D0_cvEX6.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./WhereClause-CILeHwR9.js";import"./TimeOnly-C2MfFEIr.js";import"./json-Wa8cmqdu.js";import"./QueryEngineCapabilities-CTDe3LlQ.js";import"./utils-CqM6vUbj.js";import"./Basemap-drllXW5h.js";import"./loadAll-Cm5pWAv4.js";import"./writeUtils-VdcK5efY.js";import"./utils-C0Bk6fkM.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import"./signal-swyOrDkM.js";import"./date-M6n_RqpC.js";import"./xmlUtils-CtUoQO7q.js";const x="esri.layers.WFSLayer";class ft{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){var t;(t=this._queryEngine)==null||t.destroy(),this._queryEngine=null}async load(t,e={}){const{getFeatureUrl:a,getFeatureOutputFormat:s,fields:i,geometryType:u,featureType:o,maxRecordCount:n,maxTotalRecordCount:m,maxPageCount:C,objectIdField:d,customParameters:F}=t,{spatialReference:l,getFeatureSpatialReference:c}=L(a,o,t.spatialReference);try{await $(c,l)}catch{throw new g("unsupported-projection","Projection not supported",{inSpatialReference:c,outSpatialReference:l})}p(e),this._customParameters=F,this._featureType=o,this._fieldsIndex=T.fromLayerJSON({fields:i,dateFieldsTimeReference:i.some(S=>S.type==="esriFieldTypeDate")?{timeZoneIANA:E}:null}),this._geometryType=u,this._getFeatureUrl=a,this._getFeatureOutputFormat=s,this._getFeatureSpatialReference=c,this._maxRecordCount=n,this._maxTotalRecordCount=m,this._maxPageCount=C,this._objectIdField=d,this._spatialReference=l;let h=await this._snapshotFeatures(e);if(h.errors.length>0&&(this._supportsPagination=!1,h=await this._snapshotFeatures(e),h.errors.length>0))throw h.errors[0];return this._queryEngine=new N({fieldsIndex:this._fieldsIndex,geometryType:u,hasM:!1,hasZ:!1,objectIdField:d,spatialReference:l,timeInfo:null,featureStore:new j({geometryType:u,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(h.features),{warnings:w(h),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new g("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){var e;return this._customParameters=t.customParameters,this._maxRecordCount=t.maxRecordCount,this._maxTotalRecordCount=t.maxTotalRecordCount,this._maxPageCount=t.maxPageCount,(e=this._snapshotTask)==null||e.abort(),this._snapshotTask=P(a=>this._snapshotFeatures({signal:a})),this._snapshotTask.promise.then(a=>{var s;this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(a.features);for(const i of w(a))y.getLogger(x).warn(new _("wfs-layer:refresh-warning",i.message,i.details));(s=a.errors)!=null&&s.length&&y.getLogger(x).warn(new _("wfs-layer:refresh-error","Refresh completed with errors",{errors:a.errors}))},()=>{this._queryEngine.featureStore.clear()}),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(t){const e=t==null?void 0:t.signal,a=this._maxTotalRecordCount,s=this._maxPageCount,i=this._supportsPagination?await U(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:e}):void 0;let u=[];const o=[];if(i==null)try{u=await this._singleQuery(e)}catch(n){R(n)||o.push(n)}else{const n=Math.min(i,a),m=J(this,Math.max(1,Math.min(Math.ceil(n/this._maxRecordCount),s)),e);await Promise.allSettled(Array.from({length:10}).map(()=>Z(m,u,o)))}return p(e),{features:u,totalRecordCount:i,maxTotalRecordCount:a,maxPageCount:s,errors:o}}async _singleQuery(t){const e=await f(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:t});return this._processGeoJSON(e,{signal:t})}async _pageQuery(t,e){const a=t*this._maxRecordCount,s=await f(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:a,count:this._maxRecordCount,signal:e});return this._processGeoJSON(s,{startIndex:a,signal:e})}_processGeoJSON(t,e){Q(t,this._getFeatureSpatialReference.wkid);const{startIndex:a,signal:s}=e;p(s);const i=M(t,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!q(this._spatialReference,this._getFeatureSpatialReference))for(const o of i)o.geometry!=null&&(o.geometry=I(O(b(o.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let u=a??1;for(const o of i){const n={};k(this._fieldsIndex,n,o.attributes,!0),o.attributes=n,n[this._objectIdField]==null&&(o.objectId=n[this._objectIdField]=u++)}return i}}function*J(r,t,e){for(let a=0;ar.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${r.totalRecordCount} features exceeds the maximum allowed of ${r.maxTotalRecordCount}.`,details:{recordCount:r.features.length,totalRecordCount:r.totalRecordCount,maxTotalRecordCount:r.maxTotalRecordCount}})),t}export{ft as default}; diff --git a/build/assets/WMSLayer-PlT1pQfO.js b/build/assets/WMSLayer-PlT1pQfO.js new file mode 100644 index 0000000..9a7c027 --- /dev/null +++ b/build/assets/WMSLayer-PlT1pQfO.js @@ -0,0 +1,2 @@ +import{B as a,D as u,E as Q,bw as Ue,cp as Me,bz as B,bx as z,bA as I,fW as _e,a7 as Y,aZ as P,aS as R,d7 as Te,gJ as je,s as Ce,O as _,ay as F,I as ve,g1 as qe,g4 as Be,a_ as Ve,cq as We,ei as ke,cr as De,cu as Ge,cs as Xe,ct as He,cv as Je,aK as ze,b_ as ae,U as D,gK as Ze,ab as Ke,db as Qe,es as Ye,a8 as et,eB as tt,N as rt,$ as nt,d2 as G,cx as st,ey as it,cy as at,cE as ot,gL as lt}from"./index-DKOmzAMm.js";import{l as ut}from"./CollectionFlattener-BmCRFqHz.js";import{i as oe}from"./scaleUtils-BN5HVCVS.js";import{o as Z}from"./crsUtils-DAndLU68.js";import{t as pt}from"./imageBitmapUtils-kF4U_Pyx.js";const ct={visible:"visibleSublayers"};let S=class extends Ue{constructor(t){super(t),this.scale=0}set layer(t){this._get("layer")!==t&&(this._set("layer",t),this.removeHandles("layer"),t&&this.addHandles([t.sublayers.on("change",()=>this.notifyChange("visibleSublayers")),t.on("wms-sublayer-update",r=>this.notifyChange(ct[r.propertyName]))],"layer"))}get layers(){return this.visibleSublayers.filter(({name:t})=>t).map(({name:t})=>t).join()}get version(){this.commitProperty("layers");const t=this.layer;return t&&t.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:t,scale:r}=this,n=t==null?void 0:t.sublayers,s=[],l=o=>{const{minScale:d,maxScale:i,sublayers:m,visible:p}=o;p&&(r===0||(d===0||r<=d)&&(i===0||r>=i))&&(m?m.forEach(l):s.push(o))};return n==null||n.forEach(l),s}toJSON(){const{layer:t,layers:r}=this,{imageFormat:n,imageTransparency:s,version:l}=t;return{format:n,request:"GetMap",service:"WMS",styles:"",transparent:s?"TRUE":"FALSE",version:l,layers:r}}};a([u()],S.prototype,"layer",null),a([u({readOnly:!0})],S.prototype,"layers",null),a([u({type:Number})],S.prototype,"scale",void 0),a([u({readOnly:!0})],S.prototype,"version",null),a([u({readOnly:!0})],S.prototype,"visibleSublayers",null),S=a([Q("esri.layers.support.ExportWMSImageParameters")],S);var j;let dt=0,h=j=class extends Me(je){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([B(()=>this.sublayers,"after-add",({item:t})=>{t.parent=this,t.layer=this.layer},I),B(()=>this.sublayers,"after-remove",({item:t})=>{t.layer=t.parent=null},I),z(()=>this.sublayers,(t,r)=>{if(r)for(const n of r)n.layer=n.parent=null;if(t)for(const n of t)n.parent=this,n.layer=this.layer},I),z(()=>this.layer,t=>{if(this.sublayers)for(const r of this.sublayers)r.layer=t},I)])}get id(){return this._get("id")??dt++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return _e(Y.ofType(j),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){var t,r,n;const e=new j;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=((t=this.fullExtents)==null?void 0:t.map(s=>s.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=(r=this.sublayers)==null?void 0:r.map(s=>s.clone())),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=(n=this.spatialReferences)==null?void 0:n.map(s=>s)),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};a([u()],h.prototype,"description",void 0),a([u({readOnly:!0})],h.prototype,"dimensions",void 0),a([u({type:P,json:{name:"extent"}})],h.prototype,"fullExtent",void 0),a([u()],h.prototype,"fullExtents",void 0),a([u({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],h.prototype,"id",null),a([u({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],h.prototype,"legendUrl",void 0),a([R("legendUrl",["legendUrl","legendURL"])],h.prototype,"readLegendUrl",null),a([u({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],h.prototype,"legendEnabled",void 0),a([u()],h.prototype,"layer",void 0),a([u()],h.prototype,"maxScale",void 0),a([u()],h.prototype,"minScale",void 0),a([u({readOnly:!0})],h.prototype,"effectiveScaleRange",null),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],h.prototype,"name",void 0),a([u()],h.prototype,"parent",void 0),a([u({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],h.prototype,"popupEnabled",void 0),a([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],h.prototype,"queryable",void 0),a([u()],h.prototype,"sublayers",void 0),a([Te("sublayers")],h.prototype,"castSublayers",null),a([u({type:[Number],json:{read:{source:"spatialReferences"}}})],h.prototype,"spatialReferences",void 0),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],h.prototype,"title",void 0),a([u({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],h.prototype,"visible",null),h=j=a([Q("esri.layers.support.WMSSublayer")],h);const K=h,le={84:4326,83:4269,27:4267};function mt(e){if(!e)return null;const t={idCounter:-1};typeof e=="string"&&(e=new DOMParser().parseFromString(e,"text/xml"));const r=e.documentElement;if(r.nodeName==="ServiceExceptionReport"){const b=Array.prototype.slice.call(r.childNodes).map(A=>A.textContent).join(`\r +`);throw new Ce("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",b)}const n=x("Capability",r),s=x("Service",r),l=n&&x("Request",n);if(!n||!s||!l)return null;const o=x("Layer",n);if(!o)return null;const d=r.nodeName==="WMS_Capabilities"||r.nodeName==="WMT_MS_Capabilities"?r.getAttribute("version"):"1.3.0",i=w("Title",s,"")||w("Name",s,""),m=w("AccessConstraints",s,""),p=/^none$/i.test(m)?"":m,y=w("Abstract",s,""),f=parseInt(w("MaxWidth",s,"5000"),10),v=parseInt(w("MaxHeight",s,"5000"),10),N=pe(l,"GetMap"),E=ue(l,"GetMap"),g=M(o,d,t);if(!g)return null;let ee,V=0;const Ie=Array.prototype.slice.call(n.childNodes),Fe=g.sublayers??[],W=b=>{b!=null&&Fe.push(b)};Ie.forEach(b=>{b.nodeName==="Layer"&&(V===0?ee=b:(V===1&&g.name&&(g.name="",W(M(ee,d,t))),W(M(b,d,t))),V++)});let O=g.sublayers,k=g.extent;const Oe=g.fullExtents??[];if(O||(O=[]),O.length===0&&O.push(g),!k){const b=new P(O[0].extent);g.extent=b.toJSON(),k=g.extent}const $e=g.spatialReferences.length>0?g.spatialReferences:we(g),te=ue(l,"GetFeatureInfo"),Re=te?pe(l,"GetFeatureInfo"):null,re=Se(O),Pe=g.minScale||0,Ae=g.maxScale||0,ne=g.dimensions??[],Le=re.reduce((b,A)=>b.concat(A.dimensions??[]),[]),se=ne.concat(Le).filter(Ee);let ie=null;if(se.length){const b=se.map(A=>{const{extent:L}=A;return ht(L)?L.map(T=>T.getTime()):L==null?void 0:L.map(T=>[T.min.getTime(),T.max.getTime()])}).flat(2).filter(_);ie={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...b),Math.max(...b)]}}return{copyright:p,description:y,dimensions:ne,extent:k,fullExtents:Oe,featureInfoFormats:Re,featureInfoUrl:te,mapUrl:E,maxWidth:f,maxHeight:v,maxScale:Ae,minScale:Pe,layers:re,spatialReferences:$e,supportedImageFormatTypes:N,timeInfo:ie,title:i,version:d}}function yt(e){const t=e.filter(r=>r.popupEnabled&&r.name&&r.queryable);return t.length?t.map(({name:r})=>r).join():null}function we(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const r=we(t);if(r.length>0)return r}return[]}function Se(e){var r;let t=[];for(const n of e)t.push(n),(r=n.sublayers)!=null&&r.length&&(t=t.concat(Se(n.sublayers)),delete n.sublayers);return t}function C(e,t,r){return t.getAttribute(e)??r}function ft(e,t,r,n){const s=x(e,r);return s?C(t,s,n):n}function x(e,t){for(let r=0;rs).filter(_);const n=[];for(const s of r)if(s.getAttribute("name")===t){const l=q("Format",s);for(const{textContent:o}of l)o!=null&&n.push(o)}return n}function ce(e,t,r){const n=x(t,e);if(!n)return r;const{textContent:s}=n;if(s==null||s==="")return r;const l=Number(s);return isNaN(l)?r:l}function M(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:e.getAttribute("queryable")==="1",spatialReferences:[],sublayers:null},s=x("LatLonBoundingBox",e),l=x("EX_GeographicBoundingBox",e);let o=null;s&&(o=U(s,4326)),l&&(o=new P(0,0,0,0,new F({wkid:4326})),o.xmin=parseFloat(w("westBoundLongitude",l,"0")),o.ymin=parseFloat(w("southBoundLatitude",l,"0")),o.xmax=parseFloat(w("eastBoundLongitude",l,"0")),o.ymax=parseFloat(w("northBoundLatitude",l,"0"))),s||l||(o=new P(-180,-90,180,90,new F({wkid:4326}))),n.minScale=ce(e,"MaxScaleDenominator",0),n.maxScale=ce(e,"MinScaleDenominator",0);const d=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach(i=>{var m;if(i.nodeName==="Name")n.name=i.textContent||"";else if(i.nodeName==="Title")n.title=i.textContent||"";else if(i.nodeName==="Abstract")n.description=i.textContent||"";else if(i.nodeName==="BoundingBox"){const p=i.getAttribute(d);if(p&&p.indexOf("EPSG:")===0){const f=parseInt(p.substring(5),10);f===0||isNaN(f)||o||(o=t==="1.3.0"?U(i,f,Z(f)):U(i,f))}const y=p==null?void 0:p.indexOf(":");if(y&&y>-1){let f=parseInt(p.substring(y+1,p.length),10);f===0||isNaN(f)||(f=le[f]??f);const v=t==="1.3.0"?U(i,f,Z(f)):U(i,f);v&&n.fullExtents&&n.fullExtents.push(v)}}else if(i.nodeName===d)(((m=i.textContent)==null?void 0:m.split(" "))??[]).forEach(p=>{const y=p.includes(":")?parseInt(p.split(":")[1],10):parseInt(p,10);if(y!==0&&!isNaN(y)){const f=le[y]??y;n.spatialReferences.includes(f)||n.spatialReferences.push(f)}});else if(i.nodeName!=="Style"||n.legendUrl){if(i.nodeName==="Layer"){const p=M(i,t,r);p&&(p.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(p))}}else{const p=x("LegendURL",i);if(p){const y=x("OnlineResource",p);y&&(n.legendUrl=y.getAttribute("xlink:href"))}}}),n.extent=o==null?void 0:o.toJSON(),n.dimensions=q("Dimension",e).filter(i=>i.getAttribute("name")&&i.getAttribute("units")&&i.textContent).map(i=>{const m=i.getAttribute("name"),p=i.getAttribute("units"),y=i.textContent,f=i.getAttribute("unitSymbol")??void 0,v=i.getAttribute("default")??void 0,N=C("default",i,"0")!=="0",E=C("nearestValue",i,"0")!=="0",g=C("current",i,"0")!=="0";return Ee({name:m,units:p})?{name:"time",units:"ISO8601",extent:ye(y),default:ye(v),multipleValues:N,nearestValue:E,current:g}:gt({name:m,units:p})?{name:"elevation",units:p,extent:de(y),unitSymbol:f,default:de(v),multipleValues:N,nearestValue:E}:{name:m,units:p,extent:me(y),unitSymbol:f,default:me(v),multipleValues:N,nearestValue:E}}),n}function ht(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}function Ne(e){return e.nodeType===Node.ELEMENT_NODE}function gt(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}function Ee(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function bt(e,t){const r=[],n=ve(e);for(const s in n.query)n.query.hasOwnProperty(s)&&(t.includes(s.toLowerCase())||r.push(s+"="+n.query[s]));return n.path+(r.length?"?"+r.join("&"):"")}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map(n=>{const s=n.split("/");return s.length<2?null:{min:parseFloat(s[0]),max:parseFloat(s[1]),resolution:s.length>=3&&s[2]!=="0"?parseFloat(s[2]):void 0}}).filter(_):r.map(n=>parseFloat(n))}function me(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map(n=>{const s=n.split("/");return s.length<2?null:{min:s[0],max:s[1],resolution:s.length>=3&&s[2]!=="0"?s[2]:void 0}}).filter(_):r}function ye(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map(n=>{const s=n.split("/");return s.length<2?null:{min:X(s[0]),max:X(s[1]),resolution:s.length>=3&&s[2]!=="0"?xt(s[2]):void 0}}).filter(_):r.map(n=>X(n))}function X(e){return qe.fromISO(e,{zone:Be.utcInstance}).toJSDate()}function xt(e){const t=/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i,r=e.match(t);return r?{years:$(r[1]),months:$(r[2]),days:$(r[3]),hours:$(r[4]),minutes:$(r[5]),seconds:$(r[6])}:null}function $(e){if(!e)return 0;const t=/(?:\d+(?:\.|,)\d+|\d+)/,r=e.match(t);if(!r)return 0;const n=r[0].replace(",",".");return Number(n)}function H(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const vt="0000-01-01T00:00:00Z",wt="9999-12-31T23:59:59Z";function fe(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${H(t)}`:`${t?H(t):vt}/${r?H(r):wt}`}const he=new Set([102100,3857,102113,900913]),St=new Set([3395,54004]);function Nt(e,t){let r=e.wkid;return t==null?r:(r!=null&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),r!=null&&he.has(r)?t.find(n=>he.has(n))||t.find(n=>St.has(n))||102100:r)}const J=new Ve({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function ge(e){return e==="text/html"}function be(e){return e==="text/plain"}let c=class extends We(ke(De(Ge(Xe(He(Je(ot))))))){constructor(...e){super(...e),this.allSublayers=new ut({getCollections:()=>[this.sublayers],getChildrenFunction:t=>t.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([B(()=>this.sublayers,"after-add",({item:t})=>{t.parent=t.layer=this},I),B(()=>this.sublayers,"after-remove",({item:t})=>{t.layer=t.parent=null},I),z(()=>this.sublayers,(t,r)=>{if(r)for(const n of r)n.layer=n.parent=null;if(t)for(const n of t)n.parent=n.layer=this},I)])}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=e!=null?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(ze).then(()=>this._fetchService(t))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new P({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return this.featureInfoFormats==null?null:this.featureInfoFormats.find(ge)??this.featureInfoFormats.find(be)??null}set featureInfoFormat(e){e==null?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(ge(e)||be(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new F(t.spatialReferences[0])}writeSpatialReferences(e,t){var n;const r=(n=this.spatialReference)==null?void 0:n.wkid;e&&r?(t.spatialReferences=e.filter(s=>s!==r),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return xe(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return xe(t.layers,r)}writeSublayers(e,t,r,n){var o,d;t.layers=[];const s=new Map,l=e.flatten(({sublayers:i})=>i??[]);for(const i of l)if(typeof((o=i.parent)==null?void 0:o.id)=="number"){const m=s.get(i.parent.id);m!=null?m.push(i.id):s.set(i.parent.id,[i.id])}for(const i of l){const m={sublayer:i,...n},p=i.write({parentLayerId:typeof((d=i.parent)==null?void 0:d.id)=="number"?i.parent.id:-1},m);if(s.has(i.id)&&(p.sublayerIds=s.get(i.id)),!i.sublayers&&i.name){const y=i.write({},m);delete y.id,t.layers.push(y)}}t.visibleLayers=l.filter(({visible:i,sublayers:m})=>i&&!m).map(({name:i})=>i).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=ve(e);for(const s in r)/^(request|service)$/i.test(s)&&delete r[s];const n=ae(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const s=(n==null?void 0:n.pixelRatio)??1,l=oe({extent:e,width:t})*s,o=new S({layer:this,scale:l}),{xmin:d,ymin:i,xmax:m,ymax:p,spatialReference:y}=e,f=Nt(y,this.spatialReferences),v=this.version==="1.3.0"&&Z(f)?`${i},${d},${p},${m}`:`${d},${i},${m},${p}`,N=o.toJSON(),E=this.version==="1.3.0"?"crs":"srs";return{bbox:v,[E]:f==null||isNaN(f)?void 0:"EPSG:"+f,...N}}async fetchImage(e,t,r,n){const s=this.mapUrl,l=this.createExportImageParameters(e,t,r,n);if(!l.layers){const i=document.createElement("canvas");return i.width=t,i.height=r,i}const o=fe(n==null?void 0:n.timeExtent),d={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...l,time:o,...this.refreshParameters}),signal:n==null?void 0:n.signal};return D(s??"",d).then(i=>i.data)}async fetchImageBitmap(e,t,r,n){const s=this.mapUrl??"",l=this.createExportImageParameters(e,t,r,n);if(!l.layers){const m=document.createElement("canvas");return m.width=t,m.height=r,m}const o=fe(n==null?void 0:n.timeExtent),d={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...l,time:o,...this.refreshParameters}),signal:n==null?void 0:n.signal},{data:i}=await D(s,d);return pt(i,s,n==null?void 0:n.signal)}fetchFeatureInfo(e,t,r,n,s){const l=oe({extent:e,width:t}),o=new S({layer:this,scale:l}),d=yt(o.visibleSublayers);if(this.featureInfoUrl==null||d==null)return Promise.resolve([]);if(this.fetchFeatureInfoFunction==null&&this.featureInfoFormat==null)return Promise.resolve([]);const i=this.version==="1.3.0"?{I:n,J:s}:{x:n,y:s},m={query_layers:d,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...i},p={...this.createExportImageParameters(e,t,r),...m},y=this._mixCustomParameters(p);return this.fetchFeatureInfoFunction!=null?this.fetchFeatureInfoFunction(y):this._defaultFetchFeatureInfoFunction(ae(this.featureInfoUrl,y))}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}findSublayerByName(e){return this.allSublayers.find(t=>t.name===e)}serviceSupportsSpatialReference(e){return Ze(this.url)||this.spatialReferences!=null&&this.spatialReferences.some(t=>{const r=t===900913?F.WebMercator:new F({wkid:t});return Ke(r,e)})}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=Qe(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new Ye({title:this.title,content:t}),n=new et({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){var t;if(!this.resourceInfo&&((t=this.parsedUrl)!=null&&t.path)){const{path:r,query:n}=this.parsedUrl,{data:s}=await D(r,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...n,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=mt(s)}if(this.parsedUrl){const r=new tt(this.parsedUrl.path),{httpsDomains:n}=rt.request;r.scheme!=="https"||r.port&&r.port!=="443"||!r.host||n.includes(r.host)||n.push(r.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Et(e,t){return e.some(r=>{for(const n in r)if(lt(r,n,null,t))return!0;return!1})}function xe(e,t,r){e=e??[];const n=new Map;e.every(l=>l.id==null)&&(e=nt(e)).forEach((l,o)=>l.id=o);for(const l of e){const o=new K;o.read(l,t),r&&!r.includes(o.name)&&(o.visible=!1),n.set(o.id,o)}const s=[];for(const l of e){const o=l.id!=null?n.get(l.id):null;if(o)if(l.parentLayerId!=null&&l.parentLayerId>=0){const d=n.get(l.parentLayerId);if(!d)continue;d.sublayers||(d.sublayers=new Y),d.sublayers.push(o)}else s.push(o)}return s}a([u({readOnly:!0})],c.prototype,"allSublayers",void 0),a([u({json:{type:Object,write:!0}})],c.prototype,"customParameters",void 0),a([u({json:{type:Object,write:!0}})],c.prototype,"customLayerParameters",void 0),a([u({type:String,json:{write:!0}})],c.prototype,"copyright",void 0),a([u()],c.prototype,"description",void 0),a([u({readOnly:!0})],c.prototype,"dimensions",void 0),a([u({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],c.prototype,"fullExtent",void 0),a([R(["web-document","portal-item"],"fullExtent",["extent"])],c.prototype,"readFullExtentFromItemOrMap",null),a([G(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],c.prototype,"writeFullExtent",null),a([u()],c.prototype,"fullExtents",void 0),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],c.prototype,"featureInfoFormat",null),a([u({type:[String],readOnly:!0})],c.prototype,"featureInfoFormats",void 0),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],c.prototype,"featureInfoUrl",void 0),a([u()],c.prototype,"fetchFeatureInfoFunction",void 0),a([u({type:String,json:{origins:{"web-document":{default:"image/png",type:J.jsonValues,read:{reader:J.read,source:"format"},write:{writer:J.write,target:"format"}}}}})],c.prototype,"imageFormat",void 0),a([R("imageFormat",["supportedImageFormatTypes"])],c.prototype,"readImageFormat",null),a([u({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],c.prototype,"imageMaxHeight",void 0),a([u({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],c.prototype,"imageMaxWidth",void 0),a([u()],c.prototype,"imageTransparency",void 0),a([u(st)],c.prototype,"legendEnabled",void 0),a([u({type:["show","hide","hide-children"]})],c.prototype,"listMode",void 0),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],c.prototype,"mapUrl",void 0),a([u({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],c.prototype,"isReference",void 0),a([u({type:["WMS"]})],c.prototype,"operationalLayerType",void 0),a([u()],c.prototype,"resourceInfo",void 0),a([u({type:F,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],c.prototype,"spatialReference",void 0),a([R(["web-document","portal-item"],"spatialReference",["spatialReferences"])],c.prototype,"readSpatialReferenceFromItemOrDocument",null),a([u({type:[it],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],c.prototype,"spatialReferences",void 0),a([G(["web-document","portal-item"],"spatialReferences")],c.prototype,"writeSpatialReferences",null),a([u({type:Y.ofType(K),json:{write:{target:"layers",overridePolicy(e,t,r){if(Et(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],c.prototype,"sublayers",void 0),a([R(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],c.prototype,"readSublayersFromItemOrMap",null),a([R("service","sublayers",["layers"])],c.prototype,"readSublayers",null),a([G("sublayers",{layers:{type:[K]},visibleLayers:{type:[String]}})],c.prototype,"writeSublayers",null),a([u({json:{read:!1},readOnly:!0,value:"wms"})],c.prototype,"type",void 0),a([u(at)],c.prototype,"url",null),a([u({type:String,json:{write:{ignoreOrigin:!0}}})],c.prototype,"version",void 0),c=a([Q("esri.layers.WMSLayer")],c);const At=c;export{At as default}; diff --git a/build/assets/WMTSLayer-QqTxuCKI.js b/build/assets/WMTSLayer-QqTxuCKI.js new file mode 100644 index 0000000..307cce3 --- /dev/null +++ b/build/assets/WMTSLayer-QqTxuCKI.js @@ -0,0 +1 @@ +import{B as o,D as u,aZ as A,E as N,F as X,aS as R,a7 as G,s as _,Q as ge,h0 as B,h1 as we,O as de,cq as xe,cr as ve,cu as Se,cs as Me,ct as Ie,cv as Te,bx as ie,bA as j,bz as se,aK as le,aR as Le,U as K,$ as ae,I as q,d8 as Ee,d2 as Pe,cE as be}from"./index-DKOmzAMm.js";import{p as Ce,I as Re}from"./WebTileLayer-DDbix1qe.js";import{o as oe}from"./imageBitmapUtils-kF4U_Pyx.js";import{z as Y,p as Oe}from"./TileInfo-Bx6eEWV4.js";import{e as Ae}from"./TileInfoTilemapCache-jg1X3Y95.js";import{o as Z}from"./crsUtils-DAndLU68.js";import{o as ne}from"./xmlUtils-CtUoQO7q.js";var J;let F=J=class extends X{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){var t,r;const e=new J;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=((t=this.fullExtent)==null?void 0:t.clone())??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=((r=this.tileInfo)==null?void 0:r.clone())??null),e}};o([u({type:A,json:{read:{source:"fullExtent"}}})],F.prototype,"fullExtent",void 0),o([u({type:String,json:{read:{source:"id"}}})],F.prototype,"id",void 0),o([u({type:Y,json:{read:{source:"tileInfo"}}})],F.prototype,"tileInfo",void 0),F=J=o([N("esri.layers.support.TileMatrixSet")],F);const Fe=F;var z;let E=z=class extends X{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new z;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};o([u({json:{read:{source:"id"}}})],E.prototype,"id",void 0),o([u({json:{read:{source:"title"}}})],E.prototype,"title",void 0),o([u({json:{read:{source:"abstract"}}})],E.prototype,"description",void 0),o([u({json:{read:{source:"legendUrl"}}})],E.prototype,"legendUrl",void 0),o([u({json:{read:{source:"isDefault"}}})],E.prototype,"isDefault",void 0),o([u({json:{read:{source:"keywords"}}})],E.prototype,"keywords",void 0),E=z=o([N("esri.layers.support.WMTSStyle")],E);const $e=E;var H;let x=H=class extends X{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?A.fromJSON(e):null}readFullExtents(e,t){var r,i;return(r=t.fullExtents)!=null&&r.length?t.fullExtents.map(s=>A.fromJSON(s)):((i=t.tileMatrixSets)==null?void 0:i.map(s=>A.fromJSON(s.fullExtent)).filter(s=>s))??[]}get imageFormat(){var t;let e=this._get("imageFormat");return e||(e=(t=this.imageFormats)!=null&&t.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){var t,r;let e=this._get("styleId");return e||(e=((r=(t=this.styles)==null?void 0:t.at(0))==null?void 0:r.id)??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?this.tileMatrixSets.find(e=>e.id===this.tileMatrixSetId):null}clone(){var t,r,i,s;const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=((t=this.imageFormats)==null?void 0:t.slice())??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=(r=this.fullExtent)==null?void 0:r.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=(i=this.styles)==null?void 0:i.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=(s=this.tileMatrixSets)==null?void 0:s.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};o([u()],x.prototype,"description",void 0),o([u()],x.prototype,"fullExtent",void 0),o([R("fullExtent",["fullExtent"])],x.prototype,"readFullExtent",null),o([u({readOnly:!0})],x.prototype,"fullExtents",void 0),o([R("fullExtents",["fullExtents","tileMatrixSets"])],x.prototype,"readFullExtents",null),o([u()],x.prototype,"id",void 0),o([u()],x.prototype,"imageFormat",null),o([u({json:{read:{source:"formats"}}})],x.prototype,"imageFormats",void 0),o([u()],x.prototype,"layer",void 0),o([u()],x.prototype,"parent",void 0),o([u()],x.prototype,"styleId",null),o([u({type:G.ofType($e),json:{read:{source:"styles"}}})],x.prototype,"styles",void 0),o([u({json:{write:{ignoreOrigin:!0}}})],x.prototype,"title",void 0),o([u()],x.prototype,"tileMatrixSetId",void 0),o([u({readOnly:!0})],x.prototype,"tileMatrixSet",null),o([u({type:G.ofType(Fe),json:{read:{source:"tileMatrixSets"}}})],x.prototype,"tileMatrixSets",void 0),x=H=o([N("esri.layers.support.WMTSSublayer")],x);const U=x,me=90.71428571428571;function ue(e){const t=e.replaceAll(/ows:/gi,"");if(!g("Contents",new DOMParser().parseFromString(t,"text/xml").documentElement))throw new _("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function Ve(e,t){var re;e=e.replaceAll(/ows:/gi,"");const r=new DOMParser().parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,a=g("Contents",r);if(!a)throw new _("wmtslayer:wmts-capabilities-xml-is-not-valid");const l=g("OperationsMetadata",r),n=l==null?void 0:l.querySelector("[name='GetTile']"),c=n==null?void 0:n.getElementsByTagName("Get"),p=c&&Array.prototype.slice.call(c),h=(re=t.url)==null?void 0:re.indexOf("https"),f=h!==void 0&&h>-1;let d,w,S=t.serviceMode,v=t==null?void 0:t.url;if(p!=null&&p.length&&p.some(T=>{const L=g("Constraint",T);return!L||$("AllowedValues","Value",S,L)?(v=T.attributes[0].nodeValue,!0):(!L||$("AllowedValues","Value","RESTful",L)||$("AllowedValues","Value","REST",L)?w=T.attributes[0].nodeValue:L&&!$("AllowedValues","Value","KVP",L)||(d=T.attributes[0].nodeValue),!1)}),!v)if(w)v=w,S="RESTful";else if(d)v=d,S="KVP";else{const T=g("ServiceMetadataURL",r);v=T==null?void 0:T.getAttribute("xlink:href")}const P=v.indexOf("1.0.0/");P===-1&&S==="RESTful"?v+="/":P>-1&&(v=v.substring(0,P)),S==="KVP"&&(v+=P>-1?"":"?"),f&&(v=v.replace(/^http:/i,"https:"));const M=y("ServiceIdentification>ServiceTypeVersion",r),I=y("ServiceIdentification>AccessConstraints",r),b=I&&/^none$/i.test(I)?null:I,k=C("Layer",a),W=C("TileMatrixSet",a),D=k.map(T=>{const L=y("Identifier",T);return i.set(L,T),je(L,T,W,f,M)});return{copyright:b,dimensionMap:s,layerMap:i,layers:D,serviceMode:S,tileUrl:v}}function Ue(e){return e.layers.forEach(t=>{var r;(r=t.tileMatrixSets)==null||r.forEach(i=>{var a;const s=i.tileInfo;s&&s.dpi!==96&&((a=s.lods)==null||a.forEach(l=>{var n;l.scale=96*l.scale/s.dpi,l.resolution=fe((n=s.spatialReference)==null?void 0:n.wkid,l.scale*me/96,i.id)}),s.dpi=96)})}),e}function ee(e){return e.nodeType===Node.ELEMENT_NODE}function g(e,t){for(let r=0;ri.textContent).filter(de)}function y(e,t){return e.split(">").forEach(r=>{t&&(t=g(r,t))}),t&&t.textContent}function $(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some(a=>{if(a.nodeName.includes(e)){const l=g(t,a),n=l==null?void 0:l.textContent;if(n===r||r.split(":")&&r.split(":")[1]===n)return s=a,!0}return!1}),s}function je(e,t,r,i,s){const a=y("Abstract",t),l=O("Format",t);return{id:e,fullExtent:We(t),fullExtents:De(t),description:a,formats:l,styles:Be(t,i),title:y("Title",t),tileMatrixSets:Ke(s,t,r)}}function he(e,t){var h;const r=[],i=(h=e.layerMap)==null?void 0:h.get(t);if(!i)return null;const s=C("ResourceURL",i),a=C("Dimension",i);let l,n,c,p;return a.length&&(l=y("Identifier",a[0]),n=O("Default",a[0])||O("Value",a[0])),a.length>1&&(c=y("Identifier",a[1]),p=O("Default",a[1])||O("Value",a[1])),e.dimensionMap.set(t,{dimensions:n,dimensions2:p}),s.forEach(f=>{let d=f.getAttribute("template");if(f.getAttribute("resourceType")==="tile"){if(l&&n.length)if(d.includes("{"+l+"}"))d=d.replace("{"+l+"}","{dimensionValue}");else{const w=d.toLowerCase().indexOf("{"+l.toLowerCase()+"}");w>-1&&(d=d.substring(0,w)+"{dimensionValue}"+d.substring(w+l.length+2))}if(c&&p.length)if(d.includes("{"+c+"}"))d=d.replace("{"+c+"}","{dimensionValue2}");else{const w=d.toLowerCase().indexOf("{"+c.toLowerCase()+"}");w>-1&&(d=d.substring(0,w)+"{dimensionValue2}"+d.substring(w+c.length+2))}r.push({template:d,format:f.getAttribute("format"),resourceType:"tile"})}}),r}function _e(e,t,r,i,s,a,l,n){var d,w;const c=Ne(e,t,i);if(!((c==null?void 0:c.length)>0))return"";const{dimensionMap:p}=e,h=(d=p.get(t).dimensions)==null?void 0:d[0],f=(w=p.get(t).dimensions2)==null?void 0:w[0];return c[l%c.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,a).replaceAll(/\{TileRow\}/gi,""+l).replaceAll(/\{TileCol\}/gi,""+n).replaceAll(/\{dimensionValue\}/gi,h).replaceAll(/\{dimensionValue2\}/gi,f)}function Ne(e,t,r){const i=he(e,t),s=i==null?void 0:i.filter(a=>a.format===r);return(s!=null&&s.length?s:i)??[]}function ke(e,t,r,i){var n,c;const{dimensionMap:s}=e,a=he(e,t);let l="";if(a&&a.length>0){const p=(n=s.get(t).dimensions)==null?void 0:n[0],h=(c=s.get(t).dimensions2)==null?void 0:c[0];l=a[0].template,l.endsWith(".xxx")&&(l=l.slice(0,-4)),l=l.replaceAll(/\{Style\}/gi,i),l=l.replaceAll(/\{TileMatrixSet\}/gi,r),l=l.replaceAll(/\{TileMatrix\}/gi,"{level}"),l=l.replaceAll(/\{TileRow\}/gi,"{row}"),l=l.replaceAll(/\{TileCol\}/gi,"{col}"),l=l.replaceAll(/\{dimensionValue\}/gi,p),l=l.replaceAll(/\{dimensionValue2\}/gi,h)}return l}function We(e){const t=g("WGS84BoundingBox",e),r=t?y("LowerCorner",t).split(" "):["-180","-90"],i=t?y("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function De(e){const t=[];return ne(e,{BoundingBox:r=>{if(!r.getAttribute("crs"))return;const i=r.getAttribute("crs").toLowerCase(),s=te(i),a=i.includes("epsg")&&Z(s.wkid);let l,n,c,p;ne(r,{LowerCorner:h=>{[l,n]=h.textContent.split(" ").map(f=>Number.parseFloat(f)),a&&([l,n]=[n,l])},UpperCorner:h=>{[c,p]=h.textContent.split(" ").map(f=>Number.parseFloat(f)),a&&([c,p]=[p,c])}}),t.push({xmin:l,ymin:n,xmax:c,ymax:p,spatialReference:s})}}),t}function Be(e,t){return C("Style",e).map(r=>{const i=g("LegendURL",r),s=g("Keywords",r),a=s?O("Keyword",s):[];let l=i==null?void 0:i.getAttribute("xlink:href");return t&&(l=l==null?void 0:l.replace(/^http:/i,"https:")),{abstract:y("Abstract",r),id:y("Identifier",r),isDefault:r.getAttribute("isDefault")==="true",keywords:a,legendUrl:l,title:y("Title",r)}})}function Ke(e,t,r){return C("TileMatrixSetLink",t).map(i=>qe(e,i,r))}function qe(e,t,r){const i=g("TileMatrixSet",t).textContent,s=O("TileMatrix",t),a=r.find(M=>{const I=g("Identifier",M),b=I==null?void 0:I.textContent;return!!(b===i||i.split(":")&&i.split(":")[1]===b)}),l=g("TileMatrixSetLimits",t),n=l&&C("TileMatrixLimits",l),c=new Map;if(n!=null&&n.length)for(const M of n){const I=g("TileMatrix",M).textContent,b=+g("MinTileRow",M).textContent,k=+g("MaxTileRow",M).textContent,W=+g("MinTileCol",M).textContent,D=+g("MaxTileCol",M).textContent;c.set(I,{minCol:W,maxCol:D,minRow:b,maxRow:k})}const p=y("SupportedCRS",a).toLowerCase(),h=Ge(a,p),f=h.spatialReference,d=g("TileMatrix",a),w=[parseInt(y("TileWidth",d),10),parseInt(y("TileHeight",d),10)],S=[];s.length?s.forEach((M,I)=>{const b=$("TileMatrix","Identifier",M,a);S.push(ce(b,p,I,i,c))}):C("TileMatrix",a).forEach((M,I)=>{S.push(ce(M,p,I,i,c))});const v=Je(e,a,h,w,S[0]).toJSON(),P=new Y({dpi:96,spatialReference:f,size:w,origin:h,lods:S}).toJSON();return{id:i,fullExtent:v,tileInfo:P}}function te(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);t!==900913&&t!==3857||(t=102100);const r=He(e);return r!=null&&(t=r),{wkid:t}}function Ge(e,t){return ye(g("TileMatrix",e),t)}function ye(e,t){const r=te(t),[i,s]=y("TopLeftCorner",e).split(" ").map(l=>parseFloat(l)),a=t.includes("epsg")&&Z(r.wkid);return new ge(a?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}function Je(e,t,r,i,s){const a=g("BoundingBox",t);let l,n,c,p,h,f;if(a&&(l=y("LowerCorner",a).split(" "),n=y("UpperCorner",a).split(" ")),l&&l.length>1&&n&&n.length>1)c=parseFloat(l[0]),h=parseFloat(l[1]),p=parseFloat(n[0]),f=parseFloat(n[1]);else{const d=g("TileMatrix",t),w=parseInt(y("MatrixWidth",d),10),S=parseInt(y("MatrixHeight",d),10);c=r.x,f=r.y,p=c+w*i[0]*s.resolution,h=f-S*i[1]*s.resolution}return ze(e,r.spatialReference,r)?new A(h,c,f,p,r.spatialReference):new A(c,h,p,f,r.spatialReference)}function ze(e,t,r){return e==="1.0.0"&&Z(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}var V;function He(e){return e.includes("crs84")||e.includes("crs:84")?V.CRS84:e.includes("crs83")||e.includes("crs:83")?V.CRS83:e.includes("crs27")||e.includes("crs:27")?V.CRS27:null}function ce(e,t,r,i,s){const a=te(t),l=y("Identifier",e);let n=parseFloat(y("ScaleDenominator",e));const c=fe(a.wkid,n,i);n*=96/me;const p=+y("MatrixWidth",e),h=+y("MatrixHeight",e),{maxCol:f=p-1,maxRow:d=h-1,minCol:w=0,minRow:S=0}=s.get(l)??{},{x:v,y:P}=ye(e,t);return new Oe({cols:[w,f],level:r,levelValue:l,origin:[v,P],scale:n,resolution:c,rows:[S,d]})}function fe(e,t,r){let i;return i=B.hasOwnProperty(""+e)?B.values[B[e]]:r==="default028mm"?6370997*Math.PI/180:we(e).metersPerDegree,7*t/25e3/i}(function(e){e[e.CRS84=4326]="CRS84",e[e.CRS83=4269]="CRS83",e[e.CRS27=4267]="CRS27"})(V||(V={}));var Q;const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},Qe=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let m=Q=class extends xe(ve(Se(Me(Ie(Te(be)))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([ie(()=>this.activeLayer,(t,r)=>{var i;r&&!((i=this.sublayers)!=null&&i.includes(r))&&(r.layer=null,r.parent=null),t&&(t.layer=this,t.parent=this)},j),se(()=>this.sublayers,"after-add",({item:t})=>{t.layer=this,t.parent=this},j),se(()=>this.sublayers,"after-remove",({item:t})=>{t.layer=null,t.parent=null},j),ie(()=>this.sublayers,(t,r)=>{if(r)for(const i of r)i.layer=null,i.parent=null;if(t)for(const i of t)i.layer=this,i.parent=this},j)])}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(le).then(()=>this._fetchService(e)).catch(t=>{throw le(t),new _("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:t})})),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new U);let i=t.layers.find(s=>s.id===this.activeLayer.id);return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,a=i==null?void 0:i.layerIdentifier;let l=null;const n=i==null?void 0:i.tileMatrixSet;n&&(Array.isArray(n)?n.length&&(l=n[0]):l=n);const c=s==null?void 0:s.format,p=s==null?void 0:s.style;return new U({id:a,imageFormat:c,styleId:p,tileMatrixSetId:l})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const a=Le("tileMatrixSet.tileInfo",s);t.tileInfo=a?a.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return Xe(t.layers,r)}get supportedSpatialReferences(){var e;return((e=this.activeLayer.tileMatrixSets)==null?void 0:e.map(t=>{var r;return(r=t.tileInfo)==null?void 0:r.spatialReference}).toArray().filter(de))??[]}get tilemapCache(){var t,r;const e=(r=(t=this.activeLayer)==null?void 0:t.tileMatrixSet)==null?void 0:r.tileInfo;return e?new Ae(e):void 0}get title(){var e;return((e=this.activeLayer)==null?void 0:e.title)??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.substr(-1)==="/"?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId),i=r==null?void 0:r.tileInfo,s=e.fullExtent,a=new Ce({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(a.customLayerParameters=this.customLayerParameters),this.customParameters&&(a.customParameters=this.customParameters),new Re({fullExtent:s,urlTemplate:t,tileInfo:i,wmtsInfo:a})}async fetchTile(e,t,r,i={}){const{signal:s}=i,a=this.getTileUrl(e,t,r),{data:l}=await K(a,{responseType:"image",signal:s});return l}async fetchImageBitmapTile(e,t,r,i={}){const{signal:s}=i;if(this.fetchTile!==Q.prototype.fetchTile){const n=await this.fetchTile(e,t,r,i);return oe(n,e,t,r,s)}const a=this.getTileUrl(e,t,r),{data:l}=await K(a,{responseType:"blob",signal:s});return oe(l,e,t,r,s)}findSublayerById(e){var t;return(t=this.sublayers)==null?void 0:t.find(r=>r.id===e)}getTileUrl(e,t,r){var n;const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=(n=i==null?void 0:i.tileInfo)==null?void 0:n.lods[e],a=s?s.levelValue||`${s.level}`:`${e}`;let l=this.resourceInfo?"":_e({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,a,t,r);return l||(l=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,a).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`)),l=this._appendCustomLayerParameters(l),l}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const s=ke({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(s)return s}if(this.serviceMode==="KVP")return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if(this.serviceMode==="RESTful"){let s="";return pe[r.toLowerCase()]&&(s=pe[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)this.resourceInfo.serviceMode==="KVP"&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),ue(t.data)}catch{const r=this.serviceMode==="KVP"?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),ue(t.data),this.serviceMode=r}catch(i){throw new _("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:i})}}this.resourceInfo?t.data=Ue(t.data):t.data=Ve(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await K(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){var i;const t=this.findSublayerById(this.activeLayer.id);return(i=t==null?void 0:t.tileMatrixSets)==null?void 0:i.find(s=>s.id===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...ae(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=q(e),i={...r.query,...t},s=Ee(i);return s===""?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=q(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{const r=`/${this.version}/WMTSCapabilities.xml`,i=new RegExp(r,"i");t=t.replace(i,""),t+=r;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=q(e).query;if(!t)return null;const r={};return Object.keys(t).forEach(i=>{r[i.toLowerCase()]=t[i]}),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const i=Object.keys(r);i.length&&(e=e?ae(e):{},i.forEach(s=>{e.hasOwnProperty(s)||Qe.has(s)||(e[s]=r[s])}))}return e}};function Xe(e,t){return e.map(r=>{const i=new U;return i.read(r,t),i})}o([u()],m.prototype,"dimensionMap",void 0),o([u()],m.prototype,"layerMap",void 0),o([u({type:U,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],m.prototype,"activeLayer",void 0),o([R("service","activeLayer",["layers"])],m.prototype,"readActiveLayerFromService",null),o([R(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],m.prototype,"readActiveLayerFromItemOrWebDoc",null),o([Pe(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:Y},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],m.prototype,"writeActiveLayer",null),o([u({type:String,value:"",json:{write:!0}})],m.prototype,"copyright",void 0),o([u({type:["show","hide"]})],m.prototype,"listMode",void 0),o([u({json:{read:!0,write:!0}})],m.prototype,"blendMode",void 0),o([u({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],m.prototype,"customParameters",void 0),o([R(["portal-item","web-document"],"customParameters")],m.prototype,"readCustomParameters",null),o([u({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],m.prototype,"customLayerParameters",void 0),o([u({type:A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],m.prototype,"fullExtent",void 0),o([u({readOnly:!0})],m.prototype,"fullExtents",null),o([u({type:["WebTiledLayer"]})],m.prototype,"operationalLayerType",void 0),o([u()],m.prototype,"resourceInfo",void 0),o([u()],m.prototype,"serviceMode",void 0),o([R(["portal-item","web-document"],"serviceMode",["templateUrl"])],m.prototype,"readServiceMode",null),o([u({type:G.ofType(U)})],m.prototype,"sublayers",void 0),o([R("service","sublayers",["layers"])],m.prototype,"readSublayersFromService",null),o([u({readOnly:!0})],m.prototype,"supportedSpatialReferences",null),o([u({readOnly:!0})],m.prototype,"tilemapCache",null),o([u({json:{read:{source:"title"}}})],m.prototype,"title",null),o([u({json:{read:!1},readOnly:!0,value:"wmts"})],m.prototype,"type",void 0),o([u({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],m.prototype,"url",null),o([u()],m.prototype,"version",void 0),m=Q=o([N("esri.layers.WMTSLayer")],m);const lt=m;export{lt as default}; diff --git a/build/assets/WebTileLayer-DDbix1qe.js b/build/assets/WebTileLayer-DDbix1qe.js new file mode 100644 index 0000000..66da9c8 --- /dev/null +++ b/build/assets/WebTileLayer-DDbix1qe.js @@ -0,0 +1 @@ +import{B as l,D as i,E as T,F as P,$ as v,cq as x,cr as I,cu as U,cs as M,ct as W,cv as D,aZ as S,ay as y,Q as E,eB as m,s as L,eC as $,eD as O,eE as z,U as w,eF as q,aS as g,d2 as A,cE as _}from"./index-DKOmzAMm.js";import{o as b}from"./imageBitmapUtils-kF4U_Pyx.js";import{z as j,p as s}from"./TileInfo-Bx6eEWV4.js";var d;let c=d=class extends P{constructor(e){super(e)}clone(){return new d({customLayerParameters:v(this.customLayerParameters),customParameters:v(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};l([i({json:{type:Object,write:!0}})],c.prototype,"customLayerParameters",void 0),l([i({json:{type:Object,write:!0}})],c.prototype,"customParameters",void 0),l([i({type:String,json:{write:!0}})],c.prototype,"layerIdentifier",void 0),l([i({type:String,json:{write:!0}})],c.prototype,"tileMatrixSet",void 0),l([i({type:String,json:{write:!0}})],c.prototype,"url",void 0),c=d=l([T("esri.layers.support.WMTSLayerInfo")],c);var f;let o=f=class extends x(I(U(M(W(D(_)))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new S(-20037508342787e-6,-2003750834278e-5,2003750834278e-5,20037508342787e-6,y.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=y.WebMercator,this.subDomains=null,this.tileInfo=new j({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new E({x:-20037508342787e-6,y:20037508342787e-6,spatialReference:y.WebMercator}),spatialReference:y.WebMercator,lods:[new s({level:0,scale:591657527591555e-6,resolution:156543.033928}),new s({level:1,scale:295828763795777e-6,resolution:78271.5169639999}),new s({level:2,scale:147914381897889e-6,resolution:39135.7584820001}),new s({level:3,scale:73957190948944e-6,resolution:19567.8792409999}),new s({level:4,scale:36978595474472e-6,resolution:9783.93962049996}),new s({level:5,scale:18489297737236e-6,resolution:4891.96981024998}),new s({level:6,scale:9244648868618e-6,resolution:2445.98490512499}),new s({level:7,scale:4622324434309e-6,resolution:1222.99245256249}),new s({level:8,scale:2311162217155e-6,resolution:611.49622628138}),new s({level:9,scale:1155581108577e-6,resolution:305.748113140558}),new s({level:10,scale:577790.554289,resolution:152.874056570411}),new s({level:11,scale:288895.277144,resolution:76.4370282850732}),new s({level:12,scale:144447.638572,resolution:38.2185141425366}),new s({level:13,scale:72223.819286,resolution:19.1092570712683}),new s({level:14,scale:36111.909643,resolution:9.55462853563415}),new s({level:15,scale:18055.954822,resolution:4.77731426794937}),new s({level:16,scale:9027.977411,resolution:2.38865713397468}),new s({level:17,scale:4513.988705,resolution:1.19432856685505}),new s({level:18,scale:2256.994353,resolution:.597164283559817}),new s({level:19,scale:1128.497176,resolution:.298582141647617}),new s({level:20,scale:564.248588,resolution:.14929107082380833}),new s({level:21,scale:282.124294,resolution:.07464553541190416}),new s({level:22,scale:141.062147,resolution:.03732276770595208}),new s({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return typeof e=="string"?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then(()=>{var a;let r="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const n=new m(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&((a=n.authority)!=null&&a.includes("{subDomain}"))&&(r="is missing 'subDomains' property")}else r="spatialReference must match tileInfo.spatialReference";else r="is missing the required 'urlTemplate' property value";if(r)throw new L("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${r}`)});return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}readSpatialReference(e,t){var r;return e||y.fromJSON((r=t.fullExtent)==null?void 0:r.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,a=new m(t),n=a.scheme?a.scheme+"://":"//",u=n+a.authority+"/",p=a.authority;if(p!=null&&p.includes("{subDomain}")){if(r&&r.length>0&&p.split(".").length>1)for(const h of r)e.push(n+p.replaceAll(/\{subDomain\}/gi,h)+"/")}else e.push(u);return e.map($)}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new m(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.substring(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){O(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=z(e)),t.templateUrl=e}fetchTile(e,t,r,a={}){const{signal:n}=a,u=this.getTileUrl(e,t,r),p={responseType:"image",signal:n,query:{...this.refreshParameters}};return w(u,p).then(h=>h.data)}async fetchImageBitmapTile(e,t,r,a={}){const{signal:n}=a;if(this.fetchTile!==f.prototype.fetchTile){const R=await this.fetchTile(e,t,r,a);return b(R,e,t,r,n)}const u=this.getTileUrl(e,t,r),p={responseType:"blob",signal:n,query:{...this.refreshParameters}},{data:h}=await w(u,p);return b(h,e,t,r,n)}getTileUrl(e,t,r){const{levelValues:a,tileServers:n,urlPath:u}=this;if(!a||!n||!u)return"";const p=a[e];return n[t%n.length]+q(u,{level:p,z:p,col:r,x:r,row:t,y:t})}};l([i({type:String,value:"",json:{write:!0}})],o.prototype,"copyright",void 0),l([i({type:S,json:{write:!0},nonNullable:!0})],o.prototype,"fullExtent",void 0),l([i({readOnly:!0,json:{read:!1,write:!1}})],o.prototype,"legendEnabled",void 0),l([i({type:["show","hide"]})],o.prototype,"listMode",void 0),l([i({json:{read:!0,write:!0}})],o.prototype,"blendMode",void 0),l([i()],o.prototype,"levelValues",null),l([i({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],o.prototype,"isReference",void 0),l([i({type:["WebTiledLayer"],value:"WebTiledLayer"})],o.prototype,"operationalLayerType",void 0),l([i({readOnly:!0,json:{read:!1,write:!1}})],o.prototype,"popupEnabled",void 0),l([i({type:y})],o.prototype,"spatialReference",void 0),l([g("spatialReference",["spatialReference","fullExtent.spatialReference"])],o.prototype,"readSpatialReference",null),l([i({type:[String],json:{write:!0}})],o.prototype,"subDomains",void 0),l([i({type:j,json:{write:!0}})],o.prototype,"tileInfo",void 0),l([i({readOnly:!0})],o.prototype,"tileServers",null),l([i({json:{read:!1}})],o.prototype,"type",void 0),l([i()],o.prototype,"urlPath",null),l([i({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],o.prototype,"urlTemplate",void 0),l([g("urlTemplate",["urlTemplate","templateUrl"])],o.prototype,"readUrlTemplate",null),l([A("urlTemplate",{templateUrl:{type:String}})],o.prototype,"writeUrlTemplate",null),l([i({type:c,json:{write:!0}})],o.prototype,"wmtsInfo",void 0),o=f=l([T("esri.layers.WebTileLayer")],o);const B=o,N=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"}));export{B as I,N as W,c as p}; diff --git a/build/assets/WhereClause-CILeHwR9.js b/build/assets/WhereClause-CILeHwR9.js new file mode 100644 index 0000000..6d9866f --- /dev/null +++ b/build/assets/WhereClause-CILeHwR9.js @@ -0,0 +1,7 @@ +import{b as j,n as Q,m as Ls}from"./TimeOnly-C2MfFEIr.js";import{eF as ln,g1 as _,g3 as _s,g2 as jt,hB as Yt,hC as ct,K as Rs,M as tn,g4 as Us}from"./index-DKOmzAMm.js";var d;(function(i){i.InvalidFunctionParameters="InvalidFunctionParameters",i.InvalidValueForAggregateFunction="InvalidValueForAggregateFunction",i.UnsupportedSqlFunction="UnsupportedSqlFunction",i.UnsupportedOperator="UnsupportedOperator",i.UnsupportedSyntax="UnsupportedSyntax",i.UnsupportedIsRhs="UnsupportedIsRhs",i.UnsupportedIsLhs="UnsupportedIsLhs",i.InvalidDataType="InvalidDataType",i.CannotCastValue="CannotCastValue",i.FunctionNotRecognized="FunctionNotRecognized",i.InvalidTime="InvalidTime",i.InvalidParameterCount="InvalidParameterCount",i.InvalidTimeStamp="InvalidTimeStamp",i.InvalidDate="InvalidDate",i.InvalidOperator="InvalidOperator",i.IllegalInterval="IllegalInterval",i.YearMonthIntervals="YearMonthIntervals",i.PrimarySecondaryQualifiers="PrimarySecondaryQualifiers",i.MissingStatisticParameters="MissingStatisticParameters"})(d||(d={}));const Vs={[d.InvalidValueForAggregateFunction]:"Invalid value used in aggregate function",[d.MissingStatisticParameters]:"Statistic does not have 1 or 0 Parameters",[d.InvalidFunctionParameters]:"Invalid parameters for call to {function}",[d.UnsupportedIsLhs]:"Unsupported left hand expression in is statement",[d.UnsupportedIsRhs]:"Unsupported right hand expression in is statement",[d.UnsupportedOperator]:"Unsupported operator - {operator}",[d.UnsupportedSyntax]:"Unsupported syntax - {node}",[d.UnsupportedSqlFunction]:"Sql function not found = {function}",[d.InvalidDataType]:"Invalid sql data type",[d.InvalidDate]:"Invalid date encountered",[d.InvalidOperator]:"Invalid operator encountered",[d.InvalidTime]:"Invalid time encountered",[d.IllegalInterval]:"Illegal interval",[d.FunctionNotRecognized]:"Function not recognized",[d.InvalidTimeStamp]:"Invalid timestamp encountered",[d.InvalidParameterCount]:"Invalid parameter count for call to {name}",[d.PrimarySecondaryQualifiers]:"Primary and Secondary SqlInterval qualifiers not supported",[d.YearMonthIntervals]:"Year-Month Intervals not supported",[d.CannotCastValue]:"Cannot cast value to the required data type"};let v=class cn extends Error{constructor(r,u){super(ln(Vs[r],u)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,cn)}};var W;(function(i){i.NeverReach="NeverReach",i.NotImplemented="NotImplemented",i.Cancelled="Cancelled",i.InvalidStatResponse="InvalidStatResponse",i.InvalidRequest="InvalidRequest",i.RequestFailed="RequestFailed",i.MissingFeatures="MissingFeatures",i.AggregationFieldNotFound="AggregationFieldNotFound",i.DataElementsNotFound="DataElementsNotFound"})(W||(W={}));const Js={[W.Cancelled]:"Cancelled",[W.InvalidStatResponse]:"Invalid statistics response from service",[W.InvalidRequest]:"Invalid request",[W.RequestFailed]:"Request failed - {reason}",[W.MissingFeatures]:"Missing features",[W.AggregationFieldNotFound]:"Aggregation field not found",[W.DataElementsNotFound]:"Data elements not found on service",[W.NeverReach]:"Encountered unreachable logic",[W.NotImplemented]:"Not implemented"};let hc=class fn extends Error{constructor(r,u){super(ln(Js[r],u)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,fn)}};function en(i){return Number.isNaN(i)||i===0?i:Math.trunc(i)}class Z{constructor(r){this._timeStampOffset=r,this._date=null}toDateTime(){return this._date??(this._date=_.fromISO(this._timeStampOffset,{setZone:!0})),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return en(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return en(this.toDateTime().offset%60)}toMilliseconds(){return this.toDateTime().toMillis()}get hour(){return this.toDateTime().hour}get minute(){return this.toDateTime().minute}get second(){return this.toDateTime().second}get day(){return this.toDateTime().day}get month(){return this.toDateTime().month}get year(){return this.toDateTime().year}startOfDay(){return Z.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(r){return new Z(_.fromJSDate(r).toISO({includeOffset:!0}))}static fromDateTime(r){return new Z(r.toISO({includeOffset:!0}))}static fromParts(r,u,c=0,l=0,h=0,I=0,e=0,T=!1,O=0,L=0){const U=`${r.toString().padStart(4,"0")}-${u.toString().padStart(2,"0")}-${c.toString().padStart(2,"0")}`;let z="";I<10&&(z="0");let b=`${l.toString().padStart(2,"0")}:${h.toString().padStart(2,"0")}:${z+I.toString()}`;e!==0&&(b+="."+e.toString().padStart(3,"0"));const A=`${T?"-":"+"}${O.toString().padStart(2,"0")}:${L.toString().padStart(2,"0")}`;return new Z(U+"T"+b+A)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let r=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return r&&(r=r.replace(".000","")),r}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(r){const u=this.toDateTime().plus(r);return Z.fromDateTime(u)}}function Zs(i,r){const u=dn[i.toLowerCase()];if(u==null)throw new v(d.FunctionNotRecognized);if(r.lengthu.maxParams)throw new v(d.InvalidParameterCount,{name:i.toUpperCase()});return u.evaluate(r)}function nn(i,r){const u=dn[i.toLowerCase()];return u!=null&&r>=u.minParams&&r<=u.maxParams}const dn={min:{minParams:1,maxParams:1,evaluate:i=>rn(i[0],"min")},max:{minParams:1,maxParams:1,evaluate:i=>rn(i[0],"max")},avg:{minParams:1,maxParams:1,evaluate:i=>pn(i[0])},sum:{minParams:1,maxParams:1,evaluate:i=>zs(i[0])},stddev:{minParams:1,maxParams:1,evaluate:i=>ks(i[0])},count:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:i[0].length},var:{minParams:1,maxParams:1,evaluate:i=>vn(i[0])}};function pn(i){if(i===null)return null;let r=0,u=0;for(let c=0;c=h)&&(u=l,c=h)}return u}function zs(i){if(i===null)return null;let r=0;for(let u=0;uc!==null)).length===0)return null;const r=pn(i);if(r===null)return null;let u=0;for(const c of i){if(!te(c))throw new v(d.InvalidValueForAggregateFunction);u+=(r-c)**2}return u/(i.length-1)}class x{constructor(){this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0,this.millis=0}static _fixDefaults(r){if(r.precision!==null||r.secondary!==null)throw new v(d.PrimarySecondaryQualifiers)}static _parseSecondsComponent(r,u){if(u.includes(".")){const c=u.split(".");r.second=parseFloat(c[0]),r.millis=parseInt(c[1],10)}else r.second=parseFloat(u)}static createFromMilliseconds(r){const u=new x;return u.second=r/1e3,u}static createFromValueAndQualifier(r,u,c){let l=null;const h=new x;if(h.op=c==="-"?"-":"+",u.type==="interval-period"){x._fixDefaults(u);const I=new RegExp("^[0-9]{1,}$");if(u.period==="year"||u.period==="month")throw new v(d.YearMonthIntervals);if(u.period==="second"){if(!/^[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$/.test(r))throw new v(d.IllegalInterval);x._parseSecondsComponent(h,r)}else{if(!I.test(r))throw new v(d.IllegalInterval);h[u.period]=parseFloat(r)}}else{if(x._fixDefaults(u.start),x._fixDefaults(u.end),u.start.period==="year"||u.start.period==="month"||u.end.period==="year"||u.end.period==="month")throw new v(d.YearMonthIntervals);switch(u.start.period){case"day":switch(u.end.period){case"hour":if(l=new RegExp("^[0-9]{1,} [0-9]{1,}$"),!l.test(r))throw new v(d.IllegalInterval);h[u.start.period]=parseFloat(r.split(" ")[0]),h[u.end.period]=parseFloat(r.split(" ")[1]);break;case"minute":if(l=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!l.test(r))throw new v(d.IllegalInterval);{h[u.start.period]=parseFloat(r.split(" ")[0]);const I=r.split(" ")[1].split(":");h.hour=parseFloat(I[0]),h.minute=parseFloat(I[1])}break;case"second":if(l=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!l.test(r))throw new v(d.IllegalInterval);{h[u.start.period]=parseFloat(r.split(" ")[0]);const I=r.split(" ")[1].split(":");h.hour=parseFloat(I[0]),h.minute=parseFloat(I[1]),x._parseSecondsComponent(h,I[2])}break;default:throw new v(d.IllegalInterval)}break;case"hour":switch(u.end.period){case"minute":if(l=new RegExp("^[0-9]{1,}:[0-9]{1,}$"),!l.test(r))throw new v(d.IllegalInterval);h.hour=parseFloat(r.split(":")[0]),h.minute=parseFloat(r.split(":")[1]);break;case"second":if(l=new RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!l.test(r))throw new v(d.IllegalInterval);{const I=r.split(":");h.hour=parseFloat(I[0]),h.minute=parseFloat(I[1]),x._parseSecondsComponent(h,I[2])}break;default:throw new v(d.IllegalInterval)}break;case"minute":if(u.end.period!=="second")throw new v(d.IllegalInterval);if(l=new RegExp("^[0-9]{1,}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!l.test(r))throw new v(d.IllegalInterval);{const I=r.split(":");h.minute=parseFloat(I[0]),x._parseSecondsComponent(h,I[1])}break;default:throw new v(d.IllegalInterval)}}return h}valueInMilliseconds(){return(this.op==="-"?-1:1)*(this.millis+1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}const Hs=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,qs=/^(\d{1,2}):(\d{1,2})$/,js=/^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/,mn=/^(\d{4})-(\d{1,2})-(\d{1,2})$/,Ys=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$/,Bs=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,Qs=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,Ws=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/;function xt(i,r){if(r instanceof _s)return r===jt.instance?_.fromMillis(i.getTime(),{zone:jt.instance}):_.fromJSDate(i,{zone:r});switch(r){case"system":case"local":case null:return _.fromJSDate(i);default:return(r==null?void 0:r.toLowerCase())==="unknown"?_.fromMillis(i.getTime(),{zone:jt.instance}):_.fromJSDate(i,{zone:r})}}function k(i){return typeof i=="number"}function H(i){return typeof i=="string"||i instanceof String}function et(i){return i instanceof x}function B(i){return i instanceof Date}function M(i){return i instanceof _}function E(i){return i instanceof j}function D(i){return i instanceof Q}function F(i){return i instanceof Z}function ee(i){let r=Hs.exec(i);if(r!==null){const[,u,c,l]=r,h=Q.fromParts(parseInt(u,10),parseInt(c,10),parseInt(l,10),0);if(h!==null)return h;throw new v(d.InvalidTime)}if(r=qs.exec(i),r!==null){const[,u,c]=r,l=Q.fromParts(parseInt(u,10),parseInt(c,10),0,0);if(l!==null)return l;throw new v(d.InvalidTime)}if(r=js.exec(i),r!==null){const[,u,c,l,h]=r,I=Q.fromParts(parseInt(u,10),parseInt(c,10),parseInt(l,10),parseInt(h,10));if(I!==null)return I;throw new v(d.InvalidTime)}throw new v(d.InvalidTime)}function At(i,r,u=!1){let c=Ys.exec(i);if(c!==null){const[,l,h,I,e,T,O,L]=c,U=_.fromObject({year:parseInt(l,10),month:parseInt(h,10),day:parseInt(I,10),hour:parseInt(e,10),minute:parseInt(T,10),second:parseInt(O,10),millisecond:L?parseInt(L.replace(".",""),10):0},{zone:Yt(r)});if(U.isValid===!1)throw new v(d.InvalidTimeStamp);return U}if(c=Bs.exec(i),c!==null){const[,l,h,I,e,T,O,L,U,z,b]=c,A=Z.fromParts(parseInt(l,10),parseInt(h,10),parseInt(I,10),parseInt(e,10),parseInt(T,10),parseInt(O,10),L?parseInt(L.replace(".",""),10):0,U==="-",parseInt(z,10),parseInt(b,10));if(A.isValid===!1)throw new v(d.InvalidTimeStamp);return A}if(c=Qs.exec(i),c!==null){const[,l,h,I,e,T,O,L,U]=c,z=Z.fromParts(parseInt(l,10),parseInt(h,10),parseInt(I,10),parseInt(e,10),parseInt(T,10),0,0,O==="-",parseInt(L,10),parseInt(U,10));if(z.isValid===!1)throw new v(d.InvalidTimeStamp);return z}if(c=Ws.exec(i),c!==null){const[,l,h,I,e,T]=c,O=_.fromObject({year:parseInt(l,10),month:parseInt(h,10),day:parseInt(I,10),hour:parseInt(e,10),minute:parseInt(T,10),second:0},{zone:Yt(r)});if(O.isValid===!1)throw new v(d.InvalidTimeStamp);return O}if(c=mn.exec(i),c!==null){const[,l,h,I]=c,e=_.fromObject({year:parseInt(l,10),month:parseInt(h,10),day:parseInt(I,10),hour:0,minute:0,second:0},{zone:Yt(r)});if(e.isValid===!1)throw new v(d.InvalidTimeStamp);return e}throw new v(d.InvalidTimeStamp)}function hn(i,r){const u=mn.exec(i);if(u===null)try{return At(i,r)}catch{throw new v(d.InvalidDate)}const[,c,l,h]=u,I=j.fromParts(parseInt(c,10),parseInt(l,10),parseInt(h,10));if(I===null)throw new v(d.InvalidDate);return I}const Gs=321408e5,Ks=26784e5,Xs=864e5,tl=36e5,el=6e4;function Bt(i){return!!M(i)||!!F(i)}function Wt(i){return!!M(i)||!!E(i)||!!F(i)||!!D(i)}function Ct(i){if(M(i))return i.toMillis();if(E(i))return i.toNumber();if(F(i))return i.toMilliseconds();throw new v(d.InvalidDataType)}function q(i,r,u,c){if(i==null||r==null)return null;if(k(i)){if(k(r))return G(i,r,u);if(H(r))return nl(i,r,u);if(Wt(r))throw new v(d.InvalidOperator);if(E(r))throw new v(d.InvalidOperator)}else if(H(i)){if(k(r))return rl(i,r,u);if(H(r))return al(i,r,u);if(M(r))throw new v(d.InvalidOperator);if(E(r))throw new v(d.InvalidOperator);if(D(r))throw new v(d.InvalidOperator);if(F(r))throw new v(d.InvalidOperator)}else if(M(i)){if(Bt(r)){if(i instanceof _&&ct(i.zone)){if(r instanceof _&&ct(r.zone)===!1||r instanceof Z)return ft(i,r,u)}else if(r instanceof _&&ct(r.zone)&&(i instanceof _&&ct(i.zone)===!1||i instanceof Z))return ft(i,r,u);return G(Ct(i),Ct(r),u)}if(H(r))throw new v(d.InvalidOperator);if(E(r))return il(i,r,u);if(D(r))throw new v(d.InvalidOperator);if(k(r))throw new v(d.InvalidOperator)}else if(E(i)){if(F(r))return sl(i,r,u);if(M(r))return ul(i,r,u);if(H(r))throw new v(d.InvalidOperator);if(E(r))return G(i.toNumber(),r.toNumber(),u);if(D(r))throw new v(d.InvalidOperator);if(k(r))throw new v(d.InvalidOperator)}else if(D(i)){if(D(r))return G(i.toNumber(),r.toNumber(),u);if(H(r))throw new v(d.InvalidOperator);if(k(r))throw new v(d.InvalidOperator);if(E(r))throw new v(d.InvalidOperator);if(Bt(r))throw new v(d.InvalidOperator)}else if(F(i)){if(Bt(r))return r instanceof _&&ct(r.zone)?ft(i,r,u):G(Ct(i),Ct(r),u);if(H(r))throw new v(d.InvalidOperator);if(E(r))return ol(i,r,u);if(D(r))throw new v(d.InvalidOperator);if(k(r))throw new v(d.InvalidOperator)}switch(u){case"<>":return i!==r;case"=":return i===r;case">":return i>r;case"<":return i=":return i>=r;case"<=":return i<=r}}function G(i,r,u){switch(u){case"<>":return i!==r;case"=":return i===r;case">":return i>r;case"<":return i=":return i>=r;case"<=":return i<=r}}function nl(i,r,u){const c=parseFloat(r);if(!isNaN(c))return G(i,c,u);const l=i.toString();switch(u){case"<>":return l!==r;case"=":return l===r;case">":return l>r;case"<":return l=":return l>=r;case"<=":return l<=r}}function rl(i,r,u){const c=parseFloat(i);if(!isNaN(c))return G(c,r,u);const l=r.toString();switch(u){case"<>":return i!==l;case"=":return i===l;case">":return i>l;case"<":return i=":return i>=l;case"<=":return i<=l}}function al(i,r,u){switch(u){case"<>":return i!==r;case"=":return i===r;case">":return i>r;case"<":return i=":return i>=r;case"<=":return i<=r}}function il(i,r,u){const c=r.toDateTimeLuxon(i.zone);return G((i=i.startOf("day")).toMillis(),c.toMillis(),u)}function ol(i,r,u){const c=r.toDateTimeLuxon(i.toDateTime().zone);return G((i=i.startOfDay()).toMilliseconds(),c.toMillis(),u)}function ul(i,r,u){const c=i.toDateTimeLuxon(r.zone);return r=r.startOf("day"),G(c.toMillis(),r.toMillis(),u)}function sl(i,r,u){const c=i.toDateTimeLuxon(r.toDateTime().zone);return r=r.startOfDay(),G(c.toMillis(),r.toMilliseconds(),u)}function ft(i,r,u){i instanceof Z&&(i=i.toDateTime()),r instanceof Z&&(r=r.toDateTime());const c=an(i),l=an(r);switch(u){case"<>":return c!==l;case"=":return c===l;case">":return c>l;case"<":return c=":return c>=l;case"<=":return c<=l}}function an(i){return i.year*Gs+i.month*Ks+i.day*Xs+i.hour*tl+i.minute*el+1e3*i.second+i.millisecond}function ne(i,r,u){const c=In[i.toLowerCase()];if(c==null)throw new v(d.FunctionNotRecognized);if(r.lengthc.maxParams)throw new v(d.InvalidParameterCount,{name:i.toUpperCase()});return c.evaluate(r,u)}function ll(i,r){const u=In[i.toLowerCase()];return u!=null&&r>=u.minParams&&r<=u.maxParams}function Mt(i){return typeof i=="string"||i instanceof String}function Qt(i){return!B(i)&&!E(i)&&!M(i)&&!D(i)&&!F(i)}function wn(i){return E(i)||D(i)?i.toString():F(i)?i.toSQLValue():M(i)?i.millisecond===0?i.toFormat("yyyy-LL-dd HH:mm:ss"):i.toSQL({includeOffset:!1}):B(i)?wn(_.fromJSDate(i)):i.toString()}function cl(i){if(B(i))return j.fromDateJS(i);if(M(i))return j.fromParts(i.year,i.month,i.day);if(E(i))return i;if(D(i))throw new v(d.CannotCastValue);if(F(i)&&j.fromParts(i.year,i.month,i.day)===null)throw new v(d.CannotCastValue);if(Mt(i)){const r=j.fromReader(i);if(r!==null&&r.isValid)return r}throw new v(d.CannotCastValue)}function fl(i,r,u){if(B(i))return xt(i,r);if(M(i))return i;if(E(i))return i.toDateTimeLuxon("unknown");if(D(i))throw new v(d.CannotCastValue);if(F(i))return i;if(Mt(i))return At(i,"unknown",u);throw new v(d.CannotCastValue)}function dl(i){if(B(i))return Q.fromDateJS(i);if(M(i))return Q.fromDateTime(i);if(E(i))throw new v(d.CannotCastValue);if(D(i))return i;if(F(i))return Q.fromSqlTimeStampOffset(i);if(Mt(i))return ee(i);throw new v(d.CannotCastValue)}const In={extract:{minParams:2,maxParams:2,evaluate:([i,r])=>{if(r==null)return null;if(B(r))switch(i.toUpperCase()){case"SECOND":return r.getSeconds();case"MINUTE":return r.getMinutes();case"HOUR":return r.getHours();case"DAY":return r.getDate();case"MONTH":return r.getMonth()+1;case"YEAR":return r.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0}else if(M(r))switch(i.toUpperCase()){case"SECOND":return r.second;case"MINUTE":return r.minute;case"HOUR":return r.hour;case"DAY":return r.day;case"MONTH":return r.month;case"YEAR":return r.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new v(d.InvalidFunctionParameters,{function:"EXTRACT"})}else if(E(r))switch(i.toUpperCase()){case"DAY":return r.day;case"MONTH":return r.month;case"YEAR":return r.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new v(d.InvalidFunctionParameters,{function:"EXTRACT"})}else if(D(r))switch(i.toUpperCase()){case"SECOND":return r.second;case"MINUTE":return r.minute;case"HOUR":return r.hour}else if(F(r))switch(i.toUpperCase()){case"SECOND":return r.second;case"MINUTE":return r.minute;case"HOUR":return r.hour;case"DAY":return r.day;case"MONTH":return r.month;case"YEAR":return r.year;case"TIMEZONE_HOUR":return r.timezoneOffsetHour;case"TIMEZONE_MINUTE":return r.timezoneOffsetMinutes}throw new v(d.InvalidFunctionParameters,{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:i=>{if(i.length===2){const[r,u]=i;return r==null||u==null?null:r.toString().substring(u-1)}if(i.length===3){const[r,u,c]=i;return r==null||u==null||c==null?null:c<=0?"":r.toString().substring(u-1,u+c-1)}}},position:{minParams:2,maxParams:2,evaluate:([i,r])=>i==null||r==null?null:r.indexOf(i)+1},trim:{minParams:2,maxParams:3,evaluate:i=>{const r=i.length===3,u=r?i[1]:" ",c=r?i[2]:i[1];if(u==null||c==null)return null;const l=`(${Rs(u)})`;switch(i[0]){case"BOTH":return c.replaceAll(new RegExp(`^${l}*|${l}*$`,"g"),"");case"LEADING":return c.replaceAll(new RegExp(`^${l}*`,"g"),"");case"TRAILING":return c.replaceAll(new RegExp(`${l}*$`,"g"),"")}throw new v(d.InvalidFunctionParameters,{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.abs(i[0])},ceiling:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.ceil(i[0])},floor:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.floor(i[0])},log:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.log(i[0])},log10:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.log(i[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.sin(i[0])},cos:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.cos(i[0])},tan:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.tan(i[0])},asin:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.asin(i[0])},acos:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.acos(i[0])},atan:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.atan(i[0])},sign:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:i[0]>0?1:i[1]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:i=>i[0]==null||i[1]==null?null:i[0]**i[1]},mod:{minParams:2,maxParams:2,evaluate:i=>i[0]==null||i[1]==null?null:i[0]%i[1]},round:{minParams:1,maxParams:2,evaluate:i=>{const r=i[0],u=i.length===2?10**i[1]:1;return r==null?null:Math.round(r*u)/u}},truncate:{minParams:1,maxParams:2,evaluate:i=>i[0]==null?null:i.length===1?parseInt(i[0].toFixed(0),10):parseFloat(i[0].toFixed(i[1]))},char_length:{minParams:1,maxParams:1,evaluate:i=>Mt(i[0])?i[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:i=>{let r="";for(let u=0;ui[0]==null?null:i[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:i[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:i=>{for(const r of i)if(r!==null)return r;return null}},cosh:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.cosh(i[0])},sinh:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.sinh(i[0])},tanh:{minParams:1,maxParams:1,evaluate:i=>i[0]==null?null:Math.tanh(i[0])},nullif:{minParams:2,maxParams:2,evaluate:(i,r)=>q(i[0],i[1],"=")?null:i[0]},cast:{minParams:2,maxParams:2,evaluate:(i,r)=>{const u=i[0],c=i[1];if(u===null)return null;switch(c.type){case"integer":{if(!Qt(u))throw new v(d.CannotCastValue);const l=parseInt(u,10);if(isNaN(l))throw new v(d.CannotCastValue);return l}case"smallint":{if(!Qt(u))throw new v(d.CannotCastValue);const l=parseInt(u,10);if(isNaN(l))throw new v(d.CannotCastValue);if(l>32767||l<-32767)throw new v(d.CannotCastValue);return l}case"float":case"real":{if(!Qt(u))throw new v(d.CannotCastValue);const l=parseFloat(u);if(isNaN(l))throw new v(d.CannotCastValue);return l}case"time":return dl(u);case"date":return cl(u);case"timestamp":return fl(u,r,c.withtimezone===!0);case"varchar":{const l=wn(u);if(l.length>c.size)throw new v(d.CannotCastValue);return l}default:throw new v(d.InvalidDataType)}}}};function gn(i,r,u,c){if(i==="||")return ne("concat",[r,u],c);if(r===null||u===null)return null;if(k(r)){if(k(u))return re(r,u,i);if(et(u))return yl(r,u,i);if(D(u))return El();if(E(u))return Fl();if(F(u))return Ml();if(M(u))return xl();if(H(u))return $l(r,u,i);throw new v(d.InvalidOperator)}if(E(r)){if(k(u))return Cl(r,u,i);if(et(u))return Tl(r,u,i);if(D(u))return Jl();if(E(u))return Vl(r,u,i);if(F(u))return Ul(r,u,i);if(M(u))return Rl(r,u,i);if(H(u))return Xl();throw new v(d.InvalidOperator)}if(D(r)){if(k(u))return bl(r,u,i);if(et(u))return hl(r,u,i);if(D(u))return Bl();if(E(u))return jl();if(F(u))return Yl();if(M(u))return ql();if(H(u))return tc();throw new v(d.InvalidOperator)}if(et(r)){if(k(u))return gl(r,u,i);if(et(u))return Il(r,u,i);if(D(u))return vl(r,u,i);if(E(u))return ml(r,u,i);if(F(u))return wl(r,u,i);if(M(u))return pl(r,u,i);if(H(u))return Ll();throw new v(d.InvalidOperator)}if(M(r)){if(k(u))return Ol(r,u,i);if(et(u))return Nl(r,u,i);if(D(u))return Kl();if(E(u))return Wl(r,u,i);if(F(u))return Gl(r,u,i);if(M(u))return Ql(r,u,i);if(H(u))return ec();throw new v(d.InvalidOperator)}if(F(r)){if(k(u))return Al(r,u,i);if(et(u))return Sl(r,u,i);if(D(u))return Zl();if(E(u))return zl(r,u,i);if(F(u))return Hl(r,u,i);if(M(u))return kl(r,u,i);if(H(u))return nc();throw new v(d.InvalidOperator)}if(H(r)){if(k(u))return Dl(r,u,i);if(et(u))return _l();if(D(u))return rc();if(E(u))return ac();if(F(u))return oc();if(M(u))return ic();if(H(u))return Pl(r,u,i);throw new v(d.InvalidOperator)}throw new v(d.InvalidOperator)}function re(i,r,u){switch(u){case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r}throw new v(d.InvalidOperator)}function pl(i,r,u){switch(u){case"+":return r.plus({milliseconds:i.valueInMilliseconds()});case"-":return i.valueInMilliseconds()-r.toMillis()}throw new v(d.InvalidOperator)}function vl(i,r,u){if(u==="+")return r.plus("milliseconds",i.valueInMilliseconds());throw new v(d.InvalidOperator)}function ml(i,r,u){if(u==="+")return r.plus("milliseconds",i.valueInMilliseconds());throw new v(d.InvalidOperator)}function hl(i,r,u){switch(u){case"+":return i.plus("milliseconds",r.valueInMilliseconds());case"-":return i.plus("milliseconds",-1*r.valueInMilliseconds())}throw new v(d.InvalidOperator)}function wl(i,r,u){if(u==="+")return r.addMilliseconds(i.valueInMilliseconds());throw new v(d.InvalidOperator)}function Il(i,r,u){switch(u){case"+":return x.createFromMilliseconds(i.valueInMilliseconds()+r.valueInMilliseconds());case"-":return x.createFromMilliseconds(i.valueInMilliseconds()-r.valueInMilliseconds());case"*":return x.createFromMilliseconds(i.valueInMilliseconds()*r.valueInMilliseconds());case"/":return x.createFromMilliseconds(i.valueInMilliseconds()/r.valueInMilliseconds())}throw new v(d.InvalidOperator)}function gl(i,r,u){switch(u){case"+":return x.createFromMilliseconds(i.valueInMilliseconds()+r);case"-":return x.createFromMilliseconds(i.valueInMilliseconds()-r);case"*":return x.createFromMilliseconds(i.valueInMilliseconds()*r);case"/":return x.createFromMilliseconds(i.valueInMilliseconds()/r)}throw new v(d.InvalidOperator)}function yl(i,r,u){switch(u){case"+":return x.createFromMilliseconds(i+r.valueInMilliseconds());case"-":return x.createFromMilliseconds(i-r.valueInMilliseconds());case"*":return x.createFromMilliseconds(i*r.valueInMilliseconds());case"/":return x.createFromMilliseconds(i/r.valueInMilliseconds())}throw new v(d.InvalidOperator)}function Tl(i,r,u){switch(u){case"+":return i.plus("milliseconds",r.valueInMilliseconds());case"-":return i.plus("milliseconds",-1*r.valueInMilliseconds())}throw new v(d.InvalidOperator)}function Nl(i,r,u){switch(u){case"+":return i.plus({milliseconds:r.valueInMilliseconds()});case"-":return i.minus({milliseconds:r.valueInMilliseconds()})}throw new v(d.InvalidOperator)}function Sl(i,r,u){switch(u){case"+":return i.addMilliseconds(r.valueInMilliseconds());case"-":return i.addMilliseconds(-1*r.valueInMilliseconds())}throw new v(d.InvalidOperator)}function Ol(i,r,u){const c=1e3*r*24*60*60;switch(u){case"+":return i.plus({milliseconds:c});case"-":return i.minus({milliseconds:c})}throw new v(d.InvalidOperator)}function Cl(i,r,u){const c=1e3*r*24*60*60;switch(u){case"+":return i.plus("milliseconds",c);case"-":return i.plus("milliseconds",-1*c)}throw new v(d.InvalidOperator)}function bl(i,r,u){const c=1e3*r*24*60*60;switch(u){case"+":return i.plus("milliseconds",c);case"-":return i.plus("milliseconds",-1*c)}throw new v(d.InvalidOperator)}function xl(i,r,u){throw new v(d.InvalidOperator)}function Al(i,r,u){const c=1e3*r*24*60*60;switch(u){case"+":return i.addMilliseconds(c);case"-":return i.addMilliseconds(-1*c)}throw new v(d.InvalidOperator)}function Ml(i,r,u){throw new v(d.InvalidOperator)}function El(i,r,u){throw new v(d.InvalidOperator)}function Fl(i,r,u){throw new v(d.InvalidOperator)}function $l(i,r,u){const c=parseFloat(r);if(isNaN(c))throw new v(d.InvalidOperator);return re(i,c,u)}function Dl(i,r,u){const c=parseFloat(i);if(isNaN(c))throw new v(d.InvalidOperator);return re(c,r,u)}function Pl(i,r,u){if(u==="+")return i+r;throw new v(d.InvalidOperator)}function Ll(i,r,u){throw new v(d.InvalidOperator)}function _l(i,r,u){throw new v(d.InvalidOperator)}function Rl(i,r,u){if(u==="-")return i.toDateTimeLuxon(r.zone).diff(r).as("days");throw new v(d.InvalidOperator)}function Ul(i,r,u){if(u==="-")return i.toDateTimeLuxon(r.toDateTime().zone).diff(r.toDateTime()).as("days");throw new v(d.InvalidOperator)}function Vl(i,r,u){if(u==="-")return i.toDateTimeLuxon("UTC").diff(r.toDateTimeLuxon("UTC")).as("days");throw new v(d.InvalidOperator)}function Jl(i,r,u){throw new v(d.InvalidOperator)}function Zl(i,r,u){throw new v(d.InvalidOperator)}function zl(i,r,u){if(u==="-")return i.toDateTime().diff(r.toDateTimeLuxon(i.toDateTime().zone)).as("days");throw new v(d.InvalidOperator)}function kl(i,r,u){if(u==="-")return i.toDateTime().diff(r).as("days");throw new v(d.InvalidOperator)}function Hl(i,r,u){if(u==="-")return i.toDateTime().diff(r.toDateTime()).as("days");throw new v(d.InvalidOperator)}function ql(i,r,u){throw new v(d.InvalidOperator)}function jl(i,r,u){throw new v(d.InvalidOperator)}function Yl(i,r,u){throw new v(d.InvalidOperator)}function Bl(i,r,u){throw new v(d.InvalidOperator)}function Ql(i,r,u){if(u==="-")return i.diff(r).as("days");throw new v(d.InvalidOperator)}function Wl(i,r,u){if(u==="-")return i.diff(r.toDateTimeLuxon(i.zone)).as("days");throw new v(d.InvalidOperator)}function Gl(i,r,u){if(u==="-")return i.diff(r.toDateTime()).as("days");throw new v(d.InvalidOperator)}function Kl(i,r,u){throw new v(d.InvalidOperator)}function Xl(i,r,u){throw new v(d.InvalidOperator)}function tc(i,r,u){throw new v(d.InvalidOperator)}function ec(i,r,u){throw new v(d.InvalidOperator)}function nc(i,r,u){throw new v(d.InvalidOperator)}function rc(i,r,u){throw new v(d.InvalidOperator)}function ac(i,r,u){throw new v(d.InvalidOperator)}function ic(i,r,u){throw new v(d.InvalidOperator)}function oc(i,r,u){throw new v(d.InvalidOperator)}var on,un,yn={exports:{}};un=function(){function i(l,h){function I(){this.constructor=l}I.prototype=h.prototype,l.prototype=new I}function r(l,h,I,e){var T=Error.call(this,l);return Object.setPrototypeOf&&Object.setPrototypeOf(T,r.prototype),T.expected=h,T.found=I,T.location=e,T.name="SyntaxError",T}function u(l,h,I){return I=I||" ",l.length>h?l:(h-=l.length,l+(I+=I.repeat(h)).slice(0,h))}function c(l,h){var I,e={},T=(h=h!==void 0?h:{}).grammarSource,O={start:Te},L=Te,U="!",z="=",b=">=",A=">",Y="<=",R="<>",bn="<",ae="!=",Et="+",Ft="-",ie="||",xn="*",An="/",Mn="@",oe="'",ue="N'",dt="''",En=".",Fn="null",$n="true",Dn="false",Pn="in",Ln="is",_n="like",Rn="escape",Un="not",Vn="and",Jn="or",Zn="between",zn="from",kn="for",Hn="substring",qn="extract",jn="trim",Yn="position",Bn="timestamp",Qn="date",Wn="time",Gn="leading",Kn="trailing",Xn="both",tr="cast",er="as",nr="integer",rr="smallint",ar="float",ir="real",or="varchar",ur="to",sr="interval",lr="year",cr="timezone_hour",fr="timezone_minute",dr="month",pr="day",vr="hour",mr="minute",hr="second",wr="case",Ir="end",gr="when",yr="then",Tr="else",Nr=",",Sr="(",Or=")",se="`",Cr=/^[A-Za-z_\x80-\uFFFF]/,br=/^[A-Za-z0-9_]/,le=/^[A-Za-z0-9_.\x80-\uFFFF]/,xr=/^["]/,ce=/^[^']/,Ar=/^[0-9]/,Mr=/^[eE]/,Er=/^[+\-]/,Fr=/^[ \t\n\r]/,fe=/^[^`]/,$r=y("!",!1),de=y("=",!1),Dr=y(">=",!1),Pr=y(">",!1),Lr=y("<=",!1),_r=y("<>",!1),Rr=y("<",!1),Ur=y("!=",!1),$t=y("+",!1),Dt=y("-",!1),Vr=y("||",!1),Jr=y("*",!1),Zr=y("/",!1),zr=X([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1),kr=X([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),pe=X([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1),Hr=X(['"'],!1,!1),qr=y("@",!1),ve=y("'",!1),jr=y("N'",!1),me=y("''",!1),he=X(["'"],!0,!1),Yr=y(".",!1),Br=X([["0","9"]],!1,!1),Qr=X(["e","E"],!1,!1),Wr=X(["+","-"],!1,!1),Gr=y("NULL",!0),Kr=y("TRUE",!0),Xr=y("FALSE",!0),ta=y("IN",!0),ea=y("IS",!0),na=y("LIKE",!0),ra=y("ESCAPE",!0),aa=y("NOT",!0),ia=y("AND",!0),oa=y("OR",!0),ua=y("BETWEEN",!0),sa=y("FROM",!0),la=y("FOR",!0),ca=y("SUBSTRING",!0),fa=y("EXTRACT",!0),da=y("TRIM",!0),pa=y("POSITION",!0),va=y("TIMESTAMP",!0),ma=y("DATE",!0),ha=y("TIME",!0),wa=y("LEADING",!0),Ia=y("TRAILING",!0),ga=y("BOTH",!0),ya=y("CAST",!0),Ta=y("AS",!0),Na=y("INTEGER",!0),Sa=y("SMALLINT",!0),Oa=y("FLOAT",!0),Ca=y("REAL",!0),ba=y("VARCHAR",!0),xa=y("TO",!0),Aa=y("INTERVAL",!0),Ma=y("YEAR",!0),Ea=y("TIMEZONE_HOUR",!0),Fa=y("TIMEZONE_MINUTE",!0),$a=y("MONTH",!0),Da=y("DAY",!0),Pa=y("HOUR",!0),La=y("MINUTE",!0),_a=y("SECOND",!0),Ra=y("CASE",!0),Ua=y("END",!0),Va=y("WHEN",!0),Ja=y("THEN",!0),Za=y("ELSE",!0),za=y(",",!1),ka=y("(",!1),Ha=y(")",!1),qa=X([" "," ",` +`,"\r"],!1,!1),we=y("`",!1),Ie=X(["`"],!0,!1),ja=function(t){return t},Ya=function(t,a){var o={type:"expression-list"},s=Fs(t,a);return o.value=s,o},Ba=function(t,a){return lt(t,a)},Qa=function(t,a){return lt(t,a)},Wa=function(t){return Ms("NOT",t)},Ga=function(t,a){return a==""||a==null||a==null?t:a.type=="arithmetic"?lt(t,a.tail):Xe(a.op,t,a.right,a.escape)},Ka=function(t){return{type:"arithmetic",tail:t}},Xa=function(t,a){return{op:t+"NOT",right:a}},ti=function(t,a){return{op:t,right:a}},ei=function(t,a,o){return{op:"NOT"+t,right:{type:"expression-list",value:[a,o]}}},ni=function(t,a,o){return{op:t,right:{type:"expression-list",value:[a,o]}}},ri=function(t){return t[0]+" "+t[2]},ai=function(t){return t[0]+" "+t[2]},ii=function(t,a,o){return{op:t,right:a,escape:o.value}},oi=function(t,a){return{op:t,right:a,escape:""}},ui=function(t,a){return{op:t,right:a}},si=function(t){return{op:t,right:{type:"expression-list",value:[]}}},li=function(t,a){return{op:t,right:a}},ci=function(t,a){return lt(t,a)},fi=function(t,a){return lt(t,a)},di=function(t){return t.paren=!0,t},pi=function(t){return/^CURRENT_DATE$/i.test(t)?{type:"current-time",mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(t)?{type:"current-time",mode:"timestamp"}:{type:"column-reference",table:"",column:t}},vi=function(t){return{type:"column-reference",table:"",column:t,delimited:!0}},mi=function(t){return t},hi=function(t,a){return t+a.join("")},wi=function(t,a){return t+a.join("")},Ii=function(t){return t},gi=function(t){return t.join("")},yi=function(){return'"'},Ti=function(t){return{type:"parameter",value:t[1]}},Ni=function(t,a){return{type:"function",name:"extract",args:{type:"expression-list",value:[{type:"string",value:t},a]}}},Si=function(t,a,o){return{type:"function",name:"substring",args:{type:"expression-list",value:o?[t,a,o[2]]:[t,a]}}},Oi=function(t,a){return{type:"function",name:"cast",args:{type:"expression-list",value:[t,a]}}},Ci=function(){return{type:"data-type",value:{type:"integer"}}},bi=function(){return{type:"data-type",value:{type:"smallint"}}},xi=function(){return{type:"data-type",value:{type:"float"}}},Ai=function(){return{type:"data-type",value:{type:"real"}}},Mi=function(){return{type:"data-type",value:{type:"date"}}},Ei=function(){return{type:"data-type",value:{type:"timestamp"}}},Fi=function(){return{type:"data-type",value:{type:"time"}}},$i=function(t){return{type:"data-type",value:{type:"varchar",size:parseInt(t)}}},Di=function(t,a,o){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:t??"BOTH"},a,o]}}},Pi=function(t,a){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:t??"BOTH"},a]}}},Li=function(t,a){return{type:"function",name:"position",args:{type:"expression-list",value:[t,a]}}},_i=function(t,a){return{type:"function",name:t,args:a||{type:"expression-list",value:[]}}},Ri=function(t){return t.type==="string"&&$s(t.value),{type:"timestamp",value:t.value}},Ui=function(t){return t.type==="string"&&Ds(t.value),{type:"time",value:t.value}},Vi=function(t,a,o){return{type:"interval",value:a,qualifier:o,op:t}},Ji=function(t,a){return{type:"interval",value:t,qualifier:a,op:""}},Zi=function(t,a){return{type:"interval-qualifier",start:t,end:a}},zi=function(t,a){return{type:"interval-period",period:t.value,precision:a,secondary:null}},ki=function(t){return{type:"interval-period",period:t.value,precision:null,secondary:null}},Hi=function(t){return{type:"interval-period",period:t.value,precision:null,secondary:null}},qi=function(t,a){return{type:"interval-period",period:"second",precision:t,secondary:a}},ji=function(t){return{type:"interval-period",period:"second",precision:t,secondary:null}},Yi=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},Bi=function(t,a){return{type:"interval-period",period:t.value,precision:a,secondary:null}},Qi=function(t){return{type:"interval-period",period:t.value,precision:null,secondary:null}},Wi=function(t,a){return{type:"interval-period",period:"second",precision:t,secondary:a}},Gi=function(t){return{type:"interval-period",period:"second",precision:t,secondary:null}},Ki=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},Xi=function(){return{type:"string",value:"day"}},to=function(){return{type:"string",value:"hour"}},eo=function(){return{type:"string",value:"minute"}},no=function(){return{type:"string",value:"month"}},ro=function(){return{type:"string",value:"year"}},ao=function(t){return parseFloat(t)},io=function(t){return parseFloat(t)},oo=function(t){return t.type==="string"&&Ps(t.value),{type:"date",value:t.value}},uo=function(){return{type:"null",value:null}},so=function(){return{type:"boolean",value:!0}},lo=function(){return{type:"boolean",value:!1}},ge=function(){return"'"},co=function(t){return{type:"string",value:t.join("")}},fo=function(t,a){return{type:"case-expression",format:"simple",operand:t,clauses:a,else:null}},po=function(t,a,o){return{type:"case-expression",format:"simple",operand:t,clauses:a,else:o.value}},vo=function(t){return{type:"case-expression",format:"searched",clauses:t,else:null}},mo=function(t,a){return{type:"case-expression",format:"searched",clauses:t,else:a.value}},ho=function(t,a){return{type:"when-clause",operand:t,value:a}},wo=function(t,a){return{type:"when-clause",operand:t,value:a}},Io=function(t){return{type:"else-clause",value:t}},go=function(t){return{type:"number",value:t}},yo=function(t,a,o){return parseFloat(t+a+o)},To=function(t,a){return parseFloat(t+a)},No=function(t,a){return parseFloat(t+a)},So=function(t){return parseFloat(t)},Oo=function(t,a){return t[0]+a},Co=function(t){return"."+(t??"")},bo=function(t,a){return t+a},xo=function(t){return t.join("")},Ao=function(t,a){return"e"+(a===null?"":a)},Mo=function(){return"IN"},Eo=function(){return"IS"},Fo=function(){return"LIKE"},$o=function(){return"ESCAPE"},Do=function(){return"NOT"},Po=function(){return"AND"},Lo=function(){return"OR"},_o=function(){return"BETWEEN"},Ro=function(){return"FROM"},Uo=function(){return"FOR"},Vo=function(){return"SUBSTRING"},Jo=function(){return"EXTRACT"},Zo=function(){return"TRIM"},zo=function(){return"POSITION"},ko=function(){return"TIMESTAMP"},Ho=function(){return"DATE"},qo=function(){return"TIME"},jo=function(){return"LEADING"},Yo=function(){return"TRAILING"},Bo=function(){return"BOTH"},Qo=function(){return"CAST"},Wo=function(){return"AS"},Go=function(){return"INTEGER"},Ko=function(){return"SMALLINT"},Xo=function(){return"FLOAT"},tu=function(){return"REAL"},eu=function(){return"VARCHAR"},nu=function(){return"TO"},ru=function(){return"INTERVAL"},au=function(){return"YEAR"},iu=function(){return"TIMEZONE_HOUR"},ou=function(){return"TIMEZONE_MINUTE"},uu=function(){return"MONTH"},su=function(){return"DAY"},lu=function(){return"HOUR"},cu=function(){return"MINUTE"},fu=function(){return"SECOND"},du=function(){return"CASE"},pu=function(){return"END"},vu=function(){return"WHEN"},mu=function(){return"THEN"},hu=function(){return"ELSE"},wu=function(t){return t},Iu=function(t){return t.join("")},n=0,m=0,pt=[{line:1,column:1}],K=0,Pt=[],f=0;if("startRule"in h){if(!(h.startRule in O))throw new Error(`Can't start parsing from rule "`+h.startRule+'".');L=O[h.startRule]}function Lt(t,a){throw yu(t,a=a!==void 0?a:_t(m,n))}function y(t,a){return{type:"literal",text:t,ignoreCase:a}}function X(t,a,o){return{type:"class",parts:t,inverted:a,ignoreCase:o}}function gu(){return{type:"end"}}function ye(t){var a,o=pt[t];if(o)return o;for(a=t-1;!pt[a];)a--;for(o={line:(o=pt[a]).line,column:o.column};aK&&(K=n,Pt=[]),Pt.push(t))}function yu(t,a){return new r(t,null,null,a)}function Tu(t,a,o){return new r(r.buildMessage(t,a),t,a,o)}function Te(){var t,a;return t=n,p(),(a=P())!==e?(p(),m=t,t=ja(a)):(n=t,t=e),t}function Ne(){var t,a,o,s,g,S,C,$;if(t=n,(a=P())!==e){for(o=[],s=n,g=p(),(S=Ot())!==e?(C=p(),($=P())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);s!==e;)o.push(s),s=n,g=p(),(S=Ot())!==e?(C=p(),($=P())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);m=t,t=Ya(a,o)}else n=t,t=e;return t}function P(){var t,a,o,s,g,S,C,$;if(t=n,(a=Rt())!==e){for(o=[],s=n,g=p(),(S=Ue())!==e?(C=p(),($=Rt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);s!==e;)o.push(s),s=n,g=p(),(S=Ue())!==e?(C=p(),($=Rt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);m=t,t=Ba(a,o)}else n=t,t=e;return t}function Rt(){var t,a,o,s,g,S,C,$;if(t=n,(a=vt())!==e){for(o=[],s=n,g=p(),(S=Tt())!==e?(C=p(),($=vt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);s!==e;)o.push(s),s=n,g=p(),(S=Tt())!==e?(C=p(),($=vt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);m=t,t=Qa(a,o)}else n=t,t=e;return t}function vt(){var t,a,o,s,g;return t=n,(a=st())===e&&(a=n,l.charCodeAt(n)===33?(o=U,n++):(o=e,f===0&&w($r)),o!==e?(s=n,f++,l.charCodeAt(n)===61?(g=z,n++):(g=e,f===0&&w(de)),f--,g===e?s=void 0:(n=s,s=e),s!==e?a=o=[o,s]:(n=a,a=e)):(n=a,a=e)),a!==e?(o=p(),(s=vt())!==e?(m=t,t=Wa(s)):(n=t,t=e)):(n=t,t=e),t===e&&(t=Nu()),t}function Nu(){var t,a,o;return t=n,(a=tt())!==e?(p(),(o=Su())===e&&(o=null),m=t,t=Ga(a,o)):(n=t,t=e),t}function Su(){var t;return(t=Ou())===e&&(t=Au())===e&&(t=bu())===e&&(t=Cu())===e&&(t=xu()),t}function Ou(){var t,a,o,s,g,S,C;if(t=n,a=[],o=n,s=p(),(g=Se())!==e?(S=p(),(C=tt())!==e?o=s=[s,g,S,C]:(n=o,o=e)):(n=o,o=e),o!==e)for(;o!==e;)a.push(o),o=n,s=p(),(g=Se())!==e?(S=p(),(C=tt())!==e?o=s=[s,g,S,C]:(n=o,o=e)):(n=o,o=e);else a=e;return a!==e&&(m=t,a=Ka(a)),t=a}function Se(){var t;return l.substr(n,2)===b?(t=b,n+=2):(t=e,f===0&&w(Dr)),t===e&&(l.charCodeAt(n)===62?(t=A,n++):(t=e,f===0&&w(Pr)),t===e&&(l.substr(n,2)===Y?(t=Y,n+=2):(t=e,f===0&&w(Lr)),t===e&&(l.substr(n,2)===R?(t=R,n+=2):(t=e,f===0&&w(_r)),t===e&&(l.charCodeAt(n)===60?(t=bn,n++):(t=e,f===0&&w(Rr)),t===e&&(l.charCodeAt(n)===61?(t=z,n++):(t=e,f===0&&w(de)),t===e&&(l.substr(n,2)===ae?(t=ae,n+=2):(t=e,f===0&&w(Ur)))))))),t}function Cu(){var t,a,o,s;return t=n,(a=_e())!==e?(p(),(o=st())!==e?(p(),(s=tt())!==e?(m=t,t=Xa(a,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=_e())!==e?(p(),(o=tt())!==e?(m=t,t=ti(a,o)):(n=t,t=e)):(n=t,t=e)),t}function bu(){var t,a,o,s,g,S;return t=n,(a=st())!==e?(p(),(o=Ve())!==e?(p(),(s=tt())!==e?(p(),(g=Tt())!==e?(p(),(S=tt())!==e?(m=t,t=ei(o,s,S)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=Ve())!==e?(p(),(o=tt())!==e?(p(),(s=Tt())!==e?(p(),(g=tt())!==e?(m=t,t=ni(a,o,g)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)),t}function Oe(){var t,a,o,s,g;return t=n,a=n,(o=st())!==e?(s=p(),(g=Re())!==e?a=o=[o,s,g]:(n=a,a=e)):(n=a,a=e),a!==e&&(m=t,a=ri(a)),(t=a)===e&&(t=Re()),t}function Ut(){var t,a,o,s,g;return t=n,a=n,(o=st())!==e?(s=p(),(g=Ht())!==e?a=o=[o,s,g]:(n=a,a=e)):(n=a,a=e),a!==e&&(m=t,a=ai(a)),(t=a)===e&&(t=Ht()),t}function xu(){var t,a,o,s;return t=n,(a=Oe())!==e?(p(),(o=nt())!==e?(p(),ls()!==e?(p(),(s=kt())!==e?(m=t,t=ii(a,o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=Oe())!==e?(p(),(o=nt())!==e?(m=t,t=oi(a,o)):(n=t,t=e)):(n=t,t=e)),t}function Au(){var t,a,o,s;return t=n,(a=Ut())!==e?(p(),(o=V())!==e?(p(),(s=Ne())!==e?(p(),J()!==e?(m=t,t=ui(a,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=Ut())!==e?(p(),(o=V())!==e?(p(),(s=J())!==e?(m=t,t=si(a)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=Ut())!==e?(p(),(o=zt())!==e?(m=t,t=li(a,o)):(n=t,t=e)):(n=t,t=e))),t}function tt(){var t,a,o,s,g,S,C,$;if(t=n,(a=Vt())!==e){for(o=[],s=n,g=p(),(S=Ce())!==e?(C=p(),($=Vt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);s!==e;)o.push(s),s=n,g=p(),(S=Ce())!==e?(C=p(),($=Vt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);m=t,t=ci(a,o)}else n=t,t=e;return t}function Ce(){var t;return l.charCodeAt(n)===43?(t=Et,n++):(t=e,f===0&&w($t)),t===e&&(l.charCodeAt(n)===45?(t=Ft,n++):(t=e,f===0&&w(Dt)),t===e&&(l.substr(n,2)===ie?(t=ie,n+=2):(t=e,f===0&&w(Vr)))),t}function Vt(){var t,a,o,s,g,S,C,$;if(t=n,(a=Jt())!==e){for(o=[],s=n,g=p(),(S=be())!==e?(C=p(),($=Jt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);s!==e;)o.push(s),s=n,g=p(),(S=be())!==e?(C=p(),($=Jt())!==e?s=g=[g,S,C,$]:(n=s,s=e)):(n=s,s=e);m=t,t=fi(a,o)}else n=t,t=e;return t}function be(){var t;return l.charCodeAt(n)===42?(t=xn,n++):(t=e,f===0&&w(Jr)),t===e&&(l.charCodeAt(n)===47?(t=An,n++):(t=e,f===0&&w(Zr))),t}function Jt(){var t,a;return(t=Hu())===e&&(t=_u())===e&&(t=Ru())===e&&(t=Ju())===e&&(t=Zu())===e&&(t=Uu())===e&&(t=zu())===e&&(t=ts())===e&&(t=Mu())===e&&(t=zt())===e&&(t=n,V()!==e?(p(),(a=P())!==e?(p(),J()!==e?(m=t,t=di(a)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)),t}function Mu(){var t,a;return t=n,(a=Eu())!==e&&(m=t,a=pi(a)),(t=a)===e&&(t=n,(a=$u())!==e&&(m=t,a=vi(a)),t=a),t}function Eu(){var t,a;return t=n,(a=Fu())!==e&&(m=t,a=mi(a)),t=a}function Fu(){var t,a,o,s;if(t=n,(a=Zt())!==e){for(o=[],s=Ae();s!==e;)o.push(s),s=Ae();m=t,t=hi(a,o)}else n=t,t=e;return t}function xe(){var t,a,o,s;if(t=n,(a=Zt())!==e){for(o=[],s=N();s!==e;)o.push(s),s=N();m=t,t=wi(a,o)}else n=t,t=e;return t}function Zt(){var t;return Cr.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(zr)),t}function N(){var t;return br.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(kr)),t}function Ae(){var t;return le.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(pe)),t}function $u(){var t,a;return t=n,mt()!==e?(a=Du(),mt()!==e?(m=t,t=Ii(a)):(n=t,t=e)):(n=t,t=e),t}function Du(){var t,a,o;for(t=n,a=[],o=Me();o!==e;)a.push(o),o=Me();return m=t,t=a=gi(a)}function Me(){var t;return(t=Lu())===e&&(t=Pu()),t}function Pu(){var t;return t=n,mt()!==e&&mt()!==e?(m=t,t=yi()):(n=t,t=e),t}function Lu(){var t;return le.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(pe)),t}function mt(){var t;return xr.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(Hr)),t}function zt(){var t,a,o,s;return t=n,a=n,l.charCodeAt(n)===64?(o=Mn,n++):(o=e,f===0&&w(qr)),o!==e&&(s=xe())!==e?a=o=[o,s]:(n=a,a=e),a!==e&&(m=t,a=Ti(a)),t=a}function _u(){var t,a,o;return t=n,ds()!==e?(p(),V()!==e?(p(),(a=ku())!==e?(p(),qt()!==e?(p(),(o=P())!==e?(p(),J()!==e?(m=t,t=Ni(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function Ru(){var t,a,o,s,g,S,C;return t=n,fs()!==e?(p(),V()!==e?(p(),(a=P())!==e?(p(),qt()!==e?(p(),(o=P())!==e?(p(),s=n,(g=cs())!==e?(S=p(),(C=P())!==e?s=g=[g,S,C,p()]:(n=s,s=e)):(n=s,s=e),s===e&&(s=null),(g=J())!==e?(m=t,t=Si(a,o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function Uu(){var t,a,o;return t=n,ws()!==e?(p(),V()!==e?(p(),(a=P())!==e?(p(),Is()!==e?(p(),(o=Vu())!==e?(p(),J()!==e?(m=t,t=Oi(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function Vu(){var t,a,o;return t=n,(a=gs())!==e&&(m=t,a=Ci()),(t=a)===e&&(t=n,(a=ys())!==e&&(m=t,a=bi()),(t=a)===e&&(t=n,(a=Ts())!==e&&(m=t,a=xi()),(t=a)===e&&(t=n,(a=Ns())!==e&&(m=t,a=Ai()),(t=a)===e&&(t=n,(a=ze())!==e&&(m=t,a=Mi()),(t=a)===e&&(t=n,(a=Ze())!==e&&(m=t,a=Ei()),(t=a)===e&&(t=n,(a=ke())!==e&&(m=t,a=Fi()),(t=a)===e&&(t=n,(a=Ss())!==e?(p(),V()!==e?(p(),(o=rt())!==e?(p(),J()!==e?(m=t,t=$i(o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)))))))),t}function Ju(){var t,a,o,s;return t=n,Je()!==e?(p(),V()!==e?(p(),(a=Ee())===e&&(a=null),p(),(o=P())!==e?(p(),qt()!==e?(p(),(s=P())!==e?(p(),J()!==e?(m=t,t=Di(a,o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,Je()!==e?(p(),V()!==e?(p(),(a=Ee())===e&&(a=null),p(),(o=P())!==e?(p(),J()!==e?(m=t,t=Pi(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)),t}function Ee(){var t;return(t=vs())===e&&(t=ms())===e&&(t=hs()),t}function Zu(){var t,a,o;return t=n,ps()!==e?(p(),V()!==e?(p(),(a=P())!==e?(p(),Ht()!==e?(p(),(o=P())!==e?(p(),J()!==e?(m=t,t=Li(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function zu(){var t,a,o;return t=n,(a=As())!==e?(p(),V()!==e?(p(),(o=Ne())===e&&(o=null),p(),J()!==e?(m=t,t=_i(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function ku(){var t;return(t=qe())===e&&(t=je())===e&&(t=Ye())===e&&(t=Be())===e&&(t=Qe())===e&&(t=at())===e&&(t=Cs())===e&&(t=bs()),t}function Hu(){var t;return(t=kt())===e&&(t=rs())===e&&(t=Xu())===e&&(t=Ku())===e&&(t=Gu())===e&&(t=qu())===e&&(t=Yu())===e&&(t=ju()),t}function qu(){var t,a;return t=n,Ze()!==e?(p(),(a=nt())!==e?(m=t,t=Ri(a)):(n=t,t=e)):(n=t,t=e),t}function ju(){var t,a;return t=n,ke()!==e?(p(),(a=nt())!==e?(m=t,t=Ui(a)):(n=t,t=e)):(n=t,t=e),t}function Yu(){var t,a,o,s;return t=n,He()!==e?(p(),l.charCodeAt(n)===45?(a=Ft,n++):(a=e,f===0&&w(Dt)),a===e&&(l.charCodeAt(n)===43?(a=Et,n++):(a=e,f===0&&w($t))),a!==e?(p(),(o=nt())!==e?(p(),(s=Fe())!==e?(m=t,t=Vi(a,o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,He()!==e?(p(),(a=nt())!==e?(p(),(o=Fe())!==e?(m=t,t=Ji(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)),t}function Fe(){var t,a,o;return t=n,(a=Bu())!==e?(p(),Os()!==e?(p(),(o=Qu())!==e?(m=t,t=Zi(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=Wu()),t}function Bu(){var t,a,o;return t=n,(a=ut())!==e?(p(),V()!==e?(p(),(o=wt())!==e?(p(),J()!==e?(m=t,t=zi(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=ut())!==e&&(m=t,a=ki(a)),t=a),t}function Qu(){var t,a,o,s;return t=n,(a=ut())!==e&&(m=t,a=Hi(a)),(t=a)===e&&(t=n,(a=at())!==e?(p(),V()!==e?(p(),(o=wt())!==e?(p(),Ot()!==e?(p(),(s=ht())!==e?(p(),J()!==e?(m=t,t=qi(o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=at())!==e?(p(),V()!==e?(p(),(o=wt())!==e?(p(),J()!==e?(m=t,t=ji(o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=at())!==e&&(m=t,a=Yi()),t=a))),t}function Wu(){var t,a,o,s;return t=n,(a=ut())!==e?(p(),V()!==e?(p(),(o=ht())!==e?(p(),J()!==e?(m=t,t=Bi(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=ut())!==e&&(m=t,a=Qi(a)),(t=a)===e&&(t=n,(a=at())!==e?(p(),V()!==e?(p(),(o=wt())!==e?(p(),Ot()!==e?(p(),(s=ht())!==e?(p(),J()!==e?(m=t,t=Wi(o,s)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=at())!==e?(p(),V()!==e?(p(),(o=ht())!==e?(p(),J()!==e?(m=t,t=Gi(o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t===e&&(t=n,(a=at())!==e&&(m=t,a=Ki()),t=a)))),t}function ut(){var t,a;return t=n,(a=Ye())!==e&&(m=t,a=Xi()),(t=a)===e&&(t=n,(a=Be())!==e&&(m=t,a=to()),(t=a)===e&&(t=n,(a=Qe())!==e&&(m=t,a=eo()),(t=a)===e&&(t=n,(a=je())!==e&&(m=t,a=no()),(t=a)===e&&(t=n,(a=qe())!==e&&(m=t,a=ro()),t=a)))),t}function ht(){var t,a;return t=n,(a=rt())!==e&&(m=t,a=ao(a)),t=a}function wt(){var t,a;return t=n,(a=rt())!==e&&(m=t,a=io(a)),t=a}function Gu(){var t,a;return t=n,ze()!==e?(p(),(a=nt())!==e?(m=t,t=oo(a)):(n=t,t=e)):(n=t,t=e),t}function Ku(){var t,a;return t=n,(a=os())!==e&&(m=t,a=uo()),t=a}function Xu(){var t,a;return t=n,(a=us())!==e&&(m=t,a=so()),(t=a)===e&&(t=n,(a=ss())!==e&&(m=t,a=lo()),t=a),t}function nt(){var t;return(t=kt())===e&&(t=zt()),t}function kt(){var t,a,o,s,g;if(t=n,l.charCodeAt(n)===39?(a=oe,n++):(a=e,f===0&&w(ve)),a===e&&(l.substr(n,2)===ue?(a=ue,n+=2):(a=e,f===0&&w(jr))),a!==e){for(o=[],s=n,l.substr(n,2)===dt?(g=dt,n+=2):(g=e,f===0&&w(me)),g!==e&&(m=s,g=ge()),(s=g)===e&&(ce.test(l.charAt(n))?(s=l.charAt(n),n++):(s=e,f===0&&w(he)));s!==e;)o.push(s),s=n,l.substr(n,2)===dt?(g=dt,n+=2):(g=e,f===0&&w(me)),g!==e&&(m=s,g=ge()),(s=g)===e&&(ce.test(l.charAt(n))?(s=l.charAt(n),n++):(s=e,f===0&&w(he)));l.charCodeAt(n)===39?(s=oe,n++):(s=e,f===0&&w(ve)),s!==e?(m=t,t=co(o)):(n=t,t=e)}else n=t,t=e;return t}function ts(){var t;return(t=es())===e&&(t=ns()),t}function es(){var t,a,o,s,g;if(t=n,Nt()!==e)if(p(),(a=P())!==e){for(p(),o=[],s=gt();s!==e;)o.push(s),s=gt();s=p(),(g=St())!==e?(m=t,t=fo(a,o)):(n=t,t=e)}else n=t,t=e;else n=t,t=e;if(t===e)if(t=n,Nt()!==e)if(p(),(a=P())!==e){for(p(),o=[],s=gt();s!==e;)o.push(s),s=gt();s=p(),(g=$e())!==e?(p(),St()!==e?(m=t,t=po(a,o,g)):(n=t,t=e)):(n=t,t=e)}else n=t,t=e;else n=t,t=e;return t}function ns(){var t,a,o,s;if(t=n,Nt()!==e){for(p(),a=[],o=It();o!==e;)a.push(o),o=It();o=p(),(s=St())!==e?(m=t,t=vo(a)):(n=t,t=e)}else n=t,t=e;if(t===e)if(t=n,Nt()!==e){for(p(),a=[],o=It();o!==e;)a.push(o),o=It();o=p(),(s=$e())!==e?(p(),St()!==e?(m=t,t=mo(a,s)):(n=t,t=e)):(n=t,t=e)}else n=t,t=e;return t}function It(){var t,a,o;return t=n,We()!==e?(p(),(a=P())!==e?(p(),Ge()!==e?(p(),(o=P())!==e?(m=t,t=ho(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function gt(){var t,a,o;return t=n,We()!==e?(p(),(a=P())!==e?(p(),Ge()!==e?(p(),(o=P())!==e?(m=t,t=wo(a,o)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e)):(n=t,t=e),t}function $e(){var t,a;return t=n,xs()!==e?(p(),(a=P())!==e?(m=t,t=Io(a)):(n=t,t=e)):(n=t,t=e),t}function rs(){var t,a,o,s;return t=n,(a=as())!==e?(o=n,f++,s=Zt(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=go(a)):(n=t,t=e)):(n=t,t=e),t}function as(){var t,a,o,s;return t=n,(a=yt())!==e&&(o=De())!==e&&(s=Pe())!==e?(m=t,t=yo(a,o,s)):(n=t,t=e),t===e&&(t=n,(a=yt())!==e&&(o=De())!==e?(m=t,t=To(a,o)):(n=t,t=e),t===e&&(t=n,(a=yt())!==e&&(o=Pe())!==e?(m=t,t=No(a,o)):(n=t,t=e),t===e&&(t=n,(a=yt())!==e&&(m=t,a=So(a)),t=a))),t}function yt(){var t,a,o;return(t=rt())===e&&(t=n,l.charCodeAt(n)===45?(a=Ft,n++):(a=e,f===0&&w(Dt)),a===e&&(l.charCodeAt(n)===43?(a=Et,n++):(a=e,f===0&&w($t))),a!==e&&(o=rt())!==e?(m=t,t=Oo(a,o)):(n=t,t=e)),t}function De(){var t,a,o;return t=n,l.charCodeAt(n)===46?(a=En,n++):(a=e,f===0&&w(Yr)),a!==e?((o=rt())===e&&(o=null),m=t,t=Co(o)):(n=t,t=e),t}function Pe(){var t,a,o;return t=n,(a=is())!==e&&(o=rt())!==e?(m=t,t=bo(a,o)):(n=t,t=e),t}function rt(){var t,a,o;if(t=n,a=[],(o=Le())!==e)for(;o!==e;)a.push(o),o=Le();else a=e;return a!==e&&(m=t,a=xo(a)),t=a}function Le(){var t;return Ar.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(Br)),t}function is(){var t,a,o;return t=n,Mr.test(l.charAt(n))?(a=l.charAt(n),n++):(a=e,f===0&&w(Qr)),a!==e?(Er.test(l.charAt(n))?(o=l.charAt(n),n++):(o=e,f===0&&w(Wr)),o===e&&(o=null),m=t,t=Ao(a,o)):(n=t,t=e),t}function os(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===Fn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Gr)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?t=a=[a,o]:(n=t,t=e)):(n=t,t=e),t}function us(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===$n?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Kr)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?t=a=[a,o]:(n=t,t=e)):(n=t,t=e),t}function ss(){var t,a,o,s;return t=n,l.substr(n,5).toLowerCase()===Dn?(a=l.substr(n,5),n+=5):(a=e,f===0&&w(Xr)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?t=a=[a,o]:(n=t,t=e)):(n=t,t=e),t}function Ht(){var t,a,o,s;return t=n,l.substr(n,2).toLowerCase()===Pn?(a=l.substr(n,2),n+=2):(a=e,f===0&&w(ta)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Mo()):(n=t,t=e)):(n=t,t=e),t}function _e(){var t,a,o,s;return t=n,l.substr(n,2).toLowerCase()===Ln?(a=l.substr(n,2),n+=2):(a=e,f===0&&w(ea)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Eo()):(n=t,t=e)):(n=t,t=e),t}function Re(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===_n?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(na)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Fo()):(n=t,t=e)):(n=t,t=e),t}function ls(){var t,a,o,s;return t=n,l.substr(n,6).toLowerCase()===Rn?(a=l.substr(n,6),n+=6):(a=e,f===0&&w(ra)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=$o()):(n=t,t=e)):(n=t,t=e),t}function st(){var t,a,o,s;return t=n,l.substr(n,3).toLowerCase()===Un?(a=l.substr(n,3),n+=3):(a=e,f===0&&w(aa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Do()):(n=t,t=e)):(n=t,t=e),t}function Tt(){var t,a,o,s;return t=n,l.substr(n,3).toLowerCase()===Vn?(a=l.substr(n,3),n+=3):(a=e,f===0&&w(ia)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Po()):(n=t,t=e)):(n=t,t=e),t}function Ue(){var t,a,o,s;return t=n,l.substr(n,2).toLowerCase()===Jn?(a=l.substr(n,2),n+=2):(a=e,f===0&&w(oa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Lo()):(n=t,t=e)):(n=t,t=e),t}function Ve(){var t,a,o,s;return t=n,l.substr(n,7).toLowerCase()===Zn?(a=l.substr(n,7),n+=7):(a=e,f===0&&w(ua)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=_o()):(n=t,t=e)):(n=t,t=e),t}function qt(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===zn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(sa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Ro()):(n=t,t=e)):(n=t,t=e),t}function cs(){var t,a,o,s;return t=n,l.substr(n,3).toLowerCase()===kn?(a=l.substr(n,3),n+=3):(a=e,f===0&&w(la)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Uo()):(n=t,t=e)):(n=t,t=e),t}function fs(){var t,a,o,s;return t=n,l.substr(n,9).toLowerCase()===Hn?(a=l.substr(n,9),n+=9):(a=e,f===0&&w(ca)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Vo()):(n=t,t=e)):(n=t,t=e),t}function ds(){var t,a,o,s;return t=n,l.substr(n,7).toLowerCase()===qn?(a=l.substr(n,7),n+=7):(a=e,f===0&&w(fa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Jo()):(n=t,t=e)):(n=t,t=e),t}function Je(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===jn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(da)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Zo()):(n=t,t=e)):(n=t,t=e),t}function ps(){var t,a,o,s;return t=n,l.substr(n,8).toLowerCase()===Yn?(a=l.substr(n,8),n+=8):(a=e,f===0&&w(pa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=zo()):(n=t,t=e)):(n=t,t=e),t}function Ze(){var t,a,o,s;return t=n,l.substr(n,9).toLowerCase()===Bn?(a=l.substr(n,9),n+=9):(a=e,f===0&&w(va)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=ko()):(n=t,t=e)):(n=t,t=e),t}function ze(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===Qn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(ma)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Ho()):(n=t,t=e)):(n=t,t=e),t}function ke(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===Wn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(ha)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=qo()):(n=t,t=e)):(n=t,t=e),t}function vs(){var t,a,o,s;return t=n,l.substr(n,7).toLowerCase()===Gn?(a=l.substr(n,7),n+=7):(a=e,f===0&&w(wa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=jo()):(n=t,t=e)):(n=t,t=e),t}function ms(){var t,a,o,s;return t=n,l.substr(n,8).toLowerCase()===Kn?(a=l.substr(n,8),n+=8):(a=e,f===0&&w(Ia)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Yo()):(n=t,t=e)):(n=t,t=e),t}function hs(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===Xn?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(ga)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Bo()):(n=t,t=e)):(n=t,t=e),t}function ws(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===tr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(ya)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Qo()):(n=t,t=e)):(n=t,t=e),t}function Is(){var t,a,o,s;return t=n,l.substr(n,2).toLowerCase()===er?(a=l.substr(n,2),n+=2):(a=e,f===0&&w(Ta)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Wo()):(n=t,t=e)):(n=t,t=e),t}function gs(){var t,a,o,s;return t=n,l.substr(n,7).toLowerCase()===nr?(a=l.substr(n,7),n+=7):(a=e,f===0&&w(Na)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Go()):(n=t,t=e)):(n=t,t=e),t}function ys(){var t,a,o,s;return t=n,l.substr(n,8).toLowerCase()===rr?(a=l.substr(n,8),n+=8):(a=e,f===0&&w(Sa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Ko()):(n=t,t=e)):(n=t,t=e),t}function Ts(){var t,a,o,s;return t=n,l.substr(n,5).toLowerCase()===ar?(a=l.substr(n,5),n+=5):(a=e,f===0&&w(Oa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=Xo()):(n=t,t=e)):(n=t,t=e),t}function Ns(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===ir?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Ca)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=tu()):(n=t,t=e)):(n=t,t=e),t}function Ss(){var t,a,o,s;return t=n,l.substr(n,7).toLowerCase()===or?(a=l.substr(n,7),n+=7):(a=e,f===0&&w(ba)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=eu()):(n=t,t=e)):(n=t,t=e),t}function Os(){var t,a,o,s;return t=n,l.substr(n,2).toLowerCase()===ur?(a=l.substr(n,2),n+=2):(a=e,f===0&&w(xa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=nu()):(n=t,t=e)):(n=t,t=e),t}function He(){var t,a,o,s;return t=n,l.substr(n,8).toLowerCase()===sr?(a=l.substr(n,8),n+=8):(a=e,f===0&&w(Aa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=ru()):(n=t,t=e)):(n=t,t=e),t}function qe(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===lr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Ma)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=au()):(n=t,t=e)):(n=t,t=e),t}function Cs(){var t,a,o,s;return t=n,l.substr(n,13).toLowerCase()===cr?(a=l.substr(n,13),n+=13):(a=e,f===0&&w(Ea)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=iu()):(n=t,t=e)):(n=t,t=e),t}function bs(){var t,a,o,s;return t=n,l.substr(n,15).toLowerCase()===fr?(a=l.substr(n,15),n+=15):(a=e,f===0&&w(Fa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=ou()):(n=t,t=e)):(n=t,t=e),t}function je(){var t,a,o,s;return t=n,l.substr(n,5).toLowerCase()===dr?(a=l.substr(n,5),n+=5):(a=e,f===0&&w($a)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=uu()):(n=t,t=e)):(n=t,t=e),t}function Ye(){var t,a,o,s;return t=n,l.substr(n,3).toLowerCase()===pr?(a=l.substr(n,3),n+=3):(a=e,f===0&&w(Da)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=su()):(n=t,t=e)):(n=t,t=e),t}function Be(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===vr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Pa)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=lu()):(n=t,t=e)):(n=t,t=e),t}function Qe(){var t,a,o,s;return t=n,l.substr(n,6).toLowerCase()===mr?(a=l.substr(n,6),n+=6):(a=e,f===0&&w(La)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=cu()):(n=t,t=e)):(n=t,t=e),t}function at(){var t,a,o,s;return t=n,l.substr(n,6).toLowerCase()===hr?(a=l.substr(n,6),n+=6):(a=e,f===0&&w(_a)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=fu()):(n=t,t=e)):(n=t,t=e),t}function Nt(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===wr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Ra)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=du()):(n=t,t=e)):(n=t,t=e),t}function St(){var t,a,o,s;return t=n,l.substr(n,3).toLowerCase()===Ir?(a=l.substr(n,3),n+=3):(a=e,f===0&&w(Ua)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=pu()):(n=t,t=e)):(n=t,t=e),t}function We(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===gr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Va)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=vu()):(n=t,t=e)):(n=t,t=e),t}function Ge(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===yr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Ja)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=mu()):(n=t,t=e)):(n=t,t=e),t}function xs(){var t,a,o,s;return t=n,l.substr(n,4).toLowerCase()===Tr?(a=l.substr(n,4),n+=4):(a=e,f===0&&w(Za)),a!==e?(o=n,f++,s=N(),f--,s===e?o=void 0:(n=o,o=e),o!==e?(m=t,t=hu()):(n=t,t=e)):(n=t,t=e),t}function Ot(){var t;return l.charCodeAt(n)===44?(t=Nr,n++):(t=e,f===0&&w(za)),t}function V(){var t;return l.charCodeAt(n)===40?(t=Sr,n++):(t=e,f===0&&w(ka)),t}function J(){var t;return l.charCodeAt(n)===41?(t=Or,n++):(t=e,f===0&&w(Ha)),t}function p(){var t,a;for(t=[],a=Ke();a!==e;)t.push(a),a=Ke();return t}function Ke(){var t;return Fr.test(l.charAt(n))?(t=l.charAt(n),n++):(t=e,f===0&&w(qa)),t}function As(){var t,a,o,s;if(t=n,(a=xe())!==e&&(m=t,a=wu(a)),(t=a)===e)if(t=n,l.charCodeAt(n)===96?(a=se,n++):(a=e,f===0&&w(we)),a!==e){if(o=[],fe.test(l.charAt(n))?(s=l.charAt(n),n++):(s=e,f===0&&w(Ie)),s!==e)for(;s!==e;)o.push(s),fe.test(l.charAt(n))?(s=l.charAt(n),n++):(s=e,f===0&&w(Ie));else o=e;o!==e?(l.charCodeAt(n)===96?(s=se,n++):(s=e,f===0&&w(we)),s!==e?(m=t,t=Iu(o)):(n=t,t=e)):(n=t,t=e)}else n=t,t=e;return t}function Ms(t,a){return{type:"unary-expression",operator:t,expr:a}}function Xe(t,a,o,s){var g={type:"binary-expression",operator:t,left:a,right:o};return s!==void 0&&(g.escape=s),g}function Es(t,a){for(var o=[t],s=0;s `+L+` +`+z+` | +`+O.line+" | "+b+` +`+z+" | "+u("",T.column-1," ")+u("",A,"^")}else h+=` + at `+L}return h},r.buildMessage=function(l,h){var I={literal:function(b){return'"'+T(b.text)+'"'},class:function(b){var A=b.parts.map(function(Y){return Array.isArray(Y)?O(Y[0])+"-"+O(Y[1]):O(Y)});return"["+(b.inverted?"^":"")+A.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(b){return b.description}};function e(b){return b.charCodeAt(0).toString(16).toUpperCase()}function T(b){return b.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(A){return"\\x0"+e(A)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(A){return"\\x"+e(A)})}function O(b){return b.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(A){return"\\x0"+e(A)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(A){return"\\x"+e(A)})}function L(b){return I[b.type](b)}function U(b){var A,Y,R=b.map(L);if(R.sort(),R.length>0){for(A=1,Y=1;A=")&&q(r,u[1],"<=")}static notbetween(r,u,c){return r==null||u[0]==null||u[1]==null?null:q(r,u[0],"<")||q(r,u[1],">")}static ternaryNot(r){return bt(r)}static ternaryAnd(r,u){return Sn(r,u)}static ternaryOr(r,u){return On(r,u)}}let fc=class Tn{constructor(r,u,c="UTC"){this.fieldsIndex=u,this.timeZone=c,this.parameters={},this._hasDateFunctions=void 0,this.parseTree=sc.parse(r);const{isStandardized:l,isAggregate:h,referencedFieldNames:I}=this._extractExpressionInfo(u);this._referencedFieldNames=I,this.isStandardized=l,this.isAggregate=h}static convertValueToStorageFormat(r,u=null){if(u===null)return B(r)?r.getTime():M(r)?r.toMillis():F(r)?r.toStorageFormat():D(r)?r.toStorageString():E(r)?r.toStorageFormat():r;switch(u){case"date":return B(r)?r.getTime():M(r)?r.toMillis():F(r)?r.toMilliseconds():E(r)?r.toNumber():r;case"date-only":return B(r)?j.fromDateJS(r).toString():F(r)?j.fromSqlTimeStampOffset(r).toString():M(r)?j.fromDateTime(r).toString():r;case"time-only":return B(r)?Q.fromDateJS(r).toStorageString():M(r)?Q.fromDateTime(r).toStorageString():F(r)?Q.fromSqlTimeStampOffset(r).toStorageString():D(r)?r.toStorageString():r;case"timestamp-offset":if(B(r))return Z.fromJSDate(r).toStorageFormat();if(M(r))return Z.fromDateTime(r).toStorageFormat();if(F(r))return r.toStorageFormat()}return r}static create(r,u,c="UTC"){return new Tn(r,u,c)}get fieldNames(){return this._referencedFieldNames}testSet(r,u=ot){return!!this._evaluateNode(this.parseTree,null,u,r)}calculateValue(r,u=ot){const c=this._evaluateNode(this.parseTree,r,u,null);return c instanceof x?c.valueInMilliseconds()/864e5:c}calculateValueCompiled(r,u=ot){return this.parseTree._compiledVersion!=null?this.parseTree._compiledVersion(r,this.parameters,u,this.fieldsIndex,this.timeZone):tn("esri-csp-restrictions")?this.calculateValue(r,u):(this._compileMe(),this.parseTree._compiledVersion(r,this.parameters,u,this.fieldsIndex,this.timeZone))}testFeature(r,u=ot){return!!this._evaluateNode(this.parseTree,r,u,null)}testFeatureCompiled(r,u=ot){return this.parseTree._compiledVersion!=null?!!this.parseTree._compiledVersion(r,this.parameters,u,this.fieldsIndex,this.timeZone):tn("esri-csp-restrictions")?this.testFeature(r,u):(this._compileMe(),!!this.parseTree._compiledVersion(r,this.parameters,u,this.fieldsIndex,this.timeZone))}get hasDateFunctions(){return this._hasDateFunctions!=null||(this._hasDateFunctions=!1,this._visitAll(this.parseTree,r=>{r.type==="current-time"?this._hasDateFunctions=!0:r.type==="function"&&(this._hasDateFunctions=this._hasDateFunctions||lc.has(r.name.toLowerCase()))})),this._hasDateFunctions}getFunctions(){const r=new Set;return this._visitAll(this.parseTree,u=>{u.type==="function"&&r.add(u.name.toLowerCase())}),Array.from(r)}getExpressions(){const r=new Map;return this._visitAll(this.parseTree,u=>{if(u.type==="function"){const c=u.name.toLowerCase(),l=u.args.value[0];if(l.type==="column-reference"){const h=l.column,I=`${c}-${h}`;r.has(I)||r.set(I,{aggregateType:c,field:h})}}}),[...r.values()]}getVariables(){const r=new Set;return this._visitAll(this.parseTree,u=>{u.type==="parameter"&&r.add(u.value.toLowerCase())}),Array.from(r)}_compileMe(){const r="return this.convertInterval("+this.evaluateNodeToJavaScript(this.parseTree)+")";this.parseTree._compiledVersion=new Function("feature","lookups","attributeAdapter","fieldsIndex","timeZone",r).bind(cc)}_extractExpressionInfo(r){const u=[],c=new Set;let l=!0,h=!1;return this._visitAll(this.parseTree,I=>{switch(I.type){case"column-reference":{const e=r==null?void 0:r.get(I.column);let T,O;e?T=O=e.name??"":(O=I.column,T=O.toLowerCase()),c.has(T)||(c.add(T),u.push(O)),I.column=O;break}case"function":{const{name:e,args:T}=I,O=T.value.length;l&&(l=ll(e,O)),h===!1&&(h=nn(e,O));break}}}),{referencedFieldNames:Array.from(u),isStandardized:l,isAggregate:h}}_visitAll(r,u){if(r!=null)switch(u(r),r.type){case"when-clause":this._visitAll(r.operand,u),this._visitAll(r.value,u);break;case"case-expression":for(const c of r.clauses)this._visitAll(c,u);r.format==="simple"&&this._visitAll(r.operand,u),r.else!==null&&this._visitAll(r.else,u);break;case"expression-list":for(const c of r.value)this._visitAll(c,u);break;case"unary-expression":this._visitAll(r.expr,u);break;case"binary-expression":this._visitAll(r.left,u),this._visitAll(r.right,u);break;case"function":this._visitAll(r.args,u)}}evaluateNodeToJavaScript(r){switch(r.type){case"interval":return"this.makeSqlInterval("+this.evaluateNodeToJavaScript(r.value)+", "+JSON.stringify(r.qualifier)+","+JSON.stringify(r.op)+")";case"case-expression":{let u="";if(r.format==="simple"){const c=this.evaluateNodeToJavaScript(r.operand);u="( ";for(let l=0;l=",this.timeZone)&&q(e,T[1],"<=",this.timeZone)}case"NOTBETWEEN":{const e=this._evaluateNode(r.left,u,c,l),T=this._evaluateNode(r.right,u,c,l);return e==null||T[0]==null||T[1]==null?null:q(e,T[0],"<",this.timeZone)||q(e,T[1],">",this.timeZone)}case"LIKE":return Xt(this._evaluateNode(r.left,u,c,l),this._evaluateNode(r.right,u,c,l),r.escape);case"NOT LIKE":return bt(Xt(this._evaluateNode(r.left,u,c,l),this._evaluateNode(r.right,u,c,l),r.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return q(this._evaluateNode(r.left,u,c,l),this._evaluateNode(r.right,u,c,l),r.operator,this.timeZone);case"-":case"+":case"*":case"/":case"||":return gn(r.operator,this._evaluateNode(r.left,u,c,l),this._evaluateNode(r.right,u,c,l),this.timeZone)}case"null":case"boolean":case"string":case"number":return r.value;case"date":return r.parsedValue??(r.parsedValue=hn(r.value,"unknown")),r.parsedValue;case"timestamp":return r.parsedValue??(r.parsedValue=At(r.value,"unknown")),r.parsedValue;case"time":return ee(r.value);case"current-time":return r.mode==="date"?j.fromNow(this.timeZone):xt(new Date,this.timeZone);case"column-reference":return Cn(u,r.column,this.fieldsIndex,c);case"data-type":return r.value;case"function":{if(this.isAggregate&&nn(r.name,r.args.value.length)){const T=[];for(const O of((I=r.args)==null?void 0:I.value)||[]){const L=[];for(const U of l||[])L.push(this._evaluateNode(O,U,c,null));T.push(L)}return Zs(r.name,T)}const e=this._evaluateNode(r.args,u,c,l);return ne(r.name,e,this.timeZone)}}throw new v(d.UnsupportedSyntax,{node:r.type})}};function Nn(i){return i===!0}function Gt(i){return Array.isArray(i)?i:[i]}function bt(i){return i!==null?i!==!0:null}function Sn(i,r){return i!=null&&r!=null?i===!0&&r===!0:i!==!1&&r!==!1&&null}function On(i,r){return i!=null&&r!=null?i===!0||r===!0:i===!0||r===!0||null}function Kt(i,r,u){if(i==null)return null;let c=!1;for(const l of r)if(l==null)c=null;else{if(i===l){c=!0;break}if(Wt(i)&&Wt(l)&&(c=q(i,l,"="),c))break}return c}const sn="-[]/{}()*+?.\\^$|";var it;function dc(i,r){const u=r;let c="",l=it.Normal;for(let h=0;h(pc(i)?i.attributes:i)[r]},wc=Object.freeze(Object.defineProperty({__proto__:null,WhereClause:fc,defaultAttributeAdapter:ot},Symbol.toStringTag,{value:"Module"}));export{fc as O,wc as W,W as a,v as n,Z as r,hc as s,d as t}; diff --git a/build/assets/WorkerTileHandler-CMLMj5UP.js b/build/assets/WorkerTileHandler-CMLMj5UP.js new file mode 100644 index 0000000..730b09f --- /dev/null +++ b/build/assets/WorkerTileHandler-CMLMj5UP.js @@ -0,0 +1,2 @@ +import{ix as ne,hq as ae,aG as Re,fz as Fe,aU as we}from"./index-DKOmzAMm.js";import{a as It,m as O,t as H,E as Kt,o as oe,n as Zt,U as ve,O as Ce,p as Ue,u as Jt,b as yt,I as wt,l as Ee}from"./StyleRepository-B96C0kSY.js";import{h as C,s as ee,o as Bt,r as mt,f as Be,a as le,c as he,i as Oe,d as ct,p as Ut,g as Ne,j as $e,_ as ze}from"./GeometryUtils-6Cd4d7Hy.js";import{t as ce,a as Ge,c as He,i as Ke}from"./TurboLine-BJPIEzB-.js";import{n as je}from"./pbf-DwSF5Y_G.js";import{i as ue}from"./earcut-BqgeR2O3.js";import"./enums-CxXC-vJk.js";import"./VertexElementDescriptor-BOD-G50G.js";import"./_commonjsHelpers-DCkdB7M8.js";const Et=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],bt=["آ","أ","إ","ا"],We=["ﻵ","ﻷ","ﻹ","ﻻ"],qe=["ﻶ","ﻸ","ﻺ","ﻼ"],zt=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],Ye=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],Ze=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],Je=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],Qe=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],fe=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],Xe=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],de=["ء","ف"],ts=["غ","ي"],es=[[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]],ss=[[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]],i=0,b=1,k=2,z=3,t=4,nt=5,$t=6,e=7,W=8,Y=9,st=10,F=11,g=12,rs=13,is=14,ns=15,as=16,os=17,D=18,ls=["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"],it=100,hs=[it+0,i,i,i,i,it+1,it+2,it+3,b,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,it+4,t,t,t,i,t,i,t,i,t,t,t,i,i,t,t,i,i,i,i,i,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,i,i,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,i,i,t,t,i,i,t,t,i,i,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,i,i,i,it+5,e,e,it+6,it+7],cs=[[D,D,D,D,D,D,D,D,D,$t,nt,$t,W,nt,D,D,D,D,D,D,D,D,D,D,D,D,D,D,nt,nt,nt,$t,W,t,t,F,F,F,t,t,t,t,t,st,Y,st,Y,Y,k,k,k,k,k,k,k,k,k,k,Y,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,D,D,D,D,D,D,nt,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,Y,t,F,F,F,F,t,t,t,t,i,t,t,D,t,t,F,F,k,k,t,i,t,t,t,k,i,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,i,i,i,i,i,i,i,i],[i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,i,i,i,i,i,i,i,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,i,t,t,t,t,t,t,t,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,g,b,g,g,b,g,g,b,g,t,t,t,t,t,t,t,t,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,t,t,t,t,t,b,b,b,b,b,t,t,t,t,t,t,t,t,t,t,t],[z,z,z,z,t,t,t,t,e,F,F,e,Y,e,t,t,g,g,g,g,g,g,g,g,g,g,g,e,t,t,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,z,z,z,z,z,z,z,z,z,z,F,z,z,e,e,e,g,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,g,g,g,z,t,g,g,g,g,g,g,e,e,g,g,t,g,g,g,g,e,e,k,k,k,k,k,k,k,k,k,k,e,e,e,e,e,e],[e,e,e,e,e,e,e,e,e,e,e,e,e,e,t,e,e,g,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,t,t,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,g,g,g,g,g,g,g,g,g,g,g,e,t,t,t,t,t,t,t,t,t,t,t,t,t,t,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,g,g,g,g,g,g,g,g,g,b,b,t,t,t,t,b,t,t,t,t,t],[W,W,W,W,W,W,W,W,W,W,W,D,D,D,i,b,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,W,nt,rs,is,ns,as,os,Y,F,F,F,F,F,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,Y,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,W,D,D,D,D,D,t,t,t,t,t,D,D,D,D,D,D,k,i,t,t,k,k,k,k,k,k,st,st,t,t,t,i,k,k,k,k,k,k,k,k,k,k,st,st,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[i,i,i,i,i,i,i,t,t,t,t,t,t,t,t,t,t,t,t,i,i,i,i,i,t,t,t,t,t,b,g,b,b,b,b,b,b,b,b,b,b,st,b,b,b,b,b,b,b,b,b,b,b,b,b,t,b,b,b,b,b,t,b,t,b,b,t,b,b,t,b,b,b,b,b,b,b,b,b,b,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,g,g,g,g,g,g,g,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,Y,t,Y,t,t,Y,t,t,t,t,t,t,t,t,t,F,t,t,st,st,t,t,t,t,t,F,F,t,t,t,t,t,e,e,e,e,e,t,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,t,t,D],[t,t,t,F,F,F,t,t,t,t,t,st,Y,st,Y,Y,k,k,k,k,k,k,k,k,k,k,Y,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,i,i,i,i,i,i,t,t,i,i,i,i,i,i,t,t,i,i,i,i,i,i,t,t,i,i,i,t,t,t,F,F,t,t,t,F,F,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]];class us{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(s,r,a){if(this.sourceToTarget=[],this.targetToSource=[],!s)return"";if(Ps(this.sourceToTarget,this.targetToSource,s.length),!this.checkParameters(r,a))return s;r=this.inputFormat,a=this.outputFormat;let n=s;const o=Vs,c=ye(r.charAt(1)),h=ye(a.charAt(1)),u=(r.charAt(0)==="I"?"L":r.charAt(0))+c,f=(a.charAt(0)==="I"?"L":a.charAt(0))+h,d=r.charAt(2)+a.charAt(2);o.defInFormat=u,o.defOutFormat=f,o.defSwap=d;const p=Mt(s,u,f,d,o);let y=!1;return a.charAt(1)==="R"?y=!0:a.charAt(1)!=="C"&&a.charAt(1)!=="D"||(y=this.checkContextual(p)==="rtl"),this.sourceToTarget=X,this.targetToSource=Ds(this.sourceToTarget),Ht=this.targetToSource,n=r.charAt(3)===a.charAt(3)?p:a.charAt(3)==="S"?ds(y,p):ys(p,y,!0),this.sourceToTarget=X,this.targetToSource=Ht,this.levels=jt,n}_inputFormatSetter(s){if(!pe.test(s))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=s}_outputFormatSetter(s){if(!pe.test(s))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=s}checkParameters(s,r){return s?this._inputFormatSetter(s):s=this.inputFormat,r?this._outputFormatSetter(r):r=this.outputFormat,s!==r}checkContextual(s){let r=Gt(s);if(r!=="ltr"&&r!=="rtl"){try{r=document.dir.toLowerCase()}catch{}r!=="ltr"&&r!=="rtl"&&(r="ltr")}return r}hasBidiChar(s){return Rs.test(s)}}function Mt(l,s,r,a,n){const o=fs(l,{inFormat:s,outFormat:r,swap:a},n);if(o.inFormat===o.outFormat)return l;s=o.inFormat,r=o.outFormat,a=o.swap;const c=s.substring(0,1),h=s.substring(1,4),u=r.substring(0,1),f=r.substring(1,4);if(n.inFormat=s,n.outFormat=r,n.swap=a,c==="L"&&r==="VLTR"){if(h==="LTR")return n.dir=pt,ut(l,n);if(h==="RTL")return n.dir=Pt,ut(l,n)}if(c==="V"&&u==="V")return n.dir=h==="RTL"?Pt:pt,Qt(l,n);if(c==="L"&&r==="VRTL")return h==="LTR"?(n.dir=pt,l=ut(l,n)):(n.dir=Pt,l=ut(l,n)),Qt(l);if(s==="VLTR"&&r==="LLTR")return n.dir=pt,ut(l,n);if(c==="V"&&u==="L"&&h!==f)return l=Qt(l),h==="RTL"?Mt(l,"LLTR","VLTR",a,n):Mt(l,"LRTL","VRTL",a,n);if(s==="VRTL"&&r==="LRTL")return Mt(l,"LRTL","VRTL",a,n);if(c==="L"&&u==="L"){const d=n.swap;return n.swap=d.substr(0,1)+"N",h==="RTL"?(n.dir=Pt,l=ut(l,n),n.swap="N"+d.substr(1,2),n.dir=pt,l=ut(l,n)):(n.dir=pt,l=ut(l,n),n.swap="N"+d.substr(1,2),l=Mt(l,"VLTR","LRTL",n.swap,n)),l}return l}function fs(l,s,r){if(s.inFormat===void 0&&(s.inFormat=r.defInFormat),s.outFormat===void 0&&(s.outFormat=r.defOutFormat),s.swap===void 0&&(s.swap=r.defSwap),s.inFormat===s.outFormat)return s;const a=s.inFormat.substring(0,1),n=s.outFormat.substring(0,1);let o,c=s.inFormat.substring(1,4),h=s.outFormat.substring(1,4);return c.charAt(0)==="C"&&(o=Gt(l),c=o==="ltr"||o==="rtl"?o.toUpperCase():s.inFormat.charAt(2)==="L"?"LTR":"RTL",s.inFormat=a+c),h.charAt(0)==="C"&&(o=Gt(l),o==="rtl"?h="RTL":o==="ltr"?(o=xs(l),h=o.toUpperCase()):h=s.outFormat.charAt(2)==="L"?"LTR":"RTL",s.outFormat=n+h),s}function ds(l,s,r){if(s.length===0)return"";l===void 0&&(l=!0);const a=(s=String(s)).split("");let n=0,o=1,c=a.length;l||(n=a.length-1,o=-1,c=1);const h=gs(a,n,o,c);let u="";for(let f=0;f-1?(De(Ht,f,!l,-1),X.splice(f,1)):u+=a[f];return u}function gs(l,s,r,a,n){let o=0;const c=[];let h=0;for(let u=s;u*r="ﹰ"&&n[o]<"\uFEFF"){const h=l.charCodeAt(o);n[o]>="ﻵ"&&n[o]<="ﻼ"?(s?(o>0&&r&&n[o-1]===" "?a=a.substring(0,a.length-1)+"ل":(a+="ل",c=!0),a+=bt[(h-65269)/2]):(a+=bt[(h-65269)/2],a+="ل",o+10)if(y===16){for(let _=c;_-1){for(let _=c;_=0&&l[o]===W;o--)s[o]=a.dir}}function _s(l,s,r){if(r.hiLevel!==0&&r.swap.substr(0,1)!==r.swap.substr(1,2))for(let a=0;a>8];return r=de[s]&&l<=ts[s])return!0;return!1}function ge(l,s,r,a){for(;s*r=l){for(o=d+1;o=l;)o++;for(c=d,h=o-1;c(n.lastArabic=!1,i),UBAT_R:()=>(n.lastArabic=!1,b),UBAT_ON:()=>t,UBAT_AN:()=>z,UBAT_EN:()=>n.lastArabic?z:k,UBAT_AL:()=>(n.lastArabic=!0,n.hasUbatAl=!0,b),UBAT_WS:()=>t,UBAT_CS:()=>{let c,h;return a<1||a+1>=s.length||(c=r[a-1])!==k&&c!==z||(h=s[a+1])!==k&&h!==z?t:(n.lastArabic&&(h=z),h===c?h:t)},UBAT_ES:()=>(a>0?r[a-1]:nt)===k&&a+1{if(a>0&&r[a-1]===k)return k;if(n.lastArabic)return t;let c=a+1;const h=s.length;for(;c{if(n.inFormat==="VLTR"){const c=s.length;let h=a+1;for(;h=1425&&u<=2303||u===64286,d=s[h];if(f&&(d===b||d===e))return b}}return a<1||s[a-1]===nt?t:r[a-1]},UBAT_B:()=>(n.lastArabic=!0,n.hasUbatB=!0,n.dir),UBAT_S:()=>(n.hasUbatS=!0,t),UBAT_LRE:()=>(n.lastArabic=!1,t),UBAT_RLE:()=>(n.lastArabic=!1,t),UBAT_LRO:()=>(n.lastArabic=!1,t),UBAT_RLO:()=>(n.lastArabic=!1,t),UBAT_PDF:()=>(n.lastArabic=!1,t),UBAT_BN:()=>t}[ls[o]]()}function As(l){let s,r=0,a=Et.length-1;for(;r<=a;)if(s=Math.floor((r+a)/2),lEt[s][0]))return Et[s][1];r=s+1}return l}function Ls(l){for(let s=0;s="ً"&&l<="ٕ"}function ye(l){return l==="L"?"LTR":l==="R"?"RTL":l==="C"?"CLR":l==="D"?"CRL":""}function Bs(l,s,r,a){for(;s*rs||!r&&l[n]===s)&&(l[n]+=a)}let X=[],Ht=[],jt=[];const Vs={dir:0,defInFormat:"LLTR",defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},Ss=5,ks=6,pt=0,Pt=1,pe=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,Rs=/[\u0591-\u06ff\ufb1d-\ufefc]/;function Fs(l){return l===746||l===747||!(l<4352)&&(l>=12704&&l<=12735||l>=12544&&l<=12591||l>=65072&&l<=65103&&!(l>=65097&&l<=65103)||l>=63744&&l<=64255||l>=13056&&l<=13311||l>=11904&&l<=12031||l>=12736&&l<=12783||l>=12288&&l<=12351&&!(l>=12296&&l<=12305||l>=12308&&l<=12319||l===12336)||l>=13312&&l<=19903||l>=19968&&l<=40959||l>=12800&&l<=13055||l>=12592&&l<=12687||l>=43360&&l<=43391||l>=55216&&l<=55295||l>=4352&&l<=4607||l>=44032&&l<=55215||l>=12352&&l<=12447||l>=12272&&l<=12287||l>=12688&&l<=12703||l>=12032&&l<=12255||l>=12784&&l<=12799||l>=12448&&l<=12543&&l!==12540||l>=65280&&l<=65519&&!(l===65288||l===65289||l===65293||l>=65306&&l<=65310||l===65339||l===65341||l===65343||l>=65371&&l<=65503||l===65507||l>=65512&&l<=65519)||l>=65104&&l<=65135&&!(l>=65112&&l<=65118||l>=65123&&l<=65126)||l>=5120&&l<=5759||l>=6320&&l<=6399||l>=65040&&l<=65055||l>=19904&&l<=19967||l>=40960&&l<=42127||l>=42128&&l<=42191)}function vs(l){return!(l<11904)&&(l>=12704&&l<=12735||l>=12544&&l<=12591||l>=65072&&l<=65103||l>=63744&&l<=64255||l>=13056&&l<=13311||l>=11904&&l<=12031||l>=12736&&l<=12783||l>=12288&&l<=12351||l>=13312&&l<=19903||l>=19968&&l<=40959||l>=12800&&l<=13055||l>=65280&&l<=65519||l>=12352&&l<=12447||l>=12272&&l<=12287||l>=12032&&l<=12255||l>=12784&&l<=12799||l>=12448&&l<=12543||l>=65040&&l<=65055||l>=42128&&l<=42191||l>=40960&&l<=42127)}function Cs(l){switch(l){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function _e(l){switch(l){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}const at=24,Ve=17;let Se=class{constructor(s,r,a,n,o,c,h){this._glyphItems=s,this._maxWidth=r,this._lineHeight=a,this._letterSpacing=n,this._hAnchor=o,this._vAnchor=c,this._justify=h}getShaping(s,r,a){const n=this._letterSpacing,o=this._lineHeight,c=this._justify,h=this._maxWidth,u=[];let f=0,d=0;for(const I of s){const w=I.codePointAt(0);if(w==null)continue;const P=a&&Fs(w);let A;for(const M of this._glyphItems)if(A=M[w],A)break;u.push({codePoint:w,x:f,y:d,vertical:P,glyphMosaicItem:A}),A&&(f+=A.metrics.advance+n)}let p=f;h>0&&(p=f/Math.max(1,Math.ceil(f/h)));const y=s.includes("​"),x=[],_=u.length;for(let I=0;I<_-1;I++){const w=u[I].codePoint,P=vs(w);if(Cs(w)||P){let A=0;if(w===10)A-=1e4;else if(P&&y)A+=150;else{w!==40&&w!==65288||(A+=50);const M=u[I+1].codePoint;M!==41&&M!==65289||(A+=50)}x.push(this._buildBreak(I+1,u[I].x,p,x,A,!1))}}const T=this._optimalBreaks(this._buildBreak(_,f,p,x,0,!0));let B=0;const m=r?-o:o;let L=0;for(let I=0;IP&&_e(u[A].codePoint);)u[A].glyphMosaicItem=null,--A;if(P<=A){const M=u[P].x;for(let S=P;S<=A;S++)u[S].x-=M,u[S].y=d;let R=u[A].x;u[A].glyphMosaicItem&&(R+=u[A].glyphMosaicItem.metrics.advance),B=Math.max(R,B),c&&this._applyJustification(u,P,A)}L=w,d+=m}if(u.length>0){const I=T.length-1,w=(c-this._hAnchor)*B;let P=(-this._vAnchor*(I+1)+.5)*o;r&&I&&(P+=I*o);for(const A of u)A.x+=w,A.y+=P}return u.filter(I=>I.glyphMosaicItem)}static getTextBox(s,r){if(!s.length)return null;let a=1/0,n=1/0,o=0,c=0;for(const h of s){const u=h.glyphMosaicItem.metrics.advance,f=h.x,d=h.y-Ve,p=f+u,y=d+r;a=Math.min(a,f),o=Math.max(o,p),n=Math.min(n,d),c=Math.max(c,y)}return{x:a,y:n,width:o-a,height:c-n}}static getBox(s){if(!s.length)return null;let r=1/0,a=1/0,n=0,o=0;for(const c of s){const{height:h,left:u,top:f,width:d}=c.glyphMosaicItem.metrics,p=c.x,y=c.y-(h-Math.abs(f)),x=p+d+u,_=y+h;r=Math.min(r,p),n=Math.max(n,x),a=Math.min(a,y),o=Math.max(o,_)}return{x:r,y:a,width:n-r,height:o-a}}static addDecoration(s,r){const a=s.length;if(a===0)return;const n=3;let o=s[0].x+s[0].glyphMosaicItem.metrics.left,c=s[0].y;for(let u=1;u=0&&h,x=n.allowOverlap&&n.ignorePlacement?null:[],_=[],T=4,B=!y;let m=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,I=m,w=L;const P=(y||h)&&u,A=n.size/at;let M=!1;for(const V of r)if(V.vertical){M=!0;break}let R,S=0,v=0;if(!y&&M){const V=Se.getTextBox(r,n.lineHeight*at);switch(n.anchor){case O.LEFT:S=V.height/2,v=-V.width/2;break;case O.RIGHT:S=-V.height/2,v=V.width/2;break;case O.TOP:S=V.height/2,v=V.width/2;break;case O.BOTTOM:S=-V.height/2,v=-V.width/2;break;case O.TOP_LEFT:S=V.height;break;case O.BOTTOM_LEFT:v=-V.width;break;case O.TOP_RIGHT:v=V.width;break;case O.BOTTOM_RIGHT:S=-V.height}}S+=n.offset[0]*at,v+=n.offset[1]*at;for(const V of r){const $=V.glyphMosaicItem;if(!$||$.rect.isEmpty)continue;const E=$.rect,N=$.metrics,K=$.page;if(x&&B){if(R!==void 0&&R!==V.y){let G,q,Z,J;M?(G=-w+S,q=m+v,Z=w-I,J=L-m):(G=m+S,q=I+v,Z=L-m,J=w-I);const tt={xTile:s.x,yTile:s.y,dxPixels:G*A-f,dyPixels:q*A-f,hard:!n.optional,partIndex:1,width:Z*A+2*f,height:J*A+2*f,angle:c,minLod:xt,maxLod:mt};x.push(tt),m=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,I=m,w=L}R=V.y}const ft=[];if(y){const G=.5*$.metrics.width,q=(V.x+N.left-T+G)*A*Dt;if(d=this._placeGlyph(s,d,q,a,s.segment,1,V.vertical,K,ft),u&&(d=this._placeGlyph(s,d,q,a,s.segment,-1,V.vertical,K,ft)),d>=te)break}else ft.push(new Nt(o,p,p,K,!1)),h&&u&&ft.push(new Nt(o,p+Bt,p+Bt,K,!1));const et=V.x+N.left,lt=V.y-Ve-N.top,dt=et+N.width,qt=lt+N.height;let j,rt,St,kt,gt,Rt,re,ie;if(!y&&M)if(V.vertical){const G=(et+dt)/2-N.height/2,q=(lt+qt)/2+N.width/2;j=new C(-q-T+S,G-T+v),rt=new C(j.x+E.width,j.y+E.height),St=new C(j.x,rt.y),kt=new C(rt.x,j.y)}else j=new C(-lt+T+S,et-T+v),rt=new C(j.x-E.height,j.y+E.width),St=new C(rt.x,j.y),kt=new C(j.x,rt.y);else j=new C(et-T+S,lt-T+v),rt=new C(j.x+E.width,j.y+E.height),St=new C(j.x,rt.y),kt=new C(rt.x,j.y);for(const G of ft){let q,Z,J,tt;if(G.alternateVerticalGlyph){if(!gt){const ht=(lt+qt)/2+v;gt=new C((et+dt)/2+S-N.height/2-T,ht+N.width/2+T),Rt=new C(gt.x+E.height,gt.y-E.width),re=new C(Rt.x,gt.y),ie=new C(gt.x,Rt.y)}q=gt,Z=re,J=ie,tt=Rt}else q=j,Z=St,J=kt,tt=rt;const Ft=lt,Yt=qt,vt=G.glyphAngle+c;if(vt!==0){const ht=Math.cos(vt),Ct=Math.sin(vt);q=q.clone(),Z=Z==null?void 0:Z.clone(),J=J==null?void 0:J.clone(),tt=tt==null?void 0:tt.clone(),q.rotate(ht,Ct),tt==null||tt.rotate(ht,Ct),Z==null||Z.rotate(ht,Ct),J==null||J.rotate(ht,Ct)}let At=0,Lt=256;if(y&&M?V.vertical?G.alternateVerticalGlyph?(At=32,Lt=96):(At=224,Lt=32):(At=224,Lt=96):(At=192,Lt=64),_.push(new Te(q,J,Z,tt,E,G.labelAngle,At,Lt,G.anchor,G.minzoom,G.maxzoom,G.page)),x&&(!P||this._legible(G.labelAngle))){if(B)etL&&(L=dt),Yt>w&&(w=Yt);else if(G.minzoom=te)return null;if(x&&B){let V,$,E,N;M?(V=-w+S,$=m+v,E=w-I,N=L-m):(V=m+S,$=I+v,E=L-m,N=w-I);const K={xTile:s.x,yTile:s.y,dxPixels:V*A-f,dyPixels:$*A-f,hard:!n.optional,partIndex:1,width:E*A+2*f,height:N*A+2*f,angle:c,minLod:xt,maxLod:mt};x.push(K)}const U=new be(_);return x&&x.length>0&&(U.textColliders=x),U}_legible(s){const r=Be(s);return r<65||r>=193}_placeGlyph(s,r,a,n,o,c,h,u,f){let d=c;const p=d<0?le(s.angle+Bt,he):s.angle;let y=0;a<0&&(d*=-1,a*=-1,y=Bt),d>0&&++o;let x=new C(s.x,s.y),_=n[o],T=mt;if(n.length<=o)return T;for(;;){const B=_.x-x.x,m=_.y-x.y,L=Math.sqrt(B*B+m*m),I=Math.max(a/L,r),w=B/L,P=m/L,A=le(Math.atan2(P,w)+y,he);if(f.push(new Nt(x,p,A,u,!1,I,T)),h&&f.push(new Nt(x,p,A,u,!0,I,T)),I<=r)return I;x=_.clone();do{if(o+=d,n.length<=o||o<0)return I;_=n[o]}while(x.isEqual(_));let M=_.x-x.x,R=_.y-x.y;const S=Math.sqrt(M*M+R*R);M*=L/S,R*=L/S,x.x-=M,x.y-=R,T=I}}};var Tt;(function(l){l[l.moveTo=1]="moveTo",l[l.lineTo=2]="lineTo",l[l.close=7]="close"})(Tt||(Tt={}));let Es=class{constructor(s,r,a=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=a;const n=r.keys,o=r.values,c=s.asUnsafe();for(;c.next();)switch(c.tag()){case 1:this.id=c.getUInt64();break;case 2:{const h=c.getMessage().asUnsafe(),u=this.values;for(;!h.empty();){const f=h.getUInt32(),d=h.getUInt32();u[n[f]]=o[d]}h.release();break}case 3:this.type=c.getUInt32();break;case 4:this._pbfGeometry=c.getMessage();break;default:c.skip()}}getGeometry(s){if(this._geometry!==void 0)return this._geometry;if(!this._pbfGeometry)return null;const r=this._pbfGeometry.asUnsafe();let a,n;this._pbfGeometry=null,s?s.reset(this.type):a=[];let o,c=Tt.moveTo,h=0,u=0,f=0;for(;!r.empty();){if(h===0){const d=r.getUInt32();c=7&d,h=d>>3}switch(h--,c){case Tt.moveTo:u+=r.getSInt32(),f+=r.getSInt32(),s?s.moveTo(u,f):a&&(n&&a.push(n),n=[],n.push(new C(u,f)));break;case Tt.lineTo:u+=r.getSInt32(),f+=r.getSInt32(),s?s.lineTo(u,f):n&&n.push(new C(u,f));break;case Tt.close:s?s.close():n&&!n[0].equals(u,f)&&n.push(n[0].clone());break;default:throw r.release(),new Error("Invalid path operation")}}return s?o=s.result():a&&(n&&a.push(n),o=a),r.release(),this._geometry=o,o}},_t=class extends H{constructor(){super(12)}add(s,r,a){const n=this.array;n.push(s),n.push(r),n.push(a)}};class se{constructor(s){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=s.clone();const r=s.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.name=r.getString();break;case 3:this.keys.push(r.getString());break;case 4:this.values.push(r.processMessage(se._parseValue));break;case 5:this.extent=r.getUInt32();break;default:r.skip()}}getData(){return this._pbfLayer}static _parseValue(s){for(;s.next();)switch(s.tag()){case 1:return s.getString();case 2:return s.getFloat();case 3:return s.getDouble();case 4:return s.getInt64();case 5:return s.getUInt64();case 6:return s.getSInt64();case 7:return s.getBool();default:s.skip()}return null}}let Os=class extends H{constructor(s){super(s)}add(s,r,a,n,o,c,h,u,f,d,p,y){const x=this.array;let _=H.i1616to32(s,r);x.push(_);const T=31;_=H.i8888to32(Math.round(T*a),Math.round(T*n),Math.round(T*o),Math.round(T*c)),x.push(_),_=H.i8888to32(Math.round(T*h),Math.round(T*u),Math.round(T*f),Math.round(T*d)),x.push(_),_=H.i1616to32(p,0),x.push(_),y&&x.push(...y)}},Ns=class extends H{constructor(s){super(s)}add(s,r,a){const n=this.array;n.push(H.i1616to32(s,r)),a&&n.push(...a)}};class $s extends H{constructor(s){super(s)}add(s,r,a,n,o,c,h){const u=this.array,f=this.index;let d=H.i1616to32(s,r);u.push(d);const p=15;return d=H.i8888to32(Math.round(p*a),Math.round(p*n),o,c),u.push(d),h&&u.push(...h),f}}class Ae extends H{constructor(s){super(s)}add(s,r,a,n,o,c,h,u,f,d,p,y){const x=this.array;let _=H.i1616to32(s,r);x.push(_),_=H.i1616to32(Math.round(8*a),Math.round(8*n)),x.push(_),_=H.i8888to32(o/4,c/4,u,f),x.push(_),_=H.i8888to32(0,Be(h),10*d,Math.min(10*p,255)),x.push(_),y&&x.push(...y)}}class zs extends H{constructor(s){super(s)}add(s,r,a,n,o){const c=this.array,h=H.i1616to32(2*s+a,2*r+n);c.push(h),o&&c.push(...o)}}class Wt{constructor(s,r,a){this.layerExtent=4096,this._features=[],this.layer=s,this.zoom=r,this._spriteInfo=a,this._filter=s.getFeatureFilter()}pushFeature(s){this._filter&&!this._filter.filter(s,this.zoom)||this._features.push(s)}hasFeatures(){return this._features.length>0}getResources(s,r,a){}}let Gs=class extends Wt{constructor(s,r,a,n,o){super(s,r,a),this.type=Kt.CIRCLE,this._circleVertexBuffer=n,this._circleIndexBuffer=o}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(s){const r=this._circleVertexBuffer,a=this._circleIndexBuffer;this._circleIndexStart=3*a.index,this._circleIndexCount=0;const n=this.layer,o=this.zoom;s&&s.setExtent(this.layerExtent);for(const c of this._features){const h=c.getGeometry(s);if(!h)continue;const u=n.circleMaterial.encodeAttributes(c,o,n);for(const f of h)if(f)for(const d of f){const p=r.index;r.add(d.x,d.y,0,0,u),r.add(d.x,d.y,0,1,u),r.add(d.x,d.y,1,0,u),r.add(d.x,d.y,1,1,u),a.add(p,p+1,p+2),a.add(p+1,p+2,p+3),this._circleIndexCount+=6}}}serialize(){let s=6;s+=this.layerUIDs.length,s+=this._circleVertexBuffer.array.length,s+=this._circleIndexBuffer.array.length;const r=new Uint32Array(s),a=new Int32Array(r.buffer);let n=0;r[n++]=this.type,r[n++]=this.layerUIDs.length;for(let o=0;ow.page-P.page);for(const{ddFillAttributes:w,ddOutlineAttributes:P,page:A,geometry:M}of x)this._processFeature(M,d,r.outlineUsesFillColor,w,P,y,A)}}else for(const x of p){const _=c?n.encodeAttributes(x,a,r):null,T=d&&h?o.encodeAttributes(x,a,r):null,B=x.getGeometry(s);this._processFeature(B,d,r.outlineUsesFillColor,_,T,y)}}serialize(){let s=10;s+=this.layerUIDs.length,s+=this._fillVertexBuffer.array.length,s+=this._fillIndexBuffer.array.length,s+=this._outlineVertexBuffer.array.length,s+=this._outlineIndexBuffer.array.length,s+=3*this._patternMap.size+1;const r=new Uint32Array(s),a=new Int32Array(r.buffer);let n=0;r[n++]=this.type,r[n++]=this.layerUIDs.length;for(let h=0;h0)for(const[h,[u,f]]of o)r[n++]=h,r[n++]=u,r[n++]=f;r[n++]=this._fillVertexBuffer.array.length;for(let h=0;hd?(p!==void 0&&this._processFill(s,p,n,c,h),p=[y]):x<-d&&p!==void 0&&p.push(y)}p!==void 0&&this._processFill(s,p,n,c,h)}_processOutline(s,r){const a=this._outlineVertexBuffer,n=this._outlineIndexBuffer,o=n.index;let c,h,u;const f=new C(0,0),d=new C(0,0),p=new C(0,0);let y=-1,x=-1,_=-1,T=-1,B=-1,m=!1;const L=0;let I=s.length;if(I<2)return;const w=s[L];let P=s[I-1];for(;I&&P.isEqual(w);)--I,P=s[I-1];if(!(I-L<2)){for(let A=L;A8&&(v=8),R>=0?(_=a.add(h.x,h.y,f.x,f.y,0,1,r),T===-1&&(T=_),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),x=a.add(h.x,h.y,v*-p.x,v*-p.y,0,-1,r),B===-1&&(B=x),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),y=x,x=_,_=a.add(h.x,h.y,p.x,p.y,0,1,r),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),x=a.add(h.x,h.y,d.x,d.y,0,1,r),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_)):(_=a.add(h.x,h.y,v*p.x,v*p.y,0,1,r),T===-1&&(T=_),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),x=a.add(h.x,h.y,-f.x,-f.y,0,-1,r),B===-1&&(B=x),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),y=x,x=_,_=a.add(h.x,h.y,-p.x,-p.y,0,-1,r),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_),y=a.add(h.x,h.y,-d.x,-d.y,0,-1,r),y>=0&&x>=0&&_>=0&&!M&&n.add(y,x,_))}y>=0&&x>=0&&T>=0&&!m&&n.add(y,x,T),y>=0&&T>=0&&B>=0&&!m&&n.add(y,B,T),this._outlineIndexCount+=3*(n.index-o)}}_processFill(s,r,a,n,o){n=!0;let c;r.length>1&&(c=[]);let h=0;for(const p of r)h!==0&&c.push(h),h+=s[p].length;const u=2*h,f=ne.acquire();for(const p of r){const y=s[p],x=y.length;for(let _=0;_0){const p=r.map(_=>s[_].length),{buffer:y,vertexCount:x}=Ge(f,p);if(x>0){const _=this._fillVertexBuffer.index;for(let T=0;T0){const y=this._fillVertexBuffer.index;let x=0;for(;x=4160:s.y===r.y&&(s.y<=-64||s.y>=4160)}static _area(s){let r=0;const a=s.length-1;for(let n=0;nV.page-$.page),o.textured=!0;for(const{ddAttributes:V,page:$,cap:E,join:N,miterLimit:K,roundLimit:ft,halfWidth:et,offset:lt,geometry:dt}of U)o.capType=E,o.joinType=N,o.miterLimit=K,o.roundLimit=ft,o.halfWidth=et,o.offset=lt,this._processFeature(dt,V,$)}else{if(u){const U=u.getValue(a),V=this._spriteInfo[U];if(!(V!=null&&V.rect))return}o.textured=!(!u&&!f),o.capType=_,o.joinType=L,o.miterLimit=w,o.roundLimit=A,o.halfWidth=.5*R,o.offset=v;for(const U of n){const V=c?h.encodeAttributes(U,a,r):null;x&&(o.capType=x.getValue(a,U)),m&&(o.joinType=m.getValue(a,U)),I&&(o.miterLimit=I.getValue(a,U)),P&&(o.roundLimit=P.getValue(a,U)),M&&(o.halfWidth=.5*M.getValue(a,U)),S&&(o.offset=S.getValue(a,U));const $=U.getGeometry(s);this._processFeature($,V)}}}serialize(){let s=6;s+=this.layerUIDs.length,s+=this.tessellationProperties._lineVertexBuffer.array.length,s+=this.tessellationProperties._lineIndexBuffer.array.length,s+=3*this._patternMap.size+1;const r=new Uint32Array(s),a=new Int32Array(r.buffer);let n=0;r[n++]=this.type,r[n++]=this.layerUIDs.length;for(let h=0;h0)for(const[h,[u,f]]of o)r[n++]=h,r[n++]=u,r[n++]=f;r[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let h=0;h(s,r,a,n,o,c,h,u,f,d,p)=>(l._lineVertexBuffer.add(s,r,h,u,a,n,o,c,f,d,p,l._ddValues),l._lineVertexBuffer.index-1),qs=l=>(s,r,a)=>{l._lineIndexBuffer.add(s,r,a)},Le=10;function Ys(l,s){return l.iconMosaicItem&&s.iconMosaicItem?l.iconMosaicItem.page===s.iconMosaicItem.page?0:l.iconMosaicItem.page-s.iconMosaicItem.page:l.iconMosaicItem&&!s.iconMosaicItem?1:!l.iconMosaicItem&&s.iconMosaicItem?-1:0}class Q extends Wt{constructor(s,r,a,n,o,c,h,u,f){super(r,a,f.getSpriteItems()),this.type=Kt.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=s,this._iconVertexBuffer=n,this._iconIndexBuffer=o,this._textVertexBuffer=c,this._textIndexBuffer=h,this._placementEngine=u,this._workerTileHandler=f}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(s,r,a){const n=this.layer,o=this.zoom;s&&s.setExtent(this.layerExtent);const c=n.getLayoutProperty("icon-image"),h=n.getLayoutProperty("text-field");let u=n.getLayoutProperty("text-transform"),f=n.getLayoutProperty("text-font");const d=[];let p,y,x,_;c&&!c.isDataDriven&&(p=c.getValue(o)),h&&!h.isDataDriven&&(y=h.getValue(o)),u&&u.isDataDriven||(x=n.getLayoutValue("text-transform",o),u=null),f&&f.isDataDriven||(_=n.getLayoutValue("text-font",o),f=null);for(const T of this._features){const B=T.getGeometry(s);if(!B||B.length===0)continue;let m,L;c&&(m=c.isDataDriven?c.getValue(o,T):this._replaceKeys(p,T.values),m&&r(m));let I=!1;if(h&&(L=h.isDataDriven?h.getValue(o,T):this._replaceKeys(y,T.values),L)){switch(L=L.replaceAll("\\n",` +`),u&&(x=u.getValue(o,T)),x){case oe.LOWERCASE:L=L.toLowerCase();break;case oe.UPPERCASE:L=L.toUpperCase()}if(Q._bidiEngine.hasBidiChar(L)){let A;A=Q._bidiEngine.checkContextual(L)==="rtl"?"IDNNN":"ICNNN",L=Q._bidiEngine.bidiTransform(L,A,"VLYSN"),I=!0}if(L.length>0){f&&(_=f.getValue(o,T));for(const A of _){let M=a[A];M||(M=a[A]=new Set);for(const R of L){const S=R.codePointAt(0);S!=null&&M.add(S)}}}}if(!m&&!L)continue;const w=n.getLayoutValue("symbol-sort-key",o,T),P={feature:T,sprite:m,label:L,rtl:I,geometry:B,hash:(L?ae(L):0)^(m?ae(m):0),priority:w,textFont:_};d.push(P)}this._symbolFeatures=d}processFeatures(s){s&&s.setExtent(this.layerExtent);const r=this.layer,a=this.zoom,n=r.getLayoutValue("symbol-placement",a),o=n!==Zt.POINT,c=r.getLayoutValue("symbol-spacing",a)*Dt,h=r.getLayoutProperty("icon-image"),u=r.getLayoutProperty("text-field"),f=h?new ve(r,a,o):null,d=u?new Ce(r,a,o):null,p=this._workerTileHandler;let y;h&&(y=p.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const x=[];let _=1;d!=null&&d.size&&(_=d.size/at);const T=d?d.maxAngle*ee:0,B=d?d.size*Dt:0;for(const m of this._symbolFeatures){let L;f&&y&&m.sprite&&(L=y[m.sprite],L&&L.sdf&&(this._isIconSDF=!0));let I;L&&f.update(a,m.feature);let w=0;const P=m.label;if(P){Re(d),d.update(a,m.feature);const A=o&&d.rotationAlignment===It.MAP?d.keepUpright:d.writingMode&&d.writingMode.includes(Ue.VERTICAL);let M=.5;switch(d.anchor){case O.TOP_LEFT:case O.LEFT:case O.BOTTOM_LEFT:M=0;break;case O.TOP_RIGHT:case O.RIGHT:case O.BOTTOM_RIGHT:M=1}let R=.5;switch(d.anchor){case O.TOP_LEFT:case O.TOP:case O.TOP_RIGHT:R=0;break;case O.BOTTOM_LEFT:case O.BOTTOM:case O.BOTTOM_RIGHT:R=1}let S=.5;switch(d.justify){case Jt.AUTO:S=M;break;case Jt.LEFT:S=0;break;case Jt.RIGHT:S=1}const v=d.letterSpacing*at,U=o?0:d.maxWidth*at,V=d.lineHeight*at,$=m.textFont.map(E=>p.getGlyphItems(E));if(I=new Se($,U,V,v,M,R,S).getShaping(P,m.rtl,A),I&&I.length>0){let E=1e30,N=-1e30;for(const K of I)E=Math.min(E,K.x),N=Math.max(N,K.x);w=(N-E+2*at)*_*Dt}}for(let A of m.geometry){const M=[];if(n===Zt.LINE){if(I!=null&&I.length&&(d!=null&&d.size)){const R=d.size*Dt*(2+Math.min(2,4*Math.abs(d.offset[1])));A=Q._smoothVertices(A,R)}Q._pushAnchors(M,A,c,w)}else n===Zt.LINE_CENTER?Q._pushCenterAnchor(M,A):m.feature.type===Oe.Polygon?Q._pushCentroid(M,A):M.push(new Ot(A[0].x,A[0].y));for(const R of M){if(R.x<0||R.x>Ie||R.y<0||R.y>Ie||o&&w>0&&(d==null?void 0:d.rotationAlignment)===It.MAP&&!Q._honorsTextMaxAngle(A,R,w,T,B))continue;const S={shaping:I,line:A,iconMosaicItem:L,anchor:R,symbolFeature:m,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};x.push(S),this._processFeature(S,f,d)}}}x.sort(Ys),this._addPlacedGlyphs(),this._symbolInstances=x}serialize(){let s=14;s+=this.layerUIDs.length,s+=3*this.markerPageMap.size,s+=3*this.glyphsPageMap.size,s+=Q._symbolsSerializationLength(this._symbolInstances),s+=this._iconVertexBuffer.array.length,s+=this._iconIndexBuffer.array.length,s+=this._textVertexBuffer.array.length,s+=this._textIndexBuffer.array.length;const r=new Uint32Array(s),a=new Int32Array(r.buffer),n=new Float32Array(r.buffer),[o,c,h]=this._sourceTileKey.split("/");let u=0;r[u++]=this.type,r[u++]=this.layerUIDs.length;for(let f=0;fn in r?r[n]:"")}_processFeature(s,r,a){const{line:n,iconMosaicItem:o,shaping:c,anchor:h}=s,u=this.zoom,f=this.layer,d=!!o;let p=!0;d&&(p=(r==null?void 0:r.optional)||!o);const y=c&&c.length>0,x=!y||(a==null?void 0:a.optional);let _,T;if(d&&(_=this._placementEngine.getIconPlacement(h,o,r)),(_||p)&&(y&&(T=this._placementEngine.getTextPlacement(h,c,n,a)),T||x)){if(_&&T||(x||p?x||T?p||_||(T=null):_=null:(_=null,T=null)),T){const B=f.hasDataDrivenText?f.textMaterial.encodeAttributes(s.symbolFeature.feature,u,f):null;if(this._storePlacedGlyphs(s,T.shapes,u,a.rotationAlignment,B),T.textColliders){s.textColliders=T.textColliders;for(const m of T.textColliders){m.minLod=Math.max(u+ct(m.minLod),0),m.maxLod=Math.min(u+ct(m.maxLod),25);const L=m.angle;if(L){const I=Math.cos(L),w=Math.sin(L),P=m.dxPixels*I-m.dyPixels*w,A=m.dxPixels*w+m.dyPixels*I,M=(m.dxPixels+m.width)*I-m.dyPixels*w,R=(m.dxPixels+m.width)*w+m.dyPixels*I,S=m.dxPixels*I-(m.dyPixels+m.height)*w,v=m.dxPixels*w+(m.dyPixels+m.height)*I,U=(m.dxPixels+m.width)*I-(m.dyPixels+m.height)*w,V=(m.dxPixels+m.width)*w+(m.dyPixels+m.height)*I,$=Math.min(P,M,S,U),E=Math.max(P,M,S,U),N=Math.min(A,R,v,V),K=Math.max(A,R,v,V);m.dxPixels=$,m.dyPixels=N,m.width=E-$,m.height=K-N}}}}if(_){const B=f.hasDataDrivenIcon?f.iconMaterial.encodeAttributes(s.symbolFeature.feature,u,f):null;if(this._addPlacedIcons(s,_.shapes,u,o.page,r.rotationAlignment===It.VIEWPORT,B),_.iconColliders){s.iconColliders=_.iconColliders;for(const m of _.iconColliders){m.minLod=Math.max(u+ct(m.minLod),0),m.maxLod=Math.min(u+ct(m.maxLod),25);const L=m.angle;if(L){const I=Math.cos(L),w=Math.sin(L),P=m.dxPixels*I-m.dyPixels*w,A=m.dxPixels*w+m.dyPixels*I,M=(m.dxPixels+m.width)*I-m.dyPixels*w,R=(m.dxPixels+m.width)*w+m.dyPixels*I,S=m.dxPixels*I-(m.dyPixels+m.height)*w,v=m.dxPixels*w+(m.dyPixels+m.height)*I,U=(m.dxPixels+m.width)*I-(m.dyPixels+m.height)*w,V=(m.dxPixels+m.width)*w+(m.dyPixels+m.height)*I,$=Math.min(P,M,S,U),E=Math.max(P,M,S,U),N=Math.min(A,R,v,V),K=Math.max(A,R,v,V);m.dxPixels=$,m.dyPixels=N,m.width=E-$,m.height=K-N}}}}}}_addPlacedIcons(s,r,a,n,o,c){const h=Math.max(a-1,0),u=this._iconVertexBuffer,f=this._iconIndexBuffer,d=this._markerMap;for(const p of r){const y=o?0:Math.max(a+ct(p.minzoom),h),x=o?25:Math.min(a+ct(p.maxzoom),25);if(x<=y)continue;const _=p.tl,T=p.tr,B=p.bl,m=p.br,L=p.mosaicRect,I=p.labelAngle,w=p.minAngle,P=p.maxAngle,A=p.anchor,M=u.index,R=L.x,S=L.y,v=R+L.width,U=S+L.height,V=u.index;u.add(A.x,A.y,_.x,_.y,R,S,I,w,P,y,x,c),u.add(A.x,A.y,T.x,T.y,v,S,I,w,P,y,x,c),u.add(A.x,A.y,B.x,B.y,R,U,I,w,P,y,x,c),u.add(A.x,A.y,m.x,m.y,v,U,I,w,P,y,x,c),s.iconVertexRanges.length>0&&s.iconVertexRanges[0][0]+s.iconVertexRanges[0][1]===V?s.iconVertexRanges[0][1]+=4:s.iconVertexRanges.push([V,4]),f.add(M,M+1,M+2),f.add(M+1,M+2,M+3),d.has(n)?d.get(n)[1]+=6:d.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const s=this._textVertexBuffer,r=this._textIndexBuffer,a=this._glyphMap;for(const[n,o]of this._glyphBufferDataStorage)for(const c of o){const h=s.index,u=c.symbolInstance,f=c.ddAttributes,d=s.index;s.add(c.glyphAnchor[0],c.glyphAnchor[1],c.tl[0],c.tl[1],c.xmin,c.ymin,c.labelAngle,c.minAngle,c.maxAngle,c.minLod,c.maxLod,f),s.add(c.glyphAnchor[0],c.glyphAnchor[1],c.tr[0],c.tr[1],c.xmax,c.ymin,c.labelAngle,c.minAngle,c.maxAngle,c.minLod,c.maxLod,f),s.add(c.glyphAnchor[0],c.glyphAnchor[1],c.bl[0],c.bl[1],c.xmin,c.ymax,c.labelAngle,c.minAngle,c.maxAngle,c.minLod,c.maxLod,f),s.add(c.glyphAnchor[0],c.glyphAnchor[1],c.br[0],c.br[1],c.xmax,c.ymax,c.labelAngle,c.minAngle,c.maxAngle,c.minLod,c.maxLod,f),u.textVertexRanges.length>0&&u.textVertexRanges[0][0]+u.textVertexRanges[0][1]===d?u.textVertexRanges[0][1]+=4:u.textVertexRanges.push([d,4]),r.add(h,h+1,h+2),r.add(h+1,h+2,h+3),a.has(n)?a.get(n)[1]+=6:a.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(s,r,a,n,o){const c=Math.max(a-1,0),h=n===It.VIEWPORT;let u,f,d,p,y,x,_,T,B,m,L;for(const I of r)u=h?0:Math.max(a+ct(I.minzoom),c),f=h?25:Math.min(a+ct(I.maxzoom),25),!(f<=u)&&(d=I.tl,p=I.tr,y=I.bl,x=I.br,_=I.labelAngle,T=I.minAngle,B=I.maxAngle,m=I.anchor,L=I.mosaicRect,this._glyphBufferDataStorage.has(I.page)||this._glyphBufferDataStorage.set(I.page,[]),this._glyphBufferDataStorage.get(I.page).push({glyphAnchor:[m.x,m.y],tl:[d.x,d.y],tr:[p.x,p.y],bl:[y.x,y.y],br:[x.x,x.y],xmin:L.x,ymin:L.y,xmax:L.x+L.width,ymax:L.y+L.height,labelAngle:_,minAngle:T,maxAngle:B,minLod:u,maxLod:f,placementLod:c,symbolInstance:s,ddAttributes:o}))}static _pushAnchors(s,r,a,n){a+=n;let o=0;const c=r.length-1;for(let y=0;y-h;){if(--f,f<0)return!1;c-=C.distance(s[f],u),u=s[f]}c+=C.distance(s[f],s[f+1]);const d=[];let p=0;const y=s.length;for(;co;)p-=d.shift().deviation;if(Math.abs(p)>n)return!1;c+=C.distance(_,B),f=T}return!0}static _smoothVertices(s,r){if(r<=0)return s;let a=s.length;if(a<3)return s;const n=[];let o=0,c=0;n.push(0);for(let T=1;T0&&(o+=B,n.push(o),c++,c!==T&&(s[c]=s[T]))}if(a=c+1,a<3)return s;r=Math.min(r,.2*o);const h=s[0].x,u=s[0].y,f=s[a-1].x,d=s[a-1].y,p=C.sub(s[0],s[1]);p.normalize(),s[0].x+=r*p.x,s[0].y+=r*p.y,p.assignSub(s[a-1],s[a-2]),p.normalize(),s[a-1].x+=r*p.x,s[a-1].y+=r*p.y,n[0]-=r,n[a-1]+=r;const y=[];y.push(new C(h,u));const x=1e-6,_=.5*r;for(let T=1;T=0;I--){const w=_+n[I+1]-n[T];if(w<0)break;const P=n[I+1]-n[I],A=n[T]-n[I]<_?1:w/P;if(A4096&&(p=4096),p<0&&(p=0),y>4096&&(y=4096),y<0&&(y=0);for(let x=1;x4096&&(_=4096),_<0&&(_=0),T>4096&&(T=4096),T<0&&(T=0),B>4096&&(B=4096),B<0&&(B=0),m>4096&&(m=4096),m<0&&(m=0);const L=(_-p)*(m-y)-(B-p)*(T-y);u+=L*(p+_+B),f+=L*(y+T+m),d+=L}u/=3*d,f/=3*d,isNaN(u)||isNaN(f)||s.push(new Ot(u,f))}}Q._bidiEngine=new us;var ot;(function(l){l[l.INITIALIZED=0]="INITIALIZED",l[l.NO_DATA=1]="NO_DATA",l[l.READY=2]="READY",l[l.MODIFIED=3]="MODIFIED",l[l.INVALID=4]="INVALID"})(ot||(ot={}));class Zs{constructor(s,r,a,n,o,c){var p;if(this._pbfTiles={},this._tileClippers={},this._client=a,this._tile=r,this._sourceDataMaxLOD=n,c){this._styleLayerUIDs=new Set;for(const y of c)this._styleLayerUIDs.add(y)}this._styleRepository=o,this._layers=((p=this._styleRepository)==null?void 0:p.layers)??[];const[h,u,f]=r.tileKey.split("/").map(parseFloat);this._level=h;const d=Ne(this._level);for(const y of Object.keys(s)){const x=s[y];if(this._pbfTiles[y]=new je(new Uint8Array(x.protobuff),new DataView(x.protobuff)),x.refKey){const[_]=x.refKey.split("/").map(parseFloat),T=h-_;if(T>0){const B=(1<{c.has(d)||(o.push({name:d,repeat:p}),c.add(d))},u={};for(const d of n)d.getResources(d.tileClipper,h,u);if(this._tile.status===ot.INVALID)return[];const f=this._fetchResources(o,u,s);return Promise.all([...f,r]).then(()=>this._processFeatures(a.returnedBuckets))}_initialize(s){return{signal:s==null?void 0:s.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(s){const{sourceNameToTileData:r,zoom:a,layers:n,sourceNameToTileClipper:o,sourceNameToUniqueSourceLayerBuckets:c,sourceNameToUniqueSourceLayers:h,returnedBuckets:u,layerIdToBucket:f,referencerUIDToReferencedId:d}=s,p=this._sourceDataMaxLOD;for(let y=n.length-1;y>=0;y--){const x=n[y];if(a=x.maxzoom)continue}else if(x.maxzoom&&a>=x.maxzoom)continue;if(x.type===yt.BACKGROUND||!this._canParseStyleLayer(x.uid)||!r[x.source]||!o[x.source])continue;const _=r[x.source],T=o[x.source],B=x.sourceLayer,m=_[B];if(m){let L=h[x.source];if(L||(L=h[x.source]=new Set),L.add(x.sourceLayer),x.refLayerId)d.set(x.uid,x.refLayerId);else{const I=this._createBucket(x);if(I){I.layerUIDs=[x.uid],I.layerExtent=m.extent,I.tileClipper=T;let w=c[x.source];w||(w=c[x.source]={});let P=w[B];P||(P=w[B]=[]),P.push(I),u.push(I),f[x.id]=I}}}}}_linkReferences(s){const{layerIdToBucket:r,referencerUIDToReferencedId:a}=s;a.forEach((n,o)=>{r[n]&&r[n].layerUIDs.push(o)})}_filterFeatures(s){const{signal:r,sourceNameToTileData:a,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:o}=s,c=10*this._level,h=10*(this._level+1),u=[],f=[];for(const d of Object.keys(o))o[d].forEach(p=>{u.push(p),f.push(d)});for(let d=0;d=h)continue;const P=I._maxzoom;if(P&&P<=c)continue}for(const w of _)w.pushFeature(L)}}}_fetchResources(s,r,a){const n=[],o=this._tile.getWorkerTileHandler();let c,h;s.length>0&&(c=o.fetchSprites(s,this._client,a),n.push(c));for(const u in r){const f=r[u];f.size>0&&(h=o.fetchGlyphs(this._tile.tileKey,u,f,this._client,a),n.push(h))}return n}_processFeatures(s){const r=s.filter(a=>a.hasFeatures()||this._canParseStyleLayer(a.layer.uid));for(const a of r)a.processFeatures(a.tileClipper);return r}_parseTileData(s){const r={};for(const a of Object.keys(s)){const n=s[a],o={};for(;n.next();)switch(n.tag()){case 3:{const c=n.getMessage(),h=new se(c);c.release(),o[h.name]=h;break}default:n.skip()}r[a]=o}return r}_createBucket(s){switch(s.type){case yt.BACKGROUND:return null;case yt.FILL:return this._createFillBucket(s);case yt.LINE:return this._createLineBucket(s);case yt.CIRCLE:return this._createCircleBucket(s);case yt.SYMBOL:return this._createSymbolBucket(s)}}_createFillBucket(s){return new Hs(s,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new Ns(s.fillMaterial.getStride()),new _t,new $s(s.outlineMaterial.getStride()),new _t)}_createLineBucket(s){return new js(s,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new Os(s.lineMaterial.getStride()),new _t)}_createCircleBucket(s){return new Gs(s,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new zs(s.circleMaterial.getStride()),new _t)}_createSymbolBucket(s){const r=this._tile;return new Q(r.tileKey,s,this._level,new Ae(s.iconMaterial.getStride()),new _t,new Ae(s.textMaterial.getStride()),new _t,r.placementEngine,r.getWorkerTileHandler())}}let Js=class{constructor(s,r,a,n){this.status=ot.INITIALIZED,this.placementEngine=new Us,this.tileKey=s,this.refKeys=r,this._workerTileHandler=a,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=ot.INITIALIZED,this._workerTileHandler=null}async parse(s,r){const a=r==null?void 0:r.signal;if(a!=null){const d=()=>{a.removeEventListener("abort",d),this.status=ot.INVALID};a.addEventListener("abort",d)}let n;const o={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(s,r)}catch(d){if(we(d))throw d;return{result:o,transferList:[]}}this.status=ot.READY;const c=o.bucketsWithData,h=[];for(const d of n)if(d.hasFeatures()){const p=d.serialize();c.push(p)}else h.push(d.layer.uid);const u=[...c];let f=null;return h.length>0&&(f=Uint32Array.from(h),u.push(f.buffer)),o.emptyBuckets=f,{result:o,transferList:u}}setObsolete(){this.status=ot.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(s,r){const a=s.sourceName2DataAndRefKey;return Object.keys(a).length===0?[]:(this.status=ot.MODIFIED,new Zs(a,this,r.client,s.sourceDataMaxLOD,this._styleRepository,s.styleLayerUIDs).parse(r))}};const Qs=25;class _r{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=Qs}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){var s;return((s=this._styleRepository)==null?void 0:s.layers)??[]}async createTileAndParse(s,r){const{key:a}=s,n={};for(const c of Object.keys(s.sourceName2DataAndRefKey)){const h=s.sourceName2DataAndRefKey[c];n[c]=h.refKey}const o=new Js(a,n,this,this._styleRepository);try{return await o.parse({...s,sourceDataMaxLOD:this._sourceDataMaxLOD},r)}catch(c){if(o.setObsolete(),o.release(),!we(c))throw c;return null}}updateStyle(s){if(!s||s.length===0||!this._styleRepository)return;const r=this._styleRepository;for(const a of s){const n=a.type,o=a.data;switch(n){case wt.PAINTER_CHANGED:r.setPaintProperties(o.layer,o.paint);break;case wt.LAYOUT_CHANGED:r.setLayoutProperties(o.layer,o.layout);break;case wt.LAYER_REMOVED:r.deleteStyleLayer(o.layer);break;case wt.LAYER_CHANGED:r.setStyleLayer(o.layer,o.index);break;case wt.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(s){const{style:r,sourceDataMaxLOD:a}=s;this._styleRepository=new Ee(r),this._sourceDataMaxLOD=a,this._spriteInfo={},this._glyphInfo={}}fetchSprites(s,r,a){const n=[],o=this._spriteInfo;for(const c of s)o[c.name]===void 0&&n.push(c);return n.length===0?Promise.resolve():r.invoke("getSprites",n,{signal:a==null?void 0:a.signal}).then(c=>{for(const h in c){const u=c[h];o[h]=u}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(s,r,a,n,o){const c=[];let h=this._glyphInfo[r];return h?a.forEach(u=>{h[u]||c.push(u)}):(h=this._glyphInfo[r]=[],a.forEach(u=>c.push(u))),c.length===0?Promise.resolve():n.invoke("getGlyphs",{tileID:s,font:r,codePoints:c},o).then(u=>{for(let f=0;f>>24&255,u>>>16&255,u>>>8&255,255&u])}},function(b,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(y){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=e,i=e+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.length-e);r>>8^s[255&(n^y[r])];return~n};for(var s=new Uint32Array(256),a=0;a<256;a++){for(var h=a,f=0;f<8;f++)h=1&h?3988292384^h>>>1:h>>>1;s[a]=h}},function(b,l,s){Object.defineProperty(l,"__esModule",{value:!0}),l.Frame=l.APNG=void 0;var a=function(){function e(n,r){for(var i=0;i1&&arguments[1]!==void 0&&arguments[1];return this.createImages().then(function(){return new h.default(r,n,i)})}}]),e}(),l.Frame=function(){function e(){y(this,e),this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.imageData=null,this.imageElement=null}return a(e,[{key:"createImage",value:function(){var n=this;return this.imageElement?Promise.resolve():new Promise(function(r,i){var t=URL.createObjectURL(n.imageData);n.imageElement=document.createElement("img"),n.imageElement.onload=function(){URL.revokeObjectURL(t),r()},n.imageElement.onerror=function(){URL.revokeObjectURL(t),n.imageElement=null,i(new Error("Image creation error"))},n.imageElement.src=t})}}]),e}()},function(b,l,s){Object.defineProperty(l,"__esModule",{value:!0});var a=function(){function r(i,t){for(var o=0;o=this._apng.numPlays&&(this._ended=!0,this._paused=!0)),this._prevFrame&&this._prevFrame.disposeOp==1?this.context.clearRect(this._prevFrame.left,this._prevFrame.top,this._prevFrame.width,this._prevFrame.height):this._prevFrame&&this._prevFrame.disposeOp==2&&this.context.putImageData(this._prevFrameData,this._prevFrame.left,this._prevFrame.top);var t=this.currentFrame;this._prevFrame=t,this._prevFrameData=null,t.disposeOp==2&&(this._prevFrameData=this.context.getImageData(t.left,t.top,t.width,t.height)),t.blendOp==0&&this.context.clearRect(t.left,t.top,t.width,t.height),this.context.drawImage(t.imageElement,t.left,t.top),this.emit("frame",this._currentFrameNumber),this._ended&&this.emit("end")}},{key:"play",value:function(){var t=this;this.emit("play"),this._ended&&this.stop(),this._paused=!1;var o=performance.now()+this.currentFrame.delay/this.playbackRate,v=function m(x){if(!t._ended&&!t._paused){if(x>=o){for(;x-o>=t._apng.playTime/t.playbackRate;)o+=t._apng.playTime/t.playbackRate,t._numPlays++;do t.renderNextFrame(),o+=t.currentFrame.delay/t.playbackRate;while(!t._ended&&x>o)}requestAnimationFrame(m)}};requestAnimationFrame(v)}},{key:"pause",value:function(){this._paused||(this.emit("pause"),this._paused=!0)}},{key:"stop",value:function(){this.emit("stop"),this._numPlays=0,this._ended=!1,this._paused=!0,this._currentFrameNumber=-1,this.context.clearRect(0,0,this._apng.width,this._apng.height),this.renderNextFrame()}},{key:"currentFrameNumber",get:function(){return this._currentFrameNumber}},{key:"currentFrame",get:function(){return this._apng.frames[this._currentFrameNumber]}},{key:"paused",get:function(){return this._paused}},{key:"ended",get:function(){return this._ended}}]),i}(h(s(4)).default);l.default=n},function(b,l){function s(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function a(e){return typeof e=="function"}function h(e){return typeof e=="number"}function f(e){return typeof e=="object"&&e!==null}function y(e){return e===void 0}b.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0,s.defaultMaxListeners=10,s.prototype.setMaxListeners=function(e){if(!h(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},s.prototype.emit=function(e){var n,r,i,t,o,v;if(this._events||(this._events={}),e==="error"&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if((n=arguments[1])instanceof Error)throw n;var m=new Error('Uncaught, unspecified "error" event. ('+n+")");throw m.context=n,m}if(y(r=this._events[e]))return!1;if(a(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:t=Array.prototype.slice.call(arguments,1),r.apply(this,t)}else if(f(r))for(t=Array.prototype.slice.call(arguments,1),i=(v=r.slice()).length,o=0;o0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace()),this},s.prototype.on=s.prototype.addListener,s.prototype.once=function(e,n){if(!a(n))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,n.apply(this,arguments))}return i.listener=n,this.on(e,i),this},s.prototype.removeListener=function(e,n){var r,i,t,o;if(!a(n))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(t=(r=this._events[e]).length,i=-1,r===n||a(r.listener)&&r.listener===n)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,n);else if(f(r)){for(o=t;o-- >0;)if(r[o]===n||r[o].listener&&r[o].listener===n){i=o;break}if(i<0)return this;r.length===1?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,n)}return this},s.prototype.removeAllListeners=function(e){var n,r;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(n in this._events)n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(a(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},s.prototype.listeners=function(e){return this._events&&this._events[e]?a(this._events[e])?[this._events[e]]:this._events[e].slice():[]},s.prototype.listenerCount=function(e){if(this._events){var n=this._events[e];if(a(n))return 1;if(n)return n.length}return 0},s.listenerCount=function(e,n){return e.listenerCount(n)}}])},R.exports=I();const V=M(R.exports);async function z(b,l){const s=V(b);if(s instanceof Error)throw s;await s.createImages(),G(l);const{frames:a,width:h,height:f}=s,y=document.createElement("canvas");y.width=h,y.height=f;const e=y.getContext("2d",{willReadFrequently:!0}),n=[],r=[];let i=0;for(const t of a){const o=S(t.delay||100);r.push(o),i+=o;const v=t.imageElement;t.blendOp===0?e.globalCompositeOperation="copy":e.globalCompositeOperation="source-over";const m=t.disposeOp===2?e.getImageData(t.left,t.top,t.width,t.height):void 0;e.drawImage(v,t.left,t.top);const x=e.getImageData(0,0,h,f);n.push(x),t.disposeOp===0||(t.disposeOp===1?e.clearRect(t.left,t.top,t.width,t.height):t.disposeOp===2&&e.putImageData(m,t.left,t.top))}return{frameCount:a.length,duration:i,frameDurations:r,getFrame:t=>n[t],width:h,height:f}}const q=[137,80,78,71,13,10,26,10];function B(b){const l=new Uint8Array(b);return!q.some((s,a)=>s!==l[a])}function J(b){if(!B(b))return!1;const l=new DataView(b),s=new Uint8Array(b);let a,h=8;do{const f=l.getUint32(h);if(a=String.fromCharCode.apply(String,Array.prototype.slice.call(s.subarray(h+4,h+8))),a==="acTL")return!0;h+=12+f}while(a!=="IEND"&&h{const r={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:e.depthCounter+1},globalScope:this.context.globalScope};if(r.depthCounter.depth>64)throw new l(e,s.MaximumCallDepth,null);return K(this.definition,r,t,null)}}call(e,t){return N(e,t,(r,o,a)=>{const i={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{},abortSignal:e.abortSignal,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1}};if(i.depthCounter.depth>64)throw new l(e,s.MaximumCallDepth,t);return K(this.definition,i,a,t)})}marshalledCall(e,t,r,o){return o(e,t,async(a,i,u)=>{const f={spatialReference:e.spatialReference,globalScope:r.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{}};return u=u.map(w=>!v(w)||w instanceof D?w:Y(w,e,o)),Y(await K(this.definition,f,u,t),r,o)})}}class F extends xe{constructor(e){super(e)}async global(e){const t=this.executingContext.globalScope[e.toLowerCase()];if(t.valueset||(t.value=await c(this.executingContext,t.node),t.valueset=!0),v(t.value)&&!(t.value instanceof D)){const r=new D;r.fn=t.value,r.parameterEvaluator=N,r.context=this.executingContext,t.value=r}return t.value}setGlobal(e,t){if(v(t))throw new l(null,s.AssignModuleFunction,null);this.executingContext.globalScope[e.toLowerCase()]={value:t,valueset:!0,node:null}}hasGlobal(e){return this.executingContext.exports[e]===void 0&&(e=e.toLowerCase()),this.executingContext.exports[e]!==void 0}async loadModule(e){let t=e.spatialReference;t==null&&(t=new ne({wkid:102100})),this.moduleScope=ie({},e.customfunctions,e.timeZone),this.executingContext={spatialReference:t,services:e.services,libraryResolver:new X(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},abortSignal:e.abortSignal===void 0||e.abortSignal===null?{aborted:!1}:e.abortSignal,globalScope:this.moduleScope,console:e.console??le,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:null,depthCounter:{depth:1}},await c(this.executingContext,this.source.syntax)}}async function N(n,e,t){return e.preparsed===!0?t(n,null,e.arguments):t(n,e,await W(n,e))}async function c(n,e,t){if(e.breakpoint&&t!==!0)return await e.breakpoint(),c(n,e,!0);try{switch(e==null?void 0:e.type){case"VariableDeclarator":return await Te(n,e);case"ImportDeclaration":return await De(n,e);case"ExportNamedDeclaration":return await Ge(n,e);case"VariableDeclaration":return await re(n,e,0);case"BlockStatement":case"Program":return await Pe(n,e);case"FunctionDeclaration":return await Ze(n,e);case"ReturnStatement":return await Ke(n,e);case"IfStatement":return await je(n,e);case"ExpressionStatement":return await $e(n,e);case"UpdateExpression":return await Ee(n,e);case"AssignmentExpression":return await Be(n,e);case"ForStatement":return await Le(n,e);case"WhileStatement":return await Ae(n,e);case"ForInStatement":return await ke(n,e);case"BreakStatement":return S;case"EmptyStatement":return p;case"ContinueStatement":return E;case"TemplateElement":return await He(n,e);case"TemplateLiteral":return await Je(n,e);case"Identifier":return await V(n,e);case"MemberExpression":return await Ue(n,e);case"Literal":return e.value;case"CallExpression":return await ze(n,e);case"UnaryExpression":return await qe(n,e);case"BinaryExpression":return await We(n,e);case"LogicalExpression":return await Ve(n,e);case"ArrayExpression":return await _e(n,e);case"ObjectExpression":return await Fe(n,e);case"Property":return await Re(n,e);default:throw new l(n,s.Unrecognized,e)}}catch(r){throw me(n,e,r)}}async function Fe(n,e){const t=[];for(let i=0;i{try{t.testResult===!0?++a>j?(a=0,setTimeout(()=>{k(n,e,t,r,o,a)},0)):k(n,e,t,r,o,a):t.lastAction instanceof y?r(t.lastAction):r(p)}catch(i){o(i)}},i=>{o(i)})}catch(i){o(i)}}function Le(n,e){try{return e.init!==null?c(n,e.init).then(()=>new Promise((t,r)=>{k(n,e,{testResult:!0,lastAction:p},o=>{t(o)},o=>{r(o)},0)})):new Promise((t,r)=>{k(n,e,{testResult:!0,lastAction:p},o=>{t(o)},o=>{r(o)},0)})}catch(t){return Promise.reject(t)}}function G(n,e,t,r,o,a,i,u,f,w){try{if(r<=a)return void u(p);o.value=i==="k"?t[a]:a,c(n,e.body).then(g=>{try{g instanceof y?u(g):g===S?u(p):++w>j?(w=0,setTimeout(()=>{G(n,e,t,r,o,a+1,i,u,f,w)},0)):G(n,e,t,r,o,a+1,i,u,f,w)}catch(P){f(P)}},g=>{f(g)})}catch(g){f(g)}}function T(n,e,t,r,o,a,i,u,f){try{if(t.length()<=o)return void i(p);r.value=a==="k"?t.get(o):o,c(n,e.body).then(w=>{w instanceof y?i(w):w===S?i(p):++f>j?(f=0,setTimeout(()=>{T(n,e,t,r,o+1,a,i,u,f)},0)):T(n,e,t,r,o+1,a,i,u,f)},w=>{u(w)})}catch(w){u(w)}}function U(n,e,t,r,o,a){try{if(a===void 0&&(a="i"),t.length===0)return void r.resolve(p);G(n,e,t,t.length,o,0,a,i=>{r.resolve(i)},i=>{r.reject(i)},0)}catch(i){r.reject(i)}}function Ne(n,e,t,r,o,a){try{if(a===void 0&&(a="i"),t.length===0)return void r.resolve(p);T(n,e,t,o,0,a,i=>{r.resolve(i)},i=>{r.reject(i)},0)}catch(i){r.reject(i)}}function Oe(n,e,t,r,o){try{U(n,e,t.keys(),r,o,"k")}catch(a){r.reject(a)}}function q(n,e,t,r,o,a,i,u){try{n.next().then(f=>{try{if(f===null)a(p);else{const w=ee.createFromGraphicLikeObject(f.geometry,f.attributes,r,e.timeZone);w._underlyingGraphic=f,o.value=w,c(e,t.body).then(g=>{try{g===S?a(p):g instanceof y?a(g):++u>j?(u=0,setTimeout(()=>{q(n,e,t,r,o,a,i,u)},0)):q(n,e,t,r,o,a,i,u)}catch(P){i(P)}},g=>{i(g)})}}catch(w){i(w)}},f=>{i(f)})}catch(f){i(f)}}async function ke(n,e){return new Promise((t,r)=>{c(n,e.right).then(o=>{try{let a=null;a=e.left.type==="VariableDeclaration"?c(n,e.left):Promise.resolve(),a.then(()=>{try{let i="";if(e.left.type==="VariableDeclaration"){const f=e.left.declarations[0].id;f.type==="Identifier"&&(i=f.name)}else e.left.type==="Identifier"&&(i=e.left.name);if(!i)throw new l(n,s.InvalidIdentifier,e);i=i.toLowerCase();let u=null;if(n.localScope!=null&&n.localScope[i]!==void 0&&(u=n.localScope[i]),u===null&&n.globalScope[i]!==void 0&&(u=n.globalScope[i]),u===null)return void r(new l(n,s.InvalidIdentifier,e));B(o)||m(o)?U(n,e,o,{reject:r,resolve:t},u):$(o)?Ne(n,e,o,{reject:r,resolve:t},u):o instanceof C||M(o)?Oe(n,e,o,{reject:r,resolve:t},u):ge(o)?q(o.iterator(n.abortSignal),n,e,o,u,f=>{t(f)},f=>{r(f)},0):U(n,e,[],{reject:r,resolve:t},u)}catch(i){r(i)}},r)}catch(a){r(a)}},r)})}async function Ee(n,e){const t=e.argument;if(t.type==="MemberExpression"){const a={t:null},i=await c(n,t.object);let u=null;a.t=i,t.computed===!0?u=await c(n,t.property):t.property.type==="Identifier"&&(u=t.property.name);const f=a.t;let w;if(B(f)){if(!R(u))throw new l(n,s.ArrayAccessorMustBeNumber,e);if(u<0&&(u=f.length+u),u<0||u>=f.length)throw new l(n,s.OutOfBounds,e);w=d(f[u]),f[u]=e.operator==="++"?w+1:w-1}else if(f instanceof C){if(m(u)===!1)throw new l(n,s.KeyAccessorMustBeString,e);if(f.hasField(u)!==!0)throw new l(n,s.FieldNotFound,e,{key:u});w=d(f.field(u)),f.setField(u,e.operator==="++"?w+1:w-1)}else if(f instanceof F){if(m(u)===!1)throw new l(n,s.ModuleAccessorMustBeString,e);if(f.hasGlobal(u)!==!0)throw new l(n,s.ModuleExportNotFound,e);w=d(await f.global(u)),f.setGlobal(u,e.operator==="++"?w+1:w-1)}else{if(!M(f))throw $(f)?new l(n,s.Immutable,e):new l(n,s.InvalidParameter,e);if(m(u)===!1)throw new l(n,s.KeyAccessorMustBeString,e);if(f.hasField(u)!==!0)throw new l(n,s.FieldNotFound,e,{key:u});w=d(f.field(u)),f.setField(u,e.operator==="++"?w+1:w-1)}return e.prefix===!1?w:e.operator==="++"?w+1:w-1}const r=e.argument.type==="Identifier"?e.argument.name.toLowerCase():"";if(!r)throw new l(n,s.InvalidIdentifier,e);let o;if(n.localScope!=null&&n.localScope[r]!==void 0)return o=d(n.localScope[r].value),n.localScope[r]={value:e.operator==="++"?o+1:o-1,valueset:!0,node:e},e.prefix===!1?o:e.operator==="++"?o+1:o-1;if(n.globalScope[r]!==void 0)return o=d(n.globalScope[r].value),n.globalScope[r]={value:e.operator==="++"?o+1:o-1,valueset:!0,node:e},e.prefix===!1?o:e.operator==="++"?o+1:o-1;throw new l(n,s.InvalidIdentifier,e)}function b(n,e,t,r,o){switch(e){case"=":return n===p?null:n;case"/=":return d(t)/d(n);case"*=":return d(t)*d(n);case"-=":return d(t)-d(n);case"+=":return m(t)||m(n)?L(t)+L(n):d(t)+d(n);case"%=":return d(t)%d(n);default:throw new l(o,s.UnsupportedOperator,r)}}async function Be(n,e){const t=e.left;if(t.type==="MemberExpression"){const o=await c(n,t.object);let a=null;if(t.computed===!0)a=await c(n,t.property);else{if(t.property.type!=="Identifier")throw new l(n,s.InvalidIdentifier,e);a=t.property.name}const i=await c(n,e.right);if(B(o)){if(!R(a))throw new l(n,s.ArrayAccessorMustBeNumber,e);if(a<0&&(a=o.length+a),a<0||a>o.length)throw new l(n,s.OutOfBounds,e);if(a===o.length){if(e.operator!=="=")throw new l(n,s.OutOfBounds,e);o[a]=b(i,e.operator,o[a],e,n)}else o[a]=b(i,e.operator,o[a],e,n)}else if(o instanceof C){if(m(a)===!1)throw new l(n,s.KeyAccessorMustBeString,e);if(o.hasField(a)===!0)o.setField(a,b(i,e.operator,o.field(a),e,n));else{if(e.operator!=="=")throw new l(n,s.FieldNotFound,e,{key:a});o.setField(a,b(i,e.operator,null,e,n))}}else if(o instanceof F){if(m(a)===!1)throw new l(n,s.KeyAccessorMustBeString,e);if(o.hasGlobal(a)!==!0)throw new l(n,s.ModuleExportNotFound,e);o.setGlobal(a,b(i,e.operator,await o.global(a),e,n))}else{if(!M(o))throw $(o)?new l(n,s.Immutable,e):new l(n,s.InvalidParameter,e);if(m(a)===!1)throw new l(n,s.KeyAccessorMustBeString,e);if(o.hasField(a)===!0)o.setField(a,b(i,e.operator,o.field(a),e,n));else{if(e.operator!=="=")throw new l(n,s.FieldNotFound,e,{key:a});o.setField(a,b(i,e.operator,null,e,n))}}return p}const r=t.name.toLowerCase();if(n.localScope!=null&&n.localScope[r]!==void 0){const o=await c(n,e.right);return n.localScope[r]={value:b(o,e.operator,n.localScope[r].value,e,n),valueset:!0,node:e.right},p}if(n.globalScope[r]!==void 0){const o=await c(n,e.right);return n.globalScope[r]={value:b(o,e.operator,n.globalScope[r].value,e,n),valueset:!0,node:e.right},p}throw new l(n,s.InvalidIdentifier,e)}async function $e(n,e){if(e.expression.type==="AssignmentExpression")return c(n,e.expression);if(e.expression.type==="CallExpression"){const r=await c(n,e.expression);return r===p?p:new O(r)}const t=await c(n,e.expression);return t===p?p:new O(t)}async function je(n,e){const t=await c(n,e.test);if(t===!0)return c(n,e.consequent);if(t===!1)return e.alternate!==null?c(n,e.alternate):p;throw new l(n,s.BooleanConditionRequired,e)}async function Pe(n,e){return te(n,e,0)}async function te(n,e,t){if(t>=e.body.length)return p;const r=await c(n,e.body[t]);return r instanceof y||r===S||r===E||t===e.body.length-1?r:te(n,e,t+1)}async function Ke(n,e){if(e.argument===null)return new y(p);const t=await c(n,e.argument);return new y(t)}async function Ze(n,e){const t=e.id.name.toLowerCase();return n.globalScope[t]={valueset:!0,node:null,value:new Ce(e,n)},p}async function De(n,e){var a,i;const t=e.specifiers[0].local.name.toLowerCase(),r=n.libraryResolver.loadLibrary(t);let o=null;return(a=n.libraryResolver._moduleSingletons)!=null&&a.has(r.uri)?o=n.libraryResolver._moduleSingletons.get(r.uri):(o=new F(r),await o.loadModule(n),(i=n.libraryResolver._moduleSingletons)==null||i.set(r.uri,o)),n.globalScope[t]={value:o,valueset:!0,node:e},p}async function Ge(n,e){if(await c(n,e.declaration),e.declaration.type==="FunctionDeclaration")n.exports[e.declaration.id.name.toLowerCase()]="function";else if(e.declaration.type==="VariableDeclaration")for(const t of e.declaration.declarations)n.exports[t.id.name.toLowerCase()]="variable";return p}async function re(n,e,t){return t>=e.declarations.length?p:(await c(n,e.declarations[t]),t===e.declarations.length-1||await re(n,e,t+1),p)}async function Te(n,e){let t=null;if(t=e.init===null?null:await c(n,e.init),n.localScope!==null){if(t===p&&(t=null),e.id.type!=="Identifier")throw new l(n,s.InvalidIdentifier,e);const o=e.id.name.toLowerCase();return n.localScope!=null&&(n.localScope[o]={value:t,valueset:!0,node:e.init}),p}if(e.id.type!=="Identifier")throw new l(n,s.InvalidIdentifier,e);const r=e.id.name.toLowerCase();return t===p&&(t=null),n.globalScope[r]={value:t,valueset:!0,node:e.init},p}async function Ue(n,e){const t=await c(n,e.object);if(t===null)throw new l(n,s.MemberOfNull,e);if(e.computed===!1){if(e.property.type==="Identifier"){if(t instanceof C||M(t))return t.field(e.property.name);if(t instanceof J)return H(t,e.property.name,n,e);if(t instanceof F){if(!t.hasGlobal(e.property.name))throw new l(n,s.InvalidIdentifier,e);return t.global(e.property.name)}throw new l(n,s.InvalidMemberAccessKey,e)}throw new l(n,s.InvalidMemberAccessKey,e)}let r=await c(n,e.property);if(t instanceof C||M(t)){if(m(r))return t.field(r);throw new l(n,s.InvalidMemberAccessKey,e)}if(t instanceof F){if(m(r))return t.global(r);throw new l(n,s.InvalidMemberAccessKey,e)}if(t instanceof J){if(m(r))return H(t,r,n,e);throw new l(n,s.InvalidMemberAccessKey,e)}if(B(t)){if(R(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l(n,s.OutOfBounds,e);return t[r]}throw new l(n,s.InvalidMemberAccessKey,e)}if($(t)){if(R(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length()+r),r>=t.length()||r<0)throw new l(n,s.OutOfBounds,e);return t.get(r)}throw new l(n,s.InvalidMemberAccessKey,e)}if(m(t)){if(R(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new l(n,s.OutOfBounds,e);return t[r]}throw new l(n,s.InvalidMemberAccessKey,e)}throw new l(n,s.InvalidMemberAccessKey,e)}async function qe(n,e){const t=await c(n,e.argument);if(I(t)){if(e.operator==="!")return!t;if(e.operator==="-")return-1*d(t);if(e.operator==="+")return 1*d(t);if(e.operator==="~")return~d(t);throw new l(n,s.UnsupportedUnaryOperator,e)}if(e.operator==="-")return-1*d(t);if(e.operator==="+")return 1*d(t);if(e.operator==="~")return~d(t);throw new l(n,s.UnsupportedUnaryOperator,e)}async function _e(n,e){const t=[];for(let r=0;r>":case">>>":case"^":case"&":return ve(d(r),d(o),e.operator);case"==":return Z(r,o);case"!=":return!Z(r,o);case"<":case">":case"<=":case">=":return ye(r,o,e.operator);case"+":return m(r)||m(o)?L(r)+L(o):d(r)+d(o);case"-":return d(r)-d(o);case"*":return d(r)*d(o);case"/":return d(r)/d(o);case"%":return d(r)%d(o);default:throw new l(n,s.UnsupportedOperator,e)}}async function Ve(n,e){const t=await c(n,e.left);let r=null;if(!I(t))throw new l(n,s.LogicalExpressionOnlyBoolean,e);switch(e.operator){case"||":if(t===!0)return t;if(r=await c(n,e.right),I(r))return r;throw new l(n,s.LogicExpressionOrAnd,e);case"&&":if(t===!1)return t;if(r=await c(n,e.right),I(r))return r;throw new l(n,s.LogicExpressionOrAnd,e);default:throw new l(n,s.LogicExpressionOrAnd,e)}}async function V(n,e){const t=e.name.toLowerCase();if(n.localScope!=null&&n.localScope[t]!==void 0){const r=n.localScope[t];if(r.valueset===!0)return r.value;if(r.d!==null)return r.d;r.d=c(n,r.node);const o=await r.d;return r.value=o,r.valueset=!0,o}if(n.globalScope[t]!==void 0){const r=n.globalScope[t];if(r.valueset===!0)return r.value;if(r.d!==null)return r.d;r.d=c(n,r.node);const o=await r.d;return r.value=o,r.valueset=!0,o}throw new l(n,s.InvalidIdentifier,e)}async function ze(n,e){if(e.callee.type==="MemberExpression"){const t=await c(n,e.callee.object);if(!(t instanceof F))throw new l(n,s.FunctionNotFound,e);const r=e.callee.computed===!1?e.callee.property.name:await c(n,e.callee.property);if(!t.hasGlobal(r))throw new l(n,s.FunctionNotFound,e);const o=await t.global(r);if(!v(o))throw new l(n,s.CallNonFunction,e);return o.call(n,e)}if(e.callee.type!=="Identifier")throw new l(n,s.FunctionNotFound,e);if(n.localScope!=null&&n.localScope[e.callee.name.toLowerCase()]!==void 0){const t=n.localScope[e.callee.name.toLowerCase()];if(v(t.value))return t.value.call(n,e);throw new l(n,s.CallNonFunction,e)}if(n.globalScope[e.callee.name.toLowerCase()]!==void 0){const t=n.globalScope[e.callee.name.toLowerCase()];if(v(t.value))return t.value.call(n,e);throw new l(n,s.CallNonFunction,e)}throw new l(n,s.FunctionNotFound,e)}async function He(n,e){return e.value?e.value.cooked:""}function Ye(n,e,t){if(v(n))throw new l(e,s.NoFunctionInTemplateLiteral,t);return n}async function Je(n,e){const t=[];for(let a=0;ai.map(i=>d[i]); +import{eF as or,bY as Qe,Q as j,cg as Pa,g1 as st,aZ as ye,aX as ie,ax as te,aY as Se,dg as N,J as ur,dh as le,ik as pi,fg as mi,ay as St,N as Oa,bE as La,cI as Di,jf as kr,d3 as It,aG as gi,ck as Mt,C as lr,fP as Ua,_ as je,U as za,M as yi,$ as Za}from"./index-DKOmzAMm.js";import{m as O,b as me,n as De,h as Rt,c as Be,r as Qt,a as se}from"./TimeOnly-C2MfFEIr.js";import{s as Ga,p as wi}from"./number-NXsKqxkQ.js";import{r as ja}from"./featureConversionUtils-CCATessr.js";let qt=class{constructor(e){this.source=e}},Dn=class{constructor(e,n){this._moduleSingletons=e,this._syntaxModules=n}loadLibrary(e){if(this._syntaxModules==null)return null;const n=this._syntaxModules[e.toLowerCase()];return n?{syntax:n.script,uri:n.uri}:null}};var c;(function(t){t.AsyncNotEnabled="AsyncNotEnabled",t.ModulesNotSupported="ModulesNotSupported",t.CircularModules="CircularModules",t.CannotCompareDateAndTime="CannotCompareDateAndTime",t.NeverReach="NeverReach",t.UnsupportedHashType="UnsupportedHashType",t.InvalidParameter="InvalidParameter",t.FeatureSetDoesNotHaveSubtypes="FeatureSetDoesNotHaveSubtypes",t.UnexpectedToken="UnexpectedToken",t.Unrecognized="Unrecognized",t.UnrecognizedType="UnrecognizedType",t.MaximumCallDepth="MaximumCallDepth",t.BooleanConditionRequired="BooleanConditionRequired",t.TypeNotAllowedInFeature="TypeNotAllowedInFeature",t.KeyMustBeString="KeyMustBeString",t.WrongNumberOfParameters="WrongNumberOfParameters",t.CallNonFunction="CallNonFunction",t.NoFunctionInTemplateLiteral="NoFunctionInTemplateLiteral",t.NoFunctionInDictionary="NoFunctionInDictionary",t.NoFunctionInArray="NoFunctionInArray",t.AssignModuleFunction="AssignModuleFunction",t.LogicExpressionOrAnd="LogicExpressionOrAnd",t.LogicalExpressionOnlyBoolean="LogicalExpressionOnlyBoolean",t.FunctionNotFound="FunctionNotFound",t.InvalidMemberAccessKey="InvalidMemberAccessKey",t.UnsupportedUnaryOperator="UnsupportUnaryOperator",t.InvalidIdentifier="InvalidIdentifier",t.MemberOfNull="MemberOfNull",t.UnsupportedOperator="UnsupportedOperator",t.Cancelled="Cancelled",t.ModuleAccessorMustBeString="ModuleAccessorMustBeString",t.ModuleExportNotFound="ModuleExportNotFound",t.Immutable="Immutable",t.OutOfBounds="OutOfBounds",t.IllegalResult="IllegalResult",t.FieldNotFound="FieldNotFound",t.PortalRequired="PortalRequired",t.LogicError="LogicError",t.ArrayAccessorMustBeNumber="ArrayAccessMustBeNumber",t.KeyAccessorMustBeString="KeyAccessorMustBeString",t.WrongSpatialReference="WrongSpatialReference",t.CannotChangeTimeZoneTime="CannotChangeTimeZoneTime",t.CannotChangeTimeZoneDateOnly="CannotChangeTimeZoneDateOnly"})(c||(c={}));const xi={[c.TypeNotAllowedInFeature]:"Feature attributes only support dates, numbers, strings, guids.",[c.LogicError]:"Logic error - {reason}",[c.CannotCompareDateAndTime]:"Cannot compare date or dateonly with timeonly types",[c.NeverReach]:"Encountered unreachable logic",[c.AsyncNotEnabled]:"Async Arcade must be enabled for this script",[c.ModuleAccessorMustBeString]:"Module accessor must be a string",[c.ModuleExportNotFound]:"Module has no export with provided identifier",[c.ModulesNotSupported]:"Current profile does not support modules",[c.ArrayAccessorMustBeNumber]:"Array accessor must be a number",[c.FunctionNotFound]:"Function not found",[c.FieldNotFound]:"Key not found - {key}",[c.CircularModules]:"Circular module dependencies are not allowed",[c.Cancelled]:"Execution cancelled",[c.UnsupportedHashType]:"Type not supported in hash function",[c.IllegalResult]:"Value is not a supported return type",[c.PortalRequired]:"Portal is required",[c.InvalidParameter]:"Invalid parameter",[c.WrongNumberOfParameters]:"Call with wrong number of parameters",[c.Unrecognized]:"Unrecognized code structure",[c.UnrecognizedType]:"Unrecognized type",[c.WrongSpatialReference]:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",[c.BooleanConditionRequired]:"Conditions must use booleans",[c.NoFunctionInDictionary]:"Dictionaries cannot contain functions.",[c.NoFunctionInArray]:"Arrays cannot contain functions.",[c.NoFunctionInTemplateLiteral]:"Template Literals do not expect functions by value.",[c.KeyAccessorMustBeString]:"Accessor must be a string",[c.KeyMustBeString]:"Object keys must be a string",[c.Immutable]:"Object is immutable",[c.UnexpectedToken]:"Unexpected token",[c.MemberOfNull]:"Cannot access property of null object",[c.MaximumCallDepth]:"Exceeded maximum function depth",[c.OutOfBounds]:"Out of bounds",[c.InvalidIdentifier]:"Identifier not recognized",[c.CallNonFunction]:"Expression is not a function",[c.InvalidMemberAccessKey]:"Cannot access value using a key of this type",[c.AssignModuleFunction]:"Cannot assign function to module variable",[c.UnsupportedUnaryOperator]:"Unsupported unary operator",[c.UnsupportedOperator]:"Unsupported operator",[c.LogicalExpressionOnlyBoolean]:"Logical expressions must be boolean",[c.LogicExpressionOrAnd]:"Logical expression can only be combined with || or &&",[c.CannotChangeTimeZoneTime]:"Cannot change the timezone of a Time",[c.CannotChangeTimeZoneDateOnly]:"Cannot change the timezone of a DateOnly",[c.FeatureSetDoesNotHaveSubtypes]:"FeatureSet does not have subtypes"};let Ja=class extends Error{constructor(...e){super(...e)}},Tr=class Fi extends Ja{constructor(e,n){super(cr(n)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,Fi),n!=null&&n.loc&&(this.loc=n.loc)}},d=class Ci extends Error{constructor(e,n,r,a){super("Execution error - "+cr(r)+or(xi[n],a)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,Ci),r!=null&&r.loc&&(this.loc=r.loc)}};function cr(t){var e,n;return t&&t.loc?`Line : ${(e=t.loc.start)==null?void 0:e.line}, ${(n=t.loc.start)==null?void 0:n.column}: `:""}let he=class Ai extends Error{constructor(e,n,r,a){super("Compilation error - "+cr(r)+or(xi[n],a)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,Ai),r!=null&&r.loc&&(this.loc=r.loc)}},en=class Ei extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,Ei)}};function Va(t,e,n){return n.declaredRootClass==="esri.arcade.arcadeexecutionerror"||n.declaredRootClass==="esri.arcade.arcadecompilationerror"?n.loc===null&&(e!=null&&e.loc)?new Tr(n,{cause:n}):n:(n.declaredRootClass==="esri.arcade.featureset.support.featureseterror"||n.declaredRootClass==="esri.arcade.featureset.support.sqlerror"||n.declaredRootClass,e!=null&&e.loc?new Tr(n,{cause:n}):n)}var ot;(function(t){t.UnrecognizedUri="UnrecognizedUri",t.UnsupportedUriProtocol="UnsupportedUriProtocol"})(ot||(ot={}));const qa={[ot.UnrecognizedUri]:"Unrecognized uri - {uri}",[ot.UnsupportedUriProtocol]:"Unrecognized uri protocol"};let vn=class bi extends Error{constructor(e,n){super(or(qa[e],n)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,bi)}},ut=class{constructor(){}};function wt(t,e,n){if(t instanceof ut&&!(t instanceof qe)){const r=new qe;return r.fn=t,r.parameterEvaluator=n,r.context=e,r}return t}let lt=class extends ut{constructor(e){super(),this.fn=e}createFunction(e){return(...n)=>this.fn(e,{preparsed:!0,arguments:n})}call(e,n){return this.fn(e,n)}marshalledCall(e,n,r,a){return a(e,n,(o,s,i)=>{i=i.map(l=>l instanceof ut&&!(l instanceof qe)?wt(l,e,a):l);const u=this.call(r,{args:i});return Qe(u)?u.then(l=>wt(l,r,a)):u})}},qe=class extends ut{constructor(){super(...arguments),this.fn=null,this.context=null}createFunction(e){return this.fn.createFunction(this.context)}call(e,n){return this.fn.marshalledCall(e,n,this.context,this.parameterEvaluator)}marshalledCall(e,n,r){return this.fn.marshalledCall(e,n,this.context,this.parameterEvaluator)}},ce=class{constructor(e=[]){this._elements=e}length(){return this._elements.length}get(e){return this._elements[e]}toArray(){return this.slice()}slice(e=0,n=this.length()){const r=[];for(let a=e;an)throw new d(r,c.WrongNumberOfParameters,a)}function jn(t){return t<0?-Math.round(-t):Math.round(t)}function pr(t,e){return isNaN(t)||e==null||e===""?t.toString():(e=tt(e,"‰",""),e=tt(e,"¤",""),Ga(t,{pattern:e}))}function yn(t,e){return e==null||e===""?t.toISOString(!0):t.toFormat(mr(e),{locale:ur(),numberingSystem:"latn"})}function mr(t,e=!1){t=t.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const a of t.match(r)||[])switch(a){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=e?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=e?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=a;break;default:a.length>=2&&a.slice(0,1)==="["&&a.slice(-1)==="]"?n+=`'${a.slice(1,-1)}'`:n+=`'${a}'`}return n}function _(t,e,n){switch(n){case">":return t>e;case"<":return t=":return t>=e;case"<=":return t<=e}return!1}function Dr(t,e,n){if(t===null){if(e===null||e===C)return _(null,null,n);if(L(e))return _(0,e,n);if(x(e)||J(e))return _(0,p(e),n);if(H(e))return _(0,e.toNumber(),n);if(G(e)||P(e))return _(t,e.toNumber(),n)}if(t===C){if(e===null||e===C)return _(null,null,n);if(L(e))return _(0,e,n);if(x(e)||J(e))return _(0,p(e),n);if(H(e))return _(0,e.toNumber(),n);if(G(e)||P(e))return _(t,e.toNumber(),n)}else if(L(t)){if(L(e))return _(t,e,n);if(J(e))return _(t,p(e),n);if(e===null||e===C)return _(t,0,n);if(x(e))return _(t,p(e),n);if(H(e)||G(e)||P(e))return _(t,e.toNumber(),n)}else if(x(t)){if(x(e))return _(F(t),F(e),n);if(H(e)||G(e)||P(e))return _(p(t),e.toNumber(),n);if(L(e))return _(p(t),e,n);if(e===null||e===C)return _(p(t),0,n);if(J(e))return _(p(t),p(e),n)}else if(H(t)){if(H(e))return t.timeZone!==e.timeZone&&(t.isUnknownTimeZone?t=O.arcadeDateAndZoneToArcadeDate(t,e.timeZone):e.isUnknownTimeZone&&(e=O.arcadeDateAndZoneToArcadeDate(e,t.timeZone))),_(t.toNumber(),e.toNumber(),n);if(e===null||e===C)return _(t.toNumber(),0,n);if(L(e))return _(t.toNumber(),e,n);if(J(e)||x(e))return _(t.toNumber(),p(e),n);if(G(e))throw new d(null,c.CannotCompareDateAndTime,null);if(P(e))return _(t.toNumber(),e.toNumber(),n)}else if(J(t)){if(J(e))return _(t,e,n);if(L(e))return _(p(t),p(e),n);if(H(e)||G(e)||P(e))return _(p(t),e.toNumber(),n);if(e===null||e===C)return _(p(t),0,n);if(x(e))return _(p(t),p(e),n)}else if(P(t)){if(H(e))return _(t.toNumber(),e.toNumber(),n);if(e===null||e===C)return _(t.toNumber(),0,n);if(L(e))return _(t.toNumber(),e,n);if(J(e)||x(e))return _(t.toNumber(),p(e),n);if(G(e))throw new d(null,c.CannotCompareDateAndTime,null);if(P(e))return _(t.toNumber(),e.toNumber(),n)}else if(G(t)){if(H(e))throw new d(null,c.CannotCompareDateAndTime,null);if(e===null||e===C)return _(t.toNumber(),0,n);if(L(e))return _(t.toNumber(),e,n);if(J(e)||x(e))return _(t.toNumber(),p(e),n);if(G(e))return _(t.toNumber(),e.toNumber(),n);if(P(e))throw new d(null,c.CannotCompareDateAndTime,null)}return!!ke(t,e)&&(n==="<="||n===">=")}function ke(t,e){if(t===e||t===null&&e===C||e===null&&t===C)return!0;if(H(t)&&H(e)||G(t)&&G(e)||P(t)&&P(e))return t.equals(e);if(t instanceof Zn||t instanceof ht)return t.equalityTest(e);if(t instanceof j&&e instanceof j){const n=t.cache._arcadeCacheId,r=e.cache._arcadeCacheId;if(n!=null)return n===r}return!!(Gn(t)&&Gn(e)&&(t._arcadeCacheId===e._arcadeCacheId&&t._arcadeCacheId!==void 0&&t._arcadeCacheId!==null||t._underlyingGraphic===e._underlyingGraphic&&t._underlyingGraphic!==void 0&&t._underlyingGraphic!==null))}function F(t,e){if(x(t))return t;if(t===null)return"";if(L(t))return pr(t,e);if(J(t))return t.toString();if(H(t))return yn(t,e);if(G(t)||P(t))return t.toFormat(e);if(t instanceof N)return JSON.stringify(t.toJSON());if(T(t)){const n=[];for(let r=0;rr.key===a.key?0:r.key==="spatialReference"?1:a.key==="spatialReference"||r.keya.key?1:0);if(T(t)){const r=[];for(let a=0;a0)return t;return null}if(t instanceof te){if(t.paths.length===0)return null;for(const e of t.paths)if(e.length>0)return t;return null}return t instanceof Se?t.points.length===0?null:t:t instanceof ye?t.xmin==="NaN"||t.xmin===null||isNaN(t.xmin)?null:t:null}function Ti(t,e){if(!t||!t.domain)return e;let n=null,r=null;if(H(e))n=e.toNumber();else if(P(e))n=e.toString();else if(G(e))n=e.toStorageString();else if(t.field.type==="string"||t.field.type==="esriFieldTypeString")n=F(e);else{if(e==null)return null;if(e==="")return e;n=p(e)}for(let a=0;a{var h;return f[u]===r&&(a=(h=f.domains)==null?void 0:h[s.name],a&&a.type==="inherited"&&(a=Pr(s.name,e),o=!0),!0)}),o||a||(a=Pr(t,e)),{field:s,domain:a}}function Pr(t,e){let n;return e.fields.some(r=>(r.name.toLowerCase()===t.toLowerCase()&&(n=r.domain),!!n)),n}function Jn(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});const n=typeof e.cycles=="boolean"&&e.cycles,r=e.cmp&&(a=e.cmp,function(s){return function(i,u){const l={key:i,value:s[i]},f={key:u,value:s[u]};return a(l,f)}});var a;const o=[];return function s(i){if(i!=null&&i.toJSON&&typeof i.toJSON=="function"&&(i=i.toJSON()),i===void 0)return;if(typeof i=="number")return isFinite(i)?""+i:"null";if(typeof i!="object")return JSON.stringify(i);let u,l;if(Array.isArray(i)){for(l="[",u=0;u0&&(o=t[0].spatialReference,n=t[0].hasZ,r=t[0].hasM)}else if(t instanceof ht)a=t._elements,a.length>0&&(n=t._hasZ,r=t._hasM,o=t.get(0).spatialReference);else{if(!$(t))throw new d(null,c.InvalidParameter,null);for(const s of t.toArray())Ct(a,s);a.length>0&&(o=t.get(0).spatialReference,n=t.get(0).hasZ===!0,r=t.get(0).hasM===!0)}return a.length===0?null:(pi(a)||(a=a.slice(0).reverse()),new ie({rings:[a],spatialReference:o,hasZ:n,hasM:r}))}return t}function Ye(t,e){if(T(t)||$(t)){let n=!1,r=!1,a=[],o=e;if(T(t)){for(const s of t)Ct(a,s);a.length>0&&(o=t[0].spatialReference,n=t[0].hasZ===!0,r=t[0].hasM===!0)}else if(t instanceof ht)a=t._elements,a.length>0&&(n=t._hasZ,r=t._hasM,o=t.get(0).spatialReference);else if($(t)){for(const s of t.toArray())Ct(a,s);a.length>0&&(o=t.get(0).spatialReference,n=t.get(0).hasZ===!0,r=t.get(0).hasM===!0)}return a.length===0?null:new te({paths:[a],spatialReference:o,hasZ:n,hasM:r})}return t}function nn(t,e){if(T(t)||$(t)){let n=!1,r=!1,a=[],o=e;if(T(t)){for(const s of t)Ct(a,s);a.length>0&&(o=t[0].spatialReference,n=t[0].hasZ===!0,r=t[0].hasM===!0)}else if(t instanceof ht)a=t._elements,a.length>0&&(n=t._hasZ,r=t._hasM,o=t.get(0).spatialReference);else if($(t)){for(const s of t.toArray())Ct(a,s);a.length>0&&(o=t.get(0).spatialReference,n=t.get(0).hasZ===!0,r=t.get(0).hasM===!0)}return a.length===0?null:new Se({points:a,spatialReference:o,hasZ:n,hasM:r})}return t}function Xa(t,e=!1){const n=[];if(t===null)return n;if(T(t)===!0){for(let r=0;r{setTimeout(()=>{e(t)},0)})):t}function gr(t,e,n){switch(n){case"&":return t&e;case"|":return t|e;case"^":return t^e;case"<<":return t<>":return t>>e;case">>>":return t>>>e}}function nt(t,e=null){return t==null?null:J(t)||L(t)||x(t)?t:t instanceof N?(e==null?void 0:e.keepGeometryType)===!0?t:t.toJSON():t instanceof ce?t.toArray().map(n=>nt(n,e)):Array.isArray(t)?t.map(n=>nt(n,e)):un(t)?t:H(t)?t.toJSDate():G(t)?t.toString():P(t)?t.toJSDate():t!==null&&typeof t=="object"&&t.castAsJson!==void 0?t.castAsJson(e):null}async function es(t,e,n,r,a){const o=await yr(t,e,n);a[r]=o}async function yr(t,e=null,n=null){if(t instanceof ce&&(t=t.toArray()),t==null)return null;if(He(t)||t instanceof N||un(t)||H(t))return nt(t,n);if(Array.isArray(t)){const r=[],a=[];for(const o of t)o===null||He(o)||o instanceof N||un(o)||H(o)?a.push(nt(o,n)):(a.push(null),r.push(es(o,e,n,a.length-1,a)));return r.length>0&&await Promise.all(r),a}return t!==null&&typeof t=="object"&&t.castAsJsonAsync!==void 0?t.castAsJsonAsync(e,n):null}function Kt(t){return Ni(t)?t.parent:t}function Ni(t){return t&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.SubtypeSublayer"}function ts(t){return t&&"declaredClass"in t&&t.declaredClass==="esri.layers.SubtypeGroupLayer"}function Mi(t,e,n){const r=Kt(t.fullSchema());return r===null||!r.fields?null:wn(e,r,t,n)}function rn(t){const e=Kt(t.fullSchema());return e===null?null:e.fields?e.subtypeField?{subtypeField:e.subtypeField,subtypes:e.subtypes?e.subtypes.map(n=>({name:n.name,code:n.code})):[]}:e.typeIdField?{subtypeField:e.typeIdField,subtypes:e.types?e.types.map(n=>({name:n.name,code:n.id})):[]}:null:null}function _i(t,e,n,r){const a=Kt(t.fullSchema());if(a===null||!a.fields)return null;const o=wn(e,a,t,r);if(n===void 0)try{n=t.field(e)}catch{return null}return Ti(o,n)}function $i(t,e,n,r){const a=Kt(t.fullSchema());if(a===null||!a.fields)return null;if(n===void 0){try{n=t.field(e)}catch{return null}return n}return Bi(wn(e,a,t,r),n)}function M(t){return(t==null?void 0:t.timeZone)??"system"}function Ri(t){const e=Kt(t.fullSchema());if(e===null||!e.fields)return null;const n=[];for(const r of e.fields)n.push(Ha(r));return{objectIdField:e.objectIdField,globalIdField:e.globalIdField??"",geometryType:$r[e.geometryType]===void 0?"":$r[e.geometryType],fields:n}}function Pi(t,e){return t==="system"&&(t=O.systemTimeZoneCanonicalName),{version:Oi,engineVersion:mi,timeZone:t,spatialReference:e instanceof St?e.toJSON():e,application:Oa.applicationName??"",engine:"web",locale:ur()}}const Oi="1.24",Li=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResultE:ki,ReturnResultE:Ii,absRound:jn,arcadeVersion:Oi,autoCastArrayOfPointsToMultiPoint:nn,autoCastArrayOfPointsToPolygon:Vn,autoCastArrayOfPointsToPolyline:Ye,autoCastFeatureToGeometry:Z,binaryOperator:gr,breakResult:Me,castAsJson:nt,castAsJsonAsync:yr,continueResult:kt,defaultExecutingContext:Pi,defaultTimeZone:M,defaultUndefined:R,equalityTest:ke,featureDomainCodeLookup:$i,featureDomainValueLookup:_i,featureFullDomain:Mi,featureSchema:Ri,featureSubtypes:rn,fixNullGeometry:it,fixSpatialReference:ne,formatDate:yn,formatNumber:pr,getDomain:wn,getDomainCode:Bi,getDomainValue:Ti,getType:dr,greaterThanLessThan:Dr,implicitResult:xt,isArray:T,isBoolean:J,isDate:H,isDateOnly:P,isDictionary:gn,isFeature:X,isFeatureSet:Tt,isFeatureSetCollection:Wt,isFunctionParameter:Q,isGeometry:Ht,isImmutableArray:$,isInteger:Ze,isJsDate:un,isKnowledgeGraph:fr,isModule:hr,isNumber:L,isObject:Gn,isSimpleType:He,isString:x,isSubtypeGrouplayer:ts,isSubtypeSublayer:Ni,isTime:G,multiReplace:tt,parseGeometryFromJson:Ya,pcCheck:D,returnResult:xe,stableStringify:Jn,standardiseDateFormat:mr,tick:Qa,toBoolean:Ft,toDate:ue,toNumber:p,toNumberArray:rt,toString:F,toStringArray:Xa,toStringExplicit:Ae,voidOperation:C},Symbol.toStringTag,{value:"Module"}));function ns(t){Ui=t}let Ui;function jt(t){return t===null?null:H(t)?t.clone():He(t)?t:Ht(t)?t.clone():$(t)?t.toArray().map(e=>jt(e)):T(t)?t.map(e=>jt(e)):X(t)?Ui.createFromArcadeFeature(t):Wt(t)||Tt(t)?t:gn(t)||(t==null?void 0:t.declaredClass)==="esri.arcade.Attachment"?t.deepClone():((t==null?void 0:t.declaredClass)==="esri.arcade.Portal"||fr(t)||t instanceof qt||Q(t),t)}function cn(t,e,n=!1,r=!1){if(t==null)return null;if(L(t))return p(t);if(J(t))return Ft(t);if(x(t))return F(t);if(H(t))return ue(t,e);if(P(t)||G(t))return t;if(T(t)){const o=[];for(const s of t)o.push(cn(s,e,n,r));return o}if(r&&Ht(t))return t;const a=new B;a.immutable=!1;for(const o of Object.keys(t)){const s=t[o];s!==void 0&&a.setField(o,cn(s,e,n,r))}return a.immutable=n,a}let B=class an{constructor(e){this.declaredClass="esri.arcade.Dictionary",this.attributes=null,this.plain=!1,this.immutable=!0,this.attributes=e instanceof an?e.attributes:e??{}}field(e){const n=e.toLowerCase(),r=this.attributes[e];if(r!==void 0)return r;for(const a in this.attributes)if(a.toLowerCase()===n)return this.attributes[a];throw new d(null,c.FieldNotFound,null,{key:e})}setField(e,n){if(this.immutable)throw new d(null,c.Immutable,null);if(Q(n))throw new d(null,c.NoFunctionInDictionary,null);const r=e.toLowerCase();if(n instanceof Date&&(n=O.dateJSToArcadeDate(n)),this.attributes[e]===void 0){for(const a in this.attributes)if(a.toLowerCase()===r)return void(this.attributes[a]=n);this.attributes[e]=n}else this.attributes[e]=n}hasField(e){const n=e.toLowerCase();if(this.attributes[e]!==void 0)return!0;for(const r in this.attributes)if(r.toLowerCase()===n)return!0;return!1}keys(){let e=[];for(const n in this.attributes)e.push(n);return e=e.sort(),e}castToText(e=!1){let n="";for(const r in this.attributes){n!==""&&(n+=",");const a=this.attributes[r];a==null?n+=JSON.stringify(r)+":null":J(a)||L(a)||x(a)?n+=JSON.stringify(r)+":"+JSON.stringify(a):a instanceof N?n+=JSON.stringify(r)+":"+Ae(a):a instanceof ce||Array.isArray(a)?n+=JSON.stringify(r)+":"+Ae(a,null,e):a instanceof O?n+=e?JSON.stringify(r)+":"+JSON.stringify(a.getTime()):JSON.stringify(r)+":"+a.stringify():a!==null&&typeof a=="object"&&a.castToText!==void 0&&(n+=JSON.stringify(r)+":"+a.castToText(e))}return"{"+n+"}"}static convertObjectToArcadeDictionary(e,n,r=!0,a=!1){const o=new an;o.immutable=!1;for(const s in e){const i=e[s];i!==void 0&&o.setField(s.toString(),cn(i,n,r,a))}return o.immutable=r,o}static convertJsonToArcade(e,n,r=!1,a=!1){return cn(e,n,r,a)}castAsJson(e=null){const n={};for(let r in this.attributes){const a=this.attributes[r];a!==void 0&&(e!=null&&e.keyTranslate&&(r=e.keyTranslate(r)),n[r]=nt(a,e))}return n}async castDictionaryValueAsJsonAsync(e,n,r,a=null,o){const s=await yr(r,a,o);return e[n]=s,s}async castAsJsonAsync(e=null,n=null){const r={},a=[];for(let o in this.attributes){const s=this.attributes[o];n!=null&&n.keyTranslate&&(o=n.keyTranslate(o)),s!==void 0&&(He(s)||s instanceof N||s instanceof O?r[o]=nt(s,n):a.push(this.castDictionaryValueAsJsonAsync(r,o,s,e,n)))}return a.length>0&&await Promise.all(a),r}deepClone(){const e=new an;e.immutable=!1;for(const n of this.keys())e.setField(n,jt(this.field(n)));return e}},Oe=0;function At(t,e,n,r,a=1){let o;switch(e=e.toLowerCase()){case"hasz":{const s=t.hasZ;return s!==void 0&&s}case"hasm":{const s=t.hasM;return s!==void 0&&s}case"spatialreference":{let s=t.spatialReference._arcadeCacheId;if(s===void 0){let u=!0;Object.freeze&&Object.isFrozen(t.spatialReference)&&(u=!1),u&&(Oe++,t.spatialReference._arcadeCacheId=Oe,s=Oe)}const i=new B({wkt:t.spatialReference.wkt,wkid:t.spatialReference.wkid});return s!==void 0&&(i._arcadeCacheId="SPREF"+s.toString()),i}}switch(t.type){case"extent":switch(e){case"xmin":case"xmax":case"ymin":case"ymax":case"zmin":case"zmax":case"mmin":case"mmax":{const s=t[e];return s!==void 0?s:null}case"type":return"Extent"}break;case"polygon":switch(e){case"rings":return o=t.cache._arcadeCacheId,o===void 0&&(Oe++,o=Oe,t.cache._arcadeCacheId=o),new Zn(t.rings,t.spatialReference,t.hasZ===!0,t.hasM===!0,o);case"type":return"Polygon"}break;case"point":switch(e){case"x":case"y":case"z":case"m":return t[e]??null;case"type":return"Point"}break;case"polyline":switch(e){case"paths":return o=t.cache._arcadeCacheId,o===void 0&&(Oe++,o=Oe,t.cache._arcadeCacheId=o),new Zn(t.paths,t.spatialReference,t.hasZ===!0,t.hasM===!0,o);case"type":return"Polyline"}break;case"multipoint":switch(e){case"points":return o=t.cache._arcadeCacheId,o===void 0&&(Oe++,o=Oe,t.cache._arcadeCacheId=o),new ht(t.points,t.spatialReference,t.hasZ===!0,t.hasM===!0,o,1);case"type":return"Multipoint"}}if(a===1)throw new d(n,c.InvalidIdentifier,r);return a===2?{keystate:"notfound"}:null}function wr(t,e){let n,r=t;if(r==null)return null;if(T(e))n=e;else if($(e))n=e.toArray();else{if(e==null)return null;n=[e]}for(const a of n){if(X(r)){if(x(a)===!1||!r.hasField(a))return null;r=r.field(a)}else if(gn(r)){if(x(a)===!1||!r.hasField(a))return null;r=r.field(a)}else if(Ht(r)){if(x(a)===!1)return null;r=At(r,a,null,null,0)}else if(T(r)){if(L(a)===!1)return null;r=a>=0?r[a]:r[r.length+a]}else{if(!$(r)||L(a)===!1)return null;r=a>=0?r.get(a):r.get(r.length()+a)}if(r==null)return null}return r}let ee=class be{constructor(){this.arcadeDeclaredClass="esri.arcade.Feature",this._optimizedGeomDefinition=null,this._geometry=null,this.attributes=null,this._layer=null,this._fieldTypesFixed=!0,this.fieldsIndex=null,this.contextTimeZone=null,this.immutable=!0,this._fieldsToFixDataTypes=null,this.immutable=!0}static createFromGraphic(e,n){const r=new be;return r.contextTimeZone=n??null,r._geometry=e.geometry!=null?e.geometry:null,e.attributes===void 0||e.attributes===null?r.attributes={}:r.attributes=e.attributes,e._sourceLayer?(r._layer=e._sourceLayer,r._fieldTypesFixed=!1):e._layer?(r._layer=e._layer,r._fieldTypesFixed=!1):e.layer&&"fields"in e.layer?(r._layer=e.layer,r._fieldTypesFixed=!1):e.sourceLayer&&"fields"in e.sourceLayer&&(r._layer=e.sourceLayer,r._fieldTypesFixed=!1),r._layer&&!r._fieldTypesFixed&&(r.fieldsIndex=this.hydrateFieldsIndex(r._layer)),r}static createFromArcadeFeature(e){if(e instanceof be){const r=new be;return r._fieldTypesFixed=e._fieldTypesFixed,r.attributes=e.attributes,r._geometry=e._geometry,r._optimizedGeomDefinition=e._optimizedGeomDefinition,e._layer&&(r._layer=e._layer),r.fieldsIndex=e.fieldsIndex,r.contextTimeZone=e.contextTimeZone,r}const n={};for(const r of e.keys())n[r]=e.field(r);return be.createFromGraphicLikeObject(e.geometry(),n,e.fullSchema(),e.contextTimeZone)}static createFromOptimisedFeature(e,n,r){const a=new be;return a._geometry=e.geometry?{geometry:e.geometry}:null,a._optimizedGeomDefinition=r,a.attributes=e.attributes||{},a._layer=n,a._fieldTypesFixed=!1,a}static createFromArcadeDictionary(e,n){const r=new be;return r.attributes=e.field("attributes"),r.attributes!==null&&r.attributes instanceof B?(r.attributes=r.attributes.attributes,r.attributes===null&&(r.attributes={})):r.attributes={},r._geometry=e.field("geometry"),r._geometry!==null&&(r._geometry instanceof B?r._geometry=be.parseGeometryFromDictionary(r._geometry,n):r._geometry instanceof N||(r._geometry=null)),r}static createFromGraphicLikeObject(e,n,r=null,a){const o=new be;return o.contextTimeZone=a??null,n===null&&(n={}),o.attributes=n,o._geometry=e??null,o._layer=r,o._layer&&(o._fieldTypesFixed=!1,o.fieldsIndex=this.hydrateFieldsIndex(o._layer)),o}static hydrateFieldsIndex(e){return e===null?null:Tt(e)?e.getFieldsIndex():e.fieldsIndex?e.fieldsIndex:La.fromLayerJSON({datesInUnknownTimezone:e.datesInUnknownTimezone,fields:e.fields,timeInfo:e.timeInfo,editFieldsInfo:e.editFieldsInfo,dateFieldsTimeReference:e.dateFieldsTimeReference??{timeZone:"UTC",respectsDaylightSaving:!1}})}repurposeFromGraphicLikeObject(e,n,r=null){n===null&&(n={}),this.attributes=n,this._geometry=e??null,this._layer=r,this._layer?this._fieldTypesFixed=!1:this._fieldTypesFixed=!0}castToText(e=!1){let n="";this._fieldTypesFixed===!1&&this._fixFieldTypes();for(const r in this.attributes){n!==""&&(n+=",");const a=this.attributes[r];a==null?n+=JSON.stringify(r)+":null":J(a)||L(a)||x(a)?n+=JSON.stringify(r)+":"+JSON.stringify(a):a instanceof N?n+=JSON.stringify(r)+":"+Ae(a):a instanceof De||a instanceof me?n+=`${JSON.stringify(r)}:${JSON.stringify(a.toString())}`:a instanceof ce||Array.isArray(a)?n+=JSON.stringify(r)+":"+Ae(a,null,e):a instanceof O?n+=e?JSON.stringify(r)+":"+JSON.stringify(a.getTime()):JSON.stringify(r)+":"+a.stringify():a!==null&&typeof a=="object"&&a.castToText!==void 0&&(n+=JSON.stringify(r)+":"+a.castToText(e))}return'{"geometry":'+(this.geometry()===null?"null":Ae(this.geometry()))+',"attributes":{'+n+"}}"}_fixFieldTypes(){var r;if(this._fieldsToFixDataTypes&&((r=this._fieldsToFixDataTypes)==null?void 0:r.length)>0)return this._fixAllFields(this._fieldsToFixDataTypes),void(this._fieldTypesFixed=!0);const e=[],n=this._layer.fields;for(let a=0;a0&&this._fixAllFields(e),this._fieldTypesFixed=!0}isUnknownDateTimeField(e){var n;return((n=this.fieldsIndex)==null?void 0:n.getTimeZone(e))==="unknown"}_fixAllFields(e){this.attributes={...this.attributes};const n=this.contextTimeZone??"system";for(let r=0;r!n&&(a.type==="Identifier"&&a.name&&a.name.toLowerCase()===r&&(n=!0),!0)),n}function Zi(t){const e=[];return K(t,n=>(n.type==="ImportDeclaration"&&n.source&&n.source.value&&e.push({libname:n.specifiers[0].local.name.toLowerCase(),source:n.source.value}),!0)),e}function as(t,e){let n=!1;const r=e.toLowerCase();return K(t,a=>!n&&(a.type!=="CallExpression"||a.callee.type!=="Identifier"||!a.callee.name||a.callee.name.toLowerCase()!==r||(n=!0,!1))),n}function ss(t){const e=[];return K(t,n=>{var r;return n.type!=="MemberExpression"||n.object.type!=="Identifier"||(n.computed===!1&&n.object&&n.object.name&&n.property&&n.property.type==="Identifier"&&n.property.name?e.push(n.object.name.toLowerCase()+"."+n.property.name.toLowerCase()):n.object&&n.object.name&&n.property&&n.property.type==="Literal"&&typeof n.property.value=="string"&&e.push(n.object.name.toLowerCase()+"."+((r=n.property.value)==null?void 0:r.toString().toLowerCase())),!1)}),e}function os(t){const e=[];return K(t,n=>{var r;if(n.type==="CallExpression"){if(n.callee.type==="Identifier"&&n.callee.name.toLowerCase()==="expects"){let a="";for(let o=0;o<(n.arguments||[]).length;o++)o===0?n.arguments[o].type==="Identifier"&&(a=n.arguments[o].name.toLowerCase()):a&&n.arguments[o].type==="Literal"&&Lr(n.arguments[o].value)&&e.push(a+"."+n.arguments[o].value.toLowerCase());return!1}if(n.callee.type==="Identifier"&&["domainname","domaincode","domain","haskey"].includes(n.callee.name.toLowerCase())&&n.arguments.length>=2){let a="";return n.arguments[0].type==="Identifier"&&(a=n.arguments[0].name.toLowerCase()),a&&n.arguments[1].type==="Literal"&&Lr(n.arguments[1].value)&&e.push(a+"."+n.arguments[1].value.toLowerCase()),!1}}return n.type!=="MemberExpression"||n.object.type!=="Identifier"||(n.computed===!1&&n.object&&n.object.name&&n.property&&n.property.type==="Identifier"&&n.property.name?e.push(n.object.name.toLowerCase()+"."+n.property.name.toLowerCase()):n.object&&n.object.name&&n.property&&n.property.type==="Literal"&&typeof n.property.value=="string"&&e.push(n.object.name.toLowerCase()+"."+((r=n.property.value)==null?void 0:r.toString().toLowerCase())),!1)}),e}function Hn(t){const e=[];return K(t,n=>(n.type==="CallExpression"&&n.callee.type==="Identifier"&&e.push(n.callee.name.toLowerCase()),!0)),e}function Yt(t,e=[]){let n=null;if(t.usesFeatureSet===void 0){n===null&&(n=Hn(t)),t.usesFeatureSet=!1;for(let r=0;r0){for(const r of e)if(zi(t,r)){t.usesFeatureSet=!0,t.isAsync=!0;break}}}if(t.usesModules===void 0&&(t.usesModules=!1,Zi(t).length>0&&(t.usesModules=!0)),t.usesGeometry===void 0){t.usesGeometry=!1,n===null&&(n=Hn(t));for(let r=0;r0||u.length>0;)if(i.length>0&&u.length>0){let h=l(i[0],u[0]);isNaN(h)&&(h=0),h<=0?(f.push(i[0]),i=i.slice(1)):(f.push(u[0]),u=u.slice(1))}else i.length>0?(f.push(i[0]),i=i.slice(1)):u.length>0&&(f.push(u[0]),u=u.slice(1));return f}async function a(i,u){const l=i.length,f=Math.floor(l/2);if(l===0)return[];if(l===1)return[i[0]];const h=[await a(i.slice(0,f),u),await a(i.slice(f,l),u)];return o(h[0],h[1],u,[])}async function o(i,u,l,f){const h=f;if(i.length>0||u.length>0){if(i.length>0&&u.length>0){let m=await l(i[0],u[0]);return isNaN(m)&&(m=1),m<=0?(h.push(i[0]),i=i.slice(1)):(h.push(u[0]),u=u.slice(1)),o(i,u,l,f)}return i.length>0?(h.push(i[0]),o(i=i.slice(1),u,l,f)):(h.push(u[0]),o(i,u=u.slice(1),l,f))}return f}function s(i,u,l,f){D(l,1,2,i,u);let h=l[0];if($(h)&&(h=h.toArray()),T(h)===!1)throw new d(i,c.InvalidParameter,u);if(l.length>1){if(Q(l[1])===!1)throw new d(i,c.InvalidParameter,u);let E=h;const U=l[1].createFunction(i);return f?a(E,U):(E=n(E,(ae,fe)=>U(ae,fe)),E)}let m=h;if(m.length===0)return[];const g={};for(let E=0;E1||k==="String"?n(m,(E,U)=>{if(E==null||E===C)return U==null||U===C?0:1;if(U==null||U===C)return-1;const ae=F(E),fe=F(U);return aeE-U):k==="Boolean"?n(m,(E,U)=>E===U?0:U?-1:1):k==="Date"?n(m,(E,U)=>U-E):m.slice(0),m}t.functions.array=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,0,2,i,u),h.length===0)return[];if(h.length===1&&h[0]===null)return[];if(T(h[0])){if(h.length===2&&J(h[1])===!1)throw new d(i,c.InvalidParameter,u);return R(h[1],!1)===!0?jt(h[0]):h[0].slice(0)}if($(h[0])){if(h.length===2&&J(h[1])===!1)throw new d(i,c.InvalidParameter,u);return R(h[1],!1)===!0?jt(h[0]):h[0].toArray().slice(0)}const m=p(h[0]);if(isNaN(m)||Ze(m)===!1)throw new d(i,c.InvalidParameter,u);const g=R(h[1],null),y=new Array(m);return y.fill(g),y})},t.functions.front=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,1,1,i,u),$(h[0])){if(h[0].length()<=0)throw new d(i,c.OutOfBounds,u);return h[0].get(0)}if(T(h[0])){if(h[0].length<=0)throw new d(i,c.OutOfBounds,u);return h[0][0]}throw new d(i,c.InvalidParameter,u)})},t.functions.back=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,1,1,i,u),$(h[0])){if(h[0].length()<=0)throw new d(i,c.OutOfBounds,u);return h[0].get(h[0].length()-1)}if(T(h[0])){if(h[0].length<=0)throw new d(i,c.OutOfBounds,u);return h[0][h[0].length-1]}throw new d(i,c.InvalidParameter,u)})},t.functions.push=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,1,2,i,u),T(h[0]))return h[0][h[0].length]=h[1],h[0].length;throw new d(i,c.InvalidParameter,u)})},t.functions.pop=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,1,1,i,u),T(h[0])){if(h[0].length<=0)throw new d(i,c.OutOfBounds,u);const m=h[0][h[0].length-1];return h[0].length=h[0].length-1,m}throw new d(i,c.InvalidParameter,u)})},t.functions.erase=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,2,2,i,u),T(h[0])){let m=p(h[1]);if(isNaN(m)||Ze(m)===!1)throw new d(i,c.InvalidParameter,u);const g=h[0];if(g.length<=0)throw new d(i,c.OutOfBounds,u);if(m<0&&(m=g.length+m),m<0)throw new d(i,c.OutOfBounds,u);if(m>=g.length)throw new d(i,c.OutOfBounds,u);return g.splice(m,1),C}throw new d(i,c.InvalidParameter,u)})},t.functions.insert=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,3,3,i,u),T(h[0])){const m=p(h[1]);if(isNaN(m)||Ze(m)===!1)throw new d(i,c.InvalidParameter,u);const g=h[2],y=h[0];if(m>y.length)throw new d(i,c.OutOfBounds,u);if(m<0&&m<-1*y.length)throw new d(i,c.OutOfBounds,u);return m===y.length?(y[m]=g,C):(y.splice(m,0,g),C)}throw new d(i,c.InvalidParameter,u)})},t.functions.resize=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,2,3,i,u),T(h[0])){const m=p(h[1]);if(isNaN(m)||Ze(m)===!1)throw new d(i,c.InvalidParameter,u);if(m<0)throw new d(i,c.InvalidParameter,u);const g=R(h[2],null),y=h[0];if(y.length>=m)return y.length=m,C;const k=y.length;y.length=m;for(let E=k;E{if(D(h,2,2,i,u),T(h[0])){const m=h[1];return h[0].findIndex(g=>ke(g,m))>-1}if($(h[0])){const m=h[1];return h[0].toArray().findIndex(g=>ke(g,m))>-1}throw new d(i,c.InvalidParameter,u)})},t.functions.slice=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{if(D(h,1,3,i,u),T(h[0])){const m=p(R(h[1],0)),g=p(R(h[2],h[0].length));if(isNaN(m)||Ze(m)===!1)throw new d(i,c.InvalidParameter,u);if(isNaN(g)||Ze(g)===!1)throw new d(i,c.InvalidParameter,u);return h[0].slice(m,g)}if($(h[0])){const m=h[0],g=p(R(h[1],0)),y=p(R(h[2],m.length()));if(isNaN(g)||Ze(g)===!1)throw new d(i,c.InvalidParameter,u);if(isNaN(y)||Ze(y)===!1)throw new d(i,c.InvalidParameter,u);return m.toArray().slice(g,y)}throw new d(i,c.InvalidParameter,u)})},t.functions.splice=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{const m=[];for(let g=0;g{if(D(h,2,2,i,u),T(h[0]))return p(h[1])>=h[0].length?h[0].slice(0):h[0].slice(0,p(h[1]));if($(h[0]))return p(h[1])>=h[0].length()?h[0].slice(0):h[0].slice(0,p(h[1]));throw new d(i,c.InvalidParameter,u)})},t.functions.first=function(i,u){return t.standardFunction(i,u,(l,f,h)=>(D(h,1,1,i,u),T(h[0])?h[0].length===0?null:h[0][0]:$(h[0])?h[0].length()===0?null:h[0].get(0):null))},t.mode==="sync"&&(t.functions.sort=function(i,u){return t.standardFunction(i,u,(l,f,h)=>s(i,f,h,!1))},t.functions.any=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g){const k=m(y);if(J(k)&&k===!0)return!0}return!1})},t.functions.all=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g)if(m(y)!==!0)return!1;return!0})},t.functions.none=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g)if(m(y)===!0)return!1;return!0})},t.functions.reduce=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,3,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);return h.length===2?g.length===0?null:g.reduce((y,k)=>{const E=m(y,k);return y=E!==void 0&&E!==C?E:null}):g.reduce((y,k)=>{const E=m(y,k);return y=E!==void 0&&E!==C?E:null},h[2])})},t.functions.map=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f),y=[];for(const k of g){const E=m(k);E!==void 0&&E!==C?y.push(E):y.push(null)}return y})},t.functions.filter=function(i,u){return t.standardFunction(i,u,(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f),y=[];for(const k of g)m(k)===!0&&y.push(k);return y})}),t.mode==="async"&&(t.functions.sort=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>s(i,f,h,!0))},t.functions.any=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g){const k=await m(y);let E=null;if(E=Qe(E)?await k:k,J(E)&&E===!0)return!0}return!1})},t.functions.all=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g){const k=await m(y);let E=null;if(E=Qe(E)?await k:k,E!==!0)return!1}return!0})},t.functions.none=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);for(const y of g){const k=await m(y);let E=null;if(E=Qe(E)?await k:k,E===!0)return!1}return!0})},t.functions.filter=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f),y=[];for(const k of g){const E=await m(k);let U=null;U=Qe(U)?await E:E,U===!0&&y.push(k)}return y})},t.functions.reduce=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,3,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f);let y;if(h.length>2){const k=R(h[2],null);y=g.reduce(async(E,U)=>{let ae=await E;return ae!==void 0&&ae!==C||(ae=null),m(ae,U)},Promise.resolve(k))}else{if(g.length===0)return null;y=g.reduce(async(k,E,U)=>{if(U<=1)return m(k,E);let ae=await k;return ae!==void 0&&ae!==C||(ae=null),m(ae,E)})}return y.then(k=>k!==void 0&&k!==C?k:null)})},t.functions.map=function(i,u){return t.standardFunctionAsync(i,u,async(l,f,h)=>{D(h,2,2,i,f);const m=h[1].createFunction(i),g=e(h[0],i,f),y=[];for(const k of g){const E=await m(k);let U=null;U=Qe(U)?await E:E,U!==void 0&&U!==C?y.push(U):y.push(null)}return y})})}const Wn=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:us},Symbol.toStringTag,{value:"Module"}));function ls(t,e,n){return t+(cs(n)?ds:hs)[e]}function cs(t){return t%4==0&&(t%100!=0||t%400==0)}const hs=[0,31,59,90,120,151,181,212,243,273,304,334],ds=[0,31,60,91,121,152,182,213,244,274,305,335];function Re(t){return t===null?t:t.isValid===!1?null:t}function _t(t,e){return t===""||t.toLowerCase().trim()==="default"?M(e):t==="z"||t==="Z"?"UTC":t}function Ue(t,e){return P(t)?t.toArcadeDate():ue(t,M(e))}function Gi(t,e){t.today=function(n,r){return e(n,r,(a,o,s)=>{D(s,0,0,n,r);const i=new Date;return i.setHours(0,0,0,0),O.dateJSAndZoneToArcadeDate(i,M(n))})},t.time=function(n,r){return e(n,r,(a,o,s)=>{switch(D(s,0,4,n,r),s.length){case 0:{const i=O.nowToArcadeDate(M(n));return new De(i.hour,i.minute,i.second,i.millisecond)}case 1:{if(G(s[0]))return s[0].clone();if(H(s[0]))return new De(s[0].hour,s[0].minute,s[0].second,s[0].millisecond);if(P(s[0]))return new De(0,0,0,0);if(x(s[0]))return De.fromString(s[0]);const i=p(s[0]);return isNaN(i)===!1?De.fromMilliseconds(i):null}case 2:return x(s[0])&&x(s[1])?De.fromString(s[0],s[1]):De.fromParts(p(s[0]),p(s[1]),0,0);case 3:return De.fromParts(p(s[0]),p(s[1]),p(s[2]),0);case 4:return De.fromParts(p(s[0]),p(s[1]),p(s[2]),p(s[3]))}throw new d(n,c.InvalidParameter,r)})},t.dateonly=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,0,3,n,r),s.length===3)return me.fromParts(p(s[0]),p(s[1])+1,p(s[2]));if(s.length===2){const i=F(s[1]);return i===""?null:i==="X"?me.fromSeconds(p(s[0])):i==="x"?me.fromMilliseconds(p(s[0])):me.fromString(F(s[0]),i)}if(s.length===1){if(x(s[0])){if(s[0].replaceAll(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")==="")return null;if(/^[0-9][0-9][0-9][0-9]$/.test(s[0])===!0)return me.fromString(s[0]+"-01-01")}if(P(s[0]))return s[0].clone();if(H(s[0]))return me.fromParts(s[0].year,s[0].monthJS+1,s[0].day);const i=p(s[0]);return isNaN(i)===!1?me.fromMilliseconds(i):x(s[0])?me.fromString(s[0]):null}if(s.length===0){const i=O.nowToArcadeDate(M(n));return i.isValid===!1?null:me.fromParts(i.year,i.monthJS+1,i.day)}return null})},t.changetimezone=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,2,n,r),s[0]===null)return null;if(P(s[0]))throw new d(n,c.CannotChangeTimeZoneDateOnly,r);if(P(s[0]))throw new d(n,c.CannotChangeTimeZoneTime,r);const i=ue(s[0],M(n));if(i===null)throw new d(n,c.InvalidParameter,r);const u=Rt(_t(F(s[1]),n),!1);if(u===null)return null;const l=O.arcadeDateAndZoneToArcadeDate(i,u);return l.isValid===!1?null:l})},t.timezone=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,2,n,r),G(s[0])||P(s[0]))return"Unknown";const i=ue(s[0],M(n));if(i===null)return null;const u=i.timeZone;return u==="system"?O.systemTimeZoneCanonicalName:u.toLowerCase()==="utc"?"UTC":u.toLowerCase()==="unknown"?"Unknown":u})},t.timezoneoffset=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=ue(s[0],M(n));return i===null?null:60*i.timeZoneOffset*1e3})},t.now=function(n,r){return e(n,r,(a,o,s)=>{D(s,0,0,n,r);const i=O.nowToArcadeDate(M(n));return i.isValid===!1?null:i})},t.timestamp=function(n,r){return e(n,r,(a,o,s)=>{D(s,0,0,n,r);const i=O.nowUTCToArcadeDate();return i.isValid===!1?null:i})},t.toutc=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=ue(s[0],M(n));return i===null?null:i.toUTC()})},t.tolocal=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=ue(s[0],M(n));return i===null?null:i.toLocal()})},t.day=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.day})},t.month=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.monthJS})},t.year=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.year})},t.hour=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),G(s[0]))return s[0].hour;const i=ue(s[0],M(n));return i===null?NaN:i.hour})},t.second=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),G(s[0]))return s[0].second;const i=ue(s[0],M(n));return i===null?NaN:i.second})},t.millisecond=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),G(s[0]))return s[0].millisecond;const i=ue(s[0],M(n));return i===null?NaN:i.millisecond})},t.minute=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),G(s[0]))return s[0].minute;const i=ue(s[0],M(n));return i===null?NaN:i.minute})},t.week=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,2,n,r);const i=Ue(s[0],M(n));if(i===null)return NaN;const u=p(R(s[1],0));if(u<0||u>6)throw new d(n,c.InvalidParameter,r);const l=i.day,f=i.monthJS,h=i.year,m=i.dayOfWeekJS,g=ls(l,f,h)-1,y=Math.floor(g/7);return m-u+(m-u<0?7:0){D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.dayOfWeekJS})},t.isoweekday=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.dayOfWeekISO})},t.isomonth=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.monthISO})},t.isoweek=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.weekISO})},t.isoyear=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=Ue(s[0],M(n));return i===null?NaN:i.yearISO})},t.date=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,0,8,n,r),s.length===3){if(P(s[0])&&G(s[1])&&x(s[2])){const i=Rt(_t(F(s[2])??"unknown",n),!1);return i===null?null:Re(O.fromParts(s[0].year,s[0].month,s[0].day,s[1].hour,s[1].minute,s[1].second,s[1].millisecond,i))}return Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),0,0,0,0,M(n)))}if(s.length===4)return Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),p(s[3]),0,0,0,M(n)));if(s.length===5)return Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),p(s[3]),p(s[4]),0,0,M(n)));if(s.length===6)return Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),p(s[3]),p(s[4]),p(s[5]),0,M(n)));if(s.length===7)return Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),p(s[3]),p(s[4]),p(s[5]),p(s[6]),M(n)));if(s.length===8){const i=Rt(_t(F(s[7])??"unknown",n),!1);return i===null?null:Re(O.fromParts(p(s[0]),p(s[1])+1,p(s[2]),p(s[3]),p(s[4]),p(s[5]),p(s[6]),i))}if(s.length===2){if(P(s[0])&&x(s[1])){const l=Rt(_t(F(s[1])??"unknown",n),!1);return l===null?null:Re(O.fromParts(s[0].year,s[0].month,s[0].day,0,0,0,0,l))}if(P(s[0])&&G(s[1]))return Re(O.fromParts(s[0].year,s[0].month,s[0].day,s[1].hour,s[1].minute,s[1].second,s[1].millisecond,"unknown"));let i,u=F(s[1]);return u===""?null:(u=mr(u,!0),i=u==="X"?st.fromSeconds(p(s[0])):u==="x"?st.fromMillis(p(s[0])):st.fromFormat(F(s[0]),u,{locale:ur(),numberingSystem:"latn"}),i.isValid?O.dateTimeToArcadeDate(i):null)}if(s.length===1){if(P(s[0]))return Re(O.fromParts(s[0].year,s[0].month,s[0].day,0,0,0,0,"unknown"));if(x(s[0])){if(s[0].replaceAll(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")==="")return null;if(/^[0-9][0-9][0-9][0-9]$/.test(s[0])===!0)return ue(s[0]+"-01-01",M(n))}const i=p(s[0]);if(isNaN(i)===!1){const u=st.fromMillis(i);return u.isValid?O.dateTimeAndZoneToArcadeDate(u,M(n)):null}return ue(s[0],M(n))}return s.length===0?O.nowToArcadeDate(M(n)):null})},t.datediff=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,4,n,r),G(s[0]))return G(s[1])?s[0].difference(s[1],F(s[2])):NaN;if(G(s[1]))return NaN;if(P(s[0]))return P(s[1])?s[0].difference(s[1],F(s[2])):NaN;if(P(s[1]))return NaN;let i=ue(s[0],M(n)),u=ue(s[1],M(n));if(i===null||u===null)return NaN;let l=R(s[3],"");switch(l!==""&&l!==null?(l=_t(F(l),n),i=O.arcadeDateAndZoneToArcadeDate(i,l),u=O.arcadeDateAndZoneToArcadeDate(u,l)):i.timeZone!==u.timeZone&&(i.isUnknownTimeZone?i=O.arcadeDateAndZoneToArcadeDate(i,u.timeZone):u=(u.isUnknownTimeZone,O.arcadeDateAndZoneToArcadeDate(u,i.timeZone))),F(s[2]).toLowerCase()){case"days":case"day":case"d":return i.diff(u,"days");case"months":case"month":return i.diff(u,"months");case"minutes":case"minute":case"m":return s[2]==="M"?i.diff(u,"months"):i.diff(u,"minutes");case"seconds":case"second":case"s":return i.diff(u,"seconds");case"milliseconds":case"millisecond":case"ms":default:return i.diff(u);case"hours":case"hour":case"h":return i.diff(u,"hours");case"years":case"year":case"y":return i.diff(u,"years")}})},t.dateadd=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,3,n,r);let i=p(s[1]);if(isNaN(i)||i===1/0||i===-1/0)return G(s[0])||P(s[0])?s[0].clone():ue(s[0],M(n));let u="milliseconds";switch(F(s[2]).toLowerCase()){case"days":case"day":case"d":u="days",i=P(s[0])?i:jn(i);break;case"months":case"month":u="months",i=P(s[0])?i:jn(i);break;case"minutes":case"minute":case"m":u=s[2]==="M"?"months":"minutes";break;case"seconds":case"second":case"s":u="seconds";break;case"milliseconds":case"millisecond":case"ms":u="milliseconds";break;case"hours":case"hour":case"h":u="hours";break;case"years":case"year":case"y":u="years"}if(G(s[0])||P(s[0]))return s[0].plus(u,i);const l=ue(s[0],M(n));return l===null?null:l.plus({[u]:i})})}}function we(t,e,n){return Math.sqrt((t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]!==void 0&&e[2]!==void 0?(t[2]*n-e[2]*n)**2:0))}function ji(t,e,n){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]!==void 0&&e[2]!==void 0?(t[2]*n-e[2]*n)**2:0)}const Pt=[];for(const t of[[9002,56146130,6131,6132,8050,8051,8228],[9003,5702,6358,6359,6360,8052,8053],[9095,5754]]){const e=t[0];for(let n=1;n0?(r.x/=a,r.y/=a,e&&(r.z/=a),n&&(r.m/=a)):(r.x=t[0][0],r.y=t[0][1],e&&(r.z=t[0][2]),n&&e?r.m=t[0][3]:n&&(r.m=t[0][2])),r}function fs(t,e,n,r){const a={x:(t[0]+e[0])/2,y:(t[1]+e[1])/2};return n&&(a.z=(t[2]+e[2])/2),n&&r?a.m=(t[3]+e[3])/2:r&&(a.m=(t[2]+e[2])/2),a}function ps(t,e){if(t.length<=1)return 0;let n=0;for(let r=1;r0?(n.x/=a,n.y/=a,t.hasZ===!0&&(n.z/=a),t.hasM===!0&&(n.m/=a),new j(n)):r>0?(e.x/=r,e.y/=r,t.hasZ===!0&&(n.z/=r),t.hasM===!0&&(e.m/=r),new j(e)):null}function gs(t){if(t.points.length===0)return null;let e=0,n=0,r=0,a=0;for(let s=0;s=r;)t-=e;return t}function Vi(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}function xs(t,e){return Cn(Vi(t,e),2*Math.PI)*(180/Math.PI)}function Fs(t,e){return Cn(Math.PI/2-Vi(t,e),2*Math.PI)*(180/Math.PI)}function qi(t,e,n){const r={x:t.x-e.x,y:t.y-e.y},a={x:n.x-e.x,y:n.y-e.y};return Math.atan2(ws(r,a),ys(r,a))}function Cs(t,e,n){return Di(Cn(qi(t,e,n),2*Math.PI))}function As(t,e,n){return Di(Cn(-1*qi(t,e,n),2*Math.PI))}zt[9002]=.3048,zt[9003]=.3048006096012192,zt[9095]=.3048007491;const oe=[0,0];function zr(t){for(let e=0;e1&&(r=1)),r<=.5?[e[0]+(n[0]-e[0])*r,e[1]+(n[1]-e[1])*r]:[n[0]-(n[0]-e[0])*(1-r),n[1]-(n[1]-e[1])*(1-r)]}function Hi(t,e){t.ringisclockwise=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);let i=[];if(s[0]===null)return!1;if(T(s[0]))for(const u of s[0]){if(!(u instanceof j))throw new d(n,c.InvalidParameter,r);i.push(u.hasZ?u.hasM?[u.x,u.y,u.z,u.m]:[u.x,u.y,u.z]:[u.x,u.y])}else if(s[0]instanceof ht)i=s[0]._elements;else{if(!$(s[0]))throw new d(n,c.InvalidParameter,r);for(const u of s[0].toArray()){if(!(u instanceof j))throw new d(n,c.InvalidParameter,r);i.push(u.hasZ?u.hasM?[u.x,u.y,u.z,u.m]:[u.x,u.y,u.z]:[u.x,u.y])}}return!(i.length<3)&&pi(i)})},t.polygon=function(n,r){return e(n,r,(a,o,s)=>{let i;if(D(s,1,1,n,r),s[0]instanceof B){const u=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);if(!(u instanceof ie))throw new d(n,c.InvalidParameter,r);i=u}else if(s[0]instanceof ie)i=le(s[0].toJSON());else{const u=JSON.parse(s[0]);u&&!u.spatialReference&&(u.spatialReference=n.spatialReference),i=ne(new ie(u),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.polyline=function(n,r){return e(n,r,(a,o,s)=>{let i;if(D(s,1,1,n,r),s[0]instanceof B){const u=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);if(!(u instanceof te))throw new d(n,c.InvalidParameter,r);i=u}else if(s[0]instanceof te)i=le(s[0].toJSON());else{const u=JSON.parse(s[0]);u&&!u.spatialReference&&(u.spatialReference=n.spatialReference),i=ne(new te(u),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.point=function(n,r){return e(n,r,(a,o,s)=>{let i;if(D(s,1,1,n,r),s[0]instanceof B){const u=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);if(!(u instanceof j))throw new d(n,c.InvalidParameter,r);i=u}else if(s[0]instanceof j)i=le(s[0].toJSON());else{const u=JSON.parse(s[0]);u&&!u.spatialReference&&(u.spatialReference=n.spatialReference),i=ne(new j(u),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.multipoint=function(n,r){return e(n,r,(a,o,s)=>{let i;if(D(s,1,1,n,r),s[0]instanceof B){const u=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);if(!(u instanceof Se))throw new d(n,c.InvalidParameter,r);i=u}else if(s[0]instanceof Se)i=le(s[0].toJSON());else{const u=JSON.parse(s[0]);u&&!u.spatialReference&&(u.spatialReference=n.spatialReference),i=ne(new Se(u),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.extent=function(n,r){return e(n,r,(a,o,s)=>{var u,l,f;s=Z(s),D(s,1,1,n,r);let i=null;if(s[0]instanceof B)i=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);else if(s[0]instanceof j){const h={xmin:s[0].x,ymin:s[0].y,xmax:s[0].x,ymax:s[0].y,spatialReference:s[0].spatialReference.toJSON()},m=s[0];m.hasZ?(h.zmin=m.z,h.zmax=m.z):m.hasM&&(h.mmin=m.m,h.mmax=m.m),i=le(h)}else if(s[0]instanceof ie)i=le((u=s[0].extent)==null?void 0:u.toJSON());else if(s[0]instanceof te)i=le((l=s[0].extent)==null?void 0:l.toJSON());else if(s[0]instanceof Se)i=le((f=s[0].extent)==null?void 0:f.toJSON());else if(s[0]instanceof ye)i=le(s[0].toJSON());else{const h=JSON.parse(s[0]);h&&!h.spatialReference&&(h.spatialReference=n.spatialReference),i=ne(new ye(h),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.geometry=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);let i=null;if(s[0]===null)return null;if(X(s[0]))i=ne(s[0].geometry(),n.spatialReference);else if(s[0]instanceof B)i=ne(ee.parseGeometryFromDictionary(s[0],n.spatialReference),n.spatialReference);else{const u=JSON.parse(s[0]);u&&!u.spatialReference&&(u.spatialReference=n.spatialReference),i=ne(le(u),n.spatialReference)}if(i!==null&&i.spatialReference.equals(n.spatialReference)===!1)throw new d(n,c.WrongSpatialReference,r);return it(i)})},t.setgeometry=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,2,n,r),!X(s[0]))throw new d(n,c.InvalidParameter,r);if(s[0].immutable===!0)throw new d(n,c.Immutable,r);if(!(s[1]instanceof N||s[1]===null))throw new d(n,c.InvalidParameter,r);return s[0]._geometry=s[1],C})},t.feature=function(n,r){return e(n,r,(a,o,s)=>{if(s.length===0)throw new d(n,c.WrongNumberOfParameters,r);let i;if(s.length===1)if(x(s[0]))i=ee.fromJson(JSON.parse(s[0]),n.timeZone);else if(X(s[0]))i=ee.createFromArcadeFeature(s[0]);else if(s[0]instanceof N)i=ee.createFromGraphicLikeObject(s[0],null,null,n.timeZone);else{if(!(s[0]instanceof B))throw new d(n,c.InvalidParameter,r);{let u=s[0].hasField("geometry")?s[0].field("geometry"):null,l=s[0].hasField("attributes")?s[0].field("attributes"):null;u!==null&&u instanceof B&&(u=ee.parseGeometryFromDictionary(u,n.spatialReference)),l!==null&&(l=ee.parseAttributesFromDictionary(l)),i=ee.createFromGraphicLikeObject(u,l,null,n.timeZone)}}else if(s.length===2){let u=null,l=null;if(s[0]!==null)if(s[0]instanceof N)u=s[0];else{if(!(u instanceof B))throw new d(n,c.InvalidParameter,r);u=ee.parseGeometryFromDictionary(s[0],n.spatialReference)}if(s[1]!==null){if(!(s[1]instanceof B))throw new d(n,c.InvalidParameter,r);l=ee.parseAttributesFromDictionary(s[1])}i=ee.createFromGraphicLikeObject(u,l,null,n.timeZone)}else{let u=null;const l={};if(s[0]!==null)if(s[0]instanceof N)u=s[0];else{if(!(u instanceof B))throw new d(n,c.InvalidParameter,r);u=ee.parseGeometryFromDictionary(s[0],n.spatialReference)}for(let f=1;f{if(s.length===0||s.length===1&&s[0]===null){const l=new B;return l.immutable=!1,l}if(s.length===1&&x(s[0]))try{const l=JSON.parse(s[0]),f=B.convertObjectToArcadeDictionary(l,M(n),!1);return f.immutable=!1,f}catch{throw new d(n,c.InvalidParameter,r)}if(s.length===1&&s[0]instanceof N)try{const l=s[0].toJSON();l.hasZ=s[0].hasZ===!0,l.hasM=s[0].hasM===!0;const f=B.convertObjectToArcadeDictionary(l,M(n),!1);return f.immutable=!1,f}catch{throw new d(n,c.InvalidParameter,r)}if(s.length===1&&X(s[0]))try{const l=new B;l.immutable=!1,l.setField("geometry",s[0].geometry());const f=new B;f.immutable=!1,l.setField("attributes",f);for(const h of s[0].keys())f.setField(h,s[0].field(h));return l}catch{throw new d(n,c.InvalidParameter,r)}if(s.length===1&&s[0]instanceof B)try{const l=new B;l.immutable=!1;for(const f of s[0].keys())l.setField(f,s[0].field(f));return l}catch{throw new d(n,c.InvalidParameter,r)}if(s.length===2&&s[0]instanceof B&&J(s[1]))try{if(s[1]!==!0){const l=new B;l.immutable=!1;for(const f of s[0].keys())l.setField(f,s[0].field(f));return l}return s[0].deepClone()}catch{throw new d(n,c.InvalidParameter,r)}if(s.length%2!=0)throw new d(n,c.WrongNumberOfParameters,r);const i={};for(let l=0;l{D(s,2,2,n,r);const i=F(s[1]);if(X(s[0])||s[0]instanceof B)return s[0].hasField(i);if(s[0]instanceof N){const u=At(s[0],i,null,null,2);return!u||u.keystate!=="notfound"}throw new d(n,c.InvalidParameter,r)})},t.hasvalue=function(n,r){return e(n,r,(a,o,s)=>(D(s,2,2,n,r),wr(s[0],s[1])!=null))},t.indexof=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,2,n,r);const i=s[1];if(T(s[0])){for(let u=0;u{if(s=Z(s),D(s,2,3,n,r),!(s[0]instanceof j))throw new d(n,c.InvalidParameter,r);if(!(s[1]instanceof j))throw new d(n,c.InvalidParameter,r);if(s.length>2&&!(s[2]instanceof j))throw new d(n,c.InvalidParameter,r);return s.length===2?xs(s[0],s[1]):Cs(s[0],s[1],s[2])})},t.bearing=function(n,r){return e(n,r,(a,o,s)=>{if(s=Z(s),D(s,2,3,n,r),!(s[0]instanceof j))throw new d(n,c.InvalidParameter,r);if(!(s[1]instanceof j))throw new d(n,c.InvalidParameter,r);if(s.length>2&&!(s[2]instanceof j))throw new d(n,c.InvalidParameter,r);return s.length===2?Fs(s[0],s[1]):As(s[0],s[1],s[2])})},t.isselfintersecting=function(n,r){return e(n,r,(a,o,s)=>{s=Z(s),D(s,1,1,n,r);let i=s[0];if(i instanceof ie)return i.isSelfIntersecting;if(i instanceof te)return zr(i.paths);if(i instanceof Se){const u=i.points;for(let l=0;l0&&l[0][i]===e)return{partId:a,distanceAlong:o,coordinate:new j({hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,x:l[0][0],y:l[0][1],...t.hasZ?{z:l[0][u]}:{},...t.hasM?{m:l[0][i]}:{}}),segmentId:0};let f=-1;for(let h=1;he&&e>l[h-1][i]){const k=(e-l[h-1][i])/g*m;let E=t.hasZ?Ki(l[h-1],l[h],k,r):Yi(l[h-1],l[h],k);E=[...E,e];const U=new j({hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,x:E[0],y:E[1],...t.hasZ?{z:E[u]}:{},...t.hasM?{m:E[i]}:{}});return{partId:a,distanceAlong:o+s(l[h-1],[U.x,U.y,...U.hasZ?[U.z]:[],...U.hasM?[U.m]:[]],r),coordinate:U,segmentId:f}}o+=m}}return null}function Ns(t,e){if(!t)return null;switch(t.type){case"extent":case"multipoint":case"mesh":case"point":return null}const n=t.type==="polygon"?t.rings:t.paths;if(e<0)return null;let r=1;(t.spatialReference.vcsWkid||t.spatialReference.latestVcsWkid)&&(r=Bt(t.spatialReference)/It(t.spatialReference));let a=0;const o=t.hasZ?3:2,s=2,i=t.hasZ?we:Wi;let u=-1;if(e===0)return n.length===0||n[0].length===0?null:{partId:0,coordinate:new j({hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,x:n[0][0][0],y:n[0][0][1],...t.hasZ?{z:n[0][0][s]}:{},...t.hasM?{m:n[0][0][o]}:{}}),segmentId:0};for(const l of n){u++;let f=-1;for(let h=1;he){let y=t.hasZ?Ki(l[h-1],l[h],e-a,r):Yi(l[h-1],l[h],e-a);return y=[...y,Kn(l[h-1][o],l[h][o],m,e-a)],{partId:u,coordinate:new j({hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,x:y[0],y:y[1],...t.hasZ?{z:y[s]}:{},...t.hasM?{m:y[o]}:{}}),segmentId:f}}a=g}}return null}function Ms(t,e){if(!t||!e)return null;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=Bt(e.spatialReference)/It(e.spatialReference));let r=null,a=0;return r=t,a=t.hasZ&&e.hasZ?we([e.x,e.y,e.z],[t.x,t.y,t.z],n):Je([e.x,e.y],[t.x,t.y],!1),{coordinate:r,distance:a}}function _s(t,e){if(!t||!e)return null;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=Bt(e.spatialReference)/It(e.spatialReference));let r=null,a=0,o=Number.MAX_VALUE,s=-1,i=-1;for(const u of t.points||[]){i++;const l=t.hasZ&&e.hasZ?ji([u[0],u[1],u[2]],[e.x,e.y,e.z],n):Ji([u[0],u[1]],[e.x,e.y]);l(i=Z(i),n(r,a,i),i[0]===null||i[1]===null||z.disjoint(i[0],i[1])))},t.intersects=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.intersects(i[0],i[1])))},t.touches=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.touches(i[0],i[1])))},t.crosses=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.crosses(i[0],i[1])))},t.within=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.within(i[0],i[1])))},t.contains=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.contains(i[0],i[1])))},t.overlaps=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]!==null&&i[1]!==null&&z.overlaps(i[0],i[1])))},t.equals=function(r,a){return e(r,a,(o,s,i)=>(D(i,2,2,r,a),i[0]===i[1]||(i[0]instanceof N&&i[1]instanceof N?z.equals(i[0],i[1]):(H(i[0])&&H(i[1])||G(i[0])&&G(i[1])||!(!P(i[0])||!P(i[1])))&&i[0].equals(i[1]))))},t.relate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,3,3,r,a),i[0]instanceof N&&i[1]instanceof N)return z.relate(i[0],i[1],F(i[2]));if(i[0]instanceof N&&i[1]===null||i[1]instanceof N&&i[0]===null||i[0]===null&&i[1]===null)return!1;throw new d(r,c.InvalidParameter,a)})},t.intersection=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]===null||i[1]===null?null:z.intersect(i[0],i[1])))},t.union=function(r,a){return e(r,a,(o,s,i)=>{const u=[];if((i=Z(i)).length===0)throw new d(r,c.WrongNumberOfParameters,a);if(i.length===1)if(T(i[0])){const l=Z(i[0]);for(let f=0;f(i=Z(i),n(r,a,i),i[0]===null?null:i[1]===null?Be(i[0]):z.difference(i[0],i[1])))},t.symmetricdifference=function(r,a){return e(r,a,(o,s,i)=>(i=Z(i),n(r,a,i),i[0]===null&&i[1]===null?null:i[0]===null?Be(i[1]):i[1]===null?Be(i[0]):z.symmetricDifference(i[0],i[1])))},t.clip=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),!(i[1]instanceof ye)&&i[1]!==null)throw new d(r,c.InvalidParameter,a);if(i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return i[1]===null?null:z.clip(i[0],i[1])})},t.cut=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),!(i[1]instanceof te)&&i[1]!==null)throw new d(r,c.InvalidParameter,a);if(i[0]===null)return[];if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return i[1]===null?[Be(i[0])]:z.cut(i[0],i[1])})},t.area=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),(i=Z(i))[0]===null)return 0;if(T(i[0])||$(i[0])){const u=Vn(i[0],r.spatialReference);return u===null?0:z.planarArea(u,Qt(R(i[1],-1)))}if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.planarArea(i[0],Qt(R(i[1],-1)))})},t.areageodetic=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),(i=Z(i))[0]===null)return 0;if(T(i[0])||$(i[0])){const u=Vn(i[0],r.spatialReference);return u===null?0:z.geodesicArea(u,Qt(R(i[1],-1)))}if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.geodesicArea(i[0],Qt(R(i[1],-1)))})},t.length=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),(i=Z(i))[0]===null)return 0;if(T(i[0])||$(i[0])){const u=Ye(i[0],r.spatialReference);return u===null?0:z.planarLength(u,se(R(i[1],-1)))}if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.planarLength(i[0],se(R(i[1],-1)))})},t.length3d=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),(i=Z(i))[0]===null)return 0;if(T(i[0])||$(i[0])){const u=Ye(i[0],r.spatialReference);return u===null?0:u.hasZ===!0?Gr(u,se(R(i[1],-1))):z.planarLength(u,se(R(i[1],-1)))}if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return i[0].hasZ===!0?Gr(i[0],se(R(i[1],-1))):z.planarLength(i[0],se(R(i[1],-1)))})},t.lengthgeodetic=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),(i=Z(i))[0]===null)return 0;if(T(i[0])||$(i[0])){const u=Ye(i[0],r.spatialReference);return u===null?0:z.geodesicLength(u,se(R(i[1],-1)))}if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.geodesicLength(i[0],se(R(i[1],-1)))})},t.distance=function(r,a){return e(r,a,(o,s,i)=>{i=Z(i),D(i,2,3,r,a);let u=i[0];(T(i[0])||$(i[0]))&&(u=nn(i[0],r.spatialReference));let l=i[1];if((T(i[1])||$(i[1]))&&(l=nn(i[1],r.spatialReference)),!(u instanceof N))throw new d(r,c.InvalidParameter,a);if(!(l instanceof N))throw new d(r,c.InvalidParameter,a);return z.distance(u,l,se(R(i[2],-1)))})},t.distancegeodetic=function(r,a){return e(r,a,(o,s,i)=>{i=Z(i),D(i,2,3,r,a);const u=i[0],l=i[1];if(!(u instanceof j))throw new d(r,c.InvalidParameter,a);if(!(l instanceof j))throw new d(r,c.InvalidParameter,a);const f=new te({paths:[],spatialReference:u.spatialReference});return f.addPath([u,l]),z.geodesicLength(f,se(R(i[2],-1)))})},t.densify=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,3,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);if(u<=0)throw new d(r,c.InvalidParameter,a);return i[0]instanceof ie||i[0]instanceof te?z.densify(i[0],u,se(R(i[2],-1))):i[0]instanceof ye?z.densify(Zr(i[0]),u,se(R(i[2],-1))):i[0]})},t.densifygeodetic=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,3,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);if(u<=0)throw new d(r,c.InvalidParameter,a);return i[0]instanceof ie||i[0]instanceof te?z.geodesicDensify(i[0],u,se(R(i[2],-1))):i[0]instanceof ye?z.geodesicDensify(Zr(i[0]),u,se(R(i[2],-1))):i[0]})},t.generalize=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,4,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);return z.generalize(i[0],u,Ft(R(i[2],!0)),se(R(i[3],-1)))})},t.buffer=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,3,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);return u===0?Be(i[0]):z.buffer(i[0],u,se(R(i[2],-1)))})},t.buffergeodetic=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,3,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);return u===0?Be(i[0]):z.geodesicBuffer(i[0],u,se(R(i[2],-1)))})},t.offset=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,6,r,a),i[0]===null)return null;if(!(i[0]instanceof ie||i[0]instanceof te))throw new d(r,c.InvalidParameter,a);const u=p(i[1]);if(isNaN(u))throw new d(r,c.InvalidParameter,a);const l=p(R(i[4],10));if(isNaN(l))throw new d(r,c.InvalidParameter,a);const f=p(R(i[5],0));if(isNaN(f))throw new d(r,c.InvalidParameter,a);return z.offset(i[0],u,se(R(i[2],-1)),F(R(i[3],"round")).toLowerCase(),l,f)})},t.rotate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,3,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);const u=i[0]instanceof ye?ie.fromExtent(i[0]):i[0],l=p(i[1]);if(isNaN(l))throw new d(r,c.InvalidParameter,a);const f=R(i[2],null);if(f===null)return z.rotate(u,l);if(f instanceof j)return z.rotate(u,l,f);throw new d(r,c.InvalidParameter,a)})},t.centroid=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,1,1,r,a),i[0]===null)return null;let u=i[0];if((T(i[0])||$(i[0]))&&(u=nn(i[0],r.spatialReference)),u===null)return null;if(!(u instanceof N))throw new d(r,c.InvalidParameter,a);return u instanceof j?ne(Be(u),r.spatialReference):u instanceof ie?u.centroid:u instanceof te?Ds(u):u instanceof Se?gs(u):u instanceof ye?u.center:null})},t.measuretocoordinate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),i[0]===null)return null;let u=i[0];if((T(i[0])||$(i[0]))&&(u=Ye(i[0],r.spatialReference)),u===null)return null;if(!(u instanceof N))throw new d(r,c.InvalidParameter,a);if(!(u instanceof te))throw new d(r,c.InvalidParameter,a);if(L(i[1]===!1))throw new d(r,c.InvalidParameter,a);const l=Bs(u,i[1]);return l?B.convertObjectToArcadeDictionary(l,M(r),!1,!0):null})},t.pointtocoordinate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),i[0]===null)return null;let u=i[0];if((T(i[0])||$(i[0]))&&(u=Ye(i[0],r.spatialReference)),u===null)return null;if(!(u instanceof N))throw new d(r,c.InvalidParameter,a);if(!(u instanceof te))throw new d(r,c.InvalidParameter,a);const l=i[1];if(l===null)return null;if(!(l instanceof j))throw new d(r,c.InvalidParameter,a);if(L(i[1]===!1))throw new d(r,c.InvalidParameter,a);const f=Rs(u,l);return f?B.convertObjectToArcadeDictionary(f,M(r),!1,!0):null})},t.distancetocoordinate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),i[0]===null)return null;let u=i[0];if((T(i[0])||$(i[0]))&&(u=Ye(i[0],r.spatialReference)),u===null)return null;if(!(u instanceof N))throw new d(r,c.InvalidParameter,a);if(!(u instanceof te))throw new d(r,c.InvalidParameter,a);if(L(i[1]===!1))throw new d(r,c.InvalidParameter,a);const l=Ns(u,i[1]);return l?B.convertObjectToArcadeDictionary(l,M(r),!1,!0):null})},t.multiparttosinglepart=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,1,1,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);if(i[0]instanceof j)return[ne(Be(i[0]),r.spatialReference)];if(i[0]instanceof ye)return[ne(Be(i[0]),r.spatialReference)];const u=z.simplify(i[0]);if(u instanceof ie){const l=[],f=[];for(let h=0;h{if(i=Z(i),D(i,1,1,r,a),i[0]===null)return!0;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.isSimple(i[0])})},t.simplify=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,1,1,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.simplify(i[0])})},t.convexhull=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,1,1,r,a),i[0]===null)return null;if(!(i[0]instanceof N))throw new d(r,c.InvalidParameter,a);return z.convexHull(i[0])})},t.nearestcoordinate=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),!(i[0]instanceof N||i[0]===null))throw new d(r,c.InvalidParameter,a);if(!(i[1]instanceof j||i[1]===null))throw new d(r,c.InvalidParameter,a);if(i[0]===null||i[1]===null)return null;const u=z.nearestCoordinate(i[0],i[1]);return u===null||u.isEmpty?null:B.convertObjectToArcadeDictionary({coordinate:u.coordinate,distance:u.distance,sideOfLine:u.distance===0?"straddle":u.isRightSide?"right":"left"},M(r),!1,!0)})},t.nearestvertex=function(r,a){return e(r,a,(o,s,i)=>{if(i=Z(i),D(i,2,2,r,a),!(i[0]instanceof N||i[0]===null))throw new d(r,c.InvalidParameter,a);if(!(i[1]instanceof j||i[1]===null))throw new d(r,c.InvalidParameter,a);if(i[0]===null||i[1]===null)return null;const u=z.nearestVertex(i[0],i[1]);return u===null||u.isEmpty?null:B.convertObjectToArcadeDictionary({coordinate:u.coordinate,distance:u.distance,sideOfLine:u.distance===0?"straddle":u.isRightSide?"right":"left"},M(r),!1,!0)})}}function In(t,e,n){if(n===void 0||+n==0)return Math[t](e);if(e=+e,n=+n,isNaN(e)||typeof n!="number"||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}function Qi(t,e){function n(r,a,o){const s=p(r);return isNaN(s)?s:isNaN(a)||isNaN(o)||a>o?NaN:so?o:s}t.number=function(r,a){return e(r,a,(o,s,i)=>{D(i,1,2,r,a);const u=i[0];if(L(u))return u;if(u===null)return 0;if(H(u)||G(u)||P(u))return u.toNumber();if(J(u))return Number(u);if(T(u))return NaN;if(u===""||u===void 0)return Number(u);if(x(u)){if(i[1]!==void 0){let l=tt(i[1],"‰","");return l=tt(l,"¤",""),wi(u,{pattern:l})}return Number(u.trim())}return Number(u)})},t.abs=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.abs(p(i[0]))))},t.acos=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.acos(p(i[0]))))},t.asin=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.asin(p(i[0]))))},t.atan=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.atan(p(i[0]))))},t.atan2=function(r,a){return e(r,a,(o,s,i)=>(D(i,2,2,r,a),Math.atan2(p(i[0]),p(i[1]))))},t.ceil=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),i.length===2){let u=p(i[1]);return isNaN(u)&&(u=0),In("ceil",p(i[0]),-1*u)}return Math.ceil(p(i[0]))})},t.round=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),i.length===2){let u=p(i[1]);return isNaN(u)&&(u=0),In("round",p(i[0]),-1*u)}return Math.round(p(i[0]))})},t.floor=function(r,a){return e(r,a,(o,s,i)=>{if(D(i,1,2,r,a),i.length===2){let u=p(i[1]);return isNaN(u)&&(u=0),In("floor",p(i[0]),-1*u)}return Math.floor(p(i[0]))})},t.cos=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.cos(p(i[0]))))},t.isnan=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),typeof i[0]=="number"&&isNaN(i[0])))},t.exp=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.exp(p(i[0]))))},t.log=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.log(p(i[0]))))},t.pow=function(r,a){return e(r,a,(o,s,i)=>(D(i,2,2,r,a),p(i[0])**p(i[1])))},t.random=function(r,a){return e(r,a,(o,s,i)=>(D(i,0,0,r,a),Math.random()))},t.sin=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.sin(p(i[0]))))},t.sqrt=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.sqrt(p(i[0]))))},t.tan=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),Math.tan(p(i[0]))))},t.isempty=function(r,a){return e(r,a,(o,s,i)=>(D(i,1,1,r,a),i[0]===null||i[0]===""||i[0]===void 0||i[0]===C))},t.boolean=function(r,a){return e(r,a,(o,s,i)=>{D(i,1,1,r,a);const u=i[0];return Ft(u)})},t.constrain=function(r,a){return e(r,a,(o,s,i)=>{D(i,3,3,r,a);const u=p(i[1]),l=p(i[2]);if(T(i[0])){const f=[];for(const h of i[0])f.push(n(h,u,l));return f}if($(i[0])){const f=[];for(let h=0;h=e&&e!==-1)return n}return n}function kn(t,e,n=1e3){switch(t.toLowerCase()){case"distinct":return Ls(e,n);case"avg":case"mean":return ea(rt(e));case"min":return Math.min.apply(Math,rt(e));case"sum":return Os(rt(e));case"max":return Math.max.apply(Math,rt(e));case"stdev":case"stddev":return Math.sqrt(jr(rt(e)));case"var":case"variance":return jr(rt(e));case"count":return e.length}return 0}function We(t,e){if(e.length===1){if(T(e[0]))return kn(t,e[0],-1);if($(e[0]))return kn(t,e[0].toArray(),-1)}return kn(t,e,-1)}function ta(t,e){t.stdev=function(n,r){return e(n,r,(a,o,s)=>We("stdev",s))},t.variance=function(n,r){return e(n,r,(a,o,s)=>We("variance",s))},t.average=function(n,r){return e(n,r,(a,o,s)=>We("mean",s))},t.mean=function(n,r){return e(n,r,(a,o,s)=>We("mean",s))},t.sum=function(n,r){return e(n,r,(a,o,s)=>We("sum",s))},t.min=function(n,r){return e(n,r,(a,o,s)=>We("min",s))},t.max=function(n,r){return e(n,r,(a,o,s)=>We("max",s))},t.distinct=function(n,r){return e(n,r,(a,o,s)=>We("distinct",s))},t.count=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),T(s[0])||x(s[0]))return s[0].length;if($(s[0]))return s[0].length();throw new d(n,c.InvalidParameter,r)})}}let Yn=class extends B{constructor(e){super(),this.declaredClass="esri.arcade.Portal",this.immutable=!1,this.setField("url",e),this.immutable=!0}},Us=class na extends B{constructor(e,n,r,a,o,s,i){super(),this.attachmentUrl=o,this.declaredClass="esri.arcade.Attachment",this.immutable=!1,this.setField("id",e),this.setField("name",n),this.setField("contenttype",r),this.setField("size",a),this.setField("exifinfo",s),this.setField("keywords",i),this.immutable=!0}deepClone(){var e;return new na(this.field("id"),this.field("name"),this.field("contenttype"),this.field("size"),this.attachmentUrl,((e=this.field("exifinfo"))==null?void 0:e.deepClone())??null,this.field("keywords"))}};const xr=t=>(e,n,r)=>(r=r||14,+t(e,n).toFixed(r)),zs=(t,e)=>t+e,Zs=(t,e)=>t*e,Gs=(t,e)=>t/e,Jr=(t,e,n)=>xr(zs)(t,e,n),yt=(t,e,n)=>xr(Zs)(t,e,n),hn=(t,e,n)=>xr(Gs)(t,e,n),dn=360,js=400,Js=2*Math.PI,Ne=3600,Vr=3240,Zt=60,et=60,qr=180*Ne/Math.PI,Ot=dn*Zt*et,Tn=90*Ne,dt=180*Ne,Vs=270*Ne,ra="ᵍ",Lt="°";function $t(t){if(x(t)===!1)throw new d(null,c.InvalidParameter,null);return t}function Xn(t,e){const n=10**e;return Math.round(t*n)/n}function qs(t,e){return t%e}function ft(t){const e=parseFloat(t.toString().replace(Math.trunc(t).toString(),"0"))*Math.sign(t);return t<0?{fraction:e,integer:Math.ceil(t)}:{fraction:e,integer:Math.floor(t)}}var Y,w,W,Qn;function gt(t,e){switch(t){case Y.north:return e==="SHORT"?"N":"North";case Y.east:return e==="SHORT"?"E":"East";case Y.south:return e==="SHORT"?"S":"South";case Y.west:return e==="SHORT"?"W":"West"}}function Bn(t,e){return t-Math.floor(t/e)*e}function Nn(t){switch(t){case w.truncated_degrees:case w.decimal_degrees:return dn;case w.radians:return Js;case w.gradians:return js;case w.seconds:return Ot;case w.fractional_degree_minutes:return Zt;case w.fractional_minute_seconds:return et;default:throw new d(null,c.LogicError,null,{reason:"unsupported evaluations"})}}function Hr(t){switch(t.toUpperCase().trim()){case"NORTH":case"NORTHAZIMUTH":case"NORTH AZIMUTH":return W.north_azimuth;case"POLAR":return W.polar;case"QUADRANT":return W.quadrant;case"SOUTH":case"SOUTHAZIMUTH":case"SOUTH AZIMUTH":return W.south_azimuth}throw new d(null,c.LogicError,null,{reason:"unsupported directionType"})}function Wr(t){switch(t.toUpperCase().trim()){case"D":case"DD":case"DECIMALDEGREE":case"DECIMAL DEGREE":case"DEGREE":case"DECIMALDEGREES":case"DECIMAL DEGREES":case"DEGREES":return w.decimal_degrees;case"DMS":case"DEGREESMINUTESSECONDS":case"DEGREES MINUTES SECONDS":return w.degrees_minutes_seconds;case"R":case"RAD":case"RADS":case"RADIAN":case"RADIANS":return w.radians;case"G":case"GON":case"GONS":case"GRAD":case"GRADS":case"GRADIAN":case"GRADIANS":return w.gradians}throw new d(null,c.LogicError,null,{reason:"unsupported units"})}(function(t){t[t.north=0]="north",t[t.east=1]="east",t[t.south=2]="south",t[t.west=3]="west"})(Y||(Y={})),function(t){t[t.decimal_degrees=1]="decimal_degrees",t[t.seconds=2]="seconds",t[t.degrees_minutes_seconds=3]="degrees_minutes_seconds",t[t.radians=4]="radians",t[t.gradians=5]="gradians",t[t.truncated_degrees=6]="truncated_degrees",t[t.fractional_degree_minutes=7]="fractional_degree_minutes",t[t.fractional_minute_seconds=8]="fractional_minute_seconds"}(w||(w={})),function(t){t[t.north_azimuth=1]="north_azimuth",t[t.polar=2]="polar",t[t.quadrant=3]="quadrant",t[t.south_azimuth=4]="south_azimuth"}(W||(W={})),function(t){t[t.meridian=0]="meridian",t[t.direction=1]="direction"}(Qn||(Qn={}));let Et=class sn{constructor(e,n,r){this.m_degrees=e,this.m_minutes=n,this.m_seconds=r}getField(e){switch(e){case w.decimal_degrees:case w.truncated_degrees:return this.m_degrees;case w.fractional_degree_minutes:return this.m_minutes;case w.seconds:case w.fractional_minute_seconds:return this.m_seconds;default:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"})}}static secondsToDMS(e){const n=ft(e).fraction;let r=ft(e).integer;const a=Math.floor(r/Ne);r-=a*Ne;const o=Math.floor(r/et);return r-=o*et,new sn(a,o,r+n)}static numberToDms(e){const n=ft(e).fraction,r=ft(e).integer,a=yt(ft(100*n).fraction,100),o=ft(100*n).integer;return new sn(r,o,a)}format(e,n){let r=Xn(this.m_seconds,n),a=this.m_minutes,o=this.m_degrees;if(e===w.seconds||e===w.fractional_minute_seconds)et<=r&&(r-=et,++a),Zt<=a&&(a=0,++o),dn<=o&&(o=0);else if(e===w.fractional_degree_minutes)r=0,a=30<=this.m_seconds?this.m_minutes+1:this.m_minutes,o=this.m_degrees,Zt<=a&&(a=0,++o),dn<=o&&(o=0);else if(e===w.decimal_degrees||e===w.truncated_degrees){const s=hn(this.m_seconds,Ne),i=hn(this.m_minutes,Zt);o=Math.round(this.m_degrees+i+s),a=0,r=0}return new sn(o,a,r)}static dmsToSeconds(e,n,r){return e*Ne+n*et+r}},Hs=class{constructor(e,n,r){this.meridian=e,this.angle=n,this.direction=r}fetchAzimuth(e){return e===Qn.meridian?this.meridian:this.direction}},Xe=class Ge{constructor(e){this._angle=e}static createFromAngleAndDirection(e,n){return new Ge(new Pe(Ge._convertDirectionFormat(e.extractAngularUnits(w.seconds),n,W.north_azimuth)))}getAngle(e){const n=this._angle.extractAngularUnits(w.seconds);switch(e){case W.north_azimuth:case W.south_azimuth:case W.polar:return new Pe(Ge._convertDirectionFormat(n,W.north_azimuth,e));case W.quadrant:{const r=Ge.secondsNorthAzimuthToQuadrant(n);return new Pe(r.angle)}}}getMeridian(e){const n=this._angle.extractAngularUnits(w.seconds);switch(e){case W.north_azimuth:return Y.north;case W.south_azimuth:return Y.south;case W.polar:return Y.east;case W.quadrant:return Ge.secondsNorthAzimuthToQuadrant(n).meridian}}getDirection(e){const n=this._angle.extractAngularUnits(w.seconds);switch(e){case W.north_azimuth:return Y.east;case W.south_azimuth:return Y.west;case W.polar:return Y.north;case W.quadrant:return Ge.secondsNorthAzimuthToQuadrant(n).direction}}static secondsNorthAzimuthToQuadrant(e){const n=e<=Tn||e>=Vs?Y.north:Y.south,r=n===Y.north?Math.min(Ot-e,e):Math.abs(e-dt),a=e>dt?Y.west:Y.east;return new Hs(n,r,a)}static createFromAngleMeridianAndDirection(e,n,r){return new Ge(new Pe(Ge.secondsQuadrantToNorthAzimuth(e.extractAngularUnits(w.seconds),n,r)))}static secondsQuadrantToNorthAzimuth(e,n,r){return n===Y.north?r===Y.east?e:Ot-e:r===Y.east?dt-e:dt+e}static _convertDirectionFormat(e,n,r){let a=0;switch(n){case W.north_azimuth:a=e;break;case W.polar:a=Tn-e;break;case W.quadrant:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"});case W.south_azimuth:a=e+dt}let o=0;switch(r){case W.north_azimuth:o=a;break;case W.polar:o=Tn-a;break;case W.quadrant:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"});case W.south_azimuth:o=a-dt}return o=qs(o,Ot),o<0?Ot+o:o}};function Kr(t,e,n){let r=null;switch(e){case w.decimal_degrees:r=yt(t,Ne);break;case w.seconds:r=t;break;case w.gradians:r=yt(t,Vr);break;case w.radians:r=yt(t,qr);break;default:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"})}switch(n){case w.decimal_degrees:return hn(r,Ne);case w.seconds:return r;case w.gradians:return hn(r,Vr);case w.radians:return r/qr;default:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"})}}let Pe=class er{constructor(e){this._seconds=e}static createFromAngleAndUnits(e,n){return new er(Kr(e,n,w.seconds))}extractAngularUnits(e){return Kr(this._seconds,w.seconds,Jt(e))}static createFromDegreesMinutesSeconds(e,n,r){return new er(Jr(Jr(yt(e,Ne),yt(n,et)),r))}};function Jt(t){switch(gi(t),t){case w.decimal_degrees:case w.truncated_degrees:case w.degrees_minutes_seconds:return w.decimal_degrees;case w.gradians:return w.gradians;case w.fractional_degree_minutes:return w.fractional_degree_minutes;case w.radians:return w.radians;case w.seconds:case w.fractional_minute_seconds:return w.seconds}}let Ws=class ia{constructor(e,n,r,a){this.view=e,this.angle=n,this.merdian=r,this.direction=a,this._dms=null,this._formattedDms=null}static createFromStringAndBearing(e,n,r){return new ia(e,n.getAngle(r),n.getMeridian(r),n.getDirection(r))}fetchAngle(){return this.angle}fetchMeridian(){return this.merdian}fetchDirection(){return this.direction}fetchView(){return this.view}fetchDms(){return this._dms===null&&this._calculateDms(),this._dms}fetchFormattedDms(){return this._formattedDms===null&&this._calculateDms(),this._formattedDms}_calculateDms(){let e=null,n=w.truncated_degrees,r=0;for(let a=0;a0?1:0),"0");case w.truncated_degrees:case w.fractional_degree_minutes:return o=Bn(a.fetchFormattedDms().getField(e),Nn(e)),o.toFixed(r).padStart(n+r+(r>0?1:0),"0");case w.fractional_minute_seconds:return o=Bn(Xn(a.fetchDms().getField(e),r),Nn(e)),o.toFixed(r).padStart(n+r+(r>0?1:0),"0");default:throw new d(null,c.LogicError,null,{reason:"unexpected evaluation"})}}function Ys(t,e,n){if(n===W.quadrant)throw new d(null,c.LogicError,null,{reason:"conversion error"});if(e===w.degrees_minutes_seconds){const r=Et.numberToDms(t);return Xe.createFromAngleAndDirection(Pe.createFromDegreesMinutesSeconds(r.m_degrees,r.m_minutes,r.m_seconds),n)}return Xe.createFromAngleAndDirection(Pe.createFromAngleAndUnits(t,Jt(e)),n)}function Xs(t){switch(p(t)){case 1:return{first:Y.north,second:Y.east};case 2:return{first:Y.south,second:Y.east};case 3:return{first:Y.south,second:Y.west};case 4:return{first:Y.north,second:Y.west}}return null}function Yr(t){switch(t.toUpperCase().trim()){case"N":case"NORTH":return Y.north;case"E":case"EAST":return Y.east;case"S":case"SOUTH":return Y.south;case"W":case"WEST":return Y.west}return null}function pt(t){const e=parseFloat(t);if(L(e)){if(isNaN(e))throw new d(null,c.LogicError,null,{reason:"invalid conversion"});return e}throw new d(null,c.LogicError,null,{reason:"invalid conversion"})}function Mn(t,e,n){const r=n===W.quadrant;let a=null,o=null,s=0,i=0,u=0;if(r){if(t.length<2)throw new d(null,c.LogicError,null,{reason:"conversion error"});u=1;const l=Xs(F(t[t.length-1]));if(l?(a=l.first,o=l.second):(s=1,a=Yr(F(t[0])),o=Yr(F(t[t.length-1]))),a===null||o===null)throw new d(null,c.LogicError,null,{reason:"invalid conversion"})}switch(e){case w.decimal_degrees:case w.radians:case w.gradians:if(t.length===0)throw new d(null,c.LogicError,null,{reason:"invalid conversion"});return r?Xe.createFromAngleMeridianAndDirection(Pe.createFromAngleAndUnits(pt(t[s]),Jt(e)),a,o):Xe.createFromAngleAndDirection(Pe.createFromAngleAndUnits(pt(t[s]),Jt(e)),n);case w.degrees_minutes_seconds:if(i=t.length-u-s,i===3){const l=Pe.createFromDegreesMinutesSeconds(pt(t[s]),pt(t[s+1]),pt(t[s+2]));return r?Xe.createFromAngleMeridianAndDirection(l,a,o):Xe.createFromAngleAndDirection(l,n)}if(i===1){const l=pt(t[s]),f=Et.numberToDms(l),h=Pe.createFromDegreesMinutesSeconds(f.m_degrees,f.m_minutes,f.m_seconds);return r?Xe.createFromAngleMeridianAndDirection(h,a,o):Xe.createFromAngleAndDirection(h,n)}}throw new d(null,c.LogicError,null,{reason:"invalid conversion"})}function Qs(t){const e=new Set([" ","-","/","'",'"',"\\","^",Lt,ra," ","\r",` +`,"*"]);let n="";for(let r=0;rr!=="")}function eo(t,e,n){if(L(t))return Ys(p(t),e,n);if(x(t))return Mn(Qs(t),e,n);if(T(t))return Mn(t,e,n);if($(t))return Mn(t.toArray(),e,n);throw new d(null,c.LogicError,null,{reason:"conversion error"})}function to(t,e,n){const r=Jt(n);if(r&&n!==w.degrees_minutes_seconds)return t.getAngle(e).extractAngularUnits(r);throw new d(null,c.LogicError,null,{reason:"conversion error"})}function no(t,e,n){const r=t.getAngle(e);if(e===W.quadrant&&n===w.degrees_minutes_seconds){const a=Et.secondsToDMS(r.extractAngularUnits(w.seconds));return[gt(t.getMeridian(e),"SHORT"),a.m_degrees,a.m_minutes,a.m_seconds,gt(t.getDirection(e),"SHORT")]}if(n===w.degrees_minutes_seconds){const a=Et.secondsToDMS(r.extractAngularUnits(w.seconds));return[a.m_degrees,a.m_minutes,a.m_seconds]}return e===W.quadrant?[gt(t.getMeridian(e),"SHORT"),r.extractAngularUnits(n),gt(t.getDirection(e),"SHORT")]:[r.extractAngularUnits(n)]}function ro(t,e){let n="";switch(t){case w.decimal_degrees:n=e===W.quadrant?"DD.DD"+Lt:"DDD.DD"+Lt;break;case w.degrees_minutes_seconds:n=e===W.quadrant?"dd"+Lt+` mm' ss"`:"ddd"+Lt+` mm' ss.ss"`;break;case w.radians:n="R.RR";break;case w.gradians:n="GGG.GG"+ra;break;default:throw new d(null,c.LogicError,null,{reason:"conversion error"})}return e===W.quadrant&&(n="p "+n+" b"),n}function tr(t,e,n){const r={padding:0,rounding:0,newpos:e};let a=!1;for(;e>6,128|63&a):a<55296||a>=57344?e.push(224|a>>12,128|a>>6&63,128|63&a):(n++,a=65536+((1023&a)<<10|1023&t.charCodeAt(n)),e.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|63&a))}return new Uint8Array(e)}let oo=class{constructor(e){this._seed=e,this._totallen=0,this._bufs=[],this.init()}init(){return this._bufs=[],this._totallen=0,this}updateFloatArray(e){const n=[];for(const r of e)isNaN(r)?n.push("NaN"):r===1/0?n.push("Infinity"):r===-1/0?n.push("-Infinity"):r===0?n.push("0"):n.push(r.toString(16));this.update(ei(n.join("")))}updateIntArray(e){const n=Int32Array.from(e);this.update(new Uint8Array(n.buffer))}updateUint8Array(e){this.update(Uint8Array.from(e))}updateWithString(e){return this.update(ei(e))}update(e){return this._bufs.push(e),this._totallen+=e.length,this}digest(){const e=new Uint8Array(this._totallen);let n=0;for(const r of this._bufs)e.set(r,n),n+=r.length;return this.init(),this._xxHash32(e,this._seed)}_xxHash32(e,n=0){const r=e;let a=n+Qr&4294967295,o=0;if(r.length>=16){const i=[n+mt+Dt&4294967295,n+Dt&4294967295,n+0&4294967295,n-mt&4294967295],u=e,l=u.length-16;let f=0;for(o=0;(4294967280&o)<=l;o+=4){const h=o,m=u[h]+(u[h+1]<<8),g=u[h+2]+(u[h+3]<<8),y=m*Dt+(g*Dt<<16);let k=i[f]+y&4294967295;k=k<<13|k>>>19;const E=65535&k,U=k>>>16;i[f]=E*mt+(U*mt<<16)&4294967295,f=f+1&3}a=(i[0]<<1|i[0]>>>31)+(i[1]<<7|i[1]>>>25)+(i[2]<<12|i[2]>>>20)+(i[3]<<18|i[3]>>>14)&4294967295}a=a+e.length&4294967295;const s=e.length-4;for(;o<=s;o+=4){const i=o,u=r[i]+(r[i+1]<<8),l=r[i+2]+(r[i+3]<<8);a=a+(u*tn+(l*tn<<16))&4294967295,a=a<<17|a>>>15,a=(65535&a)*Xr+((a>>>16)*Xr<<16)&4294967295}for(;o>>21,a=(65535&a)*mt+((a>>>16)*mt<<16)&4294967295;return a^=a>>>15,a=((65535&a)*Dt&4294967295)+((a>>>16)*Dt<<16),a^=a>>>13,a=((65535&a)*tn&4294967295)+((a>>>16)*tn<<16),a^=a>>>16,a<0?a+4294967296:a}};function uo(t){var e;return t.loadStatus==="loaded"&&((e=t.user)!=null&&e.sourceJSON)?t.user.sourceJSON:null}function lo(t,e){return!!t&&Ua(t,(e==null?void 0:e.restUrl)||"")}function ti(t,e){if(!t||!e)return t===e;if(t.x===e.x&&t.y===e.y){if(t.hasZ){if(t.z!==e.z)return!1}else if(e.hasZ)return!1;if(t.hasM){if(t.m!==e.m)return!1}else if(e.hasM)return!1;return!0}return!1}function ve(t,e,n){if(t!==null)if(T(t)){if(e.updateUint8Array([61]),n.map.has(t)){const r=n.map.get(t);e.updateIntArray([61237541^r])}else{n.map.set(t,n.currentLength++);for(const r of t)ve(r,e,n);n.map.delete(t),n.currentLength--}e.updateUint8Array([199])}else if($(t)){if(e.updateUint8Array([61]),n.map.has(t)){const r=n.map.get(t);e.updateIntArray([61237541^r])}else{n.map.set(t,n.currentLength++);for(const r of t.toArray())ve(r,e,n);n.map.delete(t),n.currentLength--}e.updateUint8Array([199])}else{if(H(t))return e.updateIntArray([t.toNumber()]),void e.updateUint8Array([241]);if(P(t))return e.updateIntArray([t.toNumber()]),void e.updateIntArray([257]);if(G(t))return e.updateIntArray([t.toNumber()]),void e.updateIntArray([263]);if(x(t))return e.updateIntArray([t.length]),e.updateWithString(t),void e.updateUint8Array([41]);if(J(t))e.updateUint8Array([t===!0?1:0,113]);else{if(L(t))return e.updateFloatArray([t]),void e.updateUint8Array([173]);if(t instanceof Us)throw new d(n.context,c.UnsupportedHashType,n.node);if(t instanceof Yn)throw new d(n.context,c.UnsupportedHashType,n.node);if(!(t instanceof B)){if(X(t))throw new d(n.context,c.UnsupportedHashType,n.node);if(t instanceof j)return e.updateIntArray([3833836621]),e.updateIntArray([0]),e.updateFloatArray([t.x]),e.updateIntArray([1]),e.updateFloatArray([t.y]),t.hasZ&&(e.updateIntArray([2]),e.updateFloatArray([t.z])),t.hasM&&(e.updateIntArray([3]),e.updateFloatArray([t.m])),e.updateIntArray([3765347959]),void ve(t.spatialReference.wkid,e,n);if(t instanceof ie){e.updateIntArray([1266616829]);for(let r=0;r(D(s,1,1,n,r),new Yn(F(s[0]))))},t.typeof=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=dr(s[0]);if(i==="Unrecognized Type")throw new d(n,c.UnrecognizedType,r);return i})},t.trim=function(n,r){return e(n,r,(a,o,s)=>(D(s,1,1,n,r),F(s[0]).trim()))},t.tohex=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=p(s[0]);return isNaN(i)?i:i.toString(16)})},t.upper=function(n,r){return e(n,r,(a,o,s)=>(D(s,1,1,n,r),F(s[0]).toUpperCase()))},t.proper=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,2,n,r);let i=1;s.length===2&&F(s[1]).toLowerCase()==="firstword"&&(i=2);const u=/\s/,l=F(s[0]);let f="",h=!0;for(let m=0;m(D(s,1,1,n,r),F(s[0]).toLowerCase()))},t.guid=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,0,1,n,r),s.length>0)switch(F(s[0]).toLowerCase()){case"digits":return Mt().replace("-","").replace("-","").replace("-","").replace("-","");case"digits-hyphen":return Mt();case"digits-hyphen-braces":return"{"+Mt()+"}";case"digits-hyphen-parentheses":return"("+Mt()+")"}return"{"+Mt()+"}"})},t.standardizeguid=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,2,n,r);let i=F(s[0]);if(i===""||i===null)return"";const u=/^(\{|\()?(?[0-9a-z]{8})(-?)(?[0-9a-z]{4})(-?)(?[0-9a-z]{4})(-?)(?[0-9a-z]{4})(-?)(?[0-9a-z]{12})(\}|\))?$/gim.exec(i);if(!u)return"";const l=u.groups;switch(i=l.partA+"-"+l.partB+"-"+l.partC+"-"+l.partD+"-"+l.partE,F(s[1]).toLowerCase()){case"digits":return i.replace("-","").replace("-","").replace("-","").replace("-","");case"digits-hyphen":return i;case"digits-hyphen-braces":return"{"+i+"}";case"digits-hyphen-parentheses":return"("+i+")"}return"{"+i+"}"})},t.console=function(n,r){return e(n,r,(a,o,s)=>(s.length===0||(s.length===1?n.console(F(s[0])):n.console(F(s))),C))},t.mid=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,3,n,r);let i=p(s[1]);if(isNaN(i))return"";if(i<0&&(i=0),s.length===2)return F(s[0]).substr(i);let u=p(s[2]);return isNaN(u)?"":(u<0&&(u=0),F(s[0]).substr(i,u))})},t.find=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,3,n,r);let i=0;if(s.length>2){if(i=p(R(s[2],0)),isNaN(i))return-1;i<0&&(i=0)}return F(s[1]).indexOf(F(s[0]),i)})},t.left=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,2,n,r);let i=p(s[1]);return isNaN(i)?"":(i<0&&(i=0),F(s[0]).substr(0,i))})},t.right=function(n,r){return e(n,r,(a,o,s)=>{D(s,2,2,n,r);let i=p(s[1]);return isNaN(i)?"":(i<0&&(i=0),F(s[0]).substr(-1*i,i))})},t.split=function(n,r){return e(n,r,(a,o,s)=>{let i;D(s,2,4,n,r);let u=p(R(s[2],-1));const l=Ft(R(s[3],!1));if(u===-1||u===null||l===!0?i=F(s[0]).split(F(s[1])):(isNaN(u)&&(u=-1),u<-1&&(u=-1),i=F(s[0]).split(F(s[1]),u)),l===!1)return i;const f=[];for(let h=0;h=u);h++)i[h]!==""&&i[h]!==void 0&&f.push(i[h]);return f})},t.text=function(n,r){return e(n,r,(a,o,s)=>(D(s,1,2,n,r),Ae(s[0],s[1])))},t.concatenate=function(n,r){return e(n,r,(a,o,s)=>{const i=[];if(s.length<1)return"";if(T(s[0])){const u=R(s[2],"");for(let l=0;l1?i.join(s[1]):i.join("")}if($(s[0])){const u=R(s[2],"");for(let l=0;l1?i.join(s[1]):i.join("")}for(let u=0;u{if(D(s,1,1,n,r),T(s[0])){const i=s[0].slice(0);return i.reverse(),i}if($(s[0])){const i=s[0].toArray().slice(0);return i.reverse(),i}throw new d(n,c.InvalidParameter,r)})},t.replace=function(n,r){return e(n,r,(a,o,s)=>{D(s,3,4,n,r);const i=F(s[0]),u=F(s[1]),l=F(s[2]);return s.length!==4||Ft(s[3])?tt(i,u,l):i.replace(u,l)})},t.schema=function(n,r){return e(n,r,(a,o,s)=>{if(X(s[0])){const i=Ri(s[0]);return i?B.convertObjectToArcadeDictionary(i,M(n)):null}throw new d(n,c.InvalidParameter,r)})},t.subtypes=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),X(s[0])){const i=rn(s[0]);return i?B.convertObjectToArcadeDictionary(i,M(n)):null}throw new d(n,c.InvalidParameter,r)})},t.subtypecode=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),X(s[0])){const i=rn(s[0]);if(!i)return null;if(i.subtypeField&&s[0].hasField(i.subtypeField)){const u=s[0].field(i.subtypeField);for(const l of i.subtypes)if(l.code===u)return l.code;return null}return null}throw new d(n,c.InvalidParameter,r)})},t.subtypename=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),X(s[0])){const i=rn(s[0]);if(!i)return"";if(i.subtypeField&&s[0].hasField(i.subtypeField)){const u=s[0].field(i.subtypeField);for(const l of i.subtypes)if(l.code===u)return l.name;return""}return""}throw new d(n,c.InvalidParameter,r)})},t.gdbversion=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),X(s[0]))return s[0].gdbVersion();throw new d(n,c.InvalidParameter,r)})},t.domain=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,3,n,r),X(s[0])){const i=Mi(s[0],F(s[1]),s[2]===void 0?void 0:s[2]);return i&&i.domain?i.domain.type==="coded-value"||i.domain.type==="codedValue"?B.convertObjectToArcadeDictionary({type:"codedValue",name:i.domain.name,dataType:Rr[i.field.type],codedValues:i.domain.codedValues.map(u=>({name:u.name,code:u.code}))},M(n)):B.convertObjectToArcadeDictionary({type:"range",name:i.domain.name,dataType:Rr[i.field.type],min:i.domain.minValue,max:i.domain.maxValue},M(n)):null}throw new d(n,c.InvalidParameter,r)})},t.domainname=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,4,n,r),X(s[0]))return _i(s[0],F(s[1]),s[2],s[3]===void 0?void 0:s[3]);throw new d(n,c.InvalidParameter,r)})},t.domaincode=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,2,4,n,r),X(s[0]))return $i(s[0],F(s[1]),s[2],s[3]===void 0?void 0:s[3]);throw new d(n,c.InvalidParameter,r)})},t.urlencode=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),s[0]===null)return"";if(s[0]instanceof B){let i="";for(const u of s[0].keys()){const l=s[0].field(u);i!==""&&(i+="&"),i+=l===null?encodeURIComponent(u)+"=":encodeURIComponent(u)+"="+encodeURIComponent(l)}return i}return encodeURIComponent(F(s[0]))})},t.hash=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,1,n,r);const i=new oo(0);return ve(s[0],i,{context:n,node:r,map:new Map,currentLength:0}),i.digest()})},t.convertdirection=function(n,r){return e(n,r,(a,o,s)=>(D(s,3,3,n,r),so(s[0],s[1],s[2])))},t.fromjson=function(n,r){return e(n,r,(a,o,s)=>{if(D(s,1,1,n,r),x(s[0])===!1)throw new d(n,c.InvalidParameter,r);return B.convertJsonToArcade(JSON.parse(F(s[0])),M(n))})},t.expects=function(n,r){return e(n,r,(a,o,s)=>{if(s.length<1)throw new d(n,c.WrongNumberOfParameters,r);return C})},t.tocharcode=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,2,n,r);const i=p(R(s[1],0)),u=F(s[0]);if(u.length===0&&s.length===1)return null;if(u.length<=i||i<0)throw new d(n,c.OutOfBounds,r);return u.charCodeAt(i)})},t.tocodepoint=function(n,r){return e(n,r,(a,o,s)=>{D(s,1,2,n,r);const i=p(R(s[1],0)),u=F(s[0]);if(u.length===0&&s.length===1)return null;if(u.length<=i||i<0)throw new d(n,c.OutOfBounds,r);return u.codePointAt(i)})},t.fromcharcode=function(n,r){return e(n,r,(a,o,s)=>{if(s.length<1)throw new d(n,c.WrongNumberOfParameters,r);const i=s.map(u=>Math.trunc(p(u))).filter(u=>u>=0&&u<=65535);return i.length===0?null:String.fromCharCode.apply(null,i)})},t.fromcodepoint=function(n,r){return e(n,r,(a,o,s)=>{if(s.length<1)throw new d(n,c.WrongNumberOfParameters,r);let i;try{i=s.map(u=>Math.trunc(p(u))).filter(u=>u<=1114111&&u>>>0===u)}catch{return null}return i.length===0?null:String.fromCodePoint.apply(null,i)})},t.getuser=function(n,r){return e(n,r,(a,o,s)=>{var u;D(s,0,2,n,r);let i=R(s[1],"");if(i=i===!0||i===!1?"":F(i),i!==null&&i!=="")return null;if(s.length===0||s[0]instanceof Yn){let l=null;if(l=(u=n.services)!=null&&u.portal?n.services.portal:lr.getDefault(),s.length>0&&!lo(s[0].field("url"),l)||!l)return null;if(i===""){const f=uo(l);if(f){const h=JSON.parse(JSON.stringify(f));for(const m of["lastLogin","created","modified"])h[m]!==void 0&&h[m]!==null&&(h[m]=new Date(h[m]));return B.convertObjectToArcadeDictionary(h,M(n))}}return null}throw new d(n,c.InvalidParameter,r)})},t.getenvironment=function(n,r){return e(n,r,(a,o,s)=>(D(s,0,0,n,r),B.convertObjectToArcadeDictionary(Pi(M(n),n.spatialReference),M(n),!0)))}}let co=class extends ut{constructor(e,n){super(),this.paramCount=n,this.fn=e}createFunction(e){return(...n)=>{if(n.length!==this.paramCount)throw new d(e,c.WrongNumberOfParameters,null);return this.fn(...n)}}call(e,n){return this.fn(...n.arguments)}marshalledCall(e,n,r,a){return a(e,n,(o,s,i)=>{i=i.map(l=>!Q(l)||l instanceof qe?l:wt(l,e,a));const u=this.call(r,{arguments:i});return Qe(u)?u.then(l=>wt(l,r,a)):u})}};function Ce(t,e,n){try{return n(t,null,e.arguments)}catch(r){throw r}}function b(t,e){try{switch(e.type){case"EmptyStatement":return"lc.voidOperation";case"VariableDeclarator":return bo(t,e);case"VariableDeclaration":return Eo(t,e);case"BlockStatement":case"Program":return nr(t,e);case"FunctionDeclaration":return Ao(t,e);case"ImportDeclaration":return Fo(t,e);case"ExportNamedDeclaration":return Co(t,e);case"ReturnStatement":return xo(t,e);case"IfStatement":return sa(t,e);case"ExpressionStatement":return wo(t,e);case"AssignmentExpression":return yo(t,e);case"UpdateExpression":return Do(t,e);case"BreakStatement":return"break";case"ContinueStatement":return"continue";case"TemplateLiteral":return ko(t,e);case"TemplateElement":return JSON.stringify(e.value?e.value.cooked:"");case"ForStatement":return mo(t,e);case"ForInStatement":return po(t,e);case"WhileStatement":return go(t,e);case"Identifier":return No(t,e);case"MemberExpression":return vo(t,e);case"Literal":return e.value===null||e.value===void 0?"null":JSON.stringify(e.value);case"CallExpression":return Mo(t,e);case"UnaryExpression":return So(t,e);case"BinaryExpression":return To(t,e);case"LogicalExpression":return Bo(t,e);case"ArrayExpression":return Io(t,e);case"ObjectExpression":return ho(t,e);case"Property":return fo(t,e);case"Array":throw new he(t,c.NeverReach,e);default:throw new he(t,c.Unrecognized,e)}}catch(n){throw n}}function ho(t,e){let n="lang.dictionary([";for(let r=0;r0&&(n+=","),n+="lang.strCheck("+(a.key.type==="Identifier"?"'"+a.key.name+"'":b(t,a.key))+",'ObjectExpression'),lang.aCheck("+b(t,a.value)+", 'ObjectExpression')"}return n+="])",n}function fo(t,e){throw new he(t,c.NeverReach,e)}function po(t,e){const n=Ie(t),r=Ie(t),a=Ie(t);let o="var "+n+" = "+b(t,e.right)+`; +`;e.left.type==="VariableDeclaration"&&(o+=b(t,e.left));let s=e.left.type==="VariableDeclaration"?e.left.declarations[0].id.name:e.left.name;s=s.toLowerCase(),Ee(s);let i="";t.localScope!==null&&(t.localScope[s]!==void 0?i="lscope['"+s+"']":t.localScope._SymbolsMap[s]!==void 0&&(i="lscope['"+t.localScope._SymbolsMap[s]+"']"));let u="";if(i===""){if(t.globalScope[s]!==void 0)i="gscope['"+s+"']";else if(t.globalScope._SymbolsMap[s]!==void 0)i="gscope['"+t.globalScope._SymbolsMap[s]+"']";else if(t.localScope!==null)if(t.undeclaredGlobalsInFunctions.has(s))i="gscope['"+t.undeclaredGlobalsInFunctions.get(s).manglename+"']",u=t.undeclaredGlobalsInFunctions.get(s).manglename;else{const l={manglename:$e(t),node:e.left};t.undeclaredGlobalsInFunctions.set(s,l),i="gscope['"+l.manglename+"']",u=l.manglename}}return u&&(o+="lang.chkAssig('"+u+`',runtimeCtx); +`),o+="if ("+n+`===null) { lastStatement = lc.voidOperation; } + `,o+="else if (lc.isArray("+n+") || lc.isString("+n+")) {",o+="var "+r+"="+n+`.length; +`,o+="for(var "+a+"=0; "+a+"<"+r+"; "+a+`++) { +`,o+=i+"="+a+`; +`,o+=b(t,e.body),o+=` +} +`,o+=` lastStatement = lc.voidOperation; +`,o+=` +} +`,o+="else if (lc.isImmutableArray("+n+")) {",o+="var "+r+"="+n+`.length(); +`,o+="for(var "+a+"=0; "+a+"<"+r+"; "+a+`++) { +`,o+=i+"="+a+`; +`,o+=b(t,e.body),o+=` +} +`,o+=` lastStatement = lc.voidOperation; +`,o+=` +} +`,o+="else if (( "+n+" instanceof lang.Dictionary) || ( "+n+" instanceof lang.Feature)) {",o+="var "+r+"="+n+`.keys(); +`,o+="for(var "+a+"=0; "+a+"<"+r+".length; "+a+`++) { +`,o+=i+"="+r+"["+a+`]; +`,o+=b(t,e.body),o+=` +} +`,o+=` lastStatement = lc.voidOperation; +`,o+=` +} +`,t.isAsync&&(o+="else if (lc.isFeatureSet("+n+")) {",o+="var "+r+"="+n+`.iterator(runtimeCtx.abortSignal); +`,o+="for(var "+a+"=lang. graphicToFeature( yield "+r+".next(),"+n+", runtimeCtx); "+a+"!=null; "+a+"=lang. graphicToFeature( yield "+r+".next(),"+n+`, runtimeCtx)) { +`,o+=i+"="+a+`; +`,o+=b(t,e.body),o+=` +} +`,o+=` lastStatement = lc.voidOperation; +`,o+=` +} +`),o+=`else { lastStatement = lc.voidOperation; } +`,o}function mo(t,e){let n=`lastStatement = lc.voidOperation; +`;e.init!==null&&(n+=b(t,e.init)+"; ");const r=Ie(t),a=Ie(t);return n+="var "+r+" = true; ",n+=` + do { `,e.update!==null&&(n+=" if ("+r+`===false) { + `+b(t,e.update)+` +} + `+r+`=false; +`),e.test!==null&&(n+="var "+a+" = "+b(t,e.test)+"; ",n+="if ("+a+"===false) { break; } else if ("+a+"!==true) { lang.error('"+c.BooleanConditionRequired+`'); } +`),n+=b(t,e.body),e.update!==null&&(n+=` + `+b(t,e.update)),n+=` +`+r+` = true; +} while(true); lastStatement = lc.voidOperation; `,n}function Do(t,e){let n=null,r="";if(e.argument.type==="MemberExpression")return n=b(t,e.argument.object),e.argument.computed===!0?r=b(t,e.argument.property):(r="'"+e.argument.property.name+"'",Ee(e.argument.property.name)),"lang.memberupdate("+n+","+r+",'"+e.operator+"',"+e.prefix+")";if(n=e.argument.name.toLowerCase(),Ee(n),t.localScope!==null){if(t.localScope[n]!==void 0)return"lang.update(lscope, '"+n+"','"+e.operator+"',"+e.prefix+")";if(t.localScope._SymbolsMap[n]!==void 0)return"lang.update(lscope, '"+t.localScope._SymbolsMap[n]+"','"+e.operator+"',"+e.prefix+")"}if(t.globalScope[n]!==void 0)return"lang.update(gscope, '"+n+"','"+e.operator+"',"+e.prefix+")";if(t.globalScope._SymbolsMap[n]!==void 0)return"lang.update(gscope, '"+t.globalScope._SymbolsMap[n]+"','"+e.operator+"',"+e.prefix+")";if(t.localScope!==null){if(t.undeclaredGlobalsInFunctions.has(n))return"lang.update(gscope,lang.chkAssig( '"+t.undeclaredGlobalsInFunctions.get(n).manglename+"',runtimeCtx),'"+e.operator+"',"+e.prefix+")";const a={manglename:$e(t),node:e.argument};return t.undeclaredGlobalsInFunctions.set(n,a),"lang.update(gscope, lang.chkAssig('"+a.manglename+"',runtimeCtx),'"+e.operator+"',"+e.prefix+")"}throw new d(t,c.InvalidIdentifier,e)}function go(t,e){let n=`lastStatement = lc.voidOperation; +`;const r=Ie(t);return n+=` + var ${r} = true; + do { + ${r} = ${b(t,e.test)}; + if (${r}==false) { + break; + } + if (${r}!==true) { + lang.error('${c.BooleanConditionRequired}'); + } + ${b(t,e.body)} + } + while (${r} !== false); + lastStatement = lc.voidOperation; + `,n}function yo(t,e){const n=b(t,e.right);let r=null,a="";if(e.left.type==="MemberExpression")return r=b(t,e.left.object),e.left.computed===!0?a=b(t,e.left.property):(a="'"+e.left.property.name+"'",Ee(e.left.property.name)),"lang.assignmember("+r+","+a+",'"+e.operator+"',"+n+")";if(r=e.left.name.toLowerCase(),Ee(r),t.localScope!==null){if(t.localScope[r]!==void 0)return"lscope['"+r+"']=lang.assign("+n+",'"+e.operator+"', lscope['"+r+"'])";if(t.localScope._SymbolsMap[r]!==void 0)return"lscope['"+t.localScope._SymbolsMap[r]+"']=lang.assign("+n+",'"+e.operator+"', lscope['"+t.localScope._SymbolsMap[r]+"'])"}if(t.globalScope[r]!==void 0)return"gscope['"+r+"']=lang.assign("+n+",'"+e.operator+"', gscope['"+r+"'])";if(t.globalScope._SymbolsMap[r]!==void 0)return"gscope['"+t.globalScope._SymbolsMap[r]+"']=lang.assign("+n+",'"+e.operator+"', gscope['"+t.globalScope._SymbolsMap[r]+"'])";if(t.localScope!==null){if(t.undeclaredGlobalsInFunctions.has(r))return"gscope[lang.chkAssig('"+t.undeclaredGlobalsInFunctions.get(r).manglename+"',runtimeCtx)]=lang.assign("+n+",'"+e.operator+"', gscope['"+t.undeclaredGlobalsInFunctions.get(r).manglename+"'])";const o={manglename:$e(t),node:e.argument};return t.undeclaredGlobalsInFunctions.set(r,o),"gscope[lang.chkAssig('"+o.manglename+"',runtimeCtx)]=lang.assign("+n+",'"+e.operator+"', gscope['"+o.manglename+"'])"}throw new d(t,c.InvalidIdentifier,e)}function wo(t,e){return e.expression.type==="AssignmentExpression"?"lastStatement = lc.voidOperation; "+b(t,e.expression)+`; + `:(e.expression.type,"lastStatement = "+b(t,e.expression)+"; ")}function ni(t,e){return e.type==="BlockStatement"?b(t,e):e.type==="ReturnStatement"||e.type==="BreakStatement"||e.type==="ContinueStatement"?b(t,e)+"; ":e.type==="UpdateExpression"?"lastStatement = "+b(t,e)+"; ":e.type==="ExpressionStatement"?b(t,e):e.type==="ObjectExpression"?"lastStatement = "+b(t,e)+"; ":b(t,e)+"; "}function sa(t,e){if(e.test.type==="AssignmentExpression"||e.test.type==="UpdateExpression")throw new he(t,c.BooleanConditionRequired,e);return`if (lang.mustBoolean(${b(t,e.test)}, runtimeCtx) === true) { + ${ni(t,e.consequent)} + } `+(e.alternate!==null?e.alternate.type==="IfStatement"?" else "+sa(t,e.alternate):` else { + ${ni(t,e.alternate)} + } +`:` else { + lastStatement = lc.voidOperation; + } +`)}function nr(t,e){let n="";for(let r=0;r0&&(o+=", "),o+=b(t,e.arguments[s]);return o+="]",t.isAsync?"(yield lang.callModuleFunction("+b(t,e.callee.object)+","+o+","+a+",runtimeCtx))":"lang.callModuleFunction("+b(t,e.callee.object)+","+o+","+a+",runtimeCtx)"}if(e.callee.type!=="Identifier")throw new he(t,c.FunctionNotFound,e);const n=e.callee.name.toLowerCase();if(n==="iif")return _o(t,e);if(n==="when")return Ro(t,e);if(n==="defaultvalue")return $o(t,e);if(n==="decode")return Po(t,e);let r="";if(t.localScope!==null&&(t.localScope[n]!==void 0?r="lscope['"+n+"']":t.localScope._SymbolsMap[n]!==void 0&&(r="lscope['"+t.localScope._SymbolsMap[n]+"']")),r===""){if(t.globalScope[n]!==void 0)r="gscope['"+n+"']";else if(t.globalScope._SymbolsMap[n]!==void 0)r="gscope['"+t.globalScope._SymbolsMap[n]+"']";else if(t.localScope!==null)if(t.undeclaredGlobalsInFunctions.has(n))r="gscope[lang.chkAssig('"+t.undeclaredGlobalsInFunctions.get(n).manglename+"',runtimeCtx)]";else{const a={manglename:$e(t),node:e.argument};t.undeclaredGlobalsInFunctions.set(n,a),r="gscope[lang.chkAssig('"+a.manglename+"',runtimeCtx)]"}}if(r!==""){let a="[";for(let o=0;o0&&(a+=", "),a+=b(t,e.arguments[o]);return a+="]",t.isAsync?"(yield lang.callfunc("+r+","+a+",runtimeCtx) )":"lang.callfunc("+r+","+a+",runtimeCtx)"}throw new he(t,c.FunctionNotFound,e)}catch(n){throw n}}function _o(t,e){try{if(e.arguments.length!==3)throw new he(t,c.WrongNumberOfParameters,e);const n=Ie(t);return`${t.isAsync?`(yield (function() { + return lang.__awaiter(this, void 0, void 0, function* () {`:"function() {"} + var ${n} = ${b(t,e.arguments[0])}; + + if (${n} === true) { + return ${b(t,e.arguments[1])}; + } + else if (${n} === false) { + return ${b(t,e.arguments[2])}; + } + else { + lang.error('ExecutionErrorCodes.BooleanConditionRequired'); + } + ${t.isAsync?"})}()))":"}()"}`}catch(n){throw n}}function $o(t,e){try{if(e.arguments.length<2||e.arguments.length>3)throw new he(t,c.WrongNumberOfParameters,e);const n=Ie(t),r=Ie(t);return e.arguments.length===3?`${t.isAsync?`(yield (function() { + return lang.__awaiter(this, void 0, void 0, function* () {`:"function() {"} + var ${n} = ${b(t,e.arguments[0])}; + var ${r} = ${b(t,e.arguments[1])}; + ${n} = lang.getNestedOptionalValue(${n}, ${r}); + return ${n} != null && ${n} !== "" ? ${n} : ${b(t,e.arguments[2])}; + ${t.isAsync?"})}()))":"}()"}`:`${t.isAsync?`(yield (function() { + return lang.__awaiter(this, void 0, void 0, function* () {`:"function() {"} + var ${n} = ${b(t,e.arguments[0])}; + if (${n} === null) { + return ${b(t,e.arguments[1])}; + } + if (${n} === "") { + return ${b(t,e.arguments[1])}; + } + if (${n} === undefined) { + return ${b(t,e.arguments[1])}; + } + return ${n}; + ${t.isAsync?"})}()))":"}()"}`}catch(n){throw n}}function Ro(t,e){try{if(e.arguments.length<3)throw new he(t,c.WrongNumberOfParameters,e);if(e.arguments.length%2==0)throw new he(t,c.WrongNumberOfParameters,e);const n=Ie(t);let r="var ";for(let a=0;a{throw new d(t,c.Unrecognized,e)})}catch(n){throw n}},re.decode=function(t,e){try{return Ce(t,e,(n,r,a)=>{throw new d(t,c.Unrecognized,e)})}catch(n){throw n}},re.when=function(t,e){try{return Ce(t,e,(n,r,a)=>{throw new d(t,c.Unrecognized,e)})}catch(n){throw n}},re.defaultvalue=function(t,e){try{return Ce(t,e,(n,r,a)=>{throw new d(t,c.Unrecognized,e)})}catch(n){throw n}};const bt={};for(const t in re)bt[t]=new lt(re[t]);Xi(re,Ce);for(const t in re)re[t]=new lt(re[t]);const Fr=function(){};Fr.prototype=re;const Cr=function(){};function oa(t,e,n){const r={};t||(t={}),n||(n={}),r._SymbolsMap={},r.textformatting=1,r.infinity=1,r.pi=1;for(const a in e)r[a]=1;for(const a in n)r[a]=1;for(const a in t)r[a]=1;return r}function ua(t,e,n,r){const a=n?new Cr:new Fr;t||(t={}),e||(e={});const o=new B({newline:` +`,tab:" ",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});o.immutable=!1,a._SymbolsMap={textformatting:1,infinity:1,pi:1},a.textformatting=o,a.infinity=Number.POSITIVE_INFINITY,a.pi=Math.PI;for(const s in e)a[s]=e[s],a._SymbolsMap[s]=1;for(const s in t)a._SymbolsMap[s]=1,t[s]&&t[s].declaredClass==="esri.Graphic"?a[s]=ee.createFromGraphic(t[s],r??null):a[s]=t[s];return a}Cr.prototype=bt;function ct(t,e){const n={mode:e,compiled:!0,functions:{},signatures:[],standardFunction:Ce,standardFunctionAsync:Ce,evaluateIdentifier:Oo};for(let r=0;r0){if(n.substr(0,2).toLowerCase()!=="_t"&&t.localStack[t.localStack.length-1][n]!==void 0)return t.localStack[t.localStack.length-1][n];const a=t.mangleMap[n];if(a!==void 0&&t.localStack[t.localStack.length-1][a]!==void 0)return t.localStack[t.localStack.length-1][a]}if(n.substr(0,2).toLowerCase()!=="_t"&&t.globalScope[n]!==void 0||t.globalScope._SymbolsMap[n]===1)return t.globalScope[n];const r=t.mangleMap[n];return r!==void 0?t.globalScope[r]:void 0}ct([Wn],"sync"),ct([Wn],"async");let _n=0;const la={isNumber:t=>L(t),isArray:t=>T(t),isImmutableArray:t=>$(t),isFeature:t=>X(t),isString:t=>x(t),isDictionary:t=>gn(t),isGeometry:t=>Ht(t),geometryMember:(t,e,n,r,a=1)=>At(t,e,n,r,a),error(t){throw new d(null,t,null)},__awaiter:(t,e,n,r)=>new Promise((a,o)=>{function s(l){try{u(r.next(l))}catch(f){o(f)}}function i(l){try{u(r.throw(l))}catch(f){o(f)}}function u(l){var f;l.done?a(l.value):(f=l.value)!=null&&f.then?l.value.then(s,i):(_n++,_n%100==0?setTimeout(()=>{_n=0,s(l.value)},0):s(l.value))}u((r=r.apply(t,e||[])).next())}),functionDepthchecker:(t,e)=>function(){if(e.depthCounter.depth++,e.localStack.push([]),e.depthCounter.depth>64)throw new d(null,c.MaximumCallDepth,null);const n=t.apply(this,arguments);return Qe(n)?n.then(r=>(e.depthCounter.depth--,e.localStack.length=e.localStack.length-1,r)):(e.depthCounter.depth--,e.localStack.length=e.localStack.length-1,n)},chkAssig(t,e){if(e.gdefs[t]===void 0)throw new d(e,c.InvalidIdentifier,null);return t},mustBoolean(t,e){if(t===!0||t===!1)return t;throw new d(e,c.BooleanConditionRequired,null)},setAssig:(t,e)=>(e.gdefs[t]=1,t),castString:t=>F(t),aCheck(t,e){if(Q(t))throw e==="ArrayExpression"?new d(null,c.NoFunctionInArray,null):e==="ObjectExpression"?new d(null,c.NoFunctionInDictionary,null):new d(null,c.NoFunctionInTemplateLiteral,null);return t===C?null:t},Dictionary:B,Feature:ee,UserDefinedCompiledFunction:co,dictionary(t){const e={},n=new Map;for(let a=0;a>":case">>>":case"^":case"&":return gr(p(t),p(e),n);case"==":case"=":return ke(t,e);case"!=":return!ke(t,e);case"<":case">":case"<=":case">=":return Dr(t,e,n);case"+":return x(t)||x(e)?F(t)+F(e):p(t)+p(e);case"-":return p(t)-p(e);case"*":return p(t)*p(e);case"/":return p(t)/p(e);case"%":return p(t)%p(e);default:throw new d(null,c.UnsupportedOperator,null)}},assign(t,e,n){switch(e){case"=":return t===C?null:t;case"/=":return p(n)/p(t);case"*=":return p(n)*p(t);case"-=":return p(n)-p(t);case"+=":return x(n)||x(t)?F(n)+F(t):p(n)+p(t);case"%=":return p(n)%p(t);default:throw new d(null,c.UnsupportedOperator,null)}},update(t,e,n,r){const a=p(t[e]);return t[e]=n==="++"?a+1:a-1,r===!1?a:n==="++"?a+1:a-1},graphicToFeature:(t,e,n)=>t===null?null:ee.createFromGraphicLikeObject(t.geometry,t.attributes,e,n.timeZone),memberupdate(t,e,n,r){let a;if(T(t)){if(!L(e))throw new d(null,c.ArrayAccessorMustBeNumber,null);if(e<0&&(e=t.length+e),e<0||e>=t.length)throw new d(null,c.OutOfBounds,null);a=p(t[e]),t[e]=n==="++"?a+1:a-1}else if(t instanceof B){if(x(e)===!1)throw new d(null,c.KeyAccessorMustBeString,null);if(t.hasField(e)!==!0)throw new d(null,c.FieldNotFound,null,{key:e});a=p(t.field(e)),t.setField(e,n==="++"?a+1:a-1)}else if(X(t)){if(x(e)===!1)throw new d(null,c.KeyAccessorMustBeString,null);if(t.hasField(e)!==!0)throw new d(null,c.FieldNotFound,null);a=p(t.field(e)),t.setField(e,n==="++"?a+1:a-1)}else{if($(t))throw new d(null,c.Immutable,null);if(!(t instanceof Ut))throw new d(null,c.InvalidIdentifier,null);if(x(e)===!1)throw new d(null,c.ModuleAccessorMustBeString,null);if(t.hasGlobal(e)!==!0)throw new d(null,c.ModuleExportNotFound,null);a=p(t.global(e)),t.setGlobal(e,n==="++"?a+1:a-1)}return r===!1?a:n==="++"?a+1:a-1},assignmember(t,e,n,r){if(T(t)){if(!L(e))throw new d(null,c.ArrayAccessorMustBeNumber,null);if(e<0&&(e=t.length+e),e<0||e>t.length)throw new d(null,c.OutOfBounds,null);if(e===t.length){if(n!=="=")throw new d(null,c.OutOfBounds,null);t[e]=this.assign(r,n,t[e])}else t[e]=this.assign(r,n,t[e])}else if(t instanceof B){if(x(e)===!1)throw new d(null,c.KeyAccessorMustBeString,null);if(t.hasField(e)===!0)t.setField(e,this.assign(r,n,t.field(e)));else{if(n!=="=")throw new d(null,c.FieldNotFound,null);t.setField(e,this.assign(r,n,null))}}else if(X(t)){if(x(e)===!1)throw new d(null,c.KeyAccessorMustBeString,null);if(t.hasField(e)===!0)t.setField(e,this.assign(r,n,t.field(e)));else{if(n!=="=")throw new d(null,c.FieldNotFound,null);t.setField(e,this.assign(r,n,null))}}else{if($(t))throw new d(null,c.Immutable,null);if(!(t instanceof Ut))throw new d(null,c.InvalidIdentifier,null);if(x(e)===!1)throw new d(null,c.ModuleAccessorMustBeString,null);if(!t.hasGlobal(e))throw new d(null,c.ModuleExportNotFound,null);t.setGlobal(e,this.assign(r,n,t.global(e)))}},member(t,e){if(t===null)throw new d(null,c.MemberOfNull,null);if(t instanceof B||X(t)){if(x(e))return t.field(e);throw new d(null,c.InvalidMemberAccessKey,null)}if(t instanceof N){if(x(e))return At(t,e,null,null);throw new d(null,c.InvalidMemberAccessKey,null)}if(T(t)){if(L(e)&&isFinite(e)&&Math.floor(e)===e){if(e<0&&(e=t.length+e),e>=t.length||e<0)throw new d(null,c.OutOfBounds,null);return t[e]}throw new d(null,c.InvalidMemberAccessKey,null)}if(x(t)){if(L(e)&&isFinite(e)&&Math.floor(e)===e){if(e<0&&(e=t.length+e),e>=t.length||e<0)throw new d(null,c.OutOfBounds,null);return t[e]}throw new d(null,c.InvalidMemberAccessKey,null)}if($(t)){if(L(e)&&isFinite(e)&&Math.floor(e)===e){if(e<0&&(e=t.length()+e),e>=t.length()||e<0)throw new d(null,c.OutOfBounds,null);return t.get(e)}throw new d(null,c.InvalidMemberAccessKey,null)}if(t instanceof Ut){if(x(e))return t.global(e);throw new d(null,c.InvalidMemberAccessKey,null)}throw new d(null,c.InvalidMemberAccessKey,null)},callfunc:(t,e,n)=>t.call(n,{arguments:e,preparsed:!0}),loadModule(t,e){const n=e.moduleFactoryMap[t];if(e.moduleSingletons[n])return e.moduleSingletons[n];const r=e.moduleFactory[n]({vars:{},moduleSingletons:e.moduleSingletons,depthCounter:e.depthCounter,console:e.console,abortSignal:e.abortSignal,isAsync:e.isAsync,services:e.services,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor},e.spatialReference);return e.moduleSingletons[n]=r,r},callModuleFunction(t,e,n,r){if(!(t instanceof Ut))throw new d(null,c.FunctionNotFound,null);const a=t.global(n);if(Q(a)===!1)throw new d(null,c.CallNonFunction,null);return a.call(r,{preparsed:!0,arguments:e})},getNestedOptionalValue:(t,e)=>wr(t,e)};function fn(t){console.log(t)}function ca(t,e,n=!1){e===null&&(e={vars:{},customfunctions:{}});let r=null;t.usesModules&&(r=new Dn(null,t.loadedModules));const a={isAsync:n,globalScope:oa(e.vars,n?bt:re,e.customfunctions),moduleFactory:{},moduleFactoryMap:{},undeclaredGlobalsInFunctions:new Map,customfunctions:e.customfunctions,libraryResolver:r,localScope:null,mangleMap:{},depthCounter:{depth:1},exports:{},console:fn,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,services:e.services,symbols:{symbolCounter:0}};let o=b(a,t);o===""&&(o="lc.voidOperation; "),a.undeclaredGlobalsInFunctions.size>0&&a.undeclaredGlobalsInFunctions.forEach(m=>{throw new he(e,c.InvalidIdentifier,m.node)});let s="";s=n?`var runtimeCtx=this.prepare(context, true); + var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; +return lang.__awaiter(this, void 0, void 0, function* () { + + function mainBody() { + var lastStatement=lc.voidOperation; + return lang.__awaiter(this, void 0, void 0, function* () { +`+o+` + return lastStatement; }); } + return this.postProcess(yield mainBody()); }); `:`var runtimeCtx=this.prepare(context, false); + var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; + function mainBody() { + var lastStatement=lc.voidOperation; + `+o+` + return lastStatement; } + return this.postProcess(mainBody()); `;const i=a.moduleFactory,u=a.moduleFactoryMap,l=a.exports,f={};for(const m in l)f[m]=a.mangleMap[m]!==void 0?a.mangleMap[m]:m;const h={lc:Li,lang:la,mangles:a.mangleMap,postProcess(m){if(m instanceof xe&&(m=m.value),m instanceof xt&&(m=m.value),m===C&&(m=null),m===Me)throw new d(null,c.IllegalResult,null);if(m===kt)throw new d(null,c.IllegalResult,null);if(Q(m))throw new d(null,c.IllegalResult,null);return m},prepare(m,g){let y=m.spatialReference;y==null&&(y=St.WebMercator);const k=ua(m.vars,m.customfunctions,g,m.timeZone);return{localStack:[],isAsync:g,moduleFactory:i,moduleFactoryMap:u,mangleMap:this.mangles,moduleSingletons:{},exports:l,gdefs:{},exportmangle:f,spatialReference:y,globalScope:k,abortSignal:m.abortSignal===void 0||m.abortSignal===null?{aborted:!1}:m.abortSignal,localScope:null,services:m.services,console:m.console??fn,lrucache:m.lrucache,timeZone:m.timeZone??null,interceptor:m.interceptor,symbols:{symbolCounter:0},depthCounter:{depth:1}}}};return new Function("context","spatialReference",s).bind(h)}async function Lo(){return ct([await je(()=>import("./geomasync-C1XdD4eA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))],"async"),!0}class Ut extends qt{constructor(e){super(null),this.moduleContext=e}hasGlobal(e){return this.moduleContext.exports[e]===void 0&&(e=e.toLowerCase()),this.moduleContext.exports[e]!==void 0}setGlobal(e,n){const r=this.moduleContext.globalScope,a=e.toLowerCase();if(Q(n))throw new d(null,c.AssignModuleFunction,null);r[this.moduleContext.exportmangle[a]]=n}global(e){const n=this.moduleContext.globalScope;e=e.toLowerCase();const r=n[this.moduleContext.exportmangle[e]];if(r===void 0)throw new d(null,c.InvalidIdentifier,null);if(Q(r)&&!(r instanceof qe)){const a=new qe;return a.fn=r,a.parameterEvaluator=Ce,a.context=this.moduleContext,n[this.moduleContext.exportmangle[e]]=a,a}return r}}function Uo(t,e,n=!1){const r={isAsync:n,moduleFactory:e.moduleFactory,moduleFactoryMap:{},libraryResolver:new Dn(null,t.loadedModules),globalScope:oa(e.vars,n?bt:re,e.customfunctions),customfunctions:e.customfunctions,localScope:null,mangleMap:{},undeclaredGlobalsInFunctions:new Map,depthCounter:{depth:1},exports:{},console:fn,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,services:e.services,symbols:{symbolCounter:0}};let a=b(r,t);a===""&&(a="lc.voidOperation; ");let o="";o=n?`var runtimeCtx=this.prepare(context, true); + var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; +return lang.__awaiter(this, void 0, void 0, function* () { + + function mainBody() { + var lastStatement=lc.voidOperation; + return lang.__awaiter(this, void 0, void 0, function* () { +`+a+` + return lastStatement; }); } + yield mainBody(); + return this.prepareModule(runtimeCtx); }); `:`var runtimeCtx=this.prepare(context, false); + var lc = this.lc; var lang = this.lang; var gscope=runtimeCtx.globalScope; + function mainBody() { + var lastStatement=lc.voidOperation; + `+a+` + return lastStatement; } + mainBody(); + return this.prepareModule(runtimeCtx); `;const s=r.moduleFactory,i=r.moduleFactoryMap,u=r.exports,l={};for(const h in u)l[h]=r.mangleMap[h]!==void 0?r.mangleMap[h]:h;const f={lc:Li,lang:la,mangles:r.mangleMap,prepareModule:h=>new Ut(h),prepare(h,m){let g=h.spatialReference;g==null&&(g=new St({wkid:102100}));const y=ua(h.vars,h.customfunctions,m,h.timeZone);return{localStack:[],isAsync:m,exports:u,exportmangle:l,gdefs:{},moduleFactory:s,moduleFactoryMap:i,moduleSingletons:h.moduleSingletons,mangleMap:this.mangles,spatialReference:g,globalScope:y,abortSignal:h.abortSignal===void 0||h.abortSignal===null?{aborted:!1}:h.abortSignal,localScope:null,services:h.services,console:h.console??fn,lrucache:h.lrucache,timeZone:h.timeZone??null,interceptor:h.interceptor,symbols:{symbolCounter:0},depthCounter:h.depthCounter}}};return new Function("context","spatialReference",o).bind(f)}var on={False:"false",Null:"null",True:"true"},q={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},v={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockComment:"BlockComment",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ContinueStatement:"ContinueStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",LineComment:"LineComment",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement"},rr=["++","--"],ha=["-","+","!","~"],da=["=","/=","*=","%=","+=","-="],fa=["||","&&"],zo=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],ri={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},S={Unknown:0,BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,Template:10},Zo=["Unknown","Boolean","","Identifier","Keyword","Null","Numeric","Punctuator","String","RegularExpression","Template"],A={InvalidModuleUri:"InvalidModuleUri",ForInOfLoopInitializer:"ForInOfLoopInitializer",IdentiferExpected:"IdentiferExpected",InvalidEscapedReservedWord:"InvalidEscapedReservedWord",InvalidExpression:"InvalidExpression",InvalidFunctionIdentifier:"InvalidFunctionIdentifier",InvalidHexEscapeSequence:"InvalidHexEscapeSequence",InvalidLeftHandSideInAssignment:"InvalidLeftHandSideInAssignment",InvalidLeftHandSideInForIn:"InvalidLeftHandSideInForIn",InvalidTemplateHead:"InvalidTemplateHead",InvalidVariableAssignment:"InvalidVariableAssignment",KeyMustBeString:"KeyMustBeString",NoFunctionInsideBlock:"NoFunctionInsideBlock",NoFunctionInsideFunction:"NoFunctionInsideFunction",ModuleExportRootOnly:"ModuleExportRootOnly",ModuleImportRootOnly:"ModuleImportRootOnly",PunctuatorExpected:"PunctuatorExpected",TemplateOctalLiteral:"TemplateOctalLiteral",UnexpectedBoolean:"UnexpectedBoolean",UnexpectedEndOfScript:"UnexpectedEndOfScript",UnexpectedIdentifier:"UnexpectedIdentifier",UnexpectedKeyword:"UnexpectedKeyword",UnexpectedNull:"UnexpectedNull",UnexpectedNumber:"UnexpectedNumber",UnexpectedPunctuator:"UnexpectedPunctuator",UnexpectedString:"UnexpectedString",UnexpectedTemplate:"UnexpectedTemplate",UnexpectedToken:"UnexpectedToken"},Go={[A.InvalidModuleUri]:"Module uri must be a text literal.",[A.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[A.IdentiferExpected]:"'${value}' is an invalid identifier.",[A.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[A.InvalidExpression]:"Invalid expression.",[A.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[A.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[A.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[A.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[A.InvalidTemplateHead]:"Invalid template structure.",[A.InvalidVariableAssignment]:"Invalid variable assignment.",[A.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[A.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[A.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[A.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[A.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[A.PunctuatorExpected]:"'${value}' expected.",[A.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[A.UnexpectedBoolean]:"Unexpected boolean literal.",[A.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[A.UnexpectedIdentifier]:"Unexpected identifier.",[A.UnexpectedKeyword]:"Unexpected keyword.",[A.UnexpectedNull]:"Unexpected null literal.",[A.UnexpectedNumber]:"Unexpected number.",[A.UnexpectedPunctuator]:"Unexpected ponctuator.",[A.UnexpectedString]:"Unexpected text literal.",[A.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[A.UnexpectedToken]:"Unexpected token '${value}'."},Vt=class pa extends Error{constructor({code:e,index:n,line:r,column:a,len:o=0,description:s,data:i}){var u;super(s??e),this.declaredRootClass="esri.arcade.lib.diagnostic",this.name="ParsingError",this.code=e,this.index=n,this.line=r,this.column=a,this.len=o,this.data=i,this.description=s,this.range={start:{line:r,column:a-1},end:{line:r,column:a+o}},(u=Error.captureStackTrace)==null||u.call(Error,this,pa)}};function jo(t){return!!t&&typeof t=="object"&&"type"in t&&t.type===v.Program}function ii(t){return!!t&&typeof t=="object"&&"type"in t&&t.type===v.BlockStatement}function Jo(t){return!!t&&typeof t=="object"&&"type"in t&&t.type===v.BlockComment}function Vo(t){return!!t&&typeof t=="object"&&"type"in t&&t.type===v.EmptyStatement}function qo(t){return!!t&&typeof t=="object"&&"type"in t&&t.type===v.VariableDeclarator}function $n(t,e){return e.loc.end.line===t.loc.start.line&&e.loc.end.column<=t.loc.start.column}function ai(t,e){return t.range[0]>=e.range[0]&&t.range[1]<=e.range[1]}var Ho=class{constructor(){this.comments=[],this._nodeStack=[],this._newComments=[]}insertInnerComments(e){if(!ii(e)||e.body.length!==0)return;let n=[];for(let r=this._newComments.length-1;r>=0;r--){let a=this._newComments[r];e.range[1]>=a.range[0]&&(n.unshift(a),this._newComments.splice(r,1))}n.length&&(e.innerComments=n)}attachTrailingComments(e){let n=this._nodeStack.at(-1);if(!n)return;if(ii(e)&&ai(n,e))for(let a=this._newComments.length-1;a>=0;a--){let o=this._newComments[a];ai(o,e)&&(n.trailingComments=[...n.trailingComments??[],o],this._newComments.splice(a,1))}let r=[];if(this._newComments.length>0)for(let a=this._newComments.length-1;a>=0;a--){let o=this._newComments[a];$n(o,n)?(n.trailingComments=[...n.trailingComments??[],o],this._newComments.splice(a,1)):$n(o,e)&&(r.unshift(o),this._newComments.splice(a,1))}n.trailingComments&&$n(n.trailingComments[0],e)&&(r=[...r,...n.trailingComments],delete n.trailingComments),r.length>0&&(e.trailingComments=r)}attachLeadingComments(e){let n;for(;this._nodeStack.length>0;){let o=this._nodeStack[this._nodeStack.length-1];if(!(e.range[0]<=o.range[0]))break;n=o,this._nodeStack.pop()}let r=[],a=[];if(n!=null){if(!n.leadingComments)return;for(let o=n.leadingComments.length-1;o>=0;o--){let s=n.leadingComments[o];e.range[0]>=s.range[1]?(r.unshift(s),n.leadingComments.splice(o,1)):qo(e)&&!Jo(s)&&(a.unshift(s),n.leadingComments.splice(o,1))}return n.leadingComments.length===0&&delete n.leadingComments,r.length&&(e.leadingComments=r),void(a.length&&(e.trailingComments=[...a,...e.trailingComments??[]]))}for(let o=this._newComments.length-1;o>=0;o--){let s=this._newComments[o];e.range[0]>=s.range[0]&&(r.unshift(s),this._newComments.splice(o,1))}r.length&&(e.leadingComments=r)}attachComments(e){if(jo(e)&&e.body.length>0){let n=this._nodeStack.at(-1);return n?(n.trailingComments=[...n.trailingComments??[],...this._newComments],this._newComments.length=0,void this._nodeStack.pop()):(e.trailingComments=[...this._newComments],void(this._newComments.length=0))}this.attachTrailingComments(e),this.attachLeadingComments(e),this.insertInnerComments(e),this._nodeStack.push(e)}collectComment(e){this.comments.push(e),this._newComments.push(e)}},Wo=/\$\{(.*?)\}/gu;function ir(t,e){let n=Go[t];return e?n.replace(Wo,(r,a)=>{var o;return((o=e[a])==null?void 0:o.toString())??""}):n}var Ko=class{constructor(t=!1){this.tolerant=t,this.errors=[]}recordError(t){this.errors.push(t)}tolerate(t){if(!this.tolerant)throw t;this.recordError(t)}throwError(t){throw t.description??(t.description=ir(t.code,t.data)),new Vt(t)}tolerateError(t){t.description??(t.description=ir(t.code,t.data));let e=new Vt(t);if(!this.tolerant)throw e;this.recordError(e)}};function si(t,e){if(!t)throw new Error(`ASSERT: ${e}`)}var oi={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/u,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/u},V={fromCodePoint:t=>t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023)),isWhiteSpace:t=>t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t),isLineTerminator:t=>t===10||t===13||t===8232||t===8233,isIdentifierStart:t=>t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&oi.NonAsciiIdentifierStart.test(V.fromCodePoint(t)),isIdentifierPart:t=>t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&oi.NonAsciiIdentifierPart.test(V.fromCodePoint(t)),isDecimalDigit:t=>t>=48&&t<=57,isHexDigit:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,isOctalDigit:t=>t>=48&&t<=55};function ui(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function Rn(t){return"01234567".indexOf(t)}var at=[[],[],[]];rr.forEach(t=>{var e;return(e=at[t.length-1])==null?void 0:e.push(t)}),ha.forEach(t=>{var e;return(e=at[t.length-1])==null?void 0:e.push(t)}),fa.forEach(t=>{var e;return(e=at[t.length-1])==null?void 0:e.push(t)}),da.forEach(t=>{var e;return(e=at[t.length-1])==null?void 0:e.push(t)}),zo.forEach(t=>{var e;return(e=at[t.length-1])==null?void 0:e.push(t)});var Yo=class{constructor(e,n){this.source=e,this.errorHandler=n,this._length=e.length,this.index=0,this.lineNumber=1,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this._length}throwUnexpectedToken(e=A.UnexpectedToken){this.errorHandler.throwError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1,data:{value:this.source.charAt(this.index)}})}tolerateUnexpectedToken(e=A.UnexpectedToken){this.errorHandler.tolerateError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}skipSingleLineComment(e){let n=[],r=this.index-e,a={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{line:0,column:0}};for(;!this.eof();){let s=this.source.charCodeAt(this.index);if(this.index+=1,V.isLineTerminator(s)){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};let i={multiLine:!1,start:r+e,end:this.index-1,range:[r,this.index-1],loc:a};return n.push(i),s===13&&this.source.charCodeAt(this.index)===10&&(this.index+=1),this.lineNumber+=1,this.lineStart=this.index,n}}a.end={line:this.lineNumber,column:this.index-this.lineStart};let o={multiLine:!1,start:r+e,end:this.index,range:[r,this.index],loc:a};return n.push(o),n}skipMultiLineComment(){let e=[],n=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{line:0,column:0}};for(;!this.eof();){let o=this.source.charCodeAt(this.index);if(V.isLineTerminator(o))o===13&&this.source.charCodeAt(this.index+1)===10&&(this.index+=1),this.lineNumber+=1,this.index+=1,this.lineStart=this.index;else if(o===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2,r.end={line:this.lineNumber,column:this.index-this.lineStart};let s={multiLine:!0,start:n+2,end:this.index-2,range:[n,this.index],loc:r};return e.push(s),e}this.index+=1}else this.index+=1}r.end={line:this.lineNumber,column:this.index-this.lineStart};let a={multiLine:!0,start:n+2,end:this.index,range:[n,this.index],loc:r};return e.push(a),this.tolerateUnexpectedToken(),e}scanComments(){let e=[];for(;!this.eof();){let n=this.source.charCodeAt(this.index);if(V.isWhiteSpace(n))this.index+=1;else if(V.isLineTerminator(n))this.index+=1,n===13&&this.source.charCodeAt(this.index)===10&&(this.index+=1),this.lineNumber+=1,this.lineStart=this.index;else{if(n!==47)break;if(n=this.source.charCodeAt(this.index+1),n===47){this.index+=2;let r=this.skipSingleLineComment(2);e=[...e,...r]}else{if(n!==42)break;{this.index+=2;let r=this.skipMultiLineComment();e=[...e,...r]}}}}return e}isKeyword(e){switch((e=e.toLowerCase()).length){case 2:return e===q.If||e===q.In;case 3:return e===q.Var||e===q.For;case 4:return e===q.Else;case 5:return e===q.Break||e===q.While;case 6:return e===q.Return||e===q.Import||e===q.Export;case 8:return e===q.Function||e===q.Continue;default:return!1}}codePointAt(e){let n=this.source.charCodeAt(e);if(n>=55296&&n<=56319){let r=this.source.charCodeAt(e+1);r>=56320&&r<=57343&&(n=1024*(n-55296)+r-56320+65536)}return n}scanHexEscape(e){let n=e==="u"?4:2,r=0;for(let a=0;a1114111||e!=="}")&&this.throwUnexpectedToken(),V.fromCodePoint(n)}getIdentifier(){let e=this.index;for(this.index+=1;!this.eof();){let n=this.source.charCodeAt(this.index);if(n===92)return this.index=e,this.getComplexIdentifier();if(n>=55296&&n<57343)return this.index=e,this.getComplexIdentifier();if(!V.isIdentifierPart(n))break;this.index+=1}return this.source.slice(e,this.index)}getComplexIdentifier(){let e,n=this.codePointAt(this.index),r=V.fromCodePoint(n);for(this.index+=r.length,n===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),this.index+=1,this.source[this.index]==="{"?(this.index+=1,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),(e===null||e==="\\"||!V.isIdentifierStart(e.charCodeAt(0)))&&this.throwUnexpectedToken()),r=e);!this.eof()&&(n=this.codePointAt(this.index),V.isIdentifierPart(n));)e=V.fromCodePoint(n),r+=e,this.index+=e.length,n===92&&(r=r.substring(0,r.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),this.index+=1,this.source[this.index]==="{"?(this.index+=1,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),(e===null||e==="\\"||!V.isIdentifierPart(e.charCodeAt(0)))&&this.throwUnexpectedToken()),r+=e);return r}octalToDecimal(e){let n=e!=="0",r=Rn(e);return!this.eof()&&V.isOctalDigit(this.source.charCodeAt(this.index))&&(n=!0,r=8*r+Rn(this.source[this.index]??""),this.index+=1,"0123".includes(e)&&!this.eof()&&V.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+Rn(this.source[this.index]??""),this.index+=1)),{code:r,octal:n}}scanIdentifier(){let e,n=this.index,r=this.source.charCodeAt(n)===92?this.getComplexIdentifier():this.getIdentifier();if(e=r.length===1?S.Identifier:this.isKeyword(r)?S.Keyword:r.toLowerCase()===on.Null?S.NullLiteral:r.toLowerCase()===on.True||r.toLowerCase()===on.False?S.BooleanLiteral:S.Identifier,e!==S.Identifier&&n+r.length!==this.index){let a=this.index;this.index=n,this.tolerateUnexpectedToken(A.InvalidEscapedReservedWord),this.index=a}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}}scanPunctuator(){var r;let e=this.index,n=this.source[this.index]??"";switch(n){case"(":case"{":n==="{"&&this.curlyStack.push("{"),this.index+=1;break;case".":case")":case";":case",":case"[":case"]":case":":case"?":case"~":this.index+=1;break;case"}":this.index+=1,this.curlyStack.pop();break;default:for(let a=at.length;a>0;a--)if(n=this.source.substring(this.index,this.index+a),(r=at[a-1])==null?void 0:r.includes(n)){this.index+=a;break}}return this.index===e&&this.throwUnexpectedToken(),{type:S.Punctuator,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let n="";for(;!this.eof()&&V.isHexDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index],this.index+=1;return n.length===0&&this.throwUnexpectedToken(),V.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:S.NumericLiteral,value:Number.parseInt(`0x${n}`,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanBinaryLiteral(e){let n="";for(;!this.eof();){let r=this.source[this.index];if(r!=="0"&&r!=="1")break;n+=this.source[this.index],this.index+=1}if(n.length===0&&this.throwUnexpectedToken(),!this.eof()){let r=this.source.charCodeAt(this.index);(V.isIdentifierStart(r)||V.isDecimalDigit(r))&&this.throwUnexpectedToken()}return{type:S.NumericLiteral,value:Number.parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanOctalLiteral(e,n){let r="",a=!1;for(V.isOctalDigit(e.charCodeAt(0))&&(a=!0,r=`0${this.source[this.index]}`),this.index+=1;!this.eof()&&V.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index],this.index+=1;return!a&&r.length===0&&this.throwUnexpectedToken(),(V.isIdentifierStart(this.source.charCodeAt(this.index))||V.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:S.NumericLiteral,value:Number.parseInt(r,8),lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}}scanNumericLiteral(){let e=this.index,n=this.source[e]??"";si(V.isDecimalDigit(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point");let r="";if(n!=="."){if(r=this.source[this.index]??"",this.index+=1,n=this.source[this.index]??"",r==="0"){if(n==="x"||n==="X")return this.index+=1,this.scanHexLiteral(e);if(n==="b"||n==="B")return this.index+=1,this.scanBinaryLiteral(e);if(n==="o"||n==="O")return this.scanOctalLiteral(n,e)}for(;V.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index],this.index+=1;n=this.source[this.index]??""}if(n==="."){for(r+=this.source[this.index],this.index+=1;V.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index],this.index+=1;n=this.source[this.index]??""}if(n==="e"||n==="E")if(r+=this.source[this.index],this.index+=1,n=this.source[this.index]??"",(n==="+"||n==="-")&&(r+=this.source[this.index],this.index+=1),V.isDecimalDigit(this.source.charCodeAt(this.index)))for(;V.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index],this.index+=1;else this.throwUnexpectedToken();return V.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:S.NumericLiteral,value:Number.parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){let e=this.index,n=this.source[e];si(n==="'"||n==='"',"String literal must starts with a quote"),this.index+=1;let r=!1,a="";for(;!this.eof();){let o=this.source[this.index]??"";if(this.index+=1,o===n){n="";break}if(o==="\\")if(o=this.source[this.index]??"",this.index+=1,o&&V.isLineTerminator(o.charCodeAt(0)))this.lineNumber+=1,o==="\r"&&this.source[this.index]===` +`&&(this.index+=1),this.lineStart=this.index;else switch(o){case"u":if(this.source[this.index]==="{")this.index+=1,a+=this.scanUnicodeCodePointEscape();else{let s=this.scanHexEscape(o);s===null&&this.throwUnexpectedToken(),a+=s}break;case"x":{let s=this.scanHexEscape(o);s===null&&this.throwUnexpectedToken(A.InvalidHexEscapeSequence),a+=s;break}case"n":a+=` +`;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=o,this.tolerateUnexpectedToken();break;default:if(o&&V.isOctalDigit(o.charCodeAt(0))){let s=this.octalToDecimal(o);r=s.octal||r,a+=String.fromCharCode(s.code)}else a+=o}else{if(V.isLineTerminator(o.charCodeAt(0)))break;a+=o}}return n!==""&&(this.index=e,this.throwUnexpectedToken()),{type:S.StringLiteral,value:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",n=!1,r=this.index,a=this.source[r]==="`",o=!1,s=2;for(this.index+=1;!this.eof();){let i=this.source[this.index]??"";if(this.index+=1,i==="`"){s=1,o=!0,n=!0;break}if(i!=="$")if(i!=="\\")V.isLineTerminator(i.charCodeAt(0))?(this.lineNumber+=1,i==="\r"&&this.source[this.index]===` +`&&(this.index+=1),this.lineStart=this.index,e+=` +`):e+=i;else if(i=this.source[this.index]??"",this.index+=1,V.isLineTerminator(i.charCodeAt(0)))this.lineNumber+=1,i==="\r"&&this.source[this.index]===` +`&&(this.index+=1),this.lineStart=this.index;else switch(i){case"n":e+=` +`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"u":if(this.source[this.index]==="{")this.index+=1,e+=this.scanUnicodeCodePointEscape();else{let u=this.index,l=this.scanHexEscape(i);l!==null?e+=l:(this.index=u,e+=i)}break;case"x":{let u=this.scanHexEscape(i);u===null&&this.throwUnexpectedToken(A.InvalidHexEscapeSequence),e+=u;break}case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:i==="0"?(V.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(A.TemplateOctalLiteral),e+="\0"):V.isOctalDigit(i.charCodeAt(0))?this.throwUnexpectedToken(A.TemplateOctalLiteral):e+=i}else{if(this.source[this.index]==="{"){this.curlyStack.push("${"),this.index+=1,n=!0;break}e+=i}}return n||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:S.Template,value:this.source.slice(r+1,this.index-s),cooked:e,head:a,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}}lex(){if(this.eof())return{type:S.EOF,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};let e=this.source.charCodeAt(this.index);return V.isIdentifierStart(e)?this.scanIdentifier():e===40||e===41||e===59?this.scanPunctuator():e===39||e===34?this.scanStringLiteral():e===46?V.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():V.isDecimalDigit(e)?this.scanNumericLiteral():e===96||e===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():e>=55296&&e<57343&&V.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}},Fe={None:0,Function:1,IfClause:2,ForLoop:4,WhileLoop:8},Pn={AsObject:0,Automatic:1};function li(t,e=0){let n=t.start-t.lineStart,r=t.lineNumber;return n<0&&(n+=e,r-=1),{index:t.start,line:r,column:n}}function ci(t){return[{index:t.range[0],...t.loc.start},{index:t.range[1],...t.loc.end}]}function hi(t){return t in ri?ri[t]:0}var Xo=class{constructor(e,n={},r){this.delegate=r,this.hasLineTerminator=!1,this.options={tokens:typeof n.tokens=="boolean"&&n.tokens,comments:typeof n.comments=="boolean"&&n.comments,tolerant:typeof n.tolerant=="boolean"&&n.tolerant},this.options.comments&&(this.commentHandler=new Ho),this.errorHandler=new Ko(this.options.tolerant),this.scanner=new Yo(e,this.errorHandler),this.context={isAssignmentTarget:!1,blockContext:Fe.None,curlyParsingType:Pn.AsObject},this.rawToken={type:S.EOF,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.endMarker={index:0,line:this.scanner.lineNumber,column:0},this.readNextRawToken(),this.endMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwIfInvalidType(e,n,{validTypes:r,invalidTypes:a}){r!=null&&r.some(o=>e.type===o)||a!=null&&a.some(o=>e.type===o)&&this.throwError(A.InvalidExpression,n)}throwError(e,n,r=this.endMarker){let{index:a,line:o,column:s}=n,i=r.index-a-1;this.errorHandler.throwError({code:e,index:a,line:o,column:s+1,len:i})}tolerateError(e,n){throw new Error("######################################### !!!")}unexpectedTokenError(e={}){let n,{rawToken:r}=e,{code:a,data:o}=e;if(r){if(!a)switch(r.type){case S.EOF:a=A.UnexpectedEndOfScript;break;case S.Identifier:a=A.UnexpectedIdentifier;break;case S.NumericLiteral:a=A.UnexpectedNumber;break;case S.StringLiteral:a=A.UnexpectedString;break;case S.Template:a=A.UnexpectedTemplate}n=r.value.toString()}else n="ILLEGAL";a??(a=A.UnexpectedToken),o||(o={value:n});let s=ir(a,o);if(r){let l=r.start,f=r.lineNumber,h=r.start-r.lineStart+1;return new Vt({code:a,index:l,line:f,column:h,len:r.end-r.start-1,data:o,description:s})}let{index:i,line:u}=this.endMarker;return new Vt({code:a,index:i,line:u,column:this.endMarker.column+1,data:o,description:s})}throwUnexpectedToken(e={}){throw e.rawToken??(e.rawToken=this.rawToken),this.unexpectedTokenError(e)}collectComments(e){let{commentHandler:n}=this;!n||!e.length||e.forEach(r=>{let a={type:r.multiLine?v.BlockComment:v.LineComment,value:this.getSourceValue(r),range:r.range,loc:r.loc};n.collectComment(a)})}peekAhead(e){let n=()=>(this.scanner.scanComments(),this.scanner.lex()),r=this.scanner.saveState(),a=e.call(this,n);return this.scanner.restoreState(r),a}getSourceValue(e){return this.scanner.source.slice(e.start,e.end)}convertToToken(e){return{type:Zo[e.type],value:this.getSourceValue(e),range:[e.start,e.end],loc:{start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}}}readNextRawToken(){this.endMarker.index=this.scanner.index,this.endMarker.line=this.scanner.lineNumber,this.endMarker.column=this.scanner.index-this.scanner.lineStart;let e=this.rawToken;this.collectComments(this.scanner.scanComments()),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart),this.rawToken=this.scanner.lex(),this.hasLineTerminator=e.lineNumber!==this.rawToken.lineNumber,this.options.tokens&&this.rawToken.type!==S.EOF&&this.tokens.push(this.convertToToken(this.rawToken))}captureStartMarker(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}getItemLocation(e){return{range:[e.index,this.endMarker.index],loc:{start:{line:e.line,column:e.column},end:{line:this.endMarker.line,column:this.endMarker.column}}}}finalize(e){var n,r;return(this.delegate??this.commentHandler)&&((n=this.commentHandler)==null||n.attachComments(e),(r=this.delegate)==null||r.call(this,e)),e}expectPunctuator(e){let n=this.rawToken;this.matchPunctuator(e)?this.readNextRawToken():this.throwUnexpectedToken({rawToken:n,code:A.PunctuatorExpected,data:{value:e}})}expectKeyword(e){this.rawToken.type!==S.Keyword||this.rawToken.value.toLowerCase()!==e.toString()?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}expectContextualKeyword(e){this.rawToken.type!==S.Identifier||this.rawToken.value.toLowerCase()!==e?this.throwUnexpectedToken({rawToken:this.rawToken}):this.readNextRawToken()}matchKeyword(e){return this.rawToken.type===S.Keyword&&this.rawToken.value.toLowerCase()===e}matchContextualKeyword(e){return this.rawToken.type===S.Identifier&&this.rawToken.value===e}matchPunctuator(e){return this.rawToken.type===S.Punctuator&&this.rawToken.value===e}getMatchingPunctuator(e){if(typeof e=="string"&&(e=e.split("")),this.rawToken.type===S.Punctuator&&e.length)return e.find(this.matchPunctuator.bind(this))}isolateCoverGrammar(e){let n=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;let r=e.call(this);return this.context.isAssignmentTarget=n,r}inheritCoverGrammar(e){var n;let r=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;let a=e.call(this);return(n=this.context).isAssignmentTarget&&(n.isAssignmentTarget=r),a}withBlockContext(e,n){let r=this.context.blockContext;this.context.blockContext|=e;let a=this.context.curlyParsingType;this.context.curlyParsingType=Pn.Automatic;let o=n.call(this);return this.context.blockContext=r,this.context.curlyParsingType=a,o}consumeSemicolon(){if(this.matchPunctuator(";"))this.readNextRawToken();else if(!this.hasLineTerminator){if(this.rawToken.type===S.EOF||this.matchPunctuator("}"))return this.endMarker.index=this.startMarker.index,this.endMarker.line=this.startMarker.line,void(this.endMarker.column=this.startMarker.column);this.throwUnexpectedToken({rawToken:this.rawToken})}}parsePrimaryExpression(){let e=this.captureStartMarker(),n=this.rawToken;switch(n.type){case S.Identifier:return this.readNextRawToken(),this.finalize({type:v.Identifier,name:n.value,...this.getItemLocation(e)});case S.NumericLiteral:case S.StringLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:v.Literal,value:n.value,raw:this.getSourceValue(n),isString:typeof n.value=="string",...this.getItemLocation(e)});case S.BooleanLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:v.Literal,value:n.value.toLowerCase()===on.True,raw:this.getSourceValue(n),isString:!1,...this.getItemLocation(e)});case S.NullLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:v.Literal,value:null,raw:this.getSourceValue(n),isString:!1,...this.getItemLocation(e)});case S.Template:return this.parseTemplateLiteral();case S.Punctuator:switch(n.value){case"(":return this.inheritCoverGrammar(this.parseGroupExpression.bind(this));case"[":return this.inheritCoverGrammar(this.parseArrayInitializer.bind(this));case"{":return this.inheritCoverGrammar(this.parseObjectExpression.bind(this));default:return this.throwUnexpectedToken({rawToken:this.rawToken})}case S.Keyword:return this.context.isAssignmentTarget=!1,this.throwUnexpectedToken({rawToken:this.rawToken});default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseArrayInitializer(){let e=this.captureStartMarker();this.expectPunctuator("[");let n=[];for(;!this.matchPunctuator("]");){let r=this.captureStartMarker();this.matchPunctuator(",")?(this.readNextRawToken(),this.throwError(A.InvalidExpression,r)):(n.push(this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this))),this.matchPunctuator("]")||this.expectPunctuator(","))}return this.expectPunctuator("]"),this.finalize({type:v.ArrayExpression,elements:n,...this.getItemLocation(e)})}parseObjectPropertyKey(){let e=this.captureStartMarker(),n=this.rawToken;switch(n.type){case S.StringLiteral:return this.readNextRawToken(),this.finalize({type:v.Literal,value:n.value,raw:this.getSourceValue(n),isString:!0,...this.getItemLocation(e)});case S.Identifier:case S.BooleanLiteral:case S.NullLiteral:case S.Keyword:return this.readNextRawToken(),this.finalize({type:v.Identifier,name:n.value,...this.getItemLocation(e)});default:this.throwError(A.KeyMustBeString,e)}}parseObjectProperty(){let e=this.rawToken,n=this.captureStartMarker(),r=this.parseObjectPropertyKey(),a=!1,o=null;return this.matchPunctuator(":")?(this.readNextRawToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this))):e.type===S.Identifier?(a=!0,o=this.finalize({type:v.Identifier,name:e.value,...this.getItemLocation(n)})):this.throwUnexpectedToken({rawToken:this.rawToken}),this.finalize({type:v.Property,kind:"init",key:r,value:o,shorthand:a,...this.getItemLocation(n)})}parseObjectExpression(){let e=this.captureStartMarker();this.expectPunctuator("{");let n=[];for(;!this.matchPunctuator("}");)n.push(this.parseObjectProperty()),this.matchPunctuator("}")||this.expectPunctuator(",");return this.expectPunctuator("}"),this.finalize({type:v.ObjectExpression,properties:n,...this.getItemLocation(e)})}parseTemplateElement(e=!1){let n=this.rawToken;n.type!==S.Template&&this.throwUnexpectedToken({rawToken:n}),e&&!n.head&&this.throwUnexpectedToken({code:A.InvalidTemplateHead,rawToken:n});let r=this.captureStartMarker();this.readNextRawToken();let{value:a,cooked:o,tail:s}=n,i=this.finalize({type:v.TemplateElement,value:{raw:a,cooked:o},tail:s,...this.getItemLocation(r)});return i.loc.start.column+=1,i.loc.end.column-=s?1:2,i}parseTemplateLiteral(){let e=this.captureStartMarker(),n=[],r=[],a=this.parseTemplateElement(!0);for(r.push(a);!a.tail;)n.push(this.parseExpression()),a=this.parseTemplateElement(),r.push(a);return this.finalize({type:v.TemplateLiteral,quasis:r,expressions:n,...this.getItemLocation(e)})}parseGroupExpression(){this.expectPunctuator("(");let e=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this));return this.expectPunctuator(")"),e}parseArguments(){this.expectPunctuator("(");let e=[];if(!this.matchPunctuator(")"))for(;;){let n=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this));if(e.push(n),this.matchPunctuator(")")||(this.expectPunctuator(","),this.matchPunctuator(")")))break}return this.expectPunctuator(")"),e}parseMemberName(){let e=this.rawToken,n=this.captureStartMarker();return this.readNextRawToken(),e.type!==S.NullLiteral&&e.type!==S.Identifier&&e.type!==S.Keyword&&e.type!==S.BooleanLiteral&&this.throwUnexpectedToken({rawToken:e}),this.finalize({type:v.Identifier,name:e.value,...this.getItemLocation(n)})}parseLeftHandSideExpression(){let e,n=this.captureStartMarker(),r=this.inheritCoverGrammar(this.parsePrimaryExpression.bind(this)),a=this.captureStartMarker();for(;e=this.getMatchingPunctuator("([.");)switch(e){case"(":{this.context.isAssignmentTarget=!1,r.type!==v.Identifier&&r.type!==v.MemberExpression&&this.throwError(A.IdentiferExpected,n,a);let o=this.parseArguments();r=this.finalize({type:v.CallExpression,callee:r,arguments:o,...this.getItemLocation(n)});continue}case"[":{this.context.isAssignmentTarget=!0,this.expectPunctuator("[");let o=this.isolateCoverGrammar(()=>this.parseExpression());this.expectPunctuator("]"),r=this.finalize({type:v.MemberExpression,computed:!0,object:r,property:o,...this.getItemLocation(n)});continue}case".":{this.context.isAssignmentTarget=!0,this.expectPunctuator(".");let o=this.parseMemberName();r=this.finalize({type:v.MemberExpression,computed:!1,object:r,property:o,...this.getItemLocation(n)});continue}}return r}parseUpdateExpression(){let e=this.captureStartMarker(),n=this.getMatchingPunctuator(rr);if(n){this.readNextRawToken();let s=this.captureStartMarker(),i=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));return i.type!==v.Identifier&&i.type!==v.MemberExpression&&i.type!==v.CallExpression&&this.throwError(A.InvalidExpression,s),this.context.isAssignmentTarget||this.tolerateError(A.InvalidLeftHandSideInAssignment,e),this.context.isAssignmentTarget=!1,this.finalize({type:v.UpdateExpression,operator:n,argument:i,prefix:!0,...this.getItemLocation(e)})}let r=this.captureStartMarker(),a=this.inheritCoverGrammar(this.parseLeftHandSideExpression.bind(this)),o=this.captureStartMarker();return this.hasLineTerminator||(n=this.getMatchingPunctuator(rr),!n)?a:(a.type!==v.Identifier&&a.type!==v.MemberExpression&&this.throwError(A.InvalidExpression,r,o),this.context.isAssignmentTarget||this.tolerateError(A.InvalidLeftHandSideInAssignment,e),this.readNextRawToken(),this.context.isAssignmentTarget=!1,this.finalize({type:v.UpdateExpression,operator:n,argument:a,prefix:!1,...this.getItemLocation(e)}))}parseUnaryExpression(){let e=this.getMatchingPunctuator(ha);if(e){let n=this.captureStartMarker();this.readNextRawToken();let r=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));return this.context.isAssignmentTarget=!1,this.finalize({type:v.UnaryExpression,operator:e,argument:r,prefix:!0,...this.getItemLocation(n)})}return this.parseUpdateExpression()}parseBinaryExpression(){let e=this.rawToken,n=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));if(this.rawToken.type!==S.Punctuator)return n;let r=this.rawToken.value,a=hi(r);if(a===0)return n;this.readNextRawToken(),this.context.isAssignmentTarget=!1;let o=[e,this.rawToken],s=n,i=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this)),u=[s,r,i],l=[a];for(;this.rawToken.type===S.Punctuator&&(a=hi(this.rawToken.value))>0;){for(;u.length>2&&a<=l[l.length-1];){i=u.pop();let m=u.pop();l.pop(),s=u.pop(),o.pop();let g=o[o.length-1],y=li(g,g.lineStart);u.push(this.finalize(this.createBinaryOrLogicalExpression(y,m,s,i)))}u.push(this.rawToken.value),l.push(a),o.push(this.rawToken),this.readNextRawToken(),u.push(this.inheritCoverGrammar(this.parseUnaryExpression.bind(this)))}let f=u.length-1;n=u[f];let h=o.pop();for(;f>1;){let m=o.pop();if(!m)break;let g=h==null?void 0:h.lineStart,y=li(m,g),k=u[f-1];n=this.finalize(this.createBinaryOrLogicalExpression(y,k,u[f-2],n)),f-=2,h=m}return n}createBinaryOrLogicalExpression(e,n,r,a){let o=fa.includes(n)?v.LogicalExpression:v.BinaryExpression;return o===v.BinaryExpression||((r.type===v.AssignmentExpression||r.type===v.UpdateExpression)&&this.throwError(A.InvalidExpression,...ci(r)),(a.type===v.AssignmentExpression||a.type===v.UpdateExpression)&&this.throwError(A.InvalidExpression,...ci(r))),{type:o,operator:n,left:r,right:a,...this.getItemLocation(e)}}parseAssignmentExpression(){let e=this.captureStartMarker(),n=this.inheritCoverGrammar(this.parseBinaryExpression.bind(this)),r=this.captureStartMarker(),a=this.getMatchingPunctuator(da);if(!a)return n;n.type!==v.Identifier&&n.type!==v.MemberExpression&&this.throwError(A.InvalidExpression,e,r),this.context.isAssignmentTarget||this.tolerateError(A.InvalidLeftHandSideInAssignment,e),this.matchPunctuator("=")||(this.context.isAssignmentTarget=!1),this.readNextRawToken();let o=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this));return this.finalize({type:v.AssignmentExpression,left:n,operator:a,right:o,...this.getItemLocation(e)})}parseExpression(){return this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this))}parseStatements(e){let n=[];for(;this.rawToken.type!==S.EOF&&!this.matchPunctuator(e);){let r=this.parseStatementListItem();Vo(r)||n.push(r)}return n}parseStatementListItem(){return this.context.isAssignmentTarget=!0,this.matchKeyword(q.Function)?this.parseFunctionDeclaration():this.matchKeyword(q.Export)?this.parseExportDeclaration():this.matchKeyword(q.Import)?this.parseImportDeclaration():this.parseStatement()}parseBlock(){let e=this.captureStartMarker();this.expectPunctuator("{");let n=this.parseStatements("}");return this.expectPunctuator("}"),this.finalize({type:v.BlockStatement,body:n,...this.getItemLocation(e)})}parseObjectStatement(){let e=this.captureStartMarker(),n=this.parseObjectExpression();return this.finalize({type:v.ExpressionStatement,expression:n,...this.getItemLocation(e)})}parseBlockOrObjectStatement(){return this.context.curlyParsingType===Pn.AsObject||this.peekAhead(e=>{let n=e();return!(n.type!==S.Identifier&&n.type!==S.StringLiteral||(n=e(),n.type!==S.Punctuator||n.value!==":"))})?this.parseObjectStatement():this.parseBlock()}parseIdentifier(){let e=this.rawToken;if(e.type!==S.Identifier)return null;let n=this.captureStartMarker();return this.readNextRawToken(),this.finalize({type:v.Identifier,name:e.value,...this.getItemLocation(n)})}parseVariableDeclarator(){let e=this.captureStartMarker(),n=this.parseIdentifier();n||this.throwUnexpectedToken({code:A.IdentiferExpected});let r=null;if(this.matchPunctuator("=")){this.readNextRawToken();let a=this.rawToken;try{r=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this))}catch{this.throwUnexpectedToken({rawToken:a,code:A.InvalidVariableAssignment})}}return this.finalize({type:v.VariableDeclarator,id:n,init:r,...this.getItemLocation(e)})}parseVariableDeclarationList(){let e=[this.parseVariableDeclarator()];for(;this.matchPunctuator(",");)this.readNextRawToken(),e.push(this.parseVariableDeclarator());return e}parseVariableDeclaration(){let e=this.captureStartMarker();this.expectKeyword(q.Var);let n=this.parseVariableDeclarationList();return this.consumeSemicolon(),this.finalize({type:v.VariableDeclaration,declarations:n,kind:"var",...this.getItemLocation(e)})}parseEmptyStatement(){let e=this.captureStartMarker();return this.expectPunctuator(";"),this.finalize({type:v.EmptyStatement,...this.getItemLocation(e)})}parseExpressionStatement(){let e=this.captureStartMarker(),n=this.parseExpression();return this.consumeSemicolon(),this.finalize({type:v.ExpressionStatement,expression:n,...this.getItemLocation(e)})}parseIfClause(){return this.withBlockContext(Fe.IfClause,this.parseStatement.bind(this))}parseIfStatement(){let e=this.captureStartMarker();this.expectKeyword(q.If),this.expectPunctuator("(");let n=this.captureStartMarker(),r=this.parseExpression(),a=this.captureStartMarker();this.expectPunctuator(")"),(r.type===v.AssignmentExpression||r.type===v.UpdateExpression)&&this.throwError(A.InvalidExpression,n,a);let o=this.parseIfClause(),s=null;return this.matchKeyword(q.Else)&&(this.readNextRawToken(),s=this.parseIfClause()),this.finalize({type:v.IfStatement,test:r,consequent:o,alternate:s,...this.getItemLocation(e)})}parseWhileStatement(){let e=this.captureStartMarker();this.expectKeyword(q.While),this.expectPunctuator("(");let n=this.captureStartMarker(),r=this.parseExpression(),a=this.captureStartMarker();this.expectPunctuator(")"),(r.type===v.AssignmentExpression||r.type===v.UpdateExpression)&&this.throwError(A.InvalidExpression,n,a);let o=this.withBlockContext(Fe.WhileLoop,this.parseStatement.bind(this));return this.finalize({type:v.WhileStatement,test:r,body:o,...this.getItemLocation(e)})}parseForStatement(){let e=null,n=null,r=null,a=null,o=null,s=this.captureStartMarker();if(this.expectKeyword(q.For),this.expectPunctuator("("),this.matchPunctuator(";"))this.readNextRawToken();else if(this.matchKeyword(q.Var)){let u=this.captureStartMarker();this.readNextRawToken();let l=this.parseVariableDeclarationList();l.length===1&&this.matchKeyword(q.In)?(l[0].init&&this.throwError(A.ForInOfLoopInitializer,u),a=this.finalize({type:v.VariableDeclaration,declarations:l,kind:"var",...this.getItemLocation(u)}),this.readNextRawToken(),o=this.parseExpression()):(this.matchKeyword(q.In)&&this.throwError(A.InvalidLeftHandSideInForIn,u),e=this.finalize({type:v.VariableDeclaration,declarations:l,kind:"var",...this.getItemLocation(u)}),this.expectPunctuator(";"))}else{let u=this.context.isAssignmentTarget,l=this.captureStartMarker();e=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this)),this.matchKeyword(q.In)?(this.context.isAssignmentTarget||this.tolerateError(A.InvalidLeftHandSideInForIn,l),e.type!==v.Identifier&&this.throwError(A.InvalidLeftHandSideInForIn,l),this.readNextRawToken(),a=e,o=this.parseExpression(),e=null):(this.context.isAssignmentTarget=u,this.expectPunctuator(";"))}a||(this.matchPunctuator(";")||(n=this.isolateCoverGrammar(this.parseExpression.bind(this))),this.expectPunctuator(";"),this.matchPunctuator(")")||(r=this.isolateCoverGrammar(this.parseExpression.bind(this)))),this.expectPunctuator(")");let i=this.withBlockContext(Fe.ForLoop,()=>this.isolateCoverGrammar(this.parseStatement.bind(this)));return a&&o?this.finalize({type:v.ForInStatement,left:a,right:o,body:i,...this.getItemLocation(s)}):this.finalize({type:v.ForStatement,init:e,test:n,update:r,body:i,...this.getItemLocation(s)})}parseContinueStatement(){let e=this.captureStartMarker();return this.expectKeyword(q.Continue),this.consumeSemicolon(),this.finalize({type:v.ContinueStatement,...this.getItemLocation(e)})}parseBreakStatement(){let e=this.captureStartMarker();return this.expectKeyword(q.Break),this.consumeSemicolon(),this.finalize({type:v.BreakStatement,...this.getItemLocation(e)})}parseReturnStatement(){let e=this.captureStartMarker();this.expectKeyword(q.Return);let n=(this.matchPunctuator(";")||this.matchPunctuator("}")||this.hasLineTerminator||this.rawToken.type===S.EOF)&&this.rawToken.type!==S.StringLiteral&&this.rawToken.type!==S.Template?null:this.parseExpression();return this.consumeSemicolon(),this.finalize({type:v.ReturnStatement,argument:n,...this.getItemLocation(e)})}parseStatement(){switch(this.rawToken.type){case S.BooleanLiteral:case S.NullLiteral:case S.NumericLiteral:case S.StringLiteral:case S.Template:case S.Identifier:return this.parseExpressionStatement();case S.Punctuator:return this.rawToken.value==="{"?this.parseBlockOrObjectStatement():this.rawToken.value==="("?this.parseExpressionStatement():this.rawToken.value===";"?this.parseEmptyStatement():this.parseExpressionStatement();case S.Keyword:switch(this.rawToken.value.toLowerCase()){case q.Break:return this.parseBreakStatement();case q.Continue:return this.parseContinueStatement();case q.For:return this.parseForStatement();case q.Function:return this.parseFunctionDeclaration();case q.If:return this.parseIfStatement();case q.Return:return this.parseReturnStatement();case q.Var:return this.parseVariableDeclaration();case q.While:return this.parseWhileStatement();default:return this.parseExpressionStatement()}default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseFormalParameters(){let e=[];if(this.expectPunctuator("("),!this.matchPunctuator(")"))for(;this.rawToken.type!==S.EOF;){let n=this.parseIdentifier();if(n||this.throwUnexpectedToken({rawToken:this.rawToken,code:A.IdentiferExpected}),e.push(n),this.matchPunctuator(")")||(this.expectPunctuator(","),this.matchPunctuator(")")))break}return this.expectPunctuator(")"),e}parseFunctionDeclaration(){(this.context.blockContext&Fe.Function)===Fe.Function&&this.throwUnexpectedToken({code:A.NoFunctionInsideFunction}),((this.context.blockContext&Fe.WhileLoop)===Fe.WhileLoop||(this.context.blockContext&Fe.IfClause)===Fe.IfClause)&&this.throwUnexpectedToken({code:A.NoFunctionInsideBlock});let e=this.captureStartMarker();this.expectKeyword(q.Function);let n=this.parseIdentifier();n||this.throwUnexpectedToken({code:A.InvalidFunctionIdentifier});let r=this.parseFormalParameters(),a=this.context.blockContext;this.context.blockContext|=Fe.Function;let o=this.parseBlock();return this.context.blockContext=a,this.finalize({type:v.FunctionDeclaration,id:n,params:r,body:o,...this.getItemLocation(e)})}parseScript(){let e=this.captureStartMarker(),n=this.parseStatements(),r=this.finalize({type:v.Program,body:n,...this.getItemLocation(e)});return this.options.tokens&&(r.tokens=this.tokens),this.options.tolerant&&(r.errors=this.errorHandler.errors),r}parseExportDeclaration(){this.context.blockContext!==Fe.None&&this.throwUnexpectedToken({code:A.ModuleExportRootOnly});let e=null,n=this.captureStartMarker();return this.expectKeyword(q.Export),this.matchKeyword(q.Var)?e=this.parseVariableDeclaration():this.matchKeyword("function")?e=this.parseFunctionDeclaration():this.throwUnexpectedToken({code:A.InvalidExpression}),this.finalize({type:v.ExportNamedDeclaration,declaration:e,specifiers:[],source:null,...this.getItemLocation(n)})}parseModuleSpecifier(){let e=this.captureStartMarker(),n=this.rawToken;if(n.type===S.StringLiteral)return this.readNextRawToken(),this.finalize({type:v.Literal,value:n.value,raw:this.getSourceValue(n),isString:!0,...this.getItemLocation(e)});this.throwError(A.InvalidModuleUri,e)}parseDefaultSpecifier(){let e=this.captureStartMarker(),n=this.parseIdentifier();return n||this.throwUnexpectedToken({code:A.IdentiferExpected}),this.finalize({type:v.ImportDefaultSpecifier,local:n,...this.getItemLocation(e)})}parseImportDeclaration(){this.context.blockContext!==Fe.None&&this.throwUnexpectedToken({code:A.ModuleImportRootOnly});let e=this.captureStartMarker();this.expectKeyword(q.Import);let n=this.parseDefaultSpecifier();this.expectContextualKeyword(q.From);let r=this.parseModuleSpecifier();return this.finalize({type:v.ImportDeclaration,specifiers:[n],source:r,...this.getItemLocation(e)})}};function Qo(t,e,n){return new Xo(t,e,n).parseScript()}function pn(t,e=[]){const n=Qo(t);if(n.body===null||n.body===void 0)throw new Vt({index:0,line:0,column:0,data:null,description:"",code:A.InvalidExpression});return n.loadedModules={},Yt(n,e),n}class mn{constructor(e){const n=this;n._keys=[],n._values=[],n.length=0,e&&e.forEach(r=>{n.set(r[0],r[1])})}entries(){return[].slice.call(this.keys().map((e,n)=>[e,this._values[n]]))}keys(){return[].slice.call(this._keys)}values(){return[].slice.call(this._values)}has(e){return this._keys.includes(e)}get(e){const n=this._keys.indexOf(e);return n>-1?this._values[n]:null}deepGet(e){if(!(e!=null&&e.length))return null;const n=(r,a)=>r==null?null:a.length?n(r instanceof mn?r.get(a[0]):r[a[0]],a.slice(1)):r;return n(this.get(e[0]),e.slice(1))}set(e,n){const r=this,a=this._keys.indexOf(e);return a>-1?r._values[a]=n:(r._keys.push(e),r._values.push(n),r.length=r._values.length),this}sortedSet(e,n,r,a){const o=this,s=this._keys.length,i=r||0,u=a!==void 0?a:s-1;if(s===0)return o._keys.push(e),o._values.push(n),o;if(e===this._keys[i])return this._values.splice(i,0,n),this;if(e===this._keys[u])return this._values.splice(u,0,n),this;if(e>this._keys[u])return this._keys.splice(u+1,0,e),this._values.splice(u+1,0,n),this;if(e=u)return this;const l=i+Math.floor((u-i)/2);return ethis._keys[l]?this.sortedSet(e,n,l+1,u):this}size(){return this.length}clear(){const e=this;return e._keys.length=e.length=e._values.length=0,this}delete(e){const n=this,r=n._keys.indexOf(e);return r>-1&&(n._keys.splice(r,1),n._values.splice(r,1),n.length=n._keys.length,!0)}forEach(e){this._keys.forEach((n,r)=>{e(this._values[r],n,r)})}map(e){return this.keys().map((n,r)=>e(this._values[r],n,r))}filter(e){const n=this;return n._keys.forEach((r,a)=>{e(n._values[a],r,a)===!1&&n.delete(r)}),this}clone(){return new mn(this.entries())}}class Ke{constructor(e=20){this._maxEntries=e,this._values=new mn}delete(e){this._values.has(e)&&this._values.delete(e)}get(e){let n=null;return this._values.has(e)&&(n=this._values.get(e),this._values.delete(e),this._values.set(e,n)),n}put(e,n){if(this._values.size()>=this._maxEntries){const r=this._values.keys()[0];this._values.delete(r)}this._values.set(e,n)}}class eu{constructor(e=20){this._maxEntries=e,this._cache=new Ke(this._maxEntries),this._layerMetadata=new Ke(this._maxEntries),this._serviceMetadata=new Ke(this._maxEntries),this._portalItems=new Ke(this._maxEntries)}clear(){this._cache=new Ke(this._maxEntries),this._layerMetadata=new Ke(this._maxEntries),this._serviceMetadata=new Ke(this._maxEntries),this._portalItems=new Ke(this._maxEntries)}addToCache(e,n){this._cache.put(e,n)}removeFromCache(e){this._cache.delete(e)}getFromCache(e){return this._cache.get(e)}getCachedLayerMetadata(e){return this._layerMetadata.get(e)}setCachedLayerMetadata(e,n){this._layerMetadata.put(e,n)}removeCachedLayerMetadata(e,n){this._layerMetadata.get(e)===n&&this._layerMetadata.delete(e)}getCachedServiceMetadata(e){return this._serviceMetadata.get(e)}setCachedServiceMetadata(e,n){this._serviceMetadata.put(e,n)}removeCachedServiceMetadata(e,n){this._serviceMetadata.get(e)===n&&this._serviceMetadata.delete(e)}getCachedPortalItem(e,n){return this._portalItems.get(`${n}:${e}`)}setCachedPortalItem(e,n,r){this._portalItems.put(`${n}:${e}`,r)}removeCachedPortalItem(e,n,r){const a=`${n}:${e}`;this._portalItems.get(a)===r&&this._portalItems.delete(a)}}class ge{constructor(e){this.portalUri=e}normalizeModuleUri(e){const n=/^[a-z0-9A-Z]+(@[0-9]+\.[0-9]+\.[0-9]+)?([?|/].*)?$/gi,r=/(?.+)\/home\/item\.html\?id=(?.+)$/gi,a=/(?.+)\/sharing\/rest\/content\/users\/[a-zA-Z0-9]+\/items\/(?.+)$/gi,o=/(?.+)\/sharing\/rest\/content\/items\/(?.+)$/gi,s=/(?.*)@(?[0-9]+\.[0-9]+\.[0-9]+)([?|/].*)?$/gi;if(e.startsWith("portal+")){let i=e.substring(7),u="",l=i,f=!1;for(const g of[r,o,a]){const y=g.exec(i);if(y!==null){const k=y.groups;l=k.itemid,u=k.portalurl,f=!0;break}}if(f===!1){if(!n.test(i))throw new vn(ot.UnsupportedUriProtocol,{uri:e});l=i,u=this.portalUri}l.includes("/")&&(l=l.split("/")[0]),l.includes("?")&&(l=l.split("?")[0]);let h="current";const m=s.exec(l);if(m!==null){const g=m.groups;l=g.itemid,h=g.versionstring}return i=new lr({url:u}).restUrl+"/content/items/"+l+"/resources/"+h+".arc",{url:i,scheme:"portal",uri:"PO:"+i}}if(e.startsWith("mock")){if(e==="mock")return{url:"",scheme:"mock",data:` + export var hello = 1; + export function helloWorld() { + return "Hello World " + hello; + } + `,uri:"mock"};const i=e.replace("mock:","");if(ge.mocks[i]!==void 0)return{url:"",scheme:"mock",data:ge.mocks[i],uri:e}}throw new vn(ot.UnrecognizedUri,{uri:e})}async fetchModule(e){const n=ge.cachedModules.getFromCache(e.uri);if(n)return n;const r=this.fetchSource(e);ge.cachedModules.addToCache(e.uri,r);let a=null;try{a=await r}catch(o){throw ge.cachedModules.removeFromCache(e.uri),o}return a}async fetchSource(e){if(e.scheme==="portal"){const n=await za(e.url,{responseType:"text",query:{}});if(n.data)return pn(n.data,[])}if(e.scheme==="mock")return pn(e.data??"",[]);throw new vn(ot.UnsupportedUriProtocol)}static create(e){return new ge(e)}static getDefault(){return this._default??(ge._default=ge._moduleResolverFactory())}static set moduleResolverClass(e){this._moduleResolverFactory=e,this._default=null}}ge.mocks={},ge.cachedModules=new eu(30),ge._default=null,ge._moduleResolverFactory=()=>{const t=lr.getDefault();return new ge(t.url)};let tu=class extends ut{constructor(e,n){super(),this.definition=null,this.context=null,this.definition=e,this.context=n}createFunction(e){return(...n)=>{const r={spatialReference:this.context.spatialReference,console:this.context.console,services:this.context.services,timeZone:this.context.timeZone??null,lrucache:this.context.lrucache,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:e.depthCounter.depth+1},globalScope:this.context.globalScope};if(r.depthCounter.depth>64)throw new d(e,c.MaximumCallDepth,null);return On(this.definition,r,n,null)}}call(e,n){return Ve(e,n,(r,a,o)=>{const s={spatialReference:e.spatialReference,services:e.services,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,timeZone:e.timeZone??null,console:e.console,lrucache:e.lrucache,interceptor:e.interceptor,localScope:{}};if(s.depthCounter.depth>64)throw new d(e,c.MaximumCallDepth,n);return On(this.definition,s,o,n)})}marshalledCall(e,n,r,a){return a(e,n,(o,s,i)=>{const u={spatialReference:e.spatialReference,globalScope:r.globalScope,services:e.services,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,timeZone:e.timeZone??null,lrucache:e.lrucache,interceptor:e.interceptor,localScope:{}};return i=i.map(l=>!Q(l)||l instanceof qe?l:wt(l,e,a)),wt(On(this.definition,u,i,n),r,a)})}},vt=class extends qt{constructor(e){super(e)}global(e){const n=this.executingContext.globalScope[e.toLowerCase()];if(n.valueset||(n.value=I(this.executingContext,n.node),n.valueset=!0),Q(n.value)&&!(n.value instanceof qe)){const r=new qe;r.fn=n.value,r.parameterEvaluator=Ve,r.context=this.executingContext,n.value=r}return n.value}setGlobal(e,n){if(Q(n))throw new d(null,c.AssignModuleFunction,null);this.executingContext.globalScope[e.toLowerCase()]={value:n,valueset:!0,node:null}}hasGlobal(e){return this.executingContext.exports[e]===void 0&&(e=e.toLowerCase()),this.executingContext.exports[e]!==void 0}loadModule(e){let n=e.spatialReference;n==null&&(n=new St({wkid:102100})),this.moduleScope=ya({},e.customfunctions,e.timeZone),this.executingContext={spatialReference:n,globalScope:this.moduleScope,localScope:null,libraryResolver:new Dn(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},services:e.services,console:e.console??wa,timeZone:e.timeZone??null,lrucache:e.lrucache,interceptor:e.interceptor,depthCounter:{depth:1}},I(this.executingContext,this.source.syntax)}};function nu(t,e){const n=[];for(let r=0;r=r.length)throw new d(t,c.OutOfBounds,e);n=p(r[a]),r[a]=e.operator==="++"?n+1:n-1}else if(r instanceof B){if(x(a)===!1)throw new d(t,c.KeyAccessorMustBeString,e);if(r.hasField(a)!==!0)throw new d(t,c.FieldNotFound,e);n=p(r.field(a)),r.setField(a,e.operator==="++"?n+1:n-1)}else if(X(r)){if(x(a)===!1)throw new d(t,c.KeyAccessorMustBeString,e);if(r.hasField(a)!==!0)throw new d(t,c.FieldNotFound,e);n=p(r.field(a)),r.setField(a,e.operator==="++"?n+1:n-1)}else{if($(r))throw new d(t,c.Immutable,e);if(!(r instanceof vt))throw new d(t,c.InvalidParameter,e);if(x(a)===!1)throw new d(t,c.ModuleAccessorMustBeString,e);if(r.hasGlobal(a)!==!0)throw new d(t,c.ModuleExportNotFound,e);n=p(r.global(a)),r.setGlobal(a,e.operator==="++"?n+1:n-1)}return e.prefix===!1?n:e.operator==="++"?n+1:n-1}if(r=e.argument.type==="Identifier"?e.argument.name.toLowerCase():"",!r)throw new d(t,c.InvalidIdentifier,e);if(t.localScope!=null&&t.localScope[r]!==void 0)return n=p(t.localScope[r].value),t.localScope[r]={value:e.operator==="++"?n+1:n-1,valueset:!0,node:e},e.prefix===!1?n:e.operator==="++"?n+1:n-1;if(t.globalScope[r]!==void 0)return n=p(t.globalScope[r].value),t.globalScope[r]={value:e.operator==="++"?n+1:n-1,valueset:!0,node:e},e.prefix===!1?n:e.operator==="++"?n+1:n-1;throw new d(t,c.InvalidIdentifier,e)}function ze(t,e,n,r,a){switch(e){case"=":return t===C?null:t;case"/=":return p(n)/p(t);case"*=":return p(n)*p(t);case"-=":return p(n)-p(t);case"+=":return x(n)||x(t)?F(n)+F(t):p(n)+p(t);case"%=":return p(n)%p(t);default:throw new d(a,c.UnsupportedOperator,r)}}function cu(t,e){let n=null,r="";if(e.left.type==="MemberExpression"){if(n=I(t,e.left.object),e.left.computed===!0)r=I(t,e.left.property);else{if(e.left.property.type!=="Identifier")throw new d(t,c.InvalidIdentifier,e);r=e.left.property.name}const o=I(t,e.right);if(T(n)){if(!L(r))throw new d(t,c.ArrayAccessorMustBeNumber,e);if(r<0&&(r=n.length+r),r<0||r>n.length)throw new d(t,c.OutOfBounds,e);if(r===n.length){if(e.operator!=="=")throw new d(t,c.OutOfBounds,e);n[r]=ze(o,e.operator,n[r],e,t)}else n[r]=ze(o,e.operator,n[r],e,t)}else if(n instanceof B){if(x(r)===!1)throw new d(t,c.KeyAccessorMustBeString,e);if(n.hasField(r)===!0)n.setField(r,ze(o,e.operator,n.field(r),e,t));else{if(e.operator!=="=")throw new d(t,c.FieldNotFound,e,{key:r});n.setField(r,ze(o,e.operator,null,e,t))}}else if(X(n)){if(x(r)===!1)throw new d(t,c.KeyAccessorMustBeString,e);if(n.hasField(r)===!0)n.setField(r,ze(o,e.operator,n.field(r),e,t));else{if(e.operator!=="=")throw new d(t,c.FieldNotFound,e,{key:r});n.setField(r,ze(o,e.operator,null,e,t))}}else{if($(n))throw new d(t,c.Immutable,e);if(!(n instanceof vt))throw new d(t,c.InvalidIdentifier,e);if(x(r)===!1)throw new d(t,c.ModuleAccessorMustBeString,e);if(n.hasGlobal(r)!==!0)throw new d(t,c.ModuleExportNotFound,e);n.setGlobal(r,ze(o,e.operator,n.global(r),e,t))}return C}n=e.left.name.toLowerCase();const a=I(t,e.right);if(t.localScope!=null&&t.localScope[n]!==void 0)return t.localScope[n]={value:ze(a,e.operator,t.localScope[n].value,e,t),valueset:!0,node:e.right},C;if(t.globalScope[n]!==void 0)return t.globalScope[n]={value:ze(a,e.operator,t.globalScope[n].value,e,t),valueset:!0,node:e.right},C;throw new d(t,c.InvalidIdentifier,e)}function hu(t,e){if(e.expression.type==="AssignmentExpression"||e.expression.type==="UpdateExpression")return I(t,e.expression);if(e.expression.type==="CallExpression"){const n=I(t,e.expression);return n===C?C:new xt(n)}{const n=I(t,e.expression);return n===C?C:new xt(n)}}function du(t,e){const n=I(t,e.test);if(n===!0)return I(t,e.consequent);if(n===!1)return e.alternate!==null?I(t,e.alternate):C;throw new d(t,c.BooleanConditionRequired,e)}function fu(t,e){let n=C;for(let r=0;r=n.length||r<0)throw new d(t,c.OutOfBounds,e);return n[r]}throw new d(t,c.InvalidMemberAccessKey,e)}if(x(n)){if(L(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new d(t,c.OutOfBounds,e);return n[r]}throw new d(t,c.InvalidMemberAccessKey,e)}if($(n)){if(L(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length()+r),r>=n.length()||r<0)throw new d(t,c.OutOfBounds,e);return n.get(r)}throw new d(t,c.InvalidMemberAccessKey,e)}throw new d(t,c.InvalidMemberAccessKey,e)}}catch(n){throw n}}function Fu(t,e){try{const n=I(t,e.argument);if(J(n)){if(e.operator==="!")return!n;if(e.operator==="-")return-1*p(n);if(e.operator==="+")return 1*p(n);if(e.operator==="~")return~p(n);throw new d(t,c.UnsupportedUnaryOperator,e)}if(e.operator==="~")return~p(n);if(e.operator==="-")return-1*p(n);if(e.operator==="+")return 1*p(n);throw new d(t,c.UnsupportedUnaryOperator,e)}catch(n){throw n}}function Cu(t,e){try{const n=[];for(let r=0;r>":case">>>":case"^":case"&":return gr(p(r),p(a),e.operator);case"==":return ke(r,a);case"!=":return!ke(r,a);case"<":case">":case"<=":case">=":return Dr(r,a,e.operator);case"+":return x(r)||x(a)?F(r)+F(a):p(r)+p(a);case"-":return p(r)-p(a);case"*":return p(r)*p(a);case"/":return p(r)/p(a);case"%":return p(r)%p(a);default:throw new d(t,c.UnsupportedOperator,e)}}catch(n){throw n}}function Eu(t,e){try{const n=I(t,e.left);if(J(n))switch(e.operator){case"||":if(n===!0)return n;{const r=I(t,e.right);if(J(r))return r;throw new d(t,c.LogicExpressionOrAnd,e)}case"&&":if(n===!1)return n;{const r=I(t,e.right);if(J(r))return r;throw new d(t,c.LogicExpressionOrAnd,e)}default:throw new d(t,c.LogicExpressionOrAnd,e)}throw new d(t,c.LogicalExpressionOnlyBoolean,e)}catch(n){throw n}}function bu(t,e){return e.value?e.value.cooked:""}function vu(t,e,n){if(Q(t))throw new d(e,c.NoFunctionInTemplateLiteral,n);return t}function Su(t,e){let n="",r=0;for(const a of e.quasis)n+=a.value?a.value.cooked:"",a.tail===!1&&(n+=e.expressions[r]?F(vu(I(t,e.expressions[r]),t,e)):"",r++);return n}function ma(t,e){let n;try{const r=e.name.toLowerCase();if(t.localScope!=null&&t.localScope[r]!==void 0)return n=t.localScope[r],n.valueset===!0||(n.value=I(t,n.node),n.valueset=!0),n.value;if(t.globalScope[r]!==void 0)return n=t.globalScope[r],n.valueset===!0||(n.value=I(t,n.node),n.valueset=!0),n.value;throw new d(t,c.InvalidIdentifier,e)}catch(r){throw r}}function Iu(t,e){try{if(e.callee.type==="MemberExpression"){const n=I(t,e.callee.object);if(!(n instanceof vt))throw new d(t,c.FunctionNotFound,e);const r=e.callee.computed===!1?e.callee.property.name:I(t,e.callee.property);if(!n.hasGlobal(r))throw new d(t,c.FunctionNotFound,e);const a=n.global(r);if(!Q(a))throw new d(t,c.CallNonFunction,e);return a.call(t,e)}if(e.callee.type!=="Identifier")throw new d(t,c.FunctionNotFound,e);if(t.localScope!=null&&t.localScope[e.callee.name.toLowerCase()]!==void 0){const n=t.localScope[e.callee.name.toLowerCase()];if(Q(n.value))return n.value.call(t,e);throw new d(t,c.CallNonFunction,e)}if(t.globalScope[e.callee.name.toLowerCase()]!==void 0){const n=t.globalScope[e.callee.name.toLowerCase()];if(Q(n.value))return n.value.call(t,e);throw new d(t,c.CallNonFunction,e)}throw new d(t,c.FunctionNotFound,e)}catch(n){throw n}}const de={};function Da(t,e,n,r){try{const a=e.arguments,o=I(t,a[n]);if(ke(o,r))return I(t,a[n+1]);{const s=a.length-n;return s===1?I(t,a[n]):s===2?null:s===3?I(t,a[n+2]):Da(t,e,n+2,r)}}catch(a){throw a}}function ga(t,e,n,r){try{const a=e.arguments;if(r===!0)return I(t,a[n+1]);if(a.length-n===3)return I(t,a[n+2]);{const o=I(t,a[n+2]);if(J(o)===!1)throw new d(t,c.BooleanConditionRequired,a[n+2]);return ga(t,e,n+2,o)}}catch(a){throw a}}function On(t,e,n,r){try{const a=t.body;if(n.length!==t.params.length)throw new d(e,c.WrongNumberOfParameters,r);if(e.localScope!=null)for(let s=0;simport("./geometryEngine-D2dsojOY.js"),__vite__mapDeps([10,11,12,13,1,2]));return Ca=!0,Ps(t),!0}let Un=null;function vr(){return Un!==null||(Un=va()),Un}async function va(){await Lo(),_e=await je(()=>import("./arcadeAsyncRuntime-C0WqkpWA.js"),__vite__mapDeps([14,0,1,2,3,4,5,6,7,8,9]));for(const t of sr)_e.extend(t),ct(t,"async");return sr=null,!0}function Sa(){return Fa}function Ia(){return!!_e}function ka(){return Ca}let zn=null;function Sr(){return zn||(zn=Ta(),zn)}async function Ta(){await vr();const[t,e,n,r,a,o]=await Promise.all([je(()=>import("./featureSetUtils-sHviL1hk.js").then(s=>s.g),__vite__mapDeps([15,1,2,16,3,17,5,18,19,20,21,22,23,24,25,26,8,9,27,7,28])),je(()=>import("./featuresetbase-OZ_O-s69.js"),__vite__mapDeps([29,3,1,2,15,16,17,5,18,19,20,21,22,23,24,25,26,8,9,27,7,28,4,6])),je(()=>import("./featuresetgeom-CAjQZ5tM.js"),__vite__mapDeps([30,3,1,2,17,16,5,6,7,8,9])),je(()=>import("./featuresetstats-ByHC7qtP.js"),__vite__mapDeps([31,3,1,2,16,6,7,8,9])),je(()=>import("./featuresetstring-QnWvSAV8.js"),__vite__mapDeps([32,1,2,3,6,7,8,9])),je(()=>import("./knowledgegraph-ptgt6-e4.js"),__vite__mapDeps([33,1,2,4,20,24,34,3,6,7,8,9]))]);return $a=t,_e.extend([e,n,r,a,o]),ct([e,n,r,a,o],"async"),Fa=!0,!0}function Ba(t,e=[]){return t.usesFeatureSet===void 0&&Yt(t,e),t.usesFeatureSet===!0}function $u(t,e=[]){return t.isAsync===void 0&&Yt(t,e),t.isAsync===!0}function Ru(t,e){if(e){for(const n of e)if(An(t,n))return!0;return!1}return!1}async function Na(t,e,n=[],r=!1,a=null){return Ir(new Set,t,e,n,r,a)}async function Ir(t,e,n,r=[],a=!1,o=null){const s=typeof e=="string"?Ar(e):e,i=[];return s&&(ka()===!1&&(En(s)||a)&&i.push(br()),Ia()===!1&&(s.isAsync===!0||n)&&i.push(vr()),Sa()===!1&&(Ba(s)||Ru(s,r))&&i.push(Sr())),i.length&&await Promise.all(i),await Ma(t,s,o,n,a),!0}function Pu(t,e=[]){return t.usesModules===void 0&&Yt(t,e),t.usesModules===!0}async function Ma(t,e,n=null,r=!1,a=!1){const o=Zi(e);n===null&&o.length>0&&(n=ge.getDefault()),e.loadedModules={};for(const s of o){gi(n);const i=n.normalizeModuleUri(s.source);if(t.has(i.uri))throw new d(null,c.CircularModules,null);t.add(i.uri);const u=await n.fetchModule(i);await Ir(t,u,r,[],a,n),t.delete(i.uri),u.isAsync&&(e.isAsync=!0),u.usesFeatureSet&&(e.usesFeatureSet=!0),u.usesGeometry&&(e.usesGeometry=!0),e.loadedModules[s.libname]={uri:i.uri,script:u}}}function _a(t){if(En(t))return!0;const e=Hn(t);let n=!1;for(let r=0;r{di.test(s)&&(s=s.replace(di,""),a.push(s))});const o=a.filter(s=>s.includes("*"));return a=a.filter(s=>!o.includes(s)),e&&o.forEach(s=>{const i=new RegExp(`^${s.split(/\*+/).map(Uu).join(".*")}$`,"i");e.forEach(u=>i.test(u)?a.push(u):null)}),[...new Set(a.sort())]}function Ku(t){return An(t,"$view")}function Yu(t,e){return!!t&&An(t,e)}function Xu(t){if(!(!t||t.spatialReference==null&&(t.scale==null||t.viewingMode==null)))return{view:t.viewingMode&&t.scale!=null?new B({viewingMode:t.viewingMode,scale:t.scale}):null,sr:t.spatialReference}}function Qu({url:t,spatialReference:e,lrucache:n,interceptor:r}){const a=bn();return a?a.createFeatureSetCollectionFromService(t,e,n,r):null}function el({layer:t,spatialReference:e,outFields:n,returnGeometry:r,lrucache:a,interceptor:o}){if(t===null)return null;const s=bn();return s?s.constructFeatureSet(t,e,n,r??!0,a,o):null}function tl(t){if((t==null?void 0:t.map)===null)return null;const e=bn();return e?e.createFeatureSetCollectionFromMap(t.map,t.spatialReference,t.lrucache,t.interceptor):null}function nl(t,e){return B.convertJsonToArcade(t,e)}function rl(t,e,n=[]){return Na(t,e,n)}function il(){return br()}function al(){return Sr()}function sl(t){return t.type==="simple"||t.type==="class-breaks"||t.type==="unique-value"||t.type==="dot-density"||t.type==="dictionary"||t.type==="pie-chart"}function ol(t){return t.declaredClass==="esri.layers.support.LabelClass"}function ul(t){return t.declaredClass==="esri.PopupTemplate"}function Ra(t,e){var r,a;if(!t)return!1;if(typeof t=="string")return e(t);const n=t;if(sl(n)){if(n.type==="dot-density"){const i=(r=n.attributes)==null?void 0:r.some(u=>e(u.valueExpression));if(i)return i}const o=n.visualVariables,s=!!o&&o.some(i=>{let u=e(i.valueExpression);return i.type==="size"&&(fi(i.minSize)&&(u=u||e(i.minSize.valueExpression)),fi(i.maxSize)&&(u=u||e(i.maxSize.valueExpression))),u});return!(!("valueExpression"in n)||!e(n.valueExpression))||s}if(ol(n)){const o=(a=n.labelExpressionInfo)==null?void 0:a.expression;return!(!o||!e(o))||!1}return!!ul(n)&&(!!n.expressionInfos&&n.expressionInfos.some(o=>e(o.expression))||Array.isArray(n.content)&&n.content.some(o=>{var s;return o.type==="expression"&&e((s=o.expressionInfo)==null?void 0:s.expression)}))}function ll(t){const e=Xt(t);return!!e&&_a(e)}function cl(t){return Ra(t,ll)}function hl(t){const e=Xt(t);return!!e&&En(e)}function dl(t){return Ra(t,hl)}function fi(t){return t&&t.declaredClass==="esri.renderers.visualVariables.SizeVariable"}const Kl=Object.freeze(Object.defineProperty({__proto__:null,Dictionary:B,arcade:Ou,arcadeFeature:ee,convertFeatureLayerToFeatureSet:el,convertJsonToArcade:nl,convertMapToFeatureSetCollection:tl,convertServiceUrlToWorkspace:Qu,createExecContext:Gu,createFeature:ju,createFunction:Zu,createSyntaxTree:Xt,dependsOnView:Ku,enableFeatureSetOperations:al,enableGeometryOperations:il,evalSyntaxTree:Vu,executeAsyncFunction:Hu,executeFunction:qu,extractFieldNames:Wu,getArcadeType:zu,getViewInfo:Xu,hasGeometryFunctions:cl,hasGeometryOperations:dl,hasVariable:Yu,loadScriptDependencies:rl,updateExecContext:Ju},Symbol.toStringTag,{value:"Module"}));export{Ze as $,M as A,Tt as B,Gi as C,ee as D,L as E,Ft as F,x as G,X as H,Yn as I,kt as J,ce as K,Hi as L,Qi as M,B as N,C as O,R as P,$ as Q,Me as R,Xa as S,tt as T,T as U,El as V,Wt as W,H as X,aa as Y,ne as Z,Q as _,D as a,kn as a0,Z as a1,Mi as a2,wn as a3,rn as a4,_i as a5,Ti as a6,$i as a7,Bi as a8,Ae as a9,Nr as aA,Bl as aB,Ml as aC,Ha as aD,$r as aE,Nl as aF,Qa as aG,_l as aH,Pl as aI,Rl as aJ,Us as aK,Wa as aL,Ni as aM,Ol as aN,Kl as aO,Ri as aa,Rr as ab,Vn as ac,Ye as ad,nn as ae,Ds as af,gs as ag,Bs as ah,Rs as ai,Ns as aj,Bt as ak,we as al,fr as am,gn as an,Ht as ao,un as ap,Br as aq,Mr as ar,Sl as as,kl as at,_r as au,Il as av,vl as aw,bl as ax,Tl as ay,$l as az,d as b,xe as c,Wn as d,lt as e,ta as f,p as g,At as h,Dr as i,ke as j,gr as k,ut as l,F as m,qe as n,qn as o,wr as p,wt as q,c as r,Dn as s,qt as t,Va as u,G as v,P as w,xt as x,ue as y,J as z}; diff --git a/build/assets/arcgis-knowledge-client-core-DBXFIJfG.js b/build/assets/arcgis-knowledge-client-core-DBXFIJfG.js new file mode 100644 index 0000000..c5734f3 --- /dev/null +++ b/build/assets/arcgis-knowledge-client-core-DBXFIJfG.js @@ -0,0 +1,3 @@ +import{o as Xr,e as Me}from"./_commonjsHelpers-DCkdB7M8.js";var Pr,Ue,$r,kr={exports:{}};Pr=kr,Ue=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,$r=function(z){var c,Ie,te;z=z||{},c||(c=z!==void 0?z:{}),c.ready=new Promise(function(e,r){Ie=e,te=r});var Re=Object.assign({},c),xe="./this.program",D="";typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),Ue&&(D=Ue),D=D.indexOf("blob:")!==0?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"";var q,Wr=c.print||console.log.bind(console),H=c.printErr||console.warn.bind(console);Object.assign(c,Re),Re=null,c.thisProgram&&(xe=c.thisProgram),c.wasmBinary&&(q=c.wasmBinary),c.noExitRuntime,typeof WebAssembly!="object"&&G("no native wasm support detected");var Ae,Te,j,_,I,N,w,y,Ye,He,Ve,Be,ze=!1,qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ae(e,r,n){var t=r+n;for(n=r;e[n]&&!(n>=t);)++n;if(16(a=(240&a)==224?(15&a)<<12|o<<6|f:(7&a)<<18|o<<12|f<<6|63&e[r++])?t+=String.fromCharCode(a):(a-=65536,t+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else t+=String.fromCharCode(a)}return t}function Ne(e,r,n,t){if(0=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(n>=t)break;r[n++]=o}else{if(2047>=o){if(n+1>=t)break;r[n++]=192|o>>6}else{if(65535>=o){if(n+2>=t)break;r[n++]=224|o>>12}else{if(n+3>=t)break;r[n++]=240|o>>18,r[n++]=128|o>>12&63}r[n++]=128|o>>6&63}r[n++]=128|63&o}}r[n]=0}}function Le(e){for(var r=0,n=0;n=t?r++:2047>=t?r+=2:55296<=t&&57343>=t?(r+=4,++n):r+=3}return r}function Ge(){var e=Ae.buffer;Te=e,c.HEAP8=j=new Int8Array(e),c.HEAP16=I=new Int16Array(e),c.HEAP32=w=new Int32Array(e),c.HEAPU8=_=new Uint8Array(e),c.HEAPU16=N=new Uint16Array(e),c.HEAPU32=y=new Uint32Array(e),c.HEAPF32=Ye=new Float32Array(e),c.HEAPF64=Be=new Float64Array(e),c.HEAP64=He=new BigInt64Array(e),c.HEAPU64=Ve=new BigUint64Array(e)}var Je,Ze=[],Xe=[],Ke=[];function Er(){var e=c.preRun.shift();Ze.unshift(e)}var S,R=0,L=null;function G(e){throw c.onAbort&&c.onAbort(e),H(e="Aborted("+e+")"),ze=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),te(e),e}function Qe(){return S.startsWith("data:application/octet-stream;base64,")}if(S="arcgis-knowledge-client-core.wasm",!Qe()){var er=S;S=c.locateFile?c.locateFile(er,D):D+er}function rr(){var e=S;try{if(e==S&&q)return new Uint8Array(q);throw"both async and sync fetching of the wasm failed"}catch(r){G(r)}}function Or(){return q||typeof fetch!="function"?Promise.resolve().then(function(){return rr()}):fetch(S,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()}).catch(function(){return rr()})}function _e(e){for(;0>2]=r},this.Ua=function(r){y[this.ga+8>>2]=r},this.Va=function(){w[this.ga>>2]=0},this.Oa=function(){j[this.ga+12|0]=0},this.Ya=function(){j[this.ga+13|0]=0},this.La=function(r,n){this.Ma(),this.Za(r),this.Ua(n),this.Va(),this.Oa(),this.Ya()},this.Ma=function(){y[this.ga+16>>2]=0}}var oe={};function ie(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function J(e){return this.fromWireType(w[e>>2])}var V={},x={},ue={};function nr(e){if(e===void 0)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=r&&57>=r?"_"+e:e}function Ce(e,r){return e=nr(e),function(){return r.apply(this,arguments)}}function Pe(e){var r=Error,n=Ce(e,function(t){this.name=e,this.message=t,(t=Error(t).stack)!==void 0&&(this.stack=this.toString()+` +`+t.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var tr=void 0;function ce(e){throw new tr(e)}function $(e,r,n){function t(u){(u=n(u)).length!==e.length&&ce("Mismatched type converter count");for(var l=0;l{x.hasOwnProperty(u)?a[l]=x[u]:(o.push(u),V.hasOwnProperty(u)||(V[u]=[]),V[u].push(()=>{a[l]=x[u],++f===o.length&&t(a)}))}),o.length===0&&t(a)}function Z(e){if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e}var ar=void 0;function b(e){for(var r="";_[e];)r+=ar[_[e++]];return r}var B=void 0;function m(e){throw new B(e)}function W(e,r,n={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var t=r.name;if(e||m('type "'+t+'" must have a positive integer typeid pointer'),x.hasOwnProperty(e)){if(n.Wa)return;m("Cannot register type '"+t+"' twice")}x[e]=r,delete ue[e],V.hasOwnProperty(e)&&(r=V[e],delete V[e],r.forEach(a=>a()))}function or(e,r,n){switch(r){case 0:return n?function(t){return j[t]}:function(t){return _[t]};case 1:return n?function(t){return I[t>>1]}:function(t){return N[t>>1]};case 2:return n?function(t){return w[t>>2]}:function(t){return y[t>>2]};case 3:return n?function(t){return He[t>>3]}:function(t){return Ve[t>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function X(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function $e(e){m(e.ea.ha.fa.name+" instance already deleted")}var ke=!1;function ir(){}function ur(e){--e.count.value,e.count.value===0&&(e.ja?e.la.oa(e.ja):e.ha.fa.oa(e.ga))}function cr(e,r,n){return r===n?e:n.ma===void 0||(e=cr(e,r,n.ma))===null?null:n.Ka(e)}var fr={},K=[];function We(){for(;K.length;){var e=K.pop();e.ea.ua=!1,e.delete()}}var Q=void 0,ee={};function Sr(e,r){for(r===void 0&&m("ptr should not be undefined");e.ma;)r=e.wa(r),e=e.ma;return ee[r]}function fe(e,r){return r.ha&&r.ga||ce("makeClassHandle requires ptr and ptrType"),!!r.la!=!!r.ja&&ce("Both smartPtrType and smartPtr must be specified"),r.count={value:1},se(Object.create(e,{ea:{value:r}}))}function se(e){return typeof FinalizationRegistry>"u"?(se=r=>r,e):(ke=new FinalizationRegistry(r=>{ur(r.ea)}),ir=r=>{ke.unregister(r)},(se=r=>{var n=r.ea;return n.ja&&ke.register(r,{ea:n},r),r})(e))}function M(){}function Ee(e,r,n){if(e[r].ia===void 0){var t=e[r];e[r]=function(){return e[r].ia.hasOwnProperty(arguments.length)||m("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].ia+")!"),e[r].ia[arguments.length].apply(this,arguments)},e[r].ia=[],e[r].ia[t.ta]=t}}function Oe(e,r,n){c.hasOwnProperty(e)?((n===void 0||c[e].ia!==void 0&&c[e].ia[n]!==void 0)&&m("Cannot register public name '"+e+"' twice"),Ee(c,e,e),c.hasOwnProperty(n)&&m("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),c[e].ia[n]=r):(c[e]=r,n!==void 0&&(c[e].lb=n))}function Fr(e,r,n,t,a,o,f,u){this.name=e,this.constructor=r,this.pa=n,this.oa=t,this.ma=a,this.Pa=o,this.wa=f,this.Ka=u,this.ab=[]}function le(e,r,n){for(;r!==n;)r.wa||m("Expected null or instance of "+n.name+", got an instance of "+r.name),e=r.wa(e),r=r.ma;return e}function Dr(e,r){return r===null?(this.Ba&&m("null is not a valid "+this.name),0):(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),le(r.ea.ga,r.ea.ha.fa,this.fa))}function Mr(e,r){if(r===null){if(this.Ba&&m("null is not a valid "+this.name),this.ya){var n=this.Ca();return e!==null&&e.push(this.oa,n),n}return 0}if(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),!this.xa&&r.ea.ha.xa&&m("Cannot convert argument of type "+(r.ea.la?r.ea.la.name:r.ea.ha.name)+" to parameter type "+this.name),n=le(r.ea.ga,r.ea.ha.fa,this.fa),this.ya)switch(r.ea.ja===void 0&&m("Passing raw pointer to smart pointer is illegal"),this.gb){case 0:r.ea.la===this?n=r.ea.ja:m("Cannot convert argument of type "+(r.ea.la?r.ea.la.name:r.ea.ha.name)+" to parameter type "+this.name);break;case 1:n=r.ea.ja;break;case 2:if(r.ea.la===this)n=r.ea.ja;else{var t=r.clone();n=this.bb(n,k(function(){t.delete()})),e!==null&&e.push(this.oa,n)}break;default:m("Unsupporting sharing policy")}return n}function Ur(e,r){return r===null?(this.Ba&&m("null is not a valid "+this.name),0):(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),r.ea.ha.xa&&m("Cannot convert argument of type "+r.ea.ha.name+" to parameter type "+this.name),le(r.ea.ga,r.ea.ha.fa,this.fa))}function O(e,r,n,t,a,o,f,u,l,s,h){this.name=e,this.fa=r,this.Ba=n,this.xa=t,this.ya=a,this.$a=o,this.gb=f,this.Ha=u,this.Ca=l,this.bb=s,this.oa=h,a||r.ma!==void 0?this.toWireType=Mr:(this.toWireType=t?Dr:Ur,this.ka=null)}function sr(e,r,n){c.hasOwnProperty(e)||ce("Replacing nonexistant public symbol"),c[e].ia!==void 0&&n!==void 0?c[e].ia[n]=r:(c[e]=r,c[e].ta=n)}var he=[];function T(e,r){e=b(e);var n=he[r];return n||(r>=he.length&&(he.length=r+1),he[r]=n=Je.get(r)),typeof n!="function"&&m("unknown function pointer with signature "+e+": "+r),n}var lr=void 0;function hr(e){var r=b(e=Tr(e));return F(e),r}function Y(e,r){function n(o){a[o]||x[o]||(ue[o]?ue[o].forEach(n):(t.push(o),a[o]=!0))}var t=[],a={};throw r.forEach(n),new lr(e+": "+t.map(hr).join([", "]))}function pe(e,r,n,t,a){var o=r.length;2>o&&m("argTypes array size mismatch! Must at least get return value and 'this' types!");var f=r[1]!==null&&n!==null,u=!1;for(n=1;n>2]);return n}function pr(e,r,n){return e instanceof Object||m(n+' with invalid "this": '+e),e instanceof r.fa.constructor||m(n+' incompatible with "this" of type '+e.constructor.name),e.ea.ga||m("cannot call emscripten binding method "+n+" on deleted object"),le(e.ea.ga,e.ea.ha.fa,r.fa)}var je=[],E=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Se(e){4(e||m("Cannot use deleted val. handle = "+e),E[e].value),k=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=je.length?je.pop():E.length;return E[r]={Da:1,value:e},r}};function Ir(e,r,n){switch(r){case 0:return function(t){return this.fromWireType((n?j:_)[t])};case 1:return function(t){return this.fromWireType((n?I:N)[t>>1])};case 2:return function(t){return this.fromWireType((n?w:y)[t>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function re(e,r){var n=x[e];return n===void 0&&m(r+" has unknown type "+hr(e)),n}function Rr(e,r){switch(r){case 2:return function(n){return this.fromWireType(Ye[n>>2])};case 3:return function(n){return this.fromWireType(Be[n>>3])};default:throw new TypeError("Unknown float type: "+e)}}var vr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function xr(e,r){for(var n=e>>1,t=n+r/2;!(n>=t)&&N[n];)++n;if(32<(n<<=1)-e&&vr)return vr.decode(_.subarray(e,n));for(n="",t=0;!(t>=r/2);++t){var a=I[e+2*t>>1];if(a==0)break;n+=String.fromCharCode(a)}return n}function Yr(e,r,n){if(n===void 0&&(n=2147483647),2>n)return 0;var t=r;n=(n-=2)<2*e.length?n/2:e.length;for(var a=0;a>1]=e.charCodeAt(a),r+=2;return I[r>>1]=0,r-t}function Hr(e){return 2*e.length}function Vr(e,r){for(var n=0,t="";!(n>=r/4);){var a=w[e+4*n>>2];if(a==0)break;++n,65536<=a?(a-=65536,t+=String.fromCharCode(55296|a>>10,56320|1023&a)):t+=String.fromCharCode(a)}return t}function Br(e,r,n){if(n===void 0&&(n=2147483647),4>n)return 0;var t=r;n=t+n-4;for(var a=0;a=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),w[r>>2]=o,(r+=4)+4>n)break}return w[r>>2]=0,r-t}function zr(e){for(var r=0,n=0;n=t&&++n,r+=4}return r}function dr(e,r){for(var n=Array(e),t=0;t>2],"parameter "+t);return n}var qr={};function de(e){var r=qr[e];return r===void 0?b(e):r}var ge=[];function gr(){function e(r){r.$$$embind_global$$$=r;var n=typeof $$$embind_global$$$=="object"&&r.$$$embind_global$$$==r;return n||delete r.$$$embind_global$$$,n}if(typeof globalThis=="object")return globalThis;if(typeof $$$embind_global$$$=="object"||(typeof Me=="object"&&e(Me)?$$$embind_global$$$=Me:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")}function Nr(e){var r=ge.length;return ge.push(e),r}var mr=[],Fe={};function yr(){if(!De){var e,r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe||"./this.program"};for(e in Fe)Fe[e]===void 0?delete r[e]:r[e]=Fe[e];var n=[];for(e in r)n.push(e+"="+r[e]);De=n}return De}var De,Lr=[null,[],[]];function me(e){return e%4==0&&(e%100!=0||e%400==0)}var br=[31,29,31,30,31,30,31,31,30,31,30,31],wr=[31,28,31,30,31,30,31,31,30,31,30,31];function Gr(e){var r=Array(Le(e)+1);return Ne(e,r,0,r.length),r}function Jr(e,r,n,t){function a(i,p,g){for(i=typeof i=="number"?i.toString():i||"";i.lengthP?-1:0A-i.getDate())){i.setDate(i.getDate()+p);break}p-=A-i.getDate()+1,i.setDate(1),11>g?i.setMonth(g+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return g=new Date(i.getFullYear()+1,0,4),p=u(new Date(i.getFullYear(),0,4)),g=u(g),0>=f(p,i)?0>=f(g,i)?i.getFullYear()+1:i.getFullYear():i.getFullYear()-1}var s=w[t+40>>2];for(var h in t={jb:w[t>>2],ib:w[t+4>>2],za:w[t+8>>2],Ea:w[t+12>>2],Aa:w[t+16>>2],sa:w[t+20>>2],na:w[t+24>>2],ra:w[t+28>>2],mb:w[t+32>>2],hb:w[t+36>>2],kb:s&&s?ae(_,s):""},n=n?ae(_,n):"",s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(h,"g"),s[h]);var v="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(h in s={"%a":function(i){return v[i.na].substring(0,3)},"%A":function(i){return v[i.na]},"%b":function(i){return d[i.Aa].substring(0,3)},"%B":function(i){return d[i.Aa]},"%C":function(i){return o((i.sa+1900)/100|0,2)},"%d":function(i){return o(i.Ea,2)},"%e":function(i){return a(i.Ea,2," ")},"%g":function(i){return l(i).toString().substring(2)},"%G":function(i){return l(i)},"%H":function(i){return o(i.za,2)},"%I":function(i){return(i=i.za)==0?i=12:12i.za?"AM":"PM"},"%S":function(i){return o(i.jb,2)},"%t":function(){return" "},"%u":function(i){return i.na||7},"%U":function(i){return o(Math.floor((i.ra+7-i.na)/7),2)},"%V":function(i){var p=Math.floor((i.ra+7-(i.na+6)%7)/7);if(2>=(i.na+371-i.ra-2)%7&&p++,p)p==53&&((g=(i.na+371-i.ra)%7)==4||g==3&&me(i.sa)||(p=1));else{p=52;var g=(i.na+7-i.ra-1)%7;(g==4||g==5&&me(i.sa%400-1))&&p++}return o(p,2)},"%w":function(i){return i.na},"%W":function(i){return o(Math.floor((i.ra+7-(i.na+6)%7)/7),2)},"%y":function(i){return(i.sa+1900).toString().substring(2)},"%Y":function(i){return i.sa+1900},"%z":function(i){var p=0<=(i=i.hb);return i=Math.abs(i)/60,(p?"+":"-")+("0000"+(i/60*100+i%60)).slice(-4)},"%Z":function(i){return i.kb},"%%":function(){return"%"}},n=n.replace(/%%/g,"\0\0"),s)n.includes(h)&&(n=n.replace(new RegExp(h,"g"),s[h](t)));return(h=Gr(n=n.replace(/\0\0/g,"%"))).length>r?0:(j.set(h,e),h.length-1)}tr=c.InternalError=Pe("InternalError");for(var Ar=Array(256),ye=0;256>ye;++ye)Ar[ye]=String.fromCharCode(ye);ar=Ar,B=c.BindingError=Pe("BindingError"),M.prototype.isAliasOf=function(e){if(!(this instanceof M&&e instanceof M))return!1;var r=this.ea.ha.fa,n=this.ea.ga,t=e.ea.ha.fa;for(e=e.ea.ga;r.ma;)n=r.wa(n),r=r.ma;for(;t.ma;)e=t.wa(e),t=t.ma;return r===t&&n===e},M.prototype.clone=function(){if(this.ea.ga||$e(this),this.ea.va)return this.ea.count.value+=1,this;var e=se,r=Object,n=r.create,t=Object.getPrototypeOf(this),a=this.ea;return(e=e(n.call(r,t,{ea:{value:{count:a.count,ua:a.ua,va:a.va,ga:a.ga,ha:a.ha,ja:a.ja,la:a.la}}}))).ea.count.value+=1,e.ea.ua=!1,e},M.prototype.delete=function(){this.ea.ga||$e(this),this.ea.ua&&!this.ea.va&&m("Object already scheduled for deletion"),ir(this),ur(this.ea),this.ea.va||(this.ea.ja=void 0,this.ea.ga=void 0)},M.prototype.isDeleted=function(){return!this.ea.ga},M.prototype.deleteLater=function(){return this.ea.ga||$e(this),this.ea.ua&&!this.ea.va&&m("Object already scheduled for deletion"),K.push(this),K.length===1&&Q&&Q(We),this.ea.ua=!0,this},c.getInheritedInstanceCount=function(){return Object.keys(ee).length},c.getLiveInheritedInstances=function(){var e,r=[];for(e in ee)ee.hasOwnProperty(e)&&r.push(ee[e]);return r},c.flushPendingDeletes=We,c.setDelayFunction=function(e){Q=e,K.length&&Q&&Q(We)},O.prototype.Qa=function(e){return this.Ha&&(e=this.Ha(e)),e},O.prototype.Fa=function(e){this.oa&&this.oa(e)},O.prototype.argPackAdvance=8,O.prototype.readValueFromPointer=J,O.prototype.deleteObject=function(e){e!==null&&e.delete()},O.prototype.fromWireType=function(e){function r(){return this.ya?fe(this.fa.pa,{ha:this.$a,ga:n,la:this,ja:e}):fe(this.fa.pa,{ha:this,ga:e})}var n=this.Qa(e);if(!n)return this.Fa(e),null;var t=Sr(this.fa,n);if(t!==void 0)return t.ea.count.value===0?(t.ea.ga=n,t.ea.ja=e,t.clone()):(t=t.clone(),this.Fa(e),t);if(t=this.fa.Pa(n),!(t=fr[t]))return r.call(this);t=this.xa?t.Ia:t.pointerType;var a=cr(n,this.fa,t.fa);return a===null?r.call(this):this.ya?fe(t.fa.pa,{ha:t,ga:a,la:this,ja:e}):fe(t.fa.pa,{ha:t,ga:a})},lr=c.UnboundTypeError=Pe("UnboundTypeError"),c.count_emval_handles=function(){for(var e=0,r=5;ro.Ta).concat(a.map(o=>o.eb)),o=>{var f={};return a.forEach((u,l)=>{var s=o[l],h=u.Ra,v=u.Sa,d=o[l+a.length],i=u.cb,p=u.fb;f[u.Na]={read:g=>s.fromWireType(h(v,g)),write:(g,A)=>{var P=[];i(p,g,d.toWireType(P,A)),ie(P)}}}),[{name:r.name,fromWireType:function(u){var l,s={};for(l in f)s[l]=f[l].read(u);return t(u),s},toWireType:function(u,l){for(var s in f)if(!(s in l))throw new TypeError('Missing field: "'+s+'"');var h=n();for(s in f)f[s].write(h,l[s]);return u!==null&&u.push(t,h),h},argPackAdvance:8,readValueFromPointer:J,ka:t}]})},F:function(e,r,n,t,a){r=b(r),n=X(n);var o=r.indexOf("u")!=-1;o&&(a=(1n<<64n)-1n),W(e,{name:r,fromWireType:function(f){return f},toWireType:function(f,u){if(typeof u!="bigint"&&typeof u!="number")throw new TypeError('Cannot convert "'+Z(u)+'" to '+this.name);if(ua)throw new TypeError('Passing a number "'+Z(u)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+t+", "+a+"]!");return u},argPackAdvance:8,readValueFromPointer:or(r,n,!o),ka:null})},S:function(e,r,n,t,a){var o=X(n);W(e,{name:r=b(r),fromWireType:function(f){return!!f},toWireType:function(f,u){return u?t:a},argPackAdvance:8,readValueFromPointer:function(f){if(n===1)var u=j;else if(n===2)u=I;else{if(n!==4)throw new TypeError("Unknown boolean type size: "+r);u=w}return this.fromWireType(u[f>>o])},ka:null})},f:function(e,r,n,t,a,o,f,u,l,s,h,v,d){h=b(h),o=T(a,o),u&&(u=T(f,u)),s&&(s=T(l,s)),d=T(v,d);var i=nr(h);Oe(i,function(){Y("Cannot construct "+h+" due to unbound types",[t])}),$([e,r,n],t?[t]:[],function(p){if(p=p[0],t)var g=p.fa,A=g.pa;else A=M.prototype;p=Ce(i,function(){if(Object.getPrototypeOf(this)!==P)throw new B("Use 'new' to construct "+h);if(U.qa===void 0)throw new B(h+" has no accessible constructor");var Cr=U.qa[arguments.length];if(Cr===void 0)throw new B("Tried to invoke ctor of "+h+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(U.qa).toString()+") parameters instead!");return Cr.apply(this,arguments)});var P=Object.create(A,{constructor:{value:p}});p.prototype=P;var U=new Fr(h,p,P,d,g,o,u,s);g=new O(h,U,!0,!1,!1),A=new O(h+"*",U,!1,!1,!1);var ne=new O(h+" const*",U,!1,!0,!1);return fr[e]={pointerType:A,Ia:ne},sr(i,p),[g,A,ne]})},v:function(e,r,n,t,a,o,f){var u=ve(n,t);r=b(r),o=T(a,o),$([],[e],function(l){function s(){Y("Cannot call "+h+" due to unbound types",u)}var h=(l=l[0]).name+"."+r;r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var v=l.fa.constructor;return v[r]===void 0?(s.ta=n-1,v[r]=s):(Ee(v,r,h),v[r].ia[n-1]=s),$([],u,function(d){return d=pe(h,[d[0],null].concat(d.slice(1)),null,o,f),v[r].ia===void 0?(d.ta=n-1,v[r]=d):v[r].ia[n-1]=d,[]}),[]})},i:function(e,r,n,t,a,o){0{Y("Cannot construct "+u.name+" due to unbound types",f)},$([],f,function(s){return s.splice(1,0,null),u.fa.qa[r-1]=pe(l,s,null,a,o),[]}),[]})},b:function(e,r,n,t,a,o,f,u){var l=ve(n,t);r=b(r),o=T(a,o),$([],[e],function(s){function h(){Y("Cannot call "+v+" due to unbound types",l)}var v=(s=s[0]).name+"."+r;r.startsWith("@@")&&(r=Symbol[r.substring(2)]),u&&s.fa.ab.push(r);var d=s.fa.pa,i=d[r];return i===void 0||i.ia===void 0&&i.className!==s.name&&i.ta===n-2?(h.ta=n-2,h.className=s.name,d[r]=h):(Ee(d,r,v),d[r].ia[n-2]=h),$([],l,function(p){return p=pe(v,p,s,o,f),d[r].ia===void 0?(p.ta=n-2,d[r]=p):d[r].ia[n-2]=p,[]}),[]})},c:function(e,r,n,t,a,o,f,u,l,s){r=b(r),a=T(t,a),$([],[e],function(h){var v=(h=h[0]).name+"."+r,d={get:function(){Y("Cannot access "+v+" due to unbound types",[n,f])},enumerable:!0,configurable:!0};return d.set=l?()=>{Y("Cannot access "+v+" due to unbound types",[n,f])}:()=>{m(v+" is a read-only property")},Object.defineProperty(h.fa.pa,r,d),$([],l?[n,f]:[n],function(i){var p=i[0],g={get:function(){var P=pr(this,h,v+" getter");return p.fromWireType(a(o,P))},enumerable:!0};if(l){l=T(u,l);var A=i[1];g.set=function(P){var U=pr(this,h,v+" setter"),ne=[];l(s,U,A.toWireType(ne,P)),ie(ne)}}return Object.defineProperty(h.fa.pa,r,g),[]}),[]})},R:function(e,r){W(e,{name:r=b(r),fromWireType:function(n){var t=C(n);return Se(n),t},toWireType:function(n,t){return k(t)},argPackAdvance:8,readValueFromPointer:J,ka:null})},o:function(e,r,n,t){function a(){}n=X(n),r=b(r),a.values={},W(e,{name:r,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:function(o,f){return f.value},argPackAdvance:8,readValueFromPointer:Ir(r,n,t),ka:null}),Oe(r,a)},e:function(e,r,n){var t=re(e,"enum");r=b(r),e=t.constructor,t=Object.create(t.constructor.prototype,{value:{value:n},constructor:{value:Ce(t.name+"_"+r,function(){})}}),e.values[n]=t,e[r]=t},E:function(e,r,n){n=X(n),W(e,{name:r=b(r),fromWireType:function(t){return t},toWireType:function(t,a){return a},argPackAdvance:8,readValueFromPointer:Rr(r,n),ka:null})},W:function(e,r,n,t,a,o){var f=ve(r,n);e=b(e),a=T(t,a),Oe(e,function(){Y("Cannot call "+e+" due to unbound types",f)},r-1),$([],f,function(u){return sr(e,pe(e,[u[0],null].concat(u.slice(1)),null,a,o),r-1),[]})},w:function(e,r,n,t,a){r=b(r),a===-1&&(a=4294967295),a=X(n);var o=u=>u;if(t===0){var f=32-8*n;o=u=>u<>>f}n=r.includes("unsigned")?function(u,l){return l>>>0}:function(u,l){return l},W(e,{name:r,fromWireType:o,toWireType:n,argPackAdvance:8,readValueFromPointer:or(r,a,t!==0),ka:null})},r:function(e,r,n){function t(o){var f=y;return new a(Te,f[1+(o>>=2)],f[o])}var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][r];W(e,{name:n=b(n),fromWireType:t,argPackAdvance:8,readValueFromPointer:t},{Wa:!0})},h:function(e,r,n,t,a,o,f,u,l,s,h,v){n=b(n),o=T(a,o),u=T(f,u),s=T(l,s),v=T(h,v),$([e],[r],function(d){return d=d[0],[new O(n,d.fa,!1,!1,!0,d,t,o,u,s,v)]})},G:function(e,r){var n=(r=b(r))==="std::string";W(e,{name:r,fromWireType:function(t){var a=y[t>>2],o=t+4;if(n)for(var f=o,u=0;u<=a;++u){var l=o+u;if(u==a||_[l]==0){if(f=f?ae(_,f,l-f):"",s===void 0)var s=f;else s+="\0",s+=f;f=l+1}}else{for(s=Array(a),u=0;u>2]=f,n&&o)Ne(a,_,l,f+1);else if(o)for(o=0;oN,u=1;else r===4&&(t=Vr,a=Br,o=zr,f=()=>y,u=2);W(e,{name:n,fromWireType:function(l){for(var s,h=y[l>>2],v=f(),d=l+4,i=0;i<=h;++i){var p=l+4+i*r;i!=h&&v[p>>u]!=0||(d=t(d,p-d),s===void 0?s=d:(s+="\0",s+=d),d=p+r)}return F(l),s},toWireType:function(l,s){typeof s!="string"&&m("Cannot pass non-string to C++ string type "+n);var h=o(s),v=we(4+h+r);return y[v>>2]=h>>u,a(s,v+4,h+r),l!==null&&l.push(F,v),v},argPackAdvance:8,readValueFromPointer:J,ka:function(l){F(l)}})},t:function(e,r,n,t,a,o){oe[e]={name:b(r),Ca:T(n,t),oa:T(a,o),Ga:[]}},j:function(e,r,n,t,a,o,f,u,l,s){oe[e].Ga.push({Na:b(r),Ta:n,Ra:T(t,a),Sa:o,eb:f,cb:T(u,l),fb:s})},T:function(e,r){W(e,{Xa:!0,name:r=b(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},l:function(e,r,n){e=C(e),r=re(r,"emval::as");var t=[],a=k(t);return y[n>>2]=a,r.toWireType(t,e)},z:function(e,r){return e=C(e),(r=re(r,"emval::as")).toWireType(null,e)},X:function(e,r,n,t){e=C(e),n=dr(r,n);for(var a=Array(r),o=0;o>2]=k(o),e(r,n,o,a)},C:function(e,r,n,t){(e=ge[e])(r=C(r),n=de(n),null,t)},a:Se,H:function(e){return e===0?k(gr()):(e=de(e),k(gr()[e]))},A:function(e,r){var n=dr(e,r),t=n[0];r=t.name+"_$"+n.slice(1).map(function(f){return f.name}).join("_")+"$";var a=mr[r];if(a!==void 0)return a;var o=Array(e-1);return a=Nr((f,u,l,s)=>{for(var h=0,v=0;v>>=0))return!1;for(var n=1;4>=n;n*=2){var t=r*(1+.2/n);t=Math.min(t,e+100663296);var a=Math;t=Math.max(e,t),a=a.min.call(a,2147483648,t+(65536-t%65536)%65536);e:{try{Ae.grow(a-Te.byteLength+65535>>>16),Ge();var o=1;break e}catch{}o=void 0}if(o)return!0}return!1},K:function(e,r){var n=0;return yr().forEach(function(t,a){var o=r+n;for(a=y[e+4*a>>2]=o,o=0;o>2]=n.length;var t=0;return n.forEach(function(a){t+=a.length+1}),y[r>>2]=t,0},Q:function(){return 52},P:function(){return 70},O:function(e,r,n,t){for(var a=0,o=0;o>2],u=y[r+4>>2];r+=8;for(var l=0;l>2]=a,0},J:function(e,r,n,t){return Jr(e,r,n,t)}};(function(){function e(a){c.asm=a.exports,Ae=c.asm.Y,Ge(),Je=c.asm.ca,Xe.unshift(c.asm.Z),R--,c.monitorRunDependencies&&c.monitorRunDependencies(R),R==0&&L&&(a=L,L=null,a())}function r(a){e(a.instance)}function n(a){return Or().then(function(o){return WebAssembly.instantiate(o,t)}).then(function(o){return o}).then(a,function(o){H("failed to asynchronously prepare wasm: "+o),G(o)})}var t={a:Zr};if(R++,c.monitorRunDependencies&&c.monitorRunDependencies(R),c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(a){H("Module.instantiateWasm callback failed with error: "+a),te(a)}(q||typeof WebAssembly.instantiateStreaming!="function"||Qe()||typeof fetch!="function"?n(r):fetch(S,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,t).then(r,function(o){return H("wasm streaming compile failed: "+o),H("falling back to ArrayBuffer instantiation"),n(r)})})).catch(te)})(),c.___wasm_call_ctors=function(){return(c.___wasm_call_ctors=c.asm.Z).apply(null,arguments)};var be,we=c._malloc=function(){return(we=c._malloc=c.asm._).apply(null,arguments)},F=c._free=function(){return(F=c._free=c.asm.$).apply(null,arguments)},Tr=c.___getTypeName=function(){return(Tr=c.___getTypeName=c.asm.aa).apply(null,arguments)};function _r(){function e(){if(!be&&(be=!0,c.calledRun=!0,!ze)){if(_e(Xe),Ie(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;){var r=c.postRun.shift();Ke.unshift(r)}_e(Ke)}}if(!(0=t);)++n;if(16(a=(240&a)==224?(15&a)<<12|o<<6|f:(7&a)<<18|o<<12|f<<6|63&e[r++])?t+=String.fromCharCode(a):(a-=65536,t+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else t+=String.fromCharCode(a)}return t}function Ne(e,r,n,t){if(0=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(n>=t)break;r[n++]=o}else{if(2047>=o){if(n+1>=t)break;r[n++]=192|o>>6}else{if(65535>=o){if(n+2>=t)break;r[n++]=224|o>>12}else{if(n+3>=t)break;r[n++]=240|o>>18,r[n++]=128|o>>12&63}r[n++]=128|o>>6&63}r[n++]=128|63&o}}r[n]=0}}function Le(e){for(var r=0,n=0;n=t?r++:2047>=t?r+=2:55296<=t&&57343>=t?(r+=4,++n):r+=3}return r}function Ge(){var e=Ae.buffer;Te=e,c.HEAP8=j=new Int8Array(e),c.HEAP16=I=new Int16Array(e),c.HEAP32=w=new Int32Array(e),c.HEAPU8=_=new Uint8Array(e),c.HEAPU16=N=new Uint16Array(e),c.HEAPU32=y=new Uint32Array(e),c.HEAPF32=Ye=new Float32Array(e),c.HEAPF64=Be=new Float64Array(e),c.HEAP64=He=new BigInt64Array(e),c.HEAPU64=Ve=new BigUint64Array(e)}var Je,Ze=[],Xe=[],Ke=[];function Er(){var e=c.preRun.shift();Ze.unshift(e)}var S,R=0,L=null;function G(e){throw c.onAbort&&c.onAbort(e),H(e="Aborted("+e+")"),ze=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),te(e),e}function Qe(){return S.startsWith("data:application/octet-stream;base64,")}if(S="arcgis-knowledge-client-core-simd.wasm",!Qe()){var er=S;S=c.locateFile?c.locateFile(er,D):D+er}function rr(){var e=S;try{if(e==S&&q)return new Uint8Array(q);throw"both async and sync fetching of the wasm failed"}catch(r){G(r)}}function Or(){return q||typeof fetch!="function"?Promise.resolve().then(function(){return rr()}):fetch(S,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()}).catch(function(){return rr()})}function _e(e){for(;0>2]=r},this.Ua=function(r){y[this.ga+8>>2]=r},this.Va=function(){w[this.ga>>2]=0},this.Oa=function(){j[this.ga+12|0]=0},this.Ya=function(){j[this.ga+13|0]=0},this.La=function(r,n){this.Ma(),this.Za(r),this.Ua(n),this.Va(),this.Oa(),this.Ya()},this.Ma=function(){y[this.ga+16>>2]=0}}var oe={};function ie(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function J(e){return this.fromWireType(w[e>>2])}var V={},x={},ue={};function nr(e){if(e===void 0)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=r&&57>=r?"_"+e:e}function Ce(e,r){return e=nr(e),function(){return r.apply(this,arguments)}}function Pe(e){var r=Error,n=Ce(e,function(t){this.name=e,this.message=t,(t=Error(t).stack)!==void 0&&(this.stack=this.toString()+` +`+t.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var tr=void 0;function ce(e){throw new tr(e)}function $(e,r,n){function t(u){(u=n(u)).length!==e.length&&ce("Mismatched type converter count");for(var l=0;l{x.hasOwnProperty(u)?a[l]=x[u]:(o.push(u),V.hasOwnProperty(u)||(V[u]=[]),V[u].push(()=>{a[l]=x[u],++f===o.length&&t(a)}))}),o.length===0&&t(a)}function Z(e){if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e}var ar=void 0;function b(e){for(var r="";_[e];)r+=ar[_[e++]];return r}var B=void 0;function m(e){throw new B(e)}function W(e,r,n={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var t=r.name;if(e||m('type "'+t+'" must have a positive integer typeid pointer'),x.hasOwnProperty(e)){if(n.Wa)return;m("Cannot register type '"+t+"' twice")}x[e]=r,delete ue[e],V.hasOwnProperty(e)&&(r=V[e],delete V[e],r.forEach(a=>a()))}function or(e,r,n){switch(r){case 0:return n?function(t){return j[t]}:function(t){return _[t]};case 1:return n?function(t){return I[t>>1]}:function(t){return N[t>>1]};case 2:return n?function(t){return w[t>>2]}:function(t){return y[t>>2]};case 3:return n?function(t){return He[t>>3]}:function(t){return Ve[t>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function X(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function $e(e){m(e.ea.ha.fa.name+" instance already deleted")}var ke=!1;function ir(){}function ur(e){--e.count.value,e.count.value===0&&(e.ja?e.la.oa(e.ja):e.ha.fa.oa(e.ga))}function cr(e,r,n){return r===n?e:n.ma===void 0||(e=cr(e,r,n.ma))===null?null:n.Ka(e)}var fr={},K=[];function We(){for(;K.length;){var e=K.pop();e.ea.ua=!1,e.delete()}}var Q=void 0,ee={};function Sr(e,r){for(r===void 0&&m("ptr should not be undefined");e.ma;)r=e.wa(r),e=e.ma;return ee[r]}function fe(e,r){return r.ha&&r.ga||ce("makeClassHandle requires ptr and ptrType"),!!r.la!=!!r.ja&&ce("Both smartPtrType and smartPtr must be specified"),r.count={value:1},se(Object.create(e,{ea:{value:r}}))}function se(e){return typeof FinalizationRegistry>"u"?(se=r=>r,e):(ke=new FinalizationRegistry(r=>{ur(r.ea)}),ir=r=>{ke.unregister(r)},(se=r=>{var n=r.ea;return n.ja&&ke.register(r,{ea:n},r),r})(e))}function M(){}function Ee(e,r,n){if(e[r].ia===void 0){var t=e[r];e[r]=function(){return e[r].ia.hasOwnProperty(arguments.length)||m("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].ia+")!"),e[r].ia[arguments.length].apply(this,arguments)},e[r].ia=[],e[r].ia[t.ta]=t}}function Oe(e,r,n){c.hasOwnProperty(e)?((n===void 0||c[e].ia!==void 0&&c[e].ia[n]!==void 0)&&m("Cannot register public name '"+e+"' twice"),Ee(c,e,e),c.hasOwnProperty(n)&&m("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),c[e].ia[n]=r):(c[e]=r,n!==void 0&&(c[e].lb=n))}function Fr(e,r,n,t,a,o,f,u){this.name=e,this.constructor=r,this.pa=n,this.oa=t,this.ma=a,this.Pa=o,this.wa=f,this.Ka=u,this.ab=[]}function le(e,r,n){for(;r!==n;)r.wa||m("Expected null or instance of "+n.name+", got an instance of "+r.name),e=r.wa(e),r=r.ma;return e}function Dr(e,r){return r===null?(this.Ba&&m("null is not a valid "+this.name),0):(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),le(r.ea.ga,r.ea.ha.fa,this.fa))}function Mr(e,r){if(r===null){if(this.Ba&&m("null is not a valid "+this.name),this.ya){var n=this.Ca();return e!==null&&e.push(this.oa,n),n}return 0}if(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),!this.xa&&r.ea.ha.xa&&m("Cannot convert argument of type "+(r.ea.la?r.ea.la.name:r.ea.ha.name)+" to parameter type "+this.name),n=le(r.ea.ga,r.ea.ha.fa,this.fa),this.ya)switch(r.ea.ja===void 0&&m("Passing raw pointer to smart pointer is illegal"),this.gb){case 0:r.ea.la===this?n=r.ea.ja:m("Cannot convert argument of type "+(r.ea.la?r.ea.la.name:r.ea.ha.name)+" to parameter type "+this.name);break;case 1:n=r.ea.ja;break;case 2:if(r.ea.la===this)n=r.ea.ja;else{var t=r.clone();n=this.bb(n,k(function(){t.delete()})),e!==null&&e.push(this.oa,n)}break;default:m("Unsupporting sharing policy")}return n}function Ur(e,r){return r===null?(this.Ba&&m("null is not a valid "+this.name),0):(r.ea||m('Cannot pass "'+Z(r)+'" as a '+this.name),r.ea.ga||m("Cannot pass deleted object as a pointer of type "+this.name),r.ea.ha.xa&&m("Cannot convert argument of type "+r.ea.ha.name+" to parameter type "+this.name),le(r.ea.ga,r.ea.ha.fa,this.fa))}function O(e,r,n,t,a,o,f,u,l,s,h){this.name=e,this.fa=r,this.Ba=n,this.xa=t,this.ya=a,this.$a=o,this.gb=f,this.Ha=u,this.Ca=l,this.bb=s,this.oa=h,a||r.ma!==void 0?this.toWireType=Mr:(this.toWireType=t?Dr:Ur,this.ka=null)}function sr(e,r,n){c.hasOwnProperty(e)||ce("Replacing nonexistant public symbol"),c[e].ia!==void 0&&n!==void 0?c[e].ia[n]=r:(c[e]=r,c[e].ta=n)}var he=[];function T(e,r){e=b(e);var n=he[r];return n||(r>=he.length&&(he.length=r+1),he[r]=n=Je.get(r)),typeof n!="function"&&m("unknown function pointer with signature "+e+": "+r),n}var lr=void 0;function hr(e){var r=b(e=Tr(e));return F(e),r}function Y(e,r){function n(o){a[o]||x[o]||(ue[o]?ue[o].forEach(n):(t.push(o),a[o]=!0))}var t=[],a={};throw r.forEach(n),new lr(e+": "+t.map(hr).join([", "]))}function pe(e,r,n,t,a){var o=r.length;2>o&&m("argTypes array size mismatch! Must at least get return value and 'this' types!");var f=r[1]!==null&&n!==null,u=!1;for(n=1;n>2]);return n}function pr(e,r,n){return e instanceof Object||m(n+' with invalid "this": '+e),e instanceof r.fa.constructor||m(n+' incompatible with "this" of type '+e.constructor.name),e.ea.ga||m("cannot call emscripten binding method "+n+" on deleted object"),le(e.ea.ga,e.ea.ha.fa,r.fa)}var je=[],E=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Se(e){4(e||m("Cannot use deleted val. handle = "+e),E[e].value),k=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=je.length?je.pop():E.length;return E[r]={Da:1,value:e},r}};function Ir(e,r,n){switch(r){case 0:return function(t){return this.fromWireType((n?j:_)[t])};case 1:return function(t){return this.fromWireType((n?I:N)[t>>1])};case 2:return function(t){return this.fromWireType((n?w:y)[t>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function re(e,r){var n=x[e];return n===void 0&&m(r+" has unknown type "+hr(e)),n}function Rr(e,r){switch(r){case 2:return function(n){return this.fromWireType(Ye[n>>2])};case 3:return function(n){return this.fromWireType(Be[n>>3])};default:throw new TypeError("Unknown float type: "+e)}}var vr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function xr(e,r){for(var n=e>>1,t=n+r/2;!(n>=t)&&N[n];)++n;if(32<(n<<=1)-e&&vr)return vr.decode(_.subarray(e,n));for(n="",t=0;!(t>=r/2);++t){var a=I[e+2*t>>1];if(a==0)break;n+=String.fromCharCode(a)}return n}function Yr(e,r,n){if(n===void 0&&(n=2147483647),2>n)return 0;var t=r;n=(n-=2)<2*e.length?n/2:e.length;for(var a=0;a>1]=e.charCodeAt(a),r+=2;return I[r>>1]=0,r-t}function Hr(e){return 2*e.length}function Vr(e,r){for(var n=0,t="";!(n>=r/4);){var a=w[e+4*n>>2];if(a==0)break;++n,65536<=a?(a-=65536,t+=String.fromCharCode(55296|a>>10,56320|1023&a)):t+=String.fromCharCode(a)}return t}function Br(e,r,n){if(n===void 0&&(n=2147483647),4>n)return 0;var t=r;n=t+n-4;for(var a=0;a=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),w[r>>2]=o,(r+=4)+4>n)break}return w[r>>2]=0,r-t}function zr(e){for(var r=0,n=0;n=t&&++n,r+=4}return r}function dr(e,r){for(var n=Array(e),t=0;t>2],"parameter "+t);return n}var qr={};function de(e){var r=qr[e];return r===void 0?b(e):r}var ge=[];function gr(){function e(r){r.$$$embind_global$$$=r;var n=typeof $$$embind_global$$$=="object"&&r.$$$embind_global$$$==r;return n||delete r.$$$embind_global$$$,n}if(typeof globalThis=="object")return globalThis;if(typeof $$$embind_global$$$=="object"||(typeof Me=="object"&&e(Me)?$$$embind_global$$$=Me:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")}function Nr(e){var r=ge.length;return ge.push(e),r}var mr=[],Fe={};function yr(){if(!De){var e,r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe||"./this.program"};for(e in Fe)Fe[e]===void 0?delete r[e]:r[e]=Fe[e];var n=[];for(e in r)n.push(e+"="+r[e]);De=n}return De}var De,Lr=[null,[],[]];function me(e){return e%4==0&&(e%100!=0||e%400==0)}var br=[31,29,31,30,31,30,31,31,30,31,30,31],wr=[31,28,31,30,31,30,31,31,30,31,30,31];function Gr(e){var r=Array(Le(e)+1);return Ne(e,r,0,r.length),r}function Jr(e,r,n,t){function a(i,p,g){for(i=typeof i=="number"?i.toString():i||"";i.lengthP?-1:0A-i.getDate())){i.setDate(i.getDate()+p);break}p-=A-i.getDate()+1,i.setDate(1),11>g?i.setMonth(g+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return g=new Date(i.getFullYear()+1,0,4),p=u(new Date(i.getFullYear(),0,4)),g=u(g),0>=f(p,i)?0>=f(g,i)?i.getFullYear()+1:i.getFullYear():i.getFullYear()-1}var s=w[t+40>>2];for(var h in t={jb:w[t>>2],ib:w[t+4>>2],za:w[t+8>>2],Ea:w[t+12>>2],Aa:w[t+16>>2],sa:w[t+20>>2],na:w[t+24>>2],ra:w[t+28>>2],mb:w[t+32>>2],hb:w[t+36>>2],kb:s&&s?ae(_,s):""},n=n?ae(_,n):"",s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(h,"g"),s[h]);var v="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(h in s={"%a":function(i){return v[i.na].substring(0,3)},"%A":function(i){return v[i.na]},"%b":function(i){return d[i.Aa].substring(0,3)},"%B":function(i){return d[i.Aa]},"%C":function(i){return o((i.sa+1900)/100|0,2)},"%d":function(i){return o(i.Ea,2)},"%e":function(i){return a(i.Ea,2," ")},"%g":function(i){return l(i).toString().substring(2)},"%G":function(i){return l(i)},"%H":function(i){return o(i.za,2)},"%I":function(i){return(i=i.za)==0?i=12:12i.za?"AM":"PM"},"%S":function(i){return o(i.jb,2)},"%t":function(){return" "},"%u":function(i){return i.na||7},"%U":function(i){return o(Math.floor((i.ra+7-i.na)/7),2)},"%V":function(i){var p=Math.floor((i.ra+7-(i.na+6)%7)/7);if(2>=(i.na+371-i.ra-2)%7&&p++,p)p==53&&((g=(i.na+371-i.ra)%7)==4||g==3&&me(i.sa)||(p=1));else{p=52;var g=(i.na+7-i.ra-1)%7;(g==4||g==5&&me(i.sa%400-1))&&p++}return o(p,2)},"%w":function(i){return i.na},"%W":function(i){return o(Math.floor((i.ra+7-(i.na+6)%7)/7),2)},"%y":function(i){return(i.sa+1900).toString().substring(2)},"%Y":function(i){return i.sa+1900},"%z":function(i){var p=0<=(i=i.hb);return i=Math.abs(i)/60,(p?"+":"-")+("0000"+(i/60*100+i%60)).slice(-4)},"%Z":function(i){return i.kb},"%%":function(){return"%"}},n=n.replace(/%%/g,"\0\0"),s)n.includes(h)&&(n=n.replace(new RegExp(h,"g"),s[h](t)));return(h=Gr(n=n.replace(/\0\0/g,"%"))).length>r?0:(j.set(h,e),h.length-1)}tr=c.InternalError=Pe("InternalError");for(var Ar=Array(256),ye=0;256>ye;++ye)Ar[ye]=String.fromCharCode(ye);ar=Ar,B=c.BindingError=Pe("BindingError"),M.prototype.isAliasOf=function(e){if(!(this instanceof M&&e instanceof M))return!1;var r=this.ea.ha.fa,n=this.ea.ga,t=e.ea.ha.fa;for(e=e.ea.ga;r.ma;)n=r.wa(n),r=r.ma;for(;t.ma;)e=t.wa(e),t=t.ma;return r===t&&n===e},M.prototype.clone=function(){if(this.ea.ga||$e(this),this.ea.va)return this.ea.count.value+=1,this;var e=se,r=Object,n=r.create,t=Object.getPrototypeOf(this),a=this.ea;return(e=e(n.call(r,t,{ea:{value:{count:a.count,ua:a.ua,va:a.va,ga:a.ga,ha:a.ha,ja:a.ja,la:a.la}}}))).ea.count.value+=1,e.ea.ua=!1,e},M.prototype.delete=function(){this.ea.ga||$e(this),this.ea.ua&&!this.ea.va&&m("Object already scheduled for deletion"),ir(this),ur(this.ea),this.ea.va||(this.ea.ja=void 0,this.ea.ga=void 0)},M.prototype.isDeleted=function(){return!this.ea.ga},M.prototype.deleteLater=function(){return this.ea.ga||$e(this),this.ea.ua&&!this.ea.va&&m("Object already scheduled for deletion"),K.push(this),K.length===1&&Q&&Q(We),this.ea.ua=!0,this},c.getInheritedInstanceCount=function(){return Object.keys(ee).length},c.getLiveInheritedInstances=function(){var e,r=[];for(e in ee)ee.hasOwnProperty(e)&&r.push(ee[e]);return r},c.flushPendingDeletes=We,c.setDelayFunction=function(e){Q=e,K.length&&Q&&Q(We)},O.prototype.Qa=function(e){return this.Ha&&(e=this.Ha(e)),e},O.prototype.Fa=function(e){this.oa&&this.oa(e)},O.prototype.argPackAdvance=8,O.prototype.readValueFromPointer=J,O.prototype.deleteObject=function(e){e!==null&&e.delete()},O.prototype.fromWireType=function(e){function r(){return this.ya?fe(this.fa.pa,{ha:this.$a,ga:n,la:this,ja:e}):fe(this.fa.pa,{ha:this,ga:e})}var n=this.Qa(e);if(!n)return this.Fa(e),null;var t=Sr(this.fa,n);if(t!==void 0)return t.ea.count.value===0?(t.ea.ga=n,t.ea.ja=e,t.clone()):(t=t.clone(),this.Fa(e),t);if(t=this.fa.Pa(n),!(t=fr[t]))return r.call(this);t=this.xa?t.Ia:t.pointerType;var a=cr(n,this.fa,t.fa);return a===null?r.call(this):this.ya?fe(t.fa.pa,{ha:t,ga:a,la:this,ja:e}):fe(t.fa.pa,{ha:t,ga:a})},lr=c.UnboundTypeError=Pe("UnboundTypeError"),c.count_emval_handles=function(){for(var e=0,r=5;ro.Ta).concat(a.map(o=>o.eb)),o=>{var f={};return a.forEach((u,l)=>{var s=o[l],h=u.Ra,v=u.Sa,d=o[l+a.length],i=u.cb,p=u.fb;f[u.Na]={read:g=>s.fromWireType(h(v,g)),write:(g,A)=>{var P=[];i(p,g,d.toWireType(P,A)),ie(P)}}}),[{name:r.name,fromWireType:function(u){var l,s={};for(l in f)s[l]=f[l].read(u);return t(u),s},toWireType:function(u,l){for(var s in f)if(!(s in l))throw new TypeError('Missing field: "'+s+'"');var h=n();for(s in f)f[s].write(h,l[s]);return u!==null&&u.push(t,h),h},argPackAdvance:8,readValueFromPointer:J,ka:t}]})},F:function(e,r,n,t,a){r=b(r),n=X(n);var o=r.indexOf("u")!=-1;o&&(a=(1n<<64n)-1n),W(e,{name:r,fromWireType:function(f){return f},toWireType:function(f,u){if(typeof u!="bigint"&&typeof u!="number")throw new TypeError('Cannot convert "'+Z(u)+'" to '+this.name);if(ua)throw new TypeError('Passing a number "'+Z(u)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+t+", "+a+"]!");return u},argPackAdvance:8,readValueFromPointer:or(r,n,!o),ka:null})},S:function(e,r,n,t,a){var o=X(n);W(e,{name:r=b(r),fromWireType:function(f){return!!f},toWireType:function(f,u){return u?t:a},argPackAdvance:8,readValueFromPointer:function(f){if(n===1)var u=j;else if(n===2)u=I;else{if(n!==4)throw new TypeError("Unknown boolean type size: "+r);u=w}return this.fromWireType(u[f>>o])},ka:null})},f:function(e,r,n,t,a,o,f,u,l,s,h,v,d){h=b(h),o=T(a,o),u&&(u=T(f,u)),s&&(s=T(l,s)),d=T(v,d);var i=nr(h);Oe(i,function(){Y("Cannot construct "+h+" due to unbound types",[t])}),$([e,r,n],t?[t]:[],function(p){if(p=p[0],t)var g=p.fa,A=g.pa;else A=M.prototype;p=Ce(i,function(){if(Object.getPrototypeOf(this)!==P)throw new B("Use 'new' to construct "+h);if(U.qa===void 0)throw new B(h+" has no accessible constructor");var Cr=U.qa[arguments.length];if(Cr===void 0)throw new B("Tried to invoke ctor of "+h+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(U.qa).toString()+") parameters instead!");return Cr.apply(this,arguments)});var P=Object.create(A,{constructor:{value:p}});p.prototype=P;var U=new Fr(h,p,P,d,g,o,u,s);g=new O(h,U,!0,!1,!1),A=new O(h+"*",U,!1,!1,!1);var ne=new O(h+" const*",U,!1,!0,!1);return fr[e]={pointerType:A,Ia:ne},sr(i,p),[g,A,ne]})},v:function(e,r,n,t,a,o,f){var u=ve(n,t);r=b(r),o=T(a,o),$([],[e],function(l){function s(){Y("Cannot call "+h+" due to unbound types",u)}var h=(l=l[0]).name+"."+r;r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var v=l.fa.constructor;return v[r]===void 0?(s.ta=n-1,v[r]=s):(Ee(v,r,h),v[r].ia[n-1]=s),$([],u,function(d){return d=pe(h,[d[0],null].concat(d.slice(1)),null,o,f),v[r].ia===void 0?(d.ta=n-1,v[r]=d):v[r].ia[n-1]=d,[]}),[]})},i:function(e,r,n,t,a,o){0{Y("Cannot construct "+u.name+" due to unbound types",f)},$([],f,function(s){return s.splice(1,0,null),u.fa.qa[r-1]=pe(l,s,null,a,o),[]}),[]})},b:function(e,r,n,t,a,o,f,u){var l=ve(n,t);r=b(r),o=T(a,o),$([],[e],function(s){function h(){Y("Cannot call "+v+" due to unbound types",l)}var v=(s=s[0]).name+"."+r;r.startsWith("@@")&&(r=Symbol[r.substring(2)]),u&&s.fa.ab.push(r);var d=s.fa.pa,i=d[r];return i===void 0||i.ia===void 0&&i.className!==s.name&&i.ta===n-2?(h.ta=n-2,h.className=s.name,d[r]=h):(Ee(d,r,v),d[r].ia[n-2]=h),$([],l,function(p){return p=pe(v,p,s,o,f),d[r].ia===void 0?(p.ta=n-2,d[r]=p):d[r].ia[n-2]=p,[]}),[]})},c:function(e,r,n,t,a,o,f,u,l,s){r=b(r),a=T(t,a),$([],[e],function(h){var v=(h=h[0]).name+"."+r,d={get:function(){Y("Cannot access "+v+" due to unbound types",[n,f])},enumerable:!0,configurable:!0};return d.set=l?()=>{Y("Cannot access "+v+" due to unbound types",[n,f])}:()=>{m(v+" is a read-only property")},Object.defineProperty(h.fa.pa,r,d),$([],l?[n,f]:[n],function(i){var p=i[0],g={get:function(){var P=pr(this,h,v+" getter");return p.fromWireType(a(o,P))},enumerable:!0};if(l){l=T(u,l);var A=i[1];g.set=function(P){var U=pr(this,h,v+" setter"),ne=[];l(s,U,A.toWireType(ne,P)),ie(ne)}}return Object.defineProperty(h.fa.pa,r,g),[]}),[]})},R:function(e,r){W(e,{name:r=b(r),fromWireType:function(n){var t=C(n);return Se(n),t},toWireType:function(n,t){return k(t)},argPackAdvance:8,readValueFromPointer:J,ka:null})},o:function(e,r,n,t){function a(){}n=X(n),r=b(r),a.values={},W(e,{name:r,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:function(o,f){return f.value},argPackAdvance:8,readValueFromPointer:Ir(r,n,t),ka:null}),Oe(r,a)},e:function(e,r,n){var t=re(e,"enum");r=b(r),e=t.constructor,t=Object.create(t.constructor.prototype,{value:{value:n},constructor:{value:Ce(t.name+"_"+r,function(){})}}),e.values[n]=t,e[r]=t},E:function(e,r,n){n=X(n),W(e,{name:r=b(r),fromWireType:function(t){return t},toWireType:function(t,a){return a},argPackAdvance:8,readValueFromPointer:Rr(r,n),ka:null})},W:function(e,r,n,t,a,o){var f=ve(r,n);e=b(e),a=T(t,a),Oe(e,function(){Y("Cannot call "+e+" due to unbound types",f)},r-1),$([],f,function(u){return sr(e,pe(e,[u[0],null].concat(u.slice(1)),null,a,o),r-1),[]})},w:function(e,r,n,t,a){r=b(r),a===-1&&(a=4294967295),a=X(n);var o=u=>u;if(t===0){var f=32-8*n;o=u=>u<>>f}n=r.includes("unsigned")?function(u,l){return l>>>0}:function(u,l){return l},W(e,{name:r,fromWireType:o,toWireType:n,argPackAdvance:8,readValueFromPointer:or(r,a,t!==0),ka:null})},r:function(e,r,n){function t(o){var f=y;return new a(Te,f[1+(o>>=2)],f[o])}var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][r];W(e,{name:n=b(n),fromWireType:t,argPackAdvance:8,readValueFromPointer:t},{Wa:!0})},h:function(e,r,n,t,a,o,f,u,l,s,h,v){n=b(n),o=T(a,o),u=T(f,u),s=T(l,s),v=T(h,v),$([e],[r],function(d){return d=d[0],[new O(n,d.fa,!1,!1,!0,d,t,o,u,s,v)]})},G:function(e,r){var n=(r=b(r))==="std::string";W(e,{name:r,fromWireType:function(t){var a=y[t>>2],o=t+4;if(n)for(var f=o,u=0;u<=a;++u){var l=o+u;if(u==a||_[l]==0){if(f=f?ae(_,f,l-f):"",s===void 0)var s=f;else s+="\0",s+=f;f=l+1}}else{for(s=Array(a),u=0;u>2]=f,n&&o)Ne(a,_,l,f+1);else if(o)for(o=0;oN,u=1;else r===4&&(t=Vr,a=Br,o=zr,f=()=>y,u=2);W(e,{name:n,fromWireType:function(l){for(var s,h=y[l>>2],v=f(),d=l+4,i=0;i<=h;++i){var p=l+4+i*r;i!=h&&v[p>>u]!=0||(d=t(d,p-d),s===void 0?s=d:(s+="\0",s+=d),d=p+r)}return F(l),s},toWireType:function(l,s){typeof s!="string"&&m("Cannot pass non-string to C++ string type "+n);var h=o(s),v=we(4+h+r);return y[v>>2]=h>>u,a(s,v+4,h+r),l!==null&&l.push(F,v),v},argPackAdvance:8,readValueFromPointer:J,ka:function(l){F(l)}})},t:function(e,r,n,t,a,o){oe[e]={name:b(r),Ca:T(n,t),oa:T(a,o),Ga:[]}},j:function(e,r,n,t,a,o,f,u,l,s){oe[e].Ga.push({Na:b(r),Ta:n,Ra:T(t,a),Sa:o,eb:f,cb:T(u,l),fb:s})},T:function(e,r){W(e,{Xa:!0,name:r=b(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},l:function(e,r,n){e=C(e),r=re(r,"emval::as");var t=[],a=k(t);return y[n>>2]=a,r.toWireType(t,e)},z:function(e,r){return e=C(e),(r=re(r,"emval::as")).toWireType(null,e)},X:function(e,r,n,t){e=C(e),n=dr(r,n);for(var a=Array(r),o=0;o>2]=k(o),e(r,n,o,a)},C:function(e,r,n,t){(e=ge[e])(r=C(r),n=de(n),null,t)},a:Se,H:function(e){return e===0?k(gr()):(e=de(e),k(gr()[e]))},A:function(e,r){var n=dr(e,r),t=n[0];r=t.name+"_$"+n.slice(1).map(function(f){return f.name}).join("_")+"$";var a=mr[r];if(a!==void 0)return a;var o=Array(e-1);return a=Nr((f,u,l,s)=>{for(var h=0,v=0;v>>=0))return!1;for(var n=1;4>=n;n*=2){var t=r*(1+.2/n);t=Math.min(t,e+100663296);var a=Math;t=Math.max(e,t),a=a.min.call(a,2147483648,t+(65536-t%65536)%65536);e:{try{Ae.grow(a-Te.byteLength+65535>>>16),Ge();var o=1;break e}catch{}o=void 0}if(o)return!0}return!1},K:function(e,r){var n=0;return yr().forEach(function(t,a){var o=r+n;for(a=y[e+4*a>>2]=o,o=0;o>2]=n.length;var t=0;return n.forEach(function(a){t+=a.length+1}),y[r>>2]=t,0},Q:function(){return 52},P:function(){return 70},O:function(e,r,n,t){for(var a=0,o=0;o>2],u=y[r+4>>2];r+=8;for(var l=0;l>2]=a,0},J:function(e,r,n,t){return Jr(e,r,n,t)}};(function(){function e(a){c.asm=a.exports,Ae=c.asm.Y,Ge(),Je=c.asm.ca,Xe.unshift(c.asm.Z),R--,c.monitorRunDependencies&&c.monitorRunDependencies(R),R==0&&L&&(a=L,L=null,a())}function r(a){e(a.instance)}function n(a){return Or().then(function(o){return WebAssembly.instantiate(o,t)}).then(function(o){return o}).then(a,function(o){H("failed to asynchronously prepare wasm: "+o),G(o)})}var t={a:Zr};if(R++,c.monitorRunDependencies&&c.monitorRunDependencies(R),c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(a){H("Module.instantiateWasm callback failed with error: "+a),te(a)}(q||typeof WebAssembly.instantiateStreaming!="function"||Qe()||typeof fetch!="function"?n(r):fetch(S,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,t).then(r,function(o){return H("wasm streaming compile failed: "+o),H("falling back to ArrayBuffer instantiation"),n(r)})})).catch(te)})(),c.___wasm_call_ctors=function(){return(c.___wasm_call_ctors=c.asm.Z).apply(null,arguments)};var be,we=c._malloc=function(){return(we=c._malloc=c.asm._).apply(null,arguments)},F=c._free=function(){return(F=c._free=c.asm.$).apply(null,arguments)},Tr=c.___getTypeName=function(){return(Tr=c.___getTypeName=c.asm.aa).apply(null,arguments)};function _r(){function e(){if(!be&&(be=!0,c.calledRun=!0,!ze)){if(_e(Xe),Ie(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;){var r=c.postRun.shift();Ke.unshift(r)}_e(Ke)}}if(!(0i.map(i=>d[i]); +import{_ as C,d as _,s as v,e as F,j as $,I as N,k as P}from"./index-DKOmzAMm.js";import{s as V}from"./associatedFeatureServiceUtils-D9v5WjkL.js";import{b as f,i as S,t as k,a as J}from"./lazyLayerLoader-BkbwrjyD.js";const x={FeatureLayer:!0,SceneLayer:!0};async function q(a){const{properties:s,url:e}=a,t={...s,url:e},l=await M(e,s==null?void 0:s.customParameters),{Constructor:r,layerId:o,sourceJSON:c,parsedUrl:u,layers:y,tables:m}=l;if(y.length+m.length===0)return o!=null&&(t.layerId=o),c!=null&&(t.sourceJSON=c),new r(t);const d=new(await C(async()=>{const{default:w}=await import("./GroupLayer-zAHBnafB.js");return{default:w}},__vite__mapDeps([0,1,2,3,4,5,6,7]))).default({title:u.title});return await E(d,l,t),d}function O(a,s){return a?a.find(({id:e})=>e===s):null}function T(a,s,e,t,l){const r={...l,layerId:s};return a!=null&&(r.url=a),e!=null&&(r.sourceJSON=e),"sublayerTitleMode"in t.prototype&&(r.sublayerTitleMode="service-name"),new t(r)}async function E(a,s,e){const t=s.sublayerConstructorProvider;for(const{id:l,serverUrl:r}of s.layers){const o=O(s.sublayerInfos,l),c=T(r,l,o,(o&&(t==null?void 0:t(o)))??s.Constructor,e);a.add(c)}if(s.tables.length){const l=await b("FeatureLayer");s.tables.forEach(({id:r,serverUrl:o})=>{const c=T(o,r,O(s.tableInfos,r),l,e);a.tables.add(c)})}}async function M(a,s){var m,d,w,h,I,g,L;let e=_(a);if(e==null&&(e=await D(a,s)),e==null)throw new v("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:a});const{serverType:t,sublayer:l}=e;let r;const o={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},c=t==="FeatureServer",u=t==="SceneServer",y={parsedUrl:e,Constructor:null,layerId:c||u?l??void 0:void 0,layers:[],tables:[]};switch(t){case"MapServer":if(l!=null){const{type:n}=await f(a,{customParameters:s});switch(r="FeatureLayer",n){case"Catalog Layer":r="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new v("arcgis-layers:unsupported",`fromUrl() not supported for "${n}" layers`)}}else r=await A(a,s)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const n=await f(a,{customParameters:s}),{tileInfo:i,cacheType:p}=n;r=i?((m=i==null?void 0:i.format)==null?void 0:m.toUpperCase())!=="LERC"||p&&p.toLowerCase()!=="elevation"?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const n=await f(e.url.path,{customParameters:s});if(r="SceneLayer",n){const i=n==null?void 0:n.layers;if((n==null?void 0:n.layerType)==="Voxel")r="VoxelLayer";else if(i!=null&&i.length){const p=(d=i[0])==null?void 0:d.layerType;p!=null&&P[p]!=null&&(r=P[p])}}break}case"3DTilesServer":throw new v("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(r="FeatureLayer",l!=null){const n=await f(a,{customParameters:s});y.sourceJSON=n,r=S(n.type)}break;default:r=o[t]}if(x[r]&&l==null){const n=await G(a,t,s);if(c&&(y.sublayerInfos=n.layerInfos,y.tableInfos=n.tableInfos),n.layers.length+n.tables.length!==1)y.layers=n.layers,y.tables=n.tables,c&&((w=n.layerInfos)!=null&&w.length)&&(y.sublayerConstructorProvider=await K(n.layerInfos));else if(c||u){const i=((h=n.layerInfos)==null?void 0:h[0])??((I=n.tableInfos)==null?void 0:I[0]);if(y.layerId=((g=n.layers[0])==null?void 0:g.id)??((L=n.tables[0])==null?void 0:L.id),y.sourceJSON=i,c){const p=i==null?void 0:i.type;r=S(p)}}}return y.Constructor=await b(r),y}async function D(a,s){var c;const e=await f(a,{customParameters:s});let t=null,l=null;const r=e.type;if(r==="Feature Layer"||r==="Table"?(t="FeatureServer",l=e.id??null):r==="indexedVector"?t="VectorTileServer":e.hasOwnProperty("mapName")?t="MapServer":e.hasOwnProperty("bandCount")&&e.hasOwnProperty("pixelSizeX")?t="ImageServer":e.hasOwnProperty("maxRecordCount")&&e.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":e.hasOwnProperty("streamUrls")?t="StreamServer":U(e)?(t="SceneServer",l=e.id):e.hasOwnProperty("layers")&&U((c=e.layers)==null?void 0:c[0])&&(t="SceneServer"),!t)return null;const o=l!=null?F(a):null;return{title:o!=null&&e.name||$(a),serverType:t,sublayer:l,url:{path:o!=null?o.serviceUrl:N(a).path}}}function U(a){return a!=null&&a.hasOwnProperty("store")&&a.hasOwnProperty("id")&&typeof a.id=="number"}async function G(a,s,e){let t,l,r=!1;switch(s){case"FeatureServer":{const u=await k(a,{customParameters:e});r=!!u.layersJSON,t=u.layersJSON||u.serviceJSON;break}case"SceneServer":{const u=await R(a,e);t=u.serviceInfo,l=u.tableServerUrl;break}default:t=await f(a,{customParameters:e})}const o=t==null?void 0:t.layers,c=t==null?void 0:t.tables;return{layers:(o==null?void 0:o.map(u=>({id:u.id})).reverse())||[],tables:(c==null?void 0:c.map(u=>({serverUrl:l,id:u.id})).reverse())||[],layerInfos:r?o:[],tableInfos:r?c:[]}}async function R(a,s){var l;const e=await f(a,{customParameters:s});if(!((l=e.layers)==null?void 0:l[0]))return{serviceInfo:e};try{const{serverUrl:r}=await V(a),o=await f(r,{customParameters:s}).catch(()=>null);return o&&(e.tables=o.tables),{serviceInfo:e,tableServerUrl:r}}catch{return{serviceInfo:e}}}async function b(a){return(0,J[a])()}async function A(a,s){return(await f(a,{customParameters:s})).tileInfo}async function K(a){if(!a.length)return;const s=new Set,e=[];for(const{type:r}of a)s.has(r)||(s.add(r),e.push(b(S(r))));const t=await Promise.all(e),l=new Map;return Array.from(s).forEach((r,o)=>{l.set(r,t[o])}),r=>l.get(r.type)}export{q as fromUrl}; diff --git a/build/assets/associatedFeatureServiceUtils-D9v5WjkL.js b/build/assets/associatedFeatureServiceUtils-D9v5WjkL.js new file mode 100644 index 0000000..f1a5218 --- /dev/null +++ b/build/assets/associatedFeatureServiceUtils-D9v5WjkL.js @@ -0,0 +1 @@ +import{d as g,s as y,S as I,C as K,aK as f,U as d,aL as L}from"./index-DKOmzAMm.js";async function x(e,n){const a=g(e);if(!a)throw new y("invalid-url","Invalid scene service url");const r={...n,sceneServerUrl:a.url.path,layerId:a.sublayer??void 0};if(r.sceneLayerItem??(r.sceneLayerItem=await T(r)),r.sceneLayerItem==null)return S(r.sceneServerUrl.replace("/SceneServer","/FeatureServer"),r);const t=await q(r);if(!(t!=null&&t.url))throw new y("related-service-not-found","Could not find feature service through portal item relationship");r.featureServiceItem=t;const o=await S(t.url,r);return o.portalItem=t,o}async function T(e){const n=(await U(e)).serviceItemId;if(!n)return null;const a=new I({id:n,apiKey:e.apiKey}),r=await b(e);r!=null&&(a.portal=new K({url:r}));try{return a.load({signal:e.signal})}catch(t){return f(t),null}}async function U(e){if(e.rootDocument)return e.rootDocument;const n={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const a=await d(e.sceneServerUrl,n);e.rootDocument=a.data}catch{e.rootDocument={}}return e.rootDocument}async function b(e){var r;const n=(r=L)==null?void 0:r.findServerInfo(e.sceneServerUrl);if(n!=null&&n.owningSystemUrl)return n.owningSystemUrl;const a=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const t=(await d(a,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(t)return t}catch(t){f(t)}return null}async function S(e,n){var p,w,h;const a=g(e);if(!a)throw new y("invalid-feature-service-url","Invalid feature service url");const r=a.url.path,t=n.layerId;if(t==null)return{serverUrl:r};const o=U(n),s=n.featureServiceItem?await n.featureServiceItem.fetchData("json"):null,j=(h=((p=s==null?void 0:s.layers)==null?void 0:p[0])||((w=s==null?void 0:s.tables)==null?void 0:w[0]))==null?void 0:h.customParameters,m=i=>{const A={query:{f:"json",...j},responseType:"json",authMode:i,signal:n.signal};return d(r,A)},D=m("anonymous").catch(()=>m("no-prompt")),[v,c]=await Promise.all([D,o]),u=c==null?void 0:c.layers,l=v.data&&v.data.layers;if(!Array.isArray(l))throw new Error("expected layers array");if(Array.isArray(u)){for(let i=0;it.type==="Feature Service")||null;if(!a)return null;const r=new I({portal:a.portal,id:a.id});return await r.load(),r}catch(a){return f(a),null}}export{x as s}; diff --git a/build/assets/basis_transcoder-B40h2JNH.js b/build/assets/basis_transcoder-B40h2JNH.js new file mode 100644 index 0000000..1d4c863 --- /dev/null +++ b/build/assets/basis_transcoder-B40h2JNH.js @@ -0,0 +1,20 @@ +var Wt,de,dn=(Wt=typeof document<"u"?(de=document.currentScript)==null?void 0:de.src:void 0,function(fe={}){var _t,Z,c=Object.assign({},fe),ve=new Promise((t,e)=>{_t=t,Z=e}),ye=!0,Ft=Object.assign({},c),F="";function me(t){return c.locateFile?c.locateFile(t,F):F+t}typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),Wt&&(F=Wt),F=F.startsWith("blob:")?"":F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1);var N,X,ge=c.print||console.log.bind(console),D=c.printErr||console.error.bind(console);Object.assign(c,Ft),Ft=null,c.arguments&&c.arguments,c.thisProgram&&c.thisProgram,c.quit&&c.quit,c.wasmBinary&&(N=c.wasmBinary);var S,g,x,M,I,f,St,Ot,jt=!1;function kt(){var t=X.buffer;c.HEAP8=S=new Int8Array(t),c.HEAP16=x=new Int16Array(t),c.HEAPU8=g=new Uint8Array(t),c.HEAPU16=M=new Uint16Array(t),c.HEAP32=I=new Int32Array(t),c.HEAPU32=f=new Uint32Array(t),c.HEAPF32=St=new Float32Array(t),c.HEAPF64=Ot=new Float64Array(t)}var Et=[],Rt=[],Dt=[];function $e(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)be(c.preRun.shift());pt(Et)}function we(){pt(Rt)}function Te(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Pe(c.postRun.shift());pt(Dt)}function be(t){Et.unshift(t)}function Ce(t){Rt.unshift(t)}function Pe(t){Dt.unshift(t)}var E=0,z=null;function Ae(t){var e;E++,(e=c.monitorRunDependencies)==null||e.call(c,E)}function We(t){var r;if(E--,(r=c.monitorRunDependencies)==null||r.call(c,E),E==0&&z){var e=z;z=null,e()}}function xt(t){var r;(r=c.onAbort)==null||r.call(c,t),D(t="Aborted("+t+")"),jt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw Z(e),e}var Y,_e="data:application/octet-stream;base64,",It=t=>t.startsWith(_e);function Fe(){var t="basis_transcoder.wasm";return It(t)?t:me(t)}function Vt(t){if(t==Y&&N)return new Uint8Array(N);throw"both async and sync fetching of the wasm failed"}function Se(t){return!N&&ye&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw`failed to load wasm binary file at '${t}'`;return e.arrayBuffer()}).catch(()=>Vt(t)):Promise.resolve().then(()=>Vt(t))}function Ht(t,e,r){return Se(t).then(n=>WebAssembly.instantiate(n,e)).then(r,n=>{D(`failed to asynchronously prepare wasm: ${n}`),xt(n)})}function Oe(t,e,r,n){return t||typeof WebAssembly.instantiateStreaming!="function"||It(e)||typeof fetch!="function"?Ht(e,r,n):fetch(e,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,r).then(n,function(o){return D(`wasm streaming compile failed: ${o}`),D("falling back to ArrayBuffer instantiation"),Ht(e,r,n)}))}function je(){return{a:pn}}function ke(){var t=je();function e(n,a){return A=n.exports,X=A.L,kt(),Lt=A.Q,Ce(A.M),We(),A}function r(n){e(n.instance)}if(Ae(),c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){D(`Module.instantiateWasm callback failed with error: ${n}`),Z(n)}return Y||(Y=Fe()),Oe(N,Y,t,r).catch(Z),{}}var pt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;class Ee{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){f[this.ptr+4>>2]=e}get_type(){return f[this.ptr+4>>2]}set_destructor(e){f[this.ptr+8>>2]=e}get_destructor(){return f[this.ptr+8>>2]}set_caught(e){e=e?1:0,S[this.ptr+12]=e}get_caught(){return S[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,S[this.ptr+13]=e}get_rethrown(){return S[this.ptr+13]!=0}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){f[this.ptr+16>>2]=e}get_adjusted_ptr(){return f[this.ptr+16>>2]}get_exception_ptr(){if(se(this.get_type()))return f[this.excPtr>>2];var e=this.get_adjusted_ptr();return e!==0?e:this.excPtr}}var Re=(t,e,r)=>{throw new Ee(t).init(e,r),t},De=()=>{xt("")},tt={},ht=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function q(t){return this.fromWireType(f[t>>2])}var Ut,Bt,V,H={},R={},et={},rt=t=>{throw new Ut(t)},O=(t,e,r)=>{function n(i){var s=r(i);s.length!==t.length&&rt("Mismatched type converter count");for(var l=0;l{R.hasOwnProperty(i)?a[s]=R[i]:(o.push(i),H.hasOwnProperty(i)||(H[i]=[]),H[i].push(()=>{a[s]=R[i],++u===o.length&&n(a)}))}),o.length===0&&n(a)},xe=t=>{var e=tt[t];delete tt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));O([t],o,u=>{var i={};return a.forEach((s,l)=>{var p=s.fieldName,h=u[l],v=s.getter,y=s.getterContext,T=u[l+a.length],B=s.setter,j=s.setterContext;i[p]={read:k=>h.fromWireType(v(y,k)),write:(k,Q)=>{var w=[];B(j,k,T.toWireType(w,Q)),ht(w)}}}),[{name:e.name,fromWireType:s=>{var l={};for(var p in i)l[p]=i[p].read(s);return n(s),l},toWireType:(s,l)=>{for(var p in i)if(!(p in l))throw new TypeError(`Missing field: "${p}"`);var h=r();for(p in i)i[p].write(h,l[p]);return s!==null&&s.push(n,h),h},argPackAdvance:P,readValueFromPointer:q,destructorFunction:n}]})},Ie=(t,e,r,n,a)=>{},Ve=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Bt=t},m=t=>{for(var e="",r=t;g[r];)e+=Bt[g[r++]];return e},d=t=>{throw new V(t)};function He(t,e,r={}){var n=e.name;if(t||d(`type "${n}" must have a positive integer typeid pointer`),R.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;d(`Cannot register type '${n}' twice`)}if(R[t]=e,delete et[t],H.hasOwnProperty(t)){var a=H[t];delete H[t],a.forEach(o=>o())}}function C(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return He(t,e,r)}var G,P=8,Ue=(t,e,r,n)=>{C(t,{name:e=m(e),fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:P,readValueFromPointer:function(a){return this.fromWireType(g[a])},destructorFunction:null})},Be=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),dt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}d(e(t)+" instance already deleted")},ft=!1,Nt=t=>{},Ne=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Mt=t=>{t.count.value-=1,t.count.value===0&&Ne(t)},zt=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=zt(t,e,r.baseClass);return n===null?null:r.downcast(n)},qt={},Me=()=>Object.keys(J).length,ze=()=>{var t=[];for(var e in J)J.hasOwnProperty(e)&&t.push(J[e]);return t},L=[],vt=()=>{for(;L.length;){var t=L.pop();t.$$.deleteScheduled=!1,t.delete()}},qe=t=>{G=t,L.length&&G&&G(vt)},Ge=()=>{c.getInheritedInstanceCount=Me,c.getLiveInheritedInstances=ze,c.flushPendingDeletes=vt,c.setDelayFunction=qe},J={},Le=(t,e)=>{for(e===void 0&&d("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Je=(t,e)=>(e=Le(t,e),J[e]),nt=(t,e)=>(e.ptrType&&e.ptr||rt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&rt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},K(Object.create(t,{$$:{value:e,writable:!0}})));function Ke(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Je(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?nt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):nt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o,u=this.registeredClass.getActualType(e),i=qt[u];if(!i)return a.call(this);o=this.isConst?i.constPointerType:i.pointerType;var s=zt(e,this.registeredClass,o.registeredClass);return s===null?a.call(this):this.isSmartPointer?nt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:t}):nt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var K=t=>typeof FinalizationRegistry>"u"?(K=e=>e,t):(ft=new FinalizationRegistry(e=>{Mt(e.$$)}),K=e=>{var r=e.$$;if(r.smartPtr){var n={$$:r};ft.register(e,n,e)}return e},Nt=e=>ft.unregister(e),K(t)),Qe=()=>{Object.assign(at.prototype,{isAliasOf(t){if(!(this instanceof at)||!(t instanceof at))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||dt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=K(Object.create(Object.getPrototypeOf(this),{$$:{value:Be(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&d("Object already scheduled for deletion"),Nt(this),Mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||dt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&d("Object already scheduled for deletion"),L.push(this),L.length===1&&G&&G(vt),this.$$.deleteScheduled=!0,this}})};function at(){}var U=(t,e)=>Object.defineProperty(e,"name",{value:t}),Gt=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(...a){return t[e].overloadTable.hasOwnProperty(a.length)||d(`Function '${r}' called with an invalid number of arguments (${a.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[a.length].apply(this,a)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},yt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&d(`Cannot register public name '${t}' twice`),Gt(c,t,t),c.hasOwnProperty(r)&&d(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},Ze=48,Xe=57,Ye=t=>{if(t===void 0)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=Ze&&e<=Xe?`_${t}`:t};function tr(t,e,r,n,a,o,u,i){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=i,this.pureVirtualFunctions=[]}var mt=(t,e,r)=>{for(;e!==r;)e.upcast||d(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function er(t,e){if(e===null)return this.isReference&&d(`null is not a valid ${this.name}`),0;e.$$||d(`Cannot pass "${Ct(e)}" as a ${this.name}`),e.$$.ptr||d(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass;return mt(e.$$.ptr,r,this.registeredClass)}function rr(t,e){var r;if(e===null)return this.isReference&&d(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e&&e.$$||d(`Cannot pass "${Ct(e)}" as a ${this.name}`),e.$$.ptr||d(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&d(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=mt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&d("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:d(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,$.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:d("Unsupporting sharing policy")}return r}function nr(t,e){if(e===null)return this.isReference&&d(`null is not a valid ${this.name}`),0;e.$$||d(`Cannot pass "${Ct(e)}" as a ${this.name}`),e.$$.ptr||d(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&d(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass;return mt(e.$$.ptr,r,this.registeredClass)}var ar=()=>{Object.assign(ot.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)==null||e.call(this,t)},argPackAdvance:P,readValueFromPointer:q,fromWireType:Ke})};function ot(t,e,r,n,a,o,u,i,s,l,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=i,this.rawConstructor=s,this.rawShare=l,this.rawDestructor=p,a||e.baseClass!==void 0?this.toWireType=rr:n?(this.toWireType=er,this.destructorFunction=null):(this.toWireType=nr,this.destructorFunction=null)}var Lt,Jt,Kt=(t,e,r)=>{c.hasOwnProperty(t)||rt("Replacing nonexistent public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},or=(t,e,r)=>(t=t.replace(/p/g,"i"),(0,c["dynCall_"+t])(e,...r)),it=[],Qt=t=>{var e=it[t];return e||(t>=it.length&&(it.length=t+1),it[t]=e=Lt.get(t)),e},ir=(t,e,r=[])=>t.includes("j")?or(t,e,r):Qt(e)(...r),sr=(t,e)=>(...r)=>ir(t,e,r),b=(t,e)=>{function r(){return t.includes("j")?sr(t,e):Qt(e)}t=m(t);var n=r();return typeof n!="function"&&d(`unknown function pointer with signature ${t}: ${e}`),n},ur=(t,e)=>{var r=U(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` +`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Zt=t=>{var e=ie(t),r=m(e);return _(e),r},st=(t,e)=>{var r=[],n={};function a(o){n[o]||R[o]||(et[o]?et[o].forEach(a):(r.push(o),n[o]=!0))}throw e.forEach(a),new Jt(`${t}: `+r.map(Zt).join([", "]))},cr=(t,e,r,n,a,o,u,i,s,l,p,h,v)=>{p=m(p),o=b(a,o),i&&(i=b(u,i)),l&&(l=b(s,l)),v=b(h,v);var y=Ye(p);yt(y,function(){st(`Cannot construct ${p} due to unbound types`,[n])}),O([t,e,r],n?[n]:[],T=>{var pe;var B,j;T=T[0],j=n?(B=T.registeredClass).instancePrototype:at.prototype;var k=U(p,function(...At){if(Object.getPrototypeOf(this)!==Q)throw new V("Use 'new' to construct "+p);if(w.constructor_body===void 0)throw new V(p+" has no accessible constructor");var he=w.constructor_body[At.length];if(he===void 0)throw new V(`Tried to invoke ctor of ${p} with invalid number of parameters (${At.length}) - expected (${Object.keys(w.constructor_body).toString()}) parameters instead!`);return he.apply(this,At)}),Q=Object.create(j,{constructor:{value:k}});k.prototype=Q;var w=new tr(p,k,Q,v,B,o,i,l);w.baseClass&&((pe=w.baseClass).__derivedClasses??(pe.__derivedClasses=[]),w.baseClass.__derivedClasses.push(w));var hn=new ot(p,w,!0,!1,!1),ce=new ot(p+"*",w,!1,!1,!1),le=new ot(p+" const*",w,!1,!0,!1);return qt[t]={pointerType:ce,constPointerType:le},Kt(y,k),[hn,ce,le]})},gt=(t,e)=>{for(var r=[],n=0;n>2]);return r};function Xt(t){for(var e=1;e0?", ":"")+i),l+=(r||n?"var rv = ":"")+"invoker(fn"+(i.length>0?", ":"")+i+`); +`,a)l+=`runDestructors(destructors); +`;else for(s=e?1:2;s{var u=gt(e,r);a=b(n,a),O([],[t],i=>{var s=`constructor ${(i=i[0]).name}`;if(i.registeredClass.constructor_body===void 0&&(i.registeredClass.constructor_body=[]),i.registeredClass.constructor_body[e-1]!==void 0)throw new V(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${i.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return i.registeredClass.constructor_body[e-1]=()=>{st(`Cannot construct ${i.name} due to unbound types`,u)},O([],u,l=>(l.splice(1,0,null),i.registeredClass.constructor_body[e-1]=$t(s,l,null,a,o),[])),[]})},te=t=>{const e=(t=t.trim()).indexOf("(");return e!==-1?t.substr(0,e):t},hr=(t,e,r,n,a,o,u,i,s)=>{var l=gt(r,n);e=m(e),e=te(e),o=b(a,o),O([],[t],p=>{var h=`${(p=p[0]).name}.${e}`;function v(){st(`Cannot call ${h} due to unbound types`,l)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),i&&p.registeredClass.pureVirtualFunctions.push(e);var y=p.registeredClass.instancePrototype,T=y[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(v.argCount=r-2,v.className=p.name,y[e]=v):(Gt(y,e,h),y[e].overloadTable[r-2]=v),O([],l,B=>{var j=$t(h,B,p,o,u,s);return y[e].overloadTable===void 0?(j.argCount=r-2,y[e]=j):y[e].overloadTable[r-2]=j,[]}),[]})},dr=(t,e,r)=>{t=m(t),O([],[e],n=>(n=n[0],c[t]=n.fromWireType(r),[]))},wt=[],W=[],Tt=t=>{t>9&&--W[t+1]==0&&(W[t]=void 0,wt.push(t))},fr=()=>W.length/2-5-wt.length,vr=()=>{W.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=fr},$={toValue:t=>(t||d("Cannot use deleted val. handle = "+t),W[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=wt.pop()||W.length;return W[e]=t,W[e+1]=1,e}}}},yr={name:"emscripten::val",fromWireType:t=>{var e=$.toValue(t);return Tt(t),e},toWireType:(t,e)=>$.toHandle(e),argPackAdvance:P,readValueFromPointer:q,destructorFunction:null},mr=t=>C(t,yr),gr=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(S[n])}:function(n){return this.fromWireType(g[n])};case 2:return r?function(n){return this.fromWireType(x[n>>1])}:function(n){return this.fromWireType(M[n>>1])};case 4:return r?function(n){return this.fromWireType(I[n>>2])}:function(n){return this.fromWireType(f[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},$r=(t,e,r,n)=>{function a(){}e=m(e),a.values={},C(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,u)=>u.value,argPackAdvance:P,readValueFromPointer:gr(e,r,n),destructorFunction:null}),yt(e,a)},bt=(t,e)=>{var r=R[t];return r===void 0&&d(`${e} has unknown type ${Zt(t)}`),r},wr=(t,e,r)=>{var n=bt(t,"enum");e=m(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:U(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},Ct=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Tr=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(St[r>>2])};case 8:return function(r){return this.fromWireType(Ot[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},br=(t,e,r)=>{C(t,{name:e=m(e),fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:P,readValueFromPointer:Tr(e,r),destructorFunction:null})},Cr=(t,e,r,n,a,o,u)=>{var i=gt(e,r);t=m(t),t=te(t),a=b(n,a),yt(t,function(){st(`Cannot call ${t} due to unbound types`,i)},e-1),O([],i,s=>{var l=[s[0],null].concat(s.slice(1));return Kt(t,$t(t,l,null,a,o,u),e-1),[]})},Pr=(t,e,r)=>{switch(e){case 1:return r?n=>S[n]:n=>g[n];case 2:return r?n=>x[n>>1]:n=>M[n>>1];case 4:return r?n=>I[n>>2]:n=>f[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ar=(t,e,r,n,a)=>{e=m(e);var o=l=>l;if(n===0){var u=32-8*r;o=l=>l<>>u}var i=e.includes("unsigned"),s=(l,p)=>{};C(t,{name:e,fromWireType:o,toWireType:i?function(l,p){return s(p,this.name),p>>>0}:function(l,p){return s(p,this.name),p},argPackAdvance:P,readValueFromPointer:Pr(e,r,n!==0),destructorFunction:null})},Wr=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(o){var u=f[o>>2],i=f[o+4>>2];return new n(S.buffer,i,u)}C(t,{name:r=m(r),fromWireType:a,argPackAdvance:P,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},_r=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&t.charCodeAt(++u)),i<=127){if(r>=o)break;e[r++]=i}else if(i<=2047){if(r+1>=o)break;e[r++]=192|i>>6,e[r++]=128|63&i}else if(i<=65535){if(r+2>=o)break;e[r++]=224|i>>12,e[r++]=128|i>>6&63,e[r++]=128|63&i}else{if(r+3>=o)break;e[r++]=240|i>>18,e[r++]=128|i>>12&63,e[r++]=128|i>>6&63,e[r++]=128|63&i}}return e[r]=0,r-a},Fr=(t,e,r)=>_r(t,g,e,r),Sr=t=>{for(var e=0,r=0;r=55296&&n<=57343?(e+=4,++r):e+=3}return e},ee=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,re=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&ee)return ee.decode(t.subarray(e,a));for(var o="";e>10,56320|1023&l)}}else o+=String.fromCharCode((31&u)<<6|i)}else o+=String.fromCharCode(u)}return o},Or=(t,e)=>t?re(g,t,e):"",jr=(t,e)=>{var r=(e=m(e))==="std::string";C(t,{name:e,fromWireType(n){var a,o=f[n>>2],u=n+4;if(r)for(var i=u,s=0;s<=o;++s){var l=u+s;if(s==o||g[l]==0){var p=Or(i,l-i);a===void 0?a=p:(a+="\0",a+=p),i=l+1}}else{var h=new Array(o);for(s=0;s>2]=o,r&&u)Fr(a,s,o+1);else if(u)for(var l=0;l255&&(_(s),d("String has UTF-16 code units that do not fit in 8 bits")),g[s+l]=p}else for(l=0;l{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&M[n];)++n;if((r=n<<1)-t>32&&ne)return ne.decode(g.subarray(t,r));for(var o="",u=0;!(u>=e/2);++u){var i=x[t+2*u>>1];if(i==0)break;o+=String.fromCharCode(i)}return o},Er=(t,e,r)=>{if(r??(r=2147483647),r<2)return 0;for(var n=e,a=(r-=2)<2*t.length?r/2:t.length,o=0;o>1]=u,e+=2}return x[e>>1]=0,e-n},Rr=t=>2*t.length,Dr=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=I[t+4*r>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},xr=(t,e,r)=>{if(r??(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&t.charCodeAt(++o)),I[e>>2]=u,(e+=4)+4>a)break}return I[e>>2]=0,e-n},Ir=t=>{for(var e=0,r=0;r=55296&&n<=57343&&++r,e+=4}return e},Vr=(t,e,r)=>{var n,a,o,u;r=m(r),e===2?(n=kr,a=Er,u=Rr,o=i=>M[i>>1]):e===4&&(n=Dr,a=xr,u=Ir,o=i=>f[i>>2]),C(t,{name:r,fromWireType:i=>{for(var s,l=f[i>>2],p=i+4,h=0;h<=l;++h){var v=i+4+h*e;if(h==l||o(v)==0){var y=n(p,v-p);s===void 0?s=y:(s+="\0",s+=y),p=v+e}}return _(i),s},toWireType:(i,s)=>{typeof s!="string"&&d(`Cannot pass non-string to C++ string type ${r}`);var l=u(s),p=Pt(4+l+e);return f[p>>2]=l/e,a(s,p+4,l+e),i!==null&&i.push(_,p),p},argPackAdvance:P,readValueFromPointer:q,destructorFunction(i){_(i)}})},Hr=(t,e,r,n,a,o)=>{tt[t]={name:m(e),rawConstructor:b(r,n),rawDestructor:b(a,o),fields:[]}},Ur=(t,e,r,n,a,o,u,i,s,l)=>{tt[t].fields.push({fieldName:m(e),getterReturnType:r,getter:b(n,a),getterContext:o,setterArgumentType:u,setter:b(i,s),setterContext:l})},Br=(t,e)=>{C(t,{isVoid:!0,name:e=m(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Nr=(t,e,r)=>g.copyWithin(t,e,e+r),ae=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(f[e>>2]=$.toHandle(n)),a},Mr=(t,e,r)=>(t=$.toValue(t),e=bt(e,"emval::as"),ae(e,r,t)),ut=[],zr=(t,e,r,n)=>(t=ut[t])(null,e=$.toValue(e),r,n),qr={},ct=t=>{var e=qr[t];return e===void 0?m(t):e},Gr=(t,e,r,n,a)=>(t=ut[t])(e=$.toValue(e),e[r=ct(r)],n,a),oe=()=>typeof globalThis=="object"?globalThis:Function("return this")(),Lr=t=>t===0?$.toHandle(oe()):(t=ct(t),$.toHandle(oe()[t])),Jr=t=>{var e=ut.length;return ut.push(t),e},Kr=(t,e)=>{for(var r=new Array(t),n=0;n>2],"parameter "+n);return r},Qr=(t,e,r)=>{var n=Kr(t,e),a=n.shift();t--;var o=`return function (obj, func, destructorsRef, args) { +`,u=0,i=[];r===0&&i.push("obj");for(var s=["retType"],l=[a],p=0;py.name).join(", ")}) => ${a.name}>`;return Jr(U(v,h))},Zr=t=>(t=ct(t),$.toHandle(c[t])),Xr=(t,e)=>(t=$.toValue(t),e=$.toValue(e),$.toHandle(t[e])),Yr=t=>{t>9&&(W[t+1]+=1)},tn=t=>$.toHandle(ct(t)),en=t=>{var e=$.toValue(t);ht(e),Tt(t)},rn=()=>2147483648,nn=t=>{var e=(t-X.buffer.byteLength+65535)/65536;try{return X.grow(e),kt(),1}catch{}},an=t=>{var e=g.length;t>>>=0;var r=rn();if(t>r)return!1;for(var n=(i,s)=>i+(s-i%s)%s,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var u=Math.min(r,n(Math.max(t,o),65536));if(nn(u))return!0}return!1},on=t=>52;function sn(t,e,r,n,a){return 70}var un=[null,[],[]],cn=(t,e)=>{var r=un[t];e===0||e===10?((t===1?ge:D)(re(r,0)),r.length=0):r.push(e)},ln=(t,e,r,n)=>{for(var a=0,o=0;o>2],i=f[e+4>>2];e+=8;for(var s=0;s>2]=a,0};Ut=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Ve(),V=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Qe(),Ge(),ar(),Jt=c.UnboundTypeError=ur(Error,"UnboundTypeError"),vr();var lt,pn={K:Re,G:De,s:xe,C:Ie,I:Ue,w:cr,v:pr,d:hr,m:dr,H:mr,o:$r,a:wr,A:br,k:Cr,l:Ar,f:Wr,z:jr,u:Vr,t:Hr,c:Ur,J:Br,F:Nr,n:Mr,q:zr,p:Gr,b:Tt,x:Lr,i:Qr,r:Zr,g:Xr,j:Yr,h:tn,e:en,D:an,E:on,B:sn,y:ln},A=ke(),ie=t=>(ie=A.N)(t),Pt=t=>(Pt=A.O)(t),_=t=>(_=A.P)(t),se=t=>(se=A.R)(t);function ue(){function t(){lt||(lt=!0,c.calledRun=!0,jt||(we(),_t(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Te()))}E>0||($e(),E>0||(c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()))}if(c.dynCall_jiji=(t,e,r,n,a)=>(c.dynCall_jiji=A.S)(t,e,r,n,a),z=function t(){lt||ue(),lt||(z=t)},c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return ue(),ve});export{dn as default}; diff --git a/build/assets/calcite-button-tKmnUUcr.js b/build/assets/calcite-button-tKmnUUcr.js new file mode 100644 index 0000000..740fcf5 --- /dev/null +++ b/build/assets/calcite-button-tKmnUUcr.js @@ -0,0 +1,19 @@ +import{p as v,H as g,dp as f,dq as k,b as a}from"./index-DKOmzAMm.js";import{s as m,r as x,f as w,u as y,I as z}from"./interactive-DaeLV7oq.js";import{c as C,d as E,g as L}from"./label-CXw43uCP.js";import{a as S,b as i,c as T,e as O,d as F,f as M,s as R,g as I,h as B,i as H,u as j}from"./icon-ifbWMk17.js";import{b as c,t as A}from"./component-BUnDTGFH.js";import{d as P}from"./loader-6rdpjGpy.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},_=`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc( + 2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}:host button,:host a{--calcite-button-content-margin-internal:0.5rem;--calcite-button-padding-x-internal:7px;--calcite-button-padding-y-internal:3px;padding-block:var(--calcite-button-padding-y-internal);padding-inline:var(--calcite-button-padding-x-internal);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{text-decoration-line:none}:host button span,:host a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{margin-inline:var(--calcite-button-content-margin-internal)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin-internal:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin-internal:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-button-content-margin-internal)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-button-content-margin-internal)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{border-width:1px;border-style:solid;border-color:transparent}:host([kind=brand]) button,:host([kind=brand]) a{background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) button:focus,:host([kind=brand]) a:hover,:host([kind=brand]) a:focus{background-color:var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{background-color:var(--calcite-color-brand-press)}:host([kind=brand]) button calcite-loader,:host([kind=brand]) a calcite-loader{color:var(--calcite-color-text-inverse)}:host([kind=danger]) button,:host([kind=danger]) a{background-color:var(--calcite-color-status-danger);color:var(--calcite-color-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) button:focus,:host([kind=danger]) a:hover,:host([kind=danger]) a:focus{background-color:var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{background-color:var(--calcite-color-status-danger-press)}:host([kind=danger]) button calcite-loader,:host([kind=danger]) a calcite-loader{color:var(--calcite-color-text-inverse)}:host([kind=neutral]) button,:host([kind=neutral]) a{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) button:focus,:host([kind=neutral]) a:hover,:host([kind=neutral]) a:focus{background-color:var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{background-color:var(--calcite-color-foreground-1)}:host([kind=neutral]) button calcite-loader,:host([kind=neutral]) a calcite-loader{color:var(--calcite-color-text-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) button:focus,:host([kind=inverse]) a:hover,:host([kind=inverse]) a:focus{background-color:var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{background-color:var(--calcite-color-inverse-press)}:host([kind=inverse]) button calcite-loader,:host([kind=inverse]) a calcite-loader{color:var(--calcite-color-text-inverse)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-width:1px;border-style:solid;background-color:var(--calcite-color-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{border-color:var(--calcite-color-brand);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{border-color:var(--calcite-color-brand-hover);color:var(--calcite-color-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{border-color:var(--calcite-color-brand);color:var(--calcite-color-brand);box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{border-color:var(--calcite-color-brand-press);color:var(--calcite-color-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{color:var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{border-color:var(--calcite-color-status-danger);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{border-color:var(--calcite-color-status-danger-hover);color:var(--calcite-color-status-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{border-color:var(--calcite-color-status-danger);color:var(--calcite-color-status-danger);box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{border-color:var(--calcite-color-status-danger-press);color:var(--calcite-color-status-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{color:var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);border-color:var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button calcite-loader,:host([appearance=outline-fill][kind=neutral]) a calcite-loader{color:var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);border-color:var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{border-color:var(--calcite-color-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{border-color:var(--calcite-color-inverse);box-shadow:inset 0 0 0 2px var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{border-color:var(--calcite-color-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-color-inverse-press)}:host([appearance=outline-fill][kind=inverse]) button calcite-loader,:host([appearance=outline-fill][kind=inverse]) a calcite-loader{color:var(--calcite-color-text-1)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{border-color:var(--calcite-color-brand);background-color:transparent;color:var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{border-color:var(--calcite-color-brand-hover);color:var(--calcite-color-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{border-color:var(--calcite-color-brand);color:var(--calcite-color-brand);box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{border-color:var(--calcite-color-brand-press);color:var(--calcite-color-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{color:var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{border-color:var(--calcite-color-status-danger);background-color:transparent;color:var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{border-color:var(--calcite-color-status-danger-hover);color:var(--calcite-color-status-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{border-color:var(--calcite-color-status-danger);color:var(--calcite-color-status-danger);box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{border-color:var(--calcite-color-status-danger-press);color:var(--calcite-color-status-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{color:var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{background-color:transparent;color:var(--calcite-color-text-1);border-color:var(--calcite-color-border-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button calcite-loader,:host([appearance=outline][kind=neutral]) a calcite-loader{color:var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{background-color:transparent;color:var(--calcite-color-text-1);border-color:var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{border-color:var(--calcite-color-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{border-color:var(--calcite-color-inverse);box-shadow:inset 0 0 0 2px var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{border-color:var(--calcite-color-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-color-inverse-press)}:host([appearance=outline][kind=inverse]) button calcite-loader,:host([appearance=outline][kind=inverse]) a calcite-loader{color:var(--calcite-color-text-1)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{color:var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{color:var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{color:var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{color:var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{color:var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{color:var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{color:var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{color:var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{color:var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{color:var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-color-text-3);border-block-start-color:var(--calcite-color-border-input);border-block-end-color:var(--calcite-color-border-input);border-block-style:solid}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y-internal:0}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{color:var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button,:host([appearance=transparent][kind=inverse]) a,:host([appearance=transparent][kind=inverse]) calcite-loader{color:var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-button-padding-y-internal:3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x-internal:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-padding-y-internal:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x-internal:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-button-padding-x-internal:1rem;--calcite-button-padding-y-internal:11px}:host([scale=l]) .button-padding--shrunk{--calcite-button-padding-y-internal:9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y-internal:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,D=_,l=v(class extends g{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.mutationObserver=i("mutation",()=>this.updateHasContent()),this.resizeObserver=i("resize",()=>this.setTooltipText()),this.handleClick=()=>{const{type:t}=this;this.href||(t==="submit"?m(this):t==="reset"&&x(this))},this.setTooltipText=()=>{const{contentEl:t}=this;t&&(this.tooltipText=t.offsetWidth{var n;this.childEl=t,t&&((n=this.resizeObserver)==null||n.observe(t))},this.alignment="center",this.appearance="solid",this.label=void 0,this.kind="brand",this.disabled=!1,this.form=void 0,this.download=!1,this.href=void 0,this.iconEnd=void 0,this.iconFlipRtl=void 0,this.iconStart=void 0,this.loading=!1,this.name=void 0,this.rel=void 0,this.round=!1,this.scale="m",this.splitChild=!1,this.target=void 0,this.type="button",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.hasContent=!1,this.effectiveLocale="",this.defaultMessages=void 0,this.tooltipText=void 0}handleGlobalAttributesChanged(){f(this)}onMessagesChange(){}async connectedCallback(){T(this),O(this),this.setupTextContentObserver(),C(this),this.formEl=w(this)}disconnectedCallback(){var t,n;(t=this.mutationObserver)==null||t.disconnect(),E(this),F(this),M(this),(n=this.resizeObserver)==null||n.disconnect(),this.formEl=null}async componentWillLoad(){R(this),k()&&(this.updateHasContent(),await I(this))}componentDidLoad(){B(this),this.setTooltipText()}componentDidRender(){y(this)}render(){const t=this.href?"a":"button",n=t,o=this.loading?a("div",{class:e.buttonLoader},a("calcite-loader",{class:this.loading?e.loadingIn:e.loadingOut,inline:!0,label:this.messages.loading,scale:this.scale==="l"?"m":"s"})):null,r=!this.iconStart&&!this.iconEnd,u=a("calcite-icon",{key:"f1036c0a1bf5740fe63806e3559ea66fac29b726",class:{[e.icon]:!0,[e.iconStart]:!0},flipRtl:this.iconFlipRtl==="start"||this.iconFlipRtl==="both",icon:this.iconStart,scale:c(this.scale)}),h=a("calcite-icon",{key:"d2c22ecf9ca23426b4c4a3b42d623f35ee988a44",class:{[e.icon]:!0,[e.iconEnd]:!0},flipRtl:this.iconFlipRtl==="end"||this.iconFlipRtl==="both",icon:this.iconEnd,scale:c(this.scale)}),p=a("span",{key:"d1803021f5fa106c9e296402ec0a1498ecdf36c7",class:e.content,ref:b=>this.contentEl=b},a("slot",{key:"d2f729c16f9c803ffa109b68d58a22a4383dd426"}));return a(z,{key:"2757c795d29f812cf11def4df108837b9971dcdb",disabled:this.disabled},a(n,{key:"e67a4882c8a0c13d6b5f98bc8c5b53c10ba36e3e","aria-busy":A(this.loading),"aria-expanded":this.el.ariaExpanded?this.el.ariaExpanded:null,"aria-label":this.loading?this.messages.loading:L(this),"aria-live":"polite",class:{[e.buttonPadding]:r,[e.buttonPaddingShrunk]:!r,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd},disabled:t==="button"?this.disabled:null,download:t==="a"?this.download===!0||this.download===""?"":this.download||null:null,href:t==="a"&&this.href,name:t==="button"&&this.name,onClick:this.handleClick,ref:this.setChildEl,rel:t==="a"&&this.rel,tabIndex:this.disabled?-1:null,target:t==="a"&&this.target,title:this.tooltipText,type:t==="button"&&this.type},o,this.iconStart?u:null,this.hasContent?p:null,this.iconEnd?h:null))}async setFocus(){var t;await H(this),(t=this.childEl)==null||t.focus()}effectiveLocaleChange(){j(this,this.effectiveLocale)}updateHasContent(){var n,o;const t=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=this.el.childNodes.length===1&&((n=this.el.childNodes[0])==null?void 0:n.nodeName)==="#text"?((o=this.el.textContent)==null?void 0:o.trim().length)>0:t}setupTextContentObserver(){var t;(t=this.mutationObserver)==null||t.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{"aria-expanded":["handleGlobalAttributesChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return D}},[1,"calcite-button",{alignment:[513],appearance:[513],label:[1],kind:[513],disabled:[516],form:[513],download:[520],href:[513],iconEnd:[513,"icon-end"],iconFlipRtl:[513,"icon-flip-rtl"],iconStart:[513,"icon-start"],loading:[516],name:[513],rel:[513],round:[516],scale:[513],splitChild:[520,"split-child"],target:[513],type:[513],width:[513],messages:[1040],messageOverrides:[1040],hasContent:[32],effectiveLocale:[32],defaultMessages:[32],tooltipText:[32],setFocus:[64]},void 0,{"aria-expanded":["handleGlobalAttributesChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}]);function s(){if(typeof customElements>"u")return;["calcite-button","calcite-icon","calcite-loader"].forEach(t=>{switch(t){case"calcite-button":customElements.get(t)||customElements.define(t,l);break;case"calcite-icon":customElements.get(t)||S();break;case"calcite-loader":customElements.get(t)||P();break}})}s();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const K=l,Q=s;export{K as CalciteButton,Q as defineCustomElement}; diff --git a/build/assets/calcite-input-D7abHyRn.js b/build/assets/calcite-input-D7abHyRn.js new file mode 100644 index 0000000..2f25659 --- /dev/null +++ b/build/assets/calcite-input-D7abHyRn.js @@ -0,0 +1,55 @@ +import{b as n,p as z,H as I,c as L,h2 as T,dr as y,dp as K}from"./index-DKOmzAMm.js";import{s as x,u as O,v as W,d as j,b as v,t as V}from"./component-BUnDTGFH.js";import{s as R,c as q,i as C,d as $,u as _,I as G,H as Y}from"./interactive-DaeLV7oq.js";import{a as M,b as Z,n as u,j as b,p as J,k as Q,l as X,u as ee,c as te,e as ie,d as ne,f as ae,s as se,g as oe,h as re,i as le,B as ce,m as ue}from"./icon-ifbWMk17.js";import{c as de,d as he,g as S}from"./label-CXw43uCP.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const pe={validationContainer:"validation-container"},be=({scale:r,status:e,id:t,icon:i,message:s})=>n("div",{class:pe.validationContainer},n("calcite-input-message",{"aria-live":"polite",icon:i,id:t,scale:r,status:e},s));/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const me=["date","datetime-local","month","number","range","time","week"],fe=["email","password","search","tel","text","url"],ge=["email","password","search","tel","text","textarea","url"];function g(r,e,t,i){const s=t.toLowerCase(),a=r[t];i&&a!=null?e.setAttribute(s,`${a}`):e.removeAttribute(s)}function ve(r,e,t){t.type=r==="textarea"?"text":r;const i=me.includes(r),s=e;g(s,t,"min",i),g(s,t,"max",i),g(s,t,"step",i);const a=ge.includes(r),l=e;g(l,t,"minLength",a),g(l,t,"maxLength",a);const d=fe.includes(r);g(l,t,"pattern",d)}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const H={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},ye=":host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;--calcite-input-message-spacing-value:0.25rem;margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-color-status-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-color-status-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-color-status-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-color-brand)}:host([scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([scale=m]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}",xe=ye,ke=z(class extends I{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=x(H,this.icon,this.status)}connectedCallback(){this.requestedIcon=x(H,this.icon,this.status)}render(){const e=this.el.hidden;return n(L,{key:"c7d1b37721cec28dee1020b81ff66dee7fc8bc44","calcite-hydrated-hidden":e},this.renderIcon(this.requestedIcon),n("slot",{key:"7147d81e906765c154b4a61e31706a72c1ef3ae0"}))}renderIcon(e){if(e)return n("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:e,scale:"s"})}get el(){return this}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}static get style(){return xe}},[1,"calcite-input-message",{icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],scale:[513],status:[513]},void 0,{status:["handleIconEl"],icon:["handleIconEl"]}]);function B(){if(typeof customElements>"u")return;["calcite-input-message","calcite-icon"].forEach(e=>{switch(e){case"calcite-input-message":customElements.get(e)||customElements.define(e,ke);break;case"calcite-icon":customElements.get(e)||M();break}})}B();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const we=":host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media (forced-colors: active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(600%, 0, 0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(-600%, 0, 0)}}:host([hidden]){display:none}[hidden]{display:none}",ze=we,Ie=z(class extends I{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.type="determinate",this.value=0,this.label=void 0,this.text=void 0,this.reversed=!1}render(){const t=this.type==="determinate"?{width:`${this.value*100}%`}:{},i=O(this.el);return n("div",{key:"92597fefec948e4494425db28cd87bfad3cc76f8","aria-label":this.label||this.text,"aria-valuemax":1,"aria-valuemin":0,"aria-valuenow":this.value,role:"progressbar"},n("div",{key:"d2a8ec085909b4bd35f443d0e831d645fb159317",class:"track"},n("div",{key:"2dd26e56a0f344d02f1b4068167f61d9da4d2cbd",class:{bar:!0,indeterminate:this.type==="indeterminate",[T.rtl]:i==="rtl",reversed:this.reversed},style:t})),this.text?n("div",{class:"text"},this.text):null)}get el(){return this}static get style(){return ze}},[1,"calcite-progress",{type:[513],value:[2],label:[1],text:[1],reversed:[516]}]);function A(){if(typeof customElements>"u")return;["calcite-progress"].forEach(e=>{switch(e){case"calcite-progress":customElements.get(e)||customElements.define(e,Ie);break}})}A();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const o={loader:"loader",clearButton:"clear-button",editingEnabled:"editing-enabled",inlineChild:"inline-child",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",resizeIconWrapper:"resize-icon-wrapper",numberButtonItem:"number-button-item"},w={validationMessage:"inputValidationMessage"},D={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},Ee={action:"action"},Ve=`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) textarea{block-size:1.5rem;min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) input[type=file]{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:0.25rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) input[type=file]{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) input[type=file]{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}textarea,input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-color-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-1)}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input,textarea{text-overflow:ellipsis;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);color:var(--calcite-color-text-1)}input:placeholder-shown,textarea:placeholder-shown{text-overflow:ellipsis}input:focus,textarea:focus{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1)}input[readonly],textarea[readonly]{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}input[readonly]:focus,textarea[readonly]:focus{color:var(--calcite-color-text-1)}calcite-icon{color:var(--calcite-color-text-3)}textarea,input{outline-color:transparent}textarea:focus,input:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc( + -2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc( + -2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.icon,.resize-icon-wrapper{z-index:var(--calcite-z-index)}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-color-foreground-2);transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-color-text-1);transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-color-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-color-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc( + -2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-color-text-2)}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto)}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto)}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0px}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-color-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-color-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-color-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-color-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-color-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-color-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-color-text-1)}.number-button-item:active{background-color:var(--calcite-color-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:input::-webkit-calendar-picker-indicator{display:none}input[type=date]::-webkit-input-placeholder{visibility:hidden !important}textarea::-webkit-resizer{position:absolute;inset-block-end:0px;box-sizing:border-box;padding-block:0px;padding-inline:0.25rem;inset-inline-end:0}.resize-icon-wrapper{inset-block-end:2px;inset-inline-end:2px;pointer-events:none;position:absolute;block-size:0.75rem;inline-size:0.75rem;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-3)}.resize-icon-wrapper calcite-icon{inset-block-end:0.25rem;inset-inline-end:0.25rem;transform:rotate(-45deg)}.calcite--rtl .resize-icon-wrapper calcite-icon{transform:rotate(45deg)}:host([type=color]) input{padding:0.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);text-align:center}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:0.5rem}:host([type=file][scale=m]) input{padding-block:0.25rem;padding-inline:0.75rem}:host([type=file][scale=l]) input{padding-block:0.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:0.5rem}:host([scale=s]) .validation-container{padding-block-start:0.25rem}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}`,Ce=Ve,N=z(class extends I{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteInternalInputFocus=y(this,"calciteInternalInputFocus",6),this.calciteInternalInputBlur=y(this,"calciteInternalInputBlur",6),this.calciteInputInput=y(this,"calciteInputInput",7),this.calciteInputChange=y(this,"calciteInputChange",6),this.childElType="input",this.previousValueOrigin="initial",this.mutationObserver=Z("mutation",()=>this.setDisabledAction()),this.userChangedValue=!1,this.keyDownHandler=e=>{this.readOnly||this.disabled||e.defaultPrevented||(this.isClearable&&e.key==="Escape"&&(this.clearInputValue(e),e.preventDefault()),e.key==="Enter"&&R(this)&&e.preventDefault())},this.clearInputValue=e=>{this.setValue({committing:!0,nativeEvent:e,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{this.previousValueOrigin==="user"&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))},this.inputBlurHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()},this.clickHandler=e=>{if(this.disabled)return;const t=e.composedPath();!t.includes(this.inputWrapperEl)||t.includes(this.actionWrapperEl)||this.setFocus()},this.inputFocusHandler=()=>{this.calciteInternalInputFocus.emit()},this.inputChangeHandler=()=>{this.type==="file"&&(this.files=this.childEl.files)},this.inputInputHandler=e=>{this.disabled||this.readOnly||this.setValue({nativeEvent:e,origin:"user",value:e.target.value})},this.inputKeyDownHandler=e=>{this.disabled||this.readOnly||e.key==="Enter"&&this.emitChangeIfUserModified()},this.inputNumberInputHandler=e=>{if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;const t=e.target.value;u.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const i=u.delocalize(t);e.inputType==="insertFromPaste"?(b(i)||e.preventDefault(),this.setValue({nativeEvent:e,origin:"user",value:J(i)}),this.childNumberEl.value=this.displayedValue):this.setValue({nativeEvent:e,origin:"user",value:i})},this.inputNumberKeyDownHandler=e=>{if(this.type!=="number"||this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){e.preventDefault(),(e.key==="Backspace"||e.key==="Delete")&&this.clearInputValue(e);return}if(e.key==="ArrowUp"){e.preventDefault(),this.nudgeNumberValue("up",e);return}if(e.key==="ArrowDown"){this.nudgeNumberValue("down",e);return}const t=[...ue,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&e.key==="Tab";if(t.includes(e.key)||i){e.key==="Enter"&&this.emitChangeIfUserModified();return}u.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(e.key===u.decimal&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.indexOf(u.decimal)===-1))&&(/[eE]/.test(e.key)&&(!this.value&&!this.childNumberEl.value||this.value&&!/[eE]/.test(this.childNumberEl.value))||e.key==="-"&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.split("-").length<=2)||e.preventDefault())},this.nudgeNumberValue=(e,t)=>{if(t instanceof KeyboardEvent&&t.repeat||this.type!=="number")return;const i=this.maxString?parseFloat(this.maxString):null,s=this.minString?parseFloat(this.minString):null,a=150;this.incrementOrDecrementNumberValue(e,i,s,t),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let l=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(l){l=!1;return}this.incrementOrDecrementNumberValue(e,i,s,t)},a)},this.numberButtonPointerUpAndOutHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.numberButtonPointerDownHandler=e=>{if(!W(e))return;e.preventDefault();const t=e.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)},this.onHiddenFormInputInput=e=>{e.target.name===this.name&&this.setValue({value:e.target.value,origin:"direct"}),this.setFocus(),e.stopPropagation()},this.setChildElRef=e=>{this.childEl=e},this.setChildNumberElRef=e=>{this.childNumberEl=e},this.setInputValue=e=>{this.type==="text"&&!this.childEl||this.type==="number"&&!this.childNumberEl||(this[`child${this.type==="number"?"Number":""}El`].value=e)},this.setPreviousEmittedValue=e=>{this.previousEmittedValue=this.normalizeValue(e)},this.setPreviousValue=e=>{this.previousValue=this.normalizeValue(e)},this.setValue=({committing:e=!1,nativeEvent:t,origin:i,previousValue:s,value:a})=>{var l,d;if(this.setPreviousValue(s??this.value),this.previousValueOrigin=i,this.type==="number"){u.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};const m=((l=this.previousValue)==null?void 0:l.length)>a.length||((d=this.value)==null?void 0:d.length)>a.length,h=a.charAt(a.length-1)===".",f=h&&m?a:Q(a),c=a&&!f?b(this.previousValue)?this.previousValue:"":f;let p=u.localize(c);i!=="connected"&&!h&&(p=X(p,c,u)),this.displayedValue=h&&m?`${p}${u.decimal}`:p,this.userChangedValue=i==="user"&&this.value!==c,this.value=["-","."].includes(c)?"":c}else this.userChangedValue=i==="user"&&this.value!==a,this.value=a;i==="direct"&&(this.setInputValue(a),this.previousEmittedValue=a),t&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=this.type==="number"?u.localize(this.previousValue):this.previousValue):e&&this.emitChangeIfUserModified())},this.inputKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.alignment="start",this.autofocus=void 0,this.clearable=!1,this.disabled=!1,this.enterKeyHint=void 0,this.form=void 0,this.groupSeparator=!1,this.icon=void 0,this.iconFlipRtl=!1,this.inputMode=void 0,this.label=void 0,this.loading=!1,this.numberingSystem=void 0,this.localeFormat=!1,this.max=void 0,this.min=void 0,this.maxLength=void 0,this.minLength=void 0,this.validationMessage=void 0,this.validationIcon=void 0,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.name=void 0,this.numberButtonType="vertical",this.placeholder=void 0,this.prefixText=void 0,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=void 0,this.autocomplete=void 0,this.pattern=void 0,this.accept=void 0,this.multiple=!1,this.suffixText=void 0,this.editingEnabled=!1,this.type="text",this.value="",this.files=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.displayedValue=void 0,this.slottedActionElDisabledInternally=!1}handleGlobalAttributesChanged(){K(this)}disabledWatcher(){this.setDisabledAction()}maxWatcher(){var e;this.maxString=((e=this.max)==null?void 0:e.toString())||null}minWatcher(){var e;this.minString=((e=this.min)==null?void 0:e.toString())||null}onMessagesChange(){}valueWatcher(e,t){if(!this.userChangedValue){if(this.type==="number"&&(e==="Infinity"||e==="-Infinity")){this.displayedValue=e,this.previousEmittedValue=e;return}this.setValue({origin:"direct",previousValue:t,value:e==null||e==""?"":this.type==="number"?b(e)?e:this.previousValue||"":e}),this.warnAboutInvalidNumberValue(e)}this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=x(D,this.icon,this.type)}get isClearable(){var e;return!this.isTextarea&&(this.clearable||this.type==="search")&&((e=this.value)==null?void 0:e.length)>0}get isTextarea(){return this.childElType==="textarea"}effectiveLocaleChange(){ee(this,this.effectiveLocale)}connectedCallback(){var e;te(this),ie(this),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),de(this),q(this),(e=this.mutationObserver)==null||e.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener(C,this.onHiddenFormInputInput)}disconnectedCallback(){var e;he(this),$(this),ne(this),ae(this),(e=this.mutationObserver)==null||e.disconnect(),this.el.removeEventListener(C,this.onHiddenFormInputInput)}async componentWillLoad(){var e,t;se(this),this.childElType=this.type==="textarea"?"textarea":"input",this.maxString=(e=this.max)==null?void 0:e.toString(),this.minString=(t=this.min)==null?void 0:t.toString(),this.requestedIcon=x(D,this.icon,this.type),await oe(this),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),this.type==="number"&&(this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedValue=this.value):(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:b(this.value)?this.value:""})))}componentDidLoad(){re(this)}componentShouldUpdate(e,t,i){return this.type==="number"&&i==="value"&&e&&!b(e)?(this.setValue({origin:"reset",value:t}),!1):!0}componentDidRender(){_(this)}async setFocus(){var e,t;await le(this),this.type==="number"?(e=this.childNumberEl)==null||e.focus():(t=this.childEl)==null||t.focus()}async selectText(){var e,t;this.type==="number"?(e=this.childNumberEl)==null||e.select():(t=this.childEl)==null||t.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(e,t,i,s){const{value:a}=this;if(a==="Infinity"||a==="-Infinity")return;const l=e==="up"?1:-1,d=this.step==="any"?1:Math.abs(this.step||1),h=new ce(a!==""?a:"0").add(`${d*l}`),f=()=>typeof i=="number"&&!isNaN(i)&&h.subtract(`${i}`).isNegative,c=()=>typeof t=="number"&&!isNaN(t)&&!h.subtract(`${t}`).isNegative,p=f()?`${i}`:c()?`${t}`:h.toString();this.setValue({committing:!0,nativeEvent:s,origin:"user",value:p})}syncHiddenFormInput(e){ve(this.type,this,e)}setDisabledAction(){const e=j(this.el,"action");e&&(this.disabled?(e.getAttribute("disabled")==null&&(this.slottedActionElDisabledInternally=!0),e.setAttribute("disabled","")):this.slottedActionElDisabledInternally&&(e.removeAttribute("disabled"),this.slottedActionElDisabledInternally=!1))}normalizeValue(e){return this.type==="number"?b(e)?e:"":e}warnAboutInvalidNumberValue(e){this.type==="number"&&e&&!b(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){const e=O(this.el),t=n("div",{key:"ed9acea9dbc18f4cfc5e7095c1e2de0b1adfdf35",class:o.loader},n("calcite-progress",{key:"58321a27c25dd848a648d2e3d5ca6dfc3f5fd649",label:this.messages.loading,type:"indeterminate"})),i=n("button",{key:"348d8dee0c032afe986b1e253c9d667256f3d9f0","aria-label":this.messages.clear,class:o.clearButton,disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},n("calcite-icon",{key:"334b68a283b767c0e9bea09ccfd83d09c8c17711",icon:"x",scale:v(this.scale)})),s=n("calcite-icon",{key:"4ab83aa9268277a38449ebe4a6e3db4dc9badcae",class:o.inputIcon,flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:v(this.scale)}),a=this.numberButtonType==="horizontal",l=n("button",{key:"2dd700034d38581aaea39c019e626ffa1a2c1c16","aria-hidden":"true",class:{[o.numberButtonItem]:!0,[o.buttonItemHorizontal]:a},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},n("calcite-icon",{key:"6ca9a7c93aa14520292ad8c800c4e099bd46f30d",icon:"chevron-up",scale:v(this.scale)})),d=n("button",{key:"cdbd88ddd308bd82b6d239a83f365a2c5e226cfc","aria-hidden":"true",class:{[o.numberButtonItem]:!0,[o.buttonItemHorizontal]:a},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},n("calcite-icon",{key:"f1b9cf329da9add564d690c517ddcc414c4fbfa3",icon:"chevron-down",scale:v(this.scale)})),m=n("div",{key:"247efdce33568f219b1bf3bf252b8b19a74d03ea",class:o.numberButtonWrapper},l,d),h=n("div",{key:"01819a850399fb20a29471861e011695bf80af97",class:o.prefix},this.prefixText),f=n("div",{key:"dcc073305f3824a0eb72ef230bd217dabdb72104",class:o.suffix},this.suffixText),c=this.el.autofocus||this.el.hasAttribute("autofocus")?!0:null,p=this.el.enterKeyHint||this.el.getAttribute("enterkeyhint"),E=this.el.inputMode||this.el.getAttribute("inputmode"),F=this.type==="number"?n("input",{accept:this.accept,"aria-errormessage":w.validationMessage,"aria-invalid":V(this.status==="invalid"),"aria-label":S(this),autocomplete:this.autocomplete,autofocus:c,defaultValue:this.defaultValue,disabled:this.disabled?!0:null,enterKeyHint:p,inputMode:E,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,multiple:this.multiple,name:void 0,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputKeyUpHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildNumberElRef,type:"text",value:this.displayedValue}):null,U=this.type!=="number"?[n(this.childElType,{accept:this.accept,"aria-errormessage":w.validationMessage,"aria-invalid":V(this.status==="invalid"),"aria-label":S(this),autocomplete:this.autocomplete,autofocus:c,class:{[o.editingEnabled]:this.editingEnabled,[o.inlineChild]:!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:this.disabled?!0:null,enterKeyHint:p,inputMode:E,max:this.maxString,maxLength:this.maxLength,min:this.minString,minLength:this.minLength,multiple:this.multiple,name:this.name,onBlur:this.inputBlurHandler,onChange:this.inputChangeHandler,onFocus:this.inputFocusHandler,onInput:this.inputInputHandler,onKeyDown:this.inputKeyDownHandler,onKeyUp:this.inputKeyUpHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildElRef,required:this.required?!0:null,step:this.step,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:this.type,value:this.value}),this.isTextarea?n("div",{class:o.resizeIconWrapper},n("calcite-icon",{icon:"chevron-down",scale:v(this.scale)})):null]:null;return n(L,{key:"23d6092960315f172a56105b9af75ddc6497874c",onClick:this.clickHandler,onKeyDown:this.keyDownHandler},n(G,{key:"1bb063f39c14a829a376465fa8c2bbc288046ac7",disabled:this.disabled},n("div",{key:"7f3644f002b7cb75d93d9c0218508b502ddcfd0b",class:{[o.inputWrapper]:!0,[T.rtl]:e==="rtl"},ref:k=>this.inputWrapperEl=k},this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?d:null,this.prefixText?h:null,n("div",{key:"0d01898e4949a60e0853c1a72669f5c9d6c91ba5",class:o.wrapper},F,U,this.isClearable?i:null,this.requestedIcon?s:null,this.loading?t:null),n("div",{key:"42e7adec440e417128feb9845c36d0444e6c1ae4",class:o.actionWrapper,ref:k=>this.actionWrapperEl=k},n("slot",{key:"f391b035ad9fc108d1f99c4cedf539425c20a36d",name:Ee.action})),this.type==="number"&&this.numberButtonType==="vertical"&&!this.readOnly?m:null,this.suffixText?f:null,this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?l:null,n(Y,{key:"df415df551b4a9a16565c8f554454d01aa89327e",component:this})),this.validationMessage&&this.status==="invalid"?n(be,{icon:this.validationIcon,id:w.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null))}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{autofocus:["handleGlobalAttributesChanged"],enterkeyhint:["handleGlobalAttributesChanged"],inputmode:["handleGlobalAttributesChanged"],disabled:["disabledWatcher"],max:["maxWatcher"],min:["minWatcher"],messageOverrides:["onMessagesChange"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return Ce}},[1,"calcite-input",{alignment:[513],autofocus:[4],clearable:[516],disabled:[516],enterKeyHint:[1,"enter-key-hint"],form:[513],groupSeparator:[516,"group-separator"],icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],inputMode:[1,"input-mode"],label:[1],loading:[516],numberingSystem:[513,"numbering-system"],localeFormat:[4,"locale-format"],max:[514],min:[514],maxLength:[514,"max-length"],minLength:[514,"min-length"],validationMessage:[1,"validation-message"],validationIcon:[520,"validation-icon"],validity:[1040],name:[513],numberButtonType:[513,"number-button-type"],placeholder:[1],prefixText:[1,"prefix-text"],readOnly:[516,"read-only"],required:[516],scale:[513],status:[513],step:[520],autocomplete:[1],pattern:[1],accept:[1],multiple:[4],suffixText:[1,"suffix-text"],editingEnabled:[1540,"editing-enabled"],type:[513],value:[1025],files:[16],messages:[1040],messageOverrides:[1040],defaultMessages:[32],effectiveLocale:[32],displayedValue:[32],slottedActionElDisabledInternally:[32],setFocus:[64],selectText:[64]},void 0,{autofocus:["handleGlobalAttributesChanged"],enterkeyhint:["handleGlobalAttributesChanged"],inputmode:["handleGlobalAttributesChanged"],disabled:["disabledWatcher"],max:["maxWatcher"],min:["minWatcher"],messageOverrides:["onMessagesChange"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}]);function P(){if(typeof customElements>"u")return;["calcite-input","calcite-icon","calcite-input-message","calcite-progress"].forEach(e=>{switch(e){case"calcite-input":customElements.get(e)||customElements.define(e,N);break;case"calcite-icon":customElements.get(e)||M();break;case"calcite-input-message":customElements.get(e)||B();break;case"calcite-progress":customElements.get(e)||A();break}})}P();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const Ae=N,Ne=P;export{Ae as CalciteInput,Ne as defineCustomElement}; diff --git a/build/assets/calcite-label-A-HJpZEQ.js b/build/assets/calcite-label-A-HJpZEQ.js new file mode 100644 index 0000000..53db06e --- /dev/null +++ b/build/assets/calcite-label-A-HJpZEQ.js @@ -0,0 +1,9 @@ +import{p as o,H as s,dr as c,b as t,c as r}from"./index-DKOmzAMm.js";import{a as d,l as h,b}from"./label-CXw43uCP.js";import"./component-BUnDTGFH.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const m={container:"container"},p=":host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, 0.5rem)}:host([scale=m]) .container{gap:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, 0.75rem)}:host([scale=l]) .container{gap:0.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1)}:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:0.5rem}:host([layout=inline][scale=l]) .container{gap:0.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity:1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}",u=p,a=o(class extends s{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteInternalLabelClick=c(this,"calciteInternalLabelClick",2),this.labelClickHandler=e=>{var n;((n=window.getSelection())==null?void 0:n.type)!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})},this.alignment="start",this.for=void 0,this.scale="m",this.layout="default"}handleForChange(){d(this.el)}connectedCallback(){document.dispatchEvent(new CustomEvent(h))}disconnectedCallback(){document.dispatchEvent(new CustomEvent(b))}render(){return t(r,{key:"c3eff09792519c9e5a76ee28e3754db83b536f99",onClick:this.labelClickHandler},t("div",{key:"387902edd9b59be290f95ad6c2721584037d7256",class:m.container},t("slot",{key:"b54d782522e95323333040e40e1a6dd06b52a575"})))}get el(){return this}static get watchers(){return{for:["handleForChange"]}}static get style(){return u}},[1,"calcite-label",{alignment:[513],for:[513],scale:[513],layout:[513]},void 0,{for:["handleForChange"]}]);function i(){if(typeof customElements>"u")return;["calcite-label"].forEach(e=>{switch(e){case"calcite-label":customElements.get(e)||customElements.define(e,a);break}})}i();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const v=a,k=i;export{v as CalciteLabel,k as defineCustomElement}; diff --git a/build/assets/calcite-modal-DHLYHRNO.js b/build/assets/calcite-modal-DHLYHRNO.js new file mode 100644 index 0000000..b21be87 --- /dev/null +++ b/build/assets/calcite-modal-DHLYHRNO.js @@ -0,0 +1,54 @@ +import{f_ as Se,f$ as Me,p as ge,H as ye,b as f,dr as A,c as Pe}from"./index-DKOmzAMm.js";import{c as Be,d as $e,o as Re}from"./openCloseComponent-A5NL68VL.js";import{f as Ae,e as Ie,h as W,j as He,k as Ke,l as T,m as P,n as je,d as V,o as oe,b as We,p as Ve,c as Ge,r as se}from"./component-BUnDTGFH.js";import{b as _,u as ke,c as we,e as xe,g as Ce,d as ze,f as Ee,a as Ue,s as qe,h as _e,i as Ye}from"./icon-ifbWMk17.js";import{d as Te}from"./loader-6rdpjGpy.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + *//*! +* focus-trap 7.6.0 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function Je(i,e,n){return(e=Xe(e))in i?Object.defineProperty(i,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[e]=n,i}function re(i,e){var n=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter(function(b){return Object.getOwnPropertyDescriptor(i,b).enumerable})),n.push.apply(n,s)}return n}function ce(i){for(var e=1;e0){var s=e[e.length-1];s!==n&&s.pause()}var b=e.indexOf(n);b===-1||e.splice(b,1),e.push(n)},deactivateTrap:function(e,n){var s=e.indexOf(n);s!==-1&&e.splice(s,1),e.length>0&&e[e.length-1].unpause()}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},et=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},$=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},tt=function(e){return $(e)&&!e.shiftKey},at=function(e){return $(e)&&e.shiftKey},de=function(e){return setTimeout(e,0)},ue=function(e,n){var s=-1;return e.every(function(b,c){return n(b)?(s=c,!1):!0}),s},B=function(e){for(var n=arguments.length,s=new Array(n>1?n-1:0),b=1;b1?r-1:0),u=1;u=0)t=s.activeElement;else{var a=o.tabbableGroups[0],r=a&&a.firstTabbableNode;t=r||O("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},N=function(){if(o.containerGroups=o.containers.map(function(t){var a=He(t,c.tabbableOptions),r=Ke(t,c.tabbableOptions),d=a.length>0?a[0]:void 0,u=a.length>0?a[a.length-1]:void 0,m=r.find(function(v){return T(v)}),p=r.slice().reverse().find(function(v){return T(v)}),g=!!a.find(function(v){return P(v)>0});return{container:t,tabbableNodes:a,focusableNodes:r,posTabIndexesFound:g,firstTabbableNode:d,lastTabbableNode:u,firstDomTabbableNode:m,lastDomTabbableNode:p,nextTabbableNode:function(z){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,C=a.indexOf(z);return C<0?S?r.slice(r.indexOf(z)+1).find(function(M){return T(M)}):r.slice(0,r.indexOf(z)).reverse().find(function(M){return T(M)}):a[C+(S?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(t){return t.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!O("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(t){return t.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},Y=function(t){var a=t.activeElement;if(a)return a.shadowRoot&&a.shadowRoot.activeElement!==null?Y(a.shadowRoot):a},x=function(t){if(t!==!1&&t!==Y(document)){if(!t||!t.focus){x(D());return}t.focus({preventScroll:!!c.preventScroll}),o.mostRecentlyFocusedNode=t,Ze(t)&&t.select()}},J=function(t){var a=O("setReturnFocus",t);return a||(a===!1?!1:t)},Q=function(t){var a=t.target,r=t.event,d=t.isBackward,u=d===void 0?!1:d;a=a||I(r),N();var m=null;if(o.tabbableGroups.length>0){var p=E(a,r),g=p>=0?o.containerGroups[p]:void 0;if(p<0)u?m=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:m=o.tabbableGroups[0].firstTabbableNode;else if(u){var v=ue(o.tabbableGroups,function(K){var j=K.firstTabbableNode;return a===j});if(v<0&&(g.container===a||W(a,c.tabbableOptions)&&!T(a,c.tabbableOptions)&&!g.nextTabbableNode(a,!1))&&(v=p),v>=0){var z=v===0?o.tabbableGroups.length-1:v-1,S=o.tabbableGroups[z];m=P(a)>=0?S.lastTabbableNode:S.lastDomTabbableNode}else $(r)||(m=g.nextTabbableNode(a,!1))}else{var C=ue(o.tabbableGroups,function(K){var j=K.lastTabbableNode;return a===j});if(C<0&&(g.container===a||W(a,c.tabbableOptions)&&!T(a,c.tabbableOptions)&&!g.nextTabbableNode(a))&&(C=p),C>=0){var M=C===o.tabbableGroups.length-1?0:C+1,ne=o.tabbableGroups[M];m=P(a)>=0?ne.firstTabbableNode:ne.firstDomTabbableNode}else $(r)||(m=g.nextTabbableNode(a))}}else m=O("fallbackFocus");return m},R=function(t){var a=I(t);if(!(E(a,t)>=0)){if(B(c.clickOutsideDeactivates,t)){k.deactivate({returnFocus:c.returnFocusOnDeactivate});return}B(c.allowOutsideClick,t)||t.preventDefault()}},X=function(t){var a=I(t),r=E(a,t)>=0;if(r||a instanceof Document)r&&(o.mostRecentlyFocusedNode=a);else{t.stopImmediatePropagation();var d,u=!0;if(o.mostRecentlyFocusedNode)if(P(o.mostRecentlyFocusedNode)>0){var m=E(o.mostRecentlyFocusedNode),p=o.containerGroups[m].tabbableNodes;if(p.length>0){var g=p.findIndex(function(v){return v===o.mostRecentlyFocusedNode});g>=0&&(c.isKeyForward(o.recentNavEvent)?g+1=0&&(d=p[g-1],u=!1))}}else o.containerGroups.some(function(v){return v.tabbableNodes.some(function(z){return P(z)>0})})||(u=!1);else u=!1;u&&(d=Q({target:o.mostRecentlyFocusedNode,isBackward:c.isKeyBackward(o.recentNavEvent)})),x(d||o.mostRecentlyFocusedNode||D())}o.recentNavEvent=void 0},Ne=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=t;var r=Q({event:t,isBackward:a});r&&($(t)&&t.preventDefault(),x(r))},Z=function(t){(c.isKeyForward(t)||c.isKeyBackward(t))&&Ne(t,c.isKeyBackward(t))},ee=function(t){et(t)&&B(c.escapeDeactivates,t)!==!1&&(t.preventDefault(),k.deactivate())},te=function(t){var a=I(t);E(a,t)>=0||B(c.clickOutsideDeactivates,t)||B(c.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},ae=function(){if(o.active)return le.activateTrap(b,k),o.delayInitialFocusTimer=c.delayInitialFocus?de(function(){x(D())}):x(D()),s.addEventListener("focusin",X,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",te,{capture:!0,passive:!1}),s.addEventListener("keydown",Z,{capture:!0,passive:!1}),s.addEventListener("keydown",ee),k},ie=function(){if(o.active)return s.removeEventListener("focusin",X,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",te,!0),s.removeEventListener("keydown",Z,!0),s.removeEventListener("keydown",ee),k},Le=function(t){var a=t.some(function(r){var d=Array.from(r.removedNodes);return d.some(function(u){return u===o.mostRecentlyFocusedNode})});a&&x(D())},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Le):void 0,L=function(){H&&(H.disconnect(),o.active&&!o.paused&&o.containers.map(function(t){H.observe(t,{subtree:!0,childList:!0})}))};return k={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var a=y(t,"onActivate"),r=y(t,"onPostActivate"),d=y(t,"checkCanFocusTrap");d||N(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=s.activeElement,a==null||a();var u=function(){d&&N(),ae(),L(),r==null||r()};return d?(d(o.containers.concat()).then(u,u),this):(u(),this)},deactivate:function(t){if(!o.active)return this;var a=ce({onDeactivate:c.onDeactivate,onPostDeactivate:c.onPostDeactivate,checkCanReturnFocus:c.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,ie(),o.active=!1,o.paused=!1,L(),le.deactivateTrap(b,k);var r=y(a,"onDeactivate"),d=y(a,"onPostDeactivate"),u=y(a,"checkCanReturnFocus"),m=y(a,"returnFocus","returnFocusOnDeactivate");r==null||r();var p=function(){de(function(){m&&x(J(o.nodeFocusedBeforeActivation)),d==null||d()})};return m&&u?(u(J(o.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(t){if(o.paused||!o.active)return this;var a=y(t,"onPause"),r=y(t,"onPostPause");return o.paused=!0,a==null||a(),ie(),L(),r==null||r(),this},unpause:function(t){if(!o.paused||!o.active)return this;var a=y(t,"onUnpause"),r=y(t,"onPostUnpause");return o.paused=!1,a==null||a(),N(),ae(),L(),r==null||r(),this},updateContainerElements:function(t){var a=[].concat(t).filter(Boolean);return o.containers=a.map(function(r){return typeof r=="string"?s.querySelector(r):r}),o.active&&N(),L(),this}},k.updateContainerElements(e),k};function ot(i,e){const{el:n}=i,s=n;if(!s)return;const b={clickOutsideDeactivates:!0,escapeDeactivates:!1,fallbackFocus:s,setReturnFocus:c=>(Ae(c),!1),...e==null?void 0:e.focusTrapOptions,document:n.ownerDocument,tabbableOptions:Ie,trapStack:Se};i.focusTrap=nt(s,b)}function fe(i,e){var n;i.focusTrapDisabled||(n=i.focusTrap)==null||n.activate(e)}function G(i,e){var n;(n=i.focusTrap)==null||n.deactivate(e)}function st(i){var e;(e=i.focusTrap)==null||e.updateContainerElements(i.el)}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const he=new Set,me={trace:0,debug:1,info:2,warn:4,error:8,off:10};function rt(i){return me[i]>=me[Me]}function F(i,...e){if(!rt(i))return;console[i].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...e)}let U;const ct={debug:i=>F("debug",i),info:i=>F("info",i),warn:i=>F("warn",i),error:i=>F("error",i),trace:i=>F("trace",i),deprecated:lt};function lt(i,{component:e,name:n,suggested:s,removalVersion:b}){const c=`${i}:${i==="component"?"":e}${n}`;if(he.has(c))return;he.add(c);const o=Array.isArray(s);o&&!U&&(U=new Intl.ListFormat("en",{style:"long",type:"disjunction"}));const k=`[${n}] ${i} is deprecated and will be removed in ${b==="future"?"a future version":`v${b}`}.${s?` Use ${o?U.format(s.map(y=>`"${y}"`)):`"${s}"`} instead.`:""}`;F("warn",k)}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const be={scrim:"scrim",content:"content"},pe={s:72,l:480},dt=":host{--calcite-scrim-background:var(--calcite-color-transparent-scrim);position:absolute;inset:0px;z-index:var(--calcite-z-index-overlay);display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-color-transparent-scrim))}.content{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}",ut=dt,ft=ge(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.resizeObserver=_("resize",()=>this.handleResize()),this.handleDefaultSlotChange=e=>{this.hasContent=je(e)},this.storeLoaderEl=e=>{this.loaderEl=e,this.handleResize()},this.loading=!1,this.messages=void 0,this.messageOverrides=void 0,this.loaderScale=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasContent=!1}onMessagesChange(){}effectiveLocaleChange(){ke(this,this.effectiveLocale)}connectedCallback(){var e;we(this),xe(this),(e=this.resizeObserver)==null||e.observe(this.el)}async componentWillLoad(){await Ce(this)}disconnectedCallback(){var e;ze(this),Ee(this),(e=this.resizeObserver)==null||e.disconnect()}render(){const{hasContent:e,loading:n,messages:s}=this;return f("div",{key:"286b03bb4a18b45f1b6914684a5178e952a44127",class:be.scrim},n?f("calcite-loader",{label:s.loading,ref:this.storeLoaderEl,scale:this.loaderScale}):null,f("div",{key:"0f8cd111720239b204d0d201610c4145d5616753",class:be.content,hidden:!e},f("slot",{key:"fe7bbced9871c9179971da0ef7ca07ea1c9ac33e",onSlotchange:this.handleDefaultSlotChange})))}getScale(e){return e=pe.l?"l":"m"}handleResize(){const{loaderEl:e,el:n}=this;e&&(this.loaderScale=this.getScale(Math.min(n.clientHeight,n.clientWidth)??0))}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return ut}},[1,"calcite-scrim",{loading:[516],messages:[1040],messageOverrides:[1040],loaderScale:[32],defaultMessages:[32],effectiveLocale:[32],hasContent:[32]},void 0,{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}]);function Fe(){if(typeof customElements>"u")return;["calcite-scrim","calcite-loader"].forEach(e=>{switch(e){case"calcite-scrim":customElements.get(e)||customElements.define(e,ft);break;case"calcite-loader":customElements.get(e)||Te();break}})}Fe();/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const l={modal:"modal",title:"title",header:"header",footer:"footer",scrim:"scrim",back:"back",close:"close",secondary:"secondary",primary:"primary",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",content:"content",contentNoFooter:"content--no-footer",contentBottom:"content-bottom",contentTop:"content-top",openingIdle:"modal--opening-idle",openingActive:"modal--opening-active",closingIdle:"modal--closing-idle",closingActive:"modal--closing-active"},ht={close:"x"},w={content:"content",contentBottom:"content-bottom",contentTop:"content-top",header:"header",back:"back",secondary:"secondary",primary:"primary"},mt=`:host{--calcite-modal-scrim-background:rgba(0, 0, 0, 0.85);position:absolute;inset:0px;z-index:var(--calcite-z-index-overlay);display:flex;opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-scrim-background-internal:rgba(0, 0, 0, 0.85)}.content-top[hidden],.content-bottom[hidden]{display:none}.container{position:fixed;inset:0px;z-index:var(--calcite-z-index-overlay);display:flex;align-items:center;justify-content:center;overflow-y:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([scale=s]){--calcite-modal-padding-internal:0.75rem;--calcite-modal-padding-large-internal:1rem;--calcite-modal-title-text-internal:var(--calcite-font-size-1);--calcite-modal-content-text-internal:var(--calcite-font-size--1)}:host([scale=m]){--calcite-modal-padding-internal:1rem;--calcite-modal-padding-large-internal:1.25rem;--calcite-modal-title-text-internal:var(--calcite-font-size-2);--calcite-modal-content-text-internal:var(--calcite-font-size-0)}:host([scale=l]){--calcite-modal-padding-internal:1.25rem;--calcite-modal-padding-large-internal:1.5rem;--calcite-modal-title-text-internal:var(--calcite-font-size-3);--calcite-modal-content-text-internal:var(--calcite-font-size-1)}.scrim{--calcite-scrim-background:var(--calcite-modal-scrim-background, var(--calcite-color-transparent-scrim));position:fixed;inset:0px;display:flex;overflow-y:hidden}.modal{pointer-events:none;z-index:var(--calcite-z-index-modal);float:none;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-color-foreground-1);opacity:0;--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-hidden-position:translate3d(0, 20px, 0);--calcite-modal-shown-position:translate3d(0, 0, 0)}.modal--opening-idle{transform:var(--calcite-modal-hidden-position)}.modal--opening-active{transform:var(--calcite-modal-shown-position)}.modal--closing-idle{transform:var(--calcite-modal-shown-position)}.modal--closing-active{transform:var(--calcite-modal-hidden-position)}:host([opened]){opacity:1;visibility:visible !important;transition-delay:0ms}.container--open{opacity:1;visibility:visible !important;transition-delay:0ms}.container--open .modal{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}.header{z-index:var(--calcite-z-index-header);display:flex;min-inline-size:0px;max-inline-size:100%;border-start-start-radius:0.25rem;border-start-end-radius:0.25rem;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1);flex:0 0 auto}.close{order:2;margin:0px;cursor:pointer;appearance:none;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-internal);flex:0 0 auto}.close calcite-icon{pointer-events:none;vertical-align:-2px}.close:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc( + -2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}.close:hover,.close:focus,.close:active{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.title{order:1;display:flex;min-inline-size:0px;align-items:center;flex:1 1 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}slot[name=header]::slotted(*),*::slotted([slot=header]){margin:0px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-1);font-size:var(--calcite-modal-title-text-internal)}.content{position:relative;box-sizing:border-box;display:block;block-size:100%;overflow:auto;padding:0px;background-color:var(--calcite-modal-content-background, var(--calcite-color-foreground-1));max-block-size:100%;padding:var(--calcite-modal-content-padding, var(--calcite-modal-padding-internal))}.content-top,.content-bottom{z-index:var(--calcite-z-index-header);display:flex;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1);flex:0 0 auto;padding:var(--calcite-modal-padding-internal)}.content-top{min-inline-size:0px;max-inline-size:100%;border-block-end-width:1px}.content-bottom{margin-block-start:auto;box-sizing:border-box;inline-size:100%;justify-content:space-between;border-block-start-width:1px}.content-top:not(.header~.content-top){border-start-start-radius:0.25rem;border-start-end-radius:0.25rem}.content-bottom:not(.content-bottom~.footer),.content--no-footer{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}slot[name=content]::slotted(*),*::slotted([slot=content]){font-size:var(--calcite-modal-context-text-internal)}.footer{z-index:var(--calcite-z-index-header);margin-block-start:auto;box-sizing:border-box;display:flex;inline-size:100%;justify-content:space-between;border-end-end-radius:0.25rem;border-end-start-radius:0.25rem;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1);flex:0 0 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}.footer--hide-back .back,.footer--hide-secondary .secondary{display:none}.back{display:block;margin-inline-end:auto}.secondary{margin-inline:0.25rem;display:block}slot[name=primary]{display:block}:host([width=small]) .modal{inline-size:auto}:host([width-scale=s]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 32rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 35rem){:host([width-scale=s]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width-scale=s]) .content{flex:1 1 auto;max-block-size:unset}:host([width-scale=s][docked]) .container{align-items:flex-end}}:host([width-scale=m]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 48rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 51rem){:host([width-scale=m]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width-scale=m]) .content{flex:1 1 auto;max-block-size:unset}:host([width-scale=m][docked]) .container{align-items:flex-end}}:host([width-scale=l]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 94rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 97rem){:host([width-scale=l]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width-scale=l]) .content{flex:1 1 auto;max-block-size:unset}:host([width-scale=l][docked]) .container{align-items:flex-end}}:host([fullscreen]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px;--calcite-modal-hidden-position:translate3D(0, 20px, 0) scale(0.95);--calcite-modal-shown-position:translate3D(0, 0, 0) scale(1)}:host([fullscreen]) .content{max-block-size:100%;flex:1 1 auto}:host([opened][fullscreen]) .header,:host([opened][fullscreen]) .footer,:host([opened][fullscreen]) .content-top,:host([opened][fullscreen]) .content-bottom{border-radius:0}:host([docked]) .modal{block-size:var(--calcite-modal-height, auto)}:host([docked]) .content{block-size:auto;flex:1 1 auto}:host([kind=brand]) .modal{border-color:var(--calcite-color-brand)}:host([kind=danger]) .modal{border-color:var(--calcite-color-status-danger)}:host([kind=info]) .modal{border-color:var(--calcite-color-status-info)}:host([kind=success]) .modal{border-color:var(--calcite-color-status-success)}:host([kind=warning]) .modal{border-color:var(--calcite-color-status-warning)}:host([kind=brand]) .modal,:host([kind=danger]) .modal,:host([kind=info]) .modal,:host([kind=success]) .modal,:host([kind=warning]) .modal{border-width:0px;border-block-start-width:4px;border-style:solid}:host([kind=brand]) .header,:host([kind=brand]) .content-top,:host([kind=danger]) .header,:host([kind=danger]) .content-top,:host([kind=info]) .header,:host([kind=info]) .content-top,:host([kind=success]) .header,:host([kind=success]) .content-top,:host([kind=warning]) .header,:host([kind=warning]) .content-top{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){* slot[name=header]::slotted(content-top),* content-top::slotted([slot=header]){font-size:var(--calcite-font-size-1)}.footer,.content-bottom{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){.footer,.content-bottom{flex-direction:column}.back,.secondary{margin:0px;margin-block-end:0.25rem}}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}`,bt=mt;let q=0,ve="";ct.deprecated("component",{name:"modal",removalVersion:4,suggested:"dialog"});const Oe=ge(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteModalBeforeClose=A(this,"calciteModalBeforeClose",6),this.calciteModalClose=A(this,"calciteModalClose",6),this.calciteModalBeforeOpen=A(this,"calciteModalBeforeOpen",6),this.calciteModalOpen=A(this,"calciteModalOpen",6),this.ignoreOpenChange=!1,this.mutationObserver=_("mutation",()=>this.handleMutationObserver()),this.cssVarObserver=_("mutation",()=>{this.updateSizeCssVars()}),this.openTransitionProp="opacity",this.setTransitionEl=e=>{this.transitionEl=e},this.openEnd=()=>{this.setFocus(),this.el.removeEventListener("calciteModalOpen",this.openEnd)},this.handleCloseClick=()=>{this.open=!1},this.handleOutsideClose=()=>{this.outsideCloseDisabled||(this.open=!1)},this.closeModal=async()=>{if(this.beforeClose)try{await this.beforeClose(this.el)}catch{requestAnimationFrame(()=>{this.ignoreOpenChange=!0,this.open=!0,this.ignoreOpenChange=!1});return}q--,this.opened=!1,this.removeOverflowHiddenClass()},this.handleMutationObserver=()=>{this.updateFooterVisibility(),this.updateFocusTrapElements()},this.updateFooterVisibility=()=>{this.hasFooter=!!V(this.el,[w.back,w.primary,w.secondary])},this.updateSizeCssVars=()=>{this.cssWidth=getComputedStyle(this.el).getPropertyValue("--calcite-modal-width"),this.cssHeight=getComputedStyle(this.el).getPropertyValue("--calcite-modal-height")},this.contentTopSlotChangeHandler=e=>{this.hasContentTop=oe(e)},this.contentBottomSlotChangeHandler=e=>{this.hasContentBottom=oe(e)},this.open=!1,this.opened=!1,this.beforeClose=void 0,this.closeButtonDisabled=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.docked=void 0,this.embedded=!1,this.escapeDisabled=!1,this.scale="m",this.widthScale="m",this.fullscreen=void 0,this.kind=void 0,this.messages=void 0,this.messageOverrides=void 0,this.cssWidth=void 0,this.cssHeight=void 0,this.hasFooter=!0,this.hasContentTop=!1,this.hasContentBottom=!1,this.effectiveLocale=void 0,this.defaultMessages=void 0}handleFocusTrapDisabled(e){this.open&&(e?G(this):fe(this))}onMessagesChange(){}async componentWillLoad(){await Ce(this),qe(this),this.open&&this.openModal()}componentDidLoad(){_e(this)}connectedCallback(){var e,n;(e=this.mutationObserver)==null||e.observe(this.el,{childList:!0,subtree:!0}),(n=this.cssVarObserver)==null||n.observe(this.el,{attributeFilter:["style"]}),this.updateSizeCssVars(),this.updateFooterVisibility(),Be(this),we(this),xe(this),ot(this)}disconnectedCallback(){var e,n;this.removeOverflowHiddenClass(),(e=this.mutationObserver)==null||e.disconnect(),(n=this.cssVarObserver)==null||n.disconnect(),$e(this),G(this),ze(this),Ee(this),this.embedded=!1}render(){return f(Pe,{key:"f92cd77f4a5ad4a245ca50fe2b2bfcf9966d4ca8","aria-describedby":this.contentId,"aria-labelledby":this.titleId,"aria-modal":"true",role:"dialog"},f("div",{key:"a9d348a67842162f1bc17ec8422c07963aed412d",class:{[l.container]:!0,[l.containerOpen]:this.opened,[l.containerEmbedded]:this.embedded}},f("calcite-scrim",{key:"7dc3bc9220fc375522a6d390b633f9573bfa6c67",class:l.scrim,onClick:this.handleOutsideClose}),this.renderStyle(),f("div",{key:"40782ba2b6d3f086c884ace3529110e873009504",class:{[l.modal]:!0},ref:this.setTransitionEl},f("div",{key:"ea3a72ab0a0e5abae6e766d0b7b2cfce54667e86",class:l.header},this.renderCloseButton(),f("header",{key:"abe5c28d11fc6241cd6ac40adef4d94529eb9d5c",class:l.title},f("slot",{key:"3d1d6ed6c0249472a00fba4128a861e6a6eae4dd",name:l.header}))),this.renderContentTop(),f("div",{key:"0e65dfbd175e490586518d1a4c34b9eb1dde1f01",class:{[l.content]:!0,[l.contentNoFooter]:!this.hasFooter},ref:e=>this.modalContent=e},f("slot",{key:"d5f3b08e61e8e47f64fd13bc6eb7f7ed6a07b7c8",name:w.content})),this.renderContentBottom(),this.renderFooter())))}renderFooter(){return this.hasFooter?f("div",{class:l.footer,key:"footer"},f("span",{class:l.back},f("slot",{name:w.back})),f("span",{class:l.secondary},f("slot",{name:w.secondary})),f("span",{class:l.primary},f("slot",{name:w.primary}))):null}renderContentTop(){return f("div",{class:l.contentTop,hidden:!this.hasContentTop},f("slot",{name:w.contentTop,onSlotchange:this.contentTopSlotChangeHandler}))}renderContentBottom(){return f("div",{class:l.contentBottom,hidden:!this.hasContentBottom},f("slot",{name:w.contentBottom,onSlotchange:this.contentBottomSlotChangeHandler}))}renderCloseButton(){return this.closeButtonDisabled?null:f("button",{"aria-label":this.messages.close,class:l.close,key:"button",onClick:this.handleCloseClick,ref:e=>this.closeButtonEl=e,title:this.messages.close},f("calcite-icon",{icon:ht.close,scale:We(this.scale)}))}renderStyle(){if(!this.fullscreen&&(this.cssWidth||this.cssHeight))return f("style",null,`.${l.container} { + ${this.docked&&this.cssWidth?"align-items: center !important;":""} + } + .${l.modal} { + block-size: ${this.cssHeight?this.cssHeight:"auto"} !important; + ${this.cssWidth?`inline-size: ${this.cssWidth} !important;`:""} + ${this.cssWidth?`max-inline-size: ${this.cssWidth} !important;`:""} + ${this.docked?"border-radius: var(--calcite-border-radius) !important;":""} + } + @media screen and (max-width: ${this.cssWidth}) { + .${l.container} { + ${this.docked?"align-items: flex-end !important;":""} + } + .${l.modal} { + max-block-size: 100% !important; + inline-size: 100% !important; + max-inline-size: 100% !important; + min-inline-size: 100% !important; + margin: 0 !important; + ${this.docked?"":"block-size: 100% !important;"} + ${this.docked?"":"border-radius: 0 !important;"} + ${this.docked?"border-radius: var(--calcite-border-radius) var(--calcite-border-radius) 0 0 !important;":""} + } + } + `)}effectiveLocaleChange(){ke(this,this.effectiveLocale)}handleEscape(e){this.open&&!this.escapeDisabled&&e.key==="Escape"&&!e.defaultPrevented&&(this.open=!1,e.preventDefault())}async setFocus(){await Ye(this),Ve(this.el)}async updateFocusTrapElements(){st(this)}async scrollContent(e=0,n=0){this.modalContent&&(this.modalContent.scrollTo?this.modalContent.scrollTo({top:e,left:n,behavior:"smooth"}):(this.modalContent.scrollTop=e,this.modalContent.scrollLeft=n))}onBeforeOpen(){this.transitionEl.classList.add(l.openingActive),this.calciteModalBeforeOpen.emit()}onOpen(){this.transitionEl.classList.remove(l.openingIdle,l.openingActive),this.calciteModalOpen.emit(),fe(this)}onBeforeClose(){this.transitionEl.classList.add(l.closingActive),this.calciteModalBeforeClose.emit()}onClose(){this.transitionEl.classList.remove(l.closingIdle,l.closingActive),this.calciteModalClose.emit(),G(this)}toggleModal(e){this.ignoreOpenChange||(e?this.openModal():this.closeModal())}handleOpenedChange(e){const n=e?l.openingIdle:l.closingIdle;this.transitionEl.classList.add(n),Re(this)}async openModal(){await Ge(this.el),this.el.addEventListener("calciteModalOpen",this.openEnd),this.opened=!0;const e=V(this.el,w.header),n=V(this.el,w.content);this.titleId=se(e),this.contentId=se(n),this.embedded||(q===0&&(ve=document.documentElement.style.overflow),q++,document.documentElement.style.setProperty("overflow","hidden"))}removeOverflowHiddenClass(){document.documentElement.style.setProperty("overflow",ve)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{focusTrapDisabled:["handleFocusTrapDisabled"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"],open:["toggleModal"],opened:["handleOpenedChange"]}}static get style(){return bt}},[1,"calcite-modal",{open:[1540],opened:[1540],beforeClose:[16],closeButtonDisabled:[516,"close-button-disabled"],focusTrapDisabled:[516,"focus-trap-disabled"],outsideCloseDisabled:[516,"outside-close-disabled"],docked:[516],embedded:[1028],escapeDisabled:[516,"escape-disabled"],scale:[513],widthScale:[513,"width-scale"],fullscreen:[516],kind:[513],messages:[1040],messageOverrides:[1040],cssWidth:[32],cssHeight:[32],hasFooter:[32],hasContentTop:[32],hasContentBottom:[32],effectiveLocale:[32],defaultMessages:[32],setFocus:[64],updateFocusTrapElements:[64],scrollContent:[64]},[[8,"keydown","handleEscape"]],{focusTrapDisabled:["handleFocusTrapDisabled"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"],open:["toggleModal"],opened:["handleOpenedChange"]}]);function De(){if(typeof customElements>"u")return;["calcite-modal","calcite-icon","calcite-loader","calcite-scrim"].forEach(e=>{switch(e){case"calcite-modal":customElements.get(e)||customElements.define(e,Oe);break;case"calcite-icon":customElements.get(e)||Ue();break;case"calcite-loader":customElements.get(e)||Te();break;case"calcite-scrim":customElements.get(e)||Fe();break}})}De();const Ct=Oe,zt=De;export{Ct as CalciteModal,zt as defineCustomElement}; diff --git a/build/assets/calcite-notice-Ck_wHSpF.js b/build/assets/calcite-notice-Ck_wHSpF.js new file mode 100644 index 0000000..527eeed --- /dev/null +++ b/build/assets/calcite-notice-Ck_wHSpF.js @@ -0,0 +1,19 @@ +import{p,H as u,dr as n,b as t}from"./index-DKOmzAMm.js";import{o as c,c as b,d as k}from"./openCloseComponent-A5NL68VL.js";import{s,b as a,d as v}from"./component-BUnDTGFH.js";import{a as x,c as w,e as y,d as z,f as C,s as E,g as L,h as O,i as B,u as N}from"./icon-ifbWMk17.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const l={brand:"lightbulb",danger:"exclamationMarkTriangle",info:"information",success:"checkCircle",warning:"exclamationMarkTriangle"};/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const o={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},I=`:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;background-color:var(--calcite-color-foreground-1);opacity:0;max-block-size:0;transition-property:opacity, max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc( + -2px * + calc( + 1 - + 2 * clamp( + 0, + var(--calcite-offset-invert-focus), + 1 + ) + ) + )}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.notice-close:active{background-color:var(--calcite-color-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,q=I,r=p(class extends u{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteNoticeBeforeClose=n(this,"calciteNoticeBeforeClose",6),this.calciteNoticeBeforeOpen=n(this,"calciteNoticeBeforeOpen",6),this.calciteNoticeClose=n(this,"calciteNoticeClose",6),this.calciteNoticeOpen=n(this,"calciteNoticeOpen",6),this.setTransitionEl=e=>{this.transitionEl=e},this.close=()=>{this.open=!1},this.openTransitionProp="opacity",this.open=!1,this.kind="brand",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){c(this)}onMessagesChange(){}updateRequestedIcon(){this.requestedIcon=s(l,this.icon,this.kind)}connectedCallback(){b(this),w(this),y(this)}disconnectedCallback(){k(this),z(this),C(this)}async componentWillLoad(){E(this),this.requestedIcon=s(l,this.icon,this.kind),await L(this),this.open&&c(this)}componentDidLoad(){O(this)}render(){const{el:e}=this,f=t("button",{key:"52f9306ebe945398929f68fe66615359836ba2d8","aria-label":this.messages.close,class:i.close,onClick:this.close,ref:m=>this.closeButton=m},t("calcite-icon",{key:"f3601ac9547c73219661eebc7e7470db5dee7b52",icon:"x",scale:a(this.scale)})),g=v(e,o.actionsEnd);return t("div",{key:"3f8117ff7cdd08c92ce804ef4ac8af83003156a4",class:i.container,ref:this.setTransitionEl},this.requestedIcon?t("div",{class:i.icon},t("calcite-icon",{flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:a(this.scale)})):null,t("div",{key:"1b614ee86618bd5ce6e8834b466baf7d2564b5a1",class:i.content},t("slot",{key:"19467ed9718a78c7530c2a08c727028d565dee7b",name:o.title}),t("slot",{key:"191e71caf2f2147c62fd6b73602e41d95dc27558",name:o.message}),t("slot",{key:"d4fbf2b8aaa980cd24c5be89c6c8a36d091658f3",name:o.link})),g?t("div",{class:i.actionsEnd},t("slot",{name:o.actionsEnd})):null,this.closable?f:null)}async setFocus(){await B(this);const e=this.el.querySelector("calcite-link");if(!(!this.closeButton&&!e)){if(e)return e.setFocus();this.closeButton&&this.closeButton.focus()}}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}effectiveLocaleChange(){N(this,this.effectiveLocale)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return q}},[1,"calcite-notice",{open:[1540],kind:[513],closable:[516],icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],scale:[513],width:[513],messages:[1040],messageOverrides:[1040],effectiveLocale:[32],defaultMessages:[32],setFocus:[64]},void 0,{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}]);function d(){if(typeof customElements>"u")return;["calcite-notice","calcite-icon"].forEach(e=>{switch(e){case"calcite-notice":customElements.get(e)||customElements.define(e,r);break;case"calcite-icon":customElements.get(e)||x();break}})}d();const H=r,_=d;export{H as CalciteNotice,_ as defineCustomElement}; diff --git a/build/assets/clientSideDefaults-B7fGShzo.js b/build/assets/clientSideDefaults-B7fGShzo.js new file mode 100644 index 0000000..e8e0d27 --- /dev/null +++ b/build/assets/clientSideDefaults-B7fGShzo.js @@ -0,0 +1,7 @@ +import{X as u,Y as n,Z as i,M as a,$ as c}from"./index-DKOmzAMm.js";import{t as l}from"./QueryEngineCapabilities-CTDe3LlQ.js";function $(t){return{renderer:{type:"simple",symbol:t==="esriGeometryPoint"||t==="esriGeometryMultipoint"?u:t==="esriGeometryPolyline"?n:i}}}const y=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function A(t,s){if(a("esri-csp-restrictions"))return()=>({[s]:null,...t});try{let e=`this${p(s)} = null;`;for(const r in t)e+=`this${p(r)} = ${JSON.stringify(t[r])};`;const o=new Function(` + return class AttributesClass$${d++} { + constructor() { + ${e}; + } + } + `)();return()=>new o}catch{return()=>({[s]:null,...t})}}function p(t){return y.test(t)?`.${t}`:`["${t}"]`}function f(t={}){return[{name:"New Feature",description:"",prototype:{attributes:c(t)}}]}function C(t,s){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:s,supportsDelete:s,supportsEditing:s,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:s,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:l,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:s,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{f as c,A as i,C as l,$ as o}; diff --git a/build/assets/component-BUnDTGFH.js b/build/assets/component-BUnDTGFH.js new file mode 100644 index 0000000..4cba432 --- /dev/null +++ b/build/assets/component-BUnDTGFH.js @@ -0,0 +1,16 @@ +/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */function G(e){return e.map(t=>{let r="";for(let n=0;nG([2,1,1,1,3]);/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + *//*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var x=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],S=x.join(","),O=typeof Element>"u",d=O?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,w=!O&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},T=function e(t,r){var n;r===void 0&&(r=!0);var a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=a===""||a==="true",u=i||r&&t&&e(t.parentNode);return u},X=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},F=function(t,r,n){if(T(t))return[];var a=Array.prototype.slice.apply(t.querySelectorAll(S));return r&&d.call(t,S)&&a.unshift(t),a=a.filter(n),a},D=function e(t,r,n){for(var a=[],i=Array.from(t);i.length;){var u=i.shift();if(!T(u,!1))if(u.tagName==="SLOT"){var l=u.assignedElements(),s=l.length?l:u.children,o=e(s,!0,n);n.flatten?a.push.apply(a,o):a.push({scopeParent:u,candidates:o})}else{var f=d.call(u,S);f&&n.filter(u)&&(r||!t.includes(u))&&a.push(u);var c=u.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(u),y=!T(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(u));if(c&&y){var v=e(c===!0?u.children:c.children,!0,n);n.flatten?a.push.apply(a,v):a.push({scopeParent:u,candidates:v})}else i.unshift.apply(i,u.children)}}return a},q=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},L=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||X(t))&&!q(t)?0:t.tabIndex},Z=function(t,r){var n=L(t);return n<0&&r&&!q(t)?0:n},z=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},B=function(t){return t.tagName==="INPUT"},H=function(t){return B(t)&&t.type==="hidden"},Y=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},J=function(t,r){for(var n=0;nsummary:first-of-type"),u=i?t.parentElement:t;if(d.call(u,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof a=="function"){for(var l=t;t;){var s=t.parentElement,o=w(t);if(s&&!s.shadowRoot&&a(s)===!0)return R(t);t.assignedSlot?t=t.assignedSlot:!s&&o!==t.ownerDocument?t=o.host:t=s}t=l}if(_(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return R(t);return!1},et=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},nt=function e(t){var r=[],n=[];return t.forEach(function(a,i){var u=!!a.scopeParent,l=u?a.scopeParent:a,s=Z(l,u),o=u?e(a.candidates):l;s===0?u?r.push.apply(r,o):r.push(l):n.push({documentOrder:i,tabIndex:s,item:a,isScope:u,content:o})}),n.sort(z).reduce(function(a,i){return i.isScope?a.push.apply(a,i.content):a.push(i.content),a},[]).concat(r)},at=function(t,r){r=r||{};var n;return r.getShadowRoot?n=D([t],r.includeContainer,{filter:E.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:rt}):n=F(t,r.includeContainer,E.bind(null,r)),nt(n)},At=function(t,r){r=r||{};var n;return r.getShadowRoot?n=D([t],r.includeContainer,{filter:p.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=F(t,r.includeContainer,p.bind(null,r)),n},Ct=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return d.call(t,S)===!1?!1:E(r,t)},it=x.concat("iframe").join(","),It=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return d.call(t,it)===!1?!1:p(r,t)};const ut={getShadowRoot:!0};function Et(e){return e?e.id=e.id||`${e.tagName.toLowerCase()}-${W()}`:""}function Rt(e){const t="dir",r=`[${t}]`,n=M(e,r);return n?n.getAttribute(t):"ltr"}function P(e){return e.getRootNode()}function k(e){return e.host||null}function st(e,{selector:t,id:r}){if(!e)return null;e.assignedSlot&&(e=e.assignedSlot);const n=P(e);return(r?"getElementById"in n?n.getElementById(r):null:t?n.querySelector(t):null)||st(k(n),{selector:t,id:r})}function M(e,t){return e?e.closest(t)||M(k(P(e)),t):null}function lt(e,t){return j(e,t)}function j(e,t){if(!e)return;const r=t(e);if(r!==void 0)return r;const{parentNode:n}=e;return j(n instanceof ShadowRoot?n.host:n,t)}function Nt(e,t){return!!lt(t,r=>r===e?!0:void 0)}function ot(e){return typeof(e==null?void 0:e.setFocus)=="function"}async function xt(e){if(e)return ot(e)?e.setFocus():e.focus()}function ct(e){if(e)return at(e,ut)[0]??e}function Ot(e){var t;(t=ct(e))==null||t.focus()}const g=":not([slot])";function Ft(e,t,r){t&&!Array.isArray(t)&&typeof t!="string"&&(r=t,t=null);const n=t?Array.isArray(t)?t.map(a=>`[slot="${a}"]`).join(","):`[slot="${t}"]`:g;return r!=null&&r.all?ft(e,n,r):dt(e,n,r)}function $(e,t){return e?Array.from(e.children||[]).filter(r=>r==null?void 0:r.matches(t)):[]}function ft(e,t,r){let n=t===g?$(e,g):Array.from(e.querySelectorAll(t));n=r&&r.direct===!1?n:n.filter(i=>i.parentElement===e),n=r!=null&&r.matches?n.filter(i=>i==null?void 0:i.matches(r.matches)):n;const a=r==null?void 0:r.selector;return a?n.map(i=>Array.from(i.querySelectorAll(a))).reduce((i,u)=>[...i,...u],[]).filter(i=>!!i):n}function dt(e,t,r){let n=t===g?$(e,g)[0]||null:e.querySelector(t);n=r&&r.direct===!1||(n==null?void 0:n.parentElement)===e?n:null,n=r!=null&&r.matches?n!=null&&n.matches(r.matches)?n:null:n;const a=r==null?void 0:r.selector;return a?n==null?void 0:n.querySelector(a):n}function vt(e,t){return e.filter(r=>r.matches(t))}function Dt(e,t,r){if(typeof t=="string"&&t!=="")return t;if(t==="")return e[r]}function qt(e){return(!!e).toString()}function Lt(e){return yt(e)||ht(e)}function bt(e){return gt(e).filter(t=>t.nodeType===Node.TEXT_NODE).map(t=>t.textContent).join("").trim()}function ht(e){return!!bt(e)}function gt(e){return e.currentTarget.assignedNodes({flatten:!0})}function yt(e){return!!mt(e).length}function mt(e,t){return St(e.target,t)}function St(e,t){const r=e.assignedElements({flatten:!0});return t?vt(r,t):r}function Bt(e){return!!(e.isPrimary&&e.button===0)}function Pt(e,t){if(e.parentNode!==t.parentNode)return!1;const r=Array.from(e.parentNode.children);return r.indexOf(e)m.trim()).indexOf(t),c=s[f]??s[0];function y(){requestAnimationFrame(()=>{n==null||n(),requestAnimationFrame(()=>a==null?void 0:a())})}if(c==="0s"){y();return}const v="transitionstart",A="transitionend",C="transitioncancel";return new Promise(m=>{const U=window.setTimeout(()=>{e.removeEventListener(v,I),e.removeEventListener(A,b),e.removeEventListener(C,b),y(),m()},parseFloat(c)*1e3);e.addEventListener(v,I),e.addEventListener(A,b),e.addEventListener(C,b);function I(h){h.target===e&&N(h)===t&&(window.clearTimeout(U),e.removeEventListener(v,I),n==null||n())}function b(h){h.target===e&&N(h)===t&&(e.removeEventListener(A,b),e.removeEventListener(C,b),a==null||a(),m())}})}function Tt(e){return"propertyName"in e}function N(e){return Tt(e)?e.propertyName:e.animationName}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */function Mt(e){return e==="l"?"m":"s"}async function jt(e){await(pt(e)?e.componentOnReady():new Promise(t=>requestAnimationFrame(()=>t())))}function pt(e){return typeof e.componentOnReady=="function"}export{M as a,Mt as b,jt as c,Ft as d,ut as e,xt as f,W as g,It as h,Pt as i,at as j,At as k,Ct as l,L as m,Lt as n,yt as o,Ot as p,st as q,Et as r,Dt as s,qt as t,Rt as u,Bt as v,kt as w,Nt as x}; diff --git a/build/assets/computeTranslationToOriginAndRotation-BxPeFPaY.js b/build/assets/computeTranslationToOriginAndRotation-BxPeFPaY.js new file mode 100644 index 0000000..da76b9c --- /dev/null +++ b/build/assets/computeTranslationToOriginAndRotation-BxPeFPaY.js @@ -0,0 +1 @@ +import{e3 as P,e4 as R,e5 as S,e6 as f,e7 as s,ab as N,e8 as O,e9 as c,ea as M,eb as T,au as u}from"./index-DKOmzAMm.js";function i(E,C,t){const A=Math.sin(E),e=Math.cos(E),r=Math.sin(C),a=Math.cos(C),n=t;return n[0]=-A,n[4]=-r*e,n[8]=a*e,n[12]=0,n[1]=e,n[5]=-r*A,n[9]=a*A,n[13]=0,n[2]=0,n[6]=a,n[10]=r,n[14]=0,n[3]=0,n[7]=0,n[11]=0,n[15]=1,n}function F(E,C,t){return i(E,C,t),P(t,t),t}function G(E,C,t,A){if(E==null||A==null)return!1;const e=R(E,S),r=R(A,f);if(e===r&&!_(r)&&(e!==s.UNKNOWN||N(E,A)))return O(t,C),!0;if(_(r)){const a=c[e][s.LON_LAT],n=c[s.LON_LAT][r];return a!=null&&n!=null&&(a(C,0,o,0),n(o,0,L,0),i(l*o[0],l*o[1],t),t[12]=L[0],t[13]=L[1],t[14]=L[2],!0)}if(!(r!==s.WEB_MERCATOR&&r!==s.PLATE_CARREE&&r!==s.WGS84&&r!==s.CGCS2000||e!==s.WGS84&&e!==s.SPHERICAL_ECEF&&e!==s.WEB_MERCATOR&&e!==s.CGCS2000)){const a=c[e][s.LON_LAT],n=c[s.LON_LAT][r];return a!=null&&n!=null&&(a(C,0,o,0),n(o,0,L,0),e===s.SPHERICAL_ECEF?F(l*o[0],l*o[1],t):M(t),t[12]=L[0],t[13]=L[1],t[14]=L[2],!0)}return!1}function _(E){return E===s.SPHERICAL_ECEF||E===s.SPHERICAL_MARS_PCPF||E===s.SPHERICAL_MOON_PCPF}const l=T(1),o=u(),L=u();export{G as u}; diff --git a/build/assets/convertMeshVertexSpace-BbnC0zgE.js b/build/assets/convertMeshVertexSpace-BbnC0zgE.js new file mode 100644 index 0000000..45de116 --- /dev/null +++ b/build/assets/convertMeshVertexSpace-BbnC0zgE.js @@ -0,0 +1 @@ +import{c7 as p,s,$ as i}from"./index-DKOmzAMm.js";import{l as c}from"./MeshVertexAttributes-CfiMg9vN.js";import{M as n}from"./vertexSpaceConversion-DdxiyRap.js";import"./mat3-BNGRf_pC.js";import"./mat3f64-q3fE-ZOt.js";import"./mat4f64-CSKppSlJ.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./vec3-C6eb5QY9.js";import"./projection-Ch_noS-l.js";import"./DoubleArray-D2IDWC15.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./vec4-n1PBj5SL.js";async function j(t,r,m){await Promise.resolve(),p(m);const o=n(t,r);if(!o)throw new s("meshUtils:convertVertexSpace()","Failed to convert to provided vertex space due to projection errors");const e=t.cloneAndModifyVertexAttributes(new c({...o,uv:i(t.vertexAttributes.uv),color:i(t.vertexAttributes.color)}),r);return e.transform=null,e}export{j as convertMeshVertexSpace}; diff --git a/build/assets/createConnection-BFN_9xe7.js b/build/assets/createConnection-BFN_9xe7.js new file mode 100644 index 0000000..47861cf --- /dev/null +++ b/build/assets/createConnection-BFN_9xe7.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css"])))=>i.map(i=>d[i]); +import{b1 as O,s as c,B as d,D as p,E as S,dN as v,b_ as F,V as a,dI as E,a2 as C,U as x,dh as P,_ as $,dK as M,ay as W}from"./index-DKOmzAMm.js";import{c as k}from"./query-CQvaiR4K.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-CF4bGKhW.js";import"./utils-BCmi3vQB.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";let w=class extends O.EventedAccessor{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new c("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};d([p({readOnly:!0})],w.prototype,"connectionError",null),w=d([S("esri.layers.support.StreamConnection")],w);const R=w;var g;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"})(g||(g={}));let f=class extends R{constructor(t){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:r,spatialReference:s,sourceSpatialReference:o}=t;this._config=t,this._featureZScaler=v(r,o,s),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),this._websocket!=null&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(this._websocket==null)return"disconnected";switch(this._websocket.readyState){case g.CONNECTING:case g.OPEN:return"connected";case g.CLOSING:case g.CLOSED:return"disconnected"}}sendMessageToSocket(t){this._websocket!=null?this._websocket.send(JSON.stringify(t)):this._outstandingMessages.push(t)}sendMessageToClient(t){this._onMessage(t)}updateCustomParameters(t){this._config.customParameters=t,this._websocket!=null&&this._websocket.close()}async _tryCreateWebSocket(t=this._config.source.path,r=1e3,s=0){try{if(this.destroyed)return;const o=F(t,this._config.customParameters??{});this._websocket=await this._createWebSocket(o),this.notifyChange("connectionStatus")}catch(o){const n=r/1e3;return this._config.maxReconnectionAttempts&&s>=this._config.maxReconnectionAttempts?(a.getLogger(this).error(new c("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(a.getLogger(this).error(new c("websocket-connection",`Failed to connect. Attempting to reconnect in ${n}s`,o)),await E(r),this._tryCreateWebSocket(t,Math.min(1.5*r,1e3*this._config.maxReconnectionInterval),s+1))}}_setWebSocketJSONParseHandler(t){t.onmessage=r=>{try{const s=JSON.parse(r.data);this._onMessage(s)}catch(s){return void a.getLogger(this).error(new c("websocket-connection","Failed to parse message, invalid JSON",{error:s}))}}}_createWebSocket(t){return new Promise((r,s)=>{const o=new WebSocket(t);o.onopen=()=>{if(o.onopen=null,this.destroyed)return o.onclose=null,void o.close();o.onclose=n=>this._onClose(n),o.onerror=n=>this._onError(n),this._setWebSocketJSONParseHandler(o),r(o)},o.onclose=n=>{o.onopen=o.onclose=null,s(n)}})}async _handshake(t=1e4){const r=this._websocket;if(r==null)return;const s=C(),o=r.onmessage,{filter:n,outFields:u,spatialReference:l}=this._config;return s.timeout(t),r.onmessage=h=>{var m;let i=null;try{i=JSON.parse(h.data)}catch{}i&&typeof i=="object"||(a.getLogger(this).error(new c("websocket-connection","Protocol violation. Handshake failed - malformed message",h.data)),s.reject(),this.destroy()),((m=i.spatialReference)==null?void 0:m.wkid)!==(l==null?void 0:l.wkid)&&(a.getLogger(this).error(new c("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${l.wkid}`,h.data)),s.reject(),this.destroy()),i.format!=="json"&&(a.getLogger(this).error(new c("websocket-connection","Protocol violation. Handshake failed - format is not set",h.data)),s.reject(),this.destroy()),n&&i.filter!==n&&a.getLogger(this).error(new c("websocket-connection","Tried to set filter, but server doesn't support it")),u&&i.outFields!==u&&a.getLogger(this).error(new c("websocket-connection","Tried to set outFields, but server doesn't support it")),r.onmessage=o;for(const y of this._outstandingMessages)r.send(JSON.stringify(y));this._outstandingMessages=[],s.resolve()},r.send(JSON.stringify({filter:n,outFields:u,format:"json",spatialReference:{wkid:l.wkid}})),s.promise}_onMessage(t){if(this.onMessage(t),"type"in t)switch(t.type){case"features":case"featureResult":for(const r of t.features)this._featureZScaler!=null&&this._featureZScaler(r.geometry),this.onFeature(r)}}_onError(t){const r="Encountered an error over WebSocket connection";this._set("errorString",r),a.getLogger(this).error("websocket-connection",r)}_onClose(t){this._websocket=null,this.notifyChange("connectionStatus"),t.code!==1e3&&a.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${t.code}`),this.destroyed||this._open()}};d([p()],f.prototype,"connectionStatus",null),d([p()],f.prototype,"errorString",void 0),f=d([S("esri.layers.graphics.sources.connections.WebSocketConnection")],f);const T=1e4,q={maxQueryDepth:5,maxRecordCountFactor:3};let b=class extends f{constructor(e){super({...q,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||a.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),this._featureZScaler!=null&&this._featureZScaler(t.geometry)}catch(r){return void a.getLogger(this).error(new c("geoevent-connection","Failed to parse message",r))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=x(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:o}=r,n=this._inferWebSocketBaseUrl(s);return F(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(e.length===1)return e[0];for(const t of e)if(t.includes("wss"))return t;return a.getLogger(this).error(new c("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(r==null||e==null&&t==null)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const n=C(),u=()=>{o||(this.destroyed||this._websocket!==r||a.getLogger(this).error(new c("geoevent-connection","Server timed out when setting filter")),n.reject())},l=h=>{const i=JSON.parse(h.data);i.filter&&(i.error&&(a.getLogger(this).error(new c("geoevent-connection","Failed to set service filter",i.error)),this._set("errorString",`Could not set service filter - ${i.error}`),n.reject(i.error)),this._setWebSocketJSONParseHandler(r),o=!0,n.resolve())};return r.onmessage=l,r.send(s),setTimeout(u,T),n.promise}_serializeFilter(e,t){const r={};if(e==null&&t==null)return r;if(e!=null&&e.geometry)try{const s=P(e.geometry);if(s.type!=="extent")throw new c(`Expected extent but found type ${s.type}`);r.geometry=JSON.stringify(s.shiftCentralMeridian())}catch(s){a.getLogger(this).error(new c("geoevent-connection","Encountered an error when setting connection geometryDefinition",s))}return e!=null&&e.where&&e.where!=="1 = 1"&&e.where!=="1=1"&&(r.where=e.where),t!=null&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return a.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:n}=s;for(const u in o)e.attributes[u]=o[u];return n&&(e.geometry=n),e.geometry||e.centroid||a.getLogger(this).error(new c("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const o=await s;if(!o)return;for(const n of o.features)this.onFeature(this._enrich(n))}catch(e){a.getLogger(this).error(new c("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){var y;const t=new(await $(async()=>{const{default:L}=await import("./index-DKOmzAMm.js").then(N=>N.k7);return{default:L}},__vite__mapDeps([0,1]))).default({url:e}),{capabilities:r}=await t.load(),s=r.query.supportsMaxRecordCountFactor,o=r.query.supportsPagination,n=r.query.supportsCentroid,u=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,h=s?l*u:l,i=new M;if(i.outFields=this._config.outFields??["*"],i.where=((y=this._config.filter)==null?void 0:y.where)??"1=1",i.returnGeometry=!0,i.returnExceededLimitFeatures=!0,i.outSpatialReference=W.fromJSON(this._config.spatialReference),n&&(i.returnCentroid=!0),s&&(i.maxRecordCountFactor=u),o)return i.num=h,t.destroy(),this._queryPages(e,i);const m=await k(e,i,this._config.sourceSpatialReference);return t.destroy(),m.data}async _queryPages(e,t,r=[],s=0){t.start=t.num!=null?s*t.num:null;const{data:o}=await k(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(o.features.forEach(n=>r.push(n)),this._queryPages(e,t,r,s+1)):(r.forEach(n=>o.features.push(n)),o)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const o of r){const n=o.attributes[s];t.set(n,o)}this._relatedFeatures=t}};b=d([S("esri.layers.graphics.sources.connections.GeoEventConnection")],b);const j=b;let _=class extends R{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=v(t,s,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)this._featureZScaler!=null&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};d([p()],_.prototype,"connectionStatus",void 0),d([p()],_.prototype,"errorString",void 0),_=d([S("esri.layers.support.ClientSideConnection")],_);function D(e,t){if(e==null&&t==null)return null;const r={};return t!=null&&(r.geometry=t),e!=null&&(r.where=e),r}function K(e,t,r,s,o,n,u,l,h){const i={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:D(o,n),maxReconnectionAttempts:u,maxReconnectionInterval:l,customParameters:h};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new f(i):new j(i):new _(i)}export{K as createConnection}; diff --git a/build/assets/crsUtils-DAndLU68.js b/build/assets/crsUtils-DAndLU68.js new file mode 100644 index 0000000..4a9f2af --- /dev/null +++ b/build/assets/crsUtils-DAndLU68.js @@ -0,0 +1 @@ +const o=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function r(n){return n!=null&&o.some(([t,e])=>n>=t&&n<=e)}export{r as o}; diff --git a/build/assets/dataUtils-DYQC_Kql.js b/build/assets/dataUtils-DYQC_Kql.js new file mode 100644 index 0000000..f591d65 --- /dev/null +++ b/build/assets/dataUtils-DYQC_Kql.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lerc-wasm-1FN8mB-S.js","assets/_commonjsHelpers-DCkdB7M8.js"])))=>i.map(i=>d[i]); +import{B as D,D as B,d7 as Ur,E as Ot,F as Dt,s as wt,$ as nt,V as yt,fz as Or,bX as Dr,_ as Gr,fr as Br,aG as Jt,aS as Nr,d2 as $r,Q as Fr,aZ as Pe,ay as Vr,a_ as ve,hX as _r,ij as Ee,j9 as Xt,ih as Re,ii as jr,gR as Le,M as zr,c7 as Wr,he as nr}from"./index-DKOmzAMm.js";import{o as ir}from"./_commonjsHelpers-DCkdB7M8.js";let Vt=class{constructor(e=null,r=null,o=null){this.minValue=e,this.maxValue=r,this.noDataValue=o}};const Hr=9999999e31,qr=2e-7,Kr={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function _t(t){return Kr[t]??[-34028234663852886e22,34028234663852886e22]}function Rn(t,e){return t==null||e==null?"s32":t<0?t>=-128&&e<128?"s8":t>=-32768&&e<32768?"s16":"s32":e<256?"u8":e<65536?"u16":"u32"}function Ln(t){return((t==null?void 0:t.startsWith("s"))||(t==null?void 0:t.startsWith("u")))??!1}function xe(t,e,r){var f,p;if(t.depthCount&&t.depthCount>1)return;const{pixels:o,statistics:l,pixelType:n}=t,u=o[0].length,i=t.bandMasks??[],a=t.mask??new Uint8Array(u).fill(255),c=n==="f32"||n==="f64",s=_t(n);let h=!1;for(let m=0;mg+Number.EPSILON||d=Hr?qr*Math.abs(g):n==="f32"?2**-23:Number.EPSILON);for(let x=0;x1?i:null,t.mask=a),h&&"updateStatistics"in t&&t.updateStatistics()}var vt;let it=vt=class extends Dt{static createEmptyBand(t,e){return new(vt.getPixelArrayConstructor(t))(e)}static combineBandMasks(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(255);for(let o=0;oJr(r,this.mask));const t=this.mask;let e=0;if(t!=null)for(let r=0;rr?r:if>=e.length),n=o===t.length&&!t.some((f,p)=>f!==p);if(l||n)return this;const u=((h=this.bandMasks)==null?void 0:h.length)===o?t.map(f=>this.bandMasks[f]):void 0;let{mask:i,validPixelCount:a}=this;const{width:c,height:s}=this;return u!=null&&u.length&&(i=vt.combineBandMasks(u),a=i.filter(f=>!!f).length),new vt({pixelType:this.pixelType,width:c,height:s,mask:i,bandMasks:u,validPixelCount:a,maskIsAlpha:this.maskIsAlpha,pixels:t.map(f=>e[f]),statistics:r&&t.map(f=>r[f])})}clone(){const t=new vt({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;this.mask!=null&&(t.mask=new Uint8Array(this.mask)),this.bandMasks&&(t.bandMasks=this.bandMasks.map(o=>new Uint8Array(o)));const r=vt.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const o=!!this.pixels[0].slice;for(e=0;e=3?(u=l[1],i=l[2]):l.length===2&&(u=l[1]);const c=new Uint32Array(t),s=this.width*this.height;if(n.length===s)if(e!=null&&e.length===s)if(r)for(a=0;a0){for(const g of o)if(g.minValue!=null&&(u=Math.min(u,g.minValue)),g.maxValue!=null&&g.minValue!=null){const v=g.maxValue-g.minValue;i=Math.max(i,v)}n=255/i}else{let g=255;l==="s8"?(u=-128,g=127):l==="u16"?g=65535:l==="s16"?(u=-32768,g=32767):l==="u32"?g=4294967295:l==="s32"?(u=-2147483648,g=2147483647):l==="f32"?(u=-34e38,g=34e38):l==="f64"&&(u=-Number.MAX_VALUE,g=Number.MAX_VALUE),n=255/(g-u)}const a=new Uint32Array(t),c=this.width*this.height;let s,h,f,p,m;if(s=h=f=e[0],s.length!==c)return yt.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(h=e[1],e.length>=3&&(f=e[2]),r!=null&&r.length===c)for(p=0;p=3?(l=e[1],n=e[2]):e.length===2&&(l=e[1]);const i=this.width*this.height;if(o.length!==i)return yt.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let a=0;if(r!=null&&r.length===i)for(u=0;uo?u:o);else for(n=0;no?u:o;return new Vt(r,o)}D([B({json:{write:!0}})],it.prototype,"width",void 0),D([B({json:{write:!0}})],it.prototype,"height",void 0),D([B({json:{write:!0}})],it.prototype,"pixelType",void 0),D([Ur("pixelType")],it.prototype,"castPixelType",null),D([B({json:{write:!0}})],it.prototype,"validPixelCount",void 0),D([B({json:{write:!0}})],it.prototype,"mask",void 0),D([B({json:{write:!0}})],it.prototype,"maskIsAlpha",void 0),D([B({json:{write:!0}})],it.prototype,"pixels",void 0),D([B()],it.prototype,"premultiplyAlpha",void 0),D([B({json:{write:!0}})],it.prototype,"statistics",void 0),D([B({json:{write:!0}})],it.prototype,"depthCount",void 0),D([B({json:{write:!0}})],it.prototype,"noDataValues",void 0),D([B({json:{write:!0}})],it.prototype,"bandMasks",void 0),it=vt=D([Ot("esri.layers.support.PixelBlock")],it);const H=it;var oe,Ue,Oe,sr={exports:{}};Ue=sr,oe=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(e){var r=this.buffer,o=r?r.byteLength:0;if(el&&(o=l)}else{for(;!this.eof;)this.readBlock();o=this.bufferLength}return this.pos=o,this.buffer.subarray(r,o)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,r,o){for(var l=e+r;this.bufferLength<=l&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,r,o)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},t}(),(Oe=function(){if(!self||!self.Uint32Array)return null;var t=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],l=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function n(i){throw new Error(i)}function u(i){var a=0,c=i[a++],s=i[a++];c!=-1&&s!=-1||n("Invalid header in flate stream"),(15&c)!=8&&n("Unknown compression method in flate stream"),((c<<8)+s)%31!=0&&n("Bad FCHECK in flate stream"),32&s&&n("FDICT bit set in flate stream"),this.bytes=i,this.bytesPos=a,this.codeSize=0,this.codeBuf=0,oe.call(this)}return u.prototype=Object.create(oe.prototype),u.prototype.getBits=function(i){for(var a,c=this.codeSize,s=this.codeBuf,h=this.bytes,f=this.bytesPos;c>i,this.codeSize=c-=i,this.bytesPos=f,a},u.prototype.getCode=function(i){for(var a=i[0],c=i[1],s=this.codeSize,h=this.codeBuf,f=this.bytes,p=this.bytesPos;s>16,d=65535&g;return(s==0||s>v,this.codeSize=s-v,this.bytesPos=p,d},u.prototype.generateHuffmanTable=function(i){for(var a=i.length,c=0,s=0;sc&&(c=i[s]);for(var h=1<>=1;for(s=d;s0;)$[g++]=j}var a=this.getBits(3);if(1&a&&(this.eof=!0),(a>>=1)!=0){var c,s;if(a==1)c=o,s=l;else if(a==2){for(var h=this.getBits(5)+257,f=this.getBits(5)+1,p=this.getBits(4)+4,m=Array(t.length),g=0;g=C&&(C=(L=this.ensureBuffer(x+1)).length),L[x++]=k;else{if(k==256)return void(this.bufferLength=x);var T=(k=e[k-=257])>>16;T>0&&(T=this.getBits(T)),d=(65535&k)+T,k=this.getCode(s),(T=(k=r[k])>>16)>0&&(T=this.getBits(T));var A=(65535&k)+T;x+d>=C&&(C=(L=this.ensureBuffer(x+d)).length);for(var M=0;M{let s=null;u==="jpg"&&i&&(s=ar._getMask(e,{width:l,height:n}));const h=new Blob([new Uint8Array(e)],{type:"image/"+u=="jpg"?"jpeg":u}),f=URL.createObjectURL(h),p=new Image;let m;p.src=f,p.onload=()=>{if(URL.revokeObjectURL(f),Or(o))return void c(Dr());l=p.width,n=p.height,this._canvas&&this._ctx?(this._canvas.width===l&&this._canvas.height===n||(this._canvas.width=l,this._canvas.height=n),this._ctx.clearRect(0,0,l,n)):(this._canvas=document.createElement("canvas"),this._canvas.width=l,this._canvas.height=n,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const g=this._ctx.getImageData(0,0,l,n);let v;if(m=g.data,r.renderOnCanvas){if(s)for(v=0;v{URL.revokeObjectURL(f),c("cannot load image")}})}static _getMask(e,r){let o=null;try{const l=new Uint8Array(e),n=Math.ceil(l.length/2);let u=0;const i=l.length-2;for(u=n;u=0;h--)o[c++]=a[s]>>h&1}}catch{}return o}};var De,Ge,Be,lr={exports:{}};De=lr,Ge=function(){var t=function(){function e(r){this.message="JPEG error: "+r}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,o=799,l=3406,n=2276,u=1567,i=3784,a=5793,c=2896;function s(){this.decodeTransform=null,this.colorTransform=-1}function h(d,y){for(var w,b,C=0,x=[],k=16;k>0&&!d[k-1];)k--;x.push({children:[],index:0});var T,A=x[0];for(w=0;w0;)A=x.pop();for(A.index++,x.push(A);x.length<=w;)x.push(T={children:[],index:0}),A.children[A.index]=T.children,A=T;C++}w+10)return U--,P>>U&1;if((P=d[y++])===255){var F=d[y++];if(F)throw new t("unexpected marker "+(P<<8|F).toString(16))}return U=7,P>>>7}function R(F){for(var W=F;;){if(typeof(W=W[E()])=="number")return W;if(typeof W!="object")throw new t("invalid huffman sequence")}}function L(F){for(var W=0;F>0;)W=W<<1|E(),F--;return W}function G(F){if(F===1)return E()===1?1:-1;var W=L(F);return W>=1<>4;if(rt!==0){var Lr=e[at+=lt];F.blockData[W+Lr]=G(rt),at++}else{if(lt<15)break;at+=16}}}function N(F,W){var K=R(F.huffmanTableDC),et=K===0?0:G(K)<0)O--;else for(var K=x,et=k;K<=et;){var at=R(F.huffmanTableAC),pt=15&at,rt=at>>4;if(pt!==0){var lt=e[K+=rt];F.blockData[W+lt]=G(pt)*(1<>4,(K=15&et)==0)rt<15?(O=L(rt)+(1<=65488&&At<=65495))break;y+=2}return(ht=v(d,y))&&ht.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+ht.invalid),y=ht.offset),y-S}function m(d,y,w){var b,C,x,k,T,A,M,I,S,P,U,E,R,L,G,_,N,$=d.quantizationTable,O=d.blockData;if(!$)throw new t("missing required Quantization Table.");for(var V=0;V<64;V+=8)S=O[y+V],P=O[y+V+1],U=O[y+V+2],E=O[y+V+3],R=O[y+V+4],L=O[y+V+5],G=O[y+V+6],_=O[y+V+7],S*=$[V],P|U|E|R|L|G|_?(P*=$[V+1],U*=$[V+2],E*=$[V+3],R*=$[V+4],L*=$[V+5],G*=$[V+6],_*=$[V+7],C=(b=(b=a*S+128>>8)+(C=a*R+128>>8)+1>>1)-C,N=(x=U)*i+(k=G)*u+128>>8,x=x*u-k*i+128>>8,M=(T=(T=c*(P-_)+128>>8)+(M=L<<4)+1>>1)-M,A=(I=(I=c*(P+_)+128>>8)+(A=E<<4)+1>>1)-A,k=(b=b+(k=N)+1>>1)-k,x=(C=C+x+1>>1)-x,N=T*n+I*l+2048>>12,T=T*l-I*n+2048>>12,I=N,N=A*o+M*r+2048>>12,A=A*r-M*o+2048>>12,M=N,w[V]=b+I,w[V+7]=b-I,w[V+1]=C+M,w[V+6]=C-M,w[V+2]=x+A,w[V+5]=x-A,w[V+3]=k+T,w[V+4]=k-T):(N=a*S+512>>10,w[V]=N,w[V+1]=N,w[V+2]=N,w[V+3]=N,w[V+4]=N,w[V+5]=N,w[V+6]=N,w[V+7]=N);for(var j=0;j<8;++j)S=w[j],(P=w[j+8])|(U=w[j+16])|(E=w[j+24])|(R=w[j+32])|(L=w[j+40])|(G=w[j+48])|(_=w[j+56])?(C=(b=4112+((b=a*S+2048>>12)+(C=a*R+2048>>12)+1>>1))-C,N=(x=U)*i+(k=G)*u+2048>>12,x=x*u-k*i+2048>>12,k=N,M=(T=(T=c*(P-_)+2048>>12)+(M=L)+1>>1)-M,A=(I=(I=c*(P+_)+2048>>12)+(A=E)+1>>1)-A,N=T*n+I*l+2048>>12,T=T*l-I*n+2048>>12,I=N,N=A*o+M*r+2048>>12,A=A*r-M*o+2048>>12,S=(S=(b=b+k+1>>1)+I)<16?0:S>=4080?255:S>>4,P=(P=(C=C+x+1>>1)+(M=N))<16?0:P>=4080?255:P>>4,U=(U=(x=C-x)+A)<16?0:U>=4080?255:U>>4,E=(E=(k=b-k)+T)<16?0:E>=4080?255:E>>4,R=(R=k-T)<16?0:R>=4080?255:R>>4,L=(L=x-A)<16?0:L>=4080?255:L>>4,G=(G=C-M)<16?0:G>=4080?255:G>>4,_=(_=b-I)<16?0:_>=4080?255:_>>4,O[y+j]=S,O[y+j+8]=P,O[y+j+16]=U,O[y+j+24]=E,O[y+j+32]=R,O[y+j+40]=L,O[y+j+48]=G,O[y+j+56]=_):(N=(N=a*S+8192>>14)<-2040?0:N>=2024?255:N+2056>>4,O[y+j]=N,O[y+j+8]=N,O[y+j+16]=N,O[y+j+24]=N,O[y+j+32]=N,O[y+j+40]=N,O[y+j+48]=N,O[y+j+56]=N)}function g(d,y){for(var w=y.blocksPerLine,b=y.blocksPerColumn,C=new Int16Array(64),x=0;x=C)return null;var k=b(y);if(k>=65472&&k<=65534)return{invalid:null,marker:k,offset:y};for(var T=b(x);!(T>=65472&&T<=65534);){if(++x>=C)return null;T=b(x)}return{invalid:k.toString(16),marker:T,offset:x}}return s.prototype={parse:function(d){function y(){var F=d[k]<<8|d[k+1];return k+=2,F}function w(){var F=y(),W=k+F-2,K=v(d,W,k);K&&K.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+K.invalid),W=K.offset);var et=d.subarray(k,W);return k+=et.length,et}function b(F){for(var W=Math.ceil(F.samplesPerLine/8/F.maxH),K=Math.ceil(F.scanLines/8/F.maxV),et=0;et>4){if(_>>4!=1)throw new t("DQT - invalid table spec");for(E=0;E<64;E++)N[e[E]]=y()}else for(E=0;E<64;E++)N[e[E]]=d[k++];M[15&_]=N}break;case 65472:case 65473:case 65474:if(C)throw new t("Only single frame JPEGs supported");y(),(C={}).extended=P===65473,C.progressive=P===65474,C.precision=d[k++],C.scanLines=y(),C.samplesPerLine=y(),C.components=[],C.componentIds={};var $,O=d[k++],V=0,j=0;for(U=0;U>4,tt=15&d[k+1];V>4?I:S)[15&Y]=h(q,mt)}break;case 65501:y(),x=y();break;case 65498:y();var Q,Gt=d[k++],xt=[];for(U=0;U>4],Q.huffmanTableAC=I[15&kt],xt.push(Q)}var zt=d[k++],Wt=d[k++],gt=d[k++],Ht=p(d,k,C,xt,x,zt,Wt,gt>>4,15>);k+=Ht;break;case 65535:d[k]!==255&&k--;break;default:if(d[k-3]===255&&d[k-2]>=192&&d[k-2]<=254){k-=3;break}throw new t("unknown marker "+P.toString(16))}P=y()}for(this.width=C.samplesPerLine,this.height=C.scanLines,this.jfif=T,this.eof=k,this.adobe=A,this.components=[],U=0;U>8)+O[I+1];return _},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:this.numComponents===3?this.colorTransform!==0:this.colorTransform===1},_convertYccToRgb:function(d){for(var y,w,b,C=0,x=d.length;C4)throw new t("Unsupported color mode");var b=this._getLinearizedBlockData(d,y);if(this.numComponents===1&&w){for(var C=b.length,x=new Uint8ClampedArray(3*C),k=0,T=0;T=0;g--)f[d++]=v[p]>>g&1}catch{}if(i===1&&c.length===n*u){const v=new Uint8Array(c.buffer);h=[v,v,v]}else{for(h=[],p=0;p<3;p++)h.push(new Uint8Array(s));for(g=0,m=0;mimport("./lerc-wasm-1FN8mB-S.js"),__vite__mapDeps([0,1])).then(t=>t.l).then(({default:t})=>t({locateFile:e=>Br(`esri/layers/support/rasterFormats/${e}`)})).then(t=>{Qr(t)}),ne)}const Zt={getBlobInfo:null,decode:null};function Zr(t){return 16+(t>>3<<3)}function Ct(t,e,r){r.set(t.slice(e,e+r.length))}function Qr(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:o,_lerc_getDataRanges:l,_lerc_decode_4D:n,asm:u}=t;let i;const a=Object.values(u).find(s=>s&&"buffer"in s&&s.buffer===t.HEAPU8.buffer),c=s=>{const h=s.map(g=>Zr(g)),f=h.reduce((g,v)=>g+v),p=e(f);i=new Uint8Array(a.buffer);let m=h[0];h[0]=p;for(let g=1;g{const p=new Uint8Array(48),m=new Uint8Array(8*3),[g,v,d]=c([s.length,p.length,m.length]);i.set(s,g),i.set(p,v),i.set(m,d);let y=o(g,s.length,v,d,12,3);if(y)throw r(g),new Error(`lerc-getBlobInfo: error code is ${y}`);i=new Uint8Array(a.buffer),Ct(i,v,p),Ct(i,d,m);const w=new Uint32Array(p.buffer),b=new Float64Array(m.buffer),[C,x,,k,T,A,M,I,S,P,U]=w,E={version:C,depthCount:P,width:k,height:T,validPixelCount:M,bandCount:A,blobSize:I,maskCount:S,dataType:x,minValue:b[0],maxValue:b[1],maxZerror:b[2],statistics:[],bandCountWithNoData:U};if(U&&P>1)return r(g),E;if(P===1&&A===1)return r(g),E.statistics.push({minValue:b[0],maxValue:b[1]}),E;const R=P*A*8,L=new Uint8Array(R),G=new Uint8Array(R);let _=g,N=0,$=0,O=!1;if(i.byteLength1){const ut=V.slice(tt*P,(tt+1)*P),bt=j.slice(tt*P,(tt+1)*P),Y=Math.min.apply(null,ut),q=Math.max.apply(null,bt);J.push({minValue:Y,maxValue:q,depthStats:{minValues:ut,maxValues:bt}})}else J.push({minValue:V[tt],maxValue:j[tt]});return r(_),O||r(N),E},Zt.decode=(s,h)=>{const{maskCount:f,depthCount:p,bandCount:m,width:g,height:v,dataType:d,bandCountWithNoData:y}=h,w=ur[d],b=g*v,C=new Uint8Array(b*m),x=b*p*m*w.size,k=new Uint8Array(x),T=new Uint8Array(m),A=new Uint8Array(8*m),[M,I,S,P,U]=c([s.length,C.length,k.length,T.length,A.length]);i.set(s,M),i.set(C,I),i.set(k,S),i.set(T,P),i.set(A,U);const E=n(M,s.length,f,I,p,g,v,m,d,S,P,U);if(E)throw r(M),new Error(`lerc-decode: error code is ${E}`);i=new Uint8Array(a.buffer),Ct(i,S,k),Ct(i,I,C);let R=null;if(y){Ct(i,P,T),Ct(i,U,A),R=[];const L=new Float64Array(A.buffer);for(let G=0;G1){C.set(y[0]);for(let M=1;M=x;if(p>0&&k)for(let M=0;M1?y:null,{pixelType:A}=g;return{width:a,height:c,bandCount:s,pixelType:A,depthCount:h,statistics:m,pixels:d,mask:C,bandMasks:T,noDataValues:i}}function eo(t,e,r,o=!0){if(e%4!=0||r%4!=0){const l=new ArrayBuffer(4*Math.ceil(r/4)),n=new Uint8Array(l),u=new Uint8Array(t,e,r);if(o)for(let i=0;i=n)i-=n,f=h>>>32-n,h<<=n;else{f=h>>>32-i,h=l[s++];const d=n-i;i=32-d,f=(f<>>i),h<<=d}if(f===257)break;if(f===256){n=9,u=Ne(),a=u.length,c=[];continue}const v=u[f];if(v==null){if(f>u.length)throw new Error("data integrity issue: code does not exist on code page");c.push(c[0]),u[a++]=c.slice(),$e(g,c)}else $e(g,v),c.push(v[0]),c.length>1&&(u[a++]=c.slice()),c=v.slice();if(Et.has(a)&&n++,i===0&&(h=l[s++],i=32),s>p||s===p&&i<=m)break}return new Uint8Array(g)}Et.add(511),Et.add(1023),Et.add(2047),Et.add(4095),Et.add(8191);const Fe=(t,e)=>{const r=e.width*e.height,o=e.pixelType;return Math.floor(t.byteLength/(r*pr(o)))},pr=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e},ro=(t,e)=>{if(8*t.byteLength=0;i--)o[l++]=n>>i&1;for(i=7;l>i&1,i--;return o};let oo=class{static decode(e,r){const o=r.pixelType,l=[],n=r.width*r.height,u=Fe(e,r),{bandIds:i,format:a}=r,c=(i==null?void 0:i.length)||Fe(e,r),s=e.byteLength-e.byteLength%(n*pr(o)),h=new o(e,0,n*u);let f,p,m,g,v=null;if(a==="bip")for(f=0;f>4,l<8?l=1:l===15?(l=4,n=(7&n)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):l===14?(l=3,n=(15&n)<<12|(63&t[r++])<<6|63&t[r++]):(l=2,n=(31&n)<<6|63&t[r++]),(n!==0||e)&&(o+=String.fromCharCode(n));return o}const Ae=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),io=(()=>{const t=Ae.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),so=["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"],ao=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),lo=(t,e)=>{let r=(e||Ae)[t];return r===void 0&&(r="unknown"+String(t)),r},he=new Map;he.set("EXIFIFD",io),he.set("GPSIFD",so);const Lt={tiffTags:Ae,ifdTags:he,geoKeys:ao,getTagName:lo},Te=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,e[0]===1})(),Ve=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],Ut=4294967296,co=new Set([1,5,6,7,8,34712,34887]);function Se(t,e){let r="unknown";return t===3?r=e===64?"f64":"f32":t===1?e===1?r="u1":e===2?r="u2":e===4?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):t===2&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function Qt(t){let e=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f64":e=Float64Array;break;default:e=Float32Array}return e}function uo(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function dr(t,e){var r;return(r=t.get(e))==null?void 0:r.values}function Mt(t,e){var r;return(r=t.get(e))==null?void 0:r.values}function _e(t,e){var r,o;return(o=(r=t.get(e))==null?void 0:r.values)==null?void 0:o[0]}function z(t,e){var r,o;return(o=(r=t.get(e))==null?void 0:r.values)==null?void 0:o[0]}function ie(t,e,r,o=0,l=Lt.tiffTags,n=4){const u=n===8,i=u?Me(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),a=4+2*n,c=u?8:2,s=c+i*a;if(r+s>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:s};const h=r+s+4<=t.byteLength?Yt(new DataView(t,r+s,n===8?8:4),0,e,n===8):null,f=r+c,p=new Map;let m,g,v,d,y,w=0,b=0;for(let C=0;Cfr(t,{inputOffset:e}).pixels[0];function fe(t,e){if(e!==1&&e!==2&&e!==4)return t;const r=new Uint8Array(t),o=8/e,l=new Uint8Array(t.byteLength*o);let n=0;const u=2**e-1;for(let i=0;i>>8-e&u}return l.buffer}function pe(t,e,r){const o=new cr;o.parse(t),o.colorTransform=r===6?-1:0;const l=o.getData(o.width,o.height,e!==1&&e!==4);return new Uint8Array(l.buffer)}function de(t){const e=new jt(t).getBytes(),r=new ArrayBuffer(e.length),o=new Uint8Array(r);return o.set(e),o}async function me(t,e,r,o,l){const n=Te===e,u=z(r,"BITSPERSAMPLE"),i=z(r,"SAMPLESPERPIXEL")??1,a=z(r,"PHOTOMETRICINTERPRETATION"),c=z(r,"SAMPLEFORMAT")??1,s=Se(c,u),h=z(r,"COMPRESSION")??1,f=Qt(s);let p,m,g;if(h===34887)return await hr(),ho(t,o);if(h===1)p=t.slice(o,o+l),m=new Uint8Array(p);else if(h===8||h===32946)m=new Uint8Array(t,o,l),m=de(m),p=m.buffer;else if(h===6)m=new Uint8Array(t,o,l),m=pe(m,i,a),p=m.buffer;else if(h===7){const w=r.get("JPEGTABLES").values,b=w.length-2;m=new Uint8Array(b+l-2);for(let x=0;x1&&(h===5||h===8||h===32946)&&d&&y){const w=te(r),b=new f(g.length);b.set(g),g=xo(b,y,d,c===3&&v===3,w?1:i)}return g}async function fo(t,e,r){const o=Mt(r,"TILEOFFSETS");if(o===void 0)return null;const l=Mt(r,"TILEBYTECOUNTS"),{width:n,height:u,pixelType:i,tileWidth:a,tileHeight:c}=Ie([r]),s=te(r,e),h=z(r,"SAMPLESPERPIXEL")||e.planes,f=n*u,p=z(r,"BITSPERSAMPLE"),m=(z(r,"COMPRESSION")??1)===34887,g=Qt(i),v=[];for(let L=0;L1){const L=Math.round(o.length/h);for(d=0;d{const o=Te===e.littleEndian,l=Mt(r,"STRIPOFFSETS");if(l===void 0)return null;const{width:n,height:u,pixelType:i}=Ie([r]),a=z(r,"SAMPLESPERPIXEL")||e.planes,c=z(r,"PHOTOMETRICINTERPRETATION"),s=n*u,h=z(r,"BITSPERSAMPLE"),f=Qt(i),p=new f(s*a),m=Mt(r,"STRIPBYTECOUNTS"),g=z(r,"ROWSPERSTRIP"),v=z(r,"COMPRESSION")??1;let d,y,w,b,C,x,k,T,A;if(h%8==0)for(d=0;d{if(!(t&&t.length>0&&e&&r))return null;let o,l,n;const u=t[0].length,i=t.length,a=new Uint8Array(u);for(let c=0;cn?0:1;else for(let s=0;sn?0:1);return a},go=t=>{if(!t)return null;const e=t.match(//gi);if(!e||e.length===0)return null;const r=new Map;let o,l,n,u,i;for(let d=0;d")),u=o.indexOf("sample="),u>-1&&(i=o.slice(u+8,o.indexOf('"',u+8))),u=o.indexOf("name="),u>-1&&(l=o.slice(u+6,o.indexOf('"',u+6))),l&&(n=o.slice(o.indexOf(">")+1,o.indexOf("")).trim(),i!=null?r.has(l)?r.get(l)[i]=n:r.set(l,[n]):r.set(l,n)),i=null;const a=r.get("STATISTICS_MINIMUM"),c=r.get("STATISTICS_MAXIMUM"),s=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(a&&c){f=[];for(let d=0;dv&&f>(l?t.byteLength:t?t.byteLength-a+o:0))return r.offlineOffsetSize=[a,f],r.values=null,!1;if(p<=v){if(!e)if(v<=32)a>>>=32-p;else{const y=d!=null&&d.length?d[0]:a>>>0,w=d!=null&&d.length?d[1]:Math.round((a-y)/Ut);p<=32?(a=y>>>32-p,d[0]=a):(a=y*2**(32-p)+(w>>>32-p),d[0]=y,d[1]=w>>>32-p)}if(i===1&&h===v)c=[a];else if(v===64){const y=d!=null&&d.length?d[0]:a>>>0,w=d!=null&&d.length?d[1]:Math.round((a-y)/Ut);let b=y,C=32;for(g=1;g<=i;g++){const x=32-h*g%32;if(C>>32-C,T=w<<32-C>>>32-C;b=w,c.push(k+T*2**(h-C)),C-=32-(h-C)}else c.push(b<>>32-h),C-=h;C===0&&(C=32,b=w)}}else for(g=1;g<=i;g++){const y=32-h*g;c.push(a<>>32-h)}}else{a-=o,l&&(a=0);for(let y=a;yparseFloat($)),f.some($=>isNaN($))&&(f=null));const p=z(e,"COMPRESSION")??1;let m;switch(p){case 1:m="NONE";break;case 2:case 3:case 4:case 32771:m="CCITT";break;case 5:m="LZW";break;case 6:case 7:m="JPEG";break;case 32773:m="PACKBITS";break;case 8:case 32946:m="DEFLATE";break;case 34712:m="JPEG2000";break;case 34887:m="LERC";break;default:m=String(p)}let g=!0,v="";co.has(p)||(g=!1,v+="unsupported tag compression "+p),a>3&&(g=!1,v+="unsupported tag sampleFormat "+a),u!==1&&u!==2&&u!==4&&u%8!=0&&(g=!1,v+="unsupported tag bitsPerSample "+u);const d=_e(e,"GEOASCIIPARAMS");let y;if(d){const $=d.split("|").find(V=>V.includes("ESRI PE String = ")),O=$?$.replace("ESRI PE String = ",""):"";y=O.startsWith("COMPD_CS")||O.startsWith("PROJCS")||O.startsWith("GEOGCS")?{wkid:null,wkt:O}:null}const w=Mt(e,"GEOTIEPOINTS"),b=Mt(e,"GEOPIXELSCALE"),C=Mt(e,"GEOTRANSMATRIX"),x=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let k,T,A=!1,M=!1;if(x){A=z(x,"GTRasterTypeGeoKey")===2;const $=z(x,"GTModelTypeGeoKey");if($===2){const O=z(x,"GeographicTypeGeoKey");O>=1024&&O<=32766&&(y={wkid:O}),y||O!==32767||(M=!0,y={wkid:4326})}else if($===1){const O=z(x,"ProjectedCSTypeGeoKey");O>=1024&&O<=32766&&(y={wkid:O})}}if(b&&w&&w.length>=6?(k=[b[0],0,w[3]-w[0]*b[0],0,-Math.abs(b[1]),w[4]-w[1]*b[1]],A&&(k[2]-=.5*k[0]+.5*k[1],k[5]-=.5*k[3]+.5*k[4])):C&&C.length===16&&(k=A?[C[0],C[1],C[3]-.5*C[0],C[4],C[5],C[7]-.5*C[5]]:[C[0],C[1],C[3],C[4],C[5],C[7]]),k){const $=[{x:0,y:n},{x:0,y:0},{x:l,y:n},{x:l,y:0}];let O,V=Number.POSITIVE_INFINITY,j=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,tt=Number.NEGATIVE_INFINITY;for(let ut=0;ut<$.length;ut++)O=uo($[ut],k),V=O.x>V?V:O.x,J=O.xj?j:O.y,tt=O.y400||Math.max(Math.abs(T.xmin),Math.abs(T.xmax))>361)&&(y=null,T.spatialReference=null);const I=mr(t);let S,P,U,E,R;if(I.length>0){U=Math.round(Math.log(l/z(I[0],"IMAGEWIDTH"))/Math.LN2);const $=I[I.length-1];E=I.length,S=z($,"TILEWIDTH"),P=z($,"TILELENGTH")}S=E!=null&&E>0?S||r:null,P=E!=null&&E>0?P||o:null,r&&(R=[{maxCol:Math.ceil(l/r)-1,maxRow:Math.ceil(n/o)-1,minRow:0,minCol:0}],I.forEach($=>{R.push({maxCol:Math.ceil(z($,"IMAGEWIDTH")/z($,"TILEWIDTH"))-1,maxRow:Math.ceil(z($,"IMAGELENGTH")/z($,"TILELENGTH"))-1,minRow:0,minCol:0})}));const L=_e(t[0],"GDAL_METADATA"),G=go(L);v+=" "+yr({width:l,height:n,tileWidth:r,tileHeight:o,planes:i,ifds:t});const _=gr(t).length===I.length+1,N=I!=null&&I.length?I.map($=>({x:l/z($,"IMAGEWIDTH"),y:n/z($,"IMAGELENGTH")})):void 0;return{width:l,height:n,tileWidth:r,tileHeight:o,planes:i,isBSQ:s,pixelType:c,compression:m,noData:f,hasMaskBand:_,isSupported:g,pyramidResolutions:N,message:v,extent:T,isPseudoGeographic:M,affine:b?null:k,firstPyramidLevel:U,maximumPyramidLevel:E,pyramidBlockWidth:S,pyramidBlockHeight:P,tileBoundary:R,metadata:G}}function te(t,e){const r=dr(t,"PLANARCONFIGURATION");return r?r[0]===2:!!e&&e.isBSQ}function mr(t){return t.filter(e=>z(e,"NEWSUBFILETYPE")===1)}function gr(t){return t.filter(e=>{const r=!(4&~(z(e,"NEWSUBFILETYPE")??0)),o=z(e,"PHOTOMETRICINTERPRETATION")===4;return r&&o})}function wo(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:o}=Co(t);let l=o;const n=[];do{const u=vo(t,e,l,0,Lt.tiffTags,r?8:4);if(!u.success)break;n.push(u.ifd),l=u.nextIFD}while(l>0);return{...Ie(n),littleEndian:e,isBigTiff:r,ifds:n,pyramidIFDs:mr(n),maskIFDs:gr(n)}}function Me(t,e,r){const o=t.getUint32(e,r),l=t.getUint32(e+4,r);return r?l*Ut+o:o*Ut+l}function bo(t,e,r){let o=r?t.getInt32(e,r):t.getUint32(e,r),l=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const n=(r?o:l)>=0?1:-1;return r?o*=n:l*=n,n*(r?l*Ut+o:o*Ut+l)}function Yt(t,e,r,o){return o?Me(t,e,r):t.getUint32(e,r)}function Co(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let o=null;if(r===18761)o=!0;else{if(r!==19789)throw new Error("unexpected endianess byte");o=!1}const l=e.getUint16(2,o);if(l!==42&&l!==43)throw new Error("unexpected tiff identifier");let n=4;const u=l===43;if(u){const i=e.getUint16(n,o);if(n+=2,i!==8)throw new Error("unsupported bigtiff version");if(e.getUint16(n,o)!==0)throw new Error("unsupported bigtiff version");n+=2}return{littleEndian:o,isBigTiff:u,firstIFDPos:Yt(e,n,o,u)}}function vo(t,e,r,o=0,l=Lt.tiffTags,n=4){const u=ie(t,e,r,o,l,n);let i;const a=u.ifd;if(a){if(Lt.ifdTags.forEach((c,s)=>{a.has(s)&&(i=a.get(s),i.data=ie(t,e,i.valueOffset-o,o,c).ifd)}),a.has("GEOKEYDIRECTORY")){i=a.get("GEOKEYDIRECTORY");const c=i.values;if(c&&c.length>4){const s=c[0]+"."+c[1]+"."+c[2];i.data=ie(t,e,i.valueOffset+6-o,o,Lt.geoKeys,2).ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}if(a.has("XMP")){i=a.get("XMP");const c=i.values;typeof c[0]=="number"&&i.type===7&&(i.values=[no(new Uint8Array(c))])}}return u}function yr(t){const{width:e,height:r,tileHeight:o,tileWidth:l}=t,n=t.planes,u=l?l*o:e*r,i=z(t.ifds[0],"BITSPERSAMPLE");let a="";return u*n>2**30/(i>8?i/8:1)&&(a=l?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),a}function xo(t,e,r,o,l){const n=o?4:1,u=r*n*l;o&&(t=new Uint8Array(t.buffer));for(let c=0;cA.min):null,k=C?C.map(A=>A.max):null,T={pixelType:c,width:f,height:p,pixels:d,noDataValue:b};return b!=null?xe(T,b):x&&k&&e.applyMinMaxConstraint&&(T.mask=mo(d,x,k)),T}async function Ao(t,e={}){const r=e.pyramidLevel||0,o=e.headerInfo||wo(t),{ifds:l,noData:n}=o;if(l.length===0)throw new Error("no valid image file directory");const u=yr(o);if(u)throw u;let i=null;const a=r===-1?l[l.length-1]:l[r],c=n??e.noDataValue;return i=o.tileWidth?await fo(t,o,a):po(t,o,a),i&&(c!=null&&xe(i,c),i)}var To=function(t){var e,r,o,l,n,u;function i(a){var c,s,h,f,p,m,g,v,d,y,w,b,C;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},p=null;;){switch(c=this.readUInt32(),v=(function(){var x,k;for(k=[],x=0;x<4;++x)k.push(String.fromCharCode(this.data[this.pos++]));return k}).call(this).join(""),v){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(c);break;case"fcTL":p&&this.animation.frames.push(p),this.pos+=4,p={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},f=this.readUInt16(),h=this.readUInt16()||100,p.delay=1e3*f/h,p.disposeOp=this.data[this.pos++],p.blendOp=this.data[this.pos++],p.data=[];break;case"IDAT":case"fdAT":for(v==="fdAT"&&(this.pos+=4,c-=4),a=(p!=null?p.data:void 0)||this.imgData,w=0;0<=c?wc;0<=c?++w:--w)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(c),(d=255-this.transparency.indexed.length)>0)for(b=0;0<=d?bd;0<=d?++b:--b)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case"tEXt":m=(y=this.read(c)).indexOf(0),g=String.fromCharCode.apply(String,y.slice(0,m)),this.text[g]=String.fromCharCode.apply(String,y.slice(m+1));break;case"IEND":return p&&this.animation.frames.push(p),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(C=this.colorType)===4||C===6,s=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*s,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=c}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return i.load=function(a,c,s){var h;return typeof c=="function"&&(s=c),(h=new XMLHttpRequest).open("GET",a,!0),h.responseType="arraybuffer",h.onload=function(){var f;return f=new i(new Uint8Array(h.response||h.mozResponseArrayBuffer)),typeof(c!=null?c.getContext:void 0)=="function"&&f.render(c),typeof s=="function"?s(f):void 0},h.send(null)},r=1,o=2,e=0,i.prototype.read=function(a){var c,s;for(s=[],c=0;0<=a?ca;0<=a?++c:--c)s.push(this.data[this.pos++]);return s},i.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.decodePixels=function(a){var c,s,h,f,p,m,g,v,d,y,w,b,C,x,k,T,A,M,I,S,P,U,E;if(a==null&&(a=this.imgData),a.length===0)return new Uint8Array(0);for(a=(a=new jt(a)).getBytes(),T=(b=this.pixelBitlength/8)*this.width,C=new Uint8Array(T*this.height),m=a.length,k=0,x=0,s=0;x1&&s/fnew Vt(p,m)),bandMasks:c,depthCount:i,noDataValues:a});return u!=null&&u.length||f.updateStatistics(),f}async function Mo(t,e){const r=await Ao(t,{...e,noDataValue:null});Jt(r);const o=new H({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return o.updateStatistics(),o}async function Po(t,e){const r=await ko(t,e.customOptions),o=new H({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}function wr(t,e){const r=e.pixelType||"u8",o=H.getPixelArrayConstructor(r),l=r==="u8"?t:new o(t.buffer),n=[],u=e.planes||1;if(u===1)n.push(l);else for(let a=0;aLo(r,o,t);break;case"tiff":e=Mo;break;case"deflate":e=Eo;break;case"lzw":e=Ro;break;case"error":e=()=>{throw new wt("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new wt("rasterCodec:decode","unsupported raster format")}}return e}function Bo(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}function No(t,e=1){if(!t)return;const{pixels:r,width:o,height:l,mask:n}=t;if(!r||r.length===0)return;const u=r.length,i=o-1,a=l-1,c=[];let s,h,f,p,m,g,v=null;const d=H.getPixelArrayConstructor(t.pixelType);if(e===0){for(s=0;s1){const a=u.map((h,f)=>l(t.slice(h,u[f+1]),e)),c=await Promise.all(a);n=c[0],n.pixels=c.map(h=>h.pixels[0]);const s=c.map(h=>h.mask);c.some(h=>h!=null)&&(s.forEach((h,f)=>{h==null&&(s[f]=new Uint8Array(n.width*n.height).fill(255))}),n.bandMasks=s,n.mask=H.combineBandMasks(s)),n.updateStatistics()}else n=await l(t,{...e,offset:(u==null?void 0:u[0])??e.offset});return o!=="jpg"&&e.noDataValue!=null&&n.depthCount===1&&xe(n,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&No(n),n}var je,ze;(function(t){t[t.matchAny=0]="matchAny",t[t.matchAll=1]="matchAll"})(je||(je={})),function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(ze||(ze={}));const Bn=6;function Z(t){return t!=null&&t.declaredClass==="esri.layers.support.PixelBlock"&&t.pixels&&t.pixels.length>0}function Nn(t){var s;if(!(t!=null&&t.length)||t.some(h=>!Z(h)))return null;if(t.length===1)return((s=t[0])==null?void 0:s.clone())??null;const e=t,{width:r,height:o,pixelType:l}=e[0];if(e.some(h=>h.width!==r||h.height!==o))return null;const n=e.map(({mask:h})=>h).filter(h=>h!=null);let u=null;n.length&&(u=new Uint8Array(r*o),u.set(n[0]),n.length>1&&vr(n.slice(1),u));const i=[];e.forEach(({pixels:h})=>i.push(...h));const a=e.map(({statistics:h})=>h).filter(h=>h==null?void 0:h.length),c=[];return a.forEach(h=>c.push(...h)),new H({pixelType:l,width:r,height:o,mask:u,pixels:i,statistics:c.length?c:null})}function Bt(t){if(!t)return;const e=t.colormap;if(!e||e.length===0)return;const r=e.sort((h,f)=>h[0]-f[0]);let o=0;r[0][0]<0&&(o=r[0][0]);const l=Math.max(256,r[r.length-1][0]-o+1),n=new Uint8Array(4*l),u=[];let i,a=0,c=0;const s=r[0].length===5;if(l>65536)return r.forEach(h=>{u[h[0]-o]=s?h.slice(1):h.slice(1).concat([255])}),{indexed2DColormap:u,offset:o,alphaSpecified:s};if(t.fillUnspecified)for(i=r[c],a=i[0]-o;ad?l[s]=0:(f[s]=u[v],p[s]=u[v+1],m[s]=u[v+2],l[s]=u[v+3]));else{for(l=new Uint8Array(n),s=0;sd?l[s]=0:(f[s]=u[v],p[s]=u[v+1],m[s]=u[v+2],l[s]=u[v+3]);r.mask=l}}else if(i)if(l!=null)for(s=0;sn));const i=[],a=e.outputPixelType||"u8";for(let s=0;s1;){if(c===s.value){g=!0;break}c>s.value?h=m:f=m,m=Math.floor((h+f)/2),s=e[Math.floor(m)]}g||(c===e[h].value?(s=e[h],g=!0):c===e[f].value?(s=e[f],g=!0):ce[h].value&&(cb-m);g[0]=l[0],g[g.length-1]=l[l.length-1]+(c?1e-6:0);const v=l.length/2,[d,y]=_t(u);for(let b=0;b=0;A--)if(k===g[2*A]||k>g[2*A]&&ky?y:k=i[T]&&k<=i[T+1]){h[x]=0,p[x]=0;break}}}return new H({width:r,height:o,pixelType:u,pixels:[h],mask:p})}function He(t,e,r,o){const l=r!=null&&r.length>=2?new Set(r):null,n=(r==null?void 0:r.length)===1?r[0]:null,u=!!(e!=null&&e.length);for(let i=0;i=e[s]&&a<=e[s+1]){c=!0;break}c||(o[i]=0)}o[i]&&(a===n||l!=null&&l.has(a))&&(o[i]=0)}}function qe(t,e){const r=t[0].length;for(let o=0;ov-1e-6);g[0]=r[0],u&&(g[g.length-1]=r[r.length-1]);for(let v=0;vp?p:o[v]g?m=n.rightPadding:d>=g&&(p=n.leftMargin-n.rightPadding,m=0)}if(f.xmax-=m,typeof e!="number")for(let g=f.ymin;gZ(I));if(i==null)return null;const a=l?l.width:e.width,c=l?l.height:e.height,s=i.width,h=i.height,f=e.width/s,p=e.height/h,m={offset:o||{x:0,y:0},mosaic:l||e,block:{width:s,height:h}},g=i.pixelType,v=H.getPixelArrayConstructor(g),d=i.pixels.length,y=[];let w,b;for(let I=0;II==null||I.mask!=null&&I.mask.length>0),x=t.some(I=>(I==null?void 0:I.bandMasks)&&I.bandMasks.length>1),k=C?new Uint8Array(a*c):void 0,T=x?[]:void 0;if(k){for(let I=0;Id!=null);if(o==null)return null;const l=t.some(d=>d==null||!!d.mask),{width:n,height:u}=e,i=l?new Uint8Array(n*u):null,{blockWidths:a}=r,c=[],s=o.getPlaneCount(),h=H.getPixelArrayConstructor(o.pixelType);if(l)for(let d=0,y=0;d(d==null?void 0:d.bandMasks)&&d.bandMasks.length>1),p=f?[]:void 0,m=n*u;for(let d=0;do||a>l||n===0&&u===0&&i===o&&a===l)return t;t.mask||(t.mask=new Uint8Array(o*l));const c=t.mask;for(let s=0;s=a||f=i?0:1}return t.updateStatistics(),t}function _o(t){if(!Z(t))return null;const e=t.clone(),{width:r,height:o,pixels:l}=t,n=l[0],u=e.pixels[0],i=t.mask;for(let a=2;ae&&(r=n.value,e=o),n=l.next();return r}function qt(t,e,r){if(r===0)return;const o=t.get(e);o===1?t.delete(e):t.set(e,o-1)}function Nt(t,e,r){r!==0&&t.set(e,t.has(e)?t.get(e)+1:1)}function xr(t,e,r){let{x:o,y:l}=e;const{width:n,height:u}=r;if(o===0&&l===0&&u===t.height&&n===t.width)return t;const{width:i,height:a}=t,c=Math.max(0,l),s=Math.max(0,o),h=Math.min(o+n,i),f=Math.min(l+u,a);if(h<0||f<0||!Z(t))return null;o=Math.max(0,-o),l=Math.max(0,-l);const{pixels:p}=t,m=n*u,g=p.length,v=[];for(let b=0;b0;p--)f=kr(f,u);return f}function Ar(t,e,r,o,l=0){const{width:n,height:u}=t,{width:i,height:a}=e,c=o.cols,s=o.rows,h=Math.ceil(i/c-.1/c),f=Math.ceil(a/s-.1/s);let p,m,g,v,d,y,w;const b=h*c,C=b*f*s,x=new Float32Array(C),k=new Float32Array(C),T=new Uint32Array(C),A=new Uint32Array(C);let M,I,S=0;for(let P=0;P{const R=S instanceof Float32Array||S instanceof Float64Array?0:.5;for(let L=0;LJe.fromJSON(o));for(let o=0;o.001&&(f/=Rt,p/=Rt),u==="adjusted")if(i){const S=s*Rt,P=h*Rt;f=(c+S**l*n)/(8*S),p=(c+P**l*n)/(8*P)}else f=(c+s**l*n)/(8*s),p=(c+h**l*n)/(8*h);let m=(90-e)*Math.PI/180,g=Math.cos(m),v=(360-r+90)*Math.PI/180,d=Math.sin(m)*Math.cos(v),y=Math.sin(m)*Math.sin(v);const w=[315,270,225,360,180,0],b=[60,60,60,60,60,90],C=new Float32Array([3,5,3,2,1,4]),x=C.reduce((S,P)=>S+P),k=C.map(S=>S/x),T=o==="multi-directional"?w.length:1,A=new Float32Array(6),M=new Float32Array(6),I=new Float32Array(6);if(o==="multi-directional")for(let S=0;Sm?m:v],w=u[g],b=w*y,C=b*(1-Math.abs(d%2-1)),x=w-b;switch(Math.floor(d)){case 0:h[g]=b+x,f[g]=C+x,p[g]=x;break;case 1:h[g]=C+x,f[g]=b+x,p[g]=x;break;case 2:h[g]=x,f[g]=b+x,p[g]=C+x;break;case 3:h[g]=x,f[g]=C+x,p[g]=b+x;break;case 4:h[g]=C+x,f[g]=x,p[g]=b+x;break;case 5:case 6:h[g]=b+x,f[g]=x,p[g]=C+x}}t.pixels=[h,f,p],t.updateStatistics()}function Jn(t,e){if(!Z(t))return t;const r=e.zFactor,o=e.pixelSizePower??1,l=e.pixelSizeFactor??1,n=e.slopeType,u=e.isGCS,{x:i,y:a}=e.resolution;let c=r/(8*i),s=r/(8*a);u&&Math.abs(r-1)<1e-4&&(c/=Rt,s/=Rt),n==="adjusted"&&(c=(r+i**o*l)/(8*i),s=(r+a**o*l)/(8*a));const{dzxs:h,dzys:f,outMask:p}=ee(t),{width:m,height:g}=t,v=new Float32Array(m*g);for(let y=st;y360&&(d%=360)),s[f+p]=d}}}return re(s,a,c),new H({width:a,height:c,pixels:[s],mask:i,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[new Vt(-1,360)]})}function Xn(t,e){if(!Z(t))return t;const{curvatures:r,outMask:o}=ee(t,e),{width:l,height:n}=t;re(r,l,n);const u=new H({width:l,height:n,pixels:[r],mask:o,pixelType:"f32",validPixelCount:t.validPixelCount});return u.updateStatistics(),u}const Zn=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],Sr=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],Ko=new ve({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function Kt(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;re[r]+2||t[r]Ye(o))),r}return Ye(t)}function Xe(t,e){if(!t)return;const r=Sr;let o=null;return t.type==="algorithmic"?r.some(l=>{if(Kt(t.fromColor.toRgb(),l.fromColor)&&Kt(t.toColor.toRgb(),l.toColor))return o=l.id,!0}):t.type==="multipart"&&r.some(l=>{const n=t.colorRamps,u=l.colorRamps;if(n&&u&&n.length===u.length&&!u.some((i,a)=>{if(!Kt(n[a].fromColor.toRgb(),new Le(i.fromColor).toRgb())||!Kt(n[a].toColor.toRgb(),new Le(i.toColor).toRgb()))return!0})){if(o)return!0;o=l.id}}),o}function Yo(t,e,r=!1){if(!t)return;let o=!1,l=Xe(t);return l!=null||r||(o=!0,l=Xe(t=Jo(t))),l?{id:l,inverted:o}:void 0}function Xo(t,e=!1){var o;const r=typeof t=="string"?t:(o=Yo(t,void 0,e))==null?void 0:o.id;return r?Ko.toJSON(r):null}function Qn(t,e="esriCIELabAlgorithm"){const r=Sr.find(({id:o})=>o===t);return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map(o=>({type:"algorithmic",algorithm:e,fromColor:[...o.fromColor],toColor:[...o.toColor]}))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function Ir(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,o=t.isCustomInterval!=null?t.isCustomInterval:t.distanceInterval!==null&&t.distanceInterval!==1/(e-1),l=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:l,isCustomInterval:o,weights:t.weights}}function Zo(t,e,r){const{numColors:o,distanceOffset:l,distanceInterval:n,isCustomInterval:u}=r,i=t.s===0,a=e.s===0;let c=t.h,s=e.h;i&&!a?c=s:a&&!i&&(e={...e,h:c},s=c);let h,f=Math.abs(s-c);const p=360;f

s?f*n:-f*n);const m=(e.s-t.s)*n,g=(e.v-t.v)*n;let{s:v,v:d}=t,y=c;if(l){const b=l/n;y=(y+b*h+p)%p,v+=b*m,d+=b*g}const w=[];for(let b=0;bf+p);l=l.map(f=>f/h)}else{l=[];for(let h=0;h{l.unshift(n),o||l.pop()}),r}function Qe(t){const e=Xt(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function tr(t){const e=t.toJSON();return{Algorithm:(e==null?void 0:e.Algorithm)||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:Qe(t.fromColor),ToColor:Qe(t.toColor)}}function ti(t){const e=Xo(t);if(!e)return null;if(t.type==="algorithmic")return{...tr(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(tr);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function ei(t){const e=t.reverse().map(r=>{const o=r.toString(16);return o.length<2?"0"+o:o});return 4294967295&Number.parseInt(e.join(""),16)}const ri=new ve({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),on={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"},le=1;function Pr(t,e=256){e=Math.min(e,256);const{size:r,counts:o}=t,l=new Uint8Array(r),n=o.reduce((s,h)=>s+h/e,0);let u=0,i=0,a=0,c=n;for(let s=0;s=a){const C=Er(a,o);for(c=0;c1&&(w-=(1/g)**(v*C[c])),ye[c]){const x=w*g*v**(1/o[c])+u;b[s]=n==="floor"?Math.floor(x):n==="round"?Math.round(x):x}else y>=r[c]?b[s]=i:b[s]=u;else b[s]=u;d[c]=b}}else for(c=0;c=r[c])b[s]=i;else{const C=(y-e[c])*p[c]+u;b[s]=n==="floor"?Math.floor(C):n==="round"?Math.round(C):C}d[c]=b}if(t.contrastOffset!=null){const C=nn(t.contrastOffset,t.brightnessOffset);for(c=0;c0&&r<100?i=(200*u-100*l+2*l*o)/(2*(100-r))+n:r<=0&&r>-100?i=(200*u-100*l+2*l*o)*(100+r)/2e4+n:r===100?(i=200*u-100*l+(l+1)*(100-r)+2*l*o,i=i>0?l:0):r===-100&&(i=n),a[u]=i>l?l:i<0?0:i;return a}function sn(t,e,r){const o=[];for(let l=0;l=255)return le;let e=0;t!==150&&(e=t<=150?45*Math.cos(.01047*t):17*Math.sin(.021*t));const r=255,o=t+e,l=Math.log(t/r),n=Math.log(o/r);if(n===0)return le;const u=l/n;return isNaN(u)?le:Math.min(9.9,Math.max(.01,u))}function ln(t,e,r,o){let l=1/0,n=-1/0,u=0,i=0,a=0,c=0;const s=t.length,h=new Map,f=[];for(let k=0;kc&&(c=A,a=T),l=Tn?T:n,u+=T,i++}}if(i===0)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const p=u/i;let m=0;for(let k=0;kk).length:s,v=g<=1?0:Math.sqrt(m/(g-1));f.sort((k,T)=>k-T);const d=i>>>1,y={min:l,max:n,avg:p,stddev:v,mode:a,median:i%2?f[Math.floor(d)]:(f[d-1]+f[d])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const k=n-l+1,T=new Uint32Array(k);for(let A=0;Aln(u,(l==null?void 0:l[i])??r,o));return{statistics:n.map(({statistics:u})=>u),histograms:n.map(({histogram:u})=>u)}}function cn(t){var m;if(!((m=t==null?void 0:t.pixels)!=null&&m.length))return null;const{pixels:e,mask:r,bandMasks:o,pixelType:l}=t,n=t.width*t.height,u=e.length,i=[],a=[],c=256;let s,h,f,p;for(let g=0;gh?P:h,f[P]++}}else for(let S=0;Sh?P:h,f[P]++}f=f.slice(s,h+1)}else{let S=!1;t.statistics||(t.updateStatistics(),S=!0);const P=t.statistics;s=P[g].minValue,h=P[g].maxValue;const U=(h-s)/c;if(U===0){!P||t.validPixelCount||S||t.updateStatistics();const E=(t.validPixelCount||t.width*t.height)/c;for(let R=0;R[I.minValue,I.maxValue,0,0]);else{const I=cn(r);u=I!=null?I.statistics:null,i=I!=null?I.histograms:null}else u=(M=t.statistics)!=null&&M.length?t.statistics:n.statistics,i="histograms"in t?t.histograms:void 0,i||(i=n.histograms);a!=="percentClip"&&a!=="histogramEqualization"||i!=null&&i.length||(a="minMax");const c=(u==null?void 0:u.length)||(i==null?void 0:i.length)||n.bandCount,s=[],h=[];let f,p,m,g,v,d,y,w,b;u&&!Array.isArray(u[0])&&(u=u.map(I=>[I.min,I.max,I.avg,I.stddev]));const[C,x]=_t(n.pixelType);if(!(u!=null&&u.length)){for(u=[],w=0;wS[1]&&(h[w]=S[1])}}break;case"histogramEqualization":for(Jt(i),w=0;w=20&&(g[0]=g[1]=g[2]=g[g.length-1]=g[g.length-2]=0),m=0,p=(f.max-f.min)/f.size,y=f.min===-.5&&p===1?.5:0,b=0;bd){s[w]=f.min+p*(b+y);break}for(d=(1-(t.maxPercent||0)/100)*m,h[w]=f.max+y,b=f.size-2;b>=0;b--)if(v[b]Pr(I)))):(T=t.max||255,k=t.min||0),un({minCutOff:s,maxCutOff:h,outMax:T,outMin:k,histogramLut:A},o)}function un(t,e){if(e==null||e.length===0)return t;const r=Math.max.apply(null,e),{minCutOff:o,maxCutOff:l,outMin:n,outMax:u,histogramLut:i}=t;return o.length===e.length||o.length<=r?t:{minCutOff:e.map(a=>o[a]),maxCutOff:e.map(a=>l[a]),histogramLut:i?e.map(a=>i[a]):null,outMin:n,outMax:u}}function Er(t,e){const r=new Float32Array(t);for(let o=0;o1?e[o]>2?r[o]=6.5+(e[o]-2)**2.5:r[o]=6.5+100*(2-e[o])**4:r[o]=1;return r}function ce(t,e){var k;if(!((k=t==null?void 0:t.pixels)!=null&&k.length))return t;const{mask:r,bandMasks:o,width:l,height:n,pixels:u}=t,{minCutOff:i,maxCutOff:a,gamma:c}=e,s=e.outMin||0,h=e.outMax||255,f=l*n,p=e.outputPixelType||"u8",m=t.pixels.map(()=>H.createEmptyBand(p,f)),g=m.length,v=h-s,d=[],y=[];for(let T=0;T=g,C=!!e.isRenderer;if(b){const T=Er(g,c);for(let A=0;A1&&(U-=(1/v)**(P*T[A])),Si[A]){const E=U*v*P**(1/c[A])+s;m[A][I]=C?Math.floor(E):w?Math.round(E):E}else S>=a[A]?m[A][I]=h:m[A][I]=s}}}else for(let T=0;Ti[T]){const S=(I-i[T])*d[T]+s;m[T][M]=C?Math.floor(S):w?Math.round(S):S}else I>=a[T]?m[T][M]=h:m[T][M]=s}}const x=new H({width:l,height:n,mask:r,bandMasks:o,pixels:m,pixelType:p});return x.updateStatistics(),x}const It=new Map;It.set("meter-per-second",1),It.set("kilometer-per-hour",.277778),It.set("knots",.514444),It.set("feet-per-second",.3048),It.set("mile-per-hour",.44704);const Ce=180/Math.PI,ii=new ve({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function si(t,e){return It.get(t)/It.get(e)||1}function Rr(t){return(450-t)%360}function hn(t,e="geographic"){const[r,o]=t,l=Math.sqrt(r*r+o*o);let n=Math.atan2(o,r)*Ce;return n=(360+n)%360,e==="geographic"&&(n=Rr(n)),[l,n]}function fn(t,e="geographic"){let r=t[1];e==="geographic"&&(r=Rr(r)),r%=360;const o=t[0];return[o*Math.cos(r/Ce),o*Math.sin(r/Ce)]}function ai(t,e,r,o="geographic"){if(!Z(t)||r==null)return t;const l=e==="vector-magdir"?t.clone():rr(t,e),n=l.pixels[1];for(let u=0;u1||e&&r.fields.find(l=>l.name.toLowerCase()===e.toLowerCase())==null)}function mn(t){const{bandCount:e,dataType:r,pixelType:o}=t;return r==="elevation"||r==="generic"&&e===1&&(o==="s16"||o==="s32"||o==="f32"||o==="f64")}function gn(t,e=!1){const{bandCount:r,colormap:o,pixelType:l}=t;return r===1&&(!!(o!=null&&o.length)||!e&&l==="u8")}function ci(t,e=!1){const{attributeTable:r,bandCount:o}=t;return o===1&&(!e||r!=null||t.histograms!=null)}function ui(t){const{dataType:e}=t;return e==="vector-uv"||e==="vector-magdir"}function hi(t){const{dataType:e}=t;return e==="vector-uv"||e==="vector-magdir"}let St=class extends Dt{constructor(t){super(t)}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t==null?void 0:t.pixelBlock;if(!or(e))return e;if(t.simpleStretchParams&&this.rendererJSON.type==="rasterStretch")return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands(t.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const o=t.extent,l=o.spatialReference.isGeographic,n={x:(o.xmax-o.xmin)/e.width,y:(o.ymax-o.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:l,resolution:n});break}}return r}catch(r){return yt.getLogger(this).error("symbolize",r.message),e}}simpleStretch(t,e){if(!or(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),ce(t,{...e,isRenderer:!0})}catch(r){return yt.getLogger(this).error("symbolize",r.message),t}}generateWebGLParameters(t){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:u,offset:i}=this.lookup.colormapLut||{};return{colormap:u,colormapOffset:i,type:"lut"}}const{pixelBlock:e,isGCS:r,resolution:o,bandIds:l}=t,{rendererJSON:n}=this;return n.type==="rasterStretch"?this._generateStretchWebGLParams(e,n,l):n.type==="rasterShadedRelief"?this._generateShadedReliefWebGLParams(n,r,o??void 0):n.type==="vectorField"?this._generateVectorFieldWebGLParams(n):null}_isLUTChanged(t){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const e=this.rendererJSON.colorRamp;return t?JSON.stringify(e)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(t){return this._isLUTChanged()&&!this.bind().success?t:se(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?se(t,this.lookup.colormapLut):$o(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){var h,f;const{rasterInfo:r}=this,{pixelType:o,bandCount:l}=r,n=this.rendererJSON,u=["u8","u16","s8","s16"].includes(o);let i,a;const{dra:c}=n,{gamma:s}=this.lookup;if(n.stretchType==="histogramEqualization"){const p=c?null:(h=this.lookup)==null?void 0:h.histogramLut,m=Ft(n,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!p}),g=ce(t,{...m,gamma:s,isRenderer:!0});a=We(g,{lut:c?m.histogramLut:p,offset:0})}else if(u){if(c){const p=Ft(n,{rasterInfo:r,pixelBlock:t,bandIds:e});i=er({pixelType:o,...p,gamma:s,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return t;i=this.lookup?this.lookup.stretchLut:null}else i=this.lookup?this.lookup.stretchLut:null;if(!i)return t;l>1&&e!=null&&e.length===(t==null?void 0:t.pixels.length)&&(i==null?void 0:i.lut.length)===l&&(i={lut:e.map(p=>i.lut[p]),offset:i.offset}),a=We(t,i)}else{const p=Ft(n,{rasterInfo:r,pixelBlock:t,bandIds:e});a=ce(t,{...p,gamma:s,isRenderer:!0})}if(n.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;a=se(a,(f=this.lookup)==null?void 0:f.colormapLut)}return a}_symbolizeShadedRelief(t,e){var i;const r=this.rendererJSON,o={...r,...e},l=Ho(t,o);if(!r.colorRamp)return l;let n;if(this._isLUTChanged(!0)){if(!this.bind().success)return l;n=this.lookup?this.lookup.hsvMap:null}else n=this.lookup?this.lookup.hsvMap:null;if(!n)return l;const u=((i=this.rasterInfo.statistics)==null?void 0:i[0])??{min:0,max:8e3};return qo(l,t,n,u),l}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return t===2&&(e==="vector-magdir"||e==="vector-uv")}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(t){var c;const{bandCount:e,attributeTable:r,pixelType:o}=this.rasterInfo,l=t.field1;if(!l)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const n=t.defaultSymbol,u=e===1&&["u8","s8"].includes(o);if(!dn(this.rasterInfo,l)&&!u)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const i=[];if(r!=null){const s=r.fields.find(h=>h.name.toLowerCase()==="value");if(!s)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(h=>{var m,g;const f=(m=t.uniqueValueInfos)==null?void 0:m.find(v=>String(v.value)===String(h.attributes[l])),p=(g=f==null?void 0:f.symbol)==null?void 0:g.color;p?i.push([h.attributes[s.name]].concat(p)):n&&i.push([h.attributes[s.name]].concat(n.color))})}else{if(l.toLowerCase()!=="value")return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};(c=t.uniqueValueInfos)==null||c.forEach(s=>{var f;const h=(f=s==null?void 0:s.symbol)==null?void 0:f.color;h?i.push([parseInt(""+s.value,10)].concat(h)):n&&i.push([parseInt(""+s.value,10)].concat(n==null?void 0:n.color))})}if(i.length===0)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const a=Bt({colormap:i});return this.lookup={rendererJSON:t,colormapLut:a},this.canRenderInWebGL=ue(a==null?void 0:a.indexedColormap),{success:!0}}_updateColormapRenderer(t){if(!gn(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map(o=>[o.value].concat(o.color)).sort((o,l)=>o[0]-l[0]);if(!e||e.length===0)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=Bt({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=ue(r==null?void 0:r.indexedColormap),{success:!0}}_updateShadedReliefRenderer(t){if(!mn(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=Ze(t.colorRamp,{interpolateAlpha:!0}),r=Bt({colormap:e}),o=[],l=r.indexedColormap;for(let n=0;nu.name.toLowerCase()==="value"):null,l=e!=null?e.fields.find(u=>u.name.toLowerCase()===t.field.toLowerCase()):null,n=o!=null&&l!==null;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||n,tableValueField:o,tableBreakField:l}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:l}=this._analyzeClassBreaks(t),n=t.classBreakInfos;if(!(n!=null&&n.length))return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const u=n.sort((h,f)=>h.classMaxValue-f.classMaxValue),i=u[u.length-1];let a=t.minValue;if(!r){const h=[];for(let f=0;fw>d);y&&c.push([v].concat(y.symbol.color))}}else{a=Math.floor(t.minValue);for(let h=0;hPr(p));this.lookup={rendererJSON:t,histogramLut:f}}else if(c){const f=Ft(t,{rasterInfo:this.rasterInfo}),p=er({pixelType:a,...f,gamma:n?i:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:p}}if(u&&!bn(u)){const f=Ze(u,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:t}),this.lookup.colormapLut=Bt({colormap:f}),this.lookup.rendererJSON=t}return this.lookup.gamma=n&&(i!=null&&i.length)?i:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(t,e,r){var w;let o=null,l=null;const n=(w=this.lookup)==null?void 0:w.colormapLut;e.colorRamp&&n&&(o=n.indexedColormap,l=n.offset),e.stretchType==="histogramEqualization"&&(e={...e,stretchType:"minMax"});const{gamma:u}=this.lookup,i=!(!e.useGamma||!(u!=null&&u.some(b=>b!==1))),{minCutOff:a,maxCutOff:c,outMin:s,outMax:h}=Ft(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let f=0;t!=null&&(f=t.getPlaneCount(),f===2&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:p}=this.rasterInfo,m=Math.min(3,(r==null?void 0:r.length)||f||p,p),g=new Float32Array(m),v=o||i?1:255;let d;for(d=0;d1?u[d]>2?y[d]=6.5+(u[d]-2)**2.5:y[d]=6.5+100*(2-u[d])**4:y[d]=1;return{bandCount:m,outMin:s/v,outMax:h/v,minCutOff:a,maxCutOff:c,factor:g,useGamma:i,gamma:i?u:[1,1,1],gammaCorrection:i?y:[1,1,1],colormap:o,colormapOffset:l,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){var c,s;let o=null,l=null;const n=(c=this.lookup)==null?void 0:c.colormapLut;t.colorRamp&&n&&(o=n.indexedColormap,l=n.offset);const u={...t,isGCS:e,resolution:r},i=Tr(u),a=(s=this.rasterInfo.statistics)==null?void 0:s[0];return{...i,minValue:(a==null?void 0:a.min)??0,maxValue:(a==null?void 0:a.max)??8e3,hillshadeType:t.hillshadeType==="traditional"?0:1,type:"hillshade",colormap:o,colormapOffset:l}}_generateVectorFieldWebGLParams(t){var d,y,w;const{style:e,inputUnit:r,outputUnit:o,visualVariables:l,symbolTileSize:n,flowRepresentation:u}=t;let i;const a=((d=this.rasterInfo.statistics)==null?void 0:d[0].min)??0,c=((y=this.rasterInfo.statistics)==null?void 0:y[0].max)??50,s=(l==null?void 0:l.find(b=>b.type==="sizeInfo"))??{type:"sizeInfo",field:"Magnitude",maxDataValue:c,maxSize:.8*n,minDataValue:a,minSize:.2*n},h=s.minDataValue??a,f=s.maxDataValue??c,p=s.maxSize!=null&&s.minSize!=null?[s.minSize/n,s.maxSize/n]:[.2,.8];if(e==="wind_speed"){const b=(p[0]+p[1])/2;p[0]=p[1]=b}const m=h!=null&&f!=null?[h,f]:null;if(e==="classified_arrow")if(h!=null&&f!=null&&s!=null){i=[];const b=(s.maxDataValue-s.minDataValue)/5;for(let C=0;C<6;C++)i.push(s.minDataValue+b*C)}else i=[0,1e-6,3.5,7,10.5,14];const g=u==="flow_to"==(e==="ocean_current_kn"||e==="ocean_current_m")?0:Math.PI,v=l==null?void 0:l.find(b=>b.type==="rotationInfo");return{breakValues:i,dataRange:m,inputUnit:r,outputUnit:o,symbolTileSize:n,symbolPercentRange:p,style:e||"single_arrow",rotation:g,rotationType:(w=this.rasterInfo.storageInfo)!=null&&w.tileInfo&&this.rasterInfo.dataType==="vector-uv"?"geographic":(v==null?void 0:v.rotationType)||t.rotationType,type:"vectorField"}}};D([B({json:{write:!0}})],St.prototype,"rendererJSON",void 0),D([B({type:Wo,json:{write:!0}})],St.prototype,"rasterInfo",void 0),D([B({json:{write:!0}})],St.prototype,"lookup",void 0),D([B()],St.prototype,"canRenderInWebGL",void 0),St=D([Ot("esri.renderers.support.RasterSymbolizer")],St);const fi=St;function ue(t){return!!(t!=null&&t.length)&&t.length<=16384}function yn(t){return t==="percentClip"||t==="histogramEqualization"}function wn(t){return t!=null&&t.length>0&&t[0].min!=null&&t[0].max!=null}function or(t){return Z(t)&&t.validPixelCount!==0}function bn(t){return t.type==="algorithmic"&&["0,0,0,255","0,0,0"].includes(t.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(t.toColor.join(","))}const Pt=()=>yt.getLogger("esri.views.2d.engine.flow.dataUtils"),Cn=10;async function pi(t,e,r,o){const l=performance.now(),n=vn(e,r),u=performance.now(),i=kn(e,n,r.width,r.height),a=performance.now(),c=Tn(i),s=performance.now(),h=t==="Streamlines"?Sn(c,Cn):In(c),f=performance.now();return zr("esri-2d-profiler")&&(Pt().info("I.1","_createFlowFieldFromData (ms)",Math.round(u-l)),Pt().info("I.2","_getStreamlines (ms)",Math.round(a-u)),Pt().info("I.3","createAnimatedLinesData (ms)",Math.round(s-a)),Pt().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(f-s)),Pt().info("I.5","createFlowMesh (ms)",Math.round(f-l)),Pt().info("I.6","Mesh size (bytes)",h.vertexData.buffer.byteLength+h.indexData.buffer.byteLength)),await Promise.resolve(),Wr(o),h}function vn(t,e){const r=An(e.data,e.width,e.height,t.smoothing);return t.interpolate?(o,l)=>{const n=Math.floor(o),u=Math.floor(l);if(n<0||n>=e.width)return[0,0];if(u<0||u>=e.height)return[0,0];const i=o-n,a=l-u,c=n,s=u,h=n{const n=Math.round(o),u=Math.round(l);return n<0||n>=e.width||u<0||u>=e.height?[0,0]:[r[2*(u*e.width+n)],r[2*(u*e.width+n)+1]]}}function xn(t,e,r,o,l,n,u,i,a){const c=[];let s=r,h=o,f=0,[p,m]=e(s,h);p*=t.velocityScale,m*=t.velocityScale;const g=Math.sqrt(p*p+m*m);let v,d;c.push({x:s,y:h,t:f,speed:g});for(let y=0;yt.maxTurnAngle)return c;if(t.collisions){const T=Math.round(s*a),A=Math.round(h*a);if(T<0||T>u-1||A<0||A>i-1)return c;const M=n[A*u+T];if(M!==-1&&M!==l)return c;n[A*u+T]=l}c.push({x:s,y:h,t:f,speed:C}),v=x,d=k}return c}function kn(t,e,r,o){const l=[],n=new nr,u=1/Math.max(t.lineCollisionWidth,1),i=Math.round(r*u),a=Math.round(o*u),c=new Int32Array(i*a);for(let h=0;hh.sort-f.sort);for(const{x:h,y:f}of s)if(n.getFloat()=e)continue;const m=n[p+l];h+=m*t[2*(c*e+(s+p))],f+=m*t[2*(c*e+(s+p))+1]}i[2*(c*e+s)]=h,i[2*(c*e+s)+1]=f}const a=new Float32Array(t.length);for(let c=0;c=r)continue;const m=n[p+l];h+=m*i[2*((s+p)*e+c)],f+=m*i[2*((s+p)*e+c)+1]}a[2*(s*e+c)]=h,a[2*(s*e+c)+1]=f}return a}function Tn(t,e){const r=new nr,o=t.reduce((a,c)=>a+c.length,0),l=new Float32Array(4*o),n=new Array(t.length);let u=0,i=0;for(const a of t){const c=u;for(const s of a)l[4*u]=s.x,l[4*u+1]=s.y,l[4*u+2]=s.t,l[4*u+3]=s.speed,u++;n[i++]={startVertex:c,numberOfVertices:a.length,totalTime:a[a.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:l,lineDescriptors:n}}function Sn(t,e){const{lineVertices:o,lineDescriptors:l}=t;let n=0,u=0;for(const p of l)n+=2*p.numberOfVertices,u+=6*(p.numberOfVertices-1);const i=new Float32Array(n*9),a=new Uint32Array(u);let c=0,s=0;function h(){a[s++]=c-2,a[s++]=c,a[s++]=c-1,a[s++]=c,a[s++]=c+1,a[s++]=c-1}function f(p,m,g,v,d,y,w,b){const C=c*9;let x=0;i[C+x++]=p,i[C+x++]=m,i[C+x++]=1,i[C+x++]=g,i[C+x++]=y,i[C+x++]=w,i[C+x++]=v/2,i[C+x++]=d/2,i[C+x++]=b,c++,i[C+x++]=p,i[C+x++]=m,i[C+x++]=-1,i[C+x++]=g,i[C+x++]=y,i[C+x++]=w,i[C+x++]=-v/2,i[C+x++]=-d/2,i[C+x++]=b,c++}for(const p of l){const{totalTime:m,timeSeed:g}=p;let v=null,d=null,y=null,w=null,b=null,C=null;for(let x=0;x0){I=k-v,S=T-d;const E=Math.sqrt(I*I+S*S);if(I/=E,S/=E,x>1){let R=I+b,L=S+C;const G=Math.sqrt(R*R+L*L);R/=G,L/=G;const _=Math.min(1/(R*I+L*S),e);R*=_,L*=_,P=-L,U=R}else P=-S,U=I;P!==null&&U!==null&&(f(v,d,y,P,U,m,g,M),h())}v=k,d=T,y=A,b=I,C=S,w=M}f(v,d,y,-C,b,m,g,w)}return{vertexData:i,indexData:a}}function In(t){const{lineVertices:l,lineDescriptors:n}=t;let u=0,i=0;for(const E of n){const R=E.numberOfVertices-1;u+=4*R*2,i+=6*R*2}const a=new Float32Array(u*16),c=new Uint32Array(i);let s,h,f,p,m,g,v,d,y,w,b,C,x,k,T=0,A=0;function M(){c[A++]=T-8,c[A++]=T-7,c[A++]=T-6,c[A++]=T-7,c[A++]=T-5,c[A++]=T-6,c[A++]=T-4,c[A++]=T-3,c[A++]=T-2,c[A++]=T-3,c[A++]=T-1,c[A++]=T-2}function I(E,R,L,G,_,N,$,O,V,j,J,tt,ut,bt){const Y=T*16;let q=0;for(const ft of[1,2])for(const mt of[1,2,3,4])a[Y+q++]=E,a[Y+q++]=R,a[Y+q++]=L,a[Y+q++]=G,a[Y+q++]=$,a[Y+q++]=O,a[Y+q++]=V,a[Y+q++]=j,a[Y+q++]=ft,a[Y+q++]=mt,a[Y+q++]=ut,a[Y+q++]=bt,a[Y+q++]=_/2,a[Y+q++]=N/2,a[Y+q++]=J/2,a[Y+q++]=tt/2,T++}function S(E,R){let L=y+b,G=w+C;const _=Math.sqrt(L*L+G*G);L/=_,G/=_;const N=y*L+w*G;L/=N,G/=N;let $=b+x,O=C+k;const V=Math.sqrt($*$+O*O);$/=V,O/=V;const j=b*$+C*O;$/=j,O/=j,I(s,h,f,p,-G,L,m,g,v,d,-O,$,E,R),M()}function P(E,R,L,G,_,N){if(y=b,w=C,b=x,C=k,y==null&&w==null&&(y=b,w=C),m!=null&&g!=null){x=E-m,k=R-g;const $=Math.sqrt(x*x+k*k);x/=$,k/=$}y!=null&&w!=null&&S(_,N),s=m,h=g,f=v,p=d,m=E,g=R,v=L,d=G}function U(E,R){y=b,w=C,b=x,C=k,y==null&&w==null&&(y=b,w=C),y!=null&&w!=null&&S(E,R)}for(const E of n){s=null,h=null,f=null,p=null,m=null,g=null,v=null,d=null,y=null,w=null,b=null,C=null,x=null,k=null;const{totalTime:R,timeSeed:L}=E;for(let G=0;G23||f>59||l>59)return null;const m=e.ms??"0",a=m?+m.padEnd(3,"0").substring(0,3):0;let o;if(e.isUTC||!e.offsetSign)o=Date.UTC(u,r,s,i,f,l,a);else{const N=+e.offsetHours,b=+e.offsetMinutes;o=6e4*(e.offsetSign==="+"?-1:1)*(60*N+b)+Date.UTC(u,r,s,i,f,l,a)}return Number.isNaN(o)?null:o}const g=/^(?:(?-?\d{4,})-(?\d{2})-(?\d{2}))(?:T(?\d{2}):(?\d{2}):(?\d{2})(?:\.(?\d+))?)?(?:(?Z)|(?:(?\+|-)(?\d{2}):(?\d{2})))?$/;function T(t,n){if(Number.isNaN(t.getTime()))return!1;let e=!0;if(h&&/\d+\W*$/.test(n)){const u=n.match(/[a-zA-Z]{2,}/);if(u){let r=!1,s=0;for(;!r&&s<=u.length;)r=!y.test(u[s]),s++;e=!r}}return e}const y=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime());export{p as e,D as n,C as t}; diff --git a/build/assets/deduplicate-B_YKqNj1.js b/build/assets/deduplicate-B_YKqNj1.js new file mode 100644 index 0000000..09ee6cb --- /dev/null +++ b/build/assets/deduplicate-B_YKqNj1.js @@ -0,0 +1 @@ +import{bb as R}from"./index-DKOmzAMm.js";import{i as v,t as O}from"./Indices-BhOjxL0t.js";function G(f,n,e){const l=Array.isArray(f),r=l?f.length/n:f.byteLength/(4*n),s=l?f:new Uint32Array(f,0,r*n),u=(e==null?void 0:e.minReduction)??0,y=(e==null?void 0:e.originalIndices)||null,q=y?y.length:0,c=(e==null?void 0:e.componentOffsets)||null;let w=0;if(c)for(let t=0;tw&&(w=a)}else w=r;const b=Math.floor(1.1*w)+1;(h==null||h.length<2*b)&&(h=new Uint32Array(R(2*b)));for(let t=0;t<2*b;t++)h[t]=0;let i=0;const m=!!c&&!!y,U=m?q:r;let A=v(r);const p=new Uint32Array(q),k=1.96;let I=u!==0?Math.ceil(4*k*k/(u*u)*u*(1-u)):U,d=1,j=c?c[1]:U;for(let t=0;t=b&&(g-=b)}C===i&&(h[2*g]=x,h[2*g+1]=a+1,i++),A[a]=C}if(u!==0&&1-i/r>>2)|0;return l>>>0}let h=null;export{G as e}; diff --git a/build/assets/deleteForwardEdits-7rqcQUX6.js b/build/assets/deleteForwardEdits-7rqcQUX6.js new file mode 100644 index 0000000..6a57598 --- /dev/null +++ b/build/assets/deleteForwardEdits-7rqcQUX6.js @@ -0,0 +1 @@ +import{s as n,U as m}from"./index-DKOmzAMm.js";import{f as p,i as u,s as c}from"./utils-CF4bGKhW.js";async function h(i,s,o,r){if(!s)throw new n("post:missing-guid","guid for version is missing");const t=p(i),e=o.toJSON(),a=u(t.query,{query:c({...e,f:"json"}),...r,method:"post"});s.startsWith("{")&&(s=s.slice(1,-1));const d=`${t.path}/versions/${s}/deleteForwardEdits`,{data:f}=await m(d,a);return f}export{h as deleteForwardEdits}; diff --git a/build/assets/devEnvironmentUtils-D6qIi8Ky.js b/build/assets/devEnvironmentUtils-D6qIi8Ky.js new file mode 100644 index 0000000..bcfb8cb --- /dev/null +++ b/build/assets/devEnvironmentUtils-D6qIi8Ky.js @@ -0,0 +1 @@ +function m(a){return a=a||globalThis.location.hostname,l.some(t=>(a==null?void 0:a.match(t))!=null)}function e(a,t){return a&&(t=t||globalThis.location.hostname)?t.match(c)!=null||t.match(s)!=null?a.replace("static.arcgis.com","staticdev.arcgis.com"):t.match(o)!=null||t.match(i)!=null?a.replace("static.arcgis.com","staticqa.arcgis.com"):a:a}const c=/^devext\.arcgis\.com$/,o=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,i=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,c,o,/^jsapps\.esri\.com$/,s,i];export{e as a,m as c}; diff --git a/build/assets/earcut-BqgeR2O3.js b/build/assets/earcut-BqgeR2O3.js new file mode 100644 index 0000000..e2b8168 --- /dev/null +++ b/build/assets/earcut-BqgeR2O3.js @@ -0,0 +1 @@ +import{o as Y}from"./_commonjsHelpers-DCkdB7M8.js";var D,E,F,G={exports:{}};D=G,E=function(){function m(t,r,n){n=n||2;var x,i,e,u,v,f,c,l=r&&r.length,s=l?r[0]*n:t.length,a=B(t,0,s,n,!0),y=[];if(!a||a.next===a.prev)return y;if(l&&(a=N(t,r,a,n)),t.length>80*n){x=e=t[0],i=u=t[1];for(var o=n;oe&&(e=v),f>u&&(u=f);c=(c=Math.max(e-x,u-i))!==0?1/c:0}return g(a,y,n,x,i,c),y}function B(t,r,n,x,i){var e,u;if(i===A(t,r,n,x)>0)for(e=r;e=r;e-=x)u=_(e,t[e],t[e+1],u);if(u&&M(u,u.next)){var v=u.next;w(u),u=v}return u}function h(t,r){if(!t)return t;r||(r=t);var n,x=t;do if(n=!1,x.steiner||!M(x,x.next)&&p(x.prev,x,x.next)!==0)x=x.next;else{var i=x.prev;if(w(x),(x=r=i)===x.next)break;n=!0}while(n||x!==r);return r}function g(t,r,n,x,i,e,u){if(t){!u&&e&&S(t,x,i,e);for(var v,f,c=t;t.prev!==t.next;)if(v=t.prev,f=t.next,e?J(t,x,i,e):I(t))r.push(v.i/n),r.push(t.i/n),r.push(f.i/n),w(t),t=f.next,c=f.next;else if((t=f)===c){u?u===1?g(t=K(h(t),r,n),r,n,x,i,e,2):u===2&&L(t,r,n,x,i,e):g(h(t),r,n,x,i,e,1);break}}}function I(t){var r=t.prev,n=t,x=t.next;if(p(r,n,x)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Z(r.x,r.y,n.x,n.y,x.x,x.y,i.x,i.y)&&p(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function J(t,r,n,x){var i=t.prev,e=t,u=t.next;if(p(i,e,u)>=0)return!1;for(var v=i.xe.x?i.x>u.x?i.x:u.x:e.x>u.x?e.x:u.x,l=i.y>e.y?i.y>u.y?i.y:u.y:e.y>u.y?e.y:u.y,s=j(v,f,r,n,x),a=j(c,l,r,n,x),y=t.prevZ,o=t.nextZ;y&&y.z>=s&&o&&o.z<=a;){if(y!==t.prev&&y!==t.next&&Z(i.x,i.y,e.x,e.y,u.x,u.y,y.x,y.y)&&p(y.prev,y,y.next)>=0||(y=y.prevZ,o!==t.prev&&o!==t.next&&Z(i.x,i.y,e.x,e.y,u.x,u.y,o.x,o.y)&&p(o.prev,o,o.next)>=0))return!1;o=o.nextZ}for(;y&&y.z>=s;){if(y!==t.prev&&y!==t.next&&Z(i.x,i.y,e.x,e.y,u.x,u.y,y.x,y.y)&&p(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;o&&o.z<=a;){if(o!==t.prev&&o!==t.next&&Z(i.x,i.y,e.x,e.y,u.x,u.y,o.x,o.y)&&p(o.prev,o,o.next)>=0)return!1;o=o.nextZ}return!0}function K(t,r,n){var x=t;do{var i=x.prev,e=x.next.next;!M(i,e)&&C(i,x,x.next,e)&&d(i,e)&&d(e,i)&&(r.push(i.i/n),r.push(x.i/n),r.push(e.i/n),w(x),w(x.next),x=t=e),x=x.next}while(x!==t);return h(x)}function L(t,r,n,x,i,e){var u=t;do{for(var v=u.next.next;v!==u.prev;){if(u.i!==v.i&&V(u,v)){var f=H(u,v);return u=h(u,u.next),f=h(f,f.next),g(u,r,n,x,i,e),void g(f,r,n,x,i,e)}v=v.next}u=u.next}while(u!==t)}function N(t,r,n,x){var i,e,u,v=[];for(i=0,e=r.length;i=x.next.y&&x.next.y!==x.y){var v=x.x+(e-x.y)*(x.next.x-x.x)/(x.next.y-x.y);if(v<=i&&v>u){if(u=v,v===i){if(e===x.y)return x;if(e===x.next.y)return x.next}n=x.x=x.x&&x.x>=l&&i!==x.x&&Z(en.x||x.x===n.x&&R(n,x)))&&(n=x,a=f)),x=x.next;while(x!==c);return n}function R(t,r){return p(t.prev,t,r.prev)<0&&p(r.next,t,t.next)<0}function S(t,r,n,x){var i=t;do i.z===null&&(i.z=j(i.x,i.y,r,n,x)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,T(i)}function T(t){var r,n,x,i,e,u,v,f,c=1;do{for(n=t,t=null,e=null,u=0;n;){for(u++,x=n,v=0,r=0;r0||f>0&&x;)v!==0&&(f===0||!x||n.z<=x.z)?(i=n,n=n.nextZ,v--):(i=x,x=x.nextZ,f--),e?e.nextZ=i:t=i,i.prevZ=e,e=i;n=x}e.nextZ=null,c*=2}while(u>1);return t}function j(t,r,n,x,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-x)*i)|r<<8))|r<<4))|r<<2))|r<<1))<<1}function U(t){var r=t,n=t;do(r.x=0&&(t-u)*(x-v)-(n-u)*(r-v)>=0&&(n-u)*(e-v)-(i-u)*(x-v)>=0}function V(t,r){return t.next.i!==r.i&&t.prev.i!==r.i&&!W(t,r)&&(d(t,r)&&d(r,t)&&X(t,r)&&(p(t.prev,t,r.prev)||p(t,r.prev,r))||M(t,r)&&p(t.prev,t,t.next)>0&&p(r.prev,r,r.next)>0)}function p(t,r,n){return(r.y-t.y)*(n.x-r.x)-(r.x-t.x)*(n.y-r.y)}function M(t,r){return t.x===r.x&&t.y===r.y}function C(t,r,n,x){var i=b(p(t,r,n)),e=b(p(t,r,x)),u=b(p(n,x,t)),v=b(p(n,x,r));return i!==e&&u!==v||!(i!==0||!z(t,n,r))||!(e!==0||!z(t,x,r))||!(u!==0||!z(n,t,x))||!(v!==0||!z(n,r,x))}function z(t,r,n){return r.x<=Math.max(t.x,n.x)&&r.x>=Math.min(t.x,n.x)&&r.y<=Math.max(t.y,n.y)&&r.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function W(t,r){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==r.i&&n.next.i!==r.i&&C(n,n.next,t,r))return!0;n=n.next}while(n!==t);return!1}function d(t,r){return p(t.prev,t,t.next)<0?p(t,r,t.next)>=0&&p(t,t.prev,r)>=0:p(t,r,t.prev)<0||p(t,t.next,r)<0}function X(t,r){var n=t,x=!1,i=(t.x+r.x)/2,e=(t.y+r.y)/2;do n.y>e!=n.next.y>e&&n.next.y!==n.y&&i<(n.next.x-n.x)*(e-n.y)/(n.next.y-n.y)+n.x&&(x=!x),n=n.next;while(n!==t);return x}function H(t,r){var n=new q(t.i,t.x,t.y),x=new q(r.i,r.x,r.y),i=t.next,e=r.prev;return t.next=r,r.prev=t,n.next=i,i.prev=n,x.next=n,n.prev=x,e.next=x,x.prev=e,x}function _(t,r,n,x){var i=new q(t,r,n);return x?(i.next=x.next,i.prev=x,x.next.prev=i,x.next=i):(i.prev=i,i.next=i),i}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function q(t,r,n){this.i=t,this.x=r,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,r,n,x){for(var i=0,e=r,u=n-x;e0&&(x+=t[i-1].length,n.holes.push(x))}return n},m},(F=E())!==void 0&&(D.exports=F);const tt=Y(G.exports);export{tt as i}; diff --git a/build/assets/edgeProcessing-CU64r8kh.js b/build/assets/edgeProcessing-CU64r8kh.js new file mode 100644 index 0000000..2ddac55 --- /dev/null +++ b/build/assets/edgeProcessing-CU64r8kh.js @@ -0,0 +1 @@ +import{e as Ot}from"./deduplicate-B_YKqNj1.js";import{H as F}from"./InterleavedLayout-DiAet0DN.js";import{e as l}from"./VertexAttribute-BlT9lbVY.js";import{C as V}from"./enums-CxXC-vJk.js";import{t as St}from"./VertexElementDescriptor-BOD-G50G.js";import{au as T,b5 as tt,gl as Et,g7 as H,c1 as rt,aq as K,gj as At,hd as Tt,ar as ht,c2 as at,at as dt,eb as Nt,c5 as wt,c6 as $t,he as yt}from"./index-DKOmzAMm.js";function et(t,e=0){const s=t.stride;return Array.from(t.fields.keys()).map(o=>{var i;const r=t.fields.get(o),c=r.constructor.ElementCount,h=Mt(r.constructor.ElementType),d=r.offset,g=((i=r.optional)==null?void 0:i.glNormalized)??!1;return new St(o,c,h,d,s,g,e)})}function Mt(t){const e=vt[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const vt={u8:V.UNSIGNED_BYTE,u16:V.UNSIGNED_SHORT,u32:V.UNSIGNED_INT,i8:V.BYTE,i16:V.SHORT,i32:V.INT,f32:V.FLOAT},Rt=F().vec3f(l.POSITION).u16(l.COMPONENTINDEX).freeze(),Pt=F().vec2u8(l.SIDENESS).freeze();et(Pt);const j=F().vec3f(l.POSITION0).vec3f(l.POSITION1).vec2i16(l.NORMALCOMPRESSED).u16(l.COMPONENTINDEX).u8(l.VARIANTOFFSET,{glNormalized:!0}).u8(l.VARIANTSTROKE).u8(l.VARIANTEXTENSION,{glNormalized:!0}).freeze(),Y=F().vec3f(l.POSITION0).vec3f(l.POSITION1).vec2i16(l.NORMALCOMPRESSED).vec2i16(l.NORMAL2COMPRESSED).u16(l.COMPONENTINDEX).u8(l.VARIANTOFFSET,{glNormalized:!0}).u8(l.VARIANTSTROKE).u8(l.VARIANTEXTENSION,{glNormalized:!0}).freeze();l.POSITION0,l.POSITION1,l.COMPONENTINDEX,l.VARIANTOFFSET,l.VARIANTSTROKE,l.VARIANTEXTENSION,l.NORMALCOMPRESSED,l.NORMAL2COMPRESSED,l.SIDENESS;let Vt=class{constructor(){this.position0=T(),this.position1=T(),this.faceNormal0=T(),this.faceNormal1=T(),this.componentIndex=0,this.cosAngle=0}};const k=-1;function xt(t,e,s){const o=t.vertices.position,r=t.vertices.componentIndex,c=O.position0,h=O.position1,d=O.faceNormal0,g=O.faceNormal1,{edges:i,normals:p}=Ct(t),m=i.length/4,E=e.allocate(m);let P=0;const B=m,w=s==null?void 0:s.allocate(B);let _=0,n=0,a=0;z.length=0;for(let N=0;Ny.length-N.length);const f=new Array,u=new Array;z.forAll(({length:N,index:y})=>{const D=i.data[y],It=i.data[y+1],nt=i.data[y+2],st=i.data[y+3],ot=st===k;if(o.getVec(D,c),o.getVec(It,h),ot){const A=3*nt;H(d,p.data[A],p.data[A+1],p.data[A+2]),rt(g,d),O.componentIndex=r.get(D),O.cosAngle=K(d,g)}else{let A=3*nt;if(H(d,p.data[A],p.data[A+1],p.data[A+2]),A=3*st,H(g,p.data[A],p.data[A+1],p.data[A+2]),O.componentIndex=r.get(D),O.cosAngle=K(d,g),bt(O,_t))return;O.cosAngle<-.9999&&rt(g,d)}n+=N,a++,ot||Dt(O,Ut)?(e.write(E,P++,O),f.push(N)):Lt(O,gt)&&(w&&s&&s.write(w,_++,O),u.push(N))});const S=new Float32Array(f.reverse()),$=new Float32Array(u.reverse()),M=w&&s?{instancesData:w.slice(0,_),lodInfo:{lengths:$}}:void 0;return{regular:{instancesData:E.slice(0,P),lodInfo:{lengths:S}},silhouette:M,averageEdgeLength:n/a}}function Dt(t,e){return t.cosAnglee}function Lt(t,e){const s=At(t.cosAngle);return Tt(it,t.position1,t.position0),s*(K(ht(Bt,t.faceNormal0,t.faceNormal1),it)>0?-1:1)>e}function Ct(t){const e=t.faces.length/3,s=t.faces,o=t.neighbors,r=t.vertices.position;I.length=q.length=0;for(let c=0;ct||new Ft,deallocator:null}),I=new tt({deallocator:null}),q=new tt({deallocator:null}),O=new Vt,Bt=T(),it=T(),x=T(),U=T(),X=T(),gt=Nt(4),_t=Math.cos(gt),zt=Nt(35),Ut=Math.cos(zt);function ct(t,e,s){const o=e/3,r=new Uint32Array(s+1),c=new Uint32Array(s+1),h=(n,a)=>{n{if(n{const f=2*n,u=a-n;for(let S=1;S=0&&i[f+2*N]>$;N--)i[f+2*N+2]=i[f+2*N],i[f+2*N+3]=i[f+2*N+1];i[f+2*N+2]=$,i[f+2*N+3]=M}};for(let n=0;nn===t[3*a]?0:n===t[3*a+1]?1:n===t[3*a+2]?2:-1,w=(n,a)=>{const f=B(n,a);P[3*a+f]=-1},_=(n,a,f,u)=>{const S=B(n,a);P[3*a+S]=u;const $=B(f,u);P[3*u+$]=a};for(let n=0;n=0?1:-1)*(1-Math.abs(g)):d,p=r<=0?(g>=0?1:-1)*(1-Math.abs(d)):g,m=e*c;t[m]=lt(i),t[m+1]=lt(p)}function lt(t){return wt(Math.round(32767*t),-32767,32767)}const G=.7;let mt=class{updateSettings(e){this.settings=e,this._edgeHashFunction=e.reducedPrecision?Wt:Xt}write(e,s,o){W.seed=this._edgeHashFunction(o);const r=W.getIntRange(0,255),c=W.getIntRange(0,this.settings.variants-1),h=W.getFloat(),d=255*(.5*kt(-(1-Math.min(h/G,1))+Math.max(0,h-G)/(1-G),1.2)+.5);e.position0.setVec(s,o.position0),e.position1.setVec(s,o.position1),e.componentIndex.set(s,o.componentIndex),e.variantOffset.set(s,r),e.variantStroke.set(s,c),e.variantExtension.set(s,d)}};const v=new Float32Array(6),R=new Uint32Array(v.buffer),C=new Uint32Array(1);function Xt(t){return v[0]=t.position0[0],v[1]=t.position0[1],v[2]=t.position0[2],v[3]=t.position1[0],v[4]=t.position1[1],v[5]=t.position1[2],C[0]=31*(31*(31*(31*(31*(166811+R[0])+R[1])+R[2])+R[3])+R[4])+R[5],C[0]}function Wt(t){const e=v;e[0]=b(t.position0[0]),e[1]=b(t.position0[1]),e[2]=b(t.position0[2]),e[3]=b(t.position1[0]),e[4]=b(t.position1[1]),e[5]=b(t.position1[2]),C[0]=5381;for(let s=0;s{(p.addedFeatures.length||p.updatedFeatures.length||p.deletedFeatures.length||p.addedAttachments.length||p.updatedAttachments.length||p.deletedAttachments.length)&&e.emit("edits",p)});const i={result:s.promise};e.emit("apply-edits",i)}try{const{results:i,edits:p}=await C(e,t,a,r),c=h=>h.filter(I=>!I.error).map(S),l={edits:p,addedFeatures:c(i.addFeatureResults),updatedFeatures:c(i.updateFeatureResults),deletedFeatures:c(i.deleteFeatureResults),addedAttachments:c(i.addAttachmentResults),updatedAttachments:c(i.updateAttachmentResults),deletedAttachments:c(i.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:i.editMoment?new Date(i.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return(d=i.editedFeatureResults)!=null&&d.length&&(l.editedFeatures=i.editedFeatureResults),s.resolve(l),i}catch(i){throw s.reject(i),i}}async function C(e,t,a,r){var u,d,i,p,c,l;if(await e.load(),!F(t))throw new o(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!R(e))throw new o(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:s,options:n}=await q(e,a,r);return(u=s.addFeatures)!=null&&u.length||(d=s.updateFeatures)!=null&&d.length||(i=s.deleteFeatures)!=null&&i.length||(p=s.addAttachments)!=null&&p.length||(c=s.updateAttachments)!=null&&c.length||(l=s.deleteAttachments)!=null&&l.length?{edits:s,results:await t.applyEdits(s,n)}:{edits:s,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}async function q(e,t,a){const r=w(e),s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=e.infoFor3D!=null;if(P(t,r,a,!!s,!!n,`${e.type}-layer`),!r.data.isVersioned&&(a==null?void 0:a.gdbVersion))throw new o(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&(a!=null&&a.rollbackOnFailureEnabled))throw new o(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const d={...a};if(d.rollbackOnFailureEnabled!=null||r.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),d.rollbackOnFailureEnabled||d.returnServiceEditsOption!=="original-and-current-features"||(d.rollbackOnFailureEnabled===!1&&O.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),d.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new o(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&d.returnServiceEditsOption!=="original-and-current-features")throw new o(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const i=K(t,r,`${e.type}-layer`),p=(a==null?void 0:a.globalIdUsed)||u,c=e.fields.filter(l=>l.type==="big-integer"||l.type==="oid"&&(l.length||0)>=8);if(p){const{globalIdField:l}=e;if(l==null)throw new o(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");i.addFeatures.forEach(h=>X(h,l))}return i.addFeatures.forEach(l=>N(l,e,p,c)),i.updateFeatures.forEach(l=>_(l,e,p,c)),i.deleteFeatures.forEach(l=>Z(l,e,p,c)),i.addAttachments.forEach(l=>m(l,e)),i.updateAttachments.forEach(l=>m(l,e)),u&&await Q(i,e),{edits:await H(i),options:d}}function f(e,t,a,r){var s,n;if(a){if("attributes"in e&&!e.attributes[t.globalIdField])throw new o(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new o(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in e)for(const u of r){const d=e.attributes[u.name];if(d!==void 0&&!G(u,d))throw new o(`${t.type}-layer:invalid-parameter`,`Big-integer field '${u.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&e.geometry!=null){if(e.geometry.hasZ&&((s=t.capabilities)==null?void 0:s.data.supportsZ)===!1)throw new o(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&((n=t.capabilities)==null?void 0:n.data.supportsM)===!1)throw new o(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function A(e,t){var a;if("geometry"in e&&((a=e.geometry)==null?void 0:a.type)==="mesh"&&t.infoFor3D!=null&&t.spatialReference!=null){const{geometry:r}=e,{spatialReference:s,vertexSpace:n}=r,u=t.spatialReference,d=n.type==="local",i=T(u),p=B(u,s),c=p||y(u)&&(y(s)||V(s));if(!(d&&i&&c||!d&&!i&&p))throw new o(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${n.type} vertex space and a spatial reference wkid:${s.wkid} to a layer with a spatial reference wkid:${u.wkid} is not supported.`)}}function N(e,t,a,r){f(e,t,a,r),A(e,t)}function Z(e,t,a,r){f(e,t,a,r)}function _(e,t,a,r){f(e,t,a,r),A(e,t);const s=w(t);if("geometry"in e&&e.geometry!=null&&!(s!=null&&s.editing.supportsGeometryUpdate))throw new o(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}function m(e,t){var s;const{feature:a,attachment:r}=e;if(!a||"attributes"in a&&!a.attributes[t.globalIdField])throw new o(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in a)&&!a.globalId)throw new o(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new o(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new o(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name)&&!r.name)throw new o(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!((s=t.capabilities)!=null&&s.editing.supportsUploadWithItemId)&&r.uploadId)throw new o(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if(typeof r.data=="string"){const n=k(r.data);if(n&&!n.isBase64)throw new o(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}function X(e,t){const{attributes:a}=e;a[t]==null&&(a[t]=L())}async function H(e){const t=e.addFeatures??[],a=e.updateFeatures??[],r=t.concat(a).map(d=>d.geometry),s=await D(r),n=t.length,u=a.length;return s.slice(0,n).forEach((d,i)=>t[i].geometry=d),s.slice(n,n+u).forEach((d,i)=>a[i].geometry=d),e}function J(e){return{addFeatures:Array.from((e==null?void 0:e.addFeatures)??[]),updateFeatures:Array.from((e==null?void 0:e.updateFeatures)??[]),deleteFeatures:e&&U.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}function K(e,t,a){var s,n,u;const r=J(e);if((s=r.addFeatures)!=null&&s.length&&!t.operations.supportsAdd)throw new o(`${a}:unsupported-operation`,"Layer does not support adding features.");if((n=r.updateFeatures)!=null&&n.length&&!t.operations.supportsUpdate)throw new o(`${a}:unsupported-operation`,"Layer does not support updating features.");if((u=r.deleteFeatures)!=null&&u.length&&!t.operations.supportsDelete)throw new o(`${a}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(g),r.updateFeatures=r.updateFeatures.map(g),r.addAssetFeatures=[],r}function P(e,t,a,r,s,n){if(!e||!r&&!s)throw new o(`${n}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&(a!=null&&a.globalIdUsed))throw new o(`${n}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new o(`${n}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!(a!=null&&a.globalIdUsed)&&s)throw new o(`${n}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}function g(e){const t=new j;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function Q(e,t){if(t.infoFor3D==null)return;const{infoFor3D:a}=t,r=W("model/gltf-binary",a.supportedFormats)??z("glb",a.supportedFormats);if(!(r&&a.editFormats.includes(r)))throw new o(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??(e.addAssetFeatures=[]);const{addAssetFeatures:s}=e;for(const n of e.addFeatures??[])b(n)&&s.push(n);for(const n of e.updateFeatures??[])b(n)&&s.push(n)}function b(e){var t;return((t=e==null?void 0:e.geometry)==null?void 0:t.type)==="mesh"}function de(e,t,a,r){if(!F(t))throw new o(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new o(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(a,r)}export{oe as applyEdits,P as checkEditingCapabilities,ne as isFeatureIdentifierArrayWithGlobalId,ie as isFeatureIdentifierArrayWithObjectId,x as isFeatureIdentifierWithGlobalId,M as isFeatureIdentifierWithObjectId,J as normalizeCollections,K as normalizeEdits,H as normalizeGeometries,g as shallowCloneFeature,de as uploadAssets}; diff --git a/build/assets/elevationInfoUtils-CU9w6KS3.js b/build/assets/elevationInfoUtils-CU9w6KS3.js new file mode 100644 index 0000000..0c591af --- /dev/null +++ b/build/assets/elevationInfoUtils-CU9w6KS3.js @@ -0,0 +1 @@ +import"./index-DKOmzAMm.js";function r(e){return e?u:f}function t(e,o){return o!=null&&o.mode?o.mode:r(e).mode}function l(e,o){return t(e!=null&&e.hasZ,o)}function s(e,o,n){return n&&n.mode!==o?`${e} only support ${o} elevation mode`:null}function d(e,o,n){return(n==null?void 0:n.mode)===o?`${e} do not support ${o} elevation mode`:null}function p(e,o){return(o==null?void 0:o.featureExpressionInfo)!=null&&o.featureExpressionInfo.expression!=="0"?`${e} do not support featureExpressionInfo`:null}function m(e,o){o&&e.warn(".elevationInfo=",o)}const u={mode:"absolute-height",offset:0},f={mode:"on-the-ground",offset:null};export{m as $,d as P,s as Z,l as i,p as w}; diff --git a/build/assets/enums-CxXC-vJk.js b/build/assets/enums-CxXC-vJk.js new file mode 100644 index 0000000..ba3b08a --- /dev/null +++ b/build/assets/enums-CxXC-vJk.js @@ -0,0 +1 @@ +var R,T,A,N,S,C,O,I,L,D,M,G,P,U,B,F,H,_,n,Y;(function(E){E[E.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",E[E.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",E[E.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"})(R||(R={})),function(E){E[E.POINTS=0]="POINTS",E[E.LINES=1]="LINES",E[E.LINE_LOOP=2]="LINE_LOOP",E[E.LINE_STRIP=3]="LINE_STRIP",E[E.TRIANGLES=4]="TRIANGLES",E[E.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",E[E.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(T||(T={})),function(E){E[E.ZERO=0]="ZERO",E[E.ONE=1]="ONE",E[E.SRC_COLOR=768]="SRC_COLOR",E[E.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",E[E.SRC_ALPHA=770]="SRC_ALPHA",E[E.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",E[E.DST_ALPHA=772]="DST_ALPHA",E[E.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",E[E.DST_COLOR=774]="DST_COLOR",E[E.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",E[E.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",E[E.CONSTANT_COLOR=32769]="CONSTANT_COLOR",E[E.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",E[E.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",E[E.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(A||(A={})),function(E){E[E.ADD=32774]="ADD",E[E.MIN=32775]="MIN",E[E.MAX=32776]="MAX",E[E.SUBTRACT=32778]="SUBTRACT",E[E.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(N||(N={})),function(E){E[E.ARRAY_BUFFER=34962]="ARRAY_BUFFER",E[E.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",E[E.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",E[E.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",E[E.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",E[E.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",E[E.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",E[E.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(S||(S={})),function(E){E[E.FRONT=1028]="FRONT",E[E.BACK=1029]="BACK",E[E.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(C||(C={})),function(E){E[E.CW=2304]="CW",E[E.CCW=2305]="CCW"}(O||(O={})),function(E){E[E.BYTE=5120]="BYTE",E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.SHORT=5122]="SHORT",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.INT=5124]="INT",E[E.UNSIGNED_INT=5125]="UNSIGNED_INT",E[E.FLOAT=5126]="FLOAT",E[E.HALF_FLOAT=5131]="HALF_FLOAT"}(I||(I={})),function(E){E[E.NEVER=512]="NEVER",E[E.LESS=513]="LESS",E[E.EQUAL=514]="EQUAL",E[E.LEQUAL=515]="LEQUAL",E[E.GREATER=516]="GREATER",E[E.NOTEQUAL=517]="NOTEQUAL",E[E.GEQUAL=518]="GEQUAL",E[E.ALWAYS=519]="ALWAYS"}(L||(L={})),function(E){E[E.ZERO=0]="ZERO",E[E.KEEP=7680]="KEEP",E[E.REPLACE=7681]="REPLACE",E[E.INCR=7682]="INCR",E[E.DECR=7683]="DECR",E[E.INVERT=5386]="INVERT",E[E.INCR_WRAP=34055]="INCR_WRAP",E[E.DECR_WRAP=34056]="DECR_WRAP"}(D||(D={})),function(E){E[E.NEAREST=9728]="NEAREST",E[E.LINEAR=9729]="LINEAR",E[E.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",E[E.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",E[E.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",E[E.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(M||(M={})),function(E){E[E.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(G||(G={})),function(E){E[E.TEXTURE_2D=3553]="TEXTURE_2D",E[E.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",E[E.TEXTURE_3D=32879]="TEXTURE_3D",E[E.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",E[E.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",E[E.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",E[E.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",E[E.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(P||(P={})),function(E){E[E.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL",E[E.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",E[E.ALPHA=6406]="ALPHA",E[E.RGB=6407]="RGB",E[E.RGBA=6408]="RGBA",E[E.LUMINANCE=6409]="LUMINANCE",E[E.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",E[E.RED=6403]="RED",E[E.RG=33319]="RG",E[E.RED_INTEGER=36244]="RED_INTEGER",E[E.RG_INTEGER=33320]="RG_INTEGER",E[E.RGB_INTEGER=36248]="RGB_INTEGER",E[E.RGBA_INTEGER=36249]="RGBA_INTEGER"}(U||(U={})),function(E){E[E.RGBA4=32854]="RGBA4",E[E.R16F=33325]="R16F",E[E.RG16F=33327]="RG16F",E[E.RGB32F=34837]="RGB32F",E[E.RGBA16F=34842]="RGBA16F",E[E.R32F=33326]="R32F",E[E.RG32F=33328]="RG32F",E[E.RGBA32F=34836]="RGBA32F",E[E.R11F_G11F_B10F=35898]="R11F_G11F_B10F",E[E.RGB8=32849]="RGB8",E[E.RGBA8=32856]="RGBA8",E[E.RGB5_A1=32855]="RGB5_A1",E[E.R8=33321]="R8",E[E.RG8=33323]="RG8",E[E.R8I=33329]="R8I",E[E.R8UI=33330]="R8UI",E[E.R16I=33331]="R16I",E[E.R16UI=33332]="R16UI",E[E.R32I=33333]="R32I",E[E.R32UI=33334]="R32UI",E[E.RG8I=33335]="RG8I",E[E.RG8UI=33336]="RG8UI",E[E.RG16I=33337]="RG16I",E[E.RG16UI=33338]="RG16UI",E[E.RG32I=33339]="RG32I",E[E.RG32UI=33340]="RG32UI",E[E.RGB16F=34843]="RGB16F",E[E.RGB9_E5=35901]="RGB9_E5",E[E.SRGB8=35905]="SRGB8",E[E.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",E[E.RGB565=36194]="RGB565",E[E.RGBA32UI=36208]="RGBA32UI",E[E.RGB32UI=36209]="RGB32UI",E[E.RGBA16UI=36214]="RGBA16UI",E[E.RGB16UI=36215]="RGB16UI",E[E.RGBA8UI=36220]="RGBA8UI",E[E.RGB8UI=36221]="RGB8UI",E[E.RGBA32I=36226]="RGBA32I",E[E.RGB32I=36227]="RGB32I",E[E.RGBA16I=36232]="RGBA16I",E[E.RGB16I=36233]="RGB16I",E[E.RGBA8I=36238]="RGBA8I",E[E.RGB8I=36239]="RGB8I",E[E.R8_SNORM=36756]="R8_SNORM",E[E.RG8_SNORM=36757]="RG8_SNORM",E[E.RGB8_SNORM=36758]="RGB8_SNORM",E[E.RGBA8_SNORM=36759]="RGBA8_SNORM",E[E.RGB10_A2=32857]="RGB10_A2",E[E.RGB10_A2UI=36975]="RGB10_A2UI"}(B||(B={})),function(E){E[E.FLOAT=5126]="FLOAT",E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",E[E.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",E[E.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",E[E.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",E[E.BYTE=5120]="BYTE",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.SHORT=5122]="SHORT",E[E.UNSIGNED_INT=5125]="UNSIGNED_INT",E[E.INT=5124]="INT",E[E.HALF_FLOAT=5131]="HALF_FLOAT",E[E.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",E[E.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",E[E.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",E[E.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(F||(F={})),function(E){E[E.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",E[E.STENCIL_INDEX8=36168]="STENCIL_INDEX8",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL",E[E.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",E[E.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",E[E.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",E[E.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(H||(H={})),function(E){E[E.STATIC_DRAW=35044]="STATIC_DRAW",E[E.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",E[E.STREAM_DRAW=35040]="STREAM_DRAW",E[E.STATIC_READ=35045]="STATIC_READ",E[E.DYNAMIC_READ=35049]="DYNAMIC_READ",E[E.STREAM_READ=35041]="STREAM_READ",E[E.STATIC_COPY=35046]="STATIC_COPY",E[E.DYNAMIC_COPY=35050]="DYNAMIC_COPY",E[E.STREAM_COPY=35042]="STREAM_COPY"}(_||(_={})),function(E){E[E.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",E[E.VERTEX_SHADER=35633]="VERTEX_SHADER"}(n||(n={})),function(E){E[E.FRAMEBUFFER=36160]="FRAMEBUFFER",E[E.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",E[E.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(Y||(Y={}));var V,X,f;(function(E){E[E.Texture=0]="Texture",E[E.BufferObject=1]="BufferObject",E[E.VertexArrayObject=2]="VertexArrayObject",E[E.Shader=3]="Shader",E[E.Program=4]="Program",E[E.FramebufferObject=5]="FramebufferObject",E[E.Renderbuffer=6]="Renderbuffer",E[E.TransformFeedback=7]="TransformFeedback",E[E.Sync=8]="Sync",E[E.UNCOUNTED=9]="UNCOUNTED",E[E.LinesOfCode=9]="LinesOfCode",E[E.Uniform=10]="Uniform",E[E.COUNT=11]="COUNT"})(V||(V={})),function(E){E[E.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",E[E.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",E[E.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",E[E.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",E[E.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",E[E.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",E[E.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",E[E.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",E[E.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",E[E.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",E[E.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",E[E.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",E[E.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",E[E.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",E[E.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",E[E.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(X||(X={})),function(E){E[E.NONE=0]="NONE",E[E.BACK=1029]="BACK"}(f||(f={}));const W=33306;var t,c,o,u,e,i,r;(function(E){E[E.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",E[E.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",E[E.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",E[E.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",E[E.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",E[E.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",E[E.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",E[E.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",E[E.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",E[E.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",E[E.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",E[E.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",E[E.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",E[E.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"})(t||(t={})),function(E){E[E.FLOAT=5126]="FLOAT",E[E.FLOAT_VEC2=35664]="FLOAT_VEC2",E[E.FLOAT_VEC3=35665]="FLOAT_VEC3",E[E.FLOAT_VEC4=35666]="FLOAT_VEC4",E[E.INT=5124]="INT",E[E.INT_VEC2=35667]="INT_VEC2",E[E.INT_VEC3=35668]="INT_VEC3",E[E.INT_VEC4=35669]="INT_VEC4",E[E.BOOL=35670]="BOOL",E[E.BOOL_VEC2=35671]="BOOL_VEC2",E[E.BOOL_VEC3=35672]="BOOL_VEC3",E[E.BOOL_VEC4=35673]="BOOL_VEC4",E[E.FLOAT_MAT2=35674]="FLOAT_MAT2",E[E.FLOAT_MAT3=35675]="FLOAT_MAT3",E[E.FLOAT_MAT4=35676]="FLOAT_MAT4",E[E.SAMPLER_2D=35678]="SAMPLER_2D",E[E.SAMPLER_CUBE=35680]="SAMPLER_CUBE",E[E.UNSIGNED_INT=5125]="UNSIGNED_INT",E[E.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",E[E.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",E[E.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",E[E.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",E[E.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",E[E.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",E[E.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",E[E.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",E[E.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",E[E.SAMPLER_3D=35679]="SAMPLER_3D",E[E.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",E[E.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",E[E.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",E[E.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",E[E.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",E[E.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",E[E.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",E[E.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",E[E.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",E[E.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",E[E.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",E[E.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(c||(c={})),function(E){E[E.OBJECT_TYPE=37138]="OBJECT_TYPE",E[E.SYNC_CONDITION=37139]="SYNC_CONDITION",E[E.SYNC_STATUS=37140]="SYNC_STATUS",E[E.SYNC_FLAGS=37141]="SYNC_FLAGS"}(o||(o={})),function(E){E[E.UNSIGNALED=37144]="UNSIGNALED",E[E.SIGNALED=37145]="SIGNALED"}(u||(u={})),function(E){E[E.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",E[E.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",E[E.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",E[E.WAIT_FAILED=37149]="WAIT_FAILED"}(e||(e={})),function(E){E[E.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(i||(i={})),function(E){E[E.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(r||(r={}));export{H as B,I as C,G as D,T as E,U as G,n as H,D as I,M as L,P as M,C as N,L as O,B as P,A as R,O as S,N as T,F as U,V,X,R as _,t as c,f,W as t}; diff --git a/build/assets/executeForTopCount-SMa27mo0.js b/build/assets/executeForTopCount-SMa27mo0.js new file mode 100644 index 0000000..fee0272 --- /dev/null +++ b/build/assets/executeForTopCount-SMa27mo0.js @@ -0,0 +1 @@ +import{f as i}from"./utils-CF4bGKhW.js";import{c as p}from"./queryTopFeatures-De5r1rPC.js";import{dd as a}from"./index-DKOmzAMm.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function F(o,t,r){const m=i(o);return(await p(m,a.from(t),{...r})).data.count}export{F as executeForTopCount}; diff --git a/build/assets/executeForTopExtents-Bv6_wAbP.js b/build/assets/executeForTopExtents-Bv6_wAbP.js new file mode 100644 index 0000000..bf5feaf --- /dev/null +++ b/build/assets/executeForTopExtents-Bv6_wAbP.js @@ -0,0 +1 @@ +import{dd as n,aZ as p}from"./index-DKOmzAMm.js";import{f as e}from"./utils-CF4bGKhW.js";import{d as s}from"./queryTopFeatures-De5r1rPC.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function F(a,i,m){const r=e(a),o=await s(r,n.from(i),{...m}),t=o.data.extent;return!t||isNaN(t.xmin)||isNaN(t.ymin)||isNaN(t.xmax)||isNaN(t.ymax)?{count:o.data.count,extent:null}:{count:o.data.count,extent:p.fromJSON(t)}}export{F as executeForTopExtents}; diff --git a/build/assets/executeForTopIds-BizsLta6.js b/build/assets/executeForTopIds-BizsLta6.js new file mode 100644 index 0000000..ca2dc52 --- /dev/null +++ b/build/assets/executeForTopIds-BizsLta6.js @@ -0,0 +1 @@ +import{f as i}from"./utils-CF4bGKhW.js";import{m as p}from"./queryTopFeatures-De5r1rPC.js";import{dd as a}from"./index-DKOmzAMm.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function w(o,r,t){const m=i(o);return(await p(m,a.from(r),{...t})).data.objectIds}export{w as executeForTopIds}; diff --git a/build/assets/executeQueryJSON-CCbDrFwh.js b/build/assets/executeQueryJSON-CCbDrFwh.js new file mode 100644 index 0000000..d78e8b4 --- /dev/null +++ b/build/assets/executeQueryJSON-CCbDrFwh.js @@ -0,0 +1 @@ +import{f as s}from"./utils-CF4bGKhW.js";import{S as e,p as u,c as m}from"./query-CQvaiR4K.js";import{dK as c,da as p}from"./index-DKOmzAMm.js";async function $(a,t,n){const o=s(a),{data:r}=await e(o,c.from(t),n);return r.count}async function b(a,t,n){const o=s(a),{data:r}=await u(o,c.from(t),n);return r.objectIds}async function j(a,t,n){const o=await d(a,t,n);return p.fromJSON(o)}async function d(a,t,n){const o=s(a),r={...n},f=c.from(t),{data:i}=await m(o,f,f.sourceSpatialReference,r);return i}export{d as a,$ as b,b as c,j as s}; diff --git a/build/assets/executeQueryPBF-B-eLVWOv.js b/build/assets/executeQueryPBF-B-eLVWOv.js new file mode 100644 index 0000000..b1e97d0 --- /dev/null +++ b/build/assets/executeQueryPBF-B-eLVWOv.js @@ -0,0 +1 @@ +import{f as d}from"./utils-CF4bGKhW.js";import{dN as f,aG as c,dK as _}from"./index-DKOmzAMm.js";import{p,r as m}from"./featureConversionUtils-CCATessr.js";import{f as y}from"./query-CQvaiR4K.js";function P(o,t){return t}function h(o,t,e,r){switch(e){case 0:return n(o,t+r,0);case 1:return o.originPosition==="lowerLeft"?n(o,t+r,1):G(o,t+r,1)}}function u(o,t,e,r){return e===2?n(o,t,2):h(o,t,e,r)}function C(o,t,e,r){return e===2?t===0?0:n(o,t,3):h(o,t,e,r)}function g(o,t,e,r){return e===3?t===0?0:n(o,t,3):u(o,t,e,r)}function n({translate:o,scale:t},e,r){return o[r]+e*t[r]}function G({translate:o,scale:t},e,r){return o[r]-e*t[r]}class v{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=P,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=f(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(e!=null)for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){const r=t.fields;c(r),r.push(e);const s=r.map(i=>i.name);this._attributesConstructor=function(){for(const i of s)this[i]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._mValueOffset=null,this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),t.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,r,s)=>this.addCoordinatePoint(e,r,s),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,r,s)=>this._addCoordinatePolygon(e,r,s),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,r,s)=>this._addCoordinatePolyline(e,r,s),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,r,s)=>this._addCoordinateMultipoint(e,r,s),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){this._lengths.length===0&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,i=p(r.clone(),r,!1,!1,this._transform),a=m(i,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...a}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform;switch(e=this._applyTransform(s,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t);const s=this._transform;return this._mValueOffset!==null&&t===0&&e>0&&!(e%this._mValueOffset)?0:this._applyTransform(s,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){r===0&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){r===0&&this._toAddInCurrentPath--==0&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),i=t[t.length-1];r===0&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),i.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?g:e?u:r?C:h}}async function x(o,t,e){const r=d(o),s={...e},i=_.from(t),a=!i.quantizationParameters,{data:l}=await y(r,i,new v({sourceSpatialReference:i.sourceSpatialReference,applyTransform:a}),s);return l}export{x as n}; diff --git a/build/assets/executeRelationshipQuery-F8Fprdd-.js b/build/assets/executeRelationshipQuery-F8Fprdd-.js new file mode 100644 index 0000000..fdd509a --- /dev/null +++ b/build/assets/executeRelationshipQuery-F8Fprdd-.js @@ -0,0 +1 @@ +import{f as l}from"./utils-CF4bGKhW.js";import{U as m,df as p,ff as f,da as j}from"./index-DKOmzAMm.js";import{t as R}from"./query-CQvaiR4K.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";function F(r,t){const e=r.toJSON();return e.objectIds&&(e.objectIds=e.objectIds.join(",")),e.orderByFields&&(e.orderByFields=e.orderByFields.join(",")),e.outFields&&!(t!=null&&t.returnCountOnly)?e.outFields.includes("*")?e.outFields="*":e.outFields=e.outFields.join(","):delete e.outFields,e.outSR&&(e.outSR=p(e.outSR)),e.dynamicDataSource&&(e.layer=JSON.stringify({source:e.dynamicDataSource}),delete e.dynamicDataSource),e}async function b(r,t,e){const n=await y(r,t,e),o=n.data,s=o.geometryType,a=o.spatialReference,d={};for(const c of o.relatedRecordGroups){const u={fields:void 0,objectIdFieldName:void 0,geometryType:s,spatialReference:a,hasZ:!!o.hasZ,hasM:!!o.hasM,features:c.relatedRecords};if(c.objectId!=null)d[c.objectId]=u;else for(const i of Object.keys(c))i!=="relatedRecords"&&(d[c[i]]=u)}return{...n,data:d}}async function h(r,t,e){const n=await y(r,t,e,{returnCountOnly:!0}),o=n.data,s={};for(const a of o.relatedRecordGroups)a.objectId!=null&&(s[a.objectId]=a.count);return{...n,data:s}}async function y(r,t,e={},n){const o=R({...r.query,f:"json",...n,...F(t,n)});return m(r.path+"/queryRelatedRecords",{...e,query:{...e.query,...o}})}async function J(r,t,e){t=f.from(t);const n=l(r);return b(n,t,e).then(o=>{const s=o.data,a={};return Object.keys(s).forEach(d=>a[d]=j.fromJSON(s[d])),a})}async function k(r,t,e){t=f.from(t);const n=l(r);return h(n,t,{...e}).then(o=>o.data)}export{J as executeRelationshipQuery,k as executeRelationshipQueryForCount}; diff --git a/build/assets/executeTopFeaturesQuery-Bwk1xqdY.js b/build/assets/executeTopFeaturesQuery-Bwk1xqdY.js new file mode 100644 index 0000000..ec19ac6 --- /dev/null +++ b/build/assets/executeTopFeaturesQuery-Bwk1xqdY.js @@ -0,0 +1 @@ +import{f as e}from"./utils-CF4bGKhW.js";import{p as f}from"./queryTopFeatures-De5r1rPC.js";import{dd as s,da as d}from"./index-DKOmzAMm.js";import"./normalizeUtils-DIcj7CYy.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./utils-BCmi3vQB.js";import"./query-CQvaiR4K.js";import"./pbfQueryUtils-D2YxxSfN.js";import"./pbf-DwSF5Y_G.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function Q(r,o,t,m){const i=e(r),p={...m},{data:a}=await f(i,s.from(o),t,p);return d.fromJSON(a)}export{Q as executeTopFeaturesQuery}; diff --git a/build/assets/featureConversionUtils-CCATessr.js b/build/assets/featureConversionUtils-CCATessr.js new file mode 100644 index 0000000..eaa54e2 --- /dev/null +++ b/build/assets/featureConversionUtils-CCATessr.js @@ -0,0 +1 @@ +import{aA as on,az as en,aB as tn,aC as sn,s as x,V as un,aD as ln,aE as cn,aF as an,aG as fn}from"./index-DKOmzAMm.js";import{e as T,a as P}from"./OptimizedFeature-DDMKj8Vq.js";import{e as hn}from"./OptimizedFeatureSet-Blu9Ckm7.js";function p(n,r){return n?r?4:3:r?3:2}const v=()=>un.getLogger("esri.layers.graphics.featureConversionUtils"),B={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},dn=(n,r,o,e,s,t)=>{n[o]=s,n[o+1]=t},A=(n,r,o,e,s,t)=>{n[o]=s,n[o+1]=t,n[o+2]=r[e+2]},mn=(n,r,o,e,s,t)=>{n[o]=s,n[o+1]=t,n[o+2]=r[e+3]},gn=(n,r,o,e,s,t)=>{n[o]=s,n[o+1]=t,n[o+2]=r[e+2],n[o+3]=r[e+3]};function L(n,r,o,e){if(n){if(o)return r&&e?gn:A;if(r&&e)return mn}else if(r&&e)return A;return dn}function z({scale:n,translate:r},o){return Math.round((o-r[0])/n[0])}function E({scale:n,translate:r},o){return Math.round((r[1]-o)/n[1])}function $({scale:n,translate:r},o,e){return o*n[e]+r[e]}function Un(n,r,o){return n?r?o?R(n):U(n):o?V(n):j(n):null}function j(n){const r=n.coords;return{x:r[0],y:r[1]}}function D(n,r){return n.coords[0]=r.x,n.coords[1]=r.y,n}function U(n){const r=n.coords;return{x:r[0],y:r[1],z:r[2]}}function yn(n,r){return n.coords[0]=r.x,n.coords[1]=r.y,n.coords[2]=r.z,n}function V(n){const r=n.coords;return{x:r[0],y:r[1],m:r[2]}}function pn(n,r){return n.coords[0]=r.x,n.coords[1]=r.y,n.coords[2]=r.m,n}function R(n){const r=n.coords;return{x:r[0],y:r[1],z:r[2],m:r[3]}}function bn(n,r){return n.coords[0]=r.x,n.coords[1]=r.y,n.coords[2]=r.z,n.coords[3]=r.m,n}function wn(n,r,o,e){let s=j;o&&e?s=R:o?s=U:e&&(s=V);for(const t of r){const{geometry:u,attributes:l}=t,i=u!=null?s(u):null;n.push({attributes:l,geometry:i})}return n}function S(n,r){return n&&r?bn:n?yn:r?pn:D}function In(n,r,o,e,s){const t=S(o,e);for(const{geometry:u,attributes:l}of r){const i=u!=null?t(new T,u):null;n.push(new P(i,l,null,s?l[s]:void 0))}return n}function Mn(n,r,o=S(r.z!=null,r.m!=null)){return o(n,r)}function Gn(n,r,o,e){for(const{geometry:s,attributes:t}of r)n.push({attributes:t,geometry:s!=null?H(s,o,e):null});return n}function H(n,r,o){if(n==null)return null;const e=p(r,o),s=[];for(let t=0;t=i&&(n.lengths.push(k),M=g)}return G(n.coords,M),n.coords.length?n:null}function On(n,r,o,e,s,t,u=o,l=e){if(N(n),!(r!=null&&r.coords.length))return null;const i=B[s],{coords:c,lengths:a}=r,f=p(o,e),h=p(o&&u,e&&l),d=L(o,e,u,l);if(!a.length)return d(n.coords,c,0,0,c[0],c[1]),N(n,f,0),n;let m=0;const y=t*t;for(const w of a){if(w=i?n.lengths.push(M):G(n.coords,I*h),m+=w*f}return n.coords.length?n:null}function jn(n,r,o,e){const s=n[r],t=n[r+1],u=n[o],l=n[o+1],i=n[e],c=n[e+1];let a=u,f=l,h=i-a,d=c-f;if(h!==0||d!==0){const m=((s-a)*h+(t-f)*d)/(h*h+d*d);m>1?(a=i,f=c):m>0&&(a+=h*m,f+=d*m)}return h=s-a,d=t-f,h*h+d*d}function q(n,r,o,e,s,t,u){let l,i=e,c=0;for(let a=t+o;ai&&(c=a,i=l);i>e&&(c-t>o&&q(n,r,o,e,s,t,c),s(n,r,n.length,c,r[c],r[c+1]),u-c>o&&q(n,r,o,e,s,c,u))}function Bn(n,r,o,e){var c;if(!((c=r==null?void 0:r.coords)!=null&&c.length))return null;const s=p(o,e);let t=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(r&&r.coords){const a=r.coords;for(let f=0;fn.layer.layerId)),t}function ta(a){return!!(a&&Array.isArray(a.layers)&&Array.isArray(a.tables))}function ra(a){a.layers||(a.layers=[]),a.tables||(a.tables=[])}function na(a,e){const t=[],r=[];for(const{layer:o}of e){const{isTable:s,layerId:n}=o;s?r.push(n):t.push(n)}A(a.layers,t),A(a.tables,r)}function A(a,e){if(a.length<2)return;const t=[];for(const{id:r}of a)t.push(r);j(t.sort(P),e.slice().sort(P))&&a.sort((r,o)=>{const s=e.indexOf(r.id),n=e.indexOf(o.id);return sn?1:0})}function P(a,e){return ae?1:0}async function sa(a,e,t){const{url:r,customParameters:o,apiKey:s}=e,{serviceJSON:n,layersJSON:l}=await Q(r,{customParameters:o,apiKey:s}),i=S(a.layers,n.layers,t),c=S(a.tables,n.tables,t);a.layers=i.itemResources,a.tables=c.itemResources;const m=[...i.added,...c.added],_=l?[...l.layers,...l.tables]:[];await oa(a,m,r,_)}function S(a,e,t){const r=G(a,e,(s,n)=>s.id===n.id);a=a.filter(s=>!r.removed.some(n=>n.id===s.id));const o=r.added;return o.forEach(({id:s})=>{a.push({id:s})}),{itemResources:a,added:o.filter(({id:s})=>!t.includes(s))}}async function oa(a,e,t,r){const o=await la(e),s=e.map(({id:n,type:l})=>new(o.get(l))({url:t,layerId:n,sourceJSON:r.find(({id:i})=>i===n)}));await Promise.allSettled(s.map(n=>n.load())),s.forEach(n=>{const{layerId:l,loaded:i,defaultPopupTemplate:c}=n;if(!i||c==null)return;const m={id:l,popupInfo:c.toJSON()};n.operationalLayerType!=="ArcGISFeatureLayer"&&(m.layerType=n.operationalLayerType),U(n,m,a)})}async function la(a){const e=[];a.forEach(({type:o})=>{const s=X(o),n=W[s];e.push(n())});const t=await Promise.all(e),r=new Map;return a.forEach(({type:o},s)=>{r.set(o,t[s])}),r}function U(a,e,t){a.isTable?E(t.tables,e):E(t.layers,e)}function E(a,e){const t=a.findIndex(({id:r})=>r===e.id);t===-1?a.push(e):a[t]=e}function K(a,e){if(!a.length)throw new y(`${e}:missing-parameters`,"'layers' array should contain at least one feature layer")}function ia(a,e){const t=a.map(r=>r.portalItem.id);if(new Set(t).size>1)throw new y(`${e}:invalid-parameters`,"All layers in the 'layers' array should be loaded from the same portal item")}function Y(a,e){const t=a.map(r=>r.layerId);if(new Set(t).size!==t.length)throw new y(`${e}:invalid-parameters`,"'layers' array should contain only one instance each of layer or table in a feature service")}async function ca(a){K(a,p),await Promise.all(a.map(e=>e.load()));for(const e of a)J(e,p,v),H({layer:e,itemType:h,errorNamePrefix:p});ia(a,p),Y(a,p)}async function ua(a,e){const{url:t,layerId:r,title:o,fullExtent:s,isTable:n}=a,l=d(t);e.url=((l==null?void 0:l.serverType)==="FeatureServer"?t:`${t}/${r}`)??null,e.title||(e.title=o),e.extent=null,n||s==null||(e.extent=await L(s)),T(e,u.METADATA),T(e,u.MULTI_LAYER),I(e,u.SINGLE_LAYER),n&&I(e,u.TABLE)}function ya(a,e){for(const s of a){const n=s.parsedUrl.path,l=d(n);if(!(l==null?void 0:l.url.path))throw new y(`${e}:invalid-parameters`,b(s,`has unsupported url pattern: ${n}`),{layer:s});const c=l==null?void 0:l.serverType;if(c!=="FeatureServer"&&c!=="MapServer")throw new y(`${e}:invalid-parameters`,b(s,`has unsupported server type: ${c}`),{layer:s});if(c==="MapServer"&&a.length>1)throw new y(`${e}:invalid-parameters`,"Only one layer or table in a map service can be saved")}const t=d(a[0].parsedUrl.path),r=t==null?void 0:t.url.path;if(!a.every(s=>{const n=d(s.parsedUrl.path);return(n==null?void 0:n.url.path)===r}))throw new y(`${e}:invalid-parameters`,"'layers' array should only contain layers or tables that belong to the same feature service")}async function pa(a){K(a,f),await Promise.all(a.map(e=>e.load()));for(const e of a)J(e,f,v);ya(a,f),Y(a,f)}async function fa(a,e){let t=0,r=0;for(const{isTable:n}of e)n?r++:t++;const o=e[0].parsedUrl.path,s=d(o);if(a.url=(s==null?void 0:s.serverType)==="FeatureServer"?s.url.path:o,a.title||(a.title=s.title),a.extent=null,t>0){const n=e.map(l=>l.fullExtent).filter(z).reduce((l,i)=>l.clone().union(i));n&&(a.extent=await L(n))}T(a,u.METADATA),$(a,u.MULTI_LAYER,e.length>1),$(a,u.SINGLE_LAYER,e.length===1),$(a,u.TABLE,r>0&&t===0),g(a)}async function ba(a,e){return V({layer:a,itemType:h,validateLayer:v,createItemData:(t,r)=>D(r,[t]),errorNamePrefix:Z},e)}async function Aa(a,e){await ca(a);const t=a[0].portalItem,r=N(t),o=await Promise.all(a.map(n=>O(n,r,e))),s=await D(t,a.map((n,l)=>({layer:n,layerJSON:o[l]})));return g(t),await t.update({data:s}),await Promise.all(a.slice(1).map(n=>n.portalItem.reload())),x(r),t.clone()}async function Pa(a,e,t){return k({layer:a,itemType:h,validateLayer:v,createItemData:(r,o)=>Promise.resolve(R(r)),errorNamePrefix:aa,newItem:e,setItemProperties:ua},t)}async function Sa(a,e,t){await pa(a);const r=q({itemType:h,errorNamePrefix:f,newItem:e}),o=N(r),s=await Promise.all(a.map(l=>O(l,o,t))),n=await F(a.map((l,i)=>({layer:l,layerJSON:s[i]})));await fa(r,a),await C(r,n,t);for(const l of a)l.portalItem=r.clone();return x(o),r}export{ba as save,Aa as saveAll,Sa as saveAllAs,Pa as saveAs}; diff --git a/build/assets/featureSetUtils-sHviL1hk.js b/build/assets/featureSetUtils-sHviL1hk.js new file mode 100644 index 0000000..234e47b --- /dev/null +++ b/build/assets/featureSetUtils-sHviL1hk.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/meshFeatureSet-x5YtiVvA.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/Mesh-DkA8R2dF.js","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/mat4f64-CSKppSlJ.js","assets/quat-BYKy26Om.js","assets/mat3f64-q3fE-ZOt.js","assets/quatf64-Bdb9ZJJK.js","assets/imageUtils-D81CeaJ0.js","assets/MeshVertexAttributes-CfiMg9vN.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/earcut-BqgeR2O3.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/DoubleArray-D2IDWC15.js","assets/Indices-BhOjxL0t.js","assets/plane-aHrUkISy.js","assets/vec2f64-DA6GkJuH.js","assets/deduplicate-B_YKqNj1.js","assets/projection-Ch_noS-l.js","assets/mat3-BNGRf_pC.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/BufferView-DOhKdt-N.js","assets/vec2-CurFBDJu.js","assets/vec3-C6eb5QY9.js","assets/vec4-n1PBj5SL.js","assets/vertexSpaceConversion-DdxiyRap.js"])))=>i.map(i=>d[i]); +import{ay as se,bY as Be,aG as Me,a8 as G,bE as We,cg as W,cY as Re,i2 as xe,M as $e,da as Ve,dM as Qe,_ as Ze,dK as x,dL as ze,s as Je,i3 as he,dj as E,gx as Ke,df as Xe,U as B,dh as Ye,aL as ce,eA as He,dg as et,ff as fe,cE as tt,S as it,aN as pe}from"./index-DKOmzAMm.js";import{az as ae,aA as I,V as st,aq as R,ar as ye,as as _e,at as ge,au as me,av as we,aG as V,aH as re,aI as at,aJ as Q,N as rt,aK as nt,aL as Ne,B as lt,aM as ot,aN as Fe}from"./arcadeUtils-BvZmzJL_.js";import{O as k,s as D,a as T,n as N,t as L,r as ut}from"./WhereClause-CILeHwR9.js";import{x as O,t as y,g as q,m as Z,p as v,y as dt,A as ht,w as Y,E as Se,T as be,S as Ie,F as ct,v as Le,a as ft,D as z,L as pt,d as U,b as yt,f as _t,c as m}from"./SpatialFilter-DCIoEGCD.js";import{c as gt,b as mt,n as wt}from"./TimeOnly-C2MfFEIr.js";import{u as Ce,i as De}from"./infoFor3D-DsOdlPuA.js";import{a as Ft,s as Te,b as St,c as bt}from"./executeQueryJSON-CCbDrFwh.js";import{n as It}from"./executeQueryPBF-B-eLVWOv.js";import"./AttachmentInfo-CQ7iJxR0.js";import"./normalizeUtilsCommon-BatUY1sD.js";import"./pbf-DwSF5Y_G.js";let Ae=class{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return this._layerByName[e]===void 0?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return this._layerById[e]===void 0?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}},Oe=class H extends O{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof k?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){this._parent!==null?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new se({wkid:4326}),this.geometryType=ae.point)}async _getSet(e){if(this._wset===null){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),this._whereClauseFunction!==null?this._wset=new y(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new y(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){var i;let t=(i=this._parent)==null?void 0:i._isInFeatureSet(e);return t===I.NotInFeatureSet?t:(t=this._idstates[e],t===void 0?I.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,s){return this._parent._getFeatures(e,t,i,s)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){var t;return((t=this._whereclause)==null?void 0:t.testFeature(e))??!1}async executeWhereClauseDeferred(e){if(this._whereClauseFunction!==null){const t=this._whereClauseFunction(e);return Be(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){var n,l,o;const s=new y([],e,!1,null),a=Math.min(t,e.length);if(await((n=this._parent)==null?void 0:n._getFeatures(s,-1,a,i)),this._checkCancelled(i),this._whereClauseFunction==null){for(let u=0;u":case"=":if(e.left.type==="column-reference"&&e.right.type==="string"){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&this.lkp[e.right.value.toString()]!==void 0)return" ("+s+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if(e.right.type==="column-reference"&&e.left.type==="string"&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+s+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,F.BADNESS,a)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,F.BADNESS,a)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,F.BADNESS,a)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,F.BADNESS,a)+") "}case"null":return"null";case"boolean":return e.value===!0?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return ht(e.mode==="date",t);case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"data-type":return e.value;case"function":{const u=this.evaluateNodeToWhereClause(e.args,t,i,F.BADNESS,a);return dt(e.name,u,t)}}throw new N(L.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof k?this.reverseLkp[k.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))]:this.reverseLkp[e.attributes[this.codefield]]}};Dt.BADNESS="_!!!_BAD_LKP_!!!!";class Tt extends K{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:Z(e,this.field.name,v(this._sql,R.Standardised),t.getFieldsIndex())}}extractValue(e){return k.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class kt extends O{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){this._parent!==null?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new se({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=ae.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){var t;if(this._wset===null){await this._ensureLoaded();let i=null;return i=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await((t=this._parent)==null?void 0:t._getSet(e)),this._checkCancelled(e),Me(i),this._wset=new y(i._candidates.slice(0),i._known.slice(0),i._ordered,this._clonePageDefinition(i.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,s){var u,d;const a=[];t!==-1&&this._featureCache[t]===void 0&&a.push(t);const r=this._maxQueryRate();if(this._checkIfNeedToExpandKnownPage(e,r)===!0)return await this._expandPagedSet(e,r,0,0,s),this._getFeatures(e,t,i,s);let n=0;for(let c=e._lastFetchedIndex;c=r)));c++);if(a.length===0)return"success";e=new y([],a,e._ordered,null);const l=Math.min(a.length,i);await((u=this._parent)==null?void 0:u._getFeatures(e,-1,l,s)),this._checkCancelled(s);const o=[];for(let c=0;c0&&(s=s.replaceFields(d))}i!==null?this._extraFilter!==null&&(i=q(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const o=await this._parent._getFilteredSet(e,t,i,s,a);let u;return this._checkCancelled(a),u=r===!0?new y(o._candidates.slice(0).concat(o._known.slice(0)),[],l===!0&&o._ordered,this._clonePageDefinition(o.pagesDefinition)):new y(o._candidates.slice(0),o._known.slice(0),l===!0&&o._ordered,this._clonePageDefinition(o.pagesDefinition)),u}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(e!==null){for(const i of this.adaptedFields)if(Le(e,i.field.name)===!0){const s=i.rewriteSql(e,this);if(s.rewritten!==!0){t.cannot=!0,t.where=null;break}t.where=s.where}}return t}async _stat(e,t,i,s,a,r,n){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(a),l=l||o.cannot,(a=o.where)!==null?this._extraFilter!==null&&(a=q(this._extraFilter,a)):a=this._extraFilter,l===!0)return a===null&&i===""&&s===null?this._manualStat(e,t,r,n):{calculated:!1};const u=await this._parent._stat(e,t,i,s,a,r,n);return u.calculated===!1?a===null&&i===""&&s===null?this._manualStat(e,t,r,n):{calculated:!1}:u}async _canDoAggregates(e,t,i,s,a){if(this._parent===null)return!1;for(let l=0;l{for(let s=0;s0?(await V(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,s){return this._parent._getFeatures(e,t,i,s)}_featureFromCache(e){if(this._featureCache[e]===void 0){const t=this._parent._featureFromCache(e);return t===void 0?void 0:t===null?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new D(T.NeverReach)}async _getFilteredSet(e,t,i,s,a){await this._ensureLoaded();const r=await this._parent._getFilteredSet(e,t,i,s===null?this._orderbyclause:s,a);this._checkCancelled(a);const n=new y(r._candidates.slice(0),r._known.slice(0),r._ordered,this._clonePageDefinition(r.pagesDefinition));let l=!0;if(r._candidates.length>0&&(l=!1),n._ordered===!1){let o=await this.manualOrderSet(n,a);return l===!1&&(t===null&&i===null||(o=new y(o._candidates.slice(0).concat(o._known.slice(0)),[],o._ordered,this._clonePageDefinition(o.pagesDefinition)))),o}return n}static registerAction(){O._featuresetFunctions.orderBy=function(e){return e===""?this:new Ee({parentfeatureset:this,orderbyclause:new $(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}};function vt(h){if(h.parseTree.type==="function"){if(h.parseTree.args.value.length===0)return{name:h.parseTree.name,expr:null};if(h.parseTree.args.value.length>1)throw new N(L.MissingStatisticParameters);const e=k.create(ft(h.parseTree.args.value[0],R.Standardised,h.parameters),h.fieldsIndex,h.timeZone);return{name:h.parseTree.name,expr:e}}return null}let ve=class ie{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new ie;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,s){const a=new ie;a.field=e;const r=k.create(t,i,s),n=vt(r);if(n===null)throw new N(L.UnsupportedSqlFunction,{function:""});const l=n.name.toUpperCase().trim();if(l==="MIN"){if(a.typeofstat="MIN",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"min"})}else if(l==="MAX"){if(a.typeofstat="MAX",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"max"})}else if(l==="COUNT")a.typeofstat="COUNT",a.workingexpr=n.expr;else if(l==="STDEV"){if(a.typeofstat="STDDEV",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"stdev"})}else if(l==="SUM"){if(a.typeofstat="SUM",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"sum"})}else if(l==="MEAN"){if(a.typeofstat="AVG",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:l})}else if(l==="AVG"){if(a.typeofstat="AVG",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"avg"})}else{if(l!=="VAR")throw new N(L.UnsupportedSqlFunction,{function:l});if(a.typeofstat="VAR",a.workingexpr=n.expr,r===null)throw new N(L.InvalidFunctionParameters,{function:"var"})}return a}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}};function Rt(h){if(!h)return"COUNT";switch(h.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}let xt=class Pe extends O{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(this._wset===null){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return I.InFeatureSet}_nextUniqueName(e){for(;e["T"+this._uniqueIds.toString()]===1;)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const s=this._parent?this._parent.getFieldsIndex():new We([]);for(this.objectIdField="ROW__ID",this.globalIdField="";t===!1;){let r=!1;for(let n=0;n0)for(const r of this._parent.fields)this._adaptedFields.push(new ee(r));for(let r=0;r0&&(l=new kt({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),n.nowhereclause===!0)r=new y(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new te({parentfeatureset:l,orderbyclause:new $(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let o=l;if(i!==null){let u=null;i&&(u=this._reformulateWhereClauseWithoutGroupByFields(i)),o=new Oe({parentfeatureset:o,whereclause:u})}r=new y(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new te({parentfeatureset:o,orderbyclause:new $(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return r}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=Z(e,t.tofieldname,v(t.workingexpr,R.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=Z(e,t.tofieldname,v(t.expression,R.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const i of this._decodedGroupbyfield)i.tofieldname!==i.name&&t.push({field:i.tofieldname,newfield:i.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return e===null?null:e.aggregatefeaturesetpagedefinition===!0?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)===!0?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,s,a){return this._expandPagedSetFeatureSet(e,t,i,s,a)}async _getPhysicalPage(e,t,i){if(e.pagesDefinition.aggregatefeaturesetpagedefinition===!0)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const s=await this._getAgregagtePhysicalPage(e,t,i);for(const a of s){const r={geometry:a.geometry,attributes:{}},n={};for(const l in a.attributes)n[l.toLowerCase()]=a.attributes[l];for(const l of this._decodedGroupbyfield)r.attributes[l.tofieldname]=n[l.name.toLowerCase()];for(const l of this._decodedStatsfield)r.attributes[l.tofieldname]=n[l.field.toLowerCase()];this._featureCache[r.attributes[this.objectIdField]]=new G(r)}return s.length}_sequentialGetPhysicalItem(e,t,i,s){return new Promise((a,r)=>{e.pagesDefinition.internal.iterator===null&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),e.pagesDefinition.internal.fullyResolved===!0||t===0?a(s.length):this._nextAggregateItem(e,t,i,s,n=>{n===null?a(s.length):(t-=1,a(this._sequentialGetPhysicalItem(e,t,i,s)))},r)})}_nextAggregateItem(e,t,i,s,a,r){try{V(e.pagesDefinition.internal.iterator.next()).then(n=>{if(n===null)if(e.pagesDefinition.internal.workingItem!==null){const l=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);s.push(l),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(l.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,a(null)}else e.pagesDefinition.internal.fullyResolved=!0,a(null);else{const l=this._generateAggregateHash(n);if(e.pagesDefinition.internal.workingItem===null)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const o=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return s.push(o),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(o.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void a(o)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,s,a,r)}},r)}catch(n){r(n)}}_calculateFieldStat(e,t,i){const s=[];for(let a=0;athis._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&e._known[e._known.length-1]==="GETPAGES"?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===I.NotInFeatureSet)return t;const i=this._idstates[e];return i===I.InFeatureSet||i===I.NotInFeatureSet?i:t===I.InFeatureSet&&i===void 0?this._countedinthis._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let n=e._known.length;return n>0&&e._known[n-1]==="GETPAGES"&&(e._known.length=n-1),n=e._candidates.length,n>0&&e._candidates[n-1]==="GETPAGES"&&(e._candidates.length=n-1),"success"}const r=await this._parent._expandPagedSet(e,t,i,s,a);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),r}async _getFeatures(e,t,i,s){const a=[],r=this._maxQueryRate();if(this._checkIfNeedToExpandKnownPage(e,r)===!0)return await this._expandPagedSet(e,r,0,0,s),this._getFeatures(e,t,i,s);t!==-1&&this._featureCache[t]===void 0&&a.push(t);let n=0;for(let u=e._lastFetchedIndex;ur)));u++);if(a.length===0)return"success";const l=new y([],a,!1,null),o=Math.min(a.length,i);await this._parent._getFeatures(l,-1,o,s);for(let u=0;u=this._topnum)break}else if(n===I.NotInFeatureSet)s===null?s={start:r,end:r}:s.end===r-1?s.end=r:(a.push(s),s={start:r,end:r}),i+=1;else if(n===I.Unknown)break;if(i>=t)break}s!==null&&a.push(s);for(let r=a.length-1;r>=0;r--)e._candidates.splice(a[r].start,a[r].end-a[r].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){O._featuresetFunctions.top=function(e){return new ne({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}async function Nt(h,e,t,i){return Ot(e,await Lt(h,e,t,i),t,i)}async function Lt(h,e,t,i){var u;const s={...i},a=Et(e,t),r=((u=e.outStatistics)==null?void 0:u[0])!=null,n=$e("featurelayer-pbf-statistics"),l=!r||n;let o;if((t==null?void 0:t.format)==="pbf"&&l)try{o=await It(h,a,s)}catch(d){if(d.name!=="query:parsing-pbf")throw d;t.format="json"}return(t==null?void 0:t.format)!=="json"&&l||(o=await Ft(h,a,s)),At(t==null?void 0:t.fieldsIndex,o.fields),o}function At(h,e){if(h!=null&&e!=null)for(const t of e){const i=h.get(t.name);i&&Object.assign(t,i.toJSON())}}async function Ot(h,e,t,i){var r;const s=t==null?void 0:t.infoFor3D;if(!je(h,s)||s==null||!e.assetMaps||!((r=e.features)!=null&&r.length))return Ve.fromJSON(e);const{meshFeatureSetFromJSON:a}=await Qe(Ze(()=>import("./meshFeatureSet-x5YtiVvA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),i);return a(h,s,e)}function Et(h,e){let t=x.from(h);t.sourceSpatialReference=t.sourceSpatialReference??(e==null?void 0:e.sourceSpatialReference)??null,(e!=null&&e.gdbVersion||e!=null&&e.dynamicDataSource)&&(t=t===h?t.clone():t,t.gdbVersion=h.gdbVersion||e.gdbVersion,t.dynamicDataSource=h.dynamicDataSource?ze.from(h.dynamicDataSource):e.dynamicDataSource);const i=e==null?void 0:e.infoFor3D;if(i!=null&&je(h,i)){t=t===h?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=i,r=Ce("model/gltf-binary",s)??De("glb",s),n=Ce("model/gltf+json",s)??De("gtlf",s);for(const l of a){if(l===r){t.formatOf3DObjects=l;break}l!==n||t.formatOf3DObjects||(t.formatOf3DObjects=l)}if(!t.formatOf3DObjects)throw new Je("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outFields==null||!t.outFields.includes("*")){t=t===h?t.clone():t,t.outFields==null&&(t.outFields=[]);const{originX:l,originY:o,originZ:u,translationX:d,translationY:c,translationZ:f,scaleX:_,scaleY:g,scaleZ:b,rotationX:S,rotationY:p,rotationZ:w,rotationDeg:C}=i.transformFieldRoles;t.outFields.push(l,o,u,d,c,f,_,g,b,S,p,w,C)}}return t}function je(h,e){return e!=null&&h.returnGeometry===!0&&h.multipatchOption!=="xyFootprint"&&!h.outStatistics}class J extends O{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,e.outFields!==void 0&&(this._overrideFields=e.outFields),e.includeGeometry!==void 0&&(this._removeGeometry=e.includeGeometry===!1)}_maxQueryRate(){return re}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+at(e.toJSON());return Re(t,xe.String)}async loadImpl(){return this._layer.loaded===!0?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){var e,t,i,s,a,r;if(this.spatialReference==null&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this.hasZ=((i=(t=(e=this._layer)==null?void 0:e.capabilities)==null?void 0:t.data)==null?void 0:i.supportsZ)===!0,this.hasM=((r=(a=(s=this._layer)==null?void 0:s.capabilities)==null?void 0:a.data)==null?void 0:r.supportsM)===!0,this._overrideFields!==null)if(this._overrideFields.length===1&&this._overrideFields[0]==="*")this._overrideFields=null;else{const n=[],l=[];for(const o of this.fields)if(o.type==="oid")n.push(o),l.push(o.name);else for(const u of this._overrideFields)if(u.toLowerCase()===o.name.toLowerCase()){n.push(o),l.push(o.name);break}this.fields=n,this._overrideFields=l}if(this._layer.source&&this._layer.source.sourceJSON){const n=this._layer.source.sourceJSON.currentVersion;this._layer.source.sourceJSON.useStandardizedQueries===!0?(this._databaseType=R.StandardisedNoInterval,n!=null&&n>=10.61&&(this._databaseType=R.Standardised)):n!=null&&(n>=10.5&&(this._databaseType=R.StandardisedNoInterval,this._requestStandardised=!0),n>=10.61&&(this._databaseType=R.Standardised))}this.objectIdField=this._layer.objectIdField;for(const n of this.fields)n.type==="global-id"&&(this.globalIdField=n.name);this._layer.type==="subtype-group"?(this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.types=null,this.typeIdField=null):this._layer.type==="oriented-imagery"?(this.subtypeField=null,this.subtypes=null,this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types):(this.subtypeField=this._layer.subtypeField,this.subtypes=this._layer.subtypes,this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}_isInFeatureSet(){return I.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(this._wset===null){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new x;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||this._layer.capabilities.query.supportsPagination!==!0)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){var i,s;const t=(s=(i=this._layer)==null?void 0:i.capabilities)==null?void 0:s.query;return!e.outStatistics&&(t==null?void 0:t.supportsFormatPBF)===!0&&(t==null?void 0:t.supportsQuantizationEditMode)===!0}async queryPBF(e){return e.quantizationParameters={mode:"edit"},(await Nt(this._layer.parsedUrl,e,{format:"pbf"},{})).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){e.returnZ=this.hasZ,e.returnM=this.hasM;const i=t==="execute"?Te:t==="executeForCount"?St:bt,s=t==="execute"&&this.pbfSupportedForQuery(e);let a=null;if(this.recentlyUsedQueries){const r=this.convertQueryToLruCacheKey(e);a=this.recentlyUsedQueries.getFromCache(r),a===null&&(a=s!==!0?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(r,a),a=a.catch(n=>{var l;throw(l=this.recentlyUsedQueries)==null||l.removeFromCache(r),n}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),a===null&&(a=s!==!0?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),a}async _getFilteredSet(e,t,i,s,a){const r=await this.databaseType();if(this.isTable()&&t&&e!==null&&e!=="")return new y([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,s,a);let n="",l=!1;s!==null&&this._layer.capabilities&&this._layer.capabilities.query&&this._layer.capabilities.query.supportsOrderBy===!0&&(n=s.constructClause(),l=!0);const o=new x;this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.where=i===null?t===null?"1=1":"":v(i,r),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=n!==""?n.split(","):null,o.geometry=t===null?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return u===null&&(u=[]),this._checkCancelled(a),new y([],u,l,null)}_expandPagedSet(e,t,i,s,a){return this._expandPagedSetFeatureSet(e,t,i,s,a)}async _getFilteredSetUsingPaging(e,t,i,s,a){var f;let r="",n=!1;s!==null&&this._layer.capabilities&&this._layer.capabilities.query&&this._layer.capabilities.query.supportsOrderBy===!0&&(r=s.constructClause(),n=!0);const l=await this.databaseType();let o=i===null?t===null?"1=1":"":v(i,l);this._layer.definitionExpression&&this._useDefinitionExpression&&(o=o!==""?"(("+this._layer.definitionExpression+") AND ("+o+"))":this._layer.definitionExpression);let u=this._maxQueryRate();const d=(f=this._layer.capabilities)==null?void 0:f.query.maxRecordCount;d!=null&&d=this._maxProcessingRate()-1))break}if(r>=i&&a.length===0)break}if(a.length===0)return"success";const n=new x;this._requestStandardised&&(n.sqlFormat="standard"),this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.objectIds=a,n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0,this._removeGeometry===!0&&(n.returnGeometry=!1),n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(s),l.error!==void 0)throw new D(T.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let u=0;u=n)break}return g.features.length===0?l:g.features.length===((S=this._layer.capabilities)==null?void 0:S.query.maxRecordCount)&&l.length"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const a=e.pagesDefinition.internal.lastRetrieved,r=a,n=e.pagesDefinition.internal.lastPage,l=new x;if(this._requestStandardised&&(l.sqlFormat="standard"),l.where=s,l.spatialRelationship=e.pagesDefinition.spatialRel,l.relationParameter=e.pagesDefinition.relationParam,l.outFields=e.pagesDefinition.outFields,l.outStatistics=e.pagesDefinition.outStatistics,l.geometry=e.pagesDefinition.geometry,l.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,l.num=e.pagesDefinition.resultRecordCount,l.start=e.pagesDefinition.internal.lastPage,l.returnGeometry=e.pagesDefinition.returnGeometry,this.datesInUnknownTimezone&&(l.timeReferenceUnknownClient=!0),l.orderByFields=e.pagesDefinition.orderByFields!==""?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&l.geometry&&l.spatialRelationship)return[];const o=await this.executeQuery(l,"execute");if(this._checkCancelled(i),!o.hasOwnProperty("features"))throw new D(T.InvalidStatResponse);const u=[];if(e.pagesDefinition.internal.lastPage!==n)return[];o.features.length>0&&o.features[0].attributes[e.pagesDefinition.generatedOid]===void 0&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let d=0;d0||i&&i>0)&&(l.size=[t&&t>0?t:0,i&&i>0?i:t+1]),s&&s.length>0&&(l.attachmentTypes=s),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:n,query:l,method:"attachments"});const o=await n.queryAttachments(new Ke(l)),u=[];return o&&o[e]&&o[e].forEach(d=>{const c=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+d.id.toString();let f=null;a&&d.exifInfo&&(f=rt.convertJsonToArcade(d.exifInfo,"system",!0)),u.push(new nt(d.id,d.name,d.contentType,d.size,c,f,d.keywords??null))}),u}return[]}async queryRelatedFeatures(e){var s;const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:(s=e.outFields)==null?void 0:s.join(","),returnGeometry:e.returnGeometry.toString()};e.resultOffset!==void 0&&e.resultOffset!==null&&(t.resultOffset=e.resultOffset.toString()),e.resultRecordCount!==void 0&&e.resultRecordCount!==null&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=Xe(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await B(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const a={},r=i.data;if(r!=null&&r.relatedRecordGroups){const n=r.spatialReference;for(const l of r.relatedRecordGroups){const o=l.objectId,u=[];for(const d of l.relatedRecords){d.geometry&&(d.geometry.spatialReference=n);const c=new G({geometry:d.geometry?Ye(d.geometry):null,attributes:d.attributes});u.push(c)}a[o]={features:u,exceededTransferLimit:r.exceededTransferLimit===!0}}}return a}throw new D(T.InvalidRequest)}async getFeatureByObjectId(e,t){const i=new x;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.datesInUnknownTimezone&&(i.timeReferenceUnknownClient=!0),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const s=await Te(this._layer.parsedUrl.path,i);return s.features.length===1?s.features[0]:null}async getIdentityUser(){var t;await this.load();const e=(t=ce)==null?void 0:t.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){var s,a;await this.load();const e=(s=ce)==null?void 0:s.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.substring(0,i):t,t){t+="/rest/info";try{const r=await B(t,{query:{f:"json"}});let n="";return(a=r.data)!=null&&a.owningSystemUrl&&(n=r.data.owningSystemUrl),n}catch{return""}}return""}getDataSourceFeatureSet(){const e=new J({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){var a,r;if(this.fsetInfo)return this.fsetInfo;let e=null,t=this._layer.serviceItemId??null;const i=this._layer.parsedUrl.path;if(i){const n=await B(i,{responseType:"json",query:{f:"json"}});e=((a=n==null?void 0:n.data)==null?void 0:a.name)??null,t=((r=n==null?void 0:n.data)==null?void 0:r.serviceItemId)??null}const s=this._layer.title&&(this._layer.parent??null)!==null;return this.featureSetInfo={layerId:this._layer.layerId,layerName:e===""?null:e,itemId:t===""?null:t,serviceLayerUrl:i===""?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}let Pt=class qe extends O{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,e.isTable===!0&&(this._forceIsTable=!0),e.outFields!==void 0&&(this._overrideFields=e.outFields),e.includeGeometry!==void 0&&(this._removeGeometry=e.includeGeometry===!1)}_maxQueryRate(){return re}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return this._layer.loaded===!0?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){var e,t,i,s,a,r;if(this.spatialReference==null&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._overrideFields!==null)if(this._overrideFields.length===1&&this._overrideFields[0]==="*")this._overrideFields=null;else{const n=[],l=[];for(const o of this.fields)if(o.type==="oid")n.push(o),l.push(o.name);else for(const u of this._overrideFields)if(u.toLowerCase()===o.name.toLowerCase()){n.push(o),l.push(o.name);break}this.fields=n,this._overrideFields=l}this.objectIdField=this._layer.objectIdField;for(const n of this.fields)n.type==="global-id"&&(this.globalIdField=n.name);this._databaseType=R.Standardised,this.hasZ=((i=(t=(e=this._layer)==null?void 0:e.capabilities)==null?void 0:t.data)==null?void 0:i.supportsZ)===!0,this.hasM=((r=(a=(s=this._layer)==null?void 0:s.capabilities)==null?void 0:a.data)==null?void 0:r.supportsM)===!0,this._layer.type==="subtype-group"?(this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.types=null,this.typeIdField=null):this._layer.type==="oriented-imagery"?(this.subtypeField=null,this.subtypes=null,this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types):(this.subtypeField=this._layer.subtypeField,this.subtypes=this._layer.subtypes,this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}isTable(){return this._forceIsTable||this._layer.isTable||this._layer.type==="table"||!this._layer.geometryType}_isInFeatureSet(){return I.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(this._wset===null){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new G({geometry:this._removeGeometry===!0?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,s,a){let r="",n=!1;if(s!==null&&(r=s.constructClause(),n=!0),this.isTable()&&t&&e!==null&&e!=="")return new y([],[],!0,null);const l=new x;l.returnZ=this.hasZ,l.returnM=this.hasM,l.where=i===null?t===null?"1=1":"":v(i,R.Standardised),l.spatialRelationship=this._makeRelationshipEnum(e),l.outSpatialReference=this.spatialReference,l.orderByFields=r!==""?r.split(","):null,l.geometry=t===null?null:t,l.returnGeometry=!0,l.relationParameter=this._makeRelationshipParam(e);const o=await this._layer.queryFeatures(l);if(o===null)return new y([],[],n,null);this._checkCancelled(a);const u=[];return o.features.forEach(d=>{const c=d.attributes[this._layer.objectIdField];u.push(c),this._featureCache[c]=this._changeFeature(d)}),new y([],u,n,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;const e=new x;if(e.where="1=1",await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const s=[];return this._layer.source.items.forEach(a=>{const r=a.attributes[this._layer.objectIdField];s.push(r),this._featureCache[r]=this._changeFeature(a)}),this._wset=new y([],s,!1,null),this._wset}e.returnZ=this.hasZ,e.returnM=this.hasM;const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach(s=>{const a=s.attributes[this._layer.objectIdField];i.push(a),this._featureCache[a]=this._changeFeature(s)}),this._wset=new y([],i,!1,null),this._wset}async _getFeatures(e,t,i){const s=[];t!==-1&&this._featureCache[t]===void 0&&s.push(t);for(let a=e._lastFetchedIndex;ai)));a++);if(s.length===0)return"success";throw new D(T.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){var _,g,b,S,p,w;let i=e.layerDefinition.objectIdField;const s=e.layerDefinition.typeIdField??"",a=[];if(e.layerDefinition.types)for(const C of e.layerDefinition.types)a.push(He.fromJSON(C));let r=e.layerDefinition.geometryType;r===void 0&&(r=e.featureSet.geometryType||"");let n=e.featureSet.features;const l=t.toJSON();if(!i){let C=!1;for(const P of e.layerDefinition.fields)if(P.type==="oid"||P.type==="esriFieldTypeOID"){i=P.name,C=!0;break}if(C===!1){let P="FID",ue=!0,de=0;for(;ue;){let j=!0;for(const Ue of e.layerDefinition.fields)if(Ue.name===P){j=!1;break}j===!0?ue=!1:(de++,P="FID"+de.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:P,alias:P});const X=[];for(let j=0;jw.name):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let d=!0;this._removeGeometry===!0&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=n!==""?n.split(","):null;const c=await r.source.queryRelatedFeatures(o);this._checkCancelled(a);const f=c[this._findObjectId]?c[this._findObjectId].features:[],_=[];for(let w=0;ww.name):["*"]);return _=new y(c||f?["GETPAGES"]:[],c||f?[]:["GETPAGES"],n,{outFields:b.join(","),resultRecordCount:u,resultOffset:0,objectIds:[this._findObjectId],where:o,orderByFields:r,returnGeometry:g,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(_,u,0,0,a),_}_expandPagedSet(e,t,i,s,a){return this._expandPagedSetFeatureSet(e,t,i,s,a)}_clonePageDefinition(e){return e===null?null:e.groupbypage!==!0?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const s=e.pagesDefinition.internal.lastRetrieved,a=s,r=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),l=new fe;this._requestStandardised===!0&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=e.pagesDefinition.orderByFields!==""?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await n.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==r)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let c=0;ci)))&&!(n>=i&&a.length===0);l++);if(a.length===0)return"success";throw new D(T.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,s,a,r,n){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,s,a){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,s,a){return this._relatedLayer.queryAttachments(e,t,i,s,a)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){var e;return((e=this._relatedLayer)==null?void 0:e.preferredTimeZone)??null}get dateFieldsTimeZone(){var e;return((e=this._relatedLayer)==null?void 0:e.dateFieldsTimeZone)??null}get datesInUnknownTimezone(){var e;return(e=this._relatedLayer)==null?void 0:e.datesInUnknownTimezone}get editFieldsInfo(){var e;return((e=this._relatedLayer)==null?void 0:e.editFieldsInfo)??null}get timeInfo(){var e;return((e=this._relatedLayer)==null?void 0:e.timeInfo)??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}function qt(){m.applicationCache===null&&(m.applicationCache=new m)}async function M(h,e,t){if(m.applicationCache){const i=m.applicationCache.getLayerInfo(h);if(i){const r=await i;return new E({url:h,outFields:e,sourceJSON:r})}const s=new E({url:h,outFields:e}),a=(async()=>(await s.load(),s.sourceJSON))();if(m.applicationCache){m.applicationCache.setLayerInfo(h,a);try{return await a,s}catch(r){throw m.applicationCache.clearLayerInfo(h),r}}return await a,s}if(t!=null){const i=t.getCachedLayerMetadata(h);if(i){const r=await i;return new E({url:h,outFields:e,sourceJSON:r})}const s=new E({url:h,outFields:e}),a=(async()=>(await s.load(),s.sourceJSON))();t.setCachedLayerMetadata(h,a);try{return await a,s}catch(r){throw t.removeCachedLayerMetadata(h,a),r}}return new E({url:h,outFields:e})}async function le(h,e,t,i,s,a=null){return A(await M(h,["*"],s),e,t,i,s,a)}function A(h,e=null,t=null,i=!0,s=null,a=null){if(h.type==="catalog-footprint")return A(h.parent,e,t,i,s,a);if(h.type==="subtype-sublayer"){const r=A(h.parent,e,t,i,s,a);return r.filter(k.create(h.parent.subtypeField+"="+h.subtypeCode.toString(),h.parent.fieldsIndex,r.dateFieldsTimeZoneDefaultUTC))}if(Ne(h)){const r={layer:h,spatialReference:e,outFields:t,includeGeometry:i,lrucache:s,interceptor:a};return h.url||!h.source?new J(r):new Pt(r)}throw new Error(`Unsupported layer type: ${h.type}`)}async function Gt(h){if(m.applicationCache!==null){const t=m.applicationCache.getLayerInfo(h);if(t!==null)return t}const e=(async()=>{const t=await B(h,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(m.applicationCache!==null){m.applicationCache.setLayerInfo(h,e);try{return await e}catch(t){throw m.applicationCache.clearLayerInfo(h),t}}return e}async function Ut(h,e){const t="QUERYDATAELEMTS:"+e.toString()+":"+h;if(m.applicationCache!==null){const s=m.applicationCache.getLayerInfo(t);if(s!==null)return s}const i=(async()=>{var a;const s=await B(h+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([e.toString()]),f:"json"}});if(s.data){const r=s.data;if((a=r.layerDataElements)!=null&&a[0])return r.layerDataElements[0]}throw new D(T.DataElementsNotFound)})();if(m.applicationCache!==null){m.applicationCache.setLayerInfo(t,i);try{return await i}catch(s){throw m.applicationCache.clearLayerInfo(t),s}}return i}async function Ge(h,e){if(m.applicationCache!==null){const i=m.applicationCache.getLayerInfo(h);if(i!==null)return i}if(e!=null){const i=e.getCachedServiceMetadata(h);if(i!=null)return i}const t=(async()=>{const i=await B(h,{responseType:"json",query:{f:"json"}});if(i.data){const s=i.data;return s.layers||(s.layers=[]),s.tables||(s.tables=[]),s}return{layers:[],tables:[]}})();if(m.applicationCache!==null){m.applicationCache.setLayerInfo(h,t);try{return await t}catch(i){throw m.applicationCache.clearLayerInfo(h),i}}if(e!=null){e.setCachedServiceMetadata(h,t);try{return await t}catch(i){throw e.removeCachedServiceMetadata(h,t),i}}return t}async function Bt(h,e){var s,a,r;const t={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null},i=await Ge(h,null);if(t.metadata=i,((s=i.controllerDatasetLayers)==null?void 0:s.utilityNetworkLayerId)!==void 0&&i.controllerDatasetLayers.utilityNetworkLayerId!==null){if(i.layers)for(const o of i.layers)t.layerNameLkp[o.id]=o.name;if(i.tables)for(const o of i.tables)t.layerNameLkp[o.id]=o.name;const n=i.controllerDatasetLayers.utilityNetworkLayerId;t.networkId=n;const l=await Ut(h,n);if(l){t.queryelem=l,(a=t.queryelem)!=null&&a.dataElement&&t.queryelem.dataElement.schemaGeneration!==void 0&&(t.unVersion=t.queryelem.dataElement.schemaGeneration),t.lkp={},t.queryelem.dataElement.domainNetworks||(t.queryelem.dataElement.domainNetworks=[]);for(const u of t.queryelem.dataElement.domainNetworks){for(const d of u.edgeSources??[]){const c={layerId:d.layerId,sourceId:d.sourceId,className:t.layerNameLkp[d.layerId]??null};c.className&&(t.lkp[c.className]=c)}for(const d of u.junctionSources??[]){const c={layerId:d.layerId,sourceId:d.sourceId,className:t.layerNameLkp[d.layerId]??null};c.className&&(t.lkp[c.className]=c)}}if(t.queryelem.dataElement.terminalConfigurations)for(const u of t.queryelem.dataElement.terminalConfigurations)for(const d of u.terminals)t.terminals.push({terminalId:d.terminalId,terminalName:d.terminalName});const o=await Gt(h+"/"+n);if(((r=o.systemLayers)==null?void 0:r.associationsTableId)!==void 0&&o.systemLayers.associationsTableId!==null){const u=[];t.unVersion>=4&&(u.push("STATUS"),u.push("PERCENTALONG"));let d=await le(h+"/"+o.systemLayers.associationsTableId.toString(),e,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...u],!1,null,null);return await d.load(),t.unVersion>=4&&(d=d.filter(k.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",d.getFieldsIndex(),d.dateFieldsTimeZoneDefaultUTC)),await d.load()),{lkp:t.lkp,associations:d,unVersion:t.unVersion,terminals:t.terminals}}return{associations:null,unVersion:t.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:t.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:t.unVersion,lkp:null,terminals:[]}}async function Mt(h,e,t,i=null,s=null,a=!0,r=null,n=null){let l=h.serviceUrl();if(!l)return null;l=l.charAt(l.length-1)==="/"?l+e.relatedTableId.toString():l+"/"+e.relatedTableId.toString();const o=await le(l,i,s,a,r,n);return new jt({layer:h,relatedLayer:o,relationship:e,objectId:t,spatialReference:i,outFields:s,includeGeometry:a,lrucache:r,interceptor:n})}Oe.registerAction(),xt.registerAction(),te.registerAction(),_t.registerAction(),ne.registerAction();class Wt extends Ae{constructor(e,t=null,i=null,s=null){super(),this._map=e,this._overridespref=t,this._lrucache=i,this._interceptor=s,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const s=A(e,this._overridespref,i===null?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:s,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),s}async featureSetByName(e,t=!0,i=null){if(pe.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);i===null&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let r=0;rFe(r)&&r.title===e);if(a!=null)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find(n=>n.title===e);if(r!=null){if(r instanceof E)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable==null){const n=r.outFields?r:{...r,outFields:["*"]};r._materializedTable=new E(n)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}return null}async featureSetById(e,t=!0,i=["*"]){if(pe.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);i===null&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let r=0;rFe(r)&&r.id===e);if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find(n=>n.id===e);if(r!=null){if(r instanceof E)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable==null){const n={...r,outFields:["*"]};r._materializedTable=new E(n)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}return null}}class oe extends Ae{constructor(e,t=null,i=null,s=null){super(),this._url=e,this._overridespref=t,this._lrucache=i,this._interceptor=s,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const s=A(e,this._overridespref,i===null?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:s,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),s}async _loadMetaData(){const e=await Ge(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new oe(this._url,this._overridespref,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){i===null&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let n=0;n0){const I=[];for(let t=0;t{var f,y;if(E(e,1,2,n,i),De(e[0])||X(e[0]))return"Unknown";if(x(e[0])){if(await e[0].load(),e.length===1||e[1]===null)return e[0].datesInUnknownTimezone?z("unknown"):z(e[0].dateFieldsTimeZone);if(!(e[1]instanceof v)||e[1].hasField("type")===!1)throw new c(n,m.InvalidParameter,i);const o=e[1].field("type");if(P(o)===!1)throw new c(n,m.InvalidParameter,i);switch(N(o).toLowerCase()){case"preferredtimezone":return z(e[0].preferredTimeZone);case"editfieldsinfo":return z(((f=e[0].editFieldsInfo)==null?void 0:f.timeZone)??null);case"timeinfo":return z(((y=e[0].timeInfo)==null?void 0:y.timeZone)??null);case"field":if(e[1].hasField("fieldname")&&P(e[1].field("fieldname")))return z(e[0].fieldTimeZone(N(e[1].field("fieldname"))))}throw new c(n,m.InvalidParameter,i)}const t=Te(e[0],ue(n));if(t===null)return null;const s=t.timeZone;return s==="system"?Ie.systemTimeZoneCanonicalName:s.toLowerCase()==="utc"?"UTC":s.toLowerCase()==="unknown"?"Unknown":s})},a.functions.sqltimestamp=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{E(e,1,3,n,i);const t=e[0];if(de(t)){if(e.length===1)return t.toSQLWithKeyword();if(e.length===2)return t.changeTimeZone(N(e[1])).toSQLWithKeyword();throw new c(n,m.InvalidParameter,i)}if(X(t))return t.toSQLWithKeyword();if(x(t)){if(e.length!==3)throw new c(n,m.InvalidParameter,i);await t.load();const s=N(e[1]);if(X(e[2]))return e[2].toSQLWithKeyword();if(de(e[2])===!1)throw new c(n,m.InvalidParameter,i);const f=t.fieldTimeZone(s);return f===null?e[2].toSQLWithKeyword():e[2].changeTimeZone(f).toSQLWithKeyword()}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"sqltimestamp",min:2,max:4}),a.functions.featuresetbyid=function(n,i){return a.standardFunctionAsync(n,i,(p,I,e)=>{if(E(e,2,4,n,i),ce(e[0])){const t=N(e[1]);let s=L(e[2],null);const f=k(L(e[3],!0));if(s===null&&(s=["*"]),A(s)===!1)throw new c(n,m.InvalidParameter,i);return e[0].featureSetById(t,f,s)}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"featuresetbyid",min:2,max:4}),a.functions.getfeatureset=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,1,2,n,i),G(e[0])){let t=L(e[1],"datasource");return t===null&&(t="datasource"),t=N(t).toLowerCase(),Le(e[0].fullSchema(),t,n.lrucache,n.interceptor,n.spatialReference??null)}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"getfeatureset",min:1,max:2}),a.functions.featuresetbyportalitem=function(n,i){return a.standardFunctionAsync(n,i,(p,I,e)=>{var o,r;if(E(e,2,5,n,i),e[0]===null)throw new c(n,m.PortalRequired,i);if(e[0]instanceof be){const l=N(e[1]),u=N(e[2]);let w=L(e[3],null);const D=k(L(e[4],!0));if(w===null&&(w=["*"]),A(w)===!1)throw new c(n,m.InvalidParameter,i);let h;return h=(o=n.services)!=null&&o.portal?n.services.portal:pe.getDefault(),h=ke(e[0],h),me(l,u,n.spatialReference??null,w,D,h,n.lrucache,n.interceptor)}if(P(e[0])===!1)throw new c(n,m.PortalRequired,i);const t=N(e[0]),s=N(e[1]);let f=L(e[2],null);const y=k(L(e[3],!0));if(f===null&&(f=["*"]),A(f)===!1)throw new c(n,m.InvalidParameter,i);return me(t,s,n.spatialReference??null,f,y,((r=n.services)==null?void 0:r.portal)??pe.getDefault(),n.lrucache,n.interceptor)})},a.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),a.functions.featuresetbyname=function(n,i){return a.standardFunctionAsync(n,i,(p,I,e)=>{if(E(e,2,4,n,i),ce(e[0])){const t=N(e[1]);let s=L(e[2],null);const f=k(L(e[3],!0));if(s===null&&(s=["*"]),A(s)===!1)throw new c(n,m.InvalidParameter,i);return e[0].featureSetByName(t,f,s)}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"featuresetbyname",min:2,max:4}),a.functions.featureset=function(n,i){return a.standardFunction(n,i,(p,I,e)=>{E(e,1,1,n,i);const t={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if(P(e[0])){const s=JSON.parse(e[0]);s.layerDefinition!==void 0?(t.layerDefinition=s.layerDefinition,t.featureSet=s.featureSet,s.layerDefinition.spatialReference&&(t.layerDefinition.spatialReference=s.layerDefinition.spatialReference)):(t.featureSet.features=s.features,t.featureSet.geometryType=s.geometryType,t.layerDefinition.geometryType=t.featureSet.geometryType,t.layerDefinition.objectIdField=s.objectIdFieldName??"",t.layerDefinition.typeIdField=s.typeIdFieldName,t.layerDefinition.globalIdField=s.globalIdFieldName,t.layerDefinition.fields=s.fields,s.spatialReference&&(t.layerDefinition.spatialReference=s.spatialReference))}else{if(!(e[0]instanceof v))throw new c(n,m.InvalidParameter,i);{const s=JSON.parse(e[0].castToText(!0)),f=d(s,"layerdefinition");if(f!==null){t.layerDefinition.geometryType=d(f,"geometrytype",""),t.featureSet.geometryType=t.layerDefinition.geometryType,t.layerDefinition.globalIdField=d(f,"globalidfield",""),t.layerDefinition.objectIdField=d(f,"objectidfield",""),t.layerDefinition.typeIdField=d(f,"typeidfield",""),t.layerDefinition.hasZ=d(f,"hasz",!1)===!0,t.layerDefinition.hasM=d(f,"hasm",!1)===!0;const y=d(f,"spatialreference");y&&(t.layerDefinition.spatialReference=ie(y));const o=[];for(const l of d(f,"fields",[])){const u={name:d(l,"name",""),alias:d(l,"alias",""),type:d(l,"type",""),nullable:d(l,"nullable",!0),editable:d(l,"editable",!0),length:d(l,"length",null),domain:we(d(l,"domain"))};o.push(u)}t.layerDefinition.fields=o;const r=d(s,"featureset");if(r){const l={};for(const u of o)l[u.name.toLowerCase()]=u.name;for(const u of d(r,"features",[])){const w={},D=d(u,"attributes",{});for(const h in D)w[l[h.toLowerCase()]]=D[h];t.featureSet.features.push({attributes:w,geometry:he(d(u,"geometry"))})}}}else{t.layerDefinition.hasZ=d(s,"hasz",!1)===!0,t.layerDefinition.hasM=d(s,"hasm",!1)===!0,t.layerDefinition.geometryType=d(s,"geometrytype",""),t.featureSet.geometryType=t.layerDefinition.geometryType,t.layerDefinition.objectIdField=d(s,"objectidfieldname",""),t.layerDefinition.typeIdField=d(s,"typeidfieldname","");const y=d(s,"spatialreference");y&&(t.layerDefinition.spatialReference=ie(y));const o=[],r=d(s,"fields",null);if(!A(r))throw new c(n,m.InvalidParameter,i);for(const w of r){const D={name:d(w,"name",""),alias:d(w,"alias",""),type:d(w,"type",""),nullable:d(w,"nullable",!0),editable:d(w,"editable",!0),length:d(w,"length",null),domain:we(d(w,"domain"))};o.push(D)}t.layerDefinition.fields=o;const l={};for(const w of o)l[w.name.toLowerCase()]=w.name;let u=d(s,"features",null);if(A(u))for(const w of u){const D={},h=d(w,"attributes",{});for(const T in h)D[l[T.toLowerCase()]]=h[T];t.featureSet.features.push({attributes:D,geometry:he(d(w,"geometry",null))})}else u=null,t.featureSet.features=u}}}if(je(t)===!1)throw new c(n,m.InvalidParameter,i);return t.layerDefinition.geometryType||(t.layerDefinition.geometryType="esriGeometryNull"),Ce.create(t,n.spatialReference)})},a.signatures.push({name:"featureset",min:1,max:1}),a.functions.filter=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,2,2,n,i),A(e[0])||M(e[0])){const t=[];let s,f=e[0];if(f instanceof Ee&&(f=f.toArray()),!Ne(e[1]))throw new c(n,m.InvalidParameter,i);s=e[1].createFunction(n);for(const y of f){const o=s(y);ze(o)?await o===!0&&t.push(y):o===!0&&t.push(y)}return t}if(x(e[0])){const t=await e[0].load(),s=b.create(e[1],t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC),f=s.getVariables();if(f.length>0){const y=[];for(let r=0;r{if(E(e,2,2,n,i),x(e[0])){const t=new ve(e[1]);return new Pe({parentfeatureset:e[0],orderbyclause:t})}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"orderby",min:2,max:2}),a.functions.top=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,2,2,n,i),x(e[0]))return new Ze({parentfeatureset:e[0],topnum:e[1]});if(A(e[0]))return O(e[1])>=e[0].length?e[0].slice(0):e[0].slice(0,O(e[1]));if(M(e[0]))return O(e[1])>=e[0].length()?e[0].slice(0):e[0].slice(0,O(e[1]));throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"top",min:2,max:2}),a.functions.first=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,1,1,n,i),x(e[0])){const t=await e[0].first(p.abortSignal);if(t!==null){const s=Ae.createFromGraphicLikeObject(t.geometry,t.attributes,e[0],n.timeZone);return s._underlyingGraphic=t,s}return t}return A(e[0])?e[0].length===0?null:e[0][0]:M(e[0])?e[0].length()===0?null:e[0].get(0):null})},a.signatures.push({name:"first",min:1,max:1}),a.functions.attachments=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{E(e,1,2,n,i);const t={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(e.length>1){if(e[1]instanceof v){if(e[1].hasField("minsize")&&(t.minsize=O(e[1].field("minsize"))),e[1].hasField("metadata")&&(t.returnMetadata=k(e[1].field("metadata"))),e[1].hasField("maxsize")&&(t.maxsize=O(e[1].field("maxsize"))),e[1].hasField("types")){const s=xe(e[1].field("types"),!1);s.length>0&&(t.types=s)}}else if(e[1]!==null)throw new c(n,m.InvalidParameter,i)}if(G(e[0])){let s=e[0]._layer;return s instanceof te&&(s=ee(s,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),s===null?[]:x(s)===!1?[]:(await s.load(),s.queryAttachments(e[0].field(s.objectIdField),t.minsize,t.maxsize,t.types,t.returnMetadata))}if(e[0]===null)return[];throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"attachments",min:1,max:2}),a.functions.featuresetbyrelationshipname=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{E(e,2,4,n,i);const t=e[0],s=N(e[1]);let f=L(e[2],null);const y=k(L(e[3],!0));if(f===null&&(f=["*"]),A(f)===!1)throw new c(n,m.InvalidParameter,i);if(e[0]===null)return null;if(!G(e[0]))throw new c(n,m.InvalidParameter,i);let o=t._layer;if(o instanceof te&&(o=ee(o,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),o===null||x(o)===!1)return null;o=await o.load();const r=o.relationshipMetaData().filter(h=>h.name===s);if(r.length===0)return null;if(r[0].relationshipTableId!==void 0&&r[0].relationshipTableId!==null&&r[0].relationshipTableId>-1)return $e(o,r[0],t.field(o.objectIdField),o.spatialReference,f,y,n.lrucache,n.interceptor);let l=o.serviceUrl();if(!l)return null;l=l.charAt(l.length-1)==="/"?l+r[0].relatedTableId.toString():l+"/"+r[0].relatedTableId.toString();const u=await Re(l,o.spatialReference,f,y,n.lrucache,n.interceptor);await u.load();let w=u.relationshipMetaData();if(w=w.filter(h=>h.id===r[0].id),t.hasField(r[0].keyField)===!1||t.field(r[0].keyField)===null){const h=await o.getFeatureByObjectId(t.field(o.objectIdField),[r[0].keyField]);if(h){const T=b.create(w[0].keyField+"= @id",u.getFieldsIndex(),u.dateFieldsTimeZoneDefaultUTC);return T.parameters={id:h.attributes[r[0].keyField]},u.filter(T)}return new Oe({parentfeatureset:u})}const D=b.create(w[0].keyField+"= @id",u.getFieldsIndex(),u.dateFieldsTimeZoneDefaultUTC);return D.parameters={id:t.field(r[0].keyField)},u.filter(D)})},a.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),a.functions.featuresetbyassociation=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{E(e,2,3,n,i);const t=e[0],s=N(L(e[1],"")).toLowerCase(),f=P(e[2])?N(e[2]):null;if(e[0]===null)return null;if(!G(e[0]))throw new c(n,m.InvalidParameter,i);let y=t._layer;if(y instanceof te&&(y=ee(y,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),y===null||x(y)===!1)return null;await y.load();const o=y.serviceUrl(),r=await Ue(o,n.spatialReference);let l=null,u=null,w=!1;if(f!==null&&f!==""&&f!==void 0){for(const F of r.terminals)F.terminalName===f&&(u=F.terminalId);u===null&&(w=!0)}const D=r.associations.getFieldsIndex(),h=D.get("TOGLOBALID").name,T=D.get("FROMGLOBALID").name,V=D.get("TOTERMINALID").name,Q=D.get("FROMTERMINALID").name,H=D.get("FROMNETWORKSOURCEID").name,W=D.get("TONETWORKSOURCEID").name,R=D.get("ASSOCIATIONTYPE").name,ge=D.get("ISCONTENTVISIBLE").name,Fe=D.get("OBJECTID").name;for(const F of y.fields)if(F.type==="global-id"){l=t.field(F.name);break}let Z=null,re=new U(new j({name:"percentalong",alias:"percentalong",type:"double"}),b.create("0",r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC)),se=new U(new j({name:"side",alias:"side",type:"string"}),b.create("''",r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC));const S="globalid",le="globalId",oe={};for(const F in r.lkp)oe[F]=r.lkp[F].sourceId;const $=new Me(new j({name:"classname",alias:"classname",type:"string"}),null,oe);let g="";switch(s){case"midspan":{g=`((${h}='${l}') OR ( ${T}='${l}')) AND (${R} IN (5))`,$.codefield=b.create(`CASE WHEN (${h}='${l}') THEN ${H} ELSE ${W} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC);const F=Y(C.findField(r.associations.fields,T));F.name=S,F.alias=S,Z=new U(F,b.create(`CASE WHEN (${T}='${l}') THEN ${h} ELSE ${T} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC)),re=r.unVersion>=4?new ne(C.findField(r.associations.fields,D.get("PERCENTALONG").name)):new U(new j({name:"percentalong",alias:"percentalong",type:"double"}),b.create("0",r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC));break}case"junctionedge":{g=`((${h}='${l}') OR ( ${T}='${l}')) AND (${R} IN (4,6))`,$.codefield=b.create(`CASE WHEN (${h}='${l}') THEN ${H} ELSE ${W} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC);const F=Y(C.findField(r.associations.fields,T));F.name=S,F.alias=S,Z=new U(F,b.create(`CASE WHEN (${T}='${l}') THEN ${h} ELSE ${T} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC)),se=new U(new j({name:"side",alias:"side",type:"string"}),b.create(`CASE WHEN (${R}=4) THEN 'from' ELSE 'to' END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC));break}case"connected":{let F=`${h}='@T'`,fe=`${T}='@T'`;u!==null&&(F+=` AND ${V}=@A`,fe+=` AND ${Q}=@A`),g="(("+F+") OR ("+fe+"))",g=_(g,"@T",l??""),F=_(F,"@T",l??""),u!==null&&(F=_(F,"@A",u.toString()),g=_(g,"@A",u.toString())),$.codefield=b.create("CASE WHEN "+F+` THEN ${H} ELSE ${W} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC);const J=Y(C.findField(r.associations.fields,T));J.name=S,J.alias=S,Z=new U(J,b.create("CASE WHEN "+F+` THEN ${T} ELSE ${h} END`,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC));break}case"container":g=`${h}='${l}' AND ${R} = 2`,u!==null&&(g+=` AND ${V} = `+u.toString()),$.codefield=H,g="( "+g+" )",Z=new K(C.findField(r.associations.fields,T),S,S);break;case"content":g=`(${T}='${l}' AND ${R} = 2)`,u!==null&&(g+=` AND ${Q} = `+u.toString()),$.codefield=W,g="( "+g+" )",Z=new K(C.findField(r.associations.fields,h),S,S);break;case"structure":g=`(${h}='${l}' AND ${R} = 3)`,u!==null&&(g+=` AND ${V} = `+u.toString()),$.codefield=H,g="( "+g+" )",Z=new K(C.findField(r.associations.fields,T),S,le);break;case"attached":g=`(${T}='${l}' AND ${R} = 3)`,u!==null&&(g+=` AND ${Q} = `+u.toString()),$.codefield=W,g="( "+g+" )",Z=new K(C.findField(r.associations.fields,h),S,le);break;default:throw new c(n,m.InvalidParameter,i)}return w&&(g="1 <> 1"),new C({parentfeatureset:r.associations,adaptedFields:[new ne(C.findField(r.associations.fields,Fe)),new ne(C.findField(r.associations.fields,ge)),Z,se,$,re],extraFilter:g?b.create(g,r.associations.getFieldsIndex(),r.associations.dateFieldsTimeZoneDefaultUTC):null})})},a.signatures.push({name:"featuresetbyassociation",min:2,max:6}),a.functions.groupby=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,3,3,n,i),!x(e[0]))throw new c(n,m.InvalidParameter,i);const t=await e[0].load(),s=[],f=[];let y=!1,o=[];if(P(e[1]))o.push(e[1]);else if(e[1]instanceof v)o.push(e[1]);else if(A(e[1]))o=e[1];else{if(!M(e[1]))throw new c(n,m.InvalidParameter,i);o=e[1].toArray()}for(const r of o)if(P(r)){const l=b.create(N(r),t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC),u=ye(l)===!0?N(r):"%%%%FIELDNAME";s.push({name:u,expression:l}),u==="%%%%FIELDNAME"&&(y=!0)}else{if(!(r instanceof v))throw new c(n,m.InvalidParameter,i);{const l=r.hasField("name")?r.field("name"):"%%%%FIELDNAME",u=r.hasField("expression")?r.field("expression"):"";if(l==="%%%%FIELDNAME"&&(y=!0),!l)throw new c(n,m.InvalidParameter,i);s.push({name:l,expression:b.create(u||l,t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC)})}}if(o=[],P(e[2]))o.push(e[2]);else if(A(e[2]))o=e[2];else if(M(e[2]))o=e[2].toArray();else{if(!(e[2]instanceof v))throw new c(n,m.InvalidParameter,i);o.push(e[2])}for(const r of o){if(!(r instanceof v))throw new c(n,m.InvalidParameter,i);{const l=r.hasField("name")?r.field("name"):"",u=r.hasField("statistic")?r.field("statistic"):"",w=r.hasField("expression")?r.field("expression"):"";if(!l||!u||!w)throw new c(n,m.InvalidParameter,i);f.push({name:l,statistic:u.toLowerCase(),expression:b.create(w,t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC)})}}if(y){const r={};for(const u of t.fields)r[u.name.toLowerCase()]=1;for(const u of s)u.name!=="%%%%FIELDNAME"&&(r[u.name.toLowerCase()]=1);for(const u of f)u.name!=="%%%%FIELDNAME"&&(r[u.name.toLowerCase()]=1);let l=0;for(const u of s)if(u.name==="%%%%FIELDNAME"){for(;r["field_"+l.toString()]===1;)l++;r["field_"+l.toString()]=1,u.name="FIELD_"+l.toString()}}for(const r of s)await ae(r.expression,a,n);for(const r of f)await ae(r.expression,a,n);return e[0].groupby(s,f)})},a.signatures.push({name:"groupby",min:3,max:3}),a.functions.distinct=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(x(e[0])){E(e,2,2,n,i);const t=await e[0].load(),s=[];let f=[];if(P(e[1]))f.push(e[1]);else if(e[1]instanceof v)f.push(e[1]);else if(A(e[1]))f=e[1];else{if(!M(e[1]))throw new c(n,m.InvalidParameter,i);f=e[1].toArray()}let y=!1;for(const o of f)if(P(o)){const r=b.create(N(o),t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC),l=ye(r)===!0?N(o):"%%%%FIELDNAME";s.push({name:l,expression:r}),l==="%%%%FIELDNAME"&&(y=!0)}else{if(!(o instanceof v))throw new c(n,m.InvalidParameter,i);{const r=o.hasField("name")?o.field("name"):"%%%%FIELDNAME",l=o.hasField("expression")?o.field("expression"):"";if(r==="%%%%FIELDNAME"&&(y=!0),!r)throw new c(n,m.InvalidParameter,i);s.push({name:r,expression:b.create(l||r,t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC)})}}if(y){const o={};for(const l of t.fields)o[l.name.toLowerCase()]=1;for(const l of s)l.name!=="%%%%FIELDNAME"&&(o[l.name.toLowerCase()]=1);let r=0;for(const l of s)if(l.name==="%%%%FIELDNAME"){for(;o["field_"+r.toString()]===1;)r++;o["field_"+r.toString()]=1,l.name="FIELD_"+r.toString()}}for(const o of s)await ae(o.expression,a,n);return e[0].groupby(s,[])}return He(e)})},a.functions.getfeaturesetinfo=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,1,1,n,i),!x(e[0]))return null;const t=await e[0].getFeatureSetInfo();return t?v.convertObjectToArcadeDictionary({layerId:t.layerId,layerName:t.layerName,itemId:t.itemId,serviceLayerUrl:t.serviceLayerUrl,webMapLayerId:t.webMapLayerId??null,webMapLayerTitle:t.webMapLayerTitle??null,className:null,objectClassId:null},ue(n),!1,!1):null})},a.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),a.functions.filterbysubtypecode=function(n,i){return a.standardFunctionAsync(n,i,async(p,I,e)=>{if(E(e,2,2,n,i),x(e[0])){const t=await e[0].load(),s=e[1];if(!Se(s))throw new c(n,m.InvalidParameter,i);if(t.subtypeField){const y=b.create(`${t.subtypeField}= ${e[1]}`,t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC);return new B({parentfeatureset:e[0],whereclause:y})}if(t.typeIdField===null||t.typeIdField==="")throw new c(n,m.FeatureSetDoesNotHaveSubtypes,i);const f=b.create(`${t.typeIdField}= ${e[1]}`,t.getFieldsIndex(),t.dateFieldsTimeZoneDefaultUTC);return new B({parentfeatureset:e[0],whereclause:f})}throw new c(n,m.InvalidParameter,i)})},a.signatures.push({name:"filterbysubtypecode",min:2,max:2}))}export{yn as registerFunctions}; diff --git a/build/assets/featuresetgeom-CAjQZ5tM.js b/build/assets/featuresetgeom-CAjQZ5tM.js new file mode 100644 index 0000000..7776a23 --- /dev/null +++ b/build/assets/featuresetgeom-CAjQZ5tM.js @@ -0,0 +1 @@ +import{a1 as S,a as F,m as p,B as s,b as o,r as l}from"./arcadeUtils-BvZmzJL_.js";import{s as w}from"./TimeOnly-C2MfFEIr.js";import{u as c,f as h}from"./SpatialFilter-DCIoEGCD.js";import{dg as u}from"./index-DKOmzAMm.js";import{R as I,m as A,S as P,x as g,O as C,p as O,h as R}from"./geometryEngineAsync-BODJChyU.js";import"./number-NXsKqxkQ.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";import"./WhereClause-CILeHwR9.js";function f(r){return r instanceof u}function i(r,t,a,d){return d(r,t,async(y,e,n)=>{if(n.length<2)throw new o(r,l.WrongNumberOfParameters,t);if((n=S(n))[0]===null&&n[1]===null)return!1;if(s(n[0])){if(n[1]instanceof u)return new h({parentfeatureset:n[0],relation:a,relationGeom:n[1]});if(n[1]===null)return new c({parentfeatureset:n[0]});throw new o(r,l.InvalidParameter,t)}if(f(n[0])){if(f(n[1])){switch(a){case"esriSpatialRelEnvelopeIntersects":return R(w(n[0]),w(n[1]));case"esriSpatialRelIntersects":return R(n[0],n[1]);case"esriSpatialRelContains":return O(n[0],n[1]);case"esriSpatialRelOverlaps":return C(n[0],n[1]);case"esriSpatialRelWithin":return g(n[0],n[1]);case"esriSpatialRelTouches":return P(n[0],n[1]);case"esriSpatialRelCrosses":return A(n[0],n[1])}throw new o(r,l.InvalidParameter,t)}if(s(n[1]))return new h({parentfeatureset:n[1],relation:a,relationGeom:n[0]});if(n[1]===null)return!1;throw new o(r,l.InvalidParameter,t)}if(n[0]===null){if(s(n[1]))return new c({parentfeatureset:n[1]});if(n[1]instanceof u||n[1]===null)return!1}throw new o(r,l.InvalidParameter,t)})}function k(r){r.mode==="async"&&(r.functions.intersects=function(t,a){return i(t,a,"esriSpatialRelIntersects",r.standardFunctionAsync)},r.functions.envelopeintersects=function(t,a){return i(t,a,"esriSpatialRelEnvelopeIntersects",r.standardFunctionAsync)},r.signatures.push({name:"envelopeintersects",min:2,max:2}),r.functions.contains=function(t,a){return i(t,a,"esriSpatialRelContains",r.standardFunctionAsync)},r.functions.overlaps=function(t,a){return i(t,a,"esriSpatialRelOverlaps",r.standardFunctionAsync)},r.functions.within=function(t,a){return i(t,a,"esriSpatialRelWithin",r.standardFunctionAsync)},r.functions.touches=function(t,a){return i(t,a,"esriSpatialRelTouches",r.standardFunctionAsync)},r.functions.crosses=function(t,a){return i(t,a,"esriSpatialRelCrosses",r.standardFunctionAsync)},r.functions.relate=function(t,a){return r.standardFunctionAsync(t,a,async(d,y,e)=>{if(e=S(e),F(e,3,3,t,a),f(e[0])&&f(e[1]))return I(e[0],e[1],p(e[2]));if(e[0]instanceof u&&e[1]===null||e[1]instanceof u&&e[0]===null)return!1;if(s(e[0])&&e[1]===null)return new c({parentfeatureset:e[0]});if(s(e[1])&&e[0]===null)return new c({parentfeatureset:e[1]});if(s(e[0])&&e[1]instanceof u)return e[0].relate(e[1],p(e[2]));if(s(e[1])&&e[0]instanceof u)return e[1].relate(e[0],p(e[2]));if(e[0]===null&&e[1]===null)return!1;throw new o(t,l.InvalidParameter,a)})})}export{k as registerFunctions}; diff --git a/build/assets/featuresetstats-ByHC7qtP.js b/build/assets/featuresetstats-ByHC7qtP.js new file mode 100644 index 0000000..99c1bce --- /dev/null +++ b/build/assets/featuresetstats-ByHC7qtP.js @@ -0,0 +1 @@ +import{m as d}from"./TimeOnly-C2MfFEIr.js";import{a as p,B as f,U as m,G as h,Q as l,b as w,r as S,a0 as u,P as c,A as v}from"./arcadeUtils-BvZmzJL_.js";import{O as g,r as T}from"./WhereClause-CILeHwR9.js";import"./index-DKOmzAMm.js";import"./number-NXsKqxkQ.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function s(n,a,t,i){if(t.length===1){if(m(t[0]))return u(n,t[0],c(t[1],-1));if(l(t[0]))return u(n,t[0].toArray(),c(t[1],-1))}else if(t.length===2){if(m(t[0]))return u(n,t[0],c(t[1],-1));if(l(t[0]))return u(n,t[0].toArray(),c(t[1],-1));if(f(t[0])){const e=await t[0].load(),r=await A(g.create(t[1],e.getFieldsIndex(),e.dateFieldsTimeZoneDefaultUTC),i,a);return y(a,await t[0].calculateStatistic(n,r,c(t[2],1e3),a.abortSignal))}}else if(t.length===3&&f(t[0])){const e=await t[0].load(),r=await A(g.create(t[1],e.getFieldsIndex(),e.dateFieldsTimeZoneDefaultUTC),i,a);return y(a,await t[0].calculateStatistic(n,r,c(t[2],1e3),a.abortSignal))}return u(n,t,-1)}function y(n,a){return a instanceof T?d.fromReaderAsTimeStampOffset(a.toStorageFormat()):a instanceof Date?d.dateJSAndZoneToArcadeDate(a,v(n)):a}async function A(n,a,t){const i=n.getVariables();if(i.length>0){const e=[];for(let o=0;os("stdev",a,r,n))},n.functions.variance=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("variance",a,r,n))},n.functions.average=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("mean",a,r,n))},n.functions.mean=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("mean",a,r,n))},n.functions.sum=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("sum",a,r,n))},n.functions.min=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("min",a,r,n))},n.functions.max=function(a,t){return n.standardFunctionAsync(a,t,(i,e,r)=>s("max",a,r,n))},n.functions.count=function(a,t){return n.standardFunctionAsync(a,t,async(i,e,r)=>{if(p(r,1,1,a,t),f(r[0]))return r[0].count(i.abortSignal);if(m(r[0])||h(r[0]))return r[0].length;if(l(r[0]))return r[0].length();throw new w(a,S.InvalidParameter,t)})})}export{C as registerFunctions}; diff --git a/build/assets/featuresetstring-QnWvSAV8.js b/build/assets/featuresetstring-QnWvSAV8.js new file mode 100644 index 0000000..58cff95 --- /dev/null +++ b/build/assets/featuresetstring-QnWvSAV8.js @@ -0,0 +1 @@ +import{a as o,H as m,a2 as b,m as y,B as c,a3 as w,b as d,r as u,a4 as T,N as v,A as p,a5 as A,a6 as g,a7 as x,a8 as V,P as F,a9 as P,aa as D,ab as f}from"./arcadeUtils-BvZmzJL_.js";import"./index-DKOmzAMm.js";import"./TimeOnly-C2MfFEIr.js";import"./number-NXsKqxkQ.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";function l(t,e){return t&&t.domain?t.domain.type==="coded-value"||t.domain.type==="codedValue"?v.convertObjectToArcadeDictionary({type:"codedValue",name:t.domain.name,dataType:f[t.field.type],codedValues:t.domain.codedValues.map(a=>({name:a.name,code:a.code}))},p(e)):v.convertObjectToArcadeDictionary({type:"range",name:t.domain.name,dataType:f[t.field.type],min:t.domain.minValue,max:t.domain.maxValue},p(e)):null}function E(t){t.mode==="async"&&(t.functions.domain=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,2,3,e,a),m(n[0]))return l(b(n[0],y(n[1]),n[2]===void 0?void 0:n[2]),e);if(c(n[0]))return await n[0]._ensureLoaded(),l(w(y(n[1]),n[0],null,n[2]===void 0?void 0:n[2]),e);throw new d(e,u.InvalidParameter,a)})},t.functions.subtypes=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,1,1,e,a),m(n[0])){const r=T(n[0]);return r?v.convertObjectToArcadeDictionary(r,p(e)):null}if(c(n[0])){await n[0]._ensureLoaded();const r=n[0].subtypeMetaData();return r?v.convertObjectToArcadeDictionary(r,p(e)):null}throw new d(e,u.InvalidParameter,a)})},t.functions.domainname=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,2,4,e,a),m(n[0]))return A(n[0],y(n[1]),n[2],n[3]===void 0?void 0:n[3]);if(c(n[0])){await n[0]._ensureLoaded();const r=w(y(n[1]),n[0],null,n[3]===void 0?void 0:n[3]);return g(r,n[2])}throw new d(e,u.InvalidParameter,a)})},t.signatures.push({name:"domainname",min:2,max:4}),t.functions.domaincode=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,2,4,e,a),m(n[0]))return x(n[0],y(n[1]),n[2],n[3]===void 0?void 0:n[3]);if(c(n[0])){await n[0]._ensureLoaded();const r=w(y(n[1]),n[0],null,n[3]===void 0?void 0:n[3]);return V(r,n[2])}throw new d(e,u.InvalidParameter,a)})},t.signatures.push({name:"domaincode",min:2,max:4}),t.functions.text=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,1,2,e,a),c(n[0])){const r=F(n[1],"");if(r==="")return n[0].castToText();if(r.toLowerCase()==="schema")return n[0].convertToText("schema",i.abortSignal);if(r.toLowerCase()==="featureset")return n[0].convertToText("featureset",i.abortSignal);throw new d(e,u.InvalidParameter,a)}return P(n[0],n[1])})},t.functions.gdbversion=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,1,1,e,a),m(n[0]))return n[0].gdbVersion();if(c(n[0]))return(await n[0].load()).gdbVersion;throw new d(e,u.InvalidParameter,a)})},t.functions.schema=function(e,a){return t.standardFunctionAsync(e,a,async(i,s,n)=>{if(o(n,1,1,e,a),c(n[0]))return await n[0].load(),v.convertObjectToArcadeDictionary(n[0].schema(),p(e));if(m(n[0])){const r=D(n[0]);return r?v.convertObjectToArcadeDictionary(r,p(e)):null}throw new d(e,u.InvalidParameter,a)})})}export{E as registerFunctions}; diff --git a/build/assets/fetchRasterInfo-DWSe3scC.js b/build/assets/fetchRasterInfo-DWSe3scC.js new file mode 100644 index 0000000..d4598eb --- /dev/null +++ b/build/assets/fetchRasterInfo-DWSe3scC.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/symbolLayerUtils-9rptnLxz.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css"])))=>i.map(i=>d[i]); +import{a_ as Ie,iW as It,gR as I,B as s,D as l,gS as je,a$ as W,iX as ft,hI as Kt,E as j,F as N,ey as P,iY as At,aS as U,iZ as bt,$ as A,d2 as fe,dk as Qt,x as Dt,i_ as vt,i$ as Xt,hR as Yt,_ as qt,j0 as Ge,j1 as St,Q as J,a8 as ei,cC as ti,cA as ii,j2 as ni,j3 as ai,eU as Ae,cB as Ne,j4 as st,eT as Fe,c8 as ri,j5 as Q,hH as ne,d7 as oi,iv as ye,V as he,dh as jt,dg as si,aZ as xe,aX as li,di as ci,s as T,O as ui,j6 as Nt,j7 as lt,cD as ct,cg as di,j8 as pi,dG as mi,aH as gi,U as F,ay as Mi,da as yi}from"./index-DKOmzAMm.js";import{t as Tt,v as me,w as hi,x as H,y as wi,f as Ii,z as fi,g as Z,A as Ai,C as $e,G as Ct,H as Lt,I as bi,J as Di,K as vi,n as Si,c as ji}from"./dataUtils-DYQC_Kql.js";import{R as Ni}from"./normalizeUtils-DIcj7CYy.js";import"./ClassBreaksDefinition-yZL3mlhg.js";import{f as Ti,s as Ci,i as Li}from"./utils-CF4bGKhW.js";var Be;const ce=new Ie({flow_from:"flow-from",flow_to:"flow-to"});let D=Be=class extends It(N){constructor(e){super(e),this.density=.8,this.color=new I([255,255,255,1]),this.maxPathLength=200,this.trailWidth=1.5,this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}clone(){var b,g;const{density:e,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:a,smoothing:r,flowRepresentation:o,trailCap:u,background:d}=this,c=this.color.clone(),p=(this.visualVariables||[]).map(M=>M.clone()),m=(b=this.authoringInfo)==null?void 0:b.clone(),f=(g=this.legendOptions)==null?void 0:g.clone();return new Be({density:e,color:c,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:a,trailCap:u,background:d,smoothing:r,flowRepresentation:o,visualVariables:p,authoringInfo:m,legendOptions:f})}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}};s([l({type:Number,json:{write:!0}})],D.prototype,"density",void 0),s([l({type:I,json:{write:{allowNull:!0}}})],D.prototype,"color",void 0),s([l({type:Number,cast:je,json:{write:!0}})],D.prototype,"maxPathLength",void 0),s([l({type:Number,cast:je,json:{write:!0}})],D.prototype,"trailWidth",void 0),s([l({type:Number,json:{write:!0}})],D.prototype,"flowSpeed",void 0),s([l({type:Number,json:{write:!0}})],D.prototype,"trailLength",void 0),s([l({type:Number,cast:je,json:{write:!1}})],D.prototype,"smoothing",void 0),s([l({type:ce.apiValues,json:{type:ce.jsonValues,read:{reader:ce.read},write:{writer:ce.write}}})],D.prototype,"flowRepresentation",void 0),s([W({flowRenderer:"flow"})],D.prototype,"type",void 0),s([l({type:ft,json:{write:!0}})],D.prototype,"authoringInfo",void 0),s([l({type:Kt,json:{write:!0}})],D.prototype,"legendOptions",void 0),s([l({type:String,json:{write:!0}})],D.prototype,"trailCap",void 0),s([l({type:String,json:{write:!0}})],D.prototype,"background",void 0),D=Be=s([j("esri.renderers.FlowRenderer")],D);const xt=D;let $=class extends N{constructor(){super(...arguments),this.value=null,this.label=null,this.color=null}};s([l({type:Number,json:{write:!0}})],$.prototype,"value",void 0),s([l({type:String,json:{write:!0}})],$.prototype,"label",void 0),s([l({type:I,json:{type:[P],write:!0}})],$.prototype,"color",void 0),$=s([j("esri.renderers.support.ColormapInfo")],$);const Bt=$;var X;let Y=X=class extends N{constructor(e){super(e),this.colormapInfos=null,this.type="raster-colormap"}static createFromColormap(e,t){if(!e)return null;const i=e[0].length===5,n=[...e].sort((a,r)=>a[0]-r[0]).map(a=>Bt.fromJSON({value:a[0],color:i?a.slice(1,5):a.slice(1,4).concat([255]),label:t?t[a[0]]??"":a[0]}));return new X({colormapInfos:n})}static createFromColorramp(e){const t=Tt(e);return X.createFromColormap(t)}clone(){return new X({colormapInfos:this.colormapInfos.map(e=>e.toJSON())})}extractColormap(){return this.colormapInfos.map(({value:e,color:t})=>[e,t.r,t.g,t.b,t.a>1?t.a:255*t.a&255]).sort((e,t)=>e[0]-t[0])}};s([l({type:[Bt],json:{write:!0}})],Y.prototype,"colormapInfos",void 0),s([W({rasterColormap:"raster-colormap"})],Y.prototype,"type",void 0),Y=X=s([j("esri.renderers.RasterColormapRenderer")],Y);const Je=Y;var ze;let L=ze=class extends N{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.colorRamp=null,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.scalingType="none",this.type="raster-shaded-relief",this.zFactor=1}readColorRamp(e){return bt(e)}clone(){return new ze({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,scalingType:this.scalingType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,colorRamp:A(this.colorRamp)})}};s([l({type:Number,json:{write:!0}})],L.prototype,"altitude",void 0),s([l({type:Number,json:{write:!0}})],L.prototype,"azimuth",void 0),s([l({types:At,json:{write:!0}})],L.prototype,"colorRamp",void 0),s([U("colorRamp")],L.prototype,"readColorRamp",null),s([l({type:["traditional","multi-directional"],json:{write:!0}})],L.prototype,"hillshadeType",void 0),s([l({type:Number,json:{write:!0}})],L.prototype,"pixelSizePower",void 0),s([l({type:Number,json:{write:!0}})],L.prototype,"pixelSizeFactor",void 0),s([l({type:["none","adjusted"],json:{write:!0}})],L.prototype,"scalingType",void 0),s([W({rasterShadedRelief:"raster-shaded-relief"})],L.prototype,"type",void 0),s([l({type:Number,json:{write:!0}})],L.prototype,"zFactor",void 0),L=ze=s([j("esri.renderers.RasterShadedReliefRenderer")],L);const zt=L;var Ue;let y=Ue=class extends N{constructor(e){super(e),this.colorRamp=null,this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.maxPercent=null,this.minPercent=null,this.numberOfStandardDeviations=null,this.outputMax=null,this.outputMin=null,this.sigmoidStrengthLevel=null,this.statistics=[],this.histograms=null,this.useGamma=!1,this.stretchType="none",this.type="raster-stretch"}readColorRamp(e){if(e)return bt(e)}writeStatistics(e,t,i){e!=null&&e.length&&(Array.isArray(e[0])||(e=e.map(n=>[n.min,n.max,n.avg,n.stddev])),t[i]=e)}readStretchType(e,t){let i=t.stretchType;return typeof i=="number"&&(i=hi[i]),me.read(i)}clone(){return new Ue({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:A(this.statistics),gamma:A(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,colorRamp:A(this.colorRamp),histograms:A(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment})}};s([l({types:At,json:{write:!0}})],y.prototype,"colorRamp",void 0),s([U("colorRamp")],y.prototype,"readColorRamp",null),s([l({type:Boolean,json:{write:!0}})],y.prototype,"computeGamma",void 0),s([l({type:Boolean,json:{write:{target:"dra"},read:{source:"dra"}}})],y.prototype,"dynamicRangeAdjustment",void 0),s([l({type:[Number],json:{write:!0}})],y.prototype,"gamma",void 0),s([l({type:Number,json:{write:!0}})],y.prototype,"maxPercent",void 0),s([l({type:Number,json:{write:!0}})],y.prototype,"minPercent",void 0),s([l({type:Number,json:{write:!0}})],y.prototype,"numberOfStandardDeviations",void 0),s([l({type:Number,json:{read:{source:"max"},write:{target:"max"}}})],y.prototype,"outputMax",void 0),s([l({type:Number,json:{read:{source:"min"},write:{target:"min"}}})],y.prototype,"outputMin",void 0),s([l({type:Number,json:{write:!0}})],y.prototype,"sigmoidStrengthLevel",void 0),s([l({json:{type:[[Number]],write:!0}})],y.prototype,"statistics",void 0),s([l()],y.prototype,"histograms",void 0),s([fe("statistics")],y.prototype,"writeStatistics",null),s([l({type:Boolean,json:{write:!0}})],y.prototype,"useGamma",void 0),s([l({type:me.apiValues,json:{type:me.jsonValues,write:me.write}})],y.prototype,"stretchType",void 0),s([U("stretchType",["stretchType"])],y.prototype,"readStretchType",null),s([W({rasterStretch:"raster-stretch"})],y.prototype,"type",void 0),y=Ue=s([j("esri.renderers.RasterStretchRenderer")],y);const We=y;new Qt(1e3);new I([128,128,128]);new I("white");async function xi(e,t){const i=e.symbolLayers;i&&await Xt(i,async n=>Bi(n,t))}async function Bi(e,t){switch(e.type){case"extrude":Ui(e,t);break;case"icon":case"line":case"text":zi(e,t);break;case"path":Ri(e,t);break;case"object":await ki(e,t)}}function zi(e,t){const i=Ut(t);i!=null&&(e.size=i)}function Ut(e){for(const t of e)if(typeof t=="number")return t;return null}function Ui(e,t){e.size=typeof t[2]=="number"?t[2]:0}async function ki(e,t){const{resourceSize:i,symbolSize:n}=await Hi(e),a=kt(t,i,n);e.width=q(t[0],n[0],i[0],a),e.depth=q(t[1],n[1],i[1],a),e.height=q(t[2],n[2],i[2],a)}function Ri(e,t){const i=kt(t,Yt,[e.width,void 0,e.height]);e.width=q(t[0],e.width,1,i),e.height=q(t[2],e.height,1,i)}function kt(e,t,i){for(let n=0;n<3;n++){const a=e[n];switch(a){case"symbol-value":{const r=i[n];return r!=null?r/t[n]:1}case"proportional":break;default:if(a&&t[n])return a/t[n]}}return 1}async function Hi(e){const{computeObjectLayerResourceSize:t}=await qt(()=>import("./symbolLayerUtils-9rptnLxz.js"),__vite__mapDeps([0,1,2])),i=await t(e,10),{width:n,height:a,depth:r}=e,o=[n,r,a];let u=1;for(let d=0;d<3;d++){const c=o[d];if(c!=null){u=c/i[d];break}}for(let d=0;d<3;d++)o[d]==null&&(o[d]=i[d]*u);return{resourceSize:i,symbolSize:o}}function q(e,t,i,n){switch(e){case"proportional":return i*n;case"symbol-value":return t??i;default:return e}}function Zi(e,t){const i=Ut(t);if(i!=null)switch(e.type){case"simple-marker":e.size=i;break;case"picture-marker":{const n=e.width/e.height;n>1?(e.width=i,e.height=i*n):(e.width=i*n,e.height=i);break}case"simple-line":e.width=i;break;case"text":e.font.size=i}}async function Ei(e,t){if(e&&t)return Dt(e)?xi(e,t):void(vt(e)&&Zi(e,t))}function Pi(e,t,i){if(e&&t!=null)if(Dt(e)){const n=e.symbolLayers;n&&n.forEach(a=>{if(a&&a.type==="object")switch(i){case"tilt":a.tilt=(a.tilt??0)+t;break;case"roll":a.roll=(a.roll??0)+t;break;default:a.heading=(a.heading??0)+t}})}else vt(e)&&(e.type!=="simple-marker"&&e.type!=="picture-marker"&&e.type!=="text"||(e.angle+=t))}var ke;const ut=new Set(["esriMetersPerSecond","esriKilometersPerHour","esriKnots","esriFeetPerSecond","esriMilesPerHour"]),ue=new Ie({beaufort_ft:"beaufort-ft",beaufort_km:"beaufort-km",beaufort_kn:"beaufort-kn",beaufort_m:"beaufort-m",beaufort_mi:"beaufort-mi",classified_arrow:"classified-arrow",ocean_current_kn:"ocean-current-kn",ocean_current_m:"ocean-current-m",simple_scalar:"simple-scalar",single_arrow:"single-arrow",wind_speed:"wind-barb"}),de=new Ie({flow_from:"flow-from",flow_to:"flow-to"});let v=ke=class extends It(N){constructor(e){super(e),this.attributeField="Magnitude",this.flowRepresentation="flow-from",this.rotationType="arithmetic",this.style="single-arrow",this.symbolTileSize=50,this.type="vector-field"}readInputUnit(e,t){return ut.has(e)?H.fromJSON(e):null}readOutputUnit(e,t){return ut.has(e)?H.fromJSON(e):null}get styleRenderer(){const e=this.style,t=this.attributeField,i=this._createStyleRenderer(e);return i.field=t,i}get sizeVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)t.type==="size"&&e.push(t);if(e.length===0){const t=new Ge({field:"Magnitude",minSize:.2*this.symbolTileSize,maxSize:.8*this.symbolTileSize});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}get rotationVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)t.type==="rotation"&&e.push(t);if(e.length===0){const t=new St({field:"Direction",rotationType:this.rotationType});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}clone(){return new ke({attributeField:this.attributeField,flowRepresentation:this.flowRepresentation,rotationType:this.rotationType,symbolTileSize:this.symbolTileSize,style:this.style,visualVariables:A(this.visualVariables),inputUnit:this.inputUnit,outputUnit:this.outputUnit})}async getGraphicsFromPixelData(e,t=!1,i=[]){var f;const n=new Array,a=wi(this.inputUnit,this.outputUnit),r=((f=this.rotationVariables[0])==null?void 0:f.rotationType)||this.rotationType,o=t?Ii(e.pixelBlock,"vector-uv",r,a):fi(e.pixelBlock,"vector-magdir",a);if(o==null)return n;const u=e.extent,d=o.mask!=null&&o.mask.length>0;let c=0;const p=(u.xmax-u.xmin)/o.width,m=(u.ymax-u.ymin)/o.height;for(let b=0;bB.intersects(M));if((!d||o.mask[c])&&!k){const B={Magnitude:o.pixels[0][c],Direction:o.pixels[1][c]},z=new ei({geometry:new J({x:M.x,y:M.y,spatialReference:u.spatialReference}),attributes:B});z.symbol=this._getVisualVariablesAppliedSymbol(z),n.push(z)}}return n}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getClassBreakInfos(){var e;return(e=this.styleRenderer)==null?void 0:e.classBreakInfos}getDefaultSymbol(){var e;return(e=this.styleRenderer)==null?void 0:e.defaultSymbol}_getDefaultSymbol(e){return new ti({path:"M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z",outline:new ii({width:0}),size:20,color:e||new I([0,92,230])})}_getVisualVariablesAppliedSymbol(e){var a,r;if(!e)return;const t=(r=(a=this.styleRenderer)==null?void 0:a.getSymbol(e))==null?void 0:r.clone(),i=this.sizeVariables,n=this.rotationVariables;if(i&&i.length&&this.sizeVariables.forEach(o=>Ei(t,ni([o],e))),n&&n.length){const o=this.flowRepresentation==="flow-to"==(this.style==="ocean-current-kn"||this.style==="ocean-current-m")?0:180;e.attributes.Direction=e.attributes.Direction+o,this.rotationVariables.forEach(u=>Pi(t,ai(u,e),u.axis))}return t}_createStyleRenderer(e){let t={defaultSymbol:this._getDefaultSymbol(),classBreakInfos:[]};switch(e){case"single-arrow":t=this._createSingleArrowRenderer();break;case"beaufort-kn":t=this._createBeaufortKnotsRenderer();break;case"beaufort-m":t=this._createBeaufortMeterRenderer();break;case"beaufort-ft":t=this._createBeaufortFeetRenderer();break;case"beaufort-mi":t=this._createBeaufortMilesRenderer();break;case"beaufort-km":t=this._createBeaufortKilometersRenderer();break;case"ocean-current-m":t=this._createCurrentMeterRenderer();break;case"ocean-current-kn":t=this._createCurrentKnotsRenderer();break;case"simple-scalar":t=this._createSimpleScalarRenderer();break;case"wind-barb":t=this._createWindBarbsRenderer();break;case"classified-arrow":t=this._createClassifiedArrowRenderer()}return new Ae(t)}_createSingleArrowRenderer(){return{defaultSymbol:this._getDefaultSymbol()}}_createBeaufortKnotsRenderer(){const e=[0,1,3,6,10,16,21,27,33,40,47,55,63],t=[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]];return{defaultSymbol:this._getDefaultSymbol(new I([214,47,39])),classBreakInfos:this._getClassBreaks(e,t)}}_createBeaufortMeterRenderer(){const e=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],t=[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]];return{defaultSymbol:this._getDefaultSymbol(new I([214,47,39])),classBreakInfos:this._getClassBreaks(e,t)}}_createBeaufortFeetRenderer(){const e=this._getDefaultSymbol(new I([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];const i=[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]],n=3.28084;return t=t.map(a=>a*n),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,i)}}_createBeaufortMilesRenderer(){const e=this._getDefaultSymbol(new I([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];const i=[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]],n=2.23694;return t=t.map(a=>a*n),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,i)}}_createBeaufortKilometersRenderer(){const e=this._getDefaultSymbol(new I([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];const i=[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]],n=3.6;return t=t.map(a=>a*n),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,i)}}_createCurrentMeterRenderer(){const e=[0,.5,1,1.5,2],t=[[78,26,153],[179,27,26],[202,128,26],[177,177,177]];return{defaultSymbol:this._getDefaultSymbol(new I([177,177,177])),classBreakInfos:this._getClassBreaks(e,t)}}_createCurrentKnotsRenderer(){const e=[0,.25,.5,1,1.5,2,2.5,3,3.5,4],t=[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]];return{defaultSymbol:this._getDefaultSymbol(new I([177,177,177])),classBreakInfos:this._getClassBreaks(e,t)}}_createClassifiedArrowRenderer(){var n;const e=this._getDefaultSymbol(new I([56,168,0]));let t=[0,1e-6,3.5,7,10.5,14];if((n=this.sizeVariables)!=null&&n.length){const a=this.sizeVariables[0].minDataValue,r=this.sizeVariables[0].maxDataValue;if(a&&r){const o=(r-a)/5;t=Array.from(Array(6).keys()).map(u=>a+o*u)}}const i=[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]];return{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,i)}}_createSimpleScalarRenderer(){return{defaultSymbol:Ne.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAQAAABLVLlLAAAABGdBTUEAAYagMeiWXwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAABIAAAASABGyWs+AAAC3ElEQVRIx9XXvW4cVRQH8N982btpsIREJECyiCXsxX4DKh6AliqGKCBBE2SlwlHgAbBD/AKmyEYUeQ1KahPZSZQvBCkQLTHZ7KGY8Xodz4w3a1NwbzVzz/znfJ//zbStVC5q3icKak9GAs2QIdDx3PtW/S011NW3p+M5Eomh11ipTIKe6+4LQzHaQ+G+63pIZNJJQXMpljwTwj1brpgx5w1zZlyx5Z4QnllEIm2xeeSUHBf0hV0bejo1Uh09G3aFvgXk7cCJFBc9EdaRVuHJJaOdKyTV2TVhYLMduNR0Q9gxL5GaaTDw8GzejrDRBpxWoGsySRW0dttKuattwNkIlFw2YXgzOdYq4Ox49PlM+JrKd5OusjTWhBuVxUfMX/KXXZ3WEmkuqa67wspR4BTbwtKr/5u4fFgStse/T7EifFPnnYl9zPq4vmUOPrRndgoHjDti1gOPqlyXoifcRNGQzUd31lDyfHmob1Gp35vSr+P6vilcQ5Egtyd8YF/ySg9NhPM+9M/IOaHwp5+PSZayXTvCogEUwlatC3J8LLwYtcWB8EuDXQVuCkV5/B4eNHb7wGBs87LBDS+xjdVSn09wq1G8dFM+9tSUhIGneLvUdniKxKpTYljCpu3j7rVWlHj/P23v4NPGUEyeCQnexe9lJjzEQqMjJs+EzNAX6B98dBZVRmroJx95x/A/6gln18EyfCUsl+qdXb/tjvfbw+mwforpUOBz4XLVoBwAn3aWnfeH246NyBXhrq7TTN5lNSP9RkU+puUJm3W2Tsdq0nZWM07srk7MwQrZSRysjjGWBLRJNsNbfj2JMR4AbxpU1XLAb9Mxfpsq5EjMuuiR8L0JiHOOBX3hiUvOmavN0nMueSzcceFk0BK4pMqLo7vDD1Z0qrtDx7Itt4Xwm9UqbMmk8S0Dtuzb2pvOU99Z1nLTOfleNmvfZfP2pYZmPfajwosKdDBNpacNpVGGsWX9CyDI8Xq/Sj6QAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE0LTExLTEwVDAzOjE3OjU4LTA1OjAwF+tHyQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNC0xMS0xMFQwMzoxNzo1OC0wNTowMGa2/3UAAAAASUVORK5CYII=",height:20,width:20,type:"esriPMS",angle:0})}}_createWindBarbsRenderer(){const e=Array.from(Array(31).keys()).map(a=>5*a),t=[{range:"0-5",path:"M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTIwIDIwIE01IDIwIEExNSAxNSAwIDEgMCAzNSAyMCBBMTUgMTUgMCAxIDAgNSAyMCBNMjAgMjAgTTEwIDIwIEExMCAxMCAwIDEgMCAzMCAyMCBBMTAgMTAgMCAxIDAgMTAgMjAiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"5-10",path:"M25 0 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"10-15",path:"M25 0 L25 40 L10 45 L25 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"15-20",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjEyIDAgMTUgNDUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"20-25",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"25-30",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIEwyNSAzNSBNMjUgMzAgTDE3LjUgMzIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"30-35",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"35-40",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"40-45",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"45-50",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"50-55",path:"M25 0 L25 40 L10 40 L25 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"55-60",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxNy41IDMyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"60-65",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"65-70",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"70-75",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"75-80",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"80-85",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"85-90",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxNy41IDE3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"90-95",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"95-100",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCBMMjUgMTUgTTI1IDEwIEwxNy41IDEyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"100-105",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"105-110",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDE3LjUgMjcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"110-115",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"115-120",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDE3LjUgMjIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"120-125",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"125-130",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDE3LjUgMTcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"130-135",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"135-140",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDE3LjUgMTIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"140-145",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"145-150",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IE0yNSAxMCBNMjUgNSBMMTcuNSA3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="}],i=Ne.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACgAAAApCAQAAADtq6NDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEY0lEQVRIx5XXWWxWRRQH8N+d+31tUdGAVjGglYJABFEBY91jfDAg7piYaFTccA++uMQEFRcSXlATtxiXqMQt4G4iisYl0ai4sIQYtVFZ1KIFKdTS0l4f7vRCS5fPebozc+bM/2z/Mzcx0AgSiUxXnKfIdMn875FIhX53U2n/B/s+kKM4UINTjTBZImixxnrv+9a2iL6zEoUBXcoudrWj/OtHm3wt02lfU9Qao9OnHvIhgmww84MEl1qnxfNmGrqHxAizLdPpC6chGcAxKGGcL+30gOERf1BSpUqVslQSV8d5ReZFe8VQ9avufJn31cWwlJV7iafKStGOE/1qvfH9qUxxu8ydUdmuSKbGO8YUdT2inKLG69pM70tliktl5qIkCAJGmusDG7Vqsc0WjZa4UBlBiA5YZIcjYzB7qDtH5kaUJFLs7RGZTZ42W4PRRmtwvbdt1+wGiaS4drEtDttdZYIDNVuAclR3vA3+dI3qHqmVSy7U6Tv1MScCPvPR7nIpFlsdCy3FdTLPGhK92e2CUITjMJ9ocwKxnsZqc3O3JwMma3d6UVLnyVxB4aXemZqvPqLdpJhW3KVVbY4yYImPo6M5Urv50fj+0z/FG9YaEiENs8UtMfXUaTeTePNHlhXfA1UU+2lyD1Il3Gtt9+adfpNG7dNlpg2U/T3KYLZ2dUWFdTgp3/rQ4sK973qnInV5TIf40x3dhvrJPBiqyWUo4wAtLqhQYS71qK+QKOFRywmGK/kpikzV6WMKhh58vGWs4TIJNjiEYLIuP8Tt4/zmLyqk+AyrJSbF+Qq1DgqRUPMxyl+9q3IQhX/rMCJ6tEunriDs1oSyQZKlr9AkhT2ZIARbJfaJS1vtVbHB+Rgi0RK/y1q1BWsEEyLoz40xtGKcARPVWB1BTPO7f4LNtpkUl1aoMbViLyZo0GRjPD3BxnxjqXeLYlvhqYrzMMG3HoyJXa3JjfnGlbYYFlP7Jh3qKsKY4hQ7TY0nG+xwRL61n63mxHtqNHosigyMLmClNwvuecFnOZB88nNBDzNkzhxEZaKMBVoKapggMzvHHXBEpNSSFAvtcFRsVn0bW8LlMmcXs+c0Kne3gRR32+zg4uXwjC6zit6Wt4a8LXVfcp/MtQXHn2ynGbuCmb8GvvFeJLEE82ReU9/n6+dkq2x3buG9Wn94smcgAw631RPR7BTH+kbmHReZoEpOdEe7zWqZl40s0JWs9Hmv7hjBHqPDwsjGKVJnWWqjbdZp1KhJi0aPmxYZsIRhlttgeF+Jlke41QcOQKoqilSb6HJzSvNG3G/UoWnxwsmt+sVaYwd63dRbqdnMyCPVeyRPvpYgdavM22oGKoMUVRbJfOWMwidJ8Zzb1UvmWK/VVUXzHaTjjrVYh1897HT7xxYEVUaa5SWb/WO+YUWa9SrwvigzM8YlzlYv2GSdVCYxxlBtVnnFq5olwp5/BEk/OLsf5LUmG2+inRJdVvjZ97ZH9/zP34ug1O91pf4p+D+JYBpvrKxfbwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNC0xMS0xMFQwMzoxMjowOS0wNTowMB9ViV0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTQtMTEtMTBUMDM6MTI6MDktMDU6MDBuCDHhAAAAAElFTkSuQmCC",height:20,width:20,type:"esriPMS",angle:0}),n=e.map((a,r)=>{let o;if(r!==e.length-1)if(r===0)o={minValue:a,maxValue:e[r+1],symbol:i};else{const u=Ne.fromJSON({type:"esriPMS",imageData:t[r].imageData,contentType:"image/svg+xml",height:32,width:32,angle:0});o={minValue:a,maxValue:e[r+1],symbol:u}}return new st(o)});return{defaultSymbol:i,classBreakInfos:n}}_getClassBreaks(e,t){return t.map((i,n)=>new st({minValue:e[n],maxValue:e[n+1],symbol:this._getDefaultSymbol(new I(i))}))}};s([l({type:["Magnitude"],json:{write:!0}})],v.prototype,"attributeField",void 0),s([l({type:de.apiValues,json:{type:de.jsonValues,read:{reader:de.read},write:{writer:de.write}}})],v.prototype,"flowRepresentation",void 0),s([l({type:["geographic","arithmetic"],json:{write:!0}})],v.prototype,"rotationType",void 0),s([l({type:ue.apiValues,json:{type:ue.jsonValues,read:{reader:ue.read},write:{writer:ue.write}}})],v.prototype,"style",void 0),s([l({json:{write:!0}})],v.prototype,"symbolTileSize",void 0),s([l({type:H.apiValues,json:{type:H.jsonValues,write:{writer:H.write}}})],v.prototype,"inputUnit",void 0),s([U("inputUnit")],v.prototype,"readInputUnit",null),s([l({type:H.apiValues,json:{type:H.jsonValues,read:{reader:H.read},write:{writer:H.write}}})],v.prototype,"outputUnit",void 0),s([U("outputUnit")],v.prototype,"readOutputUnit",null),s([W({vectorField:"vector-field"})],v.prototype,"type",void 0),s([l({type:Ae})],v.prototype,"styleRenderer",null),s([l({type:Ge})],v.prototype,"sizeVariables",null),s([l({type:St})],v.prototype,"rotationVariables",null),v=ke=s([j("esri.renderers.VectorFieldRenderer")],v);const _e=v,dt={key:"type",base:null,typeMap:{"unique-value":Fe,"class-breaks":Ae,"raster-colormap":Je,"raster-stretch":We,"vector-field":_e,"raster-shaded-relief":zt,flow:xt}},pt={...dt,typeMap:{...dt.typeMap}};delete pt.typeMap["vector-field"],delete pt.typeMap.flow;const Oi={uniqueValue:Fe,classBreaks:Ae,rasterStretch:We,rasterColormap:Je,vectorField:_e,rasterShadedRelief:zt,flowRenderer:xt};function Vi(e){return e&&Oi[e.type]||null}function fn(e,t){if(!e)return null;if(e.type==="classBreaks"&&e.classificationMethod){const n=e.authoringInfo||{classificationMethod:""};n.classificationMethod=e.classificationMethod,e.authoringInfo=n}e.type==="vectorField"&&e.visualVariables&&!Array.isArray(e.visualVariables)&&(e.visualVariables=[e.visualVariables]);const i=Vi(e);if(i){const n=new i;return n.read(e,t),n}return t!=null&&t.messages&&e&&t.messages.push(new ri("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:t})),null}var Re;let O=Re=class extends N{constructor(e){super(e),this.variableName=null,this.dimensionName=null,this.values=[],this.isSlice=!1}clone(){return new Re({variableName:this.variableName,dimensionName:this.dimensionName,values:A(this.values),isSlice:this.isSlice})}};s([l({type:String,json:{write:!0}})],O.prototype,"variableName",void 0),s([l({type:String,json:{write:!0}})],O.prototype,"dimensionName",void 0),s([l({type:Q.array(Q.oneOf([Q.native(Number),Q.array(Q.native(Number))])),json:{write:!0}})],O.prototype,"values",void 0),s([l({type:Boolean,json:{write:!0}})],O.prototype,"isSlice",void 0),O=Re=s([j("esri.layers.support.DimensionalDefinition")],O);const ie=O,An=ne()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),bn=ne()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),Te=ne()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"});let E=class extends N{constructor(){super(...arguments),this.pixelType="unknown"}};s([l({type:String,json:{write:!0}})],E.prototype,"name",void 0),s([l({type:String,json:{write:!0}})],E.prototype,"description",void 0),s([l({type:P,json:{type:P,write:!0,name:"_object_id"}})],E.prototype,"id",void 0),s([l({type:String,json:{type:Te.jsonValues,read:Te.read,write:Te.write}})],E.prototype,"pixelType",void 0),s([l({type:String,json:{write:!0}})],E.prototype,"type",void 0),E=s([j("esri.layers.support.RasterFunctionInfo")],E);const Gi=E;let R=class extends N{constructor(){super(...arguments),this.isDataset=!1,this.isPublic=!1,this.type="RasterFunctionVariable"}};s([l({type:String,json:{write:!0}})],R.prototype,"name",void 0),s([l({type:Number,json:{type:P,write:!0,name:"_object_id"}})],R.prototype,"id",void 0),s([l({type:Boolean,json:{write:!0}})],R.prototype,"isDataset",void 0),s([l({type:Boolean,json:{write:!0}})],R.prototype,"isPublic",void 0),s([l({json:{write:!0}})],R.prototype,"value",void 0),s([l({type:String,json:{write:!0}})],R.prototype,"type",void 0),R=s([j("esri.layers.support.RasterFunctionVariable")],R);const Fi=R,pe={key:"type",base:null,typeMap:{RasterFunctionVariable:Fi}};let V=class extends N{};s([l({types:pe,json:{types:pe,name:"MatchVariable"}})],V.prototype,"matchVariable",void 0),s([l({types:pe,json:{types:pe,name:"UnionDimension"}})],V.prototype,"unionDimension",void 0),s([l({type:Number,json:{type:P,write:!0,name:"_object_id"}})],V.prototype,"id",void 0),s([l({type:String,json:{write:!0}})],V.prototype,"type",void 0),V=s([j("esri.layers.support.RasterFunctionProperties")],V);const $i=V,Ce=new Ie({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let w=class extends N{constructor(){super(...arguments),this.functionType="mosaic",this.type="RasterFunctionTemplate"}};s([l({type:[String],json:{write:!0}})],w.prototype,"aliases",void 0),s([l({type:Object,json:{write:!0}})],w.prototype,"arguments",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"description",void 0),s([l({type:Gi,json:{write:!0,name:"function"}})],w.prototype,"functionInfo",void 0),s([l({type:Ce.apiValues,json:{type:[0,1,2],read:Ce.read,write:Ce.write}})],w.prototype,"functionType",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"group",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"help",void 0),s([l({type:Number,json:{type:P,write:!0,name:"_object_id"}})],w.prototype,"id",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"name",void 0),s([l({type:String,json:{write:!0,name:"definition"}})],w.prototype,"queryDefinition",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"tag",void 0),s([l({type:$i,json:{write:!0}})],w.prototype,"properties",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"thumbnail",void 0),s([l({type:String,json:{write:!0}})],w.prototype,"thumbnailEx",void 0),s([l({json:{type:["RasterFunctionTemplate"],write:!0}})],w.prototype,"type",void 0),w=s([j("esri.layers.support.RasterFunctionTemplate")],w);const Rt=w;var He;const ge=new Set(["raster","raster2","dem","fillraster"]),Me=new Set(["rasters"]),mt=e=>e!=null&&e.rasterFunction?S.fromJSON(e):e,Le=e=>e&&e instanceof S?e.toJSON():e,Ze=e=>(e==null?void 0:e.functionName)&&!e.declaredClass,gt=e=>Ze(e)?new S(e):e,Ji=e=>{if(e==null)return null;e=A(e);const t={};for(const i of Object.keys(e))ge.has(i.toLowerCase())?t[i]=mt(e[i]):Me.has(i.toLowerCase())&&Array.isArray(e[i])?t[i]=e[i].map(mt):t[i]=e[i];return t},Wi={types:{key:"type",base:null,typeMap:{RasterFunctionTemplate:Rt}},json:{write:!0,name:"rasterFunctionDefinition"}};let S=He=class extends N{constructor(e){super(e),this.functionName=null,this.outputPixelType="unknown",this.variableName=null,this.functionDefinition=null}set functionArguments(e){if(e){const t=Object.keys(e);if(t.some(i=>ge.has(i.toLowerCase())&&Ze(e[i]))||t.some(i=>Me.has(i.toLowerCase())&&Array.isArray(e[i])&&e[i].some(n=>Ze(n)))){e=A(e);for(const i of t)ge.has(i.toLowerCase())?e[i]=gt(e[i]):Me.has(i.toLowerCase())&&Array.isArray(e[i])&&(e[i]=e[i].map(n=>gt(n)))}}this._set("functionArguments",e)}readFunctionArguments(e){return Ji(e)}writeFunctionArguments(e,t,i){const n={};for(const a of Object.keys(e))ge.has(a.toLowerCase())?n[a]=Le(e[a]):Me.has(a.toLowerCase())&&Array.isArray(e[a])?n[a]=e[a].map(Le):n[a]=Le(e[a]);t[i]=n}readFunctionName(e,t){const i=t.rasterFunctionInfos;return t.name||(i!=null&&i.length&&i[0].name!=="None"?i[0].name:t.rasterFunctionDefinition?t.rasterFunctionDefinition.name:t.rasterFunction)}get rasterFunctionDefinition(){var e;return(e=this.functionDefinition)==null?void 0:e.toJSON()}set rasterFunctionDefinition(e){this.functionDefinition=e?Rt.fromJSON(e):null}get hasClipFunction(){return this.rasterFunctionDefinition?JSON.stringify(this.rasterFunctionDefinition).includes('"type":"ClipFunction"'):JSON.stringify(this).includes('"rasterFunction":"Clip"')}clone(){return new He({functionName:this.functionName,functionArguments:A(this.functionArguments),outputPixelType:this.outputPixelType,variableName:this.variableName,rasterFunctionDefinition:A(this.rasterFunctionDefinition)})}};s([l({json:{type:Object,name:"rasterFunctionArguments"}})],S.prototype,"functionArguments",null),s([U("functionArguments")],S.prototype,"readFunctionArguments",null),s([fe("functionArguments")],S.prototype,"writeFunctionArguments",null),s([l({json:{type:String,write:{target:"rasterFunction"}}})],S.prototype,"functionName",void 0),s([U("functionName",["rasterFunction","rasterFunctionInfos","rasterFunctionDefinition"])],S.prototype,"readFunctionName",null),s([W({C128:"c128",C64:"c64",F32:"f32",F64:"f64",S16:"s16",S32:"s32",S8:"s8",U1:"u1",U16:"u16",U2:"u2",U32:"u32",U4:"u4",U8:"u8",UNKNOWN:"unknown"},{ignoreUnknown:!1}),l({json:{default:"unknown"}})],S.prototype,"outputPixelType",void 0),s([l({type:String,json:{read:!0,write:!0}})],S.prototype,"variableName",void 0),s([l()],S.prototype,"rasterFunctionDefinition",null),s([l(Wi)],S.prototype,"functionDefinition",void 0),s([l()],S.prototype,"hasClipFunction",null),S=He=s([j("esri.layers.support.RasterFunction")],S);const we=S;var Ee;const ee=ne()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),Pe=ne()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});function _i(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return Pe.fromJSON(t)}let h=Ee=class extends N{constructor(e){super(e),this.ascending=!0,this.itemRasterFunction=null,this.lockRasterIds=null,this.method=null,this.multidimensionalDefinition=null,this.objectIds=null,this.operation=null,this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return t.ascending!=null?t.ascending:t.sortAscending==null||t.sortAscending}get itemRenderingRule(){return ye(he.getLogger(this),"itemRenderingRule",{replacement:"itemRasterFunction",version:"4.27",warnOnce:!0}),this._get("itemRasterFunction")}set itemRenderingRule(e){ye(he.getLogger(this),"itemRenderingRule",{replacement:"itemRasterFunction",version:"4.27",warnOnce:!0}),this._set("itemRasterFunction",e)}readMethod(e,t){return _i(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,i){e!=null&&(e=e.filter(({variableName:n,dimensionName:a})=>n&&n!=="*"||a)).length&&(t[i]=e.map(n=>n.toJSON()))}readOperation(e,t){var r;const i=t.mosaicOperation,n=(r=t.mosaicOperator)==null?void 0:r.toLowerCase(),a=i||(n?ee.toJSON(n):null);return ee.fromJSON(a)||"first"}castSortValue(e){return e==null||typeof e=="string"||typeof e=="number"?e:`${e}`}clone(){return new Ee({ascending:this.ascending,itemRasterFunction:A(this.itemRasterFunction),lockRasterIds:A(this.lockRasterIds),method:this.method,multidimensionalDefinition:A(this.multidimensionalDefinition),objectIds:A(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:A(this.viewpoint),where:this.where})}};s([l({type:Boolean,json:{write:!0}})],h.prototype,"ascending",void 0),s([U("ascending",["ascending","sortAscending"])],h.prototype,"readAscending",null),s([l({type:we,json:{name:"itemRenderingRule",write:!0}})],h.prototype,"itemRasterFunction",void 0),s([l({type:we})],h.prototype,"itemRenderingRule",null),s([l({type:[P],json:{write:{overridePolicy(){return{enabled:this.method==="lock-raster"}}}}})],h.prototype,"lockRasterIds",void 0),s([l({type:String,json:{type:Pe.jsonValues,write:{target:"mosaicMethod",writer:Pe.write}}})],h.prototype,"method",void 0),s([U("method",["mosaicMethod","defaultMosaicMethod"])],h.prototype,"readMethod",null),s([l({type:[ie],json:{write:!0}})],h.prototype,"multidimensionalDefinition",void 0),s([fe("multidimensionalDefinition")],h.prototype,"writeMultidimensionalDefinition",null),s([l({type:[P],json:{name:"fids",write:!0}})],h.prototype,"objectIds",void 0),s([l({json:{type:ee.jsonValues,read:{reader:ee.read},write:{target:"mosaicOperation",writer:ee.write}}})],h.prototype,"operation",void 0),s([U("operation",["mosaicOperation","mosaicOperator"])],h.prototype,"readOperation",null),s([l({type:String,json:{write:{overridePolicy(){return{enabled:this.method==="attribute"}}}}})],h.prototype,"sortField",void 0),s([l({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:this.method==="attribute",allowNull:!0}}}}})],h.prototype,"sortValue",void 0),s([oi("sortValue")],h.prototype,"castSortValue",null),s([l({type:J,json:{write:!0}})],h.prototype,"viewpoint",void 0),s([l({type:String,json:{write:!0}})],h.prototype,"where",void 0),h=Ee=s([j("esri.layers.support.MosaicRule")],h);const Ki=h;var Oe;const Qi={base:si,key:"type",typeMap:{extent:xe,polygon:li}};let G=Oe=class extends N{constructor(e){super(e),this.areaOfInterest=null,this.subsetDefinitions=null}get dimensions(){const{subsetDefinitions:e}=this;if(e==null||e.length===0)return[];const t=new Map;e.forEach(n=>{if(!n.dimensionName)return;let a,r;if(Array.isArray(n.values[0])){const o=n.values;a=o[0][0],r=o[n.values.length-1][1]}else{const o=n.values;a=o[0],r=o[n.values.length-1]}if(t.has(n.dimensionName)){const o=t.get(n.dimensionName);o[0]=Math.min(a,o[0]),o[1]=Math.max(r,o[1])}else t.set(n.dimensionName,[a,r])});const i=[];for(const n of t)i.push({name:n[0],extent:n[1]});return i}get variables(){const{subsetDefinitions:e}=this;if(e==null||e.length===0)return[];const t=new Set;return e.forEach(i=>{i.variableName&&t.add(i.variableName)}),[...t]}clone(){var i;const e=(i=this.subsetDefinitions)==null?void 0:i.map(n=>n.clone()),t=this.areaOfInterest?this.areaOfInterest.clone():this.areaOfInterest;return new Oe({areaOfInterest:t,subsetDefinitions:e})}};s([l({types:Qi,json:{read:jt,write:!0}})],G.prototype,"areaOfInterest",void 0),s([l({readOnly:!0})],G.prototype,"dimensions",null),s([l({readOnly:!0})],G.prototype,"variables",null),s([l({type:[ie],json:{write:!0}})],G.prototype,"subsetDefinitions",void 0),G=Oe=s([j("esri.layers.support.MultidimensionalSubset")],G);const Nn=G;let Tn=class{constructor(){this._workerThread=null,this._destroyed=!1}async initialize(){const t=await ci("RasterWorker");this._destroyed?t.close():this._workerThread=t}destroy(){this._destroyed=!0,this._workerThread&&(this._workerThread.close(),this._workerThread=null)}async convertVectorFieldData(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n=await this._workerThread.invoke("convertVectorFieldData",{pixelBlock:t.pixelBlock.toJSON(),type:t.dataType},i);return n?new Z(n):null}computeStatisticsHistograms(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");return this._workerThread.invoke("computeStatisticsHistograms",{pixelBlock:t.pixelBlock.toJSON()},i)}async decode(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n=await this._workerThread.invoke("decode",t,i);return n?new Z(n):null}async symbolize(t,i){var r,o;if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n={extent:(r=t.extent)==null?void 0:r.toJSON(),pixelBlock:(o=t.pixelBlock)==null?void 0:o.toJSON(),simpleStretchParams:t.simpleStretchParams,bandIds:t.bandIds},a=await this._workerThread.invoke("symbolize",n,i);return a?new Z(a):null}async updateSymbolizer(t,i){var a;if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n=(a=t==null?void 0:t.rendererJSON)==null?void 0:a.histograms;await Promise.all(this._workerThread.broadcast("updateSymbolizer",{symbolizerJSON:t.toJSON(),histograms:n},i))}async updateRasterFunction(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");await Promise.all(this._workerThread.broadcast("updateRasterFunction",{rasterFunctionJSON:t.toJSON()},i))}async process(t,i){var a,r;if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n=await this._workerThread.invoke("process",{extent:(a=t.extent)==null?void 0:a.toJSON(),primaryPixelSizes:(r=t.primaryPixelSizes)==null?void 0:r.map(o=>o!=null?o.toJSON():null),primaryPixelBlocks:t.primaryPixelBlocks.map(o=>o!=null?o.toJSON():null),primaryRasterIds:t.primaryRasterIds},i);return n?new Z(n):null}async stretch(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");if(!(t!=null&&t.pixelBlock))return null;const n={srcPixelBlock:t.pixelBlock.toJSON(),stretchParams:t.stretchParams},a=await this._workerThread.invoke("stretch",n,i);return a?new Z(a):null}async split(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");if(!(t!=null&&t.pixelBlock))return null;const n={srcPixelBlock:t.pixelBlock.toJSON(),tileSize:t.tileSize,maximumPyramidLevel:t.maximumPyramidLevel,useBilinear:t.useBilinear},a=await this._workerThread.invoke("split",n,i);return a&&a.forEach((r,o)=>{a.set(o,r?Z.fromJSON(r):null)}),a}async clipTile(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");if(!(t!=null&&t.pixelBlock))return null;const n={...t,pixelBlock:t.pixelBlock.toJSON()},a=await this._workerThread.invoke("clipTile",n,i);return a?Z.fromJSON(a):null}async estimateStatisticsHistograms(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");if(!(t!=null&&t.pixelBlock))return null;const n={srcPixelBlock:t.pixelBlock.toJSON()};return await this._workerThread.invoke("estimateStatisticsHistograms",n,i)}async mosaicAndTransform(t,i){var r;if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");if(!((r=t==null?void 0:t.srcPixelBlocks)!=null&&r.length))return{pixelBlock:null};const n={...t,srcPixelBlocks:t.srcPixelBlocks.map(o=>o!=null?o.toJSON():null)},a=await this._workerThread.invoke("mosaicAndTransform",n,i);return{pixelBlock:a.pixelBlock?new Z(a.pixelBlock):null,localNorthDirections:a.localNorthDirections}}async createFlowMesh(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n={buffer:t.flowData.data.buffer,maskBuffer:t.flowData.mask.buffer,width:t.flowData.width,height:t.flowData.height},{meshType:a,simulationSettings:r}=t,o=await this._workerThread.invoke("createFlowMesh",{meshType:a,flowData:n,simulationSettings:r},{...i,transferList:[n.buffer,n.maskBuffer]});return{vertexData:new Float32Array(o.vertexBuffer),indexData:new Uint32Array(o.indexBuffer)}}getProjectionOffsetGrid(t,i){if(!this._workerThread)throw new T("raster-jobhandler:no-connection","no available worker connection");const n=t.datumTransformation!=null?t.datumTransformation.steps.map(o=>({wkid:o.wkid,wkt:o.wkt,isInverse:o.isInverse})):null,a=t.rasterTransform!=null?t.rasterTransform.toJSON():null,r={projectedExtent:t.projectedExtent.toJSON(),srcBufferExtent:t.srcBufferExtent.toJSON(),pixelSize:t.pixelSize,hasWrapAround:t.hasWrapAround,spacing:t.spacing,datumTransformationSteps:n,rasterTransform:a,isAdaptive:t.isAdaptive,includeGCSGrid:t.includeGCSGrid};return this._workerThread.invoke("getProjectionOffsetGrid",r,i)}};function Ht(e,t,i){var r;const n=t.shift();if(i.length===0){const o=[];i.push({sliceId:-1,multidimensionalDefinition:o})}const a=i.length;for(let o=0;o{i.push({sliceId:-1,multidimensionalDefinition:[...u,{variableName:e,dimensionName:n.name,values:[d]}]})})}t.length&&Ht(e,t,i)}function Ln(e,t){const i=[];let n=0;return(t?e.variables.filter(a=>a.name.toLowerCase()===t.toLowerCase()):[...e.variables].sort((a,r)=>a.name>r.name?1:-1)).forEach(a=>{const r=[],o=[...a.dimensions].sort((u,d)=>u.name>d.name?-1:1);Ht(a.name,o,r),r.forEach(u=>{i.push({...u,sliceId:n++})})}),i}function xn(e,t,i){let n=e;if(t&&(t=[...t].sort((a,r)=>a.dimensionName{r.length&&(n=n.filter(u=>{const d=u.multidimensionalDefinition.find(p=>p.dimensionName===a);if(d==null)return!1;const c=d.values[0];return typeof c=="number"?typeof r[0]=="number"?r.includes(c):r.some(p=>p[0]<=c&&p[1]>=c):typeof r[0]=="number"?r.some(p=>c[0]<=p&&c[1]>=p):o?r.some(p=>p[0]===c[0]&&p[0]===c[1]):r.some(p=>p[0]>=c[0]&&p[0]<=c[1]||p[1]>=c[0]&&p[1]<=c[1]||p[0]c[1])}))}),n.length&&(i==null?void 0:i.start)!=null&&i.end!=null){const a=i.start.getTime(),r=i.end.getTime(),o=n[0].multidimensionalDefinition.findIndex(u=>u.dimensionName==="StdTime");o>-1&&(n=n.filter(u=>{const d=u.multidimensionalDefinition[o].values[0];return a<=d&&r>=d}))}return n.map(a=>a.sliceId)}function Zt(e,t){return Array.isArray(e)?t[0]===t[1]?e[0]===t[0]||e[1]===t[0]:e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[0]&&e[1]<=t[1]:e>=t[0]&&e<=t[1]}function Xi(e,t){return e[0]<=t[0]&&e[1]>=t[0]||e[0]<=t[1]&&e[1]>=t[1]||e[0]>=t[0]&&e[1]<=t[1]}function Et(e){return e.length===1?[e[0],e[0]]:[e[0],e[e.length-1]]}function Pt(e,t,i){var o,u;if(!((o=t==null?void 0:t.subsetDefinitions)!=null&&o.length))return e;let n;if(i){const{variables:d}=t;if(d.length&&!d.includes(i))return null;const c=t.subsetDefinitions.find(p=>p.dimensionName===e.name&&p.variableName===i);if(!((u=c==null?void 0:c.values)!=null&&u.length))return e;n=Et(c.values)}else{const d=t.dimensions.find(({name:c})=>c===e.name);n=d==null?void 0:d.extent}const a=n;if(!(a!=null&&a.length))return e;const r=e.values.filter(d=>Zt(d,a));return{...e,extent:[...a],values:r}}function Ot(e,t,i){var a;if(!((a=t==null?void 0:t.subsetDefinitions)!=null&&a.length))return!1;const{variables:n}=t;if(n.length&&e.some(({variableName:r})=>r&&!n.includes(r)))return!0;for(let r=0;r(o.variableName===""||d.variableName===o.variableName)&&d.dimensionName===o.dimensionName);if(u!=null&&u.values.length){const d=Et(u.values);if(!o.isSlice&&o.values.length===2&&!Array.isArray(o.values[0])&&o.values[0]!==o.values[1]&&i){if(!Xi(o.values,d))return!0}else if(o.values.some(c=>!Zt(c,d)))return!0}}return!1}function Bn(e,t){if(e==null)return{isOutside:!1};const{geometry:i,timeExtent:n,multidimensionalDefinition:a}=t;let r=null;if(n!=null&&(r=Yi(e,n),r==null))return{isOutside:!0};const{areaOfInterest:o}=e;if(o&&i){const u=i.type==="point"?i:i.type==="extent"?i.center:i.type==="polygon"?i.centroid:null;if(u&&!o.contains(u))return{isOutside:!0}}return a!=null&&a.length&&Ot(a,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:i,timeExtent:r,multidimensionalDefinition:a}}}function Yi(e,t){const i=e.dimensions.find(({name:o})=>o==="StdTime");if(i==null||t.start==null&&t.end==null)return t;t=t.clone();const{start:n,end:a}=t.toJSON(),r=n===a?[n]:n!=null&&a!=null?[n,a]:[n??a];return r.length===2&&(i!=null&&i.extent.length)&&(r[0]=Math.max(r[0],i.extent[0]),r[1]=Math.min(r[1],i.extent[1]??i.extent[0]),r[1]r.variables.includes(f))),d?c.find(({name:f})=>f===d)??c[0]:c[0]}function zn(e,t={}){const i=qi(e,t);if(!i)return null;const n=[],{dimensions:a,name:r}=i;if(a.length===0)return[new ie({variableName:r,dimensionName:"",values:[],isSlice:!0})];for(let o=0;o{if(t.values==null)return!0;const i=t.values.length;return i===0||i>1||!t.isSlice&&Array.isArray(t.values[0])})}function kn(e,t){var n;if(t==null||e==null)return null;let i=t.variables.map(a=>({...a}));return(n=e==null?void 0:e.variables)!=null&&n.length&&(i=i.filter(({name:a})=>e.variables.includes(a)),i.forEach(a=>{a.dimensions=a.dimensions.map(r=>Pt(r,e,a.name)).filter(ui)})),i}function en(e,t){var u;const{values:i}=t;if(i!=null&&i.length){const d=Array.isArray(i[0]),c=Array.isArray(e);return d!==c?-1:d&&c?i.findIndex(p=>p[0]===e[0]&&p[1]===e[1]):i.indexOf(e)}const{extent:n}=t;if(Array.isArray(e)||!n||en[1])return-1;const a=t.interval||1;if(t.unit!=="ISO8601")return Math.round((e-n[0])/a);const r=n[0];let o=-1;switch(((u=t.intervalUnit)==null?void 0:u.toLowerCase())||"seconds"){case"seconds":o=Math.round((e-r)/1e3/a);break;case"minutes":o=Math.round((e-r)/6e4/a);break;case"hours":o=Math.round((e-r)/36e5/a);break;case"days":o=Math.round((e-r)/864e5/a);break;case"months":{const d=new Date(e).getUTCFullYear()-new Date(r).getUTCFullYear(),c=new Date(r).getUTCMonth(),p=new Date(e).getUTCMonth();o=d===0?p-c:p+11-c+12*(d-1)}break;case"years":o=Math.round((new Date(e).getUTCFullYear()-new Date(r).getUTCFullYear())/a);break;case"decades":o=Math.round((new Date(e).getUTCFullYear()-new Date(r).getUTCFullYear())/10/a)}return o}function Mt(e){var o,u;let t=(o=e.values)==null?void 0:o.length;if(t)return t;const{extent:i,unit:n}=e,a=e.interval||1,r=i?i[1]-i[0]:0;if(n!=="ISO8601")return Math.round(r/a);switch(((u=e.intervalUnit)==null?void 0:u.toLowerCase())??"seconds"){case"seconds":t=Math.round(r/1e3/a);break;case"minutes":t=Math.round(r/6e4/a);break;case"hours":t=Math.round(r/36e5/a);break;case"days":t=Math.round(r/864e5/a);break;case"months":if(i){const d=new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear(),c=new Date(i[0]).getUTCMonth(),p=new Date(i[1]).getUTCMonth();t=d===0?p-c+1:p+11-c+12*(d-1)+1}else t=0;break;case"years":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/a):0;break;case"decades":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/10/a):0;break;default:t=0}return t}function Rn(e,t){let i=0;const n=e[0].variableName,a=[...t.variables].sort((r,o)=>r.name>o.name?1:-1);for(let r=0;rp.name>m.name?-1:1);if(o.name!==n){i+=u.map(p=>Mt(p)).reduce((p,m)=>p*m);continue}const d=u.map(p=>Mt(p)),c=u.length;for(let p=0;pb.dimensionName===u[p].name);if(m==null)return null;const f=en(m.values[0],u[p]);if(f===-1)return null;d.shift(),i+=p===c-1?f:f*d.reduce((b,g)=>b*g)}break}return i}const tn=.25,nn=Nt.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),yt=Nt.fromJSON(Ai[0]),Vt=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function Hn(e,t){const{attributeTable:i,colormap:n}=e;if($e(e)){const a=pn(e);if(a!=null)return a}if(t!=null&&t.rasterFunctionColorRamp){const a=ht(e,t);return a.colorRamp=t.rasterFunctionColorRamp,a}if(n!=null){const a=un(e);if(a!=null)return a}if(i!=null){const a=ln(e);if(a!=null)return a}return ht(e,t)}function Zn(e,t=!1){const i=["raster-stretch"];return Ct(e,t)&&i.push("raster-colormap"),Lt(e)&&i.push("unique-value"),bi(e,t)&&i.push("class-breaks"),Di(e)&&i.push("raster-shaded-relief"),$e(e)&&i.push("vector-field"),vi(e)&&i.push("flow"),i}function En(e){return e.datasetFormat==="Function"&&e.rasterFunction.functionName==="Colormap"?e.rasterFunction.colorRamp:void 0}function Pn(e,t,i){const n=["nearest","bilinear","cubic","majority"],a=i==null?void 0:i.toLowerCase().replace("bicubic","cubic"),r=n.find(o=>o===a);return t==="Map"?r??"bilinear":e.dataType==="standard-time"?r??"nearest":e.dataType==="thematic"||e.attributeTable||e.colormap?r==="nearest"||r==="majority"?r:"nearest":r??"bilinear"}function ht(e,t){e=an(e,t==null?void 0:t.variableName);const{bandCount:i}=e;let{bandIds:n,stretchType:a}=t||{};n!=null&&n.some(m=>m>=i)&&(n=null);let r=e.statistics,o=e.histograms;i>1?(n=n!=null&&n.length?n:rn(e),r=r==null?null:n==null?void 0:n.map(m=>r[m]),o=o==null?null:n==null?void 0:n.map(m=>o[m])):n=[0],a==null&&(a=sn(e));let u=!1;switch(a){case"none":u=!1;break;case"percent-clip":u=!(o!=null&&o.length);break;default:u=!(r!=null&&r.length)}const{dataType:d}=e,c=(n==null?void 0:n.length)===1&&Vt.has(d)?nn:null,p=new We({stretchType:a,dynamicRangeAdjustment:u,colorRamp:c,outputMin:0,outputMax:255,gamma:(n==null?void 0:n.length)===1?[1]:[1,1,1],useGamma:!1});return a==="percent-clip"?p.maxPercent=p.minPercent=tn:a==="standard-deviation"&&(p.numberOfStandardDeviations=2),u||e.multidimensionalInfo==null&&!(t!=null&&t.includeStatisticsInStretch)||(a==="percent-clip"?p.histograms=o:a!=="min-max"&&a!=="standard-deviation"||(p.statistics=r)),p}function an(e,t){const{multidimensionalInfo:i}=e;if(!t||!i)return e;const n=i.variables.find(a=>a.name===t);if(!n)return e;if(e=e.clone(),n){const{statistics:a,histograms:r}=n;a!=null&&a.length&&(e.statistics=a.map(o=>({min:o.min,max:o.max,avg:o.avg,stddev:o.stddev}))),r!=null&&r.length&&(e.histograms=r)}return e}function rn(e){const t=e.bandCount;if(t===1)return null;if(t===2)return[0];const{bandInfos:i}=e;let n;if(i.length===t){const{red:a,green:r,blue:o,nir:u}=on(i);a!=null&&r!=null&&o!=null?n=[a,r,o]:u!=null&&a!=null&&r!=null&&(n=[u,a,r])}return!n&&t>=3&&(n=[0,1,2]),n}function on(e){const t={};for(let i=0;i=410&&r<=480&&o>=480&&o<=540?t.blue=i:t.green==null&&r>=490&&r<=560&&o>=560&&o<=610?t.green=i:t.red==null&&r>=595&&r<=670&&o>=660&&o<=730?t.red=i:t.nir==null&&r>=700&&r<=860&&o>=800&&o<=950&&(t.nir=i)}}return t}function sn(e){let t="percent-clip";const{pixelType:i,dataType:n,histograms:a,statistics:r,multidimensionalInfo:o}=e,u=Vt.has(n)||n==="generic"&&o!=null;return i!=="u8"||n!=="processed"&&a!=null&&r!=null?i==="u8"||n==="elevation"||u?t="min-max":a!=null?t="percent-clip":r!=null&&(t="min-max"):t="none",t}function ln(e,t,i,n){if(!Lt(e,t))return null;const{attributeTable:a,statistics:r}=e,o=Gt(a,t),u=te(a,"red"),d=te(a,"green"),c=te(a,"blue"),p=new ft,m=[],f=new Set,b=!!(u&&d&&c);if(a!=null)a.features.forEach(g=>{const M=g.attributes[o.name];if(!f.has(g.attributes[o.name])&&M!=null){f.add(M);const k=b&&(u.type==="single"||u.type==="double")&&(d.type==="single"||d.type==="double")&&(c.type==="single"||c.type==="double")&&!a.features.some(z=>z.attributes[u.name]>1||z.attributes[d.name]>1||z.attributes[c.name]>1),B=k?255:1;m.push(new lt({value:g.attributes[o.name],label:g.attributes[o.name]+"",symbol:new ct({style:"solid",outline:null,color:new I(b?[g.attributes[u.name]*B,g.attributes[d.name]*B,g.attributes[c.name]*B,1]:[0,0,0,0])})}))}});else if(r!=null&&r[0])for(let g=r[0].min;g<=r[0].max;g++)m.push(new lt({value:g,label:g.toString(),symbol:new ct({style:"solid",outline:null,color:new I([0,0,0,0])})}));if(m.sort((g,M)=>g.value&&typeof g.value.valueOf()=="string"?0:g.value>M.value?1:-1),!b){const g=Tt(yt,{numColors:m.length});m.forEach((M,k)=>M.symbol.color=new I(g[k].slice(1,4))),p.colorRamp=yt}return new Fe({field:o.name,uniqueValueInfos:m,authoringInfo:p})}function Gt(e,t,i){let n;return e!=null?(n=t?e.fields.find(a=>t.toLowerCase()===a.name.toLowerCase()):cn(e.fields),n||(i||(n=e.fields.find(a=>a.type==="string")),n||(n=te(e,"value")))):n=new di({name:"value"}),n}function cn(e){let t;for(let i=0;ii.name.toLowerCase()===t)}function un(e){if(!Ct(e))return null;let t;const{attributeTable:i,colormap:n}=e;if(i!=null){const a=te(i,"value"),r=Gt(i,null,!0);r.type==="string"&&(t={},i.features.forEach(o=>{const u=o.attributes;t[u[a.name]]=r?u[r.name]:u[a.name]}))}return Je.createFromColormap(n,t)}const dn=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function pn(e){if(!$e(e))return null;let t;if(e.statistics!=null&&e.statistics.length&&(e.dataType==="vector-magdir"||e.dataType==="vector-uv")){const{minMagnitude:a,maxMagnitude:r}=mn(e.dataType,e.statistics);t=[new Ge({field:"Magnitude",minSize:10,maxSize:40,minDataValue:a,maxDataValue:r})]}const i=e.multidimensionalInfo!=null?dn.get(e.multidimensionalInfo.variables[0].unit):void 0,n=new _e({visualVariables:t,inputUnit:i,rotationType:"geographic"});return n.visualVariables=[...n.sizeVariables,...n.rotationVariables],n}function wt(e){var t;return{color:(t=e.symbolLayers[0].material)==null?void 0:t.color,type:"esriSFS",style:"esriSFSSolid"}}function On(e){var t,i;if(e.type==="uniqueValue"){const n=e.uniqueValueInfos,a=n==null?void 0:n[0].symbol;return(t=a==null?void 0:a.symbolLayers)!=null&&t.length&&(e.uniqueValueInfos=n==null?void 0:n.map(r=>({value:r.value,label:r.label,symbol:r.symbol?wt(r.symbol):null}))),e}if(e.type==="classBreaks"){const n=e.classBreakInfos,a=n[0].symbol;return(i=a==null?void 0:a.symbolLayers)!=null&&i.length&&(e.classBreakInfos=n.map(r=>({classMinValue:r.classMinValue,classMaxValue:r.classMaxValue,label:r.label,symbol:r.symbol?wt(r.symbol):null}))),e}return e}function mn(e,t){let i,n;if(e==="vector-magdir")i=t[0].min,n=t[0].max;else{const a=t[0].min,r=t[0].max,o=t[1].min,u=t[1].max;i=0,n=Math.max(Math.abs(a),Math.abs(o),Math.abs(r),Math.abs(u))}return{minMagnitude:i,maxMagnitude:n}}var Ve;let x=Ve=class extends N{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){e!=null&&(t.geometryType=gi(e),t[i]=e.toJSON())}get renderingRule(){return ye(he.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){ye(he.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}clone(){return new Ve(A({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};s([l({types:pi,json:{read:jt}})],x.prototype,"geometry",void 0),s([fe("geometry")],x.prototype,"writeGeometry",null),s([l({type:Ki,json:{write:!0}})],x.prototype,"mosaicRule",void 0),s([l({type:we})],x.prototype,"renderingRule",null),s([l({type:we,json:{write:!0,name:"renderingRule"}})],x.prototype,"rasterFunction",void 0),s([l({type:J,json:{write:!0}})],x.prototype,"pixelSize",void 0),s([l({json:{write:!0}})],x.prototype,"raster",void 0),s([l({type:mi,json:{read:{source:"time"},write:{target:"time"}}})],x.prototype,"timeExtent",void 0),x=Ve=s([j("esri.rest.support.ImageHistogramParameters")],x);const Vn=x;async function Ft(e,t,i){var Qe,Xe,Ye,qe,et,tt,it,nt,at,rt;const n=Ti(e),{rasterFunction:a,sourceJSON:r}=t||{},o=a?JSON.stringify(a.rasterFunctionDefinition||a):null,u=Ci({...n.query,renderingRule:o,f:"json"}),d=Li(u,i);e=n.path;const c=r||await F(e,d).then(C=>C.data),p=c.hasRasterAttributeTable?F(`${e}/rasterAttributeTable`,d):null,m=c.hasColormap?F(`${e}/colormap`,d):null,f=c.hasHistograms?F(`${e}/histograms`,d):null,b=c.currentVersion>=10.3?F(`${e}/keyProperties`,d):null,g=c.hasMultidimensions?F(`${e}/multidimensionalInfo`,d):null,M=await Promise.allSettled([p,m,f,b,g]);let k=null;if(c.minValues&&c.minValues.length===c.bandCount){k=[];for(let C=0;C{var ot;(ot=C.statistics)!=null&&ot.length&&C.statistics.forEach(le=>{le.avg=le.mean,le.stddev=le.standardDeviation})});const{defaultVariable:ve,serviceDataType:K}=c;ve&&ve!==_.DefaultVariable&&(_.DefaultVariable=ve),K!=null&&K.includes("esriImageServiceDataTypeVector")&&!K.includes(_.DataType)&&(_.DataType=K.replace("esriImageServiceDataType",""));let Se=c.noDataValue;(rt=c.noDataValues)!=null&&rt.length&&c.noDataValues.some(C=>C!==Se)&&(Se=c.noDataValues);const _t=c.transposeInfo?new Si({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new J({x:c.extent.xmin,y:c.extent.ymax,spatialReference:be}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(z,Ke))/Math.LN2-8)),transposeInfo:c.transposeInfo}):void 0;return new ji({width:z,height:Ke,bandCount:c.bandCount,extent:xe.fromJSON(c.extent),spatialReference:be,pixelSize:new J({x:c.pixelSizeX,y:c.pixelSizeY,spatialReference:be}),pixelType:c.pixelType.toLowerCase(),statistics:k,attributeTable:$t,colormap:Jt,histograms:Wt,keyProperties:_,noDataValue:Se,multidimensionalInfo:De,storageInfo:_t})}function Gn(e,t,i){return Ft(e,{sourceJSON:t},i)}function Fn(e,t,i){return Ft(e,{rasterFunction:t},i)}function $n(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}export{On as $,Zn as B,Rn as D,En as E,Hn as L,we as N,rn as U,an as W,xn as a,fn as b,Nn as c,pt as d,Vn as e,zn as f,qi as g,Un as h,Ln as i,kn as j,$n as k,dt as l,Gn as m,An as n,Ot as o,ie as p,Pn as q,bn as r,Ki as s,Tn as t,Te as u,Fn as v,Bn as w}; diff --git a/build/assets/geojson-BRJeQduY.js b/build/assets/geojson-BRJeQduY.js new file mode 100644 index 0000000..f72eacb --- /dev/null +++ b/build/assets/geojson-BRJeQduY.js @@ -0,0 +1 @@ +import{t as N}from"./date-M6n_RqpC.js";import{s as P,ac as C,bK as G,bL as E}from"./index-DKOmzAMm.js";import{a as x,e as D}from"./OptimizedFeature-DDMKj8Vq.js";const J={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function b(t){return J[t]}function*M(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(const n of t.features)n&&(yield n)}}function*R(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(const n of t.coordinates)yield*n;break;case"MultiPolygon":for(const n of t.coordinates)for(const o of n)yield*o}}function*v(t,n={}){const{geometryType:o,objectIdField:e}=n;for(const r of t){const{geometry:s,properties:y,id:i}=r;if(s&&b(s.type)!==o)continue;const l=y||{};let c;e&&(c=l[e],i==null||c||(l[e]=c=i)),yield new x(s?K(new D,s,n):null,l,null,c??void 0)}}function A(t){for(const n of t)if(n.length>2)return!0;return!1}function Z(t){return!T(t)}function H(t){return T(t)}function T(t){let n=0;for(let o=0;o=0;e--)S(t,n[e],o);t.lengths.push(n.length)}function S(t,n,o){const[e,r,s]=n;t.coords.push(e,r),o.hasZ&&t.coords.push(s||0)}function W(t){switch(typeof t){case"string":return N(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function tt(t,n=4326){if(!t)throw new P("geojson-layer:empty","GeoJSON data is empty");if(t.type!=="Feature"&&t.type!=="FeatureCollection")throw new P("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});const{crs:o}=t;if(!o)return;const e=typeof o=="string"?o:o.type==="name"?o.properties.name:o.type==="EPSG"?o.properties.code:null,r=C({wkid:n})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${n})$`,"i");if(!e||!r.test(e))throw new P("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:o})}function nt(t,n={}){const o=[],e=new Set,r=new Set;let s,y=!1,i=null,l=!1,{geometryType:c=null}=n,m=!1;for(const d of M(t)){const{geometry:h,properties:u,id:a}=d;if((!h||(c||(c=b(h.type)),b(h.type)===c))&&(y||(y=A(R(h))),l||(l=a!=null,l&&(s=typeof a,u&&(i=Object.keys(u).filter(p=>u[p]===a)))),u&&i&&l&&a!=null&&(i.length>1?i=i.filter(p=>u[p]===a):i.length===1&&(i=u[i[0]]===a?i:[])),!m&&u)){let p=!0;for(const f in u){if(e.has(f))continue;const F=u[f];if(F==null){p=!1,r.add(f);continue}const j=W(F);if(j==="unknown"){r.add(f);continue}r.delete(f),e.add(f);const k=G(f);k&&o.push({name:k,alias:f,type:j})}m=p}}const w=G((i==null?void 0:i.length)===1&&i[0]||null)??void 0;if(w){for(const d of o)if(d.name===w&&E(d)){d.type="esriFieldTypeOID";break}}return{fields:o,geometryType:c,hasZ:y,objectIdFieldName:w,objectIdFieldType:s,unknownFields:Array.from(r)}}function ot(t,n){return Array.from(v(M(t),n))}export{tt as E,nt as I,ot as N,b as u}; diff --git a/build/assets/geomasync-C1XdD4eA.js b/build/assets/geomasync-C1XdD4eA.js new file mode 100644 index 0000000..ce196e7 --- /dev/null +++ b/build/assets/geomasync-C1XdD4eA.js @@ -0,0 +1 @@ +import{aL as ln,U as B,dg as d,aZ as T,ax as I,Q as x,aX as S,aY as H,dh as Q,C as V,fg as on,d3 as dn}from"./index-DKOmzAMm.js";import{a1 as o,a as h,X,v as K,w as Y,m as E,b as i,r as s,U as v,Q as g,Z as C,B as L,P as w,ac as _,ad as U,ae as W,g as R,F as wn,af as hn,ag as mn,E as q,ah as yn,N as b,A as O,ai as pn,aj as vn,I as G,ak as gn,al as J}from"./arcadeUtils-BvZmzJL_.js";import{c as P,r as Z,a as y}from"./TimeOnly-C2MfFEIr.js";import{l as $}from"./portalUtils-DDekVd1c.js";import{A as Pn,h as In,S as An,m as Fn,x as Rn,p as Nn,O as xn,g as bn,R as On,D as Sn,b as jn,E as Dn,k as Tn,y as Un,w as Zn,W as nn,K as en,F as M,M as z,d as Cn,C as rn,U as tn,B as Ln,L as Jn,P as Mn,v as kn,H as an,N as sn,J as En,j as Wn,T as qn,V as zn}from"./geometryEngineAsync-BODJChyU.js";import"./number-NXsKqxkQ.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";async function un(a,e,r){var t,u;if(!((t=ln)==null?void 0:t.findCredential(a.restUrl)))return null;if(a.loadStatus==="loaded"&&e===""&&((u=a.user)!=null&&u.sourceJSON)&&r===!1)return a.user.sourceJSON;const l={responseType:"json",query:{f:"json"}};if(r&&(l.query.returnUserLicenseTypeExtensions=!0),e===""){const f=await B(a.restUrl+"/community/self",l);if(f.data){const m=f.data;if(m!=null&&m.username)return m}return null}const n=await B(a.restUrl+"/community/users/"+e,l);if(n.data){const f=n.data;return f.error?null:f}return null}function cn(a){return on.indexOf("4.")===0?S.fromExtent(a):new S({spatialReference:a.spatialReference,rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]]})}function A(a,e,r){if(h(a,2,2,e,r),!(a[0]instanceof d&&a[1]instanceof d)){if(!(a[0]instanceof d&&a[1]===null)){if(!(a[1]instanceof d&&a[0]===null)){if(a[0]!==null||a[1]!==null)throw new i(e,s.InvalidParameter,r)}}}}async function fn(a,e){if(a.type!=="polygon"&&a.type!=="polyline"&&a.type!=="extent")return 0;let r=1;(a.spatialReference.vcsWkid||a.spatialReference.latestVcsWkid)&&(r=gn(a.spatialReference)/dn(a.spatialReference));let c=0;if(a.type==="polyline")for(const n of a.paths)for(let t=1;t(A(n=o(n),e,r),n[0]===null||n[1]===null||Pn(n[0],n[1])))},a.functions.intersects=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&In(n[0],n[1])))},a.functions.touches=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&An(n[0],n[1])))},a.functions.crosses=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&Fn(n[0],n[1])))},a.functions.within=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&Rn(n[0],n[1])))},a.functions.contains=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&Nn(n[0],n[1])))},a.functions.overlaps=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]!==null&&n[1]!==null&&xn(n[0],n[1])))},a.functions.equals=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(h(n,2,2,e,r),n[0]===n[1]||(n[0]instanceof d&&n[1]instanceof d?bn(n[0],n[1]):(X(n[0])&&X(n[1])||!!(K(n[0])&&K(n[1])||Y(n[0])&&Y(n[1])))&&n[0].equals(n[1]))))},a.functions.relate=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,3,3,e,r),n[0]instanceof d&&n[1]instanceof d)return On(n[0],n[1],E(n[2]));if(n[0]instanceof d&&n[1]===null||n[1]instanceof d&&n[0]===null||n[0]===null&&n[1]===null)return!1;throw new i(e,s.InvalidParameter,r)})},a.functions.intersection=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]===null||n[1]===null?null:Sn(n[0],n[1])))},a.functions.union=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{const t=[];if((n=o(n)).length===0)throw new i(e,s.WrongNumberOfParameters,r);if(n.length===1)if(v(n[0])){const u=o(n[0]);for(let f=0;f(A(n=o(n),e,r),n[0]===null?null:n[1]===null?P(n[0]):Dn(n[0],n[1])))},a.functions.symmetricdifference=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>(A(n=o(n),e,r),n[0]===null&&n[1]===null?null:n[0]===null?P(n[1]):n[1]===null?P(n[0]):Tn(n[0],n[1])))},a.functions.clip=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),!(n[1]instanceof T)&&n[1]!==null)throw new i(e,s.InvalidParameter,r);if(n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return n[1]===null?null:Un(n[0],n[1])})},a.functions.cut=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),!(n[1]instanceof I)&&n[1]!==null)throw new i(e,s.InvalidParameter,r);if(n[0]===null)return[];if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return n[1]===null?[P(n[0])]:Zn(n[0],n[1])})},a.functions.area=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(h(n,1,2,e,r),(n=o(n))[0]===null)return 0;if(L(n[0])){const t=await n[0].sumArea(Z(w(n[1],-1)),!1,e.abortSignal);if(e.abortSignal.aborted)throw new i(e,s.Cancelled,r);return t}if(v(n[0])||g(n[0])){const t=_(n[0],e.spatialReference);return t===null?0:nn(t,Z(w(n[1],-1)))}if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return nn(n[0],Z(w(n[1],-1)))})},a.functions.areageodetic=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(h(n,1,2,e,r),(n=o(n))[0]===null)return 0;if(L(n[0])){const t=await n[0].sumArea(Z(w(n[1],-1)),!0,e.abortSignal);if(e.abortSignal.aborted)throw new i(e,s.Cancelled,r);return t}if(v(n[0])||g(n[0])){const t=_(n[0],e.spatialReference);return t===null?0:en(t,Z(w(n[1],-1)))}if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return en(n[0],Z(w(n[1],-1)))})},a.functions.length=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(h(n,1,2,e,r),(n=o(n))[0]===null)return 0;if(L(n[0])){const t=await n[0].sumLength(y(w(n[1],-1)),!1,e.abortSignal);if(e.abortSignal.aborted)throw new i(e,s.Cancelled,r);return t}if(v(n[0])||g(n[0])){const t=U(n[0],e.spatialReference);return t===null?0:M(t,y(w(n[1],-1)))}if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return M(n[0],y(w(n[1],-1)))})},a.functions.length3d=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(h(n,1,2,e,r),(n=o(n))[0]===null)return 0;if(v(n[0])||g(n[0])){const t=U(n[0],e.spatialReference);return t===null?0:t.hasZ===!0?fn(t,y(w(n[1],-1))):M(t,y(w(n[1],-1)))}if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return n[0].hasZ===!0?fn(n[0],y(w(n[1],-1))):M(n[0],y(w(n[1],-1)))})},a.functions.lengthgeodetic=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(h(n,1,2,e,r),(n=o(n))[0]===null)return 0;if(L(n[0])){const t=await n[0].sumLength(y(w(n[1],-1)),!0,e.abortSignal);if(e.abortSignal.aborted)throw new i(e,s.Cancelled,r);return t}if(v(n[0])||g(n[0])){const t=U(n[0],e.spatialReference);return t===null?0:z(t,y(w(n[1],-1)))}if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return z(n[0],y(w(n[1],-1)))})},a.functions.distance=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{n=o(n),h(n,2,3,e,r);let t=n[0];(v(n[0])||g(n[0]))&&(t=W(n[0],e.spatialReference));let u=n[1];if((v(n[1])||g(n[1]))&&(u=W(n[1],e.spatialReference)),!(t instanceof d))throw new i(e,s.InvalidParameter,r);if(!(u instanceof d))throw new i(e,s.InvalidParameter,r);return Cn(t,u,y(w(n[2],-1)))})},a.functions.distancegeodetic=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{n=o(n),h(n,2,3,e,r);const t=n[0],u=n[1];if(!(t instanceof x))throw new i(e,s.InvalidParameter,r);if(!(u instanceof x))throw new i(e,s.InvalidParameter,r);const f=new I({paths:[],spatialReference:t.spatialReference});return f.addPath([t,u]),z(f,y(w(n[2],-1)))})},a.functions.densify=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,3,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);if(t<=0)throw new i(e,s.InvalidParameter,r);return n[0]instanceof S||n[0]instanceof I?rn(n[0],t,y(w(n[2],-1))):n[0]instanceof T?rn(cn(n[0]),t,y(w(n[2],-1))):n[0]})},a.functions.densifygeodetic=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,3,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);if(t<=0)throw new i(e,s.InvalidParameter,r);return n[0]instanceof S||n[0]instanceof I?tn(n[0],t,y(w(n[2],-1))):n[0]instanceof T?tn(cn(n[0]),t,y(w(n[2],-1))):n[0]})},a.functions.generalize=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,4,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);return Ln(n[0],t,wn(w(n[2],!0)),y(w(n[3],-1)))})},a.functions.buffer=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,3,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);return t===0?P(n[0]):Jn(n[0],t,y(w(n[2],-1)))})},a.functions.buffergeodetic=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,3,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);return t===0?P(n[0]):Mn(n[0],t,y(w(n[2],-1)))})},a.functions.offset=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,6,e,r),n[0]===null)return null;if(!(n[0]instanceof S||n[0]instanceof I))throw new i(e,s.InvalidParameter,r);const t=R(n[1]);if(isNaN(t))throw new i(e,s.InvalidParameter,r);const u=R(w(n[4],10));if(isNaN(u))throw new i(e,s.InvalidParameter,r);const f=R(w(n[5],0));if(isNaN(f))throw new i(e,s.InvalidParameter,r);return kn(n[0],t,y(w(n[2],-1)),E(w(n[3],"round")).toLowerCase(),u,f)})},a.functions.rotate=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,3,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);const t=n[0]instanceof T?S.fromExtent(n[0]):n[0],u=R(n[1]);if(isNaN(u))throw new i(e,s.InvalidParameter,r);const f=w(n[2],null);if(f===null)return an(t,u);if(f instanceof x)return an(t,u,f);throw new i(e,s.InvalidParameter,r)})},a.functions.centroid=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,1,1,e,r),n[0]===null)return null;let t=n[0];if((v(n[0])||g(n[0]))&&(t=W(n[0],e.spatialReference)),t===null)return null;if(!(t instanceof d))throw new i(e,s.InvalidParameter,r);return t instanceof x?C(P(t),e.spatialReference):t instanceof S?t.centroid:t instanceof I?hn(t):t instanceof H?mn(t):t instanceof T?t.center:null})},a.functions.measuretocoordinate=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),n[0]===null)return null;let t=n[0];if((v(n[0])||g(n[0]))&&(t=U(n[0],e.spatialReference)),t===null)return null;if(!(t instanceof d))throw new i(e,s.InvalidParameter,r);if(!(t instanceof I))throw new i(e,s.InvalidParameter,r);if(q(n[1]===!1))throw new i(e,s.InvalidParameter,r);const u=yn(t,n[1]);return u?b.convertObjectToArcadeDictionary(u,O(e),!1,!0):null})},a.functions.pointtocoordinate=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),n[0]===null)return null;let t=n[0];if((v(n[0])||g(n[0]))&&(t=U(n[0],e.spatialReference)),t===null)return null;if(!(t instanceof d))throw new i(e,s.InvalidParameter,r);if(!(t instanceof I))throw new i(e,s.InvalidParameter,r);const u=n[1];if(u===null)return null;if(!(u instanceof x))throw new i(e,s.InvalidParameter,r);if(q(n[1]===!1))throw new i(e,s.InvalidParameter,r);const f=pn(t,u);return f?b.convertObjectToArcadeDictionary(f,O(e),!1,!0):null})},a.functions.distancetocoordinate=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),n[0]===null)return null;let t=n[0];if((v(n[0])||g(n[0]))&&(t=U(n[0],e.spatialReference)),t===null)return null;if(!(t instanceof d))throw new i(e,s.InvalidParameter,r);if(!(t instanceof I))throw new i(e,s.InvalidParameter,r);if(q(n[1]===!1))throw new i(e,s.InvalidParameter,r);const u=vn(t,n[1]);return u?b.convertObjectToArcadeDictionary(u,O(e),!1,!0):null})},a.functions.multiparttosinglepart=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(n=o(n),h(n,1,1,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);if(n[0]instanceof x)return[C(P(n[0]),e.spatialReference)];if(n[0]instanceof T)return[C(P(n[0]),e.spatialReference)];const t=await sn(n[0]);if(t instanceof S){const u=[],f=[];for(let m=0;m{if(n=o(n),h(n,1,1,e,r),n[0]===null)return!0;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return En(n[0])})},a.functions.simplify=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,1,1,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return sn(n[0])})},a.functions.convexhull=function(e,r){return a.standardFunctionAsync(e,r,(c,l,n)=>{if(n=o(n),h(n,1,1,e,r),n[0]===null)return null;if(!(n[0]instanceof d))throw new i(e,s.InvalidParameter,r);return Wn(n[0])})},a.functions.getuser=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{var m,F;h(n,0,2,e,r);let t=w(n[1],""),u=t===!0;if(t=t===!0||t===!1?"":E(t),n.length===0||n[0]instanceof G){let j;j=(m=e.services)!=null&&m.portal?e.services.portal:V.getDefault(),n.length>0&&(j=$(n[0],j));const D=await un(j,t,u);if(D){const N=JSON.parse(JSON.stringify(D));for(const p of["lastLogin","created","modified"])N[p]!==void 0&&N[p]!==null&&(N[p]=new Date(N[p]));return b.convertObjectToArcadeDictionary(N,O(e))}return null}let f=null;if(L(n[0])&&(f=n[0]),f){if(u=!1,t)return null;await f.load();const j=await f.getOwningSystemUrl();if(!j){if(!t){const p=await f.getIdentityUser();return p?b.convertObjectToArcadeDictionary({username:p},O(e)):null}return null}let D;D=(F=e.services)!=null&&F.portal?e.services.portal:V.getDefault(),D=$(new G(j),D);const N=await un(D,t,u);if(N){const p=JSON.parse(JSON.stringify(N));for(const k of["lastLogin","created","modified"])p[k]!==void 0&&p[k]!==null&&(p[k]=new Date(p[k]));return b.convertObjectToArcadeDictionary(p,O(e))}return null}throw new i(e,s.InvalidParameter,r)})},a.functions.nearestcoordinate=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),!(n[0]instanceof d||n[0]===null))throw new i(e,s.InvalidParameter,r);if(!(n[1]instanceof x||n[1]===null))throw new i(e,s.InvalidParameter,r);if(n[0]===null||n[1]===null)return null;const t=await qn(n[0],n[1]);return t===null?null:b.convertObjectToArcadeDictionary({coordinate:t.coordinate,distance:t.distance,sideOfLine:t.distance===0?"straddle":t.isRightSide?"right":"left"},O(e),!1,!0)})},a.functions.nearestvertex=function(e,r){return a.standardFunctionAsync(e,r,async(c,l,n)=>{if(n=o(n),h(n,2,2,e,r),!(n[0]instanceof d||n[0]===null))throw new i(e,s.InvalidParameter,r);if(!(n[1]instanceof x||n[1]===null))throw new i(e,s.InvalidParameter,r);if(n[0]===null||n[1]===null)return null;const t=await zn(n[0],n[1]);return t===null?null:b.convertObjectToArcadeDictionary({coordinate:t.coordinate,distance:t.distance,sideOfLine:t.distance===0?"straddle":t.isRightSide?"right":"left"},O(e),!1,!0)})})}export{$n as registerFunctions}; diff --git a/build/assets/geometryEngine-D2dsojOY.js b/build/assets/geometryEngine-D2dsojOY.js new file mode 100644 index 0000000..d0f94ca --- /dev/null +++ b/build/assets/geometryEngine-D2dsojOY.js @@ -0,0 +1 @@ +import{G as t}from"./geometryEngineBase-RmbNeFm7.js";import{hydratedAdapter as r}from"./hydrated-awHE-vOn.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./index-DKOmzAMm.js";function i(e){return Array.isArray(e)?e[0].spatialReference:e&&e.spatialReference}function g(e){return t.extendedSpatialReferenceInfo(e)}function h(e,n){return t.clip(r,i(e),e,n)}function w(e,n){return t.cut(r,i(e),e,n)}function R(e,n){return t.contains(r,i(e),e,n)}function x(e,n){return t.crosses(r,i(e),e,n)}function y(e,n,a){return t.distance(r,i(e),e,n,a)}function S(e,n){return t.equals(r,i(e),e,n)}function A(e,n){return t.intersects(r,i(e),e,n)}function D(e,n){return t.touches(r,i(e),e,n)}function L(e,n){return t.within(r,i(e),e,n)}function T(e,n){return t.disjoint(r,i(e),e,n)}function V(e,n){return t.overlaps(r,i(e),e,n)}function v(e,n,a){return t.relate(r,i(e),e,n,a)}function z(e){return t.isSimple(r,i(e),e)}function H(e){return t.simplify(r,i(e),e)}function I(e,n=!1){return t.convexHull(r,i(e),e,n)}function J(e,n){return t.difference(r,i(e),e,n)}function N(e,n){return t.symmetricDifference(r,i(e),e,n)}function O(e,n){return t.intersect(r,i(e),e,n)}function b(e,n=null){return t.union(r,i(e),e,n)}function j(e,n,a,s,c,u){return t.offset(r,i(e),e,n,a,s,c,u)}function q(e,n,a,s=!1){return t.buffer(r,i(e),e,n,a,s)}function B(e,n,a,s,c,u){return t.geodesicBuffer(r,i(e),e,n,a,s,c,u)}function C(e,n,a=!0){return t.nearestCoordinate(r,i(e),e,n,a)}function E(e,n){return t.nearestVertex(r,i(e),e,n)}function P(e,n,a,s){return t.nearestVertices(r,i(e),e,n,a,s)}function f(e){var n;return"xmin"in e?"center"in e?e.center:null:"x"in e?e:"extent"in e?((n=e.extent)==null?void 0:n.center)??null:null}function G(e,n,a){if(e==null)throw new o;const s=e.spatialReference;if((a=a??f(e))==null)throw new o;const c=e.constructor.fromJSON(t.rotate(e,n,a));return c.spatialReference=s,c}function $(e,n){if(e==null)throw new o;const a=e.spatialReference;if((n=n??f(e))==null)throw new o;const s=e.constructor.fromJSON(t.flipHorizontal(e,n));return s.spatialReference=a,s}function k(e,n){if(e==null)throw new o;const a=e.spatialReference;if((n=n??f(e))==null)throw new o;const s=e.constructor.fromJSON(t.flipVertical(e,n));return s.spatialReference=a,s}function F(e,n,a,s){return t.generalize(r,i(e),e,n,a,s)}function K(e,n,a){return t.densify(r,i(e),e,n,a)}function M(e,n,a,s=0){return t.geodesicDensify(r,i(e),e,n,a,s)}function Q(e,n){return t.planarArea(r,i(e),e,n)}function U(e,n){return t.planarLength(r,i(e),e,n)}function W(e,n,a){return t.geodesicArea(r,i(e),e,n,a)}function X(e,n,a){return t.geodesicLength(r,i(e),e,n,a)}function Y(e,n){return t.intersectLinesToPoints(r,i(e),e,n)}function Z(e,n){t.changeDefaultSpatialReferenceTolerance(e,n)}function _(e){t.clearDefaultSpatialReferenceTolerance(e)}class o extends Error{constructor(){super("Illegal Argument Exception")}}export{q as buffer,Z as changeDefaultSpatialReferenceTolerance,_ as clearDefaultSpatialReferenceTolerance,h as clip,R as contains,I as convexHull,x as crosses,w as cut,K as densify,J as difference,T as disjoint,y as distance,S as equals,g as extendedSpatialReferenceInfo,$ as flipHorizontal,k as flipVertical,F as generalize,W as geodesicArea,B as geodesicBuffer,M as geodesicDensify,X as geodesicLength,O as intersect,Y as intersectLinesToPoints,A as intersects,z as isSimple,C as nearestCoordinate,E as nearestVertex,P as nearestVertices,j as offset,V as overlaps,Q as planarArea,U as planarLength,v as relate,G as rotate,H as simplify,N as symmetricDifference,D as touches,b as union,L as within}; diff --git a/build/assets/geometryEngineAsync-BODJChyU.js b/build/assets/geometryEngineAsync-BODJChyU.js new file mode 100644 index 0000000..bcb12db --- /dev/null +++ b/build/assets/geometryEngineAsync-BODJChyU.js @@ -0,0 +1 @@ +import{Q as l,dh as f,di as d}from"./index-DKOmzAMm.js";function i(t){var r;return Array.isArray(t)?(r=t[0])==null?void 0:r.spatialReference:t==null?void 0:t.spatialReference}function w(t){return t&&(Array.isArray(t)?t.map(w):t.toJSON?t.toJSON():t)}function c(t){return Array.isArray(t)?t.map(r=>f(r)):f(t)}function m(t,r){let n;return Array.isArray(t)?n=t:(n=[],n.push(t),r!=null&&n.push(r)),n}let s;async function g(){return s||(s=d("geometryEngineWorker",{strategy:"distributed"})),s}async function e(t,r){return(await g()).invoke("executeGEOperation",{operation:t,parameters:w(r)})}async function x(t,r){return c(await e("clip",[i(t),t,r]))}async function O(t,r){return c(await e("cut",[i(t),t,r]))}function S(t,r){return e("contains",[i(t),t,r])}function J(t,r){return e("crosses",[i(t),t,r])}function N(t,r,n){return e("distance",[i(t),t,r,n])}function E(t,r){return e("equals",[i(t),t,r])}function R(t,r){return e("intersects",[i(t),t,r])}function v(t,r){return e("touches",[i(t),t,r])}function b(t,r){return e("within",[i(t),t,r])}function k(t,r){return e("disjoint",[i(t),t,r])}function D(t,r){return e("overlaps",[i(t),t,r])}function L(t,r,n){return e("relate",[i(t),t,r,n])}function j(t){return e("isSimple",[i(t),t])}async function B(t){return c(await e("simplify",[i(t),t]))}async function C(t,r=!1){return c(await e("convexHull",[i(t),t,r]))}async function G(t,r){return c(await e("difference",[i(t),t,r]))}async function H(t,r){return c(await e("symmetricDifference",[i(t),t,r]))}async function V(t,r){return c(await e("intersect",[i(t),t,r]))}async function W(t,r=null){const n=m(t,r);return c(await e("union",[i(n),n]))}async function $(t,r,n,a,u,o){return c(await e("offset",[i(t),t,r,n,a,u,o]))}async function q(t,r,n,a=!1){const u=[i(t),t,r,n,a];return c(await e("buffer",u))}async function z(t,r,n,a,u,o){const p=[i(t),t,r,n,a,u,o];return c(await e("geodesicBuffer",p))}async function F(t,r,n=!0){const a=await e("nearestCoordinate",[i(t),t,r,n]);return{...a,coordinate:l.fromJSON(a.coordinate)}}async function I(t,r){const n=await e("nearestVertex",[i(t),t,r]);return{...n,coordinate:l.fromJSON(n.coordinate)}}function A(t){var r;return"xmin"in t?t.center:"x"in t?t:(r=t.extent)==null?void 0:r.center}async function K(t,r,n){if(t==null)throw new y;const a=t.spatialReference;if((n=n??A(t))==null)throw new y;const u=t.constructor.fromJSON(await e("rotate",[a,t,r,n]));return u.spatialReference=a,u}async function M(t,r,n,a){return c(await e("generalize",[i(t),t,r,n,a]))}async function P(t,r,n){return c(await e("densify",[i(t),t,r,n]))}async function Q(t,r,n,a=0){return c(await e("geodesicDensify",[i(t),t,r,n,a]))}function T(t,r){return e("planarArea",[i(t),t,r])}function U(t,r){return e("planarLength",[i(t),t,r])}function Z(t,r,n){return e("geodesicArea",[i(t),t,r,n])}function _(t,r,n){return e("geodesicLength",[i(t),t,r,n])}class y extends Error{constructor(){super("Illegal Argument Exception")}}export{k as A,M as B,P as C,V as D,G as E,U as F,K as H,j as J,Z as K,q as L,_ as M,B as N,D as O,z as P,L as R,v as S,F as T,Q as U,I as V,T as W,W as b,N as d,E as g,R as h,C as j,H as k,J as m,S as p,$ as v,O as w,b as x,x as y}; diff --git a/build/assets/geometryEngineBase-RmbNeFm7.js b/build/assets/geometryEngineBase-RmbNeFm7.js new file mode 100644 index 0000000..92bc337 --- /dev/null +++ b/build/assets/geometryEngineBase-RmbNeFm7.js @@ -0,0 +1 @@ +import{o as pi}from"./_commonjsHelpers-DCkdB7M8.js";function yi(ct,gt){for(var lt=0;ltrt[_]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}var At={exports:{}};(function(ct,gt){function lt(){function _(e){if(typeof e=="number")return k.Tc.Zg(e);if(e==null)return null;if(kt[e]!=null)return k.Tc.Zg(kt[e]);throw Error("Unrecognised Unit Type")}function ut(e){if(typeof e=="number")return k.Tc.Zg(e);if(e==null)return null;if(Mt[e]!=null)return k.Tc.Zg(Mt[e]);throw Error("Unrecognised Unit Type")}function pt(e){if(e)switch(e){case"loxodrome":return 1;case"great-elliptic":return 2;case"normal-section":return 3;case"shape-preserving":return 4}return 0}function Y(e,v,f,r){if(f==null||f.B())return null;switch(f.getType()){case k.qn.Point:return e.exportPoint(v,f,r);case k.qn.Polygon:return e.exportPolygon(v,f,r);case k.qn.Polyline:return e.exportPolyline(v,f,r);case k.qn.MultiPoint:return e.exportMultipoint(v,f,r);case k.qn.Envelope:return e.exportExtent(v,f,r)}return null}function bt(e,v,f,r){if(f.getType()!==k.qn.Point)throw Error("Geometry not Point");return e.exportPoint(v,f,r)}function q(e,v,f){return e.convertToGEGeometry(v,f)}function F(e){var v=e.wkid;e=e.wkt2||e.wkt;var f=at.get(v||e);return f==null&&(v!==-1&&v!=null?(f=k.Eg.create(v),at.set(v,f)):e&&(f=k.Eg.qP(e),at.set(e,f)),ft.has(v||e)&&f.VW(ft.get(v||e))),f}function Nt(e){var v,f,r;if(e==null)return null;var n=F(e);return e=n.Hd(),n=n.Kn(),(v={}).tolerance=n,v.unitType=e==null?-1:e.od,v.unitID=e==null?-1:e.Ec(),v.unitBaseFactor=e==null?0:e.ai,v.unitSquareDerivative=e==null?0:(r=(f=k.Tc.aG(e))===null||f===void 0?void 0:f.Ec())!==null&&r!==void 0?r:0,v}function It(e,v,f,r){return f==null?null:(f=k.$b.clip(q(e,P,f),q(e,P,r),F(v)),Y(e,P,f,v))}function Tt(e,v,f,r){f=k.$b.dl(q(e,P,f),q(e,P,r),F(v)),r=[];for(var n=0;n>6)>>1},r.Rn=function(n){return!!(32&n)},r.US=function(n){return!!(128&n)},r.yd=function(n){return!!(256&n)},r.xj=function(n){return!!(512&n)},r.Hc=function(n){return!!(1024&n)},r.prototype.Of=function(){var n=this.Ia();return this.copyTo(n),n},r.prototype.mg=function(){return null},r.jg=function(n){var t=n.Ia();return n.copyTo(t),t},r.prototype.vc=function(){0<=this.VA&&(this.VA+=2147483649)},r.Ax=function(n){var t=n.getType();if(r.xj(t))return n.I();if(n.B())return 0;if(t==197)return 4;if(t==33)return 1;if(r.yd(t))return 2;throw e.i.fa("missing type")},r}();e.aa=f})(k||(k={})),it=k||(k={}),jt=function(){function e(){this.y=this.x=0}return e.construct=function(v,f){var r=new e;return r.x=v,r.y=f,r},e.al=function(v){var f=new e;return f.x=v.x,f.y=v.y,f},e.prototype.ma=function(v,f){this.x=v,this.y=f},e.prototype.L=function(v){this.x=v.x,this.y=v.y},e.prototype.fq=function(v,f){return this.x===v&&this.y===f},e.prototype.Rz=function(v){return 2220446049250313e-31>=Math.abs(this.x-v.x)&&2220446049250313e-31>=Math.abs(this.y-v.y)},e.prototype.qb=function(v){return this.x===v.x&&this.y===v.y},e.prototype.Nb=function(v){return v==this||v instanceof e&&this.x==v.x&&this.y==v.y},e.prototype.sub=function(v){this.x-=v.x,this.y-=v.y},e.prototype.uc=function(v,f){this.x=v.x-f.x,this.y=v.y-f.y},e.prototype.add=function(v,f){f!==void 0?(this.x=v.x+f.x,this.y=v.y+f.y):(this.x+=v.x,this.y+=v.y)},e.prototype.Sq=function(){this.x=-this.x,this.y=-this.y},e.prototype.mt=function(v){this.x=-v.x,this.y=-v.y},e.prototype.NS=function(v,f,r){this.x=v.x*(1-r)+f.x*r,this.y=v.y*(1-r)+f.y*r},e.prototype.Ct=function(v,f){this.x=this.x*v+f.x,this.y=this.y*v+f.y},e.prototype.HW=function(v,f,r){this.x=f.x*v+r.x,this.y=f.y*v+r.y},e.prototype.scale=function(v){this.x*=v,this.y*=v},e.prototype.compare=function(v){return this.yv.y?1:this.xv.x?1:0},e.prototype.normalize=function(){var v=this.length();v==0&&(this.x=1,this.y=0),this.x/=v,this.y/=v},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.Sk=function(){return this.x*this.x+this.y*this.y},e.tb=function(v,f){return Math.sqrt(this.yc(v,f))},e.Oy=function(v,f,r,n){return v-=r,f-=n,Math.sqrt(v*v+f*f)},e.prototype.Qh=function(v){return this.x*v.x+this.y*v.y},e.prototype.fD=function(v){return Math.abs(this.x*v.x)+Math.abs(this.y*v.y)},e.prototype.wi=function(v){return this.x*v.y-this.y*v.x},e.prototype.Bt=function(v,f){var r=-this.x*f+this.y*v;this.x=this.x*v+this.y*f,this.y=r},e.prototype.Hv=function(){var v=this.x;this.x=-this.y,this.y=v},e.prototype.MG=function(v){this.x=-v.y,this.y=v.x},e.prototype.ar=function(){var v=this.x;this.x=this.y,this.y=-v},e.prototype.qu=function(){return 0(v=v.wi(f))?1:0(r=n.value())?-1:0r?-1:0=t?r+(n-r)*t:n-(n-r)*(1-t)},f.OG=function(r,n,t,i){.5>=t?(i.x=r.x+(n.x-r.x)*t,i.y=r.y+(n.y-r.y)*t):(i.x=n.x-(n.x-r.x)*(1-t),i.y=n.y-(n.y-r.y)*(1-t))},f.lT=function(r,n,t,i,h,s){.5>=h?(s.x=r+(t-r)*h,s.y=n+(i-n)*h):(s.x=t-(t-r)*(1-h),s.y=i-(i-n)*(1-h))},f}()}(k||(k={})),function(e){var v=function(f){function r(){var n=f.call(this)||this;return n.sa=0,n.na=0,n.pa=0,n.la=0,n.ka=null,n}return J(r,f),r.prototype.ac=function(){return e.h.construct(this.sa,this.na)},r.prototype.Yp=function(n){n.x=this.sa,n.y=this.na},r.prototype.Dc=function(n){this.em(0,n)},r.prototype.ZB=function(n,t){this.em(0,e.h.construct(n,t))},r.prototype.To=function(n){this.hD(0,n)},r.prototype.setStart=function(n){this.uD(0,n)},r.prototype.wv=function(n,t){return this.Od(0,n,t)},r.prototype.YB=function(n,t,i){this.tn(0,n,t,i)},r.prototype.wc=function(){return e.h.construct(this.pa,this.la)},r.prototype.Tr=function(n){n.x=this.pa,n.y=this.la},r.prototype.Qc=function(n){this.em(1,n)},r.prototype.Ql=function(n,t){this.em(1,e.h.construct(n,t))},r.prototype.Po=function(n){this.hD(1,n)},r.prototype.setEnd=function(n){this.uD(1,n)},r.prototype.gv=function(n,t){return this.Od(1,n,t)},r.prototype.OB=function(n,t,i){this.tn(1,n,t,i)},r.prototype.Db=function(){return 1},r.prototype.B=function(){return this.Ac()},r.prototype.Oa=function(){},r.prototype.Ke=function(){return 0},r.prototype.Ea=function(n,t,i,h,s){return this.KM(n,t,i,h,s)},r.prototype.isIntersecting=function(n,t){return this.zr(n,t,!1)!=0},r.prototype.qs=function(n,t){return this.ru(n,t,!1)},r.prototype.ru=function(){return null},r.prototype.Ac=function(){return!1},r.prototype.ay=function(n){if(this.vc(),this.ka==null&&0=e.ra.Va(t))throw e.i.ce();var h=this.description.Pf(t);return 0<=h?(this.ka!=null&&this.ay(this.description.Ae.length-2),this.ka[r.Gg(this.description,n)+this.description.$j(h)-2+i]):e.ra.se(t)},r.prototype.tn=function(n,t,i,h){if(this.vc(),i>=e.ra.Va(t))throw e.i.ce();var s=this.description.Pf(t);0>s&&(this.re(t),s=this.description.Pf(t)),t==0?n!=0?i!=0?this.la=h:this.pa=h:i!=0?this.na=h:this.sa=h:(this.ka==null&&this.ay(this.description.Ae.length-2),this.ka[r.Gg(this.description,n)+this.description.$j(s)-2+i]=h)},r.prototype.copyTo=function(n){if(n.getType()!=this.getType())throw e.i.N();n.description=this.description,n.ay(this.description.Ae.length-2),r.gM(this.ka,n.ka,2*(this.description.Ae.length-2)),n.sa=this.sa,n.na=this.na,n.pa=this.pa,n.la=this.la,n.vc(),this.op(n)},r.prototype.Tg=function(n,t){var i=new e.Nc;return this.Ac()?(i.Oa(),i):(i.oa=this.Od(0,n,t),i.va=i.oa,i.Lk(this.Od(1,n,t)),i)},r.prototype.ZI=function(n){this.Ac()?n.Oa():(n.oa=this.Od(0,0,0),n.va=n.oa,n.Lk(this.Od(1,0,0)))},r.prototype.Tw=function(n,t){t.Nf(this.description),t.Cb(this.hc(n));for(var i=1,h=this.description.Aa;it||t>=this.wa)throw e.i.fa("index out of bounds");this.mc(),i.Nf(this.description),i.B()&&i.un();for(var h=0;ht||t>=this.I())throw e.i.ce();this.mc(),this.za[0].tc(2*t,i)},n.prototype.Na=function(t){var i=new e.h;return this.D(t,i),i},n.prototype.Gc=function(t,i){this.za[0].tc(2*t,i)},n.prototype.Cb=function(t,i,h){if(0>t||t>=this.wa)throw e.i.ce();this.mc();var s=this.za[0];h!==void 0?(s.write(2*t,i),s.write(2*t+1,h)):s.Tt(2*t,i),this.Pc(1993)},n.prototype.Cz=function(){if(void 0>=this.I())throw e.i.ce();this.mc();var t=this.za[0],i=new e.Nd;return i.x=t.read(NaN),i.y=t.read(NaN),i.z=this.hasAttribute(1)?this.za[1].eg():e.ra.se(1),i},n.prototype.dC=function(t){if(0>t||t>=this.I())throw e.i.ce();this.re(1),this.mc(),this.Pc(1993);var i=this.za[0];i.write(2*t,(void 0).x),i.write(2*t+1,(void 0).y),this.za[1].pr(t,(void 0).z)},n.prototype.Uc=function(t,i,h){if(0>i||i>=this.wa)throw e.i.ce();var s=e.ra.Va(t);if(h>=s)throw e.i.ce();this.mc();var o=this.description.Pf(t);return 0<=o?this.za[o].eg(i*s+h):e.ra.se(t)},n.prototype.yF=function(t,i){return this.Uc(t,i)},n.prototype.setAttribute=function(t,i,h,s){if(0>i||i>=this.wa)throw e.i.ce();var o=e.ra.Va(t);if(h>=o)throw e.i.ce();this.re(t),this.mc(),t=this.description.Pf(t),this.Pc(1993),this.za[t].pr(i*o+h,s)},n.prototype.ub=function(t){return this.wx(),this.re(t),this.mc(),this.za[this.description.Pf(t)]},n.prototype.hn=function(t,i){if(i!=null&&e.ra.Tp(t)!=i.Tp())throw e.i.N();this.re(t),t=this.description.Pf(t),this.za==null&&(this.za=e.Yc.qI(this.description.Aa)),this.za[t]=i,this.Pc(16777215)},n.prototype.sn=function(t){var i=null;if(this.za!=null){var h=e.ee.Iw(t,this.description);i=[];for(var s=0,o=t.Aa;sthis.wa+5?(5*this.wa+3)/4:this.wa),this.za[t].resize(s*h,e.ra.se(i))),st)throw e.i.N();t!=this.wa&&(this.wa=t,this.Pc(65535))},n.prototype.om=function(t){if(!this.ak(1)){if(!this.ak(2))return 0;if(this.QT>=t)return this.ak(8)?1:2}return-1},n.prototype.Ch=function(t,i){if(this.QT=i,t==-1)this.Lf(1,!0),this.Lf(8,!0);else if(this.Lf(1,!1),this.Lf(8,!0),t==0)this.Lf(2,!1),this.Lf(4,!1);else if(t==1)this.Lf(2,!0),this.Lf(4,!1);else{if(t!=2)throw e.i.fa("internal error.");this.Lf(2,!0),this.Lf(4,!0)}},n.prototype.lM=function(){this.Bb!=null&&(this.Bb=null)},n.prototype.kD=function(t,i,h,s){if(0>t||t>=this.wa||0>i||i>=this.wa)throw e.i.fa("index out of bounds");this.mc(),s.Nf(this.description),s.B()&&s.un();for(var o=0;ot||t>=this.wa)throw e.i.ce();this.mc();var i=new e.Sa;i.Nf(this.description),i.B()&&i.un();for(var h=0;ht||t>=this.wa)throw e.i.ce();if(i.B())throw e.i.N();this.mc();for(var h=i.description,s=0;se.O.bB(this.Tm)>>1:n!=-1)?r=n:i=o,n=!0;;){if(0>i){if((o=s[7*r])==-1){i=r,t=this.ob.Ll([-1,-1,r,t,this.gl(),-1,-1]),(s=this.ob.o)[7*r]=t;break}r=o}else{if((o=s[7*r+1])==-1){i=s[7*r+6],t=this.ob.Ll([-1,-1,r,t,this.gl(),-1,-1]),(s=this.ob.o)[7*r+1]=t;break}r=o}n&&(i*=-1,n=!1)}return this.oy(t,s),s[7*t+2]===-1&&(s[7*h]=t),this.vp(i,t,h,s),t},f.prototype.FF=function(){return this.iR(this.Qe)},f.prototype.vd=function(r,n){n=n==-1?this.Qe:n,this.Rv?this.LP(r,n):this.iY(r,n)},f.prototype.search=function(r,n){for(n=this.sv(n);n!=-1;){var t=this.Zn.compare(this,r,n);if(t==0)return n;n=0>t?this.ll(n):this.Xp(n)}return-1},f.prototype.IW=function(r){for(var n=this.sv(-1),t=-1;n!=-1;){var i=r.compare(this,n);if(i==0)return n;0>i?n=this.ll(n):(t=n,n=this.Xp(n))}return t},f.prototype.uJ=function(r){for(var n=this.sv(-1),t=-1;n!=-1;){var i=r.compare(this,n);if(i==0)return n;0>i?(t=n,n=this.ll(n)):n=this.Xp(n)}return t},f.prototype.ja=function(r){return this.ob.T(r,3)},f.prototype.ll=function(r){return this.ob.T(r,0)},f.prototype.Xp=function(r){return this.ob.T(r,1)},f.prototype.getParent=function(r){return this.ob.T(r,2)},f.prototype.lb=function(r){return this.ob.T(r,6)},f.prototype.we=function(r){return this.ob.T(r,5)},f.prototype.rc=function(r){return r==-1?this.kl(this.Qe):this.kl(r)},f.prototype.Fc=function(r){return r==-1?this.Zr(this.Qe):this.Zr(r)},f.prototype.ZR=function(r){return r==-1?this.bG(this.Qe):this.bG(r)},f.prototype.Sj=function(r,n){this.NB(r,n)},f.prototype.sv=function(r){return r==-1?this.YF(this.Qe):this.YF(r)},f.prototype.clear=function(){this.ob.mj(!1),this.Qe=-1},f.prototype.size=function(r){return r==-1?this.$F(this.Qe):this.$F(r)},f.prototype.KN=function(r,n){for(var t=n[7*r],i=n[7*r+1],h=n[7*r+4];t!=-1||i!=-1;){var s=t!=-1?n[7*t+4]:2147483647;if(i=i!=-1?n[7*i+4]:2147483647,h<=Math.min(s,i))break;s<=i?this.sJ(t,n):this.rJ(r,n),t=n[7*r],i=n[7*r+1]}},f.prototype.oy=function(r,n){if(this.Rv)for(var t=n[7*r+4],i=n[7*r+2];i!=-1&&n[7*i+4]>t;)n[7*i]==r?this.sJ(r,n):this.rJ(i,n),i=n[7*r+2]},f.prototype.rJ=function(r,n){var t=n[7*r+1];n[7*t+2]=n[7*r+2],n[7*r+2]=t;var i=n[7*t];n[7*r+1]=i,i!=-1&&(n[7*i+2]=r),n[7*t]=r,(i=n[7*t+2])!=-1&&(n[7*i]==r?n[7*i]=t:n[7*i+1]=t)},f.prototype.sJ=function(r,n){var t=n[7*r+2];n[7*r+2]=n[7*t+2],n[7*t+2]=r;var i=n[7*r+1];n[7*t]=i,i!=-1&&(n[7*i+2]=t),n[7*r+1]=t,(i=n[7*r+2])!=-1&&(n[7*i]===t?n[7*i]=r:n[7*i+1]=r)},f.prototype.Pk=function(r,n){this.ob.S(r,2,n)},f.prototype.TB=function(r,n){this.ob.S(r,0,n)},f.prototype.XB=function(r,n){this.ob.S(r,1,n)},f.prototype.WB=function(r,n){this.ob.S(r,5,n)},f.prototype.ex=function(r,n){this.ob.S(r,6,n)},f.prototype.XJ=function(r,n){this.ob.S(n,0,r)},f.prototype.rX=function(r){this.ob.S(r,4,0)},f.prototype.uX=function(r,n){this.ob.S(n,5,r)},f.prototype.YF=function(r){return r==-1?-1:this.ob.T(r,0)},f.prototype.kl=function(r){return r==-1?-1:this.ob.T(r,1)},f.prototype.Zr=function(r){return r==-1?-1:this.ob.T(r,2)},f.prototype.iR=function(r){return r==-1?-1:this.ob.T(r,3)},f.prototype.$F=function(r){return r==-1?0:this.ob.T(r,4)},f.prototype.bG=function(r){return this.ob.T(r,5)},f.prototype.Pw=function(){return this.ob.Ll([-1,-1,-1,void 0,this.gl(),-1,-1])},f.prototype.fl=function(r){r!=-1&&this.ob.jd(r)},f.prototype.gl=function(){return this.Tm=e.O.bB(this.Tm),1073741823&this.Tm},f.prototype.FD=function(r,n,t){var i=this.ob.o;if(t==-1||i[7*t]==-1)return r=this.ob.Ll([-1,-1,-1,r,this.gl(),-1,-1]),(i=this.ob.o)[7*t]=r,this.vp(-1,r,t,i),r;for(var h=t==-1?-1:i[7*t];;){var s=n==-1?1:this.Zn.compare(this,r,h);if(0>s){if((s=this.ll(h))==-1){n=h,r=this.ob.Ll([-1,-1,h,r,this.gl(),-1,-1]),(i=this.ob.o)[7*h]=r;break}h=s}else{if(n==1&&s==0)return i[7*t+3]=h,-1;if((s=i[7*h+1])==-1){n=i[7*h+6],r=this.ob.Ll([-1,-1,h,r,this.gl(),-1,-1]),(i=this.ob.o)[7*h+1]=r;break}h=s}}return this.oy(r,i),i[7*r+2]===-1&&(i[7*t]=r),this.vp(n,r,t,i),r},f.prototype.vp=function(r,n,t,i){if(r!=-1){var h=i[7*r+5];i[7*r+5]=n}else h=t==-1?-1:i[7*t+2];i[7*n+5]=h,h!=-1&&(i[7*h+6]=n),i[7*n+6]=r,r==(t==-1?-1:i[7*t+1])&&(i[7*t+1]=n),r==-1&&(i[7*t+2]=n),i[7*t+4]=(t==-1?0:i[7*t+4])+1},f.prototype.AB=function(r,n){var t=this.ob.o,i=t[7*r+5];r=t[7*r+6],i!=-1?t[7*i+6]=r:t[7*n+1]=r,r!=-1?t[7*r+5]=i:t[7*n+2]=i,t[7*n+4]=n===-1?-1:t[7*n+4]-1},f.prototype.iY=function(r,n){this.AB(r,n);var t=this.ll(r),i=this.Xp(r),h=this.getParent(r),s=r;if(t!=-1&&i!=-1){this.Tm=e.O.bB(this.Tm);var o=1073741823=r.oa:r.va>=this.oa},f.prototype.move=function(r){this.B()||(this.oa+=r,this.va+=r)},f.prototype.normalize=function(){if(!isNaN(this.oa)){if(this.oa>this.va){var r=this.oa;this.oa=this.va,this.va=r}isNaN(this.va)&&this.Oa()}},f.prototype.Oa=function(){this.va=this.oa=NaN},f.prototype.B=function(){return isNaN(this.oa)},f.prototype.Zb=function(r){typeof r=="number"?this.B()?this.va=this.oa=r:this.Lk(r):r.B()||(this.B()?(this.oa=r.oa,this.va=r.va):(this.oa>r.oa&&(this.oa=r.oa),this.vathis.va&&this.Oa()))},f.prototype.Lk=function(r){rthis.va&&(this.va=r)},f.prototype.contains=function(r){return typeof r=="number"?r>=this.oa&&r<=this.va:r.oa>=this.oa&&r.va<=this.va},f.prototype.Ea=function(r){this.B()||r.B()?this.Oa():(this.oar.va&&(this.va=r.va),this.oa>this.va&&this.Oa())},f.prototype.W=function(r){this.B()||(this.oa-=r,this.va+=r,this.van?(this.oa=n,this.va=r):(this.oa=r,this.va=n)},f.prototype.It=function(r){return e.O.Rk(r,this.oa,this.va)},f.prototype.R=function(){return this.va-this.oa},f.prototype.sf=function(){return .5*(this.oa+this.va)},f.prototype.Nb=function(r){return r==this||r instanceof f&&(!(!this.B()||!r.B())||this.oa==r.oa&&this.va==r.va)},f.prototype.cc=function(){return e.O.uj(e.O.uj())},f}();e.Nc=v}(k||(k={})),function(e){var v=new e.Nc,f=new e.Nc,r=function(){this.ne=null,this.pb=-1,this.sb=new e.yb,this.qA=55555555,this.Tv=this.Vv=!1,this.Uf=new e.Nc,this.Uf.KB(0,0)};e.IY=r;var n=function(){function t(i,h,s){this.g=i,this.Hk=NaN,this.NH=this.Kq=0,this.OH=NaN,this.qa=h,this.Nq=10*h,this.PH=this.QH=NaN,this.rg=!1,this.Dm=this.gt=this.Lo=this.Xs=this.Ws=-1,this.gA=s,this.TA=new r,this.YH=new r,e.O.truncate(3*i.fd/2)}return t.prototype.mG=function(i,h,s,o){i.ne=o===null?null:o[s[5*h]],i.Tv=i.ne!=null,i.Tv||((o=s[5*h+2])!==-1&&this.g.mW(s[5*h],s[5*o],i.sb),i.ne=i.sb,i.Uf.KB(i.sb.sa,i.sb.pa),i.Uf.va+=this.qa,i.sb.rI(),i.Vv=i.sb.la==i.sb.na,i.Vv||(i.qA=(i.sb.pa-i.sb.sa)/(i.sb.la-i.sb.na)))},t.prototype.OO=function(i,h){var s=i.zr(h,this.qa,!0);return s!=0?s==2?this.Qy():this.xi():(i.Yp(ht),i.Tr(et),h.Yp(st),h.Tr(ot),Q.ma(this.Kq,this.Hk),ht.qb(st)&&this.Hk==ht.y?0>et.compare(ot)?Q.L(et):Q.L(ot):ht.qb(ot)&&this.Hk==ht.y?0>et.compare(st)?Q.L(et):Q.L(st):st.qb(et)&&this.Hk==st.y?0>ht.compare(ot)?Q.L(ht):Q.L(ot):et.qb(ot)&&this.Hk==et.y&&(0>ht.compare(st)?Q.L(ht):Q.L(st)),i.Pe(Q.y,Q.x)s&&0>i?-1:0h.pa){if(h.pa>h.sa&&h.la-h.na<2*this.qa&&i.vi(h.pa,h.la,this.qa))return this.xi()}else if((h.la-h.na)/(h.pa-h.sa)*(i.pa-i.sa)h.sa&&h.la-h.na<2*this.qa&&i.vi(h.pa,h.la,this.qa))return this.xi()}else if((h.la-h.na)/(h.pa-h.sa)*(i.sa-i.pa)o&&0>s?-1:0h+u?s:o.vi(i.sa,i.na,this.qa)?this.xi():ah+u?s:o.vi(i.pa,i.la,this.qa)?this.xi():aa?1:0)},t.prototype.Kr=function(){this.rg=!1},t.prototype.rm=function(){return this.Ni},t.prototype.$J=function(i,h){this.Hk=i,this.Kq=h,this.gt=this.Lo=this.Xs=this.Ws=-1},t.prototype.compare=function(i,h,s){return this.rg?-1:(i=i.ja(s),this.Dm=s,this.RE(h,h,i,i))},t.prototype.RE=function(i,h,s,o){if(this.Lo==h)var a=this.TA;else this.Lo=h,a=this.TA,this.TA.pb=i,this.mG(a,h,this.g.td.o,this.g.We);if(u==null){this.gt=o;var u=this.YH;this.YH.pb=s,this.mG(u,o,this.g.td.o,this.g.We)}return a.Tv||u.Tv?this.NO(h,o,a,u):a.Uf.vathis.Uf.va)return 1;if(this.ie.na==this.ie.la)return this.Dm=r,this.rg=!0,0;this.ie.rI(),t=this.ie.ac(),(n=new e.h).uc(this.ie.wc(),t),n.ar();var i=new e.h;return i.uc(this.Gq,t),t=n.Qh(i),(t/=n.length())<10*-this.qa?-1:t>10*this.qa?1:this.ie.qs(this.Gq,this.qa)&&((n=Math.abs(t))t?-1:1},f}();e.aM=v}(k||(k={})),function(e){function v(r,n,t,i){t=new Float64Array(r.subarray(t,i)),r.set(t,n)}var f=function(){function r(n){this.Pb=this.pk=!1,this.o=null;var t=n;2>t&&(t=2),this.o=new Float64Array(t),this.size=n}return r.prototype.rotate=function(n,t,i){if(this.Pb)throw e.i.fa("invalid_call");if(ti||n>i)throw e.i.N();n!=t&&i!=t&&(this.ni(n,t-n,1),this.ni(t,i-t,1),this.ni(n,i-n,1))},r.qf=function(n,t){var i=new r(n),h=i.o;if(2>n&&(n=2),t!==0)for(var s=0;st&&(i.size=t),2>(t=i.size)&&(t=2),i.o=new Float64Array(t),i.o.set(n.o.length<=t?n.o:n.o.subarray(0,t),0),i},r.prototype.Jb=function(n){0>=n||(this.o==null?this.o=new Float64Array(n):n<=this.o.length||(0this.o.length&&(i=e.O.truncate(64>n?Math.max(2*n,4):5*n/4),(i=new Float64Array(i)).set(this.o),this.o=i),i=this.o;for(var h=this.size;hthis.o.length)&&this.resize(n),this.pk)throw e.i.fa("invalid call. Attribute Stream is locked and cannot be resized.");this.size=n},r.prototype.pr=function(n,t){this.write(n,t)},r.prototype.An=function(n,t,i){for(var h=this.size;th||i>s&&h!=s)return!1;for(i>h&&(i=h);ts||i%s!=0))throw e.i.N();var o=this.size;if(this.resize(o+i),h)this.o.set(n.o.subarray(t,t+i),o);else{h=i;for(var a=0;ao||h%o!=0))throw e.i.N();var u=this.size-a;if(uo&&(o=this.size),this.size+2*h>this.o.length?this.resize(this.size+2*h):this.size+=2*h,v(this.o,n+2*h,n,n+(o-n)),s)for(s=0;sn||0>t||0>h||!s&&(0>=o||t%o!=0)||i.sizethis.size)throw e.i.Hb();0i||t%i!=0)throw e.i.Hb();for(var h=t>>1,s=0;st||0>i||0>t||i+t>this.size)throw e.i.N();for(var h=t;hn||0>t||0>h)throw e.i.N();if(t!=0)for(this.size<(t<<1)+n&&this.resize((t<<1)+n),s||(n+=t-1<<1),s=s?2:-2,t+=h;hn||0>t)throw e.i.N();if(t!=0){this.size<(t<<1)+n&&this.resize((t<<1)+n),t+=0;for(var h=0;hn||0>t||0>h||this.sizen||0>t||this.size<(t>>1)+n)throw e.i.N();if(t!=0){t=0+t;for(var h=0;ht&&(t=2),this.o=new Int32Array(t),this.size=n}return r.prototype.rotate=function(n,t,i){if(this.Pb)throw e.i.fa("invalid_call");if(ti||n>i)throw e.i.N();n!=t&&i!=t&&(this.ni(n,t-n,1),this.ni(t,i-t,1),this.ni(n,i-n,1))},r.qf=function(n,t){var i=new r(n),h=i.o;if(2>n&&(n=2),t!==0)for(var s=0;st&&(i.size=t),2>(t=i.size)&&(t=2),i.o=new Int32Array(t),i.o.set(n.o.length<=t?n.o:n.o.subarray(0,t),0),i},r.prototype.Jb=function(n){0>=n||(this.o==null?this.o=new Int32Array(n):n<=this.o.length||(0this.o.length&&(i=e.O.truncate(64>n?Math.max(2*n,4):5*n/4),(i=new Int32Array(i)).set(this.o),this.o=i),i=this.o;for(var h=this.size;hthis.o.length)&&this.resize(n),this.pk)throw e.i.fa("invalid call. Attribute Stream is locked and cannot be resized.");this.size=n},r.prototype.pr=function(n,t){this.write(n,t)},r.prototype.An=function(n,t,i){for(var h=this.size;th||i>s&&h!=s)return!1;for(i>h&&(i=h);ts||i%s!=0))throw e.i.N();var o=this.size;if(this.resize(o+i),h)this.o.set(n.o.subarray(t,t+i),o);else{h=i;for(var a=0;ao||h%o!=0))throw e.i.N();if(v(this.o,n+h,n,n+(a-n)),this.o==t.o&&no&&(o=this.size),this.size+2*h>this.o.length?this.resize(this.size+2*h):this.size+=2*h,v(this.o,n+2*h,n,n+(o-n)),s)for(s=0;sn||0>t||0>h||!s&&(0>=o||t%o!=0)||i.sizethis.size)throw e.i.Hb();0i||t%i!=0)throw e.i.Hb();for(var h=t>>1,s=0;st||0>i||0>t||i+t>this.size)throw e.i.N();for(var h=t;hn||0>t||0>h)throw e.i.N();if(t!=0)for(this.size<(t<<1)+n&&this.resize((t<<1)+n),s||(n+=t-1<<1),s=s?2:-2,t+=h;hn||0>t||0>h||this.sizet-n?r.rG(this.o,n,t,i):r.qB(this.o,n,t-1,i)},r.prototype.Tp=function(){return 2},r.prototype.Fc=function(){return this.o[this.size-1]},r.prototype.If=function(){this.resize(this.size-1)},r.prototype.bX=function(n){this.o[this.size-1]=n},r.prototype.SV=function(n){n=t&&0=i))for(;;){if(9>i-t){r.rG(n,t,i+1,h);break}var s=n[t];r.tx(n,t,i);for(var o=t,a=t;a=h(n[a],s)&&(r.tx(n,o,a),o+=1);r.tx(n,o,i),o-tt&&(t=2),this.o=new Int8Array(t),this.size=n}return r.prototype.rotate=function(n,t,i){if(this.Pb)throw e.i.fa("invalid_call");if(ti||n>i)throw e.i.N();n!=t&&i!=t&&(this.ni(n,t-n,1),this.ni(t,i-t,1),this.ni(n,i-n,1))},r.qf=function(n,t){var i=new r(n),h=i.o;if(2>n&&(n=2),t!==0)for(var s=0;st&&(i.size=t),2>(t=i.size)&&(t=2),i.o=new Int8Array(t),i.o.set(n.o.length<=t?n.o:n.o.subarray(0,t),0),i},r.prototype.Jb=function(n){0>=n||(this.o==null?this.o=new Int8Array(n):n<=this.o.length||(0this.o.length&&(i=e.O.truncate(64>n?Math.max(2*n,4):5*n/4),(i=new Int8Array(i)).set(this.o),this.o=i),i=this.o;for(var h=this.size;hthis.o.length)&&this.resize(n),this.pk)throw e.i.fa("invalid call. Attribute Stream is locked and cannot be resized.");this.size=n},r.prototype.pr=function(n,t){this.write(n,t)},r.prototype.An=function(n,t,i){for(var h=this.size;th||i>s&&h!=s)return!1;for(i>h&&(i=h);ts||i%s!=0))throw e.i.N();var o=this.size;if(this.resize(o+i),h)this.o.set(n.o.subarray(t,t+i),o);else{h=i;for(var a=0;ao||h%o!=0))throw e.i.N();if(v(this.o,n+h,n,n+(a-n)),this.o==t.o&&no&&(o=this.size),this.size+2*h>this.o.length?this.resize(this.size+2*h):this.size+=2*h,v(this.o,n+2*h,n,n+(o-n)),s)for(s=0;sn||0>t||0>h||!s&&(0>=o||t%o!=0)||i.sizethis.size)throw e.i.Hb();0i||t%i!=0)throw e.i.Hb();for(var h=t>>1,s=0;st||0>i||0>t||i+t>this.size)throw e.i.N();for(var h=t;hn||0>t||0>h)throw e.i.N();if(t!=0)for(this.size<(t<<1)+n&&this.resize((t<<1)+n),s||(n+=t-1<<1),s=s?2:-2,t+=h;hn||0>t||0>h||this.sizer?-r:r},f.ti=function(r){return 3552713678800501e-30>r},f.KC=function(r,n,t){return f.P(r-n)<=t*(1+(f.P(r)+f.P(n))/2)},f.Y=function(r,n){return f.KC(r,n,3552713678800501e-30)},f.FL=function(r){return 3552713678800501e-30>=f.P(r)},f.Cd=function(r){return f.FL(r)},f}();e.s=v,e.F=function(){function f(){}return f.gp=function(r,n){var t=0;return(r=v.P(r))+(n=v.P(n))!=0&&(r>n?(t=n/r,t=r*Math.sqrt(1+t*t)):(t=r/n,t=n*Math.sqrt(1+t*t))),t},f.Wq=function(r,n,t,i,h){for(var s=[0,0,0],o=[0,0,0],a=0;2>=a;a++)n[a]-=r[a],t[a]-=n[a];t=s[1]*o[2]-s[2]*o[1],n=s[2]*o[0]-s[0]*o[2],s=s[0]*o[1]-s[1]*o[0],r=-1*(t*r[0]+n*r[1]+s*r[2]),i[0]=t,i[1]=n,i[2]=s,i[3]=r,o=f.on(i),i[0]/=o,i[1]/=o,i[2]/=o,i[3]/=o,h!=0&&(o=v.Cd(s)?v.Cd(r)?v.Mb(1,n):-v.Mb(1,r):v.Mb(1,s),o*=v.Mb(1,h),i[0]*=o,i[1]*=o,i[2]*=o,i[3]*=o)},f.zx=function(r,n,t){t[0]=r[1]*n[2]-n[1]*r[2],t[1]=r[2]*n[0]-n[2]*r[0],t[2]=r[0]*n[1]-n[0]*r[1]},f.St=function(r,n){return r[0]*n[0]+r[1]*n[1]+r[2]*n[2]},f.on=function(r){return f.gp(f.gp(r[0],r[1]),r[2])},f.cl=function(r,n,t,i,h,s,o,a){r=f.n(r,n,t);var u=Math.cos(t);s.u=(r+h)*u*Math.cos(i),o.u=(r+h)*u*Math.sin(i),a.u=(r*(1-n)+h)*Math.sin(t)},f.jO=function(r,n,t,i,h,s,o){var a=f.gp(n,t),u=1*Math.sqrt(1-r),c=u/1;if(v.Y(a,0))s.u=0,h.u=v.Mb(1.570796326794897,i),o.u=v.P(i)-u;else{s.u=Math.atan2(t,n),t=Math.atan2(1*i,u*a),s=Math.cos(t);var l=Math.sin(t);n=u*r/(1-r),r*=1,t=Math.atan2(i+n*l*l*l,a-r*s*s*s),3.141592653589793r){var t=Math.sqrt(1-r),i=(1-t)/(1+t),h=i*i,s=i*h,o=i*s,a=i*o,u=i*a,c=i*u,l=1.572916666666667*s-3.2578125*a+4.295068359375*c;r=2.142578125*o-6.071484375*u,t=3.129296875*a-11.249837239583334*c;var p=4.775276692708333*u,y=7.958636765252976*c,d=Math.cos(2*n);return n+Math.sin(2*n)*(1.5*i-.84375*s+.525390625*a-.2688395182291667*c-l+t-y+d*(2*(1.3125*h-1.71875*o+1.650146484375*u)-4*r+6*p+d*(4*l-12*t+24*y+d*(8*r-32*p+d*(16*t-80*y+d*(32*p+64*d*y))))))}for(t=1-r,i=r/2,s=(h=v.P(n))*f.Zu(r)/(1.570796326794897*t),o=9999,u=h,h=0;1e-16h;h++)c=f.w(r,u),a=u-(l=(a=(f.kG(u,r)-i*Math.sin(2*u)/c)/t-s)/(c=1/(c*c*c))),o=v.P(l),u=a;return 0<=n?u:-u},f.qW=function(r,n){return v.ti(n)?r:r*f.Zu(n)/1.570796326794897},f.ba=function(r){return 0>(r=f.pF(r,6.283185307179586))?r+6.283185307179586:3.141592653589793>v.P(r)||v.Y(v.P(r),3.141592653589793)?r:r-6.283185307179586},f.pF=function(r,n){return r-Math.floor(r/n)*n},f.Ah=function(r,n){if(.006884661117170036>n){var t=(n=(1-(n=Math.sqrt(1-n)))/(1+n))*n,i=t*t;return r/(1+n)*(1+.25*t+.015625*i+.00390625*t*i)*1.570796326794897}return r*f.Zu(n)},f.Vq=function(r,n){var t=v.Mb(1,Math.sin(n));return n=1.570796326794897>=(n=v.P(f.pF(n,3.141592653589793)))?n:3.141592653589793-n,(v.Y(n,1.570796326794897)?n:Math.atan(Math.sqrt(1-r)*Math.tan(n)))*t},f.q=function(r,n,t){if(.006884661117170036>n){var i=(n=(1-(n=Math.sqrt(1-n)))/(1+n))*n,h=n*i,s=n*h,o=n*s,a=n*o,u=n*a,c=-.7291666666666666*h+.2278645833333333*o+.03987630208333334*u,l=.615234375*s-.21533203125*a,p=-.54140625*o+.20302734375*u,y=.48876953125*a,d=-.4488699776785715*u,g=Math.cos(2*t);return r/(1+n)*((1+.25*i+.015625*s+.00390625*a)*t+Math.sin(2*t)*(-1.5*n+.1875*h+.0234375*o+.00732421875*u-c+p-d+g*(2*(.9375*i-.234375*s-.03662109375*a)-4*l+6*y+g*(4*c-12*p+24*d+g*(8*l-32*y+g*(16*p-80*d+g*(32*y+64*g*d)))))))}return r*(f.kG(t,n)-.5*n*Math.sin(2*t)/f.w(n,t))},f.w=function(r,n){return n=Math.sin(n),Math.sqrt(1-r*n*n)},f.Zu=function(r){return v.KC(r,1,2220446049250313e-31)?1:1>r?f.Xw(0,1-r)-r/3*f.Uw(0,1-r):NaN},f.kG=function(r,n){var t=v.Mb(1,r);r=v.P(r);var i=Math.floor(r/1.570796326794897);if(1v.P(i)&&1e-4>v.P(h)&&1e-4>v.P(s));)s=Math.sqrt(a),n+=r/((t=Math.sqrt(u))*(u+(s=Math.sqrt(o)*(s+t)+s*t))),r*=.25,o=.25*(o+s),a=.25*(a+s),u=.25*(u+s);return a=(o=i*h)-(u=s*s),3*n+r*(1+(u=o-6*u)*(.10227272727272728*u-.2142857142857143-.1730769230769231*s*(i=u+a+a))+s*(.1666666666666667*i+s*(-.4090909090909091*a+.1153846153846154*s*o)))/(t*Math.sqrt(t))},f.Xw=function(r,n){for(var t,i,h,s,o=1;i=2-((t=(r+n+o)/3)+r)/t,h=2-(t+n)/t,s=2-(t+o)/t,!(1e-4>v.P(i)&&1e-4>v.P(h)&&1e-4>v.P(s));o=.25*(o+t))t=Math.sqrt(n),i=Math.sqrt(o),r=.25*(r+(t=Math.sqrt(r)*(t+i)+t*i)),n=.25*(n+t);return(1+(.04166666666666666*(r=i*h-s*s)-.1-.06818181818181818*(n=i*h*s))*r+.07142857142857142*n)/Math.sqrt(t)},f.Qw=function(r,n){if(v.ti(r)||n==0||v.Y(v.P(n),1.570796326794897))return n;if(.006884661117170036>r){var t=r*r,i=r*t,h=r*i,s=r*h,o=r*s,a=r*o,u=-(.02708333333333333*i+.03430059523809524*h+.03149181547619048*s+.02634359154541446*o+.02156896735835538*a),c=.007669890873015873*h+.01299603174603175*s+.0148051353064374*o+.01454454953803912*a,l=-(.002275545634920635*s+.004830845032667949*o+.006558395368616723*a),p=.0006957236677288761*o+.001775193002406544*a,y=-.000217324089394402*a,d=Math.cos(2*n);return n+Math.sin(2*n)*(-(.5*r+.2083333333333333*t+.09375*i+.04878472222222222*h+.02916666666666667*s+.01938905423280423*o+.01388255931712963*a)-u+l-y+d*(2*(.1041666666666667*t+.0875*i+.06050347222222222*h+.04151785714285714*s+.02958958540013228*o+.02203667534722222*a)-4*c+6*p+d*(4*u-12*l+24*y+d*(8*c-32*p+d*(16*l-80*y+d*(32*p+64*d*y))))))}return n==0||v.Y(v.P(n),1.570796326794897)?t=n:(h=(i=Math.sqrt(r))*Math.sin(n),t=Math.tan(.7853981633974483+n/2)*Math.pow((1-h)/(1+h),i/2),t=2*Math.atan(t)-1.570796326794897),t},f.yO=function(r,n){if(v.ti(r)||n==0||v.Y(v.P(n),1.570796326794897))return n;if(.006884661117170036>r){var t=r*(p=r*(l=r*(d=r*r))),i=r*(y=r*t),h=.05833333333333333*l+.07232142857142858*p+.05634300595238095*t+.0355325796406526*y+.020235546186067*i,s=.02653149801587302*p+.04379960317460317*t+.0429211791776896*y+.03255384637546096*i,o=.01294022817460318*t+.02668104344536636*y+.03155651254609588*i,a=.00659454790965208*y+.0163075268674227*i,u=.003463473736911237*i,c=Math.cos(2*n);return n+Math.sin(2*n)*(.5*r+.2083333333333333*d+.08333333333333333*l+.03611111111111111*p+.01875*t+.01195601851851852*y+.008863673941798942*i-h+o-u+c*(2*(.1458333333333333*d+.1208333333333333*l+.07039930555555556*p+.03616071428571429*t+.01839451058201058*y+.01017113095238095*i)-4*s+6*a+c*(4*h-12*o+24*u+c*(8*s-32*a+c*(16*o-80*u+c*(32*a+64*c*u))))))}var l=Math.sqrt(r),p=l/2,y=Math.tan(.7853981633974483+n/2);r=0,h=1;for(var d=n;h!=0;d=i)t=l*Math.sin(d),i=y*Math.pow((1+t)/(1-t),p),i=2*Math.atan(i)-1.570796326794897,r++,(v.Y(i,d)||3e4this.Kk&&(this.Kk=0);var t=this.Ue.getType();if(this.jH=t==e.Sc.PE_TYPE_PROJCS?2:1,t==e.Sc.PE_TYPE_PROJCS&&!r.loadConstants())throw e.i.N("PeProjcs.loadConstants failed");n=t==e.Sc.PE_TYPE_GEOGCS?this.Ue:this.Ue.getGeogcs(),t!=e.Sc.PE_TYPE_GEOGCS&&e.pf.getCode(n),this.Eo=r.getUnit(),this.RH=n.getPrimem().getLongitude(),this.wH=r=n.getUnit().getUnitFactor(),r=Math.PI/(180*r),1e-10>Math.abs(r-1)&&(r=1),this.GA=r,t&e.Sc.PE_TYPE_PROJCS?(n=this.Ue,this.HA=1/n.getUnit().getUnitFactor(),this.sw=.001/this.Ue.getUnit().getUnitFactor(),this.tw=e.Cg.generate(n,e.Cg.PE_PCSINFO_OPTION_NONE),this.zl=this.tw.isPannableRectangle(),this.bA=e.zb.qN(this.tw.getCentralMeridian(),this.GA)):(this.KA=this.zl=!0,this.HA=0,t=1/n.getUnit().getUnitFactor(),this.sw=.001/n.getDatum().getSpheroid().getAxis()*t,this.bA=0),this.zl&&(this.xx(),this.DK(),this.nY(),this.CK(),this.lY(),this.mY())}return f.prototype.$r=function(){return this.Kk},f.prototype.kk=function(){return this.tw},f.Py=function(r,n){return r==n||r!=null&&n!=null&&r.Kk==0&&n.Kk==0&&r.As===n.As},f.prototype.Wc=function(){return this.zl},f.prototype.gh=function(r){r.K(this.so)},f.prototype.pv=function(){return this.so.v},f.prototype.ov=function(){return this.so.C},f.prototype.GR=function(r){r.K(this.uw)},f.prototype.lY=function(){var r=this.Ue.getType();if(r==e.Sc.PE_TYPE_PROJCS){r=this.Ue;var n=this.kk().getCentralMeridian(),t=r.getGeogcs();if(t==null)throw e.i.fa("internal error");n=[[n+(t=1/t.getUnit().getUnitFactor()*Math.PI),0]],e.ej.geogToProj(r,1,n),n=n[0][0],t=r.getParameters()[e.Sc.PE_PARM_X0].getValue();var i=this.ml();r=new e.l,i.A(r),n=(i=Math.abs(n-t))+t,t=-1*i+t,i=r.H,r=r.G;var h=new e.l;h.K(t,r,n,i),this.so==null&&(this.so=h)}else{if(r!=e.Sc.PE_TYPE_GEOGCS)throw e.i.fa("internal error");t=1/this.Ue.getUnit().getUnitFactor()*Math.PI,(r=new e.l).K(-t,-t/2,t,t/2),this.so==null&&(this.so=r)}},f.prototype.mY=function(){var r=this.Ue.getType();if(r==e.Sc.PE_TYPE_PROJCS){var n=this.Ue;if(r=this.kk().getCentralMeridian(),(n=n.getGeogcs())==null)throw e.i.fa("internal error");n=1/n.getUnit().getUnitFactor()*Math.PI;var t=this.Vr(),i=new e.l;t.A(i),(t=new e.l).K(r-n,i.G,r+n,i.H),this.uw==null&&(this.uw=t)}else{if(r!=e.Sc.PE_TYPE_GEOGCS)throw e.i.fa("internal error");n=1/this.Ue.getUnit().getUnitFactor()*Math.PI,(r=new e.l).K(-n,-n/2,n,n/2),this.uw==null&&(this.uw=r)}},f.prototype.bf=function(){return this.GA},f.prototype.pm=function(){return this.HA},f.prototype.Vr=function(){if(this.zl)return this.ul;var r=this.ul;return r??(this.xx(),this.ul)},f.prototype.Wr=function(){return this.zl?null:(this.ul!=null||this.xx(),this.YG)},f.prototype.xx=function(){if(this.Ue.getType()==e.Sc.PE_TYPE_PROJCS){var r=this.Ue,n=r.getGeogcs(),t=r.horizonGcsGenerate();if(t!=null){var i=t[0].getNump(),h=t[0].getKind();r=0u&&(t=-400*s,l.K(t,l.G,t+5*a,l.H)),t=new e.Fh(l),this.ul==null&&(this.ul=t,this.Iv=r);else{if(u=new e.Da,a=this.kk().isGcsHorizonMultiOverlap(),l=e.gu.bF(n,e.hu.Integer64),a){for(u=new e.gL,c=e.Gh.local().V(u,l,null),y=0;ythis.ss&&(this.ss=0),this.Eo=n=this.KT.getUnit(),this.IH=1/n.getUnitFactor(),e.pf.getCode(r)}return f.Py=function(r,n){return r==n||r!=null&&n!=null&&r.ss==0&&n.ss==0&&r.As===n.As},f.prototype.$r=function(){return this.ss},f}();e.PL=v}(k||(k={})),function(e){e.Yg=function(){function v(){}return v.tb=function(f,r,n,t,i,h,s,o){if(h!=null||s!=null||o!=null){t=e.F.ba(t),r=e.F.ba(r),n=e.F.ba(n),i=e.F.ba(i),1.570796326794897n?t:e.F.ba(3.141592653589793-t):Math.atan2(l*d,u*p-c*l*y)),o!=null&&(e.s.Y(e.s.P(i),1.570796326794897)?o.u=0>i?r:e.F.ba(3.141592653589793-r):(o.u=Math.atan2(u*d,p*u*y-l*c),o.u=e.F.ba(o.u+3.141592653589793)))}}},v.rf=function(f,r,n,t,i,h,s){if(h!=null||s!=null){r=e.F.ba(r),n=e.F.ba(n),1.570796326794897p?i:e.F.ba(3.141592653589793-i):r:e.s.Y(e.s.P(n),1.570796326794897)&&e.s.Y(f,3.141592653589793)?0>n?i:e.F.ba(3.141592653589793-i):e.F.ba(r+Math.atan2(l*a,u*t-c*l*o)))}},v}()}(k||(k={})),function(e){e.Wk=function(){function v(){}return v.tb=function(f,r,n,t,i,h,s,o,a){var u=new e.ga(0),c=new e.ga(0),l=[0,0,0],p=[0,0,0],y=[0,0,0],d=new e.ga(0),g=new e.ga(0),b=new e.ga(0),x=new e.ga(0),m=new e.ga(0);if(s!=null||o!=null||a!=null)if(e.s.ti(r))e.Yg.tb(f,n,t,i,h,s,o,a);else{i=e.F.ba(i),n=e.F.ba(n);var w=e.F.ba(i-n);if(e.s.Y(t,h)&&(e.s.Y(n,i)||e.s.Y(e.s.P(t),1.570796326794897)))s!=null&&(s.u=0),o!=null&&(o.u=0),a!=null&&(a.u=0);else{if(e.s.Y(t,-h)){if(e.s.Y(e.s.P(t),1.570796326794897))return s!=null&&(s.u=2*e.F.Ah(f,r)),o!=null&&(o.u=0w){j=1;var M=n;n=i,i=M,M=t,t=h,h=M}w=e.F.ot(r,t);var A=e.F.ot(r,h);o==null&&a==null||(e.Yg.tb(f,n,w,i,A,null,u,c),u=Math.atan2(Math.sin(u.u)*Math.cos(t-w),Math.cos(u.u)),c=Math.atan2(Math.sin(c.u)*Math.cos(h-A),Math.cos(c.u)),j!=0&&(M=u,u=c,c=M),o!=null&&(o.u=u),a!=null&&(a.u=c)),s!=null&&(e.F.cl(1,r,t,n,0,b,x,m),l[0]=b.u,l[1]=x.u,l[2]=m.u,e.F.cl(1,r,h,i,0,b,x,m),p[0]=b.u,p[1]=x.u,p[2]=m.u,y[0]=l[1]*p[2]-p[1]*l[2],y[1]=-(l[0]*p[2]-p[0]*l[2]),y[2]=l[0]*p[1]-p[0]*l[1],r=1-e.F.w(r,e.F.Vq(r,e.F.Qj(r,Math.acos(y[2]/Math.sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]))))),r*=2-r,o=Math.atan2(-y[1],-y[0]),y=e.F.ba(o-1.570796326794897),o=e.F.ba(o+1.570796326794897),y=e.s.P(e.F.ba(n-y))<=e.s.P(e.F.ba(n-o))?y:o,e.Yg.tb(1,y,0,n,w,d,null,null),e.Yg.tb(1,y,0,i,A,g,null,null),3.141592653589793i&&(i=e.s.P(i),h=e.F.ba(h+3.141592653589793)),n=e.F.ba(n),t=e.F.ba(t),1.570796326794897=e.s.P(h)?1:-1);h=e.F.ba(n+Math.atan(Math.tan(h)*-Math.sin(b))),e.Yg.tb(f,h,0,n,b,null,c,null),b=e.s.P(1.570796326794897-e.s.P(c.u)),b=e.F.Qj(r,b),b=1-e.F.w(r,e.F.Vq(r,b)),b*=2-b,e.F.cl(1,r,0,h,0,y,d,g),l[0]=y.u,l[1]=d.u,l[2]=g.u,e.F.cl(1,r,t,n,0,y,d,g),p[0]=y.u,p[1]=d.u,p[2]=g.u,t=Math.acos((l[0]*p[0]+l[1]*p[1]+l[2]*p[2])/Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2])),t=e.F.Qj(b,t),i=0<(t=e.F.q(f,b,t)+i*x)?c.u:e.F.ba(c.u+3.141592653589793),f=e.s.P(t)/e.F.Ah(f,b)*1.570796326794897,f=e.F.Rq(b,f),f=e.F.ot(b,f),e.Yg.rf(1,h,0,f,i,s,u),o!=null&&(a=u.u),o!=null&&(o.u=e.F.Qj(r,a))}},v}()}(k||(k={})),function(e){e.cu=function(){function v(){}return v.tb=function(f,r,n,t,i,h,s,o,a){var u=0,c=0,l=0;if(s!=null||o!=null||a!=null)if(e.s.ti(r))e.Yg.tb(f,n,t,i,h,s,o,a);else{var p=e.F.ba(i-n);if(e.s.Y(t,h)&&(e.s.Cd(p)||e.s.Y(e.s.P(t),1.570796326794897)))s!=null&&(s.u=0),o!=null&&(o.u=0),a!=null&&(a.u=0);else{if(e.s.Y(t,-h)){if(e.s.Y(e.s.P(t),1.570796326794897))return s!=null&&(s.u=2*e.F.Ah(f,r)),o!=null&&(o.u=0=N&&!e.s.Y(I,j));if(z!=0)y=(d*=u)*(256+d*(d*(74-47*d)-128))/1024,s!=null&&(s.u=g*(1+d*(4096+d*(d*(320-175*d)-768))/16384)*(D-y*C*(c+y/4*(T*(2*l-1)-y/6*c*(4*C*C-3)*(4*l-3))))),o!=null&&(o.u=e.s.Y(e.s.P(t),1.570796326794897)?0>t?i:e.F.ba(3.141592653589793-i):Math.atan2(m*A,r*w-x*m*M)),a!=null&&(e.s.Y(e.s.P(h),1.570796326794897)?a.u=0>h?n:e.F.ba(3.141592653589793-n):(a.u=Math.atan2(r*A,r*w*M-x*m),a.u=e.F.ba(a.u+3.141592653589793)));else{j=e.s.Mb(3.141592653589793,p),T=x*w-r*m,D=Math.acos(T),C=Math.sin(D),u=1,N=B=0;do l=B,M=1-.25*(B=y*(u*=u)*(1+y+y*y))+.1875*(c=y*y*(M=u*u)*(1+2.25*y))-.1953125*(z=y*y*y*M*u),B=.25*B-.25*c+.29296875*z,A=.03125*c-.05859375*z,z*=.00651041666666667,c=T-2*x*w/u,1=N&&!e.s.Y(l,B));s!=null&&(M=1+(d*=u*=u)*(4096+d*(d*(320-175*d)-768))/16384,e.s.Y(t,-h)?s.u=3.141592653589793*g*M:(c=T-2*x*w/u,u=Math.acos(c),T=Math.cos(2*u),I=Math.cos(3*u),s.u=g*(M*D+d*(d*(128+d*(35*d-60))-512)/2048*C*c+d*(5*d-4)/6144*d*d*Math.sin(2*D)*T+z*Math.sin(3*D)*I+-762939453125e-16*d*d*d*d*Math.sin(4*D)*Math.cos(4*u)))),o!=null&&(e.s.Cd(t)&&e.s.Cd(h)?(u=Math.sqrt(1-B*B),o.u=Math.acos(u),0>p&&(o.u*=-1)):e.s.Y(e.s.P(t),1.570796326794897)?o.u=0>t?i:e.F.ba(3.141592653589793-i):(s=B/r,g=Math.sqrt(1-s*s),0>r*w-x*m*Math.cos(j)&&(g*=-1),o.u=Math.atan2(s,g),e.s.Y(t,-h)&&e.s.P(e.F.ba(n-i))>3.141592653589793*(1-y*Math.cos(t))&&(0e.s.P(o.u)||0>t&&1.570796326794897h?n:e.F.ba(3.141592653589793-n):(p=B/m,s=Math.sqrt(1-p*p),g=Math.sin(j/2),0>Math.sin(b-f)-2*r*w*g*g&&(s*=-1),a.u=Math.atan2(p,s),a.u=e.F.ba(a.u+3.141592653589793),e.s.Y(t,-h)&&!e.s.Cd(t)&&!e.s.Y(e.s.P(t),1.570796326794897)&&e.s.P(e.F.ba(n-i))>3.141592653589793*(1-y*Math.cos(t))&&(o!=null?g=o.u:(s=B/r,g=Math.sqrt(1-s*s),0>r*w-x*m*Math.cos(j)&&(g*=-1),g=Math.atan2(s,g),e.s.Y(t,-h)&&e.s.P(e.F.ba(n-i))>3.141592653589793*(1-y*Math.cos(t))&&(0e.s.P(g)||0>t&&1.570796326794897=e.s.P(g)&&1.570796326794897e.s.P(a.u))&&(a.u=-1*e.F.ba(a.u+3.141592653589793))))}}}},v.rf=function(f,r,n,t,i,h,s,o){if(s!=null||o!=null)if(e.s.ti(r))e.Yg.rf(f,n,t,i,h,s,o);else if(h=e.F.ba(h),e.s.Y(e.s.P(t),1.570796326794897)||e.s.Cd(h)||e.s.Y(e.s.P(h),3.141592653589793))e.Wk.rf(f,r,n,t,i,h,s,o);else{var a=e.s.P(h)==1.570796326794897?0:Math.cos(h),u=e.s.P(h)==3.141592653589793?0:Math.sin(h);e.s.Y(e.s.P(t),1.570796326794897)&&(n=0),h=1-Math.sqrt(1-r);var c=e.F.Vq(r,t);t=e.s.P(c)==1.570796326794897?0:Math.cos(c);var l=Math.sin(c);c=Math.atan2(Math.tan(c),a);var p=t*u,y=p*p,d=1-y,g=r/(1-r)*d,b=(r=g*(256+g*(g*(74-47*g)-128))/1024)/4,x=r/6,m=i/(f*(1-h)*(1+g*(4096+g*(g*(320-175*g)-768))/16384)),w=m;do{var j=w;i=e.s.P(w)==1.570796326794897?0:Math.cos(w);var M=(g=e.s.P(w)==3.141592653589793?0:Math.sin(w))*g;w=r*g*((f=Math.cos(2*c+w))+b*(i*(2*(w=f*f)-1)-x*f*(4*M-3)*(4*w-3)))+m}while(!e.s.Y(j,w));i=e.s.P(w)==1.570796326794897?0:Math.cos(w),g=e.s.P(w)==3.141592653589793?0:Math.sin(w),s!=null&&(u=Math.atan2(g*u,t*i-l*g*a),d=h/16*d*(4+h*(4-3*d)),f=Math.cos(2*c+w),s.u=e.F.ba(n+(u-(1-d)*h*p*(w+d*g*(f+d*i*(2*f*f-1)))))),o!=null&&(d=l*g-t*i*a,d=(1-h)*Math.sqrt(y+d*d),o.u=Math.atan2(l*i+t*g*a,d))}},v}()}(k||(k={})),function(e){e.PC=function(){function v(){}return v.tb=function(f,r,n,t,i,h,s,o,a){var u=e.F.ba(i-n),c=e.s.Y(e.s.P(t),1.570796326794897),l=e.s.Y(e.s.P(h),1.570796326794897);if(e.s.Y(t,h)&&(e.s.Cd(u)||c))s!=null&&(s.u=0),o!=null&&(o.u=0),a!=null&&(a.u=0);else{if(e.s.ti(r)){var p=Math.sin(t),y=Math.sin(h);p=Math.sqrt((1+p)/(1-p)),y=Math.sqrt((1+y)/(1-y)),p=Math.log(y)-Math.log(p),p=Math.atan2(u,p),s!=null&&(s.u=e.s.Y(t,h)?e.s.P(f*Math.cos(t)*u):e.s.P((f*h-f*t)/Math.cos(p)))}else y=e.F.Qw(r,h),p=Math.sin(e.F.Qw(r,t)),y=Math.sin(y),p=Math.sqrt((1+p)/(1-p)),y=Math.sqrt((1+y)/(1-y)),p=Math.log(y)-Math.log(p),p=Math.atan2(u,p),s!=null&&(e.s.Y(t,h)?s.u=e.s.P(f*u*Math.cos(t)/e.F.w(r,t)):(u=e.F.q(f,r,t),f=e.F.q(f,r,h),s.u=e.s.P((f-u)/Math.cos(p))));o==null&&a==null||(s=e.F.ba(p+3.141592653589793),c&&l||!c&&!l||(c?p=0>t?i:e.F.ba(3.141592653589793-i):l&&(s=0>h?n:e.F.ba(3.141592653589793-n))),o!=null&&(o.u=p),a!=null&&(a.u=s))}},v.rf=function(f,r,n,t,i,h,s,o){h=e.F.ba(h),0>i&&(i=e.s.P(i),h=e.F.ba(h+3.141592653589793)),e.s.ti(r)?e.s.Y(e.s.P(t),1.570796326794897)?(n=0>t?h:e.F.ba(3.141592653589793-h),3.141592653589793>=(h=i/f%6.283185307179586)?f=t-e.s.Mb(h,t):(n=e.F.ba(n+3.141592653589793),f=-t+e.s.Mb(h-3.141592653589793,t))):e.s.Y(e.s.P(h),1.570796326794897)?(n=e.F.ba(n+e.s.Mb(i,h)/(f*Math.cos(t))),f=t):(f=t+i*Math.cos(h)/f,1.570796326794897t?h:e.F.ba(3.141592653589793-h),h=i/e.F.qW(f,r),3.141592653589793>=(h%=6.283185307179586)?f=t-e.s.Mb(h,t):(n=e.F.ba(n+3.141592653589793),f=-t+e.s.Mb(h-3.141592653589793,t)),f=e.F.Rq(r,f)):e.s.Y(e.s.P(h),1.570796326794897)?(n=e.F.ba(n+e.s.Mb(i,h)*e.F.w(r,t)/(f*Math.cos(t))),f=t):(f=1.570796326794897*(i*Math.cos(h)+e.F.q(f,r,t))/e.F.Ah(f,r),1.570796326794897Math.PI||Math.abs(t.y)>.5*Math.PI||Math.abs(i.y)>.5*Math.PI||(Math.abs(t.y)==.5*Math.PI||Math.abs(i.y)==.5*Math.PI)&&t.x!=i.x)return NaN;if(h=r.cB(h,Math.min(t.x,i.x),Math.max(t.x,i.x)),!new e.Nc(t.x,i.x).contains(h))return NaN;var s=v.construct(t);if(i=v.construct(i),s=r.Yu(n,s),i=r.Yu(n,i),(i=s.cF(i)).z.qg())return t.y;var o=new e.Wb;o.set(i.x),o.jm(i.z),o.No(-1);var a=new e.Wb;a.set(i.y),a.jm(i.z),a.No(-1);var u=new e.Wb;return u.set(a),u.Ag(a),(s=new e.Wb).set(o),s.Ag(o),s.add(u),s.sqrt(),s.qg()||o.qg()&&a.qg()?t.y:(t=Math.atan2(a.value(),o.value()),t=Math.atan2(s.value()*Math.cos(t-h),1-n),h=r.DP(n,e.h.construct(h,t)),n=new e.Nd(h.x,h.y,-h.z),h=i.value().Qh(h),n=i.value().Qh(n),Math.abs(n)Math.PI||Math.abs(t.y)>.5*Math.PI||Math.abs(i.y)>.5*Math.PI||(Math.abs(t.y)==.5*Math.PI||Math.abs(i.y)==.5*Math.PI)&&t.x!=i.x||Math.abs(h)>=.5*Math.PI||0h&&i.y>h||0>t.y&&0>i.y&&t.yMath.abs(s[1]-t.x)&&(t=s[0],s[0]=s[1],s[1]=t)),h))},r.cB=function(n,t,i){return n>i?n-=2*(t=Math.ceil((n-i)/(2*Math.PI)))*Math.PI:ni.x?(i.x-=i.x%360,-180>i.x&&(i.x+=360)):180i.y&&(i.y=-90);for(var h=-180,s=180,o=(f=5*n)-1,a=(r=(f+31)/32)-1;0<=a;a--)for(var u=o-32*a,c=Math.min(32,f-32*a),l=1;l=p?(t[a]|=1<=p?(t[a]|=1<>h&31;if(31<(h+=5)){var a=37-h;o&=(1<r)for(s=0;s=r[0]?r:'"'+r.trim()+'"'}var f=[];e.XC=function(){function r(){}return r.EQ=function(n){try{for(var t=0;tn||n>this.Aa)throw e.i.N();return this.bg[n]},r.prototype.Pf=function(n){return this.uh[n]},r.lz=function(n){return r.JM[n]},r.Tp=function(n){return r.SM[n]},r.Va=function(n){return r.rM[n]},r.prototype.hasAttribute=function(n){return 0<=this.uh[n]},r.prototype.iG=function(){return this.hasAttribute(1)},r.se=function(n){return r.eD[n]},r.prototype.LR=function(n){return this.Vs[n]},r.DG=function(n,t){return r.eD[n]===t},r.prototype.Nb=function(n){return this===n},r.prototype.An=function(){for(var n=e.O.Th(this.bg[0]),t=1;t++o&&f(s,u,h.eu),c[0]?a?u=o:(c=s.c,u=s.e+u+1):++u;c.lengths.Bd&&c[0]?"-":"")+(1u?"e":"e+")+u:s.toString()}function f(s,o,a,u){var c=s.c,l=s.e+o+1;if(a===1?u=5<=c[l]:a===2?u=5l||c[l+1]!==void 0||1&c[l-1]):a===3?u=u||c[l]!==void 0||0>l:(u=!1,a!==0&&r("!Big.RM!")),1>l||!c[0])u?(s.e=-o,s.c=[1]):s.c=[s.e=0];else{if(c.length=l--,u)for(;9<++c[l];)c[l]=0,l--||(++s.e,c.unshift(1));for(l=c.length;!c[--l];c.pop());}return s}function r(s){throw(s=Error(s)).name="BigError",s}var n=-7,t=21,i=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=function(){function s(o){if(o instanceof s)this.Bd=o.Bd,this.e=o.e,this.c=o.c.slice();else{var a,u,c;for(o===0&&0>1/o?o="-0":i.test(o+="")||r(NaN),this.Bd=o.charAt(0)=="-"?(o=o.slice(1),-1):1,-1<(a=o.indexOf("."))&&(o=o.replace(".","")),0<(u=o.search(/e/i))?(0>a&&(a=u),a+=+o.slice(u+1),o=o.substring(0,u)):0>a&&(a=o.length),u=0;o.charAt(u)=="0";u++);if(u==(c=o.length))this.c=[this.e=0];else{for(;o.charAt(--c)=="0";);for(this.e=a-u-1,this.c=[],a=0;u<=c;this.c[a++]=+o.charAt(u++));}}}return s.prototype.abs=function(){var o=new s(this);return o.Bd=1,o},s.prototype.cmp=function(o){var a=this.c,u=(o=new s(o)).c,c=this.Bd,l=o.Bd,p=this.e,y=o.e;if(!a[0]||!u[0])return a[0]?c:u[0]?-l:0;if(c!=l)return c;if(o=0>c,p!=y)return p>(y^o)?1:-1;for(c=-1,l=(p=a.length)<(y=u.length)?p:y;++c(u[c]^o)?1:-1;return p==y?0:p>(y^o)?1:-1},s.prototype.jm=function(o){var a=this.c,u=(o=new s(o)).c,c=this.Bd==o.Bd?1:-1,l=s.rr;if((l!==~~l||0>l||1e6A?0:A,d.unshift(0);m++y;y++){if(p!=(m=x.length))var z=p>m?1:-1;else{var N=-1;for(z=0;++Nx[N]?1:-1;break}}if(!(0>z))break;for(o=m==p?u:d;m;){if(x[--m]A&&f(w,l,s.eu,x[0]!==void 0),w},s.prototype.fS=function(){return 0this.cmp(0)},s.prototype.jt=function(o){var a,u=this.Bd,c=(o=new s(o)).Bd;if(u!=c)return o.Bd=-c,this.tI(o);var l=this.c.slice(),p=this.e,y=o.c,d=o.e;if(!l[0]||!y[0])return y[0]?(o.Bd=-c,o):new s(l[0]?this:0);if(u=p-d){for((a=0>u)?(u=-u,p=l):(d=p,p=y),p.reverse(),c=u;c--;p.push(0));p.reverse()}else for(p=((a=l.lengthu;){if(l[--p]c.length-p.length&&(u=p,p=c,c=u),a=p.length,u=0;a;)u=(c[--a]=c[a]+p[a]+u)/10|0,c[a]%=10;for(u&&(c.unshift(u),++l),a=c.length;c[--a]==0;c.pop());return o.c=c,o.e=l,o},s.prototype.pow=function(o){var a=this,u=new s(1),c=u,l=0>o;for((o!==~~o||-1e6>o||1e6>=1;)a=a.lr(a);return l?u.jm(c):c},s.prototype.round=function(o,a){var u=this;return o==null?o=0:(o!==~~o||0>o||1e6a&&r(NaN),(a=Math.sqrt(this.toString()))==0||a==1/0?((a=o.join("")).length+u&1||(a+="0"),(o=new s(Math.sqrt(a).toString())).e=((u+1)/2|0)-(0>u||1&u)):o=new s(a.toString()),a=o.e+(s.rr+=4);do u=o,o=c.lr(u.tI(this.jm(u)));while(u.c.slice(0,a).join("")!==o.c.slice(0,a).join(""));return f(o,s.rr-=4,s.eu),o},s.prototype.lr=function(o){var a=this.c,u=(o=new s(o)).c,c=a.length,l=u.length,p=this.e,y=o.e;if(o.Bd=this.Bd==o.Bd?1:-1,!a[0]||!u[0])return new s(0*o.Bd);if(o.e=p+y,cp;)l=d[y]+u[p]*a[y-p-1]+l,d[y--]=l%10,l=l/10|0;d[y]=(d[y]+l)%10}for(l&&++o.e,d[0]||d.shift(),p=d.length;!d[--p];d.pop());return o.c=d,o},s.prototype.toString=function(){var o=this.e,a=this.c.join(""),u=a.length;if(o<=n||o>=t)a=a.charAt(0)+(1o?"e":"e+")+o;else if(0>o){for(;++o;a="0"+a);a="0."+a}else if(0u)for(o-=u;o--;a+="0");else othis.Bd&&this.c[0]?"-"+a:a},s.prototype.toExponential=function(o){return o==null?o=this.c.length-1:(o!==~~o||0>o||1e6=o&&(c=v(this,this.e+o),0>this.Bd&&this.c[0]&&0>c.indexOf("-")&&(c="-"+c));return n=a,t=u,c||r("!toFix!"),c},s.prototype.toPrecision=function(o){return o==null?this.toString():((o!==~~o||1>o||1e6h.get(p)?(h.set(a,2147483647),a=p):h.set(p,2147483647),u++;else{if(1&u){if(n)return t!=null&&(t[0]=!0),null}else h.set(a,2147483647);o.L(l),a=p,u=1}if(1&u){if(n)return t!=null&&(t[0]=!0),null}else h.set(a,2147483647);if(!n)for(h.Vd(0,h.size,function(d,g){return d-g}),p=0,y=h.size;pt-n)i.nr(n,t,r);else{var h=!0;try{for(var s=1/0,o=-1/0,a=n;ao&&(o=u)}if(this.reset(t-n,s,o,t-n)){for(a=n;ah&&i.nr(n+h,n+t,r);100r||t==n)&&(r=Math.min(f.hL,r),this.yf.Jb(r),this.yf.resize(r),this.yf.Wj(0,0,this.yf.size),this.EH=n,this.ys.resize(i),this.Es=(t-n)/(r-1),!0)},f.prototype.zF=function(r){return e.O.truncate((r-this.EH)/this.Es)},f.hL=65536,f}();e.Xt=v}(k||(k={})),function(e){var v,f;(f=v||(v={}))[f.enum_line=1]="enum_line",f[f.enum_arc=2]="enum_arc",f[f.enum_dummy=4]="enum_dummy",f[f.enum_concave_dip=8]="enum_concave_dip",f[f.enum_connection=3]="enum_connection";var r=function(){function s(){}return s.Qu=function(o,a,u,c,l,p){var y=new s;return y.Im=new e.h,y.Vm=new e.h,y.aw=new e.h,y.Im.L(o),y.Vm.L(a),y.aw.L(u),y.Co=c,y.qh=l,y.sh=p,y},s.construct=function(o,a,u,c){var l=new s;return l.Im=new e.h,l.Vm=new e.h,l.aw=new e.h,l.Im.L(o),l.Vm.L(a),l.aw.Rc(),l.Co=4,l.qh=u,l.sh=c,l},s}(),n=function(){function s(o,a,u,c,l,p){this.Yv=null,this.ya=0,this.EA=o,this.bI=this.$H=0,this.Ka=a,this.Mj=u,this.vk=c,this.Dq=l,this.Ub=p}return s.prototype.next=function(){for(var o=new e.Sa;;){if(this.ya==this.EA.I())return null;if(this.EA.ve(this.ya,o),this.ya++,!o.B())break}var a=!1;if(this.Yv==null&&(this.$H=o.Lg(),this.bI=o.ih(),this.Yv=h.buffer(o,this.Ka,this.Mj,this.vk,this.Dq,this.Ub),a=!0),this.yac)throw e.i.N();if(o.B())return new e.Da(o.description);var y=new e.l;return o.xc(y),0=l&&(l=96),p.rb=Math.abs(p.Ka),p.Kv=p.rb!=0?1/p.rb:0,isNaN(c)||c==0?c=1e-5*p.rb:c>.5*p.rb&&(c=.5*p.rb),12>l&&(l=12),(o=Math.abs(a)*(1-Math.cos(Math.PI/l)))>c?c=o:(o=Math.PI/Math.acos(1-c/Math.abs(a)))(l=e.O.truncate(o))&&(l=12,c=Math.abs(a)*(1-Math.cos(Math.PI/l))),p.vk=c,p.Dq=l,p.tA=Math.min(p.ct,.25*c),p.lE()},s.prototype.cv=function(){if(this.Id==null)this.Id=[];else if(this.Id.length!==0)return;var o=this.qE();o=e.O.truncate((o+3)/4);var a=.5*Math.PI/o;this.oA=a;for(var u=0;u<4*o;u++)this.Id.push(null);var c=Math.cos(a);a=Math.sin(a);var l=e.h.construct(0,1);for(u=0;u=this.Ka&&(o=new e.l,this.X.A(o),o.R()<=2*-this.Ka||o.ca()<=2*this.Ka))return new e.Da(this.X.description)}switch(this.X.getType()){case 33:return this.PN();case 550:return this.ON();case 1607:return this.RN();case 1736:return this.QN();case 197:return this.LN();default:throw e.i.Qa()}},s.prototype.RN=function(){if(this.EG(this.X)){var o=new e.Sa;this.X.ve(0,o);var a=new e.l;return this.X.A(a),o.Cb(a.sf()),this.Gu(o)}return this.X=this.WV(this.X),o=new t(this,this.oq),e.Gh.local().V(o,this.Mj,this.Ub).next()},s.prototype.QN=function(){if(this.Ka==0)return this.X;var o=e.Yl.local();if(this.cv(),this.X=o.V(this.X,null,!1,this.Ub),0>this.Ka){var a=this.X;return a=this.py(a,0,a.da()),o.V(a,this.Mj,!1,this.Ub)}return this.EG(this.X)?(o=new e.Sa,this.X.ve(0,o),a=new e.l,this.X.A(a),o.Cb(a.sf()),this.Gu(o)):(o=new i(this),e.Gh.local().V(o,this.Mj,this.Ub).next())},s.prototype.py=function(o,a,u){for(var c=new e.Da(o.description);ao.Ja(a))){var l=o.Ir(a),p=new e.l;if(o.Rj(a,p),0=this.Ka){if(this.Ka==0)o.ad(this.X,!1);else{var a=new e.Fh;this.X.bn(a),a.W(this.Ka,this.Ka),o.ad(a,!1)}return o}return o.ad(this.X,!1),this.X=o,this.jE(o,0)},s.prototype.jE=function(o,a){this.cv();var u=new e.Da(o.description),c=new e.h,l=new e.h,p=new e.h,y=new e.h,d=new e.h,g=new e.h,b=new e.h,x=new e.h,m=o.Ja(a),w=o.Ba(a),j=0;for(a=o.Ja(a);jo.Ja(a))return null;if(this.FG(o,a)&&0(o=-1>o?4:2*Math.PI/Math.acos(o)+.5)?o=4:o>this.Dq&&(o=this.Dq),e.O.truncate(o)},s.prototype.GD=function(o,a,u,c,l){this.cv();var p=new e.h;p.uc(u,a),p.scale(this.Kv);var y=new e.h;y.uc(c,a),y.scale(this.Kv),0>(p=Math.atan2(p.y,p.x)/this.oA)&&(p=this.Id.length+p),p=this.Id.length-p,0>(y=Math.atan2(y.y,y.x)/this.oA)&&(y=this.Id.length+y),(y=this.Id.length-y)p.I(y))return 0>l||(l=o,p=new e.Sa,l.ve(l.Ba(a),p),this.yu(u,p)),1;var d=p.Na(p.Xa(p.Ob(y))),g=new e.Dd;if(g.gg(-d.x,-d.y),p.Oc(g),c&&(this.tQ(p,y,l),2>p.I(y)))return 0>l||(l=o,p=new e.Sa,l.ve(l.Ba(a),p),this.yu(u,p)),1;this.Zd.length=0;var b=p.Ob(y);a=p.Xa(b);var x=l==1?p.Ma(a):p.U(a);o=l==1?p.U(a):p.Ma(a);var m=!0;c=new e.h,y=new e.h;var w=new e.h,j=new e.h,M=new e.h,A=new e.h,z=new e.h,N=new e.h,I=new e.h,C=new e.h,T=this.rb;b=p.Ja(b);for(var D=0;Dx||0>m&&x==0?this.Zd.push(r.Qu(j,M,c,2,this.Zd.length+1,this.Zd.length-1)):j.qb(M)||(this.Zd.push(r.construct(j,c,this.Zd.length+1,this.Zd.length-1,"dummy")),this.Zd.push(r.construct(c,M,this.Zd.length+1,this.Zd.length-1,"dummy"))),A.add(y,I),this.Zd.push(r.Qu(M,A,c,1,this.Zd.length+1,this.Zd.length-1)),j.L(A),C.L(I),w.L(c),c.L(y),N.L(z),x=a,a=o,m=!1,o=l==1?p.U(a):p.Ma(a);return this.Zd[this.Zd.length-1].qh=0,this.Zd[0].sh=this.Zd.length-1,this.YV(u),g.gg(d.x,d.y),u.YD(g,u.da()-1),1},s.prototype.YV=function(o){for(var a=this.zO(),u=!0,c=a+1,l=a;c!=a;l=c){var p=this.Zd[l];c=p.qh!=-1?p.qh:(l+1)%this.Zd.length,p.Co!=0&&(u&&o.Lt(p.Im),p.Co==2?this.GD(o,p.aw,p.Im,p.Vm,!0):o.Ci(p.Vm),u=!1)}},s.prototype.zO=function(){this.Ks==null&&(this.Ks=[null,null,null,null,null,null,null,null,null]);for(var o=0,a=0,u=this.Zd.length;a=this.rb)return!0}return!1},s.prototype.tQ=function(o,a,u){for(var c=0;1>c;c++){var l=!1,p=o.Ob(a),y=o.Ja(p);if(y==0)break;var d=y;if(3>y)break;!o.dc(p)&&(d=y-1),p=o.Xa(p),y=0G||0>H&&G==0||!this.Fv(j,m,w)||(z.L(w),U=!1,++B,l=!0),U){if(0.5*this.vk?(A.add(j,m),A.scale(.5),C.normalize(),C.ar(),T.L(C),T.scale(D-B),A.add(T),o.mf(y,A)):o.pd(y,!0),B=0}j.L(m),b=p}m.L(w),y=p,p=g,g=0a?(this.oq=!1,o):(this.oq=!0,e.Fg.Mk(o,this.ct,!1,!0,this.Ub))},s.prototype.yu=function(o,a){if(a=a.D(),this.Id!=null&&this.Id.length!==0){var u=new e.h;u.L(this.Id[0]),u.Ct(this.rb,a),o.Lt(u);for(var c=1,l=this.Id.length;c=t?1:-1;case 1:if(r.G=t?1:-1;case 2:if(r.v>=t&&r.C>t)break;return r.C<=t?1:-1;case 3:if(!(r.G>=t&&r.H>t))return r.H<=t?1:-1}return 0},f.prototype.Ay=function(r,n){return r.getType()==1736?this.Cy(r,n):this.Dy(r)},f.prototype.Cy=function(r,n){if(this.Ca.R()==0||this.Ca.ca()==0)return r.Ia();var t=new e.l;r.xc(t),this.X=this.g.Ib(r);var i=new e.l,h=new e.l,s=new e.h,o=new e.h,a=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0];new e.ig;var c=new e.yb,l=new e.ia(0);l.Jb(Math.min(100,r.I()));for(var p=!1,y=0;!p&&4>y;y++){var d=!1,g=!!(1&y),b=0;switch(y){case 0:b=this.Ca.v,d=t.v<=b&&t.C>=b;break;case 1:b=this.Ca.G,d=t.G<=b&&t.H>=b;break;case 2:b=this.Ca.C,d=t.v<=b&&t.C>=b;break;case 3:b=this.Ca.H,d=t.G<=b&&t.H>=b}if(d)for(p=!0,d=this.g.Ob(this.X);d!=-1;){var x=-1,m=-1,w=this.g.Xa(d),j=w;do{var M=this.g.bc(j);M==null&&(M=c,this.g.D(j,s),M.Dc(s),this.g.D(this.g.U(j),o),M.Qc(o)),M.A(i);var A=this.Lh(i,y,b),z=0,N=-1;if(A==-1){z=0<(M=M.cq(g,b,a,u))?this.g.Ul(j,u,M):0,z+=1;var I=j,C=this.g.U(I);for(M=0;Mthis.g.Ja(d)?this.g.Zq(d):this.g.Rb(d)}}return p?r.Ia():(this.FB(),0u;u++){var c=!1,l=!!(1&u),p=0;switch(u){case 0:p=this.Ca.v,c=a.v<=p&&a.C>=p;break;case 1:p=this.Ca.G,c=a.G<=p&&a.H>=p;break;case 2:p=this.Ca.C,c=a.v<=p&&a.C>=p;break;case 3:p=this.Ca.H,c=a.G<=p&&a.H>=p}if(c){c=o,o=r.Ia(),(c=c.Ga()).Zi();for(var y,d=new e.h;c.$a();)for(var g,b=!0;c.Ha();){var x=c.ha();x.A(n);var m=this.Lh(n,u,p);if(m==-1){if(0<(m=x.cq(l,p,i,h))){var w=0;y=x.ac();for(var j=0;j<=m;j++)if(w!=(g=j=(u=e.O.truncate(Math.min(Math.ceil(u/r),2048)))))){for(var c=1;ch.size)){var l=this;h.Vd(0,h.size,function(A,z){return l.Mh(A,z)}),t=new e.h,s=new e.h,o=new e.h,s.Rc();var p=-1;a=new e.ia(0),u=new e.ia(0),c=this.g.Gd();for(var y=this.g.Gd(),d=0,g=h.size;dthis.Mh(p,m)&&(this.g.D(m,t),r?t.y==n:t.x==n)&&(a.add(p),w=!0,this.g.Ra(p,y,1)),0>this.Mh(p,b)&&(this.g.D(b,t),r?t.y==n:t.x==n)&&(w||a.add(p),this.g.Ra(p,c,1))}for(x=0,w=a.size;xthis.Mh(g,x)&&(this.g.D(x,a),r?a.y==n:a.x==n)&&(b=x),x=-1;var m=this.g.Ma(g);if(0>this.Mh(g,m)&&(this.g.D(m,a),r?a.y==n:a.x==n)&&(x=m),b!=-1&&x!=-1)this.Kh(g,i,h),this.g.pd(g,!1),this.Kh(b,i,h),this.g.pd(b,!1),l=!0;else if(b!=-1||x!=-1){for(m=d+1;mthis.Mh(w,j)&&(this.g.D(j,a),r?a.y==n:a.x==n)&&(M=j),j=this.g.Ma(w);var A=-1;if(0>this.Mh(w,j)&&(this.g.D(j,a),r?a.y==n:a.x==n)&&(A=j),M!=-1&&A!=-1){this.Kh(w,i,h),this.g.pd(w,!1),this.Kh(M,i,h),this.g.pd(M,!1),l=!0;break}if(b!=-1&&A!=-1){this.zt(i,g,b,w,A,h),l=!0;break}if(x!=-1&&M!=-1){this.zt(i,w,M,g,x,h),l=!0;break}}}if(l)break}}}if(!l)break}p=s,u.L(t)}}this.g.Td(h)},f.prototype.Kh=function(r,n,t){t=this.g.Pa(r,t),n.set(t,-1),t=this.g.Pa(r,this.ji),this.dd.set(t,-1),(n=this.g.bd(r))!=-1&&this.g.Xa(n)==r&&(this.g.Jf(n,-1),this.g.Wg(n,-1))},f.prototype.zt=function(r,n,t,i,h,s){this.g.Bc(n,i),this.g.Cc(i,n),this.g.Cc(t,h),this.g.Bc(h,t),this.Kh(i,r,s),this.g.mi(i,!1),this.Kh(h,r,s),this.g.mi(h,!0)},f.prototype.Ty=function(){for(var r=0,n=this.dd.size;r=a?(t=this.g.Pa(o,this.ji),this.dd.set(t,-1),o=this.g.pd(o,!1),a==2&&(t=this.g.Pa(o,this.ji),this.dd.set(t,-1),this.g.pd(o,!1)),a=s,s=this.g.Rb(s),this.g.Jf(a,-1),this.g.$q(a)):(this.g.cp(s,!1),this.g.Wg(s,this.g.Ma(o)),this.g.Vj(s,a),h+=a,i++,s=this.g.Rb(s))}}for(r=0,n=this.dd.size;r=a?(t=this.g.Pa(o,this.ji),this.dd.set(t,-1),o=this.g.pd(o,!1),a==2&&(0<=(t=this.g.Pa(o,this.ji))&&this.dd.set(t,-1),this.g.pd(o,!1)),a=s,this.g.Jf(a,-1),this.g.$q(a)):(this.g.kn(s,!0),this.g.Vj(s,a),this.g.Jf(s,o),this.g.Wg(s,this.g.Ma(o)),this.g.cp(s,!1),h+=a,i++)}for(this.g.Rl(this.X,i),this.g.Tj(this.X,h),r=0,n=this.g.ld;n!=-1;n=this.g.ue(n))r+=this.g.I(n);this.g.bC(r)},f.By=function(r,n,t){return new f(n).Ay(r,t)},f.clip=function(r,n,t,i){if(r.B())return r;if(n.B())return r.Ia();if((t=r.getType())==33)return i=r.D(),n.contains(i)?r:r.Ia();if(t==197)return i=new e.l,r.A(i),i.Ea(n)?(n=new e.Fh,r.copyTo(n),n.Xo(i),n):r.Ia();var h=new e.l;if(r.xc(h),n.contains(h))return r;if(!n.isIntersecting(h))return r.Ia();if((h=r.Bb)!=null&&(h=h.Fk)!=null){if((h=h.Ro(n))==1){if(t!=1736)throw e.i.Qa();return(r=new e.Da(r.description)).tp(n),r}if(h==0)return r.Ia()}switch(t){case 550:t=null,h=r.I();for(var s=r.ub(0),o=0,a=0;a=t?1:-1;case 1:if(r.G=t?1:-1;case 2:if(r.v>=t&&r.C>t)break;return r.C<=t?1:-1;case 3:if(!(r.G>=t&&r.H>t))return r.H<=t?1:-1}return 0},f.prototype.Ay=function(r,n){return r.getType()==1736?this.Cy(r,n):this.Dy(r)},f.prototype.Cy=function(r,n){if(this.Ca.R()==0||this.Ca.ca()==0)return r.Ia();var t=new e.l;r.xc(t),this.X=this.g.Ib(r);var i=new e.l,h=new e.l,s=new e.h,o=new e.h,a=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0],c=new e.yb,l=new e.ia(0);l.Jb(256);for(var p=!1,y=0;!p&&4>y;y++){var d=!1,g=!!(1&y),b=0;switch(y){case 0:b=this.Ca.v,d=t.v<=b&&t.C>=b;break;case 1:b=this.Ca.G,d=t.G<=b&&t.H>=b;break;case 2:b=this.Ca.C,d=t.v<=b&&t.C>=b;break;case 3:b=this.Ca.H,d=t.G<=b&&t.H>=b}if(d)for(p=!0,d=this.g.Ob(this.X);d!=-1;){var x=!0,m=-1,w=-1,j=this.g.Xa(d),M=j;do{var A=this.g.bc(M);A==null&&(A=c,this.g.D(M,s),A.Dc(s),this.g.D(this.g.U(M),o),A.Qc(o)),A.A(i);var z=this.Lh(i,y,b),N=0,I=-1;if(z==-1){N=0<(A=A.cq(g,b,a,u))?this.g.LX(M,u,A):0,N+=1;var C=M,T=this.g.U(C);for(A=0;Ay;y++){var d=!1,g=!!(1&y),b=0;switch(y){case 0:b=this.Ca.v,d=a.v<=b&&a.C>=b;break;case 1:b=this.Ca.G,d=a.G<=b&&a.H>=b;break;case 2:b=this.Ca.C,d=a.v<=b&&a.C>=b;break;case 3:b=this.Ca.H,d=a.G<=b&&a.H>=b}if(d)for(d=o,o=r.Ia(),(d=d.Ga()).Zi();d.$a();)for(var x,m=!0;d.Ha();){var w=d.ha();w.A(n);var j=this.Lh(n,y,b);if(j==-1){if(0<(j=w.cq(g,b,i,h))){var M=0;w.Yp(u);for(var A=0;A<=j;A++)if(M!=(x=Ai.x&&(i.x+=r)}else p=n.y-this.Ca.G,h.y=e.lc.sign(t.y-n.y),i.y=r*e.lc.Cn(Math.floor(Math.abs(p/r)),p)+this.Ca.G,0>i.y&&(i.y+=r);p=l!=0?t.y-n.y:t.x-n.x;var y=Math.abs(p);if(65536=g||(s[y]=g,y++)}y!=0&&this.g.Ul(u,s,y)}}u=c}while(u!=a)}},f.prototype.Vl=function(r,n){for(var t=-1,i=new e.h,h=null,s=this.g.Ob(this.X);s!=-1;s=this.g.Rb(s))for(var o=this.g.Xa(s),a=0,u=this.g.Ja(s);ah.size)){var l=this;h.Vd(0,h.size,function(A,z){return l.Mh(A,z)}),t=new e.h,s=new e.h,o=new e.h,s.Rc();var p=-1;a=new e.ia(0),u=new e.ia(0),c=null;for(var y=this.g.Gd(),d=this.g.Gd(),g=0,b=h.size;gs.compare(t)&&(r?t.y==n:t.x==n)&&(a.add(p),j=!0,this.g.Ra(p,d,1)),this.g.D(x,t),0>s.compare(t)&&(r?t.y==n:t.x==n)&&(j||a.add(p),this.g.Ra(p,y,1))}for(m=0,j=a.size;mu.compare(a)&&(r?a.y==n:a.x==n)&&(b=x),x=-1;var m=this.g.Ma(g);if(this.g.D(m,a),0>u.compare(a)&&(r?a.y==n:a.x==n)&&(x=m),b!=-1&&x!=-1)this.Kh(g,i,h),this.g.pd(g,!1),this.Kh(b,i,h),this.g.pd(b,!1),l=!0;else if(b!=-1||x!=-1){for(m=d+1;mu.compare(a)&&(r?a.y==n:a.x==n)&&(M=j),j=this.g.Ma(w);var A=-1;if(this.g.D(j,a),0>u.compare(a)&&(r?a.y==n:a.x==n)&&(A=j),M!=-1&&A!=-1){this.Kh(w,i,h),this.g.pd(w,!1),this.Kh(M,i,h),this.g.pd(M,!1),l=!0;break}if(b!=-1&&A!=-1){this.zt(i,g,b,w,A,h),l=!0;break}if(x!=-1&&M!=-1){this.zt(i,w,M,g,x,h),l=!0;break}}}if(l)break}}}if(!l)break}p=s,u.L(t)}this.g.Td(h)}},f.prototype.Kh=function(r,n,t){t=this.g.Pa(r,t),n.set(t,-1),t=this.g.Pa(r,this.ji),this.dd.set(t,-1),(n=this.g.bd(r))!=-1&&this.g.Xa(n)==r&&(this.g.Jf(n,-1),this.g.Wg(n,-1))},f.prototype.zt=function(r,n,t,i,h,s){this.g.Bc(n,i),this.g.Cc(i,n),this.g.Cc(t,h),this.g.Bc(h,t),this.Kh(i,r,s),this.g.mi(i,!1),this.Kh(h,r,s),this.g.mi(h,!0)},f.prototype.Ty=function(){for(var r=0,n=this.dd.size;r=a?(t=this.g.Pa(o,this.ji),this.dd.set(t,-1),o=this.g.pd(o,!1),a==2&&(0<=(t=this.g.Pa(o,this.ji))&&this.dd.set(t,-1),this.g.pd(o,!1)),a=s,this.g.Jf(a,-1),this.g.$q(a)):(this.g.kn(s,!0),this.g.Vj(s,a),this.g.Jf(s,o),this.g.Wg(s,this.g.Ma(o)),this.g.cp(s,!1),h+=a,i++)}for(this.g.Rl(this.X,i),this.g.Tj(this.X,h),r=0,n=this.g.ld;n!=-1;n=this.g.ue(n))r+=this.g.I(n);this.g.bC(r)},f.By=function(r,n,t,i){return new f(n,i).Ay(r,t)},f.clip=function(r,n,t,i,h){return f.Nu(r,n,null,t,i,h)},f.Nu=function(r,n,t,i,h,s){var o=r.getType();if(o==33)return h=r.D(),n.contains(h)?r:r.Ia();if(o==197)return h=new e.l,r.A(h),h.Ea(n)?(n=new e.Fh,r.copyTo(n),n.Xo(h),n):r.Ia();if(r.B())return r;if(n.B())return r.Ia();var a=new e.l;if(r.xc(a),n.contains(a))return r;if(!n.isIntersecting(a))return r.Ia();if((t!=null||isNaN(i))&&e.ta.ty(t,n,!1),!e.aa.xj(o))throw e.i.N();if((t=r.Bb)!=null&&(t=t.Fk)!=null){if((t=t.Ro(n))==1){if(o!=1736)throw e.i.fa("internal error");return(r=new e.Da(r.description)).tp(n),r}if(t==0)return r.Ia()}switch(o){case 550:for(s=null,o=r.I(),t=r.ub(0),i=0,h=new e.h,a=0;a=a;a+=1)for(var u=0;1>=u;u+=1){var c=n.jG(s+a,o+u),l=this.xl.rR(c);l!=-1&&(this.pq[h]=l,this.xs[h]=c,h++)}for(s=h-1;1<=s;s--)for(l=this.pq[s],o=s-1;0<=o;o--)if(l==this.pq[o]){this.xs[o]=-1,s!=--h&&(this.xs[s]=this.xs[h],this.pq[s]=this.pq[h]);break}for(o=0;oo.Db())throw e.i.N();return a==0||o.B()?o:((p=new s(p)).ko=o,p.Ka=a,p.qa=l,p.Ki=u,p.CA=c,p.Rx())},s.prototype.eM=function(){var o=this.ko,a=o.ac(),u=o.wc(),c=new e.h;return c.uc(u,a),c.normalize(),c.Hv(),c.scale(this.Ka),a.add(c),u.add(c),c=o.Ia(),o.Dc(a),o.Qc(u),c},s.prototype.dM=function(){var o=this.ko;if(0p&&(0this.Ka?-f:f,-1g&&(.017453292519943295>(b=2*Math.acos(g))&&(b=.017453292519943295),1<(y=e.O.truncate(f/b+1.5))&&(d/=y)),b=w+n,w=t.Pd(p,this.Ka,b),o==0&&(w.type|=1024),this.fc(w,o),g=this.Ka/Math.cos(d/2),b+=d/2,(w=t.Pd(p,g,b)).type|=1024,this.fc(w);0<--y;)b+=d,(w=t.Pd(p,g,b)).type|=1024,this.fc(w);(w=t.Pd(p,this.Ka,j-n)).type|=1024,this.fc(w)}else if(this.Ki==1)w=t.Pd(p,this.Ka,w+n),this.fc(w,o),w=t.Pd(p,this.Ka,j-n),this.fc(w);else if(this.Ki==0)for(g=1-u/Math.abs(this.Ka),y=1,d=j-n-(w+n),-1g&&(.017453292519943295>(b=2*Math.acos(g))&&(b=.017453292519943295),1<(y=e.O.truncate(Math.abs(d)/b+1.5))&&(d/=y)),g=this.Ka/Math.cos(.5*d),b=w+n+.5*d,w=t.Pd(p,g,b),this.fc(w,o);0<--y;)b+=d,w=t.Pd(p,g,b),this.fc(w);else this.Ki==2?(g=y.x-p.x,b=y.y-p.y,.99999999<(y=(g*(x=d.x-p.x)+b*(m=d.y-p.y))/Math.sqrt(g*g+b*b)/Math.sqrt(x*x+m*m))?(w=t.Pd(p,1.4142135623730951*this.Ka,j-.25*f),this.fc(w,o),w=t.Pd(p,1.4142135623730951*this.Ka,j+.25*f),this.fc(w)):(y=Math.abs(this.Ka/Math.sin(.5*Math.acos(y))))>(d=Math.abs(this.CA*this.Ka))?(g=.5*(j-w),g=this.Ka/Math.abs(Math.sin(g)),w=t.Pd(p,g,.5*(w+j)),j=e.h.construct(w.x,w.y),w=e.h.construct(p.x,p.y),(p=new e.h).uc(j,w),(j=new e.h).HW(d/p.length(),p,w),w=(y-d)*Math.abs(this.Ka)/Math.sqrt(y*y-this.Ka*this.Ka),0w&&(j-=r),y=w-j(g=1.4142135623730951*this.Ka)?w+.25*f:w+.75*f,w=t.Pd(p,g,b),this.fc(w,o),b=0>g?j-.25*f:j-.75*f,w=t.Pd(p,g,b),this.fc(w)):(g=.5*(j-w),g=this.Ka/Math.abs(Math.sin(g)),ja))for(var u=0;u=c+1;a--)(u=t.al(o.Na(a))).type|=1024,this.wg.push(u);if(this.mE())if(2<=this.Yb.length){for(o=-1,(l=!!(1024&this.Yb[this.gf-1].type))||(o=0),a=1;a=Math.min(u.x,c.x)&&Math.max(u.x,c.x)>=Math.min(o.x,a.x)&&Math.max(o.y,a.y)>=Math.min(u.y,c.y)&&Math.max(u.y,c.y)>=Math.min(o.y,a.y)},s.prototype.xQ=function(o,a,u,c,l){l.bE=!1;var p=(a.y-o.y)*(c.x-u.x)-(a.x-o.x)*(c.y-u.y),y=(u.y-o.y)*(a.x-o.x)-(u.x-o.x)*(a.y-o.y);if(0<=(p=p==0?2:y/p)&&1>=p){var d=p;if(p=(c.y-u.y)*(a.x-o.x)-(c.x-u.x)*(a.y-o.y),y=(o.y-u.y)*(c.x-u.x)-(o.x-u.x)*(c.y-u.y),0<=(p=p==0?2:y/p)&&1>=p)return l.an=t.TO(o.x+p*(a.x-o.x),o.y+p*(a.y-o.y)),l.an.Uh=u.Uh+d*(c.Uh-u.Uh),d!=0&&d!=1||p!=0&&p!=1||(l.bE=!0),l.VY=p,l.WY=d,!((d==0||d==1)&&0p||(p==0||p==1)&&0d)}return!1},s.prototype.QO=function(o){for(;this.Yb[o].sho-(s*=2))return!0;h=new e.h;var a=new e.h,u=new e.h;i.tc(s,h),i.tc(s+2,a),i.tc(s+4,u);var c=t.Wu(a,u,h);if(c.ps()||!t.um(c.value()))return!1;var l=e.h.construct(a.x,a.y),p=new e.h;for(s+=6;so;o++){i.mB(o,s);var a=this.Cr(s);if(a!=-1){i.Hf(o,h);var u=this.g.fc(this.Ss,h);this.Fa.Sj(a,u)}}},t.prototype.oN=function(i){var h=new e.Sa,s=i.ac();if((s=this.Cr(s))!=-1){i.To(h);var o=this.g.fc(this.Ss,h);this.Fa.Sj(s,o)}s=i.wc(),(s=this.Cr(s))!=-1&&(i.Po(h),i=this.g.fc(this.Ss,h),this.Fa.Sj(s,i))},t.prototype.nN=function(i){var h=i.D();(h=this.Cr(h))!=-1&&(i=this.g.fc(this.Ss,i),this.Fa.Sj(h,i))},t.prototype.Cr=function(i){var h=-1;if(this.Fa.size(-1)==0)return this.Fa.addElement(-4,-1);if(this.Fa.size(-1)==1){var s=this.g.Na(this.Fa.ja(this.Fa.rc(-1)));return i.Rz(s)||(h=this.Fa.xn(-5)),h}return this.pC(i)},t.prototype.pC=function(i){var h=-1;do{var s=this.Fa.rc(-1),o=this.Fa.Fc(-1),a=this.Fa.ja(s),u=this.Fa.ja(o),c=new e.h,l=new e.h;if(this.Xh.D(a,c),this.Xh.D(u,l),a=e.h.Uq(l,i,c),t.um(a))h=this.Fa.xn(-1),(c=this.nC(i,o,s))!=s&&this.oC(i,s,this.Fa.we(c));else if(t.CG(a)){l=this.Fa.sv(-1);var p=this.Fa.rc(-1),y=this.Fa.Fc(-1);for(a=new e.h,u=new e.h;p!=this.Fa.we(y);){var d=this.Fa.ja(l);this.Xh.D(d,a),d=e.h.Uq(a,i,c),t.CG(d)?(y=l,l=this.Fa.ll(l)):(p=l,l=this.Fa.Xp(l))}if(l=y,c=p,d=this.Fa.ja(l),p=this.Fa.ja(c),this.Xh.D(d,a),this.Xh.D(p,u),c!=s&&(a=e.h.Uq(u,i,a),!t.um(a)))continue;h=this.Fa.zu(c,l,-2,!1),this.oC(i,l,o),this.nC(i,c,s)}else this.sb==null&&(this.sb=new e.yb),this.sb.Dc(l),this.sb.Qc(c),0>(c=this.sb.fe(i,!0))?(c=this.Fa.we(o),this.Fa.vd(o,-1),h=this.Fa.xn(-3),this.nC(i,c,s)):1i},t.CG=function(i){return 0h)throw e.i.fa("Internal Error: max number of iterations exceeded");var a=this.nM(n);if(i=i||a,this.tH&&(a=this.g.Gp(n,!0,!1)!=0,i=i||a),a=!1,(s==0||o||e.$t.kI(!0,this.g,r,null,this.nd))&&(a=this.sM(t),i=i||a),!a)break;e.mp.zp(this.nd)}return i},f}();e.Tk=v}(k||(k={})),function(e){var v=function(){function r(n){this.$d=this.Mc=null,this.Ys=0,this.Ub=n,this.cA=!0}return r.prototype.uv=function(n,t){var i=this.g.bc(n);if(i==null){if(!this.g.ed(n,t))return null;i=t}return i},r.prototype.Xq=function(){var n;n===void 0&&(n=!1),this.Ys++,!n&&4095&this.Ys||(this.Ys=0,e.mp.zp(this.Ub))},r.prototype.nP=function(){var n=this.g.Yq(!1),t=!1,i=new e.yb,h=new e.yb,s=new e.l;s.Oa();var o=new e.l;o.Oa();for(var a=new e.Sa,u=new e.TC,c=n.next();c!=-1;c=n.next()){e.mp.zp(this.Ub);var l=null,p=!1;if(!e.aa.Rn(this.g.ic(n.ck))){if((l=this.uv(c,i))==null)continue;if(l.A(s),s.W(this.qa,this.qa),l.Bi(this.qa)){if(!l.Bi(0))continue;p=!0,l=null}}var y=this.g.Yq(n),d=y.next();for(d!=-1&&(d=y.next());d!=-1;d=y.next()){var g=null,b=!1;if(!e.aa.Rn(this.g.ic(y.ck))){if((g=this.uv(d,h))==null)continue;if(g.A(o),g.Bi(this.qa)){if(!g.Bi(0))continue;b=!0,g=null}}var x=0,m=0;if(l!=null&&g!=null)s.HG(o)&&(u.Oo(l),u.Oo(g),u.Ea(this.qa,!1),0<(x=u.ol(0))+(m=u.ol(1))&&(this.g.jr(c,u,0,!0),this.g.jr(d,u,1,!0)),u.clear());else if(l!=null){var w=new e.h;if(this.g.D(d,w),s.contains(w)){if(u.Oo(l),this.g.Vi(d,a),u.Kz(this.qa,a,!1),0<(x=u.ol(0)))if(this.g.jr(c,u,0,!0),b){for(b=-1,w=this.g.U(d);w!=-1&&w!=d&&(b=w,(g=this.uv(w,h))!=null&&g.Bi(0));w=this.g.U(w));for(w=d;w!=-1&&(this.g.Dh(w,u.Bf),w!=b);w=this.g.U(w));}else this.g.Dh(d,u.Bf);u.clear()}}else{if(g==null)continue;if(w=new e.h,this.g.D(c,w),o.W(this.qa,this.qa),o.contains(w)){if(u.Oo(g),this.g.Vi(c,a),u.Kz(this.qa,a,!1),0<(m=u.ol(0)))if(this.g.jr(d,u,0,!0),p){for(b=-1,w=this.g.U(c);w!=-1&&w!=c&&(b=w,(g=this.uv(w,h))!=null&&g.Bi(0));w=this.g.U(w));for(w=c;w!=-1&&(this.g.Dh(w,u.Bf),w!=b);w=this.g.U(w));}else this.g.Dh(c,u.Bf);u.clear()}}if(x+m!=0){if(x!=0){if((l=this.g.bc(c))==null){if(!this.g.ed(c,i))continue;l=i,i.A(s)}else l.A(s);if(l.Bi(this.qa))break}t=!0}}}return t},r.prototype.oP=function(){return this.QU()},r.prototype.QU=function(){return new e.RC().PX(this.g,this.qa)},r.prototype.lI=function(){var n=!1;this.Mc==null&&(this.Mc=new e.Yj);var t=new e.ia(0);t.Jb(this.g.fd+1);for(var i=this.g.Yq(),h=i.next();h!=-1;h=i.next())t.add(h);this.g.nx(t,t.size),t.add(-1),i=this.g.Gd(),h=this.g.Gd(),this.$d=new e.UC(this.g,this.qa,!this.cA),this.Mc.Vo(this.$d);var s=new e.ia(0),o=new e.ia(0),a=0;new e.h;var u=this.g.td;this.g.vb.mc();for(var c,l,p=this.g.vb.za[0].o,y=t.get(a++);y!=-1;){var d=c=p[2*(l=u.T(y,0))],g=l=p[2*l+1];do{var b=u.T(y,2),x=u.T(y,1);if(b!=-1){var m=u.T(b,0),w=p[2*m];0>(g<(m=p[2*m+1])?-1:g>m?1:dw?1:0)&&(o.add(y),o.add(b))}x!=-1&&(w=p[2*(m=u.T(x,0))],0>(g<(m=p[2*m+1])?-1:g>m?1:dw?1:0)&&(o.add(x),o.add(x))),(w=this.g.Pa(y,i))!=-1&&(s.add(w),this.g.Ra(y,i,-1)),(w=this.g.Pa(y,h))!=-1&&(s.add(w),this.g.Ra(y,h,-1)),(y=t.get(a++))!==-1&&(d=p[2*(g=u.T(y,0))],g=p[2*g+1])}while(y!=-1&&d===c&&g===l);for(d=s.size==1&&o.size==2,w=g=-1,b=0,x=s.size;bn.fd?n=t.nP():t.oP())},r.V=function(n,t,i){return r.fQ(n,n.IF(),t,i)},r.kI=function(n,t,i,h,s){if(!r.yE(t))return!1;var o=new r(s);if(o.g=t,o.qa=i,o.cA=n,o.lI())return h!=null&&h.Wt(o.Ni),!0;var a=new e.Dd;return a.$B(),t.Oc(a),(o=new r(s)).g=t,o.qa=i,o.cA=n,n=o.lI(),a.$B(),t.Oc(a),!!n&&(h!=null&&h.Wt(o.Ni),!0)},r.Ml=function(n,t){return!(16>(n=n.I()))&&2*n+Math.log(n)*Math.LOG10E/Math.log(2)*t<1*n*t},r.lP=function(n,t,i,h){var s=t.getType();if(e.aa.Hc(s))return new r(h).mP(n,t,i);throw e.i.fa("crack_A_with_B")},r.prototype.mP=function(n,t,i){var h=new e.l;n.xc(h);var s=new e.l;if(t.xc(s),s.W(i,i),!s.isIntersecting(h))return n;var o=n.Bb,a=null;o!=null&&(a=o.Fb),r.Ml(n,n.I())&&(a=e.ta.jj(n,s));var u=a!=null?a.getIterator():null,c=t.Ga();t=n.Ga();var l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=[];c.$a();)for(;c.Ha();){var p=c.ha();if(a!=null){for(u.Uo(p,i),o=u.next();o!=-1;o=u.next())if(this.Xq(),t.Vb(a.ja(o),-1),t.Ha()){var y=(o=t.ha()).Ea(p,null,l,null,i);for(o=0;ot.t?1:n.tt.index?1:-1},r}()}(k||(k={})),function(e){var v;(v=e.KK||(e.KK={}))[v.Left=0]="Left",v[v.Right=1]="Right",v[v.Coincident=2]="Coincident",v[v.Undefined=3]="Undefined",v[v.Uncut=4]="Uncut";var f=function(t,i,h,s,o,a,u,c,l,p,y){this.X=t,this.bt=i,this.Ns=h,this.tg=s,this.Lm=p,this.Al=y};e.uY=f;var r=function(){function t(i,h){this.JH=i,this.Hi=h}return t.prototype.qM=function(i,h){var s=new e.h;this.Hi.D(i,s);var o=new e.h;return this.Hi.D(h,o),(s=s.compare(o))!=0?s:(i=this.Hi.Pa(i,this.JH))<(h=this.Hi.Pa(h,this.JH))?-1:i==h?0:1},t}(),n=function(t,i,h,s,o,a,u,c,l){this.tg=t,this.Ns=i,this.OA=h,this.UH=s,this.Ei=o,this.Al=a,this.Lm=u,this.VH=c,this.OT=l};e.tY=n,e.LK=function(){function t(){}return t.JK=function(i,h,s,o,a,u){if(h.B())i=new f(h,4,-1,-1,NaN,4,-1,-1,NaN,-1,-1),a.push(i);else if(s.B())i=new f(h,4,-1,-1,NaN,4,-1,-1,NaN,-1,-1),a.push(i);else{var c=new e.gd;if(c.Ib(h),c.Ib(s),e.Tk.V(c,o,u,!0),c.fd==0)i=new f(h.Ia(),4,-1,-1,NaN,4,-1,-1,NaN,-1,-1),a.push(i);else{for(h=0,s=c.Gd(),o=c.ld;o!=-1;o=c.ue(o))for(u=c.Ob(o);u!=-1;u=c.Rb(u))for(var l=c.Xa(u),p=0,y=c.Ja(u);p(g=g.Ea(l,null,y,d,0))&&(o=new n(a,o,y[0],NaN,g,c,u,d[0],NaN),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1)),!0},t.wM=function(i,h,s,o,a,u,c){var l=new e.yb,p=new e.yb,y=[0,0],d=[0,0],g=h.bc(a);return g==null&&(h.ed(a,l),g=l),(l=h.bc(c))==null&&(h.ed(c,p),l=p),2>(g=g.Ea(l,null,y,d,0))&&(o=new n(a,o,y[0],NaN,g,c,u,d[0],NaN),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1),!0)},t.xM=function(i,h,s,o,a,u,c,l){var p=new e.yb,y=new e.yb,d=[0,0],g=[0,0],b=h.bc(a);return b==null&&(h.ed(a,p),b=p),(p=h.bc(c))==null&&(h.ed(c,y),p=y),(b=b.Ea(p,null,d,g,0))==2?(o=new n(a,o,d[0],d[1],b,c,u,g[0],g[1]),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1),!0):(y=!1,a==l&&(o=new n(a,o,d[0],NaN,b,c,u,g[0],NaN),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1),y=!0),y)},t.yM=function(i,h,s,o,a,u,c,l){var p=new e.yb,y=new e.yb,d=[0,0],g=[0,0],b=h.bc(a);return b==null&&(h.ed(a,p),b=p),(p=h.bc(c))==null&&(h.ed(c,y),p=y),(b=b.Ea(p,null,d,g,0))==2?(o=new n(a,o,d[0],d[1],b,c,u,g[0],g[1]),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1),!0):(y=!1,a==l&&(o=new n(a,o,d[0],NaN,b,c,u,g[0],NaN),s.push(o),0>(o=h.Pa(a,i))&&h.Ra(a,i,s.length-1),y=!0),y)},t.cM=function(i,h,s,o){var a=[];a[0]=new e.h,a[1]=new e.h,a[2]=new e.h,a[3]=new e.h;var u=new e.h,c=new e.h,l=new e.h,p=new e.h,y=null;o!=null&&(y=new e.ig).Or();var d=0,g=null,b=new e.yb;new e.yb;for(var x=s.Ob(s.ld);x!=-1;x=s.Rb(x)){for(var m=4,w=-1,j=-1,M=-1,A=-1,z=NaN,N=!0,I=!1,C=!0,T=!0,D=!0,B=0,E=x,G=0,H=s.Xa(x),U=s.Ja(x),$=0;$=h.length-2||h[d+2].Ns!=w)&&(m=0):m=1):((S!=R||L&&R==0)&&(o!=null?(O=new f(g,3,w,K,S,m,E,j,G,X,V),o.push(O)):null.add(B)),m=1):m!=0?((S!=R||L&&R==0)&&(o!=null?(O=new f(g,0,w,K,S,m,E,j,G,X,V),o.push(O)):null.add(B)),tt?(d>=h.length-2||h[d+2].Ns!=w)&&(m=1):m=0):((S!=R||L&&R==0)&&(o!=null?(O=new f(g,3,w,K,S,m,E,j,G,X,V),o.push(O)):null.add(B)),m=0),(S!=R||L&&R==0)&&(R=S,E=w,j=K,G=S,M=X,A=V,z=nt,N=C=!1,T=D=!0))}}d++}R!=1&&(D&&(o!=null?g=new e.Ta:B=0),o!=null?(W.ah(R,1,y),g.oc(y.get(),T)):B++,T=D=!1,C=!0)}C&&(S=1,K=s.rj(x),K=s.Ma(K),V=X=-1,nt=NaN,N?o!=null?(O=new f(g,4,w,K,S,m,E,j,G,X,V),o.push(O)):null.add(B):(N=m==1?0:m==0?1:3,o!=null?(O=new f(g,N,w,K,S,m,E,j,G,X,V),o.push(O)):null.add(B)))}},t.CM=function(i,h,s,o,a,u){var c=s[o].VH;if(c==1)return t.AM(i,h,s,o,a,u);if(c==0)return t.BM(i,h,s,o,a,u);throw e.i.Qa()},t.AM=function(i,h,s,o,a,u){var c=new e.yb,l=s[o].tg,p=s[o].Lm,y=s[o].Al,d=-1,g=-1,b=-1,x=-1;if(!i&&0.01*n&&(i*=1+(1+(r=r.xb/n))*r),this.pb=t,this.xb=i+2220446049250313e-31*Math.abs(t)},f.prototype.sqrt=function(){if(0<=this.pb){var r=Math.sqrt(this.pb),n=this.pb>10*this.xb?.5*this.xb/r:this.pb>this.xb?r-Math.sqrt(this.pb-this.xb):Math.max(r,Math.sqrt(this.pb+this.xb)-r);n+=2220446049250313e-31*Math.abs(r)}else this.pb<-1*this.xb?n=r=NaN:(r=0,n=Math.sqrt(this.xb));this.pb=r,this.xb=n},f.prototype.sin=function(r){var n=Math.sin(r.pb),t=Math.cos(r.pb);this.pb=n,n=Math.abs(n),this.xb=(Math.abs(t)+.5*n*r.xb)*r.xb+2220446049250313e-31*n},f.prototype.cos=function(r){var n=Math.sin(r.pb),t=Math.cos(r.pb);this.pb=t,t=Math.abs(t),this.xb=(Math.abs(n)+.5*t*r.xb)*r.xb+2220446049250313e-31*t},f.prototype.qg=function(){return Math.abs(this.pb)<=this.xb},f.prototype.ps=function(){return this.qg()&&this.xb!=0},f}();e.Wb=v}(k||(k={}));var Q=new k.h,ht=new k.h,et=new k.h,st=new k.h,ot=new k.h;(function(e){var v,f;(f=v||(v={}))[f.closedPath=1]="closedPath",f[f.exteriorPath=2]="exteriorPath",f[f.ringAreaValid=4]="ringAreaValid";var r=function(){function n(t,i,h,s,o,a,u){i!==void 0?(this.ib=t,this.ck=i,this.bl=h,this.ii=s,this.ya=a,this.hA=u,this.ew=o):(this.ib=t.ib,this.ck=t.ck,this.bl=t.bl,this.ii=t.ii,this.ya=t.ya,this.hA=t.hA,this.ew=t.ew),this.bH=!0}return n.prototype.next=function(){return this.bH?(this.bH=!1,this.ii):this.ii!=-1?(this.ii=this.ib.U(this.ii),this.ya++,this.ii!=-1&&this.ii!=this.ew?this.ii:this.$T()):-1},n.prototype.$T=function(){for(this.bl=this.ib.Rb(this.bl),this.ya=0;this.ck!=-1;){for(;this.bl!=-1;this.bl=this.ib.Rb(this.bl))if(this.ew=this.ii=this.ib.Xa(this.bl),this.ii!=-1)return this.ii;if(this.ck=this.ib.ue(this.ck),this.ck==-1)break;this.hA&&!e.aa.Hc(this.ib.ic(this.ck))||(this.bl=this.ib.Ob(this.ck))}return-1},n.AP=function(t,i,h,s,o,a,u){return new n(t,i,h,s,o,a,u)},n}();e.zY=r,v=function(){function n(){this.jo=this.Am=this.wk=this.cd=this.Ck=this.vo=this.Oi=this.md=this.bi=this.Sg=this.We=this.Il=null,this.qw=this.ld=-1,this.fd=0,this.fA=!1,this.ht=this.it=this.vb=null}return n.prototype.Sh=function(t){return this.We!=null?this.We[t]:null},n.prototype.Xg=function(t,i){if(this.We==null){if(i==null)return;this.We=[];for(var h=0,s=this.vb.I();h=this.Oi.size&&(t=16>i?16:e.O.truncate(3*i/2),this.Oi.resize(t),this.vo.resize(t)),this.Oi.set(i,0),this.vo.set(i,0),i},n.prototype.sF=function(t){this.md.jd(t)},n.prototype.Vy=function(t){this.td.jd(t),this.fd--},n.prototype.oI=function(t){this.md==null&&(this.md=new e.$c(8),this.td=new e.$c(5),this.Oi=new e.be(0),this.vo=new e.be(0));var i=this.td.Ce(),h=0<=t?t:i;if(this.td.S(i,0,h),0>t){if(h>=this.vb.I()){if(t=16>h?16:e.O.truncate(3*h/2),this.vb.resize(t),this.We!=null)for(var s=0;si.Ja(s))){var a=this.vf(t,-1);this.kn(a,i.dc(s));for(var u=i.Ba(s),c=i.Vc(s);ut.Ja(i))return h;this.Il.Fd(t,t.Ba(i),t.Vc(i)),this.it=this.vb.ub(0);var s=this.vf(h,-1);this.kn(s,t.dc(i)||!0);var o=this.We!=null&&t.Ve!=null,a=t.Ba(i);for(i=t.Vc(i);a=i.size&&i.resize(Math.max(e.O.truncate(1.25*t),16),-1),i.write(t,h)},n.prototype.KF=function(t,i){return(t=this.JF(t))<(i=this.wk[i]).size?i.read(t):-1},n.prototype.aF=function(){this.wk==null&&(this.wk=[]);for(var t=0;tl:2>l)?(u=this.Zq(u),s=0y){var d=y;c!=null&&(d=0d){var g=d;if(c!=null&&(g=0s||o>this.fd-1)throw e.i.N("invalid call");if(s>o&&!this.dc(t))throw e.i.N("cannot iterate across an open path");for(t=0;i!=h;i=this.U(i))s=this.Ua(i),(o=this.Sh(s))!=null?t+=o.Qb():(o=this.Ua(this.U(i)),t+=this.vb.yr(s,o));return t},n.prototype.Dh=function(t,i){var h=this.Ua(t);this.vb.Ht(h,i),(h=this.Sh(h))!=null&&h.setStart(i),(t=this.Ma(t))!=-1&&(t=this.Ua(t),this.Sh(t)!=null&&h.setEnd(i))},n.prototype.Vi=function(t,i){t=this.Ua(t),this.vb.ve(t,i)},n.prototype.mf=function(t,i){this.Cb(t,i.x,i.y)},n.prototype.Cb=function(t,i,h){var s=this.Ua(t);this.vb.Cb(s,i,h),(s=this.Sh(s))!=null&&s.ZB(i,h),(t=this.Ma(t))!=-1&&(t=this.Ua(t),this.Sh(t)!=null&&s.Ql(i,h))},n.prototype.D=function(t,i){this.vb.D(this.td.T(t,0),i)},n.prototype.Gc=function(t,i){this.vb.za[0].tc(2*this.td.T(t,0),i)},n.prototype.Na=function(t){var i=new e.h;return this.vb.D(this.td.T(t,0),i),i},n.prototype.dG=function(t,i){this.it.tc(2*t,i)},n.prototype.Uc=function(t,i,h){return this.vb.Uc(t,this.Ua(i),h)},n.prototype.setAttribute=function(t,i,h,s){this.vb.setAttribute(t,this.Ua(i),h,s)},n.prototype.Ua=function(t){return this.td.T(t,0)},n.prototype.ih=function(){var t=new e.h;return this.D(void 0,t),t.y},n.prototype.fq=function(t,i){t=this.Ua(t),i=this.Ua(i);var h=this.vb.za[0].o;return h[2*t]===h[2*i]&&h[2*t+1]===h[2*i+1]},n.prototype.Dv=function(t,i){t=this.Ua(t);var h=this.vb.za[0].o;return h[2*t]===i.x&&h[2*t+1]===i.y},n.prototype.vX=function(t,i){if(1>i&&(i=1),this.Sg==null){if(i==1)return;this.Sg=e.Yc.Dn(this.vb.I(),1)}(t=this.Ua(t))>=this.Sg.size&&this.Sg.resize(t+1,1),this.Sg.write(t,i)},n.prototype.cG=function(t){return t=this.Ua(t),this.Sg==null||t>=this.Sg.size?1:this.Sg.read(t)},n.prototype.Ra=function(t,i,h){i=this.bi[i],t=this.Ua(t),i.sizeo?1:ac?1:0})},n.prototype.jS=function(){for(var t=this.ld;t!=-1;t=this.ue(t))if(!e.aa.Hc(this.ic(t)))return!0;return!1},n.prototype.hC=function(t,i){for(var h=this.Ob(t),s=this.Ob(i),o=this.kv(t),a=this.kv(i),u=this.Ob(t);u!=-1;u=this.Rb(u))this.gx(u,i);for(u=this.Ob(i);u!=-1;u=this.Rb(u))this.gx(u,t);this.Zo(t,s),this.Zo(i,h),this.$o(t,a),this.$o(i,o),h=this.I(t),s=this.da(t),o=this.da(i),this.Tj(t,this.I(i)),this.Tj(i,h),this.Rl(t,o),this.Rl(i,s),h=this.cd.T(t,2),this.cd.S(t,2,this.cd.T(i,2)),this.cd.S(i,2,h)},n}(),e.gd=v})(k||(k={})),function(e){var v=function(f){function r(n,t,i,h){var s=f.call(this)||this;return s.$=new e.l,n===void 0?s.UE():typeof n=="number"?s.VO(n,t,i,h):n instanceof e.Sa?t!==void 0?s.Qu(n,t,i):s.WO(n):n instanceof e.ra?t!==void 0?s.YO(n,t):s.XO(n):n instanceof e.l?s.UO(n):s.UE(),s}return J(r,f),r.prototype.Qu=function(n,t,i){this.description=e.ee.og(),this.$.Oa(),n.B()||this.tu(n,t,i)},r.prototype.UO=function(n){this.description=e.ee.og(),this.$.K(n),this.$.normalize()},r.prototype.XO=function(n){if(n==null)throw e.i.N();this.description=n,this.$.Oa()},r.prototype.YO=function(n,t){if(n==null)throw e.i.N();this.description=n,this.$.K(t),this.$.normalize()},r.prototype.UE=function(){this.description=e.ee.og(),this.$.Oa()},r.prototype.WO=function(n){this.description=e.ee.og(),this.$.Oa(),n.B()||this.tu(n)},r.prototype.VO=function(n,t,i,h){this.description=e.ee.og(),this.K(n,t,i,h)},r.prototype.K=function(n,t,i,h){if(this.vc(),typeof n=="number")this.$.K(n,t,i,h);else for(this.Oa(),t=0,i=n.length;t=e.ra.Va(t))throw e.i.N();var h=this.description.Pf(t);return this.ou(),0<=h?this.ka[this.kR(this.description,n)+this.description.LR(h)-2+i]:e.ra.se(t)},r.prototype.ou=function(){if(this.vc(),this.ka==null&&2=e.ra.Va(t))throw e.i.ce();var h=this.description.Pf(t);return 0<=h?(this.ou(),this.ka[r.Gg(this.description,n)+this.description.$j(h)-2+i]):e.ra.se(t)},r.prototype.vD=function(n,t,i,h){if(this.vc(),t==0)n!=0?i!=0?this.$.H=h:this.$.C=h:i!=0?this.$.G=h:this.$.v=h;else{if(i>=e.ra.Va(t))throw e.i.ce();if(!this.hasAttribute(t)){if(e.ra.DG(t,h))return;this.re(t)}t=this.description.Pf(t),this.ou(),this.ka[r.Gg(this.description,n)+this.description.$j(t)-2+i]=h}},r.Gg=function(n,t){return t*(n.Ae.length-2)},r.prototype.Ea=function(n){this.vc();var t=new e.l;return n.A(t),this.$.Ea(t)},r.prototype.isIntersecting=function(n){return n instanceof e.l?this.$.isIntersecting(n):this.$.isIntersecting(n.$)},r.prototype.Ju=function(n,t){this.vc(),n.B()?this.Oa():t!==void 0?this.tu(n,t):this.$.Ju(n.Lg(),n.ih())},r.prototype.offset=function(n,t){this.vc(),this.$.offset(n,t)},r.prototype.normalize=function(){this.vc(),this.$.normalize()},r.prototype.sf=function(n){if(n===void 0){if(n=new e.Sa(this.description),this.B())return n;for(t=this.description.Aa,i=1;ithis.C&&(this.C=i.x),i.ythis.H&&(this.H=i.y)}}else if(r==null||r.length==0)this.Oa();else for(i=r[0],this.K(i.x,i.y),t=1;tr?this.v=r:this.Cn?this.G=n:this.Hr?this.v=r:this.Cn?this.G=n:this.Hthis.C||this.G>this.H)&&this.Oa())},f.prototype.scale=function(r){0>r&&this.Oa(),this.B()||(this.v*=r,this.C*=r,this.G*=r,this.H*=r)},f.prototype.zoom=function(r,n){this.B()||this.K(this.sf(),r*this.R(),n*this.ca())},f.prototype.isIntersecting=function(r){return!this.B()&&!r.B()&&(this.v<=r.v?this.C>=r.v:r.C>=this.v)&&(this.G<=r.G?this.H>=r.G:r.H>=this.G)},f.prototype.HG=function(r){return(this.v<=r.v?this.C>=r.v:r.C>=this.v)&&(this.G<=r.G?this.H>=r.G:r.H>=this.G)},f.prototype.Ea=function(r){return!this.B()&&!r.B()&&(r.v>this.v&&(this.v=r.v),r.Cthis.G&&(this.G=r.G),r.Hr.length)throw e.i.N();r[0]!=null?r[0].ma(this.v,this.G):r[0]=e.h.construct(this.v,this.G),r[1]!=null?r[1].ma(this.v,this.H):r[1]=e.h.construct(this.v,this.H),r[2]!=null?r[2].ma(this.C,this.H):r[2]=e.h.construct(this.C,this.H),r[3]!=null?r[3].ma(this.C,this.G):r[3]=e.h.construct(this.C,this.G)},f.prototype.wF=function(){return this.B()?0:this.R()*this.ca()},f.prototype.yR=function(){return this.B()?0:2*(this.R()+this.ca())},f.prototype.gk=function(){return(this.C+this.v)/2},f.prototype.Jp=function(){return(this.H+this.G)/2},f.prototype.R=function(){return this.C-this.v},f.prototype.ca=function(){return this.H-this.G},f.prototype.move=function(r,n){this.B()||(this.v+=r,this.G+=n,this.C+=r,this.H+=n)},f.prototype.Ju=function(r,n){if(n!==void 0)this.move(r-this.gk(),n-this.Jp());else if(r instanceof e.h)this.Ju(r.x,r.y);else{if(!(r instanceof e.Sa))throw e.i.N();n=(this.C-this.v)/2;var t=(this.H-this.G)/2;this.v=r.Lg()-n,this.C=r.Lg()+n,this.G=r.ih()-t,this.H=r.ih()+t}},f.prototype.offset=function(r,n){this.v+=r,this.C+=r,this.G+=n,this.H+=n},f.prototype.normalize=function(){if(!this.B()){var r=Math.min(this.v,this.C),n=Math.max(this.v,this.C);this.v=r,this.C=n,r=Math.min(this.G,this.H),n=Math.max(this.G,this.H),this.G=r,this.H=n}},f.prototype.dn=function(r){r.ma(this.v,this.G)},f.prototype.$I=function(r){r.ma(this.C,this.G)},f.prototype.cJ=function(r){r.ma(this.v,this.H)},f.prototype.en=function(r){r.ma(this.C,this.H)},f.prototype.fT=function(){return this.B()||this.v<=this.C&&this.G<=this.H},f.prototype.sf=function(){return e.h.construct((this.C+this.v)/2,(this.H+this.G)/2)},f.prototype.mz=function(){return e.h.construct(this.v,this.G)},f.prototype.contains=function(r,n){if(n!==void 0)return r>=this.v&&r<=this.C&&n>=this.G&&n<=this.H;if(r instanceof e.Sa)return this.contains(r.Lg(),r.ih());if(r instanceof e.h)return this.contains(r.x,r.y);if(r instanceof f)return r.v>=this.v&&r.C<=this.C&&r.G>=this.G&&r.H<=this.H;throw e.i.N()},f.prototype.hm=function(r,n){if(n!==void 0)return r>this.v&&rthis.G&&nthis.v&&r.Cthis.G&&r.H>>32);var n=e.O.Th(r);return r=this.C,r=e.O.truncate(r^r>>>32),n=e.O.Th(r,n),r=this.G,r=e.O.truncate(r^r>>>32),n=e.O.Th(r,n),r=this.H,r=e.O.truncate(r^r>>>32),e.O.Th(r,n)},f.prototype.xr=function(){return this.B()?2220446049250313e-29:2220446049250313e-29*(Math.abs(this.v)+Math.abs(this.C)+Math.abs(this.G)+Math.abs(this.H)+1)},f.prototype.zy=function(r,n){var t=this.Zj(r),i=this.Zj(n);if(t&i)return 0;if(!(t|i))return 4;var h=(t!=0?1:0)|(i!=0?2:0);do{var s=n.x-r.x,o=n.y-r.y;if(s>o?t&f.YC?(t&f.ju?(r.y+=o*(this.v-r.x)/s,r.x=this.v):(r.y+=o*(this.C-r.x)/s,r.x=this.C),t=this.Zj(r)):i&f.YC?(i&f.ju?(n.y+=o*(this.v-n.x)/s,n.x=this.v):(n.y+=o*(this.C-n.x)/s,n.x=this.C),i=this.Zj(n)):t!=0?(t&f.ku?(r.x+=s*(this.G-r.y)/o,r.y=this.G):(r.x+=s*(this.H-r.y)/o,r.y=this.H),t=this.Zj(r)):(i&f.ku?(n.x+=s*(this.G-n.y)/o,n.y=this.G):(n.x+=s*(this.H-n.y)/o,n.y=this.H),i=this.Zj(n)):t&f.ZC?(t&f.ku?(r.x+=s*(this.G-r.y)/o,r.y=this.G):(r.x+=s*(this.H-r.y)/o,r.y=this.H),t=this.Zj(r)):i&f.ZC?(i&f.ku?(n.x+=s*(this.G-n.y)/o,n.y=this.G):(n.x+=s*(this.H-n.y)/o,n.y=this.H),i=this.Zj(n)):t!=0?(t&f.ju?(r.y+=o*(this.v-r.x)/s,r.x=this.v):(r.y+=o*(this.C-r.x)/s,r.x=this.C),t=this.Zj(r)):(i&f.ju?(n.y+=o*(this.v-n.x)/s,n.x=this.v):(n.y+=o*(this.C-n.x)/s,n.x=this.C),i=this.Zj(n)),t&i)return 0}while(t|i);return h},f.prototype.Zj=function(r){return(r.xthis.C?1:0)<<1|(r.ythis.H?1:0)<<3},f.prototype.Bi=function(r){return!this.B()&&(this.R()<=r||this.ca()<=r)},f.prototype.tb=function(r){return r instanceof e.h?Math.sqrt(this.iK(r)):Math.sqrt(this.px(r))},f.prototype.px=function(r){var n=0,t=0,i=this.v-r.C;return i>n&&(n=i),(i=this.G-r.H)>t&&(t=i),(i=r.v-this.C)>n&&(n=i),(i=r.G-this.H)>t&&(t=i),n*n+t*t},f.prototype.iK=function(r){var n=0,t=0,i=this.v-r.x;return i>n&&(n=i),(i=this.G-r.y)>t&&(t=i),(i=r.x-this.C)>n&&(n=i),(i=r.y-this.H)>t&&(t=i),n*n+t*t},f.prototype.cn=function(r){this.B()?r.Oa():r.K(this.v,this.C)},f.ju=1,f.ku=4,f.YC=3,f.ZC=12,f}();e.l=v}(k||(k={})),function(e){var v,f;(f=v||(v={}))[f.initialize=0]="initialize",f[f.initializeRed=1]="initializeRed",f[f.initializeBlue=2]="initializeBlue",f[f.initializeRedBlue=3]="initializeRedBlue",f[f.sweep=4]="sweep",f[f.sweepBruteForce=5]="sweepBruteForce",f[f.sweepRedBlueBruteForce=6]="sweepRedBlueBruteForce",f[f.sweepRedBlue=7]="sweepRedBlue",f[f.sweepRed=8]="sweepRed",f[f.sweepBlue=9]="sweepBlue",f[f.iterate=10]="iterate",f[f.iterateRed=11]="iterateRed",f[f.iterateBlue=12]="iterateBlue",f[f.iterateBruteForce=13]="iterateBruteForce",f[f.iterateRedBlueBruteForce=14]="iterateRedBlueBruteForce",f[f.resetRed=15]="resetRed",f[f.resetBlue=16]="resetBlue";var r=function(){function n(t,i){this.ci=t,this.dH=i}return n.prototype.nr=function(t,i,h){this.ci.JX(h,t,i,this.dH)},n.prototype.$p=function(t){return this.ci.Rr(t,this.dH)},n}();v=function(){function n(){this.ow=this.oo=this.ff=this.rd=null,this.wq=new e.l,this.Am=this.Hj=this.Ij=this.Ad=this.Ef=this.Ld=this.cw=this.fo=this.qd=this.Eb=null,this.Xb=-1,this.qa=0,this.Nk()}return n.prototype.kr=function(){this.Nk(),this.Pv=!0,this.Eb==null?(this.fo=new e.ia(0),this.Eb=[]):(this.fo.Bh(0),this.Eb.length=0)},n.prototype.ad=function(t,i){if(!this.Pv)throw e.i.Hb();var h=new e.l;h.K(i),this.fo.add(t),this.Eb.push(h)},n.prototype.Fp=function(){if(!this.Pv)throw e.i.Hb();this.Pv=!1,this.Eb!=null&&0this.Eb.length)return this.pe=this.Eb.length,this.Xb=5,!0;this.rd==null&&(this.rd=new e.sr(!0),this.oo=this.rd.getIterator(),this.Ld=new e.ia(0)),this.rd.kr();for(var t=0;tthis.Eb.length||10>this.qd.length)return this.pe=this.Eb.length,this.Xb=6,!0;this.rd==null&&(this.rd=new e.sr(!0),this.oo=this.rd.getIterator(),this.Ld=new e.ia(0)),this.rd.kr();for(var t=0;tthis.Eb.length||10>this.qd.length)return this.pe=this.Eb.length,this.Xb=6,!0;this.ff==null&&(this.ff=new e.sr(!0),this.ow=this.ff.getIterator(),this.Ef=new e.ia(0)),this.ff.kr();for(var t=0;tthis.Eb.length||10>this.qd.length)return this.pe=this.Eb.length,this.Xb=6,!0;this.rd==null&&(this.rd=new e.sr(!0),this.oo=this.rd.getIterator(),this.Ld=new e.ia(0)),this.ff==null&&(this.ff=new e.sr(!0),this.ow=this.ff.getIterator(),this.Ef=new e.ia(0)),this.rd.kr();for(var t=0;t>1;return n.eq(t)?(this.rd.remove(i),this.pe!=0||(this.Af=this.Vf=-1,this.Ic=!0,!1)):(this.oo.EB(this.Eb[i].v,this.Eb[i].C,this.qa),this.Vf=i,this.Xb=10,!0)},n.prototype.QX=function(){return--this.pe==-1?(this.Af=this.Vf=-1,this.Ic=!0,!1):(this.Rg=this.Vf=this.pe,this.Xb=13,!0)},n.prototype.RX=function(){return--this.pe==-1?(this.Af=this.Vf=-1,this.Ic=!0,!1):(this.Vf=this.pe,this.Rg=this.qd.length,this.Xb=14,!0)},n.prototype.SX=function(){var t=this.Ld.get(this.pe-1),i=this.Ef.get(this.Rg-1),h=this.Rr(t,!0),s=this.Rr(i,!1);return h>s?this.ux():h>1;if(n.eq(t))return this.Df!=-1&&this.Ij.get(i)!=-1?(this.Ad.jd(this.Df,this.Ij.get(i)),this.Ij.set(i,-1)):this.rd.remove(i),this.pe!=0||(this.Af=this.Vf=-1,this.Ic=!0,!1);if(this.Cf!=-1&&0>1;if(n.eq(t))return this.Cf!=-1&&this.Hj.get(i)!=-1?(this.Ad.jd(this.Cf,this.Hj.get(i)),this.Hj.set(i,-1)):this.ff.remove(i),this.Rg!=0||(this.Af=this.Vf=-1,this.Ic=!0,!1);if(this.Df!=-1&&0>1;return this.rd.vj(t),this.Xb=4,!0},n.prototype.jT=function(){if(this.Vf=this.oo.next(),this.Vf!=-1)return!1;this.Af=this.Vf=-1;var t=this.Ef.get(this.Rg)>>1;return this.ff.vj(t),this.Xb=7,!0},n.prototype.gT=function(){if(this.Af=this.ow.next(),this.Af!=-1)return!1;var t=this.Ld.get(this.pe)>>1;return this.rd.vj(t),this.Xb=7,!0},n.prototype.hT=function(){if(--this.Rg==-1)return this.Xb=5,!0;this.wq.K(this.Eb[this.pe]);var t=this.Eb[this.Rg];return this.wq.W(this.qa,this.qa),!this.wq.isIntersecting(t)||(this.Af=this.Rg,!1)},n.prototype.iT=function(){if(--this.Rg==-1)return this.Xb=6,!0;this.wq.K(this.Eb[this.pe]);var t=this.qd[this.Rg];return this.wq.W(this.qa,this.qa),!this.wq.isIntersecting(t)||(this.Af=this.Rg,!1)},n.prototype.kJ=function(){return this.rd==null?(this.Ic=!0,!1):(this.pe=this.Ld.size,0>1],n.eq(t)?i.G-h:i.H+h):(i=this.qd[t>>1],n.eq(t)?i.G-h:i.H+h)},n}(),e.xC=v}(k||(k={})),function(e){var v=function(){function f(){}return f.construct=function(r,n,t,i,h,s){var o=new f;return o.v=r,o.G=n,o.Ye=t,o.C=i,o.H=h,o.Bg=s,o},f.prototype.Oa=function(){this.Ye=this.v=NaN},f.prototype.B=function(){return isNaN(this.v)},f.prototype.XS=function(){return isNaN(this.Ye)},f.prototype.K=function(r,n,t,i,h,s){i!==void 0?typeof r=="number"?(this.v=r,this.G=n,this.Ye=t,this.C=i,this.H=h,this.Bg=s):(this.v=r.x-.5*n,this.C=this.v+n,this.G=r.y-.5*t,this.H=this.G+t,this.Ye=r.z-.5*i,this.Bg=this.Ye+i):(this.v=r,this.G=n,this.Ye=t,this.C=r,this.H=n,this.Bg=t)},f.prototype.move=function(r){this.v+=r.x,this.G+=r.y,this.Ye+=r.z,this.C+=r.x,this.H+=r.y,this.Bg+=r.z},f.prototype.copyTo=function(r){r.v=this.v,r.G=this.G,r.C=this.C,r.H=this.H},f.prototype.Lk=function(r,n,t){this.v>r?this.v=r:this.Cn?this.G=n:this.Ht?this.Ye=t:this.Bgr.length)throw e.i.N();r[0]=new e.Nd(this.v,this.G,this.Ye),r[1]=new e.Nd(this.v,this.H,this.Ye),r[2]=new e.Nd(this.C,this.H,this.Ye),r[3]=new e.Nd(this.C,this.G,this.Ye),r[4]=new e.Nd(this.v,this.G,this.Bg),r[5]=new e.Nd(this.v,this.H,this.Bg),r[6]=new e.Nd(this.C,this.H,this.Bg),r[7]=new e.Nd(this.C,this.G,this.Bg)},f.prototype.Zw=function(r){if(r==null||r.length==0)this.Oa();else{var n=r[0];for(this.K(n.x,n.y,n.z),n=1;nthis.FA;){var a=this.sd.ha();if(h.L(a.ac()),s.L(a.wc()),h.scale(this.Wa.ec),s.scale(this.Wa.ec),e.cj.Mu(h,s)?h.x=s.x:e.cj.Ku(h,s)&&(s.x=h.x),this.uk.length=0,e.cj.tF(this.Wa.Tb,this.Wa.kc,this.Wa.ze,h,s,this.Wa.QA,this.Wa.Zs,o,this.Nj,this.Gs,this.uk,this.bw),this.co!=null&&(a=this.uk.slice(0),this.co.qG(this.co.da()-1,a,a.length-1)),e.cj.Lu(h,s)?(this.qq.Oa(),this.Wa.sy(h,this.sl,this.qq),this.Xn=!0):(this.qq.Oa(),this.Xn=this.xy(o[0],this.qq)),this.Xn){if(this.sd.li(),this.sd.Ez()){this.sd.li(),this.sd.ha();break}this.sd.DW();break}t==null&&(t=new e.Da).Yk(null,0),this.OD(t),i++}if(this.bw[0]=0,0=this.Nj[0]){var o=this.di+1.570796326794897;h=o+3.141592653589793-(this.di-this.Nj[0])}else h=(o=this.di+1.570796326794897)+3.141592653589793-(6.283185307179586-(this.Nj[0]-this.di));var a=!(this.di>=this.Nj[0]&&3.141592653589793>=this.di-this.Nj[0])&&!(this.dio;)c-=6.283185307179586;ci.x-this.sk[0]?this.sk[0]-=6.283185307179586:3.141592653589793o?u.xX():u.$n=o,h=t.getType(),e.aa.yd(h)?((h=new e.Ta(t.description)).oc(t,!0),t=h,h=1607):h==197&&(h=new e.l,t.A(h),h.R()<=u.qa||h.ca()<=u.qa?((h=new e.Ta(t.description)).ad(t,!1),t=h,h=1607):((h=new e.Da(t.description)).ad(t,!1),t=h,h=1736)),u.yX(),e.aa.Rn(h)||u.zX(),u.rb<=.5*u.$n)return h!=1736?new e.Da(t.description):u.Wv?t:e.cj.Qr(t,u.Qg,u.ze,u.QA,-1,a);if(0>u.Ka&&h!=1736)return new e.Da(t.description);if(u.Wv&&e.aa.Hc(h)?(i=e.cj.Qr(t,i,4,NaN,u.$n,a),t=e.cb.zh(i,u.Qg,u.Jc)):t=e.cb.zh(t,u.Qg,u.Jc),(t=e.Hh.lj(t,u.Jc)).B())return new e.Da(t.description);switch(!u.Wv&&e.aa.Hc(h)&&(t=e.cj.pI(u.ec,t)),t=n.KX(t,u.Jc),h){case 1736:i=u.UN(t);break;case 1607:i=u.VN(t);break;case 550:i=u.SN(t);break;case 33:i=u.TN(t);break;default:throw e.i.fa("corrupted_geometry")}return(u=e.cb.zh(i,u.Jc,u.Qg)).Jl(t.description),u},n.prototype.UN=function(t){var i=new e.Da;t=new f(this,t,i),t=e.Gh.local().V(t,this.Jc,this.Ub).next(),t=e.ip.nj(t,this.Jc,2);var h=new e.Dd;return h.scale(1/this.ec,1/this.ec),i.Oc(h),i=e.ip.nj(i,this.Jc,2),0<=this.Ka?e.Gh.local().V(i,t,this.Jc,this.Ub):e.kp.local().V(i,t,this.Jc,this.Ub)},n.prototype.VN=function(t){return t=new f(this,t,null),t=e.Gh.local().V(t,this.Jc,this.Ub).next(),e.ip.nj(t,this.Jc,2)},n.prototype.SN=function(t){return t=new v(this,t),t=e.Gh.local().V(t,this.Jc,this.Ub).next(),e.ip.nj(t,this.Jc,2)},n.prototype.TN=function(t){(t=t.D()).scale(this.ec);var i=new e.Da;return this.sy(t,!1,i),e.ip.nj(i,this.Jc,2)},n.prototype.xy=function(t,i,h,s,o,a){var u=t[0],c=t[t.length-1],l=u.y>c.y?u.y:c.y,p=e.F.q(this.Tb,this.kc,u.yt.Ke()&&(this.UV(t),!0)},n.prototype.OI=function(t,i,h){var s=h.I(),o=0a.x?(a=this.zq,s.gg(-this.Js,0)):(a=-this.zq,s.gg(this.Js,0)),i.add(t,!1),t.Oa(),h.add(i,!1),h.Oc(s),o=new e.l,h.A(o),o.W((this.Js-o.R())/2,0),o.G=-this.zq,o.H=this.zq;for(var c=0;c=u));)e.kb.yi(t,i,o.x,o.y,s,A,b,x),l?w.ma(b.u,x.u):(m.ma(b.u,x.u),n.gJ(o.x,m.x,j.x,p),w.ma(p[0]+m.x,m.y),j.L(w)),w.scale(h),y.wf(0,-1,w),a=A,A=M++*c}},n.dJ=function(t,i,h,s,o,a,u,c,l,p){var y=new e.h,d=new e.h,g=new e.ga(0),b=new e.ga(0);for(e.kb.yi(t,i,s.x,s.y,h,o,g,b),y.ma(g.u,b.u),e.kb.yi(t,i,s.x,s.y,h,a,g,b),d.ma(g.u,b.u),h=new e.ga(0),e.kb.Xy(t,i,u.x,u.y,y.x,y.y,h),l[0]=h.u,e.kb.Xy(t,i,u.x,u.y,d.x,d.y,h),p[0]=h.u;l[0]<=p[0];)l[0]+=6.283185307179586;for(;l[0]>p[0];)l[0]-=6.283185307179586;for(;l[0]>=c;)l[0]-=6.283185307179586,p[0]-=6.283185307179586;for(;l[0]a[y]?1:0}),i=t.Ia(),c=0;cthis.rb/t&&(t=this.rb/500),.01>t&&(t=.01),this.$n=t},n}();e.VK=r}(k||(k={})),function(e){var v=function(){function f(){}return f.Mf=function(r,n){var t=new e.h;t.L(n),r.push(t)},f.up=function(r,n){r.add(n.x),r.add(n.y)},f.hB=function(r){r.Bh(r.size-2)},f.oB=function(r,n){n.ma(r.get(r.size-2),r.get(r.size-1))},f.Qr=function(r,n,t,i,h,s){if(r==null)throw e.i.N();var o=r.getType();if(r.B()||e.aa.Rn(o))return r;var a=new f;a.Qg=n,a.Jc=e.cb.sc(n);var u=e.cb.vv(a.Jc);if(a.Ub=s,a.Tb=e.cb.ev(a.Jc),a.kc=u*(2-u),a.ec=a.Jc.Hd().ai,a.Aq=a.Jc.Kn(),a.Zs=a.Aq*a.ec,a.AA=i,a.zA=h,a.ze=t,o==197?(t=new e.Da(r.description)).ad(r,!1):e.aa.yd(o)?(t=new e.Ta(r.description)).oc(r,!0):t=r,a.ze!=4){if((n=a.Qg.Nb(a.Jc)==0?e.cb.zh(t,a.Qg,a.Jc):e.Hh.lj(t,a.Jc)).B())return n;n=f.pI(a.ec,n),n=a.Zy(n),n=e.ip.nj(n,a.Jc,a.ze),a=e.cb.zh(n,a.Jc,a.Qg)}else{if(e.Eg.Sb(n)==2?(r=e.cb.ml(),(n=e.Xj.local().V(t,r,n,s))==r&&(n=new e.Da,r.copyTo(n))):n=e.Hh.lj(t,a.Jc),n.B())return n;a=a.CX(n)}return a},f.pI=function(r,n){var t=new e.l;if(n.xc(t),3.141592653589793>t.R()*r)return n;var i=!1;t=n.Ga();for(var h=new e.h,s=new e.h;t.$a();)for(;t.Ha();){var o=t.ha();if(h.L(o.ac()),s.L(o.wc()),h.scale(r),s.scale(r),3.141592653589793s.x-h.x)for(;-6.283185307179586>s.x-h.x;)s.x+=6.283185307179586;f.Wi(s.x,NaN,b),p.L(s)}else c.L(s),f.AU(c),f.Wi(c.x,g,b),p.ma(b[0]+c.x,c.y);.5>Math.abs(p.x-s.x)&&p.L(s),u?(o.Tw(0,d),y.L(l),y.scale(1/r),d.Cb(y),(a=t.vm())?i.nf(d):i.lineTo(d),t.Qn()&&!n.dc(t.gb)&&(o.Tw(1,d),y.L(p),y.scale(1/r),d.Cb(y),i.lineTo(d))):((a=t.vm())&&i.Hz(null,0),o=i.da()-1,y.L(l),y.scale(1/r),i.wf(o,-1,y),t.Qn()&&!n.dc(t.gb)&&(y.L(p),y.scale(1/r),i.wf(o,-1,y)))}return i},f.tF=function(r,n,t,i,h,s,o,a,u,c,l,p){var y=new e.h,d=new e.h,g=0m&&(m+=6.283185307179586),0>(b=b.u)&&(b+=6.283185307179586),u!=null&&(u[0]=x),c!=null&&(c[0]=m),l!=null&&(l[0]=b),c=u=NaN,p!=null&&(u=((c=e.F.Ah(r,n))-(l=e.F.q(r,n,i.y)))/x,c=(c+l)/x),l=f.Mu(i,h),b=f.Ku(i,h),m=l||b;var w=f.FE(i,h,a),j=new e.ga(0),M=new e.ga(0),A=new e.h,z=new e.h,N=new e.h;f.Wi(i.x,NaN,d);var I=[d[0]];if(x<=s)f.Mf(y,i),f.Wi(h.x,NaN,d),p!=null&&p.add(0),m?(l&&f.kB(i,h,p,y),b&&f.iB(i,h,p,y)):w?f.jB(i,h,g,u,c,p,y):0N.x&&(d[0]+=6.283185307179586,N.ma(d[0]+A.x,A.y)):T.xo.x?o.x+=6.283185307179586:3.141592653589793E;E++)if(T=C[E]*c+(1-C[E])*u,e.kb.oj(r,n,i.x,i.y,T*h,s,x,m,t),A.ma(x.u,m.u),E==0&&(B=T,z.L(A)),f.WW(j,A,M,I),I.hc(I.fe(A,!0),N),e.kb.wd(r,n,A.x,A.y,N.x,N.y,w,null,null,2),w.u>l){D=!0;break}D?(M.L(z),c=B,f.up(o,M),a.add(c)):(f.hB(o),a.En(a.size-1,1,a.size-1),0=o&&W.u<=s&&3.141592653589793>Math.abs(g.x-b.x)||i.Ux(D,B)<=h));I++){var L=U[I]*B+(1-U[I])*D;if(i.hc(L,p),N?x.ma(p.x*t,p.y*t):(z[0][0]=p.x,z[0][1]=p.y,e.cb.vt(),x.x=z[0][0]*t,x.y=z[0][1]*t),I==0&&(tt=L,d.L(p),w.L(x),0s||3.141592653589793<=Math.abs(g.x-b.x)))){O=!0;break}if(E&&0s||3.141592653589793<=Math.abs(g.x-x.x)){O=!0;break}}else if(0o){O=!0;break}if(E){if(e.kb.wd(r,n,A.x,A.y,m.x,m.y,V,null,null,2),V.u>o){O=!0;break}if(e.kb.wd(r,n,m.x,m.y,x.x,x.y,nt,null,null,2),nt.u>o){O=!0;break}}}}O?(l.L(d),b.L(w),B=tt,f.up(C,l),f.up(G,b),H.add(B)):(f.hB(C),f.hB(G),H.En(H.size-1,1,H.size-1),f.Mf(u,l),T+=W.u,a!=null&&a.add(T),0Math.abs(n.x-r.x)?(i.Dc(r),3.141592653589793<=t.x-r.x?i.Ql(t.x-6.283185307179586,t.y):3.141592653589793<=r.x-t.x?i.Ql(t.x+6.283185307179586,t.y):i.Ql(t.x,t.y)):(i.Dc(t),3.141592653589793<=r.x-t.x?i.Ql(r.x-6.283185307179586,r.y):3.141592653589793<=t.x-r.x?i.Ql(r.x+6.283185307179586,r.y):i.Ql(r.x,r.y))},f.YJ=function(r,n){for(var t=0;tr.x)for(;-3.141592653589793>r.x;)r.x+=6.283185307179586;if(3.141592653589793f.v+i&&sf?-f:f},v.Mb=function(f,r){return 0<=r?v.P(f):-v.P(f)},v.Y=function(f,r){return f==r||v.P(f-r)<=v.JC*(1+(v.P(f)+v.P(r))/2)},v.Cd=function(f){return f==0||v.P(f)<=v.JC},v.Ah=function(f,r){var n=(r=(1-(r=Math.sqrt(1-r)))/(1+r))*r;return f/(1+r)*(1+n*(.25+n*(.015625+1/256*n)))*v.EL},v.EL=1.5707963267948966,v.JC=3552713678800501e-30,v}()}(k||(k={})),function(e){var v=function(r){this.Wf=r,this.Kk=this.Wf.getCode(),0>this.Kk&&(this.Kk=0)};e.DY=v;var f=function(){function r(n){n===void 0&&(n=null),this.Cj=null,this.Un=!1,n!==null&&(this.Cj=new v(n))}return r.prototype.Ec=function(){return this.Cj!=null?this.Cj.Kk:0},r.prototype.Of=function(){var n=new r;return this.copyTo(n),n},r.prototype.copyTo=function(n){n.Cj=this.Cj,n.Un=this.Un},r.prototype.Qz=function(){this.Un=!this.Un},r.prototype.qm=function(){return this.Cj!=null?this.Cj.Wf:null},r.prototype.LJ=function(n){if(0>=n)throw e.i.N();if(n!=this.Ec()){if((n=e.pf.geogtran(n))==null)throw e.i.N("Geogtran not found.");this.Cj=new v(n)}},r.prototype.Bz=function(){return this.Cj==null?null:this.Cj.Wf.toString()},r.prototype.tX=function(n){if(n==null)throw e.i.N();var t=null;try{t=e.pf.fromString(e.Sc.PE_TYPE_GEOGTRAN,n)}catch{throw e.i.N()}this.Cj=new v(t)},r.prototype.Nb=function(n){return n==this||!(!(n instanceof r)||(0>=this.Ec()||this.Ec()!=n.Ec())&&!this.qm().isEqual(n.qm()))&&this.Un==n.Un},r.prototype.toString=function(){var n="GeographicTransformation: "+this.Bz();return 200r.I())},f.BE=function(r){return!(r.B()||r.getType()!=1607&&r.getType()!=1736||20>r.I())},f}();e.Uk=v}(k||(k={})),function(e){e.$b=function(){function v(){}return v.TT=function(f){var r=new e.Da;return r.sx(f.es(),f.gs()),r.yj(f.es(),f.fs()),r.yj(f.ds(),f.fs()),r.yj(f.ds(),f.gs()),r},v.zh=function(f,r){return f===null?null:e.Hx.local().V(f,r,null)},v.jY=function(f,r){var n=e.Gh.local();return f=new e.Zc(f),n.V(f,r,null).next()},v.im=function(f,r,n){return e.kp.local().V(f,r,n,null)},v.ep=function(f,r,n){return e.Kx.local().V(f,r,n,null)},v.VX=function(f,r,n){var t=e.Kx.local();for(f=new e.Zc(f),r=new e.Zc(r),n=t.V(f,r,n,null),t=[];(r=n.next())!=null;)t.push(r);return t},v.Nb=function(f,r,n){return e.dj.local().V(3,f,r,n,null)},v.TP=function(f,r,n){return e.dj.local().V(4,f,r,n,null)},v.RS=function(f,r,n){var t=e.Xj.local();for(f=new e.Zc(f),r=new e.Zc(r),n=t.V(f,r,n,null),t=[];(r=n.next())!=null;)t.push(r);return t},v.QP=function(f,r,n){var t=e.kp.local();for(f=new e.Zc(f),r=new e.Zc(r),n=t.V(f,r,n,null),t=[];(r=n.next())!=null;)t.push(r);return t},v.Ea=function(f,r,n){return e.Xj.local().V(f,r,n,null)},v.QS=function(f,r,n){if((f=e.Xj.local().V(f,r,n,null,1))===null)return[];if(f.getType()===550){for(r=[],n=0;nf.Db())return 0;var t=null;if(r!=null){if(t=r.Hd(),n!=null&&t.Ec()!=n.Ec()&&t.od!=n.od)throw e.i.Xk()}else if(n!=null)throw e.i.N();f.getType()==1736||f.getType()==197?r=f.mg():e.aa.yd(f.getType())?(r=new e.Ta(f.description)).oc(f,!0):r=f,f=0,r=r.Ga();for(var i=new e.h,h=new e.h;r.$a();)for(;r.Ha();){var s=r.ha();s.Yp(i),s.Tr(h),f+=e.h.tb(i,h)}return t!==null&&n!==null&&(f=e.Tc.Nh(f,t,n)),f},v.fP=function(f){return f.points!==void 0?v.mS(f,f.hasZ!==void 0&&f.hasZ,f.hasM!==void 0&&f.hasM):f.rings!==void 0?v.lG(f.rings,f.hasZ!==void 0&&f.hasZ,f.hasM!==void 0&&f.hasM,"P"):f.paths!==void 0?v.lG(f.paths,f.hasZ!==void 0&&f.hasZ,f.hasM!==void 0&&f.hasM,"L"):f.x!==void 0?v.nS(f):f.xmin!==void 0?v.lS(f):null},v.nS=function(f){if(f.x==null||f.x=="NaN")return new e.Sa;var r=new e.Sa(f.x,f.y);return f.z!==void 0&&f.z!==null&&r.wX(f.z),f.m!==void 0&&f.m!==null&&r.hX(f.m),r},v.lS=function(f){if(f.xmin==null||f.xmin=="NaN")return new e.Fh;var r=new e.Fh(f.xmin,f.ymin,f.xmax,f.ymax);return f.zmin!==void 0&&f.zmin!==null&&r.setInterval(1,0,f.zmin,f.zmax),f.mmin!==void 0&&f.mmin!==null&&r.setInterval(2,0,f.mmin,f.mmax),r},v.mS=function(f,r,n){var t=0,i=new e.de,h=3*f.points.length;h%2!=0&&h++,2>h&&(h=2);var s=e.O.truncate(3*f.points.length/2);4>s?s=4:16>s&&(s=16),h=e.Yc.Dn(h,0);var o=e.Yc.Dn(s);s=e.Yc.Dn(s);for(var a=0;a=h?(p[y]=!1,c+=1,o.add(u),a.add(i),u+=d):p[y]=!0}for((t=3*u)%2!=0&&t++,2>t&&(t=2),4>(y=e.O.truncate(3*u/2))?y=4:16>y&&(y=16),t=e.Yc.Dn(t,0),i=e.Yc.Dn(y),h=e.Yc.Dn(y),y=d=0;yo)throw e.i.N();this.Qi.oa=s-a,this.Qi.va=o+a,this.hi.resize(0),this.he=0,this.sg[0]=0},h.prototype.Uo=function(s,o){this.Qi.oa=s-o,this.Qi.va=s+o,this.hi.resize(0),this.he=0,this.sg[0]=0},h.prototype.next=function(){if(!this.Ya.lq)throw e.i.Hb();if(0>this.he)return-1;for(var s=!0;s;)switch(this.sg[this.he]){case 1:s=this.FU();break;case 2:s=this.GU();break;case 3:s=this.HU();break;case 4:s=this.IU();break;case 5:s=this.GW();break;case 6:s=this.kT();break;case 7:s=this.tN();break;case 0:s=this.Gz();break;default:throw e.i.Qa()}return this.Og!=-1?this.Mp()>>1:-1},h.construct=function(s){var o=new h;return o.Ya=s,o.hi.Jb(20),o.he=-1,o},h.prototype.Gz=function(){return this.Og=this.vH=this.Mi=this.Lc=-1,this.Ya.me!=null&&0=this.Qi.oa?(this.ei=this.QR(),!1):(this.he--,!0)},h.prototype.tN=function(){return this.Og=this.ei,this.Og!=-1&&i.gq(this.Mp())?(this.ei=this.SF(),!1):(this.he--,!0)},h.prototype.SF=function(){return this.Ya.Sf?this.Ya.$f.lb(this.Og):this.Ya.Ti.lb(this.Og)},h.prototype.QR=function(){return this.Ya.Sf?this.Ya.$f.we(this.Og):this.Ya.Ti.we(this.Og)},h.prototype.Mp=function(){return this.Ya.Sf?this.Ya.$f.ja(this.Og):this.Ya.Ti.getData(this.Og)},h}();e.EY=t;var i=function(){function h(s){this.Am=this.$h=this.$f=this.Ti=this.Km=this.Ej=this.me=this.Fj=null,this.Sf=s,this.lq=this.Sv=!1}return h.prototype.kr=function(){this.Nk(!0)},h.prototype.Br=function(s,o){if(!this.Sv)throw e.i.Hb();this.Fj.push(new e.Nc(s,o))},h.prototype.Fp=function(){if(!this.Sv)throw e.i.fa("invalid call");this.Sv=!1,this.lq=!0,this.Sf||(this.vS(),this.Zv=this.Fj.length)},h.prototype.vj=function(s){if(!this.Sf||!this.lq)throw e.i.N("invalid call");if(this.kf==-1){var o=this.Fj.length;if(this.iA){var a=new e.ia(0);a.Jb(2*o),this.bJ(a),this.$h.Jb(2*o),this.$h.resize(0),this.aJ(a),this.Km.resize(o,-1),this.Km.Wj(-1,0,o),this.iA=!1}else this.Km.Wj(-1,0,o);this.kf=this.Tu()}o=this.pG(s<<1,this.kf),a=this.$f.addElement(1+(s<<1),this.xz(o)),this.VJ(o,a),this.Km.set(s,o),this.Zv++},h.prototype.remove=function(s){if(!this.Sf||!this.lq)throw e.i.fa("invalid call");var o=this.Km.get(s);if(o==-1)throw e.i.N("the interval does not exist in the interval tree");this.Km.set(s,-1),this.Zv--;var a=this.xz(o),u=this.$f.ZR(a);this.$f.vd(this.wR(o),a),this.$f.vd(this.TR(o),a),(s=this.$f.size(a))==0&&(this.$f.MP(a),this.ZJ(u,-1)),this.Ej.jd(o),a=this.UF(u);var c=this.qj(u),l=this.lk(u);for(o=0;!(0>1);c!=-1?this.VJ(c,this.Ti.addElement(this.xz(c),u)):(c=this.pG(u,this.kf),a.set(u>>1,c))}},h.prototype.pG=function(s,o){var a=o,u=o,c=-1,l=0,p=this.$h.size-1,y=0,d=s>>1,g=NaN,b=NaN,x=!0,m=this.DR(d);for(d=this.AR(d);x;){lw&&(ww)o!=-1&&(o==a?(u=a,g=w,b=(o=this.lk(a))!=-1?this.Np(o):NaN):b>1];return h.gq(s)?o.oa:o.va},h}();e.sr=i}(k||(k={})),function(e){var v=function(){function f(r){if(r==null)throw e.i.fa("Invalid arguement");this.hf=r;var n=r.nR();n.hS()?r.ef.IG()?this.lo=e.si.PannableFold:this.lo=e.si.Clip:this.lo=e.si.DontClip,n.iS()?r.Yf.IG()?this.Qm=e.si.PannableFold:this.Qm=e.si.Clip:this.Qm=e.si.DontClip,this.Bm=n.Jr,this.mH=n.Vu,r=this.hf.sH,this.aH=r.hs(2147483648),this.Uv=r.hs(1073741824)}return f.zh=function(r,n,t){return n.ww.zh(r,t)},f.Rt=function(r,n,t,i){return r.ww.Rt(n,t,i)},f.Qt=function(r,n,t,i){if(t=0>t?n.length:t,(r=r.ww.Rt(n,t,i))==t)return r;for(var h=n=0;hh.H){var d=e.l.construct(a.v-1,h.G,a.C+1,h.H);if((y=e.ri.Nu(y,d,t,NaN,0,n)).B())return y}a.R()>2*h.R()&&(y=e.zb.Hp(y,-2*h.R(),2*h.R(),t,!0,0,!0,n))}a=this.mH,(h=!isNaN(a))&&(y=e.Xl.local().V(y,a,n)),d=c?i.kk():null;var g=NaN;u&&(g=t.zi());var b=i.Wr()!=null;if(this.aH)u&&(e.zb.ur(t,g,y,o),h&&(u=t.hh(),a*=(g=t.sc().hh())/u)),e.zb.tr(this.hf,y,p,o),h&&(u=t.sc().hh(),a*=(g=i.sc().hh())/u),t=y;else{var x=new e.Ta(y.description);x.DD(y),u&&(e.zb.ur(t,g,x,o),h&&(u=t.hh(),a*=(g=t.sc().hh())/u)),e.zb.tr(this.hf,x,p,o),h&&(u=t.sc().pm(),a*=(g=i.sc().pm())/u),p=NaN,c?(d=i.kk(),p=i.zi()):isNaN(this.Bm)||(p=this.Bm),u=f.tv(t)|f.tv(i),g=10*l.Xd(0),this.Uv&&(u=3,g=0),t=e.zb.UQ(y,t,x,l,p,n,u,g)}return b&&(t=e.zb.XD(t,i,n)),c&&(s||(c=l.Oe().R(),t.Tg(0,0).R()>=c-l.Xd(0)&&(l=d.getNorthPoleLocation(),c=d.getSouthPoleLocation(),y=d.getNorthPoleGeometry(),d=d.getSouthPoleGeometry(),p=0,y==e.Cg.PE_POLE_POINT&&l!=e.Cg.PE_POLE_OUTSIDE_BOUNDARY&&(p=1),d==e.Cg.PE_POLE_POINT&&c!=e.Cg.PE_POLE_OUTSIDE_BOUNDARY&&(p|=2),p!==0&&(s=!0))),t=e.zb.Mz(t,i,this.Qm,n),h&&(t=e.Xl.local().V(t,a,n)),e.zb.Lx(i,t,o)),t.B()||(s&&(t=e.Yl.local().V(t,i,!1,n)),r!=null&&(t=r.Zk(t,!1),this.wp(r,e.bm.reverse,t),t=r.$k(t,!1))),t},f.tv=function(r){if(r.Sb()!=2)return 0;var n=0,t=r.kk();r=t.getNorthPoleLocation();var i=t.getSouthPoleLocation(),h=t.getNorthPoleGeometry();return t=t.getSouthPoleGeometry(),h==e.Cg.PE_POLE_POINT&&r!=e.Cg.PE_POLE_OUTSIDE_BOUNDARY&&(n=1),t==e.Cg.PE_POLE_POINT&&i!=e.Cg.PE_POLE_OUTSIDE_BOUNDARY&&(n|=2),n},f.prototype.hW=function(r,n){var t=this.hf.ef,i=this.hf.Yf,h=t.Sb(),s=i.Sb(),o=e.O.Fu(Math.min(r.I(),64)),a=e.Ta.jg(r);h==3&&(h=(t=(r=t.Ji).fk()).Sb(),a=r.$k(a,!0),this.wp(r,e.bm.forward,a),a=r.Zk(a,!0)),r=null,s==3&&(s=(i=(r=i.Ji).fk()).Sb());var u=h==2;h=(s=s==2)?i.sc():i;var c=!s&&!this.Uv;if(u){if((a=e.zb.UI(a,t,this.lo,n)).B())return a}else{var l=new e.l;a.xc(l);var p=t.Oe();if((l.Gp.H)&&(l=e.l.construct(l.v-1,p.G,l.C+1,p.H),(a=e.ri.Nu(a,l,t,NaN,0,n)).B()))return a}var y=NaN;u&&(y=t.zi()),l=i.Wr()!=null,p=this.mH;var d=!isNaN(p);if(d&&(a=e.Xl.local().V(a,p,n)),this.aH)u&&e.zb.ur(t,y,a,o),d&&(u=t.hh(),p*=(y=t.sc().hh())/u),e.zb.tr(this.hf,a,c,o),d&&(u=t.sc().hh(),p*=(y=i.sc().hh())/u),t=a;else{var g=new e.Ta(a.description);g.DD(a),u&&(e.zb.ur(t,y,g,o),d&&(u=t.hh(),p*=(y=t.sc().hh())/u)),e.zb.tr(this.hf,g,c,o),d&&(u=t.sc().hh(),p*=(y=i.sc().hh())/u),c=NaN,s?c=i.zi():isNaN(this.Bm)||(c=this.Bm),u=f.tv(t)|f.tv(i),y=10*h.Xd(0),this.Uv&&(u=3,y=0),t=e.zb.VQ(a,t,g,h,c,n,u,y)}return l&&(t=e.zb.XD(t,i,n)),s&&(t=e.zb.Mz(t,i,this.Qm,n),d&&(t=e.Xl.local().V(t,p,n)),e.zb.Lx(i,t,o)),t.B()||r!=null&&(t=r.Zk(t,!1),this.wp(r,e.bm.reverse,t),t=r.$k(t,!1)),t},f.prototype.eW=function(r,n){var t=(r.ca()+r.R())/400;return t!=0?(t=e.Xl.local().V(r,t,n),t=this.VI(t,n),n=r.Ia(),t.bn(n)):(n=new e.Sa(r.Ip()),t=this.XI(n),n=r.Ia(),t.B()?n.Oa():(r.copyTo(n),r=t.D(),n.K(r.x,r.y,r.x,r.y))),n},f.prototype.fW=function(r,n){r=e.aa.jg(r);var t=this.hf.ef,i=this.hf.Yf,h=t.Sb(),s=i.Sb(),o=e.O.Fu(Math.min(r.I(),64));if(h==3){var a=t.Ji;h=(t=a.fk()).Sb(),r=a.Zk(r,!0),this.wp(a,e.bm.forward,r),r=a.$k(r,!0)}if(h==2){if(this.lo==e.si.Clip?r=e.Xj.local().V(r,t.ml(),t,n):t.Wc()&&(h=new e.l,r.xc(h),t.Oe().contains(h)||(this.lo==e.si.PannableFold&&(r=e.zb.lj(r,t)),e.zb.Jt(r,t.Oe(),t.Xd(0),!0),r=e.zb.Fn(r,t,0,!0,0,n))),r.B())return r;e.zb.ur(t,0,r,o)}else e.zb.Jt(r,t.Oe(),t.Xd(0),!0);return e.zb.tr(this.hf,r,!1,o),t=0,h=!1,a=null,s==3&&(h=!0,s=(i=(a=i.Ji).fk()).Sb()),(s=s==2)?t=i.zi():isNaN(this.Bm)||(t=this.Bm),s&&this.Qm!=e.si.Clip||(r=e.zb.Fn(r,i.sc(),t,!1,0,n)),s&&(r=e.zb.Mz(r,i,this.Qm,n),e.zb.Lx(i,r,o),r.B())||h&&(r=a.Zk(r,!0),this.wp(a,e.bm.reverse,r),r=a.$k(r,!0)),r},f.prototype.wp=function(r,n,t){var i=t.I();if(i!=0){for(var h=t.ub(0),s=e.O.lg(200,0),o=[],a=0;ah.v+s&&an?this.wv(t,i):this.gv(t,i);case 1:var h=this.wv(t,i);return t=this.gv(t,i),e.lc.hq(h,t,n);case 2:throw e.i.fa("not implemented")}throw e.i.Qa()},r.prototype.fe=function(n,t){var i=this.pa-this.sa,h=this.la-this.na,s=i*i+h*h;return s==0?.5:(n=((n.x-this.sa)*i+(n.y-this.na)*h)/s,t||(0>n?n=0:1(t=(t-this.na)/n)||1(t=(t-this.sa)/n)||1(t=8881784197001252e-31*(Math.abs(i.x*t.y)+Math.abs(i.y*t.x)))?-1:n<-t?1:0},r.prototype.rp=function(n,t,i,h){var s=this.sa,o=this.na,a=n-s,u=t-o;if((a=Math.sqrt(a*a+u*u))<=Math.max(i,6661338147750939e-31*a))return h&&a==0?NaN:0;if(a=n-this.pa,u=t-this.la,(a=Math.sqrt(a*a+u*u))<=Math.max(i,6661338147750939e-31*a))return h&&a==0?NaN:1;if(a=this.pa-this.sa,u=this.la-this.na,0<(h=Math.sqrt(a*a+u*u))){var c=1/h,l=n-s,p=t-o,y=l*(a*=c)+p*(u*=c),d=17763568394002505e-31*(Math.abs(l*a)+Math.abs(p*u)),g=a;if(a=-u,u=g,y<-(d=Math.max(i,d))||y>h+d)return NaN;if(Math.abs(l*a+p*u)<=Math.max(i,17763568394002505e-31*(Math.abs(l*a)+Math.abs(p*u)))&&(.5>=(a=e.O.Rk(y*c,0,1))?(u=this.sa+(this.pa-this.sa)*a,h=this.na+(this.la-this.na)*a):(u=this.pa-(this.pa-this.sa)*(1-a),h=this.la-(this.la-this.na)*(1-a)),e.h.Oy(u,h,n,t)<=i)){if(.5>a){if(e.h.Oy(u,h,s,o)<=i)return 0}else if(e.h.Oy(u,h,this.pa,this.la)<=i)return 1;return a}}return NaN},r.prototype.Nb=function(n){return n!=null&&(n==this||n.constructor===this.constructor&&this.FM(n))},r.prototype.rD=function(n,t,i){var h=i?this.sa:this.pa;i=i?this.na:this.la;var s=new e.h;return s.x=n.pa-h,s.y=n.la-i,!(t.Qh(s)>6661338147750939e-31*t.fD(s))||(s.x=n.sa-h,s.y=n.na-i,t.Qh(s)<=6661338147750939e-31*t.fD(s))},r.prototype.qD=function(n){var t=new e.h;return t.x=this.pa-this.sa,t.y=this.la-this.na,!!this.rD(n,t,!1)&&(t.Sq(),!!this.rD(n,t,!0))},r.NM=function(n,t){var i=n.uu(t.sa,t.na),h=n.uu(t.pa,t.la);return!(0>i&&0>h||0i&&0>h||0(h=t.Qb())?n.qD(t):t.qD(n)))},r.LM=function(n,t,i){var h=e.h.construct(NaN,NaN),s=n.pa-n.sa,o=n.la-n.na,a=t.pa-t.sa,u=t.la-t.na,c=a*o-s*u;if(c==0)return h;var l=8881784197001252e-31*(Math.abs(a*o)+Math.abs(s*u)),p=t.sa-n.sa,y=t.na-n.na,d=a*y-p*u,g=d/c,b=Math.abs(c);return g<-(a=(8881784197001252e-31*(Math.abs(a*y)+Math.abs(p*u))*b+l*Math.abs(d))/(c*c)+2220446049250313e-31*Math.abs(g))||g>1+a||(a=(u=s*y-p*o)/c)<-(s=(8881784197001252e-31*(Math.abs(s*y)+Math.abs(p*o))*b+l*Math.abs(u))/(c*c)+2220446049250313e-31*Math.abs(a))||a>1+s||(g=e.O.Rk(g,0,1),s=e.O.Rk(a,0,1),o=n.hc(g),c=t.hc(s),(l=new e.h).uc(o,c),l.length()>i&&(l.add(o,c),l.scale(.5),g=n.fe(l,!1),s=t.fe(l,!1),n=n.hc(g),t=t.hc(s),n.sub(t),n.length()>i)||h.ma(g,s)),h},r.OM=function(n,t,i,h){var s=0;if((n.sa==t.sa&&n.na==t.na||n.sa==t.pa&&n.na==t.la)&&(s++,!h))return 1;if(n.pa==t.sa&&n.la==t.na||n.pa==t.pa&&n.la==t.la){if(++s==2)return 2;if(!h)return 1}return t.vi(n.sa,n.na,i)||t.vi(n.pa,n.la,i)||n.vi(t.sa,t.na,i)||n.vi(t.pa,t.la,i)?1:h&&s!=0||r.NM(n,t)==0?0:1},r.Zx=function(n,t,i,h,s,o){var a=0,u=n.rp(t.sa,t.na,o,!1),c=n.rp(t.pa,t.la,o,!1),l=t.rp(n.sa,n.na,o,!1),p=t.rp(n.pa,n.la,o,!1);return isNaN(u)||(h!=null&&(h[a]=u),s!=null&&(s[a]=0),i!=null&&(i[a]=e.h.construct(t.sa,t.na)),a++),isNaN(c)||(h!=null&&(h[a]=c),s!=null&&(s[a]=1),i!=null&&(i[a]=e.h.construct(t.pa,t.la)),a++),a==2||isNaN(l)||u==0&&l==0||c==0&&l==1||(h!=null&&(h[a]=0),s!=null&&(s[a]=l),i!=null&&(i[a]=e.h.construct(n.sa,n.na)),a++),a==2||isNaN(p)||u==1&&p==0||c==1&&p==1||(h!=null&&(h[a]=1),s!=null&&(s[a]=p),i!=null&&(i[a]=e.h.construct(t.pa,t.la)),a++),0h[1]&&(n=h[0],h[0]=h[1],h[1]=n,s!=null&&(h=s[0],s[0]=s[1],s[1]=h),i!=null&&(s=e.h.construct(i[0].x,i[0].y),i[0]=i[1],i[1]=s)),a):(a=r.LM(n,t,o),isNaN(a.x)?0:(i!=null&&(i[0]=n.hc(a.x)),h!=null&&(h[0]=a.x),s!=null&&(s[0]=a.y),1))},r.prototype.eG=function(){return 0},r.prototype.op=function(){},r.prototype.toString=function(){return"Line: ["+this.sa.toString()+", "+this.na.toString()+", "+this.pa.toString()+", "+this.la.toString()+"]"},r}(e.SC);e.yb=v}(k||(k={})),function(e){var v=function(){function f(){this.Jm=[],this.ya=-1}return f.prototype.La=function(){return this.ya},f.prototype.next=function(){if(this.Jm!=null&&this.Jm.length!=0){this.ya++;var r=this.Jm[0];return this.Jm=1>=this.Jm.length?[]:this.Jm.slice(1),r}return this.Jm=null},f.prototype.ZX=function(r){this.Jm.push(r)},f.prototype.qe=function(){},f}();e.gL=v}(k||(k={})),function(e){var v;(v=e.SL||(e.SL={}))[v.enumFillRuleOddEven=0]="enumFillRuleOddEven",v[v.enumFillRuleWinding=1]="enumFillRuleWinding";var f=function(r){function n(t,i){var h=r.call(this)||this;if(h.xf=!1,h.Eq=null,h.sq=0,h.rq=0,h.Aj=null,h.Mg=!1,h.nb=null,h.mb=null,h.Ve=null,h.Lj=null,h.Sd=null,h.tq=0,h.gb=0,h.xq=0,i===void 0)h.xf=t,h.Mg=!1,h.tq=0,h.sq=0,h.rq=0,h.wa=0,h.description=e.ee.og();else{if(i==null)throw e.i.N();h.xf=t,h.Mg=!1,h.tq=0,h.sq=0,h.rq=0,h.wa=0,h.description=i}return h.Aj=null,h.gb=0,h}return J(n,r),n.prototype.tm=function(){return 0i)throw e.i.Qa();if(this.dc(t)){if(this.mb==null)throw e.i.Qa();var h=this.wa,s=this.Ba(t),o=this.Vc(t);this.dm(this.wa+1),this.mc();for(var a=0,u=this.description.Aa;at;i--)h=this.nb.read(i),this.nb.write(i,h+1);this.mb.KE(t,1)}},n.prototype.Ap=function(){if(this.wx(),t===void 0){this.Mg=!1;var t=this.da()-1}var i=this.mb.read(t);this.mb.write(t,1|i),this.Ve!=null&&(t=this.Vc(t)-1,this.Ve.write(t,1),this.Lj.write(t,-1))},n.prototype.dc=function(t){return!!(1&this.mb.read(t))},n.prototype.Nn=function(t){if(this.dc(t))return!0;var i=this.Ba(t);return!(i>(t=this.Vc(t)-1))&&(i=this.Na(i),t=this.Na(t),i.qb(t))},n.prototype.yv=function(t){return!!(2&this.mb.read(t))},n.prototype.oc=function(t,i){if(this.Jl(t.description),t.getType()!=322)throw e.i.Qa();var h=new e.Sa;(i||this.B())&&(t.To(h),this.nf(h)),t.Po(h),this.lineTo(h)},n.prototype.tp=function(t){var i=this.wa==0;this.sx(t.v,t.G),this.yj(t.v,t.H),this.yj(t.C,t.H),this.yj(t.C,t.G),this.Ap(),this.Mg=!1,i&&this.Lf(256,!1)},n.prototype.ad=function(t,i){if(!t.B()){for(var h=this.wa==0,s=new e.Sa(this.description),o=0;4>o;o++)t.Hf(i?4-o-1:o,s),o==0?this.nf(s):this.lineTo(s);this.Ap(),this.Mg=!1,h&&!i&&this.Lf(256,!1)}},n.prototype.add=function(t,i){for(var h=0;hi&&(i=t.da()-1),i>=t.da()||0>h||0>s||s>t.rv(i))throw e.i.fa("index out of bounds");if(s!=0){var a=t.dc(i)&&h+s==t.rv(i);if(!a||s!=1){if(this.Mg=!1,this.Jl(t.description),h=t.Ba(i)+h+1,o&&(s++,h--),a&&s--,a=this.wa,this.dm(this.wa+s),this.mc(),o){if(s==0)return;this.nb.add(this.wa),o=t.mb.read(i),o&=-5,this.xf&&(o|=1),this.mb.write(this.mb.size-1,o),this.mb.add(0)}else this.nb.write(this.mb.size-1,this.wa);o=0;for(var u=this.description.Aa;op||t.za[p]==null?this.za[o].Ln(l*a,e.ra.se(c),s*l,l*a):this.za[o].Mn(l*a,t.za[p],l*h,s*l,!0,l,l*a)}if(this.tm()||t.yv(i))throw e.i.Qa();this.Pc(1993)}}},n.prototype.oJ=function(){for(var t=0,i=this.da();t=this.da())throw e.i.N();var i=this.Ba(t),h=this.Ja(t);t=this.dc(t)?1:0;for(var s=0,o=this.description.Aa;st&&(t=i-1),t>=i)throw e.i.N();for(var h=this.Ba(t),s=this.Ja(t),o=0,a=this.description.Aa;o=i.da())throw e.i.N();var o=this.da();if(t>o)throw e.i.N();0>t&&(t=o),0>h&&(h=i.da()-1),this.Mg=!1,this.Jl(i.description),i.mc();var a=i.Ba(h),u=i.Ja(h),c=this.wa,l=i.dc(h)&&!s?1:0;this.dm(this.wa+u),this.mc();for(var p=t=t+1;s--)a=this.nb.read(s-1),this.nb.write(s,a+u);for(i.yv(h),this.mb.add(0),s=o-1;s>=t+1;s--)o=this.mb.read(s),o&=-5,this.mb.write(s+1,o);o=i.JR().read(h),o&=-5,this.xf&&(o|=1),this.mb.write(t,o)},n.prototype.Hz=function(t,i){var h=-1,s=this.da();if(h>s)throw e.i.N();0>h&&(h=s),this.Mg=!1;var o=this.wa;this.dm(this.wa+i),this.mc();var a=h=h+1;o--)a=this.nb.read(o-1),this.nb.write(o,a+i);for(this.mb.add(0),o=s-1;o>=h+1;o--)i=this.mb.read(o),i&=-5,this.mb.write(o+1,i);this.xf&&this.mb.write(h,1)},n.prototype.qG=function(t,i,h){var s=-1;if(0>t&&(t=this.da()),t>this.da()||s>this.Ja(t)||h>i.length)throw e.i.fa("index out of bounds");if(h!=0){t==this.da()&&(this.nb.add(this.wa),this.xf?this.mb.add(1):this.mb.add(0)),0>s&&(s=this.Ja(t)),this.mc();var o=this.wa;this.dm(this.wa+h),this.mc();for(var a=0,u=this.description.Aa;at&&(t=this.da()),t>=s||i>this.Ja(t))throw e.i.fa("index out of bounds");t==this.da()&&(this.nb.add(this.wa),this.xf?this.mb.add(1):this.mb.add(0)),0>i&&(i=this.Ja(t));var o=this.wa;this.dm(this.wa+1),this.mc();var a=this.Ba(t);this.za[0].vj(2*(a+i),h,2*o),h=1;for(var u=this.description.Aa;ht&&(t=h-1),t>=h||i>=this.Ja(t))throw e.i.fa("index out of bounds");this.mc();var s=this.Ba(t);0>i&&(i=this.Ja(t)-1),i=s+i,s=0;for(var o=this.description.Aa;s=t+1;h--)i=this.nb.read(h),this.nb.write(h,i-1);this.wa--,this.Pg--,this.Pc(1993)},n.prototype.uE=function(t,i,h){var s=this.Ba(t)+i;if((h=this.Ba(h)+void 0)s||h>this.I()-1)throw e.i.N();i=0,(t=this.Ga()).Vb(s);do{for(;t.Ha()&&(s=t.ha(),t.wb()!=h);)i+=s=s.Qb();if(t.wb()==h)break}while(t.$a());return i},n.prototype.fO=function(t,i,h){if(i=this.Ba(t)+i,h=this.Ba(t)+h,0>i||h>this.I()-1)throw e.i.N();var s=this.Ga();if(i>h){if(!this.dc(t))throw e.i.N("cannot iterate across an open path");s.JB()}var o=t=0;s.Vb(i);do o+=t,t=s.ha().Qb();while(s.wb()!=h);return o},n.prototype.mg=function(){return e.pi.gm(this,null)},n.prototype.KS=function(t,i,h){for(var s=t;si){var a=this.tm(),u=0;i=this.wa}else a=this.yv(i),u=this.Ba(i),i=this.Vc(i);for(;u=this.Ba(i))return i;i--}else i++;if(0<=i&&i=this.Ba(i)&&th){for(i=0;ii;){var s=i+(h-i>>1);if(t=(i=this.Vc(s))))return this.gb=s;i=s+1}}return this.gb=i},n.prototype.yz=function(){var t=this.I();if(!this.xf){t-=this.da();for(var i=0,h=this.da();ih.RR()))return!0;this.Bb.yD(null)}return h=e.Nx.create(this,t,i),this.Bb.yD(h),!0},n.prototype.cc=function(){var t=r.prototype.cc.call(this);if(!this.Ac()){var i=this.da();this.nb!=null&&this.nb.An(t,0,i+1),this.mb!=null&&this.mb.An(t,0,i)}return t},n.prototype.ZF=function(t){return this.Ve!=null?this.Ve.read(t):1},n.prototype.bc=function(t,i,h){var s=this.sz(t);if(t==this.Vc(s)-1&&!this.dc(s))throw e.i.fa("index out of bounds");this.mc();var o=this.Ve,a=1;if(o!=null&&(a=7&o.read(t)),a!==1)throw e.i.Qa();if(i.Or(),i=i.get(),h?i.Nf(e.ee.og()):i.Nf(this.description),s=t==this.Vc(s)-1&&this.dc(s)?this.Ba(s):t+1,o=new e.h,this.D(t,o),i.Dc(o),this.D(s,o),i.Qc(o),!h)for(h=1,o=this.description.Aa;h=this.da())throw e.i.N();if(this.B())i.Oa();else{if(this.yv(t))throw e.i.fa("not implemented");var h=this.ub(0),s=new e.h,o=new e.l;o.Oa();var a=this.Ba(t);for(t=this.Vc(t);athis.I())&&(t=e.ta.nE(this),this.Bb.WM(t),!0)},n.prototype.hM=function(){if(this.Bb==null&&(this.Bb=new e.Uk),this.Bb.zo==null){this.Bb.xD(null);var t=e.ta.YN(this);this.Bb.xD(t)}},n.prototype.Yo=function(t){this.xq=t},n.prototype.In=function(){return this.xq},n.prototype.DD=function(t){if(this==t)throw e.i.fa("MultiPathImpl.add");for(var i=this.da(),h=0;h=(i=this.Vc(i))||ti?n.I():i,0>t||t>n.I()||it?i:t,0>i||0>t)throw e.i.N();if(t!=0){i=t-0,t=this.wa,this.resize(this.wa+i);for(var h=0;hn||n>=this.I())throw e.i.fa("index out of bounds");this.mc();for(var t=0,i=this.description.Aa;tt||t>=this.wa||in?n:f},v.Th=function(f,r){var n=5381;return((n=((n=((n=r!==void 0?(r<<5)+r+(255&f):(n<<5)+n+(255&f))<<5)+n+(f>>8&255))<<5)+n+(f>>16&255))<<5)+n+(f>>24&255)&2147483647},v.uj=function(){throw Error("Not Implemented")},v.bB=function(f){return v.aU(f)+12345&2147483647},v.XG=function(f){var r=32,n=f%v.Qx|0,t=f/v.Qx|0;return(r&=63)==0?f:(32>r?(f=n>>>r|t<<32-r,r=t>>r):(f=t>>r-32,r=0<=t?0:-1),r*v.Qx+(f>>>0))},v.aU=function(f){var r=1103515245,n=65535&r;return((r-n)*(f|=0)|0)+(n*f|0)|0},v.truncate=function(f){return 0>f?-1*Math.floor(Math.abs(f)):Math.floor(f)},v.MAX_SAFE_INTEGER=Math.pow(2,53)-1,v.MIN_SAFE_INTEGER=-v.MAX_SAFE_INTEGER,v.VC=65536,v.Qx=v.VC*v.VC,v}()}(k||(k={})),function(e){var v;(v=e.CL||(e.CL={}))[v.Project=0]="Project",v[v.Union=1]="Union",v[v.Difference=2]="Difference",v[v.Proximity2D=3]="Proximity2D",v[v.Relate=4]="Relate",v[v.Equals=5]="Equals",v[v.Disjoint=6]="Disjoint",v[v.Intersects=7]="Intersects",v[v.Within=8]="Within",v[v.Contains=9]="Contains",v[v.Crosses=10]="Crosses",v[v.Touches=11]="Touches",v[v.Overlaps=12]="Overlaps",v[v.Buffer=13]="Buffer",v[v.Distance=14]="Distance",v[v.Intersection=15]="Intersection",v[v.Clip=16]="Clip",v[v.Cut=17]="Cut",v[v.DensifyByLength=18]="DensifyByLength",v[v.DensifyByAngle=19]="DensifyByAngle",v[v.LabelPoint=20]="LabelPoint",v[v.GeodesicBuffer=21]="GeodesicBuffer",v[v.GeodeticDensifyByLength=22]="GeodeticDensifyByLength",v[v.ShapePreservingDensify=23]="ShapePreservingDensify",v[v.GeodeticLength=24]="GeodeticLength",v[v.GeodeticArea=25]="GeodeticArea",v[v.Simplify=26]="Simplify",v[v.SimplifyOGC=27]="SimplifyOGC",v[v.Offset=28]="Offset",v[v.Generalize=29]="Generalize",v[v.SymmetricDifference=30]="SymmetricDifference",v[v.ConvexHull=31]="ConvexHull",v[v.Boundary=32]="Boundary",v[v.SimpleRelation=33]="SimpleRelation";var f=function(){function r(){}return r.prototype.getType=function(){return null},r.prototype.wn=function(){},r.prototype.Iu=function(){return!1},r}();e.Je=f}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 13},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.V=function(n,t,i,h,s){return n instanceof e.aa?(s=new e.Zc(n),this.V(s,t,[i],!1,h).next()):h===!0?(i=new e.BC(n,t,i,!1,s),e.Gh.local().V(i,t,s)):new e.BC(n,t,i,!1,s)},r.instance=null,r}(e.Je);e.AC=v}(k||(k={})),function(e){var v=function(){function f(r,n,t,i,h){this.ya=-1,this.Rd=r,this.$z=n,this.Cs=t,this.tT=new e.l,this.tT.Oa(),this.eo=-1,this.Ub=h}return f.prototype.next=function(){for(var r;(r=this.Rd.next())!=null;)return this.ya=this.Rd.La(),this.eo+1=r.I():r.da()==1&&(2>=r.I()||e.Zt.JG(r,0)))},f}();e.DC=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 17},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.V=function(n,t,i,h,s){return new e.nL(n,t,i,h,s)},r.instance=null,r}(e.Je);e.mL=v}(k||(k={})),function(e){var v=function(){function f(r,n,t,i,h){if(this.Tf=null,n==null||t==null)throw e.i.fa("invalid argument");this.qT=r,this.nA=n,this.lH=t,r=e.ta.mv(n,t),this.qa=e.ta.Wd(i,r,!0),this.kH=-1,this.nd=h}return f.prototype.La=function(){return 0},f.prototype.next=function(){return this.RQ(),++this.kHthis.Tf.length&&(this.Tf.length=0)},f.prototype.SQ=function(){var r=new e.ia(0),n=new e.gd,t=n.aF(),i=n.Ib(this.nA),h=n.Ib(this.lH),s=new e.Fg;try{s.Ft(n,this.qa,this.nd),s.dl(t,i,h,r);var o=n.Ne(i),a=new e.Da,u=new e.Da;for(this.Tf.length=0,this.Tf.push(a),this.Tf.push(u),i=0;i=t)throw e.i.N();return new e.oL(n,t,i)},r.instance=null,r}(e.Je);e.Xl=v}(k||(k={})),function(e){var v=function(){function f(r,n){this.ya=-1,this.Rd=r,this.Ps=n}return f.prototype.La=function(){return this.ya},f.prototype.next=function(){var r;return(r=this.Rd.next())!=null?(this.ya=this.Rd.La(),this.NP(r)):null},f.prototype.NP=function(r){if(r.B()||1>r.Db())return r;var n=r.getType();if(n==1736||n==1607)return this.Ny(r);if(e.aa.yd(n))return this.PP(r);if(n==197)return this.OP(r);throw e.i.Qa()},f.prototype.PP=function(r){if(r.Qb()<=this.Ps)return r;var n=new e.Ta(r.description);return n.oc(r,!0),this.Ny(n)},f.prototype.OP=function(r){var n=new e.Da(r.description);n.ad(r,!1);var t=new e.l;return r.A(t),r=t.ca(),t.R()<=this.Ps&&r<=this.Ps?n:this.Ny(n)},f.prototype.Ny=function(r){for(var n=r.Ia(),t=r.Ga();t.$a();)for(var i=!0;t.Ha();){var h=t.ha();if(h.getType()!=322)throw e.i.fa("not implemented");var s=t.On(),o=h.Qb();if(o>this.Ps){var a=Math.ceil(o/this.Ps);o=new e.Sa(r.description),i&&(h.To(o),n.nf(o));var u=i=1/a,c=0;for(--a;co)return n;var a=n.getType(),u=t.getType(),c=new e.l,l=new e.l,p=new e.l;n.A(c),t.A(l),p.K(c),p.Zb(l);var y=(p=e.ta.Wd(i,p,!0))*Math.sqrt(2)*1.00001,d=new e.l;if(d.K(c),d.W(y,y),!d.isIntersecting(l))return n;if(s==1&&o==2)return r.KV(n,t,u,i,h);if(a==33)switch(e.Vk.yd(u)?(i=new e.Ta(t.description),i.oc(t,!0)):i=t,u){case 1736:return r.XU(n,i,p);case 1607:return r.YU(n,i,p);case 550:return r.VU(n,i,p);case 197:return r.UU(n,i,p);case 33:return r.WU(n,i,p);default:throw e.i.N()}else if(a==550)switch(u){case 1736:return r.nU(n,t,p);case 197:return r.lU(n,t,p);case 33:return r.mU(n,t,p)}return e.Fg.im(n,t,i,h)},r.XU=function(n,t,i){return e.hd.KG(t,n,i)==0?n:n.Ia()},r.YU=function(n,t,i){var h=n.D();t=t.Ga();for(var s=i*Math.sqrt(2)*1.00001,o=s*s,a=new e.l;t.$a();)for(;t.Ha();){var u=t.ha();if(u.A(a),a.W(s,s),a.contains(h)){if(u.qs(h,i))return n.Ia();var c=u.ac();if(e.h.yc(h,c)<=o||(c=u.wc(),e.h.yc(h,c)<=o))return n.Ia()}}return n},r.VU=function(n,t,i){var h=t.ub(0);t=t.I();var s=n.D(),o=new e.h;i=i*Math.sqrt(2)*1.00001,i*=i;for(var a=0;at.I()?this.gE(n,t,i):(this.Nt(),n=this.gE(t,n,i),this.Nt(),n):n.getType()==550&&e.aa.Hc(t.getType())?(n=this.hE(t,n,i),this.Nt(),n):t.getType()==550&&e.aa.Hc(n.getType())?this.hE(n,t,i):n.getType()==550&&t.getType()==550?n.I()>t.I()?this.iE(n,t):(this.Nt(),n=this.iE(t,n),this.Nt(),n):0},r.prototype.gE=function(n,t,i){var h=n.Ga(),s=t.Ga(),o=new e.l,a=new e.l,u=17976931348623157e292;if(!i&&this.pY(n,t,h,s))return 0;for(;h.$a();)for(;h.Ha();)if((n=h.ha()).A(o),!(o.px(this.oh)>u)){for(;s.$a();)for(;s.Ha();)if((t=s.ha()).A(a),o.px(a)o)){for(var l=0;lh)){for(var l=0;lr.Ja(n))){var h=r.Ba(n),s=r.Vc(n)-1,o=r.ub(0),a=r.dc(n),u=new e.ia(0);u.Jb(r.Ja(n)+1);var c=new e.ia(0);for(c.Jb(r.Ja(n)+1),u.add(a?h:s),u.add(h),h=new e.h;1this.DH&&a>s&&(h=i,s=a)}return h},f.prototype.qe=function(){},f}();e.sL=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 29},r.prototype.V=function(n,t,i,h){return n instanceof e.aa?(n=new e.Zc(n),this.V(n,t,i,h).next()):new e.sL(n,t,i,h)},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.instance=null,r}(e.Je);e.EC=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 21},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.V=function(n,t,i,h,s,o,a,u){return n instanceof e.aa?(u=new e.Zc(n),this.V(u,t,i,[h],s,o,!1,a).next()):a===!0?(i=new e.GC(n,t,i,h,s,!1,!1,u),e.Gh.local().V(i,t,u)):new e.GC(n,t,i,h,s,!1,!1,u)},r.instance=null,r}(e.Je);e.FC=v}(k||(k={})),function(e){var v=function(){function f(r,n,t,i,h,s,o,a){if(s)throw e.i.Ie();if(n==null)throw e.i.N();this.ya=-1,this.Ms=r,this.vg=n,this.ze=t,this.Cs=i,this.$n=h,this.eo=-1,this.Ub=a,this.uT=new e.l,this.uT.Oa()}return f.prototype.next=function(){for(var r;(r=this.Ms.next())!=null;)return this.ya=this.Ms.La(),this.eo+1n.Db())return 0;if(i==4)throw e.i.Ie();var h=e.cb.sc(t),s=e.cb.vv(h),o=e.cb.ev(h);s*=2-s;var a=h.Hd().ai,u=n.getType();if(u==1736||u==197)var c=n.mg();else e.aa.yd(u)?(c=new e.Ta(n.description)).oc(n,!0):c=n;if(h.Nb(t)==0){if(e.cb.Wc(t)){c=e.Hh.lj(c,t),u==1607&&c==n&&(c=e.aa.jg(n)),n=new e.Nc,e.cb.gh(t).cn(n),u=0;for(var l=c.I();u=this.Fi||7h||t==0&&n==550&&this.Dj==33?this.nJ():f.HB(r,i);if((this.Fi==-1||this.Fi==4)&&n==197&&this.Dj==197)return t=this.Se,n=new e.l,r.A(n),i=new e.l,t.A(i),n.Ea(i),t=new e.Fh,r.copyTo(t),t.Xo(n),t;if(n==197&&e.aa.tf(this.Dj)==0||this.Dj==197&&e.aa.tf(n)==0)return i=n==197?r:this.Se,r=n==197?this.Se:r,n=new e.l,i.A(n),e.Ud.clip(r,n,t,0);if(e.aa.tf(n)==0&&0a&&(a=t.yz()),s=t.I()+i.I(),a*i.I()>Math.log(s)*s*4)return null;s=null,a=i.Ga(),u!=null&&u.Fb!=null&&(s=u.Fb),s==null&&20w){if(s!=null)for(i==null?i=s.vR(j,h):i.Uo(j,h),w=i.next();w!=-1;w=i.next()){a.Vb(s.ja(w)),w=a.ha();var M=j.Ea(w,null,c,null,h);for(w=0;wm?(y=u.wb()-t.Ba(x),d=1,m=m==0?3:2):d++:(r.oc(A,m==0),m=1);break;case 0:m=0,y=-1,d=0;break;default:return null}A=N}}}else{if(0>(w=this.QD(n,j.ac(),h)))return null;w==1?(2>m&&(y=u.wb()-t.Ba(x),m=m==0?3:2),d++):(y=-1,d=0)}l.clear(!1)}else w!=0&&w==1&&(m==0?(m=3,y=u.wb()-t.Ba(x)):m==1?(m=2,y=u.wb()-t.Ba(x)):d++)}2<=m&&(r.Dr(t,x,y,d,m==3),y=-1)}return r},f.prototype.QD=function(r,n,t){return e.Dg.wm(r,n,t)},f.prototype.RD=function(r,n,t){var i=n.ac();n=n.wc();var h=e.Dg.wm(r,i,t),s=e.Dg.wm(r,n,t);return h==1&&s==0||h==0&&s==1?-1:h==0||s==0?0:h==1||s==1?1:((h=new e.h).add(i,n),h.scale(.5),(r=e.Dg.wm(r,h,t))==0?0:r==1?1:-1)},f.HB=function(r,n){return n?r:r.Ia()},f.prototype.nJ=function(){return this.yH==null&&(this.yH=this.Se.Ia()),this.yH},f.prototype.qe=function(){},f}();e.HC=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 28},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.V=function(n,t,i,h,s,o,a){return n instanceof e.aa?(n=new e.Zc(n),this.V(n,t,i,h,s,o,a).next()):new e.xL(n,t,i,h,s,o,a)},r.instance=null,r}(e.Je);e.IC=v}(k||(k={})),function(e){var v=function(){function f(r,n,t,i,h,s,o){this.ya=-1,this.Rd=r,this.Mj=n,this.Ka=t,this.Ki=i,this.CA=h,this.uH=s,this.nd=o}return f.prototype.next=function(){var r=this.Rd.next();return r!=null?(this.ya=this.Rd.La(),this.jL(r)):null},f.prototype.La=function(){return this.ya},f.prototype.jL=function(r){var n=0>=this.uH?e.ta.kj(this.Mj,r,!1):this.uH;return e.IK.V(r,this.Ka,this.Ki,this.CA,n,this.nd)},f.prototype.qe=function(){},f}();e.xL=v}(k||(k={})),function(e){var v;(v=e.NK||(e.NK={}))[v.clipToDomainOnly=1]="clipToDomainOnly",v[v.clipWithHorizon=2]="clipWithHorizon",v[v.foldAndClipWithHorizon=3]="foldAndClipWithHorizon";var f=function(r){function n(){return r!==null&&r.apply(this,arguments)||this}return J(n,r),n.prototype.getType=function(){return 0},n.local=function(){return n.instance===null&&(n.instance=new n),n.instance},n.prototype.V=function(t,i,h){return t instanceof e.aa?(t=new e.Zc(t),this.V(t,i,h).next()):new e.yL(t,i,h)},n.prototype.transform=function(t,i,h,s){return e.bu.transform(t,i,h,s,!0)},n.prototype.Qt=function(t,i,h,s){return e.bu.Qt(t,i,h,s)},n.instance=null,n}(e.Je);e.Hx=f}(k||(k={})),function(e){var v=function(){function f(r,n,t){this.ya=-1,this.Rd=r,this.MT=n,this.nd=t}return f.prototype.next=function(){var r=this.Rd.next();return r!=null?(this.ya=this.Rd.La(),e.bu.zh(r,this.MT,this.nd)):null},f.prototype.La=function(){return this.ya},f.prototype.qe=function(){},f}();e.yL=v}(k||(k={})),function(e){var v=function(){function r(){}return r.prototype.reset=function(){this.ph=this.xk=-1,this.us=this.kq=!1},r.prototype.AQ=function(n,t,i){for(n.Vb(t,i);n.Ha();){var h=n.ha();if((h=h.Qb())!=0)return n.wb()}for(n.Vb(t,i);n.Ez();)if((h=(h=n.li()).Qb())!=0)return n.wb();return-1},r.prototype.BQ=function(n,t){for(n.Vb(t,-1);n.Ez();)if(n.li().Qb()!=0)return n.wb();return-1},r.prototype.zQ=function(n,t){for(n.Vb(t,-1),n.ha();n.Ha();)if(n.ha().Qb()!=0)return n.wb();return-1},r.prototype.yQ=function(n,t,i,h){if(this.xk=this.AQ(t,i,h),this.xk!=-1){t.Vb(this.xk,-1);var s=t.ha(),o=s.hc(s.fe(n,!1));if(i=e.h.yc(o,n),(h=new e.h).L(o),h.sub(s.ac()),(o=new e.h).L(n),o.sub(s.ac()),this.kq=0>h.wi(o),this.ph=this.zQ(t,this.xk),this.ph!=-1){t.Vb(this.ph,-1);var a=(s=t.ha()).fe(n,!1);a=s.hc(a);var u=e.h.yc(a,n);u>i?this.ph=-1:(h.L(a),h.sub(s.ac()),o.L(n),o.sub(s.ac()),this.us=0>h.wi(o))}this.ph==-1&&(this.ph=this.BQ(t,this.xk),this.ph!=-1&&(t.Vb(this.ph,-1),a=(s=t.ha()).fe(n,!1),a=s.hc(a),(u=e.h.yc(a,n))>i?this.ph=-1:(h.L(a),h.sub(s.ac()),o.L(n),o.sub(s.ac()),this.us=0>h.wi(o),n=this.xk,this.xk=this.ph,this.ph=n,n=this.kq,this.kq=this.us,this.us=n)))}},r.prototype.cO=function(n,t,i,h,s){return i=i.Ga(),this.yQ(n,i,h,s),this.xk!=-1&&this.ph==-1?this.kq:this.xk!=-1&&this.ph!=-1?this.kq==this.us?this.kq:(i.Vb(this.xk,-1),n=i.ha().kg(),i.Vb(this.ph,-1),t=i.ha().kg(),0<=n.wi(t)):t},r}(),f=function(r){function n(){return r!==null&&r.apply(this,arguments)||this}return J(n,r),n.local=function(){return n.instance===null&&(n.instance=new n),n.instance},n.prototype.getType=function(){return 3},n.prototype.nz=function(t,i,h){var s;if(s===void 0&&(s=!1),t.B())return new e.$l;i=i.D();var o=t,a=t.getType();switch(a==197&&((o=new e.Da).ad(t,!1),a=1736),a){case 33:return this.xI(o,i);case 550:return this.jI(o,i);case 1607:case 1736:return this.bU(o,i,h,s);default:throw e.i.fa("not implemented")}},n.prototype.oz=function(t,i){if(t.B())return new e.$l;i=i.D();var h=t,s=t.getType();switch(s==197&&((h=new e.Da).ad(t,!1),s=1736),s){case 33:return this.xI(h,i);case 550:case 1607:case 1736:return this.jI(h,i);default:throw e.i.fa("not implemented")}},n.prototype.pz=function(t,i,h,s){if(0>s)throw e.i.N();if(t.B())return[];i=i.D();var o=t,a=t.getType();switch(a==197&&((o=new e.Da).ad(t,!1),a=1736),a){case 33:return this.TU(o,i,h,s);case 550:case 1607:case 1736:return this.tU(o,i,h,s);default:throw e.i.fa("not implemented")}},n.prototype.bU=function(t,i,h,s){if(t.getType()==1736&&h&&(h=new e.l,t.A(h),h=e.ta.Wd(null,h,!1),(s?e.hd.Yd(t,i,0):e.hd.Yd(t,i,h))!=0)){var o=new e.$l(i,0,0);return s&&o.WJ(!0),o}var a=t.Ga();o=new e.h;for(var u=h=-1,c=17976931348623157e292,l=0;a.$a();)for(;a.Ha();){var p=a.ha();p=p.hc(p.fe(i,!1));var y=e.h.yc(p,i);ye.h.Uq(i,p.ac(),p.wc()),1=i||(t.length=s),t.slice(0)},n.instance=null,n}(e.Je);e.Ix=f}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 4},r.prototype.V=function(n,t,i,h,s){return e.am.yB(n,t,i,h,s)},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.Iu=function(n){return e.Vt.wy(n)},r.prototype.wn=function(n,t,i){e.Vt.CD(n,t,i)},r.instance=null,r}(e.Je);e.zL=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 33},r.prototype.V=function(n,t,i,h,s){return n===1073741824?!e.ud.zB(t,i,h,4,s):e.ud.zB(t,i,h,n,s)},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.prototype.Iu=function(n){return e.Vt.wy(n)},r.prototype.wn=function(n,t,i){e.Vt.CD(n,t,i)},r.instance=null,r}(e.Je);e.dj=v}(k||(k={})),function(e){var v=function(){function f(r,n,t,i){if(this.nd=i,this.rT=t,this.ya=-1,r==null)throw e.i.N();this.yk=r,this.Mj=n}return f.prototype.next=function(){var r;if((r=this.yk.next())!=null){if(this.ya=this.yk.La(),this.nd!=null&&!this.nd.progress(-1,-1))throw e.i.fu("user_canceled");return this.eC(r)}return null},f.prototype.La=function(){return this.ya},f.prototype.eC=function(r){if(r==null)throw e.i.N();return e.Jx.cK(r,this.Mj,this.rT,this.nd)},f.prototype.qe=function(){},f}();e.AL=v}(k||(k={})),function(e){var v=function(f){function r(){return f!==null&&f.apply(this,arguments)||this}return J(r,f),r.prototype.getType=function(){return 26},r.prototype.V=function(n,t,i,h){return n instanceof e.aa?(n=new e.Zc(n),this.V(n,t,i,h).next()):new e.AL(n,t,i,h)},r.prototype.rs=function(n,t,i,h,s){return 0<(h!==void 0?e.Jx.rs(n,t,i,h,s):e.Jx.rs(n,t,!1,null,i))},r.local=function(){return r.instance===null&&(r.instance=new r),r.instance},r.instance=null,r}(e.Je);e.Yl=v}(k||(k={})),function(e){var v=function(){function s(){this.yq=0}return s.prototype.nX=function(o){this.yq&=-2,this.yq|=o?1:0},s.prototype.Wp=function(){return!!(1&this.yq)},s.prototype.XF=function(){return this.Wp()?0:1},s}();e.xY=v;var f=function(){},r=function(s,o,a,u){this.x=s,this.y=o,this.Ai=a,this.xm=u},n=function(){function s(o){this.Be=o}return s.prototype.compare=function(o,a,u){return o=o.ja(u),a=this.Be.lf.read(2*a),0>(a-=o=this.Be.lf.read(2*o))?-1:0p?1:0},s}(),i=function(){function s(o,a){this.YI=new e.h,this.parent=o,this.dS=a}return s.prototype.nr=function(o,a,u){var c=this.parent,l=this.dS;u.Vd(o,a,function(p,y){return c.Mh(p,y,l)})},s.prototype.$p=function(o){return o=this.parent.gi.get(o),this.parent.lf.tc(2*(o>>1),this.YI),this.YI.y+(1&o?this.parent.Oj:-this.parent.Oj)},s}(),h=function(){function s(o,a,u,c,l){this.nH=o.description,this.X=o,this.Qg=a,this.Oj=e.ta.kj(this.Qg,o,!1),this.Bo=e.ta.kj(this.Qg,o,!0),this.xA=u,this.oT=this.nH.Aa,this.hb=[],this.po=[],this.mh=new e.jp,this.fb=new e.Yj,this.ke=new e.Md,this.ZG=this.ql=l}return s.prototype.eT=function(){return this.ZG=!0,(!e.aa.Hc(this.X.getType())||this.GE()&&this.DE(!1))&&this.mO()?e.aa.Hc(this.X.getType())?this.pO()?this.X.getType()==1607?this.rO()?2:0:this.sO()?this.tO():0:0:2:0},s.prototype.kC=function(o,a){var u=this.lf.read(2*o);o=this.lf.read(2*o+1);var c=this.lf.read(2*a);a=this.lf.read(2*a+1);var l=!e.Yt.Cv(u,o,c,a,this.Oj*this.Oj);return l||this.X.Db()!=0&&u==c&&o==a},s.prototype.GE=function(){for(var o=this.X,a=o.xf?3:2,u=0,c=o.da();uthis.Oj)){if(o&&c){var p=l.wv(1,0);if(l=l.wv(1,0),Math.abs(l-p)>a)continue}return this.ke=new e.Md(2,u.wb(),-1),!1}}return!0},s.prototype.mO=function(){var o=this.X,a=null;e.aa.Hc(this.X.getType())&&(a=this.X);var u=(this.ZG||this.ql)&&a!=null,c=o.I();this.lf=o.ub(0),this.gi=new e.ia(0),this.gi.Jb(2*c),this.fi=new e.ia(0),this.fi.Jb(2*c),u&&(this.Fl==null&&(this.Fl=new e.ia(0)),this.Fl.Jb(c));for(var l=o=0;l=a.Vc(o);)o++;this.Fl.add(o)}for(new e.Xt().sort(this.fi,0,2*c,new i(this,u)),this.fb.clear(),this.fb.Vo(new n(this)),this.fb.De(c),a=0,c*=2;a>1,1&o){if(o=this.fb.search(u,-1),l=this.fb.we(o),p=this.fb.lb(o),this.fb.vd(o,-1),l!=-1&&p!=-1&&!this.kC(this.fb.ja(l),this.fb.ja(p)))return this.ke=new e.Md(3,this.fb.ja(l),this.fb.ja(p)),!1}else{if(o=this.fb.addElement(u,-1),(l=this.fb.we(o))!=-1&&!this.kC(this.fb.ja(l),u))return this.ke=new e.Md(3,u,this.fb.ja(l)),!1;var p=this.fb.lb(o);if(p!=-1&&!this.kC(this.fb.ja(p),u))return this.ke=new e.Md(3,u,this.fb.ja(p)),!1}return!0},s.prototype.pO=function(){return 10>this.X.I()?this.nO():this.oO()},s.prototype.oO=function(){var o=new e.gd;o.Ib(this.X);var a=new e.Md;return!e.$t.kI(!1,o,this.Oj,a,this.nd)||(a.Jo=o.Ua(a.Jo),a.Ko=o.Ua(a.Ko),this.ke.Wt(a),!1)},s.prototype.nO=function(){var o=this.X,a=o.Ga();for(o=o.Ga();a.$a();)for(;a.Ha();){var u=a.ha();if(!a.Qn()||!a.$S()){o.BW(a);do for(;o.Ha();){var c=o.ha();if((c=u.zr(c,this.Oj,!0))!=0)return this.ke=new e.Md(c==2?5:4,a.wb(),o.wb()),!1}while(o.$a())}}return!0},s.prototype.sO=function(){var o=this.X;this.hb.length=0,this.po.length=0,this.Zf=o.Ga(),this.Zf.JB();var a=new e.ia(0);a.Jb(10);var u=NaN,c=0,l=0;for(o=2*o.I();l>=1;var y=this.lf.read(2*p),d=this.lf.read(2*p+1);if(a.size!=0&&(y!=u||d!=c)){if(!this.RI(a))return!1;a!=null&&a.clear(!1)}a.add(p),u=y,c=d}}return!!this.RI(a)},s.prototype.rO=function(){for(var o=this.X,a=Array(o.da()),u=0,c=o.da();u>1;this.lf.tc(2*p,l);var y=a[u=this.Fl.get(p)],d=o.Ba(u),g=o.Vc(u)-1;c.el=p==d||p==g,c.ny=this.ql?!y&&c.el:c.el,c.Ai=u,c.x=l.x,c.y=l.y,c.xm=p;for(var b=new f,x=1,m=this.fi.size;x>1,this.lf.tc(2*p,l),(u=this.Fl.get(p))!=c.Ai&&(y=a[u],d=o.Ba(u),g=o.Vc(u)-1);var w=p==d||p==g,j=this.ql?!y&&c.el:c.el;if(b.x=l.x,b.y=l.y,b.Ai=u,b.xm=p,b.ny=j,b.el=w,b.x==c.x&&b.y==c.y){if(this.ql){if(!(b.ny&&c.ny||b.Ai==c.Ai&&(b.el||c.el)))return this.ke=new e.Md(8,b.xm,c.xm),!1}else if(!b.el||!c.el)return this.ke=new e.Md(5,b.xm,c.xm),!1}u=c,c=b,b=u}return!0},s.prototype.JE=function(){for(var o=this.X,a=[],u=-1,c=!1,l=0,p=o.da();l>1;this.lf.tc(2*y,c),l=this.Fl.get(y),u=new r(c.x,c.y,l,y,a[l]),o=[];var d=1;for(p=this.fi.size;d>1,this.lf.tc(2*y,c),l=this.Fl.get(y),(l=new r(c.x,c.y,l,y,a[l])).x==u.x&&l.y==u.y){if(l.Ai==u.Ai)return this.ke=new e.Md(9,l.xm,u.xm),!1;0<=a[l.Ai]&&a[l.Ai]==a[u.Ai]&&(o.length!=0&&o[o.length-1]==u||o.push(u),o.push(l))}u=l}if(o.length==0)return!0;for(l=new e.jp(!0),e.O.$u(a,-1),c=-1,(d=new e.h).Rc(),u=0,p=o.length;u=o.Ke())return this.ke=new e.Md(6,o.da()==1?1:-1,-1),0;if(o.da()==1)return this.ql&&!this.JE()?0:2;this.to=e.ia.qf(o.da(),0),this.JA=e.ia.qf(o.da(),-1);for(var a=-1,u=0,c=0,l=o.da();cp?0:256),0a||u>=1,(c=this.lf.read(2*u+1))!=this.Mo&&o.size!=0){if(!this.ut(o))return 0;o!=null&&o.clear(!1)}o.add(u),this.Mo=c}return 0l.la){var y=this.Zf.wb(),d=this.Su(l,c,this.Zf.gb,!0);0o.Ja(a.gb))){u.EW();for(var b,x,m=!0;a.Ha();){var w=a.ha(),j=u.li();if(a.wb()>u.wb())break;m&&(d.add(a.wb()),g.add(u.ik()),m=!1),x=d.Fc();var M=a.ik();if(1this.Bo?d.add(a.ik()):p&&(b=o.Uc(1,d.Fc(),0),w=w.gv(1,0),Math.abs(w-b)>y&&d.add(a.ik())),x>this.Bo?g.add(u.wb()):p&&(b=o.Uc(1,g.Fc(),0),w=j.gv(1,0),Math.abs(w-b)>y&&g.add(u.wb()))}if(d.Fc()g.size?d.If():g.If():(d.Fc()!=g.Fc()&&g.If(),g.If()),2<=g.size+d.size){for(m=new e.Sa,j=0,w=d.size;j>1;var l=c>>1,p=new e.h,y=new e.h;return this.lf.tc(2*a,p),p.y+=1&o?this.Oj:-this.Oj,this.lf.tc(2*l,y),y.y+=1&c?this.Oj:-this.Oj,(o=p.compare(y))==0&&u?0>(u=this.Fl.get(a)-this.Fl.get(l))?-1:0l.x)return 1;if(c.yl.y)return 1;for(c=1;cg)return 1}}return 0},s.prototype.PO=function(o,a){var u=this.Ou(o,a);return u==0?oa?1:0o?n:t;if(n.B())return t;if(t.B())return n;var a=new e.l,u=new e.l,c=new e.l;return n.A(a),t.A(u),c.K(a),c.Zb(u),a=e.ta.Wd(i,c,!0),u=n.getType(),c=t.getType(),u==33&&c==33?r.aV(n,t,a):u!=c?0o?n:t:u==550?r.iI(n,t,a):r.iI(t,n,a):e.Fg.ep(n,t,i,h)},r.aV=function(n,t,i){i=i*Math.sqrt(2)*1.00001,i*=i;var h=n.D(),s=t.D(),o=new e.de(n.description);return e.h.yc(h,s)>i&&(o.add(n),o.add(t)),o},r.iI=function(n,t,i){var h=n.ub(0),s=n.I(),o=t.D(),a=n.Ia();i=i*Math.sqrt(2)*1.00001;var u=new e.l;if(n.A(u),u.W(i,i),u.contains(o)){i*=i,u=!1;for(var c=[],l=0;lthis.zk||0>this.bo)throw e.i.Qa();if(this.AH[this.bo])break}return this.ya++,this.fG(this.bo)}return this.ya=0,this.bo=this.zk,this.fG(this.zk)},n.prototype.La=function(){return this.ya},n.prototype.qK=function(){if(this.Ic)return!0;var t=null;if(this.Rd!=null&&(t=this.Rd.next())==null&&(this.Ic=!0,this.Rd=null),e.mp.zp(this.Ub),t!=null){var i=t.Db();this.AH[i]=!0,i>=this.zk&&!this.jA&&(this.ND(i,!1,t),i>this.zk&&!this.jA&&this.zW(i))}if(0this.Do.length)for(var o=0,a=Math.max(2,t+1);oi?e.F.Wq(l,c,u,p,0):e.F.Wq(l,u,c,p,0),d=[0,0,0],g=[0,0,0];var m=[0,0,0];u=[0,0,0],y=[0,0,0];var w=Math.acos(p[2]/1),j=1-r,M=Math.tan(w),A=1+M*M/j,z=2*l[2]*M/j;for(j=(-z+(M=Math.sqrt(z*z-4*A*(l[2]*l[2]/j-1))))/(A*=2),z=(-z-M)/A,M=Math.tan(w),w=(j+z)/2,l=((A=M*j+l[2])+(M*z+l[2]))/2,M=e.F.gp(j-w,A-l),j=l/x*1.570796326794897,z=0;100>z&&(A=(A=e.F.w(r,j))*A/Math.cos(j)*(Math.sin(j)-l*A/(1-r)),!e.s.Cd(A));z++)j-=A;l=e.F.n(1,r,j)*Math.cos(j),M=1-M/(l=Math.sqrt((l-w)*(l+w))),M*=2-M,A=e.F.on(d),w=e.F.on(g),j=e.F.on(m);var N=e.F.St(m,d);z=e.F.St(m,g),e.F.zx(m,d,u),e.F.zx(m,g,y),d=Math.acos(N/(j*A)),g=Math.acos(z/(j*w)),g*=e.s.Mb(1,e.F.St(u,y)),(1.570796326794897<=e.s.P(d)&&1.570796326794897<=e.s.P(g)||3.141592653589793y&&0>i)&&(i=e.F.ba(i+3.141592653589793)),s!=null&&(s.u=u),o!=null&&(o.u=y),a!=null&&(a.u=i)}}},v.rf=function(f,r,n,t,i,h,s,o){var a=[0,0,0],u=[0,0,0],c=[0,0,0],l=[0,0,0],p=[0,0,0],y=[0,0,0],d=[0,0,0],g=[0,0,0,0],b=new e.ga(0),x=new e.ga(0),m=new e.ga(0),w=new e.ga(0),j=new e.ga(0),M=new e.ga(0);if(s!=null&&o!=null)if(e.s.ti(r))e.Yg.rf(f,n,t,i,h,s,o);else if(e.s.Cd(i))s!=null&&(s.u=n),o!=null&&(o.u=t);else if(h=e.F.ba(h),0>i&&(i=e.s.P(i),h=e.F.ba(h+3.141592653589793)),n=e.F.ba(n),t=e.F.ba(t),1.570796326794897h?e.F.Wq(d,p,a,g,0):e.F.Wq(d,a,p,g,0),a=Math.acos(g[2]/1),g=Math.atan2(-g[1],-g[0]),t=1-r,j=1+(p=Math.tan(a))*p/t,t=(-(w=2*d[2]*p/t)+(p=Math.sqrt(w*w-4*j*(d[2]*d[2]/t-1))))/(j*=2),w=(-w-p)/j,p=Math.tan(a),a=(t+w)/2,d=((j=p*t+d[2])+(p*w+d[2]))/2,p=e.F.gp(t-a,j-d),A=d/A*1.570796326794897,t=0;100>t&&(w=(w=e.F.w(r,A))*w/Math.cos(A)*(Math.sin(A)-d*w/(1-r)),!e.s.Cd(w));t++)A-=w;A=e.F.n(1,r,A)*Math.cos(A),d=1-p/(A=Math.sqrt((A-a)*(A+a))),d*=2-d,y=Math.acos(e.F.St(y,u)/(e.F.on(y)*e.F.on(u))),y*=e.s.Mb(1,u[0]),h=(e.F.q(A,d,e.F.Qj(d,y))+f*e.s.Mb(1,h))/e.F.Ah(A,d),h=e.F.ba(1.570796326794897*h),h=e.F.Rq(d,h),e.F.n(A,d,h),p=e.F.ba(g+n),n=Math.cos(p),h=Math.sin(p),c[0]=l[0]*n+l[1]*-h,c[1]=l[0]*h+l[1]*n,c[2]=l[2],e.F.jO(r,c[0],c[1],c[2],m,x,b),s!=null&&(s.u=x.u),o!=null&&(o.u=m.u)}},v}()}(k||(k={})),function(e){var v=function(){function i(h){this.Ya=null,this.wt=new e.h,this.xt=new e.h,this.g=h}return i.prototype.compare=function(h,s,o){return this.g.Gc(s,this.wt),this.g.Gc(h.ja(o),this.xt),this.wt.compare(this.xt)},i}(),f=function(){function i(h){this.Bf=new e.h,this.Dk=new e.h,this.g=h}return i.prototype.Dh=function(h){this.Bf.L(h)},i.prototype.compare=function(h,s){return this.g.Gc(h.ja(s),this.Dk),this.Bf.compare(this.Dk)},i}(),r=function(i){function h(s){var o=i.call(this,s.g,s.qa,!1)||this;return o.ib=s,o}return J(h,i),h.prototype.compare=function(s,o,a){if(this.rg)return-1;var u=this.ib.Qd.Jn(this.ib.Rh(o));s=s.ja(a);var c=this.ib.Qd.Jn(this.ib.Rh(s));return this.Dm=a,this.RE(o,u,s,c)},h}(e.UC),n=function(i){function h(s){var o=i.call(this,s.g,s.qa)||this;return o.ib=s,o}return J(h,i),h.prototype.compare=function(s,o){return this.rg?-1:(s=this.ib.Qd.Jn(this.ib.Rh(s.ja(o))),this.Dm=o,this.SE(o,s))},h}(e.aM),t=function(){function i(){this.Mc=this.df=this.jo=this.Qd=this.lh=this.zd=this.hb=this.g=null,this.Ng=!1,this.vh=this.Nm=this.ie=this.Gk=this.nh=this.Ak=this.Ff=this.$d=null,this.xh=this.Jq=this.UA=this.qa=0,this.Xv=this.Wn=!1,this.yo=new e.h,this.Pi=new e.h,this.hb=new e.$c(8),this.zd=new e.$c(5),this.lh=new e.au,this.Qd=new e.au,this.Ng=!1,this.vh=new e.h,this.vh.ma(0,0),this.qa=0,this.xh=-1,this.Wn=!1,this.g=null,this.df=new e.Yj,this.Mc=new e.Yj,this.nh=new e.ia(0),this.Gk=new e.TC,this.Ff=new e.ia(0),this.Ak=new e.ia(0),this.jo=new e.Sa}return i.prototype.PX=function(h,s){var o=new e.Dd;return o.$B(),h.Oc(o),this.er(h),this.Wn=!1,this.qa=s,this.UA=s*s,s=this.jC(),h.Oc(o),s||(this.qQ(),s||this.jC()),this.xh!=-1&&(this.g.Td(this.xh),this.xh=-1),this.g=null,this.Wn},i.prototype.TX=function(h,s){this.er(h),this.Wn=!1,this.qa=s,this.UA=s*s,this.Ng=!1,this.jC(),this.Ng||(this.Ng=h.Gp(s,!0,!1)==1),this.xh!=-1&&(this.g.Td(this.xh),this.xh=-1),this.g=null},i.prototype.pg=function(h,s){return this.hb.T(h,0+s)},i.prototype.LB=function(h,s,o){this.hb.S(h,0+s,o)},i.prototype.Rh=function(h){return this.hb.T(h,2)},i.prototype.ZW=function(h,s){this.hb.S(h,2,s)},i.prototype.RF=function(h,s){return this.hb.T(h,3+s)},i.prototype.Pp=function(h){return this.hb.T(h,7)},i.prototype.Pl=function(h,s){this.hb.S(h,7,s)},i.prototype.Rp=function(h,s){return this.hb.T(h,3+this.Op(h,s))},i.prototype.fr=function(h,s,o){this.hb.S(h,3+this.Op(h,s),o)},i.prototype.NR=function(h,s){return this.hb.T(h,5+this.Op(h,s))},i.prototype.hr=function(h,s,o){this.hb.S(h,5+this.Op(h,s),o)},i.prototype.Sr=function(h){return this.zd.T(h,0)},i.prototype.UW=function(h,s){this.zd.S(h,0,s)},i.prototype.ez=function(h){return this.zd.T(h,4)},i.prototype.cr=function(h,s){this.zd.S(h,4,s)},i.prototype.il=function(h){return this.zd.T(h,1)},i.prototype.ln=function(h,s){this.zd.S(h,1,s)},i.prototype.dz=function(h){return this.zd.T(h,3)},i.prototype.Et=function(h,s){this.zd.S(h,3,s)},i.prototype.Ym=function(h){var s=this.zd.Ce(),o=this.lh.Ph();return this.UW(s,o),h!=-1?(this.lh.addElement(o,h),this.g.Ra(h,this.xh,s),this.cr(s,this.g.Ua(h))):this.cr(s,-1),s},i.prototype.HP=function(h){this.zd.jd(h)},i.prototype.LD=function(h,s){this.lh.addElement(this.Sr(h),s),this.g.Ra(s,this.xh,h)},i.prototype.nt=function(h){var s=this.hb.Ce(),o=this.Qd.Ph();return this.ZW(s,o),h!=-1&&this.Qd.addElement(o,h),s},i.prototype.MD=function(h,s){this.Qd.addElement(this.Rh(h),s)},i.prototype.Uu=function(h){this.hb.jd(h),0<=(h=this.nh.lF(h))&&this.nh.SV(h)},i.prototype.hj=function(h,s){if(this.pg(h,0)==-1)this.LB(h,0,s);else{if(this.pg(h,1)!=-1)throw e.i.Qa();this.LB(h,1,s)}this.ky(h,s)},i.prototype.ky=function(h,s){var o=this.il(s);if(o!=-1){var a=this.Rp(o,s);this.hr(a,s,h),this.fr(h,s,a),this.fr(o,s,h),this.hr(h,s,o)}else this.hr(h,s,h),this.fr(h,s,h),this.ln(s,h)},i.prototype.Op=function(h,s){return this.pg(h,0)==s?0:1},i.prototype.Xm=function(h,s){var o,a=this.dz(s);if(a!=-1&&(this.df.vd(a,-1),this.Et(s,-1)),(a=this.il(s))!=-1){var u=o=a;do{var c=!1,l=this.Op(o,s),p=this.RF(o,l);if(this.pg(o,l+1&1)==h){if(this.Xu(o),this.Qd.bh(this.Rh(o)),this.Uu(o),o==p){a=-1;break}a==o&&(a=this.il(s),u=p,c=!0)}o=p}while(o!=u||c);if(a!=-1){do l=this.Op(o,s),p=this.RF(o,l),this.LB(o,l,h),o=p;while(o!=u);(o=this.il(h))!=-1?(u=this.Rp(o,h),c=this.Rp(a,h),u==o?(this.ln(h,a),this.ky(o,h),this.ln(h,o)):c==a&&this.ky(a,h),this.fr(a,h,u),this.hr(u,h,a),this.fr(o,h,c),this.hr(c,h,o)):this.ln(h,a)}}for(a=this.Sr(h),o=this.Sr(s),u=this.lh.rc(o);u!=-1;u=this.lh.lb(u))this.g.Ra(this.lh.ja(u),this.xh,h);this.lh.Hy(a,o),this.HP(s)},i.prototype.UT=function(h,s){var o=this.pg(h,0),a=this.pg(h,1),u=this.pg(s,0),c=this.pg(s,1);this.Qd.Hy(this.Rh(h),this.Rh(s)),s==this.il(o)&&this.ln(o,h),s==this.il(a)&&this.ln(a,h),this.Xu(s),this.Uu(s),o==u&&a==c||a==u&&o==c||(this.Hn(o,this.yo),this.Hn(u,this.Pi),this.yo.qb(this.Pi)?(o!=u&&this.Xm(o,u),a!=c&&this.Xm(a,c)):(a!=u&&this.Xm(a,u),o!=c&&this.Xm(o,c)))},i.prototype.Xu=function(h){var s=this.pg(h,1);this.dF(h,this.pg(h,0)),this.dF(h,s)},i.prototype.dF=function(h,s){var o=this.Rp(h,s),a=this.NR(h,s),u=this.il(s);o!=h?(this.fr(a,s,o),this.hr(o,s,a),u==h&&this.ln(s,o)):this.ln(s,-1)},i.prototype.WD=function(h,s,o){var a=this.Qd.rc(h),u=this.Qd.ja(a);h=this.Le(u);var c=this.Le(this.g.U(u));for(this.g.jr(u,s,o,!0),a=this.Qd.lb(a);a!=-1;a=this.Qd.lb(a)){u=this.Qd.ja(a);var l=this.Le(u)==h;this.g.jr(u,s,o,l)}a=s.Vp(o,0).ac(),s=s.Vp(o,s.ol(o)-1).wc(),this.BK(h,a),this.BK(c,s)},i.prototype.ZE=function(h,s,o){var a=this.Rh(h),u=this.pg(h,0),c=this.pg(h,1),l=this.nt(-1);for(this.nh.add(l),this.Pl(l,-3),this.Ff.add(l),this.hj(l,u),h=1,s=s.ol(o);hthis.ez(l)&&this.cr(l,this.g.Ua(c))),l=this.Ff.get(h),h-=2,this.MD(l,c),c=this.g.U(c);while(0<=h)}this.Ff.clear(!1)},i.prototype.Le=function(h){return this.g.Pa(h,this.xh)},i.prototype.TI=function(h,s,o){var a=this.pg(s,0),u=new e.h;this.Hn(a,u);var c=new e.h,l=this.pg(s,1);this.Hn(l,c);var p=o.ol(h),y=o.Vp(h,0),d=new e.h;if(y.Yp(d),!u.qb(d)){if(!this.Ng){var g=u.compare(this.vh);0>g*(d=d.compare(this.vh))&&(this.Ng=!0)}this.vF(a,this.Ff),this.Ak.add(a)}for(!this.Ng&&1y.compare(this.vh))&&(this.Ng=!0)),h=(y=o.Vp(h,p-1)).wc(),c.qb(h)||(this.Ng||0>(g=c.compare(this.vh))*(d=h.compare(this.vh))&&(this.Ng=!0),this.vF(l,this.Ff),this.Ak.add(l)),this.Ff.add(s),c=0,l=this.Ff.size;cMath.max(100,this.g.fd)){this.nh.clear(!1),this.Ng=!0;break}var h=this.nh.Fc();this.nh.If(),this.Pl(h,-1),this.WS(h)!=-1&&this.wS(h),this.Vn=!1}},i.prototype.wS=function(h){if(this.Vn){var s=this.Mc.zu(this.MH,this.GH,h,!0);this.Vn=!1}else s=this.Mc.KD(h);s==-1?this.UT(this.Mc.ja(this.Mc.FF()),h):(this.Pl(h,s),this.$d.rg&&(this.$d.Kr(),this.oF(this.$d.Dm,s)))},i.prototype.WS=function(h){var s=this.pg(h,0);if(h=this.pg(h,1),this.Hn(s,this.yo),this.Hn(h,this.Pi),e.h.yc(this.yo,this.Pi)<=this.UA)return this.Ng=!0,-1;var o=this.yo.compare(this.vh),a=this.Pi.compare(this.vh);return 0>=o&&0=a&&0h&&(this.re(n),h=this.description.Pf(n)),this.ka==null&&this.un(),this.ka[this.description.$j(h)+t]=i},r.prototype.getType=function(){return 33},r.prototype.Db=function(){return 0},r.prototype.Oa=function(){this.vc(),this.ka!=null&&(this.ka[0]=NaN,this.ka[1]=NaN)},r.prototype.sn=function(n){if(this.ka!=null){for(var t=e.ee.Iw(n,this.description),i=[],h=0,s=0,o=n.Aa;s>>32),n=e.O.Th(h,n)}return n},r.prototype.mg=function(){return null},r}(e.aa);e.Sa=v}(k||(k={})),function(e){var v=function(){function f(r,n,t){r!==void 0&&(this.x=r,this.y=n,this.z=t)}return f.construct=function(r,n,t){var i=new f;return i.x=r,i.y=n,i.z=t,i},f.prototype.K=function(r,n,t){this.x=r,this.y=n,this.z=t},f.prototype.lx=function(){this.z=this.y=this.x=0},f.prototype.normalize=function(){var r=this.length();r==0&&(this.x/=r,this.y/=r,this.z/=r)},f.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},f.prototype.sub=function(r){return new f(this.x-r.x,this.y-r.y,this.z-r.z)},f.prototype.Ag=function(r){new f(this.x*r,this.y*r,this.z*r)},f.prototype.Qh=function(r){return this.x*r.x+this.y*r.y+this.z*r.z},f}();e.Nd=v}(k||(k={})),function(e){var v=function(){function f(r,n,t){this.Gw=this.DA=null,this.Xf=n,this.FT=n.y-t,this.ET=n.y+t,this.Ew=0,this.dA=r,this.qa=t,this.RT=t*t,this.eA=t!=0,this.Lv=!1}return f.prototype.result=function(){return this.Ew!=0?1:0},f.prototype.ZM=function(r){return r=r.hc(r.fe(this.Xf,!1)),e.h.yc(r,this.Xf)<=this.RT},f.prototype.fF=function(r){if(!this.eA&&(this.dA&&this.Xf.qb(r.ac())||this.Xf.qb(r.wc())))this.Lv=!0;else if(r.na==this.Xf.y&&r.na==r.la){if(this.dA&&!this.eA){var n=Math.max(r.sa,r.pa);this.Xf.x>Math.min(r.sa,r.pa)&&this.Xf.xn?t=!0:this.Xf.x>=Math.min(r.sa,r.pa)&&(t=0r.wc().y?1:-1)}}},f.prototype.SI=function(r){var n=r.Tg(0,1);if(n.oa>this.ET||n.vathis.Xf.y||n.va(r=r.I()))&&2*r+Math.log(r)/Math.log(2)*n<1*r*n},f}();e.Dg=v}(k||(k={})),function(e){var v=function(f){function r(n){return f.call(this,!0,n)||this}return J(r,f),r.prototype.Ia=function(){return new r(this.description)},r.prototype.Db=function(){return 2},r.prototype.getType=function(){return 1736},r.prototype.xG=function(n,t,i){this.JS(n,t,i)},r.prototype.qR=function(){this.FR()},r}(e.Vk);e.Da=v}(k||(k={})),function(e){(function(v){v[v.PiPOutside=0]="PiPOutside",v[v.PiPInside=1]="PiPInside",v[v.PiPBoundary=2]="PiPBoundary"})(e.RL||(e.RL={})),e.hd=function(){function v(){}return v.KG=function(f,r,n){return(f=e.Dg.bT(f,r,n))==0?0:f==1?1:2},v.Yd=function(f,r,n){return(f=e.Dg.wm(f,r,n))==0?0:f==1?1:2},v.WX=function(f,r,n,t,i){if(r.lengthr?(0>r?r+=360:360<=r&&(r-=360),r):(0>(r=e.lc.RK(r))&&(r+=360),r)},f.gP=function(r){return 180<(r=f.hP(r))&&(r-=360),r},f.oW=57.29577951308232,f}();e.qr=v,e.Hh=function(){function f(){}return f.lj=function(r,n){var t=new e.l;r.A(t);var i=e.cb.gh(n),h=new e.l;return h.K(i),h.v=t.v,h.C=t.C,h.W(.01*h.ca(),0),n=e.ta.Wd(n,t,!1),h.contains(t)?r:e.Ud.clip(r,h,n,0)},f.ks=function(r,n,t,i,h){if(!e.cb.Wc(n))throw e.i.N();var s=e.ta.kj(n,r,!1),o=e.cb.gh(n),a=e.cb.sc(n),u=a.Hd().ai,c=e.cb.vv(a);a=e.cb.ev(a),c*=2-c;var l=new e.Nc;o.cn(l);var p=[[0,0],[0,0]];if(e.Eg.Sb(n)==2?i?(p[0][0]=f.Zm(h,l),p[0][1]=o.Jp(),e.cb.vt(),o=p[0][0]*u):(p[0][0]=o.gk(),p[0][1]=h,e.cb.vt(),o=p[0][1]*u):o=h*u,!i&&o!=0)throw e.i.N();var y=new e.ga,d=new e.gd;r=d.Ib(r);for(var g=[0],b=new e.h,x=new e.h,m=new e.h,w=new e.h,j=new e.h,M=new e.h,A=d.Ob(r);A!=-1;A=d.Rb(A)){var z=d.Xa(A);d.D(z,m);for(var N=!1,I=z=d.U(z);I!=-1;I=d.U(I)){if(I==z){if(N)break;N=!0}if(d.D(I,w),i&&ss||ss||!i&&s<-m.y&&w.y>s||s<-w.y&&m.y>s)do if(!(Math.abs(m.x-w.x)>=.5*l.R())){if(e.Eg.Sb(n)==2?(p[0][0]=f.Zm(m.x,l),p[0][1]=m.y,p[1][0]=f.Zm(w.x,l),p[1][1]=w.y,e.cb.dW(),j.x=p[0][0]*u,j.y=p[0][1]*u,M.x=p[1][0]*u,M.y=p[1][1]*u):(j.x=m.x*u,j.y=m.y*u,M.x=w.x*u,M.y=w.y*u),M.x=6.283185307179586*(w.x-m.x)/l.R()+j.x,i){if(x.x=o,x.y=f.Nz(a,c,j,M,o,t),isNaN(x.y))break}else{if(x.x=f.Lz(a,c,j,M,t),isNaN(x.x))break;x.y=0}e.kb.wd(a,c,j.x,j.y,M.x,M.y,y,null,null,t);var C=y.u;e.kb.wd(a,c,j.x,j.y,x.x,x.y,y,null,null,t);var T=y.u;e.Eg.Sb(n)==2?(p[0][0]=x.x/u,p[0][1]=x.y/u,e.cb.bR(),i?(b.y=p[0][1],b.x=h):(b.x=f.os(p[0][0],m.x,w.x,l),b.y=h)):i?(b.x=h,b.y=x.y/u):(b.x=f.os(x.x/u,m.x,w.x,l),b.y=h),g[0]=0i.x)var o=i;else o=t,t=i;i=new e.ga(0);var a=new e.ga(0),u=new e.ga(0);e.kb.wd(r,n,o.x,o.y,t.x,t.y,a,i,null,s);var c=a.u,l=0,p=1,y=new e.h;for(y.L(o);c*(p-l)>1e-12*r;){var d=.5*(l+p);if(e.kb.oj(r,n,o.x,o.y,c*d,i.u,a,u,s),y.x=a.u,y.y=u.u,y.x==h)break;if(f.Sn(o.x,y.x,h))p=d;else{if(!f.Sn(t.x,y.x,h))return NaN;l=d}}return y.y},f.Sn=function(r,n,t){return r=v.Cp(r),n=v.mx(r,v.Cp(n)),(t=v.mx(r,v.Cp(t)))==0||0n&&0>t&&t>=n},f.Zm=function(r,n){var t=n.va-n.oa;return n.It(r-Math.floor((r-n.oa)/t)*t)},f.os=function(r,n,t,i){var h=new e.Nc;for(h.K(n,t),t=i.R(),r=Math.floor((r-n)/t)*t+r,h=h.sf();Math.abs(r-h)>Math.abs(r+t-h);)r+=t;return r},f.Lz=function(r,n,t,i,h){if(t.y>i.y)var s=i;else s=t,t=i;if((i=new e.Nc).K(s.y,t.y),!i.contains(0)||3.141592653589793<=Math.abs(s.x-t.x))return NaN;if(s.x==t.x)return s.x;var o=new e.ga(0),a=new e.ga(0),u=new e.ga(0);e.kb.wd(r,n,s.x,s.y,t.x,t.y,a,o,null,h);var c=a.u,l=0,p=1,y=new e.h;for(y.L(s);c*(p-l)>1e-12*r;){var d=.5*(l+p);if(e.kb.oj(r,n,s.x,s.y,c*d,o.u,a,u,h),y.x=a.u,y.y=u.u,i.K(s.y,y.y),y.y==0)break;if(i.contains(0))p=d;else{if(i.K(t.y,y.y),!i.contains(0))return NaN;l=d}}return y.x},f.Hp=function(r,n,t,i,h,s,o){var a=new e.l;if(r.A(a),a.B())return r;var u=new e.Nc;a.cn(u);var c=new e.Nc;if(c.K(n,n+t),c.contains(u)&&c.va!=u.va)return r;var l=new e.l;l.K(a);var p=r.getType();if(p==33)return((a=(l=h?r:r.Of()).Lg())=c.va||o&&a==c.va)&&(a+=Math.ceil((c.oa-a)/t)*t,a=c.It(a),l.cC(a)),l;if(p==550){for(i=(l=h?r:r.Of()).ub(0),p=2*l.I(),r=!1,h=0;h=c.va||o&&a==c.va)&&(r=!0,a+=Math.ceil((c.oa-a)/t)*t,a=c.It(a),i.write(h,a));return r&&l.Pc(1993),l}if(c.contains(u))return r;if(p==197)return t=h?r:r.Of(),a.Ea(l),t.Xo(a),t;var y=.1*Math.max(a.ca(),a.R());for(l.W(0,y),o=r,c=i.Xd(0),r=e.Gh.local(),h=new e.Dd;;){var d=Math.floor((u.oa-n)/t),g=Math.ceil((u.va-n)/t);if(!(3l.v;)(y=e.Ud.clip(o,l,c,0)).A(u),(p==1607?!y.B()&&(u.R()>c||u.ca()>c):!y.B()&&(p!=1736||u.R()>c))&&(y.Oc(h),y.A(u),n.A(s),s.W(c,c),s.isIntersecting(u)&&p==1736?n=r.V(n,y,i,null):n.add(y,!1)),l.move(t,0),h.shift(-t,0);return n},f.WI=function(r,n,t,i){var h=new e.de(t.description);h.Fd(t,0,-1),h=e.cb.zh(h,r,n);var s=t.I();if(i.Oa(),!e.cb.Wc(r)||s!=h.I())return!1;var o=new e.l;t.A(o);var a=new e.l;if(h.A(a),o=o.R(),a=a.R(),o!=0&&a!=0){if(a/=o,r=e.cb.gh(n).R()/e.cb.gh(r).R(),1e-10=t[h]?i[h]=t[h].toUpperCase():t[h];return i.join()}return t.toString(e.Sc.PE_STR_AUTH_TOP)},n.ur=function(t,i,h,s){var o=s.length,a=h.I();if(a!=0){var u=h.ub(0),c=Math.min(a,o),l=0,p=t.eh();isNaN(i)&&(i=0);for(var y=t.Wc(),d=179*(t=y?t.sc().Oe().R():0)/360;0x*e.lc.sign(m)&&Math.abs(b)>d&&(s[g][0]+=-x*t)}u.uC(l<<1,c,s),l+=c,a-=c,c=Math.min(a,o)}h.Pc(1993)}},n.IL=function(t,i,h,s){var o=0,a=t.eh();isNaN(o)&&(o=0);var u=t.Wc(),c=t.bf();t=360*c,c*=179;for(var l=s.length,p=0;pm*e.lc.sign(b)&&Math.abs(x)>c&&(s[y][0]-=m*t)}e.ta.Iy(i,p,s,d),p+=d}}},n.Lx=function(t,i,h){var s=h.length,o=i.I();if(!(1>o)){var a=i.ub(0),u=Math.min(o,s),c=0,l=t.eh(),p=t.Wc(),y=p?t.Oe().R():0,d=179*y/360,g=0;for(p&&(g=t.zi());0x*e.lc.sign(m)&&Math.abs(b)>d&&(h[t][0]+=-x*y)}a.uC(c<<1,u,h),c+=u,o-=u,u=Math.min(o,s)}i.Pc(1993)}},n.HL=function(t,i,h,s){if(h!=0){var o=t.eh(),a=t.Wc(),u=a?t.Oe().R():0,c=179*u/360,l=0;for(a&&(l=t.zi()),t=0;tb*e.lc.sign(i[d].x-l)&&Math.abs(g)>c&&(s[p][0]-=b*u)}e.ta.Iy(i,t,s,y),t+=y}}}},n.tr=function(t,i,h,s){var o=i.I();if(o!=0){var a=i.ub(0),u=t.ef,c=t.Yf,l=u.sc().Qp(),p=c.sc().Qp(),y=u.bf(),d=c.bf();if((t=t.Wf)==null||t.count()==0){for(h=l/p,s=(u.Up()-c.Up())*d,p=-90*y,t=90*y,l=!1,d=1,u=2*o;dw?s[d][1]=w:s[d][1]<-w&&(s[d][1]=-w));for(y=0;yd){if(A){var V=I+(W+11*y&&(A=!1)}A||(S=K+(D-=e.lc.Cn(p,S-B)),++E,$=D!=0,R.x=S)}else G||e.ta.AG(U,H,R,N)&&(G=!0);$&&C.write(2*W,S),B=S,U.L(H),H.L(R)}0t?u=1:0>=c&&0.99*c&&(u=-1)):u=-1),u!=0&&((i=new e.Da(o.description)).tp(l),(i=e.Xl.local().V(i,h,a)).add(o,!1),w=!0,o=i),w&&(o=e.Yl.local().V(o,s,!1,a)),o},n.vQ=function(t,i,h,s,o){var a=h.I(),u=h.Na(0),c=h.Na(a-1);o=(s=n.dv(s,o)).R(),u=e.lc.sign(c.x-u.x);var l=new e.l;h.xc(l);var p=s.gk();if(c=p-o,p+=o,0<=u){var y=Math.ceil((c-l.v)/o);for(y*=o;c>l.v+y;)y+=o;for(;cl.v+y;)y+=o;d=y,720c;)1024<=m&&(m=0),g.move(y,0),b.Gb=y,h.Oc(b),x+=y,s.v<=x&&s.C>=x&&(o=l.I()-1),h.Cb(0,d),d=h.Na(a-1),l.Dr(h,0,0,a-1,!1);return h=new e.Da(l.description),a=0u?a:!a)?(u=e.h.construct(c.x,s.H),h.Ci(u),u=e.h.construct(s.gk(),s.H),h.Ci(u),s=e.h.construct(t.x,s.H)):(u=e.h.construct(c.x,s.G),h.Ci(u),u=e.h.construct(s.gk(),s.G),h.Ci(u),s=e.h.construct(t.x,s.G)),h.Ci(s),h.xG(0,i,0),h.kO(o),h},n.uQ=function(t,i,h,s,o){var a=new e.Da(t.description);a.add(t,!1),a.DB(0,a.I()-1);var u=new e.l;a.xc(u);var c=(h=n.dv(i,h)).R(),l=Math.ceil((h.v-u.v)/c);for(l*=c;h.v>u.v+l;)l+=c;for(;h.vu.C)return o&&(o=a.Ke(),i=(a=e.Yl.local().V(a,i,!0,s)).Ke(),(i=e.lc.sign(o)!=e.lc.sign(i))&&a.oJ()),a;for((t=new e.Da(t.description)).add(a,!1),o=o||u.R()>c-i.Xd(0);u.v=h){c=!0;break}if(2&o&&p.y<=-h){c=!0;break}}if(!c)return!1;a=!1,t&&(a=i.Nn(0)),u=(t=new e.gd).Ib(i),c=t.Ob(u);var y=-1,d=!0,g=new e.h;g.Rc(),l=new e.Sa;for(var b=-1,x=t.Xa(c);x!=-1;x=t.U(x)){p=t.Na(x);var m=1&o&&90<=p.y?1:0;if(m|=2&o&&p.y<=-h?2:0,0c){if(new e.l().K(g.v-u,-c,g.C+u,c),(o=e.ri.Nu(o,i,t,NaN,0,s)).B())return o;o.A(g)}if(x&&(i.Hg.H))return o.Ia();if(g.R()>p&&(o=n.Hp(o,y-l,p,t,!0,0,!0,s)).A(g),(c=n.eO(g.v,g.C,i.v,i.C,p))!=0&&g.move(c,0),g.C>i.C||g.vi.C)for(;g.v>=i.C;)g.move(-p,0),c-=p;for(;g.vc;c++){if(m?u=e.aa.Hc(a)?e.ri.clip(o,i,h,d,s):e.ri.clip(o,i,h,0,s):(u=e.Xj.local().V(o,b,t,s))==b&&(u=e.aa.jg(u)),i.v<=g.v&&i.C>=g.C||i.v>=g.v&&i.C<=g.C)return u;x[c]=u,c==0&&(g.move(-p,0),(u=new e.Dd).gg(-p,0),o.Oc(u))}if(a==550)x[0].Fd(x[1],0,-1);else if(e.aa.Hc(a))x[0].add(x[1],!1);else{if(a!=33)throw e.i.fa("intersect_with_GCS_horizon: unexpected geometry type");x[0].B()&&(x[0]=x[1])}return x[0]}if(i.Hg.H)return o;for(a=0;!o.B()&&g.C>i.v;)a!=0&&((u=new e.Dd).gg(a,0),o.Oc(u)),e.dj.local().V(4,o,b,t,s)||b==(o=e.kp.local().V(o,b,t,s))&&(o=e.aa.jg(o)),a!=0&&((d=new e.Dd).gg(-a,0),o.Oc(d)),a-=p,g.move(-p,0);return o},n.yG=function(t,i,h,s){if(i!=0&&s!=v.DontClip)if(s==v.PannableFold){s=h.HR();for(var o=i,a=0;as.H||t[a].yu||t[a].y<-u)&&(t[a].Rc(),o--);if(o!=0){(o=new e.l).Zw(t,i),u=h.Vr();var l=h.hv();a=u.getType()==197;var p=new e.l;if(u.A(p),!l||!(p.Ho.H))if(l)if(n.av(t,i,p.gk()-c,s),o=i,a)for(a=0;a=p||u&&y==p)&&(y+=Math.ceil((i-y)/h)*h,y=e.O.Rk(y,i,p),s.cC(y)),s}if(t.B()||(y=new e.l,t.A(y),y.B()))return t;var d=new e.Nc;y.cn(d);var g=new e.Nc;if(g.K(i,p),g.contains(d))return t;if((p=new e.l).K(y),l===550){for(c=(s=o?t:t.Of()).ub(0),l=2*s.I(),p=!1,i=0;i=g.va||u&&y==g.va)&&(p=!0,y+=Math.ceil((g.oa-y)/h)*h,y=g.It(y),c.write(i,y));return p&&s.Pc(1993),s}if(l==197)return h=o?t:t.Of(),y.Ea(p),h.Xo(y),h;var b=.1*Math.max(y.ca(),y.R());for(p.W(0,b),u=t,g=s.Xd(0),t=e.Gh.local(),o=new e.Dd;;){var x=Math.floor((d.oa-i)/h),m=Math.ceil((d.va-i)/h);if(!(3p.v;)(b=e.ri.clip(u,p,g,0,c)).A(d),(l==1607?!b.B()&&(d.R()>g||d.ca()>g):!b.B()&&(l!=1736||d.R()>g))&&(b.Oc(o),b.A(d),i.A(a),a.W(g,g),a.isIntersecting(d)&&l==1736?i=t.V(i,b,s,null):i.add(b,!1)),p.move(h,0),o.shift(-h,0);return i},n.av=function(t,i,h,s){for(var o=h+s,a=0;ao||u==o)||(u+=Math.ceil((h-u)/s)*s,u=e.O.Rk(u,h,o),t[a].x=u)}},n.Fn=function(t,i,h,s,o,a){if(!i.Wc())throw e.i.fa("fold_into_360_degree_range");if(t.B())return t;if(i.Sb()==2){h=i.pv();var u=i.ov()-h}else{var c=i.bf();u=360*c,h-=180*c}return n.Hp(t,h,u,i,s,o,!0,a)},n.qF=function(t,i,h,s){if(h.Sb()==2)s=h.pv(),h=h.ov()-s;else{var o=h.bf();h=360*o,s-=180*o}n.av(t,i,s,h)},n.lj=function(t,i){var h=i.Oe();if(t.getType()==33){var s=t.ih();return h.G<=s&&s<=h.H?t:t.Ia()}s=new e.l,t.A(s);var o=new e.l;return o.K(h),o.v=s.v,o.C=s.C,o.W(.01*o.ca(),0),h=e.ta.uy(i,s),o.contains(s)?t:e.ri.clip(t,o,h,0,null)},n.ir=function(t,i,h){return t>i.C&&t-i.Ch.H?t[o].Rc():t[o].x=n.ir(t[o].x,h,s)},n.Jt=function(t,i,h,s){if(!t.B()){var o=t.getType();if(!s||o!=1736)if(e.aa.xj(o)){s=t.ub(0),o=0;for(var a=t.I();os||ss)||!a&&(u!=0||s<-z.y&&N.y>s||s<-N.y&&z.y>s))do if(!(Math.abs(z.x-N.x)>=.5*d.R())){if(h.Sb()==2?(b[0][0]=n.Zm(z.x,d),b[0][1]=z.y,b[1][0]=n.Zm(N.x,d),b[1][1]=N.y,e.ej.projToGeogCenter(g,2,b,0),I.x=b[0][0]*l,I.y=b[0][1]*l,C.y=b[1][1]*l):(I.x=z.x*l,I.y=z.y*l,C.y=N.y*l),C.x=2*(N.x-z.x)*Math.PI/d.R()+I.x,a){if(j.x=c,j.y=n.Nz(p,y,I,C,c,o),isNaN(j.y))break;A[0]=j;var E=1}else if(o==r.GreatElliptic){var G=[0,0];if((E=e.Ox.Oz(y,I,C,c,G))==0)break;j.x=G[0],j.y=c,A[0]=j,E==2&&(M.x=G[1],M.y=c,A[1]=M)}else{if(j.x=n.Lz(p,y,I,C,o),isNaN(j.x))break;j.y=0,A[0]=j,E=1}var H=-1;for(G=0;Gm[0]||(H=t.Ma(B),t.Ul(H,m,1),t.Cb(t.U(H),w.x,w.y),H=m[0])}}while(!1);z.L(N)}}},n.Zm=function(t,i){var h=i.va-i.oa;return i.It(t-Math.floor((t-i.oa)/h)*h)},n.os=function(t,i,h,s){var o=new e.Nc;for(o.K(i,h),h=s.R(),t=Math.floor((t-i)/h)*h+t,o=o.sf();Math.abs(t-o)>Math.abs(t+h-o);)t+=h;return t},n.Sn=function(t,i,h){return t=e.qr.Cp(t),i=e.qr.mx(t,e.qr.Cp(i)),(h=e.qr.mx(t,e.qr.Cp(h)))==0||0i&&0>h&&h>=i},n.Nz=function(t,i,h,s,o,a){if(a==r.GreatElliptic)return e.Ox.SS(i,h,s,o);if(Math.abs(h.x-s.x)>=Math.PI||!n.Sn(h.x,s.x,o))return NaN;if(h.x>s.x)var u=s;else u=h,h=s;s=new e.ga;var c=new e.ga,l=new e.ga;e.kb.wd(t,i,u.x,u.y,h.x,h.y,c,s,null,a);var p=c.u,y=0,d=1,g=new e.h;for(g.L(u);p*(d-y)>1e-12*t;){var b=.5*(y+d);if(e.kb.oj(t,i,u.x,u.y,p*b,s.u,c,l,a),g.x=c.u,g.y=l.u,g.x==o)break;if(n.Sn(u.x,g.x,o))d=b;else{if(!n.Sn(h.x,g.x,o))return NaN;y=b}}return g.y},n.Lz=function(t,i,h,s,o){if(o==r.GreatElliptic)return t=[0,0],e.Ox.Oz(i,h,s,0,t),t[0];if(h.y>s.y)var a=s;else a=h,h=s;if((s=new e.Nc).K(a.y,h.y),!s.contains(0)||Math.abs(a.x-h.x)>=Math.PI)return NaN;if(a.x==h.x)return a.x;var u=new e.ga,c=new e.ga,l=new e.ga;e.kb.wd(t,i,a.x,a.y,h.x,h.y,c,u,null,o);var p=c.u,y=0,d=1,g=new e.h;for(g.L(a);p*(d-y)>1e-12*t;){var b=.5*(y+d);if(e.kb.oj(t,i,a.x,a.y,p*b,u.u,c,l,o),g.x=c.u,g.y=l.u,s.K(a.y,g.y),g.y==0)break;if(s.contains(0))d=b;else{if(s.K(h.y,g.y),!s.contains(0))return NaN;y=b}}return g.x},n.WI=function(t,i,h,s){if(!t.ef.Wc())return!1;var o=new e.de(i.description);if(o.Fd(i,0,-1),s=e.Hx.local().V(o,t,s),o=i.I(),h.Oa(),o!=s.I())return!1;var a=new e.l;i.A(a);var u=new e.l;if(s.A(u),a=a.R(),u=u.R(),a!=0&&u!=0){if(u/=a,t=t.Yf.gh().R()/t.ef.gh().R(),1e-10=180*i&&(t-=360*i),t},n.UI=function(t,i,h,s){if(h==v.Clip){var o=i.ml();o.getType()==197?(h=new e.l,o.A(h),o=e.ta.uy(i,h),t=e.ri.clip(t,h,o,5e4*i.pm(),s)):e.dj.local().V(1,o,t,i,s)||(t=e.Xj.local().V(t,o,i,s))==o&&(t=e.Vk.jg(t))}else i.Wc()&&(s=new e.l,t.xc(s),i.Oe().contains(s)||(n.Jt(t,i.Oe(),i.Xd(0),!0),h==v.PannableFold&&(t=n.lj(t,i)),t=n.Fn(t,i,0,!0,1e5*i.pm(),null)));return t},n.XD=function(t,i,h){var s=i.Wr();if(s==null)return t;var o=(i=i.sc()).Oe().R(),a=new e.l;t.xc(a);var u=new e.Nc;a.cn(u),a=s.Ga(),s=null;for(var c=new e.Dd;a.$a();)for(;a.Ha();){var l=a.ha(),p=l.Tg(0,0),y=new e.Nc;for(y.K(p.oa,p.va),p=0;y.va>u.oa;)y.move(-o),--p;for(;y.oa<=u.va;){if(y.isIntersecting(u)){s==null&&(s=new e.Ta);var d=e.yb.cP(l.ac(),l.wc());p!=0&&(c.gg(p*o,0),d.Oc(c)),s.oc(d,!0)}y.move(o),++p}}return s!=null?(i=e.ta.gO(i,s),i=e.ta.Er(i),e.$t.lP(t,s,i,h)):t},n.eO=function(t,i,h,s,o){return t>=h&&i<=s?0:n.tE(.5*(i+t),h,s,o)},n.tE=function(t,i,h,s){return e.lc.round((.5*(h+i)-t)/s)*s},n.VQ=function(t,i,h,s,o,a,u,c){var l=n.dv(s,o),p=l.R(),y=p/360,d=n.pE*y,g=t.ub(0),b=i.Wc(),x=b?p/i.Oe().R():0;i=t.Ia();for(var m=0,w=h.da();md){if(j){var X=z+$-1,V=z;(!N||$+11*y&&(b=!1)}j||(K=R+(C-=e.lc.Cn(p,K-T)),++D,U=C!=0,W.x=K)}else E||e.ta.AG(G,H,W,B)&&(E=!0);U&&I.write(2*$,K),T=K,G.L(H),H.L(W)}D!=0&&M.Pc(1993),j=M.Na(0),A=M.Na(A-1),e.h.tb(j,A),M=n.wQ(M,s,isNaN(o)?0:o,a),i.add(M,!1)}return t=s.Xd(0),h=l.R()/180,n.Jt(i,l,.1*t,!1),e.ri.clip(i,l,t,h,a)},n.wQ=function(t,i,h,s){return n.Fn(t,i,h,!0,0,s)},n.OS=function(t,i,h,s){var o=t.getType();if(o==1736)for(i=i!=null?i.Xd(0):0,o=0;oh)for(var o=new e.Sa,a=0;ah)for(var o=new e.Sa,a=0;athis.Io},r.prototype.fz=function(){if(this.B())throw e.i.fa("invalid call");return new e.Sa(this.Bs.x,this.Bs.y)},r.prototype.Ua=function(){if(this.B())throw e.i.fa("invalid call");return this.Io},r.prototype.hz=function(){if(this.B())throw e.i.fa("invalid call");return this.Ka},r.prototype.Sz=function(){return!!(1&this.nw)},r.prototype.ey=function(n,t,i,h){this.Bs.x=n,this.Bs.y=t,this.Io=i,this.Ka=h},r}();e.$l=f}(k||(k={})),function(e){var v=function(){function r(){}return r.prototype.Uo=function(n,t){if(this.th.resize(0),this.Ii.length=0,this.tk=-1,n.xc(this.Ek),this.Ek.W(t,t),this.Ek.isIntersecting(this.Fb.Ca)){var i=n.getType();(this.vs=e.aa.yd(i))?(this.TH=n.ac(),this.SH=n.wc(),this.qa=t):this.qa=NaN,this.th.add(this.Fb.kf),this.Ii.push(this.Fb.Ca),this.Qs=this.Fb.Ur(this.Fb.kf)}else this.Qs=-1},r.prototype.Xi=function(n,t){this.th.resize(0),this.Ii.length=0,this.tk=-1,this.Ek.K(n),this.Ek.W(t,t),this.qa=NaN,this.Ek.isIntersecting(this.Fb.Ca)?(this.th.add(this.Fb.kf),this.Ii.push(this.Fb.Ca),this.Qs=this.Fb.Ur(this.Fb.kf),this.vs=!1):this.Qs=-1},r.prototype.next=function(){if(this.th.size==0)return-1;this.tk=this.Qs;var n=null,t=null,i=null,h=null;this.vs&&(n=new e.h,t=new e.h,i=new e.l);for(var s=!1;!s;){for(;this.tk!=-1;){var o=this.Fb.bz(this.Fb.fv(this.tk));if(o.isIntersecting(this.Ek)){if(!this.vs){s=!0;break}if(n.L(this.TH),t.L(this.SH),i.K(o),i.W(this.qa,this.qa),0a;a++){var u=this.Fb.Lp(o,a);if(u!=-1&&0>h);s==0?(t.v=.5*(t.v+t.C),t.G=.5*(t.G+t.H)):s==1?(t.C=.5*(t.v+t.C),t.G=.5*(t.G+t.H)):(s==2?t.C=.5*(t.v+t.C):t.v=.5*(t.v+t.C),t.H=.5*(t.G+t.H))}return t},r.prototype.WR=function(n){return this.Az(n)},r.prototype.vR=function(n,t){return v.bP(this,n,t)},r.prototype.MF=function(n,t){return v.aP(this,n,t)},r.prototype.getIterator=function(){return v.$O(this)},r.prototype.Nk=function(n,t){if(0>t||32<2*t)throw e.i.N("invalid height");this.BT=t,this.Ca.K(n),this.kf=this.jf.Ce(),this.jx(this.kf,0),this.ax(this.kf,0),this.NJ(this.kf,0),this.KJ(this.kf,0)},r.prototype.zv=function(n,t,i,h,s,o,a){if(!h.contains(t))return i==0?-1:this.zv(n,t,0,this.Ca,this.kf,o,a);if(!o)for(var u=s;u!=-1;u=this.IR(u))this.jx(u,this.Az(u)+1);(u=new e.l).K(h),h=s;var c=[];for(c[0]=new e.l,c[1]=new e.l,c[2]=new e.l,c[3]=new e.l;ip;p++)if(c[p].contains(t)){l=!0;var y=this.Lp(h,p);y==-1&&(y=this.rP(h,p)),this.jx(y,this.Az(y)+1),h=y,u.K(c[p]);break}if(!l)break}return this.sS(n,t,i,u,h,o,s,a)},r.prototype.sS=function(n,t,i,h,s,o,a,u){var c=this.NF(s);if(o){if(s==a)return u;this.SP(u),o=u}else o=this.tP(),this.NB(o,n),this.KW(this.fv(o),t);return this.mX(o,s),c!=-1?(this.hx(o,c),this.bx(c,o)):this.GJ(s,o),this.SB(s,o),this.ax(s,this.lv(s)+1),this.hO(s)&&this.MQ(i,h,s),o},r.prototype.SP=function(n){var t=this.WF(n),i=this.NF(t),h=this.OR(n),s=this.nv(n);this.Ur(t)==n?(s!=-1?this.hx(s,-1):this.SB(t,-1),this.GJ(t,s)):i==n?(this.bx(h,-1),this.SB(t,h)):(this.hx(s,h),this.bx(h,s)),this.hx(n,-1),this.bx(n,-1),this.ax(t,this.lv(t)-1)},r.EJ=function(n,t){var i=.5*(n.v+n.C),h=.5*(n.G+n.H);t[0].K(i,h,n.C,n.H),t[1].K(n.v,h,i,n.H),t[2].K(n.v,n.G,i,h),t[3].K(i,n.G,n.C,h)},r.prototype.hO=function(n){return this.lv(n)==8&&!this.gG(n)},r.prototype.MQ=function(n,t,i){var h=this.Ur(i);do{var s=this.fv(h),o=this.Zh.T(h,0);s=this.bz(s),this.zv(o,s,n,t,i,!0,h),h=o=this.nv(h)}while(h!=-1)},r.prototype.iO=function(n){return 8<=this.lv(n)||this.gG(n)},r.prototype.gG=function(n){return this.Lp(n,0)!=-1||this.Lp(n,1)!=-1||this.Lp(n,2)!=-1||this.Lp(n,3)!=-1},r.prototype.rP=function(n,t){var i=this.jf.Ce();return this.OW(n,t,i),this.jx(i,0),this.ax(i,0),this.Pk(i,n),this.KJ(i,this.jv(n)+1),this.NJ(i,t<<2*this.jv(n)|this.QF(n)),i},r.prototype.tP=function(){var n=this.Zh.Ce();if(0>4)]|=this.iH<<2*(15&s)},n}();e.HY=f;var r=function(){function n(t,i,h){this.Vh=null,this.SA=this.Ik=this.cI=this.aI=this.Es=this.qH=this.Gf=this.Um=0,this.Ri=this.Jk=this.vl=null,this.Fz(t,i,h)}return n.create=function(t,i,h){if(!n.zE(t))throw e.i.N();return n.wP(t,i,h)},n.pW=function(t){switch(t){case 0:t=1024;break;case 1:t=16384;break;case 2:t=262144;break;default:throw e.i.fa("Internal Error")}return t},n.zE=function(t){return!(t.B()||t.getType()!=1607&&t.getType()!=1736)},n.prototype.rQ=function(t,i){i=i.Ga();for(var h=new e.h,s=new e.h;i.$a();)for(;i.Ha();){var o=i.ha();if(o.getType()!=322)throw e.i.fa("Internal Error");t.Eh(o.ac(),h),t.Eh(o.wc(),s),this.Ri.jy(h.x,h.y,s.x,s.y)}this.Ri.iJ(e.Px.Cx)},n.prototype.sQ=function(){throw e.i.fa("Internal Error")},n.prototype.Ry=function(t,i){for(var h=1;4>h;h++)t.jy(i[h-1].x,i[h-1].y,i[h].x,i[h].y);t.jy(i[3].x,i[3].y,i[0].x,i[0].y),this.Ri.iJ(e.Px.Cx)},n.prototype.rK=function(t,i,h){for(var s=[null,null,null,null],o=0;o(b=o.length());b==0?o.ma(1,0):(x||y.L(l),o.scale(h/b),a.ma(-o.y,o.x),u.ma(o.y,-o.x),c.sub(o),l.add(o),s[0].add(c,a),s[1].add(c,u),s[2].add(l,u),s[3].add(l,a),x?d=!0:this.Ry(t,s))}else d&&(this.Ry(t,s),d=!1),g=!0}d&&this.Ry(t,s)}},n.prototype.sC=function(t){return e.O.truncate(t*this.qH+this.aI)},n.prototype.tC=function(t){return e.O.truncate(t*this.Es+this.cI)},n.wP=function(t,i,h){return new n(t,i,h)},n.prototype.Fz=function(t,i,h){this.Gf=Math.max(e.O.truncate(2*Math.sqrt(h)+.5),64),this.Um=e.O.truncate((2*this.Gf+31)/32),this.vl=new e.l,this.Ik=i,h=0;for(var s=this.Gf,o=this.Um;8<=s;)h+=s*o,s=e.O.truncate(s/2),o=e.O.truncate((2*s+31)/32);this.Vh=e.O.lg(h,0),this.Ri=new e.Px,h=new f(this.Vh,this.Um,this),this.Ri.AX(this.Gf,this.Gf,h),t.A(this.vl),this.vl.W(i,i),s=new e.l;var a=i*(o=e.l.construct(1,1,this.Gf-2,this.Gf-2)).R();switch(i*=o.ca(),s.K(this.vl.sf(),Math.max(a,this.vl.R()),Math.max(i,this.vl.ca())),this.SA=this.Ik,this.Jk=new e.Dd,this.Jk.pS(s,o),new e.Dd,t.getType()){case 550:h.setColor(this.Ri,2),this.sQ();break;case 1607:h.setColor(this.Ri,2),this.rK(this.Ri,t,this.SA);break;case 1736:h.setColor(this.Ri,1),this.rQ(this.Jk,t),h.setColor(this.Ri,2),this.rK(this.Ri,t,this.SA)}this.qH=this.Jk.bb,this.Es=this.Jk.ab,this.aI=this.Jk.Gb,this.cI=this.Jk.Lb,this.XN()},n.prototype.XN=function(){this.Ri.flush();for(var t=0,i=this.Gf*this.Um,h=this.Gf,s=e.O.truncate(this.Gf/2),o=this.Um,a=e.O.truncate((2*s+31)/32);8>4;p=2*(15&p);var g=y>>4;y=2*(15&y);var b=this.Vh[t+o*u+d]>>p&3;b|=this.Vh[t+o*u+g]>>y&3,b|=this.Vh[t+o*c+d]>>p&3,b|=this.Vh[t+o*c+g]>>y&3,this.Vh[i+a*h+(l>>4)]|=b<<2*(15&l)}h=s,o=a,t=i,s=e.O.truncate(h/2),a=e.O.truncate((2*s+31)/32),i=t+o*h}},n.prototype.So=function(t,i){return this.vl.contains(t,i)?(t=this.sC(t),i=this.tC(i),0>t||t>=this.Gf||0>i||i>=this.Gf||(i=this.Vh[this.Um*i+(t>>4)]>>2*(15&t)&3)==0?0:i==1?1:2):0},n.prototype.Ro=function(t){if(!t.Ea(this.vl))return 0;var i=this.sC(t.v),h=this.sC(t.C),s=this.tC(t.G);if(t=this.tC(t.H),0>i&&(i=0),0>s&&(s=0),h>=this.Gf&&(h=this.Gf-1),t>=this.Gf&&(t=this.Gf-1),i>h||s>t)return 0;for(var o=Math.max(h-i,1)*Math.max(t-s,1),a=0,u=this.Um,c=this.Gf,l=0;;){if(32>o||16>c){for(o=s;o<=t;o++)for(var p=i;p<=h;p++)if(1<(l=this.Vh[a+u*o+(p>>4)]>>2*(15&p)&3))return 2;if(l==0)return 0;if(l==1)return 1}a+=u*c,c=e.O.truncate(c/2),u=e.O.truncate((2*c+31)/32),i=e.O.truncate(i/2),s=e.O.truncate(s/2),h=e.O.truncate(h/2),t=e.O.truncate(t/2),o=Math.max(h-i,1)*Math.max(t-s,1)}},n.prototype.RR=function(){return this.Gf*this.Um},n}();e.Nx=r}(k||(k={})),function(e){var v;(v=e.VL||(e.VL={}))[v.contains=1]="contains",v[v.within=2]="within",v[v.equals=3]="equals",v[v.disjoint=4]="disjoint",v[v.touches=8]="touches",v[v.crosses=16]="crosses",v[v.overlaps=32]="overlaps",v[v.unknown=0]="unknown",v[v.intersects=1073741824]="intersects";var f=function(){function n(){}return n.construct=function(t,i,h,s,o,a,u,c){var l=new n;return l.pw=t,l.Mm=i,l.Kj=h,l.Si=s,l.BH=o,l.SY=a,l.TY=u,l.UY=c,l},n}();e.Vt=function(){function n(){}return n.CD=function(t,i,h){if(n.wy(t)){var s=e.ta.kj(i,t,!1);i=!1,e.Uk.CE(t)&&(i=i||t.lu(s,h)),(s=t.getType())!=1736&&s!=1607||!e.Uk.AE(t)||h==0||(i=i||t.fj(h)),s!=1736&&s!=1607||!e.Uk.BE(t)||h==0||i||t.hM()}},n.wy=function(t){return e.Uk.CE(t)||e.Uk.AE(t)||e.Uk.BE(t)},n}();var r=function(){function n(){this.rh=[]}return n.zB=function(t,i,h,s,o){var a=t.getType(),u=i.getType();if(a==197){if(u==197)return n.tW(t,i,h,s);if(u==33)return s==2?s=1:s==1&&(s=2),n.hJ(i,t,h,s)}else if(a==33){if(u==197)return n.hJ(t,i,h,s);if(u==33)return n.vW(t,i,h,s)}if(t.B()||i.B())return s==4;var c=new e.l;t.A(c);var l=new e.l;i.A(l);var p=new e.l;if(p.K(c),p.Zb(l),h=e.ta.Wd(h,p,!1),n.dk(c,l,h))return s==4;switch(c=!1,e.Vk.yd(a)&&((a=new e.Ta(t.description)).oc(t,!0),t=a,a=1607),e.Vk.yd(u)&&((u=new e.Ta(i.description)).oc(i,!0),i=u,u=1607),a!=197&&u!=197?(t.Db()4*Math.max(t.I(),i.I())*h)&&n.Wz(t,i,h,!0)))},n.kV=function(t,i,h){var s=n.qc(t,i,!0);return s==4||s!=1&&s!=2&&s!=1073741824&&n.EI(t,i,h)},n.vV=function(t,i,h){var s=n.qc(t,i,!1);return s!=4&&s!=1&&s!=2&&n.II(t,i,h,null)},n.qV=function(t,i,h,s){var o=n.qc(t,i,!1);return o!=4&&o!=1&&o!=2&&n.FI(t,i,h,s)},n.Sw=function(t,i,h,s){var o=new e.l,a=new e.l;return t.A(o),i.A(a),!!n.zc(o,a,h)&&(o=n.qc(t,i,!1))!=4&&o!=2&&(o==1||n.BI(t,i,h,s))},n.lV=function(t,i,h){var s=n.qc(t,i,!0);return s==4||s!=1&&s!=1073741824&&n.EI(t,i,h)},n.wV=function(t,i,h,s){var o=n.qc(t,i,!1);return o!=4&&o!=1&&n.JI(t,i,h,s)},n.gV=function(t,i,h){var s=n.qc(t,i,!1);return s!=4&&s!=1&&n.DI(t,i,h,null)},n.fB=function(t,i,h,s){var o=new e.l,a=new e.l;return t.A(o),i.A(a),!!n.zc(o,a,h)&&(o=n.qc(t,i,!1))!=4&&(o==1||n.CI(t,i,h,s))},n.jV=function(t,i,h){return e.hd.KG(t,i,h)==0},n.uV=function(t,i,h){return i=i.D(),n.HI(t,i,h)},n.dV=function(t,i,h){return i=i.D(),n.AI(t,i,h)},n.iV=function(t,i,h){var s=n.qc(t,i,!1);if(s==4)return!0;if(s==1)return!1;s=new e.l,t.A(s),s.W(h,h);for(var o=new e.h,a=0;ah&&a.R()>h||a.ca()<=h&&a.R()<=h)&&(o=new e.Ta,a=new e.Sa,i.Hf(0,a),o.nf(a),i.Hf(2,a),o.lineTo(a),n.DI(t,o,h,s))},n.IV=function(t,i,h){var s=new e.l,o=new e.l;return t.A(s),i.A(o),!(!n.ek(s,o,h)||n.qc(t,i,!1)==4)&&(!!n.dI(t,i,h)||n.Wz(t,i,h,!1))},n.GV=function(t,i,h){return this.qc(t,i,!1)==4||!!new e.Zl(t,i,h,!0).next()&&!this.UG(t,i,h)},n.NI=function(t,i,h){if(n.qc(t,i,!1)==4)return!1;var s=new e.be(0);if(n.Xz(t,i,h,s)!=0)return!1;for(var o=new e.de,a=0;ah&&o.R()>h)&&n.ek(s,o,h)},n.DV=function(t,i,h){var s=new e.l,o=new e.l;return t.A(s),i.A(o),!n.zc(o,s,h)&&!n.TG(t,o,h)},n.OV=function(t,i,h){var s=new e.l,o=new e.l;if(t.A(s),i.A(o),o.ca()<=h&&o.R()<=h)return o=i.Ip(),n.Zz(t,o,h);if(o.ca()<=h||o.R()<=h)return o=new e.Ta,s=new e.Sa,i.Hf(0,s),o.nf(s),i.Hf(2,s),o.lineTo(s),n.NI(t,o,h);t=t.Ga(),i=new e.l,s=new e.l,i.K(o),s.K(o),i.W(-h,-h),s.W(h,h),o=!1;for(var a=new e.l,u=new e.l;t.$a();)for(;t.Ha();){if(t.ha().A(a),u.K(i),u.Ea(a),!u.B()&&(u.ca()>h||u.R()>h))return!1;u.K(s),u.Ea(a),u.B()||(o=!0)}return o},n.LV=function(t,i,h){var s=new e.l,o=new e.l;return t.A(s),i.A(o),!(n.zc(s,o,h)||n.zc(o,s,h)||n.zc(o,s,h)||o.ca()>h&&o.R()>h||o.ca()<=h&&o.R()<=h)&&(s=new e.Ta,o=new e.Sa,i.Hf(0,o),s.nf(o),i.Hf(2,o),s.lineTo(o),n.WG(t,s,h))},n.RV=function(t,i,h){var s=new e.l,o=new e.l;if(t.A(s),i.A(o),!n.zc(o,s,h)||o.ca()<=h&&o.R()<=h)return!1;if(o.ca()<=h||o.R()<=h)return n.zc(o,s,h);t=t.Ga(),(i=new e.l).K(o),i.W(-h,-h),o=!1,s=new e.l;for(var a=new e.l;t.$a();)for(;t.Ha();)t.ha().A(s),i.hm(s)?o=!0:(a.K(i),a.Ea(s),!a.B()&&(a.ca()>h||a.R()>h)&&(o=!0));return o},n.yV=function(t,i,h){var s=new e.l,o=new e.l;return i.A(o),t.A(s),!(!n.zc(s,o,h)||o.ca()>h&&o.R()>h)&&(o.ca()<=h&&o.R()<=h?(i=i.Ip(),n.SG(t,i,h)):(s=new e.Ta,o=new e.Sa,i.Hf(0,o),s.nf(o),i.Hf(2,o),s.lineTo(o),n.ym(s,t,h,!1)))},n.BV=function(t,i,h){var s=new e.l,o=new e.l;if(t.A(s),i.A(o),n.zc(o,s,h)||o.ca()<=h&&o.R()<=h)return!1;if(o.ca()<=h||o.R()<=h)return s=new e.Ta,o=new e.Sa,i.Hf(0,o),s.nf(o),i.Hf(2,o),s.lineTo(o),n.LI(t,s,h);t=t.Ga(),i=new e.l,(s=new e.l).K(o),i.K(o),s.W(-h,-h),i.W(h,h);for(var a=o=!1,u=new e.l,c=new e.l;t.$a();)for(;t.Ha();)if(t.ha().A(u),a||i.contains(u)||(a=!0),o||(c.K(s),c.Ea(u),!c.B()&&(c.ca()>h||c.R()>h)&&(o=!0)),o&&a)return!0;return!1},n.iU=function(t,i,h){var s=new e.l,o=new e.l;return t.A(s),i.A(o),!!n.ek(s,o,h)&&(!!n.jU(t,i,h)||n.YA(t,i,h,!1,!0,!1))},n.gU=function(t,i,h){return!n.gI(t,i,h)},n.oU=function(t,i,h){return n.YA(t,i,h,!1,!1,!0)},n.eI=function(t,i,h){var s=new e.l,o=new e.l;return t.A(s),i.A(o),!!n.zc(s,o,h)&&n.YA(i,t,h,!0,!1,!1)},n.Mw=function(t,i,h){h*=h;for(var s=new e.h,o=new e.h,a=0;ah||o.R()>h)&&n.ek(s,o,h)},n.fU=function(t,i,h){var s=new e.l,o=new e.l;if(t.A(s),i.A(o),n.zc(o,s,h))return!1;for((i=new e.l).K(o),i.W(h,h),h=new e.h,o=0;oh?a.W(0,-h):a.W(-h,0);for(var c=0;ch){if(i.y>a.G&&i.ya.v&&i.xh?s.W(0,-h):s.W(-h,0),a.W(h,h);for(var u=new e.h,c=0;ch?u.y>s.G&&u.ys.v&&u.xh||o.R()>h)&&(i=i.Ip(),!n.kt(t,i,h))},n.eU=function(t,i,h){var s=new e.l,o=new e.l;if(t.A(s),i.A(o),n.zc(o,s,h)||o.ca()<=h&&o.R()<=h)return!1;if(o.ca()<=h||o.R()<=h){i=new e.l,s=new e.l,i.K(o),o.ca()>h?i.W(0,-h):i.W(-h,0),s.K(o),s.W(h,h);for(var a=new e.h,u=!1,c=!1,l=0;lh?a.y>i.G&&a.yi.v&&a.xh*h},n.uI=function(t,i,h){return n.wI(t,i,h)},n.vI=function(t,i,h){var s=new e.l;return s.K(t),n.ek(s,i,h)},n.Rw=function(t,i,h){var s=new e.l;return s.K(i),s.W(h,h),!s.contains(t)},n.dB=function(t,i,h){if(i.ca()<=h&&i.R()<=h)return!1;var s=new e.l,o=new e.l;if(s.K(i),s.W(h,h),!s.contains(t))return!1;if(i.ca()<=h||i.R()<=h){if(o.K(i),i.ca()>h?o.W(0,-h):o.W(-h,0),i.ca()>h){if(t.y>o.G&&t.yo.v&&t.xh?s.W(0,-h):s.W(-h,0);var o=!1;return i.ca()>h?t.y>s.G&&t.ys.v&&t.xh&&t.R()>h&&(i.ca()<=h||i.R()<=h)?s=i:(s=t,t=i),s.ca()<=h||s.R()<=h){if(t.ca()<=h||t.R()<=h){i=new e.yb;var o=new e.yb,a=[0,0],u=[0,0],c=new e.h;return s.dn(c),i.Dc(c),s.en(c),i.Qc(c),t.dn(c),o.Dc(c),t.en(c),o.Qc(c),i.Ea(o,null,a,u,h),i.Ea(o,null,null,null,h)==1&&(a[0]==0||a[1]==1||u[0]==0||u[1]==1)}return i=new e.l,o=new e.l,i.K(t),i.W(-h,-h),o.K(i),o.Ea(s),!(!o.B()&&(o.ca()>h||o.R()>h))}return t.W(h,h),(o=new e.l).K(s),o.Ea(t),!(o.B()||!o.B()&&o.ca()>h&&o.R()>h)},n.bQ=function(t,i,h){if(n.zc(t,i,h)||n.zc(i,t,h)||t.ca()<=h&&t.R()<=h||i.ca()<=h&&i.R()<=h)return!1;if(t.ca()<=h||t.R()<=h){if(i.ca()>h&&i.R()>h)return!1;var s=new e.yb,o=new e.yb,a=[0,0],u=[0,0],c=new e.h;return t.dn(c),s.Dc(c),t.en(c),s.Qc(c),i.dn(c),o.Dc(c),i.en(c),o.Qc(c),s.Ea(o,null,a,u,h),s.Ea(o,null,null,null,h)==2&&(0a[1])&&(0u[1])}return!(i.ca()<=h||i.R()<=h)&&((s=new e.l).K(t),s.Ea(i),!(s.B()||s.ca()<=h||s.R()<=h))},n.jF=function(t,i,h){if(!n.zc(t,i,h))return!1;if(t.ca()<=h&&t.R()<=h)return t=t.sf(),n.eB(t,i,h);if(i.ca()<=h&&i.R()<=h)return i=i.sf(),n.eB(i,t,h);if(t.ca()<=h||t.R()<=h)return n.zc(t,i,h);if(i.ca()<=h||i.R()<=h){var s=new e.l;return s.K(t),s.W(-h,-h),s.hm(i)?!0:((t=new e.l).K(s),t.Ea(i),!(t.B()||t.ca()<=h&&t.R()<=h))}return n.zc(t,i,h)},n.aQ=function(t,i,h){if(n.zc(t,i,h)||n.zc(i,t,h)||t.ca()<=h&&t.R()<=h||i.ca()<=h&&i.R()<=h||i.ca()>h&&i.R()>h&&t.ca()>h&&t.R()>h)return!1;if(t.ca()>h&&t.R()>h)var s=i;else s=t,t=i;if(t.ca()>h&&t.R()>h){i=new e.l;var o=new e.l;return o.K(t),o.W(-h,-h),i.K(o),i.Ea(s),!(i.B()||i.ca()<=h&&i.R()<=h)}i=new e.yb,o=new e.yb;var a=[0,0],u=[0,0],c=new e.h;return s.dn(c),i.Dc(c),s.en(c),i.Qc(c),t.dn(c),o.Dc(c),t.en(c),o.Qc(c),i.Ea(o,null,a,u,h),i.Ea(o,null,null,null,h)==1&&0a[1]&&0u[1]},n.EI=function(t,i,h){var s=new e.l,o=new e.l,a=new e.Zl(t,i,h,!0);if(!a.next())return!0;if(this.UG(t,i,h))return!1;var u=t,c=null;i.getType()==1736&&(c=i);var l=!1,p=!1;do{var y=a.nl(),d=a.hl();if(d=i.Na(i.Ba(d)),s.K(a.uz()),s.W(h,h),s.contains(d)&&(d=e.hd.Yd(u,d,0))!=0||i.getType()==1736&&(y=t.Na(t.Ba(y)),o.K(a.az()),o.W(h,h),o.contains(y)&&(d=e.hd.Yd(c,y,0))!=0))return!1;l||(!e.Dg.Ml(t,i.da()-1)||t.Bb!=null&&t.Bb.Fb!=null?u=t:(u=new e.Da,t.copyTo(u),u.fj(1)),l=!0),i.getType()!=1736||p||(p=i,!e.Dg.Ml(p,t.da()-1)||i.Bb!=null&&i.Bb.Fb!=null?c=i:(c=new e.Da,p.copyTo(c),c.fj(1)),p=!0)}while(a.next());return!0},n.zc=function(t,i,h){var s=new e.l;return s.K(t),s.W(h,h),s.contains(i)},n.ls=function(t,i,h){var s=new e.l;return s.K(i),s.W(h,h),i=new e.h,t.dn(i),!s.contains(i)||(t.$I(i),!s.contains(i)||(t.cJ(i),!s.contains(i)||(t.en(i),!s.contains(i))))},n.dI=function(t,i,h){if(t.da()!=i.da()||t.I()!=i.I())return!1;var s=new e.h,o=new e.h,a=!0;h*=h;for(var u=0;uh){a=!1;break}if(!a)break}return!!a},n.jU=function(t,i,h){if(t.I()!=i.I())return!1;var s=new e.h,o=new e.h,a=!0;h*=h;for(var u=0;uh){a=!1;break}return!!a},n.YA=function(t,i,h,s,o,a){var u=!1;if(t.I()>i.I()){s&&(s=!1,u=!0);var c=i}else c=t,t=i;if(i=null,o||a||u){i=new e.pn(t.I());for(var l=0;li.I())var s=i;else s=t,t=i;i=new e.l;var o=new e.l,a=new e.l;s.A(i),t.A(o),i.W(h,h),o.W(h,h),a.K(i),a.Ea(o),o=new e.h;for(var u=new e.h,c=h*h,l=e.ta.oE(t,a),p=l.getIterator(),y=0;yh)return!1;if(w*(1-(M=a.Si))<=h||M==1)break}if(w*(1-M)>h)return!1;p=0,y.resize(0),d.rh.length=0}}return u},n.WG=function(t,i,h){if(1>n.Xz(t,i,h,null))return!1;var s=new e.l,o=new e.l;t.A(s),i.A(o);var a=n.ls(s,o,h);return s=n.ls(o,s,h),!(!a||!s)||(a&&!s?!n.ym(i,t,h,!1):s&&!a?!n.ym(t,i,h,!1):!n.ym(t,i,h,!1)&&!n.ym(i,t,h,!1))},n.Xz=function(t,i,h,s){function o(H,U){return g.QE(H,U)}if(t.yz()>i.yz())var a=i,u=t;else a=t,u=i;t=a.Ga(),i=u.Ga();var c=[0,0],l=[0,0],p=-1,y=0,d=new e.ia(0),g=new n,b=new e.l,x=new e.l,m=new e.l;a.A(b),u.A(x),b.W(h,h),x.W(h,h),m.K(b),m.Ea(x),a=null,s!=null&&(a=new e.h);var w=x=x=null,j=u.Bb;for(j!=null?(x=j.Fb,w=j.zo,x==null&&(x=e.ta.jj(u,m))):x=e.ta.jj(u,m),u=x.getIterator(),j=null,w!=null&&(j=w.getIterator());t.$a();)for(w=0;t.Ha();){var M=t.ha();if(M.A(b),b.isIntersecting(m)){if(j!=null&&(j.Xi(b,h),j.next()==-1))continue;var A=M.Qb();u.Uo(M,h);for(var z=u.next();z!=-1;z=u.next()){var N=x.ja(z);i.Vb(N);var I=i.ha(),C=I.Qb(),T=M.Ea(I,null,c,l,h);if(0h)return 1;var E=A*(D-z);if(i.Ha()){if(I=i.ha(),(T=M.Ea(I,null,c,null,h))==2){T=c[0];var G=c[1];if(E+(T=A*(G-T))>h)return 1}i.Vb(N),i.ha()}if(!i.vm()){if(i.li(),I=i.li(),(T=M.Ea(I,null,c,null,h))==2&&(T=c[0],E+(T=A*((G=c[1])-T))>h))return 1;i.Vb(N),i.ha()}if(t.Ha()){if(N=t.wb(),(T=(M=t.ha()).Ea(I,null,c,null,h))==2&&(T=c[0],E+(T=A*((G=c[1])-T))>h))return 1;t.Vb(N),t.ha()}if(!t.vm()){if(N=t.wb(),t.li(),(T=(M=t.li()).Ea(I,null,c,null,h))==2&&(T=c[0],E+(T=C*((G=c[1])-T))>h))return 1;t.Vb(N),t.ha()}I=f.construct(t.wb(),t.gb,z,D,i.wb(),i.gb,p,B),g.rh.push(I),d.add(d.size)}p=0,s!=null&&(M.hc(z,a),s.add(a.x),s.add(a.y))}}if(yh)w=A*(I.Si-I.Kj),M=I.Si,z=I.Mm;else{if(I.Mm!=z?(w=A*(I.Si-I.Kj),z=I.Mm):w+=A*(I.Si-I.Kj),w>h)return 1;if((M=I.Si)==1)break}A*(1-M)>h&&(w=0),y=0,d.resize(0),g.rh.length=0}}}return p},n.UG=function(t,i,h){var s=t.Ga(),o=i.Ga();for(t=new e.Zl(t,i,h,!1);t.next();){i=t.nl();var a=t.hl();if(s.Vb(i),o.Vb(a),i=s.ha(),0h)return!1;y=!0}else if(g!=0){if(y=c[0],d=l[0],0y&&0d)return!1;y=!0}}return!!y&&(a=new e.l,u=new e.l,o=new e.l,t.A(a),i.A(u),a.W(1e3*h,1e3*h),u.W(1e3*h,1e3*h),o.K(a),o.Ea(u),!(10h&&(l=!0,p&&y))return!0}else if(w!=0&&(w=b[0],j=x[0],0w&&0j))return!0}if(o=new e.l,d=new e.l,o.K(a),o.W(1e3*h,1e3*h),d.K(u),d.W(1e3*h,1e3*h),c.K(o),c.Ea(d),a="",a=l?a+"**":a+"T*",p){if(10y&&0d)))return s[0]=!0,!1}if(!p){for(s[0]=!0,u=new e.l,t.A(u),u.W(h,h),l=t,p=!1,c=new e.l,s=0,o=i.da();sp&&0y)return!1;p=!0}}return!!p&&(a=new e.l,u=new e.l,o=new e.l,t.A(a),i.A(u),a.W(1e3*h,1e3*h),u.W(1e3*h,1e3*h),o.K(a),o.Ea(u),!(10p&&0y)return!0;p=!0}}return!!p&&(a=new e.l,u=new e.l,c=new e.l,l=new e.l,o=new e.l,t.A(a),i.A(u),n.ls(u,a,h)?(c.K(a),c.W(1e3*h,1e3*h),l.K(u),l.W(1e3*h,1e3*h),o.K(c),o.Ea(l),!(10a;a++){var u=s.charAt(a);if(u!="*"&&u!="T"&&u!="F"&&u!="0"&&u!="1"&&u!="2")throw e.i.fa("relation string")}if((a=this.MR(s,t.Db(),i.Db()))!=0)return e.ud.zB(t,i,h,a,o);a=new e.l,t.A(a),u=new e.l,i.A(u);var c=new e.l;if(c.K(a),c.Zb(u),h=e.ta.Wd(h,c,!1),t=this.WE(t,h),i=this.WE(i,h),t.B()||i.B())return this.uW(t,i,s);switch(a=t.getType(),u=i.getType(),c=!1,a){case 1736:switch(u){case 1736:c=this.rt(t,i,h,s,o);break;case 1607:c=this.$m(t,i,h,s,o);break;case 33:c=this.qt(t,i,h,s);break;case 550:c=this.pt(t,i,h,s,o)}break;case 1607:switch(u){case 1736:c=this.$m(i,t,h,this.Zp(s),o);break;case 1607:c=this.gB(t,i,h,s,o);break;case 33:c=this.tt(t,i,h,s,o);break;case 550:c=this.st(t,i,h,s,o)}break;case 33:switch(u){case 1736:c=this.qt(i,t,h,this.Zp(s));break;case 1607:c=this.tt(i,t,h,this.Zp(s),o);break;case 33:c=this.$U(t,i,h,s);break;case 550:c=this.lt(i,t,h,this.Zp(s))}break;case 550:switch(u){case 1736:c=this.pt(i,t,h,this.Zp(s),o);break;case 1607:c=this.st(i,t,h,this.Zp(s),o);break;case 550:c=this.ZA(t,i,h,s,o);break;case 33:c=this.lt(t,i,h,s)}break;default:c=!1}return c},n.rt=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.xJ();var u=new e.l,c=new e.l;return t.A(u),i.A(c),s=!1,e.ud.dk(u,c,h)&&(a.Cu(t,i),s=!0),s||((u=e.ud.qc(t,i,!1))==4?(a.Cu(t,i),s=!0):u==1?(a.ly(i),s=!0):u==2&&(a.ZD(t),s=!0)),s||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.Bp(t,i),a.j.Ug()),n.fg(a.J,a.Xc)},n.Sw=function(t,i,h,s){var o=new n;o.Yi(),o.bj("T*****F**"),o.xJ();var a=new e.l,u=new e.l;t.A(a),i.A(u);var c=!1;return e.ud.dk(a,u,h)&&(o.Cu(t,i),c=!0),c||((a=e.ud.qc(t,i,!1))==4?(o.Cu(t,i),c=!0):a==1?(o.ly(i),c=!0):a==2&&(o.ZD(t),c=!0)),c?this.fg(o.J,o.Xc):(t=(c=new e.gd).Ib(t),a=c.Ib(i),e.Tk.V(c,h,s,!1),h=c.Ne(a).mg(),c.Gp(0,!0,!0),e.rn.V(c,t,-1,!1,s),c.I(t)!=0&&(e.rn.V(c,a,-1,!1,s),o.er(c,s),(i=c.I(a)==0)||(o.Bp(t,a),o.j.Ug(),a=this.fg(o.J,o.Xc))?(t=c.Ne(t),t=(c=new e.gd).Ib(t),a=c.Ib(h),o.er(c,s),o.le=0,o.Yi(),o.bj(i?"T*****F**":"******F**"),o.IB(),o.Bp(t,a),o.j.Ug(),this.fg(o.J,o.Xc)):a))},n.$m=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.IB();var u=new e.l,c=new e.l;return t.A(u),i.A(c),s=!1,e.ud.dk(u,c,h)&&(a.Du(t,i),s=!0),s||((u=e.ud.qc(t,i,!1))==4?(a.Du(t,i),s=!0):u==1&&(a.$D(i),s=!0)),s||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.kh=a.j.Dp(),n.Jw(i,a.j,a.kh),a.Bp(t,i),a.j.Ep(a.kh),a.j.Ug()),n.fg(a.J,a.Xc)},n.fB=function(t,i,h,s){var o=new n;o.Yi(),o.bj("T*****F**"),o.IB();var a=new e.l,u=new e.l;t.A(a),i.A(u);var c=!1;return e.ud.dk(a,u,h)&&(o.Du(t,i),c=!0),c||((a=e.ud.qc(t,i,!1))==4?(o.Du(t,i),c=!0):a==1&&(o.$D(i),c=!0)),c?this.fg(o.J,o.Xc):(t=(c=new e.gd).Ib(t),i=c.Ib(i),o.Wo(c,h,s),c.I(t)!=0&&(o.Bp(t,i),o.j.Ug(),this.fg(o.J,o.Xc)))},n.pt=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.yJ();var u=new e.l,c=new e.l;return t.A(u),i.A(c),s=!1,e.ud.dk(u,c,h)&&(a.Eu(t),s=!0),s||((u=e.ud.qc(t,i,!1))==4?(a.Eu(t),s=!0):u==1&&(a.zN(),s=!0)),s||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.Gy(t,i),a.j.Ug()),n.fg(a.J,a.Xc)},n.gB=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.eX(),s=new e.l;var u=new e.l;t.A(s),i.A(u);var c=!1;return e.ud.dk(s,u,h)&&(a.PG(t,i),c=!0),c||e.ud.qc(t,i,!1)!=4||(a.PG(t,i),c=!0),c||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.Yh=a.j.Dp(),a.kh=a.j.Dp(),n.Jw(t,a.j,a.Yh),n.Jw(i,a.j,a.kh),a.Bp(t,i),a.j.Ep(a.Yh),a.j.Ep(a.kh),a.j.Ug()),n.fg(a.J,a.Xc)},n.st=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.MJ(),s=new e.l;var u=new e.l;t.A(s),i.A(u);var c=!1;return e.ud.dk(s,u,h)&&(a.Vz(t),c=!0),c||e.ud.qc(t,i,!1)!=4||(a.Vz(t),c=!0),c||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.Yh=a.j.Dp(),n.Jw(t,a.j,a.Yh),a.Gy(t,i),a.j.Ep(a.Yh),a.j.Ug()),n.fg(a.J,a.Xc)},n.ZA=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.RJ(),s=new e.l;var u=new e.l;t.A(s),i.A(u);var c=!1;return e.ud.dk(s,u,h)&&(a.yI(),c=!0),c||(t=(s=new e.gd).Ib(t),i=s.Ib(i),a.Wo(s,h,o),a.Gy(t,i),a.j.Ug()),n.fg(a.J,a.Xc)},n.qt=function(t,i,h,s){var o=new n;o.Yi(),o.bj(s),o.yJ();var a=new e.l;t.A(a),i=i.D();var u=!1;return e.ud.Rw(i,a,h)&&(o.Eu(t),u=!0),u||((h=e.hd.Yd(t,i,h))==1?(o.J[0]=0,o.J[2]=2,o.J[3]=-1,o.J[5]=1,o.J[6]=-1):h==2?(o.J[6]=-1,t.Ke()!=0?(o.J[0]=-1,o.J[3]=0,o.J[2]=2,o.J[5]=1):(o.J[0]=0,o.J[3]=-1,o.J[5]=-1,h=new e.l,t.A(h),o.J[2]=h.ca()==0&&h.R()==0?-1:1)):o.Eu(t)),this.fg(o.J,s)},n.tt=function(t,i,h,s,o){var a=new n;a.Yi(),a.bj(s),a.MJ();var u=new e.l;t.A(u),s=i.D();var c=!1;if(e.ud.Rw(s,u,h)&&(a.Vz(t),c=!0),!c){u=null;var l=c=!1;(a.ea[0]||a.ea[6])&&(e.ud.Yz(t,s,h)?(a.ea[0]&&(u=e.pi.gm(t,o),l=!e.ud.kt(u,s,h),c=!0,a.J[0]=l?-1:0),a.J[6]=-1):(a.J[0]=-1,a.J[6]=0)),a.ea[3]&&(u!=null&&u.B()?a.J[3]=-1:(c||(u==null&&(u=e.pi.gm(t,o)),l=!e.ud.kt(u,s,h),c=!0),a.J[3]=l?0:-1)),a.ea[5]&&(u!=null&&u.B()?a.J[5]=-1:c&&!l?a.J[5]=0:(u==null&&(u=e.pi.gm(t,o)),o=e.ud.Nw(u,i,h),a.J[5]=o?-1:0)),a.ea[2]&&(t.Qb()!=0?a.J[2]=1:((o=new e.de(t.description)).Fd(t,0,t.I()),t=e.ud.Nw(o,i,h),a.J[2]=t?-1:0))}return this.fg(a.J,a.Xc)},n.lt=function(t,i,h,s){var o=new n;o.Yi(),o.bj(s),o.RJ();var a=new e.l;t.A(a),i=i.D();var u=!1;if(e.ud.Rw(i,a,h)&&(o.yI(),u=!0),!u){a=!1,u=!0,h*=h;for(var c=0;ca;a++)o[a]=-1;return e.h.yc(t,i)<=h*h?o[0]=0:(o[2]=0,o[6]=0),o[8]=2,n.fg(o,s)},n.fg=function(t,i){for(var h=0;9>h;h++)switch(i.charAt(h)){case"T":if(t[h]==-1)return!1;break;case"F":if(t[h]!=-1)return!1;break;case"0":if(t[h]!=0)return!1;break;case"1":if(t[h]!=1)return!1;break;case"2":if(t[h]!=2)return!1}return!0},n.uW=function(t,i,h){var s=[-1,-1,-1,-1,-1,-1,-1,-1,-1];if(t.B()&&i.B()){for(var o=0;9>o;o++)s[o]=-1;return this.fg(s,h)}return o=!1,t.B()&&(t=i,o=!0),s[0]=-1,s[1]=-1,s[3]=-1,s[4]=-1,s[6]=-1,s[7]=-1,s[8]=2,i=t.getType(),e.aa.Hc(i)?i==1736?t.Ke()!=0?(s[2]=2,s[5]=1):(s[5]=-1,i=new e.l,t.A(i),s[2]=i.ca()==0&&i.R()==0?0:1):(i=t.Qb()!=0,s[2]=i?1:0,s[5]=e.pi.aq(t)?0:-1):(s[2]=0,s[5]=-1),o&&this.vK(s),this.fg(s,h)},n.MR=function(t,i,h){return n.dQ(t)?3:n.UP(t)?4:n.cY(t,i,h)?8:n.CP(t,i,h)?16:n.eP(t)?1:n.EU(t,i,h)?32:0},n.dQ=function(t){return t.charAt(0)=="T"&&t.charAt(1)=="*"&&t.charAt(2)=="F"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="F"&&t.charAt(6)=="F"&&t.charAt(7)=="F"&&t.charAt(8)=="*"},n.UP=function(t){return t.charAt(0)=="F"&&t.charAt(1)=="F"&&t.charAt(2)=="*"&&t.charAt(3)=="F"&&t.charAt(4)=="F"&&t.charAt(5)=="*"&&t.charAt(6)=="*"&&t.charAt(7)=="*"&&t.charAt(8)=="*"},n.cY=function(t,i,h){return(i!=0||h!=0)&&((i!=2||h!=2)&&(t.charAt(0)=="F"&&t.charAt(1)=="*"&&t.charAt(2)=="*"&&t.charAt(3)=="T"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="*"&&t.charAt(7)=="*"&&t.charAt(8)=="*"||i==1&&h==1&&t.charAt(0)=="F"&&t.charAt(1)=="T"&&t.charAt(2)=="*"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="*"&&t.charAt(7)=="*"&&t.charAt(8)=="*")||h!=0&&t.charAt(0)=="F"&&t.charAt(1)=="*"&&t.charAt(2)=="*"&&t.charAt(3)=="*"&&t.charAt(4)=="T"&&t.charAt(5)=="*"&&t.charAt(6)=="*"&&t.charAt(7)=="*"&&t.charAt(8)=="*")},n.CP=function(t,i,h){return i>h?t.charAt(0)=="T"&&t.charAt(1)=="*"&&t.charAt(2)=="*"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="T"&&t.charAt(7)=="*"&&t.charAt(8)=="*":i==1&&h==1&&t.charAt(0)=="0"&&t.charAt(1)=="*"&&t.charAt(2)=="*"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="*"&&t.charAt(7)=="*"&&t.charAt(8)=="*"},n.eP=function(t){return t.charAt(0)=="T"&&t.charAt(1)=="*"&&t.charAt(2)=="*"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="F"&&t.charAt(7)=="F"&&t.charAt(8)=="*"},n.EU=function(t,i,h){if(i==h){if(i!=1)return t.charAt(0)=="T"&&t.charAt(1)=="*"&&t.charAt(2)=="T"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="T"&&t.charAt(7)=="*"&&t.charAt(8)=="*";if(t.charAt(0)=="1"&&t.charAt(1)=="*"&&t.charAt(2)=="T"&&t.charAt(3)=="*"&&t.charAt(4)=="*"&&t.charAt(5)=="*"&&t.charAt(6)=="T"&&t.charAt(7)=="*"&&t.charAt(8)=="*")return!0}return!1},n.Jw=function(t,i,h){t=i.La(t);for(var s=i.Re;s!=-1;s=i.Rf(s))if(i.xd(s)&t){var o=i.Me(s);if(o==-1)i.nn(s,h,0);else{var a=o,u=0;do i.dh(a)&t&&u++,a=i.jc(i.xa(a));while(a!=o);i.nn(s,h,u)}}},n.Zp=function(t){var i=""+t.charAt(0);return i+=t.charAt(3),i+=t.charAt(6),i+=t.charAt(1),i+=t.charAt(4),i+=t.charAt(7),i+=t.charAt(2),(i+=t.charAt(5))+t.charAt(8)},n.prototype.Yi=function(){for(var t=0;9>t;t++)this.J[t]=-2,this.Za[t]=-2},n.vK=function(t){var i=t[1],h=t[2],s=t[5];t[1]=t[3],t[2]=t[6],t[5]=t[7],t[3]=i,t[6]=h,t[7]=s},n.prototype.bj=function(t){for(this.Xc=t,t=0;9>t;t++)this.Xc.charAt(t)!="*"?(this.ea[t]=!0,this.le++):this.ea[t]=!1},n.prototype.UJ=function(){for(var t=0;9>t;t++)this.ea[t]&&this.J[t]==-2&&(this.J[t]=-1,this.ea[t]=!1)},n.prototype.pc=function(t){return this.J[t]!=-2&&(this.J[t]==-1?(this.ea[t]=!1,this.le--,!0):this.Xc.charAt(t)!="T"&&this.Xc.charAt(t)!="F"?!(this.J[t]a?1:0},n.prototype.reset=function(){this.yA=-1},n}(),r=function(){function n(){this.Wm=this.Gl=null,this.fb=new e.Yj,this.fb.RP(),this.$d=new f(this),this.fb.Vo(this.$d)}return n.prototype.HQ=function(){var t=!1;if(this.fw&&(t=this.IQ()),this.g.da(this.X)==1){var i=this.g.Ob(this.X);return t=this.g.wz(i),this.g.PB(i,!0),0>t&&(t=this.g.Xa(i),this.g.pJ(t),this.g.Wg(i,this.g.Ma(t)),!0)}for(this.El=this.g.Ky(),this.wo=this.g.Ky(),i=this.g.Ob(this.X);i!=-1;i=this.g.Rb(i))this.g.gr(i,this.El,0),this.g.gr(i,this.wo,-1);i=new e.ia(0),this.yh=NaN;var h=new e.h;this.et=this.g.da(this.X),this.ro=this.g.Gd(),this.Rs=this.g.Gd();for(var s=this.Gl.rc(this.Gl.je);s!=-1;s=this.Gl.lb(s)){var o=this.Gl.getData(s);if(this.g.Gc(o,h),h.y!=this.yh&&i.size!=0&&(t=this.ut(i)||t,this.$d.reset(),i.clear(!1)),i.add(o),this.yh=h.y,this.et==0)break}for(0=this.MA.length&&this.MA.push(new e.ig);var n=this.MA[this.Cw];return this.Cw++,n},r.prototype.clear=function(){this.wB(this.mo),this.wB(this.$s),this.wB(this.yw),this.Cw=0},r.prototype.Oo=function(n){this.mo.push(this.Ow(n))},r.prototype.ol=function(n){return n==0?this.$s.length:this.yw.length},r.prototype.Vp=function(n,t){return this.SR(n,t).$i},r.prototype.Ea=function(n,t){if(this.mo.length!=2)throw e.i.Qa();this.qa=n;var i=e.lc.ox(.01*n),h=!1,s=this.mo[0],o=this.mo[1];if(t||5&s.$i.zr(o.$i,n,!0)){if(s.$i.getType()==322){var a=s.$i;if(o.$i.getType()==322){t=o.$i;var u=e.yb.Zx(a,t,null,this.Fq,this.Bk,n);if(u==0)throw e.yb.Zx(a,t,null,this.Fq,this.Bk,n),e.i.Qa();n=Array(9),e.O.$u(n,null);for(var c=0;ci&&(h=!0)):y>g?(a.hc(l,x),l=new e.h,t.hc(p,l),e.h.yc(x,l)>i&&(h=!0)):(t.hc(p,x),y=new e.h,a.hc(l,y),e.h.yc(x,y)>i&&(h=!0)),n[c]=x}for(s=0,o=-1,c=0;c<=u;c++)(b=cthis.Bk[1]&&(b=this.Bk[0],this.Bk[0]=this.Bk[1],this.Bk[1]=b,c=a[0],a[0]=a[1],a[1]=c),s=0,o=-1,c=0;c<=u;c++)(b=c=o;o++){if((t=1>o?this.Fq[o]:1)!=i){var a=this.aB();n.ah(i,t,a),s!=-1&&a.get().Dc(h),o!=1&&a.get().Qc(h),i=t,this.$s.push(this.Ow(a.get()))}s=o}this.Bf.Cb(h)}},r}();e.TC=f}(k||(k={})),function(e){var v=function(){function f(r){this.Ds=this.rk=this.sb=null,this.ag=0,this.zm=!1,this.zf=-1,this.Cl=this.Jd=0,this.gb=-1,this.ib=r,this.ag=this.Wx(this.Cl),this.zm=!1,this.rk=null,this.Ds=new e.h}return f.prototype.BW=function(r){if(this.ib!=r.ib)throw e.i.Hb();this.zf=r.zf,this.Jd=r.Jd,this.gb=r.gb,this.Cl=r.Cl,this.ag=r.ag,this.zm=r.zm,this.rk=null},f.prototype.ha=function(){if(this.zf!=this.Jd&&this.BD(),this.zm)this.Jd=(this.Jd+1)%this.ag;else{if(this.Jd==this.ag)throw e.i.ce();this.Jd++}return this.rk},f.prototype.li=function(){if(this.zm)this.Jd=(this.ag+this.Jd-1)%this.ag;else{if(this.Jd==0)throw e.i.ce();this.Jd--}return this.Jd!=this.zf&&this.BD(),this.rk},f.prototype.DW=function(){this.zf=-1,this.Jd=0},f.prototype.EW=function(){this.Jd=this.ag,this.zf=-1},f.prototype.Vb=function(r,n){if(n===void 0&&(n=-1),0<=this.gb&&this.gb=t&&r=this.ib.Ba(n)&&r=this.ib.da())&&(this.zf=-1,this.Jd=0,this.ag=this.Wx(this.gb),this.ib.Ba(this.gb),this.ib.dc(this.gb),this.Cl++,!0)},f.prototype.Zi=function(){this.ag=this.Jd=this.zf=-1,this.Cl=0,this.gb=-1},f.prototype.Wx=function(r){if(this.ib.Ac())return 0;var n=1;return this.ib.dc(r)&&(n=0),this.ib.Ja(r)-n},f.prototype.On=function(){return this.zf==this.ag-1&&this.ib.dc(this.gb)},f.prototype.JB=function(){this.zm=!0},f.prototype.wb=function(){return this.ib.nb.o[this.gb]+this.zf},f.prototype.IM=function(){return this.ib.Ba(this.gb)},f.prototype.ik=function(){return this.On()?this.ib.Ba(this.gb):this.wb()+1},f.prototype.vm=function(){return this.zf==0},f.prototype.Qn=function(){return this.zf==this.ag-1},f.prototype.Ha=function(){return this.Jdthis.Jd||this.Jd>=this.ag)throw e.i.ce();this.zf=this.Jd;var r=this.wb();this.ib.mc();var n=this.ib.Ve,t=1;switch(n!=null&&(t=7&n.read(r)),n=this.ib.description,t){case 1:this.sb==null&&(this.sb=new e.yb),this.rk=this.sb;break;case 2:throw e.i.fa("internal error");default:throw e.i.Qa()}this.rk.Nf(n),t=this.ik(),this.ib.Gc(r,this.Ds),this.rk.Dc(this.Ds),this.ib.Gc(t,this.Ds),this.rk.Qc(this.Ds);for(var i=1,h=n.Aa;ih&&(s=n,n=i,i=s,s=t,t=h,h=s,s=-1),!(0>h||t>=this.pl)){0>n&&0>i?i=n=-1:n>=this.oi&&i>=this.oi&&(i=n=this.oi);var o=(i-n)/(h-t);h>this.pl&&(i=o*((h=this.pl)-t)+n),0>t&&(n=o*(0-t)+n,t=0);var a=Math.max(this.oi+1,8388607);-8388607>n?(t=(0-n)/o+t,n=0):n>a&&(t=(this.oi-n)/o+t,n=this.oi),-8388607>i?h=(0-n)/o+t:i>a&&(h=(this.oi-n)/o+t),(t=e.O.truncate(t))!=(h=e.O.truncate(h))&&((i=new v).x=e.O.truncate(4294967296*n),i.y=t,i.H=h,i.WP=e.O.truncate(4294967296*o),i.dir=s,this.Wl==null&&(this.Wl=e.O.lg(this.pl,null)),i.next=this.Wl[i.y],this.Wl[i.y]=i,i.ythis.Kw&&(this.Kw=i.H),this.Tq++)}}},r.prototype.sN=function(){if(this.Jh!=null){for(var n=!1,t=null,i=this.Jh;i!=null;)if(i.y++,i.y==i.H){var h=i;i=i.next,t!=null?t.next=i:this.Jh=i,h.next=null}else i.x+=i.WP,t!=null&&t.x>i.x&&(n=!0),t=i,i=i.next;n&&(this.Jh=this.fK(this.Jh))}},r.prototype.lN=function(n){if(!(n>=this.pl)){var t=this.Wl[n];if(t!=null){this.Wl[n]=null,t=this.fK(t),this.Tq-=this.gK,n=this.Jh;for(var i=!0,h=t,s=null;n!=null&&h!=null;)n.x>h.x?(i&&(this.Jh=h),i=h.next,h.next=n,s!=null&&(s.next=h),s=h,h=i):(i=n.next,n.next=h,s!=null&&(s.next=n),s=n,n=i),i=!1;this.Jh==null&&(this.Jh=t)}}},r.eK=function(n,t){return 0>n?0:n>t?t:n},r.prototype.ZP=function(){if(this.Jh!=null){for(var n=0,t=this.Jh,i=e.O.truncate(e.O.XG(t.x)),h=t.next;h!=null;h=h.next)if(n=this.kF?1^n:n+h.dir,h.x>t.x){var s=e.O.truncate(e.O.XG(h.x));n!=0&&(t=r.eK(i,this.oi),(i=r.eK(s,this.oi))>t&&tthis.Kf[1].x&&(n=this.Kf[0],this.Kf[0]=this.Kf[1],this.Kf[1]=n):r.AN(this.Kf,t,function(s,o){return s==o?0:s.xo.x?1:0}),n=this.Kf[0],this.Kf[0]=null,i=n,h=1;hthis.Wh.size)break;var u=this;for(this.xe.Vd(0,this.xe.size,function(c,l){return u.pM(c,l)}),t=0,i=this.xe.size;tb?1:xm?1:0)==0&&(x=(y=u[c*y+3])<(d=u[c*d+3])?-1:y==d?0:1),x}),this.Pq=this.g.Gd(),this.oe=new e.jp,this.RA=this.oe.Ph(0),this.oe.fn(t),h=0;hu;u++){for(c=y[u],l=t[u],p=u-1;0<=p&&y[p]>c;)y[p+1]=y[p],t[p+1]=t[p],p--;y[p+1]=c,t[p+1]=l}return y=0,t[0]!=0&&(y|=1),t[1]!=0&&(y|=2),t[2]!=0&&(y|=4),t[3]!=0&&(y|=8),(y==5||y==10)&&(r==n?r?(this.g.Bc(a,i),this.g.Cc(i,a),this.g.Bc(h,o),this.g.Cc(o,h)):(this.g.Cc(a,i),this.g.Bc(i,a),this.g.Cc(h,o),this.g.Bc(o,h)):r?(this.g.Cc(i,s),this.g.Bc(s,i),this.g.Cc(o,h),this.g.Bc(h,o)):(this.g.Bc(i,s),this.g.Cc(s,i),this.g.Bc(o,h),this.g.Cc(h,o)),!0)},f.prototype.tD=function(r,n,t,i,h,s){this.MY?this.VM():this.UM(r,n,t,i,h,s)},f.prototype.VM=function(){throw e.i.fa("not implemented.")},f.prototype.UM=function(r,n,t,i,h,s){if(r!=n)r?(this.g.Bc(t,h),this.g.Cc(h,t),this.g.Bc(s,i),this.g.Cc(i,s),this.vn(h,t),this.ui(h,!0),this.g.mi(h,!0),this.bk(t),this.vn(s,i),this.ui(s,!0),this.g.mi(s,!1)):(this.g.Bc(h,t),this.g.Cc(t,h),this.g.Bc(i,s),this.g.Cc(s,i),this.vn(h,t),this.ui(h,!0),this.g.mi(h,!1),this.bk(t),this.vn(s,i),this.ui(s,!0),this.g.mi(s,!0)),this.bk(i);else{var o=r?t:i,a=n?h:s;for(r=r?i:t,n=n?s:h,h=!1,this.g.Bc(o,a),this.g.Bc(a,o),this.g.Cc(r,n),this.g.Cc(n,r),s=n;s!=a;)t=this.g.Ma(s),i=this.g.U(s),this.g.Cc(s,i),this.g.Bc(s,t),h=h||s==o,s=i;h||(t=this.g.Ma(a),i=this.g.U(a),this.g.Cc(a,i),this.g.Bc(a,t)),this.vn(a,o),this.ui(a,!0),this.g.mi(a,!1),this.bk(o),this.vn(n,r),this.ui(n,!0),this.g.mi(n,!1),this.bk(r)}},f.prototype.cD=function(){for(var r=!1,n=this.g.Ob(this.X);n!=-1;){for(var t=this.g.Xa(n),i=0,h=this.g.Ja(n);ithis.g.Ja(n)){for(r=this.g.Xa(n),i=0,h=this.g.Ja(n);i=n)throw e.i.N("Invalid or unsupported wkid: "+n);var t=new r;return t.dg=n,t},r.qP=function(n){if(n==null||n.length==0)throw e.i.N("Cannot create SpatialReference from null or empty text.");var t=new r;return t.wh=n,t},r.prototype.Nb=function(n){return this==n||n!=null&&this.constructor==n.constructor&&this.dg==n.dg&&(this.dg!=0||this.wh===n.wh)},r.prototype.toString=function(){return"[ tol: "+this.Kn()+"; wkid: "+this.Ec()+"; wkt: "+this.Bz()+"]"},r.prototype.cc=function(){if(this.pp!=="")return this.pp;var n=this.toString();if(Array.prototype.reduce)return this.pp="S"+n.split("").reduce(function(h,s){return 0|(h=(h<<5)-h+s.charCodeAt(0))},0);var t=0;if(n.length===0)return"";for(var i=0;i=n.length)throw e.i.N();var t=null;try{t=e.NC.fromString(n)}catch{t=null}return t==null?null:r.bD(t,!0)},r.prototype.by=function(n){this.Kd=n,this.Eo=this.Kd.Hd()},r.prototype.gy=function(n){this.KH=n,this.ST=this.KH!=null?this.KH.Eo:null},r.prototype.Wc=function(){return this.Sb()!=0&&this.Sb()!=3&&this.Kd.Wc()},r.prototype.IG=function(){return this.Sb()!=0&&(this.Sb()==3?this.Ji.fk().Wc():this.Kd.Wc())},r.prototype.eh=function(){return this.Kd!=null?this.Kd.Ue:null},r.prototype.pm=function(){return this.Kd.pm()},r.prototype.bf=function(){return this.Kd.bf()},r.prototype.hh=function(){return this.Kd!=null?this.Kd.sw:NaN},r.prototype.Up=function(){return this.Kd.Up()},r.prototype.Wr=function(){return this.Kd.Wr()},r.prototype.kk=function(){return this.Kd.kk()},r.prototype.kS=function(n){return e.OC.Py(this.Kd,n.Kd)},r.prototype.ml=function(){return this.Kd.ml()},r.prototype.Vr=function(){return this.Kd.Vr()},r.prototype.zi=function(){return this.Sb()==3?this.Ji.fk().zi():this.Kd.zi()},r.prototype.gh=function(){if(!this.Wc())throw e.i.N("!isPannable()");var n=new e.l;return this.Kd.gh(n),n},r.prototype.Oe=function(){if(!this.Wc())throw e.i.N("!isPannable()");return this.Kd.so},r.prototype.HR=function(){if(!this.Wc())throw e.i.N("!isPannable()");var n=new e.l;return this.Kd.GR(n),n},r.prototype.pv=function(){if(!this.Wc())throw e.i.N("!isPannable()");return this.Kd.pv()},r.prototype.ov=function(){if(!this.Wc())throw e.i.N("!isPannable()");return this.Kd.ov()},r.prototype.Xr=function(){return this.Ji!=null?this.Ji.fk().Xr():this.Kd.Xr()},r.prototype.PQ=function(){return this.Kd.hv()},r.prototype.Qp=function(){return this.Eo.getUnitFactor()},r.prototype.vz=function(n){return this.Hq.vz(n)},r.prototype.sc=function(){var n=this.Sb();if(n==1)return this;if(n==3)return this.Ji.fk().sc();if(n==0||n===4)throw e.i.fa("invalid call");if(this.jw!==null)return this.jw;if((n=this.eh().getGeogcs())==null)throw e.i.Qa();return this.jw=r.bF(n,this.Hq.VF())},r.bF=function(n,t){if(n==null)throw e.i.N("null pointer.");var i=new r;return n=r.mu(n,!0),i.Hq.Xx(n,null,t),i.by(n),i.gy(null),i.dg=n.$r(),i},r.prototype.Sb=function(){var n=this.eh();if(n!=null)switch(n.getType()){case e.Sc.PE_TYPE_GEOGCS:return 1;case e.Sc.PE_TYPE_PROJCS:return 2}return 4},r.prototype.hv=function(){return this.Kd.hv()},r.mu=function(n,t){var i=n.getCode();if(0>=i&&0<(i=e.pf.getCode(n))){if((n=e.pf.coordsys(i))==null)throw e.i.N("Text to wkid mapping had failed: "+i);return r.mu(n,t)}if(t&&0=i?n:e.pf.coordsys(i),n=new e.OC(n),r.lK[t]=n,0=n)throw e.i.N("Invalid or unsupported wkid: "+n);var t=r.qx[n];if(t!=null)return t;if((t=e.pf.coordsys(n))==null)throw e.i.N("Invalid or unsupported wkid: "+n);return(t=r.mu(t,!1)).$r()!=n&&(r.qx[n]=t),t},r.kM=function(n){if(n==null||n===void 0||n.length==0)throw e.i.N("Cannot create SpatialReference from null or empty text.");var t=null;try{t=e.pf.fromString(e.Sc.PE_TYPE_COORDSYS,n)}catch(i){throw e.i.N("Cannot create SpatialReference from text. "+i.message)}if(t===null)throw e.i.N("Cannot create SpatialReference from text. ");return r.mu(t,!0)},r.bD=function(n,t){var i,h=n.getCode();if(0>=h&&0<(h=e.pf.getCode(n))){if((h=e.pf.vertcs(h))===null)throw e.i.N();return r.bD(h,t)}if(t&&0=h||(i=e.pf.vertcs(h)),i===null)throw e.i.N();return i=new e.PL(i),r.mK[n]=i,0t&&(this.Pj=t/(h-this.Fm)),i=this.Gm+i,(s=e.O.truncate((i-this.Gm)*this.Pj))>t&&(this.Pj=t/(i-this.Gm))}},n.prototype.aC=function(t){switch(t){case 0:this.Ik=void 0;case 1:this.Mq=void 0;case 2:this.Lq=void 0}},n.prototype.Kn=function(t){switch(t){case 0:return this.Ik;case 1:return this.Mq;case 2:return this.Lq}return 0},n.prototype.vz=function(t){if(this.Rm==v.FloatingPoint)return 0;switch(t){case 0:return 1/this.Pj;case 1:case 2:return 1/this.Fo;default:return 0}},n.prototype.toString=function(){var t="SRPD [m_toleranceXY: "+this.Ik.toString();return(t=(t=(t=(t=(t=(t=(t=(t=(t=t+";m_falseX: "+this.Fm.toString())+";m_falseY: "+this.Gm.toString())+";m_unitsXY: "+this.Pj.toString())+";m_falseZ: "+this.sA.toString())+";m_unitsZ: "+this.Fo.toString())+";m_falseM: "+this.rA.toString())+";m_toleranceZ: "+this.Mq.toString())+";m_toleranceM: "+this.Lq.toString())+";m_precision: "+this.Rm.toString())+"] "},n}();e.ZL=r}(k||(k={})),function(e){function v(h,s){return 89.99999s&&(s=-89.99999),s*=.017453292519943,[111319.49079327169*h,31890685e-1*Math.log((1+Math.sin(s))/(1-Math.sin(s)))]}function f(h,s,o){return h=h/6378137*57.29577951308232,o?[h,57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*s/6378137)))]:[h-360*Math.floor((h+180)/360),57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*s/6378137)))]}function r(h,s,o){var a=h.Of();if(h.getType()===33)s=s(a.Lg(),a.ih()),a.Cb(s[0],s[1]);else if(h.getType()===197){var u=s(h.es(),h.gs(),o);s=s(h.ds(),h.fs(),o),a.K(u[0],u[1],s[0],s[1])}else for(u=new e.h,h=0;ho&&(o=637.100877141506);for(var a,u=[],c=0;cthis.Hg&&this.Dz(r)},f.prototype.tx=function(r,n){r*=this.stride,n*=this.stride;for(var t=0;tthis.ns.va)return 1;s=h.na==h.la;var o=i.na==i.la;if(s||o){if(s&&o)return 0;if(h.na==i.na&&h.sa==i.sa)return s?1:-1;if(h.la==i.la&&h.pa==i.pa)return s?-1:1}return(s=h.Pe(this.yh,this.ms.oa))==(o=i.Pe(this.yh,this.ns.oa))&&((o=.5*((s=Math.min(h.la,i.la))+this.yh))==this.yh&&(o=s),s=h.Pe(o,this.ms.oa),o=i.Pe(o,this.ns.oa)),so?1:0},t.prototype.aK=function(i){this.yh=i},t}(),n=function(){function t(i){this.ib=i,this.WH=new e.ig,this.Bf=new e.h,this.wA=new e.Nc}return t.prototype.kX=function(i){this.Bf.L(i)},t.prototype.compare=function(i,h){return this.ib.pB(i.ja(h),this.WH),i=this.WH.get(),this.wA.K(i.sa,i.pa),this.Bf.xthis.wA.va?1:(i=i.Pe(this.Bf.y,this.Bf.x),this.Bf.xi?1:0)},t}();v=function(){function t(){this.hH=this.Di=this.Gi=this.kA=this.Yn=this.ye=this.Kc=this.jh=this.ge=null,this.Go=this.xg=-1,this.gH=!0,this.pA=!1,this.lA=NaN,this.Ni=new e.Md,this.bO=2147483647,this.aO=e.O.truncate(-2147483648),this.cg=this.ae=this.Hl=this.Cq=this.Cm=this.Bq=this.Os=this.Re=-1,this.wa=0}return t.prototype.yy=function(i){this.lA=i},t.prototype.Ym=function(){this.ge==null&&(this.ge=new e.$c(8));var i=this.ge.Ce();return this.ge.S(i,1,0),i},t.prototype.vU=function(){this.Kc==null&&(this.Kc=new e.$c(8));var i=this.Kc.Ce();this.Kc.S(i,2,0),this.Kc.S(i,3,0);var h=this.Kc.Ce();return this.Kc.S(h,2,0),this.Kc.S(h,3,0),this.JJ(i,h),this.JJ(h,i),i},t.prototype.mI=function(){this.ye==null&&(this.ye=new e.$c(8));var i=this.ye.Ce();return this.ye.S(i,2,0),i},t.prototype.TW=function(i,h){this.ge.S(i,7,h)},t.prototype.mn=function(i,h){this.ge.S(i,2,h)},t.prototype.SW=function(i,h){this.ge.S(i,1,h)},t.prototype.lX=function(i,h){this.ge.S(i,3,h)},t.prototype.iX=function(i,h){this.ge.S(i,4,h)},t.prototype.cr=function(i,h){this.ge.S(i,5,h)},t.prototype.eR=function(i){return this.ge.T(i,5)},t.prototype.RW=function(i,h){this.ge.S(i,6,h)},t.prototype.cN=function(i,h){this.RW(h,i)},t.prototype.IJ=function(i,h){this.Kc.S(i,1,h)},t.prototype.JJ=function(i,h){this.Kc.S(i,4,h)},t.prototype.Tl=function(i,h){this.Kc.S(i,5,h)},t.prototype.Sl=function(i,h){this.Kc.S(i,6,h)},t.prototype.$W=function(i,h){this.Kc.S(i,2,h)},t.prototype.$w=function(i,h){this.Kc.S(i,3,h)},t.prototype.LF=function(i){return this.Kc.T(i,3)},t.prototype.Gt=function(i,h){this.Kc.S(i,7,h)},t.prototype.EK=function(i,h){if(this.mm(i)!=-1)for(h=h?-1:i,i=this.mm(i);i!=-1;i=this.js(i))this.g.Ra(this.tj(i),this.Cq,h)},t.prototype.yx=function(i,h){i!=-1&&(this.EK(i,h),this.EK(this.xa(i),h))},t.prototype.Dt=function(i,h){this.ye.S(i,1,h)},t.prototype.Vg=function(i,h){this.ye.S(i,2,h)},t.prototype.jn=function(i,h){this.ye.S(i,3,h),this.NW(i,this.dR(h)),this.MW(h,i)},t.prototype.MW=function(i,h){this.ye.S(i,4,h)},t.prototype.NW=function(i,h){this.ye.S(i,5,h)},t.prototype.DJ=function(i,h){this.ye.S(i,6,h)},t.prototype.BJ=function(i,h){this.ye.S(i,7,h)},t.prototype.AJ=function(i,h){this.Yn.write(i,h)},t.prototype.CJ=function(i,h){this.kA.write(i,h)},t.prototype.kY=function(i){var h=0,s=0,o=this.AF(i),a=new e.h,u=new e.h,c=new e.h;this.Yr(o,a),u.L(a);var l=o;do this.lm(l,c),s+=e.h.tb(u,c),this.$e(this.xa(l))!=i&&(h+=(c.x-a.x-(u.x-a.x))*(c.y-a.y+(u.y-a.y))*.5),u.L(c),l=this.jc(l);while(l!=o);this.Yn.write(i,h),this.kA.write(i,s)},t.prototype.PU=function(i,h){var s=new r(this),o=new e.Yj;o.De(e.O.truncate(this.wa/2)),o.Vo(s);for(var a=new e.ia(0),u=this.$g(),c=null,l=0,p=new e.h,y=this.Re;y!=-1;y=this.Rf(y)){if(!(255&++l||h==null||h.progress(-1,-1)))throw e.i.WC();var d=this.Me(y);if(d!=-1){if(a.Bh(0),!this.gY(o,u,a,d)){this.D(y,p),s.aK(p.y);var g=d;do{var b=this.Ab(g,u);b!=-1&&(o.vd(b,-1),this.Kb(g,u,-2)),g=this.jc(this.xa(g))}while(d!=g);g=d;do(b=this.Ab(g,u))==-1&&(b=o.addElement(g,-1),a.add(b)),g=this.jc(this.xa(g));while(d!=g)}for(d=a.size-1;0<=d;d--)b=a.get(d),g=o.ja(b),this.Kb(this.xa(g),u,b),this.OU(o,b,i)}else this.cz(y)==-1&&(c==null&&(c=new n(this)),this.D(y,p),c.kX(p),g=o.IW(c),d=this.Hl,g!=-1&&(b=o.ja(g),this.$e(b)==this.$e(this.xa(b))&&(b=this.OF(o,g)),b!=-1&&(d=this.$e(b))),this.cN(d,y))}this.Jg(u)},t.prototype.OU=function(i,h,s){var o=i.ja(h),a=this.$e(o);if(this.Gn(a)==-1){var u=this.OF(i,h),c=this.xa(o),l=this.$e(c);this.Kp(a),this.Kp(l);var p=this.Gn(a),y=this.Gn(l);if(u==-1&&p==-1&&(l==a?(this.jn(l,this.Hl),p=y=this.Hl):(y==-1&&(this.jn(l,this.Hl),y=this.Hl),this.jn(a,l),p=l)),u!=-1){var d=this.$e(u);y==-1&&(0>=this.Kp(d)?(y=this.Gn(d),this.jn(l,y)):(this.jn(l,d),y=d),l==a&&(p=y))}p==-1&&this.hY(a,l),s==0?this.jW(i,h,o,u,a,l):s==5?this.kW(i,h,o,c,a,l):s==4&&this.iW(o,u,a,l)}},t.prototype.jW=function(i,h,s,o,a,u){var c=this.hk(a);if(o!=-1){var l=this.hk(u),p=this.hk(this.$e(o));o=c&l&p,p^=p&this.dh(s),(p|=o)!=0&&(this.Vg(u,l|p),this.Vg(a,p|c),c=c||p)}for(h=i.lb(h);h!=-1&&(o=i.ja(h),s=this.$e(this.xa(o)),a=this.hk(s),u=this.dh(o),l=this.$e(o),o=a&(p=this.hk(l))&c,c^=c&u,(c|=o)!=0);h=i.lb(h))this.Vg(s,a|c),this.Vg(l,p|c)},t.prototype.kW=function(i,h,s,o,a,u){if(a!=u){s=this.Ab(s,this.cg),s+=this.Ab(o,this.cg),o=0;var c=new e.ia(0),l=new e.ia(0);l.add(0);for(var p=i.rc(-1);p!=h;p=i.lb(p)){var y=i.ja(p),d=this.xa(y),g=this.$e(y),b=this.$e(d);if(g!=b){if(y=this.Ab(y,this.cg),o+=y+=this.Ab(d,this.cg),d=!1,c.size!=0&&c.Fc()==b&&(l.If(),c.If(),d=!0),this.Gn(b)==-1)throw e.i.Qa();d&&this.Gn(b)==g||(l.add(o),c.add(g))}}o+=s,c.size!=0&&c.Fc()==u&&(l.If(),c.If()),o!=0?l.Fc()==0&&(i=this.g.ld,i=this.La(i),this.Vg(a,i)):l.Fc()!=0&&(i=this.g.ld,i=this.La(i),this.Vg(a,i))}},t.prototype.iW=function(i,h,s,o){var a=this.La(this.g.ld);if(h==-1)this.Vg(o,this.Go),1&(i=this.Ab(i,this.xg))?this.Vg(s,a):this.Vg(s,this.Go);else{var u=this.hk(o);u==0?(u=this.hk(this.$e(h)),this.Vg(o,u),1&(i=this.Ab(i,this.xg))?this.Vg(s,u==a?this.Go:a):this.Vg(s,u)):1&(i=this.Ab(i,this.xg))?this.Vg(s,u==a?this.Go:a):this.Vg(s,u)}},t.prototype.gY=function(i,h,s,o){var a=o,u=-1,c=-1,l=0;do{if(l==2)return!1;var p=this.Ab(a,h);if(p!=-1){if(u!=-1)return!1;u=p}else{if(c!=-1)return!1;c=a}l++,a=this.jc(this.xa(a))}while(o!=a);return c!=-1&&u!=-1&&(this.Kb(i.ja(u),h,-2),i.Sj(u,c),s.add(u),!0)},t.prototype.hY=function(i,h){var s=this.Kp(i);if(s!=0){var o=this.Kp(h);0o||0>s&&0y.compare(a)?p=1:u=-1,this.Kb(g,this.ae,0),this.Kb(d,this.ae,0),this.Kb(d,this.cg,p),this.Kb(g,this.cg,u)):i==7?(this.Kb(g,this.ae,this.Go),this.Kb(d,this.ae,l==1736?c:0)):i==4&&(this.Kb(g,this.ae,0),this.Kb(d,this.ae,0),this.Kb(d,this.xg,1),this.Kb(g,this.xg,1)),l=l==1736?this.aO:0,this.$w(d,c|l),this.$w(g,c|l)}}}}},t.prototype.VT=function(i,h){var s=this.mm(h);if(s!=-1){var o=this.mm(i);this.jh.S(s,1,o),this.Gt(i,s),this.Gt(h,-1)}i=this.xa(i),h=this.xa(h),(s=this.mm(h))!=-1&&(o=this.mm(i),this.jh.S(s,1,o),this.Gt(i,s),this.Gt(h,-1))},t.prototype.IX=function(i){function h(M,A){return o.HO(M,A)}var s=new e.ia(0);s.Jb(10);for(var o=this,a=this.Re;a!=-1;a=this.Rf(a)){s.clear(!1);var u=this.Me(a);if(u!=-1){var c=u;do s.add(c),c=this.jc(this.xa(c));while(c!=u);if(1n.Db())return f.ki(f.Xe(n.Ia()),r,"&")}return s=new f,o=(h=new e.gd).Ib(f.Xe(r)),n=h.Ib(f.Xe(n)),s.Ft(h,t,i),i=s.Av(o,n),r=f.ki(h.Ne(i),r,"&"),e.aa.Hc(r.getType())&&(r.Ch(2,t),r.getType()==1736&&r.fm()),r},f.bW=function(r,n,t){if(r.B()||n.B())return r.Ia();var i=[null],h=[0],s=n.Db()==2;if(n.Db()!=1&&n.Db()!=2)throw e.i.Qa();return i[0]=r.D(),s?e.hd.sK(n,i,1,t,h):e.hd.tK(n,i,1,t,h),h[0]==0?r.Ia():r},f.prototype.LU=function(r,n,t,i,h){if(r.B())return r;var s=new e.gd;return r=s.Ib(r),this.Mk(s,r,n,t,i,h)},f.prototype.NU=function(r,n,t,i,h,s){if(h&&r.ic(n)!=550){var o=new e.RC;o.TX(r,t),o.Ng?(e.Tk.V(r,t,s,!0),h=!1):this.j.yy(t)}else e.Tk.V(r,t,s,!0),h=!1;if(i&&r.ic(n)!=550?this.j.wJ(r,n,s):this.j.vJ(r,n,s),this.j.pA)return this.j.Ug(),this.j=null,this.Mk(r,n,t,i,!1,s);if(this.j.yy(NaN),s=this.j.La(n),this.bq(s+1),this.Gj[s]=!0,r.ic(n)==1736||i&&r.ic(n)!=550)return r.Yo(n,0),n=this.Ot(n,-1,-1),(r=r.Ne(n)).Yo(0),h?r.Ch(1,0):(r.Ch(2,t),r.fm()),r;if(r.ic(n)==1607)return n=this.Pt(-1),r=r.Ne(n),h||r.Ch(2,t),r;if(r.ic(n)==550)return n=this.mr(),r=r.Ne(n),h||r.Ch(2,t),r;throw e.i.Qa()},f.prototype.Mk=function(r,n,t,i,h,s){this.j=new e.iu;try{return this.NU(r,n,t,i,h,s)}finally{this.j.Ug()}},f.Mk=function(r,n,t,i,h){return new f().LU(r,n,t,i,h)},f.prototype.MU=function(r,n,t,i){this.Mv=r,this.j=new e.iu,r=n.In(t);var h=n.ic(t);if(r!=1||h==550?this.j.vJ(n,t,i):this.j.wJ(n,t,i),!this.j.pA)if(this.j.yy(NaN),i=this.j.La(t),this.bq(i+1),this.Gj[i]=!0,n.ic(t)==1736||r==1&&n.ic(t)!=550)n.Yo(t,0),i=this.Ot(t,-1,-1),n.hC(i,t),n.BB(i);else if(n.ic(t)==1607)i=this.Pt(-1),n.hC(i,t),n.BB(i);else{if(n.ic(t)!=550)throw e.i.fa("internal error");i=this.mr(),n.hC(i,t),n.BB(i)}},f.prototype.im=function(r,n){var t=e.aa.tf(this.j.g.ic(r)),i=e.aa.tf(this.j.g.ic(n));if(t>i)return r;var h=this.j.La(r),s=this.j.La(n);if(this.bq(1+(h|s)),this.Gj[this.j.La(r)]=!0,t==2&&i==2)return this.Ot(r,n,-1);if(t==1&&i==2||t==1&&i==1)return this.Pt(-1);if(t==0)return this.mr();throw e.i.Qa()},f.prototype.Av=function(r,n){var t=e.aa.tf(this.j.g.ic(r)),i=e.aa.tf(this.j.g.ic(n)),h=this.j.La(r),s=this.j.La(n);if(this.bq(1+(h|s)),this.Gj[this.j.La(r)|this.j.La(n)]=!0,h=-1,1n.Db())return f.ki(f.Xe(r),r,"-");var h=new e.l;r.A(h);var s=new e.l;if(n.A(s),!h.isIntersecting(s))return f.ki(f.Xe(r),r,"-");var o=new e.l;return o.K(h),o.Zb(s),t=e.ta.Wd(t,o,!0),s=new f,o=(h=new e.gd).Ib(f.Xe(r)),n=h.Ib(f.Xe(n)),s.Ft(h,t,i),i=s.im(o,n),i=h.Ne(i),r=f.ki(i,r,"-"),e.aa.Hc(r.getType())&&(r.Ch(2,t),r.getType()==1736&&r.fm()),r},f.VP=function(r,n,t){if(2>r.length)throw e.i.N("not enough geometries to dissolve");for(var i=0,h=0,s=r.length;hc?f.Xe(r[l]):(r=i==2,n=e.ta.Wd(i==0?n:null,o,!0),new f().Mk(a,u,n,r,!0,t))},f.Pz=function(r,n,t,i){var h=[null,null,null],s=new e.l;r.A(s);var o=new e.l;n.A(o);var a=new e.l;if(a.K(s),a.Zb(o),t=e.ta.Wd(t,a,!0),(a=new e.l).K(o),o=e.ta.Er(t),a.W(o,o),!s.isIntersecting(a)){if(r.Db()<=n.Db())return h[(r=f.ki(f.Xe(r.Ia()),r,"&")).Db()]=r,h;if(r.Db()>n.Db())return h[(r=f.ki(f.Xe(n.Ia()),r,"&")).Db()]=r,h}for(o=new f,a=(s=new e.gd).Ib(f.Xe(r)),n=s.Ib(f.Xe(n)),o.Ft(s,t,i),i=o.Pz(a,n),n=0;nn.Db())return f.ki(f.Xe(r),r,"^");if(r.Db()t;t++)n[t]=new e.h;r.nB(n),this.fY(n,n),r.Zw(n,4)}},f.prototype.fY=function(r,n){for(var t=0;t(n=.5*n.Sk())?Math.sqrt(i):Math.sqrt(n))},f.prototype.RB=function(){this.bb=1,this.jb=this.Gb=this.eb=0,this.ab=1,this.Lb=0},f.prototype.isIdentity=function(r){if(r!==void 0){var n=e.h.construct(0,1);return this.Eh(n,n),n.sub(e.h.construct(0,1)),n.Sk()>r*r?!1:(n.ma(0,0),this.Eh(n,n),!(n.Sk()>r*r)&&(n.ma(1,0),this.Eh(n,n),n.sub(e.h.construct(1,0)),n.Sk()<=r*r))}return this.bb==1&&this.ab==1&&this.eb==0&&this.Gb==0&&this.jb==0&&this.Lb==0},f.prototype.Bi=function(r){return Math.abs(this.bb*this.ab-this.jb*this.eb)<=2*r*(Math.abs(this.bb*this.ab)+Math.abs(this.jb*this.eb))},f.prototype.gg=function(r,n){this.bb=1,this.eb=0,this.Gb=r,this.jb=0,this.ab=1,this.Lb=n},f.prototype.setScale=function(r,n){n!==void 0?(this.bb=r,this.jb=this.Gb=this.eb=0,this.ab=n,this.Lb=0):this.setScale(r,r)},f.prototype.$B=function(){this.bb=0,this.eb=1,this.Gb=0,this.jb=1,this.Lb=this.ab=0},f.prototype.setRotate=function(r){this.pX(Math.cos(r),Math.sin(r))},f.prototype.pX=function(r,n){this.bb=r,this.eb=-n,this.Gb=0,this.jb=n,this.ab=r,this.Lb=0},f.prototype.shift=function(r,n){this.Gb+=r,this.Lb+=n},f.prototype.scale=function(r,n){this.bb*=r,this.eb*=r,this.Gb*=r,this.jb*=n,this.ab*=n,this.Lb*=n},f.prototype.flipX=function(r,n){this.bb=-this.bb,this.eb=-this.eb,this.Gb=r+n-this.Gb},f.prototype.flipY=function(r,n){this.jb=-this.jb,this.ab=-this.ab,this.Lb=r+n-this.Lb},f.prototype.rotate=function(r){var n=new f;n.setRotate(r),this.multiply(n)},f.prototype.inverse=function(r){if(r!==void 0){var n=this.bb*this.ab-this.eb*this.jb;n==0?r.lx():(n=1/n,r.Gb=(this.eb*this.Lb-this.Gb*this.ab)*n,r.Lb=(this.Gb*this.jb-this.bb*this.Lb)*n,r.bb=this.ab*n,r.eb=-this.eb*n,r.jb=-this.jb*n,r.ab=this.bb*n)}else this.inverse(this)},f}();e.Dd=v}(k||(k={})),function(e){var v=function(){function f(){}return f.prototype.lx=function(){this.hg=this.Lb=this.Gb=this.He=this.Fe=this.Ee=this.Ge=this.ab=this.eb=this.Ze=this.jb=this.bb=0},f.prototype.setScale=function(r,n,t){this.bb=r,this.eb=this.Ze=this.jb=0,this.ab=n,this.Fe=this.Ee=this.Ge=0,this.He=t,this.hg=this.Lb=this.Gb=0},f.prototype.setTranslate=function(r,n,t){this.bb=1,this.eb=this.Ze=this.jb=0,this.ab=1,this.Fe=this.Ee=this.Ge=0,this.He=1,this.Gb=r,this.Lb=n,this.hg=t},f.prototype.translate=function(r,n,t){this.Gb+=r,this.Lb+=n,this.hg+=t},f.prototype.mC=function(r){if(!r.B()){for(var n=new e.Nd[8],t=0;8>t;t++)n[t]=new e.Nd;r.nB(n),this.transform(n,8,n),r.Zw(n)}},f.prototype.transform=function(r,n,t){for(var i=0;ii;i++)t.uh[i]=-1;t.uh[t.bg[0]]=0}return t.jq=!0,t}return J(n,r),n.prototype.re=function(t){this.hasAttribute(t)||(this.uh[t]=0,this.jD())},n.prototype.removeAttribute=function(t){if(t==0)throw e.i.N("Position attribue cannot be removed");this.hasAttribute(t)&&(this.uh[t]=-1,this.jD())},n.prototype.reset=function(){this.bg[0]=0,this.Aa=1;for(var t=0;tt;t++)0<=this.uh[t]&&(this.bg[i]=t,this.uh[t]=i,i++,this.Aa++);this.jq=!0},n.prototype.cc=function(){return this.jq&&(this.wl=this.An(),this.jq=!1),this.wl},n.prototype.Nb=function(t){if(t==null)return!1;if(t==this)return!0;if(!(t instanceof n)||t.Aa!=this.Aa)return!1;for(var i=0;is;s++)!t.hasAttribute(s)&&i.hasAttribute(s)&&(h==null&&(h=new n(t)),h.re(s));return h!=null?h.EF():t},n}(e.ra);e.ee=v;var f=function(){function r(){this.map=[];var n=new v;this.add(n),(n=new v).re(1),this.add(n)}return r.kz=function(){return r.bL},r.prototype.$R=function(){return r.ft},r.prototype.add=function(n){var t=n.cc();if(r.ft!=null&&r.ft.cc()==t&&n.GG(r.ft))return r.ft;if(r.Dw!=null&&r.Dw.cc()==t&&n.GG(r.Dw))return r.Dw;var i=null;return this.map[t]!==void 0&&(i=this.map[t]),i==null&&((i=n.tM()).Aa==1?r.ft=i:i.Aa==2&&i.kd(1)==1?r.Dw=i:this.map[t]=i),i},r.bL=new r,r}()}(k||(k={}));var kt={feet:9002,kilometers:9036,meters:9001,miles:9093,"nautical-miles":9030,yards:9096},Mt={acres:109402,ares:109463,hectares:109401,"square-feet":109405,"square-kilometers":109414,"square-meters":109404,"square-miles":109439,"square-yards":109442},at=new(function(){function e(){this.RM=50,this.np=new Map,this.gj=[]}return e.prototype.clear=function(){this.gj.length=0,this.np.clear()},e.prototype.delete=function(v){return!!this.np.delete(v)&&(this.gj.splice(this.gj.indexOf(v),1),!0)},e.prototype.get=function(v){var f=this.np.get(v);if(f!==void 0)return this.gj[0]!==v&&(this.gj.splice(this.gj.indexOf(v),1),this.gj.unshift(v)),f},e.prototype.has=function(v){return this.np.has(v)},e.prototype.set=function(v,f){return this.get(v)!==void 0&&this.delete(v),this.gj.unshift(v),this.np.set(v,f),this.oM(),this},e.prototype.oM=function(){for(;this.gj.length&&this.gj.length>this.RM;){var v=this.gj.pop();this.np.delete(v)}},e}()),P=((Z={}).convertJSONToGeometry=function(e){return k.$b.fP(e)},Z.hasM=function(e){return e.hasAttribute(k.Ih.M)},Z.hasZ=function(e){return e.hasAttribute(k.Ih.Z)},Z.getPointX=function(e){return e.Lg()},Z.getPointY=function(e){return e.ih()},Z.getPointZ=function(e){return e.bS()},Z.getPointM=function(e){return e.zR()},Z.getXMin=function(e){return e.es()},Z.getYMin=function(e){return e.gs()},Z.getXMax=function(e){return e.ds()},Z.getYMax=function(e){return e.fs()},Z.getZExtent=function(e){return e.Tg(k.Ih.Z,0)},Z.getMExtent=function(e){return e.Tg(k.Ih.M,0)},Z.exportPaths=function(e){var v=[],f=e.da(),r=null,n=null,t=e.hasAttribute(k.Ih.Z),i=e.hasAttribute(k.Ih.M);t&&(r=e.ub(k.Ih.Z)),i&&(n=e.ub(k.Ih.M));for(var h=new k.h,s=0;s2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(e))e.forEach(function(o){return t(a,o,n,i)});else if(typeof e=="function")e(a,n,i,t);else{var d=Object.keys(e)[0];Array.isArray(e[d])?(i[d]={},t(a,e[d],n,i[d])):i[d]=e[d](a,n,i,t)}return n};w.parse=q;var V=function(t,a){return function(e,n,i,d){a(e,n,i)&&d(e,t,n,i)}};w.conditional=V;var $=function(t,a){return function(e,n,i,d){for(var o=[],c=e.pos;a(e,n,i);){var l={};if(d(e,t,n,l),e.pos===c)break;c=e.pos,o.push(l)}return o}};w.loop=$;var f={};Object.defineProperty(f,"__esModule",{value:!0}),f.readBits=f.readArray=f.readUnsigned=f.readString=f.peekBytes=f.readBytes=f.peekByte=f.readByte=f.buildStream=void 0;var H=function(t){return{data:t,pos:0}};f.buildStream=H;var T=function(){return function(t){return t.data[t.pos++]}};f.readByte=T;var J=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(a){return a.data[a.pos+t]}};f.peekByte=J;var _=function(t){return function(a){return a.data.subarray(a.pos,a.pos+=t)}};f.readBytes=_;var K=function(t){return function(a){return a.data.subarray(a.pos,a.pos+t)}};f.peekBytes=K;var L=function(t){return function(a){return Array.from(_(t)(a)).map(function(e){return String.fromCharCode(e)}).join("")}};f.readString=L;var N=function(t){return function(a){var e=_(2)(a);return t?(e[1]<<8)+e[0]:(e[0]<<8)+e[1]}};f.readUnsigned=N;var Q=function(t,a){return function(e,n,i){for(var d=typeof a=="function"?a(e,n,i):a,o=_(t),c=new Array(d),l=0;l=g){var m=g-r.pos;u.push((0,e.readBytes)(m)(r)),h+=m;break}u.push((0,e.readBytes)(y)(r)),h+=y}for(var B=new Uint8Array(h),b=0,v=0;v>=o,h-=o,r>n||r==c)break;if(r==i){d=(1<<(o=u+1))-1,n=i+2,p=C;continue}if(p==C){A[m++]=k[r],p=r,y=r;continue}for(l=r,r==n&&(A[m++]=y,r=p);r>i;)A[m++]=k[r],r=M[r];y=255&k[r],A[m++]=y,nc[r],width:i,height:d}}function ce(t){return U??(U=document.createElement("canvas")),D??(D=U.getContext("2d",{willReadFrequently:!0})),U.width=t.width,U.height=t.height,D.putImageData(t,0,0),U}G=x.decompressFrames=se;const le=[71,73,70];function fe(t){const a=new Uint8Array(t);return!le.some((e,n)=>e!==a[n])}function ye(t){if(!fe(t))return!1;const a=new DataView(t),e=a.getUint8(10);let n=13+(128&e?3*2**(1+(7&e)):0),i=0,d=!1;for(;!d;){switch(a.getUint8(n++)){case 33:if(!o())return!1;break;case 44:c();break;case 59:d=!0;break;default:return!1}if(i>1)return!0}function o(){switch(a.getUint8(n++)){case 249:l();break;case 1:p();break;case 254:r();break;case 255:s();break;default:return!1}return!0}function c(){i++,n+=8;const g=a.getUint8(n++);n+=128&g?3*2**(1+(7&g)):0,n++,u()}function l(){n++,n+=4,u()}function p(){i++,n++,n+=12,u()}function r(){u()}function s(){n++,n+=8,n+=3,u()}function u(){let g;for(;g=a.getUint8(n++);)n+=g}return!1}export{ye as isAnimatedGIF,fe as isGIF,ge as parseGif}; diff --git a/build/assets/gltfexport-CoDBzAqk.js b/build/assets/gltfexport-CoDBzAqk.js new file mode 100644 index 0000000..9065101 --- /dev/null +++ b/build/assets/gltfexport-CoDBzAqk.js @@ -0,0 +1 @@ +import{g7 as L,c2 as Y,ar as rt,at as nt,au as I,s as j,c7 as $,hQ as at,a5 as ot,W,bo as ct,c0 as v,hR as q,eb as ht,d1 as ft,V as ut,dH as lt}from"./index-DKOmzAMm.js";import{N as dt,T as mt}from"./quat-BYKy26Om.js";import{o as pt,r as _t,e as gt}from"./quatf64-Bdb9ZJJK.js";import{m as wt}from"./Mesh-DkA8R2dF.js";import{M as At}from"./vertexSpaceConversion-DdxiyRap.js";import{C as p,D as b}from"./enums-CxXC-vJk.js";import{r as U}from"./resourceUtils-CxnhUS9W.js";import"./mat3f64-q3fE-ZOt.js";import"./MeshTransform-CnKLNqg-.js";import"./infoFor3D-DsOdlPuA.js";import"./mat4f64-CSKppSlJ.js";import"./imageUtils-D81CeaJ0.js";import"./MeshVertexAttributes-CfiMg9vN.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./earcut-BqgeR2O3.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./DoubleArray-D2IDWC15.js";import"./Indices-BhOjxL0t.js";import"./plane-aHrUkISy.js";import"./vec2f64-DA6GkJuH.js";import"./deduplicate-B_YKqNj1.js";import"./projection-Ch_noS-l.js";import"./mat3-BNGRf_pC.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./vec3-C6eb5QY9.js";import"./vec4-n1PBj5SL.js";var C;(function(i){i[i.JSON=1313821514]="JSON",i[i.BIN=5130562]="BIN"})(C||(C={}));let M=class N{constructor(t,e){if(!t)throw new Error("GLB requires a JSON gltf chunk");this._length=N.HEADER_SIZE,this._length+=N.CHUNK_HEADER_SIZE;const s=bt(t);if(this._length+=J(s.byteLength,4),e&&(this._length+=N.CHUNK_HEADER_SIZE,this._length+=e.byteLength,e.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const r=this._writeChunk(s,12,C.JSON,32);e&&this._writeChunk(e,r,C.BIN)}_writeHeader(){this._outView.setUint32(0,N.MAGIC,!0),this._outView.setUint32(4,N.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(t,e,s,r=0){const n=J(t.byteLength,4);for(this._outView.setUint32(e,n,!0),this._outView.setUint32(e+=4,s,!0),Tt(this._outView.buffer,t,e+=4,0,t.byteLength),e+=t.byteLength;e%4;)r&&this._outView.setUint8(e,r),e++;return e}};function Tt(i,t,e,s,r){new Uint8Array(i,e,r).set(new Uint8Array(t,s,r),0)}function bt(i){return new TextEncoder().encode(i).buffer}function J(i,t){return t*Math.ceil(i/t)}M.HEADER_SIZE=12,M.CHUNK_HEADER_SIZE=8,M.MAGIC=1179937895,M.VERSION=2;var R,E,y,w,K,O,X;(function(i){i[i.External=0]="External",i[i.DataURI=1]="DataURI",i[i.GLB=2]="GLB"})(R||(R={})),function(i){i[i.External=0]="External",i[i.DataURI=1]="DataURI",i[i.GLB=2]="GLB"}(E||(E={})),function(i){i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(y||(y={})),function(i){i.SCALAR="SCALAR",i.VEC2="VEC2",i.VEC3="VEC3",i.VEC4="VEC4",i.MAT2="MAT2",i.MAT3="MAT3",i.MAT4="MAT4"}(w||(w={})),function(i){i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(K||(K={})),function(i){i.OPAQUE="OPAQUE",i.MASK="MASK",i.BLEND="BLEND"}(O||(O={})),function(i){i[i.NoColor=0]="NoColor",i[i.FaceColor=1]="FaceColor",i[i.VertexColor=2]="VertexColor"}(X||(X={}));let Et=class{constructor(t,e,s,r,n){this._buffer=t,this._componentType=s,this._dataType=r,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,e.bufferViews||(e.bufferViews=[]),this.index=e.bufferViews.length,this._bufferView={buffer:t.index,byteLength:-1,target:n};const a=this._getElementSize();a>=4&&n!==y.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=a),e.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(t){const e=this._data.length;if(this._data.push(t),this._accessorIndex>=0){const s=e%this._numComponentsForDataType,r=this._accessorMin[s];this._accessorMin[s]=typeof r!="number"?t:Math.min(r,t);const n=this._accessorMax[s];this._accessorMax[s]=typeof n!="number"?t:Math.max(n,t)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){function t(e,s){return s*Math.ceil(e/s)}return t(this.dataSize,4)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(t,e){switch(this._componentType){case p.BYTE:return new Int8Array(t,e);case p.FLOAT:return new Float32Array(t,e);case p.SHORT:return new Int16Array(t,e);case p.UNSIGNED_BYTE:return new Uint8Array(t,e);case p.UNSIGNED_INT:return new Uint32Array(t,e);case p.UNSIGNED_SHORT:return new Uint16Array(t,e)}}writeOutToBuffer(t,e){this._createTypedArray(t,e).set(this._data)}writeAsync(t){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=t.then(e=>{const s=new Uint8Array(e);for(let r=0;r=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=t;const e=this._numComponentsForDataType;this._accessorMin=new Array(e),this._accessorMax=new Array(e)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const t=this._getElementSize(),e=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/e;if(s%1)throw new Error("An accessor was ended with missing component values");for(let n=0;nthis._finalizedPromiseResolve=t)}async finalize(){const t=this._bufferView,e=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&e.push(this._asyncWritePromise),await Promise.allSettled(e),this._isFinalized=!0,t.byteOffset=this.getByteOffset(),t.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case p.BYTE:case p.UNSIGNED_BYTE:return 1;case p.SHORT:case p.UNSIGNED_SHORT:return 2;case p.UNSIGNED_INT:case p.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case w.SCALAR:return 1;case w.VEC2:return 2;case w.VEC3:return 3;case w.VEC4:case w.MAT2:return 4;case w.MAT3:return 9;case w.MAT4:return 16}}},Z=class{constructor(t){this._gltf=t,this._bufferViews=[],this._isFinalized=!1,t.buffers||(t.buffers=[]),this.index=t.buffers.length;const e={byteLength:-1};t.buffers.push(e),this._buffer=e}addBufferView(t,e,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const r=new Et(this,this._gltf,t,e,s);return this._bufferViews.push(r),r}getByteOffset(t){let e=0;for(const s of this._bufferViews){if(s===t)return e;e+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(t){const e=[];for(const s of this._bufferViews){if(t&&s===t)return e;e.push(s.finalized)}return e}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const t=this._getTotalSize(),e=new ArrayBuffer(t);let s=0;for(const r of this._bufferViews)r.writeOutToBuffer(e,s),s+=r.byteSize;return e}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then(()=>{this._isFinalized=!0;const t=this.getArrayBuffer();this._buffer.byteLength=t.byteLength,this._buffer.uri=t}),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let t=0;for(const e of this._bufferViews)t+=e.byteSize;return t}};function yt(i,t){if(i.components)for(const e of i.components)e.faces&&e.shading==="smooth"&&Rt(e,t)}function Rt(i,t){t.normal==null&&(t.normal=new Float32Array(t.position.length));const e=i.faces,{position:s,normal:r}=t,n=e.length/3;for(let a=0;ae.toBlob(a,s));if($(t),!r)throw new j("imageToArrayBuffer","Failed to encode image");const n=await r.arrayBuffer();return $(t),{data:n,type:s}}function St(i){if(!(i instanceof HTMLImageElement))return"image/png";const t=i.src;if(at(t)){const e=ot(t);return(e==null?void 0:e.mediaType)==="image/jpeg"?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}function tt(i){if(i instanceof HTMLCanvasElement)return i;if(i instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const e=t.getContext("2d");return i instanceof HTMLImageElement?e.drawImage(i,0,0,i.width,i.height):i instanceof ImageData&&e.putImageData(i,0,0),t}function Lt(i){const t=[],e=new Uint8Array(i);for(let s=0;sut.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class Ot{constructor(t,e){this.options=e,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:t.copyright,generator:t.generator},extras:{output:e.output,binChunkBuffer:null,promises:[]}},this._addScenes(t)}_addScenes(t){this.gltf.scene=t.defaultScene;const e=this.gltf.extras,s=e.output.buffer===R.GLB||e.output.image===E.GLB;s&&(e.binChunkBuffer=new Z(this.gltf)),t.forEachScene(r=>{this._addScene(r)}),s&&e.binChunkBuffer.finalize()}_addScene(t){this.gltf.scenes||(this.gltf.scenes=[]);const e={};t.name&&(e.name=t.name),t.forEachNode(s=>{e.nodes||(e.nodes=[]),e.nodes.push(...this._addNodes(s))}),this.gltf.scenes.push(e)}_addNodes(t){this.gltf.nodes||(this.gltf.nodes=[]);const e={};t.name&&(e.name=t.name);const s=t.translation;W(s,ct)||(e.translation=v(s));const r=t.rotation;dt(r,pt)||(e.rotation=_t(r));const n=t.scale;W(n,q)||(e.scale=v(n));const a=this.gltf.nodes.length;if(this.gltf.nodes.push(e),t.mesh&&t.mesh.vertexAttributes.position){const o=this._createMeshes(t.mesh),c=[a];if(o.length===1)this._addMesh(e,o[0]);else for(const h of o){const f={};this._addMesh(f,h),c.push(this.gltf.nodes.length),this.gltf.nodes.push(f)}return c}return t.forEachNode(o=>{e.children||(e.children=[]),e.children.push(...this._addNodes(o))}),[a]}_addMesh(t,e){var r;(r=this.gltf).meshes??(r.meshes=[]);const s=this.gltf.meshes.length;this.gltf.meshes.push(e),t.mesh=s}_createMeshes(t){var k;const e=this.gltf.extras,s=e.output.buffer===R.GLB;let r;r=s?e.binChunkBuffer:new Z(this.gltf);const n=this.options.origin,a=t.vertexSpace.clone();a.origin=[n.x,n.y,n.z??0];const o=At({vertexAttributes:t.vertexAttributes,vertexSpace:t.vertexSpace,transform:(k=this.options)!=null&&k.ignoreLocalTransform?null:t.transform,spatialReference:t.spatialReference},a,{targetUnit:"meters"});if(!o)return[];yt(t,o),Bt(o);const{position:c,normal:h,tangent:f}=o,{uv:T,color:g}=t.vertexAttributes,m=r.addBufferView(p.FLOAT,w.VEC3,y.ARRAY_BUFFER);let l,d,_,A;h&&(l=r.addBufferView(p.FLOAT,w.VEC3,y.ARRAY_BUFFER)),T&&(d=r.addBufferView(p.FLOAT,w.VEC2,y.ARRAY_BUFFER)),f&&(_=r.addBufferView(p.FLOAT,w.VEC4,y.ARRAY_BUFFER)),g&&(A=r.addBufferView(p.UNSIGNED_BYTE,w.VEC4,y.ARRAY_BUFFER)),m.startAccessor("POSITION"),l&&l.startAccessor("NORMAL"),d&&d.startAccessor("TEXCOORD_0"),_&&_.startAccessor("TANGENT"),A&&A.startAccessor("COLOR_0");const st=o.position.length/3;for(let u=0;u0&&t.components[0].faces?(S=r.addBufferView(p.UNSIGNED_INT,w.SCALAR,y.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(S,t.components,D,H,B,V,z,F)):this._addMeshVertexNonIndexed(t.components,D,H,B,V,z,F),m.finalize(),l&&l.finalize(),d&&d.finalize(),_&&_.finalize(),S&&S.finalize(),A&&A.finalize(),s||r.finalize(),D}_addMaterial(t){if(t===null)return;const e=this._materialMap.indexOf(t);if(e!==-1)return e;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(t.alphaMode){case"mask":s.alphaMode=O.MASK;break;case"auto":case"blend":s.alphaMode=O.BLEND}t.alphaCutoff!==.5&&(s.alphaCutoff=t.alphaCutoff),t.doubleSided&&(s.doubleSided=t.doubleSided),s.pbrMetallicRoughness={};const r=o=>o**2.1,n=o=>{const c=o.toRgba();return c[0]=r(c[0]/255),c[1]=r(c[1]/255),c[2]=r(c[2]/255),c};if(t.color!=null&&(s.pbrMetallicRoughness.baseColorFactor=n(t.color)),t.colorTexture!=null&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(t.colorTexture,t.colorTextureTransform)),t.normalTexture!=null&&(s.normalTexture=this._createTextureInfo(t.normalTexture,t.normalTextureTransform)),t instanceof wt){if(t.emissiveTexture!=null&&(s.emissiveTexture=this._createTextureInfo(t.emissiveTexture,t.emissiveTextureTransform)),t.emissiveColor!=null){const o=n(t.emissiveColor);s.emissiveFactor=[o[0],o[1],o[2]]}t.occlusionTexture!=null&&(s.occlusionTexture=this._createTextureInfo(t.occlusionTexture,t.occlusionTextureTransform)),t.metallicRoughnessTexture!=null&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(t.metallicRoughnessTexture,t.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=t.metallic,s.pbrMetallicRoughness.roughnessFactor=t.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,P().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const a=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(t),a}_createTextureInfo(t,e){const s={index:this._addTexture(t)};return e&&(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:e.scale,offset:e.offset,rotation:ht(e.rotation)}),s}_addTexture(t){const e=this.gltf.textures??[];return this.gltf.textures=e,ft(this._textureMap,t,()=>{const s={sampler:this._addSampler(t),source:this._addImage(t)},r=e.length;return e.push(s),r})}_addImage(t){const e=this._imageMap.get(t);if(e!=null)return e;this.gltf.images||(this.gltf.images=[]);const s={};if(t.url)s.uri=t.url;else{const n=t.data;s.extras=n;for(let o=0;o(s.mimeType=f,h));a.promises.push(o.writeAsync(c).then(()=>{o.finalize()}))}s.bufferView=o.index;break}case E.DataURI:if(U(n)){P().warnOnce("Image export for basis compressed textures not available.");break}s.uri=It(n);break;default:if(U(n)){P().warnOnce("Image export for basis compressed textures not available.");break}a.promises.push(Q(n,this.options.signal).then(({data:o,type:c})=>{s.uri=o,s.mimeType=c}))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(t,r),r}_addSampler(t){this.gltf.samplers||(this.gltf.samplers=[]);let e=b.REPEAT,s=b.REPEAT;if(typeof t.wrap=="string")switch(t.wrap){case"clamp":e=b.CLAMP_TO_EDGE,s=b.CLAMP_TO_EDGE;break;case"mirror":e=b.MIRRORED_REPEAT,s=b.MIRRORED_REPEAT}else{switch(t.wrap.vertical){case"clamp":s=b.CLAMP_TO_EDGE;break;case"mirror":s=b.MIRRORED_REPEAT}switch(t.wrap.horizontal){case"clamp":e=b.CLAMP_TO_EDGE;break;case"mirror":e=b.MIRRORED_REPEAT}}const r={wrapS:e,wrapT:s};for(let a=0;a{var l,d;if(g!=="extras"){if(m instanceof ArrayBuffer){if(Ct(m))switch((l=t.output)==null?void 0:l.image){case E.DataURI:case E.GLB:break;case E.External:default:{const _=`img${n}.png`;return n++,c.set(_,m),_}}switch((d=t.output)==null?void 0:d.buffer){case R.DataURI:return Lt(m);case R.GLB:if(a)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(a=m);case R.External:default:{const _=`data${r}.bin`;return r++,c.set(_,m),_}}}return m}},o);return((f=t.output)==null?void 0:f.buffer)===R.GLB||((T=t.output)==null?void 0:T.image)===E.GLB?c.set(et,new M(h,a).buffer):c.set(Dt,h),c}async function Pt(i,t){const e=(await Ut(i,{output:{buffer:R.GLB,image:E.GLB},jsonSpacing:0,...t})).get(et);if(!(e&&e instanceof ArrayBuffer))throw new Error("failed to export to glb");return e}async function we(i,t){const e=new Vt,s=new zt;return e.addScene(s),s.addNode(new Ft(i)),await Pt(e,{origin:i.origin,...t})}export{we as toBinaryGLTF}; diff --git a/build/assets/groupLayerUtils-4Z2LmSaU.js b/build/assets/groupLayerUtils-4Z2LmSaU.js new file mode 100644 index 0000000..7f9809b --- /dev/null +++ b/build/assets/groupLayerUtils-4Z2LmSaU.js @@ -0,0 +1 @@ +import{$ as l,j as y}from"./utils-V4fw_T9z.js";import{o as f}from"./jsonContext-SE-5k22x.js";import{m as v,a as d,f as s,i as I}from"./index-DKOmzAMm.js";import{p as i}from"./resourceUtils-CwAv7wd8.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";import"./resourceUtils-Cz4P0EKM.js";const n="Group Layer",g="group-layer-save",A="group-layer-save-as",o=s.GROUP_LAYER_MAP;function c(e){return{isValid:e.type==="group",errorMessage:"Layer.type should be 'group'"}}function P(e){return{isValid:v(e,o),errorMessage:`Layer.portalItem.typeKeywords should have '${o}'`}}function m(e,r){return{...f(e,"web-map",!0),initiator:r}}function u(e){const r=e.layerJSON;return Promise.resolve(r&&Object.keys(r).length?r:null)}async function R(e,r){r.title||(r.title=e.title),d(r,s.METADATA),I(r,o)}async function b(e,r){return l({layer:e,itemType:n,validateLayer:c,validateItem:P,createJSONContext:t=>m(t,e),createItemData:u,errorNamePrefix:g,saveResources:async(t,a)=>(e.sourceIsPortalItem||await t.removeAllResources().catch(()=>{}),i(e.resourceReferences,a))},r)}async function D(e,r,t){return y({layer:e,itemType:n,validateLayer:c,createJSONContext:a=>m(a,e),createItemData:u,errorNamePrefix:A,newItem:r,setItemProperties:R,saveResources:(a,p)=>i(e.resourceReferences,p)},t)}export{b as save,D as saveAs}; diff --git a/build/assets/hydrated-awHE-vOn.js b/build/assets/hydrated-awHE-vOn.js new file mode 100644 index 0000000..0b38995 --- /dev/null +++ b/build/assets/hydrated-awHE-vOn.js @@ -0,0 +1 @@ +import{Q as r,aX as c,ax as h,aY as x,aZ as m}from"./index-DKOmzAMm.js";const P={convertToGEGeometry:g,exportPoint:p,exportPolygon:u,exportPolyline:l,exportMultipoint:f,exportExtent:M};function g(t,e){if(e==null)return null;let a="cache"in e?e.cache._geVersion:void 0;return a==null&&(a=t.convertJSONToGeometry(e),"cache"in e&&(e.cache._geVersion=a)),a}function p(t,e,a){const o=t.hasZ(e),i=t.hasM(e),s=new r({x:t.getPointX(e),y:t.getPointY(e),spatialReference:a});return o&&(s.z=t.getPointZ(e)),i&&(s.m=t.getPointM(e)),s.cache._geVersion=e,s}function u(t,e,a){const o=new c({rings:t.exportPaths(e),hasZ:t.hasZ(e),hasM:t.hasM(e),spatialReference:a});return o.cache._geVersion=e,o}function l(t,e,a){const o=new h({paths:t.exportPaths(e),hasZ:t.hasZ(e),hasM:t.hasM(e),spatialReference:a});return o.cache._geVersion=e,o}function f(t,e,a){const o=new x({hasZ:t.hasZ(e),hasM:t.hasM(e),points:t.exportPoints(e),spatialReference:a});return o.cache._geVersion=e,o}function M(t,e,a){const o=t.hasZ(e),i=t.hasM(e),s=new m({xmin:t.getXMin(e),ymin:t.getYMin(e),xmax:t.getXMax(e),ymax:t.getYMax(e),spatialReference:a});if(o){const n=t.getZExtent(e);s.zmin=n.vmin,s.zmax=n.vmax}if(i){const n=t.getMExtent(e);s.mmin=n.vmin,s.mmax=n.vmax}return s.cache._geVersion=e,s}export{P as hydratedAdapter}; diff --git a/build/assets/i3s-DfJIXEvM.js b/build/assets/i3s-DfJIXEvM.js new file mode 100644 index 0000000..0ac9ca8 --- /dev/null +++ b/build/assets/i3s-DfJIXEvM.js @@ -0,0 +1,2 @@ +import{o as un}from"./_commonjsHelpers-DCkdB7M8.js";var It,it,Ot,Ht={exports:{}};It=Ht,it=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,Ot=function(J={}){var ot,z,i=J!==void 0?J:{};i.ready=new Promise((t,e)=>{ot=t,z=e});var at=Object.assign({},i),ut=typeof window=="object",D=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var K,b="";function zt(t){return i.locateFile?i.locateFile(t,b):b+t}(ut||D)&&(D?b=self.location.href:typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),it&&(b=it),b=b.indexOf("blob:")!==0?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",D&&(K=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}));var U,V,Dt=i.print||console.log.bind(console),F=i.printErr||console.warn.bind(console);Object.assign(i,at),at=null,i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(U=i.wasmBinary),i.noExitRuntime,typeof WebAssembly!="object"&&B("no native wasm support detected");var E,v,R,M,W,p,ct,st,ft,lt=!1;function dt(){var t=V.buffer;i.HEAP8=E=new Int8Array(t),i.HEAP16=R=new Int16Array(t),i.HEAP32=W=new Int32Array(t),i.HEAPU8=v=new Uint8Array(t),i.HEAPU16=M=new Uint16Array(t),i.HEAPU32=p=new Uint32Array(t),i.HEAPF32=ct=new Float32Array(t),i.HEAPF64=st=new Float64Array(t)}var pt=[],vt=[],ht=[];function Vt(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)qt(i.preRun.shift());Q(pt)}function Mt(){Q(vt)}function Bt(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)Lt(i.postRun.shift());Q(ht)}function qt(t){pt.unshift(t)}function Nt(t){vt.unshift(t)}function Lt(t){ht.unshift(t)}var k=0,I=null;function $t(t){k++,i.monitorRunDependencies&&i.monitorRunDependencies(k)}function Gt(t){if(k--,i.monitorRunDependencies&&i.monitorRunDependencies(k),k==0&&I){var e=I;I=null,e()}}function B(t){i.onAbort&&i.onAbort(t),F(t="Aborted("+t+")"),lt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw z(e),e}var O,Xt="data:application/octet-stream;base64,";function mt(t){return t.startsWith(Xt)}function gt(t){try{if(t==O&&U)return new Uint8Array(U);if(K)return K(t);throw"both async and sync fetching of the wasm failed"}catch(e){B(e)}}function Zt(t){return U||!ut&&!D||typeof fetch!="function"?Promise.resolve().then(()=>gt(t)):fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>gt(t))}function yt(t,e,n){return Zt(t).then(r=>WebAssembly.instantiate(r,e)).then(r=>r).then(n,r=>{F("failed to asynchronously prepare wasm: "+r),B(r)})}function Jt(t,e,n,r){return t||typeof WebAssembly.instantiateStreaming!="function"||mt(e)||typeof fetch!="function"?yt(e,n,r):fetch(e,{credentials:"same-origin"}).then(o=>WebAssembly.instantiateStreaming(o,n).then(r,function(u){return F("wasm streaming compile failed: "+u),F("falling back to ArrayBuffer instantiation"),yt(e,n,r)}))}function Kt(){var t={env:Rt,wasi_snapshot_preview1:Rt};function e(r,o){var u=r.exports;return i.asm=u,V=i.asm.memory,dt(),ft=i.asm.__indirect_function_table,Nt(i.asm.__wasm_call_ctors),Gt(),u}function n(r){e(r.instance)}if($t(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(r){F("Module.instantiateWasm callback failed with error: "+r),z(r)}return Jt(U,O,t,n).catch(z),{}}function Q(t){for(;t.length>0;)t.shift()(i)}mt(O="i3s.wasm")||(O=zt(O));var q=[];function Y(t){var e=q[t];return e||(t>=q.length&&(q.length=t+1),q[t]=e=ft.get(t)),e}function Qt(t,e){Y(t)(e)}function Yt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){p[this.ptr+4>>2]=e},this.get_type=function(){return p[this.ptr+4>>2]},this.set_destructor=function(e){p[this.ptr+8>>2]=e},this.get_destructor=function(){return p[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12|0]=e},this.get_caught=function(){return E[this.ptr+12|0]!=0},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13|0]=e},this.get_rethrown=function(){return E[this.ptr+13|0]!=0},this.init=function(e,n){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(n)},this.set_adjusted_ptr=function(e){p[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return p[this.ptr+16>>2]},this.get_exception_ptr=function(){if(xt(this.get_type()))return p[this.excPtr>>2];var e=this.get_adjusted_ptr();return e!==0?e:this.excPtr}}function te(t,e,n){throw new Yt(t).init(e,n),t}var N={};function _t(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function L(t){return this.fromWireType(W[t>>2])}var S={},j={},$={},ee=48,ne=57;function re(t){if(t===void 0)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ee&&e<=ne?"_"+t:t}function ie(t,e){return t=re(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function tt(t,e){var n=ie(e,function(r){this.name=e,this.message=r;var o=new Error(r).stack;o!==void 0&&(this.stack=this.toString()+` +`+o.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var wt=void 0;function bt(t){throw new wt(t)}function At(t,e,n){function r(a){var s=n(a);s.length!==t.length&&bt("Mismatched type converter count");for(var f=0;f{j.hasOwnProperty(a)?o[s]=j[a]:(u.push(a),S.hasOwnProperty(a)||(S[a]=[]),S[a].push(()=>{o[s]=j[a],++c===u.length&&r(o)}))}),u.length===0&&r(o)}function oe(t){var e=N[t];delete N[t];var n=e.rawConstructor,r=e.rawDestructor,o=e.fields;At([t],o.map(u=>u.getterReturnType).concat(o.map(u=>u.setterArgumentType)),u=>{var c={};return o.forEach((a,s)=>{var f=a.fieldName,l=u[s],d=a.getter,C=a.getterContext,y=u[s+o.length],_=a.setter,P=a.setterContext;c[f]={read:w=>l.fromWireType(d(C,w)),write:(w,rt)=>{var Z=[];_(P,w,y.toWireType(Z,rt)),_t(Z)}}}),[{name:e.name,fromWireType:function(a){var s={};for(var f in c)s[f]=c[f].read(a);return r(a),s},toWireType:function(a,s){for(var f in c)if(!(f in s))throw new TypeError('Missing field: "'+f+'"');var l=n();for(f in c)c[f].write(l,s[f]);return a!==null&&a.push(r,l),l},argPackAdvance:8,readValueFromPointer:L,destructorFunction:r}]})}function ae(t,e,n,r,o){}function et(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}function ue(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Tt=t}var Tt=void 0;function h(t){for(var e="",n=t;v[n];)e+=Tt[v[n++]];return e}var Ct=void 0;function m(t){throw new Ct(t)}function A(t,e,n={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=e.name;if(t||m('type "'+r+'" must have a positive integer typeid pointer'),j.hasOwnProperty(t)){if(n.ignoreDuplicateRegistrations)return;m("Cannot register type '"+r+"' twice")}if(j[t]=e,delete $[t],S.hasOwnProperty(t)){var o=S[t];delete S[t],o.forEach(u=>u())}}function ce(t,e,n,r,o){var u=et(n);A(t,{name:e=h(e),fromWireType:function(c){return!!c},toWireType:function(c,a){return a?r:o},argPackAdvance:8,readValueFromPointer:function(c){var a;if(n===1)a=E;else if(n===2)a=R;else{if(n!==4)throw new TypeError("Unknown boolean type size: "+e);a=W}return this.fromWireType(a[c>>u])},destructorFunction:null})}function se(){this.allocated=[void 0],this.freelist=[],this.get=function(t){return this.allocated[t]},this.allocate=function(t){let e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},this.free=function(t){this.allocated[t]=void 0,this.freelist.push(t)}}var g=new se;function Pt(t){t>=g.reserved&&--g.get(t).refcount==0&&g.free(t)}function fe(){for(var t=0,e=g.reserved;e(t||m("Cannot use deleted val. handle = "+t),g.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return g.allocate({refcount:1,value:t})}}};function de(t,e){A(t,{name:e=h(e),fromWireType:function(n){var r=G.toValue(n);return Pt(n),r},toWireType:function(n,r){return G.toHandle(r)},argPackAdvance:8,readValueFromPointer:L,destructorFunction:null})}function pe(t,e){switch(e){case 2:return function(n){return this.fromWireType(ct[n>>2])};case 3:return function(n){return this.fromWireType(st[n>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ve(t,e,n){var r=et(n);A(t,{name:e=h(e),fromWireType:function(o){return o},toWireType:function(o,u){return u},argPackAdvance:8,readValueFromPointer:pe(e,r),destructorFunction:null})}function he(t,e,n,r,o,u){var c=e.length;c<2&&m("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=e[1]!==null&&n!==null,s=!1,f=1;f>2]);return n}function _e(t,e,n){i.hasOwnProperty(t)||bt("Replacing nonexistant public symbol"),i[t].overloadTable!==void 0&&n!==void 0?i[t].overloadTable[n]=e:(i[t]=e,i[t].argCount=n)}function we(t,e,n){var r=i["dynCall_"+t];return n&&n.length?r.apply(null,[e].concat(n)):r.call(null,e)}function be(t,e,n){return t.includes("j")?we(t,e,n):Y(e).apply(null,n)}function Ae(t,e){var n=[];return function(){return n.length=0,Object.assign(n,arguments),be(t,e,n)}}function H(t,e){function n(){return t.includes("j")?Ae(t,e):Y(e)}t=h(t);var r=n();return typeof r!="function"&&m("unknown function pointer with signature "+t+": "+e),r}var Et=void 0;function Wt(t){var e=St(t),n=h(e);return T(e),n}function Te(t,e){var n=[],r={};function o(u){r[u]||j[u]||($[u]?$[u].forEach(o):(n.push(u),r[u]=!0))}throw e.forEach(o),new Et(t+": "+n.map(Wt).join([", "]))}function Ce(t,e,n,r,o,u,c){var a=ye(e,n);t=h(t),o=H(r,o),ge(t,function(){Te("Cannot call "+t+" due to unbound types",a)},e-1),At([],a,function(s){var f=[s[0],null].concat(s.slice(1));return _e(t,he(t,f,null,o,u),e-1),[]})}function Pe(t,e,n){switch(e){case 0:return n?function(r){return E[r]}:function(r){return v[r]};case 1:return n?function(r){return R[r>>1]}:function(r){return M[r>>1]};case 2:return n?function(r){return W[r>>2]}:function(r){return p[r>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Ee(t,e,n,r,o){e=h(e);var u=et(n),c=l=>l;if(r===0){var a=32-8*n;c=l=>l<>>a}var s=e.includes("unsigned"),f=(l,d)=>{};A(t,{name:e,fromWireType:c,toWireType:s?function(l,d){return f(d,this.name),d>>>0}:function(l,d){return f(d,this.name),d},argPackAdvance:8,readValueFromPointer:Pe(e,u,r!==0),destructorFunction:null})}function We(t,e,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(u){var c=p,a=c[u>>=2],s=c[u+1];return new r(c.buffer,s,a)}A(t,{name:n=h(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function ke(t,e,n,r){if(!(r>0))return 0;for(var o=n,u=n+r-1,c=0;c=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++c)),a<=127){if(n>=u)break;e[n++]=a}else if(a<=2047){if(n+1>=u)break;e[n++]=192|a>>6,e[n++]=128|63&a}else if(a<=65535){if(n+2>=u)break;e[n++]=224|a>>12,e[n++]=128|a>>6&63,e[n++]=128|63&a}else{if(n+3>=u)break;e[n++]=240|a>>18,e[n++]=128|a>>12&63,e[n++]=128|a>>6&63,e[n++]=128|63&a}}return e[n]=0,n-o}function je(t,e,n){return ke(t,v,e,n)}function Fe(t){for(var e=0,n=0;n=55296&&r<=57343?(e+=4,++n):e+=3}return e}var kt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function jt(t,e,n){for(var r=e+n,o=e;t[o]&&!(o>=r);)++o;if(o-e>16&&t.buffer&&kt)return kt.decode(t.subarray(e,o));for(var u="";e>10,56320|1023&f)}}else u+=String.fromCharCode((31&c)<<6|a)}else u+=String.fromCharCode(c)}return u}function Re(t,e){return t?jt(v,t,e):""}function Se(t,e){var n=(e=h(e))==="std::string";A(t,{name:e,fromWireType:function(r){var o,u=p[r>>2],c=r+4;if(n)for(var a=c,s=0;s<=u;++s){var f=c+s;if(s==u||v[f]==0){var l=Re(a,f-a);o===void 0?o=l:(o+="\0",o+=l),a=f+1}}else{var d=new Array(u);for(s=0;s>2]=u,n&&c)je(o,s,u+1);else if(c)for(var f=0;f255&&(T(s),m("String has UTF-16 code units that do not fit in 8 bits")),v[s+f]=l}else for(f=0;f>1,o=r+e/2;!(r>=o)&&M[r];)++r;if((n=r<<1)-t>32&&Ft)return Ft.decode(v.subarray(t,n));for(var u="",c=0;!(c>=e/2);++c){var a=R[t+2*c>>1];if(a==0)break;u+=String.fromCharCode(a)}return u}function Ue(t,e,n){if(n===void 0&&(n=2147483647),n<2)return 0;for(var r=e,o=(n-=2)<2*t.length?n/2:t.length,u=0;u>1]=c,e+=2}return R[e>>1]=0,e-r}function Ie(t){return 2*t.length}function Oe(t,e){for(var n=0,r="";!(n>=e/4);){var o=W[t+4*n>>2];if(o==0)break;if(++n,o>=65536){var u=o-65536;r+=String.fromCharCode(55296|u>>10,56320|1023&u)}else r+=String.fromCharCode(o)}return r}function He(t,e,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var r=e,o=r+n-4,u=0;u=55296&&c<=57343&&(c=65536+((1023&c)<<10)|1023&t.charCodeAt(++u)),W[e>>2]=c,(e+=4)+4>o)break}return W[e>>2]=0,e-r}function ze(t){for(var e=0,n=0;n=55296&&r<=57343&&++n,e+=4}return e}function De(t,e,n){var r,o,u,c,a;n=h(n),e===2?(r=xe,o=Ue,c=Ie,u=()=>M,a=1):e===4&&(r=Oe,o=He,c=ze,u=()=>p,a=2),A(t,{name:n,fromWireType:function(s){for(var f,l=p[s>>2],d=u(),C=s+4,y=0;y<=l;++y){var _=s+4+y*e;if(y==l||d[_>>a]==0){var P=r(C,_-C);f===void 0?f=P:(f+="\0",f+=P),C=_+e}}return T(s),f},toWireType:function(s,f){typeof f!="string"&&m("Cannot pass non-string to C++ string type "+n);var l=c(f),d=nt(4+l+e);return p[d>>2]=l>>a,o(f,d+4,l+e),s!==null&&s.push(T,d),d},argPackAdvance:8,readValueFromPointer:L,destructorFunction:function(s){T(s)}})}function Ve(t,e,n,r,o,u){N[t]={name:h(e),rawConstructor:H(n,r),rawDestructor:H(o,u),fields:[]}}function Me(t,e,n,r,o,u,c,a,s,f){N[t].fields.push({fieldName:h(e),getterReturnType:n,getter:H(r,o),getterContext:u,setterArgumentType:c,setter:H(a,s),setterContext:f})}function Be(t,e){A(t,{isVoid:!0,name:e=h(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(n,r){}})}function qe(t){t>4&&(g.get(t).refcount+=1)}var Ne={};function Le(t){var e=Ne[t];return e===void 0?h(t):e}function $e(t){return G.toHandle(Le(t))}function Ge(t,e){var n=j[t];return n===void 0&&m(e+" has unknown type "+Wt(t)),n}function Xe(t,e){var n=(t=Ge(t,"_emval_take_value")).readValueFromPointer(e);return G.toHandle(n)}function Ze(){B("")}function Je(t,e,n){v.copyWithin(t,e,e+n)}function Ke(){return 2147483648}function Qe(t){var e=V.buffer;try{return V.grow(t-e.byteLength+65535>>>16),dt(),1}catch{}}function Ye(t){var e=v.length;t>>>=0;var n=Ke();if(t>n)return!1;let r=(c,a)=>c+(a-c%a)%a;for(var o=1;o<=4;o*=2){var u=e*(1+.2/o);if(u=Math.min(u,t+100663296),Qe(Math.min(n,r(Math.max(t,u),65536))))return!0}return!1}function tn(t){return 52}function en(t,e,n,r,o){return 70}var nn=[null,[],[]];function rn(t,e){var n=nn[t];e===0||e===10?((t===1?Dt:F)(jt(n,0)),n.length=0):n.push(e)}function on(t,e,n,r){for(var o=0,u=0;u>2],a=p[e+4>>2];e+=8;for(var s=0;s>2]=o,0}wt=i.InternalError=tt(Error,"InternalError"),ue(),Ct=i.BindingError=tt(Error,"BindingError"),le(),Et=i.UnboundTypeError=tt(Error,"UnboundTypeError");var Rt={__call_sighandler:Qt,__cxa_throw:te,_embind_finalize_value_object:oe,_embind_register_bigint:ae,_embind_register_bool:ce,_embind_register_emval:de,_embind_register_float:ve,_embind_register_function:Ce,_embind_register_integer:Ee,_embind_register_memory_view:We,_embind_register_std_string:Se,_embind_register_std_wstring:De,_embind_register_value_object:Ve,_embind_register_value_object_field:Me,_embind_register_void:Be,_emval_decref:Pt,_emval_incref:qe,_emval_new_cstring:$e,_emval_take_value:Xe,abort:Ze,emscripten_memcpy_big:Je,emscripten_resize_heap:Ye,fd_close:tn,fd_seek:en,fd_write:on};Kt();var nt=function(){return(nt=i.asm.malloc).apply(null,arguments)},T=function(){return(T=i.asm.free).apply(null,arguments)},St=function(){return(St=i.asm.__getTypeName).apply(null,arguments)};i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm._embind_initialize_bindings).apply(null,arguments)};var X,xt=function(){return(xt=i.asm.__cxa_is_pointer_type).apply(null,arguments)};function Ut(){function t(){X||(X=!0,i.calledRun=!0,lt||(Mt(),ot(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),Bt()))}k>0||(Vt(),k>0||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),t()},1)):t()))}if(i.dynCall_vij=function(){return(i.dynCall_vij=i.asm.dynCall_vij).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.dynCall_jiji).apply(null,arguments)},I=function t(){X||Ut(),X||(I=t)},i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ut(),J.ready},It.exports=Ot;const cn=un(Ht.exports),fn=Object.freeze(Object.defineProperty({__proto__:null,default:cn},Symbol.toStringTag,{value:"Module"}));export{fn as i}; diff --git a/build/assets/icon-ifbWMk17.js b/build/assets/icon-ifbWMk17.js new file mode 100644 index 0000000..ce48164 --- /dev/null +++ b/build/assets/icon-ifbWMk17.js @@ -0,0 +1,25 @@ +import{dq as I,dp as B,h3 as x,p as Z,H as G,b,c as K}from"./index-DKOmzAMm.js";import{x as W,a as F,u as q,t as J}from"./component-BUnDTGFH.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const D=new WeakMap,L=new WeakMap;function xe(e){L.set(e,new Promise(t=>D.set(e,t)))}function Fe(e){D.get(e)()}function X(e){return L.get(e)}async function De(e){if(await X(e),!!I())return B(e),new Promise(t=>requestAnimationFrame(()=>t()))}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const M=["0","1","2","3","4","5","6","7","8","9"];/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */function z(e,t,n){if(!I())return;const s=Q(e);return new s(t,n)}function Q(e){class t extends window.MutationObserver{constructor(s){super(s),this.observedEntry=[],this.callback=s}observe(s,i){return this.observedEntry.push({target:s,options:i}),super.observe(s,i)}unobserve(s){const i=this.observedEntry.filter(r=>r.target!==s);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),i.forEach(r=>this.observe(r.target,r.options))}}return function(){return e==="intersection"?window.IntersectionObserver:e==="mutation"?t:window.ResizeObserver}()}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const Y=new RegExp("\\.(0+)?$"),V=new RegExp("0+$");class a{constructor(t){if(t instanceof a)return t;const[n,s]=re(t).split(".").concat("");this.value=BigInt(n+s.padEnd(a.DECIMALS,"0").slice(0,a.DECIMALS))+BigInt(a.ROUNDED&&s[a.DECIMALS]>="5"),this.isNegative=t.charAt(0)==="-"}getIntegersAndDecimals(){const t=this.value.toString().replace("-","").padStart(a.DECIMALS+1,"0"),n=t.slice(0,-a.DECIMALS),s=t.slice(-a.DECIMALS).replace(V,"");return{integers:n,decimals:s}}toString(){const{integers:t,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${t}${n.length?"."+n:""}`}formatToParts(t){const{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=t.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&i.unshift({type:"minusSign",value:t.minusSign}),s.length&&(i.push({type:"decimal",value:t.decimal}),s.split("").forEach(r=>i.push({type:"fraction",value:r}))),i}format(t){const{integers:n,decimals:s}=this.getIntegersAndDecimals(),i=`${this.isNegative?t.minusSign:""}${t.numberFormatter.format(BigInt(n))}`,r=s.length?`${t.decimal}${s.split("").map(c=>t.numberFormatter.format(Number(c))).join("")}`:"";return`${i}${r}`}add(t){return a.fromBigInt(this.value+new a(t).value)}subtract(t){return a.fromBigInt(this.value-new a(t).value)}multiply(t){return a._divRound(this.value*new a(t).value,a.SHIFT)}divide(t){return a._divRound(this.value*a.SHIFT,new a(t).value)}}a.DECIMALS=100;a.ROUNDED=!0;a.SHIFT=BigInt("1"+"0".repeat(a.DECIMALS));a._divRound=(e,t)=>a.fromBigInt(e/t+(a.ROUNDED?e*BigInt(2)/t%BigInt(2):BigInt(0)));a.fromBigInt=e=>Object.assign(Object.create(a.prototype),{value:e,isNegative:e{let n=!1;const s=t.split("").filter((i,r)=>i.match(/\./g)&&!n?(n=!0,!0):i.match(/-/g)&&r===0?!0:M.includes(i)).join("");return S(s)?new a(s).toString():""})}const k=/^([-0])0+(?=\d)/,ee=/(?!^\.)\.$/,te=/(?!^-)-/g,ne=/^-\b0\b\.?0*$/,se=/0*$/,Me=e=>y(e,t=>{const n=t.replace(te,"").replace(ee,"").replace(k,"$1");return S(n)?ne.test(n)?n:ie(n):t});function ie(e){const t=e.split(".")[1],n=new a(e).toString(),[s,i]=n.split(".");return t&&i!==t?`${s}.${t}`:n}function y(e,t){if(!e)return e;const n=e.toLowerCase().indexOf("e")+1;return n?e.replace(/[eE]*$/g,"").substring(0,n).concat(e.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,i)=>t(i===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):t(e)}function re(e){const t=e.split(/[eE]/);if(t.length===1)return e;const n=+e;if(Number.isSafeInteger(n))return`${n}`;const s=e.charAt(0)==="-",i=+t[1],r=t[0].split("."),c=(s?r[0].substring(1):r[0])||"",g=r[1]||"",l=(u,h)=>{const m=Math.abs(h)-u.length,$=m>0?`${"0".repeat(m)}${u}`:u;return`${$.slice(0,h)}.${$.slice(h)}`},f=(u,h)=>{const m=h>u.length?`${u}${"0".repeat(h-u.length)}`:u;return`${m.slice(0,h)}.${m.slice(h)}`},o=i>0?`${c}${f(g,i)}`:`${l(c,i)}${g}`;return`${s?"-":""}${o.charAt(0)==="."?"0":""}${o.replace(Y,"").replace(k,"")}`}function ae(e){return M.some(t=>e.includes(t))}function ze(e,t,n){const s=t.split(".")[1];if(s){const i=s.match(se)[0];if(i&&n.delocalize(e).length!==t.length&&s.indexOf("e")===-1){const r=n.decimal;return e=e.includes(r)?e:`${e}${r}`,e.padEnd(e.length+i.length,n.localize("0"))}}return e}const d="en",ce=["ar","bg","bs","ca","cs","da","de","el",d,"es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","no","nl","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],oe=["ar","bg","bs","ca","cs","da","de","de-AT","de-CH","el",d,"en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","no","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],le=["arab","arabext","latn"],A=e=>le.includes(e),E=new Intl.NumberFormat().resolvedOptions().numberingSystem,_=E==="arab"||!A(E)?"latn":E,ue=e=>A(e)?e:_;function R(e,t="cldr"){const n=t==="cldr"?oe:ce;return e?n.includes(e)?e:(e=e.toLowerCase(),e==="nb"?"no":t==="t9n"&&e==="pt"?"pt-BR":(e.includes("-")&&(e=e.replace(/(\w+)-(\w+)/,(s,i,r)=>`${i}-${r.toUpperCase()}`),n.includes(e)||(e=e.split("-")[0])),e==="zh"?"zh-CN":n.includes(e)?e:(console.warn(`Translations for the "${e}" locale are not available and will fall back to the default, English (en).`),d))):d}const p=new Set;function ke(e){he(e),p.size===0&&(w==null||w.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})),p.add(e)}function he(e){e.effectiveLocale=de(e)}function Ae(e){p.delete(e),p.size===0&&w.disconnect()}const w=z("mutation",e=>{e.forEach(t=>{const n=t.target;p.forEach(s=>{if(!W(n,s.el))return;const r=F(s.el,"[lang]");if(!r){s.effectiveLocale=d;return}const c=r.lang;s.effectiveLocale=r.hasAttribute("lang")&&c===""?d:c})})});function de(e){var t;return e.el.lang||((t=F(e.el,"[lang]"))==null?void 0:t.lang)||document.documentElement.lang||d}class ge{constructor(){this.delocalize=t=>this._numberFormatOptions?y(t,n=>n.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)):t,this.localize=t=>this._numberFormatOptions?y(t,n=>S(n.trim())?new a(n.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):n):t}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(t){if(t.locale=R(t==null?void 0:t.locale),t.numberingSystem=ue(t==null?void 0:t.numberingSystem),!this._numberFormatOptions&&t.locale===d&&t.numberingSystem===_&&Object.keys(t).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(t))return;this._numberFormatOptions=t,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();const n=new Map(this._digits.map((i,r)=>[i,r])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1);this._actualGroup=s.find(i=>i.type==="group").value,this._group=this._actualGroup.trim().length===0||this._actualGroup==" "?" ":this._actualGroup,this._decimal=s.find(i=>i.type==="decimal").value,this._minusSign=s.find(i=>i.type==="minusSign").value,this._getDigitIndex=i=>n.get(i)}}const _e=new ge;/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const v={};async function fe(e,t){const n=`${t}_${e}`;return v[n]||(v[n]=fetch(x(`./assets/${t}/t9n/messages_${e}.json`)).then(s=>(s.ok||N(),s.json())).catch(()=>N())),v[n]}function N(){throw new Error("could not fetch component message bundle")}function O(e){e.messages={...e.defaultMessages,...e.messageOverrides}}function me(){}async function Re(e){e.defaultMessages=await P(e,e.effectiveLocale),O(e)}async function P(e,t){if(!I())return{};const{el:n}=e,i=n.tagName.toLowerCase().replace("calcite-","");return fe(R(t,"t9n"),i)}async function Pe(e,t){e.defaultMessages=await P(e,t),O(e)}function Te(e){e.onMessagesChange=pe}function je(e){e.onMessagesChange=me}function pe(){O(this)}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const be={icon:"icon",flipRtl:"flip-rtl"},T={},C={},j={s:16,m:24,l:32};function U({icon:e,scale:t}){const n=j[t],s=ye(e),i=s.charAt(s.length-1)==="F";return`${i?s.substring(0,s.length-1):s}${n}${i?"F":""}`}async function ve(e){const t=U(e),n=H(t);if(n)return n;C[t]||(C[t]=fetch(x(`./assets/icon/${t}.json`)).then(i=>i.json()).catch(()=>(console.error(`"${t}" is not a valid calcite-ui-icon name`),"")));const s=await C[t];return T[t]=s,s}function we(e){return H(U(e))}function H(e){return T[e]}function ye(e){const t=!isNaN(Number(e.charAt(0))),n=e.split("-");if(n.length>0){const i=/[a-z]/i;e=n.map((r,c)=>r.replace(i,function(l,f){return c===0&&f===0?l:l.toUpperCase()})).join("")}return t?`i${e}`:e}const Ie=":host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}",$e=Ie,Ee=Z(class extends G{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.icon=null,this.flipRtl=!1,this.scale="m",this.textLabel=void 0,this.pathData=void 0,this.visible=!1}connectedCallback(){this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.intersectionObserver=null}render(){const{el:t,flipRtl:n,pathData:s,scale:i,textLabel:r}=this,c=q(t),g=j[i],l=!!r,f=[].concat(s||"");return b(K,{key:"724265acdc6fb528bf7b25d7ec445c73a63f4c8e","aria-hidden":J(!l),"aria-label":l?r:null,role:l?"img":null},b("svg",{key:"864ee2d80bebd282543ba5d94c57f84b48a6204d","aria-hidden":"true",class:{[be.flipRtl]:c==="rtl"&&n,svg:!0},fill:"currentColor",height:"100%",viewBox:`0 0 ${g} ${g}`,width:"100%",xmlns:"http://www.w3.org/2000/svg"},f.map(o=>typeof o=="string"?b("path",{d:o}):b("path",{d:o.d,opacity:"opacity"in o?o.opacity:1}))))}async loadIconPathData(){const{icon:t,scale:n,visible:s}=this;if(!I()||!t||!s)return;const i={icon:t,scale:n},r=we(i)||await ve(i);t===this.icon&&(this.pathData=r)}waitUntilVisible(t){if(this.intersectionObserver=z("intersection",n=>{n.forEach(s=>{s.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{icon:["loadIconPathData"],scale:["loadIconPathData"]}}static get style(){return $e}},[1,"calcite-icon",{icon:[513],flipRtl:[516,"flip-rtl"],scale:[513],textLabel:[1,"text-label"],pathData:[32],visible:[32]},void 0,{icon:["loadIconPathData"],scale:["loadIconPathData"]}]);function Ce(){if(typeof customElements>"u")return;["calcite-icon"].forEach(t=>{switch(t){case"calcite-icon":customElements.get(t)||customElements.define(t,Ee);break}})}Ce();export{a as B,Ce as a,z as b,ke as c,Ae as d,Te as e,je as f,Re as g,Fe as h,De as i,S as j,Me as k,ze as l,M as m,_e as n,Le as p,xe as s,Pe as u}; diff --git a/build/assets/imageBitmapUtils-kF4U_Pyx.js b/build/assets/imageBitmapUtils-kF4U_Pyx.js new file mode 100644 index 0000000..d5a82b9 --- /dev/null +++ b/build/assets/imageBitmapUtils-kF4U_Pyx.js @@ -0,0 +1 @@ +import{s as c,c7 as l}from"./index-DKOmzAMm.js";async function u(a,e,t){let r;try{r=await createImageBitmap(a)}catch(o){throw new c("request:server",`Unable to load ${e}`,{url:e,error:o})}return l(t),r}async function w(a,e,t,r,o){let n;try{n=await createImageBitmap(a)}catch(i){throw new c("request:server",`Unable to load tile ${e}/${t}/${r}`,{error:i,level:e,row:t,col:r})}return l(o),n}export{w as o,u as t}; diff --git a/build/assets/imageUtils-D81CeaJ0.js b/build/assets/imageUtils-D81CeaJ0.js new file mode 100644 index 0000000..8526317 --- /dev/null +++ b/build/assets/imageUtils-D81CeaJ0.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/gif-DmlPrKw5.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/apng-S4giw3C0.js","assets/_commonjsHelpers-DCkdB7M8.js"])))=>i.map(i=>d[i]); +import{_ as s,a5 as d,d6 as m,U as f,aU as p,s as w}from"./index-DKOmzAMm.js";let i=null,u=!0;function T(n,e,t,a){if(!e||!t)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(n,e,t)}catch{u=!1}const r=g(e,t,a);return r.data.set(n,0),r}function y(){return i||(i=document.createElement("canvas"),i.width=1,i.height=1),i}function g(n,e,t){return t||(t=y()),t.getContext("2d").createImageData(n,e)}async function _(n,e){const t=window.URL.createObjectURL(n);try{const{data:a}=await f(t,{...e,responseType:"image"});return a}catch(a){throw p(a)?a:new w("invalid-image",`Could not fetch requested image at ${t}`)}finally{window.URL.revokeObjectURL(t)}}async function v(n,e){const{arrayBuffer:t,mediaType:a}=await h(n,e),r=a==="image/png";if(a==="image/gif"){const{isAnimatedGIF:o,parseGif:c}=await s(()=>import("./gif-DmlPrKw5.js"),__vite__mapDeps([0,1,2]));if(o(t))return c(t,e)}if(r){const{isAnimatedPNG:o,parseApng:c}=await s(()=>import("./apng-S4giw3C0.js"),__vite__mapDeps([3,4,1,2]));if(o(t))return c(t,e)}return _(new Blob([t],{type:a}),e)}async function h(n,e){var r;const t=d(n);if(t!=null&&t.isBase64)return{arrayBuffer:m(t.data),mediaType:t.mediaType};const a=await f(n,{responseType:"array-buffer",...e});return{arrayBuffer:a.data,mediaType:((r=a.getHeader)==null?void 0:r.call(a,"Content-Type"))??""}}export{T as c,v as p}; diff --git a/build/assets/imageryUtils-CVS5zy0-.js b/build/assets/imageryUtils-CVS5zy0-.js new file mode 100644 index 0000000..b182fb7 --- /dev/null +++ b/build/assets/imageryUtils-CVS5zy0-.js @@ -0,0 +1 @@ +import{$ as n,j as o}from"./utils-V4fw_T9z.js";import{l as c,a as p,f as i,i as u}from"./index-DKOmzAMm.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./jsonContext-SE-5k22x.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";const s="Image Service",g="imagery-layer-save",v="imagery-layer-save-as",f="imagery-tile-layer-save",d="imagery-tile-layer-save-as";function l(r){var t;if(r.type==="imagery")return{isValid:!0};const{raster:e}=r,a=(e==null?void 0:e.datasetFormat)==="Function"?(t=e.primaryRasters)==null?void 0:t.rasters[0]:e;return{isValid:(a==null?void 0:a.datasetFormat)==="RasterTileServer"&&(a.tileType==="Raster"||a.tileType==="Map"),errorMessage:"imagery tile layer should be created from a tiled image service."}}function y(r){const e=r.layerJSON;return Promise.resolve(e&&Object.keys(e).length?e:null)}async function T(r,e){const{parsedUrl:a,title:t,fullExtent:m}=r;e.url=a.path,e.title||(e.title=t);try{e.extent=await c(m)}catch{e.extent=void 0}p(e,i.METADATA),r.type==="imagery-tile"&&u(e,i.TILED_IMAGERY)}async function P(r,e){const a=r.type==="imagery"?g:f;return n({layer:r,itemType:s,validateLayer:l,createItemData:y,errorNamePrefix:a},e)}async function R(r,e,a){const t=r.type==="imagery"?v:d;return o({layer:r,itemType:s,validateLayer:l,createItemData:y,errorNamePrefix:t,newItem:e,setItemProperties:T},a)}export{P as save,R as saveAs}; diff --git a/build/assets/index-6Ap435l7.css b/build/assets/index-6Ap435l7.css new file mode 100644 index 0000000..62e54ab --- /dev/null +++ b/build/assets/index-6Ap435l7.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&display=swap";.mapillary-attribution-container{background-color:#00000080;font-size:9px;font-weight:300;position:absolute;bottom:0;right:0;height:16px;line-height:initial;z-index:10;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.mapillary-attribution-image-container{display:inline-block;color:#fff;text-decoration:none;margin-left:8px;vertical-align:middle;height:100%}.mapillary-attribution-image-container:hover,.mapillary-attribution-image-container:active,.mapillary-attribution-image-container:visited{color:#fff}.mapillary-attribution-compact .mapillary-attribution-image-container{margin-left:4px}.mapillary-attribution-username{display:inline-block;vertical-align:middle;line-height:16px}.mapillary-attribution-date{display:inline-block;vertical-align:middle;color:#fff;line-height:16px;margin-right:8px;margin-left:4px}.mapillary-attribution-compact .mapillary-attribution-date{margin-right:6px}.mapillary-attribution-icon-container{display:inline-block;margin-left:8px;vertical-align:middle;height:100%}.mapillary-attribution-compact .mapillary-attribution-icon-container{margin-left:6px}.mapillary-attribution-image-container .mapillary-attribution-icon-container{margin-left:2px;margin-right:2px}.mapillary-attribution-logo{margin-top:3px;width:44px;height:10px;background-size:contain;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MSIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDYxIDE0Ij48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIzLjk5NDgzMDMgMi44MTQ1MjI4NUwyMy45OTQ4MzAzIDExLjMxMzg1MyAyMi4zNzA4NjM3IDExLjMxMzg1MyAyMi4zNzA4NjM3IDYuODkyMjM2MTQgMjAuNTQzOTAxMiAxMS4zMTM4NTMgMTkuNjYwMjcyNCAxMS4zMTM4NTMgMTcuODMzMzA5OSA2Ljg5MjIzNjE0IDE3LjgzMzMwOTkgMTEuMzEzODUzIDE2LjIwOTM0MzMgMTEuMzEzODUzIDE2LjIwOTM0MzMgMi44MTQ1MjI4NSAxNy44ODEwNzM3IDIuODE0NTIyODUgMjAuMTAyMDg2OCA4LjE2OTU5MjExIDIyLjMyMzEgMi44MTQ1MjI4NSAyMy45OTQ4MzAzIDIuODE0NTIyODUgMjMuOTk0ODMwMyAyLjgxNDUyMjg1ek0zMS4wODE5NTg0IDQuNjY5MTQ1NDZMMzIuNTAyOTI5MiA0LjY2OTE0NTQ2IDMyLjUwMjkyOTIgNS4yMjE4NDc1NkMzMi41OTg0NTcyIDUuMDI1MzMwMjggMzIuNzg5NTEwMSA0Ljg1NzQ3NDI4IDMzLjA3NjA5MzkgNC43MTgyNzQ1MyAzMy4zNjI2Nzc3IDQuNTc5MDc0NzkgMzMuNjc3MTE5MSA0LjUwOTQ3NTk2IDM0LjAxOTQyNzUgNC41MDk0NzU5NiAzNC4zNDU4MTQ1IDQuNTA5NDc1OTYgMzQuNjUyMjk1NCA0LjU4NTIxNTg2IDM0LjkzODg3OTEgNC43MzY2OTc5NCAzNS4yMjU0NjI5IDQuODg4MTgwMDEgMzUuNDc0MjI5OCA1LjExMTMwNTY3IDM1LjY4NTE4NzMgNS40MDYwODE2IDM1Ljg5NjE0NDggNS43MDA4NTc1MiAzNi4wNjMzMTYyIDYuMDY1MjI3ODYgMzYuMTg2NzA2NCA2LjQ5OTIwMzUzIDM2LjMxMDA5NjYgNi45MzMxNzkyIDM2LjM3MTc5MDggNy40Mjg1NTkxIDM2LjM3MTc5MDggNy45ODUzNTgwNyAzNi4zNzE3OTA4IDguNTU4NTMzNDkgMzYuMzEyMDg2OCA5LjA2MjEwMTQ4IDM2LjE5MjY3NjkgOS40OTYwNzcxNSAzNi4wNzMyNjcgOS45MzAwNTI4MiAzNS45MTAwNzU5IDEwLjI5NDQyMzIgMzUuNzAzMDk4NyAxMC41ODkxOTkxIDM1LjQ5NjEyMTUgMTAuODgzOTc1IDM1LjI1MTMzNDkgMTEuMTA1MDUzNiAzNC45Njg3MzE1IDExLjI1MjQ0MTYgMzQuNjg2MTI4IDExLjM5OTgyOTYgMzQuMzc3NjU3MSAxMS40NzM1MjI1IDM0LjA0MzMwOTMgMTEuNDczNTIyNSAzMy42ODUwNzk2IDExLjQ3MzUyMjUgMzMuMzk2NTEgMTEuNDE2MjA1OCAzMy4xNzc1OTE4IDExLjMwMTU3MDcgMzIuOTU4NjczNyAxMS4xODY5MzU2IDMyLjgwMTQ1MyAxMS4wNDM2NDM5IDMyLjcwNTkyNTEgMTAuODcxNjkxM0wzMi43MDU5MjUxIDEzLjUyMDU0MjMgMzEuMDgxOTU4NCAxMy44Nzg3ODc2IDMxLjA4MTk1ODQgNC42NjkxNDU0NiAzMS4wODE5NTg0IDQuNjY5MTQ1NDZ6TTMzLjYzNzMxNzcgOS44ODkxMDk3NkMzNC40MjU0MjMgOS44ODkxMDk3NiAzNC44MTk0Njk4IDkuMjU4NjI2MjYgMzQuODE5NDY5OCA3Ljk5NzY0MDM0IDM0LjgxOTQ2OTggNy4zODM1MjM4MiAzNC43MjE5NTMyIDYuOTE2ODAyMjcgMzQuNTI2OTE3IDYuNTk3NDYxNjggMzQuMzMxODgwOCA2LjI3ODEyMTA5IDM0LjA1MTI3MTggNi4xMTg0NTMxOSAzMy42ODUwODE0IDYuMTE4NDUzMTkgMzMuNDE0NDE4OSA2LjExODQ1MzE5IDMzLjE4OTUzMzYgNi4yMTQ2NjMzNCAzMy4wMTA0MTg4IDYuNDA3MDg2NTEgMzIuODMxMzAzOSA2LjU5OTUwOTY5IDMyLjY5Mzk4NDYgNi44MjY3MjkzOSAzMi41OTg0NTY3IDcuMDg4NzUyNDRMMzIuNTk4NDU2NyA4Ljk4MDIyMTg2QzMyLjcwOTkwNTkgOS4yODMxODYgMzIuODU5MTY2MSA5LjUxMDQwNTcxIDMzLjA0NjI0MTYgOS42NjE4ODc3OCAzMy4yMzMzMTcxIDkuODEzMzY5ODYgMzMuNDMwMzQwNSA5Ljg4OTEwOTc2IDMzLjYzNzMxNzcgOS44ODkxMDk3NkwzMy42MzczMTc3IDkuODg5MTA5NzYgMzMuNjM3MzE3NyA5Ljg4OTEwOTc2ek0zOC43MTIyMTMzIDQuNjY5MTQ1NDZMMzguNzEyMjEzMyAxMS4zMTM4NTMgMzcuMDc2MzA1OCAxMS4zMTM4NTMgMzcuMDc2MzA1OCA0LjY2OTE0NTQ2IDM4LjcxMjIxMzMgNC42NjkxNDU0NiAzOC43MTIyMTMzIDQuNjY5MTQ1NDZ6TTM3LjA3NjMwNTggMy4xOTUyNzMxOUMzNy4wNzYzMDU4IDIuOTU3ODE0OCAzNy4xNTE5MzA5IDIuNzUzMTEyMzYgMzcuMzAzMTgzNSAyLjU4MTE1OTc0IDM3LjQ1NDQzNiAyLjQwOTIwNzExIDM3LjY0OTQ2OTMgMi4zMjMyMzIwOSAzNy44ODgyODkxIDIuMzIzMjMyMDkgMzguMTExMTg3NiAyLjMyMzIzMjA5IDM4LjMwNDIzMDcgMi40MDkyMDcxMSAzOC40Njc0MjQyIDIuNTgxMTU5NzQgMzguNjMwNjE3OCAyLjc1MzExMjM2IDM4LjcxMjIxMzMgMi45NTc4MTQ4IDM4LjcxMjIxMzMgMy4xOTUyNzMxOSAzOC43MTIyMTMzIDMuNDI0NTQzMzUgMzguNjMwNjE3OCAzLjYxOTAxMDY3IDM4LjQ2NzQyNDIgMy43Nzg2ODA5NiAzOC4zMDQyMzA3IDMuOTM4MzUxMjYgMzguMTExMTg3NiA0LjAxODE4NTIxIDM3Ljg4ODI4OTEgNC4wMTgxODUyMSAzNy42NDk0NjkzIDQuMDE4MTg1MjEgMzcuNDU0NDM2IDMuOTM4MzUxMjYgMzcuMzAzMTgzNSAzLjc3ODY4MDk2IDM3LjE1MTkzMDkgMy42MTkwMTA2NyAzNy4wNzYzMDU4IDMuNDI0NTQzMzUgMzcuMDc2MzA1OCAzLjE5NTI3MzE5TDM3LjA3NjMwNTggMy4xOTUyNzMxOSAzNy4wNzYzMDU4IDMuMTk1MjczMTl6TTM5LjU2MDAxOTQgMi45MjUwNjMyN0w0MS4xODM5ODYgMi4zNjAwNzg5IDQxLjE4Mzk4NiAxMS4zMTM4NTMgMzkuNTYwMDE5NCAxMS4zMTM4NTMgMzkuNTYwMDE5NCAyLjkyNTA2MzI3IDM5LjU2MDAxOTQgMi45MjUwNjMyN3pNNDIuMDMxNzkyMSAyLjkyNTA2MzI3TDQzLjY1NTc1ODcgMi4zNjAwNzg5IDQzLjY1NTc1ODcgMTEuMzEzODUzIDQyLjAzMTc5MjEgMTEuMzEzODUzIDQyLjAzMTc5MjEgMi45MjUwNjMyNyA0Mi4wMzE3OTIxIDIuOTI1MDYzMjd6TTUyLjQ2Nzg0OTEgNC42NjkxNDU0Nkw1Mi40Njc4NDkxIDUuMTIzNTg5NDFDNTIuNTc5Mjk4MyA0LjkzNTI2MDM0IDUyLjc2MjM5MDggNC43ODU4Mjc1NyA1My4wMTcxMzE5IDQuNjc1Mjg2NTkgNTMuMjcxODczMSA0LjU2NDc0NTYyIDUzLjUzODU1MTIgNC41MDk0NzU5NiA1My44MTcxNzQzIDQuNTA5NDc1OTYgNTQuMDAwMjY5NSA0LjUwOTQ3NTk2IDU0LjE3NzM5MTUgNC41MzgxMzQzIDU0LjM0ODU0NTcgNC41OTU0NTE4NSA1NC41MTk2OTk5IDQuNjUyNzY5MzkgNTQuNjUzMDM5IDQuNzQ2OTMyNTEgNTQuNzQ4NTY2OSA0Ljg3Nzk0NDAzTDU0LjE2MzQ2MTMgNi4zNjQwOTg1N0M1My45NjQ0NDQ4IDYuMTgzOTU3NzMgNTMuNzQ1NTI5OSA2LjA5Mzg4ODY2IDUzLjUwNjcxMDEgNi4wOTM4ODg2NiA1My4zMDc2OTM2IDYuMDkzODg4NjYgNTMuMTI2NTkxMyA2LjE2OTYyODU2IDUyLjk2MzM5NzcgNi4zMjExMTA2MyA1Mi44MDAyMDQyIDYuNDcyNTkyNzEgNTIuNjY2ODY1MSA2LjcwODAwMDUxIDUyLjU2MzM3NjUgNy4wMjczNDExTDUyLjU2MzM3NjUgMTEuMzEzODUzIDUwLjkzOTQwOTkgMTEuMzEzODUzIDUwLjkzOTQwOTkgNC42NjkxNDU0NiA1Mi40Njc4NDkxIDQuNjY5MTQ1NDYgNTIuNDY3ODQ5MSA0LjY2OTE0NTQ2ek00OC40NjE2MDg4IDEwLjgyOTMxOTJDNDguMDI4ODg4MiAxMS4yMTU4NzI0IDQ3LjUyNDc0MDUgMTEuNDg0MTExIDQ2Ljk4NjY2NzQgMTEuNDg0MTExIDQ1LjEyMzA5NDEgMTEuNDg0MTExIDQ0LjM0MTk0NzMgOS45MjgwNTIxIDQ0LjM0MTk0NzMgOC4wMDg1NTYxNiA0NC4zNDE5NDczIDYuMDg5MDYwMjMgNDUuMTIzMDk0MSA0LjUzMzAwMTMzIDQ2Ljk4NjY2NzQgNC41MzMwMDEzMyA0Ny41NjU5MDA3IDQuNTMzMDAxMzMgNDguMDU4MTgzNSA0Ljc4MzA1OTI5IDQ4LjQ2MTYwODggNS4xNTg1MTc4Mkw0OC40NjE2MDg4IDQuNjIzMDg3MTcgNTAuMTE2NTEzOSA0LjYyMzA4NzE3IDUwLjExNjUxMzkgMTEuMzk0MDI1MiA0OC40NjE2MDg4IDExLjM5NDAyNTIgNDguNDYxNjA4OCAxMC44MjkzMTkyIDQ4LjQ2MTYwODggMTAuODI5MzE5MnpNNDguNDYxNjA4OCA5LjE1MTIyMDIxQzQ4LjI1NDM5MjQgOS42MTI3NDY0MyA0Ny44ODgwNjAxIDkuOTAwOTc4NTIgNDcuMzU4NTk4MyA5LjkxMDM5ODE0IDQ2LjM1NzM2OTUgOS45MjgyMTA5MyA0NS45NzMyNTE2IDkuMDgwNTg1NDcgNDUuOTU1MjA2MSA4LjAyNjg3Nzc4IDQ1LjkzNzE2MDcgNi45NzMxNzAwOSA0Ni4yOTIwMjEyIDYuMTEyMzk3NzMgNDcuMjkzMjUgNi4wOTQ1ODUwNiA0Ny44MDk0MTU2IDYuMDg1NDAyMDUgNDguMjI3OTIyMiA2LjQyMTYyMDk0IDQ4LjQ2MTYwODggNi45NjI1MjM2TDQ4LjQ2MTYwODggOS4xNTEyMjAyMSA0OC40NjE2MDg4IDkuMTUxMjIwMjF6TTI4Ljc4NjM2ODkgMTAuODI5MzE5MkMyOC4zNTM2NDg0IDExLjIxNTg3MjQgMjcuODQ5NTAwNyAxMS40ODQxMTEgMjcuMzExNDI3NiAxMS40ODQxMTEgMjUuNDQ3ODU0MiAxMS40ODQxMTEgMjQuNjY2NzA3NSA5LjkyODA1MjEgMjQuNjY2NzA3NSA4LjAwODU1NjE2IDI0LjY2NjcwNzUgNi4wODkwNjAyMyAyNS40NDc4NTQyIDQuNTMzMDAxMzMgMjcuMzExNDI3NiA0LjUzMzAwMTMzIDI3Ljg5MDY2MDkgNC41MzMwMDEzMyAyOC4zODI5NDM2IDQuNzgzMDU5MjkgMjguNzg2MzY4OSA1LjE1ODUxNzgyTDI4Ljc4NjM2ODkgNC42MjMwODcxNyAzMC40NDEyNzQgNC42MjMwODcxNyAzMC40NDEyNzQgMTEuMzk0MDI1MiAyOC43ODYzNjg5IDExLjM5NDAyNTIgMjguNzg2MzY4OSAxMC44MjkzMTkyIDI4Ljc4NjM2ODkgMTAuODI5MzE5MiAyOC43ODYzNjg5IDEwLjgyOTMxOTJ6TTI4Ljc4NjM2ODkgOS4xNTEyMjAyMUMyOC41NzkxNTI2IDkuNjEyNzQ2NDMgMjguMjEyODIwMiA5LjkwMDk3ODUyIDI3LjY4MzM1ODQgOS45MTAzOTgxNCAyNi42ODIxMjk2IDkuOTI4MjEwOTMgMjYuMjk4MDExNyA5LjA4MDU4NTQ3IDI2LjI3OTk2NjMgOC4wMjY4Nzc3OCAyNi4yNjE5MjA4IDYuOTczMTcwMDkgMjYuNjE2NzgxMyA2LjExMjM5NzczIDI3LjYxODAxMDEgNi4wOTQ1ODUwNiAyOC4xMzQxNzU3IDYuMDg1NDAyMDUgMjguNTUyNjgyNCA2LjQyMTYyMDk0IDI4Ljc4NjM2ODkgNi45NjI1MjM2TDI4Ljc4NjM2ODkgOS4xNTEyMjAyMSAyOC43ODYzNjg5IDkuMTUxMjIwMjEgMjguNzg2MzY4OSA5LjE1MTIyMDIxek01Ny43NDU1ODIzIDEzLjY3MjA0ODZMNTYuMDQ5OTcwMSAxMy42NzIwNDg2IDU3LjA2NDk0OTIgMTAuNzM2NTg2MyA1NC45Mzk0NjM1IDQuNjY5MTQ1NDYgNTYuNzMwNjAzMSA0LjY2OTE0NTQ2IDU3LjkzNjYzNzIgOC41MjU3Nzc5MSA1OS4xNDI2NzEyIDQuNjY5MTQ1NDYgNjAuODk3OTg4IDQuNjY5MTQ1NDYgNTcuNzQ1NTgyMyAxMy42NzIwNDg2IDU3Ljc0NTU4MjMgMTMuNjcyMDQ4NnpNNi4zODE1NDI3NCA5LjY1MDUwNjdDNi4xNDAwNzQxMiA5LjUyNzg2NDA0IDYuMDgxMjQwMDYgOS4zMTcwOTQ1MyA2LjIxMDQ0MDM3IDkuMDg4NjU1NjUgNi4yNzYxNDk0MSA4Ljk3MjQ3NTYxIDYuNDE4NTkyMzQgOC43NDA3NDQyMiA2LjUzNDY4MTY4IDguNTUzOTgyMiA2LjY5NDMyNzI0IDguMjk3MTQ3ODYgNi45MjcwMTQzNCA4LjI5NjM3NTg4IDcuMDU4MzU4NjYgOC4zNzI1MzM2MiA3LjE4OTcwMjk4IDguNDQ4NjkxMzUgOS4wNDg1MzYwNCA5LjQyMDg3MDYzIDkuMTY4NzQ4NzEgOS40ODY3MDY1NiA5LjQ1MjU5MjYgOS42NDIxNTcxMSA5Ljg3MTE4NjI5IDkuMjg2MjM3NDEgOS42ODM0MjI1MSA4Ljk3NDQxMzI2IDkuNTkzNzUzMzIgOC44MjU0OTczMSA4LjgxMDM5MzggNy40MDQ0NzgzIDguNTYxNDk3OCA2LjkzNjEwNDM4IDguNDQ4MjUxNTYgNi43MjI5OTY5NiA4LjQ3OTIxMDA1IDYuNTMxMzIyNTEgOC43MzE2NDcgNi40MDM3NzQ2MyA4Ljg1NjU2NDM2IDYuMzQwNjU4MSA5LjA4MDA0MjM5IDYuMjA4OTA3OTggOS4yNzM5NDc2MiA2LjA5MTkwNTg2IDkuNDcxODkyMTkgNS45NzI0NjY0IDkuNzM1MzQ4OCA2LjA2MjIzODg1IDkuODQyNDU1NTUgNi4yNDAyMjYyMSA5Ljk0OTU2MjI5IDYuNDE4MjEzNTcgMTMuMTIwOTE4MiAxMi4yMjk0MDE5IDEzLjIyMjE1MTcgMTIuNDA5ODE2OSAxMy40MjMxMjk0IDEyLjc2Nzk5MjggMTMuMDMyMjg1MyAxMy4xNTExMTM3IDEyLjY2Mjk0OSAxMi45NTMwOTQgMTIuNDc4MTQzNiAxMi44NTQwMTA1IDYuNjIzMDExMzYgOS43NzMxNDkzNiA2LjM4MTU0Mjc0IDkuNjUwNTA2N3pNLjIwMDE0NjA2MiA2LjQwMDgxMjA1Qy0uMTExNTU0MjgyIDYuMjMyNzQxMDYtLjA1NDU0NDIzMjggNS43OTYwNDA1Mi4zMzg3ODI2NDggNS42ODQ2NjAzNi42NzIwMzAwODMgNS41OTAyOTMxNyAzLjM3ODIwNjQ3IDQuNjg4MjYzNCA0LjE5NzE1MTE1IDQuNDE0OTAwNyA0LjM0NDc5NDQzIDQuMzY1NjE3NTcgNC40NjAwNTgwOSA0LjI1MjI4MjMyIDQuNTA5NjU3NTcgNC4xMDc1ODY3IDQuNzg4NTg4NTMgMy4yOTM4NjY3MSA1LjcyMDI0NTU2LjU3NTk2MTMzNCA1LjgyNDY4OTExLjI3MTI2OTc5IDUuOTQ3NzA0OC0uMDg3NjAxOTc5IDYuMzkzMDQwNzctLjA4ODkxODQ4NjcgNi41NzQ1NDY3MS4yNTg1MDIyNTEgNi42MzkwMTU2Ni4zODE5MDIzNDYgOS4wODk0MDQ4NCA0Ljc5ODEzNTQzIDkuMTc0NjU5NDYgNC45ODU0NzA1MSA5LjI1OTkxNDA4IDUuMTcyODA1NTkgOS4yMDQ5ODczMSA1LjM4MDMxNDM0IDkuMDExNzY0MDYgNS41MDAwMDUxNSA4LjgxODU0MDggNS42MTk2OTU5NiA4LjUwMzQzNTIyIDUuNzk4NzIwNjUgOC4zOTM2NTA3IDUuODY2NTQzMjMgOC4xOTQ4OTQ2MyA1Ljk4OTMzMDU3IDguMDA0MzkxMzUgNS45MDM4NDMyNCA3LjkxMzY1NTAxIDUuNzEzNjQ4MTYgNy44MjI5MTg2NiA1LjUyMzQ1MzA3IDcuMTIzODc4MjggNC4yOTYyNjg4NiA2LjgzODgyOTUyIDMuNzc1Mjc3OTUgNi42OTYzNDk0MSAzLjUxNDg2MzQxIDYuMjY3MTEzMiAzLjQxNDkyNzk2IDYuMTIyODM3MjEgMy44MzU4MjE1OSA2LjAxODQ4NDg4IDQuMTQwMjQ2NjkgNS43NzUyNjI2NCA0Ljg0OTc5NDM5IDUuNjQ4NjQ1NTcgNS4yMTkxNzIgNS42MDAyMDM3NSA1LjM2MDQ5MDQgNS40Nzc0MTk0NCA1LjQ4MjEyNTU0IDUuMzMzOTgxMjQgNS41MjkzNzAwMSA0Ljk3ODAxNjMgNS42NDY2MTQ3OCA0LjMwMTYyOTQ0IDUuODY5Mzk3NDQgMy45MDY3MjM3NSA1Ljk5OTQ2ODE4IDMuNjI0OTE0NjkgNi4wOTIyODgxIDMuNDg3OTM1MjMgNi41MjE1MDI1NyAzLjg2ODQxNzc2IDYuNzAyMjQ2NzQgMy45NDc4OTUyNSA2Ljc0MDAwMTY3IDUuNjYwOTcxNTMgNy42NTQwNDM5MSA1LjgzNzcyMDU0IDcuNzM3NjQ1NTggNi4wMTQ0Njk1NCA3LjgyMTI0NzI0IDYuMTEyNzUyODEgOC4wNjI1Nzk0NSA2LjAwOTI1MzE2IDguMjMzNTUwMDQgNS44NjgwODA0IDguNDY2NzUyNjggNS42ODczNDc5NiA4Ljc2MjcyMDUyIDUuNjIxNzg2MiA4Ljg1ODgwODE1IDUuNTA4MTU4MzggOS4wMjUzNDE2MyA1LjI4NDk1MDc3IDkuMDgwODAyODYgNS4wOTc0ODk5NiA4Ljk4MjUxMDc2IDQuOTEwMDI5MTUgOC44ODQyMTg2Ni4zMTE1MjIyODkgNi40NjA4NjY4OS4yMDAxNDYwNjIgNi40MDA4MTIwNXoiLz48L2c+ICA8L3N2Zz4gIA==)}.mapillary-attribution-compact .mapillary-attribution-logo{width:11px;background-size:cover}.mapillary-bearing-indicator-container{bottom:34px;height:40px;pointer-events:none;position:absolute;right:10px;width:40px;z-index:10}.mapillary-bearing-indicator-container.mapillary-bearing-compact{-webkit-transform:scale(.6);transform:scale(.6);bottom:16px;right:2px}.mapillary-bearing-indicator-background{position:absolute;top:0;left:0;width:40px;height:40px;opacity:.5;-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.mapillary-bearing-indicator-background-circle{pointer-events:auto;position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;background-color:#000}.mapillary-bearing-indicator-background-arrow-container{position:absolute;left:14px;top:-3.5px;height:8px;width:12px;overflow:hidden}.mapillary-bearing-indicator-background-arrow{position:absolute;width:12px;height:12px;left:0;top:2px;background-color:#000;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:2px}.mapillary-bearing-north-container{position:absolute;left:16px;top:-1px;width:8px;height:21px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.mapillary-bearing-north{position:absolute;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid white}.mapillary-cover-container{background-color:#00000080;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:100}.mapillary-cover-background{background-position:center;background-size:cover;bottom:0;left:0;margin:-3px;position:absolute;right:0;top:0;z-index:0}.mapillary-cover-indicator{bottom:0;left:0;margin:-3px;position:absolute;right:0;top:0;z-index:0;background-color:#0003;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;cursor:pointer}.mapillary-cover-indicator:hover{opacity:0}.mapillary-cover-button{background-color:#00000080;border-radius:64px;width:128px;height:128px;left:50%;top:50%;letter-spacing:1px;margin-left:-64px;margin-top:-64px;position:absolute;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;z-index:1;pointer-events:none}.mapillary-cover-compact .mapillary-cover-button{width:72px;height:72px;margin-left:-36px;margin-top:-36px}.mapillary-cover-button-icon{background-size:contain;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgMTI4IDEyOCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik01Ny43NDc4MjExLDU2LjkzMTc4NDUgTDQwLjkxNDUzODEsNjQuNjM0MjkyIEMzOC40NjQ1MzU5LDY1Ljc1NDY0MzIgMzQuNzg1NzMyMiw2NS43NTMzNDM1IDMyLjc2MzkxMDMsNjQuNjMyOTkyMyBDMzAuNzczNzU4Niw2My41Mjk1MzczIDMxLjE4ODAwNCw2MS43Nzg4MjYxIDMzLjYyNTMzODIsNjAuNzE5NTYxMyBMNjAuMjgzOTk3MSw0OS4xNTIxMzAyIEM2Mi4yODU1NTAxLDQ4LjI4MjYyMzMgNjUuNTAwNzAzLDQ4LjI4MjYyMzMgNjcuNTE2MTkwOCw0OS4xNTIxMzAyIEw5NC4zNDIwNjgyLDYwLjcyNjA1OTkgQzk2Ljc5NDYwNCw2MS43ODQwMjUgOTcuMjM0MTg1Niw2My41MzYwMzU5IDk1LjI2MDUwMjMsNjQuNjM5NDkwOCBDOTMuMjU1MTQ4OSw2NS43NTk4NDIgODkuNTczODExNSw2NS43NTk4NDIgODcuMTA4NjA3Nyw2NC42MzgxOTExIEw3MC42MjEzMjk1LDU3LjE0MDMxMjIgTDcxLjc5NzkzNTgsNzcuMzkyODQ3MiBDNzEuODk1MjAzMSw3OS4wODYzOTEyIDY4LjU0MjcyMzIsODAuNSA2NC4zNDU5NjMsODAuNSBDNjAuMTQ5MjAyOSw4MC41IDU2Ljc3NzI2OTUsNzkuMDg2MzkxMiA1Ni44NTExOTI2LDc3LjM5Mjg0NzIgTDU3Ljc0NzgyMTEsNTYuOTMxNzg0NSBaIi8+PC9nPiAgPC9zdmc+ICA=);height:100%;width:100%;position:absolute;pointer-events:none}.mapillary-cover-compact .mapillary-cover-button-icon{width:72px;height:72px}.mapillary-cover-logo{background-size:contain;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNTciIGhlaWdodD0iNTIiIHZpZXdCb3g9IjAgMCAxNTcgNTIiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICA8cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41IiBkPSJNODMuMjMwNCAxOS4wNjg2TDgzLjIzMDQgMjAuMjk1NkM4Mi44NDQ0IDE5LjkxNDYgODIuNDIzNCAxOS41ODI2IDgxLjk2MTQgMTkuMzQwNiA4MS4xMTI0IDE4Ljg5NTYgODAuMTkyNCAxOC42NzE2IDc5LjIyODQgMTguNjcxNiA3OC41MzQ0IDE4LjY3MTYgNzcuODY4NCAxOC43NzM2IDc3LjIzNjQgMTguOTgwNkw3NC4yMDI0IDE4Ljk4MDYgNjcuNDg3NCAxOC45Nzg2QzY3LjAyNzQgMTguODYzNiA2Ni41NDk0IDE4LjgwMzYgNjYuMDU2NCAxOC44MDM2IDY0LjIwMzQgMTguODAzNiA2Mi42OTU0IDE5LjM4MjYgNjEuNTQ0NCAyMC4zOTA2TDYxLjU0NDQgMTUuNDU3NiA1NC45MzA0IDE1LjQ1NzYgNTEuOTAwNCAyMi43MDE2IDQ4Ljg3MDQgMTUuNDU3NiA0Mi4yNTY0IDE1LjQ1NzYgNDIuMjU2NCAzNi4wMDY2IDYxLjU0NDQgMzYuMDA2NiA2MS41NDQ0IDM0Ljc1MTZDNjIuNjk1NCAzNS43NTg2IDY0LjIwMzQgMzYuMzM4NiA2Ni4wNTY0IDM2LjMzODYgNjYuNTIwNCAzNi4zMzg2IDY2Ljk3NDQgMzYuMjc3NiA2Ny40MTc0IDM2LjE2MjZMNzEuNDYwNCAzNi4xNjI2IDcxLjQ2MDQgNDEuNDg1NiA3OC42NDk0IDM5LjkxMzYgNzguNjQ5NCAzNi4yOTM2Qzc4Ljg1MjQgMzYuMzA5NiA3OS4wNjA0IDM2LjMxNzYgNzkuMjc1NCAzNi4zMTc2IDgwLjI0NzQgMzYuMzE3NiA4MS4xNjg0IDM2LjA5OTYgODIuMDEwNCAzNS42NjM2IDgyLjQ1MzQgMzUuNDM0NiA4Mi44NTk0IDM1LjE0NzYgODMuMjMwNCAzNC44MDk2TDgzLjIzMDQgMzYuMDA2NiA4OC4xMDg0IDM2LjAwNjYgOTAuNDQzNCAzNi4wMDY2IDkyLjk2MTQgMzYuMDA2NiA5NS4yOTY0IDM2LjAwNjYgMTAwLjE1MDQgMzYuMDA2NiAxMDAuMTUwNCAzNC43MjU2QzEwMS4zMDU0IDM1Ljc0OTYgMTAyLjgyMTQgMzYuMzM4NiAxMDQuNjkwNCAzNi4zMzg2IDEwNS4xNTQ0IDM2LjMzODYgMTA1LjYwODQgMzYuMjc3NiAxMDYuMDUxNCAzNi4xNjI2TDExMi44MzY0IDM2LjE2MjYgMTE3LjY0MTQgMzYuMTYxNiAxMTcuNjQxNCAyNi4wMzE2IDExOS41ODM0IDI3Ljc3NDYgMTIwLjA5NjQgMjYuNDc4NiAxMjIuMzYwNCAzMi44ODY2IDExOS42NzE0IDQwLjU5NzYgMTI3LjIzMTQgNDAuNTk3NiAxMzQuODM0NCAxOS4wNjg2IDEyNy4wOTM0IDE5LjA2ODYgMTI2LjE5MjQgMjEuOTI3NiAxMjUuMjkwNCAxOS4wNjg2IDExOS45NTk0IDE5LjA2ODZDMTE5Ljg5ODQgMTkuMDQ0NiAxMTkuODQwNCAxOS4wMTE2IDExOS43NzY0IDE4Ljk5MDYgMTE5LjIzNjQgMTguODExNiAxMTguNjc1NCAxOC42NzE2IDExOC4xMDI0IDE4LjY3MTYgMTE3LjQ0ODQgMTguNjcxNiAxMTYuODEwNCAxOC43NzM2IDExNi4xOTc0IDE4Ljk4MDZMMTEyLjgzNjQgMTguOTgwNiAxMDYuMTIxNCAxOC45Nzg2QzEwNS42NjE0IDE4Ljg2MzYgMTA1LjE4MzQgMTguODAzNiAxMDQuNjkwNCAxOC44MDM2IDEwMi44MjE0IDE4LjgwMzYgMTAxLjMwNTQgMTkuMzkyNiAxMDAuMTUwNCAyMC40MTY2TDEwMC4xNTA0IDEzLjc2NjYgOTUuMjk2NCAxNS40NDE2IDk1LjI5NjQgMTMuNzY2NiA4OS41MTg0IDE1Ljc1OTZDODkuNDc4NCAxNS43MTQ2IDg5LjQ0OTQgMTUuNjY0NiA4OS40MDc0IDE1LjYyMDYgODguNzE1NCAxNC44OTc2IDg3LjgxNzQgMTQuNTAxNiA4Ni44MjU0IDE0LjUwMTYgODUuNzkyNCAxNC41MDE2IDg0Ljg2MjQgMTQuOTA3NiA4NC4xODA0IDE1LjY3NTYgODMuNTU1NCAxNi4zODA2IDgzLjIzMDQgMTcuMjUyNiA4My4yMzA0IDE4LjE5ODZMODMuMjMwNCAxOS4wNjg2ek0zOS44ODkxIDM1LjM0NUMzOS44NTAxIDM1LjI3NiAzOS41MDExIDM0LjY0NCAzOC44MDIxIDMzLjM3NSAzOC44NTMxIDMzLjQ2OCAzNy4xMTExIDMwLjMwNyAzNi41NTgxIDI5LjMwNiAzNC4zNDkxIDI1LjMwMSAzMy4yOTIxIDIzLjM4OCAzMy4xNzYxIDIzLjE5NyAzMi45MzUxIDIyLjc5OSAzMi41OTUxIDIyLjQ4OSAzMi4yMDkxIDIyLjI1OCAzMi4yMzMxIDIxLjgyIDMyLjE2MTEgMjEuMzcgMzEuOTY0MSAyMC45NDEgMzEuODU1MSAyMC43MDIgMzEuMDg0MSAxOS4zMSAyOS4zMjQxIDE2LjE1MSAyOS4yNDIxIDE2LjAwMyAyNi44MDUxIDExLjYzMiAyNi43NzUxIDExLjU3NSAyNS42MzMxIDkuNDA4IDIyLjQ3NDEgOS40NDYgMjEuNjMzMSAxMS44NzlMMjEuMjE3MSAxMy4wODIgMjAuNDYyMSAxNS4yNjYgMTkuMjAxMSAxOC45MTVDMTUuNjQ5MSAyMC4wODkgMTIuNTg3MSAyMS4wOTMgMTIuMTM2MSAyMS4yMiA5LjcxMzEgMjEuOTAxIDkuMTY3MSAyNS4wODcgMTEuNDU5MSAyNi4zMTMgMTEuNjU1MSAyNi40MTggMjAuNjMzMSAzMS4xMSAyMS4xNjIxIDMxLjM4NSAyMS42MTgxIDMxLjYyMiAyMi4xMTIxIDMxLjcyMSAyMi41OTUxIDMxLjY5OSAyMi44NjAxIDMyLjEwNiAyMy4yMzIxIDMyLjQ1OSAyMy43MjQxIDMyLjcwNiAyNC4xMTgxIDMyLjkwNSAzNS42MzAxIDM4LjkwOCAzNi4xMDQxIDM5LjE2IDM4LjU2MjEgNDAuNDY4IDQxLjI5NDEgMzcuODI3IDM5Ljg4OTEgMzUuMzQ1Ii8+ICA8cGF0aCBmaWxsPSIjRkZGIiBkPSJNNTkuNTQ0NCAxNy40NTczTDU5LjU0NDQgMzQuMDA3MyA1Ni4zNTU0IDM0LjAwNzMgNTYuMzU1NCAyNS4zOTczIDUyLjc2ODQgMzQuMDA3MyA1MS4wMzM0IDM0LjAwNzMgNDcuNDQ1NCAyNS4zOTczIDQ3LjQ0NTQgMzQuMDA3MyA0NC4yNTY0IDM0LjAwNzMgNDQuMjU2NCAxNy40NTczIDQ3LjUzOTQgMTcuNDU3MyA1MS45MDA0IDI3Ljg4NDMgNTYuMjYxNCAxNy40NTczIDU5LjU0NDQgMTcuNDU3M3pNNzMuNDYxNCAyMS4wNjgzTDc2LjI1MTQgMjEuMDY4MyA3Ni4yNTE0IDIyLjE0NDNDNzYuNDM4NCAyMS43NjIzIDc2LjgxMzQgMjEuNDM2MyA3Ny4zNzY0IDIxLjE2NDMgNzcuOTM4NCAyMC44OTQzIDc4LjU1NjQgMjAuNzU4MyA3OS4yMjg0IDIwLjc1ODMgNzkuODY5NCAyMC43NTgzIDgwLjQ3MDQgMjAuOTA1MyA4MS4wMzQ0IDIxLjIwMDMgODEuNTk2NCAyMS40OTUzIDgyLjA4NTQgMjEuOTMwMyA4Mi40OTk0IDIyLjUwMzMgODIuOTEzNCAyMy4wNzczIDgzLjI0MjQgMjMuNzg3MyA4My40ODQ0IDI0LjYzMjMgODMuNzI2NCAyNS40NzczIDgzLjg0NzQgMjYuNDQxMyA4My44NDc0IDI3LjUyNTMgODMuODQ3NCAyOC42NDIzIDgzLjczMDQgMjkuNjIyMyA4My40OTY0IDMwLjQ2NzMgODMuMjYxNCAzMS4zMTIzIDgyLjk0MDQgMzIuMDIxMyA4Mi41MzQ0IDMyLjU5NjMgODIuMTI4NCAzMy4xNzAzIDgxLjY0NzQgMzMuNjAwMyA4MS4wOTI0IDMzLjg4NzMgODAuNTM4NCAzNC4xNzQzIDc5LjkzMTQgMzQuMzE3MyA3OS4yNzU0IDM0LjMxNzMgNzguNTcyNCAzNC4zMTczIDc4LjAwNDQgMzQuMjA2MyA3Ny41NzU0IDMzLjk4MjMgNzcuMTQ1NCAzMy43NjAzIDc2LjgzNjQgMzMuNDgwMyA3Ni42NDk0IDMzLjE0NTNMNzYuNjQ5NCAzOC4zMDMzIDczLjQ2MTQgMzkuMDAxMyA3My40NjE0IDIxLjA2ODN6TTc4LjQ3ODQgMzEuMjMyM0M4MC4wMjU0IDMxLjIzMjMgODAuNzk5NCAzMC4wMDUzIDgwLjc5OTQgMjcuNTUwMyA4MC43OTk0IDI2LjM1MzMgODAuNjA4NCAyNS40NDUzIDgwLjIyNDQgMjQuODIzMyA3OS44NDE0IDI0LjIwMTMgNzkuMjkxNCAyMy44OTEzIDc4LjU3MjQgMjMuODkxMyA3OC4wNDA0IDIzLjg5MTMgNzcuNTk4NCAyNC4wNzgzIDc3LjI0NzQgMjQuNDUyMyA3Ni44OTU0IDI0LjgyNzMgNzYuNjI2NCAyNS4yNjkzIDc2LjQzODQgMjUuNzc5M0w3Ni40Mzg0IDI5LjQ2MzNDNzYuNjU3NCAzMC4wNTMzIDc2Ljk1MDQgMzAuNDk1MyA3Ny4zMTc0IDMwLjc5MDMgNzcuNjg0NCAzMS4wODUzIDc4LjA3MTQgMzEuMjMyMyA3OC40Nzg0IDMxLjIzMjN6TTg1LjIzMDQgMzQuMDA3M0w4OC40NDM0IDM0LjAwNzMgODguNDQzNCAyMS4wNjkzIDg1LjIzMDQgMjEuMDY5MyA4NS4yMzA0IDM0LjAwNzN6TTg1LjIzMDQgMTguMTk4M0M4NS4yMzA0IDE3LjczNjMgODUuMzc5NCAxNy4zMzgzIDg1LjY3NjQgMTcuMDAzMyA4NS45NzM0IDE2LjY2ODMgODYuMzU2NCAxNi41MDEzIDg2LjgyNTQgMTYuNTAxMyA4Ny4yNjI0IDE2LjUwMTMgODcuNjQxNCAxNi42NjgzIDg3Ljk2MjQgMTcuMDAzMyA4OC4yODM0IDE3LjMzODMgODguNDQzNCAxNy43MzYzIDg4LjQ0MzQgMTguMTk4MyA4OC40NDM0IDE4LjY0NTMgODguMjgzNCAxOS4wMjMzIDg3Ljk2MjQgMTkuMzM1MyA4Ny42NDE0IDE5LjY0NTMgODcuMjYyNCAxOS44MDEzIDg2LjgyNTQgMTkuODAxMyA4Ni4zNTY0IDE5LjgwMTMgODUuOTczNCAxOS42NDUzIDg1LjY3NjQgMTkuMzM1MyA4NS4zNzk0IDE5LjAyMzMgODUuMjMwNCAxOC42NDUzIDg1LjIzMDQgMTguMTk4M3pNOTAuMTA3NCAxNy42NzMzTDkzLjI5NjQgMTYuNTcyMyA5My4yOTY0IDM0LjAwNzMgOTAuMTA3NCAzNC4wMDczIDkwLjEwNzQgMTcuNjczM3pNOTQuOTYxNCAxNy42NzMzTDk4LjE1MDQgMTYuNTcyMyA5OC4xNTA0IDM0LjAwNzMgOTQuOTYxNCAzNC4wMDczIDk0Ljk2MTQgMTcuNjczM3pNMTE1LjQ1MzQgMjEuMDY4M0wxMTUuNDUzNCAyMS45NTMzQzExNS42NzE0IDIxLjU4NzMgMTE2LjAzMjQgMjEuMjk2MyAxMTYuNTMyNCAyMS4wODAzIDExNy4wMzI0IDIwLjg2NTMgMTE3LjU1NTQgMjAuNzU4MyAxMTguMTAzNCAyMC43NTgzIDExOC40NjI0IDIwLjc1ODMgMTE4LjgxMDQgMjAuODEzMyAxMTkuMTQ2NCAyMC45MjUzIDExOS40ODI0IDIxLjAzNjMgMTE5Ljc0NDQgMjEuMjIwMyAxMTkuOTMxNCAyMS40NzUzTDExOC43ODM0IDI0LjM2OTNDMTE4LjM5MjQgMjQuMDE4MyAxMTcuOTYxNCAyMy44NDMzIDExNy40OTM0IDIzLjg0MzMgMTE3LjEwMjQgMjMuODQzMyAxMTYuNzQ3NCAyMy45OTAzIDExNi40MjY0IDI0LjI4NTMgMTE2LjEwNjQgMjQuNTgwMyAxMTUuODQ0NCAyNS4wMzgzIDExNS42NDE0IDI1LjY2MDNMMTE1LjY0MTQgMzQuMDA3MyAxMTIuNDUyNCAzNC4wMDczIDExMi40NTI0IDIxLjA2ODMgMTE1LjQ1MzQgMjEuMDY4M3pNMTA3LjU4NjQgMzMuMDYzM0MxMDYuNzM3NCAzMy44MTUzIDEwNS43NDc0IDM0LjMzODMgMTA0LjY5MDQgMzQuMzM4MyAxMDEuMDMxNCAzNC4zMzgzIDk5LjQ5ODQgMzEuMzA5MyA5OS40OTg0IDI3LjU3MDMgOTkuNDk4NCAyMy44MzMzIDEwMS4wMzE0IDIwLjgwNDMgMTA0LjY5MDQgMjAuODA0MyAxMDUuODI4NCAyMC44MDQzIDEwNi43OTU0IDIxLjI5MDMgMTA3LjU4NjQgMjIuMDIxM0wxMDcuNTg2NCAyMC45NzgzIDExMC44MzY0IDIwLjk3ODMgMTEwLjgzNjQgMzQuMTYyMyAxMDcuNTg2NCAzNC4xNjIzIDEwNy41ODY0IDMzLjA2MzN6TTEwNy41ODY0IDI5Ljc5NjNDMTA3LjE3OTQgMzAuNjk0MyAxMDYuNDYxNCAzMS4yNTYzIDEwNS40MjA0IDMxLjI3MzMgMTAzLjQ1NTQgMzEuMzA5MyAxMDIuNzAxNCAyOS42NTgzIDEwMi42NjU0IDI3LjYwNjMgMTAyLjYyOTQgMjUuNTU1MyAxMDMuMzI3NCAyMy44NzkzIDEwNS4yOTM0IDIzLjg0NDMgMTA2LjMwNjQgMjMuODI2MyAxMDcuMTI4NCAyNC40ODAzIDEwNy41ODY0IDI1LjUzNDNMMTA3LjU4NjQgMjkuNzk2M3pNNjguOTUzNCAzMy4wNjMzQzY4LjEwMzQgMzMuODE1MyA2Ny4xMTM0IDM0LjMzODMgNjYuMDU2NCAzNC4zMzgzIDYyLjM5NzQgMzQuMzM4MyA2MC44NjM0IDMxLjMwOTMgNjAuODYzNCAyNy41NzAzIDYwLjg2MzQgMjMuODMzMyA2Mi4zOTc0IDIwLjgwNDMgNjYuMDU2NCAyMC44MDQzIDY3LjE5NDQgMjAuODA0MyA2OC4xNjE0IDIxLjI5MDMgNjguOTUzNCAyMi4wMjEzTDY4Ljk1MzQgMjAuOTc4MyA3Mi4yMDI0IDIwLjk3ODMgNzIuMjAyNCAzNC4xNjIzIDY4Ljk1MzQgMzQuMTYyMyA2OC45NTM0IDMzLjA2MzN6TTY4Ljk1MzQgMjkuNzk2M0M2OC41NDU0IDMwLjY5NDMgNjcuODI2NCAzMS4yNTYzIDY2Ljc4NzQgMzEuMjczMyA2NC44MjE0IDMxLjMwOTMgNjQuMDY2NCAyOS42NTgzIDY0LjAzMTQgMjcuNjA2MyA2My45OTY0IDI1LjU1NTMgNjQuNjkyNCAyMy44NzkzIDY2LjY1ODQgMjMuODQ0MyA2Ny42NzI0IDIzLjgyNjMgNjguNDk0NCAyNC40ODAzIDY4Ljk1MzQgMjUuNTM0M0w2OC45NTM0IDI5Ljc5NjN6TTEyNS44MTY0IDM4LjU5OTNMMTIyLjQ4NzQgMzguNTk5MyAxMjQuNDgwNCAzMi44ODMzIDEyMC4zMDY0IDIxLjA2ODMgMTIzLjgyNDQgMjEuMDY4MyAxMjYuMTkyNCAyOC41NzgzIDEyOC41NjA0IDIxLjA2ODMgMTMyLjAwNjQgMjEuMDY4MyAxMjUuODE2NCAzOC41OTkzek0yNC42MjQgMzAuOTIwMUMyNC4xNDYgMzAuNjgwMSAyNC4wMyAzMC4yNjcxIDI0LjI4NiAyOS44MTgxIDI0LjQxNiAyOS41OTExIDI0LjY5NyAyOS4xMzcxIDI0LjkyNyAyOC43NzExIDI1LjI0MiAyOC4yNjcxIDI1LjcwMyAyOC4yNjYxIDI1Ljk2MiAyOC40MTUxIDI2LjIyMiAyOC41NjUxIDI5Ljg5NyAzMC40NzAxIDMwLjEzNSAzMC41OTkxIDMwLjY5NiAzMC45MDMxIDMxLjUyMyAzMC4yMDYxIDMxLjE1MiAyOS41OTUxIDMwLjk3NSAyOS4zMDMxIDI5LjQyNiAyNi41MTcxIDI4LjkzNCAyNS41OTkxIDI4LjcxIDI1LjE4MTEgMjguNzcxIDI0LjgwNTEgMjkuMjcgMjQuNTU1MSAyOS41MTggMjQuNDMyMSAyOS45NTkgMjQuMTczMSAzMC4zNDMgMjMuOTQzMSAzMC43MzQgMjMuNzA5MSAzMS4yNTUgMjMuODg2MSAzMS40NjcgMjQuMjM0MSAzMS42NzggMjQuNTgzMSAzNy45NDkgMzUuOTc2MSAzOC4xNDkgMzYuMzI5MSAzOC41NDYgMzcuMDMyMSAzNy43NzMgMzcuNzgzMSAzNy4wNDMgMzcuMzk1MSAzNi42NzggMzcuMjAwMSAyNS4xMDIgMzEuMTYwMSAyNC42MjQgMzAuOTIwMU0xMi40MDIgMjQuNTQ5MUMxMS43ODYgMjQuMjIwMSAxMS44OTkgMjMuMzYzMSAxMi42NzcgMjMuMTQ2MSAxMy4zMzUgMjIuOTYwMSAxOC42ODYgMjEuMTkxMSAyMC4zMDUgMjAuNjU2MSAyMC41OTcgMjAuNTYwMSAyMC44MjUgMjAuMzM3MSAyMC45MjMgMjAuMDU0MSAyMS40NzUgMTguNDU4MSAyMy4zMTYgMTMuMTMwMSAyMy41MjMgMTIuNTMyMSAyMy43NjYgMTEuODI5MSAyNC42NDYgMTEuODI2MSAyNS4wMDUgMTIuNTA4MSAyNS4xMzMgMTIuNzQ5MSAyOS45NzggMjEuNDA3MSAzMC4xNDYgMjEuNzc0MSAzMC4zMTUgMjIuMTQyMSAzMC4yMDYgMjIuNTQ5MSAyOS44MjQgMjIuNzgzMSAyOS40NDIgMjMuMDE4MSAyOC44MTkgMjMuMzY5MSAyOC42MDIgMjMuNTAyMSAyOC4yMDkgMjMuNzQyMSAyNy44MzIgMjMuNTc1MSAyNy42NTMgMjMuMjAyMSAyNy40NzQgMjIuODI5MSAyNi4wOTIgMjAuNDI0MSAyNS41MjggMTkuNDAyMSAyNS4yNDcgMTguODkyMSAyNC4zOTggMTguNjk1MSAyNC4xMTIgMTkuNTIxMSAyMy45MDYgMjAuMTE3MSAyMy40MjUgMjEuNTA5MSAyMy4xNzUgMjIuMjMyMSAyMy4wNzkgMjIuNTEwMSAyMi44MzYgMjIuNzQ4MSAyMi41NTMgMjIuODQxMSAyMS44NDkgMjMuMDcwMSAyMC41MTIgMjMuNTA4MSAxOS43MzEgMjMuNzYzMSAxOS4xNzQgMjMuOTQ0MSAxOC45MDMgMjQuNzg2MSAxOS42NTUgMjUuMTQxMSAxOS44MTIgMjUuMjE0MSAyMy4xOTkgMjcuMDA2MSAyMy41NDkgMjcuMTcwMSAyMy44OTggMjcuMzM0MSAyNC4wOTMgMjcuODA3MSAyMy44ODggMjguMTQzMSAyMy42MDkgMjguNjAwMSAyMy4yNTEgMjkuMTgwMSAyMy4xMjIgMjkuMzY4MSAyMi44OTcgMjkuNjk0MSAyMi40NTYgMjkuODAzMSAyMi4wODUgMjkuNjEwMSAyMS43MTQgMjkuNDE4MSAxMi42MjMgMjQuNjY3MSAxMi40MDIgMjQuNTQ5MSIvPjwvZz4gIDwvc3ZnPiAg);bottom:0;height:52px;left:50%;margin-left:-73px;position:absolute;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;width:157px;z-index:1}.mapillary-cover-compact .mapillary-cover-logo{width:104px;height:35px;margin-left:-49px}.mapillary-cover-done{visibility:hidden;opacity:0}.mapillary-cover.mapillary-cover-loading .mapillary-cover-button,.mapillary-cover.mapillary-cover-loading .mapillary-cover-logo{opacity:0}.mapillary-cover-spinner{-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite;background-repeat:no-repeat;background-size:100%;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NCIgaGVpZ2h0PSI4NCIgdmlld0JveD0iMCAwIDg0IDg0Ij48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZD0iTTQyLDg0IEM2NS4xOTYsODQgODQsNjUuMTk2IDg0LDQyIEM4NCwxOC44MDQgNjUuMTk2LDAgNDIsMCBDMTguODA0LDAgMCwxOC44MDQgMCw0MiBDMCw2NS4xOTYgMTguODA0LDg0IDQyLDg0Ii8+ICA8cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik00Miw4My45OTg1MTA0IEM0MC4zNDMxNDU4LDgzLjk5ODUxMDQgMzksODIuNjU1MzY0NiAzOSw4MC45OTg1MTA0IEMzOSw3OS4zNDE2NTYxIDQwLjM0MzE0NTgsNzcuOTk4NTEwNCA0Miw3Ny45OTg1MTA0IEM2MS44ODIyODg2LDc3Ljk5ODUxMDQgNzgsNjEuODgwNzk5IDc4LDQxLjk5ODUxMDQgQzc4LDIyLjIzNDkyOTQgNjIuMDY2MzMxNiw2LjE3MDg3ODA2IDQyLjMxODc2ODIsNS45OTk4ODk5NCBDNDAuNjYxOTc2LDUuOTg1NTQ0MjggMzkuMzMwNTEwMSw0LjYzMDgxOTQyIDM5LjM0NDg1NTgsMi45NzQwMjcyOCBDMzkuMzU5MjAxNCwxLjMxNzIzNTE0IDQwLjcxMzkyNjMsLTAuMDE0MjMwODE0NiA0Mi4zNzA3MTg0LDAuMDAwMTE0ODQyOTUyIEM2NS40MTA5MTU3LDAuMTk5NjEyODggODQsMTguOTQwODA5MSA4NCw0MS45OTg1MTA0IEM4NCw2NS4xOTQ1MDc1IDY1LjE5NTk5NzEsODMuOTk4NTEwNCA0Miw4My45OTg1MTA0IFoiLz48L2c+ICA8L3N2Zz4gIA==);height:32px;left:50%;margin-left:-16px;margin-top:-16px;position:absolute;top:50%;width:32px;z-index:1}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.mapillary-direction-perspective{display:block;position:absolute;pointer-events:none;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;z-index:10}.mapillary-direction-circle,.mapillary-direction-circle-sequence,.mapillary-direction-circle-inactive,.mapillary-direction-circle-highlight,.mapillary-direction-circle-sequence-highlight{position:absolute;border-radius:50%}.mapillary-direction-circle,.mapillary-direction-circle-sequence,.mapillary-direction-circle-highlight,.mapillary-direction-circle-sequence-highlight{pointer-events:auto}.mapillary-direction-circle:hover,.mapillary-direction-circle-sequence:hover,.mapillary-direction-circle-highlight:hover,.mapillary-direction-circle-sequence-highlight:hover{cursor:pointer}.mapillary-direction-circle,.mapillary-direction-circle-sequence{background:#0000}.mapillary-direction-circle-inactive{background:#0000;z-index:-1}.mapillary-direction-circle-highlight,.mapillary-direction-circle-sequence-highlight{background:#0006}.mapillary-direction-arrow-step,.mapillary-direction-arrow-spherical,.mapillary-direction-arrow-inactive{position:absolute;top:44%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:75%;height:44.0775%;pointer-events:none}.mapillary-direction-arrow-step,.mapillary-direction-arrow-inactive{background:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgNTguNzciPgogICAgPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTk3LjQ0LDQzLjgyTDU2LjE4LDIuNTZhOC43NSw4Ljc1LDAsMCwwLTEyLjM3LDBoMEwyLjU2LDQzLjhBOC43NSw4Ljc1LDAsMCwwLDE0Ljk0LDU2LjE4bDM1LTM1TDg1LjA1LDU2LjJBOC43NSw4Ljc1LDAsMSwwLDk3LjQ0LDQzLjgyaDBaIi8+Cjwvc3ZnPg==);background-repeat:no-repeat}.mapillary-direction-arrow-inactive{opacity:.2;z-index:-1}.mapillary-direction-arrow-spherical{background:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgNTguNzciPgogICAgPHBhdGggZmlsbD0iI0Y1REVCMyIgZD0iTTk3LjQ0LDQzLjgyTDU2LjE4LDIuNTZhOC43NSw4Ljc1LDAsMCwwLTEyLjM3LDBoMEwyLjU2LDQzLjhBOC43NSw4Ljc1LDAsMCwwLDE0Ljk0LDU2LjE4bDM1LTM1TDg1LjA1LDU2LjJBOC43NSw4Ljc1LDAsMSwwLDk3LjQ0LDQzLjgyaDBaIi8+Cjwvc3ZnPg==);background-repeat:no-repeat}.mapillary-direction-turn-circle,.mapillary-direction-turn-circle-sequence,.mapillary-direction-turn-circle-highlight,.mapillary-direction-turn-circle-sequence-highlight{position:absolute;border-radius:50%;pointer-events:auto}.mapillary-direction-turn-circle,.mapillary-direction-turn-circle-sequence{background:#0000}.mapillary-direction-turn-circle-highlight,.mapillary-direction-turn-circle-sequence-highlight{background:#0006}.mapillary-direction-turn-circle:hover,.mapillary-direction-turn-circle-sequence:hover,.mapillary-direction-turn-circle-highlight:hover,.mapillary-direction-turn-circle-sequence-highlight:hover{cursor:pointer}.mapillary-direction-turn-left,.mapillary-direction-turn-right,.mapillary-direction-turn-around{position:absolute;top:50%;pointer-events:none;-webkit-filter:drop-shadow(0px 2px 1px rgba(0,0,0,.8));filter:drop-shadow(0px 2px 1px rgba(0,0,0,.8))}.mapillary-direction-turn-left,.mapillary-direction-turn-right{width:58.794%;height:70%}.mapillary-direction-turn-around{left:50%;width:75%;height:63.2475%}.mapillary-direction-turn-left{left:45%;background:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE5LjA2Ij4KICAgIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05OS4yLDc2Qzk4LDY0LjkxLDk1LjA2LDU2LjYsODkuNTcsNTAsNzksMzcuMzgsNjAuMywzMi43MiwyNC40MiwzMi4zOUw0NC44OSwxMS45M0E3LDcsMCwwLDAsMzUsMmgwbC0zMywzM2E3LDcsMCwwLDAsMCw5Ljg4TDM1LDc3Ljg1YTcsNywwLDEsMCw5LjktOS45TDI0Ljc5LDQ3Ljg5QzU2LDQ4LjE4LDcxLDUxLjkzLDc3LjcyLDYwYzMuMjEsMy44OCw1LjE4LDkuNDIsNi4xMSwxNy43NywwLjg1LDcuNTkuODcsMTYuMjIsMC4zNCwzMy4zNmE3Ljc0LDcuNzQsMCwxLDAsMTUuNDYuNDhDMTAwLjE5LDkzLjcyLDEwMC4xNiw4NC42LDk5LjIsNzZaIi8+Cjwvc3ZnPg==);background-repeat:no-repeat;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mapillary-direction-turn-right{left:55%;background:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE5LjA2Ij4KICAgIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05OS4yLDc2Qzk4LDY0LjkxLDk1LjA2LDU2LjYsODkuNTcsNTAsNzksMzcuMzgsNjAuMywzMi43MiwyNC40MiwzMi4zOUw0NC44OSwxMS45M0E3LDcsMCwwLDAsMzUsMmgwbC0zMywzM2E3LDcsMCwwLDAsMCw5Ljg4TDM1LDc3Ljg1YTcsNywwLDEsMCw5LjktOS45TDI0Ljc5LDQ3Ljg5QzU2LDQ4LjE4LDcxLDUxLjkzLDc3LjcyLDYwYzMuMjEsMy44OCw1LjE4LDkuNDIsNi4xMSwxNy43NywwLjg1LDcuNTkuODcsMTYuMjIsMC4zNCwzMy4zNmE3Ljc0LDcuNzQsMCwxLDAsMTUuNDYuNDhDMTAwLjE5LDkzLjcyLDEwMC4xNiw4NC42LDk5LjIsNzZaIi8+Cjwvc3ZnPg==);background-repeat:no-repeat;-webkit-transform:translate(-50%,-50%) scaleX(-1);transform:translate(-50%,-50%) scaleX(-1)}.mapillary-direction-turn-around{background:url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgODQuMzMiPgogICAgPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTY1LjQ3LDBDNTYsMCw0Ni44Niw1LjM5LDQwLjIxLDE2LjA3LDMzLjQ3LDI3LDI5LjM2LDQzLjE4LDI4LjQzLDY1TDEwLDQ2LjU5YTUuODcsNS44NywwLDAsMC04LjMsOC4zTDI5LjQ0LDgyLjYxYTUuODgsNS44OCwwLDAsMCw4LjMsMEw2NS40Nyw1NWE1Ljg4LDUuODgsMCwxLDAtOC4zMi04LjMyTDM5LjMyLDY0LjQ3YzAuOTItMTkuNTYsNC41LTMzLjcsMTAuMTEtNDIuNzIsNC43Mi03LjYyLDEwLjQ1LTExLDE2LjEtMTFhMTYuNjQsMTYuNjQsMCwwLDEsMTQuNzgsOEM4NiwyNyw4OS4yMSw0MS44NSw4OS4yMSw2NC40N2E1LjM5LDUuMzksMCwxLDAsMTAuNzksMEMxMDAuMDUsMTguNzgsODcuMjIsMCw2NS40NywwWiIvPgo8L3N2Zz4=);background-repeat:no-repeat;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}@media (hover: hover){.mapillary-direction-circle:hover,.mapillary-direction-circle-sequence:hover,.mapillary-direction-turn-circle:hover,.mapillary-direction-turn-circle-sequence:hover{background:#0006}}.mapillary-viewer{background-color:#0f0f0f;position:relative;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapillary-interactive{cursor:-webkit-grab;cursor:grab}.mapillary-interactive:active{cursor:-webkit-grabbing;cursor:grabbing}.mapillary-viewer .mapillary-dom{bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mapillary-dom .mapillary-dom-renderer{pointer-events:auto}.mapillary-viewer div{-webkit-box-sizing:content-box;box-sizing:content-box}.mapillary-viewer input:focus{background:none}.mapillary-navigation-sequence,.mapillary-navigation-spatial{position:absolute;pointer-events:none;z-index:10}.mapillary-navigation-sequence{top:12px;left:50%;margin-left:-40px}.mapillary-navigation-spatial{bottom:18px;left:50%;margin-left:-100px}.mapillary-navigation-spatial-bottom{margin-left:40px}.mapillary-navigation-button{width:36px;height:36px;background-size:contain;background-repeat:no-repeat;pointer-events:auto;margin:0 2px;cursor:pointer;display:inline-block;-webkit-filter:drop-shadow(0 2px 0 rgba(0,0,0,1));filter:drop-shadow(0 2px 0 rgba(0,0,0,1))}.mapillary-navigation-prev,.mapillary-navigation-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDkwLDkwKSI+PGcgaWQ9ImFycm93LXVwIiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNODguODg0MzgxNyw0NS43Mzc4ODA2IEM4OC4yOTk4ODUzLDQ1Ljk0OTc5MTYgODcuNzUxNTY5Miw0Ni4yODk5Mjk5IDg3LjI4MzA4NTMsNDYuNzU4NDEzOCBMMzEuMzYzMzk0NywxMDIuNjc4MTA0IEMyOS42NDYwNjE0LDEwNC4zOTU0MzggMjkuNjUxODM2MywxMDcuMTcwNDk4IDMxLjM2NzAwMzEsMTA4Ljg4NTY2NCBMNDAuNjg2NzQ1MywxMTguMjA1NDA3IEM0Mi40MDAzOTY3LDExOS45MTkwNTggNDUuMTgxMTMxMywxMTkuOTIyMTg5IDQ2Ljg5NDMwNTIsMTE4LjIwOTAxNSBMOTAuODAwOTI3Niw3NC4zMDIzOTI2IEwxMzQuNDUwNTUsMTE3Ljk1MjAxNSBDMTM2LjE2Nzg4MywxMTkuNjY5MzQ5IDEzOC45NDI5NDMsMTE5LjY2MzU3NCAxNDAuNjU4MTEsMTE3Ljk0ODQwNyBMMTQ5Ljk3Nzg1MiwxMDguNjI4NjY1IEMxNTEuNjkxNTA0LDEwNi45MTUwMTMgMTUxLjY5NDYzNSwxMDQuMTM0Mjc5IDE0OS45ODE0NjEsMTAyLjQyMTEwNSBMOTQuMDYxNzcwMSw0Ni41MDE0MTQxIEM5Mi42NTczMTA5LDQ1LjA5Njk1NDkgOTAuNTQ1NDIzMSw0NC44NDQ5NDQ1IDg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBMODguODg0MzgxNyw0NS43Mzc4ODA2IFoiIGlkPSJBcnJvdyIgPjwvcGF0aD48cGF0aCBkPSJNOTAsMTcwLjEzODgxMiBDMTM0LjI1OTQ0NCwxNzAuMTM4ODEyIDE3MC4xMzg4MTIsMTM0LjI1OTQ0NCAxNzAuMTM4ODEyLDkwIEMxNzAuMTM4ODEyLDQ1Ljc0MDU1NjIgMTM0LjI1OTQ0NCw5Ljg2MTE4Nzg1IDkwLDkuODYxMTg3ODUgQzQ1Ljc0MDU1NjIsOS44NjExODc4NSA5Ljg2MTE4Nzg1LDQ1Ljc0MDU1NjIgOS44NjExODc4NSw5MCBDOS44NjExODc4NSwxMzQuMjU5NDQ0IDQ1Ljc0MDU1NjIsMTcwLjEzODgxMiA5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIFogTTAsOTAgQzAsNDAuMjk0MzcyNSA0MC4yOTQzNzI1LDAgOTAsMCBDMTM5LjcwNTYyNywwIDE4MCw0MC4yOTQzNzI1IDE4MCw5MCBDMTgwLDEzOS43MDU2MjcgMTM5LjcwNTYyNywxODAgOTAsMTgwIEM0MC4yOTQzNzI1LDE4MCAwLDEzOS43MDU2MjcgMCw5MCBaIiBpZD0iQ2lyY2xlIj48L3BhdGg+PC9nPjwvZz48L3N2Zz4=)}.DirectionNext,.DirectionRight{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgOTAsOTApIj48ZyBpZD0iYXJyb3ctdXAiIGZpbGw9IiNGRkZGRkYiPjxwYXRoIGQ9Ik04OC44ODQzODE3LDQ1LjczNzg4MDYgQzg4LjI5OTg4NTMsNDUuOTQ5NzkxNiA4Ny43NTE1NjkyLDQ2LjI4OTkyOTkgODcuMjgzMDg1Myw0Ni43NTg0MTM4IEwzMS4zNjMzOTQ3LDEwMi42NzgxMDQgQzI5LjY0NjA2MTQsMTA0LjM5NTQzOCAyOS42NTE4MzYzLDEwNy4xNzA0OTggMzEuMzY3MDAzMSwxMDguODg1NjY0IEw0MC42ODY3NDUzLDExOC4yMDU0MDcgQzQyLjQwMDM5NjcsMTE5LjkxOTA1OCA0NS4xODExMzEzLDExOS45MjIxODkgNDYuODk0MzA1MiwxMTguMjA5MDE1IEw5MC44MDA5Mjc2LDc0LjMwMjM5MjYgTDEzNC40NTA1NSwxMTcuOTUyMDE1IEMxMzYuMTY3ODgzLDExOS42NjkzNDkgMTM4Ljk0Mjk0MywxMTkuNjYzNTc0IDE0MC42NTgxMSwxMTcuOTQ4NDA3IEwxNDkuOTc3ODUyLDEwOC42Mjg2NjUgQzE1MS42OTE1MDQsMTA2LjkxNTAxMyAxNTEuNjk0NjM1LDEwNC4xMzQyNzkgMTQ5Ljk4MTQ2MSwxMDIuNDIxMTA1IEw5NC4wNjE3NzAxLDQ2LjUwMTQxNDEgQzkyLjY1NzMxMDksNDUuMDk2OTU0OSA5MC41NDU0MjMxLDQ0Ljg0NDk0NDUgODguODg0MzgxNyw0NS43Mzc4ODA2IEw4OC44ODQzODE3LDQ1LjczNzg4MDYgWiIgaWQ9IkFycm93IiA+PC9wYXRoPjxwYXRoIGQ9Ik05MCwxNzAuMTM4ODEyIEMxMzQuMjU5NDQ0LDE3MC4xMzg4MTIgMTcwLjEzODgxMiwxMzQuMjU5NDQ0IDE3MC4xMzg4MTIsOTAgQzE3MC4xMzg4MTIsNDUuNzQwNTU2MiAxMzQuMjU5NDQ0LDkuODYxMTg3ODUgOTAsOS44NjExODc4NSBDNDUuNzQwNTU2Miw5Ljg2MTE4Nzg1IDkuODYxMTg3ODUsNDUuNzQwNTU2MiA5Ljg2MTE4Nzg1LDkwIEM5Ljg2MTE4Nzg1LDEzNC4yNTk0NDQgNDUuNzQwNTU2MiwxNzAuMTM4ODEyIDkwLDE3MC4xMzg4MTIgTDkwLDE3MC4xMzg4MTIgTDkwLDE3MC4xMzg4MTIgWiBNMCw5MCBDMCw0MC4yOTQzNzI1IDQwLjI5NDM3MjUsMCA5MCwwIEMxMzkuNzA1NjI3LDAgMTgwLDQwLjI5NDM3MjUgMTgwLDkwIEMxODAsMTM5LjcwNTYyNyAxMzkuNzA1NjI3LDE4MCA5MCwxODAgQzQwLjI5NDM3MjUsMTgwIDAsMTM5LjcwNTYyNyAwLDkwIFoiIGlkPSJDaXJjbGUiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg==)}.mapillary-navigation-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoMCA5MCw5MCkiPjxnIGlkPSJhcnJvdy11cCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBDODguMjk5ODg1Myw0NS45NDk3OTE2IDg3Ljc1MTU2OTIsNDYuMjg5OTI5OSA4Ny4yODMwODUzLDQ2Ljc1ODQxMzggTDMxLjM2MzM5NDcsMTAyLjY3ODEwNCBDMjkuNjQ2MDYxNCwxMDQuMzk1NDM4IDI5LjY1MTgzNjMsMTA3LjE3MDQ5OCAzMS4zNjcwMDMxLDEwOC44ODU2NjQgTDQwLjY4Njc0NTMsMTE4LjIwNTQwNyBDNDIuNDAwMzk2NywxMTkuOTE5MDU4IDQ1LjE4MTEzMTMsMTE5LjkyMjE4OSA0Ni44OTQzMDUyLDExOC4yMDkwMTUgTDkwLjgwMDkyNzYsNzQuMzAyMzkyNiBMMTM0LjQ1MDU1LDExNy45NTIwMTUgQzEzNi4xNjc4ODMsMTE5LjY2OTM0OSAxMzguOTQyOTQzLDExOS42NjM1NzQgMTQwLjY1ODExLDExNy45NDg0MDcgTDE0OS45Nzc4NTIsMTA4LjYyODY2NSBDMTUxLjY5MTUwNCwxMDYuOTE1MDEzIDE1MS42OTQ2MzUsMTA0LjEzNDI3OSAxNDkuOTgxNDYxLDEwMi40MjExMDUgTDk0LjA2MTc3MDEsNDYuNTAxNDE0MSBDOTIuNjU3MzEwOSw0NS4wOTY5NTQ5IDkwLjU0NTQyMzEsNDQuODQ0OTQ0NSA4OC44ODQzODE3LDQ1LjczNzg4MDYgTDg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBaIiBpZD0iQXJyb3ciID48L3BhdGg+PHBhdGggZD0iTTkwLDE3MC4xMzg4MTIgQzEzNC4yNTk0NDQsMTcwLjEzODgxMiAxNzAuMTM4ODEyLDEzNC4yNTk0NDQgMTcwLjEzODgxMiw5MCBDMTcwLjEzODgxMiw0NS43NDA1NTYyIDEzNC4yNTk0NDQsOS44NjExODc4NSA5MCw5Ljg2MTE4Nzg1IEM0NS43NDA1NTYyLDkuODYxMTg3ODUgOS44NjExODc4NSw0NS43NDA1NTYyIDkuODYxMTg3ODUsOTAgQzkuODYxMTg3ODUsMTM0LjI1OTQ0NCA0NS43NDA1NTYyLDE3MC4xMzg4MTIgOTAsMTcwLjEzODgxMiBMOTAsMTcwLjEzODgxMiBMOTAsMTcwLjEzODgxMiBaIE0wLDkwIEMwLDQwLjI5NDM3MjUgNDAuMjk0MzcyNSwwIDkwLDAgQzEzOS43MDU2MjcsMCAxODAsNDAuMjk0MzcyNSAxODAsOTAgQzE4MCwxMzkuNzA1NjI3IDEzOS43MDU2MjcsMTgwIDkwLDE4MCBDNDAuMjk0MzcyNSwxODAgMCwxMzkuNzA1NjI3IDAsOTAgWiIgaWQ9IkNpcmNsZSI+PC9wYXRoPjwvZz48L2c+PC9zdmc+)}.mapillary-navigation-backward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDkwLDkwKSI+PGcgaWQ9ImFycm93LXVwIiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNODguODg0MzgxNyw0NS43Mzc4ODA2IEM4OC4yOTk4ODUzLDQ1Ljk0OTc5MTYgODcuNzUxNTY5Miw0Ni4yODk5Mjk5IDg3LjI4MzA4NTMsNDYuNzU4NDEzOCBMMzEuMzYzMzk0NywxMDIuNjc4MTA0IEMyOS42NDYwNjE0LDEwNC4zOTU0MzggMjkuNjUxODM2MywxMDcuMTcwNDk4IDMxLjM2NzAwMzEsMTA4Ljg4NTY2NCBMNDAuNjg2NzQ1MywxMTguMjA1NDA3IEM0Mi40MDAzOTY3LDExOS45MTkwNTggNDUuMTgxMTMxMywxMTkuOTIyMTg5IDQ2Ljg5NDMwNTIsMTE4LjIwOTAxNSBMOTAuODAwOTI3Niw3NC4zMDIzOTI2IEwxMzQuNDUwNTUsMTE3Ljk1MjAxNSBDMTM2LjE2Nzg4MywxMTkuNjY5MzQ5IDEzOC45NDI5NDMsMTE5LjY2MzU3NCAxNDAuNjU4MTEsMTE3Ljk0ODQwNyBMMTQ5Ljk3Nzg1MiwxMDguNjI4NjY1IEMxNTEuNjkxNTA0LDEwNi45MTUwMTMgMTUxLjY5NDYzNSwxMDQuMTM0Mjc5IDE0OS45ODE0NjEsMTAyLjQyMTEwNSBMOTQuMDYxNzcwMSw0Ni41MDE0MTQxIEM5Mi42NTczMTA5LDQ1LjA5Njk1NDkgOTAuNTQ1NDIzMSw0NC44NDQ5NDQ1IDg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBMODguODg0MzgxNyw0NS43Mzc4ODA2IFoiIGlkPSJBcnJvdyIgPjwvcGF0aD48cGF0aCBkPSJNOTAsMTcwLjEzODgxMiBDMTM0LjI1OTQ0NCwxNzAuMTM4ODEyIDE3MC4xMzg4MTIsMTM0LjI1OTQ0NCAxNzAuMTM4ODEyLDkwIEMxNzAuMTM4ODEyLDQ1Ljc0MDU1NjIgMTM0LjI1OTQ0NCw5Ljg2MTE4Nzg1IDkwLDkuODYxMTg3ODUgQzQ1Ljc0MDU1NjIsOS44NjExODc4NSA5Ljg2MTE4Nzg1LDQ1Ljc0MDU1NjIgOS44NjExODc4NSw5MCBDOS44NjExODc4NSwxMzQuMjU5NDQ0IDQ1Ljc0MDU1NjIsMTcwLjEzODgxMiA5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIFogTTAsOTAgQzAsNDAuMjk0MzcyNSA0MC4yOTQzNzI1LDAgOTAsMCBDMTM5LjcwNTYyNywwIDE4MCw0MC4yOTQzNzI1IDE4MCw5MCBDMTgwLDEzOS43MDU2MjcgMTM5LjcwNTYyNywxODAgOTAsMTgwIEM0MC4yOTQzNzI1LDE4MCAwLDEzOS43MDU2MjcgMCw5MCBaIiBpZD0iQ2lyY2xlIj48L3BhdGg+PC9nPjwvZz48L3N2Zz4=)}.mapillary-navigation-turn-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDkwLDkwKSI+PGcgaWQ9ImFycm93LXVwIiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNODguODg0MzgxNyw0NS43Mzc4ODA2IEM4OC4yOTk4ODUzLDQ1Ljk0OTc5MTYgODcuNzUxNTY5Miw0Ni4yODk5Mjk5IDg3LjI4MzA4NTMsNDYuNzU4NDEzOCBMMzEuMzYzMzk0NywxMDIuNjc4MTA0IEMyOS42NDYwNjE0LDEwNC4zOTU0MzggMjkuNjUxODM2MywxMDcuMTcwNDk4IDMxLjM2NzAwMzEsMTA4Ljg4NTY2NCBMNDAuNjg2NzQ1MywxMTguMjA1NDA3IEM0Mi40MDAzOTY3LDExOS45MTkwNTggNDUuMTgxMTMxMywxMTkuOTIyMTg5IDQ2Ljg5NDMwNTIsMTE4LjIwOTAxNSBMOTAuODAwOTI3Niw3NC4zMDIzOTI2IEwxMzQuNDUwNTUsMTE3Ljk1MjAxNSBDMTM2LjE2Nzg4MywxMTkuNjY5MzQ5IDEzOC45NDI5NDMsMTE5LjY2MzU3NCAxNDAuNjU4MTEsMTE3Ljk0ODQwNyBMMTQ5Ljk3Nzg1MiwxMDguNjI4NjY1IEMxNTEuNjkxNTA0LDEwNi45MTUwMTMgMTUxLjY5NDYzNSwxMDQuMTM0Mjc5IDE0OS45ODE0NjEsMTAyLjQyMTEwNSBMOTQuMDYxNzcwMSw0Ni41MDE0MTQxIEM5Mi42NTczMTA5LDQ1LjA5Njk1NDkgOTAuNTQ1NDIzMSw0NC44NDQ5NDQ1IDg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBMODguODg0MzgxNyw0NS43Mzc4ODA2IFoiIGlkPSJBcnJvdyIgPjwvcGF0aD48cGF0aCBkPSJNOTAsMTcwLjEzODgxMiBDMTM0LjI1OTQ0NCwxNzAuMTM4ODEyIDE3MC4xMzg4MTIsMTM0LjI1OTQ0NCAxNzAuMTM4ODEyLDkwIEMxNzAuMTM4ODEyLDQ1Ljc0MDU1NjIgMTM0LjI1OTQ0NCw5Ljg2MTE4Nzg1IDkwLDkuODYxMTg3ODUgQzQ1Ljc0MDU1NjIsOS44NjExODc4NSA5Ljg2MTE4Nzg1LDQ1Ljc0MDU1NjIgOS44NjExODc4NSw5MCBDOS44NjExODc4NSwxMzQuMjU5NDQ0IDQ1Ljc0MDU1NjIsMTcwLjEzODgxMiA5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIEw5MCwxNzAuMTM4ODEyIFogTTAsOTAgQzAsNDAuMjk0MzcyNSA0MC4yOTQzNzI1LDAgOTAsMCBDMTM5LjcwNTYyNywwIDE4MCw0MC4yOTQzNzI1IDE4MCw5MCBDMTgwLDEzOS43MDU2MjcgMTM5LjcwNTYyNywxODAgOTAsMTgwIEM0MC4yOTQzNzI1LDE4MCAwLDEzOS43MDU2MjcgMCw5MCBaIiBpZD0iQ2lyY2xlIj48L3BhdGg+PC9nPjwvZz48L3N2Zz4=)}.mapillary-navigation-turn-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoNDUgOTAsOTApIj48ZyBpZD0iYXJyb3ctdXAiIGZpbGw9IiNGRkZGRkYiPjxwYXRoIGQ9Ik04OC44ODQzODE3LDQ1LjczNzg4MDYgQzg4LjI5OTg4NTMsNDUuOTQ5NzkxNiA4Ny43NTE1NjkyLDQ2LjI4OTkyOTkgODcuMjgzMDg1Myw0Ni43NTg0MTM4IEwzMS4zNjMzOTQ3LDEwMi42NzgxMDQgQzI5LjY0NjA2MTQsMTA0LjM5NTQzOCAyOS42NTE4MzYzLDEwNy4xNzA0OTggMzEuMzY3MDAzMSwxMDguODg1NjY0IEw0MC42ODY3NDUzLDExOC4yMDU0MDcgQzQyLjQwMDM5NjcsMTE5LjkxOTA1OCA0NS4xODExMzEzLDExOS45MjIxODkgNDYuODk0MzA1MiwxMTguMjA5MDE1IEw5MC44MDA5Mjc2LDc0LjMwMjM5MjYgTDEzNC40NTA1NSwxMTcuOTUyMDE1IEMxMzYuMTY3ODgzLDExOS42NjkzNDkgMTM4Ljk0Mjk0MywxMTkuNjYzNTc0IDE0MC42NTgxMSwxMTcuOTQ4NDA3IEwxNDkuOTc3ODUyLDEwOC42Mjg2NjUgQzE1MS42OTE1MDQsMTA2LjkxNTAxMyAxNTEuNjk0NjM1LDEwNC4xMzQyNzkgMTQ5Ljk4MTQ2MSwxMDIuNDIxMTA1IEw5NC4wNjE3NzAxLDQ2LjUwMTQxNDEgQzkyLjY1NzMxMDksNDUuMDk2OTU0OSA5MC41NDU0MjMxLDQ0Ljg0NDk0NDUgODguODg0MzgxNyw0NS43Mzc4ODA2IEw4OC44ODQzODE3LDQ1LjczNzg4MDYgWiIgaWQ9IkFycm93IiA+PC9wYXRoPjxwYXRoIGQ9Ik05MCwxNzAuMTM4ODEyIEMxMzQuMjU5NDQ0LDE3MC4xMzg4MTIgMTcwLjEzODgxMiwxMzQuMjU5NDQ0IDE3MC4xMzg4MTIsOTAgQzE3MC4xMzg4MTIsNDUuNzQwNTU2MiAxMzQuMjU5NDQ0LDkuODYxMTg3ODUgOTAsOS44NjExODc4NSBDNDUuNzQwNTU2Miw5Ljg2MTE4Nzg1IDkuODYxMTg3ODUsNDUuNzQwNTU2MiA5Ljg2MTE4Nzg1LDkwIEM5Ljg2MTE4Nzg1LDEzNC4yNTk0NDQgNDUuNzQwNTU2MiwxNzAuMTM4ODEyIDkwLDE3MC4xMzg4MTIgTDkwLDE3MC4xMzg4MTIgTDkwLDE3MC4xMzg4MTIgWiBNMCw5MCBDMCw0MC4yOTQzNzI1IDQwLjI5NDM3MjUsMCA5MCwwIEMxMzkuNzA1NjI3LDAgMTgwLDQwLjI5NDM3MjUgMTgwLDkwIEMxODAsMTM5LjcwNTYyNyAxMzkuNzA1NjI3LDE4MCA5MCwxODAgQzQwLjI5NDM3MjUsMTgwIDAsMTM5LjcwNTYyNyAwLDkwIFoiIGlkPSJDaXJjbGUiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg==)}.mapillary-navigation-turn-around{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEzNSA5MCw5MCkiPjxnIGlkPSJhcnJvdy11cCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBDODguMjk5ODg1Myw0NS45NDk3OTE2IDg3Ljc1MTU2OTIsNDYuMjg5OTI5OSA4Ny4yODMwODUzLDQ2Ljc1ODQxMzggTDMxLjM2MzM5NDcsMTAyLjY3ODEwNCBDMjkuNjQ2MDYxNCwxMDQuMzk1NDM4IDI5LjY1MTgzNjMsMTA3LjE3MDQ5OCAzMS4zNjcwMDMxLDEwOC44ODU2NjQgTDQwLjY4Njc0NTMsMTE4LjIwNTQwNyBDNDIuNDAwMzk2NywxMTkuOTE5MDU4IDQ1LjE4MTEzMTMsMTE5LjkyMjE4OSA0Ni44OTQzMDUyLDExOC4yMDkwMTUgTDkwLjgwMDkyNzYsNzQuMzAyMzkyNiBMMTM0LjQ1MDU1LDExNy45NTIwMTUgQzEzNi4xNjc4ODMsMTE5LjY2OTM0OSAxMzguOTQyOTQzLDExOS42NjM1NzQgMTQwLjY1ODExLDExNy45NDg0MDcgTDE0OS45Nzc4NTIsMTA4LjYyODY2NSBDMTUxLjY5MTUwNCwxMDYuOTE1MDEzIDE1MS42OTQ2MzUsMTA0LjEzNDI3OSAxNDkuOTgxNDYxLDEwMi40MjExMDUgTDk0LjA2MTc3MDEsNDYuNTAxNDE0MSBDOTIuNjU3MzEwOSw0NS4wOTY5NTQ5IDkwLjU0NTQyMzEsNDQuODQ0OTQ0NSA4OC44ODQzODE3LDQ1LjczNzg4MDYgTDg4Ljg4NDM4MTcsNDUuNzM3ODgwNiBaIiBpZD0iQXJyb3ciID48L3BhdGg+PHBhdGggZD0iTTkwLDE3MC4xMzg4MTIgQzEzNC4yNTk0NDQsMTcwLjEzODgxMiAxNzAuMTM4ODEyLDEzNC4yNTk0NDQgMTcwLjEzODgxMiw5MCBDMTcwLjEzODgxMiw0NS43NDA1NTYyIDEzNC4yNTk0NDQsOS44NjExODc4NSA5MCw5Ljg2MTE4Nzg1IEM0NS43NDA1NTYyLDkuODYxMTg3ODUgOS44NjExODc4NSw0NS43NDA1NTYyIDkuODYxMTg3ODUsOTAgQzkuODYxMTg3ODUsMTM0LjI1OTQ0NCA0NS43NDA1NTYyLDE3MC4xMzg4MTIgOTAsMTcwLjEzODgxMiBMOTAsMTcwLjEzODgxMiBMOTAsMTcwLjEzODgxMiBaIE0wLDkwIEMwLDQwLjI5NDM3MjUgNDAuMjk0MzcyNSwwIDkwLDAgQzEzOS43MDU2MjcsMCAxODAsNDAuMjk0MzcyNSAxODAsOTAgQzE4MCwxMzkuNzA1NjI3IDEzOS43MDU2MjcsMTgwIDkwLDE4MCBDNDAuMjk0MzcyNSwxODAgMCwxMzkuNzA1NjI3IDAsOTAgWiIgaWQ9IkNpcmNsZSI+PC9wYXRoPjwvZz48L2c+PC9zdmc+)}.mapillary-popup{position:absolute;left:0;top:0;pointer-events:none;display:-webkit-box;display:-ms-flexbox;display:flex}.mapillary-popup-content,.mapillary-popup-content-clean{position:relative}.mapillary-popup-capture-pointer{pointer-events:auto}.mapillary-popup-content{padding:5px 10px;background:#fff;border:1px solid black;border-radius:2px}.mapillary-popup-float-bottom,.mapillary-popup-float-bottom-left,.mapillary-popup-float-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mapillary-popup-float-top,.mapillary-popup-float-top-left,.mapillary-popup-float-top-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.mapillary-popup-float-left{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.mapillary-popup-float-right{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mapillary-popup-tip,.mapillary-popup-tip-inner{position:relative;z-index:1;width:0;height:0;border:7px solid transparent}.mapillary-popup-float-top .mapillary-popup-tip{-ms-flex-item-align:center;align-self:center;border-top-color:#000;border-bottom:none}.mapillary-popup-float-top .mapillary-popup-tip-inner{position:relative;top:-8px;left:-7px;border-top-color:#fff;border-bottom:none}.mapillary-popup-float-top-right .mapillary-popup-tip{-ms-flex-item-align:start;align-self:flex-start;border-top-color:#000;border-bottom:none;border-left:none}.mapillary-popup-float-top-right .mapillary-popup-tip-inner{position:relative;top:-9px;left:1px;border-top-color:#fff;border-bottom:none;border-left:none}.mapillary-popup-float-top-left .mapillary-popup-tip{-ms-flex-item-align:end;align-self:flex-end;border-top-color:#000;border-bottom:none;border-right:none}.mapillary-popup-float-top-left .mapillary-popup-tip-inner{position:relative;top:-9px;left:-8px;border-top-color:#fff;border-bottom:none;border-right:none}.mapillary-popup-float-bottom .mapillary-popup-tip{-ms-flex-item-align:center;align-self:center;border-top:none;border-bottom-color:#000}.mapillary-popup-float-bottom .mapillary-popup-tip-inner{position:relative;bottom:-1px;left:-7px;border-top:none;border-bottom-color:#fff}.mapillary-popup-float-bottom-right .mapillary-popup-tip{-ms-flex-item-align:start;align-self:flex-start;border-bottom-color:#000;border-top:none;border-left:none}.mapillary-popup-float-bottom-right .mapillary-popup-tip-inner{position:relative;bottom:-2px;left:1px;border-bottom-color:#fff;border-top:none;border-left:none}.mapillary-popup-float-bottom-left .mapillary-popup-tip{-ms-flex-item-align:end;align-self:flex-end;border-bottom-color:#000;border-top:none;border-right:none}.mapillary-popup-float-bottom-left .mapillary-popup-tip-inner{position:relative;bottom:-2px;left:-8px;border-bottom-color:#fff;border-top:none;border-right:none}.mapillary-popup-float-left .mapillary-popup-tip{-ms-flex-item-align:center;align-self:center;border-left-color:#000;border-right:none}.mapillary-popup-float-left .mapillary-popup-tip-inner{position:relative;top:-7px;left:-8px;border-left-color:#fff;border-right:none}.mapillary-popup-float-right .mapillary-popup-tip{-ms-flex-item-align:center;align-self:center;border-right-color:#000;border-left:none}.mapillary-popup-float-right .mapillary-popup-tip-inner{position:relative;top:-7px;left:1px;border-right-color:#fff;border-left:none}.mapillary-popup-float-top-left .mapillary-popup-content{border-bottom-right-radius:0}.mapillary-popup-float-top-right .mapillary-popup-content{border-bottom-left-radius:0}.mapillary-popup-float-bottom-left .mapillary-popup-content{border-top-right-radius:0}.mapillary-popup-float-bottom-right .mapillary-popup-content{border-top-left-radius:0}.mapillary-sequence-container{position:absolute;top:14px;pointer-events:none;font-size:0;z-index:10;width:100%}.mapillary-sequence-stepper,.mapillary-sequence-controls{position:absolute;left:50%;cursor:pointer}.mapillary-sequence-stepper{-webkit-transform:translate(-50%,0);transform:translate(-50%)}.mapillary-sequence-expander-button,.mapillary-sequence-playback-button,.mapillary-sequence-timeline-button{display:inline-block;height:100%;pointer-events:auto}.mapillary-sequence-expander-button{width:calc(100% * 16 / 88);background:#00000080}.mapillary-sequence-expander-bar{background-color:#fff;width:12.5%;border-radius:1px;height:calc(100% * 16 / 30);position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mapillary-sequence-playback-button,.mapillary-sequence-timeline-button{width:0;background:#00000080;-webkit-transition:width .15s ease-out;transition:width .15s ease-out}.mapillary-sequence-speed-container,.mapillary-sequence-position-container,.mapillary-sequence-position-container-inactive{display:inline-block;height:100%;vertical-align:top;background:#00000080;pointer-events:auto;padding-right:3px}.mapillary-sequence-speed-container{padding-left:3px}.mapillary-sequence-position-container,.mapillary-sequence-position-container-inactive{padding-left:16px}.mapillary-sequence-speed,.mapillary-sequence-position{margin:7px 0 0;padding:0;height:16px;cursor:pointer;outline:none;background:none;-webkit-appearance:none}.mapillary-sequence-position-container-inactive .mapillary-sequence-position{cursor:default}.mapillary-sequence-fast-icon,.mapillary-sequence-fast-icon-gray,.mapillary-sequence-timeline-icon,.mapillary-sequence-timeline-icon-gray,.mapillary-sequence-slow-icon,.mapillary-sequence-switch-icon,.mapillary-sequence-close-icon{position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-size:contain;background-repeat:no-repeat;opacity:0}.mapillary-sequence-fast-icon,.mapillary-sequence-timeline-icon{-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-property:opacity;transition-property:opacity}.mapillary-sequence-fast-icon,.mapillary-sequence-fast-icon-gray,.mapillary-sequence-timeline-icon,.mapillary-sequence-timeline-icon-gray,.mapillary-sequence-slow-icon{width:calc(100% * 24 / 36);height:80%}.mapillary-sequence-switch-icon,.mapillary-sequence-close-icon{width:calc(100% * 16 / 36);height:calc(100% * 16 / 30)}.mapillary-sequence-fast-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+CiAgICAgIGZhc3QKICAgIDwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgPHBhdGggZD0iTTIwLjE0ODQgMTMuNWMtMi4xNTE3IDAtMi41NDc4Ljg2Mi0zLjU2NzYgMS4zNjA1LTEuODUzMy45MDYtMy4wOTkzIDIuMDcyNi0zLjA5OTMgNC4yNjQ1IDAgMS4xNjE0LS4wMTAzIDEuODc1LS4zNzAzIDEuODc1LS42NTc1IDAtLjk5MzgtLjY5MS0xLjI5ODgtMS4yMi0uMjA4Mi4wNjktLjQyNjcuMTAxMi0uNjQ1Ny4wOTUtLjg0MzcgMC01LjQ2My0xLjY4NjctNS40NjMtMi42MjUgMC0uNTUxLjM3MDMtLjg0Ny4zNzAzLTEuNXYtLjAxYy0uMDE2NS0uNTUzNC0uMjg2Ny0xLjA2NzMtLjczMDgtMS4zOS0uNTk0My0uNDMwNS0xLjA0NC0xLjAzNS0xLjI4ODItMS43MzIzLS4xNzkyLjA4NjMtLjM3NS4xMzE1LS41NzM1LjEzMjNDMi43NzA1IDEyLjc1IDIgMTEuODczIDIgMTAuNWMwLTEuMzY5NC4yNjYtMS44NzUuNTU1Ni0xLjg3NS4zNzU0IDAgLjQ2My4xODc1LjQ2My4xODc1cy4yNTY4LS45NDEuNzc5OC0uOTQxYy4yNzEyLjAwMzcuNTE3Ny4xNjAyLjYzOS40MDU3Ljg4MDItMS4wMDk3IDIuMTU5LTEuNTY5NiAzLjQ4ODQtMS41MjcyIDUuMzcyIDAgNS43Mjk3IDMuMzc1IDcuNDA3NSAzLjM3NS42MjE0IDAgMS4xMTEtLjg5MjcgMS4xMTEtMS4xMjUgMC0uNzIwNi0zLjMzMzMtMi4wNzU3LTMuMzMzMy01LjI1IDAtLjQ5Ni4zOTM1LS43NS45MjYtLjc1LjQ2MyAwIDEuNDUxMy42MTA0IDIuMDM3IDEuNS44OTUgMS4zNTk0Ljc1OSAzIDEuODUyIDMuNzUuNDA5LjI4MDggMS40NTE4LjI2MDMgMi4yMjIuNzUuNzcwNS40ODk3IDEuMjQ2NCAxLjMwMjcgMS40ODE2IDEuNS4yMTcuMTkwMy4zNTAyLjQ2LjM3MDQuNzUgMCAuMzYxMy0uODA1MyAyLjI1LTEuODUxNiAyLjI1em0tOC44ODkgM2MtLjk5MDctLjAxODgtMS45NjY1LS4yNDg0LTIuODY0LS42NzM4LS4wNTkyLjIxOTgtLjA5MjUuNDQ2LS4wOTkuNjczOCAwIC42MjczLjQ3OTcuODY4IDIuMjIyIDEuNS4zOTE2LjEzNC43Njk3LjMwNTIgMS4xMjkzLjUxMTMuMDQwNC0uNjgzLjExNTQtMS4zNjMyLjIyNS0yLjAzODMtLjIwMDQuMDE0My0uNDAyMi4wMjctLjYxMzMuMDI3eiIgaWQ9ImEiLz4KICAgIDwvZGVmcz4KICAgIDx1c2UgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPgogIDwvc3ZnPg==)}.mapillary-sequence-fast-icon-gray{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgPHRpdGxlPgogICAgZmFzdAogIDwvdGl0bGU+CiAgPGRlZnM+CiAgICA8cGF0aCBkPSJNMjAuMTQ4NCAxMy41Yy0yLjE1MTcgMC0yLjU0NzguODYyLTMuNTY3NiAxLjM2MDUtMS44NTMzLjkwNi0zLjA5OTMgMi4wNzI2LTMuMDk5MyA0LjI2NDUgMCAxLjE2MTQtLjAxMDMgMS44NzUtLjM3MDMgMS44NzUtLjY1NzUgMC0uOTkzOC0uNjkxLTEuMjk4OC0xLjIyLS4yMDgyLjA2OS0uNDI2Ny4xMDEyLS42NDU3LjA5NS0uODQzNyAwLTUuNDYzLTEuNjg2Ny01LjQ2My0yLjYyNSAwLS41NTEuMzcwMy0uODQ3LjM3MDMtMS41di0uMDFjLS4wMTY1LS41NTM0LS4yODY3LTEuMDY3My0uNzMwOC0xLjM5LS41OTQzLS40MzA1LTEuMDQ0LTEuMDM1LTEuMjg4Mi0xLjczMjMtLjE3OTIuMDg2My0uMzc1LjEzMTUtLjU3MzUuMTMyM0MyLjc3MDUgMTIuNzUgMiAxMS44NzMgMiAxMC41YzAtMS4zNjk0LjI2Ni0xLjg3NS41NTU2LTEuODc1LjM3NTQgMCAuNDYzLjE4NzUuNDYzLjE4NzVzLjI1NjgtLjk0MS43Nzk4LS45NDFjLjI3MTIuMDAzNy41MTc3LjE2MDIuNjM5LjQwNTcuODgwMi0xLjAwOTcgMi4xNTktMS41Njk2IDMuNDg4NC0xLjUyNzIgNS4zNzIgMCA1LjcyOTcgMy4zNzUgNy40MDc1IDMuMzc1LjYyMTQgMCAxLjExMS0uODkyNyAxLjExMS0xLjEyNSAwLS43MjA2LTMuMzMzMy0yLjA3NTctMy4zMzMzLTUuMjUgMC0uNDk2LjM5MzUtLjc1LjkyNi0uNzUuNDYzIDAgMS40NTEzLjYxMDQgMi4wMzcgMS41Ljg5NSAxLjM1OTQuNzU5IDMgMS44NTIgMy43NS40MDkuMjgwOCAxLjQ1MTguMjYwMyAyLjIyMi43NS43NzA1LjQ4OTcgMS4yNDY0IDEuMzAyNyAxLjQ4MTYgMS41LjIxNy4xOTAzLjM1MDIuNDYuMzcwNC43NSAwIC4zNjEzLS44MDUzIDIuMjUtMS44NTE2IDIuMjV6bS04Ljg4OSAzYy0uOTkwNy0uMDE4OC0xLjk2NjUtLjI0ODQtMi44NjQtLjY3MzgtLjA1OTIuMjE5OC0uMDkyNS40NDYtLjA5OS42NzM4IDAgLjYyNzMuNDc5Ny44NjggMi4yMjIgMS41LjM5MTYuMTM0Ljc2OTcuMzA1MiAxLjEyOTMuNTExMy4wNDA0LS42ODMuMTE1NC0xLjM2MzIuMjI1LTIuMDM4My0uMjAwNC4wMTQzLS40MDIyLjAyNy0uNjEzMy4wMjd6IiBpZD0iYSIvPgogIDwvZGVmcz4KICA8dXNlIGZpbGw9IiNEN0RBREQiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz4KPC9zdmc+)}.mapillary-sequence-timeline-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+ICA8cGF0aCBpZD0ic2NydWJiZXItYSIgZD0iTTksNiBMMTUsNiBDMTYuMTA0NTY5NSw2IDE3LDYuODk1NDMwNSAxNyw4IEwxNywxNiBDMTcsMTcuMTA0NTY5NSAxNi4xMDQ1Njk1LDE4IDE1LDE4IEw5LDE4IEM3Ljg5NTQzMDUsMTggNywxNy4xMDQ1Njk1IDcsMTYgTDcsOCBDNyw2Ljg5NTQzMDUgNy44OTU0MzA1LDYgOSw2IFogTTIwLjYzMzY4ODEsMTMgTDE5LDEzIEMxOC40NDc3MTUzLDEzIDE4LDEyLjU1MjI4NDcgMTgsMTIgQzE4LDExLjQ0NzcxNTMgMTguNDQ3NzE1MywxMSAxOSwxMSBMMjAuNjMzNjg4MSwxMSBDMjAuNDEyNjQzLDEwLjYxNzU2OTMgMjAuNDY1NzExMywxMC4xMjAwNzUxIDIwLjc5Mjg5MzIsOS43OTI4OTMyMiBDMjEuMTgzNDE3NSw5LjQwMjM2ODkzIDIxLjgxNjU4MjUsOS40MDIzNjg5MyAyMi4yMDcxMDY4LDkuNzkyODkzMjIgTDIzLjcwNzEwNjgsMTEuMjkyODkzMiBDMjMuODg4MDcxMiwxMS40NzM4NTc2IDI0LDExLjcyMzg1NzYgMjQsMTIgQzI0LDEyLjI3NjE0MjQgMjMuODg4MDcxMiwxMi41MjYxNDI0IDIzLjcwNzEwNjgsMTIuNzA3MTA2OCBMMjIuMjA3MTA2OCwxNC4yMDcxMDY4IEMyMS44MTY1ODI1LDE0LjU5NzYzMTEgMjEuMTgzNDE3NSwxNC41OTc2MzExIDIwLjc5Mjg5MzIsMTQuMjA3MTA2OCBDMjAuNDY1NzExMywxMy44Nzk5MjQ5IDIwLjQxMjY0MywxMy4zODI0MzA3IDIwLjYzMzY4ODEsMTMgWiBNMy4zNjYzMTE4NiwxMyBDMy41ODczNTcwNCwxMy4zODI0MzA3IDMuNTM0Mjg4NjgsMTMuODc5OTI0OSAzLjIwNzEwNjc4LDE0LjIwNzEwNjggQzIuODE2NTgyNDksMTQuNTk3NjMxMSAyLjE4MzQxNzUxLDE0LjU5NzYzMTEgMS43OTI4OTMyMiwxNC4yMDcxMDY4IEwwLjI5Mjg5MzIxOSwxMi43MDcxMDY4IEMwLjExMTkyODgxMywxMi41MjYxNDI0IDAsMTIuMjc2MTQyNCAwLDEyIEMwLDExLjcyMzg1NzYgMC4xMTE5Mjg4MTMsMTEuNDczODU3NiAwLjI5Mjg5MzIxOSwxMS4yOTI4OTMyIEwxLjc5Mjg5MzIyLDkuNzkyODkzMjIgQzIuMTgzNDE3NTEsOS40MDIzNjg5MyAyLjgxNjU4MjQ5LDkuNDAyMzY4OTMgMy4yMDcxMDY3OCw5Ljc5Mjg5MzIyIEMzLjUzNDI4ODY4LDEwLjEyMDA3NTEgMy41ODczNTcwNCwxMC42MTc1NjkzIDMuMzY2MzExODYsMTEgTDUsMTEgQzUuNTUyMjg0NzUsMTEgNiwxMS40NDc3MTUzIDYsMTIgQzYsMTIuNTUyMjg0NyA1LjU1MjI4NDc1LDEzIDUsMTMgTDMuMzY2MzExODYsMTMgWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHVzZSBmaWxsPSIjRkZGIiB4bGluazpocmVmPSIjc2NydWJiZXItYSIvPjwvZz4gIDwvc3ZnPiAg)}.mapillary-sequence-timeline-icon-gray{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+ICA8cGF0aCBpZD0ic2NydWJiZXItYSIgZD0iTTksNiBMMTUsNiBDMTYuMTA0NTY5NSw2IDE3LDYuODk1NDMwNSAxNyw4IEwxNywxNiBDMTcsMTcuMTA0NTY5NSAxNi4xMDQ1Njk1LDE4IDE1LDE4IEw5LDE4IEM3Ljg5NTQzMDUsMTggNywxNy4xMDQ1Njk1IDcsMTYgTDcsOCBDNyw2Ljg5NTQzMDUgNy44OTU0MzA1LDYgOSw2IFogTTIwLjYzMzY4ODEsMTMgTDE5LDEzIEMxOC40NDc3MTUzLDEzIDE4LDEyLjU1MjI4NDcgMTgsMTIgQzE4LDExLjQ0NzcxNTMgMTguNDQ3NzE1MywxMSAxOSwxMSBMMjAuNjMzNjg4MSwxMSBDMjAuNDEyNjQzLDEwLjYxNzU2OTMgMjAuNDY1NzExMywxMC4xMjAwNzUxIDIwLjc5Mjg5MzIsOS43OTI4OTMyMiBDMjEuMTgzNDE3NSw5LjQwMjM2ODkzIDIxLjgxNjU4MjUsOS40MDIzNjg5MyAyMi4yMDcxMDY4LDkuNzkyODkzMjIgTDIzLjcwNzEwNjgsMTEuMjkyODkzMiBDMjMuODg4MDcxMiwxMS40NzM4NTc2IDI0LDExLjcyMzg1NzYgMjQsMTIgQzI0LDEyLjI3NjE0MjQgMjMuODg4MDcxMiwxMi41MjYxNDI0IDIzLjcwNzEwNjgsMTIuNzA3MTA2OCBMMjIuMjA3MTA2OCwxNC4yMDcxMDY4IEMyMS44MTY1ODI1LDE0LjU5NzYzMTEgMjEuMTgzNDE3NSwxNC41OTc2MzExIDIwLjc5Mjg5MzIsMTQuMjA3MTA2OCBDMjAuNDY1NzExMywxMy44Nzk5MjQ5IDIwLjQxMjY0MywxMy4zODI0MzA3IDIwLjYzMzY4ODEsMTMgWiBNMy4zNjYzMTE4NiwxMyBDMy41ODczNTcwNCwxMy4zODI0MzA3IDMuNTM0Mjg4NjgsMTMuODc5OTI0OSAzLjIwNzEwNjc4LDE0LjIwNzEwNjggQzIuODE2NTgyNDksMTQuNTk3NjMxMSAyLjE4MzQxNzUxLDE0LjU5NzYzMTEgMS43OTI4OTMyMiwxNC4yMDcxMDY4IEwwLjI5Mjg5MzIxOSwxMi43MDcxMDY4IEMwLjExMTkyODgxMywxMi41MjYxNDI0IDAsMTIuMjc2MTQyNCAwLDEyIEMwLDExLjcyMzg1NzYgMC4xMTE5Mjg4MTMsMTEuNDczODU3NiAwLjI5Mjg5MzIxOSwxMS4yOTI4OTMyIEwxLjc5Mjg5MzIyLDkuNzkyODkzMjIgQzIuMTgzNDE3NTEsOS40MDIzNjg5MyAyLjgxNjU4MjQ5LDkuNDAyMzY4OTMgMy4yMDcxMDY3OCw5Ljc5Mjg5MzIyIEMzLjUzNDI4ODY4LDEwLjEyMDA3NTEgMy41ODczNTcwNCwxMC42MTc1NjkzIDMuMzY2MzExODYsMTEgTDUsMTEgQzUuNTUyMjg0NzUsMTEgNiwxMS40NDc3MTUzIDYsMTIgQzYsMTIuNTUyMjg0NyA1LjU1MjI4NDc1LDEzIDUsMTMgTDMuMzY2MzExODYsMTMgWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHVzZSBmaWxsPSIjRDdEQUREIiB4bGluazpocmVmPSIjc2NydWJiZXItYSIvPjwvZz4gIDwvc3ZnPiAg)}.mapillary-sequence-slow-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHRpdGxlPiAgc2xvdzwvdGl0bGU+PGRlZnM+ICA8cGF0aCBkPSJNMTguOTMzNyAxMy4yMjIybC0uNzgxNiAxLjg5NjNjLjMzMTcuMjUwMyAxLjMzNSAxLjEwMDIgMS4zMzUgMi4yNTE2LS4wMjIzLjMxMy0uMTU4LjYwNy0uMzgxNi44MjctLjA3NjguMDgwMy0uMTgzNC4xMjU0LS4yOTQ2LjEyNDNoLTIuNjU4Yy0uMTQ1MiAwLS4yNzk2LS4wNzY3LS4zNTM0LS4yMDE3bC0uNzEzNi0xLjIwNzRjLS4xMjAyLS4yMDM3LS4xNDY4LS40NDkyLS4wNzMtLjY3NGwuMTI0OC0uMzgwNUg3LjRjLjM2MS40MjM0LjU2ODguOTU2My41ODk4IDEuNTEyNS0uMDIyLjMxMy0uMTU3Ny42MDctLjM4MTMuODI2Ny0uMDc2Ny4wODA0LS4xODM0LjEyNTUtLjI5NDYuMTI0NEg0LjY1NmMtLjE0NTIgMC0uMjc5Ni0uMDc2Ny0uMzUzNS0uMjAxN2wtLjcxMzYtMS4yMDc1Yy0uMTIwNC0uMjAzNi0uMTQ3LS40NDkyLS4wNzMyLS42NzRsLjAwODItLjAyNDZjLS42MjkuNDgzMi0xLjM4NC43NzQ3LTIuMTc0My44Mzk2LS4xMTk3LjAxNzYtLjIzODUtLjAzNzItLjMwMy0uMTM5Ny0uMDY0My0uMTAyNS0uMDYyLS4yMzM0LjAwNTctLjMzMzdDMy40MjQ2IDEzLjQwMTUgMi43MDggNi4wMDIyIDExLjMxMyA2LjAwMjJjMi42OTQ1LS4wNTkgNS4yNzU1IDEuMDg1IDcuMDQxNyAzLjEyMTcuNzg2LS4yNDIyIDEuNDY1LS43NDY3IDEuOTI0Mi0xLjQyOTIuMzUzLS40NTM0Ljk3MjQtLjYwMyAxLjQ5MzUtLjM2MDdsMS45ODg3LjkyNWMuMTY0NS4wNzYzLjI1OTguMjUxLjIzNS40MzA4LS4yMDI1IDEuNDU1NC0xLjc4ODYgMy43NjYyLTUuMDYyNSA0LjUzMjR6IiBpZD0iYSIvPjwvZGVmcz48dXNlIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz4gIDwvc3ZnPiAg)}.mapillary-sequence-switch-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDx0aXRsZT4KICAgICAgcGxheV9kaXJlY3Rpb24KICAgIDwvdGl0bGU+CiAgICA8cGF0aCBkPSJNNiA0aDhjLjU1MjMgMCAxIC40NDc3IDEgMXMtLjQ0NzcgMS0xIDFINnYyLjA1ODRjLS4wMDM0LjE2NjgtLjExMTguMzE4Mi0uMjgxNS4zOTM0LS4xNjk4LjA3NS0uMzczLjA2MTctLjUyOC0uMDM1TC4yMTQzIDUuMzU4NEMuMDggNS4yNzcgMCA1LjE0MyAwIDVjMC0uMTQzLjA4LS4yNzcuMjE0My0uMzU4NWw0Ljk3NjItMy4wNTgzYy4xNTUtLjA5NjcuMzU4My0uMTEuNTI4LS4wMzUuMTY5OC4wNzUyLjI3OC4yMjY2LjI4MTUuMzkzNFY0em00IDZWNy45NDE2Yy4wMDM0LS4xNjY4LjExMTctLjMxODIuMjgxNS0uMzkzNC4xNjk3LS4wNzUuMzczLS4wNjE3LjUyOC4wMzVsNC45NzYyIDMuMDU4M0MxNS45MiAxMC43MjMgMTYgMTAuODU3IDE2IDExYzAgLjE0My0uMDguMjc3LS4yMTQzLjM1ODRsLTQuOTc2MiAzLjA1ODRjLS4xNTUuMDk2Ny0uMzU4Mi4xMS0uNTI4LjAzNS0uMTY5Ny0uMDc1Mi0uMjc4LS4yMjY2LS4yODE1LS4zOTM0VjEySDJjLS41NTIzIDAtMS0uNDQ3Ny0xLTFzLjQ0NzctMSAxLTFoOHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgogIDwvc3ZnPg==)}.mapillary-sequence-close-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDx0aXRsZT4KICAgICAgY2xvc2UKICAgIDwvdGl0bGU+CiAgICA8cGF0aCBkPSJNOS4yNzM0IDguMDA0N2wzLjQ0MTMgMy40NDE0Yy4yMzE1LjIyOS4zMjI3LjU2NDYuMjM5Ljg3OTMtLjA4MzguMzE0Ny0uMzI5Ni41NjA0LS42NDQzLjY0NC0uMzE0Ny4wODQtLjY1LS4wMDczLS44NzktLjIzODhMNy45ODg4IDkuMjg5bC0zLjQzNjUgMy40MzY1Yy0uMzU2LjM0Ni0uOTI0LjM0MTctMS4yNzUtLjAwOTMtLjM1MS0uMzUxLS4zNTUtLjkxOS0uMDA5LTEuMjc1bDMuNDM2Mi0zLjQzNjQtMy40NDk1LTMuNDQ5NmMtLjM0NDQtLjM1NjMtLjMzOTYtLjkyMy4wMTA4LTEuMjczNC4zNTA0LS4zNTA0LjkxNy0uMzU1MiAxLjI3MzMtLjAxMDhMNy45ODkgNi43MjA1bDMuNDU0NC0zLjQ1NDVjLjIyOTQtLjIyOTQuNTYzOC0uMzE5Ljg3NzItLjIzNS4zMTM1LjA4NC41NTgzLjMyODcuNjQyMy42NDIyLjA4MzguMzEzNC0uMDA1OC42NDc4LS4yMzUyLjg3NzJMOS4yNzM0IDguMDA0N3oiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgogIDwvc3ZnPg==)}.mapillary-sequence-icon-visible{opacity:1}.mapillary-sequence-controls-expanded .mapillary-sequence-fast-icon,.mapillary-sequence-controls-expanded .mapillary-sequence-timeline-icon{opacity:1;-webkit-transition-delay:.12s;transition-delay:.12s;-webkit-transition:.2s ease-in;transition:.2s ease-in;-webkit-transition-property:opacity;transition-property:opacity}.mapillary-sequence-controls-expanded .mapillary-sequence-playback-button,.mapillary-sequence-controls-expanded .mapillary-sequence-timeline-button{width:calc(100% * 36 / 88)}.mapillary-sequence-playback,.mapillary-sequence-timeline{position:absolute;height:30px;width:405px;max-width:80%;min-width:271px;left:50%;padding-left:5px;-webkit-transform:translate(-50%,0);transform:translate(-50%)}.mapillary-sequence-switch-button,.mapillary-sequence-switch-button-inactive,.mapillary-sequence-slow-container,.mapillary-sequence-fast-container,.mapillary-sequence-close-button{width:36px;height:100%;display:inline-block;pointer-events:auto;background:#00000080}.mapillary-sequence-switch-button,.mapillary-sequence-switch-button-inactive,.mapillary-sequence-close-button{cursor:pointer}.mapillary-sequence-play,.mapillary-sequence-play-inactive,.mapillary-sequence-stop,.mapillary-sequence-step-next,.mapillary-sequence-step-next-inactive,.mapillary-sequence-step-next-highlight,.mapillary-sequence-step-prev,.mapillary-sequence-step-prev-inactive,.mapillary-sequence-step-prev-highlight{display:inline-block;width:calc(100% / 3);height:100%;pointer-events:auto}.mapillary-sequence-play-inactive,.mapillary-sequence-step-next-inactive,.mapillary-sequence-step-prev-inactive{cursor:default}.mapillary-sequence-play,.mapillary-sequence-play-inactive,.mapillary-sequence-stop,.mapillary-sequence-step-next,.mapillary-sequence-step-next-inactive,.mapillary-sequence-step-prev,.mapillary-sequence-step-prev-inactive,.mapillary-sequence-step-next-highlight,.mapillary-sequence-step-prev-highlight{background:#00000080}.mapillary-sequence-switch-button,.mapillary-sequence-switch-button-inactive,.mapillary-sequence-position-container,.mapillary-sequence-position-container-inactive{border-bottom-left-radius:8px;border-top-left-radius:8px}.mapillary-sequence-close-button{border-bottom-right-radius:8px;border-top-right-radius:8px}.mapillary-sequence-play .mapillary-sequence-icon,.mapillary-sequence-play-inactive .mapillary-sequence-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBwbGF5CiAgPC90aXRsZT4KICA8cGF0aCBkPSJNMTQuODk1MiA4LjY4NjVMMy41MDgyIDE1Ljc1N0MyLjY3ODMgMTYuMzAyIDIgMTUuODk4IDIgMTQuODY1VjEuMTM2QzIgLjEgMi42NzgzLS4zMDEgMy41MDk2LjI0M2wxMS4zODcgNy4wNzNjLS4wMDE0IDAgLjQwNDMuMjg2Ny40MDQzLjY4NTMgMCAuMzk4OC0uNDA1OC42ODU1LS40MDU4LjY4NTV6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==)}.mapillary-sequence-stop .mapillary-sequence-icon,.mapillary-sequence-stop-inactive .mapillary-sequence-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBzdG9wCiAgPC90aXRsZT4KICA8cGF0aCBkPSJNMCAxLjk5NEMwIC44OTMuODk0NSAwIDEuOTk0IDBoMTIuMDEyQzE1LjEwNyAwIDE2IC44OTQ1IDE2IDEuOTk0djEyLjAxMkMxNiAxNS4xMDcgMTUuMTA1NSAxNiAxNC4wMDYgMTZIMS45OTRDLjg5MyAxNiAwIDE1LjEwNTUgMCAxNC4wMDZWMS45OTR6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==)}.mapillary-sequence-step-prev .mapillary-sequence-icon,.mapillary-sequence-step-prev-inactive .mapillary-sequence-icon,.mapillary-sequence-step-prev-highlight .mapillary-sequence-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBjaGV2cm9ubGVmdAogIDwvdGl0bGU+CiAgPHBhdGggZD0iTTYuMjY4IDguMDAwMmw1LjUyMTUtNS45NDczYy40NzEtLjQ2OTcuNDcxLTEuMjI5NiAwLTEuNzAxLS40NzEtLjQ2OTQtMS4yMzIzLS40Njk0LTEuNzAzNCAwTDMuMzUzNCA3LjE0OGMtLjQ3MS40NzE0LS40NzEgMS4yMzMgMCAxLjcwMjZsNi43MzI4IDYuNzk2Yy40Njk1LjQ3MyAxLjIzMjQuNDY5NSAxLjcwMzUgMCAuNDcxLS40Njc4LjQ3MS0xLjIyOTUgMC0xLjcwMDhMNi4yNjggOC4wMDAyeiIgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo=)}.mapillary-sequence-step-next .mapillary-sequence-icon,.mapillary-sequence-step-next-inactive .mapillary-sequence-icon,.mapillary-sequence-step-next-highlight .mapillary-sequence-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBjaGV2cm9ucmlnaHQKICA8L3RpdGxlPgogIDxwYXRoIGQ9Ik05Ljg3NSA4LjAwMDJMNC4zNTMyIDIuMDUzYy0uNDcxLS40Njk3LS40NzEtMS4yMjk2IDAtMS43MDEuNDcxMi0uNDY5NCAxLjIzMjMtLjQ2OTQgMS43MDM0IDBsNi43MzI4IDYuNzk2Yy40NzEuNDcxNC40NzEgMS4yMzMgMCAxLjcwMjZsLTYuNzMyOCA2Ljc5NmMtLjQ2OTMuNDczLTEuMjMyMi40Njk1LTEuNzAzNCAwLS40NzEtLjQ2NzgtLjQ3MS0xLjIyOTUgMC0xLjcwMDhMOS44NzUgOC4wMDAyeiIgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo=)}.mapillary-sequence-play-inactive .mapillary-sequence-icon,.mapillary-sequence-stop-inactive .mapillary-sequence-icon,.mapillary-sequence-step-next-inactive .mapillary-sequence-icon,.mapillary-sequence-step-prev-inactive .mapillary-sequence-icon,.mapillary-sequence-switch-button-inactive .mapillary-sequence-switch-icon{opacity:.35}.mapillary-sequence-icon{position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:calc(100% * 16 / 36);height:calc(100% * 16 / 30);background-size:contain;background-repeat:no-repeat}.mapillary-sequence-speed::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:-6px}.mapillary-sequence-position::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:-6px}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-webkit-slider-thumb{border:none;background:none;-webkit-box-shadow:none;box-shadow:none}.mapillary-sequence-speed::-webkit-slider-runnable-track,.mapillary-sequence-position::-webkit-slider-runnable-track{height:4px;border-radius:2px;background-color:#fff}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-webkit-slider-runnable-track{background-color:#d7dadd}.mapillary-sequence-speed::-moz-focus-outer,.mapillary-sequence-position::-moz-focus-outer{border:0}.mapillary-sequence-speed::-moz-range-track,.mapillary-sequence-position::-moz-range-track{height:4px;border-radius:2px;background-color:#fff}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-moz-range-track{background-color:#d7dadd}.mapillary-sequence-speed::-moz-range-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#dee5ed;cursor:pointer;margin-top:-6px;box-shadow:1px 2px 4px #00000080}.mapillary-sequence-position::-moz-range-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#ff861b;cursor:pointer;margin-top:-6px;box-shadow:1px 2px 4px #00000080}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-moz-range-thumb{border:none;background:none;box-shadow:none}.mapillary-sequence-speed::-ms-track,.mapillary-sequence-position::-ms-track{height:2px;border-radius:2px;background-color:#fff}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-ms-track{background-color:#d7dadd}.mapillary-sequence-speed::-ms-fill-lower,.mapillary-sequence-position::-ms-fill-lower{height:0;background:none}.mapillary-sequence-speed::-ms-fill-upper,.mapillary-sequence-position::-ms-fill-upper{height:0;background:none}.mapillary-sequence-speed::-ms-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:0}.mapillary-sequence-position::-ms-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:0}.mapillary-sequence-position-container-inactive .mapillary-sequence-position::-ms-thumb{border:none;background:none;box-shadow:none}.mapillary-sequence-speed::-ms-tooltip,.mapillary-sequence-position::-ms-tooltip{display:none}@media (hover: hover){.mapillary-sequence-play:hover,.mapillary-sequence-stop:hover,.mapillary-sequence-step-prev:hover,.mapillary-sequence-step-next:hover,.mapillary-sequence-play-inactive:hover,.mapillary-sequence-step-prev-inactive:hover,.mapillary-sequence-step-next-inactive:hover,.mapillary-sequence-switch-button-inactive:hover,.mapillary-sequence-playback-button:hover,.mapillary-sequence-timeline-button:hover,.mapillary-sequence-switch-button:hover,.mapillary-sequence-close-button:hover{background:#00000080}}.mapillary-slider-container{position:absolute;bottom:40px;height:30px;left:50%;padding-left:5px;pointer-events:none;-webkit-transform:translate(-50%,0);transform:translate(-50%);z-index:10}.mapillary-slider-border{display:inline-block;width:8px;height:100%;border-bottom-left-radius:8px;border-top-left-radius:8px;pointer-events:auto;cursor:default;background:#00000080}.mapillary-slider-mode-button,.mapillary-slider-mode-button-2d,.mapillary-slider-mode-button-inactive,.mapillary-slider-mode-button-2d-inactive{width:26px;height:100%;display:inline-block;pointer-events:auto;background:#00000080}.mapillary-slider-mode-button,.mapillary-slider-mode-button-2d{cursor:default}.mapillary-slider-mode-button-inactive,.mapillary-slider-mode-button-2d-inactive{cursor:pointer}.mapillary-slider-mode-icon,.mapillary-slider-mode-icon-2d{position:relative;top:50%;-webkit-transform:translate(0,-50%);transform:translateY(-50%);background-size:contain;background-repeat:no-repeat;opacity:1;width:18px;height:18px;margin-left:4px}.mapillary-slider-mode-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4IDE3di44NjRjMCAuNTA1IDAgLjk5Ni0uMDM0IDEuNDEyLS4wMzcuNDU4LS4xMjUuOTk3LS40MDIgMS41NGE0IDQgMCAwIDEtMS43NDggMS43NDhjLS41NDMuMjc3LTEuMDgyLjM2NS0xLjU0LjQwMi0uNDE2LjAzNC0uOTA3LjAzNC0xLjQxMi4wMzRINi4xMzZjLS41MDUgMC0uOTk2IDAtMS40MTItLjAzNC0uNDU4LS4wMzctLjk5Ny0uMTI1LTEuNTQtLjQwMmE0IDQgMCAwIDEtMS43NDgtMS43NDhjLS4yNzctLjU0My0uMzY1LTEuMDgyLS40MDItMS41NEExOC4zNiAxOC4zNiAwIDAgMSAxIDE3Ljg2NHYtNi43MjhjMC0uNTA1IDAtLjk5Ni4wMzQtMS40MTIuMDM3LS40NTguMTI1LS45OTcuNDAyLTEuNTRhNCA0IDAgMCAxIDEuNzQ4LTEuNzQ4Yy41NDMtLjI3NyAxLjA4Mi0uMzY1IDEuNTQtLjQwMkM1LjE0IDYgNS42MyA2IDYuMTM2IDZIN3YyaC0uOGMtMS4xMiAwLTEuNjggMC0yLjEwOC4yMThhMiAyIDAgMCAwLS44NzQuODc0QzMgOS41MiAzIDEwLjA4IDMgMTEuMnY2LjZjMCAxLjEyIDAgMS42OC4yMTggMi4xMDhhMiAyIDAgMCAwIC44NzQuODc0QzQuNTIgMjEgNS4wOCAyMSA2LjIgMjFoNi42YzEuMTIgMCAxLjY4IDAgMi4xMDgtLjIxOGEyIDIgMCAwIDAgLjg3NC0uODc0QzE2IDE5LjQ4IDE2IDE4LjEyIDE2IDE3aDJ6TTE2LjUxIDcuMjM2djMuNzFoLjc4YzEuMDk0IDAgMS42Ny0uNTYzIDEuNjctMS44NiAwLTEuMjkzLS41NzYtMS44NS0xLjY2Ny0xLjg1aC0uNzg0eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNy4zMjcgMi42MzhDNyAzLjI4IDcgNC4xMiA3IDUuOHY2LjRjMCAxLjY4IDAgMi41Mi4zMjcgMy4xNjJhMyAzIDAgMCAwIDEuMzExIDEuMzExQzkuMjggMTcgMTAuMTIgMTcgMTEuOCAxN2g2LjRjMS42OCAwIDIuNTIgMCAzLjE2Mi0uMzI3YTMgMyAwIDAgMCAxLjMxMS0xLjMxMUMyMyAxNC43MiAyMyAxMy44OCAyMyAxMi4yVjUuOGMwLTEuNjggMC0yLjUyLS4zMjctMy4xNjJhMyAzIDAgMCAwLTEuMzExLTEuMzExQzIwLjcyIDEgMTkuODggMSAxOC4yIDFoLTYuNGMtMS42OCAwLTIuNTIgMC0zLjE2Mi4zMjdhMyAzIDAgMCAwLTEuMzExIDEuMzExem03LjAzNCA3LjcyOWMuMDAzLjk5NC0uOTMyIDEuNzEyLTIuMjM5IDEuNzEyLTEuMjc4IDAtMi4xODctLjcwNy0yLjIwNy0xLjcyNGgxLjIzOGMuMDIzLjQyNi40My43MS45NzIuNzEuNTYzIDAgLjk2LS4zMTguOTU3LS43OC4wMDMtLjQ3LS40MDktLjgtMS4wNjgtLjhoLS41NDJ2LS45MDNoLjU0MmMuNTYgMCAuOTUtLjMxLjk0Ni0uNzY3LjAwMy0uNDM3LS4zMy0uNzM4LS44MjctLjczOC0uNTAyIDAtLjkwOS4yODctLjkyMy43M2gtMS4xNzljLjAxNy0xLjAwNi45MTUtMS43MDUgMi4xMDgtMS43MDUgMS4yMDUgMCAyLjAwOS43MjIgMi4wMDYgMS42NC4wMDMuNjUzLS40NDYgMS4xMTMtMS4wOTcgMS4yM3YuMDQ1Yy44NTUuMTA4IDEuMzE2LjYyNSAxLjMxMyAxLjM1em01LjgyNy0xLjI4MmMwIDEuODE4LTEuMDc0IDIuOTE1LTIuODQ2IDIuOTE1aC0yLjA2M1Y2LjE4MmgyLjA4YzEuNzU1IDAgMi44MyAxLjA5IDIuODMgMi45MDN6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)}.mapillary-slider-mode-icon-2d{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjM0NSAxMC4yMzZ2My43MWguNzgxYzEuMDk0IDAgMS42Ny0uNTYzIDEuNjctMS44NiAwLTEuMjkzLS41NzYtMS44NS0xLjY2Ny0xLjg1aC0uNzg0eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC4zMjcgNS42MzhDNCA2LjI4IDQgNy4xMiA0IDguOHY2LjRjMCAxLjY4IDAgMi41Mi4zMjcgMy4xNjJhMyAzIDAgMCAwIDEuMzExIDEuMzExQzYuMjggMjAgNy4xMiAyMCA4LjggMjBoNi40YzEuNjggMCAyLjUyIDAgMy4xNjItLjMyN2EzIDMgMCAwIDAgMS4zMTEtMS4zMTFDMjAgMTcuNzIgMjAgMTYuODggMjAgMTUuMlY4LjhjMC0xLjY4IDAtMi41Mi0uMzI3LTMuMTYyYTMgMyAwIDAgMC0xLjMxMS0xLjMxMUMxNy43MiA0IDE2Ljg4IDQgMTUuMiA0SDguOGMtMS42OCAwLTIuNTIgMC0zLjE2Mi4zMjdhMyAzIDAgMCAwLTEuMzExIDEuMzExek0xMS4xODcgMTVINy4wNHYtLjg4NmwyLjA3LTEuOTE4Yy41MTgtLjUuODEtLjgyNy44MTMtMS4yOS0uMDAzLS41MTEtLjM4OS0uODMtLjkwMy0uODMtLjUzNCAwLS44OTguMzM5LS44OTguODk4SDYuOTU1Yy0uMDAzLTEuMTQyLjg1NS0xLjg3MiAyLjA3My0xLjg3MiAxLjI1NiAwIDIuMDQ2Ljc4MiAyLjA1MSAxLjc5LjAwMy43NDQtLjM4NiAxLjI5My0xLjQxMSAyLjIzbC0uODU1LjgzMnYuMDRoMi4zNzRWMTV6bTUuODM3LTIuOTE1YzAgMS44MTgtMS4wNzQgMi45MTUtMi44NDYgMi45MTVoLTIuMDYzVjkuMTgyaDIuMDhjMS43NTUgMCAyLjgzIDEuMDkgMi44MyAyLjkwM3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4gIA==)}.mapillary-slider-mode-button-inactive .mapillary-slider-mode-icon,.mapillary-slider-mode-button-2d-inactive .mapillary-slider-mode-icon-2d{opacity:.35}.mapillary-slider-position-container{display:inline-block;height:100%;vertical-align:top;background:#00000080;pointer-events:auto;padding-right:16px;border-bottom-right-radius:8px;border-top-right-radius:8px;padding-left:8px}.mapillary-slider-position{pointer-events:auto;margin:7px 0 0;padding:0;height:16px;cursor:pointer;outline:none;background:none;-webkit-appearance:none}.mapillary-slider-position::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:-6px}.mapillary-slider-position::-webkit-slider-runnable-track{height:4px;border-radius:2px;background-color:#fff}.mapillary-slider-position::-moz-focus-outer{border:0}.mapillary-slider-position::-moz-range-track{height:4px;border-radius:2px;background-color:#fff}.mapillary-slider-position::-moz-range-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:-6px}.mapillary-slider-position::-ms-track{height:2px;border-radius:2px;background-color:#fff}.mapillary-slider-position::-ms-fill-lower{height:0;background:none}.mapillary-slider-position::-ms-fill-upper{height:0;background:none}.mapillary-slider-position::-ms-thumb{width:12px;height:12px;border-radius:50%;border:2px solid white;background:#fff;cursor:pointer;margin-top:0}.mapillary-slider-position::-ms-tooltip{display:none}.mapillary-viewer.component-tag-create .mapillary-interactive,.mapillary-viewer.component-tag-edit-crosshair .mapillary-interactive{cursor:crosshair}.mapillary-viewer.component-tag-edit-move .mapillary-interactive{cursor:move}.mapillary-viewer.component-tag-edit-nesw-resize .mapillary-interactive{cursor:nesw-resize}.mapillary-viewer.component-tag-edit-nwse-resize .mapillary-interactive{cursor:nwse-resize}.mapillary-tag-container{font-size:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.mapillary-tag-completer,.mapillary-tag-interactor,.mapillary-tag-mover,.mapillary-tag-resizer,.mapillary-tag-spot-interactor,.mapillary-tag-symbol,.mapillary-tag-vertex{position:absolute;left:0;top:0}.mapillary-tag-symbol{cursor:pointer;pointer-events:auto}.mapillary-tag-mover,.mapillary-tag-resizer{pointer-events:auto}.mapillary-tag-mover{border-radius:7px;width:14px;height:14px;opacity:.2;cursor:move}.mapillary-tag-mover:hover{opacity:.5}.mapillary-tag-resizer{border-radius:7px;width:14px;height:14px;opacity:0;cursor:crosshair}.mapillary-tag-resizer:hover{opacity:.3}.mapillary-tag-vertex{pointer-events:none;border-radius:3px;width:6px;height:6px}.mapillary-tag-dot{pointer-events:none;border-radius:1.5px;width:3px;height:3px;background-color:green}.mapillary-tag-vertex.mapillary-tag-larger{border-radius:4px;width:8px;height:8px}.mapillary-tag-interactor,.mapillary-tag-completer,.mapillary-tag-spot-interactor{pointer-events:auto;border-radius:7px;width:14px;height:14px;opacity:0}.mapillary-tag-completer.mapillary-tag-larger{border-radius:8px;width:16px;height:16px}.mapillary-tag-interactor,.mapillary-tag-completer{cursor:pointer}.mapillary-tag-spot-interactor{cursor:move}.mapillary-tag-completer{background:#32cd32}.mapillary-tag-interactor{background:#ff4500}.mapillary-tag-completer:hover,.mapillary-tag-interactor:hover{opacity:.6}.mapillary-tag-spot-interactor:hover{opacity:.3}.mapillary-zoom-container{position:absolute;bottom:90px;right:14px;height:66px;width:32px;pointer-events:none;z-index:10}.mapillary-zoom-in-button,.mapillary-zoom-in-button-inactive,.mapillary-zoom-out-button,.mapillary-zoom-out-button-inactive{width:100%;height:32px;pointer-events:auto;background:#00000080;cursor:pointer}.mapillary-zoom-in-button,.mapillary-zoom-in-button-inactive{border-top-left-radius:8px;border-top-right-radius:8px}.mapillary-zoom-out-button,.mapillary-zoom-out-button-inactive{margin-top:2px;border-bottom-left-radius:8px;border-bottom-right-radius:8px}.mapillary-zoom-in-button-inactive,.mapillary-zoom-out-button-inactive{cursor:default}.mapillary-zoom-in-icon,.mapillary-zoom-out-icon{position:relative;top:0;left:0;background-size:contain;background-repeat:no-repeat;opacity:1;width:32px;height:32px}.mapillary-zoom-compact.mapillary-zoom-container{height:34px;width:16px;bottom:58px}.mapillary-zoom-compact .mapillary-zoom-in-button,.mapillary-zoom-compact .mapillary-zoom-in-button-inactive,.mapillary-zoom-compact .mapillary-zoom-out-button,.mapillary-zoom-compact .mapillary-zoom-out-button-inactive,.mapillary-zoom-compact .mapillary-zoom-in-icon,.mapillary-zoom-compact .mapillary-zoom-out-icon{width:16px;height:16px}.mapillary-zoom-compact .mapillary-zoom-in-button,.mapillary-zoom-compact .mapillary-zoom-in-button-inactive{border-top-left-radius:4px;border-top-right-radius:4px}.mapillary-zoom-compact .mapillary-zoom-out-button,.mapillary-zoom-compact .mapillary-zoom-out-button-inactive{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mapillary-zoom-in-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCAwIDMwIDMwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE2LDE0IEwyMSwxNCBDMjEuNTUyMjg0NywxNCAyMiwxNC40NDc3MTUzIDIyLDE1IEMyMiwxNS41NTIyODQ3IDIxLjU1MjI4NDcsMTYgMjEsMTYgTDE2LDE2IEwxNiwyMSBDMTYsMjEuNTUyMjg0NyAxNS41NTIyODQ3LDIyIDE1LDIyIEMxNC40NDc3MTUzLDIyIDE0LDIxLjU1MjI4NDcgMTQsMjEgTDE0LDE2IEw5LDE2IEM4LjQ0NzcxNTI1LDE2IDgsMTUuNTUyMjg0NyA4LDE1IEM4LDE0LjQ0NzcxNTMgOC40NDc3MTUyNSwxNCA5LDE0IEwxNCwxNCBMMTQsOSBDMTQsOC40NDc3MTUyNSAxNC40NDc3MTUzLDggMTUsOCBDMTUuNTUyMjg0Nyw4IDE2LDguNDQ3NzE1MjUgMTYsOSBMMTYsMTQgWiIvPjwvZz4gIDwvc3ZnPiAg)}.mapillary-zoom-out-icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCAwIDMwIDMwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIyLDE1IEMyMiwxNS41NTIyODQ3IDIxLjU1MjI4NDcsMTYgMjEsMTYgTDksMTYgQzguNDQ3NzE1MjUsMTYgOCwxNS41NTIyODQ3IDgsMTUgQzgsMTQuNDQ3NzE1MyA4LjQ0NzcxNTI1LDE0IDksMTQgTDIxLDE0IEMyMS41NTIyODQ3LDE0IDIyLDE0LjQ0NzcxNTMgMjIsMTUgWiIvPjwvZz4gIDwvc3ZnPiAg)}.mapillary-zoom-in-button-inactive .mapillary-zoom-in-icon,.mapillary-zoom-out-button-inactive .mapillary-zoom-out-icon{opacity:.35}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:-webkit-full-screen{height:100%;width:100%}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.flex{display:flex}.table{display:table}.h-12{height:3rem}.h-auto{height:auto}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.min-h-72{min-height:18rem}.min-h-96{min-height:24rem}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-20{width:5rem}.w-24{width:6rem}.w-32{width:8rem}.w-full{width:100%}.w-svw{width:100svw}.min-w-96{min-width:24rem}.resize{resize:both}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.overflow-auto{overflow:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-r-2{border-right-width:2px}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-justify{text-align:justify}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-3{line-height:.75rem}.leading-5{line-height:1.25rem}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.opacity-70{opacity:.7}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{font-family:Inter,sans-serif;min-height:100vh}h1,h2,h3,h4,h5,h6{font-weight:600}.cod-style{font-family:Montserrat,sans-serif}h1.cod-style{font-size:1.5rem;line-height:2rem;font-weight:800}h2.cod-style{font-size:1.25rem;line-height:1.75rem;font-weight:700}main{display:flex;height:auto;flex-direction:column;padding-bottom:3rem}footer,header{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}footer:is(.dark *),header:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}main{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}main:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}header,footer{padding:.5rem}a:hover{text-decoration-line:underline;text-underline-offset:2px}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark\:text-slate-700:is(.dark *){--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:h-96{height:24rem}.sm\:max-h-\[30vh\]{max-height:30vh}.sm\:w-1\/3{width:33.333333%}.sm\:w-2\/3{width:66.666667%}.sm\:p-4{padding:1rem}}@media (min-width: 768px){.md\:max-h-\[45vh\]{max-height:45vh}}@media (min-width: 1024px){.lg\:max-h-96{max-height:24rem}.lg\:max-h-\[60vh\]{max-height:60vh}.lg\:w-1\/4{width:25%}.lg\:w-3\/4{width:75%}}@media (min-width: 1280px){.xl\:max-h-\[70vh\]{max-height:70vh}}:root,.light,.light-theme{--gray-1: #fcfcfc;--gray-2: #f9f9f9;--gray-3: #f0f0f0;--gray-4: #e8e8e8;--gray-5: #e0e0e0;--gray-6: #d9d9d9;--gray-7: #cecece;--gray-8: #bbbbbb;--gray-9: #8d8d8d;--gray-10: #838383;--gray-11: #646464;--gray-12: #202020;--gray-a1: #00000003;--gray-a2: #00000006;--gray-a3: #0000000f;--gray-a4: #00000017;--gray-a5: #0000001f;--gray-a6: #00000026;--gray-a7: #00000031;--gray-a8: #00000044;--gray-a9: #00000072;--gray-a10: #0000007c;--gray-a11: #0000009b;--gray-a12: #000000df;--mauve-1: #fdfcfd;--mauve-2: #faf9fb;--mauve-3: #f2eff3;--mauve-4: #eae7ec;--mauve-5: #e3dfe6;--mauve-6: #dbd8e0;--mauve-7: #d0cdd7;--mauve-8: #bcbac7;--mauve-9: #8e8c99;--mauve-10: #84828e;--mauve-11: #65636d;--mauve-12: #211f26;--mauve-a1: #55005503;--mauve-a2: #2b005506;--mauve-a3: #30004010;--mauve-a4: #20003618;--mauve-a5: #20003820;--mauve-a6: #14003527;--mauve-a7: #10003332;--mauve-a8: #08003145;--mauve-a9: #05001d73;--mauve-a10: #0500197d;--mauve-a11: #0400119c;--mauve-a12: #020008e0;--slate-1: #fcfcfd;--slate-2: #f9f9fb;--slate-3: #f0f0f3;--slate-4: #e8e8ec;--slate-5: #e0e1e6;--slate-6: #d9d9e0;--slate-7: #cdced6;--slate-8: #b9bbc6;--slate-9: #8b8d98;--slate-10: #80838d;--slate-11: #60646c;--slate-12: #1c2024;--slate-a1: #00005503;--slate-a2: #00005506;--slate-a3: #0000330f;--slate-a4: #00002d17;--slate-a5: #0009321f;--slate-a6: #00002f26;--slate-a7: #00062e32;--slate-a8: #00083046;--slate-a9: #00051d74;--slate-a10: #00071b7f;--slate-a11: #0007149f;--slate-a12: #000509e3;--sage-1: #fbfdfc;--sage-2: #f7f9f8;--sage-3: #eef1f0;--sage-4: #e6e9e8;--sage-5: #dfe2e0;--sage-6: #d7dad9;--sage-7: #cbcfcd;--sage-8: #b8bcba;--sage-9: #868e8b;--sage-10: #7c8481;--sage-11: #5f6563;--sage-12: #1a211e;--sage-a1: #00804004;--sage-a2: #00402008;--sage-a3: #002d1e11;--sage-a4: #001f1519;--sage-a5: #00180820;--sage-a6: #00140d28;--sage-a7: #00140a34;--sage-a8: #000f0847;--sage-a9: #00110b79;--sage-a10: #00100a83;--sage-a11: #000a07a0;--sage-a12: #000805e5;--olive-1: #fcfdfc;--olive-2: #f8faf8;--olive-3: #eff1ef;--olive-4: #e7e9e7;--olive-5: #dfe2df;--olive-6: #d7dad7;--olive-7: #cccfcc;--olive-8: #b9bcb8;--olive-9: #898e87;--olive-10: #7f847d;--olive-11: #60655f;--olive-12: #1d211c;--olive-a1: #00550003;--olive-a2: #00490007;--olive-a3: #00200010;--olive-a4: #00160018;--olive-a5: #00180020;--olive-a6: #00140028;--olive-a7: #000f0033;--olive-a8: #040f0047;--olive-a9: #050f0078;--olive-a10: #040e0082;--olive-a11: #020a00a0;--olive-a12: #010600e3;--sand-1: #fdfdfc;--sand-2: #f9f9f8;--sand-3: #f1f0ef;--sand-4: #e9e8e6;--sand-5: #e2e1de;--sand-6: #dad9d6;--sand-7: #cfceca;--sand-8: #bcbbb5;--sand-9: #8d8d86;--sand-10: #82827c;--sand-11: #63635e;--sand-12: #21201c;--sand-a1: #55550003;--sand-a2: #25250007;--sand-a3: #20100010;--sand-a4: #1f150019;--sand-a5: #1f180021;--sand-a6: #19130029;--sand-a7: #19140035;--sand-a8: #1915014a;--sand-a9: #0f0f0079;--sand-a10: #0c0c0083;--sand-a11: #080800a1;--sand-a12: #060500e3;--amber-1: #fefdfb;--amber-2: #fefbe9;--amber-3: #fff7c2;--amber-4: #ffee9c;--amber-5: #fbe577;--amber-6: #f3d673;--amber-7: #e9c162;--amber-8: #e2a336;--amber-9: #ffc53d;--amber-10: #ffba18;--amber-11: #ab6400;--amber-12: #4f3422;--amber-a1: #c0800004;--amber-a2: #f4d10016;--amber-a3: #ffde003d;--amber-a4: #ffd40063;--amber-a5: #f8cf0088;--amber-a6: #eab5008c;--amber-a7: #dc9b009d;--amber-a8: #da8a00c9;--amber-a9: #ffb300c2;--amber-a10: #ffb300e7;--amber-a11: #ab6400;--amber-a12: #341500dd;--blue-1: #fbfdff;--blue-2: #f4faff;--blue-3: #e6f4fe;--blue-4: #d5efff;--blue-5: #c2e5ff;--blue-6: #acd8fc;--blue-7: #8ec8f6;--blue-8: #5eb1ef;--blue-9: #0090ff;--blue-10: #0588f0;--blue-11: #0d74ce;--blue-12: #113264;--blue-a1: #0080ff04;--blue-a2: #008cff0b;--blue-a3: #008ff519;--blue-a4: #009eff2a;--blue-a5: #0093ff3d;--blue-a6: #0088f653;--blue-a7: #0083eb71;--blue-a8: #0084e6a1;--blue-a9: #0090ff;--blue-a10: #0086f0fa;--blue-a11: #006dcbf2;--blue-a12: #002359ee;--bronze-1: #fdfcfc;--bronze-2: #fdf7f5;--bronze-3: #f6edea;--bronze-4: #efe4df;--bronze-5: #e7d9d3;--bronze-6: #dfcdc5;--bronze-7: #d3bcb3;--bronze-8: #c2a499;--bronze-9: #a18072;--bronze-10: #957468;--bronze-11: #7d5e54;--bronze-12: #43302b;--bronze-a1: #55000003;--bronze-a2: #cc33000a;--bronze-a3: #92250015;--bronze-a4: #80280020;--bronze-a5: #7423002c;--bronze-a6: #7324003a;--bronze-a7: #6c1f004c;--bronze-a8: #671c0066;--bronze-a9: #551a008d;--bronze-a10: #4c150097;--bronze-a11: #3d0f00ab;--bronze-a12: #1d0600d4;--brown-1: #fefdfc;--brown-2: #fcf9f6;--brown-3: #f6eee7;--brown-4: #f0e4d9;--brown-5: #ebdaca;--brown-6: #e4cdb7;--brown-7: #dcbc9f;--brown-8: #cea37e;--brown-9: #ad7f58;--brown-10: #a07553;--brown-11: #815e46;--brown-12: #3e332e;--brown-a1: #aa550003;--brown-a2: #aa550009;--brown-a3: #a04b0018;--brown-a4: #9b4a0026;--brown-a5: #9f4d0035;--brown-a6: #a04e0048;--brown-a7: #a34e0060;--brown-a8: #9f4a0081;--brown-a9: #823c00a7;--brown-a10: #723300ac;--brown-a11: #522100b9;--brown-a12: #140600d1;--crimson-1: #fffcfd;--crimson-2: #fef7f9;--crimson-3: #ffe9f0;--crimson-4: #fedce7;--crimson-5: #facedd;--crimson-6: #f3bed1;--crimson-7: #eaacc3;--crimson-8: #e093b2;--crimson-9: #e93d82;--crimson-10: #df3478;--crimson-11: #cb1d63;--crimson-12: #621639;--crimson-a1: #ff005503;--crimson-a2: #e0004008;--crimson-a3: #ff005216;--crimson-a4: #f8005123;--crimson-a5: #e5004f31;--crimson-a6: #d0004b41;--crimson-a7: #bf004753;--crimson-a8: #b6004a6c;--crimson-a9: #e2005bc2;--crimson-a10: #d70056cb;--crimson-a11: #c4004fe2;--crimson-a12: #530026e9;--cyan-1: #fafdfe;--cyan-2: #f2fafb;--cyan-3: #def7f9;--cyan-4: #caf1f6;--cyan-5: #b5e9f0;--cyan-6: #9ddde7;--cyan-7: #7dcedc;--cyan-8: #3db9cf;--cyan-9: #00a2c7;--cyan-10: #0797b9;--cyan-11: #107d98;--cyan-12: #0d3c48;--cyan-a1: #0099cc05;--cyan-a2: #009db10d;--cyan-a3: #00c2d121;--cyan-a4: #00bcd435;--cyan-a5: #01b4cc4a;--cyan-a6: #00a7c162;--cyan-a7: #009fbb82;--cyan-a8: #00a3c0c2;--cyan-a9: #00a2c7;--cyan-a10: #0094b7f8;--cyan-a11: #007491ef;--cyan-a12: #00323ef2;--gold-1: #fdfdfc;--gold-2: #faf9f2;--gold-3: #f2f0e7;--gold-4: #eae6db;--gold-5: #e1dccf;--gold-6: #d8d0bf;--gold-7: #cbc0aa;--gold-8: #b9a88d;--gold-9: #978365;--gold-10: #8c7a5e;--gold-11: #71624b;--gold-12: #3b352b;--gold-a1: #55550003;--gold-a2: #9d8a000d;--gold-a3: #75600018;--gold-a4: #6b4e0024;--gold-a5: #60460030;--gold-a6: #64440040;--gold-a7: #63420055;--gold-a8: #633d0072;--gold-a9: #5332009a;--gold-a10: #492d00a1;--gold-a11: #362100b4;--gold-a12: #130c00d4;--grass-1: #fbfefb;--grass-2: #f5fbf5;--grass-3: #e9f6e9;--grass-4: #daf1db;--grass-5: #c9e8ca;--grass-6: #b2ddb5;--grass-7: #94ce9a;--grass-8: #65ba74;--grass-9: #46a758;--grass-10: #3e9b4f;--grass-11: #2a7e3b;--grass-12: #203c25;--grass-a1: #00c00004;--grass-a2: #0099000a;--grass-a3: #00970016;--grass-a4: #009f0725;--grass-a5: #00930536;--grass-a6: #008f0a4d;--grass-a7: #018b0f6b;--grass-a8: #008d199a;--grass-a9: #008619b9;--grass-a10: #007b17c1;--grass-a11: #006514d5;--grass-a12: #002006df;--green-1: #fbfefc;--green-2: #f4fbf6;--green-3: #e6f6eb;--green-4: #d6f1df;--green-5: #c4e8d1;--green-6: #adddc0;--green-7: #8eceaa;--green-8: #5bb98b;--green-9: #30a46c;--green-10: #2b9a66;--green-11: #218358;--green-12: #193b2d;--green-a1: #00c04004;--green-a2: #00a32f0b;--green-a3: #00a43319;--green-a4: #00a83829;--green-a5: #019c393b;--green-a6: #00963c52;--green-a7: #00914071;--green-a8: #00924ba4;--green-a9: #008f4acf;--green-a10: #008647d4;--green-a11: #00713fde;--green-a12: #002616e6;--indigo-1: #fdfdfe;--indigo-2: #f7f9ff;--indigo-3: #edf2fe;--indigo-4: #e1e9ff;--indigo-5: #d2deff;--indigo-6: #c1d0ff;--indigo-7: #abbdf9;--indigo-8: #8da4ef;--indigo-9: #3e63dd;--indigo-10: #3358d4;--indigo-11: #3a5bc7;--indigo-12: #1f2d5c;--indigo-a1: #00008002;--indigo-a2: #0040ff08;--indigo-a3: #0047f112;--indigo-a4: #0044ff1e;--indigo-a5: #0044ff2d;--indigo-a6: #003eff3e;--indigo-a7: #0037ed54;--indigo-a8: #0034dc72;--indigo-a9: #0031d2c1;--indigo-a10: #002ec9cc;--indigo-a11: #002bb7c5;--indigo-a12: #001046e0;--iris-1: #fdfdff;--iris-2: #f8f8ff;--iris-3: #f0f1fe;--iris-4: #e6e7ff;--iris-5: #dadcff;--iris-6: #cbcdff;--iris-7: #b8baf8;--iris-8: #9b9ef0;--iris-9: #5b5bd6;--iris-10: #5151cd;--iris-11: #5753c6;--iris-12: #272962;--iris-a1: #0000ff02;--iris-a2: #0000ff07;--iris-a3: #0011ee0f;--iris-a4: #000bff19;--iris-a5: #000eff25;--iris-a6: #000aff34;--iris-a7: #0008e647;--iris-a8: #0008d964;--iris-a9: #0000c0a4;--iris-a10: #0000b6ae;--iris-a11: #0600abac;--iris-a12: #000246d8;--jade-1: #fbfefd;--jade-2: #f4fbf7;--jade-3: #e6f7ed;--jade-4: #d6f1e3;--jade-5: #c3e9d7;--jade-6: #acdec8;--jade-7: #8bceb6;--jade-8: #56ba9f;--jade-9: #29a383;--jade-10: #26997b;--jade-11: #208368;--jade-12: #1d3b31;--jade-a1: #00c08004;--jade-a2: #00a3460b;--jade-a3: #00ae4819;--jade-a4: #00a85129;--jade-a5: #00a2553c;--jade-a6: #009a5753;--jade-a7: #00945f74;--jade-a8: #00976ea9;--jade-a9: #00916bd6;--jade-a10: #008764d9;--jade-a11: #007152df;--jade-a12: #002217e2;--lime-1: #fcfdfa;--lime-2: #f8faf3;--lime-3: #eef6d6;--lime-4: #e2f0bd;--lime-5: #d3e7a6;--lime-6: #c2da91;--lime-7: #abc978;--lime-8: #8db654;--lime-9: #bdee63;--lime-10: #b0e64c;--lime-11: #5c7c2f;--lime-12: #37401c;--lime-a1: #66990005;--lime-a2: #6b95000c;--lime-a3: #96c80029;--lime-a4: #8fc60042;--lime-a5: #81bb0059;--lime-a6: #72aa006e;--lime-a7: #61990087;--lime-a8: #559200ab;--lime-a9: #93e4009c;--lime-a10: #8fdc00b3;--lime-a11: #375f00d0;--lime-a12: #1e2900e3;--mint-1: #f9fefd;--mint-2: #f2fbf9;--mint-3: #ddf9f2;--mint-4: #c8f4e9;--mint-5: #b3ecde;--mint-6: #9ce0d0;--mint-7: #7ecfbd;--mint-8: #4cbba5;--mint-9: #86ead4;--mint-10: #7de0cb;--mint-11: #027864;--mint-12: #16433c;--mint-a1: #00d5aa06;--mint-a2: #00b18a0d;--mint-a3: #00d29e22;--mint-a4: #00cc9937;--mint-a5: #00c0914c;--mint-a6: #00b08663;--mint-a7: #00a17d81;--mint-a8: #009e7fb3;--mint-a9: #00d3a579;--mint-a10: #00c39982;--mint-a11: #007763fd;--mint-a12: #00312ae9;--orange-1: #fefcfb;--orange-2: #fff7ed;--orange-3: #ffefd6;--orange-4: #ffdfb5;--orange-5: #ffd19a;--orange-6: #ffc182;--orange-7: #f5ae73;--orange-8: #ec9455;--orange-9: #f76b15;--orange-10: #ef5f00;--orange-11: #cc4e00;--orange-12: #582d1d;--orange-a1: #c0400004;--orange-a2: #ff8e0012;--orange-a3: #ff9c0029;--orange-a4: #ff91014a;--orange-a5: #ff8b0065;--orange-a6: #ff81007d;--orange-a7: #ed6c008c;--orange-a8: #e35f00aa;--orange-a9: #f65e00ea;--orange-a10: #ef5f00;--orange-a11: #cc4e00;--orange-a12: #431200e2;--pink-1: #fffcfe;--pink-2: #fef7fb;--pink-3: #fee9f5;--pink-4: #fbdcef;--pink-5: #f6cee7;--pink-6: #efbfdd;--pink-7: #e7acd0;--pink-8: #dd93c2;--pink-9: #d6409f;--pink-10: #cf3897;--pink-11: #c2298a;--pink-12: #651249;--pink-a1: #ff00aa03;--pink-a2: #e0008008;--pink-a3: #f4008c16;--pink-a4: #e2008b23;--pink-a5: #d1008331;--pink-a6: #c0007840;--pink-a7: #b6006f53;--pink-a8: #af006f6c;--pink-a9: #c8007fbf;--pink-a10: #c2007ac7;--pink-a11: #b60074d6;--pink-a12: #59003bed;--plum-1: #fefcff;--plum-2: #fdf7fd;--plum-3: #fbebfb;--plum-4: #f7def8;--plum-5: #f2d1f3;--plum-6: #e9c2ec;--plum-7: #deade3;--plum-8: #cf91d8;--plum-9: #ab4aba;--plum-10: #a144af;--plum-11: #953ea3;--plum-12: #53195d;--plum-a1: #aa00ff03;--plum-a2: #c000c008;--plum-a3: #cc00cc14;--plum-a4: #c200c921;--plum-a5: #b700bd2e;--plum-a6: #a400b03d;--plum-a7: #9900a852;--plum-a8: #9000a56e;--plum-a9: #89009eb5;--plum-a10: #7f0092bb;--plum-a11: #730086c1;--plum-a12: #40004be6;--purple-1: #fefcfe;--purple-2: #fbf7fe;--purple-3: #f7edfe;--purple-4: #f2e2fc;--purple-5: #ead5f9;--purple-6: #e0c4f4;--purple-7: #d1afec;--purple-8: #be93e4;--purple-9: #8e4ec6;--purple-10: #8347b9;--purple-11: #8145b5;--purple-12: #402060;--purple-a1: #aa00aa03;--purple-a2: #8000e008;--purple-a3: #8e00f112;--purple-a4: #8d00e51d;--purple-a5: #8000db2a;--purple-a6: #7a01d03b;--purple-a7: #6d00c350;--purple-a8: #6600c06c;--purple-a9: #5c00adb1;--purple-a10: #53009eb8;--purple-a11: #52009aba;--purple-a12: #250049df;--red-1: #fffcfc;--red-2: #fff7f7;--red-3: #feebec;--red-4: #ffdbdc;--red-5: #ffcdce;--red-6: #fdbdbe;--red-7: #f4a9aa;--red-8: #eb8e90;--red-9: #e5484d;--red-10: #dc3e42;--red-11: #ce2c31;--red-12: #641723;--red-a1: #ff000003;--red-a2: #ff000008;--red-a3: #f3000d14;--red-a4: #ff000824;--red-a5: #ff000632;--red-a6: #f8000442;--red-a7: #df000356;--red-a8: #d2000571;--red-a9: #db0007b7;--red-a10: #d10005c1;--red-a11: #c40006d3;--red-a12: #55000de8;--ruby-1: #fffcfd;--ruby-2: #fff7f8;--ruby-3: #feeaed;--ruby-4: #ffdce1;--ruby-5: #ffced6;--ruby-6: #f8bfc8;--ruby-7: #efacb8;--ruby-8: #e592a3;--ruby-9: #e54666;--ruby-10: #dc3b5d;--ruby-11: #ca244d;--ruby-12: #64172b;--ruby-a1: #ff005503;--ruby-a2: #ff002008;--ruby-a3: #f3002515;--ruby-a4: #ff002523;--ruby-a5: #ff002a31;--ruby-a6: #e4002440;--ruby-a7: #ce002553;--ruby-a8: #c300286d;--ruby-a9: #db002cb9;--ruby-a10: #d2002cc4;--ruby-a11: #c10030db;--ruby-a12: #550016e8;--sky-1: #f9feff;--sky-2: #f1fafd;--sky-3: #e1f6fd;--sky-4: #d1f0fa;--sky-5: #bee7f5;--sky-6: #a9daed;--sky-7: #8dcae3;--sky-8: #60b3d7;--sky-9: #7ce2fe;--sky-10: #74daf8;--sky-11: #00749e;--sky-12: #1d3e56;--sky-a1: #00d5ff06;--sky-a2: #00a4db0e;--sky-a3: #00b3ee1e;--sky-a4: #00ace42e;--sky-a5: #00a1d841;--sky-a6: #0092ca56;--sky-a7: #0089c172;--sky-a8: #0085bf9f;--sky-a9: #00c7fe83;--sky-a10: #00bcf38b;--sky-a11: #00749e;--sky-a12: #002540e2;--teal-1: #fafefd;--teal-2: #f3fbf9;--teal-3: #e0f8f3;--teal-4: #ccf3ea;--teal-5: #b8eae0;--teal-6: #a1ded2;--teal-7: #83cdc1;--teal-8: #53b9ab;--teal-9: #12a594;--teal-10: #0d9b8a;--teal-11: #008573;--teal-12: #0d3d38;--teal-a1: #00cc9905;--teal-a2: #00aa800c;--teal-a3: #00c69d1f;--teal-a4: #00c39633;--teal-a5: #00b49047;--teal-a6: #00a6855e;--teal-a7: #0099807c;--teal-a8: #009783ac;--teal-a9: #009e8ced;--teal-a10: #009684f2;--teal-a11: #008573;--teal-a12: #00332df2;--tomato-1: #fffcfc;--tomato-2: #fff8f7;--tomato-3: #feebe7;--tomato-4: #ffdcd3;--tomato-5: #ffcdc2;--tomato-6: #fdbdaf;--tomato-7: #f5a898;--tomato-8: #ec8e7b;--tomato-9: #e54d2e;--tomato-10: #dd4425;--tomato-11: #d13415;--tomato-12: #5c271f;--tomato-a1: #ff000003;--tomato-a2: #ff200008;--tomato-a3: #f52b0018;--tomato-a4: #ff35002c;--tomato-a5: #ff2e003d;--tomato-a6: #f92d0050;--tomato-a7: #e7280067;--tomato-a8: #db250084;--tomato-a9: #df2600d1;--tomato-a10: #d72400da;--tomato-a11: #cd2200ea;--tomato-a12: #460900e0;--violet-1: #fdfcfe;--violet-2: #faf8ff;--violet-3: #f4f0fe;--violet-4: #ebe4ff;--violet-5: #e1d9ff;--violet-6: #d4cafe;--violet-7: #c2b5f5;--violet-8: #aa99ec;--violet-9: #6e56cf;--violet-10: #654dc4;--violet-11: #6550b9;--violet-12: #2f265f;--violet-a1: #5500aa03;--violet-a2: #4900ff07;--violet-a3: #4400ee0f;--violet-a4: #4300ff1b;--violet-a5: #3600ff26;--violet-a6: #3100fb35;--violet-a7: #2d01dd4a;--violet-a8: #2b00d066;--violet-a9: #2400b7a9;--violet-a10: #2300abb2;--violet-a11: #1f0099af;--violet-a12: #0b0043d9;--yellow-1: #fdfdf9;--yellow-2: #fefce9;--yellow-3: #fffab8;--yellow-4: #fff394;--yellow-5: #ffe770;--yellow-6: #f3d768;--yellow-7: #e4c767;--yellow-8: #d5ae39;--yellow-9: #ffe629;--yellow-10: #ffdc00;--yellow-11: #9e6c00;--yellow-12: #473b1f;--yellow-a1: #aaaa0006;--yellow-a2: #f4dd0016;--yellow-a3: #ffee0047;--yellow-a4: #ffe3016b;--yellow-a5: #ffd5008f;--yellow-a6: #ebbc0097;--yellow-a7: #d2a10098;--yellow-a8: #c99700c6;--yellow-a9: #ffe100d6;--yellow-a10: #ffdc00;--yellow-a11: #9e6c00;--yellow-a12: #2e2000e0;--gray-surface: #ffffffcc;--gray-indicator: var(--gray-9);--gray-track: var(--gray-9);--mauve-surface: #ffffffcc;--mauve-indicator: var(--mauve-9);--mauve-track: var(--mauve-9);--slate-surface: #ffffffcc;--slate-indicator: var(--slate-9);--slate-track: var(--slate-9);--sage-surface: #ffffffcc;--sage-indicator: var(--sage-9);--sage-track: var(--sage-9);--olive-surface: #ffffffcc;--olive-indicator: var(--olive-9);--olive-track: var(--olive-9);--sand-surface: #ffffffcc;--sand-indicator: var(--sand-9);--sand-track: var(--sand-9);--amber-surface: #fefae4cc;--amber-indicator: var(--amber-9);--amber-track: var(--amber-9);--blue-surface: #f1f9ffcc;--blue-indicator: var(--blue-9);--blue-track: var(--blue-9);--bronze-surface: #fdf5f3cc;--bronze-indicator: var(--bronze-9);--bronze-track: var(--bronze-9);--brown-surface: #fbf8f4cc;--brown-indicator: var(--brown-9);--brown-track: var(--brown-9);--crimson-surface: #fef5f8cc;--crimson-indicator: var(--crimson-9);--crimson-track: var(--crimson-9);--cyan-surface: #eff9facc;--cyan-indicator: var(--cyan-9);--cyan-track: var(--cyan-9);--gold-surface: #f9f8efcc;--gold-indicator: var(--gold-9);--gold-track: var(--gold-9);--grass-surface: #f3faf3cc;--grass-indicator: var(--grass-9);--grass-track: var(--grass-9);--green-surface: #f1faf4cc;--green-indicator: var(--green-9);--green-track: var(--green-9);--indigo-surface: #f5f8ffcc;--indigo-indicator: var(--indigo-9);--indigo-track: var(--indigo-9);--iris-surface: #f6f6ffcc;--iris-indicator: var(--iris-9);--iris-track: var(--iris-9);--jade-surface: #f1faf5cc;--jade-indicator: var(--jade-9);--jade-track: var(--jade-9);--lime-surface: #f6f9f0cc;--lime-indicator: var(--lime-9);--lime-track: var(--lime-9);--mint-surface: #effaf8cc;--mint-indicator: var(--mint-9);--mint-track: var(--mint-9);--orange-surface: #fff5e9cc;--orange-indicator: var(--orange-9);--orange-track: var(--orange-9);--pink-surface: #fef5facc;--pink-indicator: var(--pink-9);--pink-track: var(--pink-9);--plum-surface: #fdf5fdcc;--plum-indicator: var(--plum-9);--plum-track: var(--plum-9);--purple-surface: #faf5fecc;--purple-indicator: var(--purple-9);--purple-track: var(--purple-9);--red-surface: #fff5f5cc;--red-indicator: var(--red-9);--red-track: var(--red-9);--ruby-surface: #fff5f6cc;--ruby-indicator: var(--ruby-9);--ruby-track: var(--ruby-9);--sky-surface: #eef9fdcc;--sky-indicator: var(--sky-9);--sky-track: var(--sky-9);--teal-surface: #f0faf8cc;--teal-indicator: var(--teal-9);--teal-track: var(--teal-9);--tomato-surface: #fff6f5cc;--tomato-indicator: var(--tomato-9);--tomato-track: var(--tomato-9);--violet-surface: #f9f6ffcc;--violet-indicator: var(--violet-9);--violet-track: var(--violet-9);--yellow-surface: #fefbe4cc;--yellow-indicator: var(--yellow-10);--yellow-track: var(--yellow-10)}@supports (color: color(display-p3 1 1 1)){@media (color-gamut: p3){:root,.light,.light-theme{--gray-1: color(display-p3 .988 .988 .988);--gray-2: color(display-p3 .975 .975 .975);--gray-3: color(display-p3 .939 .939 .939);--gray-4: color(display-p3 .908 .908 .908);--gray-5: color(display-p3 .88 .88 .88);--gray-6: color(display-p3 .849 .849 .849);--gray-7: color(display-p3 .807 .807 .807);--gray-8: color(display-p3 .732 .732 .732);--gray-9: color(display-p3 .553 .553 .553);--gray-10: color(display-p3 .512 .512 .512);--gray-11: color(display-p3 .392 .392 .392);--gray-12: color(display-p3 .125 .125 .125);--gray-a1: color(display-p3 0 0 0 / .012);--gray-a2: color(display-p3 0 0 0 / .024);--gray-a3: color(display-p3 0 0 0 / .063);--gray-a4: color(display-p3 0 0 0 / .09);--gray-a5: color(display-p3 0 0 0 / .122);--gray-a6: color(display-p3 0 0 0 / .153);--gray-a7: color(display-p3 0 0 0 / .192);--gray-a8: color(display-p3 0 0 0 / .267);--gray-a9: color(display-p3 0 0 0 / .447);--gray-a10: color(display-p3 0 0 0 / .486);--gray-a11: color(display-p3 0 0 0 / .608);--gray-a12: color(display-p3 0 0 0 / .875);--mauve-1: color(display-p3 .991 .988 .992);--mauve-2: color(display-p3 .98 .976 .984);--mauve-3: color(display-p3 .946 .938 .952);--mauve-4: color(display-p3 .915 .906 .925);--mauve-5: color(display-p3 .886 .876 .901);--mauve-6: color(display-p3 .856 .846 .875);--mauve-7: color(display-p3 .814 .804 .84);--mauve-8: color(display-p3 .735 .728 .777);--mauve-9: color(display-p3 .555 .549 .596);--mauve-10: color(display-p3 .514 .508 .552);--mauve-11: color(display-p3 .395 .388 .424);--mauve-12: color(display-p3 .128 .122 .147);--mauve-a1: color(display-p3 .349 .024 .349 / .012);--mauve-a2: color(display-p3 .184 .024 .349 / .024);--mauve-a3: color(display-p3 .129 .008 .255 / .063);--mauve-a4: color(display-p3 .094 .012 .216 / .095);--mauve-a5: color(display-p3 .098 .008 .224 / .126);--mauve-a6: color(display-p3 .055 .004 .18 / .153);--mauve-a7: color(display-p3 .067 .008 .184 / .197);--mauve-a8: color(display-p3 .02 .004 .176 / .271);--mauve-a9: color(display-p3 .02 .004 .106 / .451);--mauve-a10: color(display-p3 .012 .004 .09 / .491);--mauve-a11: color(display-p3 .016 0 .059 / .612);--mauve-a12: color(display-p3 .008 0 .027 / .879);--slate-1: color(display-p3 .988 .988 .992);--slate-2: color(display-p3 .976 .976 .984);--slate-3: color(display-p3 .94 .941 .953);--slate-4: color(display-p3 .908 .909 .925);--slate-5: color(display-p3 .88 .881 .901);--slate-6: color(display-p3 .85 .852 .876);--slate-7: color(display-p3 .805 .808 .838);--slate-8: color(display-p3 .727 .733 .773);--slate-9: color(display-p3 .547 .553 .592);--slate-10: color(display-p3 .503 .512 .549);--slate-11: color(display-p3 .379 .392 .421);--slate-12: color(display-p3 .113 .125 .14);--slate-a1: color(display-p3 .024 .024 .349 / .012);--slate-a2: color(display-p3 .024 .024 .349 / .024);--slate-a3: color(display-p3 .004 .004 .204 / .059);--slate-a4: color(display-p3 .012 .012 .184 / .091);--slate-a5: color(display-p3 .004 .039 .2 / .122);--slate-a6: color(display-p3 .008 .008 .165 / .15);--slate-a7: color(display-p3 .008 .027 .184 / .197);--slate-a8: color(display-p3 .004 .031 .176 / .275);--slate-a9: color(display-p3 .004 .02 .106 / .455);--slate-a10: color(display-p3 .004 .027 .098 / .499);--slate-a11: color(display-p3 0 .02 .063 / .62);--slate-a12: color(display-p3 0 .012 .031 / .887);--sage-1: color(display-p3 .986 .992 .988);--sage-2: color(display-p3 .97 .977 .974);--sage-3: color(display-p3 .935 .944 .94);--sage-4: color(display-p3 .904 .913 .909);--sage-5: color(display-p3 .875 .885 .88);--sage-6: color(display-p3 .844 .854 .849);--sage-7: color(display-p3 .8 .811 .806);--sage-8: color(display-p3 .725 .738 .732);--sage-9: color(display-p3 .531 .556 .546);--sage-10: color(display-p3 .492 .515 .506);--sage-11: color(display-p3 .377 .395 .389);--sage-12: color(display-p3 .107 .129 .118);--sage-a1: color(display-p3 .024 .514 .267 / .016);--sage-a2: color(display-p3 .02 .267 .145 / .032);--sage-a3: color(display-p3 .008 .184 .125 / .067);--sage-a4: color(display-p3 .012 .094 .051 / .095);--sage-a5: color(display-p3 .008 .098 .035 / .126);--sage-a6: color(display-p3 .004 .078 .027 / .157);--sage-a7: color(display-p3 0 .059 .039 / .2);--sage-a8: color(display-p3 .004 .047 .031 / .275);--sage-a9: color(display-p3 .004 .059 .035 / .471);--sage-a10: color(display-p3 0 .047 .031 / .51);--sage-a11: color(display-p3 0 .031 .02 / .624);--sage-a12: color(display-p3 0 .027 .012 / .895);--olive-1: color(display-p3 .989 .992 .989);--olive-2: color(display-p3 .974 .98 .973);--olive-3: color(display-p3 .939 .945 .937);--olive-4: color(display-p3 .907 .914 .905);--olive-5: color(display-p3 .878 .885 .875);--olive-6: color(display-p3 .846 .855 .843);--olive-7: color(display-p3 .803 .812 .8);--olive-8: color(display-p3 .727 .738 .723);--olive-9: color(display-p3 .541 .556 .532);--olive-10: color(display-p3 .5 .515 .491);--olive-11: color(display-p3 .38 .395 .374);--olive-12: color(display-p3 .117 .129 .111);--olive-a1: color(display-p3 .024 .349 .024 / .012);--olive-a2: color(display-p3 .024 .302 .024 / .028);--olive-a3: color(display-p3 .008 .129 .008 / .063);--olive-a4: color(display-p3 .012 .094 .012 / .095);--olive-a5: color(display-p3 .035 .098 .008 / .126);--olive-a6: color(display-p3 .027 .078 .004 / .157);--olive-a7: color(display-p3 .02 .059 0 / .2);--olive-a8: color(display-p3 .02 .059 .004 / .279);--olive-a9: color(display-p3 .02 .051 .004 / .467);--olive-a10: color(display-p3 .024 .047 0 / .51);--olive-a11: color(display-p3 .012 .039 0 / .628);--olive-a12: color(display-p3 .008 .024 0 / .891);--sand-1: color(display-p3 .992 .992 .989);--sand-2: color(display-p3 .977 .977 .973);--sand-3: color(display-p3 .943 .942 .936);--sand-4: color(display-p3 .913 .912 .903);--sand-5: color(display-p3 .885 .883 .873);--sand-6: color(display-p3 .854 .852 .839);--sand-7: color(display-p3 .813 .81 .794);--sand-8: color(display-p3 .738 .734 .713);--sand-9: color(display-p3 .553 .553 .528);--sand-10: color(display-p3 .511 .511 .488);--sand-11: color(display-p3 .388 .388 .37);--sand-12: color(display-p3 .129 .126 .111);--sand-a1: color(display-p3 .349 .349 .024 / .012);--sand-a2: color(display-p3 .161 .161 .024 / .028);--sand-a3: color(display-p3 .067 .067 .008 / .063);--sand-a4: color(display-p3 .129 .129 .012 / .099);--sand-a5: color(display-p3 .098 .067 .008 / .126);--sand-a6: color(display-p3 .102 .075 .004 / .161);--sand-a7: color(display-p3 .098 .098 .004 / .208);--sand-a8: color(display-p3 .086 .075 .004 / .287);--sand-a9: color(display-p3 .051 .051 .004 / .471);--sand-a10: color(display-p3 .047 .047 0 / .514);--sand-a11: color(display-p3 .031 .031 0 / .632);--sand-a12: color(display-p3 .024 .02 0 / .891);--amber-1: color(display-p3 .995 .992 .985);--amber-2: color(display-p3 .994 .986 .921);--amber-3: color(display-p3 .994 .969 .782);--amber-4: color(display-p3 .989 .937 .65);--amber-5: color(display-p3 .97 .902 .527);--amber-6: color(display-p3 .936 .844 .506);--amber-7: color(display-p3 .89 .762 .443);--amber-8: color(display-p3 .85 .65 .3);--amber-9: color(display-p3 1 .77 .26);--amber-10: color(display-p3 .959 .741 .274);--amber-11: color(display-p3 .64 .4 0);--amber-12: color(display-p3 .294 .208 .145);--amber-a1: color(display-p3 .757 .514 .024 / .016);--amber-a2: color(display-p3 .902 .804 .008 / .079);--amber-a3: color(display-p3 .965 .859 .004 / .22);--amber-a4: color(display-p3 .969 .82 .004 / .35);--amber-a5: color(display-p3 .933 .796 .004 / .475);--amber-a6: color(display-p3 .875 .682 .004 / .495);--amber-a7: color(display-p3 .804 .573 0 / .557);--amber-a8: color(display-p3 .788 .502 0 / .699);--amber-a9: color(display-p3 1 .686 0 / .742);--amber-a10: color(display-p3 .945 .643 0 / .726);--amber-a11: color(display-p3 .64 .4 0);--amber-a12: color(display-p3 .294 .208 .145);--blue-1: color(display-p3 .986 .992 .999);--blue-2: color(display-p3 .96 .979 .998);--blue-3: color(display-p3 .912 .956 .991);--blue-4: color(display-p3 .853 .932 1);--blue-5: color(display-p3 .788 .894 .998);--blue-6: color(display-p3 .709 .843 .976);--blue-7: color(display-p3 .606 .777 .947);--blue-8: color(display-p3 .451 .688 .917);--blue-9: color(display-p3 .247 .556 .969);--blue-10: color(display-p3 .234 .523 .912);--blue-11: color(display-p3 .15 .44 .84);--blue-12: color(display-p3 .102 .193 .379);--blue-a1: color(display-p3 .024 .514 1 / .016);--blue-a2: color(display-p3 .024 .514 .906 / .04);--blue-a3: color(display-p3 .012 .506 .914 / .087);--blue-a4: color(display-p3 .008 .545 1 / .146);--blue-a5: color(display-p3 .004 .502 .984 / .212);--blue-a6: color(display-p3 .004 .463 .922 / .291);--blue-a7: color(display-p3 .004 .431 .863 / .393);--blue-a8: color(display-p3 0 .427 .851 / .55);--blue-a9: color(display-p3 0 .412 .961 / .753);--blue-a10: color(display-p3 0 .376 .886 / .765);--blue-a11: color(display-p3 .15 .44 .84);--blue-a12: color(display-p3 .102 .193 .379);--bronze-1: color(display-p3 .991 .988 .988);--bronze-2: color(display-p3 .989 .97 .961);--bronze-3: color(display-p3 .958 .932 .919);--bronze-4: color(display-p3 .929 .894 .877);--bronze-5: color(display-p3 .898 .853 .832);--bronze-6: color(display-p3 .861 .805 .778);--bronze-7: color(display-p3 .812 .739 .706);--bronze-8: color(display-p3 .741 .647 .606);--bronze-9: color(display-p3 .611 .507 .455);--bronze-10: color(display-p3 .563 .461 .414);--bronze-11: color(display-p3 .471 .373 .336);--bronze-12: color(display-p3 .251 .191 .172);--bronze-a1: color(display-p3 .349 .024 .024 / .012);--bronze-a2: color(display-p3 .71 .22 .024 / .04);--bronze-a3: color(display-p3 .482 .2 .008 / .083);--bronze-a4: color(display-p3 .424 .133 .004 / .122);--bronze-a5: color(display-p3 .4 .145 .004 / .169);--bronze-a6: color(display-p3 .388 .125 .004 / .224);--bronze-a7: color(display-p3 .365 .11 .004 / .295);--bronze-a8: color(display-p3 .341 .102 .004 / .393);--bronze-a9: color(display-p3 .29 .094 0 / .546);--bronze-a10: color(display-p3 .255 .082 0 / .585);--bronze-a11: color(display-p3 .471 .373 .336);--bronze-a12: color(display-p3 .251 .191 .172);--brown-1: color(display-p3 .995 .992 .989);--brown-2: color(display-p3 .987 .976 .964);--brown-3: color(display-p3 .959 .936 .909);--brown-4: color(display-p3 .934 .897 .855);--brown-5: color(display-p3 .909 .856 .798);--brown-6: color(display-p3 .88 .808 .73);--brown-7: color(display-p3 .841 .742 .639);--brown-8: color(display-p3 .782 .647 .514);--brown-9: color(display-p3 .651 .505 .368);--brown-10: color(display-p3 .601 .465 .344);--brown-11: color(display-p3 .485 .374 .288);--brown-12: color(display-p3 .236 .202 .183);--brown-a1: color(display-p3 .675 .349 .024 / .012);--brown-a2: color(display-p3 .675 .349 .024 / .036);--brown-a3: color(display-p3 .573 .314 .012 / .091);--brown-a4: color(display-p3 .545 .302 .008 / .146);--brown-a5: color(display-p3 .561 .29 .004 / .204);--brown-a6: color(display-p3 .553 .294 .004 / .271);--brown-a7: color(display-p3 .557 .286 .004 / .361);--brown-a8: color(display-p3 .549 .275 .004 / .487);--brown-a9: color(display-p3 .447 .22 0 / .632);--brown-a10: color(display-p3 .388 .188 0 / .655);--brown-a11: color(display-p3 .485 .374 .288);--brown-a12: color(display-p3 .236 .202 .183);--crimson-1: color(display-p3 .998 .989 .992);--crimson-2: color(display-p3 .991 .969 .976);--crimson-3: color(display-p3 .987 .917 .941);--crimson-4: color(display-p3 .975 .866 .904);--crimson-5: color(display-p3 .953 .813 .864);--crimson-6: color(display-p3 .921 .755 .817);--crimson-7: color(display-p3 .88 .683 .761);--crimson-8: color(display-p3 .834 .592 .694);--crimson-9: color(display-p3 .843 .298 .507);--crimson-10: color(display-p3 .807 .266 .468);--crimson-11: color(display-p3 .731 .195 .388);--crimson-12: color(display-p3 .352 .111 .221);--crimson-a1: color(display-p3 .675 .024 .349 / .012);--crimson-a2: color(display-p3 .757 .02 .267 / .032);--crimson-a3: color(display-p3 .859 .008 .294 / .083);--crimson-a4: color(display-p3 .827 .008 .298 / .134);--crimson-a5: color(display-p3 .753 .008 .275 / .189);--crimson-a6: color(display-p3 .682 .004 .247 / .244);--crimson-a7: color(display-p3 .62 .004 .251 / .318);--crimson-a8: color(display-p3 .6 .004 .251 / .408);--crimson-a9: color(display-p3 .776 0 .298 / .702);--crimson-a10: color(display-p3 .737 0 .275 / .734);--crimson-a11: color(display-p3 .731 .195 .388);--crimson-a12: color(display-p3 .352 .111 .221);--cyan-1: color(display-p3 .982 .992 .996);--cyan-2: color(display-p3 .955 .981 .984);--cyan-3: color(display-p3 .888 .965 .975);--cyan-4: color(display-p3 .821 .941 .959);--cyan-5: color(display-p3 .751 .907 .935);--cyan-6: color(display-p3 .671 .862 .9);--cyan-7: color(display-p3 .564 .8 .854);--cyan-8: color(display-p3 .388 .715 .798);--cyan-9: color(display-p3 .282 .627 .765);--cyan-10: color(display-p3 .264 .583 .71);--cyan-11: color(display-p3 .08 .48 .63);--cyan-12: color(display-p3 .108 .232 .277);--cyan-a1: color(display-p3 .02 .608 .804 / .02);--cyan-a2: color(display-p3 .02 .557 .647 / .044);--cyan-a3: color(display-p3 .004 .694 .796 / .114);--cyan-a4: color(display-p3 .004 .678 .784 / .181);--cyan-a5: color(display-p3 .004 .624 .733 / .248);--cyan-a6: color(display-p3 .004 .584 .706 / .33);--cyan-a7: color(display-p3 .004 .541 .667 / .436);--cyan-a8: color(display-p3 0 .533 .667 / .612);--cyan-a9: color(display-p3 0 .482 .675 / .718);--cyan-a10: color(display-p3 0 .435 .608 / .738);--cyan-a11: color(display-p3 .08 .48 .63);--cyan-a12: color(display-p3 .108 .232 .277);--gold-1: color(display-p3 .992 .992 .989);--gold-2: color(display-p3 .98 .976 .953);--gold-3: color(display-p3 .947 .94 .909);--gold-4: color(display-p3 .914 .904 .865);--gold-5: color(display-p3 .88 .865 .816);--gold-6: color(display-p3 .84 .818 .756);--gold-7: color(display-p3 .788 .753 .677);--gold-8: color(display-p3 .715 .66 .565);--gold-9: color(display-p3 .579 .517 .41);--gold-10: color(display-p3 .538 .479 .38);--gold-11: color(display-p3 .433 .386 .305);--gold-12: color(display-p3 .227 .209 .173);--gold-a1: color(display-p3 .349 .349 .024 / .012);--gold-a2: color(display-p3 .592 .514 .024 / .048);--gold-a3: color(display-p3 .4 .357 .012 / .091);--gold-a4: color(display-p3 .357 .298 .008 / .134);--gold-a5: color(display-p3 .345 .282 .004 / .185);--gold-a6: color(display-p3 .341 .263 .004 / .244);--gold-a7: color(display-p3 .345 .235 .004 / .322);--gold-a8: color(display-p3 .345 .22 .004 / .436);--gold-a9: color(display-p3 .286 .18 0 / .589);--gold-a10: color(display-p3 .255 .161 0 / .62);--gold-a11: color(display-p3 .433 .386 .305);--gold-a12: color(display-p3 .227 .209 .173);--grass-1: color(display-p3 .986 .996 .985);--grass-2: color(display-p3 .966 .983 .964);--grass-3: color(display-p3 .923 .965 .917);--grass-4: color(display-p3 .872 .94 .865);--grass-5: color(display-p3 .811 .908 .802);--grass-6: color(display-p3 .733 .864 .724);--grass-7: color(display-p3 .628 .803 .622);--grass-8: color(display-p3 .477 .72 .482);--grass-9: color(display-p3 .38 .647 .378);--grass-10: color(display-p3 .344 .598 .342);--grass-11: color(display-p3 .263 .488 .261);--grass-12: color(display-p3 .151 .233 .153);--grass-a1: color(display-p3 .024 .757 .024 / .016);--grass-a2: color(display-p3 .024 .565 .024 / .036);--grass-a3: color(display-p3 .059 .576 .008 / .083);--grass-a4: color(display-p3 .035 .565 .008 / .134);--grass-a5: color(display-p3 .047 .545 .008 / .197);--grass-a6: color(display-p3 .031 .502 .004 / .275);--grass-a7: color(display-p3 .012 .482 .004 / .377);--grass-a8: color(display-p3 0 .467 .008 / .522);--grass-a9: color(display-p3 .008 .435 0 / .624);--grass-a10: color(display-p3 .008 .388 0 / .659);--grass-a11: color(display-p3 .263 .488 .261);--grass-a12: color(display-p3 .151 .233 .153);--green-1: color(display-p3 .986 .996 .989);--green-2: color(display-p3 .963 .983 .967);--green-3: color(display-p3 .913 .964 .925);--green-4: color(display-p3 .859 .94 .879);--green-5: color(display-p3 .796 .907 .826);--green-6: color(display-p3 .718 .863 .761);--green-7: color(display-p3 .61 .801 .675);--green-8: color(display-p3 .451 .715 .559);--green-9: color(display-p3 .332 .634 .442);--green-10: color(display-p3 .308 .595 .417);--green-11: color(display-p3 .19 .5 .32);--green-12: color(display-p3 .132 .228 .18);--green-a1: color(display-p3 .024 .757 .267 / .016);--green-a2: color(display-p3 .024 .565 .129 / .036);--green-a3: color(display-p3 .012 .596 .145 / .087);--green-a4: color(display-p3 .008 .588 .145 / .142);--green-a5: color(display-p3 .004 .541 .157 / .204);--green-a6: color(display-p3 .004 .518 .157 / .283);--green-a7: color(display-p3 .004 .486 .165 / .389);--green-a8: color(display-p3 0 .478 .2 / .55);--green-a9: color(display-p3 0 .455 .165 / .667);--green-a10: color(display-p3 0 .416 .153 / .691);--green-a11: color(display-p3 .19 .5 .32);--green-a12: color(display-p3 .132 .228 .18);--indigo-1: color(display-p3 .992 .992 .996);--indigo-2: color(display-p3 .971 .977 .998);--indigo-3: color(display-p3 .933 .948 .992);--indigo-4: color(display-p3 .885 .914 1);--indigo-5: color(display-p3 .831 .87 1);--indigo-6: color(display-p3 .767 .814 .995);--indigo-7: color(display-p3 .685 .74 .957);--indigo-8: color(display-p3 .569 .639 .916);--indigo-9: color(display-p3 .276 .384 .837);--indigo-10: color(display-p3 .234 .343 .801);--indigo-11: color(display-p3 .256 .354 .755);--indigo-12: color(display-p3 .133 .175 .348);--indigo-a1: color(display-p3 .02 .02 .51 / .008);--indigo-a2: color(display-p3 .024 .161 .863 / .028);--indigo-a3: color(display-p3 .008 .239 .886 / .067);--indigo-a4: color(display-p3 .004 .247 1 / .114);--indigo-a5: color(display-p3 .004 .235 1 / .169);--indigo-a6: color(display-p3 .004 .208 .984 / .232);--indigo-a7: color(display-p3 .004 .176 .863 / .314);--indigo-a8: color(display-p3 .004 .165 .812 / .432);--indigo-a9: color(display-p3 0 .153 .773 / .726);--indigo-a10: color(display-p3 0 .137 .737 / .765);--indigo-a11: color(display-p3 .256 .354 .755);--indigo-a12: color(display-p3 .133 .175 .348);--iris-1: color(display-p3 .992 .992 .999);--iris-2: color(display-p3 .972 .973 .998);--iris-3: color(display-p3 .943 .945 .992);--iris-4: color(display-p3 .902 .906 1);--iris-5: color(display-p3 .857 .861 1);--iris-6: color(display-p3 .799 .805 .987);--iris-7: color(display-p3 .721 .727 .955);--iris-8: color(display-p3 .61 .619 .918);--iris-9: color(display-p3 .357 .357 .81);--iris-10: color(display-p3 .318 .318 .774);--iris-11: color(display-p3 .337 .326 .748);--iris-12: color(display-p3 .154 .161 .371);--iris-a1: color(display-p3 .02 .02 1 / .008);--iris-a2: color(display-p3 .024 .024 .863 / .028);--iris-a3: color(display-p3 .004 .071 .871 / .059);--iris-a4: color(display-p3 .012 .051 1 / .099);--iris-a5: color(display-p3 .008 .035 1 / .142);--iris-a6: color(display-p3 0 .02 .941 / .2);--iris-a7: color(display-p3 .004 .02 .847 / .279);--iris-a8: color(display-p3 .004 .024 .788 / .389);--iris-a9: color(display-p3 0 0 .706 / .644);--iris-a10: color(display-p3 0 0 .667 / .683);--iris-a11: color(display-p3 .337 .326 .748);--iris-a12: color(display-p3 .154 .161 .371);--jade-1: color(display-p3 .986 .996 .992);--jade-2: color(display-p3 .962 .983 .969);--jade-3: color(display-p3 .912 .965 .932);--jade-4: color(display-p3 .858 .941 .893);--jade-5: color(display-p3 .795 .909 .847);--jade-6: color(display-p3 .715 .864 .791);--jade-7: color(display-p3 .603 .802 .718);--jade-8: color(display-p3 .44 .72 .629);--jade-9: color(display-p3 .319 .63 .521);--jade-10: color(display-p3 .299 .592 .488);--jade-11: color(display-p3 .15 .5 .37);--jade-12: color(display-p3 .142 .229 .194);--jade-a1: color(display-p3 .024 .757 .514 / .016);--jade-a2: color(display-p3 .024 .612 .22 / .04);--jade-a3: color(display-p3 .012 .596 .235 / .087);--jade-a4: color(display-p3 .008 .588 .255 / .142);--jade-a5: color(display-p3 .004 .561 .251 / .204);--jade-a6: color(display-p3 .004 .525 .278 / .287);--jade-a7: color(display-p3 .004 .506 .29 / .397);--jade-a8: color(display-p3 0 .506 .337 / .561);--jade-a9: color(display-p3 0 .459 .298 / .683);--jade-a10: color(display-p3 0 .42 .271 / .702);--jade-a11: color(display-p3 .15 .5 .37);--jade-a12: color(display-p3 .142 .229 .194);--lime-1: color(display-p3 .989 .992 .981);--lime-2: color(display-p3 .975 .98 .954);--lime-3: color(display-p3 .939 .965 .851);--lime-4: color(display-p3 .896 .94 .76);--lime-5: color(display-p3 .843 .903 .678);--lime-6: color(display-p3 .778 .852 .599);--lime-7: color(display-p3 .694 .784 .508);--lime-8: color(display-p3 .585 .707 .378);--lime-9: color(display-p3 .78 .928 .466);--lime-10: color(display-p3 .734 .896 .397);--lime-11: color(display-p3 .386 .482 .227);--lime-12: color(display-p3 .222 .25 .128);--lime-a1: color(display-p3 .412 .608 .02 / .02);--lime-a2: color(display-p3 .514 .592 .024 / .048);--lime-a3: color(display-p3 .584 .765 .008 / .15);--lime-a4: color(display-p3 .561 .757 .004 / .24);--lime-a5: color(display-p3 .514 .698 .004 / .322);--lime-a6: color(display-p3 .443 .627 0 / .4);--lime-a7: color(display-p3 .376 .561 .004 / .491);--lime-a8: color(display-p3 .333 .529 0 / .624);--lime-a9: color(display-p3 .588 .867 0 / .534);--lime-a10: color(display-p3 .561 .827 0 / .604);--lime-a11: color(display-p3 .386 .482 .227);--lime-a12: color(display-p3 .222 .25 .128);--mint-1: color(display-p3 .98 .995 .992);--mint-2: color(display-p3 .957 .985 .977);--mint-3: color(display-p3 .888 .972 .95);--mint-4: color(display-p3 .819 .951 .916);--mint-5: color(display-p3 .747 .918 .873);--mint-6: color(display-p3 .668 .87 .818);--mint-7: color(display-p3 .567 .805 .744);--mint-8: color(display-p3 .42 .724 .649);--mint-9: color(display-p3 .62 .908 .834);--mint-10: color(display-p3 .585 .871 .797);--mint-11: color(display-p3 .203 .463 .397);--mint-12: color(display-p3 .136 .259 .236);--mint-a1: color(display-p3 .02 .804 .608 / .02);--mint-a2: color(display-p3 .02 .647 .467 / .044);--mint-a3: color(display-p3 .004 .761 .553 / .114);--mint-a4: color(display-p3 .004 .741 .545 / .181);--mint-a5: color(display-p3 .004 .678 .51 / .255);--mint-a6: color(display-p3 .004 .616 .463 / .334);--mint-a7: color(display-p3 .004 .549 .412 / .432);--mint-a8: color(display-p3 0 .529 .392 / .581);--mint-a9: color(display-p3 .004 .765 .569 / .381);--mint-a10: color(display-p3 .004 .69 .51 / .416);--mint-a11: color(display-p3 .203 .463 .397);--mint-a12: color(display-p3 .136 .259 .236);--orange-1: color(display-p3 .995 .988 .985);--orange-2: color(display-p3 .994 .968 .934);--orange-3: color(display-p3 .989 .938 .85);--orange-4: color(display-p3 1 .874 .687);--orange-5: color(display-p3 1 .821 .583);--orange-6: color(display-p3 .975 .767 .545);--orange-7: color(display-p3 .919 .693 .486);--orange-8: color(display-p3 .877 .597 .379);--orange-9: color(display-p3 .9 .45 .2);--orange-10: color(display-p3 .87 .409 .164);--orange-11: color(display-p3 .76 .34 0);--orange-12: color(display-p3 .323 .185 .127);--orange-a1: color(display-p3 .757 .267 .024 / .016);--orange-a2: color(display-p3 .886 .533 .008 / .067);--orange-a3: color(display-p3 .922 .584 .008 / .15);--orange-a4: color(display-p3 1 .604 .004 / .314);--orange-a5: color(display-p3 1 .569 .004 / .416);--orange-a6: color(display-p3 .949 .494 .004 / .455);--orange-a7: color(display-p3 .839 .408 0 / .514);--orange-a8: color(display-p3 .804 .349 0 / .62);--orange-a9: color(display-p3 .878 .314 0 / .8);--orange-a10: color(display-p3 .843 .29 0 / .836);--orange-a11: color(display-p3 .76 .34 0);--orange-a12: color(display-p3 .323 .185 .127);--pink-1: color(display-p3 .998 .989 .996);--pink-2: color(display-p3 .992 .97 .985);--pink-3: color(display-p3 .981 .917 .96);--pink-4: color(display-p3 .963 .867 .932);--pink-5: color(display-p3 .939 .815 .899);--pink-6: color(display-p3 .907 .756 .859);--pink-7: color(display-p3 .869 .683 .81);--pink-8: color(display-p3 .825 .59 .751);--pink-9: color(display-p3 .775 .297 .61);--pink-10: color(display-p3 .748 .27 .581);--pink-11: color(display-p3 .698 .219 .528);--pink-12: color(display-p3 .363 .101 .279);--pink-a1: color(display-p3 .675 .024 .675 / .012);--pink-a2: color(display-p3 .757 .02 .51 / .032);--pink-a3: color(display-p3 .765 .008 .529 / .083);--pink-a4: color(display-p3 .737 .008 .506 / .134);--pink-a5: color(display-p3 .663 .004 .451 / .185);--pink-a6: color(display-p3 .616 .004 .424 / .244);--pink-a7: color(display-p3 .596 .004 .412 / .318);--pink-a8: color(display-p3 .573 .004 .404 / .412);--pink-a9: color(display-p3 .682 0 .447 / .702);--pink-a10: color(display-p3 .655 0 .424 / .73);--pink-a11: color(display-p3 .698 .219 .528);--pink-a12: color(display-p3 .363 .101 .279);--plum-1: color(display-p3 .995 .988 .999);--plum-2: color(display-p3 .988 .971 .99);--plum-3: color(display-p3 .973 .923 .98);--plum-4: color(display-p3 .953 .875 .966);--plum-5: color(display-p3 .926 .825 .945);--plum-6: color(display-p3 .89 .765 .916);--plum-7: color(display-p3 .84 .686 .877);--plum-8: color(display-p3 .775 .58 .832);--plum-9: color(display-p3 .624 .313 .708);--plum-10: color(display-p3 .587 .29 .667);--plum-11: color(display-p3 .543 .263 .619);--plum-12: color(display-p3 .299 .114 .352);--plum-a1: color(display-p3 .675 .024 1 / .012);--plum-a2: color(display-p3 .58 .024 .58 / .028);--plum-a3: color(display-p3 .655 .008 .753 / .079);--plum-a4: color(display-p3 .627 .008 .722 / .126);--plum-a5: color(display-p3 .58 .004 .69 / .177);--plum-a6: color(display-p3 .537 .004 .655 / .236);--plum-a7: color(display-p3 .49 .004 .616 / .314);--plum-a8: color(display-p3 .471 .004 .6 / .42);--plum-a9: color(display-p3 .451 0 .576 / .687);--plum-a10: color(display-p3 .42 0 .529 / .71);--plum-a11: color(display-p3 .543 .263 .619);--plum-a12: color(display-p3 .299 .114 .352);--purple-1: color(display-p3 .995 .988 .996);--purple-2: color(display-p3 .983 .971 .993);--purple-3: color(display-p3 .963 .931 .989);--purple-4: color(display-p3 .937 .888 .981);--purple-5: color(display-p3 .904 .837 .966);--purple-6: color(display-p3 .86 .774 .942);--purple-7: color(display-p3 .799 .69 .91);--purple-8: color(display-p3 .719 .583 .874);--purple-9: color(display-p3 .523 .318 .751);--purple-10: color(display-p3 .483 .289 .7);--purple-11: color(display-p3 .473 .281 .687);--purple-12: color(display-p3 .234 .132 .363);--purple-a1: color(display-p3 .675 .024 .675 / .012);--purple-a2: color(display-p3 .443 .024 .722 / .028);--purple-a3: color(display-p3 .506 .008 .835 / .071);--purple-a4: color(display-p3 .451 .004 .831 / .114);--purple-a5: color(display-p3 .431 .004 .788 / .165);--purple-a6: color(display-p3 .384 .004 .745 / .228);--purple-a7: color(display-p3 .357 .004 .71 / .31);--purple-a8: color(display-p3 .322 .004 .702 / .416);--purple-a9: color(display-p3 .298 0 .639 / .683);--purple-a10: color(display-p3 .271 0 .58 / .71);--purple-a11: color(display-p3 .473 .281 .687);--purple-a12: color(display-p3 .234 .132 .363);--red-1: color(display-p3 .998 .989 .988);--red-2: color(display-p3 .995 .971 .971);--red-3: color(display-p3 .985 .925 .925);--red-4: color(display-p3 .999 .866 .866);--red-5: color(display-p3 .984 .812 .811);--red-6: color(display-p3 .955 .751 .749);--red-7: color(display-p3 .915 .675 .672);--red-8: color(display-p3 .872 .575 .572);--red-9: color(display-p3 .83 .329 .324);--red-10: color(display-p3 .798 .294 .285);--red-11: color(display-p3 .744 .234 .222);--red-12: color(display-p3 .36 .115 .143);--red-a1: color(display-p3 .675 .024 .024 / .012);--red-a2: color(display-p3 .863 .024 .024 / .028);--red-a3: color(display-p3 .792 .008 .008 / .075);--red-a4: color(display-p3 1 .008 .008 / .134);--red-a5: color(display-p3 .918 .008 .008 / .189);--red-a6: color(display-p3 .831 .02 .004 / .251);--red-a7: color(display-p3 .741 .016 .004 / .33);--red-a8: color(display-p3 .698 .012 .004 / .428);--red-a9: color(display-p3 .749 .008 0 / .675);--red-a10: color(display-p3 .714 .012 0 / .714);--red-a11: color(display-p3 .744 .234 .222);--red-a12: color(display-p3 .36 .115 .143);--ruby-1: color(display-p3 .998 .989 .992);--ruby-2: color(display-p3 .995 .971 .974);--ruby-3: color(display-p3 .983 .92 .928);--ruby-4: color(display-p3 .987 .869 .885);--ruby-5: color(display-p3 .968 .817 .839);--ruby-6: color(display-p3 .937 .758 .786);--ruby-7: color(display-p3 .897 .685 .721);--ruby-8: color(display-p3 .851 .588 .639);--ruby-9: color(display-p3 .83 .323 .408);--ruby-10: color(display-p3 .795 .286 .375);--ruby-11: color(display-p3 .728 .211 .311);--ruby-12: color(display-p3 .36 .115 .171);--ruby-a1: color(display-p3 .675 .024 .349 / .012);--ruby-a2: color(display-p3 .863 .024 .024 / .028);--ruby-a3: color(display-p3 .804 .008 .11 / .079);--ruby-a4: color(display-p3 .91 .008 .125 / .13);--ruby-a5: color(display-p3 .831 .004 .133 / .185);--ruby-a6: color(display-p3 .745 .004 .118 / .244);--ruby-a7: color(display-p3 .678 .004 .114 / .314);--ruby-a8: color(display-p3 .639 .004 .125 / .412);--ruby-a9: color(display-p3 .753 0 .129 / .679);--ruby-a10: color(display-p3 .714 0 .125 / .714);--ruby-a11: color(display-p3 .728 .211 .311);--ruby-a12: color(display-p3 .36 .115 .171);--sky-1: color(display-p3 .98 .995 .999);--sky-2: color(display-p3 .953 .98 .99);--sky-3: color(display-p3 .899 .963 .989);--sky-4: color(display-p3 .842 .937 .977);--sky-5: color(display-p3 .777 .9 .954);--sky-6: color(display-p3 .701 .851 .921);--sky-7: color(display-p3 .604 .785 .879);--sky-8: color(display-p3 .457 .696 .829);--sky-9: color(display-p3 .585 .877 .983);--sky-10: color(display-p3 .555 .845 .959);--sky-11: color(display-p3 .193 .448 .605);--sky-12: color(display-p3 .145 .241 .329);--sky-a1: color(display-p3 .02 .804 1 / .02);--sky-a2: color(display-p3 .024 .592 .757 / .048);--sky-a3: color(display-p3 .004 .655 .886 / .102);--sky-a4: color(display-p3 .004 .604 .851 / .157);--sky-a5: color(display-p3 .004 .565 .792 / .224);--sky-a6: color(display-p3 .004 .502 .737 / .299);--sky-a7: color(display-p3 .004 .459 .694 / .397);--sky-a8: color(display-p3 0 .435 .682 / .542);--sky-a9: color(display-p3 .004 .71 .965 / .416);--sky-a10: color(display-p3 .004 .647 .914 / .444);--sky-a11: color(display-p3 .193 .448 .605);--sky-a12: color(display-p3 .145 .241 .329);--teal-1: color(display-p3 .983 .996 .992);--teal-2: color(display-p3 .958 .983 .976);--teal-3: color(display-p3 .895 .971 .952);--teal-4: color(display-p3 .831 .949 .92);--teal-5: color(display-p3 .761 .914 .878);--teal-6: color(display-p3 .682 .864 .825);--teal-7: color(display-p3 .581 .798 .756);--teal-8: color(display-p3 .433 .716 .671);--teal-9: color(display-p3 .297 .637 .581);--teal-10: color(display-p3 .275 .599 .542);--teal-11: color(display-p3 .08 .5 .43);--teal-12: color(display-p3 .11 .235 .219);--teal-a1: color(display-p3 .024 .757 .514 / .016);--teal-a2: color(display-p3 .02 .647 .467 / .044);--teal-a3: color(display-p3 .004 .741 .557 / .106);--teal-a4: color(display-p3 .004 .702 .537 / .169);--teal-a5: color(display-p3 .004 .643 .494 / .24);--teal-a6: color(display-p3 .004 .569 .447 / .318);--teal-a7: color(display-p3 .004 .518 .424 / .42);--teal-a8: color(display-p3 0 .506 .424 / .569);--teal-a9: color(display-p3 0 .482 .404 / .702);--teal-a10: color(display-p3 0 .451 .369 / .726);--teal-a11: color(display-p3 .08 .5 .43);--teal-a12: color(display-p3 .11 .235 .219);--tomato-1: color(display-p3 .998 .989 .988);--tomato-2: color(display-p3 .994 .974 .969);--tomato-3: color(display-p3 .985 .924 .909);--tomato-4: color(display-p3 .996 .868 .835);--tomato-5: color(display-p3 .98 .812 .77);--tomato-6: color(display-p3 .953 .75 .698);--tomato-7: color(display-p3 .917 .673 .611);--tomato-8: color(display-p3 .875 .575 .502);--tomato-9: color(display-p3 .831 .345 .231);--tomato-10: color(display-p3 .802 .313 .2);--tomato-11: color(display-p3 .755 .259 .152);--tomato-12: color(display-p3 .335 .165 .132);--tomato-a1: color(display-p3 .675 .024 .024 / .012);--tomato-a2: color(display-p3 .757 .145 .02 / .032);--tomato-a3: color(display-p3 .831 .184 .012 / .091);--tomato-a4: color(display-p3 .976 .192 .004 / .165);--tomato-a5: color(display-p3 .918 .192 .004 / .232);--tomato-a6: color(display-p3 .847 .173 .004 / .302);--tomato-a7: color(display-p3 .788 .165 .004 / .389);--tomato-a8: color(display-p3 .749 .153 .004 / .499);--tomato-a9: color(display-p3 .78 .149 0 / .769);--tomato-a10: color(display-p3 .757 .141 0 / .8);--tomato-a11: color(display-p3 .755 .259 .152);--tomato-a12: color(display-p3 .335 .165 .132);--violet-1: color(display-p3 .991 .988 .995);--violet-2: color(display-p3 .978 .974 .998);--violet-3: color(display-p3 .953 .943 .993);--violet-4: color(display-p3 .916 .897 1);--violet-5: color(display-p3 .876 .851 1);--violet-6: color(display-p3 .825 .793 .981);--violet-7: color(display-p3 .752 .712 .943);--violet-8: color(display-p3 .654 .602 .902);--violet-9: color(display-p3 .417 .341 .784);--violet-10: color(display-p3 .381 .306 .741);--violet-11: color(display-p3 .383 .317 .702);--violet-12: color(display-p3 .179 .15 .359);--violet-a1: color(display-p3 .349 .024 .675 / .012);--violet-a2: color(display-p3 .161 .024 .863 / .028);--violet-a3: color(display-p3 .204 .004 .871 / .059);--violet-a4: color(display-p3 .196 .004 1 / .102);--violet-a5: color(display-p3 .165 .008 1 / .15);--violet-a6: color(display-p3 .153 .004 .906 / .208);--violet-a7: color(display-p3 .141 .004 .796 / .287);--violet-a8: color(display-p3 .133 .004 .753 / .397);--violet-a9: color(display-p3 .114 0 .675 / .659);--violet-a10: color(display-p3 .11 0 .627 / .695);--violet-a11: color(display-p3 .383 .317 .702);--violet-a12: color(display-p3 .179 .15 .359);--yellow-1: color(display-p3 .992 .992 .978);--yellow-2: color(display-p3 .995 .99 .922);--yellow-3: color(display-p3 .997 .982 .749);--yellow-4: color(display-p3 .992 .953 .627);--yellow-5: color(display-p3 .984 .91 .51);--yellow-6: color(display-p3 .934 .847 .474);--yellow-7: color(display-p3 .876 .785 .46);--yellow-8: color(display-p3 .811 .689 .313);--yellow-9: color(display-p3 1 .92 .22);--yellow-10: color(display-p3 .977 .868 .291);--yellow-11: color(display-p3 .6 .44 0);--yellow-12: color(display-p3 .271 .233 .137);--yellow-a1: color(display-p3 .675 .675 .024 / .024);--yellow-a2: color(display-p3 .953 .855 .008 / .079);--yellow-a3: color(display-p3 .988 .925 .004 / .251);--yellow-a4: color(display-p3 .98 .875 .004 / .373);--yellow-a5: color(display-p3 .969 .816 .004 / .491);--yellow-a6: color(display-p3 .875 .71 0 / .526);--yellow-a7: color(display-p3 .769 .604 0 / .542);--yellow-a8: color(display-p3 .725 .549 0 / .687);--yellow-a9: color(display-p3 1 .898 0 / .781);--yellow-a10: color(display-p3 .969 .812 0 / .71);--yellow-a11: color(display-p3 .6 .44 0);--yellow-a12: color(display-p3 .271 .233 .137);--gray-surface: color(display-p3 1 1 1 / .8);--mauve-surface: color(display-p3 1 1 1 / .8);--slate-surface: color(display-p3 1 1 1 / .8);--sage-surface: color(display-p3 1 1 1 / .8);--olive-surface: color(display-p3 1 1 1 / .8);--sand-surface: color(display-p3 1 1 1 / .8);--amber-surface: color(display-p3 .9922 .9843 .902 / .8);--blue-surface: color(display-p3 .9529 .9765 .9961 / .8);--bronze-surface: color(display-p3 .9843 .9608 .9529 / .8);--brown-surface: color(display-p3 .9843 .9725 .9569 / .8);--crimson-surface: color(display-p3 .9922 .9608 .9725 / .8);--cyan-surface: color(display-p3 .9412 .9765 .9804 / .8);--gold-surface: color(display-p3 .9765 .9725 .9412 / .8);--grass-surface: color(display-p3 .9569 .9804 .9569 / .8);--green-surface: color(display-p3 .9569 .9804 .9608 / .8);--indigo-surface: color(display-p3 .9647 .9725 .9961 / .8);--iris-surface: color(display-p3 .9647 .9647 .9961 / .8);--jade-surface: color(display-p3 .9529 .9804 .9608 / .8);--lime-surface: color(display-p3 .9725 .9765 .9412 / .8);--mint-surface: color(display-p3 .9451 .9804 .9725 / .8);--orange-surface: color(display-p3 .9961 .9608 .9176 / .8);--pink-surface: color(display-p3 .9922 .9608 .9804 / .8);--plum-surface: color(display-p3 .9843 .9647 .9843 / .8);--purple-surface: color(display-p3 .9804 .9647 .9922 / .8);--red-surface: color(display-p3 .9961 .9647 .9647 / .8);--ruby-surface: color(display-p3 .9961 .9647 .9647 / .8);--sky-surface: color(display-p3 .9412 .9765 .9843 / .8);--teal-surface: color(display-p3 .9451 .9804 .9725 / .8);--tomato-surface: color(display-p3 .9922 .9647 .9608 / .8);--violet-surface: color(display-p3 .9725 .9647 .9961 / .8);--yellow-surface: color(display-p3 .9961 .9922 .902 / .8)}}}.dark,.dark-theme{--gray-1: #111111;--gray-2: #191919;--gray-3: #222222;--gray-4: #2a2a2a;--gray-5: #313131;--gray-6: #3a3a3a;--gray-7: #484848;--gray-8: #606060;--gray-9: #6e6e6e;--gray-10: #7b7b7b;--gray-11: #b4b4b4;--gray-12: #eeeeee;--gray-a1: #00000000;--gray-a2: #ffffff09;--gray-a3: #ffffff12;--gray-a4: #ffffff1b;--gray-a5: #ffffff22;--gray-a6: #ffffff2c;--gray-a7: #ffffff3b;--gray-a8: #ffffff55;--gray-a9: #ffffff64;--gray-a10: #ffffff72;--gray-a11: #ffffffaf;--gray-a12: #ffffffed;--mauve-1: #121113;--mauve-2: #1a191b;--mauve-3: #232225;--mauve-4: #2b292d;--mauve-5: #323035;--mauve-6: #3c393f;--mauve-7: #49474e;--mauve-8: #625f69;--mauve-9: #6f6d78;--mauve-10: #7c7a85;--mauve-11: #b5b2bc;--mauve-12: #eeeef0;--mauve-a1: #00000000;--mauve-a2: #f5f4f609;--mauve-a3: #ebeaf814;--mauve-a4: #eee5f81d;--mauve-a5: #efe6fe25;--mauve-a6: #f1e6fd30;--mauve-a7: #eee9ff40;--mauve-a8: #eee7ff5d;--mauve-a9: #eae6fd6e;--mauve-a10: #ece9fd7c;--mauve-a11: #f5f1ffb7;--mauve-a12: #fdfdffef;--slate-1: #111113;--slate-2: #18191b;--slate-3: #212225;--slate-4: #272a2d;--slate-5: #2e3135;--slate-6: #363a3f;--slate-7: #43484e;--slate-8: #5a6169;--slate-9: #696e77;--slate-10: #777b84;--slate-11: #b0b4ba;--slate-12: #edeef0;--slate-a1: #00000000;--slate-a2: #d8f4f609;--slate-a3: #ddeaf814;--slate-a4: #d3edf81d;--slate-a5: #d9edfe25;--slate-a6: #d6ebfd30;--slate-a7: #d9edff40;--slate-a8: #d9edff5d;--slate-a9: #dfebfd6d;--slate-a10: #e5edfd7b;--slate-a11: #f1f7feb5;--slate-a12: #fcfdffef;--sage-1: #101211;--sage-2: #171918;--sage-3: #202221;--sage-4: #272a29;--sage-5: #2e3130;--sage-6: #373b39;--sage-7: #444947;--sage-8: #5b625f;--sage-9: #63706b;--sage-10: #717d79;--sage-11: #adb5b2;--sage-12: #eceeed;--sage-a1: #00000000;--sage-a2: #f0f2f108;--sage-a3: #f3f5f412;--sage-a4: #f2fefd1a;--sage-a5: #f1fbfa22;--sage-a6: #edfbf42d;--sage-a7: #edfcf73c;--sage-a8: #ebfdf657;--sage-a9: #dffdf266;--sage-a10: #e5fdf674;--sage-a11: #f4fefbb0;--sage-a12: #fdfffeed;--olive-1: #111210;--olive-2: #181917;--olive-3: #212220;--olive-4: #282a27;--olive-5: #2f312e;--olive-6: #383a36;--olive-7: #454843;--olive-8: #5c625b;--olive-9: #687066;--olive-10: #767d74;--olive-11: #afb5ad;--olive-12: #eceeec;--olive-a1: #00000000;--olive-a2: #f1f2f008;--olive-a3: #f4f5f312;--olive-a4: #f3fef21a;--olive-a5: #f2fbf122;--olive-a6: #f4faed2c;--olive-a7: #f2fced3b;--olive-a8: #edfdeb57;--olive-a9: #ebfde766;--olive-a10: #f0fdec74;--olive-a11: #f6fef4b0;--olive-a12: #fdfffded;--sand-1: #111110;--sand-2: #191918;--sand-3: #222221;--sand-4: #2a2a28;--sand-5: #31312e;--sand-6: #3b3a37;--sand-7: #494844;--sand-8: #62605b;--sand-9: #6f6d66;--sand-10: #7c7b74;--sand-11: #b5b3ad;--sand-12: #eeeeec;--sand-a1: #00000000;--sand-a2: #f4f4f309;--sand-a3: #f6f6f513;--sand-a4: #fefef31b;--sand-a5: #fbfbeb23;--sand-a6: #fffaed2d;--sand-a7: #fffbed3c;--sand-a8: #fff9eb57;--sand-a9: #fffae965;--sand-a10: #fffdee73;--sand-a11: #fffcf4b0;--sand-a12: #fffffded;--amber-1: #16120c;--amber-2: #1d180f;--amber-3: #302008;--amber-4: #3f2700;--amber-5: #4d3000;--amber-6: #5c3d05;--amber-7: #714f19;--amber-8: #8f6424;--amber-9: #ffc53d;--amber-10: #ffd60a;--amber-11: #ffca16;--amber-12: #ffe7b3;--amber-a1: #e63c0006;--amber-a2: #fd9b000d;--amber-a3: #fa820022;--amber-a4: #fc820032;--amber-a5: #fd8b0041;--amber-a6: #fd9b0051;--amber-a7: #ffab2567;--amber-a8: #ffae3587;--amber-a9: #ffc53d;--amber-a10: #ffd60a;--amber-a11: #ffca16;--amber-a12: #ffe7b3;--blue-1: #0d1520;--blue-2: #111927;--blue-3: #0d2847;--blue-4: #003362;--blue-5: #004074;--blue-6: #104d87;--blue-7: #205d9e;--blue-8: #2870bd;--blue-9: #0090ff;--blue-10: #3b9eff;--blue-11: #70b8ff;--blue-12: #c2e6ff;--blue-a1: #004df211;--blue-a2: #1166fb18;--blue-a3: #0077ff3a;--blue-a4: #0075ff57;--blue-a5: #0081fd6b;--blue-a6: #0f89fd7f;--blue-a7: #2a91fe98;--blue-a8: #3094feb9;--blue-a9: #0090ff;--blue-a10: #3b9eff;--blue-a11: #70b8ff;--blue-a12: #c2e6ff;--bronze-1: #141110;--bronze-2: #1c1917;--bronze-3: #262220;--bronze-4: #302a27;--bronze-5: #3b3330;--bronze-6: #493e3a;--bronze-7: #5a4c47;--bronze-8: #6f5f58;--bronze-9: #a18072;--bronze-10: #ae8c7e;--bronze-11: #d4b3a5;--bronze-12: #ede0d9;--bronze-a1: #d1110004;--bronze-a2: #fbbc910c;--bronze-a3: #faceb817;--bronze-a4: #facdb622;--bronze-a5: #ffd2c12d;--bronze-a6: #ffd1c03c;--bronze-a7: #fdd0c04f;--bronze-a8: #ffd6c565;--bronze-a9: #fec7b09b;--bronze-a10: #fecab5a9;--bronze-a11: #ffd7c6d1;--bronze-a12: #fff1e9ec;--brown-1: #12110f;--brown-2: #1c1816;--brown-3: #28211d;--brown-4: #322922;--brown-5: #3e3128;--brown-6: #4d3c2f;--brown-7: #614a39;--brown-8: #7c5f46;--brown-9: #ad7f58;--brown-10: #b88c67;--brown-11: #dbb594;--brown-12: #f2e1ca;--brown-a1: #91110002;--brown-a2: #fba67c0c;--brown-a3: #fcb58c19;--brown-a4: #fbbb8a24;--brown-a5: #fcb88931;--brown-a6: #fdba8741;--brown-a7: #ffbb8856;--brown-a8: #ffbe8773;--brown-a9: #feb87da8;--brown-a10: #ffc18cb3;--brown-a11: #fed1aad9;--brown-a12: #feecd4f2;--crimson-1: #191114;--crimson-2: #201318;--crimson-3: #381525;--crimson-4: #4d122f;--crimson-5: #5c1839;--crimson-6: #6d2545;--crimson-7: #873356;--crimson-8: #b0436e;--crimson-9: #e93d82;--crimson-10: #ee518a;--crimson-11: #ff92ad;--crimson-12: #fdd3e8;--crimson-a1: #f4126709;--crimson-a2: #f22f7a11;--crimson-a3: #fe2a8b2a;--crimson-a4: #fd158741;--crimson-a5: #fd278f51;--crimson-a6: #fe459763;--crimson-a7: #fd559b7f;--crimson-a8: #fe5b9bab;--crimson-a9: #fe418de8;--crimson-a10: #ff5693ed;--crimson-a11: #ff92ad;--crimson-a12: #ffd5eafd;--cyan-1: #0b161a;--cyan-2: #101b20;--cyan-3: #082c36;--cyan-4: #003848;--cyan-5: #004558;--cyan-6: #045468;--cyan-7: #12677e;--cyan-8: #11809c;--cyan-9: #00a2c7;--cyan-10: #23afd0;--cyan-11: #4ccce6;--cyan-12: #b6ecf7;--cyan-a1: #0091f70a;--cyan-a2: #02a7f211;--cyan-a3: #00befd28;--cyan-a4: #00baff3b;--cyan-a5: #00befd4d;--cyan-a6: #00c7fd5e;--cyan-a7: #14cdff75;--cyan-a8: #11cfff95;--cyan-a9: #00cfffc3;--cyan-a10: #28d6ffcd;--cyan-a11: #52e1fee5;--cyan-a12: #bbf3fef7;--gold-1: #121211;--gold-2: #1b1a17;--gold-3: #24231f;--gold-4: #2d2b26;--gold-5: #38352e;--gold-6: #444039;--gold-7: #544f46;--gold-8: #696256;--gold-9: #978365;--gold-10: #a39073;--gold-11: #cbb99f;--gold-12: #e8e2d9;--gold-a1: #91911102;--gold-a2: #f9e29d0b;--gold-a3: #f8ecbb15;--gold-a4: #ffeec41e;--gold-a5: #feecc22a;--gold-a6: #feebcb37;--gold-a7: #ffedcd48;--gold-a8: #fdeaca5f;--gold-a9: #ffdba690;--gold-a10: #fedfb09d;--gold-a11: #fee7c6c8;--gold-a12: #fef7ede7;--grass-1: #0e1511;--grass-2: #141a15;--grass-3: #1b2a1e;--grass-4: #1d3a24;--grass-5: #25482d;--grass-6: #2d5736;--grass-7: #366740;--grass-8: #3e7949;--grass-9: #46a758;--grass-10: #53b365;--grass-11: #71d083;--grass-12: #c2f0c2;--grass-a1: #00de1205;--grass-a2: #5ef7780a;--grass-a3: #70fe8c1b;--grass-a4: #57ff802c;--grass-a5: #68ff8b3b;--grass-a6: #71ff8f4b;--grass-a7: #77fd925d;--grass-a8: #77fd9070;--grass-a9: #65ff82a1;--grass-a10: #72ff8dae;--grass-a11: #89ff9fcd;--grass-a12: #ceffceef;--green-1: #0e1512;--green-2: #121b17;--green-3: #132d21;--green-4: #113b29;--green-5: #174933;--green-6: #20573e;--green-7: #28684a;--green-8: #2f7c57;--green-9: #30a46c;--green-10: #33b074;--green-11: #3dd68c;--green-12: #b1f1cb;--green-a1: #00de4505;--green-a2: #29f99d0b;--green-a3: #22ff991e;--green-a4: #11ff992d;--green-a5: #2bffa23c;--green-a6: #44ffaa4b;--green-a7: #50fdac5e;--green-a8: #54ffad73;--green-a9: #44ffa49e;--green-a10: #43fea4ab;--green-a11: #46fea5d4;--green-a12: #bbffd7f0;--indigo-1: #11131f;--indigo-2: #141726;--indigo-3: #182449;--indigo-4: #1d2e62;--indigo-5: #253974;--indigo-6: #304384;--indigo-7: #3a4f97;--indigo-8: #435db1;--indigo-9: #3e63dd;--indigo-10: #5472e4;--indigo-11: #9eb1ff;--indigo-12: #d6e1ff;--indigo-a1: #1133ff0f;--indigo-a2: #3354fa17;--indigo-a3: #2f62ff3c;--indigo-a4: #3566ff57;--indigo-a5: #4171fd6b;--indigo-a6: #5178fd7c;--indigo-a7: #5a7fff90;--indigo-a8: #5b81feac;--indigo-a9: #4671ffdb;--indigo-a10: #5c7efee3;--indigo-a11: #9eb1ff;--indigo-a12: #d6e1ff;--iris-1: #13131e;--iris-2: #171625;--iris-3: #202248;--iris-4: #262a65;--iris-5: #303374;--iris-6: #3d3e82;--iris-7: #4a4a95;--iris-8: #5958b1;--iris-9: #5b5bd6;--iris-10: #6e6ade;--iris-11: #b1a9ff;--iris-12: #e0dffe;--iris-a1: #3636fe0e;--iris-a2: #564bf916;--iris-a3: #525bff3b;--iris-a4: #4d58ff5a;--iris-a5: #5b62fd6b;--iris-a6: #6d6ffd7a;--iris-a7: #7777fe8e;--iris-a8: #7b7afeac;--iris-a9: #6a6afed4;--iris-a10: #7d79ffdc;--iris-a11: #b1a9ff;--iris-a12: #e1e0fffe;--jade-1: #0d1512;--jade-2: #121c18;--jade-3: #0f2e22;--jade-4: #0b3b2c;--jade-5: #114837;--jade-6: #1b5745;--jade-7: #246854;--jade-8: #2a7e68;--jade-9: #29a383;--jade-10: #27b08b;--jade-11: #1fd8a4;--jade-12: #adf0d4;--jade-a1: #00de4505;--jade-a2: #27fba60c;--jade-a3: #02f99920;--jade-a4: #00ffaa2d;--jade-a5: #11ffb63b;--jade-a6: #34ffc24b;--jade-a7: #45fdc75e;--jade-a8: #48ffcf75;--jade-a9: #38feca9d;--jade-a10: #31fec7ab;--jade-a11: #21fec0d6;--jade-a12: #b8ffe1ef;--lime-1: #11130c;--lime-2: #151a10;--lime-3: #1f2917;--lime-4: #29371d;--lime-5: #334423;--lime-6: #3d522a;--lime-7: #496231;--lime-8: #577538;--lime-9: #bdee63;--lime-10: #d4ff70;--lime-11: #bde56c;--lime-12: #e3f7ba;--lime-a1: #11bb0003;--lime-a2: #78f7000a;--lime-a3: #9bfd4c1a;--lime-a4: #a7fe5c29;--lime-a5: #affe6537;--lime-a6: #b2fe6d46;--lime-a7: #b6ff6f57;--lime-a8: #b6fd6d6c;--lime-a9: #caff69ed;--lime-a10: #d4ff70;--lime-a11: #d1fe77e4;--lime-a12: #e9febff7;--mint-1: #0e1515;--mint-2: #0f1b1b;--mint-3: #092c2b;--mint-4: #003a38;--mint-5: #004744;--mint-6: #105650;--mint-7: #1e685f;--mint-8: #277f70;--mint-9: #86ead4;--mint-10: #a8f5e5;--mint-11: #58d5ba;--mint-12: #c4f5e1;--mint-a1: #00dede05;--mint-a2: #00f9f90b;--mint-a3: #00fff61d;--mint-a4: #00fff42c;--mint-a5: #00fff23a;--mint-a6: #0effeb4a;--mint-a7: #34fde55e;--mint-a8: #41ffdf76;--mint-a9: #92ffe7e9;--mint-a10: #aefeedf5;--mint-a11: #67ffded2;--mint-a12: #cbfee9f5;--orange-1: #17120e;--orange-2: #1e160f;--orange-3: #331e0b;--orange-4: #462100;--orange-5: #562800;--orange-6: #66350c;--orange-7: #7e451d;--orange-8: #a35829;--orange-9: #f76b15;--orange-10: #ff801f;--orange-11: #ffa057;--orange-12: #ffe0c2;--orange-a1: #ec360007;--orange-a2: #fe6d000e;--orange-a3: #fb6a0025;--orange-a4: #ff590039;--orange-a5: #ff61004a;--orange-a6: #fd75045c;--orange-a7: #ff832c75;--orange-a8: #fe84389d;--orange-a9: #fe6d15f7;--orange-a10: #ff801f;--orange-a11: #ffa057;--orange-a12: #ffe0c2;--pink-1: #191117;--pink-2: #21121d;--pink-3: #37172f;--pink-4: #4b143d;--pink-5: #591c47;--pink-6: #692955;--pink-7: #833869;--pink-8: #a84885;--pink-9: #d6409f;--pink-10: #de51a8;--pink-11: #ff8dcc;--pink-12: #fdd1ea;--pink-a1: #f412bc09;--pink-a2: #f420bb12;--pink-a3: #fe37cc29;--pink-a4: #fc1ec43f;--pink-a5: #fd35c24e;--pink-a6: #fd51c75f;--pink-a7: #fd62c87b;--pink-a8: #ff68c8a2;--pink-a9: #fe49bcd4;--pink-a10: #ff5cc0dc;--pink-a11: #ff8dcc;--pink-a12: #ffd3ecfd;--plum-1: #181118;--plum-2: #201320;--plum-3: #351a35;--plum-4: #451d47;--plum-5: #512454;--plum-6: #5e3061;--plum-7: #734079;--plum-8: #92549c;--plum-9: #ab4aba;--plum-10: #b658c4;--plum-11: #e796f3;--plum-12: #f4d4f4;--plum-a1: #f112f108;--plum-a2: #f22ff211;--plum-a3: #fd4cfd27;--plum-a4: #f646ff3a;--plum-a5: #f455ff48;--plum-a6: #f66dff56;--plum-a7: #f07cfd70;--plum-a8: #ee84ff95;--plum-a9: #e961feb6;--plum-a10: #ed70ffc0;--plum-a11: #f19cfef3;--plum-a12: #feddfef4;--purple-1: #18111b;--purple-2: #1e1523;--purple-3: #301c3b;--purple-4: #3d224e;--purple-5: #48295c;--purple-6: #54346b;--purple-7: #664282;--purple-8: #8457aa;--purple-9: #8e4ec6;--purple-10: #9a5cd0;--purple-11: #d19dff;--purple-12: #ecd9fa;--purple-a1: #b412f90b;--purple-a2: #b744f714;--purple-a3: #c150ff2d;--purple-a4: #bb53fd42;--purple-a5: #be5cfd51;--purple-a6: #c16dfd61;--purple-a7: #c378fd7a;--purple-a8: #c47effa4;--purple-a9: #b661ffc2;--purple-a10: #bc6fffcd;--purple-a11: #d19dff;--purple-a12: #f1ddfffa;--red-1: #191111;--red-2: #201314;--red-3: #3b1219;--red-4: #500f1c;--red-5: #611623;--red-6: #72232d;--red-7: #8c333a;--red-8: #b54548;--red-9: #e5484d;--red-10: #ec5d5e;--red-11: #ff9592;--red-12: #ffd1d9;--red-a1: #f4121209;--red-a2: #f22f3e11;--red-a3: #ff173f2d;--red-a4: #fe0a3b44;--red-a5: #ff204756;--red-a6: #ff3e5668;--red-a7: #ff536184;--red-a8: #ff5d61b0;--red-a9: #fe4e54e4;--red-a10: #ff6465eb;--red-a11: #ff9592;--red-a12: #ffd1d9;--ruby-1: #191113;--ruby-2: #1e1517;--ruby-3: #3a141e;--ruby-4: #4e1325;--ruby-5: #5e1a2e;--ruby-6: #6f2539;--ruby-7: #883447;--ruby-8: #b3445a;--ruby-9: #e54666;--ruby-10: #ec5a72;--ruby-11: #ff949d;--ruby-12: #fed2e1;--ruby-a1: #f4124a09;--ruby-a2: #fe5a7f0e;--ruby-a3: #ff235d2c;--ruby-a4: #fd195e42;--ruby-a5: #fe2d6b53;--ruby-a6: #ff447665;--ruby-a7: #ff577d80;--ruby-a8: #ff5c7cae;--ruby-a9: #fe4c70e4;--ruby-a10: #ff617beb;--ruby-a11: #ff949d;--ruby-a12: #ffd3e2fe;--sky-1: #0d141f;--sky-2: #111a27;--sky-3: #112840;--sky-4: #113555;--sky-5: #154467;--sky-6: #1b537b;--sky-7: #1f6692;--sky-8: #197cae;--sky-9: #7ce2fe;--sky-10: #a8eeff;--sky-11: #75c7f0;--sky-12: #c2f3ff;--sky-a1: #0044ff0f;--sky-a2: #1171fb18;--sky-a3: #1184fc33;--sky-a4: #128fff49;--sky-a5: #1c9dfd5d;--sky-a6: #28a5ff72;--sky-a7: #2badfe8b;--sky-a8: #1db2fea9;--sky-a9: #7ce3fffe;--sky-a10: #a8eeff;--sky-a11: #7cd3ffef;--sky-a12: #c2f3ff;--teal-1: #0d1514;--teal-2: #111c1b;--teal-3: #0d2d2a;--teal-4: #023b37;--teal-5: #084843;--teal-6: #145750;--teal-7: #1c6961;--teal-8: #207e73;--teal-9: #12a594;--teal-10: #0eb39e;--teal-11: #0bd8b6;--teal-12: #adf0dd;--teal-a1: #00deab05;--teal-a2: #12fbe60c;--teal-a3: #00ffe61e;--teal-a4: #00ffe92d;--teal-a5: #00ffea3b;--teal-a6: #1cffe84b;--teal-a7: #2efde85f;--teal-a8: #32ffe775;--teal-a9: #13ffe49f;--teal-a10: #0dffe0ae;--teal-a11: #0afed5d6;--teal-a12: #b8ffebef;--tomato-1: #181111;--tomato-2: #1f1513;--tomato-3: #391714;--tomato-4: #4e1511;--tomato-5: #5e1c16;--tomato-6: #6e2920;--tomato-7: #853a2d;--tomato-8: #ac4d39;--tomato-9: #e54d2e;--tomato-10: #ec6142;--tomato-11: #ff977d;--tomato-12: #fbd3cb;--tomato-a1: #f1121208;--tomato-a2: #ff55330f;--tomato-a3: #ff35232b;--tomato-a4: #fd201142;--tomato-a5: #fe332153;--tomato-a6: #ff4f3864;--tomato-a7: #fd644a7d;--tomato-a8: #fe6d4ea7;--tomato-a9: #fe5431e4;--tomato-a10: #ff6847eb;--tomato-a11: #ff977d;--tomato-a12: #ffd6cefb;--violet-1: #14121f;--violet-2: #1b1525;--violet-3: #291f43;--violet-4: #33255b;--violet-5: #3c2e69;--violet-6: #473876;--violet-7: #56468b;--violet-8: #6958ad;--violet-9: #6e56cf;--violet-10: #7d66d9;--violet-11: #baa7ff;--violet-12: #e2ddfe;--violet-a1: #4422ff0f;--violet-a2: #853ff916;--violet-a3: #8354fe36;--violet-a4: #7d51fd50;--violet-a5: #845ffd5f;--violet-a6: #8f6cfd6d;--violet-a7: #9879ff83;--violet-a8: #977dfea8;--violet-a9: #8668ffcc;--violet-a10: #9176fed7;--violet-a11: #baa7ff;--violet-a12: #e3defffe;--yellow-1: #14120b;--yellow-2: #1b180f;--yellow-3: #2d2305;--yellow-4: #362b00;--yellow-5: #433500;--yellow-6: #524202;--yellow-7: #665417;--yellow-8: #836a21;--yellow-9: #ffe629;--yellow-10: #ffff57;--yellow-11: #f5e147;--yellow-12: #f6eeb4;--yellow-a1: #d1510004;--yellow-a2: #f9b4000b;--yellow-a3: #ffaa001e;--yellow-a4: #fdb70028;--yellow-a5: #febb0036;--yellow-a6: #fec40046;--yellow-a7: #fdcb225c;--yellow-a8: #fdca327b;--yellow-a9: #ffe629;--yellow-a10: #ffff57;--yellow-a11: #fee949f5;--yellow-a12: #fef6baf6;--gray-surface: #21212180;--gray-indicator: var(--gray-9);--gray-track: var(--gray-9);--mauve-surface: #22212380;--mauve-indicator: var(--mauve-9);--mauve-track: var(--mauve-9);--slate-surface: #1f212380;--slate-indicator: var(--slate-9);--slate-track: var(--slate-9);--sage-surface: #1e201f80;--sage-indicator: var(--sage-9);--sage-track: var(--sage-9);--olive-surface: #1f201e80;--olive-indicator: var(--olive-9);--olive-track: var(--olive-9);--sand-surface: #21212080;--sand-indicator: var(--sand-9);--sand-track: var(--sand-9);--amber-surface: #271f1380;--amber-indicator: var(--amber-9);--amber-track: var(--amber-9);--blue-surface: #11213d80;--blue-indicator: var(--blue-9);--blue-track: var(--blue-9);--bronze-surface: #27211d80;--bronze-indicator: var(--bronze-9);--bronze-track: var(--bronze-9);--brown-surface: #271f1b80;--brown-indicator: var(--brown-9);--brown-track: var(--brown-9);--crimson-surface: #2f151f80;--crimson-indicator: var(--crimson-9);--crimson-track: var(--crimson-9);--cyan-surface: #11252d80;--cyan-indicator: var(--cyan-9);--cyan-track: var(--cyan-9);--gold-surface: #25231d80;--gold-indicator: var(--gold-9);--gold-track: var(--gold-9);--grass-surface: #19231b80;--grass-indicator: var(--grass-9);--grass-track: var(--grass-9);--green-surface: #15251d80;--green-indicator: var(--green-9);--green-track: var(--green-9);--indigo-surface: #171d3b80;--indigo-indicator: var(--indigo-9);--indigo-track: var(--indigo-9);--iris-surface: #1d1b3980;--iris-indicator: var(--iris-9);--iris-track: var(--iris-9);--jade-surface: #13271f80;--jade-indicator: var(--jade-9);--jade-track: var(--jade-9);--lime-surface: #1b211580;--lime-indicator: var(--lime-9);--lime-track: var(--lime-9);--mint-surface: #15272780;--mint-indicator: var(--mint-9);--mint-track: var(--mint-9);--orange-surface: #271d1380;--orange-indicator: var(--orange-9);--orange-track: var(--orange-9);--pink-surface: #31132980;--pink-indicator: var(--pink-9);--pink-track: var(--pink-9);--plum-surface: #2f152f80;--plum-indicator: var(--plum-9);--plum-track: var(--plum-9);--purple-surface: #2b173580;--purple-indicator: var(--purple-9);--purple-track: var(--purple-9);--red-surface: #2f151780;--red-indicator: var(--red-9);--red-track: var(--red-9);--ruby-surface: #2b191d80;--ruby-indicator: var(--ruby-9);--ruby-track: var(--ruby-9);--sky-surface: #13233b80;--sky-indicator: var(--sky-9);--sky-track: var(--sky-9);--teal-surface: #13272580;--teal-indicator: var(--teal-9);--teal-track: var(--teal-9);--tomato-surface: #2d191580;--tomato-indicator: var(--tomato-9);--tomato-track: var(--tomato-9);--violet-surface: #25193980;--violet-indicator: var(--violet-9);--violet-track: var(--violet-9);--yellow-surface: #231f1380;--yellow-indicator: var(--yellow-9);--yellow-track: var(--yellow-9)}@supports (color: color(display-p3 1 1 1)){@media (color-gamut: p3){.dark,.dark-theme{--gray-1: color(display-p3 .067 .067 .067);--gray-2: color(display-p3 .098 .098 .098);--gray-3: color(display-p3 .135 .135 .135);--gray-4: color(display-p3 .163 .163 .163);--gray-5: color(display-p3 .192 .192 .192);--gray-6: color(display-p3 .228 .228 .228);--gray-7: color(display-p3 .283 .283 .283);--gray-8: color(display-p3 .375 .375 .375);--gray-9: color(display-p3 .431 .431 .431);--gray-10: color(display-p3 .484 .484 .484);--gray-11: color(display-p3 .706 .706 .706);--gray-12: color(display-p3 .933 .933 .933);--gray-a1: color(display-p3 0 0 0 / 0);--gray-a2: color(display-p3 1 1 1 / .034);--gray-a3: color(display-p3 1 1 1 / .071);--gray-a4: color(display-p3 1 1 1 / .105);--gray-a5: color(display-p3 1 1 1 / .134);--gray-a6: color(display-p3 1 1 1 / .172);--gray-a7: color(display-p3 1 1 1 / .231);--gray-a8: color(display-p3 1 1 1 / .332);--gray-a9: color(display-p3 1 1 1 / .391);--gray-a10: color(display-p3 1 1 1 / .445);--gray-a11: color(display-p3 1 1 1 / .685);--gray-a12: color(display-p3 1 1 1 / .929);--mauve-1: color(display-p3 .07 .067 .074);--mauve-2: color(display-p3 .101 .098 .105);--mauve-3: color(display-p3 .138 .134 .144);--mauve-4: color(display-p3 .167 .161 .175);--mauve-5: color(display-p3 .196 .189 .206);--mauve-6: color(display-p3 .232 .225 .245);--mauve-7: color(display-p3 .286 .277 .302);--mauve-8: color(display-p3 .383 .373 .408);--mauve-9: color(display-p3 .434 .428 .467);--mauve-10: color(display-p3 .487 .48 .519);--mauve-11: color(display-p3 .707 .7 .735);--mauve-12: color(display-p3 .933 .933 .94);--mauve-a1: color(display-p3 0 0 0 / 0);--mauve-a2: color(display-p3 .996 .992 1 / .034);--mauve-a3: color(display-p3 .937 .933 .992 / .077);--mauve-a4: color(display-p3 .957 .918 .996 / .111);--mauve-a5: color(display-p3 .937 .906 .996 / .145);--mauve-a6: color(display-p3 .953 .925 .996 / .183);--mauve-a7: color(display-p3 .945 .929 1 / .246);--mauve-a8: color(display-p3 .937 .918 1 / .361);--mauve-a9: color(display-p3 .933 .918 1 / .424);--mauve-a10: color(display-p3 .941 .925 1 / .479);--mauve-a11: color(display-p3 .965 .961 1 / .712);--mauve-a12: color(display-p3 .992 .992 1 / .937);--slate-1: color(display-p3 .067 .067 .074);--slate-2: color(display-p3 .095 .098 .105);--slate-3: color(display-p3 .13 .135 .145);--slate-4: color(display-p3 .156 .163 .176);--slate-5: color(display-p3 .183 .191 .206);--slate-6: color(display-p3 .215 .226 .244);--slate-7: color(display-p3 .265 .28 .302);--slate-8: color(display-p3 .357 .381 .409);--slate-9: color(display-p3 .415 .431 .463);--slate-10: color(display-p3 .469 .483 .514);--slate-11: color(display-p3 .692 .704 .728);--slate-12: color(display-p3 .93 .933 .94);--slate-a1: color(display-p3 0 0 0 / 0);--slate-a2: color(display-p3 .875 .992 1 / .034);--slate-a3: color(display-p3 .882 .933 .992 / .077);--slate-a4: color(display-p3 .882 .953 .996 / .111);--slate-a5: color(display-p3 .878 .929 .996 / .145);--slate-a6: color(display-p3 .882 .949 .996 / .183);--slate-a7: color(display-p3 .882 .929 1 / .246);--slate-a8: color(display-p3 .871 .937 1 / .361);--slate-a9: color(display-p3 .898 .937 1 / .42);--slate-a10: color(display-p3 .918 .945 1 / .475);--slate-a11: color(display-p3 .949 .969 .996 / .708);--slate-a12: color(display-p3 .988 .992 1 / .937);--sage-1: color(display-p3 .064 .07 .067);--sage-2: color(display-p3 .092 .098 .094);--sage-3: color(display-p3 .128 .135 .131);--sage-4: color(display-p3 .155 .164 .159);--sage-5: color(display-p3 .183 .193 .188);--sage-6: color(display-p3 .218 .23 .224);--sage-7: color(display-p3 .269 .285 .277);--sage-8: color(display-p3 .362 .382 .373);--sage-9: color(display-p3 .398 .438 .421);--sage-10: color(display-p3 .453 .49 .474);--sage-11: color(display-p3 .685 .709 .697);--sage-12: color(display-p3 .927 .933 .93);--sage-a1: color(display-p3 0 0 0 / 0);--sage-a2: color(display-p3 .976 .988 .984 / .03);--sage-a3: color(display-p3 .992 .945 .941 / .072);--sage-a4: color(display-p3 .988 .996 .992 / .102);--sage-a5: color(display-p3 .992 1 .996 / .131);--sage-a6: color(display-p3 .973 1 .976 / .173);--sage-a7: color(display-p3 .957 1 .976 / .233);--sage-a8: color(display-p3 .957 1 .984 / .334);--sage-a9: color(display-p3 .902 1 .957 / .397);--sage-a10: color(display-p3 .929 1 .973 / .452);--sage-a11: color(display-p3 .969 1 .988 / .688);--sage-a12: color(display-p3 .992 1 .996 / .929);--olive-1: color(display-p3 .067 .07 .063);--olive-2: color(display-p3 .095 .098 .091);--olive-3: color(display-p3 .131 .135 .126);--olive-4: color(display-p3 .158 .163 .153);--olive-5: color(display-p3 .186 .192 .18);--olive-6: color(display-p3 .221 .229 .215);--olive-7: color(display-p3 .273 .284 .266);--olive-8: color(display-p3 .365 .382 .359);--olive-9: color(display-p3 .414 .438 .404);--olive-10: color(display-p3 .467 .49 .458);--olive-11: color(display-p3 .69 .709 .682);--olive-12: color(display-p3 .927 .933 .926);--olive-a1: color(display-p3 0 0 0 / 0);--olive-a2: color(display-p3 .984 .988 .976 / .03);--olive-a3: color(display-p3 .992 .996 .988 / .068);--olive-a4: color(display-p3 .953 .996 .949 / .102);--olive-a5: color(display-p3 .969 1 .965 / .131);--olive-a6: color(display-p3 .973 1 .969 / .169);--olive-a7: color(display-p3 .98 1 .961 / .228);--olive-a8: color(display-p3 .961 1 .957 / .334);--olive-a9: color(display-p3 .949 1 .922 / .397);--olive-a10: color(display-p3 .953 1 .941 / .452);--olive-a11: color(display-p3 .976 1 .965 / .688);--olive-a12: color(display-p3 .992 1 .992 / .929);--sand-1: color(display-p3 .067 .067 .063);--sand-2: color(display-p3 .098 .098 .094);--sand-3: color(display-p3 .135 .135 .129);--sand-4: color(display-p3 .164 .163 .156);--sand-5: color(display-p3 .193 .192 .183);--sand-6: color(display-p3 .23 .229 .217);--sand-7: color(display-p3 .285 .282 .267);--sand-8: color(display-p3 .384 .378 .357);--sand-9: color(display-p3 .434 .428 .403);--sand-10: color(display-p3 .487 .481 .456);--sand-11: color(display-p3 .707 .703 .68);--sand-12: color(display-p3 .933 .933 .926);--sand-a1: color(display-p3 0 0 0 / 0);--sand-a2: color(display-p3 .992 .992 .988 / .034);--sand-a3: color(display-p3 .996 .996 .992 / .072);--sand-a4: color(display-p3 .992 .992 .953 / .106);--sand-a5: color(display-p3 1 1 .965 / .135);--sand-a6: color(display-p3 1 .976 .929 / .177);--sand-a7: color(display-p3 1 .984 .929 / .236);--sand-a8: color(display-p3 1 .976 .925 / .341);--sand-a9: color(display-p3 1 .98 .925 / .395);--sand-a10: color(display-p3 1 .992 .933 / .45);--sand-a11: color(display-p3 1 .996 .961 / .685);--sand-a12: color(display-p3 1 1 .992 / .929);--amber-1: color(display-p3 .082 .07 .05);--amber-2: color(display-p3 .111 .094 .064);--amber-3: color(display-p3 .178 .128 .049);--amber-4: color(display-p3 .239 .156 0);--amber-5: color(display-p3 .29 .193 0);--amber-6: color(display-p3 .344 .245 .076);--amber-7: color(display-p3 .422 .314 .141);--amber-8: color(display-p3 .535 .399 .189);--amber-9: color(display-p3 1 .77 .26);--amber-10: color(display-p3 1 .87 .15);--amber-11: color(display-p3 1 .8 .29);--amber-12: color(display-p3 .984 .909 .726);--amber-a1: color(display-p3 .992 .298 0 / .017);--amber-a2: color(display-p3 .988 .651 0 / .047);--amber-a3: color(display-p3 1 .6 0 / .118);--amber-a4: color(display-p3 1 .557 0 / .185);--amber-a5: color(display-p3 1 .592 0 / .24);--amber-a6: color(display-p3 1 .659 .094 / .299);--amber-a7: color(display-p3 1 .714 .263 / .383);--amber-a8: color(display-p3 .996 .729 .306 / .5);--amber-a9: color(display-p3 1 .769 .259);--amber-a10: color(display-p3 1 .871 .149);--amber-a11: color(display-p3 1 .8 .29);--amber-a12: color(display-p3 .984 .909 .726);--blue-1: color(display-p3 .057 .081 .122);--blue-2: color(display-p3 .072 .098 .147);--blue-3: color(display-p3 .078 .154 .27);--blue-4: color(display-p3 .033 .197 .37);--blue-5: color(display-p3 .08 .245 .441);--blue-6: color(display-p3 .14 .298 .511);--blue-7: color(display-p3 .195 .361 .6);--blue-8: color(display-p3 .239 .434 .72);--blue-9: color(display-p3 .247 .556 .969);--blue-10: color(display-p3 .344 .612 .973);--blue-11: color(display-p3 .49 .72 1);--blue-12: color(display-p3 .788 .898 .99);--blue-a1: color(display-p3 0 .333 1 / .059);--blue-a2: color(display-p3 .114 .435 .988 / .085);--blue-a3: color(display-p3 .122 .463 1 / .219);--blue-a4: color(display-p3 0 .467 1 / .324);--blue-a5: color(display-p3 .098 .51 1 / .4);--blue-a6: color(display-p3 .224 .557 1 / .475);--blue-a7: color(display-p3 .294 .584 1 / .572);--blue-a8: color(display-p3 .314 .592 1 / .702);--blue-a9: color(display-p3 .251 .573 .996 / .967);--blue-a10: color(display-p3 .357 .631 1 / .971);--blue-a11: color(display-p3 .49 .72 1);--blue-a12: color(display-p3 .788 .898 .99);--bronze-1: color(display-p3 .076 .067 .063);--bronze-2: color(display-p3 .106 .097 .093);--bronze-3: color(display-p3 .147 .132 .125);--bronze-4: color(display-p3 .185 .166 .156);--bronze-5: color(display-p3 .227 .202 .19);--bronze-6: color(display-p3 .278 .246 .23);--bronze-7: color(display-p3 .343 .302 .281);--bronze-8: color(display-p3 .426 .374 .347);--bronze-9: color(display-p3 .611 .507 .455);--bronze-10: color(display-p3 .66 .556 .504);--bronze-11: color(display-p3 .81 .707 .655);--bronze-12: color(display-p3 .921 .88 .854);--bronze-a1: color(display-p3 .941 .067 0 / .009);--bronze-a2: color(display-p3 .98 .8 .706 / .043);--bronze-a3: color(display-p3 .988 .851 .761 / .085);--bronze-a4: color(display-p3 .996 .839 .78 / .127);--bronze-a5: color(display-p3 .996 .863 .773 / .173);--bronze-a6: color(display-p3 1 .863 .796 / .227);--bronze-a7: color(display-p3 1 .867 .8 / .295);--bronze-a8: color(display-p3 1 .859 .788 / .387);--bronze-a9: color(display-p3 1 .82 .733 / .585);--bronze-a10: color(display-p3 1 .839 .761 / .635);--bronze-a11: color(display-p3 .81 .707 .655);--bronze-a12: color(display-p3 .921 .88 .854);--brown-1: color(display-p3 .071 .067 .059);--brown-2: color(display-p3 .107 .095 .087);--brown-3: color(display-p3 .151 .13 .115);--brown-4: color(display-p3 .191 .161 .138);--brown-5: color(display-p3 .235 .194 .162);--brown-6: color(display-p3 .291 .237 .192);--brown-7: color(display-p3 .365 .295 .232);--brown-8: color(display-p3 .469 .377 .287);--brown-9: color(display-p3 .651 .505 .368);--brown-10: color(display-p3 .697 .557 .423);--brown-11: color(display-p3 .835 .715 .597);--brown-12: color(display-p3 .938 .885 .802);--brown-a1: color(display-p3 .855 .071 0 / .005);--brown-a2: color(display-p3 .98 .706 .525 / .043);--brown-a3: color(display-p3 .996 .745 .576 / .093);--brown-a4: color(display-p3 1 .765 .592 / .135);--brown-a5: color(display-p3 1 .761 .588 / .181);--brown-a6: color(display-p3 1 .773 .592 / .24);--brown-a7: color(display-p3 .996 .776 .58 / .32);--brown-a8: color(display-p3 1 .78 .573 / .433);--brown-a9: color(display-p3 1 .769 .549 / .627);--brown-a10: color(display-p3 1 .792 .596 / .677);--brown-a11: color(display-p3 .835 .715 .597);--brown-a12: color(display-p3 .938 .885 .802);--crimson-1: color(display-p3 .093 .068 .078);--crimson-2: color(display-p3 .117 .078 .095);--crimson-3: color(display-p3 .203 .091 .143);--crimson-4: color(display-p3 .277 .087 .182);--crimson-5: color(display-p3 .332 .115 .22);--crimson-6: color(display-p3 .394 .162 .268);--crimson-7: color(display-p3 .489 .222 .336);--crimson-8: color(display-p3 .638 .289 .429);--crimson-9: color(display-p3 .843 .298 .507);--crimson-10: color(display-p3 .864 .364 .539);--crimson-11: color(display-p3 1 .56 .66);--crimson-12: color(display-p3 .966 .834 .906);--crimson-a1: color(display-p3 .984 .071 .463 / .03);--crimson-a2: color(display-p3 .996 .282 .569 / .055);--crimson-a3: color(display-p3 .996 .227 .573 / .148);--crimson-a4: color(display-p3 1 .157 .569 / .227);--crimson-a5: color(display-p3 1 .231 .604 / .286);--crimson-a6: color(display-p3 1 .337 .643 / .349);--crimson-a7: color(display-p3 1 .416 .663 / .454);--crimson-a8: color(display-p3 .996 .427 .651 / .614);--crimson-a9: color(display-p3 1 .345 .596 / .832);--crimson-a10: color(display-p3 1 .42 .62 / .853);--crimson-a11: color(display-p3 1 .56 .66);--crimson-a12: color(display-p3 .966 .834 .906);--cyan-1: color(display-p3 .053 .085 .098);--cyan-2: color(display-p3 .072 .105 .122);--cyan-3: color(display-p3 .073 .168 .209);--cyan-4: color(display-p3 .063 .216 .277);--cyan-5: color(display-p3 .091 .267 .336);--cyan-6: color(display-p3 .137 .324 .4);--cyan-7: color(display-p3 .186 .398 .484);--cyan-8: color(display-p3 .23 .496 .6);--cyan-9: color(display-p3 .282 .627 .765);--cyan-10: color(display-p3 .331 .675 .801);--cyan-11: color(display-p3 .446 .79 .887);--cyan-12: color(display-p3 .757 .919 .962);--cyan-a1: color(display-p3 0 .647 .992 / .034);--cyan-a2: color(display-p3 .133 .733 1 / .059);--cyan-a3: color(display-p3 .122 .741 .996 / .152);--cyan-a4: color(display-p3 .051 .725 1 / .227);--cyan-a5: color(display-p3 .149 .757 1 / .29);--cyan-a6: color(display-p3 .267 .792 1 / .358);--cyan-a7: color(display-p3 .333 .808 1 / .446);--cyan-a8: color(display-p3 .357 .816 1 / .572);--cyan-a9: color(display-p3 .357 .82 1 / .748);--cyan-a10: color(display-p3 .4 .839 1 / .786);--cyan-a11: color(display-p3 .446 .79 .887);--cyan-a12: color(display-p3 .757 .919 .962);--gold-1: color(display-p3 .071 .071 .067);--gold-2: color(display-p3 .104 .101 .09);--gold-3: color(display-p3 .141 .136 .122);--gold-4: color(display-p3 .177 .17 .152);--gold-5: color(display-p3 .217 .207 .185);--gold-6: color(display-p3 .265 .252 .225);--gold-7: color(display-p3 .327 .31 .277);--gold-8: color(display-p3 .407 .384 .342);--gold-9: color(display-p3 .579 .517 .41);--gold-10: color(display-p3 .628 .566 .463);--gold-11: color(display-p3 .784 .728 .635);--gold-12: color(display-p3 .906 .887 .855);--gold-a1: color(display-p3 .855 .855 .071 / .005);--gold-a2: color(display-p3 .98 .89 .616 / .043);--gold-a3: color(display-p3 1 .949 .753 / .08);--gold-a4: color(display-p3 1 .933 .8 / .118);--gold-a5: color(display-p3 1 .949 .804 / .16);--gold-a6: color(display-p3 1 .925 .8 / .215);--gold-a7: color(display-p3 1 .945 .831 / .278);--gold-a8: color(display-p3 1 .937 .82 / .366);--gold-a9: color(display-p3 .996 .882 .69 / .551);--gold-a10: color(display-p3 1 .894 .725 / .601);--gold-a11: color(display-p3 .784 .728 .635);--gold-a12: color(display-p3 .906 .887 .855);--grass-1: color(display-p3 .062 .083 .067);--grass-2: color(display-p3 .083 .103 .085);--grass-3: color(display-p3 .118 .163 .122);--grass-4: color(display-p3 .142 .225 .15);--grass-5: color(display-p3 .178 .279 .186);--grass-6: color(display-p3 .217 .337 .224);--grass-7: color(display-p3 .258 .4 .264);--grass-8: color(display-p3 .302 .47 .305);--grass-9: color(display-p3 .38 .647 .378);--grass-10: color(display-p3 .426 .694 .426);--grass-11: color(display-p3 .535 .807 .542);--grass-12: color(display-p3 .797 .936 .776);--grass-a1: color(display-p3 0 .992 .071 / .017);--grass-a2: color(display-p3 .482 .996 .584 / .038);--grass-a3: color(display-p3 .549 .992 .588 / .106);--grass-a4: color(display-p3 .51 .996 .557 / .169);--grass-a5: color(display-p3 .553 1 .588 / .227);--grass-a6: color(display-p3 .584 1 .608 / .29);--grass-a7: color(display-p3 .604 1 .616 / .358);--grass-a8: color(display-p3 .608 1 .62 / .433);--grass-a9: color(display-p3 .573 1 .569 / .622);--grass-a10: color(display-p3 .6 .996 .6 / .673);--grass-a11: color(display-p3 .535 .807 .542);--grass-a12: color(display-p3 .797 .936 .776);--green-1: color(display-p3 .062 .083 .071);--green-2: color(display-p3 .079 .106 .09);--green-3: color(display-p3 .1 .173 .133);--green-4: color(display-p3 .115 .229 .166);--green-5: color(display-p3 .147 .282 .206);--green-6: color(display-p3 .185 .338 .25);--green-7: color(display-p3 .227 .403 .298);--green-8: color(display-p3 .27 .479 .351);--green-9: color(display-p3 .332 .634 .442);--green-10: color(display-p3 .357 .682 .474);--green-11: color(display-p3 .434 .828 .573);--green-12: color(display-p3 .747 .938 .807);--green-a1: color(display-p3 0 .992 .298 / .017);--green-a2: color(display-p3 .341 .98 .616 / .043);--green-a3: color(display-p3 .376 .996 .655 / .114);--green-a4: color(display-p3 .341 .996 .635 / .173);--green-a5: color(display-p3 .408 1 .678 / .232);--green-a6: color(display-p3 .475 1 .706 / .29);--green-a7: color(display-p3 .514 1 .706 / .362);--green-a8: color(display-p3 .529 1 .718 / .442);--green-a9: color(display-p3 .502 .996 .682 / .61);--green-a10: color(display-p3 .506 1 .682 / .66);--green-a11: color(display-p3 .434 .828 .573);--green-a12: color(display-p3 .747 .938 .807);--indigo-1: color(display-p3 .068 .074 .118);--indigo-2: color(display-p3 .081 .089 .144);--indigo-3: color(display-p3 .105 .141 .275);--indigo-4: color(display-p3 .129 .18 .369);--indigo-5: color(display-p3 .163 .22 .439);--indigo-6: color(display-p3 .203 .262 .5);--indigo-7: color(display-p3 .245 .309 .575);--indigo-8: color(display-p3 .285 .362 .674);--indigo-9: color(display-p3 .276 .384 .837);--indigo-10: color(display-p3 .354 .445 .866);--indigo-11: color(display-p3 .63 .69 1);--indigo-12: color(display-p3 .848 .881 .99);--indigo-a1: color(display-p3 .071 .212 .996 / .055);--indigo-a2: color(display-p3 .251 .345 .988 / .085);--indigo-a3: color(display-p3 .243 .404 1 / .223);--indigo-a4: color(display-p3 .263 .42 1 / .324);--indigo-a5: color(display-p3 .314 .451 1 / .4);--indigo-a6: color(display-p3 .361 .49 1 / .467);--indigo-a7: color(display-p3 .388 .51 1 / .547);--indigo-a8: color(display-p3 .404 .518 1 / .652);--indigo-a9: color(display-p3 .318 .451 1 / .824);--indigo-a10: color(display-p3 .404 .506 1 / .858);--indigo-a11: color(display-p3 .63 .69 1);--indigo-a12: color(display-p3 .848 .881 .99);--iris-1: color(display-p3 .075 .075 .114);--iris-2: color(display-p3 .089 .086 .14);--iris-3: color(display-p3 .128 .134 .272);--iris-4: color(display-p3 .153 .165 .382);--iris-5: color(display-p3 .192 .201 .44);--iris-6: color(display-p3 .239 .241 .491);--iris-7: color(display-p3 .291 .289 .565);--iris-8: color(display-p3 .35 .345 .673);--iris-9: color(display-p3 .357 .357 .81);--iris-10: color(display-p3 .428 .416 .843);--iris-11: color(display-p3 .685 .662 1);--iris-12: color(display-p3 .878 .875 .986);--iris-a1: color(display-p3 .224 .224 .992 / .051);--iris-a2: color(display-p3 .361 .314 1 / .08);--iris-a3: color(display-p3 .357 .373 1 / .219);--iris-a4: color(display-p3 .325 .361 1 / .337);--iris-a5: color(display-p3 .38 .4 1 / .4);--iris-a6: color(display-p3 .447 .447 1 / .454);--iris-a7: color(display-p3 .486 .486 1 / .534);--iris-a8: color(display-p3 .502 .494 1 / .652);--iris-a9: color(display-p3 .431 .431 1 / .799);--iris-a10: color(display-p3 .502 .486 1 / .832);--iris-a11: color(display-p3 .685 .662 1);--iris-a12: color(display-p3 .878 .875 .986);--jade-1: color(display-p3 .059 .083 .071);--jade-2: color(display-p3 .078 .11 .094);--jade-3: color(display-p3 .091 .176 .138);--jade-4: color(display-p3 .102 .228 .177);--jade-5: color(display-p3 .133 .279 .221);--jade-6: color(display-p3 .174 .334 .273);--jade-7: color(display-p3 .219 .402 .335);--jade-8: color(display-p3 .263 .488 .411);--jade-9: color(display-p3 .319 .63 .521);--jade-10: color(display-p3 .338 .68 .555);--jade-11: color(display-p3 .4 .835 .656);--jade-12: color(display-p3 .734 .934 .838);--jade-a1: color(display-p3 0 .992 .298 / .017);--jade-a2: color(display-p3 .318 .988 .651 / .047);--jade-a3: color(display-p3 .267 1 .667 / .118);--jade-a4: color(display-p3 .275 .996 .702 / .173);--jade-a5: color(display-p3 .361 1 .741 / .227);--jade-a6: color(display-p3 .439 1 .796 / .286);--jade-a7: color(display-p3 .49 1 .804 / .362);--jade-a8: color(display-p3 .506 1 .835 / .45);--jade-a9: color(display-p3 .478 .996 .816 / .606);--jade-a10: color(display-p3 .478 1 .816 / .656);--jade-a11: color(display-p3 .4 .835 .656);--jade-a12: color(display-p3 .734 .934 .838);--lime-1: color(display-p3 .067 .073 .048);--lime-2: color(display-p3 .086 .1 .067);--lime-3: color(display-p3 .13 .16 .099);--lime-4: color(display-p3 .172 .214 .126);--lime-5: color(display-p3 .213 .266 .153);--lime-6: color(display-p3 .257 .321 .182);--lime-7: color(display-p3 .307 .383 .215);--lime-8: color(display-p3 .365 .456 .25);--lime-9: color(display-p3 .78 .928 .466);--lime-10: color(display-p3 .865 .995 .519);--lime-11: color(display-p3 .771 .893 .485);--lime-12: color(display-p3 .905 .966 .753);--lime-a1: color(display-p3 .067 .941 0 / .009);--lime-a2: color(display-p3 .584 .996 .071 / .038);--lime-a3: color(display-p3 .69 1 .38 / .101);--lime-a4: color(display-p3 .729 1 .435 / .16);--lime-a5: color(display-p3 .745 1 .471 / .215);--lime-a6: color(display-p3 .769 1 .482 / .274);--lime-a7: color(display-p3 .769 1 .506 / .341);--lime-a8: color(display-p3 .784 1 .51 / .416);--lime-a9: color(display-p3 .839 1 .502 / .925);--lime-a10: color(display-p3 .871 1 .522 / .996);--lime-a11: color(display-p3 .771 .893 .485);--lime-a12: color(display-p3 .905 .966 .753);--mint-1: color(display-p3 .059 .082 .081);--mint-2: color(display-p3 .068 .104 .105);--mint-3: color(display-p3 .077 .17 .168);--mint-4: color(display-p3 .068 .224 .22);--mint-5: color(display-p3 .104 .275 .264);--mint-6: color(display-p3 .154 .332 .313);--mint-7: color(display-p3 .207 .403 .373);--mint-8: color(display-p3 .258 .49 .441);--mint-9: color(display-p3 .62 .908 .834);--mint-10: color(display-p3 .725 .954 .898);--mint-11: color(display-p3 .482 .825 .733);--mint-12: color(display-p3 .807 .955 .887);--mint-a1: color(display-p3 0 .992 .992 / .017);--mint-a2: color(display-p3 .071 .98 .98 / .043);--mint-a3: color(display-p3 .176 .996 .996 / .11);--mint-a4: color(display-p3 .071 .996 .973 / .169);--mint-a5: color(display-p3 .243 1 .949 / .223);--mint-a6: color(display-p3 .369 1 .933 / .286);--mint-a7: color(display-p3 .459 1 .914 / .362);--mint-a8: color(display-p3 .49 1 .89 / .454);--mint-a9: color(display-p3 .678 .996 .914 / .904);--mint-a10: color(display-p3 .761 1 .941 / .95);--mint-a11: color(display-p3 .482 .825 .733);--mint-a12: color(display-p3 .807 .955 .887);--orange-1: color(display-p3 .088 .07 .057);--orange-2: color(display-p3 .113 .089 .061);--orange-3: color(display-p3 .189 .12 .056);--orange-4: color(display-p3 .262 .132 0);--orange-5: color(display-p3 .315 .168 .016);--orange-6: color(display-p3 .376 .219 .088);--orange-7: color(display-p3 .465 .283 .147);--orange-8: color(display-p3 .601 .359 .201);--orange-9: color(display-p3 .9 .45 .2);--orange-10: color(display-p3 .98 .51 .23);--orange-11: color(display-p3 1 .63 .38);--orange-12: color(display-p3 .98 .883 .775);--orange-a1: color(display-p3 .961 .247 0 / .022);--orange-a2: color(display-p3 .992 .529 0 / .051);--orange-a3: color(display-p3 .996 .486 0 / .131);--orange-a4: color(display-p3 .996 .384 0 / .211);--orange-a5: color(display-p3 1 .455 0 / .265);--orange-a6: color(display-p3 1 .529 .129 / .332);--orange-a7: color(display-p3 1 .569 .251 / .429);--orange-a8: color(display-p3 1 .584 .302 / .572);--orange-a9: color(display-p3 1 .494 .216 / .895);--orange-a10: color(display-p3 1 .522 .235 / .979);--orange-a11: color(display-p3 1 .63 .38);--orange-a12: color(display-p3 .98 .883 .775);--pink-1: color(display-p3 .093 .068 .089);--pink-2: color(display-p3 .121 .073 .11);--pink-3: color(display-p3 .198 .098 .179);--pink-4: color(display-p3 .271 .095 .231);--pink-5: color(display-p3 .32 .127 .273);--pink-6: color(display-p3 .382 .177 .326);--pink-7: color(display-p3 .477 .238 .405);--pink-8: color(display-p3 .612 .304 .51);--pink-9: color(display-p3 .775 .297 .61);--pink-10: color(display-p3 .808 .356 .645);--pink-11: color(display-p3 1 .535 .78);--pink-12: color(display-p3 .964 .826 .912);--pink-a1: color(display-p3 .984 .071 .855 / .03);--pink-a2: color(display-p3 1 .2 .8 / .059);--pink-a3: color(display-p3 1 .294 .886 / .139);--pink-a4: color(display-p3 1 .192 .82 / .219);--pink-a5: color(display-p3 1 .282 .827 / .274);--pink-a6: color(display-p3 1 .396 .835 / .337);--pink-a7: color(display-p3 1 .459 .831 / .442);--pink-a8: color(display-p3 1 .478 .827 / .585);--pink-a9: color(display-p3 1 .373 .784 / .761);--pink-a10: color(display-p3 1 .435 .792 / .795);--pink-a11: color(display-p3 1 .535 .78);--pink-a12: color(display-p3 .964 .826 .912);--plum-1: color(display-p3 .09 .068 .092);--plum-2: color(display-p3 .118 .077 .121);--plum-3: color(display-p3 .192 .105 .202);--plum-4: color(display-p3 .25 .121 .271);--plum-5: color(display-p3 .293 .152 .319);--plum-6: color(display-p3 .343 .198 .372);--plum-7: color(display-p3 .424 .262 .461);--plum-8: color(display-p3 .54 .341 .595);--plum-9: color(display-p3 .624 .313 .708);--plum-10: color(display-p3 .666 .365 .748);--plum-11: color(display-p3 .86 .602 .933);--plum-12: color(display-p3 .936 .836 .949);--plum-a1: color(display-p3 .973 .071 .973 / .026);--plum-a2: color(display-p3 .933 .267 1 / .059);--plum-a3: color(display-p3 .918 .333 .996 / .148);--plum-a4: color(display-p3 .91 .318 1 / .219);--plum-a5: color(display-p3 .914 .388 1 / .269);--plum-a6: color(display-p3 .906 .463 1 / .328);--plum-a7: color(display-p3 .906 .529 1 / .425);--plum-a8: color(display-p3 .906 .553 1 / .568);--plum-a9: color(display-p3 .875 .427 1 / .69);--plum-a10: color(display-p3 .886 .471 .996 / .732);--plum-a11: color(display-p3 .86 .602 .933);--plum-a12: color(display-p3 .936 .836 .949);--purple-1: color(display-p3 .09 .068 .103);--purple-2: color(display-p3 .113 .082 .134);--purple-3: color(display-p3 .175 .112 .224);--purple-4: color(display-p3 .224 .137 .297);--purple-5: color(display-p3 .264 .167 .349);--purple-6: color(display-p3 .311 .208 .406);--purple-7: color(display-p3 .381 .266 .496);--purple-8: color(display-p3 .49 .349 .649);--purple-9: color(display-p3 .523 .318 .751);--purple-10: color(display-p3 .57 .373 .791);--purple-11: color(display-p3 .8 .62 1);--purple-12: color(display-p3 .913 .854 .971);--purple-a1: color(display-p3 .686 .071 .996 / .038);--purple-a2: color(display-p3 .722 .286 .996 / .072);--purple-a3: color(display-p3 .718 .349 .996 / .169);--purple-a4: color(display-p3 .702 .353 1 / .248);--purple-a5: color(display-p3 .718 .404 1 / .303);--purple-a6: color(display-p3 .733 .455 1 / .366);--purple-a7: color(display-p3 .753 .506 1 / .458);--purple-a8: color(display-p3 .749 .522 1 / .622);--purple-a9: color(display-p3 .686 .408 1 / .736);--purple-a10: color(display-p3 .71 .459 1 / .778);--purple-a11: color(display-p3 .8 .62 1);--purple-a12: color(display-p3 .913 .854 .971);--red-1: color(display-p3 .093 .068 .067);--red-2: color(display-p3 .118 .077 .079);--red-3: color(display-p3 .211 .081 .099);--red-4: color(display-p3 .287 .079 .113);--red-5: color(display-p3 .348 .11 .142);--red-6: color(display-p3 .414 .16 .183);--red-7: color(display-p3 .508 .224 .236);--red-8: color(display-p3 .659 .298 .297);--red-9: color(display-p3 .83 .329 .324);--red-10: color(display-p3 .861 .403 .387);--red-11: color(display-p3 1 .57 .55);--red-12: color(display-p3 .971 .826 .852);--red-a1: color(display-p3 .984 .071 .071 / .03);--red-a2: color(display-p3 .996 .282 .282 / .055);--red-a3: color(display-p3 1 .169 .271 / .156);--red-a4: color(display-p3 1 .118 .267 / .236);--red-a5: color(display-p3 1 .212 .314 / .303);--red-a6: color(display-p3 1 .318 .38 / .374);--red-a7: color(display-p3 1 .4 .424 / .475);--red-a8: color(display-p3 1 .431 .431 / .635);--red-a9: color(display-p3 1 .388 .384 / .82);--red-a10: color(display-p3 1 .463 .447 / .853);--red-a11: color(display-p3 1 .57 .55);--red-a12: color(display-p3 .971 .826 .852);--ruby-1: color(display-p3 .093 .068 .074);--ruby-2: color(display-p3 .113 .083 .089);--ruby-3: color(display-p3 .208 .088 .117);--ruby-4: color(display-p3 .279 .092 .147);--ruby-5: color(display-p3 .337 .12 .18);--ruby-6: color(display-p3 .401 .166 .223);--ruby-7: color(display-p3 .495 .224 .281);--ruby-8: color(display-p3 .652 .295 .359);--ruby-9: color(display-p3 .83 .323 .408);--ruby-10: color(display-p3 .857 .392 .455);--ruby-11: color(display-p3 1 .57 .59);--ruby-12: color(display-p3 .968 .83 .88);--ruby-a1: color(display-p3 .984 .071 .329 / .03);--ruby-a2: color(display-p3 .992 .376 .529 / .051);--ruby-a3: color(display-p3 .996 .196 .404 / .152);--ruby-a4: color(display-p3 1 .173 .416 / .227);--ruby-a5: color(display-p3 1 .259 .459 / .29);--ruby-a6: color(display-p3 1 .341 .506 / .358);--ruby-a7: color(display-p3 1 .412 .541 / .458);--ruby-a8: color(display-p3 1 .431 .537 / .627);--ruby-a9: color(display-p3 1 .376 .482 / .82);--ruby-a10: color(display-p3 1 .447 .522 / .849);--ruby-a11: color(display-p3 1 .57 .59);--ruby-a12: color(display-p3 .968 .83 .88);--sky-1: color(display-p3 .056 .078 .116);--sky-2: color(display-p3 .075 .101 .149);--sky-3: color(display-p3 .089 .154 .244);--sky-4: color(display-p3 .106 .207 .323);--sky-5: color(display-p3 .135 .261 .394);--sky-6: color(display-p3 .17 .322 .469);--sky-7: color(display-p3 .205 .394 .557);--sky-8: color(display-p3 .232 .48 .665);--sky-9: color(display-p3 .585 .877 .983);--sky-10: color(display-p3 .718 .925 .991);--sky-11: color(display-p3 .536 .772 .924);--sky-12: color(display-p3 .799 .947 .993);--sky-a1: color(display-p3 0 .282 .996 / .055);--sky-a2: color(display-p3 .157 .467 .992 / .089);--sky-a3: color(display-p3 .192 .522 .996 / .19);--sky-a4: color(display-p3 .212 .584 1 / .274);--sky-a5: color(display-p3 .259 .631 1 / .349);--sky-a6: color(display-p3 .302 .655 1 / .433);--sky-a7: color(display-p3 .329 .686 1 / .526);--sky-a8: color(display-p3 .325 .71 1 / .643);--sky-a9: color(display-p3 .592 .894 1 / .984);--sky-a10: color(display-p3 .722 .933 1 / .992);--sky-a11: color(display-p3 .536 .772 .924);--sky-a12: color(display-p3 .799 .947 .993);--teal-1: color(display-p3 .059 .083 .079);--teal-2: color(display-p3 .075 .11 .107);--teal-3: color(display-p3 .087 .175 .165);--teal-4: color(display-p3 .087 .227 .214);--teal-5: color(display-p3 .12 .277 .261);--teal-6: color(display-p3 .162 .335 .314);--teal-7: color(display-p3 .205 .406 .379);--teal-8: color(display-p3 .245 .489 .453);--teal-9: color(display-p3 .297 .637 .581);--teal-10: color(display-p3 .319 .69 .62);--teal-11: color(display-p3 .388 .835 .719);--teal-12: color(display-p3 .734 .934 .87);--teal-a1: color(display-p3 0 .992 .761 / .017);--teal-a2: color(display-p3 .235 .988 .902 / .047);--teal-a3: color(display-p3 .235 1 .898 / .118);--teal-a4: color(display-p3 .18 .996 .929 / .173);--teal-a5: color(display-p3 .31 1 .933 / .227);--teal-a6: color(display-p3 .396 1 .933 / .286);--teal-a7: color(display-p3 .443 1 .925 / .366);--teal-a8: color(display-p3 .459 1 .925 / .454);--teal-a9: color(display-p3 .443 .996 .906 / .61);--teal-a10: color(display-p3 .439 .996 .89 / .669);--teal-a11: color(display-p3 .388 .835 .719);--teal-a12: color(display-p3 .734 .934 .87);--tomato-1: color(display-p3 .09 .068 .067);--tomato-2: color(display-p3 .115 .084 .076);--tomato-3: color(display-p3 .205 .097 .083);--tomato-4: color(display-p3 .282 .099 .077);--tomato-5: color(display-p3 .339 .129 .101);--tomato-6: color(display-p3 .398 .179 .141);--tomato-7: color(display-p3 .487 .245 .194);--tomato-8: color(display-p3 .629 .322 .248);--tomato-9: color(display-p3 .831 .345 .231);--tomato-10: color(display-p3 .862 .415 .298);--tomato-11: color(display-p3 1 .585 .455);--tomato-12: color(display-p3 .959 .833 .802);--tomato-a1: color(display-p3 .973 .071 .071 / .026);--tomato-a2: color(display-p3 .992 .376 .224 / .051);--tomato-a3: color(display-p3 .996 .282 .176 / .148);--tomato-a4: color(display-p3 1 .204 .118 / .232);--tomato-a5: color(display-p3 1 .286 .192 / .29);--tomato-a6: color(display-p3 1 .392 .278 / .353);--tomato-a7: color(display-p3 1 .459 .349 / .45);--tomato-a8: color(display-p3 1 .49 .369 / .601);--tomato-a9: color(display-p3 1 .408 .267 / .82);--tomato-a10: color(display-p3 1 .478 .341 / .853);--tomato-a11: color(display-p3 1 .585 .455);--tomato-a12: color(display-p3 .959 .833 .802);--violet-1: color(display-p3 .077 .071 .118);--violet-2: color(display-p3 .101 .084 .141);--violet-3: color(display-p3 .154 .123 .256);--violet-4: color(display-p3 .191 .148 .345);--violet-5: color(display-p3 .226 .182 .396);--violet-6: color(display-p3 .269 .223 .449);--violet-7: color(display-p3 .326 .277 .53);--violet-8: color(display-p3 .399 .346 .656);--violet-9: color(display-p3 .417 .341 .784);--violet-10: color(display-p3 .477 .402 .823);--violet-11: color(display-p3 .72 .65 1);--violet-12: color(display-p3 .883 .867 .986);--violet-a1: color(display-p3 .282 .141 .996 / .055);--violet-a2: color(display-p3 .51 .263 1 / .08);--violet-a3: color(display-p3 .494 .337 .996 / .202);--violet-a4: color(display-p3 .49 .345 1 / .299);--violet-a5: color(display-p3 .525 .392 1 / .353);--violet-a6: color(display-p3 .569 .455 1 / .408);--violet-a7: color(display-p3 .588 .494 1 / .496);--violet-a8: color(display-p3 .596 .51 1 / .631);--violet-a9: color(display-p3 .522 .424 1 / .769);--violet-a10: color(display-p3 .576 .482 1 / .811);--violet-a11: color(display-p3 .72 .65 1);--violet-a12: color(display-p3 .883 .867 .986);--yellow-1: color(display-p3 .078 .069 .047);--yellow-2: color(display-p3 .103 .094 .063);--yellow-3: color(display-p3 .168 .137 .039);--yellow-4: color(display-p3 .209 .169 0);--yellow-5: color(display-p3 .255 .209 0);--yellow-6: color(display-p3 .31 .261 .07);--yellow-7: color(display-p3 .389 .331 .135);--yellow-8: color(display-p3 .497 .42 .182);--yellow-9: color(display-p3 1 .92 .22);--yellow-10: color(display-p3 1 1 .456);--yellow-11: color(display-p3 .948 .885 .392);--yellow-12: color(display-p3 .959 .934 .731);--yellow-a1: color(display-p3 .973 .369 0 / .013);--yellow-a2: color(display-p3 .996 .792 0 / .038);--yellow-a3: color(display-p3 .996 .71 0 / .11);--yellow-a4: color(display-p3 .996 .741 0 / .152);--yellow-a5: color(display-p3 .996 .765 0 / .202);--yellow-a6: color(display-p3 .996 .816 .082 / .261);--yellow-a7: color(display-p3 1 .831 .263 / .345);--yellow-a8: color(display-p3 1 .831 .314 / .463);--yellow-a9: color(display-p3 1 .922 .22);--yellow-a10: color(display-p3 1 1 .455);--yellow-a11: color(display-p3 .948 .885 .392);--yellow-a12: color(display-p3 .959 .934 .731);--gray-surface: color(display-p3 .1255 .1255 .1255 / .5);--mauve-surface: color(display-p3 .1333 .1255 .1333 / .5);--slate-surface: color(display-p3 .1176 .1255 .1333 / .5);--sage-surface: color(display-p3 .1176 .1255 .1176 / .5);--olive-surface: color(display-p3 .1176 .1255 .1176 / .5);--sand-surface: color(display-p3 .1255 .1255 .1255 / .5);--amber-surface: color(display-p3 .1412 .1176 .0784 / .5);--blue-surface: color(display-p3 .0706 .1255 .2196 / .5);--bronze-surface: color(display-p3 .1412 .1255 .1176 / .5);--brown-surface: color(display-p3 .1412 .1176 .102 / .5);--crimson-surface: color(display-p3 .1647 .0863 .1176 / .5);--cyan-surface: color(display-p3 .0784 .1412 .1725 / .5);--gold-surface: color(display-p3 .1412 .1333 .1098 / .5);--grass-surface: color(display-p3 .102 .1333 .102 / .5);--green-surface: color(display-p3 .0941 .1412 .1098 / .5);--indigo-surface: color(display-p3 .0941 .1098 .2196 / .5);--iris-surface: color(display-p3 .1098 .102 .2118 / .5);--jade-surface: color(display-p3 .0863 .149 .1176 / .5);--lime-surface: color(display-p3 .1098 .1255 .0784 / .5);--mint-surface: color(display-p3 .0941 .149 .1412 / .5);--orange-surface: color(display-p3 .1412 .1098 .0706 / .5);--pink-surface: color(display-p3 .1725 .0784 .149 / .5);--plum-surface: color(display-p3 .1647 .0863 .1725 / .5);--purple-surface: color(display-p3 .149 .0941 .1961 / .5);--red-surface: color(display-p3 .1647 .0863 .0863 / .5);--ruby-surface: color(display-p3 .1569 .0941 .1098 / .5);--sky-surface: color(display-p3 .0863 .1333 .2196 / .5);--teal-surface: color(display-p3 .0863 .149 .1412 / .5);--tomato-surface: color(display-p3 .1569 .0941 .0784 / .5);--violet-surface: color(display-p3 .1333 .102 .2118 / .5);--yellow-surface: color(display-p3 .1333 .1176 .0706 / .5)}}}:root{--gray-contrast: white;--mauve-contrast: white;--slate-contrast: white;--sage-contrast: white;--olive-contrast: white;--sand-contrast: white;--amber-contrast: #21201c;--blue-contrast: white;--bronze-contrast: white;--brown-contrast: white;--crimson-contrast: white;--cyan-contrast: white;--gold-contrast: white;--grass-contrast: white;--green-contrast: white;--indigo-contrast: white;--iris-contrast: white;--jade-contrast: white;--lime-contrast: #1d211c;--mint-contrast: #1a211e;--orange-contrast: white;--pink-contrast: white;--plum-contrast: white;--purple-contrast: white;--red-contrast: white;--ruby-contrast: white;--sky-contrast: #1c2024;--teal-contrast: white;--tomato-contrast: white;--violet-contrast: white;--yellow-contrast: #21201c;--black-a1: rgba(0, 0, 0, .05);--black-a2: rgba(0, 0, 0, .1);--black-a3: rgba(0, 0, 0, .15);--black-a4: rgba(0, 0, 0, .2);--black-a5: rgba(0, 0, 0, .3);--black-a6: rgba(0, 0, 0, .4);--black-a7: rgba(0, 0, 0, .5);--black-a8: rgba(0, 0, 0, .6);--black-a9: rgba(0, 0, 0, .7);--black-a10: rgba(0, 0, 0, .8);--black-a11: rgba(0, 0, 0, .9);--black-a12: rgba(0, 0, 0, .95);--white-a1: rgba(255, 255, 255, .05);--white-a2: rgba(255, 255, 255, .1);--white-a3: rgba(255, 255, 255, .15);--white-a4: rgba(255, 255, 255, .2);--white-a5: rgba(255, 255, 255, .3);--white-a6: rgba(255, 255, 255, .4);--white-a7: rgba(255, 255, 255, .5);--white-a8: rgba(255, 255, 255, .6);--white-a9: rgba(255, 255, 255, .7);--white-a10: rgba(255, 255, 255, .8);--white-a11: rgba(255, 255, 255, .9);--white-a12: rgba(255, 255, 255, .95)}@supports (color: color-mix(in oklab,white,black)){.dark,.dark-theme{--amber-track: color-mix(in oklab, var(--amber-8), var(--amber-9) 75%);--lime-track: color-mix(in oklab, var(--lime-8), var(--lime-9) 65%);--mint-track: color-mix(in oklab, var(--mint-8), var(--mint-9) 65%);--sky-track: color-mix(in oklab, var(--sky-8), var(--sky-9) 65%);--yellow-track: color-mix(in oklab, var(--yellow-8), var(--yellow-9) 65%)}}@supports (color: color(display-p3 1 1 1)){@media (color-gamut: p3){:root{--black-a1: color(display-p3 0 0 0 / .05);--black-a2: color(display-p3 0 0 0 / .1);--black-a3: color(display-p3 0 0 0 / .15);--black-a4: color(display-p3 0 0 0 / .2);--black-a5: color(display-p3 0 0 0 / .3);--black-a6: color(display-p3 0 0 0 / .4);--black-a7: color(display-p3 0 0 0 / .5);--black-a8: color(display-p3 0 0 0 / .6);--black-a9: color(display-p3 0 0 0 / .7);--black-a10: color(display-p3 0 0 0 / .8);--black-a11: color(display-p3 0 0 0 / .9);--black-a12: color(display-p3 0 0 0 / .95);--white-a1: color(display-p3 1 1 1 / .05);--white-a2: color(display-p3 1 1 1 / .1);--white-a3: color(display-p3 1 1 1 / .15);--white-a4: color(display-p3 1 1 1 / .2);--white-a5: color(display-p3 1 1 1 / .3);--white-a6: color(display-p3 1 1 1 / .4);--white-a7: color(display-p3 1 1 1 / .5);--white-a8: color(display-p3 1 1 1 / .6);--white-a9: color(display-p3 1 1 1 / .7);--white-a10: color(display-p3 1 1 1 / .8);--white-a11: color(display-p3 1 1 1 / .9);--white-a12: color(display-p3 1 1 1 / .95)}}}:where(.radix-themes){--color-background: white;--color-overlay: var(--black-a6);--color-panel-solid: white;--color-panel-translucent: rgba(255, 255, 255, .7);--color-surface: rgba(255, 255, 255, .85);--color-transparent: rgb(0 0 0 / 0);--shadow-1: inset 0 0 0 1px var(--gray-a5), inset 0 1.5px 2px 0 var(--gray-a2), inset 0 1.5px 2px 0 var(--black-a2);--shadow-2: 0 0 0 1px var(--gray-a3), 0 0 0 .5px var(--black-a1), 0 1px 1px 0 var(--gray-a2), 0 2px 1px -1px var(--black-a1), 0 1px 3px 0 var(--black-a1);--shadow-3: 0 0 0 1px var(--gray-a3), 0 2px 3px -2px var(--gray-a3), 0 3px 12px -4px var(--black-a2), 0 4px 16px -8px var(--black-a2);--shadow-4: 0 0 0 1px var(--gray-a3), 0 8px 40px var(--black-a1), 0 12px 32px -16px var(--gray-a3);--shadow-5: 0 0 0 1px var(--gray-a3), 0 12px 60px var(--black-a3), 0 12px 32px -16px var(--gray-a5);--shadow-6: 0 0 0 1px var(--gray-a3), 0 12px 60px var(--black-a3), 0 16px 64px var(--gray-a2), 0 16px 36px -20px var(--gray-a7);--base-button-classic-after-inset: 2px;--base-button-classic-box-shadow-top: inset 0 0 0 1px var(--gray-a4), inset 0 -2px 1px var(--gray-a3);--base-button-classic-box-shadow-bottom: inset 0 4px 2px -2px var(--white-a9), inset 0 2px 1px -1px var(--white-a9);--base-button-classic-disabled-box-shadow: var(--base-button-classic-box-shadow-top), var(--base-button-classic-box-shadow-bottom);--base-button-classic-active-filter: brightness(.92) saturate(1.1);--base-button-classic-high-contrast-hover-filter: contrast(.88) saturate(1.1) brightness(1.1);--base-button-classic-high-contrast-active-filter: contrast(.82) saturate(1.2) brightness(1.16);--base-button-solid-active-filter: brightness(.92) saturate(1.1);--base-button-solid-high-contrast-hover-filter: contrast(.88) saturate(1.1) brightness(1.1);--base-button-solid-high-contrast-active-filter: contrast(.82) saturate(1.2) brightness(1.16);--kbd-box-shadow: inset 0 -.05em .5em var(--gray-a2), inset 0 .05em var(--white-a12), inset 0 .25em .5em var(--gray-a2), inset 0 -.05em var(--gray-a6), 0 0 0 .05em var(--gray-a5), 0 .08em .17em var(--gray-a7);--progress-indicator-after-linear-gradient: var(--white-a5), var(--white-a9), var(--white-a5);--segmented-control-indicator-background-color: var(--color-background);--select-trigger-classic-box-shadow: inset 0 0 0 1px var(--gray-a5), inset 0 2px 1px var(--white-a11), inset 0 -2px 1px var(--gray-a4) ;--slider-range-high-contrast-background-image: linear-gradient(var(--black-a8), var(--black-a8));--slider-disabled-blend-mode: multiply;--switch-disabled-blend-mode: multiply;--switch-high-contrast-checked-color-overlay: var(--black-a8);--switch-high-contrast-checked-active-before-filter: contrast(.82) saturate(1.2) brightness(1.16);--switch-surface-checked-active-filter: brightness(.92) saturate(1.1);--base-card-surface-box-shadow: 0 0 0 1px var(--gray-a5);--base-card-surface-hover-box-shadow: 0 0 0 1px var(--gray-a7);--base-card-surface-active-box-shadow: 0 0 0 1px var(--gray-a6);--base-card-classic-box-shadow-inner: 0 0 0 1px var(--base-card-classic-border-color), 0 0 0 1px var(--color-transparent), 0 0 0 .5px var(--black-a1), 0 1px 1px 0 var(--gray-a2), 0 2px 1px -1px var(--black-a1), 0 1px 3px 0 var(--black-a1);--base-card-classic-box-shadow-outer: 0 0 0 0 var(--base-card-classic-border-color), 0 0 0 0 var(--color-transparent), 0 0 0 0 var(--black-a1), 0 1px 1px -1px var(--gray-a2), 0 2px 1px -2px var(--black-a1), 0 1px 3px -1px var(--black-a1);--base-card-classic-hover-box-shadow-inner: 0 0 0 1px var(--base-card-classic-hover-border-color), 0 1px 1px 1px var(--black-a1), 0 2px 1px -1px var(--gray-a3), 0 2px 3px -2px var(--black-a1), 0 3px 12px -4px var(--gray-a3), 0 4px 16px -8px var(--black-a1);--base-card-classic-hover-box-shadow-outer: 0 0 0 0 var(--base-card-classic-hover-border-color), 0 1px 1px 0 var(--black-a1), 0 2px 1px -2px var(--gray-a3), 0 2px 3px -3px var(--black-a1), 0 3px 12px -5px var(--gray-a3), 0 4px 16px -9px var(--black-a1);--base-card-classic-active-box-shadow-inner: 0 0 0 1px var(--base-card-classic-active-border-color), 0 0 0 1px var(--color-transparent), 0 0 0 .5px var(--black-a1), 0 1px 1px 0 var(--gray-a4), 0 2px 1px -1px var(--black-a1), 0 1px 3px 0 var(--black-a1);--base-card-classic-active-box-shadow-outer: 0 0 0 0 var(--base-card-classic-active-border-color), 0 0 0 0 var(--color-transparent), 0 0 0 0 var(--black-a1), 0 1px 1px -1px var(--gray-a4), 0 2px 1px -2px var(--black-a1), 0 1px 3px -1px var(--black-a1);--base-card-classic-border-color: var(--gray-a3);--base-card-classic-hover-border-color: var(--gray-a3);--base-card-classic-active-border-color: var(--gray-a4)}:is(.dark,.dark-theme),:is(.dark,.dark-theme) :where(.radix-themes:not(.light,.light-theme)){--color-background: var(--gray-1);--color-overlay: var(--black-a8);--color-panel-solid: var(--gray-2);--color-panel-translucent: var(--gray-a2);--color-surface: rgba(0, 0, 0, .25);--shadow-1: inset 0 -1px 1px 0 var(--gray-a3), inset 0 0 0 1px var(--gray-a3), inset 0 3px 4px 0 var(--black-a5), inset 0 0 0 1px var(--gray-a4);--shadow-2: 0 0 0 1px var(--gray-a6), 0 0 0 .5px var(--black-a3), 0 1px 1px 0 var(--black-a6), 0 2px 1px -1px var(--black-a6), 0 1px 3px 0 var(--black-a5);--shadow-3: 0 0 0 1px var(--gray-a6), 0 2px 3px -2px var(--black-a3), 0 3px 8px -2px var(--black-a6), 0 4px 12px -4px var(--black-a7);--shadow-4: 0 0 0 1px var(--gray-a6), 0 8px 40px var(--black-a3), 0 12px 32px -16px var(--black-a5);--shadow-5: 0 0 0 1px var(--gray-a6), 0 12px 60px var(--black-a5), 0 12px 32px -16px var(--black-a7);--shadow-6: 0 0 0 1px var(--gray-a6), 0 12px 60px var(--black-a4), 0 16px 64px var(--black-a6), 0 16px 36px -20px var(--black-a11);--base-button-classic-after-inset: 1px;--base-button-classic-box-shadow-top: inset 0 0 0 1px var(--white-a2), inset 0 4px 2px -2px var(--white-a3), inset 0 1px 1px var(--white-a6), inset 0 -1px 1px var(--black-a6);--base-button-classic-box-shadow-bottom: 0 0 transparent;--base-button-classic-disabled-box-shadow: inset 0 0 0 1px var(--gray-a5), inset 0 4px 2px -2px var(--gray-a2), inset 0 1px 1px var(--gray-a5), inset 0 -1px 1px var(--black-a3), inset 0 0 0 1px var(--gray-a2);--base-button-classic-active-filter: brightness(1.08);--base-button-classic-high-contrast-hover-filter: contrast(.88) saturate(1.3) brightness(1.14);--base-button-classic-high-contrast-active-filter: brightness(.95) saturate(1.2);--base-button-solid-active-filter: brightness(1.08);--base-button-solid-high-contrast-hover-filter: contrast(.88) saturate(1.3) brightness(1.18);--base-button-solid-high-contrast-active-filter: brightness(.95) saturate(1.2);--kbd-box-shadow: inset 0 -.05em .5em var(--gray-a3), inset 0 .05em var(--gray-a11), inset 0 .25em .5em var(--gray-a2), inset 0 -.1em var(--black-a11), 0 0 0 .075em var(--gray-a7), 0 .08em .17em var(--black-a12);--progress-indicator-after-linear-gradient: var(--white-a3), var(--white-a6), var(--white-a3);--segmented-control-indicator-background-color: var(--gray-a3);--select-trigger-classic-box-shadow: inset 0 0 0 1px var(--white-a4), inset 0 1px 1px var(--white-a4), inset 0 -1px 1px var(--black-a9) ;--slider-range-high-contrast-background-image: none;--slider-disabled-blend-mode: screen;--switch-disabled-blend-mode: screen;--switch-high-contrast-checked-color-overlay: transparent;--switch-high-contrast-checked-active-before-filter: brightness(1.08);--switch-surface-checked-active-filter: brightness(1.08);--base-card-classic-box-shadow-inner: 0 0 0 1px var(--base-card-classic-border-color), 0 0 0 1px var(--color-transparent), 0 0 0 .5px var(--black-a3), 0 1px 1px 0 var(--black-a6), 0 2px 1px -1px var(--black-a6), 0 1px 3px 0 var(--black-a5);--base-card-classic-box-shadow-outer: 0 0 0 0 var(--base-card-classic-border-color), 0 0 0 0 var(--color-transparent), 0 0 0 0 var(--black-a3), 0 1px 1px -1px var(--black-a6), 0 2px 1px -2px var(--black-a6), 0 1px 3px -1px var(--black-a5);--base-card-classic-hover-box-shadow-inner: 0 0 0 1px var(--base-card-classic-hover-border-color), 0 0 1px 1px var(--gray-a4), 0 0 1px -1px var(--gray-a4), 0 0 3px -2px var(--gray-a3), 0 0 12px -2px var(--gray-a3), 0 0 16px -8px var(--gray-a7);--base-card-classic-hover-box-shadow-outer: 0 0 0 0 var(--base-card-classic-hover-border-color), 0 0 1px 0 var(--gray-a4), 0 0 1px -2px var(--gray-a4), 0 0 3px -3px var(--gray-a3), 0 0 12px -3px var(--gray-a3), 0 0 16px -9px var(--gray-a7);--base-card-classic-active-box-shadow-inner: 0 0 0 1px var(--base-card-classic-active-border-color), 0 0 0 1px var(--color-transparent), 0 0 0 .5px var(--black-a3), 0 1px 1px 0 var(--black-a6), 0 2px 1px -1px var(--black-a6), 0 1px 3px 0 var(--black-a5);--base-card-classic-active-box-shadow-outer: 0 0 0 0 var(--base-card-classic-active-border-color), 0 0 0 0 var(--color-transparent), 0 0 0 0 var(--black-a3), 0 1px 1px -1px var(--black-a6), 0 2px 1px -2px var(--black-a6), 0 1px 3px -1px var(--black-a5);--base-card-classic-border-color: var(--gray-a6);--base-card-classic-hover-border-color: var(--gray-a6);--base-card-classic-active-border-color: var(--gray-a6)}@supports (color: color(display-p3 1 1 1)){@media (color-gamut: p3){.radix-themes{--color-transparent: color(display-p3 0 0 0 / 0)}}}.radix-themes:where(.light,.light-theme),:root:where(:has(.radix-themes[data-is-root-theme=true]:where(.light,.light-theme))){color-scheme:light}.radix-themes:where(.dark,.dark-theme),:root:where(:has(.radix-themes[data-is-root-theme=true]:where(.dark,.dark-theme))){color-scheme:dark}.radix-themes,[data-accent-color]:where(:not([data-accent-color=""],[data-accent-color=gray])){--focus-1: var(--accent-1);--focus-2: var(--accent-2);--focus-3: var(--accent-3);--focus-4: var(--accent-4);--focus-5: var(--accent-5);--focus-6: var(--accent-6);--focus-7: var(--accent-7);--focus-8: var(--accent-8);--focus-9: var(--accent-9);--focus-10: var(--accent-10);--focus-11: var(--accent-11);--focus-12: var(--accent-12);--focus-a1: var(--accent-a1);--focus-a2: var(--accent-a2);--focus-a3: var(--accent-a3);--focus-a4: var(--accent-a4);--focus-a5: var(--accent-a5);--focus-a6: var(--accent-a6);--focus-a7: var(--accent-a7);--focus-a8: var(--accent-a8);--focus-a9: var(--accent-a9);--focus-a10: var(--accent-a10);--focus-a11: var(--accent-a11);--focus-a12: var(--accent-a12)}.radix-themes ::selection{background-color:var(--focus-a5)}.radix-themes:where([data-has-background=true]){background-color:var(--color-background)}.radix-themes:where([data-panel-background=solid]){--color-panel: var(--color-panel-solid);--backdrop-filter-panel: none}.radix-themes:where([data-panel-background=translucent]){--color-panel: var(--color-panel-translucent);--backdrop-filter-panel: blur(64px)}[data-accent-color=amber]{--accent-1: var(--amber-1);--accent-2: var(--amber-2);--accent-3: var(--amber-3);--accent-4: var(--amber-4);--accent-5: var(--amber-5);--accent-6: var(--amber-6);--accent-7: var(--amber-7);--accent-8: var(--amber-8);--accent-9: var(--amber-9);--accent-10: var(--amber-10);--accent-11: var(--amber-11);--accent-12: var(--amber-12);--accent-a1: var(--amber-a1);--accent-a2: var(--amber-a2);--accent-a3: var(--amber-a3);--accent-a4: var(--amber-a4);--accent-a5: var(--amber-a5);--accent-a6: var(--amber-a6);--accent-a7: var(--amber-a7);--accent-a8: var(--amber-a8);--accent-a9: var(--amber-a9);--accent-a10: var(--amber-a10);--accent-a11: var(--amber-a11);--accent-a12: var(--amber-a12);--accent-contrast: var(--amber-contrast);--accent-surface: var(--amber-surface);--accent-indicator: var(--amber-indicator);--accent-track: var(--amber-track)}[data-accent-color=blue]{--accent-1: var(--blue-1);--accent-2: var(--blue-2);--accent-3: var(--blue-3);--accent-4: var(--blue-4);--accent-5: var(--blue-5);--accent-6: var(--blue-6);--accent-7: var(--blue-7);--accent-8: var(--blue-8);--accent-9: var(--blue-9);--accent-10: var(--blue-10);--accent-11: var(--blue-11);--accent-12: var(--blue-12);--accent-a1: var(--blue-a1);--accent-a2: var(--blue-a2);--accent-a3: var(--blue-a3);--accent-a4: var(--blue-a4);--accent-a5: var(--blue-a5);--accent-a6: var(--blue-a6);--accent-a7: var(--blue-a7);--accent-a8: var(--blue-a8);--accent-a9: var(--blue-a9);--accent-a10: var(--blue-a10);--accent-a11: var(--blue-a11);--accent-a12: var(--blue-a12);--accent-contrast: var(--blue-contrast);--accent-surface: var(--blue-surface);--accent-indicator: var(--blue-indicator);--accent-track: var(--blue-track)}[data-accent-color=bronze]{--accent-1: var(--bronze-1);--accent-2: var(--bronze-2);--accent-3: var(--bronze-3);--accent-4: var(--bronze-4);--accent-5: var(--bronze-5);--accent-6: var(--bronze-6);--accent-7: var(--bronze-7);--accent-8: var(--bronze-8);--accent-9: var(--bronze-9);--accent-10: var(--bronze-10);--accent-11: var(--bronze-11);--accent-12: var(--bronze-12);--accent-a1: var(--bronze-a1);--accent-a2: var(--bronze-a2);--accent-a3: var(--bronze-a3);--accent-a4: var(--bronze-a4);--accent-a5: var(--bronze-a5);--accent-a6: var(--bronze-a6);--accent-a7: var(--bronze-a7);--accent-a8: var(--bronze-a8);--accent-a9: var(--bronze-a9);--accent-a10: var(--bronze-a10);--accent-a11: var(--bronze-a11);--accent-a12: var(--bronze-a12);--accent-contrast: var(--bronze-contrast);--accent-surface: var(--bronze-surface);--accent-indicator: var(--bronze-indicator);--accent-track: var(--bronze-track)}[data-accent-color=brown]{--accent-1: var(--brown-1);--accent-2: var(--brown-2);--accent-3: var(--brown-3);--accent-4: var(--brown-4);--accent-5: var(--brown-5);--accent-6: var(--brown-6);--accent-7: var(--brown-7);--accent-8: var(--brown-8);--accent-9: var(--brown-9);--accent-10: var(--brown-10);--accent-11: var(--brown-11);--accent-12: var(--brown-12);--accent-a1: var(--brown-a1);--accent-a2: var(--brown-a2);--accent-a3: var(--brown-a3);--accent-a4: var(--brown-a4);--accent-a5: var(--brown-a5);--accent-a6: var(--brown-a6);--accent-a7: var(--brown-a7);--accent-a8: var(--brown-a8);--accent-a9: var(--brown-a9);--accent-a10: var(--brown-a10);--accent-a11: var(--brown-a11);--accent-a12: var(--brown-a12);--accent-contrast: var(--brown-contrast);--accent-surface: var(--brown-surface);--accent-indicator: var(--brown-indicator);--accent-track: var(--brown-track)}[data-accent-color=crimson]{--accent-1: var(--crimson-1);--accent-2: var(--crimson-2);--accent-3: var(--crimson-3);--accent-4: var(--crimson-4);--accent-5: var(--crimson-5);--accent-6: var(--crimson-6);--accent-7: var(--crimson-7);--accent-8: var(--crimson-8);--accent-9: var(--crimson-9);--accent-10: var(--crimson-10);--accent-11: var(--crimson-11);--accent-12: var(--crimson-12);--accent-a1: var(--crimson-a1);--accent-a2: var(--crimson-a2);--accent-a3: var(--crimson-a3);--accent-a4: var(--crimson-a4);--accent-a5: var(--crimson-a5);--accent-a6: var(--crimson-a6);--accent-a7: var(--crimson-a7);--accent-a8: var(--crimson-a8);--accent-a9: var(--crimson-a9);--accent-a10: var(--crimson-a10);--accent-a11: var(--crimson-a11);--accent-a12: var(--crimson-a12);--accent-contrast: var(--crimson-contrast);--accent-surface: var(--crimson-surface);--accent-indicator: var(--crimson-indicator);--accent-track: var(--crimson-track)}[data-accent-color=cyan]{--accent-1: var(--cyan-1);--accent-2: var(--cyan-2);--accent-3: var(--cyan-3);--accent-4: var(--cyan-4);--accent-5: var(--cyan-5);--accent-6: var(--cyan-6);--accent-7: var(--cyan-7);--accent-8: var(--cyan-8);--accent-9: var(--cyan-9);--accent-10: var(--cyan-10);--accent-11: var(--cyan-11);--accent-12: var(--cyan-12);--accent-a1: var(--cyan-a1);--accent-a2: var(--cyan-a2);--accent-a3: var(--cyan-a3);--accent-a4: var(--cyan-a4);--accent-a5: var(--cyan-a5);--accent-a6: var(--cyan-a6);--accent-a7: var(--cyan-a7);--accent-a8: var(--cyan-a8);--accent-a9: var(--cyan-a9);--accent-a10: var(--cyan-a10);--accent-a11: var(--cyan-a11);--accent-a12: var(--cyan-a12);--accent-contrast: var(--cyan-contrast);--accent-surface: var(--cyan-surface);--accent-indicator: var(--cyan-indicator);--accent-track: var(--cyan-track)}[data-accent-color=gold]{--accent-1: var(--gold-1);--accent-2: var(--gold-2);--accent-3: var(--gold-3);--accent-4: var(--gold-4);--accent-5: var(--gold-5);--accent-6: var(--gold-6);--accent-7: var(--gold-7);--accent-8: var(--gold-8);--accent-9: var(--gold-9);--accent-10: var(--gold-10);--accent-11: var(--gold-11);--accent-12: var(--gold-12);--accent-a1: var(--gold-a1);--accent-a2: var(--gold-a2);--accent-a3: var(--gold-a3);--accent-a4: var(--gold-a4);--accent-a5: var(--gold-a5);--accent-a6: var(--gold-a6);--accent-a7: var(--gold-a7);--accent-a8: var(--gold-a8);--accent-a9: var(--gold-a9);--accent-a10: var(--gold-a10);--accent-a11: var(--gold-a11);--accent-a12: var(--gold-a12);--accent-contrast: var(--gold-contrast);--accent-surface: var(--gold-surface);--accent-indicator: var(--gold-indicator);--accent-track: var(--gold-track)}[data-accent-color=grass]{--accent-1: var(--grass-1);--accent-2: var(--grass-2);--accent-3: var(--grass-3);--accent-4: var(--grass-4);--accent-5: var(--grass-5);--accent-6: var(--grass-6);--accent-7: var(--grass-7);--accent-8: var(--grass-8);--accent-9: var(--grass-9);--accent-10: var(--grass-10);--accent-11: var(--grass-11);--accent-12: var(--grass-12);--accent-a1: var(--grass-a1);--accent-a2: var(--grass-a2);--accent-a3: var(--grass-a3);--accent-a4: var(--grass-a4);--accent-a5: var(--grass-a5);--accent-a6: var(--grass-a6);--accent-a7: var(--grass-a7);--accent-a8: var(--grass-a8);--accent-a9: var(--grass-a9);--accent-a10: var(--grass-a10);--accent-a11: var(--grass-a11);--accent-a12: var(--grass-a12);--accent-contrast: var(--grass-contrast);--accent-surface: var(--grass-surface);--accent-indicator: var(--grass-indicator);--accent-track: var(--grass-track)}[data-accent-color=gray]{--accent-1: var(--gray-1);--accent-2: var(--gray-2);--accent-3: var(--gray-3);--accent-4: var(--gray-4);--accent-5: var(--gray-5);--accent-6: var(--gray-6);--accent-7: var(--gray-7);--accent-8: var(--gray-8);--accent-9: var(--gray-9);--accent-10: var(--gray-10);--accent-11: var(--gray-11);--accent-12: var(--gray-12);--accent-a1: var(--gray-a1);--accent-a2: var(--gray-a2);--accent-a3: var(--gray-a3);--accent-a4: var(--gray-a4);--accent-a5: var(--gray-a5);--accent-a6: var(--gray-a6);--accent-a7: var(--gray-a7);--accent-a8: var(--gray-a8);--accent-a9: var(--gray-a9);--accent-a10: var(--gray-a10);--accent-a11: var(--gray-a11);--accent-a12: var(--gray-a12);--accent-contrast: var(--gray-contrast);--accent-surface: var(--gray-surface);--accent-indicator: var(--gray-indicator);--accent-track: var(--gray-track)}[data-accent-color=green]{--accent-1: var(--green-1);--accent-2: var(--green-2);--accent-3: var(--green-3);--accent-4: var(--green-4);--accent-5: var(--green-5);--accent-6: var(--green-6);--accent-7: var(--green-7);--accent-8: var(--green-8);--accent-9: var(--green-9);--accent-10: var(--green-10);--accent-11: var(--green-11);--accent-12: var(--green-12);--accent-a1: var(--green-a1);--accent-a2: var(--green-a2);--accent-a3: var(--green-a3);--accent-a4: var(--green-a4);--accent-a5: var(--green-a5);--accent-a6: var(--green-a6);--accent-a7: var(--green-a7);--accent-a8: var(--green-a8);--accent-a9: var(--green-a9);--accent-a10: var(--green-a10);--accent-a11: var(--green-a11);--accent-a12: var(--green-a12);--accent-contrast: var(--green-contrast);--accent-surface: var(--green-surface);--accent-indicator: var(--green-indicator);--accent-track: var(--green-track)}[data-accent-color=indigo]{--accent-1: var(--indigo-1);--accent-2: var(--indigo-2);--accent-3: var(--indigo-3);--accent-4: var(--indigo-4);--accent-5: var(--indigo-5);--accent-6: var(--indigo-6);--accent-7: var(--indigo-7);--accent-8: var(--indigo-8);--accent-9: var(--indigo-9);--accent-10: var(--indigo-10);--accent-11: var(--indigo-11);--accent-12: var(--indigo-12);--accent-a1: var(--indigo-a1);--accent-a2: var(--indigo-a2);--accent-a3: var(--indigo-a3);--accent-a4: var(--indigo-a4);--accent-a5: var(--indigo-a5);--accent-a6: var(--indigo-a6);--accent-a7: var(--indigo-a7);--accent-a8: var(--indigo-a8);--accent-a9: var(--indigo-a9);--accent-a10: var(--indigo-a10);--accent-a11: var(--indigo-a11);--accent-a12: var(--indigo-a12);--accent-contrast: var(--indigo-contrast);--accent-surface: var(--indigo-surface);--accent-indicator: var(--indigo-indicator);--accent-track: var(--indigo-track)}[data-accent-color=iris]{--accent-1: var(--iris-1);--accent-2: var(--iris-2);--accent-3: var(--iris-3);--accent-4: var(--iris-4);--accent-5: var(--iris-5);--accent-6: var(--iris-6);--accent-7: var(--iris-7);--accent-8: var(--iris-8);--accent-9: var(--iris-9);--accent-10: var(--iris-10);--accent-11: var(--iris-11);--accent-12: var(--iris-12);--accent-a1: var(--iris-a1);--accent-a2: var(--iris-a2);--accent-a3: var(--iris-a3);--accent-a4: var(--iris-a4);--accent-a5: var(--iris-a5);--accent-a6: var(--iris-a6);--accent-a7: var(--iris-a7);--accent-a8: var(--iris-a8);--accent-a9: var(--iris-a9);--accent-a10: var(--iris-a10);--accent-a11: var(--iris-a11);--accent-a12: var(--iris-a12);--accent-contrast: var(--iris-contrast);--accent-surface: var(--iris-surface);--accent-indicator: var(--iris-indicator);--accent-track: var(--iris-track)}[data-accent-color=jade]{--accent-1: var(--jade-1);--accent-2: var(--jade-2);--accent-3: var(--jade-3);--accent-4: var(--jade-4);--accent-5: var(--jade-5);--accent-6: var(--jade-6);--accent-7: var(--jade-7);--accent-8: var(--jade-8);--accent-9: var(--jade-9);--accent-10: var(--jade-10);--accent-11: var(--jade-11);--accent-12: var(--jade-12);--accent-a1: var(--jade-a1);--accent-a2: var(--jade-a2);--accent-a3: var(--jade-a3);--accent-a4: var(--jade-a4);--accent-a5: var(--jade-a5);--accent-a6: var(--jade-a6);--accent-a7: var(--jade-a7);--accent-a8: var(--jade-a8);--accent-a9: var(--jade-a9);--accent-a10: var(--jade-a10);--accent-a11: var(--jade-a11);--accent-a12: var(--jade-a12);--accent-contrast: var(--jade-contrast);--accent-surface: var(--jade-surface);--accent-indicator: var(--jade-indicator);--accent-track: var(--jade-track)}[data-accent-color=lime]{--accent-1: var(--lime-1);--accent-2: var(--lime-2);--accent-3: var(--lime-3);--accent-4: var(--lime-4);--accent-5: var(--lime-5);--accent-6: var(--lime-6);--accent-7: var(--lime-7);--accent-8: var(--lime-8);--accent-9: var(--lime-9);--accent-10: var(--lime-10);--accent-11: var(--lime-11);--accent-12: var(--lime-12);--accent-a1: var(--lime-a1);--accent-a2: var(--lime-a2);--accent-a3: var(--lime-a3);--accent-a4: var(--lime-a4);--accent-a5: var(--lime-a5);--accent-a6: var(--lime-a6);--accent-a7: var(--lime-a7);--accent-a8: var(--lime-a8);--accent-a9: var(--lime-a9);--accent-a10: var(--lime-a10);--accent-a11: var(--lime-a11);--accent-a12: var(--lime-a12);--accent-contrast: var(--lime-contrast);--accent-surface: var(--lime-surface);--accent-indicator: var(--lime-indicator);--accent-track: var(--lime-track)}[data-accent-color=mint]{--accent-1: var(--mint-1);--accent-2: var(--mint-2);--accent-3: var(--mint-3);--accent-4: var(--mint-4);--accent-5: var(--mint-5);--accent-6: var(--mint-6);--accent-7: var(--mint-7);--accent-8: var(--mint-8);--accent-9: var(--mint-9);--accent-10: var(--mint-10);--accent-11: var(--mint-11);--accent-12: var(--mint-12);--accent-a1: var(--mint-a1);--accent-a2: var(--mint-a2);--accent-a3: var(--mint-a3);--accent-a4: var(--mint-a4);--accent-a5: var(--mint-a5);--accent-a6: var(--mint-a6);--accent-a7: var(--mint-a7);--accent-a8: var(--mint-a8);--accent-a9: var(--mint-a9);--accent-a10: var(--mint-a10);--accent-a11: var(--mint-a11);--accent-a12: var(--mint-a12);--accent-contrast: var(--mint-contrast);--accent-surface: var(--mint-surface);--accent-indicator: var(--mint-indicator);--accent-track: var(--mint-track)}[data-accent-color=orange]{--accent-1: var(--orange-1);--accent-2: var(--orange-2);--accent-3: var(--orange-3);--accent-4: var(--orange-4);--accent-5: var(--orange-5);--accent-6: var(--orange-6);--accent-7: var(--orange-7);--accent-8: var(--orange-8);--accent-9: var(--orange-9);--accent-10: var(--orange-10);--accent-11: var(--orange-11);--accent-12: var(--orange-12);--accent-a1: var(--orange-a1);--accent-a2: var(--orange-a2);--accent-a3: var(--orange-a3);--accent-a4: var(--orange-a4);--accent-a5: var(--orange-a5);--accent-a6: var(--orange-a6);--accent-a7: var(--orange-a7);--accent-a8: var(--orange-a8);--accent-a9: var(--orange-a9);--accent-a10: var(--orange-a10);--accent-a11: var(--orange-a11);--accent-a12: var(--orange-a12);--accent-contrast: var(--orange-contrast);--accent-surface: var(--orange-surface);--accent-indicator: var(--orange-indicator);--accent-track: var(--orange-track)}[data-accent-color=pink]{--accent-1: var(--pink-1);--accent-2: var(--pink-2);--accent-3: var(--pink-3);--accent-4: var(--pink-4);--accent-5: var(--pink-5);--accent-6: var(--pink-6);--accent-7: var(--pink-7);--accent-8: var(--pink-8);--accent-9: var(--pink-9);--accent-10: var(--pink-10);--accent-11: var(--pink-11);--accent-12: var(--pink-12);--accent-a1: var(--pink-a1);--accent-a2: var(--pink-a2);--accent-a3: var(--pink-a3);--accent-a4: var(--pink-a4);--accent-a5: var(--pink-a5);--accent-a6: var(--pink-a6);--accent-a7: var(--pink-a7);--accent-a8: var(--pink-a8);--accent-a9: var(--pink-a9);--accent-a10: var(--pink-a10);--accent-a11: var(--pink-a11);--accent-a12: var(--pink-a12);--accent-contrast: var(--pink-contrast);--accent-surface: var(--pink-surface);--accent-indicator: var(--pink-indicator);--accent-track: var(--pink-track)}[data-accent-color=plum]{--accent-1: var(--plum-1);--accent-2: var(--plum-2);--accent-3: var(--plum-3);--accent-4: var(--plum-4);--accent-5: var(--plum-5);--accent-6: var(--plum-6);--accent-7: var(--plum-7);--accent-8: var(--plum-8);--accent-9: var(--plum-9);--accent-10: var(--plum-10);--accent-11: var(--plum-11);--accent-12: var(--plum-12);--accent-a1: var(--plum-a1);--accent-a2: var(--plum-a2);--accent-a3: var(--plum-a3);--accent-a4: var(--plum-a4);--accent-a5: var(--plum-a5);--accent-a6: var(--plum-a6);--accent-a7: var(--plum-a7);--accent-a8: var(--plum-a8);--accent-a9: var(--plum-a9);--accent-a10: var(--plum-a10);--accent-a11: var(--plum-a11);--accent-a12: var(--plum-a12);--accent-contrast: var(--plum-contrast);--accent-surface: var(--plum-surface);--accent-indicator: var(--plum-indicator);--accent-track: var(--plum-track)}[data-accent-color=purple]{--accent-1: var(--purple-1);--accent-2: var(--purple-2);--accent-3: var(--purple-3);--accent-4: var(--purple-4);--accent-5: var(--purple-5);--accent-6: var(--purple-6);--accent-7: var(--purple-7);--accent-8: var(--purple-8);--accent-9: var(--purple-9);--accent-10: var(--purple-10);--accent-11: var(--purple-11);--accent-12: var(--purple-12);--accent-a1: var(--purple-a1);--accent-a2: var(--purple-a2);--accent-a3: var(--purple-a3);--accent-a4: var(--purple-a4);--accent-a5: var(--purple-a5);--accent-a6: var(--purple-a6);--accent-a7: var(--purple-a7);--accent-a8: var(--purple-a8);--accent-a9: var(--purple-a9);--accent-a10: var(--purple-a10);--accent-a11: var(--purple-a11);--accent-a12: var(--purple-a12);--accent-contrast: var(--purple-contrast);--accent-surface: var(--purple-surface);--accent-indicator: var(--purple-indicator);--accent-track: var(--purple-track)}[data-accent-color=red]{--accent-1: var(--red-1);--accent-2: var(--red-2);--accent-3: var(--red-3);--accent-4: var(--red-4);--accent-5: var(--red-5);--accent-6: var(--red-6);--accent-7: var(--red-7);--accent-8: var(--red-8);--accent-9: var(--red-9);--accent-10: var(--red-10);--accent-11: var(--red-11);--accent-12: var(--red-12);--accent-a1: var(--red-a1);--accent-a2: var(--red-a2);--accent-a3: var(--red-a3);--accent-a4: var(--red-a4);--accent-a5: var(--red-a5);--accent-a6: var(--red-a6);--accent-a7: var(--red-a7);--accent-a8: var(--red-a8);--accent-a9: var(--red-a9);--accent-a10: var(--red-a10);--accent-a11: var(--red-a11);--accent-a12: var(--red-a12);--accent-contrast: var(--red-contrast);--accent-surface: var(--red-surface);--accent-indicator: var(--red-indicator);--accent-track: var(--red-track)}[data-accent-color=ruby]{--accent-1: var(--ruby-1);--accent-2: var(--ruby-2);--accent-3: var(--ruby-3);--accent-4: var(--ruby-4);--accent-5: var(--ruby-5);--accent-6: var(--ruby-6);--accent-7: var(--ruby-7);--accent-8: var(--ruby-8);--accent-9: var(--ruby-9);--accent-10: var(--ruby-10);--accent-11: var(--ruby-11);--accent-12: var(--ruby-12);--accent-a1: var(--ruby-a1);--accent-a2: var(--ruby-a2);--accent-a3: var(--ruby-a3);--accent-a4: var(--ruby-a4);--accent-a5: var(--ruby-a5);--accent-a6: var(--ruby-a6);--accent-a7: var(--ruby-a7);--accent-a8: var(--ruby-a8);--accent-a9: var(--ruby-a9);--accent-a10: var(--ruby-a10);--accent-a11: var(--ruby-a11);--accent-a12: var(--ruby-a12);--accent-contrast: var(--ruby-contrast);--accent-surface: var(--ruby-surface);--accent-indicator: var(--ruby-indicator);--accent-track: var(--ruby-track)}[data-accent-color=sky]{--accent-1: var(--sky-1);--accent-2: var(--sky-2);--accent-3: var(--sky-3);--accent-4: var(--sky-4);--accent-5: var(--sky-5);--accent-6: var(--sky-6);--accent-7: var(--sky-7);--accent-8: var(--sky-8);--accent-9: var(--sky-9);--accent-10: var(--sky-10);--accent-11: var(--sky-11);--accent-12: var(--sky-12);--accent-a1: var(--sky-a1);--accent-a2: var(--sky-a2);--accent-a3: var(--sky-a3);--accent-a4: var(--sky-a4);--accent-a5: var(--sky-a5);--accent-a6: var(--sky-a6);--accent-a7: var(--sky-a7);--accent-a8: var(--sky-a8);--accent-a9: var(--sky-a9);--accent-a10: var(--sky-a10);--accent-a11: var(--sky-a11);--accent-a12: var(--sky-a12);--accent-contrast: var(--sky-contrast);--accent-surface: var(--sky-surface);--accent-indicator: var(--sky-indicator);--accent-track: var(--sky-track)}[data-accent-color=teal]{--accent-1: var(--teal-1);--accent-2: var(--teal-2);--accent-3: var(--teal-3);--accent-4: var(--teal-4);--accent-5: var(--teal-5);--accent-6: var(--teal-6);--accent-7: var(--teal-7);--accent-8: var(--teal-8);--accent-9: var(--teal-9);--accent-10: var(--teal-10);--accent-11: var(--teal-11);--accent-12: var(--teal-12);--accent-a1: var(--teal-a1);--accent-a2: var(--teal-a2);--accent-a3: var(--teal-a3);--accent-a4: var(--teal-a4);--accent-a5: var(--teal-a5);--accent-a6: var(--teal-a6);--accent-a7: var(--teal-a7);--accent-a8: var(--teal-a8);--accent-a9: var(--teal-a9);--accent-a10: var(--teal-a10);--accent-a11: var(--teal-a11);--accent-a12: var(--teal-a12);--accent-contrast: var(--teal-contrast);--accent-surface: var(--teal-surface);--accent-indicator: var(--teal-indicator);--accent-track: var(--teal-track)}[data-accent-color=tomato]{--accent-1: var(--tomato-1);--accent-2: var(--tomato-2);--accent-3: var(--tomato-3);--accent-4: var(--tomato-4);--accent-5: var(--tomato-5);--accent-6: var(--tomato-6);--accent-7: var(--tomato-7);--accent-8: var(--tomato-8);--accent-9: var(--tomato-9);--accent-10: var(--tomato-10);--accent-11: var(--tomato-11);--accent-12: var(--tomato-12);--accent-a1: var(--tomato-a1);--accent-a2: var(--tomato-a2);--accent-a3: var(--tomato-a3);--accent-a4: var(--tomato-a4);--accent-a5: var(--tomato-a5);--accent-a6: var(--tomato-a6);--accent-a7: var(--tomato-a7);--accent-a8: var(--tomato-a8);--accent-a9: var(--tomato-a9);--accent-a10: var(--tomato-a10);--accent-a11: var(--tomato-a11);--accent-a12: var(--tomato-a12);--accent-contrast: var(--tomato-contrast);--accent-surface: var(--tomato-surface);--accent-indicator: var(--tomato-indicator);--accent-track: var(--tomato-track)}[data-accent-color=violet]{--accent-1: var(--violet-1);--accent-2: var(--violet-2);--accent-3: var(--violet-3);--accent-4: var(--violet-4);--accent-5: var(--violet-5);--accent-6: var(--violet-6);--accent-7: var(--violet-7);--accent-8: var(--violet-8);--accent-9: var(--violet-9);--accent-10: var(--violet-10);--accent-11: var(--violet-11);--accent-12: var(--violet-12);--accent-a1: var(--violet-a1);--accent-a2: var(--violet-a2);--accent-a3: var(--violet-a3);--accent-a4: var(--violet-a4);--accent-a5: var(--violet-a5);--accent-a6: var(--violet-a6);--accent-a7: var(--violet-a7);--accent-a8: var(--violet-a8);--accent-a9: var(--violet-a9);--accent-a10: var(--violet-a10);--accent-a11: var(--violet-a11);--accent-a12: var(--violet-a12);--accent-contrast: var(--violet-contrast);--accent-surface: var(--violet-surface);--accent-indicator: var(--violet-indicator);--accent-track: var(--violet-track)}[data-accent-color=yellow]{--accent-1: var(--yellow-1);--accent-2: var(--yellow-2);--accent-3: var(--yellow-3);--accent-4: var(--yellow-4);--accent-5: var(--yellow-5);--accent-6: var(--yellow-6);--accent-7: var(--yellow-7);--accent-8: var(--yellow-8);--accent-9: var(--yellow-9);--accent-10: var(--yellow-10);--accent-11: var(--yellow-11);--accent-12: var(--yellow-12);--accent-a1: var(--yellow-a1);--accent-a2: var(--yellow-a2);--accent-a3: var(--yellow-a3);--accent-a4: var(--yellow-a4);--accent-a5: var(--yellow-a5);--accent-a6: var(--yellow-a6);--accent-a7: var(--yellow-a7);--accent-a8: var(--yellow-a8);--accent-a9: var(--yellow-a9);--accent-a10: var(--yellow-a10);--accent-a11: var(--yellow-a11);--accent-a12: var(--yellow-a12);--accent-contrast: var(--yellow-contrast);--accent-surface: var(--yellow-surface);--accent-indicator: var(--yellow-indicator);--accent-track: var(--yellow-track)}.radix-themes:where([data-gray-color=mauve]){--gray-1: var(--mauve-1);--gray-2: var(--mauve-2);--gray-3: var(--mauve-3);--gray-4: var(--mauve-4);--gray-5: var(--mauve-5);--gray-6: var(--mauve-6);--gray-7: var(--mauve-7);--gray-8: var(--mauve-8);--gray-9: var(--mauve-9);--gray-10: var(--mauve-10);--gray-11: var(--mauve-11);--gray-12: var(--mauve-12);--gray-a1: var(--mauve-a1);--gray-a2: var(--mauve-a2);--gray-a3: var(--mauve-a3);--gray-a4: var(--mauve-a4);--gray-a5: var(--mauve-a5);--gray-a6: var(--mauve-a6);--gray-a7: var(--mauve-a7);--gray-a8: var(--mauve-a8);--gray-a9: var(--mauve-a9);--gray-a10: var(--mauve-a10);--gray-a11: var(--mauve-a11);--gray-a12: var(--mauve-a12);--gray-contrast: var(--mauve-contrast);--gray-surface: var(--mauve-surface);--gray-indicator: var(--mauve-indicator);--gray-track: var(--mauve-track)}.radix-themes:where([data-gray-color=olive]){--gray-1: var(--olive-1);--gray-2: var(--olive-2);--gray-3: var(--olive-3);--gray-4: var(--olive-4);--gray-5: var(--olive-5);--gray-6: var(--olive-6);--gray-7: var(--olive-7);--gray-8: var(--olive-8);--gray-9: var(--olive-9);--gray-10: var(--olive-10);--gray-11: var(--olive-11);--gray-12: var(--olive-12);--gray-a1: var(--olive-a1);--gray-a2: var(--olive-a2);--gray-a3: var(--olive-a3);--gray-a4: var(--olive-a4);--gray-a5: var(--olive-a5);--gray-a6: var(--olive-a6);--gray-a7: var(--olive-a7);--gray-a8: var(--olive-a8);--gray-a9: var(--olive-a9);--gray-a10: var(--olive-a10);--gray-a11: var(--olive-a11);--gray-a12: var(--olive-a12);--gray-contrast: var(--olive-contrast);--gray-surface: var(--olive-surface);--gray-indicator: var(--olive-indicator);--gray-track: var(--olive-track)}.radix-themes:where([data-gray-color=sage]){--gray-1: var(--sage-1);--gray-2: var(--sage-2);--gray-3: var(--sage-3);--gray-4: var(--sage-4);--gray-5: var(--sage-5);--gray-6: var(--sage-6);--gray-7: var(--sage-7);--gray-8: var(--sage-8);--gray-9: var(--sage-9);--gray-10: var(--sage-10);--gray-11: var(--sage-11);--gray-12: var(--sage-12);--gray-a1: var(--sage-a1);--gray-a2: var(--sage-a2);--gray-a3: var(--sage-a3);--gray-a4: var(--sage-a4);--gray-a5: var(--sage-a5);--gray-a6: var(--sage-a6);--gray-a7: var(--sage-a7);--gray-a8: var(--sage-a8);--gray-a9: var(--sage-a9);--gray-a10: var(--sage-a10);--gray-a11: var(--sage-a11);--gray-a12: var(--sage-a12);--gray-contrast: var(--sage-contrast);--gray-surface: var(--sage-surface);--gray-indicator: var(--sage-indicator);--gray-track: var(--sage-track)}.radix-themes:where([data-gray-color=sand]){--gray-1: var(--sand-1);--gray-2: var(--sand-2);--gray-3: var(--sand-3);--gray-4: var(--sand-4);--gray-5: var(--sand-5);--gray-6: var(--sand-6);--gray-7: var(--sand-7);--gray-8: var(--sand-8);--gray-9: var(--sand-9);--gray-10: var(--sand-10);--gray-11: var(--sand-11);--gray-12: var(--sand-12);--gray-a1: var(--sand-a1);--gray-a2: var(--sand-a2);--gray-a3: var(--sand-a3);--gray-a4: var(--sand-a4);--gray-a5: var(--sand-a5);--gray-a6: var(--sand-a6);--gray-a7: var(--sand-a7);--gray-a8: var(--sand-a8);--gray-a9: var(--sand-a9);--gray-a10: var(--sand-a10);--gray-a11: var(--sand-a11);--gray-a12: var(--sand-a12);--gray-contrast: var(--sand-contrast);--gray-surface: var(--sand-surface);--gray-indicator: var(--sand-indicator);--gray-track: var(--sand-track)}.radix-themes:where([data-gray-color=slate]){--gray-1: var(--slate-1);--gray-2: var(--slate-2);--gray-3: var(--slate-3);--gray-4: var(--slate-4);--gray-5: var(--slate-5);--gray-6: var(--slate-6);--gray-7: var(--slate-7);--gray-8: var(--slate-8);--gray-9: var(--slate-9);--gray-10: var(--slate-10);--gray-11: var(--slate-11);--gray-12: var(--slate-12);--gray-a1: var(--slate-a1);--gray-a2: var(--slate-a2);--gray-a3: var(--slate-a3);--gray-a4: var(--slate-a4);--gray-a5: var(--slate-a5);--gray-a6: var(--slate-a6);--gray-a7: var(--slate-a7);--gray-a8: var(--slate-a8);--gray-a9: var(--slate-a9);--gray-a10: var(--slate-a10);--gray-a11: var(--slate-a11);--gray-a12: var(--slate-a12);--gray-contrast: var(--slate-contrast);--gray-surface: var(--slate-surface);--gray-indicator: var(--slate-indicator);--gray-track: var(--slate-track)}.radix-themes{--cursor-button: default;--cursor-checkbox: default;--cursor-disabled: not-allowed;--cursor-link: pointer;--cursor-menu-item: default;--cursor-radio: default;--cursor-slider-thumb: default;--cursor-slider-thumb-active: default;--cursor-switch: default;--space-1: calc(4px * var(--scaling));--space-2: calc(8px * var(--scaling));--space-3: calc(12px * var(--scaling));--space-4: calc(16px * var(--scaling));--space-5: calc(24px * var(--scaling));--space-6: calc(32px * var(--scaling));--space-7: calc(40px * var(--scaling));--space-8: calc(48px * var(--scaling));--space-9: calc(64px * var(--scaling));--font-size-1: calc(12px * var(--scaling));--font-size-2: calc(14px * var(--scaling));--font-size-3: calc(16px * var(--scaling));--font-size-4: calc(18px * var(--scaling));--font-size-5: calc(20px * var(--scaling));--font-size-6: calc(24px * var(--scaling));--font-size-7: calc(28px * var(--scaling));--font-size-8: calc(35px * var(--scaling));--font-size-9: calc(60px * var(--scaling));--font-weight-light: 300;--font-weight-regular: 400;--font-weight-medium: 500;--font-weight-bold: 700;--line-height-1: calc(16px * var(--scaling));--line-height-2: calc(20px * var(--scaling));--line-height-3: calc(24px * var(--scaling));--line-height-4: calc(26px * var(--scaling));--line-height-5: calc(28px * var(--scaling));--line-height-6: calc(30px * var(--scaling));--line-height-7: calc(36px * var(--scaling));--line-height-8: calc(40px * var(--scaling));--line-height-9: calc(60px * var(--scaling));--letter-spacing-1: .0025em;--letter-spacing-2: 0em;--letter-spacing-3: 0em;--letter-spacing-4: -.0025em;--letter-spacing-5: -.005em;--letter-spacing-6: -.00625em;--letter-spacing-7: -.0075em;--letter-spacing-8: -.01em;--letter-spacing-9: -.025em;--default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI (Custom)", Roboto, "Helvetica Neue", "Open Sans (Custom)", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--default-font-size: var(--font-size-3);--default-font-style: normal;--default-font-weight: var(--font-weight-regular);--default-line-height: 1.5;--default-letter-spacing: 0em;--default-leading-trim-start: .42em;--default-leading-trim-end: .36em;--heading-font-family: var(--default-font-family);--heading-font-size-adjust: 1;--heading-font-style: normal;--heading-leading-trim-start: var(--default-leading-trim-start);--heading-leading-trim-end: var(--default-leading-trim-end);--heading-letter-spacing: 0em;--heading-line-height-1: calc(16px * var(--scaling));--heading-line-height-2: calc(18px * var(--scaling));--heading-line-height-3: calc(22px * var(--scaling));--heading-line-height-4: calc(24px * var(--scaling));--heading-line-height-5: calc(26px * var(--scaling));--heading-line-height-6: calc(30px * var(--scaling));--heading-line-height-7: calc(36px * var(--scaling));--heading-line-height-8: calc(40px * var(--scaling));--heading-line-height-9: calc(60px * var(--scaling));--code-font-family: "Menlo", "Consolas (Custom)", "Bitstream Vera Sans Mono", monospace, "Apple Color Emoji", "Segoe UI Emoji";--code-font-size-adjust: .95;--code-font-style: normal;--code-font-weight: inherit;--code-letter-spacing: -.007em;--code-padding-top: .1em;--code-padding-bottom: .1em;--code-padding-left: .25em;--code-padding-right: .25em;--strong-font-family: var(--default-font-family);--strong-font-size-adjust: 1;--strong-font-style: inherit;--strong-font-weight: var(--font-weight-bold);--strong-letter-spacing: 0em;--em-font-family: "Times New Roman", "Times", serif;--em-font-size-adjust: 1.18;--em-font-style: italic;--em-font-weight: inherit;--em-letter-spacing: -.025em;--quote-font-family: "Times New Roman", "Times", serif;--quote-font-size-adjust: 1.18;--quote-font-style: italic;--quote-font-weight: inherit;--quote-letter-spacing: -.025em;--tab-active-letter-spacing: -.01em;--tab-active-word-spacing: 0em;--tab-inactive-letter-spacing: 0em;--tab-inactive-word-spacing: 0em;overflow-wrap:break-word;font-family:var(--default-font-family);font-size:var(--default-font-size);font-weight:var(--default-font-weight);font-style:var(--default-font-style);line-height:var(--default-line-height);letter-spacing:var(--default-letter-spacing);-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--container-1: 448px;--container-2: 688px;--container-3: 880px;--container-4: 1136px;--scrollarea-scrollbar-horizontal-margin-top: var(--space-1);--scrollarea-scrollbar-horizontal-margin-bottom: var(--space-1);--scrollarea-scrollbar-horizontal-margin-left: var(--space-1);--scrollarea-scrollbar-horizontal-margin-right: var(--space-1);--scrollarea-scrollbar-vertical-margin-top: var(--space-1);--scrollarea-scrollbar-vertical-margin-bottom: var(--space-1);--scrollarea-scrollbar-vertical-margin-left: var(--space-1);--scrollarea-scrollbar-vertical-margin-right: var(--space-1);--segmented-control-transition-duration: .1s;--spinner-animation-duration: .8s;--spinner-opacity: .65;color:var(--gray-12)}.radix-themes:where([data-scaling="90%"]){--scaling: .9}.radix-themes:where([data-scaling="95%"]){--scaling: .95}.radix-themes:where([data-scaling="100%"]){--scaling: 1}.radix-themes:where([data-scaling="105%"]){--scaling: 1.05}.radix-themes:where([data-scaling="110%"]){--scaling: 1.1}[data-radius]{--radius-1: calc(3px * var(--scaling) * var(--radius-factor));--radius-2: calc(4px * var(--scaling) * var(--radius-factor));--radius-3: calc(6px * var(--scaling) * var(--radius-factor));--radius-4: calc(8px * var(--scaling) * var(--radius-factor));--radius-5: calc(12px * var(--scaling) * var(--radius-factor));--radius-6: calc(16px * var(--scaling) * var(--radius-factor))}[data-radius=none]{--radius-factor: 0;--radius-full: 0px;--radius-thumb: .5px}[data-radius=small]{--radius-factor: .75;--radius-full: 0px;--radius-thumb: .5px}[data-radius=medium]{--radius-factor: 1;--radius-full: 0px;--radius-thumb: 9999px}[data-radius=large]{--radius-factor: 1.5;--radius-full: 0px;--radius-thumb: 9999px}[data-radius=full]{--radius-factor: 1.5;--radius-full: 9999px;--radius-thumb: 9999px}@supports (color: color-mix(in oklab,white,black)){:where(.radix-themes){--shadow-1: inset 0 0 0 1px var(--gray-a5), inset 0 1.5px 2px 0 var(--gray-a2), inset 0 1.5px 2px 0 var(--black-a2);--shadow-2: 0 0 0 1px color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%), 0 0 0 .5px var(--black-a1), 0 1px 1px 0 var(--gray-a2), 0 2px 1px -1px var(--black-a1), 0 1px 3px 0 var(--black-a1);--shadow-3: 0 0 0 1px color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%), 0 2px 3px -2px var(--gray-a3), 0 3px 12px -4px var(--black-a2), 0 4px 16px -8px var(--black-a2);--shadow-4: 0 0 0 1px color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%), 0 8px 40px var(--black-a1), 0 12px 32px -16px var(--gray-a3);--shadow-5: 0 0 0 1px color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%), 0 12px 60px var(--black-a3), 0 12px 32px -16px var(--gray-a5);--shadow-6: 0 0 0 1px color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%), 0 12px 60px var(--black-a3), 0 16px 64px var(--gray-a2), 0 16px 36px -20px var(--gray-a7);--base-card-surface-box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-a5), var(--gray-5) 25%);--base-card-surface-hover-box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-a7), var(--gray-7) 25%);--base-card-surface-active-box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%);--base-card-classic-border-color: color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%);--base-card-classic-hover-border-color: color-mix(in oklab, var(--gray-a4), var(--gray-4) 25%);--base-card-classic-active-border-color: color-mix(in oklab, var(--gray-a3), var(--gray-3) 25%)}:is(.dark,.dark-theme),:is(.dark,.dark-theme) :where(.radix-themes:not(.light,.light-theme)){--shadow-1: inset 0 -1px 1px 0 var(--gray-a3), inset 0 0 0 1px var(--gray-a3), inset 0 3px 4px 0 var(--black-a5), inset 0 0 0 1px var(--gray-a4);--shadow-2: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%), 0 0 0 .5px var(--black-a3), 0 1px 1px 0 var(--black-a6), 0 2px 1px -1px var(--black-a6), 0 1px 3px 0 var(--black-a5);--shadow-3: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%), 0 2px 3px -2px var(--black-a3), 0 3px 8px -2px var(--black-a6), 0 4px 12px -4px var(--black-a7);--shadow-4: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%), 0 8px 40px var(--black-a3), 0 12px 32px -16px var(--black-a5);--shadow-5: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%), 0 12px 60px var(--black-a5), 0 12px 32px -16px var(--black-a7);--shadow-6: 0 0 0 1px color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%), 0 12px 60px var(--black-a4), 0 16px 64px var(--black-a6), 0 16px 36px -20px var(--black-a11);--base-card-classic-border-color: color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%);--base-card-classic-hover-border-color: color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%);--base-card-classic-active-border-color: color-mix(in oklab, var(--gray-a6), var(--gray-6) 25%)}}@font-face{font-family:"Segoe UI (Custom)";font-weight:300;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Semilight"),local("Segoe UI")}@font-face{font-family:"Segoe UI (Custom)";font-weight:300;font-style:italic;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Semilight Italic"),local("Segoe UI Italic")}@font-face{font-family:"Segoe UI (Custom)";font-weight:400;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI")}@font-face{font-family:"Segoe UI (Custom)";font-weight:400;font-style:italic;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Italic")}@font-face{font-family:"Segoe UI (Custom)";font-weight:500;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Semibold"),local("Segoe UI")}@font-face{font-family:"Segoe UI (Custom)";font-weight:500;font-style:italic;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Semibold Italic"),local("Segoe UI Italic")}@font-face{font-family:"Segoe UI (Custom)";font-weight:700;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Bold")}@font-face{font-family:"Segoe UI (Custom)";font-weight:700;font-style:italic;size-adjust:103%;descent-override:35%;ascent-override:105%;src:local("Segoe UI Bold Italic")}@font-face{font-family:"Open Sans (Custom)";font-weight:300;descent-override:35%;src:local("Open Sans Light"),local("Open Sans Regular")}@font-face{font-family:"Open Sans (Custom)";font-weight:300;font-style:italic;descent-override:35%;src:local("Open Sans Light Italic"),local("Open Sans Italic")}@font-face{font-family:"Open Sans (Custom)";font-weight:400;descent-override:35%;src:local("Open Sans Regular")}@font-face{font-family:"Open Sans (Custom)";font-weight:400;font-style:italic;descent-override:35%;src:local("Open Sans Italic")}@font-face{font-family:"Open Sans (Custom)";font-weight:500;descent-override:35%;src:local("Open Sans Medium"),local("Open Sans Regular")}@font-face{font-family:"Open Sans (Custom)";font-weight:500;font-style:italic;descent-override:35%;src:local("Open Sans Medium Italic"),local("Open Sans Italic")}@font-face{font-family:"Open Sans (Custom)";font-weight:700;descent-override:35%;src:local("Open Sans Bold")}@font-face{font-family:"Open Sans (Custom)";font-weight:700;font-style:italic;descent-override:35%;src:local("Open Sans Bold Italic")}@font-face{font-family:"Consolas (Custom)";font-weight:400;size-adjust:110%;ascent-override:85%;descent-override:22%;src:local("Consolas")}@font-face{font-family:"Consolas (Custom)";font-weight:400;font-style:italic;size-adjust:110%;ascent-override:85%;descent-override:22%;src:local("Consolas Italic")}@font-face{font-family:"Consolas (Custom)";font-weight:700;size-adjust:110%;ascent-override:85%;descent-override:22%;src:local("Consolas Bold")}@font-face{font-family:"Consolas (Custom)";font-weight:700;font-style:italic;size-adjust:110%;ascent-override:85%;descent-override:22%;src:local("Consolas Bold Italic")}.rt-reset:where(body,blockquote,dl,dd,figure,p){margin:0}.rt-reset:where(address,b,cite,code,dfn,em,i,kbd,q,samp,small,strong,var){font:unset}.rt-reset:where(h1,h2,h3,h4,h5,h6){font:unset;margin:0}.rt-reset:where(a){all:unset;-webkit-tap-highlight-color:transparent}.rt-reset:where(button,select,[type=button],[type=image],[type=reset],[type=submit],[type=checkbox],[type=color],[type=radio],[type=range]){all:unset;display:inline-block;font-weight:400;font-style:normal;text-indent:initial;-webkit-tap-highlight-color:transparent}.rt-reset:where(label){-webkit-tap-highlight-color:transparent}.rt-reset:where(select){font-weight:400;font-style:normal;text-align:start}.rt-reset:where(textarea,input:not([type=button],[type=image],[type=reset],[type=submit],[type=checkbox],[type=color],[type=radio],[type=range])){all:unset;display:block;width:-webkit-fill-available;width:-moz-available;width:stretch;font-weight:400;font-style:normal;text-align:start;text-indent:initial;-webkit-tap-highlight-color:transparent;cursor:text;white-space:pre-wrap}.rt-reset:where(:focus){outline:none}.rt-reset::placeholder{color:unset;opacity:unset;-webkit-user-select:none;user-select:none}.rt-reset:where(table){all:unset;display:table;text-indent:initial}.rt-reset:where(caption){text-align:inherit}.rt-reset:where(td){padding:0}.rt-reset:where(th){font-weight:unset;text-align:inherit;padding:0}.rt-reset:where(abbr,acronym){text-decoration:none}.rt-reset:where(canvas,object,picture,summary){display:block}.rt-reset:where(del,s){text-decoration:unset}.rt-reset:where(fieldset,hr){all:unset;display:block}.rt-reset:where(legend){padding:0;border:none;cursor:default}.rt-reset:where(li){display:block;text-align:unset}.rt-reset:where(ol,ul){list-style:none;margin:0;padding:0}.rt-reset:where(iframe){display:block;border:none;width:-webkit-fill-available;width:-moz-available;width:stretch}.rt-reset:where(ins,u){text-decoration:none}.rt-reset:where(img){display:block;max-width:100%}.rt-reset:where(svg){display:block;max-width:100%;flex-shrink:0}.rt-reset:where(mark){all:unset}.rt-reset:where(pre){font:unset;margin:unset}.rt-reset:where(q):before,.rt-reset:where(q):after{content:""}.rt-reset:where(sub,sup){font:unset;vertical-align:unset}.rt-reset:where(details) ::marker,.rt-reset:where(summary)::marker{content:none}.rt-reset:where(video){display:block;width:-webkit-fill-available;width:-moz-available;width:stretch}.rt-reset:where(:any-link){cursor:var(--cursor-link)}.rt-reset:where(button){cursor:var(--cursor-button)}.rt-reset:where(:disabled,[data-disabled]){cursor:var(--cursor-disabled)}.rt-reset:where(input[type=checkbox]){cursor:var(--cursor-checkbox)}.rt-reset:where(input[type=radio]){cursor:var(--cursor-radio)}.rt-reset,.rt-reset:before,.rt-reset:after{box-sizing:border-box}@keyframes rt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes rt-slide-from-top{0%{transform:translateY(4px) scale(.97)}to{transform:translateY(0) scale(1)}}@keyframes rt-slide-to-top{0%{transform:translateY(0) scale(1)}to{transform:translateY(4px) scale(.97)}}@keyframes rt-slide-from-bottom{0%{transform:translateY(-4px) scale(.97)}to{transform:translateY(0) scale(1)}}@keyframes rt-slide-to-bottom{0%{transform:translateY(0) scale(1)}to{transform:translateY(-4px) scale(.97)}}@keyframes rt-slide-from-left{0%{transform:translate(4px) scale(.97)}to{transform:translate(0) scale(1)}}@keyframes rt-slide-to-left{0%{transform:translate(0) scale(1)}to{transform:translate(4px) scale(.97)}}@keyframes rt-slide-from-right{0%{transform:translate(-4px) scale(.97)}to{transform:translate(0) scale(1)}}@keyframes rt-slide-to-right{0%{transform:translate(0) scale(1)}to{transform:translate(-4px) scale(.97)}}@media (prefers-reduced-motion: no-preference){.rt-PopperContent{animation-timing-function:cubic-bezier(.16,1,.3,1)}.rt-PopperContent:where([data-state=open]){animation-duration:.16s}.rt-PopperContent:where([data-state=open]):where([data-side=top]){animation-name:rt-slide-from-top,rt-fade-in}.rt-PopperContent:where([data-state=open]):where([data-side=bottom]){animation-name:rt-slide-from-bottom,rt-fade-in}.rt-PopperContent:where([data-state=open]):where([data-side=left]){animation-name:rt-slide-from-left,rt-fade-in}.rt-PopperContent:where([data-state=open]):where([data-side=right]){animation-name:rt-slide-from-right,rt-fade-in}.rt-PopperContent:where([data-state=closed]){animation-duration:.1s}.rt-PopperContent:where([data-state=closed]):where([data-side=top]){animation-name:rt-slide-to-top,rt-fade-out}.rt-PopperContent:where([data-state=closed]):where([data-side=bottom]){animation-name:rt-slide-to-bottom,rt-fade-out}.rt-PopperContent:where([data-state=closed]):where([data-side=left]){animation-name:rt-slide-to-left,rt-fade-out}.rt-PopperContent:where([data-state=closed]):where([data-side=right]){animation-name:rt-slide-to-right,rt-fade-out}}.rt-Box{box-sizing:border-box;display:block}.rt-Flex{box-sizing:border-box;display:flex;justify-content:flex-start}.rt-Grid{box-sizing:border-box;display:grid;align-items:stretch;justify-content:flex-start;grid-template-columns:minmax(0,1fr);grid-template-rows:none}.rt-Section{box-sizing:border-box;flex-shrink:0}.rt-Section:where(.rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}@media (min-width: 520px){.rt-Section:where(.xs\:rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.xs\:rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.xs\:rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.xs\:rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}}@media (min-width: 768px){.rt-Section:where(.sm\:rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.sm\:rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.sm\:rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.sm\:rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}}@media (min-width: 1024px){.rt-Section:where(.md\:rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.md\:rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.md\:rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.md\:rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}}@media (min-width: 1280px){.rt-Section:where(.lg\:rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.lg\:rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.lg\:rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.lg\:rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}}@media (min-width: 1640px){.rt-Section:where(.xl\:rt-r-size-1){padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-Section:where(.xl\:rt-r-size-2){padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-Section:where(.xl\:rt-r-size-3){padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-Section:where(.xl\:rt-r-size-4){padding-top:calc(80px * var(--scaling));padding-bottom:calc(80px * var(--scaling))}}.rt-Container{display:flex;box-sizing:border-box;flex-direction:column;align-items:center;flex-shrink:0;flex-grow:1}.rt-ContainerInner{width:100%}:where(.rt-Container.rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}@media (min-width: 520px){:where(.rt-Container.xs\:rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.xs\:rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.xs\:rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.xs\:rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}}@media (min-width: 768px){:where(.rt-Container.sm\:rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.sm\:rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.sm\:rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.sm\:rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}}@media (min-width: 1024px){:where(.rt-Container.md\:rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.md\:rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.md\:rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.md\:rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}}@media (min-width: 1280px){:where(.rt-Container.lg\:rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.lg\:rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.lg\:rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.lg\:rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}}@media (min-width: 1640px){:where(.rt-Container.xl\:rt-r-size-1) .rt-ContainerInner{max-width:var(--container-1)}:where(.rt-Container.xl\:rt-r-size-2) .rt-ContainerInner{max-width:var(--container-2)}:where(.rt-Container.xl\:rt-r-size-3) .rt-ContainerInner{max-width:var(--container-3)}:where(.rt-Container.xl\:rt-r-size-4) .rt-ContainerInner{max-width:var(--container-4)}}.rt-Skeleton{--skeleton-radius: var(--skeleton-radius-override);--skeleton-height: var(--skeleton-height-override);border-radius:var(--radius-1);animation:rt-skeleton-pulse 1s infinite alternate-reverse!important;background-image:none!important;background-clip:border-box!important;border:none!important;box-shadow:none!important;-webkit-box-decoration-break:clone!important;box-decoration-break:clone!important;color:transparent!important;outline:none!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important;cursor:default!important}.rt-Skeleton:where([data-inline-skeleton]){line-height:0;font-family:Arial,sans-serif!important}:where(.rt-Skeleton:empty){display:block;height:var(--space-3)}.rt-Skeleton>*,.rt-Skeleton:after,.rt-Skeleton:before{visibility:hidden!important}@keyframes rt-skeleton-pulse{0%{background-color:var(--gray-a3)}to{background-color:var(--gray-a4)}}.rt-Text{line-height:var(--line-height, var(--default-line-height));letter-spacing:var(--letter-spacing, inherit)}:where(.rt-Text){margin:0}.rt-Text:where([data-accent-color]){color:var(--accent-a11)}.rt-Text:where([data-accent-color].rt-high-contrast),:where([data-accent-color]:not(.radix-themes)) .rt-Text:where(.rt-high-contrast){color:var(--accent-12)}@media (pointer: coarse){.rt-Text:where(label){-webkit-tap-highlight-color:transparent}.rt-Text:where(label):where(:active){outline:.75em solid var(--gray-a4);outline-offset:-.6em}}.rt-Text:where(.rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}@media (min-width: 520px){.rt-Text:where(.xs\:rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.xs\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.xs\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.xs\:rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.xs\:rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.xs\:rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.xs\:rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.xs\:rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.xs\:rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 768px){.rt-Text:where(.sm\:rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.sm\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.sm\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.sm\:rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.sm\:rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.sm\:rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.sm\:rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.sm\:rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.sm\:rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1024px){.rt-Text:where(.md\:rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.md\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.md\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.md\:rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.md\:rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.md\:rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.md\:rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.md\:rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.md\:rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1280px){.rt-Text:where(.lg\:rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.lg\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.lg\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.lg\:rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.lg\:rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.lg\:rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.lg\:rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.lg\:rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.lg\:rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1640px){.rt-Text:where(.xl\:rt-r-size-1){font-size:var(--font-size-1);--line-height: var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Text:where(.xl\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Text:where(.xl\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Text:where(.xl\:rt-r-size-4){font-size:var(--font-size-4);--line-height: var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Text:where(.xl\:rt-r-size-5){font-size:var(--font-size-5);--line-height: var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Text:where(.xl\:rt-r-size-6){font-size:var(--font-size-6);--line-height: var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Text:where(.xl\:rt-r-size-7){font-size:var(--font-size-7);--line-height: var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Text:where(.xl\:rt-r-size-8){font-size:var(--font-size-8);--line-height: var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Text:where(.xl\:rt-r-size-9){font-size:var(--font-size-9);--line-height: var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}.rt-BaseDialogOverlay{position:fixed;top:0;right:0;bottom:0;left:0}.rt-BaseDialogOverlay:before{position:fixed;content:"";top:0;right:0;bottom:0;left:0;background-color:var(--color-overlay)}.rt-BaseDialogScroll{display:flex;overflow:auto;position:absolute;top:0;right:0;bottom:0;left:0}.rt-BaseDialogScrollPadding{flex-grow:1;margin:auto;padding-top:var(--space-6);padding-bottom:max(var(--space-6),6vh);padding-left:var(--space-4);padding-right:var(--space-4)}.rt-BaseDialogScrollPadding:where(.rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.rt-r-align-center){margin-top:auto}@media (min-width: 520px){.rt-BaseDialogScrollPadding:where(.xs\:rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.xs\:rt-r-align-center){margin-top:auto}}@media (min-width: 768px){.rt-BaseDialogScrollPadding:where(.sm\:rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.sm\:rt-r-align-center){margin-top:auto}}@media (min-width: 1024px){.rt-BaseDialogScrollPadding:where(.md\:rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.md\:rt-r-align-center){margin-top:auto}}@media (min-width: 1280px){.rt-BaseDialogScrollPadding:where(.lg\:rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.lg\:rt-r-align-center){margin-top:auto}}@media (min-width: 1640px){.rt-BaseDialogScrollPadding:where(.xl\:rt-r-align-start){margin-top:0}.rt-BaseDialogScrollPadding:where(.xl\:rt-r-align-center){margin-top:auto}}.rt-BaseDialogContent{margin:auto;width:100%;z-index:1;position:relative;overflow:auto;--inset-padding-top: var(--dialog-content-padding);--inset-padding-right: var(--dialog-content-padding);--inset-padding-bottom: var(--dialog-content-padding);--inset-padding-left: var(--dialog-content-padding);padding:var(--dialog-content-padding);box-sizing:border-box;background-color:var(--color-panel-solid);box-shadow:var(--shadow-6);outline:none}.rt-BaseDialogContent:where(.rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}@media (min-width: 520px){.rt-BaseDialogContent:where(.xs\:rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.xs\:rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.xs\:rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.xs\:rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 768px){.rt-BaseDialogContent:where(.sm\:rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.sm\:rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.sm\:rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.sm\:rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1024px){.rt-BaseDialogContent:where(.md\:rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.md\:rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.md\:rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.md\:rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1280px){.rt-BaseDialogContent:where(.lg\:rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.lg\:rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.lg\:rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.lg\:rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1640px){.rt-BaseDialogContent:where(.xl\:rt-r-size-1){--dialog-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.xl\:rt-r-size-2){--dialog-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-BaseDialogContent:where(.xl\:rt-r-size-3){--dialog-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-BaseDialogContent:where(.xl\:rt-r-size-4){--dialog-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (prefers-reduced-motion: no-preference){@keyframes rt-dialog-overlay-no-op{0%{opacity:1}to{opacity:1}}@keyframes rt-dialog-content-show{0%{opacity:0;transform:translateY(5px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes rt-dialog-content-hide{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(5px) scale(.99)}}.rt-BaseDialogOverlay:where([data-state=closed]){animation:rt-dialog-overlay-no-op .16s cubic-bezier(.16,1,.3,1)}.rt-BaseDialogOverlay:where([data-state=open]):before{animation:rt-fade-in .2s cubic-bezier(.16,1,.3,1)}.rt-BaseDialogOverlay:where([data-state=closed]):before{animation:rt-fade-out .16s cubic-bezier(.16,1,.3,1)}.rt-BaseDialogContent:where([data-state=open]){animation:rt-dialog-content-show .2s cubic-bezier(.16,1,.3,1)}.rt-BaseDialogContent:where([data-state=closed]){animation:rt-dialog-content-hide .1s cubic-bezier(.16,1,.3,1)}}.rt-AvatarRoot{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;-webkit-user-select:none;user-select:none;width:var(--avatar-size);height:var(--avatar-size);flex-shrink:0}.rt-AvatarImage{width:100%;height:100%;object-fit:cover;border-radius:inherit}.rt-AvatarFallback{font-family:var(--default-font-family);font-weight:var(--font-weight-medium);font-style:normal;z-index:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;line-height:1;border-radius:inherit;text-transform:uppercase}.rt-AvatarFallback:where(.rt-one-letter){font-size:var(--avatar-fallback-one-letter-font-size)}.rt-AvatarFallback:where(.rt-two-letters){font-size:var(--avatar-fallback-two-letters-font-size, var(--avatar-fallback-one-letter-font-size))}.rt-AvatarRoot:where(.rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}@media (min-width: 520px){.rt-AvatarRoot:where(.xs\:rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.xs\:rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.xs\:rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.xs\:rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.xs\:rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.xs\:rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.xs\:rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.xs\:rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.xs\:rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}}@media (min-width: 768px){.rt-AvatarRoot:where(.sm\:rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.sm\:rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.sm\:rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.sm\:rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.sm\:rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.sm\:rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.sm\:rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.sm\:rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.sm\:rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}}@media (min-width: 1024px){.rt-AvatarRoot:where(.md\:rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.md\:rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.md\:rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.md\:rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.md\:rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.md\:rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.md\:rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.md\:rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.md\:rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}}@media (min-width: 1280px){.rt-AvatarRoot:where(.lg\:rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.lg\:rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.lg\:rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.lg\:rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.lg\:rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.lg\:rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.lg\:rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.lg\:rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.lg\:rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}}@media (min-width: 1640px){.rt-AvatarRoot:where(.xl\:rt-r-size-1){--avatar-size: var(--space-5);--avatar-fallback-one-letter-font-size: var(--font-size-2);--avatar-fallback-two-letters-font-size: var(--font-size-1);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-1)}.rt-AvatarRoot:where(.xl\:rt-r-size-2){--avatar-size: var(--space-6);--avatar-fallback-one-letter-font-size: var(--font-size-3);--avatar-fallback-two-letters-font-size: var(--font-size-2);border-radius:max(var(--radius-2),var(--radius-full));letter-spacing:var(--letter-spacing-2)}.rt-AvatarRoot:where(.xl\:rt-r-size-3){--avatar-size: var(--space-7);--avatar-fallback-one-letter-font-size: var(--font-size-4);--avatar-fallback-two-letters-font-size: var(--font-size-3);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-3)}.rt-AvatarRoot:where(.xl\:rt-r-size-4){--avatar-size: var(--space-8);--avatar-fallback-one-letter-font-size: var(--font-size-5);--avatar-fallback-two-letters-font-size: var(--font-size-4);border-radius:max(var(--radius-3),var(--radius-full));letter-spacing:var(--letter-spacing-4)}.rt-AvatarRoot:where(.xl\:rt-r-size-5){--avatar-size: var(--space-9);--avatar-fallback-one-letter-font-size: var(--font-size-6);border-radius:max(var(--radius-4),var(--radius-full));letter-spacing:var(--letter-spacing-6)}.rt-AvatarRoot:where(.xl\:rt-r-size-6){--avatar-size: 80px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.xl\:rt-r-size-7){--avatar-size: 96px;--avatar-fallback-one-letter-font-size: var(--font-size-7);border-radius:max(var(--radius-5),var(--radius-full));letter-spacing:var(--letter-spacing-7)}.rt-AvatarRoot:where(.xl\:rt-r-size-8){--avatar-size: 128px;--avatar-fallback-one-letter-font-size: var(--font-size-8);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-8)}.rt-AvatarRoot:where(.xl\:rt-r-size-9){--avatar-size: 160px;--avatar-fallback-one-letter-font-size: var(--font-size-9);border-radius:max(var(--radius-6),var(--radius-full));letter-spacing:var(--letter-spacing-9)}}.rt-AvatarRoot:where(.rt-variant-solid) :where(.rt-AvatarFallback){background-color:var(--accent-9);color:var(--accent-contrast)}.rt-AvatarRoot:where(.rt-variant-solid):where(.rt-high-contrast) :where(.rt-AvatarFallback){background-color:var(--accent-12);color:var(--accent-1)}.rt-AvatarRoot:where(.rt-variant-soft) :where(.rt-AvatarFallback){background-color:var(--accent-a3);color:var(--accent-a11)}.rt-AvatarRoot:where(.rt-variant-soft):where(.rt-high-contrast) :where(.rt-AvatarFallback){color:var(--accent-12)}.rt-Badge{display:inline-flex;align-items:center;white-space:nowrap;font-family:var(--default-font-family);font-weight:var(--font-weight-medium);font-style:normal;flex-shrink:0;line-height:1;height:fit-content}.rt-Badge:where(.rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}@media (min-width: 520px){.rt-Badge:where(.xs\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.xs\:rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.xs\:rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}}@media (min-width: 768px){.rt-Badge:where(.sm\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.sm\:rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.sm\:rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}}@media (min-width: 1024px){.rt-Badge:where(.md\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.md\:rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.md\:rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}}@media (min-width: 1280px){.rt-Badge:where(.lg\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.lg\:rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.lg\:rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}}@media (min-width: 1640px){.rt-Badge:where(.xl\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:calc(var(--space-1) * .5) calc(var(--space-1) * 1.5);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-Badge:where(.xl\:rt-r-size-2){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);padding:var(--space-1) var(--space-2);gap:calc(var(--space-1) * 1.5);border-radius:max(var(--radius-2),var(--radius-full))}.rt-Badge:where(.xl\:rt-r-size-3){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);padding:var(--space-1) calc(var(--space-2) * 1.25);gap:var(--space-2);border-radius:max(var(--radius-2),var(--radius-full))}}.rt-Badge:where(.rt-variant-solid){background-color:var(--accent-9);color:var(--accent-contrast)}.rt-Badge:where(.rt-variant-solid)::selection{background-color:var(--accent-7);color:var(--accent-12)}.rt-Badge:where(.rt-variant-solid):where(.rt-high-contrast){background-color:var(--accent-12);color:var(--accent-1)}.rt-Badge:where(.rt-variant-solid):where(.rt-high-contrast)::selection{background-color:var(--accent-a11);color:var(--accent-1)}.rt-Badge:where(.rt-variant-surface){background-color:var(--accent-surface);box-shadow:inset 0 0 0 1px var(--accent-a6);color:var(--accent-a11)}.rt-Badge:where(.rt-variant-surface):where(.rt-high-contrast){color:var(--accent-12)}.rt-Badge:where(.rt-variant-soft){background-color:var(--accent-a3);color:var(--accent-a11)}.rt-Badge:where(.rt-variant-soft):where(.rt-high-contrast){color:var(--accent-12)}.rt-Badge:where(.rt-variant-outline){box-shadow:inset 0 0 0 1px var(--accent-a8);color:var(--accent-a11)}.rt-Badge:where(.rt-variant-outline):where(.rt-high-contrast){box-shadow:inset 0 0 0 1px var(--accent-a7),inset 0 0 0 1px var(--gray-a11);color:var(--accent-12)}.rt-Blockquote{box-sizing:border-box;border-left:max(var(--space-1),.25em) solid var(--accent-a6);padding-left:min(var(--space-5),max(var(--space-3),.5em))}.rt-BaseButton{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;-webkit-user-select:none;user-select:none;vertical-align:top;font-family:var(--default-font-family);font-style:normal;text-align:center}.rt-BaseButton:where([data-disabled]){--spinner-opacity: 1}.rt-BaseButton:where(.rt-loading){position:relative}.rt-BaseButton:where(:not(.rt-variant-ghost)){height:var(--base-button-height)}.rt-BaseButton:where(.rt-variant-ghost){box-sizing:content-box;height:fit-content}.rt-BaseButton:where(.rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}@media (min-width: 520px){.rt-BaseButton:where(.xs\:rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.xs\:rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.xs\:rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.xs\:rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}}@media (min-width: 768px){.rt-BaseButton:where(.sm\:rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.sm\:rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.sm\:rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.sm\:rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}}@media (min-width: 1024px){.rt-BaseButton:where(.md\:rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.md\:rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.md\:rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.md\:rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}}@media (min-width: 1280px){.rt-BaseButton:where(.lg\:rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.lg\:rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.lg\:rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.lg\:rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}}@media (min-width: 1640px){.rt-BaseButton:where(.xl\:rt-r-size-1){--base-button-classic-active-padding-top: 1px;--base-button-height: var(--space-5);border-radius:max(var(--radius-1),var(--radius-full))}.rt-BaseButton:where(.xl\:rt-r-size-2){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-6);border-radius:max(var(--radius-2),var(--radius-full))}.rt-BaseButton:where(.xl\:rt-r-size-3){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-7);border-radius:max(var(--radius-3),var(--radius-full))}.rt-BaseButton:where(.xl\:rt-r-size-4){--base-button-classic-active-padding-top: 2px;--base-button-height: var(--space-8);border-radius:max(var(--radius-4),var(--radius-full))}}.rt-BaseButton:where(.rt-variant-classic){background-color:var(--accent-9);color:var(--accent-contrast);position:relative;z-index:0;background-image:linear-gradient(to bottom,transparent 50%,var(--gray-a4)),linear-gradient(to bottom,transparent 50%,var(--accent-9) 80%);box-shadow:var(--base-button-classic-box-shadow-top),inset 0 0 0 1px var(--accent-9),var(--base-button-classic-box-shadow-bottom)}.rt-BaseButton:where(.rt-variant-classic):after{content:"";position:absolute;border-radius:inherit;pointer-events:none;top:0;right:0;bottom:0;left:0;z-index:-1;border:var(--base-button-classic-after-inset) solid transparent;background-clip:content-box;background-color:inherit;background-image:linear-gradient(var(--black-a1),transparent,var(--white-a2));box-shadow:inset 0 2px 3px -1px var(--white-a4)}.rt-BaseButton:where(.rt-variant-classic):where(.rt-high-contrast){background-color:var(--accent-12);color:var(--gray-1);background-image:linear-gradient(to bottom,transparent 50%,var(--gray-a4)),linear-gradient(to bottom,transparent 50%,var(--accent-12) 80%);box-shadow:var(--base-button-classic-box-shadow-top),inset 0 0 0 1px var(--accent-12),var(--base-button-classic-box-shadow-bottom)}.rt-BaseButton:where(.rt-variant-classic):where(.rt-high-contrast):after{background-image:linear-gradient(var(--black-a3),transparent,var(--white-a2))}@media (pointer: coarse){.rt-BaseButton:where(.rt-variant-classic):where(:active:not([data-state=open])){outline:.5em solid var(--accent-a4);outline-offset:0}}.rt-BaseButton:where(.rt-variant-classic):where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:2px}@media (hover: hover){.rt-BaseButton:where(.rt-variant-classic):where(:hover):after{background-color:var(--accent-10);background-image:linear-gradient(var(--black-a2) -15%,transparent,var(--white-a3))}.rt-BaseButton:where(.rt-variant-classic):where(:hover):where(.rt-high-contrast){filter:var(--base-button-classic-high-contrast-hover-filter)}.rt-BaseButton:where(.rt-variant-classic):where(:hover):where(.rt-high-contrast):after{background-color:var(--accent-12);background-image:linear-gradient(var(--black-a5),transparent,var(--white-a2))}}.rt-BaseButton:where(.rt-variant-classic):where([data-state=open]):after{background-color:var(--accent-10);background-image:linear-gradient(var(--black-a2) -15%,transparent,var(--white-a3))}.rt-BaseButton:where(.rt-variant-classic):where([data-state=open]):where(.rt-high-contrast){filter:var(--base-button-classic-high-contrast-hover-filter)}.rt-BaseButton:where(.rt-variant-classic):where([data-state=open]):where(.rt-high-contrast):after{background-color:var(--accent-12);background-image:linear-gradient(var(--black-a5),transparent,var(--white-a2))}.rt-BaseButton:where(.rt-variant-classic):where(:active:not([data-state=open],[data-disabled])){background-color:var(--accent-9);background-image:linear-gradient(var(--black-a1),transparent);padding-top:var(--base-button-classic-active-padding-top);box-shadow:inset 0 4px 2px -2px var(--gray-a4),inset 0 1px 1px var(--gray-a7),inset 0 0 0 1px var(--gray-a5),inset 0 0 0 1px var(--accent-9),inset 0 3px 2px var(--gray-a3),inset 0 0 0 1px var(--white-a7),inset 0 -2px 1px var(--white-a5)}.rt-BaseButton:where(.rt-variant-classic):where(:active:not([data-state=open],[data-disabled])):after{box-shadow:none;background-color:inherit;background-image:linear-gradient(var(--black-a2),transparent,var(--white-a3))}.rt-BaseButton:where(.rt-variant-classic):where(:active:not([data-state=open],[data-disabled])):where(.rt-high-contrast){background-color:var(--accent-12);filter:var(--base-button-classic-high-contrast-active-filter);box-shadow:var(--base-button__classic-active__shadow-front-layer),inset 0 0 0 1px var(--accent-12),var(--base-button__classic-active__shadow-bottom-layer)}.rt-BaseButton:where(.rt-variant-classic):where(:active:not([data-state=open],[data-disabled])):where(.rt-high-contrast):after{background-image:linear-gradient(var(--black-a5),transparent,var(--white-a3))}.rt-BaseButton:where(.rt-variant-classic):where([data-disabled]){color:var(--gray-a8);background-color:var(--gray-2);background-image:none;box-shadow:var(--base-button-classic-disabled-box-shadow);outline:none;filter:none}.rt-BaseButton:where(.rt-variant-classic):where([data-disabled]):after{box-shadow:none;background-color:var(--gray-a2);background-image:linear-gradient(var(--black-a1) -20%,transparent,var(--white-a1))}.rt-BaseButton:where(.rt-variant-solid){background-color:var(--accent-9);color:var(--accent-contrast)}@media (hover: hover){.rt-BaseButton:where(.rt-variant-solid):where(:hover){background-color:var(--accent-10)}}.rt-BaseButton:where(.rt-variant-solid):where([data-state=open]){background-color:var(--accent-10)}.rt-BaseButton:where(.rt-variant-solid):where(:active:not([data-state=open])){background-color:var(--accent-10);filter:var(--base-button-solid-active-filter)}@media (pointer: coarse){.rt-BaseButton:where(.rt-variant-solid):where(:active:not([data-state=open])){outline:.5em solid var(--accent-a4);outline-offset:0}}.rt-BaseButton:where(.rt-variant-solid):where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:2px}.rt-BaseButton:where(.rt-variant-solid):where(.rt-high-contrast){background-color:var(--accent-12);color:var(--gray-1)}@media (hover: hover){.rt-BaseButton:where(.rt-variant-solid):where(.rt-high-contrast):where(:hover){background-color:var(--accent-12);filter:var(--base-button-solid-high-contrast-hover-filter)}}.rt-BaseButton:where(.rt-variant-solid):where(.rt-high-contrast):where([data-state=open]){background-color:var(--accent-12);filter:var(--base-button-solid-high-contrast-hover-filter)}.rt-BaseButton:where(.rt-variant-solid):where(.rt-high-contrast):where(:active:not([data-state=open])){background-color:var(--accent-12);filter:var(--base-button-solid-high-contrast-active-filter)}.rt-BaseButton:where(.rt-variant-solid):where([data-disabled]){color:var(--gray-a8);background-color:var(--gray-a3);outline:none;filter:none}.rt-BaseButton:where(.rt-variant-soft,.rt-variant-ghost){color:var(--accent-a11)}.rt-BaseButton:where(.rt-variant-soft,.rt-variant-ghost):where(.rt-high-contrast){color:var(--accent-12)}.rt-BaseButton:where(.rt-variant-soft,.rt-variant-ghost):where([data-disabled]){color:var(--gray-a8);background-color:var(--gray-a3)}.rt-BaseButton:where(.rt-variant-soft){background-color:var(--accent-a3)}.rt-BaseButton:where(.rt-variant-soft):where(:focus-visible){outline:2px solid var(--accent-8);outline-offset:-1px}@media (hover: hover){.rt-BaseButton:where(.rt-variant-soft):where(:hover){background-color:var(--accent-a4)}}.rt-BaseButton:where(.rt-variant-soft):where([data-state=open]){background-color:var(--accent-a4)}.rt-BaseButton:where(.rt-variant-soft):where(:active:not([data-state=open])){background-color:var(--accent-a5)}.rt-BaseButton:where(.rt-variant-soft):where([data-disabled]){color:var(--gray-a8);background-color:var(--gray-a3)}@media (hover: hover){.rt-BaseButton:where(.rt-variant-ghost):where(:hover){background-color:var(--accent-a3)}}.rt-BaseButton:where(.rt-variant-ghost):where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-BaseButton:where(.rt-variant-ghost):where([data-state=open]){background-color:var(--accent-a3)}.rt-BaseButton:where(.rt-variant-ghost):where(:active:not([data-state=open])){background-color:var(--accent-a4)}.rt-BaseButton:where(.rt-variant-ghost):where([data-disabled]){color:var(--gray-a8);background-color:transparent}.rt-BaseButton:where(.rt-variant-outline){box-shadow:inset 0 0 0 1px var(--accent-a8);color:var(--accent-a11)}@media (hover: hover){.rt-BaseButton:where(.rt-variant-outline):where(:hover){background-color:var(--accent-a2)}}.rt-BaseButton:where(.rt-variant-outline):where([data-state=open]){background-color:var(--accent-a2)}.rt-BaseButton:where(.rt-variant-outline):where(:active:not([data-state=open])){background-color:var(--accent-a3)}.rt-BaseButton:where(.rt-variant-outline):where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-BaseButton:where(.rt-variant-outline):where(.rt-high-contrast){box-shadow:inset 0 0 0 1px var(--accent-a7),inset 0 0 0 1px var(--gray-a11);color:var(--accent-12)}.rt-BaseButton:where(.rt-variant-outline):where([data-disabled]){color:var(--gray-a8);box-shadow:inset 0 0 0 1px var(--gray-a7);background-color:transparent}.rt-BaseButton:where(.rt-variant-surface){background-color:var(--accent-surface);box-shadow:inset 0 0 0 1px var(--accent-a7);color:var(--accent-a11)}@media (hover: hover){.rt-BaseButton:where(.rt-variant-surface):where(:hover){box-shadow:inset 0 0 0 1px var(--accent-a8)}}.rt-BaseButton:where(.rt-variant-surface):where([data-state=open]){box-shadow:inset 0 0 0 1px var(--accent-a8)}.rt-BaseButton:where(.rt-variant-surface):where(:active:not([data-state=open])){background-color:var(--accent-a3);box-shadow:inset 0 0 0 1px var(--accent-a8)}.rt-BaseButton:where(.rt-variant-surface):where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-BaseButton:where(.rt-variant-surface):where(.rt-high-contrast){color:var(--accent-12)}.rt-BaseButton:where(.rt-variant-surface):where([data-disabled]){color:var(--gray-a8);box-shadow:inset 0 0 0 1px var(--gray-a6);background-color:var(--gray-a2)}.rt-Button:where(:not(.rt-variant-ghost)) :where(svg){opacity:.9}.rt-Button:where(.rt-variant-ghost){padding:var(--button-ghost-padding-y) var(--button-ghost-padding-x);--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px;--margin-top-override: calc(var(--margin-top) - var(--button-ghost-padding-y));--margin-right-override: calc(var(--margin-right) - var(--button-ghost-padding-x));--margin-bottom-override: calc(var(--margin-bottom) - var(--button-ghost-padding-y));--margin-left-override: calc(var(--margin-left) - var(--button-ghost-padding-x));margin:var(--margin-top-override) var(--margin-right-override) var(--margin-bottom-override) var(--margin-left-override)}:where(.rt-Button:where(.rt-variant-ghost))>*{--margin-top-override: initial;--margin-right-override: initial;--margin-bottom-override: initial;--margin-left-override: initial}.rt-Button:where(.rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}@media (min-width: 520px){.rt-Button:where(.xs\:rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.xs\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.xs\:rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.xs\:rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.xs\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.xs\:rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.xs\:rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.xs\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.xs\:rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.xs\:rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.xs\:rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.xs\:rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}}@media (min-width: 768px){.rt-Button:where(.sm\:rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.sm\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.sm\:rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.sm\:rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.sm\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.sm\:rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.sm\:rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.sm\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.sm\:rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.sm\:rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.sm\:rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.sm\:rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}}@media (min-width: 1024px){.rt-Button:where(.md\:rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.md\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.md\:rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.md\:rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.md\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.md\:rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.md\:rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.md\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.md\:rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.md\:rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.md\:rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.md\:rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}}@media (min-width: 1280px){.rt-Button:where(.lg\:rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.lg\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.lg\:rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.lg\:rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.lg\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.lg\:rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.lg\:rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.lg\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.lg\:rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.lg\:rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.lg\:rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.lg\:rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}}@media (min-width: 1640px){.rt-Button:where(.xl\:rt-r-size-1){gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-Button:where(.xl\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-Button:where(.xl\:rt-r-size-1):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.xl\:rt-r-size-2){gap:var(--space-2);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-Button:where(.xl\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-Button:where(.xl\:rt-r-size-2):where(.rt-variant-ghost){gap:var(--space-1);--button-ghost-padding-x: var(--space-2);--button-ghost-padding-y: var(--space-1)}.rt-Button:where(.xl\:rt-r-size-3){gap:var(--space-3);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}.rt-Button:where(.xl\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-Button:where(.xl\:rt-r-size-3):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-3);--button-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-Button:where(.xl\:rt-r-size-4){gap:var(--space-3);font-size:var(--font-size-4);line-height:var(--line-height-4);letter-spacing:var(--letter-spacing-4)}.rt-Button:where(.xl\:rt-r-size-4):where(:not(.rt-variant-ghost)){padding-left:var(--space-5);padding-right:var(--space-5)}.rt-Button:where(.xl\:rt-r-size-4):where(.rt-variant-ghost){gap:var(--space-2);--button-ghost-padding-x: var(--space-4);--button-ghost-padding-y: var(--space-2)}}.rt-Button:where(:not(.rt-variant-ghost)){font-weight:var(--font-weight-medium)}.rt-CalloutRoot{box-sizing:border-box;display:grid;align-items:flex-start;justify-content:flex-start;text-align:left;color:var(--accent-a11)}.rt-CalloutRoot:where(.rt-high-contrast){color:var(--accent-12)}.rt-CalloutIcon{display:flex;align-items:center;grid-column-start:-2;height:var(--callout-icon-height)}.rt-CalloutRoot>:where(:not(.rt-CalloutIcon)){grid-column-start:-1}.rt-CalloutRoot:where(.rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}@media (min-width: 520px){.rt-CalloutRoot:where(.xs\:rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.xs\:rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.xs\:rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}}@media (min-width: 768px){.rt-CalloutRoot:where(.sm\:rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.sm\:rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.sm\:rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}}@media (min-width: 1024px){.rt-CalloutRoot:where(.md\:rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.md\:rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.md\:rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}}@media (min-width: 1280px){.rt-CalloutRoot:where(.lg\:rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.lg\:rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.lg\:rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}}@media (min-width: 1640px){.rt-CalloutRoot:where(.xl\:rt-r-size-1){row-gap:var(--space-2);column-gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-3);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.xl\:rt-r-size-2){row-gap:var(--space-2);column-gap:var(--space-3);padding:var(--space-4);border-radius:var(--radius-4);--callout-icon-height: var(--line-height-2)}.rt-CalloutRoot:where(.xl\:rt-r-size-3){row-gap:var(--space-3);column-gap:var(--space-4);padding:var(--space-5);border-radius:var(--radius-5);--callout-icon-height: var(--line-height-3)}}.rt-CalloutRoot:where(.rt-variant-soft){background-color:var(--accent-a3)}.rt-CalloutRoot:where(.rt-variant-surface){box-shadow:inset 0 0 0 1px var(--accent-a6);background-color:var(--accent-a2)}.rt-CalloutRoot:where(.rt-variant-outline){box-shadow:inset 0 0 0 1px var(--accent-a7)}.rt-BaseCard{display:block;position:relative;overflow:hidden;border-radius:var(--base-card-border-radius);font-family:var(--default-font-family);font-weight:var(--font-weight-normal);font-style:normal;text-align:start;--inset-border-width: var(--base-card-border-width);--inset-border-radius: var(--base-card-border-radius);padding-top:var(--base-card-padding-top);padding-right:var(--base-card-padding-right);padding-bottom:var(--base-card-padding-bottom);padding-left:var(--base-card-padding-left);box-sizing:border-box;--inset-padding-top: calc(var(--base-card-padding-top) - var(--base-card-border-width));--inset-padding-right: calc(var(--base-card-padding-right) - var(--base-card-border-width));--inset-padding-bottom: calc(var(--base-card-padding-bottom) - var(--base-card-border-width));--inset-padding-left: calc(var(--base-card-padding-left) - var(--base-card-border-width));contain:paint}.rt-BaseCard:before,.rt-BaseCard:after{content:"";position:absolute;pointer-events:none;transition:inherit;border-radius:calc(var(--base-card-border-radius) - var(--base-card-border-width));inset:var(--base-card-border-width)}.rt-BaseCard:before{z-index:-1}.rt-Card{--base-card-padding-top: var(--card-padding);--base-card-padding-right: var(--card-padding);--base-card-padding-bottom: var(--card-padding);--base-card-padding-left: var(--card-padding);--base-card-border-radius: var(--card-border-radius);--base-card-border-width: var(--card-border-width)}.rt-Card:where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-Card:where(:focus-visible):after{outline:inherit}.rt-Card:where(:focus-visible):where(:active:not([data-state=open])):before{background-image:linear-gradient(var(--focus-a2),var(--focus-a2))}.rt-Card:where(.rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}@media (min-width: 520px){.rt-Card:where(.xs\:rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.xs\:rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.xs\:rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.xs\:rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.xs\:rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}}@media (min-width: 768px){.rt-Card:where(.sm\:rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.sm\:rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.sm\:rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.sm\:rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.sm\:rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}}@media (min-width: 1024px){.rt-Card:where(.md\:rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.md\:rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.md\:rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.md\:rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.md\:rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}}@media (min-width: 1280px){.rt-Card:where(.lg\:rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.lg\:rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.lg\:rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.lg\:rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.lg\:rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}}@media (min-width: 1640px){.rt-Card:where(.xl\:rt-r-size-1){--card-padding: var(--space-3);--card-border-radius: var(--radius-4)}.rt-Card:where(.xl\:rt-r-size-2){--card-padding: var(--space-4);--card-border-radius: var(--radius-4)}.rt-Card:where(.xl\:rt-r-size-3){--card-padding: var(--space-5);--card-border-radius: var(--radius-5)}.rt-Card:where(.xl\:rt-r-size-4){--card-padding: var(--space-6);--card-border-radius: var(--radius-5)}.rt-Card:where(.xl\:rt-r-size-5){--card-padding: var(--space-8);--card-border-radius: var(--radius-6)}}.rt-Card:where(.rt-variant-surface){--card-border-width: 1px;--card-background-color: var(--color-panel)}.rt-Card:where(.rt-variant-surface):before{background-color:var(--card-background-color);-webkit-backdrop-filter:var(--backdrop-filter-panel);backdrop-filter:var(--backdrop-filter-panel)}.rt-Card:where(.rt-variant-surface):after{box-shadow:var(--base-card-surface-box-shadow)}@media (hover: hover){.rt-Card:where(.rt-variant-surface):where(:any-link,button,label):where(:hover):after{box-shadow:var(--base-card-surface-hover-box-shadow)}}.rt-Card:where(.rt-variant-surface):where(:any-link,button,label):where([data-state=open]):after{box-shadow:var(--base-card-surface-hover-box-shadow)}.rt-Card:where(.rt-variant-surface):where(:any-link,button,label):where(:active:not([data-state=open])):after{box-shadow:var(--base-card-surface-active-box-shadow)}.rt-Card:where(.rt-variant-classic){--card-border-width: 1px;--card-background-color: var(--color-panel);transition:box-shadow .12s;box-shadow:var(--base-card-classic-box-shadow-outer)}.rt-Card:where(.rt-variant-classic):before{background-color:var(--card-background-color);-webkit-backdrop-filter:var(--backdrop-filter-panel);backdrop-filter:var(--backdrop-filter-panel)}.rt-Card:where(.rt-variant-classic):after{box-shadow:var(--base-card-classic-box-shadow-inner)}@media (hover: hover){.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where(:hover){transition-duration:40ms;box-shadow:var(--base-card-classic-hover-box-shadow-outer)}.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where(:hover):after{box-shadow:var(--base-card-classic-hover-box-shadow-inner)}}.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where([data-state=open]){transition-duration:40ms;box-shadow:var(--base-card-classic-hover-box-shadow-outer)}.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where([data-state=open]):after{box-shadow:var(--base-card-classic-hover-box-shadow-inner)}.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where(:active:not([data-state=open])){transition-duration:40ms;box-shadow:var(--base-card-classic-active-box-shadow-outer)}.rt-Card:where(.rt-variant-classic):where(:any-link,button,label):where(:active:not([data-state=open])):after{box-shadow:var(--base-card-classic-active-box-shadow-inner)}.rt-Card:where(.rt-variant-ghost){--card-border-width: 0px;--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px;--margin-top-override: calc(var(--margin-top) - var(--card-padding));--margin-right-override: calc(var(--margin-right) - var(--card-padding));--margin-bottom-override: calc(var(--margin-bottom) - var(--card-padding));--margin-left-override: calc(var(--margin-left) - var(--card-padding));margin-top:var(--margin-top-override);margin-right:var(--margin-right-override);margin-bottom:var(--margin-bottom-override);margin-left:var(--margin-left-override)}:where(.rt-Card:where(.rt-variant-ghost))>*{--margin-top-override: initial;--margin-right-override: initial;--margin-bottom-override: initial;--margin-left-override: initial}@media (hover: hover){.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where(:hover){background-color:var(--gray-a3)}.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where(:hover):where(:focus-visible){background-color:var(--focus-a2)}}.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where([data-state=open]){background-color:var(--gray-a3)}.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where([data-state=open]):where(:focus-visible){background-color:var(--focus-a2)}.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where(:active:not([data-state=open])){background-color:var(--gray-a4)}.rt-Card:where(.rt-variant-ghost):where(:any-link,button,label):where(:active:not([data-state=open])):where(:focus-visible){background-color:var(--focus-a2)}@media (pointer: coarse){.rt-Card:where(:any-link,button,label):where(:active:not(:focus-visible,[data-state=open])):before{background-image:linear-gradient(var(--gray-a4),var(--gray-a4))}}.rt-BaseCheckboxRoot{position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:top;flex-shrink:0;cursor:var(--cursor-checkbox);height:var(--skeleton-height, var(--line-height, var(--checkbox-size)));--skeleton-height-override: var(--checkbox-size);border-radius:var(--skeleton-radius);--skeleton-radius-override: var(--checkbox-border-radius)}.rt-BaseCheckboxRoot:before{content:"";display:block;height:var(--checkbox-size);width:var(--checkbox-size);border-radius:var(--checkbox-border-radius)}.rt-BaseCheckboxIndicator{position:absolute;width:var(--checkbox-indicator-size);height:var(--checkbox-indicator-size);transform:translate(-50%,-50%);top:50%;left:50%}.rt-BaseCheckboxRoot:where(.rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}@media (min-width: 520px){.rt-BaseCheckboxRoot:where(.xs\:rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.xs\:rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.xs\:rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}}@media (min-width: 768px){.rt-BaseCheckboxRoot:where(.sm\:rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.sm\:rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.sm\:rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}}@media (min-width: 1024px){.rt-BaseCheckboxRoot:where(.md\:rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.md\:rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.md\:rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}}@media (min-width: 1280px){.rt-BaseCheckboxRoot:where(.lg\:rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.lg\:rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.lg\:rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}}@media (min-width: 1640px){.rt-BaseCheckboxRoot:where(.xl\:rt-r-size-1){--checkbox-size: calc(var(--space-4) * .875);--checkbox-indicator-size: calc(9px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * .875)}.rt-BaseCheckboxRoot:where(.xl\:rt-r-size-2){--checkbox-size: var(--space-4);--checkbox-indicator-size: calc(10px * var(--scaling));--checkbox-border-radius: var(--radius-1)}.rt-BaseCheckboxRoot:where(.xl\:rt-r-size-3){--checkbox-size: calc(var(--space-4) * 1.25);--checkbox-indicator-size: calc(12px * var(--scaling));--checkbox-border-radius: calc(var(--radius-1) * 1.25)}}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where([data-state=unchecked]):before{background-color:var(--color-surface);box-shadow:inset 0 0 0 1px var(--gray-a7)}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where([data-state=checked],[data-state=indeterminate]):before{background-color:var(--accent-indicator)}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where([data-state=checked],[data-state=indeterminate]) :where(.rt-BaseCheckboxIndicator){color:var(--accent-contrast)}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where([data-state=checked],[data-state=indeterminate]):where(.rt-high-contrast):before{background-color:var(--accent-12)}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where([data-state=checked],[data-state=indeterminate]):where(.rt-high-contrast) :where(.rt-BaseCheckboxIndicator){color:var(--accent-1)}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where(:disabled):before{box-shadow:inset 0 0 0 1px var(--gray-a6);background-color:transparent}.rt-BaseCheckboxRoot:where(.rt-variant-surface):where(:disabled) :where(.rt-BaseCheckboxIndicator){color:var(--gray-a8)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where([data-state=unchecked]):before{background-color:var(--color-surface);box-shadow:inset 0 0 0 1px var(--gray-a3),var(--shadow-1)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where([data-state=checked],[data-state=indeterminate]):before{background-color:var(--accent-indicator);background-image:linear-gradient(to bottom,var(--white-a3),transparent,var(--black-a1));box-shadow:inset 0 .5px .5px var(--white-a4),inset 0 -.5px .5px var(--black-a4)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where([data-state=checked],[data-state=indeterminate]) :where(.rt-BaseCheckboxIndicator){color:var(--accent-contrast)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where([data-state=checked],[data-state=indeterminate]):where(.rt-high-contrast):before{background-color:var(--accent-12)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where([data-state=checked],[data-state=indeterminate]):where(.rt-high-contrast) :where(.rt-BaseCheckboxIndicator){color:var(--accent-1)}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where(:disabled):before{box-shadow:var(--shadow-1);background-color:transparent;background-image:none}.rt-BaseCheckboxRoot:where(.rt-variant-classic):where(:disabled) :where(.rt-BaseCheckboxIndicator){color:var(--gray-a8)}.rt-BaseCheckboxRoot:where(.rt-variant-soft):before{background-color:var(--accent-a5)}.rt-BaseCheckboxRoot:where(.rt-variant-soft):where([data-state=checked],[data-state=indeterminate]) :where(.rt-BaseCheckboxIndicator){color:var(--accent-a11)}.rt-BaseCheckboxRoot:where(.rt-variant-soft):where([data-state=checked],[data-state=indeterminate]):where(.rt-high-contrast) :where(.rt-BaseCheckboxIndicator){color:var(--accent-12)}.rt-BaseCheckboxRoot:where(.rt-variant-soft):where(:disabled):before{background-color:transparent}.rt-BaseCheckboxRoot:where(.rt-variant-soft):where(:disabled) :where(.rt-BaseCheckboxIndicator){color:var(--gray-a8)}.rt-CheckboxCardsRoot{line-height:var(--line-height);letter-spacing:var(--letter-spacing);cursor:default}.rt-CheckboxCardsItem:where(:has(:focus-visible)){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-CheckboxCardsItem:where(:has(:focus-visible)):after{outline:inherit}.rt-CheckboxCardsItem>*{pointer-events:none}.rt-CheckboxCardsItem>:where(svg){flex-shrink:0}.rt-CheckboxCardCheckbox{position:absolute;right:var(--checkbox-cards-item-padding-left)}.rt-CheckboxCardsItem{--checkbox-cards-item-padding-right: calc(var(--checkbox-cards-item-padding-left) * 2 + var(--checkbox-cards-item-checkbox-size));--base-card-padding-top: var(--checkbox-cards-item-padding-top);--base-card-padding-right: var(--checkbox-cards-item-padding-right);--base-card-padding-bottom: var(--checkbox-cards-item-padding-bottom);--base-card-padding-left: var(--checkbox-cards-item-padding-left);--base-card-border-radius: var(--checkbox-cards-item-border-radius);--base-card-border-width: var(--checkbox-cards-item-border-width);display:flex;align-items:center;gap:var(--space-2);cursor:var(--cursor-button);-webkit-tap-highlight-color:transparent}.rt-CheckboxCardsRoot:where(.rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}@media (min-width: 520px){.rt-CheckboxCardsRoot:where(.xs\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.xs\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.xs\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}}@media (min-width: 768px){.rt-CheckboxCardsRoot:where(.sm\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.sm\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.sm\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1024px){.rt-CheckboxCardsRoot:where(.md\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.md\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.md\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1280px){.rt-CheckboxCardsRoot:where(.lg\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.lg\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.lg\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1640px){.rt-CheckboxCardsRoot:where(.xl\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-3) / 1.2);--checkbox-cards-item-padding-left: var(--space-3);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * .875)}.rt-CheckboxCardsRoot:where(.xl\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--checkbox-cards-item-padding-top: calc(var(--space-4) * .875);--checkbox-cards-item-padding-bottom: calc(var(--space-4) * .875);--checkbox-cards-item-padding-left: var(--space-4);--checkbox-cards-item-border-radius: var(--radius-3);--checkbox-cards-item-checkbox-size: var(--space-4)}.rt-CheckboxCardsRoot:where(.xl\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--checkbox-cards-item-padding-top: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-bottom: calc(var(--space-5) / 1.2);--checkbox-cards-item-padding-left: var(--space-5);--checkbox-cards-item-border-radius: var(--radius-4);--checkbox-cards-item-checkbox-size: calc(var(--space-4) * 1.25)}}:where(.rt-CheckboxCardsRoot.rt-variant-surface) .rt-CheckboxCardsItem{--checkbox-cards-item-border-width: 1px;--checkbox-cards-item-background-color: var(--color-surface)}:where(.rt-CheckboxCardsRoot.rt-variant-surface) .rt-CheckboxCardsItem:before{background-color:var(--checkbox-cards-item-background-color)}:where(.rt-CheckboxCardsRoot.rt-variant-surface) .rt-CheckboxCardsItem:after{box-shadow:var(--base-card-surface-box-shadow)}@media (hover: hover){:where(.rt-CheckboxCardsRoot.rt-variant-surface) .rt-CheckboxCardsItem:where(:not(:has(:disabled)):hover):after{box-shadow:var(--base-card-surface-hover-box-shadow)}}:where(.rt-CheckboxCardsRoot.rt-variant-classic) .rt-CheckboxCardsItem{--checkbox-cards-item-border-width: 1px;--checkbox-cards-item-background-color: var(--color-surface);transition:box-shadow .12s;box-shadow:var(--base-card-classic-box-shadow-outer)}:where(.rt-CheckboxCardsRoot.rt-variant-classic) .rt-CheckboxCardsItem:before{background-color:var(--checkbox-cards-item-background-color)}:where(.rt-CheckboxCardsRoot.rt-variant-classic) .rt-CheckboxCardsItem:after{box-shadow:var(--base-card-classic-box-shadow-inner)}@media (hover: hover){:where(.rt-CheckboxCardsRoot.rt-variant-classic) .rt-CheckboxCardsItem:where(:not(:has(:disabled)):hover){transition-duration:40ms;box-shadow:var(--base-card-classic-hover-box-shadow-outer)}:where(.rt-CheckboxCardsRoot.rt-variant-classic) .rt-CheckboxCardsItem:where(:not(:has(:disabled)):hover):after{box-shadow:var(--base-card-classic-hover-box-shadow-inner)}}@media (pointer: coarse){.rt-CheckboxCardsItem:where(:active:not(:focus-visible)):before{background-image:linear-gradient(var(--gray-a4),var(--gray-a4))}}.rt-CheckboxCardsItem:where(:has(:disabled)){cursor:var(--cursor-disabled);color:var(--gray-a9)}.rt-CheckboxCardsItem:where(:has(:disabled)):before{background-image:linear-gradient(var(--gray-a2),var(--gray-a2))}.rt-CheckboxCardsItem:where(:has(:disabled))::selection{background-color:var(--gray-a5)}.rt-CheckboxGroupRoot{display:flex;flex-direction:column;gap:var(--space-1)}.rt-CheckboxGroupItem{display:flex;gap:.5em;width:fit-content}.rt-CheckboxGroupItemCheckbox:where(:focus-visible):before{outline:2px solid var(--focus-8);outline-offset:2px}.rt-CheckboxGroupItemCheckbox:where(:disabled){cursor:var(--cursor-disabled)}.rt-CheckboxGroupItemCheckbox:where(:disabled):before{background-color:var(--gray-a3)}.rt-CheckboxGroupItemInner{min-width:0}.rt-CheckboxRoot:where(:focus-visible):before{outline:2px solid var(--focus-8);outline-offset:2px}.rt-CheckboxRoot:where(:disabled){cursor:var(--cursor-disabled)}.rt-CheckboxRoot:where(:disabled):before{background-color:var(--gray-a3)}.rt-Code{--code-variant-font-size-adjust: calc(var(--code-font-size-adjust) * .95);font-family:var(--code-font-family);font-size:calc(var(--code-variant-font-size-adjust) * 1em);font-style:var(--code-font-style);font-weight:var(--code-font-weight);line-height:1.25;letter-spacing:calc(var(--code-letter-spacing) + var(--letter-spacing, var(--default-letter-spacing)));border-radius:calc((.5px + .2em) * var(--radius-factor));box-sizing:border-box;padding-top:var(--code-padding-top);padding-left:var(--code-padding-left);padding-bottom:var(--code-padding-bottom);padding-right:var(--code-padding-right);height:fit-content}.rt-Code :where(.rt-Code){font-size:inherit}.rt-Code:where(.rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}@media (min-width: 520px){.rt-Code:where(.xs\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.xs\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.xs\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.xs\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.xs\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.xs\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.xs\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.xs\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.xs\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 768px){.rt-Code:where(.sm\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.sm\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.sm\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.sm\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.sm\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.sm\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.sm\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.sm\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.sm\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1024px){.rt-Code:where(.md\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.md\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.md\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.md\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.md\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.md\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.md\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.md\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.md\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1280px){.rt-Code:where(.lg\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.lg\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.lg\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.lg\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.lg\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.lg\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.lg\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.lg\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.lg\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1640px){.rt-Code:where(.xl\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--code-variant-font-size-adjust));line-height:var(--line-height-1);--letter-spacing: var(--letter-spacing-1)}.rt-Code:where(.xl\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--code-variant-font-size-adjust));line-height:var(--line-height-2);--letter-spacing: var(--letter-spacing-2)}.rt-Code:where(.xl\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--code-variant-font-size-adjust));line-height:var(--line-height-3);--letter-spacing: var(--letter-spacing-3)}.rt-Code:where(.xl\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--code-variant-font-size-adjust));line-height:var(--line-height-4);--letter-spacing: var(--letter-spacing-4)}.rt-Code:where(.xl\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--code-variant-font-size-adjust));line-height:var(--line-height-5);--letter-spacing: var(--letter-spacing-5)}.rt-Code:where(.xl\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--code-variant-font-size-adjust));line-height:var(--line-height-6);--letter-spacing: var(--letter-spacing-6)}.rt-Code:where(.xl\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--code-variant-font-size-adjust));line-height:var(--line-height-7);--letter-spacing: var(--letter-spacing-7)}.rt-Code:where(.xl\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--code-variant-font-size-adjust));line-height:var(--line-height-8);--letter-spacing: var(--letter-spacing-8)}.rt-Code:where(.xl\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--code-variant-font-size-adjust));line-height:var(--line-height-9);--letter-spacing: var(--letter-spacing-9)}}.rt-Code:where(.rt-variant-ghost){--code-variant-font-size-adjust: var(--code-font-size-adjust);padding:0}.rt-Code:where(.rt-variant-ghost):where([data-accent-color]){color:var(--accent-a11)}.rt-Code:where(.rt-variant-ghost):where([data-accent-color].rt-high-contrast),:where([data-accent-color]:not(.radix-themes)) .rt-Code:where(.rt-variant-ghost):where(.rt-high-contrast){color:var(--accent-12)}.rt-Code:where(.rt-variant-solid){background-color:var(--accent-a9);color:var(--accent-contrast)}.rt-Code:where(.rt-variant-solid)::selection{background-color:var(--accent-7);color:var(--accent-12)}.rt-Code:where(.rt-variant-solid):where(.rt-high-contrast){background-color:var(--accent-12);color:var(--accent-1)}.rt-Code:where(.rt-variant-solid):where(.rt-high-contrast)::selection{background-color:var(--accent-a11);color:var(--accent-1)}:where(.rt-Link) .rt-Code:where(.rt-variant-solid),.rt-Code:where(.rt-variant-solid):where(:any-link,button){isolation:isolate}@media (hover: hover){:where(.rt-Link) .rt-Code:where(.rt-variant-solid):where(:hover),.rt-Code:where(.rt-variant-solid):where(:any-link,button):where(:hover){background-color:var(--accent-10)}:where(.rt-Link) .rt-Code:where(.rt-variant-solid):where(.rt-high-contrast:hover),.rt-Code:where(.rt-variant-solid):where(:any-link,button):where(.rt-high-contrast:hover){background-color:var(--accent-12);filter:var(--base-button-solid-high-contrast-hover-filter)}}.rt-Code:where(.rt-variant-soft){background-color:var(--accent-a3);color:var(--accent-a11)}.rt-Code:where(.rt-variant-soft):where(.rt-high-contrast){color:var(--accent-12)}:where(.rt-Link) .rt-Code:where(.rt-variant-soft),.rt-Code:where(.rt-variant-soft):where(:any-link,button){isolation:isolate}@media (hover: hover){:where(.rt-Link) .rt-Code:where(.rt-variant-soft):where(:hover),.rt-Code:where(.rt-variant-soft):where(:any-link,button):where(:hover){background-color:var(--accent-a4)}}.rt-Code:where(.rt-variant-outline){box-shadow:inset 0 0 0 max(1px,.033em) var(--accent-a8);color:var(--accent-a11)}.rt-Code:where(.rt-variant-outline):where(.rt-high-contrast){box-shadow:inset 0 0 0 max(1px,.033em) var(--accent-a7),inset 0 0 0 max(1px,.033em) var(--gray-a11);color:var(--accent-12)}:where(.rt-Link) .rt-Code:where(.rt-variant-outline),.rt-Code:where(.rt-variant-outline):where(:any-link,button){isolation:isolate}@media (hover: hover){:where(.rt-Link) .rt-Code:where(.rt-variant-outline):where(:hover),.rt-Code:where(.rt-variant-outline):where(:any-link,button):where(:hover){background-color:var(--accent-a2)}}.rt-BaseMenuContent{--scrollarea-scrollbar-vertical-margin-top: var(--base-menu-content-padding);--scrollarea-scrollbar-vertical-margin-bottom: var(--base-menu-content-padding);--scrollarea-scrollbar-horizontal-margin-left: var(--base-menu-content-padding);--scrollarea-scrollbar-horizontal-margin-right: var(--base-menu-content-padding);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;background-color:var(--base-menu-bg);--base-menu-bg: var(--color-panel-solid);box-shadow:var(--shadow-5)}.rt-BaseMenuViewport{flex:1 1 0%;display:flex;flex-direction:column;overflow:auto;padding:var(--base-menu-content-padding);box-sizing:border-box}:where(.rt-BaseMenuContent:has(.rt-ScrollAreaScrollbar[data-orientation=vertical])) .rt-BaseMenuViewport{padding-right:var(--space-3)}.rt-BaseMenuItem{display:flex;align-items:center;gap:var(--space-2);height:var(--base-menu-item-height);padding-left:var(--base-menu-item-padding-left);padding-right:var(--base-menu-item-padding-right);box-sizing:border-box;position:relative;outline:none;scroll-margin:var(--base-menu-content-padding) 0;-webkit-user-select:none;user-select:none;cursor:var(--cursor-menu-item)}.rt-BaseMenuShortcut{display:flex;align-items:center;margin-left:auto;padding-left:var(--space-4);color:var(--gray-a11)}.rt-BaseMenuSubTriggerIcon{color:var(--gray-12);margin-right:calc(-2px * var(--scaling))}.rt-BaseMenuItemIndicator{position:absolute;left:0;width:var(--base-menu-item-padding-left);display:inline-flex;align-items:center;justify-content:center}.rt-BaseMenuSeparator{height:1px;margin-top:var(--space-2);margin-bottom:var(--space-2);margin-left:var(--base-menu-item-padding-left);margin-right:var(--base-menu-item-padding-right);background-color:var(--gray-a6)}.rt-BaseMenuLabel{display:flex;align-items:center;height:var(--base-menu-item-height);padding-left:var(--base-menu-item-padding-left);padding-right:var(--base-menu-item-padding-right);box-sizing:border-box;color:var(--gray-a10);-webkit-user-select:none;user-select:none;cursor:default}:where(.rt-BaseMenuItem)+.rt-BaseMenuLabel{margin-top:var(--space-2)}.rt-BaseMenuArrow{fill:var(--base-menu-bg)}.rt-BaseMenuContent:where(.rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}@media (min-width: 520px){.rt-BaseMenuContent:where(.xs\:rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.xs\:rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.xs\:rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.xs\:rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.xs\:rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.xs\:rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.xs\:rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.xs\:rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.xs\:rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.xs\:rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.xs\:rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.xs\:rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}}@media (min-width: 768px){.rt-BaseMenuContent:where(.sm\:rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.sm\:rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.sm\:rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.sm\:rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.sm\:rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.sm\:rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.sm\:rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.sm\:rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.sm\:rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.sm\:rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.sm\:rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.sm\:rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}}@media (min-width: 1024px){.rt-BaseMenuContent:where(.md\:rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.md\:rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.md\:rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.md\:rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.md\:rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.md\:rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.md\:rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.md\:rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.md\:rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.md\:rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.md\:rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.md\:rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}}@media (min-width: 1280px){.rt-BaseMenuContent:where(.lg\:rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.lg\:rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.lg\:rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.lg\:rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.lg\:rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.lg\:rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.lg\:rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.lg\:rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.lg\:rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.lg\:rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.lg\:rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.lg\:rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}}@media (min-width: 1640px){.rt-BaseMenuContent:where(.xl\:rt-r-size-1){--base-menu-content-padding: var(--space-1);--base-menu-item-padding-left: calc(var(--space-5) / 1.2);--base-menu-item-padding-right: var(--space-2);--base-menu-item-height: var(--space-5);border-radius:var(--radius-3)}.rt-BaseMenuContent:where(.xl\:rt-r-size-1) :where(.rt-BaseMenuItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-BaseMenuContent:where(.xl\:rt-r-size-1) :where(.rt-BaseMenuLabel){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-BaseMenuContent:where(.xl\:rt-r-size-1) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-BaseMenuContent:where(.xl\:rt-r-size-1):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-2)}.rt-BaseMenuContent:where(.xl\:rt-r-size-1):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: calc(var(--space-5) / 1.2)}.rt-BaseMenuContent:where(.xl\:rt-r-size-2){--base-menu-content-padding: var(--space-2);--base-menu-item-padding-left: var(--space-3);--base-menu-item-padding-right: var(--space-3);--base-menu-item-height: var(--space-6);border-radius:var(--radius-4)}.rt-BaseMenuContent:where(.xl\:rt-r-size-2) :where(.rt-BaseMenuItem){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:var(--radius-2)}.rt-BaseMenuContent:where(.xl\:rt-r-size-2) :where(.rt-BaseMenuLabel){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-BaseMenuContent:where(.xl\:rt-r-size-2) :where(.rt-BaseMenuItemIndicatorIcon,.rt-BaseMenuSubTriggerIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-BaseMenuContent:where(.xl\:rt-r-size-2):where(:not(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem))){--base-menu-item-padding-left: var(--space-3)}.rt-BaseMenuContent:where(.xl\:rt-r-size-2):where(:has(.rt-BaseMenuCheckboxItem,.rt-BaseMenuRadioItem)){--base-menu-item-padding-left: var(--space-5)}}.rt-BaseMenuItem:where([data-accent-color]){color:var(--accent-a11)}.rt-BaseMenuItem:where([data-disabled]){color:var(--gray-a8);cursor:default}.rt-BaseMenuItem:where([data-disabled],[data-highlighted]) :where(.rt-BaseMenuShortcut),.rt-BaseMenuSubTrigger:where([data-state=open]) :where(.rt-BaseMenuShortcut){color:inherit}.rt-BaseMenuContent:where(.rt-variant-solid) :where(.rt-BaseMenuSubTrigger[data-state=open]){background-color:var(--gray-a3)}.rt-BaseMenuContent:where(.rt-variant-solid) :where(.rt-BaseMenuItem[data-highlighted]){background-color:var(--accent-9);color:var(--accent-contrast)}.rt-BaseMenuContent:where(.rt-variant-solid) :where(.rt-BaseMenuItem[data-highlighted]) :where(.rt-BaseMenuSubTriggerIcon){color:var(--accent-contrast)}.rt-BaseMenuContent:where(.rt-variant-solid):where(.rt-high-contrast) :where(.rt-BaseMenuItem[data-highlighted]){background-color:var(--accent-12);color:var(--accent-1)}.rt-BaseMenuContent:where(.rt-variant-solid):where(.rt-high-contrast) :where(.rt-BaseMenuItem[data-highlighted]) :where(.rt-BaseMenuSubTriggerIcon){color:var(--accent-1)}.rt-BaseMenuContent:where(.rt-variant-solid):where(.rt-high-contrast) :where(.rt-BaseMenuItem[data-highlighted]):where([data-accent-color]){background-color:var(--accent-9);color:var(--accent-contrast)}.rt-BaseMenuContent:where(.rt-variant-soft) :where(.rt-BaseMenuSubTrigger[data-state=open]){background-color:var(--accent-a3)}.rt-BaseMenuContent:where(.rt-variant-soft) :where(.rt-BaseMenuItem[data-highlighted]){background-color:var(--accent-a4)}.rt-ContextMenuContent{max-height:var(--radix-context-menu-content-available-height);transform-origin:var(--radix-context-menu-content-transform-origin)}.rt-DataListRoot{overflow-wrap:anywhere;font-family:var(--default-font-family);font-weight:var(--font-weight-normal);font-style:normal;text-align:start;--data-list-leading-trim-start: calc(var(--default-leading-trim-start) - var(--line-height) / 2);--data-list-leading-trim-end: calc(var(--default-leading-trim-end) - var(--line-height) / 2)}.rt-DataListLabel{display:flex;color:var(--gray-a11)}.rt-DataListLabel:where(.rt-high-contrast){color:var(--gray-12)}.rt-DataListLabel:where([data-accent-color]){color:var(--accent-a11)}.rt-DataListLabel:where([data-accent-color]):where(.rt-high-contrast){color:var(--accent-12)}.rt-DataListValue{display:flex;margin:0;min-width:0px;margin-top:var(--data-list-value-margin-top);margin-bottom:var(--data-list-value-margin-bottom)}.rt-DataListItem{--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}:where(.rt-DataListItem:first-child) .rt-DataListValue{margin-top:var(--data-list-first-item-value-margin-top)}:where(.rt-DataListItem:last-child) .rt-DataListValue{margin-bottom:var(--data-list-last-item-value-margin-bottom)}.rt-DataListRoot:where(.rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.rt-r-size-3){gap:calc(var(--space-4) * 1.25)}@media (min-width: 520px){.rt-DataListRoot:where(.xs\:rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.xs\:rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.xs\:rt-r-size-3){gap:calc(var(--space-4) * 1.25)}}@media (min-width: 768px){.rt-DataListRoot:where(.sm\:rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.sm\:rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.sm\:rt-r-size-3){gap:calc(var(--space-4) * 1.25)}}@media (min-width: 1024px){.rt-DataListRoot:where(.md\:rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.md\:rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.md\:rt-r-size-3){gap:calc(var(--space-4) * 1.25)}}@media (min-width: 1280px){.rt-DataListRoot:where(.lg\:rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.lg\:rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.lg\:rt-r-size-3){gap:calc(var(--space-4) * 1.25)}}@media (min-width: 1640px){.rt-DataListRoot:where(.xl\:rt-r-size-1){gap:var(--space-3)}.rt-DataListRoot:where(.xl\:rt-r-size-2){gap:var(--space-4)}.rt-DataListRoot:where(.xl\:rt-r-size-3){gap:calc(var(--space-4) * 1.25)}}.rt-DataListRoot:where(.rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}@media (min-width: 520px){.rt-DataListRoot:where(.xs\:rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.xs\:rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.xs\:rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.xs\:rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.xs\:rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.xs\:rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}}@media (min-width: 768px){.rt-DataListRoot:where(.sm\:rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.sm\:rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.sm\:rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.sm\:rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.sm\:rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.sm\:rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}}@media (min-width: 1024px){.rt-DataListRoot:where(.md\:rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.md\:rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.md\:rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.md\:rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.md\:rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.md\:rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}}@media (min-width: 1280px){.rt-DataListRoot:where(.lg\:rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.lg\:rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.lg\:rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.lg\:rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.lg\:rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.lg\:rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}}@media (min-width: 1640px){.rt-DataListRoot:where(.xl\:rt-r-orientation-vertical){display:flex;flex-direction:column}.rt-DataListRoot:where(.xl\:rt-r-orientation-vertical) :where(.rt-DataListItem){--data-list-value-margin-top: 0px;--data-list-value-margin-bottom: 0px;--data-list-first-item-value-margin-top: 0px;--data-list-last-item-value-margin-bottom: 0px;display:flex;flex-direction:column;gap:var(--space-1)}.rt-DataListRoot:where(.xl\:rt-r-orientation-vertical) :where(.rt-DataListLabel){min-width:0px}.rt-DataListRoot:where(.xl\:rt-r-orientation-horizontal){display:grid;grid-template-columns:auto 1fr}.rt-DataListRoot:where(.xl\:rt-r-orientation-horizontal) :where(.rt-DataListItem){--data-list-value-margin-top: var(--data-list-value-trim-start);--data-list-value-margin-bottom: var(--data-list-value-trim-end);--data-list-first-item-value-margin-top: var(--data-list-first-item-value-trim-start);--data-list-last-item-value-margin-bottom: var(--data-list-last-item-value-trim-end);display:grid;grid-template-columns:inherit;grid-template-columns:subgrid;gap:inherit;grid-column:span 2;align-items:baseline}.rt-DataListRoot:where(.xl\:rt-r-orientation-horizontal) :where(.rt-DataListLabel){min-width:120px}}.rt-DataListLabel:before,.rt-DataListValue:before{content:"‍"}.rt-DataListItem:where(.rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}@media (min-width: 520px){.rt-DataListItem:where(.xs\:rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xs\:rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xs\:rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.xs\:rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xs\:rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}}@media (min-width: 768px){.rt-DataListItem:where(.sm\:rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.sm\:rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.sm\:rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.sm\:rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.sm\:rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}}@media (min-width: 1024px){.rt-DataListItem:where(.md\:rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.md\:rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.md\:rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.md\:rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.md\:rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}}@media (min-width: 1280px){.rt-DataListItem:where(.lg\:rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.lg\:rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.lg\:rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.lg\:rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.lg\:rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}}@media (min-width: 1640px){.rt-DataListItem:where(.xl\:rt-r-ai-baseline){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xl\:rt-r-ai-start){--data-list-value-trim-start: 0px;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xl\:rt-r-ai-center){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: -.25em;--data-list-first-item-value-trim-start: -.25em;--data-list-last-item-value-trim-end: -.25em}.rt-DataListItem:where(.xl\:rt-r-ai-end){--data-list-value-trim-start: -.25em;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}.rt-DataListItem:where(.xl\:rt-r-ai-stretch){--data-list-value-trim-start: 0px;--data-list-value-trim-end: 0px;--data-list-first-item-value-trim-start: 0px;--data-list-last-item-value-trim-end: 0px}}.rt-DataListItem:where(:first-child){margin-top:var(--leading-trim-start)}.rt-DataListItem:where(:last-child){margin-bottom:var(--leading-trim-end)}.rt-DataListRoot:where(.rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}@media (min-width: 520px){.rt-DataListRoot:where(.xs\:rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.xs\:rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.xs\:rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.xs\:rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}}@media (min-width: 768px){.rt-DataListRoot:where(.sm\:rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.sm\:rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.sm\:rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.sm\:rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}}@media (min-width: 1024px){.rt-DataListRoot:where(.md\:rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.md\:rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.md\:rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.md\:rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}}@media (min-width: 1280px){.rt-DataListRoot:where(.lg\:rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.lg\:rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.lg\:rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.lg\:rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}}@media (min-width: 1640px){.rt-DataListRoot:where(.xl\:rt-r-trim-normal){--leading-trim-start: initial;--leading-trim-end: initial}.rt-DataListRoot:where(.xl\:rt-r-trim-start){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: initial}.rt-DataListRoot:where(.xl\:rt-r-trim-end){--leading-trim-start: initial;--leading-trim-end: var(--data-list-leading-trim-end)}.rt-DataListRoot:where(.xl\:rt-r-trim-both){--leading-trim-start: var(--data-list-leading-trim-start);--leading-trim-end: var(--data-list-leading-trim-end)}}.rt-DropdownMenuContent{max-height:var(--radix-dropdown-menu-content-available-height);transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.rt-Em{box-sizing:border-box;font-family:var(--em-font-family);font-size:calc(var(--em-font-size-adjust) * 1em);font-style:var(--em-font-style);font-weight:var(--em-font-weight);line-height:1.25;letter-spacing:calc(var(--em-letter-spacing) + var(--letter-spacing, var(--default-letter-spacing)));color:inherit}.rt-Em :where(.rt-Em){font-size:inherit}.rt-Heading{--leading-trim-start: var(--heading-leading-trim-start);--leading-trim-end: var(--heading-leading-trim-end);font-family:var(--heading-font-family);font-style:var(--heading-font-style);font-weight:var(--font-weight-bold);line-height:var(--line-height)}:where(.rt-Heading){margin:0}.rt-Heading:where([data-accent-color]){color:var(--accent-a11)}.rt-Heading:where([data-accent-color].rt-high-contrast),:where([data-accent-color]:not(.radix-themes)) .rt-Heading:where(.rt-high-contrast){color:var(--accent-12)}.rt-Heading:where(.rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}@media (min-width: 520px){.rt-Heading:where(.xs\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.xs\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}}@media (min-width: 768px){.rt-Heading:where(.sm\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.sm\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}}@media (min-width: 1024px){.rt-Heading:where(.md\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.md\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}}@media (min-width: 1280px){.rt-Heading:where(.lg\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.lg\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}}@media (min-width: 1640px){.rt-Heading:where(.xl\:rt-r-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(--letter-spacing-1) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(--letter-spacing-2) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(--letter-spacing-3) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(--letter-spacing-4) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(--letter-spacing-5) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(--letter-spacing-6) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(--letter-spacing-7) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(--letter-spacing-8) + var(--heading-letter-spacing))}.rt-Heading:where(.xl\:rt-r-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(--letter-spacing-9) + var(--heading-letter-spacing))}}.rt-HoverCardContent{background-color:var(--color-panel-solid);box-shadow:var(--shadow-4);overflow:auto;position:relative;--inset-padding-top: var(--hover-card-content-padding);--inset-padding-right: var(--hover-card-content-padding);--inset-padding-bottom: var(--hover-card-content-padding);--inset-padding-left: var(--hover-card-content-padding);padding:var(--hover-card-content-padding);box-sizing:border-box;transform-origin:var(--radix-hover-card-content-transform-origin)}.rt-HoverCardContent:where(.rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}@media (min-width: 520px){.rt-HoverCardContent:where(.xs\:rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.xs\:rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.xs\:rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}}@media (min-width: 768px){.rt-HoverCardContent:where(.sm\:rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.sm\:rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.sm\:rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}}@media (min-width: 1024px){.rt-HoverCardContent:where(.md\:rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.md\:rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.md\:rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}}@media (min-width: 1280px){.rt-HoverCardContent:where(.lg\:rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.lg\:rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.lg\:rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}}@media (min-width: 1640px){.rt-HoverCardContent:where(.xl\:rt-r-size-1){--hover-card-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.xl\:rt-r-size-2){--hover-card-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-HoverCardContent:where(.xl\:rt-r-size-3){--hover-card-content-padding: var(--space-5);border-radius:var(--radius-5)}}.rt-IconButton:where(:not(.rt-variant-ghost)){height:var(--base-button-height);width:var(--base-button-height)}.rt-IconButton:where(.rt-variant-ghost){padding:var(--icon-button-ghost-padding);--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px;--margin-top-override: calc(var(--margin-top) - var(--icon-button-ghost-padding));--margin-right-override: calc(var(--margin-right) - var(--icon-button-ghost-padding));--margin-bottom-override: calc(var(--margin-bottom) - var(--icon-button-ghost-padding));--margin-left-override: calc(var(--margin-left) - var(--icon-button-ghost-padding));margin:var(--margin-top-override) var(--margin-right-override) var(--margin-bottom-override) var(--margin-left-override)}:where(.rt-IconButton:where(.rt-variant-ghost))>*{--margin-top-override: initial;--margin-right-override: initial;--margin-bottom-override: initial;--margin-left-override: initial}.rt-IconButton:where(.rt-variant-ghost):where(.rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}@media (min-width: 520px){.rt-IconButton:where(.rt-variant-ghost):where(.xs\:rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.xs\:rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.xs\:rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.xs\:rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}}@media (min-width: 768px){.rt-IconButton:where(.rt-variant-ghost):where(.sm\:rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.sm\:rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.sm\:rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.sm\:rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}}@media (min-width: 1024px){.rt-IconButton:where(.rt-variant-ghost):where(.md\:rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.md\:rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.md\:rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.md\:rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}}@media (min-width: 1280px){.rt-IconButton:where(.rt-variant-ghost):where(.lg\:rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.lg\:rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.lg\:rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.lg\:rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}}@media (min-width: 1640px){.rt-IconButton:where(.rt-variant-ghost):where(.xl\:rt-r-size-1){--icon-button-ghost-padding: var(--space-1)}.rt-IconButton:where(.rt-variant-ghost):where(.xl\:rt-r-size-2){--icon-button-ghost-padding: calc(var(--space-1) * 1.5)}.rt-IconButton:where(.rt-variant-ghost):where(.xl\:rt-r-size-3){--icon-button-ghost-padding: var(--space-2)}.rt-IconButton:where(.rt-variant-ghost):where(.xl\:rt-r-size-4){--icon-button-ghost-padding: var(--space-3)}}.rt-Inset{box-sizing:border-box;--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px;overflow:hidden;margin-top:var(--margin-top-override);margin-right:var(--margin-right-override);margin-bottom:var(--margin-bottom-override);margin-left:var(--margin-left-override)}:where(.rt-Inset)>*{--margin-top-override: initial;--margin-right-override: initial;--margin-bottom-override: initial;--margin-left-override: initial}.rt-Inset:where(.rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}@media (min-width: 520px){.rt-Inset:where(.xs\:rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.xs\:rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.xs\:rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.xs\:rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.xs\:rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.xs\:rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.xs\:rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.xs\:rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.xs\:rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}}@media (min-width: 768px){.rt-Inset:where(.sm\:rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.sm\:rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.sm\:rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.sm\:rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.sm\:rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.sm\:rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.sm\:rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.sm\:rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.sm\:rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}}@media (min-width: 1024px){.rt-Inset:where(.md\:rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.md\:rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.md\:rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.md\:rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.md\:rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.md\:rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.md\:rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.md\:rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.md\:rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}}@media (min-width: 1280px){.rt-Inset:where(.lg\:rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.lg\:rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.lg\:rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.lg\:rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.lg\:rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.lg\:rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.lg\:rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.lg\:rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.lg\:rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}}@media (min-width: 1640px){.rt-Inset:where(.xl\:rt-r-clip-border-box){--inset-border-radius-calc: calc(var(--inset-border-radius, 0px) - var(--inset-border-width, 0px));--inset-padding-top-calc: var(--inset-padding-top, 0px);--inset-padding-right-calc: var(--inset-padding-right, 0px);--inset-padding-bottom-calc: var(--inset-padding-bottom, 0px);--inset-padding-left-calc: var(--inset-padding-left, 0px)}.rt-Inset:where(.xl\:rt-r-clip-padding-box){--inset-border-radius-calc: var(--inset-border-radius, 0px);--inset-padding-top-calc: calc(var(--inset-padding-top, 0px) + var(--inset-border-width, 0px));--inset-padding-right-calc: calc(var(--inset-padding-right, 0px) + var(--inset-border-width, 0px));--inset-padding-bottom-calc: calc(var(--inset-padding-bottom, 0px) + var(--inset-border-width, 0px));--inset-padding-left-calc: calc(var(--inset-padding-left, 0px) + var(--inset-border-width, 0px))}.rt-Inset:where(.xl\:rt-r-side-top){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:0}.rt-Inset:where(.xl\:rt-r-side-bottom){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.xl\:rt-r-side-left){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));--margin-right-override: var(--margin-right);border-top-left-radius:var(--inset-border-radius-calc);border-top-right-radius:0;border-bottom-left-radius:var(--inset-border-radius-calc);border-bottom-right-radius:0}.rt-Inset:where(.xl\:rt-r-side-right){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-top-left-radius:0;border-top-right-radius:var(--inset-border-radius-calc);border-bottom-left-radius:0;border-bottom-right-radius:var(--inset-border-radius-calc)}.rt-Inset:where(.xl\:rt-r-side-x){--margin-top-override: var(--margin-top);--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: var(--margin-bottom);--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:0}.rt-Inset:where(.xl\:rt-r-side-y){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: var(--margin-right);--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: var(--margin-left);border-radius:0}.rt-Inset:where(.xl\:rt-r-side-all){--margin-top-override: calc(var(--margin-top) - var(--inset-padding-top-calc));--margin-right-override: calc(var(--margin-right) - var(--inset-padding-right-calc));--margin-bottom-override: calc(var(--margin-bottom) - var(--inset-padding-bottom-calc));--margin-left-override: calc(var(--margin-left) - var(--inset-padding-left-calc));border-radius:var(--inset-border-radius-calc)}}.rt-Kbd{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-family:var(--default-font-family);font-weight:400;vertical-align:text-top;white-space:nowrap;-webkit-user-select:none;user-select:none;position:relative;top:-.03em;font-size:.75em;min-width:1.75em;line-height:1.7em;box-sizing:border-box;padding-left:.5em;padding-right:.5em;padding-bottom:.05em;word-spacing:-.1em;border-radius:calc(var(--radius-factor) * .35em);letter-spacing:var(--letter-spacing, var(--default-letter-spacing));height:fit-content;color:var(--gray-12);background-color:var(--gray-1);box-shadow:var(--kbd-box-shadow);transition:box-shadow .12s,background-color .12s}@media (hover: hover){.rt-Kbd:where(:any-link,button):where(:hover){transition-duration:40ms,40ms;background-color:var(--color-background);box-shadow:var(--kbd-box-shadow),0 0 0 .05em var(--gray-a5)}}.rt-Kbd:where(:any-link,button):where([data-state=open]){transition-duration:40ms,40ms;background-color:var(--color-background);box-shadow:var(--kbd-box-shadow),0 0 0 .05em var(--gray-a5)}.rt-Kbd:where(:any-link,button):where(:active:not([data-state=open])){padding-top:.05em;padding-bottom:0;transition-duration:40ms,40ms;background-color:var(--gray-2);box-shadow:inset 0 .05em var(--black-a3),0 0 0 .05em var(--gray-a7)}.rt-Kbd:where(:any-link,button):where(:focus-visible){outline:2px solid var(--focus-8)}.rt-Kbd:where(.rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}@media (min-width: 520px){.rt-Kbd:where(.xs\:rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.xs\:rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.xs\:rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.xs\:rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.xs\:rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.xs\:rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.xs\:rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.xs\:rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.xs\:rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 768px){.rt-Kbd:where(.sm\:rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.sm\:rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.sm\:rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.sm\:rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.sm\:rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.sm\:rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.sm\:rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.sm\:rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.sm\:rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1024px){.rt-Kbd:where(.md\:rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.md\:rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.md\:rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.md\:rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.md\:rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.md\:rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.md\:rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.md\:rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.md\:rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1280px){.rt-Kbd:where(.lg\:rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.lg\:rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.lg\:rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.lg\:rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.lg\:rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.lg\:rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.lg\:rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.lg\:rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.lg\:rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}}@media (min-width: 1640px){.rt-Kbd:where(.xl\:rt-r-size-1){font-size:calc(var(--font-size-1) * .8);--letter-spacing: var(--letter-spacing-1)}.rt-Kbd:where(.xl\:rt-r-size-2){font-size:calc(var(--font-size-2) * .8);--letter-spacing: var(--letter-spacing-2)}.rt-Kbd:where(.xl\:rt-r-size-3){font-size:calc(var(--font-size-3) * .8);--letter-spacing: var(--letter-spacing-3)}.rt-Kbd:where(.xl\:rt-r-size-4){font-size:calc(var(--font-size-4) * .8);--letter-spacing: var(--letter-spacing-4)}.rt-Kbd:where(.xl\:rt-r-size-5){font-size:calc(var(--font-size-5) * .8);--letter-spacing: var(--letter-spacing-5)}.rt-Kbd:where(.xl\:rt-r-size-6){font-size:calc(var(--font-size-6) * .8);--letter-spacing: var(--letter-spacing-6)}.rt-Kbd:where(.xl\:rt-r-size-7){font-size:calc(var(--font-size-7) * .8);--letter-spacing: var(--letter-spacing-7)}.rt-Kbd:where(.xl\:rt-r-size-8){font-size:calc(var(--font-size-8) * .8);--letter-spacing: var(--letter-spacing-8)}.rt-Kbd:where(.xl\:rt-r-size-9){font-size:calc(var(--font-size-9) * .8);--letter-spacing: var(--letter-spacing-9)}}.rt-Link:where(:any-link,button){cursor:var(--cursor-link);text-decoration-line:none;text-decoration-style:solid;text-decoration-thickness:min(2px,max(1px,.05em));text-underline-offset:calc(.025em + 2px);text-decoration-color:var(--accent-a5)}.rt-Link:where(:disabled,[data-disabled]){cursor:var(--cursor-disabled)}:where([data-accent-color]:not(.radix-themes,.rt-high-contrast)) .rt-Link:where([data-accent-color=""]){color:var(--accent-12)}@supports (color: color-mix(in oklab,white,black)){.rt-Link:where(:any-link,button){text-decoration-color:color-mix(in oklab,var(--accent-a5),var(--gray-a6))}}@media (pointer: coarse){.rt-Link:where(:any-link,button):where(:active:not(:focus-visible,[data-state=open])){outline:.75em solid var(--accent-a4);outline-offset:-.6em}}@media (hover: hover){.rt-Link:where(:any-link,button):where(.rt-underline-auto):where(:hover){text-decoration-line:underline}}.rt-Link:where(:any-link,button):where(.rt-underline-auto):where(.rt-high-contrast),:where([data-accent-color]:not(.radix-themes,.rt-high-contrast)) .rt-Link:where(:any-link,button):where(.rt-underline-auto):where([data-accent-color=""]){text-decoration-line:underline;text-decoration-color:var(--accent-a6)}@supports (color: color-mix(in oklab,white,black)){.rt-Link:where(:any-link,button):where(.rt-underline-auto):where(.rt-high-contrast),:where([data-accent-color]:not(.radix-themes,.rt-high-contrast)) .rt-Link:where(:any-link,button):where(.rt-underline-auto):where([data-accent-color=""]){text-decoration-color:color-mix(in oklab,var(--accent-a6),var(--gray-a6))}}@media (hover: hover){.rt-Link:where(:any-link,button):where(.rt-underline-hover):where(:hover){text-decoration-line:underline}}.rt-Link:where(:any-link,button):where(.rt-underline-always){text-decoration-line:underline}.rt-Link:where(:focus-visible){text-decoration-line:none;border-radius:calc(.07em * var(--radius-factor));outline-color:var(--focus-8);outline-width:2px;outline-style:solid;outline-offset:2px}.rt-Link:where(:has(.rt-Code:not(.rt-variant-ghost):only-child)){text-decoration-color:transparent}.rt-PopoverContent{background-color:var(--color-panel-solid);box-shadow:var(--shadow-5);min-width:var(--radix-popover-trigger-width);outline:0;overflow:auto;position:relative;--inset-padding-top: var(--popover-content-padding);--inset-padding-right: var(--popover-content-padding);--inset-padding-bottom: var(--popover-content-padding);--inset-padding-left: var(--popover-content-padding);padding:var(--popover-content-padding);box-sizing:border-box;transform-origin:var(--radix-popover-content-transform-origin)}.rt-PopoverContent:where(.rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}@media (min-width: 520px){.rt-PopoverContent:where(.xs\:rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.xs\:rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.xs\:rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.xs\:rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 768px){.rt-PopoverContent:where(.sm\:rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.sm\:rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.sm\:rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.sm\:rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1024px){.rt-PopoverContent:where(.md\:rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.md\:rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.md\:rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.md\:rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1280px){.rt-PopoverContent:where(.lg\:rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.lg\:rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.lg\:rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.lg\:rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}}@media (min-width: 1640px){.rt-PopoverContent:where(.xl\:rt-r-size-1){--popover-content-padding: var(--space-3);border-radius:var(--radius-4)}.rt-PopoverContent:where(.xl\:rt-r-size-2){--popover-content-padding: var(--space-4);border-radius:var(--radius-4)}.rt-PopoverContent:where(.xl\:rt-r-size-3){--popover-content-padding: var(--space-5);border-radius:var(--radius-5)}.rt-PopoverContent:where(.xl\:rt-r-size-4){--popover-content-padding: var(--space-6);border-radius:var(--radius-5)}}.rt-ProgressRoot{--progress-value: 0;--progress-max: 100;--progress-duration: 5s;pointer-events:none;position:relative;overflow:hidden;flex-grow:1;height:var(--progress-height);border-radius:max(calc(var(--radius-factor) * var(--progress-height) / 3),calc(var(--radius-factor) * var(--radius-thumb)))}.rt-ProgressRoot:after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";border-radius:inherit}.rt-ProgressIndicator{display:block;height:100%;width:100%;transform:scaleX(calc(var(--progress-value) / var(--progress-max)));transform-origin:left center;transition:transform .12s}.rt-ProgressIndicator:where([data-state=indeterminate]){animation-name:rt-progress-indicator-indeterminate-grow,var(--progress-indicator-indeterminate-animation-start),var(--progress-indicator-indeterminate-animation-repeat);animation-delay:0s,calc(var(--progress-duration) + 5s),calc(var(--progress-duration) + 7.5s);animation-duration:var(--progress-duration),2.5s,5s;animation-iteration-count:1,1,infinite;animation-fill-mode:both,none,none;animation-direction:normal,normal,alternate}.rt-ProgressIndicator:where([data-state=indeterminate]):after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";width:400%;animation-name:rt-progress-indicator-indeterminate-shine-from-left;animation-delay:calc(var(--progress-duration) + 5s);animation-duration:5s;animation-fill-mode:backwards;animation-iteration-count:infinite;background-image:linear-gradient(to right,transparent 25%,var(--progress-indicator-after-linear-gradient),transparent 75%)}@keyframes rt-progress-indicator-indeterminate-grow{0%{transform:scaleX(.01)}20%{transform:scaleX(.1)}30%{transform:scaleX(.6)}40%,50%{transform:scaleX(.9)}to{transform:scaleX(1)}}@keyframes rt-progress-indicator-indeterminate-shine-from-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.rt-ProgressRoot:where(.rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.rt-r-size-3){--progress-height: var(--space-2)}@media (min-width: 520px){.rt-ProgressRoot:where(.xs\:rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.xs\:rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.xs\:rt-r-size-3){--progress-height: var(--space-2)}}@media (min-width: 768px){.rt-ProgressRoot:where(.sm\:rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.sm\:rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.sm\:rt-r-size-3){--progress-height: var(--space-2)}}@media (min-width: 1024px){.rt-ProgressRoot:where(.md\:rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.md\:rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.md\:rt-r-size-3){--progress-height: var(--space-2)}}@media (min-width: 1280px){.rt-ProgressRoot:where(.lg\:rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.lg\:rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.lg\:rt-r-size-3){--progress-height: var(--space-2)}}@media (min-width: 1640px){.rt-ProgressRoot:where(.xl\:rt-r-size-1){--progress-height: var(--space-1)}.rt-ProgressRoot:where(.xl\:rt-r-size-2){--progress-height: calc(var(--space-2) * .75)}.rt-ProgressRoot:where(.xl\:rt-r-size-3){--progress-height: var(--space-2)}}.rt-ProgressRoot:where(.rt-variant-surface){--progress-indicator-indeterminate-animation-start: rt-progress-indicator-surface-indeterminate-fade;--progress-indicator-indeterminate-animation-repeat: rt-progress-indicator-surface-indeterminate-pulse;background-color:var(--gray-a3)}.rt-ProgressRoot:where(.rt-variant-surface):after{box-shadow:inset 0 0 0 1px var(--gray-a4)}.rt-ProgressRoot:where(.rt-variant-surface) :where(.rt-ProgressIndicator){background-color:var(--accent-track)}@keyframes rt-progress-indicator-surface-indeterminate-fade{to{background-color:var(--accent-7)}}@keyframes rt-progress-indicator-surface-indeterminate-pulse{0%{background-color:var(--accent-7)}to{background-color:var(--accent-track)}}.rt-ProgressRoot:where(.rt-variant-classic){--progress-indicator-indeterminate-animation-start: rt-progress-indicator-classic-indeterminate-fade;--progress-indicator-indeterminate-animation-repeat: rt-progress-indicator-classic-indeterminate-pulse;background-color:var(--gray-a3)}.rt-ProgressRoot:where(.rt-variant-classic):after{box-shadow:var(--shadow-1)}.rt-ProgressRoot:where(.rt-variant-classic) :where(.rt-ProgressIndicator){background-color:var(--accent-track)}@keyframes rt-progress-indicator-classic-indeterminate-fade{to{background-color:var(--accent-7)}}@keyframes rt-progress-indicator-classic-indeterminate-pulse{0%{background-color:var(--accent-7)}to{background-color:var(--accent-track)}}.rt-ProgressRoot:where(.rt-variant-soft){--progress-indicator-indeterminate-animation-start: rt-progress-indicator-soft-indeterminate-fade;--progress-indicator-indeterminate-animation-repeat: rt-progress-indicator-soft-indeterminate-pulse;background-color:var(--gray-a4);background-image:linear-gradient(var(--white-a1),var(--white-a1))}.rt-ProgressRoot:where(.rt-variant-soft) :where(.rt-ProgressIndicator){background-image:linear-gradient(var(--accent-a5),var(--accent-a5));background-color:var(--accent-8)}.rt-ProgressRoot:where(.rt-variant-soft) :where(.rt-ProgressIndicator):after{opacity:.75}@keyframes rt-progress-indicator-soft-indeterminate-fade{to{background-color:var(--accent-5)}}@keyframes rt-progress-indicator-soft-indeterminate-pulse{0%{background-color:var(--accent-5)}to{background-color:var(--accent-7)}}.rt-ProgressRoot:where(.rt-high-contrast){--progress-indicator-indeterminate-animation-start: rt-progress-indicator-high-contrast-indeterminate-fade;--progress-indicator-indeterminate-animation-repeat: rt-progress-indicator-high-contrast-indeterminate-pulse}.rt-ProgressRoot:where(.rt-high-contrast) :where(.rt-ProgressIndicator){background-color:var(--accent-12)}.rt-ProgressRoot:where(.rt-high-contrast) :where(.rt-ProgressIndicator):after{opacity:.75}@keyframes rt-progress-indicator-high-contrast-indeterminate-fade{to{opacity:.8}}@keyframes rt-progress-indicator-high-contrast-indeterminate-pulse{0%{opacity:.8}to{opacity:1}}.rt-Quote{box-sizing:border-box;font-family:var(--quote-font-family);font-size:calc(var(--quote-font-size-adjust) * 1em);font-style:var(--quote-font-style);font-weight:var(--quote-font-weight);line-height:1.25;letter-spacing:calc(var(--quote-letter-spacing) + var(--letter-spacing, var(--default-letter-spacing)));color:inherit}.rt-Quote :where(.rt-Quote){font-size:inherit}.rt-RadioCardsRoot{line-height:var(--line-height);letter-spacing:var(--letter-spacing);cursor:default}.rt-RadioCardsItem{--base-card-padding-top: var(--radio-cards-item-padding-y);--base-card-padding-right: var(--radio-cards-item-padding-x);--base-card-padding-bottom: var(--radio-cards-item-padding-y);--base-card-padding-left: var(--radio-cards-item-padding-x);--base-card-border-radius: var(--radio-cards-item-border-radius);--base-card-border-width: var(--radio-cards-item-border-width);display:flex;align-items:center;justify-content:center;gap:var(--space-2)}.rt-RadioCardsItem>*{pointer-events:none}.rt-RadioCardsItem>:where(svg){flex-shrink:0}.rt-RadioCardsItem:after{outline-offset:-1px}.rt-RadioCardsRoot:where(.rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}@media (min-width: 520px){.rt-RadioCardsRoot:where(.xs\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.xs\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.xs\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}}@media (min-width: 768px){.rt-RadioCardsRoot:where(.sm\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.sm\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.sm\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}}@media (min-width: 1024px){.rt-RadioCardsRoot:where(.md\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.md\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.md\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}}@media (min-width: 1280px){.rt-RadioCardsRoot:where(.lg\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.lg\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.lg\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}}@media (min-width: 1640px){.rt-RadioCardsRoot:where(.xl\:rt-r-size-1){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-3);--radio-cards-item-padding-y: calc(var(--space-3) / 1.2);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.xl\:rt-r-size-2){font-size:var(--font-size-2);--line-height: var(--line-height-2);--letter-spacing: var(--letter-spacing-2);--radio-cards-item-padding-x: var(--space-4);--radio-cards-item-padding-y: calc(var(--space-4) * .875);--radio-cards-item-border-radius: var(--radius-3)}.rt-RadioCardsRoot:where(.xl\:rt-r-size-3){font-size:var(--font-size-3);--line-height: var(--line-height-3);--letter-spacing: var(--letter-spacing-3);--radio-cards-item-padding-x: var(--space-5);--radio-cards-item-padding-y: calc(var(--space-5) / 1.2);--radio-cards-item-border-radius: var(--radius-4)}}:where(.rt-RadioCardsRoot.rt-variant-surface) .rt-RadioCardsItem{--radio-cards-item-border-width: 1px;--radio-cards-item-background-color: var(--color-surface)}:where(.rt-RadioCardsRoot.rt-variant-surface) .rt-RadioCardsItem:before{background-color:var(--radio-cards-item-background-color)}:where(.rt-RadioCardsRoot.rt-variant-surface) .rt-RadioCardsItem:after{box-shadow:var(--base-card-surface-box-shadow)}@media (hover: hover){:where(.rt-RadioCardsRoot.rt-variant-surface) .rt-RadioCardsItem:where(:not(:disabled):not([data-state=checked]):hover):after{box-shadow:var(--base-card-surface-hover-box-shadow)}}:where(.rt-RadioCardsRoot.rt-variant-classic) .rt-RadioCardsItem{--radio-cards-item-border-width: 1px;--radio-cards-item-background-color: var(--color-surface);transition:box-shadow .12s;box-shadow:var(--base-card-classic-box-shadow-outer)}:where(.rt-RadioCardsRoot.rt-variant-classic) .rt-RadioCardsItem:before{background-color:var(--radio-cards-item-background-color)}:where(.rt-RadioCardsRoot.rt-variant-classic) .rt-RadioCardsItem:after{box-shadow:var(--base-card-classic-box-shadow-inner)}@media (hover: hover){:where(.rt-RadioCardsRoot.rt-variant-classic) .rt-RadioCardsItem:where(:not(:disabled):not([data-state=checked]):hover){transition-duration:40ms;box-shadow:var(--base-card-classic-hover-box-shadow-outer)}:where(.rt-RadioCardsRoot.rt-variant-classic) .rt-RadioCardsItem:where(:not(:disabled):not([data-state=checked]):hover):after{box-shadow:var(--base-card-classic-hover-box-shadow-inner)}}.rt-RadioCardsItem:where([data-state=checked]):after{outline:2px solid var(--accent-indicator)}:where(.rt-RadioCardsRoot.rt-high-contrast) .rt-RadioCardsItem:where([data-state=checked]):after{outline-color:var(--accent-12)}.rt-RadioCardsItem:where(:focus-visible):after{outline:2px solid var(--focus-8)}.rt-RadioCardsItem:where(:focus-visible):where([data-state=checked]):before{background-image:linear-gradient(var(--focus-a3),var(--focus-a3))}.rt-RadioCardsItem:where(:focus-visible):where([data-state=checked]):after{outline-color:var(--focus-10)}.rt-RadioCardsItem:where(:disabled){cursor:var(--cursor-disabled);color:var(--gray-a9)}.rt-RadioCardsItem:where(:disabled)::selection{background-color:var(--gray-a5)}.rt-RadioCardsItem:where(:disabled):before{background-image:linear-gradient(var(--gray-a2),var(--gray-a2))}.rt-RadioCardsItem:where(:disabled):after{outline-color:var(--gray-8)}.rt-RadioGroupRoot{display:flex;flex-direction:column;gap:var(--space-1)}.rt-RadioGroupItem{display:flex;gap:.5em;width:fit-content}.rt-RadioGroupItemInner{min-width:0}.rt-BaseRadioRoot{position:relative;display:inline-flex;align-items:center;justify-content:center;vertical-align:top;flex-shrink:0;cursor:var(--cursor-radio);height:var(--skeleton-height, var(--line-height, var(--radio-size)));--skeleton-height-override: var(--radio-size);border-radius:var(--skeleton-radius);--skeleton-radius-override: 100%}.rt-BaseRadioRoot:where(:disabled,[data-disabled]){cursor:var(--cursor-disabled)}.rt-BaseRadioRoot:before{content:"";display:block;height:var(--radio-size);width:var(--radio-size);border-radius:100%}.rt-BaseRadioRoot:after{pointer-events:none;position:absolute;height:var(--radio-size);width:var(--radio-size);border-radius:100%;transform:scale(.4)}.rt-BaseRadioRoot:where(:checked,[data-state=checked]):after{content:""}.rt-BaseRadioRoot:where(:focus-visible):before{outline:2px solid var(--focus-8);outline-offset:2px}.rt-BaseRadioRoot:where(.rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}@media (min-width: 520px){.rt-BaseRadioRoot:where(.xs\:rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.xs\:rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.xs\:rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}}@media (min-width: 768px){.rt-BaseRadioRoot:where(.sm\:rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.sm\:rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.sm\:rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1024px){.rt-BaseRadioRoot:where(.md\:rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.md\:rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.md\:rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1280px){.rt-BaseRadioRoot:where(.lg\:rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.lg\:rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.lg\:rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}}@media (min-width: 1640px){.rt-BaseRadioRoot:where(.xl\:rt-r-size-1){--radio-size: calc(var(--space-4) * .875)}.rt-BaseRadioRoot:where(.xl\:rt-r-size-2){--radio-size: var(--space-4)}.rt-BaseRadioRoot:where(.xl\:rt-r-size-3){--radio-size: calc(var(--space-4) * 1.25)}}.rt-BaseRadioRoot:where(.rt-variant-surface):where(:not(:checked),[data-state=unchecked]):before{background-color:var(--color-surface);box-shadow:inset 0 0 0 1px var(--gray-a7)}.rt-BaseRadioRoot:where(.rt-variant-surface):where(:checked,[data-state=checked]):before{background-color:var(--accent-indicator)}.rt-BaseRadioRoot:where(.rt-variant-surface):after{background-color:var(--accent-contrast)}.rt-BaseRadioRoot:where(.rt-variant-surface):where(.rt-high-contrast):where(:checked,[data-state=checked]):before{background-color:var(--accent-12)}.rt-BaseRadioRoot:where(.rt-variant-surface):where(.rt-high-contrast):after{background-color:var(--accent-1)}.rt-BaseRadioRoot:where(.rt-variant-surface):where(:disabled,[data-disabled]):before{box-shadow:inset 0 0 0 1px var(--gray-a6);background-color:var(--gray-a3)}.rt-BaseRadioRoot:where(.rt-variant-surface):where(:disabled,[data-disabled]):after{background-color:var(--gray-a8)}.rt-BaseRadioRoot:where(.rt-variant-classic):where(:not(:checked),[data-state=unchecked]):before{background-color:var(--color-surface);box-shadow:inset 0 0 0 1px var(--gray-7),var(--shadow-1)}.rt-BaseRadioRoot:where(.rt-variant-classic):where(:checked,[data-state=checked]):before{background-color:var(--accent-indicator);background-image:linear-gradient(to bottom,var(--white-a3),transparent,var(--black-a3));box-shadow:inset 0 .5px .5px var(--white-a4),inset 0 -.5px .5px var(--black-a4)}.rt-BaseRadioRoot:where(.rt-variant-classic):after{background-color:var(--accent-contrast)}.rt-BaseRadioRoot:where(.rt-variant-classic):where(.rt-high-contrast):where(:checked,[data-state=checked]):before{background-color:var(--accent-12)}.rt-BaseRadioRoot:where(.rt-variant-classic):where(.rt-high-contrast):after{background-color:var(--accent-1)}.rt-BaseRadioRoot:where(.rt-variant-classic):where(:disabled,[data-disabled]):before{box-shadow:var(--shadow-1);background-color:var(--gray-a3);background-image:none}.rt-BaseRadioRoot:where(.rt-variant-classic):where(:disabled,[data-disabled]):after{background-color:var(--gray-a8)}.rt-BaseRadioRoot:where(.rt-variant-soft):before{background-color:var(--accent-a4)}.rt-BaseRadioRoot:where(.rt-variant-soft):after{background-color:var(--accent-a11)}.rt-BaseRadioRoot:where(.rt-variant-soft):where(.rt-high-contrast):after{background-color:var(--accent-12)}.rt-BaseRadioRoot:where(.rt-variant-soft):where(:focus-visible):before{outline-color:var(--accent-a8)}.rt-BaseRadioRoot:where(.rt-variant-soft):where(:disabled,[data-disabled]):before{background-color:var(--gray-a3)}.rt-BaseRadioRoot:where(.rt-variant-soft):where(:disabled,[data-disabled]):after{background-color:var(--gray-a8)}.rt-ScrollAreaRoot{display:flex;flex-direction:column;overflow:hidden;width:100%;height:100%}.rt-ScrollAreaViewport{display:flex;flex-direction:column;width:100%;height:100%}.rt-ScrollAreaViewport:where(:focus-visible)+:where(.rt-ScrollAreaViewportFocusRing){position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;outline:2px solid var(--focus-8);outline-offset:-2px}.rt-ScrollAreaViewport:where(:has(.rt-ScrollAreaScrollbar[data-orientation=horizontal])){overscroll-behavior-x:contain}.rt-ScrollAreaViewport>*{display:block!important;width:fit-content;flex-grow:1}.rt-ScrollAreaScrollbar{display:flex;-webkit-user-select:none;user-select:none;touch-action:none;background-color:var(--gray-a3);border-radius:var(--scrollarea-scrollbar-border-radius);animation-duration:.12s;animation-timing-function:ease-out}.rt-ScrollAreaScrollbar:where([data-orientation=vertical]){flex-direction:column;width:var(--scrollarea-scrollbar-size);margin-top:var(--scrollarea-scrollbar-vertical-margin-top);margin-bottom:var(--scrollarea-scrollbar-vertical-margin-bottom);margin-left:var(--scrollarea-scrollbar-vertical-margin-left);margin-right:var(--scrollarea-scrollbar-vertical-margin-right)}.rt-ScrollAreaScrollbar:where([data-orientation=horizontal]){flex-direction:row;height:var(--scrollarea-scrollbar-size);margin-top:var(--scrollarea-scrollbar-horizontal-margin-top);margin-bottom:var(--scrollarea-scrollbar-horizontal-margin-bottom);margin-left:var(--scrollarea-scrollbar-horizontal-margin-left);margin-right:var(--scrollarea-scrollbar-horizontal-margin-right)}.rt-ScrollAreaThumb{position:relative;background-color:var(--gray-a8);border-radius:inherit;transition:background-color .1s}.rt-ScrollAreaThumb:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:var(--space-4);min-height:var(--space-4)}.rt-ScrollAreaScrollbar:where(.rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}@media (min-width: 520px){.rt-ScrollAreaScrollbar:where(.xs\:rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.xs\:rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.xs\:rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}}@media (min-width: 768px){.rt-ScrollAreaScrollbar:where(.sm\:rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.sm\:rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.sm\:rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}}@media (min-width: 1024px){.rt-ScrollAreaScrollbar:where(.md\:rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.md\:rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.md\:rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}}@media (min-width: 1280px){.rt-ScrollAreaScrollbar:where(.lg\:rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.lg\:rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.lg\:rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}}@media (min-width: 1640px){.rt-ScrollAreaScrollbar:where(.xl\:rt-r-size-1){--scrollarea-scrollbar-size: var(--space-1);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.xl\:rt-r-size-2){--scrollarea-scrollbar-size: var(--space-2);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}.rt-ScrollAreaScrollbar:where(.xl\:rt-r-size-3){--scrollarea-scrollbar-size: var(--space-3);--scrollarea-scrollbar-border-radius: max(var(--radius-1), var(--radius-full))}}.rt-ScrollAreaScrollbar:where([data-state=visible]){animation-name:rt-fade-in}.rt-ScrollAreaScrollbar:where([data-state=hidden]){animation-name:rt-fade-out}@media (hover: hover){.rt-ScrollAreaThumb:where(:hover){background-color:var(--gray-a9)}}.rt-SegmentedControlRoot{display:inline-grid;vertical-align:top;grid-auto-flow:column;grid-auto-columns:1fr;align-items:stretch;color:var(--gray-12);background-color:var(--color-surface);background-image:linear-gradient(var(--gray-a3),var(--gray-a3));position:relative;min-width:max-content;font-family:var(--default-font-family);font-style:normal;text-align:center;isolation:isolate;border-radius:var(--segmented-control-border-radius)}.rt-SegmentedControlItem{display:flex;align-items:stretch;-webkit-user-select:none;user-select:none}.rt-SegmentedControlItem:where(:first-child){border-top-left-radius:inherit;border-bottom-left-radius:inherit}.rt-SegmentedControlItem:where(:nth-last-child(2)){border-top-right-radius:inherit;border-bottom-right-radius:inherit}.rt-SegmentedControlItem:where(:focus-visible){border-radius:inherit;outline:2px solid var(--focus-8);outline-offset:-1px}.rt-SegmentedControlItemLabel :where(svg){flex-shrink:0}@media (hover: hover){:where(.rt-SegmentedControlItem[data-state=off]:hover) .rt-SegmentedControlItemLabel{background-color:var(--gray-a2)}}.rt-SegmentedControlItemLabelInactive{position:absolute;transition:opacity calc(.8 * var(--segmented-control-transition-duration));font-weight:var(--font-weight-regular);letter-spacing:var(--tab-inactive-letter-spacing);word-spacing:var(--tab-inactive-word-spacing);opacity:1;transition-timing-function:ease-out}:where(.rt-SegmentedControlItem[data-state=on]) .rt-SegmentedControlItemLabelInactive{opacity:0;transition-timing-function:ease-in}.rt-SegmentedControlItemLabelActive{transition:opacity calc(.8 * var(--segmented-control-transition-duration));font-weight:var(--font-weight-medium);letter-spacing:var(--tab-active-letter-spacing);word-spacing:var(--tab-active-word-spacing);opacity:0;transition-timing-function:ease-in}:where(.rt-SegmentedControlItem[data-state=on]) .rt-SegmentedControlItemLabelActive{opacity:1;transition-timing-function:ease-out}.rt-SegmentedControlItemSeparator{z-index:-1;margin:3px -.5px;width:1px;background-color:var(--gray-a4);transition:opacity calc(.8 * var(--segmented-control-transition-duration));transition-timing-function:ease-out}:where(.rt-SegmentedControlItem:first-child) .rt-SegmentedControlItemSeparator,:where(.rt-SegmentedControlItem:where([data-state=on],:focus-visible)) .rt-SegmentedControlItemSeparator,:where(.rt-SegmentedControlItem:where([data-state=on],:focus-visible))+* .rt-SegmentedControlItemSeparator{opacity:0;transition-timing-function:ease-in}:where(.rt-SegmentedControlRoot:has(:focus-visible)) .rt-SegmentedControlItemSeparator{transition-duration:0ms}.rt-SegmentedControlIndicator{display:none;position:absolute;z-index:-1;top:0;left:0;height:100%;pointer-events:none;transition-property:transform;transition-timing-function:cubic-bezier(.445,.05,.55,.95);transition-duration:var(--segmented-control-transition-duration)}.rt-SegmentedControlIndicator:before{top:1px;right:1px;bottom:1px;left:1px;position:absolute;border-radius:max(.5px,calc(var(--segmented-control-border-radius) - 1px));background-color:var(--segmented-control-indicator-background-color);content:""}:where(.rt-SegmentedControlItem[data-state=on])~.rt-SegmentedControlIndicator{display:block}.rt-SegmentedControlIndicator:where(:nth-child(2)){width:100%}.rt-SegmentedControlIndicator:where(:nth-child(3)){width:50%}.rt-SegmentedControlIndicator:where(:nth-child(4)){width:calc(100% / 3)}.rt-SegmentedControlIndicator:where(:nth-child(5)){width:25%}.rt-SegmentedControlIndicator:where(:nth-child(6)){width:20%}.rt-SegmentedControlIndicator:where(:nth-child(7)){width:calc(100% / 6)}.rt-SegmentedControlIndicator:where(:nth-child(8)){width:calc(100% / 7)}.rt-SegmentedControlIndicator:where(:nth-child(9)){width:12.5%}.rt-SegmentedControlIndicator:where(:nth-child(10)){width:calc(100% / 9)}.rt-SegmentedControlIndicator:where(:nth-child(11)){width:10%}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(1))~.rt-SegmentedControlIndicator{transform:translate(0)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(2))~.rt-SegmentedControlIndicator{transform:translate(100%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(3))~.rt-SegmentedControlIndicator{transform:translate(200%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(4))~.rt-SegmentedControlIndicator{transform:translate(300%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(5))~.rt-SegmentedControlIndicator{transform:translate(400%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(6))~.rt-SegmentedControlIndicator{transform:translate(500%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(7))~.rt-SegmentedControlIndicator{transform:translate(600%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(8))~.rt-SegmentedControlIndicator{transform:translate(700%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(9))~.rt-SegmentedControlIndicator{transform:translate(800%)}:where(.rt-SegmentedControlItem[data-state=on]:nth-child(10))~.rt-SegmentedControlIndicator{transform:translate(900%)}.rt-SegmentedControlItemLabel{box-sizing:border-box;display:flex;flex-grow:1;align-items:center;justify-content:center;border-radius:inherit}.rt-SegmentedControlRoot:where(.rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}@media (min-width: 520px){.rt-SegmentedControlRoot:where(.xs\:rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.xs\:rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.xs\:rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.xs\:rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.xs\:rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.xs\:rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}}@media (min-width: 768px){.rt-SegmentedControlRoot:where(.sm\:rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.sm\:rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.sm\:rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.sm\:rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.sm\:rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.sm\:rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}}@media (min-width: 1024px){.rt-SegmentedControlRoot:where(.md\:rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.md\:rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.md\:rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.md\:rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.md\:rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.md\:rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}}@media (min-width: 1280px){.rt-SegmentedControlRoot:where(.lg\:rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.lg\:rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.lg\:rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.lg\:rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.lg\:rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.lg\:rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}}@media (min-width: 1640px){.rt-SegmentedControlRoot:where(.xl\:rt-r-size-1){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-5)}.rt-SegmentedControlRoot:where(.xl\:rt-r-size-1) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);padding-left:var(--space-3);padding-right:var(--space-3);gap:var(--space-1)}.rt-SegmentedControlRoot:where(.xl\:rt-r-size-2){--segmented-control-border-radius: max(var(--radius-2), var(--radius-full));height:var(--space-6)}.rt-SegmentedControlRoot:where(.xl\:rt-r-size-2) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-2)}.rt-SegmentedControlRoot:where(.xl\:rt-r-size-3){--segmented-control-border-radius: max(var(--radius-3), var(--radius-full));height:var(--space-7)}.rt-SegmentedControlRoot:where(.xl\:rt-r-size-3) :where(.rt-SegmentedControlItemLabel){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3);padding-left:var(--space-4);padding-right:var(--space-4);gap:var(--space-3)}}.rt-SegmentedControlRoot:where(.rt-variant-surface) :where(.rt-SegmentedControlIndicator):before{box-shadow:0 0 0 1px var(--gray-a4)}.rt-SegmentedControlRoot:where(.rt-variant-classic) :where(.rt-SegmentedControlIndicator):before{box-shadow:var(--shadow-2)}.rt-SelectTrigger{display:inline-flex;align-items:center;justify-content:space-between;flex-shrink:0;-webkit-user-select:none;user-select:none;vertical-align:top;line-height:var(--height);font-family:var(--default-font-family);font-weight:var(--font-weight-regular);font-style:normal;text-align:start;color:var(--gray-12)}.rt-SelectTrigger:where(:focus-visible){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-SelectTriggerInner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-SelectIcon{flex-shrink:0}:where(.rt-SelectTrigger:not(.rt-variant-ghost)) .rt-SelectIcon{opacity:.9}.rt-SelectContent:where([data-side]){min-width:var(--radix-select-trigger-width);max-height:var(--radix-select-content-available-height);transform-origin:var(--radix-select-content-transform-origin)}.rt-SelectViewport{box-sizing:border-box;padding:var(--select-content-padding)}:where(.rt-SelectContent:has(.rt-ScrollAreaScrollbar[data-orientation=vertical])) .rt-SelectViewport{padding-right:var(--space-3)}.rt-SelectItem{display:flex;align-items:center;height:var(--select-item-height);padding-left:var(--select-item-indicator-width);padding-right:var(--select-item-indicator-width);position:relative;box-sizing:border-box;outline:none;scroll-margin:var(--select-content-padding) 0;-webkit-user-select:none;user-select:none;cursor:var(--cursor-menu-item)}.rt-SelectItemIndicator{position:absolute;left:0;width:var(--select-item-indicator-width);display:inline-flex;align-items:center;justify-content:center}.rt-SelectSeparator{height:1px;margin-top:var(--space-2);margin-bottom:var(--space-2);margin-left:var(--select-item-indicator-width);margin-right:var(--select-separator-margin-right);background-color:var(--gray-a6)}.rt-SelectLabel{display:flex;align-items:center;height:var(--select-item-height);padding-left:var(--select-item-indicator-width);padding-right:var(--select-item-indicator-width);color:var(--gray-a10);-webkit-user-select:none;user-select:none;cursor:default}:where(.rt-SelectItem)+.rt-SelectLabel{margin-top:var(--space-2)}.rt-SelectTrigger:where(:not(.rt-variant-ghost)){box-sizing:border-box;height:var(--select-trigger-height)}.rt-SelectTrigger:where(.rt-variant-ghost){box-sizing:content-box;height:fit-content;padding:var(--select-trigger-ghost-padding-y) var(--select-trigger-ghost-padding-x);--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px;--margin-top-override: calc(var(--margin-top) - var(--select-trigger-ghost-padding-y));--margin-right-override: calc(var(--margin-right) - var(--select-trigger-ghost-padding-x));--margin-bottom-override: calc(var(--margin-bottom) - var(--select-trigger-ghost-padding-y));--margin-left-override: calc(var(--margin-left) - var(--select-trigger-ghost-padding-x));margin:var(--margin-top-override) var(--margin-right-override) var(--margin-bottom-override) var(--margin-left-override)}:where(.rt-SelectTrigger:where(.rt-variant-ghost))>*{--margin-top-override: initial;--margin-right-override: initial;--margin-bottom-override: initial;--margin-left-override: initial}.rt-SelectTrigger:where(.rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}@media (min-width: 520px){.rt-SelectTrigger:where(.xs\:rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.xs\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.xs\:rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.xs\:rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.xs\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.xs\:rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.xs\:rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.xs\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.xs\:rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.xs\:rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}}@media (min-width: 768px){.rt-SelectTrigger:where(.sm\:rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.sm\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.sm\:rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.sm\:rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.sm\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.sm\:rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.sm\:rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.sm\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.sm\:rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.sm\:rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}}@media (min-width: 1024px){.rt-SelectTrigger:where(.md\:rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.md\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.md\:rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.md\:rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.md\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.md\:rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.md\:rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.md\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.md\:rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.md\:rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}}@media (min-width: 1280px){.rt-SelectTrigger:where(.lg\:rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.lg\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.lg\:rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.lg\:rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.lg\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.lg\:rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.lg\:rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.lg\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.lg\:rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.lg\:rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}}@media (min-width: 1640px){.rt-SelectTrigger:where(.xl\:rt-r-size-1){--select-trigger-height: var(--space-5);gap:var(--space-1);font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:max(var(--radius-1),var(--radius-full))}.rt-SelectTrigger:where(.xl\:rt-r-size-1):where(:not(.rt-variant-ghost)){padding-left:var(--space-2);padding-right:var(--space-2)}.rt-SelectTrigger:where(.xl\:rt-r-size-1):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.xl\:rt-r-size-2){--select-trigger-height: var(--space-6);gap:calc(var(--space-1) * 1.5);font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);border-radius:max(var(--radius-2),var(--radius-full))}.rt-SelectTrigger:where(.xl\:rt-r-size-2):where(:not(.rt-variant-ghost)){padding-left:var(--space-3);padding-right:var(--space-3)}.rt-SelectTrigger:where(.xl\:rt-r-size-2):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-2);--select-trigger-ghost-padding-y: var(--space-1)}.rt-SelectTrigger:where(.xl\:rt-r-size-3){--select-trigger-height: var(--space-7);gap:var(--space-2);font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3);border-radius:max(var(--radius-3),var(--radius-full))}.rt-SelectTrigger:where(.xl\:rt-r-size-3):where(:not(.rt-variant-ghost)){padding-left:var(--space-4);padding-right:var(--space-4)}.rt-SelectTrigger:where(.xl\:rt-r-size-3):where(.rt-variant-ghost){--select-trigger-ghost-padding-x: var(--space-3);--select-trigger-ghost-padding-y: calc(var(--space-1) * 1.5)}.rt-SelectTrigger:where(.xl\:rt-r-size-3) :where(.rt-SelectIcon){width:11px;height:11px}}.rt-SelectContent:where(.rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.rt-r-size-2,.rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.rt-r-size-2,.rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.rt-r-size-2,.rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}@media (min-width: 520px){.rt-SelectContent:where(.xs\:rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.xs\:rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.xs\:rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.xs\:rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.xs\:rt-r-size-2,.xs\:rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.xs\:rt-r-size-2,.xs\:rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.xs\:rt-r-size-2,.xs\:rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.xs\:rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.xs\:rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.xs\:rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.xs\:rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}}@media (min-width: 768px){.rt-SelectContent:where(.sm\:rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.sm\:rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.sm\:rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.sm\:rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.sm\:rt-r-size-2,.sm\:rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.sm\:rt-r-size-2,.sm\:rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.sm\:rt-r-size-2,.sm\:rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.sm\:rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.sm\:rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.sm\:rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.sm\:rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}}@media (min-width: 1024px){.rt-SelectContent:where(.md\:rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.md\:rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.md\:rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.md\:rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.md\:rt-r-size-2,.md\:rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.md\:rt-r-size-2,.md\:rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.md\:rt-r-size-2,.md\:rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.md\:rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.md\:rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.md\:rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.md\:rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}}@media (min-width: 1280px){.rt-SelectContent:where(.lg\:rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.lg\:rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.lg\:rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.lg\:rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.lg\:rt-r-size-2,.lg\:rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.lg\:rt-r-size-2,.lg\:rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.lg\:rt-r-size-2,.lg\:rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.lg\:rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.lg\:rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.lg\:rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.lg\:rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}}@media (min-width: 1640px){.rt-SelectContent:where(.xl\:rt-r-size-1){--select-content-padding: var(--space-1);--select-item-height: var(--space-5);--select-item-indicator-width: calc(var(--space-5) / 1.2);--select-separator-margin-right: var(--space-2);border-radius:var(--radius-3)}.rt-SelectContent:where(.xl\:rt-r-size-1) :where(.rt-SelectLabel){font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1);line-height:var(--line-height-1)}.rt-SelectContent:where(.xl\:rt-r-size-1) :where(.rt-SelectItem){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);border-radius:var(--radius-1)}.rt-SelectContent:where(.xl\:rt-r-size-1) :where(.rt-SelectItemIndicatorIcon){width:calc(8px * var(--scaling));height:calc(8px * var(--scaling))}.rt-SelectContent:where(.xl\:rt-r-size-2,.xl\:rt-r-size-3){--select-content-padding: var(--space-2);--select-item-height: var(--space-6);--select-item-indicator-width: var(--space-5);--select-separator-margin-right: var(--space-3);border-radius:var(--radius-4)}.rt-SelectContent:where(.xl\:rt-r-size-2,.xl\:rt-r-size-3) :where(.rt-SelectLabel){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2);line-height:var(--line-height-2)}.rt-SelectContent:where(.xl\:rt-r-size-2,.xl\:rt-r-size-3) :where(.rt-SelectItem){line-height:var(--line-height-2);border-radius:var(--radius-2)}.rt-SelectContent:where(.xl\:rt-r-size-2) :where(.rt-SelectItem){font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-SelectContent:where(.xl\:rt-r-size-2) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}.rt-SelectContent:where(.xl\:rt-r-size-3) :where(.rt-SelectItem){font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-SelectContent:where(.xl\:rt-r-size-3) :where(.rt-SelectItemIndicatorIcon){width:calc(10px * var(--scaling));height:calc(10px * var(--scaling))}}.rt-SelectTrigger:where(.rt-variant-surface){color:var(--gray-12);background-color:var(--color-surface);box-shadow:inset 0 0 0 1px var(--gray-a7)}@media (hover: hover){.rt-SelectTrigger:where(.rt-variant-surface):where(:hover){box-shadow:inset 0 0 0 1px var(--gray-a8)}}.rt-SelectTrigger:where(.rt-variant-surface):where([data-state=open]){box-shadow:inset 0 0 0 1px var(--gray-a8)}.rt-SelectTrigger:where(.rt-variant-surface):where(:disabled){color:var(--gray-a11);background-color:var(--gray-a2);box-shadow:inset 0 0 0 1px var(--gray-a6)}.rt-SelectTrigger:where(.rt-variant-surface):where([data-placeholder]) :where(.rt-SelectTriggerInner){color:var(--gray-a10)}.rt-SelectTrigger:where(.rt-variant-classic){color:var(--gray-12);background-image:linear-gradient(var(--gray-2),var(--gray-1));box-shadow:var(--select-trigger-classic-box-shadow);position:relative;z-index:0}.rt-SelectTrigger:where(.rt-variant-classic):before{content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;border:2px solid transparent;background-clip:content-box;border-radius:inherit;pointer-events:none;background-image:linear-gradient(var(--black-a1) -20%,transparent,var(--white-a1) 130%),linear-gradient(var(--color-surface),transparent)}@media (hover: hover){.rt-SelectTrigger:where(.rt-variant-classic):where(:hover){box-shadow:inset 0 0 0 1px var(--gray-a3),var(--select-trigger-classic-box-shadow)}.rt-SelectTrigger:where(.rt-variant-classic):where(:hover):before{background-image:linear-gradient(var(--black-a1) -15%,transparent,var(--white-a1) 120%),linear-gradient(var(--gray-2),var(--gray-1))}}.rt-SelectTrigger:where(.rt-variant-classic):where([data-state=open]){box-shadow:inset 0 0 0 1px var(--gray-a3),var(--select-trigger-classic-box-shadow)}.rt-SelectTrigger:where(.rt-variant-classic):where([data-state=open]):before{background-image:linear-gradient(var(--black-a1) -15%,transparent,var(--white-a1) 120%),linear-gradient(var(--gray-2),var(--gray-1))}.rt-SelectTrigger:where(.rt-variant-classic):where(:disabled){color:var(--gray-a11);background-color:var(--gray-2);background-image:none;box-shadow:var(--base-button-classic-disabled-box-shadow)}.rt-SelectTrigger:where(.rt-variant-classic):where(:disabled):before{background-color:var(--gray-a2);background-image:linear-gradient(var(--black-a1) -20%,transparent,var(--white-a1))}.rt-SelectTrigger:where(.rt-variant-classic):where([data-placeholder]) :where(.rt-SelectTriggerInner){color:var(--gray-a10)}.rt-SelectTrigger:where(.rt-variant-soft),.rt-SelectTrigger:where(.rt-variant-ghost){color:var(--accent-12)}.rt-SelectTrigger:where(.rt-variant-soft):where([data-placeholder]) :where(.rt-SelectTriggerInner),.rt-SelectTrigger:where(.rt-variant-ghost):where([data-placeholder]) :where(.rt-SelectTriggerInner){color:var(--accent-12);opacity:.6}.rt-SelectTrigger:where(.rt-variant-soft){background-color:var(--accent-a3)}@media (hover: hover){.rt-SelectTrigger:where(.rt-variant-soft):where(:hover){background-color:var(--accent-a4)}}.rt-SelectTrigger:where(.rt-variant-soft):where([data-state=open]){background-color:var(--accent-a4)}.rt-SelectTrigger:where(.rt-variant-soft):where(:focus-visible){outline-color:var(--accent-8)}.rt-SelectTrigger:where(.rt-variant-soft):where(:disabled){color:var(--gray-a11);background-color:var(--gray-a3)}@media (hover: hover){.rt-SelectTrigger:where(.rt-variant-ghost):where(:hover){background-color:var(--accent-a3)}}.rt-SelectTrigger:where(.rt-variant-ghost):where([data-state=open]){background-color:var(--accent-a3)}.rt-SelectTrigger:where(.rt-variant-ghost):where(:disabled){color:var(--gray-a11);background-color:transparent}.rt-SelectTrigger:where(:disabled) :where(.rt-SelectIcon){color:var(--gray-a9)}.rt-SelectContent{box-shadow:var(--shadow-5);--scrollarea-scrollbar-vertical-margin-top: var(--select-content-padding);--scrollarea-scrollbar-vertical-margin-bottom: var(--select-content-padding);--scrollarea-scrollbar-horizontal-margin-left: var(--select-content-padding);--scrollarea-scrollbar-horizontal-margin-right: var(--select-content-padding);overflow:hidden;background-color:var(--color-panel-solid)}.rt-SelectItem:where([data-disabled]){color:var(--gray-a8);cursor:default}.rt-SelectContent:where(.rt-variant-solid) :where(.rt-SelectItem[data-highlighted]){background-color:var(--accent-9);color:var(--accent-contrast)}.rt-SelectContent:where(.rt-variant-solid):where(.rt-high-contrast) :where(.rt-SelectItem[data-highlighted]){background-color:var(--accent-12);color:var(--accent-1)}.rt-SelectContent:where(.rt-variant-soft) :where(.rt-SelectItem[data-highlighted]){background-color:var(--accent-a4)}.rt-Separator{display:block;background-color:var(--accent-a6)}.rt-Separator:where(.rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.rt-r-orientation-vertical){width:1px;height:var(--separator-size)}@media (min-width: 520px){.rt-Separator:where(.xs\:rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.xs\:rt-r-orientation-vertical){width:1px;height:var(--separator-size)}}@media (min-width: 768px){.rt-Separator:where(.sm\:rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.sm\:rt-r-orientation-vertical){width:1px;height:var(--separator-size)}}@media (min-width: 1024px){.rt-Separator:where(.md\:rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.md\:rt-r-orientation-vertical){width:1px;height:var(--separator-size)}}@media (min-width: 1280px){.rt-Separator:where(.lg\:rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.lg\:rt-r-orientation-vertical){width:1px;height:var(--separator-size)}}@media (min-width: 1640px){.rt-Separator:where(.xl\:rt-r-orientation-horizontal){width:var(--separator-size);height:1px}.rt-Separator:where(.xl\:rt-r-orientation-vertical){width:1px;height:var(--separator-size)}}.rt-Separator:where(.rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.rt-r-size-4){--separator-size: 100%}@media (min-width: 520px){.rt-Separator:where(.xs\:rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.xs\:rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.xs\:rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.xs\:rt-r-size-4){--separator-size: 100%}}@media (min-width: 768px){.rt-Separator:where(.sm\:rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.sm\:rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.sm\:rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.sm\:rt-r-size-4){--separator-size: 100%}}@media (min-width: 1024px){.rt-Separator:where(.md\:rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.md\:rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.md\:rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.md\:rt-r-size-4){--separator-size: 100%}}@media (min-width: 1280px){.rt-Separator:where(.lg\:rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.lg\:rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.lg\:rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.lg\:rt-r-size-4){--separator-size: 100%}}@media (min-width: 1640px){.rt-Separator:where(.xl\:rt-r-size-1){--separator-size: var(--space-4)}.rt-Separator:where(.xl\:rt-r-size-2){--separator-size: var(--space-6)}.rt-Separator:where(.xl\:rt-r-size-3){--separator-size: var(--space-9)}.rt-Separator:where(.xl\:rt-r-size-4){--separator-size: 100%}}.rt-SliderRoot{--slider-thumb-size: calc(var(--slider-track-size) + var(--space-1));position:relative;display:flex;align-items:center;flex-grow:1;border-radius:max(calc(var(--radius-factor) * var(--slider-track-size) / 3),calc(var(--radius-factor) * var(--radius-thumb)));-webkit-user-select:none;user-select:none;touch-action:none}.rt-SliderRoot:where([data-orientation=horizontal]){width:-webkit-fill-available;width:-moz-available;width:stretch;height:var(--slider-track-size)}.rt-SliderRoot:where([data-orientation=vertical]){height:-webkit-fill-available;height:-moz-available;height:stretch;flex-direction:column;width:var(--slider-track-size)}.rt-SliderTrack{overflow:hidden;position:relative;flex-grow:1;border-radius:inherit}.rt-SliderTrack:where([data-orientation=horizontal]){height:var(--slider-track-size)}.rt-SliderTrack:where([data-orientation=vertical]){width:var(--slider-track-size)}.rt-SliderRange{position:absolute;border-radius:inherit}.rt-SliderRange:where([data-orientation=horizontal]){height:100%}.rt-SliderRange:where([data-orientation=vertical]){width:100%}.rt-SliderThumb{display:block;width:var(--slider-thumb-size);height:var(--slider-thumb-size);outline:0}.rt-SliderThumb:before{content:"";position:absolute;z-index:-1;width:calc(var(--slider-thumb-size) * 3);height:calc(var(--slider-thumb-size) * 3);top:50%;left:50%;transform:translate(-50%,-50%)}.rt-SliderThumb:after{content:"";position:absolute;inset:calc(-.25 * var(--slider-track-size));background-color:#fff;border-radius:max(var(--radius-1),var(--radius-thumb));box-shadow:var(--slider-thumb-box-shadow);cursor:var(--cursor-slider-thumb)}.rt-SliderThumb:where(:focus-visible):after{box-shadow:var(--slider-thumb-box-shadow),0 0 0 3px var(--accent-3),0 0 0 5px var(--focus-8)}.rt-SliderThumb:where(:active){cursor:var(--cursor-slider-thumb-active)}.rt-SliderRoot:where(.rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}@media (min-width: 520px){.rt-SliderRoot:where(.xs\:rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.xs\:rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.xs\:rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}}@media (min-width: 768px){.rt-SliderRoot:where(.sm\:rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.sm\:rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.sm\:rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}}@media (min-width: 1024px){.rt-SliderRoot:where(.md\:rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.md\:rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.md\:rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}}@media (min-width: 1280px){.rt-SliderRoot:where(.lg\:rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.lg\:rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.lg\:rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}}@media (min-width: 1640px){.rt-SliderRoot:where(.xl\:rt-r-size-1){--slider-track-size: calc(var(--space-2) * .75)}.rt-SliderRoot:where(.xl\:rt-r-size-2){--slider-track-size: var(--space-2)}.rt-SliderRoot:where(.xl\:rt-r-size-3){--slider-track-size: calc(var(--space-2) * 1.25)}}.rt-SliderRoot:where(.rt-variant-surface) :where(.rt-SliderTrack){background-color:var(--gray-a3);box-shadow:inset 0 0 0 1px var(--gray-a5)}.rt-SliderRoot:where(.rt-variant-surface) :where(.rt-SliderTrack):where([data-disabled]){box-shadow:inset 0 0 0 1px var(--gray-a4)}.rt-SliderRoot:where(.rt-variant-surface) :where(.rt-SliderRange){background-color:var(--accent-track);background-image:var(--slider-range-high-contrast-background-image);box-shadow:inset 0 0 0 1px var(--gray-a5)}.rt-SliderRoot:where(.rt-variant-surface) :where(.rt-SliderThumb){--slider-thumb-box-shadow: 0 0 0 1px var(--black-a4)}.rt-SliderRoot:where(.rt-variant-surface) :where(.rt-SliderThumb):where([data-disabled]):after{background-color:var(--gray-1);box-shadow:0 0 0 1px var(--gray-6)}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderTrack){background-color:var(--gray-a3);position:relative}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderTrack):before{content:"";top:0;right:0;bottom:0;left:0;position:absolute;border-radius:inherit;box-shadow:var(--shadow-1)}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderTrack):where([data-disabled]):before{opacity:.5}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderRange){background-color:var(--accent-track);background-image:var(--slider-range-high-contrast-background-image);box-shadow:inset 0 0 0 1px var(--gray-a3),inset 0 0 0 1px var(--accent-a4),inset 0 0 0 1px var(--black-a1),inset 0 1.5px 2px 0 var(--black-a2)}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderRange):where(.rt-high-contrast){box-shadow:inset 0 0 0 1px var(--gray-a3),inset 0 0 0 1px var(--black-a2),inset 0 1.5px 2px 0 var(--black-a2)}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderThumb){--slider-thumb-box-shadow: 0 0 0 1px var(--black-a3), 0 1px 3px var(--black-a1), 0 2px 4px -1px var(--black-a1)}.rt-SliderRoot:where(.rt-variant-classic) :where(.rt-SliderThumb):where([data-disabled]):after{background-color:var(--gray-1);box-shadow:0 0 0 1px var(--gray-6)}.rt-SliderRoot:where(.rt-variant-soft) :where(.rt-SliderTrack){background-color:var(--gray-a4);background-image:linear-gradient(var(--white-a1),var(--white-a1))}.rt-SliderRoot:where(.rt-variant-soft) :where(.rt-SliderTrack):where([data-disabled]){background-color:var(--gray-a4);background-image:none}.rt-SliderRoot:where(.rt-variant-soft) :where(.rt-SliderRange){background-image:linear-gradient(var(--accent-a5),var(--accent-a5)),var(--slider-range-high-contrast-background-image);background-color:var(--accent-6)}.rt-SliderRoot:where(.rt-variant-soft) :where(.rt-SliderThumb){--slider-thumb-box-shadow: 0 0 0 1px var(--black-a3), 0 0 0 1px var(--gray-a2), 0 0 0 1px var(--accent-a2), 0 1px 2px var(--gray-a4), 0 1px 3px -.5px var(--gray-a3)}.rt-SliderRoot:where(.rt-variant-soft) :where(.rt-SliderThumb):where([data-disabled]):after{background-color:var(--gray-1);box-shadow:0 0 0 1px var(--gray-5)}.rt-SliderRoot:where(:not(.rt-high-contrast)){--slider-range-high-contrast-background-image: none}.rt-SliderRoot:where([data-disabled]){cursor:var(--cursor-disabled);mix-blend-mode:var(--slider-disabled-blend-mode)}.rt-SliderRange:where([data-disabled]){background-color:transparent;background-image:none;box-shadow:none}.rt-SliderThumb:where([data-disabled]),.rt-SliderThumb:where([data-disabled]):after{cursor:var(--cursor-disabled)}.rt-Spinner{display:block;position:relative;opacity:var(--spinner-opacity)}.rt-SpinnerLeaf{position:absolute;top:0;left:43.75%;width:12.5%;height:100%;animation:rt-spinner-leaf-fade var(--spinner-animation-duration) linear infinite}.rt-SpinnerLeaf:before{content:"";display:block;width:100%;height:30%;border-radius:var(--radius-1);background-color:currentColor}.rt-SpinnerLeaf:where(:nth-child(1)){transform:rotate(0);animation-delay:calc(-8 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(2)){transform:rotate(45deg);animation-delay:calc(-7 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(3)){transform:rotate(90deg);animation-delay:calc(-6 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(4)){transform:rotate(135deg);animation-delay:calc(-5 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(5)){transform:rotate(180deg);animation-delay:calc(-4 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(6)){transform:rotate(225deg);animation-delay:calc(-3 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(7)){transform:rotate(270deg);animation-delay:calc(-2 / 8 * var(--spinner-animation-duration))}.rt-SpinnerLeaf:where(:nth-child(8)){transform:rotate(315deg);animation-delay:calc(-1 / 8 * var(--spinner-animation-duration))}@keyframes rt-spinner-leaf-fade{0%{opacity:1}to{opacity:.25}}.rt-Spinner:where(.rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}@media (min-width: 520px){.rt-Spinner:where(.xs\:rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.xs\:rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.xs\:rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}}@media (min-width: 768px){.rt-Spinner:where(.sm\:rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.sm\:rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.sm\:rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}}@media (min-width: 1024px){.rt-Spinner:where(.md\:rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.md\:rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.md\:rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}}@media (min-width: 1280px){.rt-Spinner:where(.lg\:rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.lg\:rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.lg\:rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}}@media (min-width: 1640px){.rt-Spinner:where(.xl\:rt-r-size-1){width:var(--space-3);height:var(--space-3)}.rt-Spinner:where(.xl\:rt-r-size-2){width:var(--space-4);height:var(--space-4)}.rt-Spinner:where(.xl\:rt-r-size-3){width:calc(1.25 * var(--space-4));height:calc(1.25 * var(--space-4))}}.rt-Strong{font-family:var(--strong-font-family);font-size:calc(var(--strong-font-size-adjust) * 1em);font-style:var(--strong-font-style);font-weight:var(--strong-font-weight);letter-spacing:calc(var(--strong-letter-spacing) + var(--letter-spacing, var(--default-letter-spacing)))}.rt-Strong :where(.rt-Strong){font-size:inherit}.rt-SwitchRoot{position:relative;display:inline-flex;align-items:center;vertical-align:top;flex-shrink:0;height:var(--skeleton-height, var(--line-height, var(--switch-height)));--skeleton-height-override: var(--switch-height);border-radius:var(--skeleton-radius);--skeleton-radius-override: var(--switch-border-radius);--switch-width: calc(var(--switch-height) * 1.75);--switch-thumb-inset: 1px;--switch-thumb-size: calc(var(--switch-height) - var(--switch-thumb-inset) * 2);--switch-thumb-translate-x: calc(var(--switch-width) - var(--switch-height))}.rt-SwitchRoot:before{content:"";display:block;width:var(--switch-width);height:var(--switch-height);border-radius:var(--switch-border-radius);transition:background-position,background-color,box-shadow,filter;transition-timing-function:linear,ease-in-out,ease-in-out,ease-in-out;background-repeat:no-repeat;background-size:calc(var(--switch-width) * 2 + var(--switch-height)) 100%;cursor:var(--cursor-switch)}.rt-SwitchRoot:where([data-state=unchecked]):before{transition-duration:.12s,.14s,.14s,.14s;background-position-x:100%}.rt-SwitchRoot:where([data-state=checked]):before{transition-duration:.16s,.14s,.14s,.14s;background-position:0%}.rt-SwitchRoot:where(:active):before{transition-duration:30ms}.rt-SwitchRoot:where(:focus-visible):before{outline:2px solid var(--focus-8);outline-offset:2px}.rt-SwitchRoot:where([data-disabled]):before{cursor:var(--cursor-disabled)}.rt-SwitchThumb{background-color:#fff;position:absolute;left:var(--switch-thumb-inset);width:var(--switch-thumb-size);height:var(--switch-thumb-size);border-radius:calc(var(--switch-border-radius) - var(--switch-thumb-inset));transition:transform .14s cubic-bezier(.45,.05,.55,.95),box-shadow .14s ease-in-out}.rt-SwitchThumb:where([data-state=checked]){transform:translate(var(--switch-thumb-translate-x))}.rt-SwitchRoot:where(.rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}@media (min-width: 520px){.rt-SwitchRoot:where(.xs\:rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.xs\:rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.xs\:rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}}@media (min-width: 768px){.rt-SwitchRoot:where(.sm\:rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.sm\:rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.sm\:rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}}@media (min-width: 1024px){.rt-SwitchRoot:where(.md\:rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.md\:rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.md\:rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}}@media (min-width: 1280px){.rt-SwitchRoot:where(.lg\:rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.lg\:rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.lg\:rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}}@media (min-width: 1640px){.rt-SwitchRoot:where(.xl\:rt-r-size-1){--switch-height: var(--space-4);--switch-border-radius: max(var(--radius-1), var(--radius-thumb))}.rt-SwitchRoot:where(.xl\:rt-r-size-2){--switch-height: calc(var(--space-5) * 5 / 6);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}.rt-SwitchRoot:where(.xl\:rt-r-size-3){--switch-height: var(--space-5);--switch-border-radius: max(var(--radius-2), var(--radius-thumb))}}.rt-SwitchRoot:where(.rt-variant-surface):before{background-color:var(--gray-a3);background-image:linear-gradient(to right,var(--accent-track) 40%,transparent 60%);box-shadow:inset 0 0 0 1px var(--gray-a5)}.rt-SwitchRoot:where(.rt-variant-surface):where(:active):before{background-color:var(--gray-a4)}.rt-SwitchRoot:where(.rt-variant-surface):where([data-state=checked]:active):before{filter:var(--switch-surface-checked-active-filter)}.rt-SwitchRoot:where(.rt-variant-surface):where(.rt-high-contrast):before{background-image:linear-gradient(to right,var(--switch-high-contrast-checked-color-overlay) 40%,transparent 60%),linear-gradient(to right,var(--accent-track) 40%,transparent 60%)}.rt-SwitchRoot:where(.rt-variant-surface):where(.rt-high-contrast):where([data-state=checked]:active):before{filter:var(--switch-high-contrast-checked-active-before-filter)}.rt-SwitchRoot:where(.rt-variant-surface):where([data-disabled]){mix-blend-mode:var(--switch-disabled-blend-mode)}.rt-SwitchRoot:where(.rt-variant-surface):where([data-disabled]):before{filter:none;background-image:none;background-color:var(--gray-a3);box-shadow:inset 0 0 0 1px var(--gray-a3)}.rt-SwitchRoot:where(.rt-variant-surface) :where(.rt-SwitchThumb):where([data-state=unchecked]){box-shadow:0 0 1px 1px var(--black-a2),0 1px 1px var(--black-a1),0 2px 4px -1px var(--black-a1)}.rt-SwitchRoot:where(.rt-variant-surface) :where(.rt-SwitchThumb):where([data-state=checked]){box-shadow:0 1px 3px var(--black-a2),0 2px 4px -1px var(--black-a1),0 0 0 1px var(--black-a1),0 0 0 1px var(--accent-a4),-1px 0 1px var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-surface) :where(.rt-SwitchThumb):where([data-state=checked]):where(.rt-high-contrast){box-shadow:0 1px 3px var(--black-a2),0 2px 4px -1px var(--black-a1),0 0 0 1px var(--black-a2),-1px 0 1px var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-surface) :where(.rt-SwitchThumb):where([data-disabled]){background-color:var(--gray-2);box-shadow:0 0 0 1px var(--gray-a2),0 1px 3px var(--black-a1);transition:none}.rt-SwitchRoot:where(.rt-variant-classic):before{background-image:linear-gradient(to right,var(--accent-track) 40%,transparent 60%);background-color:var(--gray-a4);box-shadow:var(--shadow-1)}.rt-SwitchRoot:where(.rt-variant-classic):where([data-state=unchecked]:active):before{background-color:var(--gray-a5)}.rt-SwitchRoot:where(.rt-variant-classic):where([data-state=checked]):before{box-shadow:inset 0 0 0 1px var(--gray-a3),inset 0 0 0 1px var(--accent-a4),inset 0 0 0 1px var(--black-a1),inset 0 1.5px 2px 0 var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-classic):where([data-state=checked]:active):before{filter:var(--switch-surface-checked-active-filter)}.rt-SwitchRoot:where(.rt-variant-classic):where(.rt-high-contrast):before{box-shadow:inset 0 0 0 1px var(--gray-a3),inset 0 0 0 1px var(--black-a2),inset 0 1.5px 2px 0 var(--black-a2);background-image:linear-gradient(to right,var(--switch-high-contrast-checked-color-overlay) 40%,transparent 60%),linear-gradient(to right,var(--accent-track) 40%,transparent 60%)}.rt-SwitchRoot:where(.rt-variant-classic):where(.rt-high-contrast):where([data-state=checked]:active):before{filter:var(--switch-high-contrast-checked-active-before-filter)}.rt-SwitchRoot:where(.rt-variant-classic):where([data-disabled]){mix-blend-mode:var(--switch-disabled-blend-mode)}.rt-SwitchRoot:where(.rt-variant-classic):where([data-disabled]):before{filter:none;background-image:none;background-color:var(--gray-a5);box-shadow:var(--shadow-1);opacity:.5}.rt-SwitchRoot:where(.rt-variant-classic) :where(.rt-SwitchThumb):where([data-state=unchecked]){box-shadow:0 1px 3px var(--black-a3),0 2px 4px -1px var(--black-a1),0 0 0 1px var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-classic) :where(.rt-SwitchThumb):where([data-state=checked]){box-shadow:0 1px 3px var(--black-a2),0 2px 4px -1px var(--black-a1),0 0 0 1px var(--black-a1),0 0 0 1px var(--accent-a4),-1px 0 1px var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-classic) :where(.rt-SwitchThumb):where([data-state=checked]):where(.rt-high-contrast){box-shadow:0 1px 3px var(--black-a2),0 2px 4px -1px var(--black-a1),0 0 0 1px var(--black-a2),-1px 0 1px var(--black-a2)}.rt-SwitchRoot:where(.rt-variant-classic) :where(.rt-SwitchThumb):where([data-disabled]){background-color:var(--gray-2);box-shadow:0 0 0 1px var(--gray-a2),0 1px 3px var(--black-a1);transition:none}.rt-SwitchRoot:where(.rt-variant-soft):before{background-image:linear-gradient(to right,var(--accent-a4) 40%,transparent 60%),linear-gradient(to right,var(--accent-a4) 40%,transparent 60%),linear-gradient(to right,var(--accent-a4) 40%,var(--white-a1) 60%),linear-gradient(to right,var(--gray-a2) 40%,var(--gray-a3) 60%)}.rt-SwitchRoot:where(.rt-variant-soft):where([data-state=unchecked]):before{background-color:var(--gray-a3)}.rt-SwitchRoot:where(.rt-variant-soft):where(:active):before{background-color:var(--gray-a4)}.rt-SwitchRoot:where(.rt-variant-soft):where(.rt-high-contrast):before{background-image:linear-gradient(to right,var(--switch-high-contrast-checked-color-overlay) 40%,transparent 60%),linear-gradient(to right,var(--accent-a6) 40%,transparent 60%),linear-gradient(to right,var(--accent-a6) 40%,transparent 60%),linear-gradient(to right,var(--accent-a6) 40%,var(--white-a1) 60%),linear-gradient(to right,var(--accent-a3) 40%,var(--gray-a3) 60%)}.rt-SwitchRoot:where(.rt-variant-soft):where(.rt-high-contrast):where([data-state=checked]:active):before{filter:var(--switch-high-contrast-checked-active-before-filter)}.rt-SwitchRoot:where(.rt-variant-soft):where([data-disabled]){mix-blend-mode:var(--switch-disabled-blend-mode)}.rt-SwitchRoot:where(.rt-variant-soft):where([data-disabled]):before{filter:none;background-image:none;background-color:var(--gray-a4)}.rt-SwitchRoot:where(.rt-variant-soft) :where(.rt-SwitchThumb){filter:saturate(.45)}.rt-SwitchRoot:where(.rt-variant-soft) :where(.rt-SwitchThumb):where([data-state=unchecked]){box-shadow:0 0 0 1px var(--black-a1),0 1px 3px var(--black-a1),0 1px 3px var(--black-a1),0 2px 4px -1px var(--black-a1)}.rt-SwitchRoot:where(.rt-variant-soft) :where(.rt-SwitchThumb):where([data-state=checked]){box-shadow:0 0 0 1px var(--black-a1),0 1px 3px var(--black-a2),0 1px 3px var(--accent-a3),0 2px 4px -1px var(--accent-a3)}.rt-SwitchRoot:where(.rt-variant-soft) :where(.rt-SwitchThumb):where([data-disabled]){filter:none;background-color:var(--gray-2);box-shadow:0 0 0 1px var(--gray-a2),0 1px 3px var(--black-a1);transition:none}.rt-BaseTabList::-webkit-scrollbar{display:none}.rt-BaseTabListTrigger{display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;-webkit-user-select:none;user-select:none;box-sizing:border-box;height:var(--tab-height);padding-left:var(--tab-padding-x);padding-right:var(--tab-padding-x);color:var(--gray-a11)}.rt-BaseTabListTriggerInner,.rt-BaseTabListTriggerInnerHidden{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--tab-inner-padding-y) var(--tab-inner-padding-x);border-radius:var(--tab-inner-border-radius)}.rt-BaseTabListTriggerInner{position:absolute}:where(.rt-BaseTabListTrigger[data-state=inactive],.rt-TabNavLink:not([data-active])) .rt-BaseTabListTriggerInner{letter-spacing:var(--tab-inactive-letter-spacing);word-spacing:var(--tab-inactive-word-spacing)}:where(.rt-BaseTabListTrigger[data-state=active],.rt-TabNavLink[data-active]) .rt-BaseTabListTriggerInner{font-weight:var(--font-weight-medium);letter-spacing:var(--tab-active-letter-spacing);word-spacing:var(--tab-active-word-spacing)}.rt-BaseTabListTriggerInnerHidden{visibility:hidden;font-weight:var(--font-weight-medium);letter-spacing:var(--tab-active-letter-spacing);word-spacing:var(--tab-active-word-spacing)}.rt-BaseTabList:where(.rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}@media (min-width: 520px){.rt-BaseTabList:where(.xs\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.xs\:rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}}@media (min-width: 768px){.rt-BaseTabList:where(.sm\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.sm\:rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}}@media (min-width: 1024px){.rt-BaseTabList:where(.md\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.md\:rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}}@media (min-width: 1280px){.rt-BaseTabList:where(.lg\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.lg\:rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}}@media (min-width: 1640px){.rt-BaseTabList:where(.xl\:rt-r-size-1){font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1);--tab-height: var(--space-6);--tab-padding-x: var(--space-1);--tab-inner-padding-x: var(--space-1);--tab-inner-padding-y: calc(var(--space-1) * .5);--tab-inner-border-radius: var(--radius-1)}.rt-BaseTabList:where(.xl\:rt-r-size-2){font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2);--tab-height: var(--space-7);--tab-padding-x: var(--space-2);--tab-inner-padding-x: var(--space-2);--tab-inner-padding-y: var(--space-1);--tab-inner-border-radius: var(--radius-2)}}.rt-BaseTabList{box-shadow:inset 0 -1px 0 0 var(--gray-a5);display:flex;justify-content:flex-start;overflow-x:auto;white-space:nowrap;font-family:var(--default-font-family);font-style:normal;scrollbar-width:none}@media (hover: hover){.rt-BaseTabListTrigger:where(:hover){color:var(--gray-12)}.rt-BaseTabListTrigger:where(:hover) :where(.rt-BaseTabListTriggerInner){background-color:var(--gray-a3)}.rt-BaseTabListTrigger:where(:focus-visible:hover) :where(.rt-BaseTabListTriggerInner){background-color:var(--accent-a3)}}.rt-BaseTabListTrigger:where([data-state=active],[data-active]){color:var(--gray-12)}.rt-BaseTabListTrigger:where(:focus-visible) :where(.rt-BaseTabListTriggerInner){outline:2px solid var(--focus-8);outline-offset:-2px}.rt-BaseTabListTrigger:where([data-state=active],[data-active]):before{box-sizing:border-box;content:"";height:2px;position:absolute;bottom:0;left:0;right:0;background-color:var(--accent-indicator)}:where(.rt-BaseTabList.rt-high-contrast) .rt-BaseTabListTrigger:where([data-state=active],[data-active]):before{background-color:var(--accent-12)}.rt-TabNavItem{display:flex}.rt-TableRootTable{--table-row-background-color: transparent;--table-row-box-shadow: inset 0 -1px var(--gray-a5);width:100%;text-align:left;vertical-align:top;border-collapse:collapse;border-radius:calc(var(--table-border-radius) - 1px);border-spacing:0;box-sizing:border-box;height:0}.rt-TableHeader,.rt-TableBody{vertical-align:inherit}.rt-TableRow{vertical-align:inherit;color:var(--gray-12)}.rt-TableCell{background-color:var(--table-row-background-color);box-shadow:var(--table-row-box-shadow);box-sizing:border-box;vertical-align:inherit;padding:var(--table-cell-padding);height:var(--table-cell-min-height)}.rt-Inset :where(.rt-TableCell:first-child){padding-left:var(--inset-padding-left, var(--table-cell-padding))}.rt-Inset :where(.rt-TableCell:last-child){padding-right:var(--inset-padding-right, var(--table-cell-padding))}.rt-TableColumnHeaderCell{font-weight:700}.rt-TableRowHeaderCell{font-weight:400}.rt-TableRoot:where(.rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}@media (min-width: 520px){.rt-TableRoot:where(.xs\:rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.xs\:rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.xs\:rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.xs\:rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.xs\:rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.xs\:rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}}@media (min-width: 768px){.rt-TableRoot:where(.sm\:rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.sm\:rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.sm\:rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.sm\:rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.sm\:rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.sm\:rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}}@media (min-width: 1024px){.rt-TableRoot:where(.md\:rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.md\:rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.md\:rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.md\:rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.md\:rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.md\:rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}}@media (min-width: 1280px){.rt-TableRoot:where(.lg\:rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.lg\:rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.lg\:rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.lg\:rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.lg\:rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.lg\:rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}}@media (min-width: 1640px){.rt-TableRoot:where(.xl\:rt-r-size-1){--table-border-radius: var(--radius-3);--table-cell-padding: var(--space-2);--table-cell-min-height: calc(36px * var(--scaling))}.rt-TableRoot:where(.xl\:rt-r-size-1) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.xl\:rt-r-size-2){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3);--table-cell-min-height: calc(44px * var(--scaling))}.rt-TableRoot:where(.xl\:rt-r-size-2) :where(.rt-TableRootTable){font-size:var(--font-size-2);line-height:var(--line-height-2)}.rt-TableRoot:where(.xl\:rt-r-size-3){--table-border-radius: var(--radius-4);--table-cell-padding: var(--space-3) var(--space-4);--table-cell-min-height: var(--space-8)}.rt-TableRoot:where(.xl\:rt-r-size-3) :where(.rt-TableRootTable){font-size:var(--font-size-3);line-height:var(--line-height-3)}}.rt-TableRoot:where(.rt-variant-surface){box-sizing:border-box;border:1px solid var(--gray-a5);border-radius:var(--table-border-radius);background-color:var(--color-panel);-webkit-backdrop-filter:var(--backdrop-filter-panel);backdrop-filter:var(--backdrop-filter-panel);background-clip:padding-box;position:relative}@supports (box-shadow: 0 0 0 1px color-mix(in oklab,white,black)){.rt-TableRoot:where(.rt-variant-surface){border-color:color-mix(in oklab,var(--gray-a5),var(--gray-6))}}.rt-TableRoot:where(.rt-variant-surface) :where(.rt-TableRootTable){overflow:hidden}.rt-TableRoot:where(.rt-variant-surface) :where(.rt-TableRootTable) :where(.rt-TableHeader){--table-row-background-color: var(--gray-a2)}.rt-TableRoot:where(.rt-variant-surface) :where(.rt-TableRootTable) :where(.rt-TableBody) :where(.rt-TableRow:last-child){--table-row-box-shadow: none}.rt-TableRoot:where(.rt-variant-ghost){--scrollarea-scrollbar-horizontal-margin-left: 0;--scrollarea-scrollbar-horizontal-margin-right: 0}.rt-TabsContent{position:relative;outline:0}.rt-TabsContent:where(:focus-visible){outline:2px solid var(--focus-8)}.rt-TextAreaRoot:where(:focus-within){outline:2px solid var(--focus-8);outline-offset:-1px}.rt-TextAreaInput::-webkit-scrollbar{width:var(--space-3);height:var(--space-3)}.rt-TextAreaInput::-webkit-scrollbar-track,.rt-TextAreaInput::-webkit-scrollbar-thumb{background-clip:content-box;border:var(--space-1) solid transparent;border-radius:var(--space-3)}.rt-TextAreaInput::-webkit-scrollbar-track{background-color:var(--gray-a3)}.rt-TextAreaInput::-webkit-scrollbar-thumb{background-color:var(--gray-a8)}@media (hover: hover){:where(.rt-TextAreaInput:not(:disabled))::-webkit-scrollbar-thumb:hover{background-color:var(--gray-a9)}}.rt-TextAreaInput:where(:-webkit-autofill,[data-com-onepassword-filled]){-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--gray-12)}.rt-TextAreaInput:where(:autofill,[data-com-onepassword-filled]){-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--gray-12)}.rt-TextAreaRoot{padding:var(--text-area-border-width);display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--default-font-family);font-weight:var(--font-weight-regular);font-style:normal;text-align:start;overflow:hidden}.rt-TextAreaInput{padding:var(--text-area-padding-y) var(--text-area-padding-x);border-radius:inherit;resize:none;display:block;width:100%;flex-grow:1;cursor:auto}.rt-TextAreaRoot:where(.rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}@media (min-width: 520px){.rt-TextAreaRoot:where(.xs\:rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.xs\:rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.xs\:rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.xs\:rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.xs\:rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.xs\:rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}}@media (min-width: 768px){.rt-TextAreaRoot:where(.sm\:rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.sm\:rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.sm\:rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.sm\:rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.sm\:rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.sm\:rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}}@media (min-width: 1024px){.rt-TextAreaRoot:where(.md\:rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.md\:rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.md\:rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.md\:rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.md\:rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.md\:rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}}@media (min-width: 1280px){.rt-TextAreaRoot:where(.lg\:rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.lg\:rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.lg\:rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.lg\:rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.lg\:rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.lg\:rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}}@media (min-width: 1640px){.rt-TextAreaRoot:where(.xl\:rt-r-size-1){min-height:var(--space-8);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.xl\:rt-r-size-1) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-1) * 1.5 - var(--text-area-border-width));font-size:var(--font-size-1);line-height:var(--line-height-1);letter-spacing:var(--letter-spacing-1)}.rt-TextAreaRoot:where(.xl\:rt-r-size-2){min-height:var(--space-9);border-radius:var(--radius-2)}.rt-TextAreaRoot:where(.xl\:rt-r-size-2) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-1) * 1.5 - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));font-size:var(--font-size-2);line-height:var(--line-height-2);letter-spacing:var(--letter-spacing-2)}.rt-TextAreaRoot:where(.xl\:rt-r-size-3){min-height:80px;border-radius:var(--radius-3)}.rt-TextAreaRoot:where(.xl\:rt-r-size-3) :where(.rt-TextAreaInput){--text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));--text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));font-size:var(--font-size-3);line-height:var(--line-height-3);letter-spacing:var(--letter-spacing-3)}}.rt-TextAreaRoot:where(.rt-variant-surface){--text-area-border-width: 1px;background-clip:content-box;background-color:var(--color-surface);box-shadow:inset 0 0 0 var(--text-area-border-width) var(--gray-a7);color:var(--gray-12)}.rt-TextAreaRoot:where(.rt-variant-surface) :where(.rt-TextAreaInput)::placeholder{color:var(--gray-a10)}.rt-TextAreaRoot:where(.rt-variant-surface):where(:has(.rt-TextAreaInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextAreaRoot:where(.rt-variant-surface):where(:has(.rt-TextAreaInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextAreaRoot:where(.rt-variant-surface):where(:has(.rt-TextAreaInput:where(:disabled,:read-only))){background-image:linear-gradient(var(--gray-a2),var(--gray-a2));box-shadow:inset 0 0 0 var(--text-area-border-width) var(--gray-a6)}.rt-TextAreaRoot:where(.rt-variant-classic){--text-area-border-width: 1px;background-clip:content-box;background-color:var(--color-surface);box-shadow:var(--shadow-1);color:var(--gray-12)}.rt-TextAreaRoot:where(.rt-variant-classic) :where(.rt-TextAreaInput)::placeholder{color:var(--gray-a10)}.rt-TextAreaRoot:where(.rt-variant-classic):where(:has(.rt-TextAreaInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextAreaRoot:where(.rt-variant-classic):where(:has(.rt-TextAreaInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextAreaRoot:where(.rt-variant-classic):where(:has(.rt-TextAreaInput:where(:disabled,:read-only))){background-image:linear-gradient(var(--gray-a2),var(--gray-a2))}.rt-TextAreaRoot:where(.rt-variant-soft){--text-area-border-width: 0px;background-color:var(--accent-a3);color:var(--accent-12)}.rt-TextAreaRoot:where(.rt-variant-soft) :where(.rt-TextAreaInput)::selection{background-color:var(--accent-a5)}.rt-TextAreaRoot:where(.rt-variant-soft) :where(.rt-TextAreaInput)::placeholder{color:var(--accent-12);opacity:.65}.rt-TextAreaRoot:where(.rt-variant-soft):where(:focus-within){outline-color:var(--accent-8)}.rt-TextAreaRoot:where(.rt-variant-soft):where(:has(.rt-TextAreaInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){box-shadow:inset 0 0 0 1px var(--accent-a5),inset 0 0 0 1px var(--gray-a4)}.rt-TextAreaRoot:where(.rt-variant-soft):where(:has(.rt-TextAreaInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){box-shadow:inset 0 0 0 1px var(--accent-a5),inset 0 0 0 1px var(--gray-a4)}.rt-TextAreaRoot:where(.rt-variant-soft):where(:has(.rt-TextAreaInput:where(:disabled,:read-only))){background-color:var(--gray-a3)}.rt-TextAreaInput:where(:disabled,:read-only){cursor:text;color:var(--gray-a11);-webkit-text-fill-color:var(--gray-a11)}.rt-TextAreaInput:where(:disabled,:read-only)::placeholder{opacity:.5}.rt-TextAreaInput:where(:disabled,:read-only):where(:placeholder-shown){cursor:var(--cursor-disabled)}.rt-TextAreaInput:where(:disabled,:read-only)::selection{background-color:var(--gray-a5)}.rt-TextAreaRoot:where(:focus-within:has(.rt-TextAreaInput:where(:disabled,:read-only))){outline-color:var(--gray-8)}@supports selector(:has(*)){.rt-TextFieldRoot:where(:has(.rt-TextFieldInput:focus)){outline:2px solid var(--text-field-focus-color);outline-offset:-1px}}@supports not selector(:has(*)){.rt-TextFieldRoot:where(:focus-within){outline:2px solid var(--text-field-focus-color);outline-offset:-1px}}.rt-TextFieldRoot::selection{background-color:var(--text-field-selection-color)}.rt-TextFieldInput{width:100%;display:flex;align-items:center;text-align:inherit;border-radius:calc(var(--text-field-border-radius) - var(--text-field-border-width));text-indent:var(--text-field-padding)}.rt-TextFieldInput:where([type=number]){-moz-appearance:textfield}.rt-TextFieldInput::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.rt-TextFieldInput::-webkit-search-cancel-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.rt-TextFieldInput::selection{background-color:var(--text-field-selection-color)}.rt-TextFieldInput::-webkit-calendar-picker-indicator{box-sizing:content-box;width:var(--text-field-native-icon-size);height:var(--text-field-native-icon-size);padding:var(--space-1);margin-left:0;margin-right:calc(var(--space-1) * -1);border-radius:calc(var(--text-field-border-radius) - 2px)}.rt-TextFieldInput:where(:not([type=time]))::-webkit-calendar-picker-indicator{margin-left:var(--space-1)}.rt-TextFieldInput::-webkit-calendar-picker-indicator:where(:hover){background-color:var(--gray-a3)}.rt-TextFieldInput::-webkit-calendar-picker-indicator:where(:focus-visible){outline:2px solid var(--text-field-focus-color)}.rt-TextFieldInput::-webkit-datetime-edit-ampm-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-day-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-hour-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-millisecond-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-minute-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-month-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-second-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-week-field:where(:focus),.rt-TextFieldInput::-webkit-datetime-edit-year-field:where(:focus){background-color:var(--text-field-selection-color);color:inherit;outline:none}@supports selector(:has(*)){.rt-TextFieldInput:where(:-webkit-autofill,[data-com-onepassword-filled]){-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--gray-12)}.rt-TextFieldInput:where(:autofill,[data-com-onepassword-filled]){-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--gray-12)}}.rt-TextFieldSlot{box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;cursor:text}.rt-TextFieldSlot:where(:not([data-side=right])){order:-1;margin-left:calc(var(--text-field-border-width) * -1);margin-right:0}.rt-TextFieldSlot:where([data-side=right]),:where(.rt-TextFieldSlot:not([data-side=right]))~.rt-TextFieldSlot:where(:not([data-side=left])){order:0;margin-left:0;margin-right:calc(var(--text-field-border-width) * -1)}.rt-TextFieldRoot{box-sizing:border-box;height:var(--text-field-height);padding:var(--text-field-border-width);border-radius:var(--text-field-border-radius);display:flex;align-items:stretch;font-family:var(--default-font-family);font-weight:var(--font-weight-regular);font-style:normal;text-align:start}.rt-TextFieldInput:where([type=date],[type=datetime-local],[type=time],[type=week],[type=month]){text-indent:0;padding-left:var(--text-field-padding);padding-right:var(--text-field-padding)}.rt-TextFieldInput:where(:has(~.rt-TextFieldSlot:not([data-side=right]))){text-indent:0;padding-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.rt-TextFieldInput:where(:has(~.rt-TextFieldSlot[data-side=right],~.rt-TextFieldSlot:not([data-side=right])~.rt-TextFieldSlot:not([data-side=left]))){padding-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.rt-TextFieldRoot:where(.rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}@media (min-width: 520px){.rt-TextFieldRoot:where(.xs\:rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.xs\:rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.xs\:rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.xs\:rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.xs\:rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.xs\:rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.xs\:rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.xs\:rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.xs\:rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.xs\:rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.xs\:rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.xs\:rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}}@media (min-width: 768px){.rt-TextFieldRoot:where(.sm\:rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.sm\:rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.sm\:rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.sm\:rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.sm\:rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.sm\:rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.sm\:rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.sm\:rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.sm\:rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.sm\:rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.sm\:rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.sm\:rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}}@media (min-width: 1024px){.rt-TextFieldRoot:where(.md\:rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.md\:rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.md\:rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.md\:rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.md\:rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.md\:rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.md\:rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.md\:rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.md\:rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.md\:rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.md\:rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.md\:rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}}@media (min-width: 1280px){.rt-TextFieldRoot:where(.lg\:rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.lg\:rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.lg\:rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.lg\:rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.lg\:rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.lg\:rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.lg\:rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.lg\:rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.lg\:rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.lg\:rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.lg\:rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.lg\:rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}}@media (min-width: 1640px){.rt-TextFieldRoot:where(.xl\:rt-r-size-1){--text-field-height: var(--space-5);--text-field-padding: calc(var(--space-1) * 1.5 - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-3);font-size:var(--font-size-1);letter-spacing:var(--letter-spacing-1)}.rt-TextFieldRoot:where(.xl\:rt-r-size-1) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-1);padding-right:var(--space-1)}.rt-TextFieldRoot:where(.xl\:rt-r-size-1) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.xl\:rt-r-size-1) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:0;margin-right:-2px}.rt-TextFieldRoot:where(.xl\:rt-r-size-2){--text-field-height: var(--space-6);--text-field-padding: calc(var(--space-2) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-2), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-2);letter-spacing:var(--letter-spacing-2)}.rt-TextFieldRoot:where(.xl\:rt-r-size-2) :where(.rt-TextFieldInput){padding-bottom:.5px}.rt-TextFieldRoot:where(.xl\:rt-r-size-2) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:2px;margin-right:0}.rt-TextFieldRoot:where(.xl\:rt-r-size-2) :where(.rt-TextFieldSlot){gap:var(--space-2);padding-left:var(--space-2);padding-right:var(--space-2)}.rt-TextFieldRoot:where(.xl\:rt-r-size-3){--text-field-height: var(--space-7);--text-field-padding: calc(var(--space-3) - var(--text-field-border-width));--text-field-border-radius: max(var(--radius-3), var(--radius-full));--text-field-native-icon-size: var(--space-4);font-size:var(--font-size-3);letter-spacing:var(--letter-spacing-3)}.rt-TextFieldRoot:where(.xl\:rt-r-size-3) :where(.rt-TextFieldInput){padding-bottom:0}.rt-TextFieldRoot:where(.xl\:rt-r-size-3) :where(.rt-TextFieldInput)::-webkit-textfield-decoration-container{padding-right:5px;margin-right:0}.rt-TextFieldRoot:where(.xl\:rt-r-size-3) :where(.rt-TextFieldSlot){gap:var(--space-3);padding-left:var(--space-3);padding-right:var(--space-3)}}.rt-TextFieldRoot:where(.rt-variant-surface){--text-field-selection-color: var(--focus-a5);--text-field-focus-color: var(--focus-8);--text-field-border-width: 1px;background-clip:content-box;background-color:var(--color-surface);box-shadow:inset 0 0 0 var(--text-field-border-width) var(--gray-a7);color:var(--gray-12)}.rt-TextFieldRoot:where(.rt-variant-surface) :where(.rt-TextFieldInput)::placeholder{color:var(--gray-a10)}.rt-TextFieldRoot:where(.rt-variant-surface) :where(.rt-TextFieldSlot){color:var(--gray-a11)}.rt-TextFieldRoot:where(.rt-variant-surface) :where(.rt-TextFieldSlot):where([data-accent-color]){color:var(--accent-a11)}.rt-TextFieldRoot:where(.rt-variant-surface):where(:has(.rt-TextFieldInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextFieldRoot:where(.rt-variant-surface):where(:has(.rt-TextFieldInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextFieldRoot:where(.rt-variant-surface):where(:has(.rt-TextFieldInput:where(:disabled,:read-only))){background-image:linear-gradient(var(--gray-a2),var(--gray-a2));box-shadow:inset 0 0 0 var(--text-field-border-width) var(--gray-a6)}.rt-TextFieldRoot:where(.rt-variant-classic){--text-field-selection-color: var(--focus-a5);--text-field-focus-color: var(--focus-8);--text-field-border-width: 1px;background-clip:content-box;background-color:var(--color-surface);box-shadow:var(--shadow-1);color:var(--gray-12)}.rt-TextFieldRoot:where(.rt-variant-classic) :where(.rt-TextFieldInput)::placeholder{color:var(--gray-a10)}.rt-TextFieldRoot:where(.rt-variant-classic) :where(.rt-TextFieldSlot){color:var(--gray-a11)}.rt-TextFieldRoot:where(.rt-variant-classic) :where(.rt-TextFieldSlot):where([data-accent-color]){color:var(--accent-a11)}.rt-TextFieldRoot:where(.rt-variant-classic):where(:has(.rt-TextFieldInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextFieldRoot:where(.rt-variant-classic):where(:has(.rt-TextFieldInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){background-image:linear-gradient(var(--focus-a2),var(--focus-a2));box-shadow:inset 0 0 0 1px var(--focus-a5),inset 0 0 0 1px var(--gray-a5)}.rt-TextFieldRoot:where(.rt-variant-classic):where(:has(.rt-TextFieldInput:where(:disabled,:read-only))){background-image:linear-gradient(var(--gray-a2),var(--gray-a2))}.rt-TextFieldRoot:where(.rt-variant-soft){--text-field-selection-color: var(--accent-a5);--text-field-focus-color: var(--accent-8);--text-field-border-width: 0px;background-color:var(--accent-a3);color:var(--accent-12)}.rt-TextFieldRoot:where(.rt-variant-soft) :where(.rt-TextFieldInput)::placeholder{color:var(--accent-12);opacity:.6}.rt-TextFieldRoot:where(.rt-variant-soft) :where(.rt-TextFieldSlot){color:var(--accent-12)}.rt-TextFieldRoot:where(.rt-variant-soft) :where(.rt-TextFieldSlot):where([data-accent-color]){color:var(--accent-a11)}.rt-TextFieldRoot:where(.rt-variant-soft):where(:has(.rt-TextFieldInput:where(:-webkit-autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){box-shadow:inset 0 0 0 1px var(--accent-a5),inset 0 0 0 1px var(--gray-a4)}.rt-TextFieldRoot:where(.rt-variant-soft):where(:has(.rt-TextFieldInput:where(:autofill,[data-com-onepassword-filled]):not(:disabled,:read-only))){box-shadow:inset 0 0 0 1px var(--accent-a5),inset 0 0 0 1px var(--gray-a4)}.rt-TextFieldRoot:where(.rt-variant-soft):where(:has(.rt-TextFieldInput:where(:disabled,:read-only))){background-color:var(--gray-a3)}.rt-TextFieldInput:where(:disabled,:read-only){cursor:text;color:var(--gray-a11);-webkit-text-fill-color:var(--gray-a11)}.rt-TextFieldInput:where(:disabled,:read-only)::placeholder{opacity:.5}.rt-TextFieldInput:where(:disabled,:read-only):where(:placeholder-shown){cursor:var(--cursor-disabled)}.rt-TextFieldInput:where(:disabled,:read-only):where(:placeholder-shown)~:where(.rt-TextFieldSlot){cursor:var(--cursor-disabled)}.rt-TextFieldRoot:where(:has(.rt-TextFieldInput:where(:disabled,:read-only))){--text-field-selection-color: var(--gray-a5);--text-field-focus-color: var(--gray-8)}.rt-ThemePanelShortcut:where(:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--accent-9)}.rt-ThemePanelSwatch,.rt-ThemePanelRadioCard{position:relative}.rt-ThemePanelSwatchInput,.rt-ThemePanelRadioCardInput{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;outline:none;outline-width:2px;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;width:100%;height:100%}.rt-ThemePanelSwatch{width:var(--space-5);height:var(--space-5);border-radius:100%}.rt-ThemePanelSwatchInput{outline-offset:2px}.rt-ThemePanelSwatchInput:where(:checked){outline-style:solid;outline-color:var(--gray-12)}.rt-ThemePanelSwatchInput:where(:focus-visible){outline-style:solid;outline-color:var(--accent-9)}.rt-ThemePanelRadioCard{border-radius:var(--radius-1);box-shadow:0 0 0 1px var(--gray-7)}.rt-ThemePanelRadioCardInput{outline-offset:-1px}.rt-ThemePanelRadioCardInput:where(:checked){outline-style:solid;outline-color:var(--gray-12)}.rt-ThemePanelRadioCardInput:where(:focus-visible){background-color:var(--accent-a3);outline-style:solid;outline-color:var(--accent-9)}.rt-TooltipContent{box-sizing:border-box;padding:var(--space-1) var(--space-2);background-color:var(--gray-12);border-radius:var(--radius-2);transform-origin:var(--radix-tooltip-content-transform-origin);animation-duration:.14s;animation-timing-function:cubic-bezier(.16,1,.3,1)}@media (prefers-reduced-motion: no-preference){.rt-TooltipContent:where([data-state=delayed-open]):where([data-side=top]){animation-name:rt-slide-from-top,rt-fade-in}.rt-TooltipContent:where([data-state=delayed-open]):where([data-side=bottom]){animation-name:rt-slide-from-bottom,rt-fade-in}.rt-TooltipContent:where([data-state=delayed-open]):where([data-side=left]){animation-name:rt-slide-from-left,rt-fade-in}.rt-TooltipContent:where([data-state=delayed-open]):where([data-side=right]){animation-name:rt-slide-from-right,rt-fade-in}}.rt-TooltipText{color:var(--gray-1);-webkit-user-select:none;user-select:none;cursor:default}.rt-TooltipArrow{fill:var(--gray-12)}.radix-themes:where([data-is-root-theme=true]){position:relative;z-index:0;min-height:100vh}@supports (min-height: 100dvh){.radix-themes:where([data-is-root-theme=true]){min-height:100dvh}}.rt-r-ai-start{align-items:flex-start}.rt-r-ai-center{align-items:center}.rt-r-ai-end{align-items:flex-end}.rt-r-ai-baseline{align-items:baseline}.rt-r-ai-stretch{align-items:stretch}@media (min-width: 520px){.xs\:rt-r-ai-start{align-items:flex-start}.xs\:rt-r-ai-center{align-items:center}.xs\:rt-r-ai-end{align-items:flex-end}.xs\:rt-r-ai-baseline{align-items:baseline}.xs\:rt-r-ai-stretch{align-items:stretch}}@media (min-width: 768px){.sm\:rt-r-ai-start{align-items:flex-start}.sm\:rt-r-ai-center{align-items:center}.sm\:rt-r-ai-end{align-items:flex-end}.sm\:rt-r-ai-baseline{align-items:baseline}.sm\:rt-r-ai-stretch{align-items:stretch}}@media (min-width: 1024px){.md\:rt-r-ai-start{align-items:flex-start}.md\:rt-r-ai-center{align-items:center}.md\:rt-r-ai-end{align-items:flex-end}.md\:rt-r-ai-baseline{align-items:baseline}.md\:rt-r-ai-stretch{align-items:stretch}}@media (min-width: 1280px){.lg\:rt-r-ai-start{align-items:flex-start}.lg\:rt-r-ai-center{align-items:center}.lg\:rt-r-ai-end{align-items:flex-end}.lg\:rt-r-ai-baseline{align-items:baseline}.lg\:rt-r-ai-stretch{align-items:stretch}}@media (min-width: 1640px){.xl\:rt-r-ai-start{align-items:flex-start}.xl\:rt-r-ai-center{align-items:center}.xl\:rt-r-ai-end{align-items:flex-end}.xl\:rt-r-ai-baseline{align-items:baseline}.xl\:rt-r-ai-stretch{align-items:stretch}}.rt-r-as-start{align-self:flex-start}.rt-r-as-center{align-self:center}.rt-r-as-end{align-self:flex-end}.rt-r-as-baseline{align-self:baseline}.rt-r-as-stretch{align-self:stretch}@media (min-width: 520px){.xs\:rt-r-as-start{align-self:flex-start}.xs\:rt-r-as-center{align-self:center}.xs\:rt-r-as-end{align-self:flex-end}.xs\:rt-r-as-baseline{align-self:baseline}.xs\:rt-r-as-stretch{align-self:stretch}}@media (min-width: 768px){.sm\:rt-r-as-start{align-self:flex-start}.sm\:rt-r-as-center{align-self:center}.sm\:rt-r-as-end{align-self:flex-end}.sm\:rt-r-as-baseline{align-self:baseline}.sm\:rt-r-as-stretch{align-self:stretch}}@media (min-width: 1024px){.md\:rt-r-as-start{align-self:flex-start}.md\:rt-r-as-center{align-self:center}.md\:rt-r-as-end{align-self:flex-end}.md\:rt-r-as-baseline{align-self:baseline}.md\:rt-r-as-stretch{align-self:stretch}}@media (min-width: 1280px){.lg\:rt-r-as-start{align-self:flex-start}.lg\:rt-r-as-center{align-self:center}.lg\:rt-r-as-end{align-self:flex-end}.lg\:rt-r-as-baseline{align-self:baseline}.lg\:rt-r-as-stretch{align-self:stretch}}@media (min-width: 1640px){.xl\:rt-r-as-start{align-self:flex-start}.xl\:rt-r-as-center{align-self:center}.xl\:rt-r-as-end{align-self:flex-end}.xl\:rt-r-as-baseline{align-self:baseline}.xl\:rt-r-as-stretch{align-self:stretch}}.rt-r-display-block{display:block}.rt-r-display-inline{display:inline}.rt-r-display-inline-block{display:inline-block}.rt-r-display-flex{display:flex}.rt-r-display-inline-flex{display:inline-flex}.rt-r-display-grid{display:grid}.rt-r-display-inline-grid{display:inline-grid}.rt-r-display-none{display:none}@media (min-width: 520px){.xs\:rt-r-display-block{display:block}.xs\:rt-r-display-inline{display:inline}.xs\:rt-r-display-inline-block{display:inline-block}.xs\:rt-r-display-flex{display:flex}.xs\:rt-r-display-inline-flex{display:inline-flex}.xs\:rt-r-display-grid{display:grid}.xs\:rt-r-display-inline-grid{display:inline-grid}.xs\:rt-r-display-none{display:none}}@media (min-width: 768px){.sm\:rt-r-display-block{display:block}.sm\:rt-r-display-inline{display:inline}.sm\:rt-r-display-inline-block{display:inline-block}.sm\:rt-r-display-flex{display:flex}.sm\:rt-r-display-inline-flex{display:inline-flex}.sm\:rt-r-display-grid{display:grid}.sm\:rt-r-display-inline-grid{display:inline-grid}.sm\:rt-r-display-none{display:none}}@media (min-width: 1024px){.md\:rt-r-display-block{display:block}.md\:rt-r-display-inline{display:inline}.md\:rt-r-display-inline-block{display:inline-block}.md\:rt-r-display-flex{display:flex}.md\:rt-r-display-inline-flex{display:inline-flex}.md\:rt-r-display-grid{display:grid}.md\:rt-r-display-inline-grid{display:inline-grid}.md\:rt-r-display-none{display:none}}@media (min-width: 1280px){.lg\:rt-r-display-block{display:block}.lg\:rt-r-display-inline{display:inline}.lg\:rt-r-display-inline-block{display:inline-block}.lg\:rt-r-display-flex{display:flex}.lg\:rt-r-display-inline-flex{display:inline-flex}.lg\:rt-r-display-grid{display:grid}.lg\:rt-r-display-inline-grid{display:inline-grid}.lg\:rt-r-display-none{display:none}}@media (min-width: 1640px){.xl\:rt-r-display-block{display:block}.xl\:rt-r-display-inline{display:inline}.xl\:rt-r-display-inline-block{display:inline-block}.xl\:rt-r-display-flex{display:flex}.xl\:rt-r-display-inline-flex{display:inline-flex}.xl\:rt-r-display-grid{display:grid}.xl\:rt-r-display-inline-grid{display:inline-grid}.xl\:rt-r-display-none{display:none}}.rt-r-fb{flex-basis:var(--flex-basis)}@media (min-width: 520px){.xs\:rt-r-fb{flex-basis:var(--flex-basis-xs)}}@media (min-width: 768px){.sm\:rt-r-fb{flex-basis:var(--flex-basis-sm)}}@media (min-width: 1024px){.md\:rt-r-fb{flex-basis:var(--flex-basis-md)}}@media (min-width: 1280px){.lg\:rt-r-fb{flex-basis:var(--flex-basis-lg)}}@media (min-width: 1640px){.xl\:rt-r-fb{flex-basis:var(--flex-basis-xl)}}.rt-r-fd-row{flex-direction:row}.rt-r-fd-column{flex-direction:column}.rt-r-fd-row-reverse{flex-direction:row-reverse}.rt-r-fd-column-reverse{flex-direction:column-reverse}@media (min-width: 520px){.xs\:rt-r-fd-row{flex-direction:row}.xs\:rt-r-fd-column{flex-direction:column}.xs\:rt-r-fd-row-reverse{flex-direction:row-reverse}.xs\:rt-r-fd-column-reverse{flex-direction:column-reverse}}@media (min-width: 768px){.sm\:rt-r-fd-row{flex-direction:row}.sm\:rt-r-fd-column{flex-direction:column}.sm\:rt-r-fd-row-reverse{flex-direction:row-reverse}.sm\:rt-r-fd-column-reverse{flex-direction:column-reverse}}@media (min-width: 1024px){.md\:rt-r-fd-row{flex-direction:row}.md\:rt-r-fd-column{flex-direction:column}.md\:rt-r-fd-row-reverse{flex-direction:row-reverse}.md\:rt-r-fd-column-reverse{flex-direction:column-reverse}}@media (min-width: 1280px){.lg\:rt-r-fd-row{flex-direction:row}.lg\:rt-r-fd-column{flex-direction:column}.lg\:rt-r-fd-row-reverse{flex-direction:row-reverse}.lg\:rt-r-fd-column-reverse{flex-direction:column-reverse}}@media (min-width: 1640px){.xl\:rt-r-fd-row{flex-direction:row}.xl\:rt-r-fd-column{flex-direction:column}.xl\:rt-r-fd-row-reverse{flex-direction:row-reverse}.xl\:rt-r-fd-column-reverse{flex-direction:column-reverse}}.rt-r-fg{flex-grow:var(--flex-grow)}.rt-r-fg-0{flex-grow:0}.rt-r-fg-1{flex-grow:1}@media (min-width: 520px){.xs\:rt-r-fg{flex-grow:var(--flex-grow-xs)}.xs\:rt-r-fg-0{flex-grow:0}.xs\:rt-r-fg-1{flex-grow:1}}@media (min-width: 768px){.sm\:rt-r-fg{flex-grow:var(--flex-grow-sm)}.sm\:rt-r-fg-0{flex-grow:0}.sm\:rt-r-fg-1{flex-grow:1}}@media (min-width: 1024px){.md\:rt-r-fg{flex-grow:var(--flex-grow-md)}.md\:rt-r-fg-0{flex-grow:0}.md\:rt-r-fg-1{flex-grow:1}}@media (min-width: 1280px){.lg\:rt-r-fg{flex-grow:var(--flex-grow-lg)}.lg\:rt-r-fg-0{flex-grow:0}.lg\:rt-r-fg-1{flex-grow:1}}@media (min-width: 1640px){.xl\:rt-r-fg{flex-grow:var(--flex-grow-xl)}.xl\:rt-r-fg-0{flex-grow:0}.xl\:rt-r-fg-1{flex-grow:1}}.rt-r-fs{flex-shrink:var(--flex-shrink)}.rt-r-fs-0{flex-shrink:0}.rt-r-fs-1{flex-shrink:1}@media (min-width: 520px){.xs\:rt-r-fs{flex-shrink:var(--flex-shrink-xs)}.xs\:rt-r-fs-0{flex-shrink:0}.xs\:rt-r-fs-1{flex-shrink:1}}@media (min-width: 768px){.sm\:rt-r-fs{flex-shrink:var(--flex-shrink-sm)}.sm\:rt-r-fs-0{flex-shrink:0}.sm\:rt-r-fs-1{flex-shrink:1}}@media (min-width: 1024px){.md\:rt-r-fs{flex-shrink:var(--flex-shrink-md)}.md\:rt-r-fs-0{flex-shrink:0}.md\:rt-r-fs-1{flex-shrink:1}}@media (min-width: 1280px){.lg\:rt-r-fs{flex-shrink:var(--flex-shrink-lg)}.lg\:rt-r-fs-0{flex-shrink:0}.lg\:rt-r-fs-1{flex-shrink:1}}@media (min-width: 1640px){.xl\:rt-r-fs{flex-shrink:var(--flex-shrink-xl)}.xl\:rt-r-fs-0{flex-shrink:0}.xl\:rt-r-fs-1{flex-shrink:1}}.rt-r-fw-nowrap{flex-wrap:nowrap}.rt-r-fw-wrap{flex-wrap:wrap}.rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}@media (min-width: 520px){.xs\:rt-r-fw-nowrap{flex-wrap:nowrap}.xs\:rt-r-fw-wrap{flex-wrap:wrap}.xs\:rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}}@media (min-width: 768px){.sm\:rt-r-fw-nowrap{flex-wrap:nowrap}.sm\:rt-r-fw-wrap{flex-wrap:wrap}.sm\:rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}}@media (min-width: 1024px){.md\:rt-r-fw-nowrap{flex-wrap:nowrap}.md\:rt-r-fw-wrap{flex-wrap:wrap}.md\:rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}}@media (min-width: 1280px){.lg\:rt-r-fw-nowrap{flex-wrap:nowrap}.lg\:rt-r-fw-wrap{flex-wrap:wrap}.lg\:rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}}@media (min-width: 1640px){.xl\:rt-r-fw-nowrap{flex-wrap:nowrap}.xl\:rt-r-fw-wrap{flex-wrap:wrap}.xl\:rt-r-fw-wrap-reverse{flex-wrap:wrap-reverse}}.rt-r-gap{gap:var(--gap)}.rt-r-gap-0{gap:0}.rt-r-gap-1{gap:var(--space-1)}.rt-r-gap-2{gap:var(--space-2)}.rt-r-gap-3{gap:var(--space-3)}.rt-r-gap-4{gap:var(--space-4)}.rt-r-gap-5{gap:var(--space-5)}.rt-r-gap-6{gap:var(--space-6)}.rt-r-gap-7{gap:var(--space-7)}.rt-r-gap-8{gap:var(--space-8)}.rt-r-gap-9{gap:var(--space-9)}.rt-r-cg{column-gap:var(--column-gap)}.rt-r-cg-0{column-gap:0}.rt-r-cg-1{column-gap:var(--space-1)}.rt-r-cg-2{column-gap:var(--space-2)}.rt-r-cg-3{column-gap:var(--space-3)}.rt-r-cg-4{column-gap:var(--space-4)}.rt-r-cg-5{column-gap:var(--space-5)}.rt-r-cg-6{column-gap:var(--space-6)}.rt-r-cg-7{column-gap:var(--space-7)}.rt-r-cg-8{column-gap:var(--space-8)}.rt-r-cg-9{column-gap:var(--space-9)}.rt-r-rg{row-gap:var(--row-gap)}.rt-r-rg-0{row-gap:0}.rt-r-rg-1{row-gap:var(--space-1)}.rt-r-rg-2{row-gap:var(--space-2)}.rt-r-rg-3{row-gap:var(--space-3)}.rt-r-rg-4{row-gap:var(--space-4)}.rt-r-rg-5{row-gap:var(--space-5)}.rt-r-rg-6{row-gap:var(--space-6)}.rt-r-rg-7{row-gap:var(--space-7)}.rt-r-rg-8{row-gap:var(--space-8)}.rt-r-rg-9{row-gap:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-gap{gap:var(--gap-xs)}.xs\:rt-r-gap-0{gap:0}.xs\:rt-r-gap-1{gap:var(--space-1)}.xs\:rt-r-gap-2{gap:var(--space-2)}.xs\:rt-r-gap-3{gap:var(--space-3)}.xs\:rt-r-gap-4{gap:var(--space-4)}.xs\:rt-r-gap-5{gap:var(--space-5)}.xs\:rt-r-gap-6{gap:var(--space-6)}.xs\:rt-r-gap-7{gap:var(--space-7)}.xs\:rt-r-gap-8{gap:var(--space-8)}.xs\:rt-r-gap-9{gap:var(--space-9)}.xs\:rt-r-cg{column-gap:var(--column-gap-xs)}.xs\:rt-r-cg-0{column-gap:0}.xs\:rt-r-cg-1{column-gap:var(--space-1)}.xs\:rt-r-cg-2{column-gap:var(--space-2)}.xs\:rt-r-cg-3{column-gap:var(--space-3)}.xs\:rt-r-cg-4{column-gap:var(--space-4)}.xs\:rt-r-cg-5{column-gap:var(--space-5)}.xs\:rt-r-cg-6{column-gap:var(--space-6)}.xs\:rt-r-cg-7{column-gap:var(--space-7)}.xs\:rt-r-cg-8{column-gap:var(--space-8)}.xs\:rt-r-cg-9{column-gap:var(--space-9)}.xs\:rt-r-rg{row-gap:var(--row-gap-xs)}.xs\:rt-r-rg-0{row-gap:0}.xs\:rt-r-rg-1{row-gap:var(--space-1)}.xs\:rt-r-rg-2{row-gap:var(--space-2)}.xs\:rt-r-rg-3{row-gap:var(--space-3)}.xs\:rt-r-rg-4{row-gap:var(--space-4)}.xs\:rt-r-rg-5{row-gap:var(--space-5)}.xs\:rt-r-rg-6{row-gap:var(--space-6)}.xs\:rt-r-rg-7{row-gap:var(--space-7)}.xs\:rt-r-rg-8{row-gap:var(--space-8)}.xs\:rt-r-rg-9{row-gap:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-gap{gap:var(--gap-sm)}.sm\:rt-r-gap-0{gap:0}.sm\:rt-r-gap-1{gap:var(--space-1)}.sm\:rt-r-gap-2{gap:var(--space-2)}.sm\:rt-r-gap-3{gap:var(--space-3)}.sm\:rt-r-gap-4{gap:var(--space-4)}.sm\:rt-r-gap-5{gap:var(--space-5)}.sm\:rt-r-gap-6{gap:var(--space-6)}.sm\:rt-r-gap-7{gap:var(--space-7)}.sm\:rt-r-gap-8{gap:var(--space-8)}.sm\:rt-r-gap-9{gap:var(--space-9)}.sm\:rt-r-cg{column-gap:var(--column-gap-sm)}.sm\:rt-r-cg-0{column-gap:0}.sm\:rt-r-cg-1{column-gap:var(--space-1)}.sm\:rt-r-cg-2{column-gap:var(--space-2)}.sm\:rt-r-cg-3{column-gap:var(--space-3)}.sm\:rt-r-cg-4{column-gap:var(--space-4)}.sm\:rt-r-cg-5{column-gap:var(--space-5)}.sm\:rt-r-cg-6{column-gap:var(--space-6)}.sm\:rt-r-cg-7{column-gap:var(--space-7)}.sm\:rt-r-cg-8{column-gap:var(--space-8)}.sm\:rt-r-cg-9{column-gap:var(--space-9)}.sm\:rt-r-rg{row-gap:var(--row-gap-sm)}.sm\:rt-r-rg-0{row-gap:0}.sm\:rt-r-rg-1{row-gap:var(--space-1)}.sm\:rt-r-rg-2{row-gap:var(--space-2)}.sm\:rt-r-rg-3{row-gap:var(--space-3)}.sm\:rt-r-rg-4{row-gap:var(--space-4)}.sm\:rt-r-rg-5{row-gap:var(--space-5)}.sm\:rt-r-rg-6{row-gap:var(--space-6)}.sm\:rt-r-rg-7{row-gap:var(--space-7)}.sm\:rt-r-rg-8{row-gap:var(--space-8)}.sm\:rt-r-rg-9{row-gap:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-gap{gap:var(--gap-md)}.md\:rt-r-gap-0{gap:0}.md\:rt-r-gap-1{gap:var(--space-1)}.md\:rt-r-gap-2{gap:var(--space-2)}.md\:rt-r-gap-3{gap:var(--space-3)}.md\:rt-r-gap-4{gap:var(--space-4)}.md\:rt-r-gap-5{gap:var(--space-5)}.md\:rt-r-gap-6{gap:var(--space-6)}.md\:rt-r-gap-7{gap:var(--space-7)}.md\:rt-r-gap-8{gap:var(--space-8)}.md\:rt-r-gap-9{gap:var(--space-9)}.md\:rt-r-cg{column-gap:var(--column-gap-md)}.md\:rt-r-cg-0{column-gap:0}.md\:rt-r-cg-1{column-gap:var(--space-1)}.md\:rt-r-cg-2{column-gap:var(--space-2)}.md\:rt-r-cg-3{column-gap:var(--space-3)}.md\:rt-r-cg-4{column-gap:var(--space-4)}.md\:rt-r-cg-5{column-gap:var(--space-5)}.md\:rt-r-cg-6{column-gap:var(--space-6)}.md\:rt-r-cg-7{column-gap:var(--space-7)}.md\:rt-r-cg-8{column-gap:var(--space-8)}.md\:rt-r-cg-9{column-gap:var(--space-9)}.md\:rt-r-rg{row-gap:var(--row-gap-md)}.md\:rt-r-rg-0{row-gap:0}.md\:rt-r-rg-1{row-gap:var(--space-1)}.md\:rt-r-rg-2{row-gap:var(--space-2)}.md\:rt-r-rg-3{row-gap:var(--space-3)}.md\:rt-r-rg-4{row-gap:var(--space-4)}.md\:rt-r-rg-5{row-gap:var(--space-5)}.md\:rt-r-rg-6{row-gap:var(--space-6)}.md\:rt-r-rg-7{row-gap:var(--space-7)}.md\:rt-r-rg-8{row-gap:var(--space-8)}.md\:rt-r-rg-9{row-gap:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-gap{gap:var(--gap-lg)}.lg\:rt-r-gap-0{gap:0}.lg\:rt-r-gap-1{gap:var(--space-1)}.lg\:rt-r-gap-2{gap:var(--space-2)}.lg\:rt-r-gap-3{gap:var(--space-3)}.lg\:rt-r-gap-4{gap:var(--space-4)}.lg\:rt-r-gap-5{gap:var(--space-5)}.lg\:rt-r-gap-6{gap:var(--space-6)}.lg\:rt-r-gap-7{gap:var(--space-7)}.lg\:rt-r-gap-8{gap:var(--space-8)}.lg\:rt-r-gap-9{gap:var(--space-9)}.lg\:rt-r-cg{column-gap:var(--column-gap-lg)}.lg\:rt-r-cg-0{column-gap:0}.lg\:rt-r-cg-1{column-gap:var(--space-1)}.lg\:rt-r-cg-2{column-gap:var(--space-2)}.lg\:rt-r-cg-3{column-gap:var(--space-3)}.lg\:rt-r-cg-4{column-gap:var(--space-4)}.lg\:rt-r-cg-5{column-gap:var(--space-5)}.lg\:rt-r-cg-6{column-gap:var(--space-6)}.lg\:rt-r-cg-7{column-gap:var(--space-7)}.lg\:rt-r-cg-8{column-gap:var(--space-8)}.lg\:rt-r-cg-9{column-gap:var(--space-9)}.lg\:rt-r-rg{row-gap:var(--row-gap-lg)}.lg\:rt-r-rg-0{row-gap:0}.lg\:rt-r-rg-1{row-gap:var(--space-1)}.lg\:rt-r-rg-2{row-gap:var(--space-2)}.lg\:rt-r-rg-3{row-gap:var(--space-3)}.lg\:rt-r-rg-4{row-gap:var(--space-4)}.lg\:rt-r-rg-5{row-gap:var(--space-5)}.lg\:rt-r-rg-6{row-gap:var(--space-6)}.lg\:rt-r-rg-7{row-gap:var(--space-7)}.lg\:rt-r-rg-8{row-gap:var(--space-8)}.lg\:rt-r-rg-9{row-gap:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-gap{gap:var(--gap-xl)}.xl\:rt-r-gap-0{gap:0}.xl\:rt-r-gap-1{gap:var(--space-1)}.xl\:rt-r-gap-2{gap:var(--space-2)}.xl\:rt-r-gap-3{gap:var(--space-3)}.xl\:rt-r-gap-4{gap:var(--space-4)}.xl\:rt-r-gap-5{gap:var(--space-5)}.xl\:rt-r-gap-6{gap:var(--space-6)}.xl\:rt-r-gap-7{gap:var(--space-7)}.xl\:rt-r-gap-8{gap:var(--space-8)}.xl\:rt-r-gap-9{gap:var(--space-9)}.xl\:rt-r-cg{column-gap:var(--column-gap-xl)}.xl\:rt-r-cg-0{column-gap:0}.xl\:rt-r-cg-1{column-gap:var(--space-1)}.xl\:rt-r-cg-2{column-gap:var(--space-2)}.xl\:rt-r-cg-3{column-gap:var(--space-3)}.xl\:rt-r-cg-4{column-gap:var(--space-4)}.xl\:rt-r-cg-5{column-gap:var(--space-5)}.xl\:rt-r-cg-6{column-gap:var(--space-6)}.xl\:rt-r-cg-7{column-gap:var(--space-7)}.xl\:rt-r-cg-8{column-gap:var(--space-8)}.xl\:rt-r-cg-9{column-gap:var(--space-9)}.xl\:rt-r-rg{row-gap:var(--row-gap-xl)}.xl\:rt-r-rg-0{row-gap:0}.xl\:rt-r-rg-1{row-gap:var(--space-1)}.xl\:rt-r-rg-2{row-gap:var(--space-2)}.xl\:rt-r-rg-3{row-gap:var(--space-3)}.xl\:rt-r-rg-4{row-gap:var(--space-4)}.xl\:rt-r-rg-5{row-gap:var(--space-5)}.xl\:rt-r-rg-6{row-gap:var(--space-6)}.xl\:rt-r-rg-7{row-gap:var(--space-7)}.xl\:rt-r-rg-8{row-gap:var(--space-8)}.xl\:rt-r-rg-9{row-gap:var(--space-9)}}.rt-r-ga{grid-area:var(--grid-area)}.rt-r-gaf-row{grid-auto-flow:row}.rt-r-gaf-column{grid-auto-flow:column}.rt-r-gaf-dense{grid-auto-flow:dense}.rt-r-gaf-row-dense{grid-auto-flow:row dense}.rt-r-gaf-column-dense{grid-auto-flow:column dense}@media (min-width: 520px){.xs\:rt-r-gaf-row{grid-auto-flow:row}.xs\:rt-r-gaf-column{grid-auto-flow:column}.xs\:rt-r-gaf-dense{grid-auto-flow:dense}.xs\:rt-r-gaf-row-dense{grid-auto-flow:row dense}.xs\:rt-r-gaf-column-dense{grid-auto-flow:column dense}}@media (min-width: 768px){.sm\:rt-r-gaf-row{grid-auto-flow:row}.sm\:rt-r-gaf-column{grid-auto-flow:column}.sm\:rt-r-gaf-dense{grid-auto-flow:dense}.sm\:rt-r-gaf-row-dense{grid-auto-flow:row dense}.sm\:rt-r-gaf-column-dense{grid-auto-flow:column dense}}@media (min-width: 1024px){.md\:rt-r-gaf-row{grid-auto-flow:row}.md\:rt-r-gaf-column{grid-auto-flow:column}.md\:rt-r-gaf-dense{grid-auto-flow:dense}.md\:rt-r-gaf-row-dense{grid-auto-flow:row dense}.md\:rt-r-gaf-column-dense{grid-auto-flow:column dense}}@media (min-width: 1280px){.lg\:rt-r-gaf-row{grid-auto-flow:row}.lg\:rt-r-gaf-column{grid-auto-flow:column}.lg\:rt-r-gaf-dense{grid-auto-flow:dense}.lg\:rt-r-gaf-row-dense{grid-auto-flow:row dense}.lg\:rt-r-gaf-column-dense{grid-auto-flow:column dense}}@media (min-width: 1640px){.xl\:rt-r-gaf-row{grid-auto-flow:row}.xl\:rt-r-gaf-column{grid-auto-flow:column}.xl\:rt-r-gaf-dense{grid-auto-flow:dense}.xl\:rt-r-gaf-row-dense{grid-auto-flow:row dense}.xl\:rt-r-gaf-column-dense{grid-auto-flow:column dense}}.rt-r-gc{grid-column:var(--grid-column)}.rt-r-gc-1{grid-column:1}.rt-r-gc-2{grid-column:2}.rt-r-gc-3{grid-column:3}.rt-r-gc-4{grid-column:4}.rt-r-gc-5{grid-column:5}.rt-r-gc-6{grid-column:6}.rt-r-gc-7{grid-column:7}.rt-r-gc-8{grid-column:8}.rt-r-gc-9{grid-column:9}@media (min-width: 520px){.xs\:rt-r-gc{grid-column:var(--grid-column-xs)}.xs\:rt-r-gc-1{grid-column:1}.xs\:rt-r-gc-2{grid-column:2}.xs\:rt-r-gc-3{grid-column:3}.xs\:rt-r-gc-4{grid-column:4}.xs\:rt-r-gc-5{grid-column:5}.xs\:rt-r-gc-6{grid-column:6}.xs\:rt-r-gc-7{grid-column:7}.xs\:rt-r-gc-8{grid-column:8}.xs\:rt-r-gc-9{grid-column:9}}@media (min-width: 768px){.sm\:rt-r-gc{grid-column:var(--grid-column-sm)}.sm\:rt-r-gc-1{grid-column:1}.sm\:rt-r-gc-2{grid-column:2}.sm\:rt-r-gc-3{grid-column:3}.sm\:rt-r-gc-4{grid-column:4}.sm\:rt-r-gc-5{grid-column:5}.sm\:rt-r-gc-6{grid-column:6}.sm\:rt-r-gc-7{grid-column:7}.sm\:rt-r-gc-8{grid-column:8}.sm\:rt-r-gc-9{grid-column:9}}@media (min-width: 1024px){.md\:rt-r-gc{grid-column:var(--grid-column-md)}.md\:rt-r-gc-1{grid-column:1}.md\:rt-r-gc-2{grid-column:2}.md\:rt-r-gc-3{grid-column:3}.md\:rt-r-gc-4{grid-column:4}.md\:rt-r-gc-5{grid-column:5}.md\:rt-r-gc-6{grid-column:6}.md\:rt-r-gc-7{grid-column:7}.md\:rt-r-gc-8{grid-column:8}.md\:rt-r-gc-9{grid-column:9}}@media (min-width: 1280px){.lg\:rt-r-gc{grid-column:var(--grid-column-lg)}.lg\:rt-r-gc-1{grid-column:1}.lg\:rt-r-gc-2{grid-column:2}.lg\:rt-r-gc-3{grid-column:3}.lg\:rt-r-gc-4{grid-column:4}.lg\:rt-r-gc-5{grid-column:5}.lg\:rt-r-gc-6{grid-column:6}.lg\:rt-r-gc-7{grid-column:7}.lg\:rt-r-gc-8{grid-column:8}.lg\:rt-r-gc-9{grid-column:9}}@media (min-width: 1640px){.xl\:rt-r-gc{grid-column:var(--grid-column-xl)}.xl\:rt-r-gc-1{grid-column:1}.xl\:rt-r-gc-2{grid-column:2}.xl\:rt-r-gc-3{grid-column:3}.xl\:rt-r-gc-4{grid-column:4}.xl\:rt-r-gc-5{grid-column:5}.xl\:rt-r-gc-6{grid-column:6}.xl\:rt-r-gc-7{grid-column:7}.xl\:rt-r-gc-8{grid-column:8}.xl\:rt-r-gc-9{grid-column:9}}.rt-r-gcs{grid-column-start:var(--grid-column-start)}.rt-r-gcs-1{grid-column-start:1}.rt-r-gcs-2{grid-column-start:2}.rt-r-gcs-3{grid-column-start:3}.rt-r-gcs-4{grid-column-start:4}.rt-r-gcs-5{grid-column-start:5}.rt-r-gcs-6{grid-column-start:6}.rt-r-gcs-7{grid-column-start:7}.rt-r-gcs-8{grid-column-start:8}.rt-r-gcs-9{grid-column-start:9}@media (min-width: 520px){.xs\:rt-r-gcs{grid-column-start:var(--grid-column-start-xs)}.xs\:rt-r-gcs-1{grid-column-start:1}.xs\:rt-r-gcs-2{grid-column-start:2}.xs\:rt-r-gcs-3{grid-column-start:3}.xs\:rt-r-gcs-4{grid-column-start:4}.xs\:rt-r-gcs-5{grid-column-start:5}.xs\:rt-r-gcs-6{grid-column-start:6}.xs\:rt-r-gcs-7{grid-column-start:7}.xs\:rt-r-gcs-8{grid-column-start:8}.xs\:rt-r-gcs-9{grid-column-start:9}}@media (min-width: 768px){.sm\:rt-r-gcs{grid-column-start:var(--grid-column-start-sm)}.sm\:rt-r-gcs-1{grid-column-start:1}.sm\:rt-r-gcs-2{grid-column-start:2}.sm\:rt-r-gcs-3{grid-column-start:3}.sm\:rt-r-gcs-4{grid-column-start:4}.sm\:rt-r-gcs-5{grid-column-start:5}.sm\:rt-r-gcs-6{grid-column-start:6}.sm\:rt-r-gcs-7{grid-column-start:7}.sm\:rt-r-gcs-8{grid-column-start:8}.sm\:rt-r-gcs-9{grid-column-start:9}}@media (min-width: 1024px){.md\:rt-r-gcs{grid-column-start:var(--grid-column-start-md)}.md\:rt-r-gcs-1{grid-column-start:1}.md\:rt-r-gcs-2{grid-column-start:2}.md\:rt-r-gcs-3{grid-column-start:3}.md\:rt-r-gcs-4{grid-column-start:4}.md\:rt-r-gcs-5{grid-column-start:5}.md\:rt-r-gcs-6{grid-column-start:6}.md\:rt-r-gcs-7{grid-column-start:7}.md\:rt-r-gcs-8{grid-column-start:8}.md\:rt-r-gcs-9{grid-column-start:9}}@media (min-width: 1280px){.lg\:rt-r-gcs{grid-column-start:var(--grid-column-start-lg)}.lg\:rt-r-gcs-1{grid-column-start:1}.lg\:rt-r-gcs-2{grid-column-start:2}.lg\:rt-r-gcs-3{grid-column-start:3}.lg\:rt-r-gcs-4{grid-column-start:4}.lg\:rt-r-gcs-5{grid-column-start:5}.lg\:rt-r-gcs-6{grid-column-start:6}.lg\:rt-r-gcs-7{grid-column-start:7}.lg\:rt-r-gcs-8{grid-column-start:8}.lg\:rt-r-gcs-9{grid-column-start:9}}@media (min-width: 1640px){.xl\:rt-r-gcs{grid-column-start:var(--grid-column-start-xl)}.xl\:rt-r-gcs-1{grid-column-start:1}.xl\:rt-r-gcs-2{grid-column-start:2}.xl\:rt-r-gcs-3{grid-column-start:3}.xl\:rt-r-gcs-4{grid-column-start:4}.xl\:rt-r-gcs-5{grid-column-start:5}.xl\:rt-r-gcs-6{grid-column-start:6}.xl\:rt-r-gcs-7{grid-column-start:7}.xl\:rt-r-gcs-8{grid-column-start:8}.xl\:rt-r-gcs-9{grid-column-start:9}}.rt-r-gce{grid-column-end:var(--grid-column-end)}.rt-r-gce-1{grid-column-end:1}.rt-r-gce-2{grid-column-end:2}.rt-r-gce-3{grid-column-end:3}.rt-r-gce-4{grid-column-end:4}.rt-r-gce-5{grid-column-end:5}.rt-r-gce-6{grid-column-end:6}.rt-r-gce-7{grid-column-end:7}.rt-r-gce-8{grid-column-end:8}.rt-r-gce-9{grid-column-end:9}@media (min-width: 520px){.xs\:rt-r-gce{grid-column-end:var(--grid-column-end-xs)}.xs\:rt-r-gce-1{grid-column-end:1}.xs\:rt-r-gce-2{grid-column-end:2}.xs\:rt-r-gce-3{grid-column-end:3}.xs\:rt-r-gce-4{grid-column-end:4}.xs\:rt-r-gce-5{grid-column-end:5}.xs\:rt-r-gce-6{grid-column-end:6}.xs\:rt-r-gce-7{grid-column-end:7}.xs\:rt-r-gce-8{grid-column-end:8}.xs\:rt-r-gce-9{grid-column-end:9}}@media (min-width: 768px){.sm\:rt-r-gce{grid-column-end:var(--grid-column-end-sm)}.sm\:rt-r-gce-1{grid-column-end:1}.sm\:rt-r-gce-2{grid-column-end:2}.sm\:rt-r-gce-3{grid-column-end:3}.sm\:rt-r-gce-4{grid-column-end:4}.sm\:rt-r-gce-5{grid-column-end:5}.sm\:rt-r-gce-6{grid-column-end:6}.sm\:rt-r-gce-7{grid-column-end:7}.sm\:rt-r-gce-8{grid-column-end:8}.sm\:rt-r-gce-9{grid-column-end:9}}@media (min-width: 1024px){.md\:rt-r-gce{grid-column-end:var(--grid-column-end-md)}.md\:rt-r-gce-1{grid-column-end:1}.md\:rt-r-gce-2{grid-column-end:2}.md\:rt-r-gce-3{grid-column-end:3}.md\:rt-r-gce-4{grid-column-end:4}.md\:rt-r-gce-5{grid-column-end:5}.md\:rt-r-gce-6{grid-column-end:6}.md\:rt-r-gce-7{grid-column-end:7}.md\:rt-r-gce-8{grid-column-end:8}.md\:rt-r-gce-9{grid-column-end:9}}@media (min-width: 1280px){.lg\:rt-r-gce{grid-column-end:var(--grid-column-end-lg)}.lg\:rt-r-gce-1{grid-column-end:1}.lg\:rt-r-gce-2{grid-column-end:2}.lg\:rt-r-gce-3{grid-column-end:3}.lg\:rt-r-gce-4{grid-column-end:4}.lg\:rt-r-gce-5{grid-column-end:5}.lg\:rt-r-gce-6{grid-column-end:6}.lg\:rt-r-gce-7{grid-column-end:7}.lg\:rt-r-gce-8{grid-column-end:8}.lg\:rt-r-gce-9{grid-column-end:9}}@media (min-width: 1640px){.xl\:rt-r-gce{grid-column-end:var(--grid-column-end-xl)}.xl\:rt-r-gce-1{grid-column-end:1}.xl\:rt-r-gce-2{grid-column-end:2}.xl\:rt-r-gce-3{grid-column-end:3}.xl\:rt-r-gce-4{grid-column-end:4}.xl\:rt-r-gce-5{grid-column-end:5}.xl\:rt-r-gce-6{grid-column-end:6}.xl\:rt-r-gce-7{grid-column-end:7}.xl\:rt-r-gce-8{grid-column-end:8}.xl\:rt-r-gce-9{grid-column-end:9}}.rt-r-gr{grid-row:var(--grid-row)}.rt-r-gr-1{grid-row:1}.rt-r-gr-2{grid-row:2}.rt-r-gr-3{grid-row:3}.rt-r-gr-4{grid-row:4}.rt-r-gr-5{grid-row:5}.rt-r-gr-6{grid-row:6}.rt-r-gr-7{grid-row:7}.rt-r-gr-8{grid-row:8}.rt-r-gr-9{grid-row:9}@media (min-width: 520px){.xs\:rt-r-gr{grid-row:var(--grid-row-xs)}.xs\:rt-r-gr-1{grid-row:1}.xs\:rt-r-gr-2{grid-row:2}.xs\:rt-r-gr-3{grid-row:3}.xs\:rt-r-gr-4{grid-row:4}.xs\:rt-r-gr-5{grid-row:5}.xs\:rt-r-gr-6{grid-row:6}.xs\:rt-r-gr-7{grid-row:7}.xs\:rt-r-gr-8{grid-row:8}.xs\:rt-r-gr-9{grid-row:9}}@media (min-width: 768px){.sm\:rt-r-gr{grid-row:var(--grid-row-sm)}.sm\:rt-r-gr-1{grid-row:1}.sm\:rt-r-gr-2{grid-row:2}.sm\:rt-r-gr-3{grid-row:3}.sm\:rt-r-gr-4{grid-row:4}.sm\:rt-r-gr-5{grid-row:5}.sm\:rt-r-gr-6{grid-row:6}.sm\:rt-r-gr-7{grid-row:7}.sm\:rt-r-gr-8{grid-row:8}.sm\:rt-r-gr-9{grid-row:9}}@media (min-width: 1024px){.md\:rt-r-gr{grid-row:var(--grid-row-md)}.md\:rt-r-gr-1{grid-row:1}.md\:rt-r-gr-2{grid-row:2}.md\:rt-r-gr-3{grid-row:3}.md\:rt-r-gr-4{grid-row:4}.md\:rt-r-gr-5{grid-row:5}.md\:rt-r-gr-6{grid-row:6}.md\:rt-r-gr-7{grid-row:7}.md\:rt-r-gr-8{grid-row:8}.md\:rt-r-gr-9{grid-row:9}}@media (min-width: 1280px){.lg\:rt-r-gr{grid-row:var(--grid-row-lg)}.lg\:rt-r-gr-1{grid-row:1}.lg\:rt-r-gr-2{grid-row:2}.lg\:rt-r-gr-3{grid-row:3}.lg\:rt-r-gr-4{grid-row:4}.lg\:rt-r-gr-5{grid-row:5}.lg\:rt-r-gr-6{grid-row:6}.lg\:rt-r-gr-7{grid-row:7}.lg\:rt-r-gr-8{grid-row:8}.lg\:rt-r-gr-9{grid-row:9}}@media (min-width: 1640px){.xl\:rt-r-gr{grid-row:var(--grid-row-xl)}.xl\:rt-r-gr-1{grid-row:1}.xl\:rt-r-gr-2{grid-row:2}.xl\:rt-r-gr-3{grid-row:3}.xl\:rt-r-gr-4{grid-row:4}.xl\:rt-r-gr-5{grid-row:5}.xl\:rt-r-gr-6{grid-row:6}.xl\:rt-r-gr-7{grid-row:7}.xl\:rt-r-gr-8{grid-row:8}.xl\:rt-r-gr-9{grid-row:9}}.rt-r-grs{grid-row-start:var(--grid-row-start)}.rt-r-grs-1{grid-row-start:1}.rt-r-grs-2{grid-row-start:2}.rt-r-grs-3{grid-row-start:3}.rt-r-grs-4{grid-row-start:4}.rt-r-grs-5{grid-row-start:5}.rt-r-grs-6{grid-row-start:6}.rt-r-grs-7{grid-row-start:7}.rt-r-grs-8{grid-row-start:8}.rt-r-grs-9{grid-row-start:9}@media (min-width: 520px){.xs\:rt-r-grs{grid-row-start:var(--grid-row-start-xs)}.xs\:rt-r-grs-1{grid-row-start:1}.xs\:rt-r-grs-2{grid-row-start:2}.xs\:rt-r-grs-3{grid-row-start:3}.xs\:rt-r-grs-4{grid-row-start:4}.xs\:rt-r-grs-5{grid-row-start:5}.xs\:rt-r-grs-6{grid-row-start:6}.xs\:rt-r-grs-7{grid-row-start:7}.xs\:rt-r-grs-8{grid-row-start:8}.xs\:rt-r-grs-9{grid-row-start:9}}@media (min-width: 768px){.sm\:rt-r-grs{grid-row-start:var(--grid-row-start-sm)}.sm\:rt-r-grs-1{grid-row-start:1}.sm\:rt-r-grs-2{grid-row-start:2}.sm\:rt-r-grs-3{grid-row-start:3}.sm\:rt-r-grs-4{grid-row-start:4}.sm\:rt-r-grs-5{grid-row-start:5}.sm\:rt-r-grs-6{grid-row-start:6}.sm\:rt-r-grs-7{grid-row-start:7}.sm\:rt-r-grs-8{grid-row-start:8}.sm\:rt-r-grs-9{grid-row-start:9}}@media (min-width: 1024px){.md\:rt-r-grs{grid-row-start:var(--grid-row-start-md)}.md\:rt-r-grs-1{grid-row-start:1}.md\:rt-r-grs-2{grid-row-start:2}.md\:rt-r-grs-3{grid-row-start:3}.md\:rt-r-grs-4{grid-row-start:4}.md\:rt-r-grs-5{grid-row-start:5}.md\:rt-r-grs-6{grid-row-start:6}.md\:rt-r-grs-7{grid-row-start:7}.md\:rt-r-grs-8{grid-row-start:8}.md\:rt-r-grs-9{grid-row-start:9}}@media (min-width: 1280px){.lg\:rt-r-grs{grid-row-start:var(--grid-row-start-lg)}.lg\:rt-r-grs-1{grid-row-start:1}.lg\:rt-r-grs-2{grid-row-start:2}.lg\:rt-r-grs-3{grid-row-start:3}.lg\:rt-r-grs-4{grid-row-start:4}.lg\:rt-r-grs-5{grid-row-start:5}.lg\:rt-r-grs-6{grid-row-start:6}.lg\:rt-r-grs-7{grid-row-start:7}.lg\:rt-r-grs-8{grid-row-start:8}.lg\:rt-r-grs-9{grid-row-start:9}}@media (min-width: 1640px){.xl\:rt-r-grs{grid-row-start:var(--grid-row-start-xl)}.xl\:rt-r-grs-1{grid-row-start:1}.xl\:rt-r-grs-2{grid-row-start:2}.xl\:rt-r-grs-3{grid-row-start:3}.xl\:rt-r-grs-4{grid-row-start:4}.xl\:rt-r-grs-5{grid-row-start:5}.xl\:rt-r-grs-6{grid-row-start:6}.xl\:rt-r-grs-7{grid-row-start:7}.xl\:rt-r-grs-8{grid-row-start:8}.xl\:rt-r-grs-9{grid-row-start:9}}.rt-r-gre{grid-row-end:var(--grid-row-end)}.rt-r-gre-1{grid-row-end:1}.rt-r-gre-2{grid-row-end:2}.rt-r-gre-3{grid-row-end:3}.rt-r-gre-4{grid-row-end:4}.rt-r-gre-5{grid-row-end:5}.rt-r-gre-6{grid-row-end:6}.rt-r-gre-7{grid-row-end:7}.rt-r-gre-8{grid-row-end:8}.rt-r-gre-9{grid-row-end:9}@media (min-width: 520px){.xs\:rt-r-gre{grid-row-end:var(--grid-row-end-xs)}.xs\:rt-r-gre-1{grid-row-end:1}.xs\:rt-r-gre-2{grid-row-end:2}.xs\:rt-r-gre-3{grid-row-end:3}.xs\:rt-r-gre-4{grid-row-end:4}.xs\:rt-r-gre-5{grid-row-end:5}.xs\:rt-r-gre-6{grid-row-end:6}.xs\:rt-r-gre-7{grid-row-end:7}.xs\:rt-r-gre-8{grid-row-end:8}.xs\:rt-r-gre-9{grid-row-end:9}}@media (min-width: 768px){.sm\:rt-r-gre{grid-row-end:var(--grid-row-end-sm)}.sm\:rt-r-gre-1{grid-row-end:1}.sm\:rt-r-gre-2{grid-row-end:2}.sm\:rt-r-gre-3{grid-row-end:3}.sm\:rt-r-gre-4{grid-row-end:4}.sm\:rt-r-gre-5{grid-row-end:5}.sm\:rt-r-gre-6{grid-row-end:6}.sm\:rt-r-gre-7{grid-row-end:7}.sm\:rt-r-gre-8{grid-row-end:8}.sm\:rt-r-gre-9{grid-row-end:9}}@media (min-width: 1024px){.md\:rt-r-gre{grid-row-end:var(--grid-row-end-md)}.md\:rt-r-gre-1{grid-row-end:1}.md\:rt-r-gre-2{grid-row-end:2}.md\:rt-r-gre-3{grid-row-end:3}.md\:rt-r-gre-4{grid-row-end:4}.md\:rt-r-gre-5{grid-row-end:5}.md\:rt-r-gre-6{grid-row-end:6}.md\:rt-r-gre-7{grid-row-end:7}.md\:rt-r-gre-8{grid-row-end:8}.md\:rt-r-gre-9{grid-row-end:9}}@media (min-width: 1280px){.lg\:rt-r-gre{grid-row-end:var(--grid-row-end-lg)}.lg\:rt-r-gre-1{grid-row-end:1}.lg\:rt-r-gre-2{grid-row-end:2}.lg\:rt-r-gre-3{grid-row-end:3}.lg\:rt-r-gre-4{grid-row-end:4}.lg\:rt-r-gre-5{grid-row-end:5}.lg\:rt-r-gre-6{grid-row-end:6}.lg\:rt-r-gre-7{grid-row-end:7}.lg\:rt-r-gre-8{grid-row-end:8}.lg\:rt-r-gre-9{grid-row-end:9}}@media (min-width: 1640px){.xl\:rt-r-gre{grid-row-end:var(--grid-row-end-xl)}.xl\:rt-r-gre-1{grid-row-end:1}.xl\:rt-r-gre-2{grid-row-end:2}.xl\:rt-r-gre-3{grid-row-end:3}.xl\:rt-r-gre-4{grid-row-end:4}.xl\:rt-r-gre-5{grid-row-end:5}.xl\:rt-r-gre-6{grid-row-end:6}.xl\:rt-r-gre-7{grid-row-end:7}.xl\:rt-r-gre-8{grid-row-end:8}.xl\:rt-r-gre-9{grid-row-end:9}}.rt-r-gta{grid-template-areas:var(--grid-template-areas)}@media (min-width: 520px){.xs\:rt-r-gta{grid-template-areas:var(--grid-template-areas-xs)}}@media (min-width: 768px){.sm\:rt-r-gta{grid-template-areas:var(--grid-template-areas-sm)}}@media (min-width: 1024px){.md\:rt-r-gta{grid-template-areas:var(--grid-template-areas-md)}}@media (min-width: 1280px){.lg\:rt-r-gta{grid-template-areas:var(--grid-template-areas-lg)}}@media (min-width: 1640px){.xl\:rt-r-gta{grid-template-areas:var(--grid-template-areas-xl)}}.rt-r-gtc{grid-template-columns:var(--grid-template-columns)}.rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}@media (min-width: 520px){.xs\:rt-r-gtc{grid-template-columns:var(--grid-template-columns-xs)}.xs\:rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.xs\:rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xs\:rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xs\:rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xs\:rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xs\:rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xs\:rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.xs\:rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.xs\:rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}}@media (min-width: 768px){.sm\:rt-r-gtc{grid-template-columns:var(--grid-template-columns-sm)}.sm\:rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.sm\:rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}}@media (min-width: 1024px){.md\:rt-r-gtc{grid-template-columns:var(--grid-template-columns-md)}.md\:rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.md\:rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}}@media (min-width: 1280px){.lg\:rt-r-gtc{grid-template-columns:var(--grid-template-columns-lg)}.lg\:rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.lg\:rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}}@media (min-width: 1640px){.xl\:rt-r-gtc{grid-template-columns:var(--grid-template-columns-xl)}.xl\:rt-r-gtc-1{grid-template-columns:minmax(0,1fr)}.xl\:rt-r-gtc-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:rt-r-gtc-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:rt-r-gtc-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:rt-r-gtc-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:rt-r-gtc-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:rt-r-gtc-7{grid-template-columns:repeat(7,minmax(0,1fr))}.xl\:rt-r-gtc-8{grid-template-columns:repeat(8,minmax(0,1fr))}.xl\:rt-r-gtc-9{grid-template-columns:repeat(9,minmax(0,1fr))}}.rt-r-gtr{grid-template-rows:var(--grid-template-rows)}.rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}@media (min-width: 520px){.xs\:rt-r-gtr{grid-template-rows:var(--grid-template-rows-xs)}.xs\:rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.xs\:rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.xs\:rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.xs\:rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.xs\:rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.xs\:rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.xs\:rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.xs\:rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.xs\:rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}}@media (min-width: 768px){.sm\:rt-r-gtr{grid-template-rows:var(--grid-template-rows-sm)}.sm\:rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.sm\:rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.sm\:rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.sm\:rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.sm\:rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.sm\:rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.sm\:rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.sm\:rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.sm\:rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}}@media (min-width: 1024px){.md\:rt-r-gtr{grid-template-rows:var(--grid-template-rows-md)}.md\:rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.md\:rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.md\:rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.md\:rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.md\:rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.md\:rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.md\:rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.md\:rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.md\:rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}}@media (min-width: 1280px){.lg\:rt-r-gtr{grid-template-rows:var(--grid-template-rows-lg)}.lg\:rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.lg\:rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.lg\:rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.lg\:rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.lg\:rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.lg\:rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.lg\:rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.lg\:rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.lg\:rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}}@media (min-width: 1640px){.xl\:rt-r-gtr{grid-template-rows:var(--grid-template-rows-xl)}.xl\:rt-r-gtr-1{grid-template-rows:minmax(0,1fr)}.xl\:rt-r-gtr-2{grid-template-rows:repeat(2,minmax(0,1fr))}.xl\:rt-r-gtr-3{grid-template-rows:repeat(3,minmax(0,1fr))}.xl\:rt-r-gtr-4{grid-template-rows:repeat(4,minmax(0,1fr))}.xl\:rt-r-gtr-5{grid-template-rows:repeat(5,minmax(0,1fr))}.xl\:rt-r-gtr-6{grid-template-rows:repeat(6,minmax(0,1fr))}.xl\:rt-r-gtr-7{grid-template-rows:repeat(7,minmax(0,1fr))}.xl\:rt-r-gtr-8{grid-template-rows:repeat(8,minmax(0,1fr))}.xl\:rt-r-gtr-9{grid-template-rows:repeat(9,minmax(0,1fr))}}.rt-r-h{height:var(--height)}@media (min-width: 520px){.xs\:rt-r-h{height:var(--height-xs)}}@media (min-width: 768px){.sm\:rt-r-h{height:var(--height-sm)}}@media (min-width: 1024px){.md\:rt-r-h{height:var(--height-md)}}@media (min-width: 1280px){.lg\:rt-r-h{height:var(--height-lg)}}@media (min-width: 1640px){.xl\:rt-r-h{height:var(--height-xl)}}.rt-r-min-h{min-height:var(--min-height)}@media (min-width: 520px){.xs\:rt-r-min-h{min-height:var(--min-height-xs)}}@media (min-width: 768px){.sm\:rt-r-min-h{min-height:var(--min-height-sm)}}@media (min-width: 1024px){.md\:rt-r-min-h{min-height:var(--min-height-md)}}@media (min-width: 1280px){.lg\:rt-r-min-h{min-height:var(--min-height-lg)}}@media (min-width: 1640px){.xl\:rt-r-min-h{min-height:var(--min-height-xl)}}.rt-r-max-h{max-height:var(--max-height)}@media (min-width: 520px){.xs\:rt-r-max-h{max-height:var(--max-height-xs)}}@media (min-width: 768px){.sm\:rt-r-max-h{max-height:var(--max-height-sm)}}@media (min-width: 1024px){.md\:rt-r-max-h{max-height:var(--max-height-md)}}@media (min-width: 1280px){.lg\:rt-r-max-h{max-height:var(--max-height-lg)}}@media (min-width: 1640px){.xl\:rt-r-max-h{max-height:var(--max-height-xl)}}.rt-r-inset{inset:var(--inset)}.rt-r-inset-0{top:0;right:0;bottom:0;left:0}.rt-r-inset-1{inset:var(--space-1)}.rt-r-inset-2{inset:var(--space-2)}.rt-r-inset-3{inset:var(--space-3)}.rt-r-inset-4{inset:var(--space-4)}.rt-r-inset-5{inset:var(--space-5)}.rt-r-inset-6{inset:var(--space-6)}.rt-r-inset-7{inset:var(--space-7)}.rt-r-inset-8{inset:var(--space-8)}.rt-r-inset-9{inset:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-inset{inset:var(--inset-xs)}.xs\:rt-r-inset-0{top:0;right:0;bottom:0;left:0}.xs\:rt-r-inset-1{inset:var(--space-1)}.xs\:rt-r-inset-2{inset:var(--space-2)}.xs\:rt-r-inset-3{inset:var(--space-3)}.xs\:rt-r-inset-4{inset:var(--space-4)}.xs\:rt-r-inset-5{inset:var(--space-5)}.xs\:rt-r-inset-6{inset:var(--space-6)}.xs\:rt-r-inset-7{inset:var(--space-7)}.xs\:rt-r-inset-8{inset:var(--space-8)}.xs\:rt-r-inset-9{inset:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-inset{inset:var(--inset-sm)}.sm\:rt-r-inset-0{top:0;right:0;bottom:0;left:0}.sm\:rt-r-inset-1{inset:var(--space-1)}.sm\:rt-r-inset-2{inset:var(--space-2)}.sm\:rt-r-inset-3{inset:var(--space-3)}.sm\:rt-r-inset-4{inset:var(--space-4)}.sm\:rt-r-inset-5{inset:var(--space-5)}.sm\:rt-r-inset-6{inset:var(--space-6)}.sm\:rt-r-inset-7{inset:var(--space-7)}.sm\:rt-r-inset-8{inset:var(--space-8)}.sm\:rt-r-inset-9{inset:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-inset{inset:var(--inset-md)}.md\:rt-r-inset-0{top:0;right:0;bottom:0;left:0}.md\:rt-r-inset-1{inset:var(--space-1)}.md\:rt-r-inset-2{inset:var(--space-2)}.md\:rt-r-inset-3{inset:var(--space-3)}.md\:rt-r-inset-4{inset:var(--space-4)}.md\:rt-r-inset-5{inset:var(--space-5)}.md\:rt-r-inset-6{inset:var(--space-6)}.md\:rt-r-inset-7{inset:var(--space-7)}.md\:rt-r-inset-8{inset:var(--space-8)}.md\:rt-r-inset-9{inset:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-inset{inset:var(--inset-lg)}.lg\:rt-r-inset-0{top:0;right:0;bottom:0;left:0}.lg\:rt-r-inset-1{inset:var(--space-1)}.lg\:rt-r-inset-2{inset:var(--space-2)}.lg\:rt-r-inset-3{inset:var(--space-3)}.lg\:rt-r-inset-4{inset:var(--space-4)}.lg\:rt-r-inset-5{inset:var(--space-5)}.lg\:rt-r-inset-6{inset:var(--space-6)}.lg\:rt-r-inset-7{inset:var(--space-7)}.lg\:rt-r-inset-8{inset:var(--space-8)}.lg\:rt-r-inset-9{inset:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-inset{inset:var(--inset-xl)}.xl\:rt-r-inset-0{top:0;right:0;bottom:0;left:0}.xl\:rt-r-inset-1{inset:var(--space-1)}.xl\:rt-r-inset-2{inset:var(--space-2)}.xl\:rt-r-inset-3{inset:var(--space-3)}.xl\:rt-r-inset-4{inset:var(--space-4)}.xl\:rt-r-inset-5{inset:var(--space-5)}.xl\:rt-r-inset-6{inset:var(--space-6)}.xl\:rt-r-inset-7{inset:var(--space-7)}.xl\:rt-r-inset-8{inset:var(--space-8)}.xl\:rt-r-inset-9{inset:var(--space-9)}}.rt-r-top{top:var(--top)}.rt-r-top-0{top:0}.rt-r-top-1{top:var(--space-1)}.rt-r-top-2{top:var(--space-2)}.rt-r-top-3{top:var(--space-3)}.rt-r-top-4{top:var(--space-4)}.rt-r-top-5{top:var(--space-5)}.rt-r-top-6{top:var(--space-6)}.rt-r-top-7{top:var(--space-7)}.rt-r-top-8{top:var(--space-8)}.rt-r-top-9{top:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-top{top:var(--top-xs)}.xs\:rt-r-top-0{top:0}.xs\:rt-r-top-1{top:var(--space-1)}.xs\:rt-r-top-2{top:var(--space-2)}.xs\:rt-r-top-3{top:var(--space-3)}.xs\:rt-r-top-4{top:var(--space-4)}.xs\:rt-r-top-5{top:var(--space-5)}.xs\:rt-r-top-6{top:var(--space-6)}.xs\:rt-r-top-7{top:var(--space-7)}.xs\:rt-r-top-8{top:var(--space-8)}.xs\:rt-r-top-9{top:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-top{top:var(--top-sm)}.sm\:rt-r-top-0{top:0}.sm\:rt-r-top-1{top:var(--space-1)}.sm\:rt-r-top-2{top:var(--space-2)}.sm\:rt-r-top-3{top:var(--space-3)}.sm\:rt-r-top-4{top:var(--space-4)}.sm\:rt-r-top-5{top:var(--space-5)}.sm\:rt-r-top-6{top:var(--space-6)}.sm\:rt-r-top-7{top:var(--space-7)}.sm\:rt-r-top-8{top:var(--space-8)}.sm\:rt-r-top-9{top:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-top{top:var(--top-md)}.md\:rt-r-top-0{top:0}.md\:rt-r-top-1{top:var(--space-1)}.md\:rt-r-top-2{top:var(--space-2)}.md\:rt-r-top-3{top:var(--space-3)}.md\:rt-r-top-4{top:var(--space-4)}.md\:rt-r-top-5{top:var(--space-5)}.md\:rt-r-top-6{top:var(--space-6)}.md\:rt-r-top-7{top:var(--space-7)}.md\:rt-r-top-8{top:var(--space-8)}.md\:rt-r-top-9{top:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-top{top:var(--top-lg)}.lg\:rt-r-top-0{top:0}.lg\:rt-r-top-1{top:var(--space-1)}.lg\:rt-r-top-2{top:var(--space-2)}.lg\:rt-r-top-3{top:var(--space-3)}.lg\:rt-r-top-4{top:var(--space-4)}.lg\:rt-r-top-5{top:var(--space-5)}.lg\:rt-r-top-6{top:var(--space-6)}.lg\:rt-r-top-7{top:var(--space-7)}.lg\:rt-r-top-8{top:var(--space-8)}.lg\:rt-r-top-9{top:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-top{top:var(--top-xl)}.xl\:rt-r-top-0{top:0}.xl\:rt-r-top-1{top:var(--space-1)}.xl\:rt-r-top-2{top:var(--space-2)}.xl\:rt-r-top-3{top:var(--space-3)}.xl\:rt-r-top-4{top:var(--space-4)}.xl\:rt-r-top-5{top:var(--space-5)}.xl\:rt-r-top-6{top:var(--space-6)}.xl\:rt-r-top-7{top:var(--space-7)}.xl\:rt-r-top-8{top:var(--space-8)}.xl\:rt-r-top-9{top:var(--space-9)}}.rt-r-right{right:var(--right)}.rt-r-right-0{right:0}.rt-r-right-1{right:var(--space-1)}.rt-r-right-2{right:var(--space-2)}.rt-r-right-3{right:var(--space-3)}.rt-r-right-4{right:var(--space-4)}.rt-r-right-5{right:var(--space-5)}.rt-r-right-6{right:var(--space-6)}.rt-r-right-7{right:var(--space-7)}.rt-r-right-8{right:var(--space-8)}.rt-r-right-9{right:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-right{right:var(--right-xs)}.xs\:rt-r-right-0{right:0}.xs\:rt-r-right-1{right:var(--space-1)}.xs\:rt-r-right-2{right:var(--space-2)}.xs\:rt-r-right-3{right:var(--space-3)}.xs\:rt-r-right-4{right:var(--space-4)}.xs\:rt-r-right-5{right:var(--space-5)}.xs\:rt-r-right-6{right:var(--space-6)}.xs\:rt-r-right-7{right:var(--space-7)}.xs\:rt-r-right-8{right:var(--space-8)}.xs\:rt-r-right-9{right:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-right{right:var(--right-sm)}.sm\:rt-r-right-0{right:0}.sm\:rt-r-right-1{right:var(--space-1)}.sm\:rt-r-right-2{right:var(--space-2)}.sm\:rt-r-right-3{right:var(--space-3)}.sm\:rt-r-right-4{right:var(--space-4)}.sm\:rt-r-right-5{right:var(--space-5)}.sm\:rt-r-right-6{right:var(--space-6)}.sm\:rt-r-right-7{right:var(--space-7)}.sm\:rt-r-right-8{right:var(--space-8)}.sm\:rt-r-right-9{right:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-right{right:var(--right-md)}.md\:rt-r-right-0{right:0}.md\:rt-r-right-1{right:var(--space-1)}.md\:rt-r-right-2{right:var(--space-2)}.md\:rt-r-right-3{right:var(--space-3)}.md\:rt-r-right-4{right:var(--space-4)}.md\:rt-r-right-5{right:var(--space-5)}.md\:rt-r-right-6{right:var(--space-6)}.md\:rt-r-right-7{right:var(--space-7)}.md\:rt-r-right-8{right:var(--space-8)}.md\:rt-r-right-9{right:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-right{right:var(--right-lg)}.lg\:rt-r-right-0{right:0}.lg\:rt-r-right-1{right:var(--space-1)}.lg\:rt-r-right-2{right:var(--space-2)}.lg\:rt-r-right-3{right:var(--space-3)}.lg\:rt-r-right-4{right:var(--space-4)}.lg\:rt-r-right-5{right:var(--space-5)}.lg\:rt-r-right-6{right:var(--space-6)}.lg\:rt-r-right-7{right:var(--space-7)}.lg\:rt-r-right-8{right:var(--space-8)}.lg\:rt-r-right-9{right:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-right{right:var(--right-xl)}.xl\:rt-r-right-0{right:0}.xl\:rt-r-right-1{right:var(--space-1)}.xl\:rt-r-right-2{right:var(--space-2)}.xl\:rt-r-right-3{right:var(--space-3)}.xl\:rt-r-right-4{right:var(--space-4)}.xl\:rt-r-right-5{right:var(--space-5)}.xl\:rt-r-right-6{right:var(--space-6)}.xl\:rt-r-right-7{right:var(--space-7)}.xl\:rt-r-right-8{right:var(--space-8)}.xl\:rt-r-right-9{right:var(--space-9)}}.rt-r-bottom{bottom:var(--bottom)}.rt-r-bottom-0{bottom:0}.rt-r-bottom-1{bottom:var(--space-1)}.rt-r-bottom-2{bottom:var(--space-2)}.rt-r-bottom-3{bottom:var(--space-3)}.rt-r-bottom-4{bottom:var(--space-4)}.rt-r-bottom-5{bottom:var(--space-5)}.rt-r-bottom-6{bottom:var(--space-6)}.rt-r-bottom-7{bottom:var(--space-7)}.rt-r-bottom-8{bottom:var(--space-8)}.rt-r-bottom-9{bottom:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-bottom{bottom:var(--bottom-xs)}.xs\:rt-r-bottom-0{bottom:0}.xs\:rt-r-bottom-1{bottom:var(--space-1)}.xs\:rt-r-bottom-2{bottom:var(--space-2)}.xs\:rt-r-bottom-3{bottom:var(--space-3)}.xs\:rt-r-bottom-4{bottom:var(--space-4)}.xs\:rt-r-bottom-5{bottom:var(--space-5)}.xs\:rt-r-bottom-6{bottom:var(--space-6)}.xs\:rt-r-bottom-7{bottom:var(--space-7)}.xs\:rt-r-bottom-8{bottom:var(--space-8)}.xs\:rt-r-bottom-9{bottom:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-bottom{bottom:var(--bottom-sm)}.sm\:rt-r-bottom-0{bottom:0}.sm\:rt-r-bottom-1{bottom:var(--space-1)}.sm\:rt-r-bottom-2{bottom:var(--space-2)}.sm\:rt-r-bottom-3{bottom:var(--space-3)}.sm\:rt-r-bottom-4{bottom:var(--space-4)}.sm\:rt-r-bottom-5{bottom:var(--space-5)}.sm\:rt-r-bottom-6{bottom:var(--space-6)}.sm\:rt-r-bottom-7{bottom:var(--space-7)}.sm\:rt-r-bottom-8{bottom:var(--space-8)}.sm\:rt-r-bottom-9{bottom:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-bottom{bottom:var(--bottom-md)}.md\:rt-r-bottom-0{bottom:0}.md\:rt-r-bottom-1{bottom:var(--space-1)}.md\:rt-r-bottom-2{bottom:var(--space-2)}.md\:rt-r-bottom-3{bottom:var(--space-3)}.md\:rt-r-bottom-4{bottom:var(--space-4)}.md\:rt-r-bottom-5{bottom:var(--space-5)}.md\:rt-r-bottom-6{bottom:var(--space-6)}.md\:rt-r-bottom-7{bottom:var(--space-7)}.md\:rt-r-bottom-8{bottom:var(--space-8)}.md\:rt-r-bottom-9{bottom:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-bottom{bottom:var(--bottom-lg)}.lg\:rt-r-bottom-0{bottom:0}.lg\:rt-r-bottom-1{bottom:var(--space-1)}.lg\:rt-r-bottom-2{bottom:var(--space-2)}.lg\:rt-r-bottom-3{bottom:var(--space-3)}.lg\:rt-r-bottom-4{bottom:var(--space-4)}.lg\:rt-r-bottom-5{bottom:var(--space-5)}.lg\:rt-r-bottom-6{bottom:var(--space-6)}.lg\:rt-r-bottom-7{bottom:var(--space-7)}.lg\:rt-r-bottom-8{bottom:var(--space-8)}.lg\:rt-r-bottom-9{bottom:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-bottom{bottom:var(--bottom-xl)}.xl\:rt-r-bottom-0{bottom:0}.xl\:rt-r-bottom-1{bottom:var(--space-1)}.xl\:rt-r-bottom-2{bottom:var(--space-2)}.xl\:rt-r-bottom-3{bottom:var(--space-3)}.xl\:rt-r-bottom-4{bottom:var(--space-4)}.xl\:rt-r-bottom-5{bottom:var(--space-5)}.xl\:rt-r-bottom-6{bottom:var(--space-6)}.xl\:rt-r-bottom-7{bottom:var(--space-7)}.xl\:rt-r-bottom-8{bottom:var(--space-8)}.xl\:rt-r-bottom-9{bottom:var(--space-9)}}.rt-r-left{left:var(--left)}.rt-r-left-0{left:0}.rt-r-left-1{left:var(--space-1)}.rt-r-left-2{left:var(--space-2)}.rt-r-left-3{left:var(--space-3)}.rt-r-left-4{left:var(--space-4)}.rt-r-left-5{left:var(--space-5)}.rt-r-left-6{left:var(--space-6)}.rt-r-left-7{left:var(--space-7)}.rt-r-left-8{left:var(--space-8)}.rt-r-left-9{left:var(--space-9)}@media (min-width: 520px){.xs\:rt-r-left{left:var(--left-xs)}.xs\:rt-r-left-0{left:0}.xs\:rt-r-left-1{left:var(--space-1)}.xs\:rt-r-left-2{left:var(--space-2)}.xs\:rt-r-left-3{left:var(--space-3)}.xs\:rt-r-left-4{left:var(--space-4)}.xs\:rt-r-left-5{left:var(--space-5)}.xs\:rt-r-left-6{left:var(--space-6)}.xs\:rt-r-left-7{left:var(--space-7)}.xs\:rt-r-left-8{left:var(--space-8)}.xs\:rt-r-left-9{left:var(--space-9)}}@media (min-width: 768px){.sm\:rt-r-left{left:var(--left-sm)}.sm\:rt-r-left-0{left:0}.sm\:rt-r-left-1{left:var(--space-1)}.sm\:rt-r-left-2{left:var(--space-2)}.sm\:rt-r-left-3{left:var(--space-3)}.sm\:rt-r-left-4{left:var(--space-4)}.sm\:rt-r-left-5{left:var(--space-5)}.sm\:rt-r-left-6{left:var(--space-6)}.sm\:rt-r-left-7{left:var(--space-7)}.sm\:rt-r-left-8{left:var(--space-8)}.sm\:rt-r-left-9{left:var(--space-9)}}@media (min-width: 1024px){.md\:rt-r-left{left:var(--left-md)}.md\:rt-r-left-0{left:0}.md\:rt-r-left-1{left:var(--space-1)}.md\:rt-r-left-2{left:var(--space-2)}.md\:rt-r-left-3{left:var(--space-3)}.md\:rt-r-left-4{left:var(--space-4)}.md\:rt-r-left-5{left:var(--space-5)}.md\:rt-r-left-6{left:var(--space-6)}.md\:rt-r-left-7{left:var(--space-7)}.md\:rt-r-left-8{left:var(--space-8)}.md\:rt-r-left-9{left:var(--space-9)}}@media (min-width: 1280px){.lg\:rt-r-left{left:var(--left-lg)}.lg\:rt-r-left-0{left:0}.lg\:rt-r-left-1{left:var(--space-1)}.lg\:rt-r-left-2{left:var(--space-2)}.lg\:rt-r-left-3{left:var(--space-3)}.lg\:rt-r-left-4{left:var(--space-4)}.lg\:rt-r-left-5{left:var(--space-5)}.lg\:rt-r-left-6{left:var(--space-6)}.lg\:rt-r-left-7{left:var(--space-7)}.lg\:rt-r-left-8{left:var(--space-8)}.lg\:rt-r-left-9{left:var(--space-9)}}@media (min-width: 1640px){.xl\:rt-r-left{left:var(--left-xl)}.xl\:rt-r-left-0{left:0}.xl\:rt-r-left-1{left:var(--space-1)}.xl\:rt-r-left-2{left:var(--space-2)}.xl\:rt-r-left-3{left:var(--space-3)}.xl\:rt-r-left-4{left:var(--space-4)}.xl\:rt-r-left-5{left:var(--space-5)}.xl\:rt-r-left-6{left:var(--space-6)}.xl\:rt-r-left-7{left:var(--space-7)}.xl\:rt-r-left-8{left:var(--space-8)}.xl\:rt-r-left-9{left:var(--space-9)}}.rt-r-jc-start{justify-content:flex-start}.rt-r-jc-center{justify-content:center}.rt-r-jc-end{justify-content:flex-end}.rt-r-jc-space-between{justify-content:space-between}@media (min-width: 520px){.xs\:rt-r-jc-start{justify-content:flex-start}.xs\:rt-r-jc-center{justify-content:center}.xs\:rt-r-jc-end{justify-content:flex-end}.xs\:rt-r-jc-space-between{justify-content:space-between}}@media (min-width: 768px){.sm\:rt-r-jc-start{justify-content:flex-start}.sm\:rt-r-jc-center{justify-content:center}.sm\:rt-r-jc-end{justify-content:flex-end}.sm\:rt-r-jc-space-between{justify-content:space-between}}@media (min-width: 1024px){.md\:rt-r-jc-start{justify-content:flex-start}.md\:rt-r-jc-center{justify-content:center}.md\:rt-r-jc-end{justify-content:flex-end}.md\:rt-r-jc-space-between{justify-content:space-between}}@media (min-width: 1280px){.lg\:rt-r-jc-start{justify-content:flex-start}.lg\:rt-r-jc-center{justify-content:center}.lg\:rt-r-jc-end{justify-content:flex-end}.lg\:rt-r-jc-space-between{justify-content:space-between}}@media (min-width: 1640px){.xl\:rt-r-jc-start{justify-content:flex-start}.xl\:rt-r-jc-center{justify-content:center}.xl\:rt-r-jc-end{justify-content:flex-end}.xl\:rt-r-jc-space-between{justify-content:space-between}}.rt-r-m,.rt-r-m-0,.rt-r-m-1,.rt-r-m-2,.rt-r-m-3,.rt-r-m-4,.rt-r-m-5,.rt-r-m-6,.rt-r-m-7,.rt-r-m-8,.rt-r-m-9,.-rt-r-m-1,.-rt-r-m-2,.-rt-r-m-3,.-rt-r-m-4,.-rt-r-m-5,.-rt-r-m-6,.-rt-r-m-7,.-rt-r-m-8,.-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.rt-r-m{--margin-top: var(--m);--margin-right: var(--m);--margin-bottom: var(--m);--margin-left: var(--m) }.rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-m,.xs\:rt-r-m-0,.xs\:rt-r-m-1,.xs\:rt-r-m-2,.xs\:rt-r-m-3,.xs\:rt-r-m-4,.xs\:rt-r-m-5,.xs\:rt-r-m-6,.xs\:rt-r-m-7,.xs\:rt-r-m-8,.xs\:rt-r-m-9,.xs\:-rt-r-m-1,.xs\:-rt-r-m-2,.xs\:-rt-r-m-3,.xs\:-rt-r-m-4,.xs\:-rt-r-m-5,.xs\:-rt-r-m-6,.xs\:-rt-r-m-7,.xs\:-rt-r-m-8,.xs\:-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.xs\:rt-r-m{--margin-top: var(--m-xs);--margin-right: var(--m-xs);--margin-bottom: var(--m-xs);--margin-left: var(--m-xs) }.xs\:rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.xs\:rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.xs\:rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.xs\:rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.xs\:rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.xs\:rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.xs\:rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.xs\:rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.xs\:rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.xs\:rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.xs\:-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.xs\:-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.xs\:-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.xs\:-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.xs\:-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.xs\:-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.xs\:-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.xs\:-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.xs\:-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-m,.sm\:rt-r-m-0,.sm\:rt-r-m-1,.sm\:rt-r-m-2,.sm\:rt-r-m-3,.sm\:rt-r-m-4,.sm\:rt-r-m-5,.sm\:rt-r-m-6,.sm\:rt-r-m-7,.sm\:rt-r-m-8,.sm\:rt-r-m-9,.sm\:-rt-r-m-1,.sm\:-rt-r-m-2,.sm\:-rt-r-m-3,.sm\:-rt-r-m-4,.sm\:-rt-r-m-5,.sm\:-rt-r-m-6,.sm\:-rt-r-m-7,.sm\:-rt-r-m-8,.sm\:-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.sm\:rt-r-m{--margin-top: var(--m-sm);--margin-right: var(--m-sm);--margin-bottom: var(--m-sm);--margin-left: var(--m-sm) }.sm\:rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.sm\:rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.sm\:rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.sm\:rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.sm\:rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.sm\:rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.sm\:rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.sm\:rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.sm\:rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.sm\:rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.sm\:-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.sm\:-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.sm\:-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.sm\:-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.sm\:-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.sm\:-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.sm\:-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.sm\:-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.sm\:-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-m,.md\:rt-r-m-0,.md\:rt-r-m-1,.md\:rt-r-m-2,.md\:rt-r-m-3,.md\:rt-r-m-4,.md\:rt-r-m-5,.md\:rt-r-m-6,.md\:rt-r-m-7,.md\:rt-r-m-8,.md\:rt-r-m-9,.md\:-rt-r-m-1,.md\:-rt-r-m-2,.md\:-rt-r-m-3,.md\:-rt-r-m-4,.md\:-rt-r-m-5,.md\:-rt-r-m-6,.md\:-rt-r-m-7,.md\:-rt-r-m-8,.md\:-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.md\:rt-r-m{--margin-top: var(--m-md);--margin-right: var(--m-md);--margin-bottom: var(--m-md);--margin-left: var(--m-md) }.md\:rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.md\:rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.md\:rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.md\:rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.md\:rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.md\:rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.md\:rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.md\:rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.md\:rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.md\:rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.md\:-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.md\:-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.md\:-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.md\:-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.md\:-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.md\:-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.md\:-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.md\:-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.md\:-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-m,.lg\:rt-r-m-0,.lg\:rt-r-m-1,.lg\:rt-r-m-2,.lg\:rt-r-m-3,.lg\:rt-r-m-4,.lg\:rt-r-m-5,.lg\:rt-r-m-6,.lg\:rt-r-m-7,.lg\:rt-r-m-8,.lg\:rt-r-m-9,.lg\:-rt-r-m-1,.lg\:-rt-r-m-2,.lg\:-rt-r-m-3,.lg\:-rt-r-m-4,.lg\:-rt-r-m-5,.lg\:-rt-r-m-6,.lg\:-rt-r-m-7,.lg\:-rt-r-m-8,.lg\:-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.lg\:rt-r-m{--margin-top: var(--m-lg);--margin-right: var(--m-lg);--margin-bottom: var(--m-lg);--margin-left: var(--m-lg) }.lg\:rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.lg\:rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.lg\:rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.lg\:rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.lg\:rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.lg\:rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.lg\:rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.lg\:rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.lg\:rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.lg\:rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.lg\:-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.lg\:-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.lg\:-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.lg\:-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.lg\:-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.lg\:-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.lg\:-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.lg\:-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.lg\:-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-m,.xl\:rt-r-m-0,.xl\:rt-r-m-1,.xl\:rt-r-m-2,.xl\:rt-r-m-3,.xl\:rt-r-m-4,.xl\:rt-r-m-5,.xl\:rt-r-m-6,.xl\:rt-r-m-7,.xl\:rt-r-m-8,.xl\:rt-r-m-9,.xl\:-rt-r-m-1,.xl\:-rt-r-m-2,.xl\:-rt-r-m-3,.xl\:-rt-r-m-4,.xl\:-rt-r-m-5,.xl\:-rt-r-m-6,.xl\:-rt-r-m-7,.xl\:-rt-r-m-8,.xl\:-rt-r-m-9{margin-top:var(--margin-top-override, var(--margin-top));margin-right:var(--margin-right-override, var(--margin-right));margin-bottom:var(--margin-bottom-override, var(--margin-bottom));margin-left:var(--margin-left-override, var(--margin-left))}.xl\:rt-r-m{--margin-top: var(--m-xl);--margin-right: var(--m-xl);--margin-bottom: var(--m-xl);--margin-left: var(--m-xl) }.xl\:rt-r-m-0{--margin-top: 0px;--margin-right: 0px;--margin-bottom: 0px;--margin-left: 0px}.xl\:rt-r-m-1{--margin-top: var(--space-1);--margin-right: var(--space-1);--margin-bottom: var(--space-1);--margin-left: var(--space-1)}.xl\:rt-r-m-2{--margin-top: var(--space-2);--margin-right: var(--space-2);--margin-bottom: var(--space-2);--margin-left: var(--space-2)}.xl\:rt-r-m-3{--margin-top: var(--space-3);--margin-right: var(--space-3);--margin-bottom: var(--space-3);--margin-left: var(--space-3)}.xl\:rt-r-m-4{--margin-top: var(--space-4);--margin-right: var(--space-4);--margin-bottom: var(--space-4);--margin-left: var(--space-4)}.xl\:rt-r-m-5{--margin-top: var(--space-5);--margin-right: var(--space-5);--margin-bottom: var(--space-5);--margin-left: var(--space-5)}.xl\:rt-r-m-6{--margin-top: var(--space-6);--margin-right: var(--space-6);--margin-bottom: var(--space-6);--margin-left: var(--space-6)}.xl\:rt-r-m-7{--margin-top: var(--space-7);--margin-right: var(--space-7);--margin-bottom: var(--space-7);--margin-left: var(--space-7)}.xl\:rt-r-m-8{--margin-top: var(--space-8);--margin-right: var(--space-8);--margin-bottom: var(--space-8);--margin-left: var(--space-8)}.xl\:rt-r-m-9{--margin-top: var(--space-9);--margin-right: var(--space-9);--margin-bottom: var(--space-9);--margin-left: var(--space-9)}.xl\:-rt-r-m-1{--margin-top: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1));--margin-left: calc(-1 * var(--space-1))}.xl\:-rt-r-m-2{--margin-top: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2));--margin-left: calc(-1 * var(--space-2))}.xl\:-rt-r-m-3{--margin-top: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3));--margin-left: calc(-1 * var(--space-3))}.xl\:-rt-r-m-4{--margin-top: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4));--margin-left: calc(-1 * var(--space-4))}.xl\:-rt-r-m-5{--margin-top: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5));--margin-left: calc(-1 * var(--space-5))}.xl\:-rt-r-m-6{--margin-top: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6));--margin-left: calc(-1 * var(--space-6))}.xl\:-rt-r-m-7{--margin-top: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7));--margin-left: calc(-1 * var(--space-7))}.xl\:-rt-r-m-8{--margin-top: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8));--margin-left: calc(-1 * var(--space-8))}.xl\:-rt-r-m-9{--margin-top: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9));--margin-left: calc(-1 * var(--space-9))}}.rt-r-mx,.rt-r-mx-0,.rt-r-mx-1,.rt-r-mx-2,.rt-r-mx-3,.rt-r-mx-4,.rt-r-mx-5,.rt-r-mx-6,.rt-r-mx-7,.rt-r-mx-8,.rt-r-mx-9,.-rt-r-mx-1,.-rt-r-mx-2,.-rt-r-mx-3,.-rt-r-mx-4,.-rt-r-mx-5,.-rt-r-mx-6,.-rt-r-mx-7,.-rt-r-mx-8,.-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.rt-r-mx{--margin-left: var(--ml);--margin-right: var(--mr) }.rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-mx,.xs\:rt-r-mx-0,.xs\:rt-r-mx-1,.xs\:rt-r-mx-2,.xs\:rt-r-mx-3,.xs\:rt-r-mx-4,.xs\:rt-r-mx-5,.xs\:rt-r-mx-6,.xs\:rt-r-mx-7,.xs\:rt-r-mx-8,.xs\:rt-r-mx-9,.xs\:-rt-r-mx-1,.xs\:-rt-r-mx-2,.xs\:-rt-r-mx-3,.xs\:-rt-r-mx-4,.xs\:-rt-r-mx-5,.xs\:-rt-r-mx-6,.xs\:-rt-r-mx-7,.xs\:-rt-r-mx-8,.xs\:-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.xs\:rt-r-mx{--margin-left: var(--ml-xs);--margin-right: var(--mr-xs) }.xs\:rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.xs\:rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.xs\:rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.xs\:rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.xs\:rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.xs\:rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.xs\:rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.xs\:rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.xs\:rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.xs\:rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.xs\:-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.xs\:-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.xs\:-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.xs\:-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.xs\:-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.xs\:-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.xs\:-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.xs\:-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.xs\:-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-mx,.sm\:rt-r-mx-0,.sm\:rt-r-mx-1,.sm\:rt-r-mx-2,.sm\:rt-r-mx-3,.sm\:rt-r-mx-4,.sm\:rt-r-mx-5,.sm\:rt-r-mx-6,.sm\:rt-r-mx-7,.sm\:rt-r-mx-8,.sm\:rt-r-mx-9,.sm\:-rt-r-mx-1,.sm\:-rt-r-mx-2,.sm\:-rt-r-mx-3,.sm\:-rt-r-mx-4,.sm\:-rt-r-mx-5,.sm\:-rt-r-mx-6,.sm\:-rt-r-mx-7,.sm\:-rt-r-mx-8,.sm\:-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.sm\:rt-r-mx{--margin-left: var(--ml-md);--margin-right: var(--mr-md) }.sm\:rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.sm\:rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.sm\:rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.sm\:rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.sm\:rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.sm\:rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.sm\:rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.sm\:rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.sm\:rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.sm\:rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.sm\:-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.sm\:-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.sm\:-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.sm\:-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.sm\:-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.sm\:-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.sm\:-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.sm\:-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.sm\:-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-mx,.md\:rt-r-mx-0,.md\:rt-r-mx-1,.md\:rt-r-mx-2,.md\:rt-r-mx-3,.md\:rt-r-mx-4,.md\:rt-r-mx-5,.md\:rt-r-mx-6,.md\:rt-r-mx-7,.md\:rt-r-mx-8,.md\:rt-r-mx-9,.md\:-rt-r-mx-1,.md\:-rt-r-mx-2,.md\:-rt-r-mx-3,.md\:-rt-r-mx-4,.md\:-rt-r-mx-5,.md\:-rt-r-mx-6,.md\:-rt-r-mx-7,.md\:-rt-r-mx-8,.md\:-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.md\:rt-r-mx{--margin-left: var(--ml-md);--margin-right: var(--mr-md) }.md\:rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.md\:rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.md\:rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.md\:rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.md\:rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.md\:rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.md\:rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.md\:rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.md\:rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.md\:rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.md\:-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.md\:-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.md\:-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.md\:-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.md\:-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.md\:-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.md\:-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.md\:-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.md\:-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-mx,.lg\:rt-r-mx-0,.lg\:rt-r-mx-1,.lg\:rt-r-mx-2,.lg\:rt-r-mx-3,.lg\:rt-r-mx-4,.lg\:rt-r-mx-5,.lg\:rt-r-mx-6,.lg\:rt-r-mx-7,.lg\:rt-r-mx-8,.lg\:rt-r-mx-9,.lg\:-rt-r-mx-1,.lg\:-rt-r-mx-2,.lg\:-rt-r-mx-3,.lg\:-rt-r-mx-4,.lg\:-rt-r-mx-5,.lg\:-rt-r-mx-6,.lg\:-rt-r-mx-7,.lg\:-rt-r-mx-8,.lg\:-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.lg\:rt-r-mx{--margin-left: var(--ml-lg);--margin-right: var(--mr-lg) }.lg\:rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.lg\:rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.lg\:rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.lg\:rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.lg\:rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.lg\:rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.lg\:rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.lg\:rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.lg\:rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.lg\:rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.lg\:-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.lg\:-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.lg\:-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.lg\:-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.lg\:-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.lg\:-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.lg\:-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.lg\:-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.lg\:-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-mx,.xl\:rt-r-mx-0,.xl\:rt-r-mx-1,.xl\:rt-r-mx-2,.xl\:rt-r-mx-3,.xl\:rt-r-mx-4,.xl\:rt-r-mx-5,.xl\:rt-r-mx-6,.xl\:rt-r-mx-7,.xl\:rt-r-mx-8,.xl\:rt-r-mx-9,.xl\:-rt-r-mx-1,.xl\:-rt-r-mx-2,.xl\:-rt-r-mx-3,.xl\:-rt-r-mx-4,.xl\:-rt-r-mx-5,.xl\:-rt-r-mx-6,.xl\:-rt-r-mx-7,.xl\:-rt-r-mx-8,.xl\:-rt-r-mx-9{margin-left:var(--margin-left-override, var(--margin-left));margin-right:var(--margin-right-override, var(--margin-right))}.xl\:rt-r-mx{--margin-left: var(--ml-xl);--margin-right: var(--mr-xl) }.xl\:rt-r-mx-0{--margin-left: 0px;--margin-right: 0px}.xl\:rt-r-mx-1{--margin-left: var(--space-1);--margin-right: var(--space-1)}.xl\:rt-r-mx-2{--margin-left: var(--space-2);--margin-right: var(--space-2)}.xl\:rt-r-mx-3{--margin-left: var(--space-3);--margin-right: var(--space-3)}.xl\:rt-r-mx-4{--margin-left: var(--space-4);--margin-right: var(--space-4)}.xl\:rt-r-mx-5{--margin-left: var(--space-5);--margin-right: var(--space-5)}.xl\:rt-r-mx-6{--margin-left: var(--space-6);--margin-right: var(--space-6)}.xl\:rt-r-mx-7{--margin-left: var(--space-7);--margin-right: var(--space-7)}.xl\:rt-r-mx-8{--margin-left: var(--space-8);--margin-right: var(--space-8)}.xl\:rt-r-mx-9{--margin-left: var(--space-9);--margin-right: var(--space-9)}.xl\:-rt-r-mx-1{--margin-left: calc(-1 * var(--space-1));--margin-right: calc(-1 * var(--space-1))}.xl\:-rt-r-mx-2{--margin-left: calc(-1 * var(--space-2));--margin-right: calc(-1 * var(--space-2))}.xl\:-rt-r-mx-3{--margin-left: calc(-1 * var(--space-3));--margin-right: calc(-1 * var(--space-3))}.xl\:-rt-r-mx-4{--margin-left: calc(-1 * var(--space-4));--margin-right: calc(-1 * var(--space-4))}.xl\:-rt-r-mx-5{--margin-left: calc(-1 * var(--space-5));--margin-right: calc(-1 * var(--space-5))}.xl\:-rt-r-mx-6{--margin-left: calc(-1 * var(--space-6));--margin-right: calc(-1 * var(--space-6))}.xl\:-rt-r-mx-7{--margin-left: calc(-1 * var(--space-7));--margin-right: calc(-1 * var(--space-7))}.xl\:-rt-r-mx-8{--margin-left: calc(-1 * var(--space-8));--margin-right: calc(-1 * var(--space-8))}.xl\:-rt-r-mx-9{--margin-left: calc(-1 * var(--space-9));--margin-right: calc(-1 * var(--space-9))}}.rt-r-my,.rt-r-my-0,.rt-r-my-1,.rt-r-my-2,.rt-r-my-3,.rt-r-my-4,.rt-r-my-5,.rt-r-my-6,.rt-r-my-7,.rt-r-my-8,.rt-r-my-9,.-rt-r-my-1,.-rt-r-my-2,.-rt-r-my-3,.-rt-r-my-4,.-rt-r-my-5,.-rt-r-my-6,.-rt-r-my-7,.-rt-r-my-8,.-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.rt-r-my{--margin-top: var(--mt);--margin-bottom: var(--mb) }.rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-my,.xs\:rt-r-my-0,.xs\:rt-r-my-1,.xs\:rt-r-my-2,.xs\:rt-r-my-3,.xs\:rt-r-my-4,.xs\:rt-r-my-5,.xs\:rt-r-my-6,.xs\:rt-r-my-7,.xs\:rt-r-my-8,.xs\:rt-r-my-9,.xs\:-rt-r-my-1,.xs\:-rt-r-my-2,.xs\:-rt-r-my-3,.xs\:-rt-r-my-4,.xs\:-rt-r-my-5,.xs\:-rt-r-my-6,.xs\:-rt-r-my-7,.xs\:-rt-r-my-8,.xs\:-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.xs\:rt-r-my{--margin-top: var(--mt-xs);--margin-bottom: var(--mb-xs) }.xs\:rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.xs\:rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.xs\:rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.xs\:rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.xs\:rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.xs\:rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.xs\:rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.xs\:rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.xs\:rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.xs\:rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.xs\:-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.xs\:-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.xs\:-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.xs\:-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.xs\:-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.xs\:-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.xs\:-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.xs\:-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.xs\:-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-my,.sm\:rt-r-my-0,.sm\:rt-r-my-1,.sm\:rt-r-my-2,.sm\:rt-r-my-3,.sm\:rt-r-my-4,.sm\:rt-r-my-5,.sm\:rt-r-my-6,.sm\:rt-r-my-7,.sm\:rt-r-my-8,.sm\:rt-r-my-9,.sm\:-rt-r-my-1,.sm\:-rt-r-my-2,.sm\:-rt-r-my-3,.sm\:-rt-r-my-4,.sm\:-rt-r-my-5,.sm\:-rt-r-my-6,.sm\:-rt-r-my-7,.sm\:-rt-r-my-8,.sm\:-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.sm\:rt-r-my{--margin-top: var(--mt-sm);--margin-bottom: var(--mb-sm) }.sm\:rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.sm\:rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.sm\:rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.sm\:rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.sm\:rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.sm\:rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.sm\:rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.sm\:rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.sm\:rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.sm\:rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.sm\:-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.sm\:-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.sm\:-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.sm\:-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.sm\:-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.sm\:-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.sm\:-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.sm\:-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.sm\:-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-my,.md\:rt-r-my-0,.md\:rt-r-my-1,.md\:rt-r-my-2,.md\:rt-r-my-3,.md\:rt-r-my-4,.md\:rt-r-my-5,.md\:rt-r-my-6,.md\:rt-r-my-7,.md\:rt-r-my-8,.md\:rt-r-my-9,.md\:-rt-r-my-1,.md\:-rt-r-my-2,.md\:-rt-r-my-3,.md\:-rt-r-my-4,.md\:-rt-r-my-5,.md\:-rt-r-my-6,.md\:-rt-r-my-7,.md\:-rt-r-my-8,.md\:-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.md\:rt-r-my{--margin-top: var(--mt-md);--margin-bottom: var(--mb-md) }.md\:rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.md\:rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.md\:rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.md\:rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.md\:rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.md\:rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.md\:rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.md\:rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.md\:rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.md\:rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.md\:-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.md\:-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.md\:-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.md\:-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.md\:-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.md\:-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.md\:-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.md\:-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.md\:-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-my,.lg\:rt-r-my-0,.lg\:rt-r-my-1,.lg\:rt-r-my-2,.lg\:rt-r-my-3,.lg\:rt-r-my-4,.lg\:rt-r-my-5,.lg\:rt-r-my-6,.lg\:rt-r-my-7,.lg\:rt-r-my-8,.lg\:rt-r-my-9,.lg\:-rt-r-my-1,.lg\:-rt-r-my-2,.lg\:-rt-r-my-3,.lg\:-rt-r-my-4,.lg\:-rt-r-my-5,.lg\:-rt-r-my-6,.lg\:-rt-r-my-7,.lg\:-rt-r-my-8,.lg\:-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.lg\:rt-r-my{--margin-top: var(--mt-lg);--margin-bottom: var(--mb-lg) }.lg\:rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.lg\:rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.lg\:rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.lg\:rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.lg\:rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.lg\:rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.lg\:rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.lg\:rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.lg\:rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.lg\:rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.lg\:-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.lg\:-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.lg\:-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.lg\:-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.lg\:-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.lg\:-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.lg\:-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.lg\:-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.lg\:-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-my,.xl\:rt-r-my-0,.xl\:rt-r-my-1,.xl\:rt-r-my-2,.xl\:rt-r-my-3,.xl\:rt-r-my-4,.xl\:rt-r-my-5,.xl\:rt-r-my-6,.xl\:rt-r-my-7,.xl\:rt-r-my-8,.xl\:rt-r-my-9,.xl\:-rt-r-my-1,.xl\:-rt-r-my-2,.xl\:-rt-r-my-3,.xl\:-rt-r-my-4,.xl\:-rt-r-my-5,.xl\:-rt-r-my-6,.xl\:-rt-r-my-7,.xl\:-rt-r-my-8,.xl\:-rt-r-my-9{margin-top:var(--margin-top-override, var(--margin-top));margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.xl\:rt-r-my{--margin-top: var(--mt-xl);--margin-bottom: var(--mb-xl) }.xl\:rt-r-my-0{--margin-top: 0px;--margin-bottom: 0px}.xl\:rt-r-my-1{--margin-top: var(--space-1);--margin-bottom: var(--space-1)}.xl\:rt-r-my-2{--margin-top: var(--space-2);--margin-bottom: var(--space-2)}.xl\:rt-r-my-3{--margin-top: var(--space-3);--margin-bottom: var(--space-3)}.xl\:rt-r-my-4{--margin-top: var(--space-4);--margin-bottom: var(--space-4)}.xl\:rt-r-my-5{--margin-top: var(--space-5);--margin-bottom: var(--space-5)}.xl\:rt-r-my-6{--margin-top: var(--space-6);--margin-bottom: var(--space-6)}.xl\:rt-r-my-7{--margin-top: var(--space-7);--margin-bottom: var(--space-7)}.xl\:rt-r-my-8{--margin-top: var(--space-8);--margin-bottom: var(--space-8)}.xl\:rt-r-my-9{--margin-top: var(--space-9);--margin-bottom: var(--space-9)}.xl\:-rt-r-my-1{--margin-top: calc(-1 * var(--space-1));--margin-bottom: calc(-1 * var(--space-1))}.xl\:-rt-r-my-2{--margin-top: calc(-1 * var(--space-2));--margin-bottom: calc(-1 * var(--space-2))}.xl\:-rt-r-my-3{--margin-top: calc(-1 * var(--space-3));--margin-bottom: calc(-1 * var(--space-3))}.xl\:-rt-r-my-4{--margin-top: calc(-1 * var(--space-4));--margin-bottom: calc(-1 * var(--space-4))}.xl\:-rt-r-my-5{--margin-top: calc(-1 * var(--space-5));--margin-bottom: calc(-1 * var(--space-5))}.xl\:-rt-r-my-6{--margin-top: calc(-1 * var(--space-6));--margin-bottom: calc(-1 * var(--space-6))}.xl\:-rt-r-my-7{--margin-top: calc(-1 * var(--space-7));--margin-bottom: calc(-1 * var(--space-7))}.xl\:-rt-r-my-8{--margin-top: calc(-1 * var(--space-8));--margin-bottom: calc(-1 * var(--space-8))}.xl\:-rt-r-my-9{--margin-top: calc(-1 * var(--space-9));--margin-bottom: calc(-1 * var(--space-9))}}.rt-r-mt,.rt-r-mt-0,.rt-r-mt-1,.rt-r-mt-2,.rt-r-mt-3,.rt-r-mt-4,.rt-r-mt-5,.rt-r-mt-6,.rt-r-mt-7,.rt-r-mt-8,.rt-r-mt-9,.-rt-r-mt-1,.-rt-r-mt-2,.-rt-r-mt-3,.-rt-r-mt-4,.-rt-r-mt-5,.-rt-r-mt-6,.-rt-r-mt-7,.-rt-r-mt-8,.-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.rt-r-mt{--margin-top: var(--mt) }.rt-r-mt-0{--margin-top: 0px}.rt-r-mt-1{--margin-top: var(--space-1)}.rt-r-mt-2{--margin-top: var(--space-2)}.rt-r-mt-3{--margin-top: var(--space-3)}.rt-r-mt-4{--margin-top: var(--space-4)}.rt-r-mt-5{--margin-top: var(--space-5)}.rt-r-mt-6{--margin-top: var(--space-6)}.rt-r-mt-7{--margin-top: var(--space-7)}.rt-r-mt-8{--margin-top: var(--space-8)}.rt-r-mt-9{--margin-top: var(--space-9)}.-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-mt,.xs\:rt-r-mt-0,.xs\:rt-r-mt-1,.xs\:rt-r-mt-2,.xs\:rt-r-mt-3,.xs\:rt-r-mt-4,.xs\:rt-r-mt-5,.xs\:rt-r-mt-6,.xs\:rt-r-mt-7,.xs\:rt-r-mt-8,.xs\:rt-r-mt-9,.xs\:-rt-r-mt-1,.xs\:-rt-r-mt-2,.xs\:-rt-r-mt-3,.xs\:-rt-r-mt-4,.xs\:-rt-r-mt-5,.xs\:-rt-r-mt-6,.xs\:-rt-r-mt-7,.xs\:-rt-r-mt-8,.xs\:-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.xs\:rt-r-mt{--margin-top: var(--mt-xs) }.xs\:rt-r-mt-0{--margin-top: 0px}.xs\:rt-r-mt-1{--margin-top: var(--space-1)}.xs\:rt-r-mt-2{--margin-top: var(--space-2)}.xs\:rt-r-mt-3{--margin-top: var(--space-3)}.xs\:rt-r-mt-4{--margin-top: var(--space-4)}.xs\:rt-r-mt-5{--margin-top: var(--space-5)}.xs\:rt-r-mt-6{--margin-top: var(--space-6)}.xs\:rt-r-mt-7{--margin-top: var(--space-7)}.xs\:rt-r-mt-8{--margin-top: var(--space-8)}.xs\:rt-r-mt-9{--margin-top: var(--space-9)}.xs\:-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.xs\:-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.xs\:-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.xs\:-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.xs\:-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.xs\:-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.xs\:-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.xs\:-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.xs\:-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-mt,.sm\:rt-r-mt-0,.sm\:rt-r-mt-1,.sm\:rt-r-mt-2,.sm\:rt-r-mt-3,.sm\:rt-r-mt-4,.sm\:rt-r-mt-5,.sm\:rt-r-mt-6,.sm\:rt-r-mt-7,.sm\:rt-r-mt-8,.sm\:rt-r-mt-9,.sm\:-rt-r-mt-1,.sm\:-rt-r-mt-2,.sm\:-rt-r-mt-3,.sm\:-rt-r-mt-4,.sm\:-rt-r-mt-5,.sm\:-rt-r-mt-6,.sm\:-rt-r-mt-7,.sm\:-rt-r-mt-8,.sm\:-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.sm\:rt-r-mt{--margin-top: var(--mt-sm) }.sm\:rt-r-mt-0{--margin-top: 0px}.sm\:rt-r-mt-1{--margin-top: var(--space-1)}.sm\:rt-r-mt-2{--margin-top: var(--space-2)}.sm\:rt-r-mt-3{--margin-top: var(--space-3)}.sm\:rt-r-mt-4{--margin-top: var(--space-4)}.sm\:rt-r-mt-5{--margin-top: var(--space-5)}.sm\:rt-r-mt-6{--margin-top: var(--space-6)}.sm\:rt-r-mt-7{--margin-top: var(--space-7)}.sm\:rt-r-mt-8{--margin-top: var(--space-8)}.sm\:rt-r-mt-9{--margin-top: var(--space-9)}.sm\:-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.sm\:-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.sm\:-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.sm\:-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.sm\:-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.sm\:-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.sm\:-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.sm\:-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.sm\:-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-mt,.md\:rt-r-mt-0,.md\:rt-r-mt-1,.md\:rt-r-mt-2,.md\:rt-r-mt-3,.md\:rt-r-mt-4,.md\:rt-r-mt-5,.md\:rt-r-mt-6,.md\:rt-r-mt-7,.md\:rt-r-mt-8,.md\:rt-r-mt-9,.md\:-rt-r-mt-1,.md\:-rt-r-mt-2,.md\:-rt-r-mt-3,.md\:-rt-r-mt-4,.md\:-rt-r-mt-5,.md\:-rt-r-mt-6,.md\:-rt-r-mt-7,.md\:-rt-r-mt-8,.md\:-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.md\:rt-r-mt{--margin-top: var(--mt-md) }.md\:rt-r-mt-0{--margin-top: 0px}.md\:rt-r-mt-1{--margin-top: var(--space-1)}.md\:rt-r-mt-2{--margin-top: var(--space-2)}.md\:rt-r-mt-3{--margin-top: var(--space-3)}.md\:rt-r-mt-4{--margin-top: var(--space-4)}.md\:rt-r-mt-5{--margin-top: var(--space-5)}.md\:rt-r-mt-6{--margin-top: var(--space-6)}.md\:rt-r-mt-7{--margin-top: var(--space-7)}.md\:rt-r-mt-8{--margin-top: var(--space-8)}.md\:rt-r-mt-9{--margin-top: var(--space-9)}.md\:-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.md\:-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.md\:-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.md\:-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.md\:-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.md\:-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.md\:-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.md\:-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.md\:-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-mt,.lg\:rt-r-mt-0,.lg\:rt-r-mt-1,.lg\:rt-r-mt-2,.lg\:rt-r-mt-3,.lg\:rt-r-mt-4,.lg\:rt-r-mt-5,.lg\:rt-r-mt-6,.lg\:rt-r-mt-7,.lg\:rt-r-mt-8,.lg\:rt-r-mt-9,.lg\:-rt-r-mt-1,.lg\:-rt-r-mt-2,.lg\:-rt-r-mt-3,.lg\:-rt-r-mt-4,.lg\:-rt-r-mt-5,.lg\:-rt-r-mt-6,.lg\:-rt-r-mt-7,.lg\:-rt-r-mt-8,.lg\:-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.lg\:rt-r-mt{--margin-top: var(--mt-lg) }.lg\:rt-r-mt-0{--margin-top: 0px}.lg\:rt-r-mt-1{--margin-top: var(--space-1)}.lg\:rt-r-mt-2{--margin-top: var(--space-2)}.lg\:rt-r-mt-3{--margin-top: var(--space-3)}.lg\:rt-r-mt-4{--margin-top: var(--space-4)}.lg\:rt-r-mt-5{--margin-top: var(--space-5)}.lg\:rt-r-mt-6{--margin-top: var(--space-6)}.lg\:rt-r-mt-7{--margin-top: var(--space-7)}.lg\:rt-r-mt-8{--margin-top: var(--space-8)}.lg\:rt-r-mt-9{--margin-top: var(--space-9)}.lg\:-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.lg\:-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.lg\:-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.lg\:-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.lg\:-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.lg\:-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.lg\:-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.lg\:-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.lg\:-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-mt,.xl\:rt-r-mt-0,.xl\:rt-r-mt-1,.xl\:rt-r-mt-2,.xl\:rt-r-mt-3,.xl\:rt-r-mt-4,.xl\:rt-r-mt-5,.xl\:rt-r-mt-6,.xl\:rt-r-mt-7,.xl\:rt-r-mt-8,.xl\:rt-r-mt-9,.xl\:-rt-r-mt-1,.xl\:-rt-r-mt-2,.xl\:-rt-r-mt-3,.xl\:-rt-r-mt-4,.xl\:-rt-r-mt-5,.xl\:-rt-r-mt-6,.xl\:-rt-r-mt-7,.xl\:-rt-r-mt-8,.xl\:-rt-r-mt-9{margin-top:var(--margin-top-override, var(--margin-top))}.xl\:rt-r-mt{--margin-top: var(--mt-xl) }.xl\:rt-r-mt-0{--margin-top: 0px}.xl\:rt-r-mt-1{--margin-top: var(--space-1)}.xl\:rt-r-mt-2{--margin-top: var(--space-2)}.xl\:rt-r-mt-3{--margin-top: var(--space-3)}.xl\:rt-r-mt-4{--margin-top: var(--space-4)}.xl\:rt-r-mt-5{--margin-top: var(--space-5)}.xl\:rt-r-mt-6{--margin-top: var(--space-6)}.xl\:rt-r-mt-7{--margin-top: var(--space-7)}.xl\:rt-r-mt-8{--margin-top: var(--space-8)}.xl\:rt-r-mt-9{--margin-top: var(--space-9)}.xl\:-rt-r-mt-1{--margin-top: calc(-1 * var(--space-1))}.xl\:-rt-r-mt-2{--margin-top: calc(-1 * var(--space-2))}.xl\:-rt-r-mt-3{--margin-top: calc(-1 * var(--space-3))}.xl\:-rt-r-mt-4{--margin-top: calc(-1 * var(--space-4))}.xl\:-rt-r-mt-5{--margin-top: calc(-1 * var(--space-5))}.xl\:-rt-r-mt-6{--margin-top: calc(-1 * var(--space-6))}.xl\:-rt-r-mt-7{--margin-top: calc(-1 * var(--space-7))}.xl\:-rt-r-mt-8{--margin-top: calc(-1 * var(--space-8))}.xl\:-rt-r-mt-9{--margin-top: calc(-1 * var(--space-9))}}.rt-r-mr,.rt-r-mr-0,.rt-r-mr-1,.rt-r-mr-2,.rt-r-mr-3,.rt-r-mr-4,.rt-r-mr-5,.rt-r-mr-6,.rt-r-mr-7,.rt-r-mr-8,.rt-r-mr-9,.-rt-r-mr-1,.-rt-r-mr-2,.-rt-r-mr-3,.-rt-r-mr-4,.-rt-r-mr-5,.-rt-r-mr-6,.-rt-r-mr-7,.-rt-r-mr-8,.-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.rt-r-mr{--margin-right: var(--mr) }.rt-r-mr-0{--margin-right: 0px}.rt-r-mr-1{--margin-right: var(--space-1)}.rt-r-mr-2{--margin-right: var(--space-2)}.rt-r-mr-3{--margin-right: var(--space-3)}.rt-r-mr-4{--margin-right: var(--space-4)}.rt-r-mr-5{--margin-right: var(--space-5)}.rt-r-mr-6{--margin-right: var(--space-6)}.rt-r-mr-7{--margin-right: var(--space-7)}.rt-r-mr-8{--margin-right: var(--space-8)}.rt-r-mr-9{--margin-right: var(--space-9)}.-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-mr,.xs\:rt-r-mr-0,.xs\:rt-r-mr-1,.xs\:rt-r-mr-2,.xs\:rt-r-mr-3,.xs\:rt-r-mr-4,.xs\:rt-r-mr-5,.xs\:rt-r-mr-6,.xs\:rt-r-mr-7,.xs\:rt-r-mr-8,.xs\:rt-r-mr-9,.xs\:-rt-r-mr-1,.xs\:-rt-r-mr-2,.xs\:-rt-r-mr-3,.xs\:-rt-r-mr-4,.xs\:-rt-r-mr-5,.xs\:-rt-r-mr-6,.xs\:-rt-r-mr-7,.xs\:-rt-r-mr-8,.xs\:-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.xs\:rt-r-mr{--margin-right: var(--mr-xs) }.xs\:rt-r-mr-0{--margin-right: 0px}.xs\:rt-r-mr-1{--margin-right: var(--space-1)}.xs\:rt-r-mr-2{--margin-right: var(--space-2)}.xs\:rt-r-mr-3{--margin-right: var(--space-3)}.xs\:rt-r-mr-4{--margin-right: var(--space-4)}.xs\:rt-r-mr-5{--margin-right: var(--space-5)}.xs\:rt-r-mr-6{--margin-right: var(--space-6)}.xs\:rt-r-mr-7{--margin-right: var(--space-7)}.xs\:rt-r-mr-8{--margin-right: var(--space-8)}.xs\:rt-r-mr-9{--margin-right: var(--space-9)}.xs\:-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.xs\:-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.xs\:-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.xs\:-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.xs\:-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.xs\:-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.xs\:-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.xs\:-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.xs\:-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-mr,.sm\:rt-r-mr-0,.sm\:rt-r-mr-1,.sm\:rt-r-mr-2,.sm\:rt-r-mr-3,.sm\:rt-r-mr-4,.sm\:rt-r-mr-5,.sm\:rt-r-mr-6,.sm\:rt-r-mr-7,.sm\:rt-r-mr-8,.sm\:rt-r-mr-9,.sm\:-rt-r-mr-1,.sm\:-rt-r-mr-2,.sm\:-rt-r-mr-3,.sm\:-rt-r-mr-4,.sm\:-rt-r-mr-5,.sm\:-rt-r-mr-6,.sm\:-rt-r-mr-7,.sm\:-rt-r-mr-8,.sm\:-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.sm\:rt-r-mr{--margin-right: var(--mr-sm) }.sm\:rt-r-mr-0{--margin-right: 0px}.sm\:rt-r-mr-1{--margin-right: var(--space-1)}.sm\:rt-r-mr-2{--margin-right: var(--space-2)}.sm\:rt-r-mr-3{--margin-right: var(--space-3)}.sm\:rt-r-mr-4{--margin-right: var(--space-4)}.sm\:rt-r-mr-5{--margin-right: var(--space-5)}.sm\:rt-r-mr-6{--margin-right: var(--space-6)}.sm\:rt-r-mr-7{--margin-right: var(--space-7)}.sm\:rt-r-mr-8{--margin-right: var(--space-8)}.sm\:rt-r-mr-9{--margin-right: var(--space-9)}.sm\:-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.sm\:-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.sm\:-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.sm\:-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.sm\:-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.sm\:-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.sm\:-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.sm\:-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.sm\:-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-mr,.md\:rt-r-mr-0,.md\:rt-r-mr-1,.md\:rt-r-mr-2,.md\:rt-r-mr-3,.md\:rt-r-mr-4,.md\:rt-r-mr-5,.md\:rt-r-mr-6,.md\:rt-r-mr-7,.md\:rt-r-mr-8,.md\:rt-r-mr-9,.md\:-rt-r-mr-1,.md\:-rt-r-mr-2,.md\:-rt-r-mr-3,.md\:-rt-r-mr-4,.md\:-rt-r-mr-5,.md\:-rt-r-mr-6,.md\:-rt-r-mr-7,.md\:-rt-r-mr-8,.md\:-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.md\:rt-r-mr{--margin-right: var(--mr-md) }.md\:rt-r-mr-0{--margin-right: 0px}.md\:rt-r-mr-1{--margin-right: var(--space-1)}.md\:rt-r-mr-2{--margin-right: var(--space-2)}.md\:rt-r-mr-3{--margin-right: var(--space-3)}.md\:rt-r-mr-4{--margin-right: var(--space-4)}.md\:rt-r-mr-5{--margin-right: var(--space-5)}.md\:rt-r-mr-6{--margin-right: var(--space-6)}.md\:rt-r-mr-7{--margin-right: var(--space-7)}.md\:rt-r-mr-8{--margin-right: var(--space-8)}.md\:rt-r-mr-9{--margin-right: var(--space-9)}.md\:-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.md\:-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.md\:-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.md\:-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.md\:-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.md\:-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.md\:-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.md\:-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.md\:-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-mr,.lg\:rt-r-mr-0,.lg\:rt-r-mr-1,.lg\:rt-r-mr-2,.lg\:rt-r-mr-3,.lg\:rt-r-mr-4,.lg\:rt-r-mr-5,.lg\:rt-r-mr-6,.lg\:rt-r-mr-7,.lg\:rt-r-mr-8,.lg\:rt-r-mr-9,.lg\:-rt-r-mr-1,.lg\:-rt-r-mr-2,.lg\:-rt-r-mr-3,.lg\:-rt-r-mr-4,.lg\:-rt-r-mr-5,.lg\:-rt-r-mr-6,.lg\:-rt-r-mr-7,.lg\:-rt-r-mr-8,.lg\:-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.lg\:rt-r-mr{--margin-right: var(--mr-lg) }.lg\:rt-r-mr-0{--margin-right: 0px}.lg\:rt-r-mr-1{--margin-right: var(--space-1)}.lg\:rt-r-mr-2{--margin-right: var(--space-2)}.lg\:rt-r-mr-3{--margin-right: var(--space-3)}.lg\:rt-r-mr-4{--margin-right: var(--space-4)}.lg\:rt-r-mr-5{--margin-right: var(--space-5)}.lg\:rt-r-mr-6{--margin-right: var(--space-6)}.lg\:rt-r-mr-7{--margin-right: var(--space-7)}.lg\:rt-r-mr-8{--margin-right: var(--space-8)}.lg\:rt-r-mr-9{--margin-right: var(--space-9)}.lg\:-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.lg\:-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.lg\:-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.lg\:-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.lg\:-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.lg\:-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.lg\:-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.lg\:-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.lg\:-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-mr,.xl\:rt-r-mr-0,.xl\:rt-r-mr-1,.xl\:rt-r-mr-2,.xl\:rt-r-mr-3,.xl\:rt-r-mr-4,.xl\:rt-r-mr-5,.xl\:rt-r-mr-6,.xl\:rt-r-mr-7,.xl\:rt-r-mr-8,.xl\:rt-r-mr-9,.xl\:-rt-r-mr-1,.xl\:-rt-r-mr-2,.xl\:-rt-r-mr-3,.xl\:-rt-r-mr-4,.xl\:-rt-r-mr-5,.xl\:-rt-r-mr-6,.xl\:-rt-r-mr-7,.xl\:-rt-r-mr-8,.xl\:-rt-r-mr-9{margin-right:var(--margin-right-override, var(--margin-right))}.xl\:rt-r-mr{--margin-right: var(--mr-xl) }.xl\:rt-r-mr-0{--margin-right: 0px}.xl\:rt-r-mr-1{--margin-right: var(--space-1)}.xl\:rt-r-mr-2{--margin-right: var(--space-2)}.xl\:rt-r-mr-3{--margin-right: var(--space-3)}.xl\:rt-r-mr-4{--margin-right: var(--space-4)}.xl\:rt-r-mr-5{--margin-right: var(--space-5)}.xl\:rt-r-mr-6{--margin-right: var(--space-6)}.xl\:rt-r-mr-7{--margin-right: var(--space-7)}.xl\:rt-r-mr-8{--margin-right: var(--space-8)}.xl\:rt-r-mr-9{--margin-right: var(--space-9)}.xl\:-rt-r-mr-1{--margin-right: calc(-1 * var(--space-1))}.xl\:-rt-r-mr-2{--margin-right: calc(-1 * var(--space-2))}.xl\:-rt-r-mr-3{--margin-right: calc(-1 * var(--space-3))}.xl\:-rt-r-mr-4{--margin-right: calc(-1 * var(--space-4))}.xl\:-rt-r-mr-5{--margin-right: calc(-1 * var(--space-5))}.xl\:-rt-r-mr-6{--margin-right: calc(-1 * var(--space-6))}.xl\:-rt-r-mr-7{--margin-right: calc(-1 * var(--space-7))}.xl\:-rt-r-mr-8{--margin-right: calc(-1 * var(--space-8))}.xl\:-rt-r-mr-9{--margin-right: calc(-1 * var(--space-9))}}.rt-r-mb,.rt-r-mb-0,.rt-r-mb-1,.rt-r-mb-2,.rt-r-mb-3,.rt-r-mb-4,.rt-r-mb-5,.rt-r-mb-6,.rt-r-mb-7,.rt-r-mb-8,.rt-r-mb-9,.-rt-r-mb-1,.-rt-r-mb-2,.-rt-r-mb-3,.-rt-r-mb-4,.-rt-r-mb-5,.-rt-r-mb-6,.-rt-r-mb-7,.-rt-r-mb-8,.-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.rt-r-mb{--margin-bottom: var(--mb) }.rt-r-mb-0{--margin-bottom: 0px}.rt-r-mb-1{--margin-bottom: var(--space-1)}.rt-r-mb-2{--margin-bottom: var(--space-2)}.rt-r-mb-3{--margin-bottom: var(--space-3)}.rt-r-mb-4{--margin-bottom: var(--space-4)}.rt-r-mb-5{--margin-bottom: var(--space-5)}.rt-r-mb-6{--margin-bottom: var(--space-6)}.rt-r-mb-7{--margin-bottom: var(--space-7)}.rt-r-mb-8{--margin-bottom: var(--space-8)}.rt-r-mb-9{--margin-bottom: var(--space-9)}.-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-mb,.xs\:rt-r-mb-0,.xs\:rt-r-mb-1,.xs\:rt-r-mb-2,.xs\:rt-r-mb-3,.xs\:rt-r-mb-4,.xs\:rt-r-mb-5,.xs\:rt-r-mb-6,.xs\:rt-r-mb-7,.xs\:rt-r-mb-8,.xs\:rt-r-mb-9,.xs\:-rt-r-mb-1,.xs\:-rt-r-mb-2,.xs\:-rt-r-mb-3,.xs\:-rt-r-mb-4,.xs\:-rt-r-mb-5,.xs\:-rt-r-mb-6,.xs\:-rt-r-mb-7,.xs\:-rt-r-mb-8,.xs\:-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.xs\:rt-r-mb{--margin-bottom: var(--mb-xs) }.xs\:rt-r-mb-0{--margin-bottom: 0px}.xs\:rt-r-mb-1{--margin-bottom: var(--space-1)}.xs\:rt-r-mb-2{--margin-bottom: var(--space-2)}.xs\:rt-r-mb-3{--margin-bottom: var(--space-3)}.xs\:rt-r-mb-4{--margin-bottom: var(--space-4)}.xs\:rt-r-mb-5{--margin-bottom: var(--space-5)}.xs\:rt-r-mb-6{--margin-bottom: var(--space-6)}.xs\:rt-r-mb-7{--margin-bottom: var(--space-7)}.xs\:rt-r-mb-8{--margin-bottom: var(--space-8)}.xs\:rt-r-mb-9{--margin-bottom: var(--space-9)}.xs\:-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.xs\:-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.xs\:-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.xs\:-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.xs\:-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.xs\:-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.xs\:-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.xs\:-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.xs\:-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-mb,.sm\:rt-r-mb-0,.sm\:rt-r-mb-1,.sm\:rt-r-mb-2,.sm\:rt-r-mb-3,.sm\:rt-r-mb-4,.sm\:rt-r-mb-5,.sm\:rt-r-mb-6,.sm\:rt-r-mb-7,.sm\:rt-r-mb-8,.sm\:rt-r-mb-9,.sm\:-rt-r-mb-1,.sm\:-rt-r-mb-2,.sm\:-rt-r-mb-3,.sm\:-rt-r-mb-4,.sm\:-rt-r-mb-5,.sm\:-rt-r-mb-6,.sm\:-rt-r-mb-7,.sm\:-rt-r-mb-8,.sm\:-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.sm\:rt-r-mb{--margin-bottom: var(--mb-sm) }.sm\:rt-r-mb-0{--margin-bottom: 0px}.sm\:rt-r-mb-1{--margin-bottom: var(--space-1)}.sm\:rt-r-mb-2{--margin-bottom: var(--space-2)}.sm\:rt-r-mb-3{--margin-bottom: var(--space-3)}.sm\:rt-r-mb-4{--margin-bottom: var(--space-4)}.sm\:rt-r-mb-5{--margin-bottom: var(--space-5)}.sm\:rt-r-mb-6{--margin-bottom: var(--space-6)}.sm\:rt-r-mb-7{--margin-bottom: var(--space-7)}.sm\:rt-r-mb-8{--margin-bottom: var(--space-8)}.sm\:rt-r-mb-9{--margin-bottom: var(--space-9)}.sm\:-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.sm\:-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.sm\:-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.sm\:-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.sm\:-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.sm\:-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.sm\:-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.sm\:-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.sm\:-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-mb,.md\:rt-r-mb-0,.md\:rt-r-mb-1,.md\:rt-r-mb-2,.md\:rt-r-mb-3,.md\:rt-r-mb-4,.md\:rt-r-mb-5,.md\:rt-r-mb-6,.md\:rt-r-mb-7,.md\:rt-r-mb-8,.md\:rt-r-mb-9,.md\:-rt-r-mb-1,.md\:-rt-r-mb-2,.md\:-rt-r-mb-3,.md\:-rt-r-mb-4,.md\:-rt-r-mb-5,.md\:-rt-r-mb-6,.md\:-rt-r-mb-7,.md\:-rt-r-mb-8,.md\:-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.md\:rt-r-mb{--margin-bottom: var(--mb-md) }.md\:rt-r-mb-0{--margin-bottom: 0px}.md\:rt-r-mb-1{--margin-bottom: var(--space-1)}.md\:rt-r-mb-2{--margin-bottom: var(--space-2)}.md\:rt-r-mb-3{--margin-bottom: var(--space-3)}.md\:rt-r-mb-4{--margin-bottom: var(--space-4)}.md\:rt-r-mb-5{--margin-bottom: var(--space-5)}.md\:rt-r-mb-6{--margin-bottom: var(--space-6)}.md\:rt-r-mb-7{--margin-bottom: var(--space-7)}.md\:rt-r-mb-8{--margin-bottom: var(--space-8)}.md\:rt-r-mb-9{--margin-bottom: var(--space-9)}.md\:-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.md\:-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.md\:-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.md\:-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.md\:-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.md\:-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.md\:-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.md\:-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.md\:-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-mb,.lg\:rt-r-mb-0,.lg\:rt-r-mb-1,.lg\:rt-r-mb-2,.lg\:rt-r-mb-3,.lg\:rt-r-mb-4,.lg\:rt-r-mb-5,.lg\:rt-r-mb-6,.lg\:rt-r-mb-7,.lg\:rt-r-mb-8,.lg\:rt-r-mb-9,.lg\:-rt-r-mb-1,.lg\:-rt-r-mb-2,.lg\:-rt-r-mb-3,.lg\:-rt-r-mb-4,.lg\:-rt-r-mb-5,.lg\:-rt-r-mb-6,.lg\:-rt-r-mb-7,.lg\:-rt-r-mb-8,.lg\:-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.lg\:rt-r-mb{--margin-bottom: var(--mb-lg) }.lg\:rt-r-mb-0{--margin-bottom: 0px}.lg\:rt-r-mb-1{--margin-bottom: var(--space-1)}.lg\:rt-r-mb-2{--margin-bottom: var(--space-2)}.lg\:rt-r-mb-3{--margin-bottom: var(--space-3)}.lg\:rt-r-mb-4{--margin-bottom: var(--space-4)}.lg\:rt-r-mb-5{--margin-bottom: var(--space-5)}.lg\:rt-r-mb-6{--margin-bottom: var(--space-6)}.lg\:rt-r-mb-7{--margin-bottom: var(--space-7)}.lg\:rt-r-mb-8{--margin-bottom: var(--space-8)}.lg\:rt-r-mb-9{--margin-bottom: var(--space-9)}.lg\:-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.lg\:-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.lg\:-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.lg\:-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.lg\:-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.lg\:-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.lg\:-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.lg\:-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.lg\:-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-mb,.xl\:rt-r-mb-0,.xl\:rt-r-mb-1,.xl\:rt-r-mb-2,.xl\:rt-r-mb-3,.xl\:rt-r-mb-4,.xl\:rt-r-mb-5,.xl\:rt-r-mb-6,.xl\:rt-r-mb-7,.xl\:rt-r-mb-8,.xl\:rt-r-mb-9,.xl\:-rt-r-mb-1,.xl\:-rt-r-mb-2,.xl\:-rt-r-mb-3,.xl\:-rt-r-mb-4,.xl\:-rt-r-mb-5,.xl\:-rt-r-mb-6,.xl\:-rt-r-mb-7,.xl\:-rt-r-mb-8,.xl\:-rt-r-mb-9{margin-bottom:var(--margin-bottom-override, var(--margin-bottom))}.xl\:rt-r-mb{--margin-bottom: var(--mb-xl) }.xl\:rt-r-mb-0{--margin-bottom: 0px}.xl\:rt-r-mb-1{--margin-bottom: var(--space-1)}.xl\:rt-r-mb-2{--margin-bottom: var(--space-2)}.xl\:rt-r-mb-3{--margin-bottom: var(--space-3)}.xl\:rt-r-mb-4{--margin-bottom: var(--space-4)}.xl\:rt-r-mb-5{--margin-bottom: var(--space-5)}.xl\:rt-r-mb-6{--margin-bottom: var(--space-6)}.xl\:rt-r-mb-7{--margin-bottom: var(--space-7)}.xl\:rt-r-mb-8{--margin-bottom: var(--space-8)}.xl\:rt-r-mb-9{--margin-bottom: var(--space-9)}.xl\:-rt-r-mb-1{--margin-bottom: calc(-1 * var(--space-1))}.xl\:-rt-r-mb-2{--margin-bottom: calc(-1 * var(--space-2))}.xl\:-rt-r-mb-3{--margin-bottom: calc(-1 * var(--space-3))}.xl\:-rt-r-mb-4{--margin-bottom: calc(-1 * var(--space-4))}.xl\:-rt-r-mb-5{--margin-bottom: calc(-1 * var(--space-5))}.xl\:-rt-r-mb-6{--margin-bottom: calc(-1 * var(--space-6))}.xl\:-rt-r-mb-7{--margin-bottom: calc(-1 * var(--space-7))}.xl\:-rt-r-mb-8{--margin-bottom: calc(-1 * var(--space-8))}.xl\:-rt-r-mb-9{--margin-bottom: calc(-1 * var(--space-9))}}.rt-r-ml,.rt-r-ml-0,.rt-r-ml-1,.rt-r-ml-2,.rt-r-ml-3,.rt-r-ml-4,.rt-r-ml-5,.rt-r-ml-6,.rt-r-ml-7,.rt-r-ml-8,.rt-r-ml-9,.-rt-r-ml-1,.-rt-r-ml-2,.-rt-r-ml-3,.-rt-r-ml-4,.-rt-r-ml-5,.-rt-r-ml-6,.-rt-r-ml-7,.-rt-r-ml-8,.-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.rt-r-ml{--margin-left: var(--ml) }.rt-r-ml-0{--margin-left: 0px}.rt-r-ml-1{--margin-left: var(--space-1)}.rt-r-ml-2{--margin-left: var(--space-2)}.rt-r-ml-3{--margin-left: var(--space-3)}.rt-r-ml-4{--margin-left: var(--space-4)}.rt-r-ml-5{--margin-left: var(--space-5)}.rt-r-ml-6{--margin-left: var(--space-6)}.rt-r-ml-7{--margin-left: var(--space-7)}.rt-r-ml-8{--margin-left: var(--space-8)}.rt-r-ml-9{--margin-left: var(--space-9)}.-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}@media (min-width: 520px){.xs\:rt-r-ml,.xs\:rt-r-ml-0,.xs\:rt-r-ml-1,.xs\:rt-r-ml-2,.xs\:rt-r-ml-3,.xs\:rt-r-ml-4,.xs\:rt-r-ml-5,.xs\:rt-r-ml-6,.xs\:rt-r-ml-7,.xs\:rt-r-ml-8,.xs\:rt-r-ml-9,.xs\:-rt-r-ml-1,.xs\:-rt-r-ml-2,.xs\:-rt-r-ml-3,.xs\:-rt-r-ml-4,.xs\:-rt-r-ml-5,.xs\:-rt-r-ml-6,.xs\:-rt-r-ml-7,.xs\:-rt-r-ml-8,.xs\:-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.xs\:rt-r-ml{--margin-left: var(--ml-xs) }.xs\:rt-r-ml-0{--margin-left: 0px}.xs\:rt-r-ml-1{--margin-left: var(--space-1)}.xs\:rt-r-ml-2{--margin-left: var(--space-2)}.xs\:rt-r-ml-3{--margin-left: var(--space-3)}.xs\:rt-r-ml-4{--margin-left: var(--space-4)}.xs\:rt-r-ml-5{--margin-left: var(--space-5)}.xs\:rt-r-ml-6{--margin-left: var(--space-6)}.xs\:rt-r-ml-7{--margin-left: var(--space-7)}.xs\:rt-r-ml-8{--margin-left: var(--space-8)}.xs\:rt-r-ml-9{--margin-left: var(--space-9)}.xs\:-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.xs\:-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.xs\:-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.xs\:-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.xs\:-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.xs\:-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.xs\:-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.xs\:-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.xs\:-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 768px){.sm\:rt-r-ml,.sm\:rt-r-ml-0,.sm\:rt-r-ml-1,.sm\:rt-r-ml-2,.sm\:rt-r-ml-3,.sm\:rt-r-ml-4,.sm\:rt-r-ml-5,.sm\:rt-r-ml-6,.sm\:rt-r-ml-7,.sm\:rt-r-ml-8,.sm\:rt-r-ml-9,.sm\:-rt-r-ml-1,.sm\:-rt-r-ml-2,.sm\:-rt-r-ml-3,.sm\:-rt-r-ml-4,.sm\:-rt-r-ml-5,.sm\:-rt-r-ml-6,.sm\:-rt-r-ml-7,.sm\:-rt-r-ml-8,.sm\:-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.sm\:rt-r-ml{--margin-left: var(--ml-sm) }.sm\:rt-r-ml-0{--margin-left: 0px}.sm\:rt-r-ml-1{--margin-left: var(--space-1)}.sm\:rt-r-ml-2{--margin-left: var(--space-2)}.sm\:rt-r-ml-3{--margin-left: var(--space-3)}.sm\:rt-r-ml-4{--margin-left: var(--space-4)}.sm\:rt-r-ml-5{--margin-left: var(--space-5)}.sm\:rt-r-ml-6{--margin-left: var(--space-6)}.sm\:rt-r-ml-7{--margin-left: var(--space-7)}.sm\:rt-r-ml-8{--margin-left: var(--space-8)}.sm\:rt-r-ml-9{--margin-left: var(--space-9)}.sm\:-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.sm\:-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.sm\:-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.sm\:-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.sm\:-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.sm\:-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.sm\:-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.sm\:-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.sm\:-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1024px){.md\:rt-r-ml,.md\:rt-r-ml-0,.md\:rt-r-ml-1,.md\:rt-r-ml-2,.md\:rt-r-ml-3,.md\:rt-r-ml-4,.md\:rt-r-ml-5,.md\:rt-r-ml-6,.md\:rt-r-ml-7,.md\:rt-r-ml-8,.md\:rt-r-ml-9,.md\:-rt-r-ml-1,.md\:-rt-r-ml-2,.md\:-rt-r-ml-3,.md\:-rt-r-ml-4,.md\:-rt-r-ml-5,.md\:-rt-r-ml-6,.md\:-rt-r-ml-7,.md\:-rt-r-ml-8,.md\:-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.md\:rt-r-ml{--margin-left: var(--ml-md) }.md\:rt-r-ml-0{--margin-left: 0px}.md\:rt-r-ml-1{--margin-left: var(--space-1)}.md\:rt-r-ml-2{--margin-left: var(--space-2)}.md\:rt-r-ml-3{--margin-left: var(--space-3)}.md\:rt-r-ml-4{--margin-left: var(--space-4)}.md\:rt-r-ml-5{--margin-left: var(--space-5)}.md\:rt-r-ml-6{--margin-left: var(--space-6)}.md\:rt-r-ml-7{--margin-left: var(--space-7)}.md\:rt-r-ml-8{--margin-left: var(--space-8)}.md\:rt-r-ml-9{--margin-left: var(--space-9)}.md\:-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.md\:-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.md\:-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.md\:-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.md\:-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.md\:-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.md\:-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.md\:-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.md\:-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1280px){.lg\:rt-r-ml,.lg\:rt-r-ml-0,.lg\:rt-r-ml-1,.lg\:rt-r-ml-2,.lg\:rt-r-ml-3,.lg\:rt-r-ml-4,.lg\:rt-r-ml-5,.lg\:rt-r-ml-6,.lg\:rt-r-ml-7,.lg\:rt-r-ml-8,.lg\:rt-r-ml-9,.lg\:-rt-r-ml-1,.lg\:-rt-r-ml-2,.lg\:-rt-r-ml-3,.lg\:-rt-r-ml-4,.lg\:-rt-r-ml-5,.lg\:-rt-r-ml-6,.lg\:-rt-r-ml-7,.lg\:-rt-r-ml-8,.lg\:-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.lg\:rt-r-ml{--margin-left: var(--ml-lg) }.lg\:rt-r-ml-0{--margin-left: 0px}.lg\:rt-r-ml-1{--margin-left: var(--space-1)}.lg\:rt-r-ml-2{--margin-left: var(--space-2)}.lg\:rt-r-ml-3{--margin-left: var(--space-3)}.lg\:rt-r-ml-4{--margin-left: var(--space-4)}.lg\:rt-r-ml-5{--margin-left: var(--space-5)}.lg\:rt-r-ml-6{--margin-left: var(--space-6)}.lg\:rt-r-ml-7{--margin-left: var(--space-7)}.lg\:rt-r-ml-8{--margin-left: var(--space-8)}.lg\:rt-r-ml-9{--margin-left: var(--space-9)}.lg\:-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.lg\:-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.lg\:-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.lg\:-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.lg\:-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.lg\:-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.lg\:-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.lg\:-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.lg\:-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}}@media (min-width: 1640px){.xl\:rt-r-ml,.xl\:rt-r-ml-0,.xl\:rt-r-ml-1,.xl\:rt-r-ml-2,.xl\:rt-r-ml-3,.xl\:rt-r-ml-4,.xl\:rt-r-ml-5,.xl\:rt-r-ml-6,.xl\:rt-r-ml-7,.xl\:rt-r-ml-8,.xl\:rt-r-ml-9,.xl\:-rt-r-ml-1,.xl\:-rt-r-ml-2,.xl\:-rt-r-ml-3,.xl\:-rt-r-ml-4,.xl\:-rt-r-ml-5,.xl\:-rt-r-ml-6,.xl\:-rt-r-ml-7,.xl\:-rt-r-ml-8,.xl\:-rt-r-ml-9{margin-left:var(--margin-left-override, var(--margin-left))}.xl\:rt-r-ml{--margin-left: var(--ml-xl) }.xl\:rt-r-ml-0{--margin-left: 0px}.xl\:rt-r-ml-1{--margin-left: var(--space-1)}.xl\:rt-r-ml-2{--margin-left: var(--space-2)}.xl\:rt-r-ml-3{--margin-left: var(--space-3)}.xl\:rt-r-ml-4{--margin-left: var(--space-4)}.xl\:rt-r-ml-5{--margin-left: var(--space-5)}.xl\:rt-r-ml-6{--margin-left: var(--space-6)}.xl\:rt-r-ml-7{--margin-left: var(--space-7)}.xl\:rt-r-ml-8{--margin-left: var(--space-8)}.xl\:rt-r-ml-9{--margin-left: var(--space-9)}.xl\:-rt-r-ml-1{--margin-left: calc(-1 * var(--space-1))}.xl\:-rt-r-ml-2{--margin-left: calc(-1 * var(--space-2))}.xl\:-rt-r-ml-3{--margin-left: calc(-1 * var(--space-3))}.xl\:-rt-r-ml-4{--margin-left: calc(-1 * var(--space-4))}.xl\:-rt-r-ml-5{--margin-left: calc(-1 * var(--space-5))}.xl\:-rt-r-ml-6{--margin-left: calc(-1 * var(--space-6))}.xl\:-rt-r-ml-7{--margin-left: calc(-1 * var(--space-7))}.xl\:-rt-r-ml-8{--margin-left: calc(-1 * var(--space-8))}.xl\:-rt-r-ml-9{--margin-left: calc(-1 * var(--space-9))}}.rt-r-overflow-visible{overflow:visible}.rt-r-overflow-hidden{overflow:hidden}.rt-r-overflow-clip{overflow:clip}.rt-r-overflow-scroll{overflow:scroll}.rt-r-overflow-auto{overflow:auto}.rt-r-ox-visible{overflow-x:visible}.rt-r-ox-hidden{overflow-x:hidden}.rt-r-ox-clip{overflow-x:clip}.rt-r-ox-scroll{overflow-x:scroll}.rt-r-ox-auto{overflow-x:auto}.rt-r-oy-visible{overflow-y:visible}.rt-r-oy-hidden{overflow-y:hidden}.rt-r-oy-clip{overflow-y:clip}.rt-r-oy-scroll{overflow-y:scroll}.rt-r-oy-auto{overflow-y:auto}@media (min-width: 520px){.xs\:rt-r-overflow-visible{overflow:visible}.xs\:rt-r-overflow-hidden{overflow:hidden}.xs\:rt-r-overflow-clip{overflow:clip}.xs\:rt-r-overflow-scroll{overflow:scroll}.xs\:rt-r-overflow-auto{overflow:auto}.xs\:rt-r-ox-visible{overflow-x:visible}.xs\:rt-r-ox-hidden{overflow-x:hidden}.xs\:rt-r-ox-clip{overflow-x:clip}.xs\:rt-r-ox-scroll{overflow-x:scroll}.xs\:rt-r-ox-auto{overflow-x:auto}.xs\:rt-r-oy-visible{overflow-y:visible}.xs\:rt-r-oy-hidden{overflow-y:hidden}.xs\:rt-r-oy-clip{overflow-y:clip}.xs\:rt-r-oy-scroll{overflow-y:scroll}.xs\:rt-r-oy-auto{overflow-y:auto}}@media (min-width: 768px){.sm\:rt-r-overflow-visible{overflow:visible}.sm\:rt-r-overflow-hidden{overflow:hidden}.sm\:rt-r-overflow-clip{overflow:clip}.sm\:rt-r-overflow-scroll{overflow:scroll}.sm\:rt-r-overflow-auto{overflow:auto}.sm\:rt-r-ox-visible{overflow-x:visible}.sm\:rt-r-ox-hidden{overflow-x:hidden}.sm\:rt-r-ox-clip{overflow-x:clip}.sm\:rt-r-ox-scroll{overflow-x:scroll}.sm\:rt-r-ox-auto{overflow-x:auto}.sm\:rt-r-oy-visible{overflow-y:visible}.sm\:rt-r-oy-hidden{overflow-y:hidden}.sm\:rt-r-oy-clip{overflow-y:clip}.sm\:rt-r-oy-scroll{overflow-y:scroll}.sm\:rt-r-oy-auto{overflow-y:auto}}@media (min-width: 1024px){.md\:rt-r-overflow-visible{overflow:visible}.md\:rt-r-overflow-hidden{overflow:hidden}.md\:rt-r-overflow-clip{overflow:clip}.md\:rt-r-overflow-scroll{overflow:scroll}.md\:rt-r-overflow-auto{overflow:auto}.md\:rt-r-ox-visible{overflow-x:visible}.md\:rt-r-ox-hidden{overflow-x:hidden}.md\:rt-r-ox-clip{overflow-x:clip}.md\:rt-r-ox-scroll{overflow-x:scroll}.md\:rt-r-ox-auto{overflow-x:auto}.md\:rt-r-oy-visible{overflow-y:visible}.md\:rt-r-oy-hidden{overflow-y:hidden}.md\:rt-r-oy-clip{overflow-y:clip}.md\:rt-r-oy-scroll{overflow-y:scroll}.md\:rt-r-oy-auto{overflow-y:auto}}@media (min-width: 1280px){.lg\:rt-r-overflow-visible{overflow:visible}.lg\:rt-r-overflow-hidden{overflow:hidden}.lg\:rt-r-overflow-clip{overflow:clip}.lg\:rt-r-overflow-scroll{overflow:scroll}.lg\:rt-r-overflow-auto{overflow:auto}.lg\:rt-r-ox-visible{overflow-x:visible}.lg\:rt-r-ox-hidden{overflow-x:hidden}.lg\:rt-r-ox-clip{overflow-x:clip}.lg\:rt-r-ox-scroll{overflow-x:scroll}.lg\:rt-r-ox-auto{overflow-x:auto}.lg\:rt-r-oy-visible{overflow-y:visible}.lg\:rt-r-oy-hidden{overflow-y:hidden}.lg\:rt-r-oy-clip{overflow-y:clip}.lg\:rt-r-oy-scroll{overflow-y:scroll}.lg\:rt-r-oy-auto{overflow-y:auto}}@media (min-width: 1640px){.xl\:rt-r-overflow-visible{overflow:visible}.xl\:rt-r-overflow-hidden{overflow:hidden}.xl\:rt-r-overflow-clip{overflow:clip}.xl\:rt-r-overflow-scroll{overflow:scroll}.xl\:rt-r-overflow-auto{overflow:auto}.xl\:rt-r-ox-visible{overflow-x:visible}.xl\:rt-r-ox-hidden{overflow-x:hidden}.xl\:rt-r-ox-clip{overflow-x:clip}.xl\:rt-r-ox-scroll{overflow-x:scroll}.xl\:rt-r-ox-auto{overflow-x:auto}.xl\:rt-r-oy-visible{overflow-y:visible}.xl\:rt-r-oy-hidden{overflow-y:hidden}.xl\:rt-r-oy-clip{overflow-y:clip}.xl\:rt-r-oy-scroll{overflow-y:scroll}.xl\:rt-r-oy-auto{overflow-y:auto}}.rt-r-p{padding:var(--p)}.rt-r-p-0{padding:0}.rt-r-p-1{padding:var(--space-1)}.rt-r-p-2{padding:var(--space-2)}.rt-r-p-3{padding:var(--space-3)}.rt-r-p-4{padding:var(--space-4)}.rt-r-p-5{padding:var(--space-5)}.rt-r-p-6{padding:var(--space-6)}.rt-r-p-7{padding:var(--space-7)}.rt-r-p-8{padding:var(--space-8)}.rt-r-p-9{padding:var(--space-9)}.rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}@media (min-width: 520px){.xs\:rt-r-p{padding:var(--p-xs)}.xs\:rt-r-p-0{padding:0}.xs\:rt-r-p-1{padding:var(--space-1)}.xs\:rt-r-p-2{padding:var(--space-2)}.xs\:rt-r-p-3{padding:var(--space-3)}.xs\:rt-r-p-4{padding:var(--space-4)}.xs\:rt-r-p-5{padding:var(--space-5)}.xs\:rt-r-p-6{padding:var(--space-6)}.xs\:rt-r-p-7{padding:var(--space-7)}.xs\:rt-r-p-8{padding:var(--space-8)}.xs\:rt-r-p-9{padding:var(--space-9)}.xs\:rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}}@media (min-width: 768px){.sm\:rt-r-p{padding:var(--p-sm)}.sm\:rt-r-p-0{padding:0}.sm\:rt-r-p-1{padding:var(--space-1)}.sm\:rt-r-p-2{padding:var(--space-2)}.sm\:rt-r-p-3{padding:var(--space-3)}.sm\:rt-r-p-4{padding:var(--space-4)}.sm\:rt-r-p-5{padding:var(--space-5)}.sm\:rt-r-p-6{padding:var(--space-6)}.sm\:rt-r-p-7{padding:var(--space-7)}.sm\:rt-r-p-8{padding:var(--space-8)}.sm\:rt-r-p-9{padding:var(--space-9)}.sm\:rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}}@media (min-width: 1024px){.md\:rt-r-p{padding:var(--p-md)}.md\:rt-r-p-0{padding:0}.md\:rt-r-p-1{padding:var(--space-1)}.md\:rt-r-p-2{padding:var(--space-2)}.md\:rt-r-p-3{padding:var(--space-3)}.md\:rt-r-p-4{padding:var(--space-4)}.md\:rt-r-p-5{padding:var(--space-5)}.md\:rt-r-p-6{padding:var(--space-6)}.md\:rt-r-p-7{padding:var(--space-7)}.md\:rt-r-p-8{padding:var(--space-8)}.md\:rt-r-p-9{padding:var(--space-9)}.md\:rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}}@media (min-width: 1280px){.lg\:rt-r-p{padding:var(--p-lg)}.lg\:rt-r-p-0{padding:0}.lg\:rt-r-p-1{padding:var(--space-1)}.lg\:rt-r-p-2{padding:var(--space-2)}.lg\:rt-r-p-3{padding:var(--space-3)}.lg\:rt-r-p-4{padding:var(--space-4)}.lg\:rt-r-p-5{padding:var(--space-5)}.lg\:rt-r-p-6{padding:var(--space-6)}.lg\:rt-r-p-7{padding:var(--space-7)}.lg\:rt-r-p-8{padding:var(--space-8)}.lg\:rt-r-p-9{padding:var(--space-9)}.lg\:rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}}@media (min-width: 1640px){.xl\:rt-r-p{padding:var(--p-xl)}.xl\:rt-r-p-0{padding:0}.xl\:rt-r-p-1{padding:var(--space-1)}.xl\:rt-r-p-2{padding:var(--space-2)}.xl\:rt-r-p-3{padding:var(--space-3)}.xl\:rt-r-p-4{padding:var(--space-4)}.xl\:rt-r-p-5{padding:var(--space-5)}.xl\:rt-r-p-6{padding:var(--space-6)}.xl\:rt-r-p-7{padding:var(--space-7)}.xl\:rt-r-p-8{padding:var(--space-8)}.xl\:rt-r-p-9{padding:var(--space-9)}.xl\:rt-r-p-inset{padding-top:var(--inset-padding-top);padding-right:var(--inset-padding-right);padding-bottom:var(--inset-padding-bottom);padding-left:var(--inset-padding-left)}}.rt-r-px{padding-left:var(--pl);padding-right:var(--pr)}.rt-r-px-0{padding-left:0;padding-right:0}.rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}@media (min-width: 520px){.xs\:rt-r-px{padding-left:var(--pl-xs);padding-right:var(--pr-xs)}.xs\:rt-r-px-0{padding-left:0;padding-right:0}.xs\:rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.xs\:rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.xs\:rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.xs\:rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.xs\:rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.xs\:rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.xs\:rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.xs\:rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.xs\:rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.xs\:rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}}@media (min-width: 768px){.sm\:rt-r-px{padding-left:var(--pl-sm);padding-right:var(--pr-sm)}.sm\:rt-r-px-0{padding-left:0;padding-right:0}.sm\:rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.sm\:rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.sm\:rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.sm\:rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.sm\:rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.sm\:rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.sm\:rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.sm\:rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.sm\:rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.sm\:rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}}@media (min-width: 1024px){.md\:rt-r-px{padding-left:var(--pl-md);padding-right:var(--pr-md)}.md\:rt-r-px-0{padding-left:0;padding-right:0}.md\:rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.md\:rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.md\:rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.md\:rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.md\:rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.md\:rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.md\:rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.md\:rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.md\:rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.md\:rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}}@media (min-width: 1280px){.lg\:rt-r-px{padding-left:var(--pl-lg);padding-right:var(--pr-lg)}.lg\:rt-r-px-0{padding-left:0;padding-right:0}.lg\:rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.lg\:rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.lg\:rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.lg\:rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.lg\:rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.lg\:rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.lg\:rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.lg\:rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.lg\:rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.lg\:rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}}@media (min-width: 1640px){.xl\:rt-r-px{padding-left:var(--pl-xl);padding-right:var(--pr-xl)}.xl\:rt-r-px-0{padding-left:0;padding-right:0}.xl\:rt-r-px-1{padding-left:var(--space-1);padding-right:var(--space-1)}.xl\:rt-r-px-2{padding-left:var(--space-2);padding-right:var(--space-2)}.xl\:rt-r-px-3{padding-left:var(--space-3);padding-right:var(--space-3)}.xl\:rt-r-px-4{padding-left:var(--space-4);padding-right:var(--space-4)}.xl\:rt-r-px-5{padding-left:var(--space-5);padding-right:var(--space-5)}.xl\:rt-r-px-6{padding-left:var(--space-6);padding-right:var(--space-6)}.xl\:rt-r-px-7{padding-left:var(--space-7);padding-right:var(--space-7)}.xl\:rt-r-px-8{padding-left:var(--space-8);padding-right:var(--space-8)}.xl\:rt-r-px-9{padding-left:var(--space-9);padding-right:var(--space-9)}.xl\:rt-r-px-inset{padding-left:var(--inset-padding-left);padding-right:var(--inset-padding-right)}}.rt-r-py{padding-top:var(--pt);padding-bottom:var(--pb)}.rt-r-py-0{padding-top:0;padding-bottom:0}.rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}@media (min-width: 520px){.xs\:rt-r-py{padding-top:var(--pt-xs);padding-bottom:var(--pb-xs)}.xs\:rt-r-py-0{padding-top:0;padding-bottom:0}.xs\:rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.xs\:rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.xs\:rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.xs\:rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.xs\:rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.xs\:rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.xs\:rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.xs\:rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.xs\:rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.xs\:rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 768px){.sm\:rt-r-py{padding-top:var(--pt-sm);padding-bottom:var(--pb-sm)}.sm\:rt-r-py-0{padding-top:0;padding-bottom:0}.sm\:rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.sm\:rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.sm\:rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.sm\:rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.sm\:rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.sm\:rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.sm\:rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.sm\:rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.sm\:rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.sm\:rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1024px){.md\:rt-r-py{padding-top:var(--pt-md);padding-bottom:var(--pb-md)}.md\:rt-r-py-0{padding-top:0;padding-bottom:0}.md\:rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.md\:rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.md\:rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.md\:rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.md\:rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.md\:rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.md\:rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.md\:rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.md\:rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.md\:rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1280px){.lg\:rt-r-py{padding-top:var(--pt-lg);padding-bottom:var(--pb-lg)}.lg\:rt-r-py-0{padding-top:0;padding-bottom:0}.lg\:rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.lg\:rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.lg\:rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.lg\:rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.lg\:rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.lg\:rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.lg\:rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.lg\:rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.lg\:rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.lg\:rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1640px){.xl\:rt-r-py{padding-top:var(--pt-xl);padding-bottom:var(--pb-xl)}.xl\:rt-r-py-0{padding-top:0;padding-bottom:0}.xl\:rt-r-py-1{padding-top:var(--space-1);padding-bottom:var(--space-1)}.xl\:rt-r-py-2{padding-top:var(--space-2);padding-bottom:var(--space-2)}.xl\:rt-r-py-3{padding-top:var(--space-3);padding-bottom:var(--space-3)}.xl\:rt-r-py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}.xl\:rt-r-py-5{padding-top:var(--space-5);padding-bottom:var(--space-5)}.xl\:rt-r-py-6{padding-top:var(--space-6);padding-bottom:var(--space-6)}.xl\:rt-r-py-7{padding-top:var(--space-7);padding-bottom:var(--space-7)}.xl\:rt-r-py-8{padding-top:var(--space-8);padding-bottom:var(--space-8)}.xl\:rt-r-py-9{padding-top:var(--space-9);padding-bottom:var(--space-9)}.xl\:rt-r-py-inset{padding-top:var(--inset-padding-top);padding-bottom:var(--inset-padding-bottom)}}.rt-r-pt{padding-top:var(--pt)}.rt-r-pt-0{padding-top:0}.rt-r-pt-1{padding-top:var(--space-1)}.rt-r-pt-2{padding-top:var(--space-2)}.rt-r-pt-3{padding-top:var(--space-3)}.rt-r-pt-4{padding-top:var(--space-4)}.rt-r-pt-5{padding-top:var(--space-5)}.rt-r-pt-6{padding-top:var(--space-6)}.rt-r-pt-7{padding-top:var(--space-7)}.rt-r-pt-8{padding-top:var(--space-8)}.rt-r-pt-9{padding-top:var(--space-9)}.rt-r-pt-inset{padding-top:var(--inset-padding-top)}@media (min-width: 520px){.xs\:rt-r-pt{padding-top:var(--pt-xs)}.xs\:rt-r-pt-0{padding-top:0}.xs\:rt-r-pt-1{padding-top:var(--space-1)}.xs\:rt-r-pt-2{padding-top:var(--space-2)}.xs\:rt-r-pt-3{padding-top:var(--space-3)}.xs\:rt-r-pt-4{padding-top:var(--space-4)}.xs\:rt-r-pt-5{padding-top:var(--space-5)}.xs\:rt-r-pt-6{padding-top:var(--space-6)}.xs\:rt-r-pt-7{padding-top:var(--space-7)}.xs\:rt-r-pt-8{padding-top:var(--space-8)}.xs\:rt-r-pt-9{padding-top:var(--space-9)}.xs\:rt-r-pt-inset{padding-top:var(--inset-padding-top)}}@media (min-width: 768px){.sm\:rt-r-pt{padding-top:var(--pt-sm)}.sm\:rt-r-pt-0{padding-top:0}.sm\:rt-r-pt-1{padding-top:var(--space-1)}.sm\:rt-r-pt-2{padding-top:var(--space-2)}.sm\:rt-r-pt-3{padding-top:var(--space-3)}.sm\:rt-r-pt-4{padding-top:var(--space-4)}.sm\:rt-r-pt-5{padding-top:var(--space-5)}.sm\:rt-r-pt-6{padding-top:var(--space-6)}.sm\:rt-r-pt-7{padding-top:var(--space-7)}.sm\:rt-r-pt-8{padding-top:var(--space-8)}.sm\:rt-r-pt-9{padding-top:var(--space-9)}.sm\:rt-r-pt-inset{padding-top:var(--inset-padding-top)}}@media (min-width: 1024px){.md\:rt-r-pt{padding-top:var(--pt-md)}.md\:rt-r-pt-0{padding-top:0}.md\:rt-r-pt-1{padding-top:var(--space-1)}.md\:rt-r-pt-2{padding-top:var(--space-2)}.md\:rt-r-pt-3{padding-top:var(--space-3)}.md\:rt-r-pt-4{padding-top:var(--space-4)}.md\:rt-r-pt-5{padding-top:var(--space-5)}.md\:rt-r-pt-6{padding-top:var(--space-6)}.md\:rt-r-pt-7{padding-top:var(--space-7)}.md\:rt-r-pt-8{padding-top:var(--space-8)}.md\:rt-r-pt-9{padding-top:var(--space-9)}.md\:rt-r-pt-inset{padding-top:var(--inset-padding-top)}}@media (min-width: 1280px){.lg\:rt-r-pt{padding-top:var(--pt-lg)}.lg\:rt-r-pt-0{padding-top:0}.lg\:rt-r-pt-1{padding-top:var(--space-1)}.lg\:rt-r-pt-2{padding-top:var(--space-2)}.lg\:rt-r-pt-3{padding-top:var(--space-3)}.lg\:rt-r-pt-4{padding-top:var(--space-4)}.lg\:rt-r-pt-5{padding-top:var(--space-5)}.lg\:rt-r-pt-6{padding-top:var(--space-6)}.lg\:rt-r-pt-7{padding-top:var(--space-7)}.lg\:rt-r-pt-8{padding-top:var(--space-8)}.lg\:rt-r-pt-9{padding-top:var(--space-9)}.lg\:rt-r-pt-inset{padding-top:var(--inset-padding-top)}}@media (min-width: 1640px){.xl\:rt-r-pt{padding-top:var(--pt-xl)}.xl\:rt-r-pt-0{padding-top:0}.xl\:rt-r-pt-1{padding-top:var(--space-1)}.xl\:rt-r-pt-2{padding-top:var(--space-2)}.xl\:rt-r-pt-3{padding-top:var(--space-3)}.xl\:rt-r-pt-4{padding-top:var(--space-4)}.xl\:rt-r-pt-5{padding-top:var(--space-5)}.xl\:rt-r-pt-6{padding-top:var(--space-6)}.xl\:rt-r-pt-7{padding-top:var(--space-7)}.xl\:rt-r-pt-8{padding-top:var(--space-8)}.xl\:rt-r-pt-9{padding-top:var(--space-9)}.xl\:rt-r-pt-inset{padding-top:var(--inset-padding-top)}}.rt-r-pr{padding-right:var(--pr)}.rt-r-pr-0{padding-right:0}.rt-r-pr-1{padding-right:var(--space-1)}.rt-r-pr-2{padding-right:var(--space-2)}.rt-r-pr-3{padding-right:var(--space-3)}.rt-r-pr-4{padding-right:var(--space-4)}.rt-r-pr-5{padding-right:var(--space-5)}.rt-r-pr-6{padding-right:var(--space-6)}.rt-r-pr-7{padding-right:var(--space-7)}.rt-r-pr-8{padding-right:var(--space-8)}.rt-r-pr-9{padding-right:var(--space-9)}.rt-r-pr-inset{padding-right:var(--inset-padding-right)}@media (min-width: 520px){.xs\:rt-r-pr{padding-right:var(--pr-xs)}.xs\:rt-r-pr-0{padding-right:0}.xs\:rt-r-pr-1{padding-right:var(--space-1)}.xs\:rt-r-pr-2{padding-right:var(--space-2)}.xs\:rt-r-pr-3{padding-right:var(--space-3)}.xs\:rt-r-pr-4{padding-right:var(--space-4)}.xs\:rt-r-pr-5{padding-right:var(--space-5)}.xs\:rt-r-pr-6{padding-right:var(--space-6)}.xs\:rt-r-pr-7{padding-right:var(--space-7)}.xs\:rt-r-pr-8{padding-right:var(--space-8)}.xs\:rt-r-pr-9{padding-right:var(--space-9)}.xs\:rt-r-pr-inset{padding-right:var(--inset-padding-right)}}@media (min-width: 768px){.sm\:rt-r-pr{padding-right:var(--pr-sm)}.sm\:rt-r-pr-0{padding-right:0}.sm\:rt-r-pr-1{padding-right:var(--space-1)}.sm\:rt-r-pr-2{padding-right:var(--space-2)}.sm\:rt-r-pr-3{padding-right:var(--space-3)}.sm\:rt-r-pr-4{padding-right:var(--space-4)}.sm\:rt-r-pr-5{padding-right:var(--space-5)}.sm\:rt-r-pr-6{padding-right:var(--space-6)}.sm\:rt-r-pr-7{padding-right:var(--space-7)}.sm\:rt-r-pr-8{padding-right:var(--space-8)}.sm\:rt-r-pr-9{padding-right:var(--space-9)}.sm\:rt-r-pr-inset{padding-right:var(--inset-padding-right)}}@media (min-width: 1024px){.md\:rt-r-pr{padding-right:var(--pr-md)}.md\:rt-r-pr-0{padding-right:0}.md\:rt-r-pr-1{padding-right:var(--space-1)}.md\:rt-r-pr-2{padding-right:var(--space-2)}.md\:rt-r-pr-3{padding-right:var(--space-3)}.md\:rt-r-pr-4{padding-right:var(--space-4)}.md\:rt-r-pr-5{padding-right:var(--space-5)}.md\:rt-r-pr-6{padding-right:var(--space-6)}.md\:rt-r-pr-7{padding-right:var(--space-7)}.md\:rt-r-pr-8{padding-right:var(--space-8)}.md\:rt-r-pr-9{padding-right:var(--space-9)}.md\:rt-r-pr-inset{padding-right:var(--inset-padding-right)}}@media (min-width: 1280px){.lg\:rt-r-pr{padding-right:var(--pr-lg)}.lg\:rt-r-pr-0{padding-right:0}.lg\:rt-r-pr-1{padding-right:var(--space-1)}.lg\:rt-r-pr-2{padding-right:var(--space-2)}.lg\:rt-r-pr-3{padding-right:var(--space-3)}.lg\:rt-r-pr-4{padding-right:var(--space-4)}.lg\:rt-r-pr-5{padding-right:var(--space-5)}.lg\:rt-r-pr-6{padding-right:var(--space-6)}.lg\:rt-r-pr-7{padding-right:var(--space-7)}.lg\:rt-r-pr-8{padding-right:var(--space-8)}.lg\:rt-r-pr-9{padding-right:var(--space-9)}.lg\:rt-r-pr-inset{padding-right:var(--inset-padding-right)}}@media (min-width: 1640px){.xl\:rt-r-pr{padding-right:var(--pr-xl)}.xl\:rt-r-pr-0{padding-right:0}.xl\:rt-r-pr-1{padding-right:var(--space-1)}.xl\:rt-r-pr-2{padding-right:var(--space-2)}.xl\:rt-r-pr-3{padding-right:var(--space-3)}.xl\:rt-r-pr-4{padding-right:var(--space-4)}.xl\:rt-r-pr-5{padding-right:var(--space-5)}.xl\:rt-r-pr-6{padding-right:var(--space-6)}.xl\:rt-r-pr-7{padding-right:var(--space-7)}.xl\:rt-r-pr-8{padding-right:var(--space-8)}.xl\:rt-r-pr-9{padding-right:var(--space-9)}.xl\:rt-r-pr-inset{padding-right:var(--inset-padding-right)}}.rt-r-pb{padding-bottom:var(--pb)}.rt-r-pb-0{padding-bottom:0}.rt-r-pb-1{padding-bottom:var(--space-1)}.rt-r-pb-2{padding-bottom:var(--space-2)}.rt-r-pb-3{padding-bottom:var(--space-3)}.rt-r-pb-4{padding-bottom:var(--space-4)}.rt-r-pb-5{padding-bottom:var(--space-5)}.rt-r-pb-6{padding-bottom:var(--space-6)}.rt-r-pb-7{padding-bottom:var(--space-7)}.rt-r-pb-8{padding-bottom:var(--space-8)}.rt-r-pb-9{padding-bottom:var(--space-9)}.rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}@media (min-width: 520px){.xs\:rt-r-pb{padding-bottom:var(--pb-xs)}.xs\:rt-r-pb-0{padding-bottom:0}.xs\:rt-r-pb-1{padding-bottom:var(--space-1)}.xs\:rt-r-pb-2{padding-bottom:var(--space-2)}.xs\:rt-r-pb-3{padding-bottom:var(--space-3)}.xs\:rt-r-pb-4{padding-bottom:var(--space-4)}.xs\:rt-r-pb-5{padding-bottom:var(--space-5)}.xs\:rt-r-pb-6{padding-bottom:var(--space-6)}.xs\:rt-r-pb-7{padding-bottom:var(--space-7)}.xs\:rt-r-pb-8{padding-bottom:var(--space-8)}.xs\:rt-r-pb-9{padding-bottom:var(--space-9)}.xs\:rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 768px){.sm\:rt-r-pb{padding-bottom:var(--pb-sm)}.sm\:rt-r-pb-0{padding-bottom:0}.sm\:rt-r-pb-1{padding-bottom:var(--space-1)}.sm\:rt-r-pb-2{padding-bottom:var(--space-2)}.sm\:rt-r-pb-3{padding-bottom:var(--space-3)}.sm\:rt-r-pb-4{padding-bottom:var(--space-4)}.sm\:rt-r-pb-5{padding-bottom:var(--space-5)}.sm\:rt-r-pb-6{padding-bottom:var(--space-6)}.sm\:rt-r-pb-7{padding-bottom:var(--space-7)}.sm\:rt-r-pb-8{padding-bottom:var(--space-8)}.sm\:rt-r-pb-9{padding-bottom:var(--space-9)}.sm\:rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1024px){.md\:rt-r-pb{padding-bottom:var(--pb-md)}.md\:rt-r-pb-0{padding-bottom:0}.md\:rt-r-pb-1{padding-bottom:var(--space-1)}.md\:rt-r-pb-2{padding-bottom:var(--space-2)}.md\:rt-r-pb-3{padding-bottom:var(--space-3)}.md\:rt-r-pb-4{padding-bottom:var(--space-4)}.md\:rt-r-pb-5{padding-bottom:var(--space-5)}.md\:rt-r-pb-6{padding-bottom:var(--space-6)}.md\:rt-r-pb-7{padding-bottom:var(--space-7)}.md\:rt-r-pb-8{padding-bottom:var(--space-8)}.md\:rt-r-pb-9{padding-bottom:var(--space-9)}.md\:rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1280px){.lg\:rt-r-pb{padding-bottom:var(--pb-lg)}.lg\:rt-r-pb-0{padding-bottom:0}.lg\:rt-r-pb-1{padding-bottom:var(--space-1)}.lg\:rt-r-pb-2{padding-bottom:var(--space-2)}.lg\:rt-r-pb-3{padding-bottom:var(--space-3)}.lg\:rt-r-pb-4{padding-bottom:var(--space-4)}.lg\:rt-r-pb-5{padding-bottom:var(--space-5)}.lg\:rt-r-pb-6{padding-bottom:var(--space-6)}.lg\:rt-r-pb-7{padding-bottom:var(--space-7)}.lg\:rt-r-pb-8{padding-bottom:var(--space-8)}.lg\:rt-r-pb-9{padding-bottom:var(--space-9)}.lg\:rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}}@media (min-width: 1640px){.xl\:rt-r-pb{padding-bottom:var(--pb-xl)}.xl\:rt-r-pb-0{padding-bottom:0}.xl\:rt-r-pb-1{padding-bottom:var(--space-1)}.xl\:rt-r-pb-2{padding-bottom:var(--space-2)}.xl\:rt-r-pb-3{padding-bottom:var(--space-3)}.xl\:rt-r-pb-4{padding-bottom:var(--space-4)}.xl\:rt-r-pb-5{padding-bottom:var(--space-5)}.xl\:rt-r-pb-6{padding-bottom:var(--space-6)}.xl\:rt-r-pb-7{padding-bottom:var(--space-7)}.xl\:rt-r-pb-8{padding-bottom:var(--space-8)}.xl\:rt-r-pb-9{padding-bottom:var(--space-9)}.xl\:rt-r-pb-inset{padding-bottom:var(--inset-padding-bottom)}}.rt-r-pl{padding-left:var(--pl)}.rt-r-pl-0{padding-left:0}.rt-r-pl-1{padding-left:var(--space-1)}.rt-r-pl-2{padding-left:var(--space-2)}.rt-r-pl-3{padding-left:var(--space-3)}.rt-r-pl-4{padding-left:var(--space-4)}.rt-r-pl-5{padding-left:var(--space-5)}.rt-r-pl-6{padding-left:var(--space-6)}.rt-r-pl-7{padding-left:var(--space-7)}.rt-r-pl-8{padding-left:var(--space-8)}.rt-r-pl-9{padding-left:var(--space-9)}.rt-r-pl-inset{padding-left:var(--inset-padding-left)}@media (min-width: 520px){.xs\:rt-r-pl{padding-left:var(--pl-xs)}.xs\:rt-r-pl-0{padding-left:0}.xs\:rt-r-pl-1{padding-left:var(--space-1)}.xs\:rt-r-pl-2{padding-left:var(--space-2)}.xs\:rt-r-pl-3{padding-left:var(--space-3)}.xs\:rt-r-pl-4{padding-left:var(--space-4)}.xs\:rt-r-pl-5{padding-left:var(--space-5)}.xs\:rt-r-pl-6{padding-left:var(--space-6)}.xs\:rt-r-pl-7{padding-left:var(--space-7)}.xs\:rt-r-pl-8{padding-left:var(--space-8)}.xs\:rt-r-pl-9{padding-left:var(--space-9)}.xs\:rt-r-pl-inset{padding-left:var(--inset-padding-left)}}@media (min-width: 768px){.sm\:rt-r-pl{padding-left:var(--pl-sm)}.sm\:rt-r-pl-0{padding-left:0}.sm\:rt-r-pl-1{padding-left:var(--space-1)}.sm\:rt-r-pl-2{padding-left:var(--space-2)}.sm\:rt-r-pl-3{padding-left:var(--space-3)}.sm\:rt-r-pl-4{padding-left:var(--space-4)}.sm\:rt-r-pl-5{padding-left:var(--space-5)}.sm\:rt-r-pl-6{padding-left:var(--space-6)}.sm\:rt-r-pl-7{padding-left:var(--space-7)}.sm\:rt-r-pl-8{padding-left:var(--space-8)}.sm\:rt-r-pl-9{padding-left:var(--space-9)}.sm\:rt-r-pl-inset{padding-left:var(--inset-padding-left)}}@media (min-width: 1024px){.md\:rt-r-pl{padding-left:var(--pl-md)}.md\:rt-r-pl-0{padding-left:0}.md\:rt-r-pl-1{padding-left:var(--space-1)}.md\:rt-r-pl-2{padding-left:var(--space-2)}.md\:rt-r-pl-3{padding-left:var(--space-3)}.md\:rt-r-pl-4{padding-left:var(--space-4)}.md\:rt-r-pl-5{padding-left:var(--space-5)}.md\:rt-r-pl-6{padding-left:var(--space-6)}.md\:rt-r-pl-7{padding-left:var(--space-7)}.md\:rt-r-pl-8{padding-left:var(--space-8)}.md\:rt-r-pl-9{padding-left:var(--space-9)}.md\:rt-r-pl-inset{padding-left:var(--inset-padding-left)}}@media (min-width: 1280px){.lg\:rt-r-pl{padding-left:var(--pl-lg)}.lg\:rt-r-pl-0{padding-left:0}.lg\:rt-r-pl-1{padding-left:var(--space-1)}.lg\:rt-r-pl-2{padding-left:var(--space-2)}.lg\:rt-r-pl-3{padding-left:var(--space-3)}.lg\:rt-r-pl-4{padding-left:var(--space-4)}.lg\:rt-r-pl-5{padding-left:var(--space-5)}.lg\:rt-r-pl-6{padding-left:var(--space-6)}.lg\:rt-r-pl-7{padding-left:var(--space-7)}.lg\:rt-r-pl-8{padding-left:var(--space-8)}.lg\:rt-r-pl-9{padding-left:var(--space-9)}.lg\:rt-r-pl-inset{padding-left:var(--inset-padding-left)}}@media (min-width: 1640px){.xl\:rt-r-pl{padding-left:var(--pl-xl)}.xl\:rt-r-pl-0{padding-left:0}.xl\:rt-r-pl-1{padding-left:var(--space-1)}.xl\:rt-r-pl-2{padding-left:var(--space-2)}.xl\:rt-r-pl-3{padding-left:var(--space-3)}.xl\:rt-r-pl-4{padding-left:var(--space-4)}.xl\:rt-r-pl-5{padding-left:var(--space-5)}.xl\:rt-r-pl-6{padding-left:var(--space-6)}.xl\:rt-r-pl-7{padding-left:var(--space-7)}.xl\:rt-r-pl-8{padding-left:var(--space-8)}.xl\:rt-r-pl-9{padding-left:var(--space-9)}.xl\:rt-r-pl-inset{padding-left:var(--inset-padding-left)}}.rt-r-position-static{position:static}.rt-r-position-absolute{position:absolute}.rt-r-position-relative{position:relative}.rt-r-position-fixed{position:fixed}.rt-r-position-sticky{position:sticky}@media (min-width: 520px){.xs\:rt-r-position-static{position:static}.xs\:rt-r-position-absolute{position:absolute}.xs\:rt-r-position-relative{position:relative}.xs\:rt-r-position-fixed{position:fixed}.xs\:rt-r-position-sticky{position:sticky}}@media (min-width: 768px){.sm\:rt-r-position-static{position:static}.sm\:rt-r-position-absolute{position:absolute}.sm\:rt-r-position-relative{position:relative}.sm\:rt-r-position-fixed{position:fixed}.sm\:rt-r-position-sticky{position:sticky}}@media (min-width: 1024px){.md\:rt-r-position-static{position:static}.md\:rt-r-position-absolute{position:absolute}.md\:rt-r-position-relative{position:relative}.md\:rt-r-position-fixed{position:fixed}.md\:rt-r-position-sticky{position:sticky}}@media (min-width: 1280px){.lg\:rt-r-position-static{position:static}.lg\:rt-r-position-absolute{position:absolute}.lg\:rt-r-position-relative{position:relative}.lg\:rt-r-position-fixed{position:fixed}.lg\:rt-r-position-sticky{position:sticky}}@media (min-width: 1640px){.xl\:rt-r-position-static{position:static}.xl\:rt-r-position-absolute{position:absolute}.xl\:rt-r-position-relative{position:relative}.xl\:rt-r-position-fixed{position:fixed}.xl\:rt-r-position-sticky{position:sticky}}.rt-r-w{width:var(--width)}@media (min-width: 520px){.xs\:rt-r-w{width:var(--width-xs)}}@media (min-width: 768px){.sm\:rt-r-w{width:var(--width-sm)}}@media (min-width: 1024px){.md\:rt-r-w{width:var(--width-md)}}@media (min-width: 1280px){.lg\:rt-r-w{width:var(--width-lg)}}@media (min-width: 1640px){.xl\:rt-r-w{width:var(--width-xl)}}.rt-r-min-w{min-width:var(--min-width)}@media (min-width: 520px){.xs\:rt-r-min-w{min-width:var(--min-width-xs)}}@media (min-width: 768px){.sm\:rt-r-min-w{min-width:var(--min-width-sm)}}@media (min-width: 1024px){.md\:rt-r-min-w{min-width:var(--min-width-md)}}@media (min-width: 1280px){.lg\:rt-r-min-w{min-width:var(--min-width-lg)}}@media (min-width: 1640px){.xl\:rt-r-min-w{min-width:var(--min-width-xl)}}.rt-r-max-w{max-width:var(--max-width)}@media (min-width: 520px){.xs\:rt-r-max-w{max-width:var(--max-width-xs)}}@media (min-width: 768px){.sm\:rt-r-max-w{max-width:var(--max-width-sm)}}@media (min-width: 1024px){.md\:rt-r-max-w{max-width:var(--max-width-md)}}@media (min-width: 1280px){.lg\:rt-r-max-w{max-width:var(--max-width-lg)}}@media (min-width: 1640px){.xl\:rt-r-max-w{max-width:var(--max-width-xl)}}.rt-r-weight-light{font-weight:var(--font-weight-light)}.rt-r-weight-regular{font-weight:var(--font-weight-regular)}.rt-r-weight-medium{font-weight:var(--font-weight-medium)}.rt-r-weight-bold{font-weight:var(--font-weight-bold)}@media (min-width: 520px){.xs\:rt-r-weight-light{font-weight:var(--font-weight-light)}.xs\:rt-r-weight-regular{font-weight:var(--font-weight-regular)}.xs\:rt-r-weight-medium{font-weight:var(--font-weight-medium)}.xs\:rt-r-weight-bold{font-weight:var(--font-weight-bold)}}@media (min-width: 768px){.sm\:rt-r-weight-light{font-weight:var(--font-weight-light)}.sm\:rt-r-weight-regular{font-weight:var(--font-weight-regular)}.sm\:rt-r-weight-medium{font-weight:var(--font-weight-medium)}.sm\:rt-r-weight-bold{font-weight:var(--font-weight-bold)}}@media (min-width: 1024px){.md\:rt-r-weight-light{font-weight:var(--font-weight-light)}.md\:rt-r-weight-regular{font-weight:var(--font-weight-regular)}.md\:rt-r-weight-medium{font-weight:var(--font-weight-medium)}.md\:rt-r-weight-bold{font-weight:var(--font-weight-bold)}}@media (min-width: 1280px){.lg\:rt-r-weight-light{font-weight:var(--font-weight-light)}.lg\:rt-r-weight-regular{font-weight:var(--font-weight-regular)}.lg\:rt-r-weight-medium{font-weight:var(--font-weight-medium)}.lg\:rt-r-weight-bold{font-weight:var(--font-weight-bold)}}@media (min-width: 1640px){.xl\:rt-r-weight-light{font-weight:var(--font-weight-light)}.xl\:rt-r-weight-regular{font-weight:var(--font-weight-regular)}.xl\:rt-r-weight-medium{font-weight:var(--font-weight-medium)}.xl\:rt-r-weight-bold{font-weight:var(--font-weight-bold)}}.rt-r-lt-normal:before,.rt-r-lt-end:before,.rt-r-lt-normal:after,.rt-r-lt-start:after{content:none}.rt-r-lt-start:before,.rt-r-lt-both:before,.rt-r-lt-end:after,.rt-r-lt-both:after{content:"";display:table}.rt-r-lt-start:before,.rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.rt-r-lt-end:after,.rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}@media (min-width: 520px){.xs\:rt-r-lt-normal:before,.xs\:rt-r-lt-end:before,.xs\:rt-r-lt-normal:after,.xs\:rt-r-lt-start:after{content:none}.xs\:rt-r-lt-start:before,.xs\:rt-r-lt-both:before,.xs\:rt-r-lt-end:after,.xs\:rt-r-lt-both:after{content:"";display:table}.xs\:rt-r-lt-start:before,.xs\:rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.xs\:rt-r-lt-end:after,.xs\:rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}}@media (min-width: 768px){.sm\:rt-r-lt-normal:before,.sm\:rt-r-lt-end:before,.sm\:rt-r-lt-normal:after,.sm\:rt-r-lt-start:after{content:none}.sm\:rt-r-lt-start:before,.sm\:rt-r-lt-both:before,.sm\:rt-r-lt-end:after,.sm\:rt-r-lt-both:after{content:"";display:table}.sm\:rt-r-lt-start:before,.sm\:rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.sm\:rt-r-lt-end:after,.sm\:rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}}@media (min-width: 1024px){.md\:rt-r-lt-normal:before,.md\:rt-r-lt-end:before,.md\:rt-r-lt-normal:after,.md\:rt-r-lt-start:after{content:none}.md\:rt-r-lt-start:before,.md\:rt-r-lt-both:before,.md\:rt-r-lt-end:after,.md\:rt-r-lt-both:after{content:"";display:table}.md\:rt-r-lt-start:before,.md\:rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.md\:rt-r-lt-end:after,.md\:rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}}@media (min-width: 1280px){.lg\:rt-r-lt-normal:before,.lg\:rt-r-lt-end:before,.lg\:rt-r-lt-normal:after,.lg\:rt-r-lt-start:after{content:none}.lg\:rt-r-lt-start:before,.lg\:rt-r-lt-both:before,.lg\:rt-r-lt-end:after,.lg\:rt-r-lt-both:after{content:"";display:table}.lg\:rt-r-lt-start:before,.lg\:rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.lg\:rt-r-lt-end:after,.lg\:rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}}@media (min-width: 1640px){.xl\:rt-r-lt-normal:before,.xl\:rt-r-lt-end:before,.xl\:rt-r-lt-normal:after,.xl\:rt-r-lt-start:after{content:none}.xl\:rt-r-lt-start:before,.xl\:rt-r-lt-both:before,.xl\:rt-r-lt-end:after,.xl\:rt-r-lt-both:after{content:"";display:table}.xl\:rt-r-lt-start:before,.xl\:rt-r-lt-both:before{margin-bottom:calc(var(--leading-trim-start, var(--default-leading-trim-start)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}.xl\:rt-r-lt-end:after,.xl\:rt-r-lt-both:after{margin-top:calc(var(--leading-trim-end, var(--default-leading-trim-end)) - var(--line-height, calc(1em * var(--default-line-height))) / 2)}}.rt-r-resize-none{resize:none}.rt-r-resize-vertical{resize:vertical}.rt-r-resize-horizontal{resize:horizontal}.rt-r-resize-both{resize:both}@media (min-width: 520px){.xs\:rt-r-resize-none{resize:none}.xs\:rt-r-resize-vertical{resize:vertical}.xs\:rt-r-resize-horizontal{resize:horizontal}.xs\:rt-r-resize-both{resize:both}}@media (min-width: 768px){.sm\:rt-r-resize-none{resize:none}.sm\:rt-r-resize-vertical{resize:vertical}.sm\:rt-r-resize-horizontal{resize:horizontal}.sm\:rt-r-resize-both{resize:both}}@media (min-width: 1024px){.md\:rt-r-resize-none{resize:none}.md\:rt-r-resize-vertical{resize:vertical}.md\:rt-r-resize-horizontal{resize:horizontal}.md\:rt-r-resize-both{resize:both}}@media (min-width: 1280px){.lg\:rt-r-resize-none{resize:none}.lg\:rt-r-resize-vertical{resize:vertical}.lg\:rt-r-resize-horizontal{resize:horizontal}.lg\:rt-r-resize-both{resize:both}}@media (min-width: 1640px){.xl\:rt-r-resize-none{resize:none}.xl\:rt-r-resize-vertical{resize:vertical}.xl\:rt-r-resize-horizontal{resize:horizontal}.xl\:rt-r-resize-both{resize:both}}.rt-r-tl-auto{table-layout:auto}.rt-r-tl-fixed{table-layout:fixed}@media (min-width: 520px){.xs\:rt-r-tl-auto{table-layout:auto}.xs\:rt-r-tl-fixed{table-layout:fixed}}@media (min-width: 768px){.sm\:rt-r-tl-auto{table-layout:auto}.sm\:rt-r-tl-fixed{table-layout:fixed}}@media (min-width: 1024px){.md\:rt-r-tl-auto{table-layout:auto}.md\:rt-r-tl-fixed{table-layout:fixed}}@media (min-width: 1280px){.lg\:rt-r-tl-auto{table-layout:auto}.lg\:rt-r-tl-fixed{table-layout:fixed}}@media (min-width: 1640px){.xl\:rt-r-tl-auto{table-layout:auto}.xl\:rt-r-tl-fixed{table-layout:fixed}}.rt-r-ta-left{text-align:left}.rt-r-ta-center{text-align:center}.rt-r-ta-right{text-align:right}@media (min-width: 520px){.xs\:rt-r-ta-left{text-align:left}.xs\:rt-r-ta-center{text-align:center}.xs\:rt-r-ta-right{text-align:right}}@media (min-width: 768px){.sm\:rt-r-ta-left{text-align:left}.sm\:rt-r-ta-center{text-align:center}.sm\:rt-r-ta-right{text-align:right}}@media (min-width: 1024px){.md\:rt-r-ta-left{text-align:left}.md\:rt-r-ta-center{text-align:center}.md\:rt-r-ta-right{text-align:right}}@media (min-width: 1280px){.lg\:rt-r-ta-left{text-align:left}.lg\:rt-r-ta-center{text-align:center}.lg\:rt-r-ta-right{text-align:right}}@media (min-width: 1640px){.xl\:rt-r-ta-left{text-align:left}.xl\:rt-r-ta-center{text-align:center}.xl\:rt-r-ta-right{text-align:right}}.rt-r-tw-wrap{white-space:normal}.rt-r-tw-nowrap{white-space:nowrap}.rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.rt-r-tw-balance{white-space:normal;text-wrap:balance}@media (min-width: 520px){.xs\:rt-r-tw-wrap{white-space:normal}.xs\:rt-r-tw-nowrap{white-space:nowrap}.xs\:rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.xs\:rt-r-tw-balance{white-space:normal;text-wrap:balance}}@media (min-width: 768px){.sm\:rt-r-tw-wrap{white-space:normal}.sm\:rt-r-tw-nowrap{white-space:nowrap}.sm\:rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.sm\:rt-r-tw-balance{white-space:normal;text-wrap:balance}}@media (min-width: 1024px){.md\:rt-r-tw-wrap{white-space:normal}.md\:rt-r-tw-nowrap{white-space:nowrap}.md\:rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.md\:rt-r-tw-balance{white-space:normal;text-wrap:balance}}@media (min-width: 1280px){.lg\:rt-r-tw-wrap{white-space:normal}.lg\:rt-r-tw-nowrap{white-space:nowrap}.lg\:rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.lg\:rt-r-tw-balance{white-space:normal;text-wrap:balance}}@media (min-width: 1640px){.xl\:rt-r-tw-wrap{white-space:normal}.xl\:rt-r-tw-nowrap{white-space:nowrap}.xl\:rt-r-tw-pretty{white-space:normal;text-wrap:pretty}.xl\:rt-r-tw-balance{white-space:normal;text-wrap:balance}}.rt-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-r-va-baseline{vertical-align:baseline}.rt-r-va-top{vertical-align:top}.rt-r-va-middle{vertical-align:middle}.rt-r-va-bottom{vertical-align:bottom}@media (min-width: 520px){.xs\:rt-r-va-baseline{vertical-align:baseline}.xs\:rt-r-va-top{vertical-align:top}.xs\:rt-r-va-middle{vertical-align:middle}.xs\:rt-r-va-bottom{vertical-align:bottom}}@media (min-width: 768px){.sm\:rt-r-va-baseline{vertical-align:baseline}.sm\:rt-r-va-top{vertical-align:top}.sm\:rt-r-va-middle{vertical-align:middle}.sm\:rt-r-va-bottom{vertical-align:bottom}}@media (min-width: 1024px){.md\:rt-r-va-baseline{vertical-align:baseline}.md\:rt-r-va-top{vertical-align:top}.md\:rt-r-va-middle{vertical-align:middle}.md\:rt-r-va-bottom{vertical-align:bottom}}@media (min-width: 1280px){.lg\:rt-r-va-baseline{vertical-align:baseline}.lg\:rt-r-va-top{vertical-align:top}.lg\:rt-r-va-middle{vertical-align:middle}.lg\:rt-r-va-bottom{vertical-align:bottom}}@media (min-width: 1640px){.xl\:rt-r-va-baseline{vertical-align:baseline}.xl\:rt-r-va-top{vertical-align:top}.xl\:rt-r-va-middle{vertical-align:middle}.xl\:rt-r-va-bottom{vertical-align:bottom}} diff --git a/build/assets/index-DKOmzAMm.js b/build/assets/index-DKOmzAMm.js new file mode 100644 index 0000000..d9ff61e --- /dev/null +++ b/build/assets/index-DKOmzAMm.js @@ -0,0 +1,4563 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/calcite-button-tKmnUUcr.js","assets/interactive-DaeLV7oq.js","assets/component-BUnDTGFH.js","assets/label-CXw43uCP.js","assets/icon-ifbWMk17.js","assets/loader-6rdpjGpy.js","assets/calcite-input-D7abHyRn.js","assets/calcite-label-A-HJpZEQ.js","assets/calcite-modal-DHLYHRNO.js","assets/openCloseComponent-A5NL68VL.js","assets/calcite-notice-Ck_wHSpF.js","assets/WhereClause-CILeHwR9.js","assets/TimeOnly-C2MfFEIr.js","assets/pe-wasm-CCKBX_Eg.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/arcadeUtils-BvZmzJL_.js","assets/number-NXsKqxkQ.js","assets/featureConversionUtils-CCATessr.js","assets/OptimizedFeature-DDMKj8Vq.js","assets/OptimizedFeatureSet-Blu9Ckm7.js","assets/Basemap-drllXW5h.js","assets/loadAll-Cm5pWAv4.js","assets/writeUtils-VdcK5efY.js","assets/ElevationLayer-CJdvBfQg.js","assets/ArcGISCachedService-B90n8xUT.js","assets/TileInfo-Bx6eEWV4.js","assets/TileInfoTilemapCache-jg1X3Y95.js","assets/TilemapCache-6mrSWCBj.js","assets/ByteSizeUnit-BsxeN7wM.js","assets/webStyleSymbolUtils-Bnn0aSrt.js","assets/devEnvironmentUtils-D6qIi8Ky.js","assets/portalLayers-CSGJfvg_.js","assets/associatedFeatureServiceUtils-D9v5WjkL.js","assets/lazyLayerLoader-BkbwrjyD.js","assets/arcgisLayers-zn5ZTq8c.js","assets/statsWorker-DNhIb11T.js","assets/utils-CqM6vUbj.js","assets/utils-C0Bk6fkM.js","assets/ClassBreaksDefinition-yZL3mlhg.js","assets/geometryEngineWorker-ClddcLz0.js","assets/geometryEngineBase-RmbNeFm7.js","assets/json-Wa8cmqdu.js","assets/CSVSourceWorker-DF7Oy86a.js","assets/date-M6n_RqpC.js","assets/FeatureStore-C3siChbH.js","assets/BoundsStore-BShGRkMU.js","assets/PooledRBush-CdrRkOdh.js","assets/quickselect-D0_cvEX6.js","assets/QueryEngine-CI3mggax.js","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-CF4bGKhW.js","assets/utils-BCmi3vQB.js","assets/QueryEngineCapabilities-CTDe3LlQ.js","assets/signal-swyOrDkM.js","assets/clientSideDefaults-B7fGShzo.js","assets/EdgeProcessingWorker-C7g3lLDX.js","assets/InterleavedLayout-DiAet0DN.js","assets/BufferView-DOhKdt-N.js","assets/vec2-CurFBDJu.js","assets/types-D0PSWh4d.js","assets/Util-DRlRfUCu.js","assets/vec2f64-DA6GkJuH.js","assets/edgeProcessing-CU64r8kh.js","assets/deduplicate-B_YKqNj1.js","assets/Indices-BhOjxL0t.js","assets/VertexAttribute-BlT9lbVY.js","assets/enums-CxXC-vJk.js","assets/VertexElementDescriptor-BOD-G50G.js","assets/ElevationSamplerWorker-Be15mw3K.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/vertexSpaceConversion-DdxiyRap.js","assets/mat3-BNGRf_pC.js","assets/mat3f64-q3fE-ZOt.js","assets/mat4f64-CSKppSlJ.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/vec3-C6eb5QY9.js","assets/projection-Ch_noS-l.js","assets/DoubleArray-D2IDWC15.js","assets/vec4-n1PBj5SL.js","assets/FeatureServiceSnappingSourceWorker-C2uDe4AH.js","assets/UpdatingHandles-D3xBFsF5.js","assets/pbfQueryUtils-D2YxxSfN.js","assets/pbf-DwSF5Y_G.js","assets/query-CQvaiR4K.js","assets/GeoJSONSourceWorker-CYe2sh7G.js","assets/geojson-BRJeQduY.js","assets/sourceUtils-DYgU-2mb.js","assets/MemorySourceWorker-DNQM5G5E.js","assets/objectIdUtils-4dd1rf9p.js","assets/PBFDecoderWorker-BSA6vg2a.js","assets/FeaturePipelineWorker-Duw9IYNq.js","assets/TileKey-D9UF-PsB.js","assets/QueueProcessor-DTdXzd4o.js","assets/ReactiveMap-C7QHrros.js","assets/GeometryUtils-6Cd4d7Hy.js","assets/vec2f32-DxfkRbjY.js","assets/TurboLine-BJPIEzB-.js","assets/earcut-BqgeR2O3.js","assets/BindType-BmZEZMMh.js","assets/ogcFeatureUtils-CuyMjEno.js","assets/createConnection-BFN_9xe7.js","assets/PointCloudWorker-CH9o2MwU.js","assets/quat-BYKy26Om.js","assets/quatf64-Bdb9ZJJK.js","assets/PointCloudUniqueValueRenderer-D8kmwCRw.js","assets/I3SBinaryReader-BNZLVsC-.js","assets/orientedBoundingBox-RPlI7sU4.js","assets/plane-aHrUkISy.js","assets/RasterWorker-DW_GcoB6.js","assets/dataUtils-DYQC_Kql.js","assets/PolynomialTransform-BIabQn8W.js","assets/SceneLayerSnappingSourceWorker-DR4W7bTo.js","assets/lineSegment-3ivVGQNc.js","assets/sphere-DoGSV0K5.js","assets/SceneLayerWorker-cfLEu3Xv.js","assets/I3SUtil-7z-2YOel.js","assets/NormalAttribute.glsl-DMc-kXcx.js","assets/WFSSourceWorker-BjXlAna2.js","assets/wfsUtils-tW6kf0DT.js","assets/xmlUtils-CtUoQO7q.js","assets/WorkerTileHandler-CMLMj5UP.js","assets/StyleRepository-B96C0kSY.js","assets/deleteForwardEdits-7rqcQUX6.js","assets/editingSupport-BRaaDEoU.js","assets/infoFor3D-DsOdlPuA.js","assets/layersLoader-7Bk9G4Kh.js","assets/layersCreator-B7QnC6RR.js","assets/jsonContext-SE-5k22x.js","assets/featureLayerUtils-CRRc6-7r.js","assets/originUtils-D69mHv66.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/utils-V4fw_T9z.js","assets/saveAPIKeyUtils-CqAN5-r5.js","assets/saveUtils-oCA1ZjYH.js","assets/FeatureLayerSource-DHybgE9g.js","assets/MeshTransform-CnKLNqg-.js","assets/QueryTask-CH4nGmOK.js","assets/executeQueryJSON-CCbDrFwh.js","assets/executeQueryPBF-B-eLVWOv.js"])))=>i.map(i=>d[i]); +var T8e=Object.defineProperty;var I8e=(t,e,r)=>e in t?T8e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S8=(t,e,r)=>I8e(t,typeof e!="symbol"?e+"":e,r);function R8e(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Iue={exports:{}},zP={},Rue={exports:{}},uo={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var MS=Symbol.for("react.element"),L8e=Symbol.for("react.portal"),k8e=Symbol.for("react.fragment"),A8e=Symbol.for("react.strict_mode"),P8e=Symbol.for("react.profiler"),$8e=Symbol.for("react.provider"),O8e=Symbol.for("react.context"),N8e=Symbol.for("react.forward_ref"),D8e=Symbol.for("react.suspense"),F8e=Symbol.for("react.memo"),z8e=Symbol.for("react.lazy"),KK=Symbol.iterator;function B8e(t){return t===null||typeof t!="object"?null:(t=KK&&t[KK]||t["@@iterator"],typeof t=="function"?t:null)}var Lue={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kue=Object.assign,Aue={};function jw(t,e,r){this.props=t,this.context=e,this.refs=Aue,this.updater=r||Lue}jw.prototype.isReactComponent={};jw.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};jw.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Pue(){}Pue.prototype=jw.prototype;function nW(t,e,r){this.props=t,this.context=e,this.refs=Aue,this.updater=r||Lue}var iW=nW.prototype=new Pue;iW.constructor=nW;kue(iW,jw.prototype);iW.isPureReactComponent=!0;var QK=Array.isArray,$ue=Object.prototype.hasOwnProperty,sW={current:null},Oue={key:!0,ref:!0,__self:!0,__source:!0};function Nue(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)$ue.call(e,n)&&!Oue.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1>>1,rr=He[pt];if(0>>1;pti(pr,lt))Uti(tr,pr)?(He[pt]=tr,He[Ut]=lt,pt=Ut):(He[pt]=pr,He[Je]=lt,pt=Je);else if(Uti(tr,lt))He[pt]=tr,He[Ut]=lt,pt=Ut;else break e}}return Lt}function i(He,Lt){var lt=He.sortIndex-Lt.sortIndex;return lt!==0?lt:He.id-Lt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,f=null,m=3,v=!1,b=!1,M=!1,O=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(He){for(var Lt=r(u);Lt!==null;){if(Lt.callback===null)n(u);else if(Lt.startTime<=He)n(u),Lt.sortIndex=Lt.expirationTime,e(l,Lt);else break;Lt=r(u)}}function H(He){if(M=!1,j(He),!b)if(r(l)!==null)b=!0,Fe(W);else{var Lt=r(u);Lt!==null&&We(H,Lt.startTime-He)}}function W(He,Lt){b=!1,M&&(M=!1,I(pe),pe=-1),v=!0;var lt=m;try{for(j(Lt),f=r(l);f!==null&&(!(f.expirationTime>Lt)||He&&!ee());){var pt=f.callback;if(typeof pt=="function"){f.callback=null,m=f.priorityLevel;var rr=pt(f.expirationTime<=Lt);Lt=t.unstable_now(),typeof rr=="function"?f.callback=rr:f===r(l)&&n(l),j(Lt)}else n(l);f=r(l)}if(f!==null)var Tt=!0;else{var Je=r(u);Je!==null&&We(H,Je.startTime-Lt),Tt=!1}return Tt}finally{f=null,m=lt,v=!1}}var re=!1,K=null,pe=-1,ge=5,fe=-1;function ee(){return!(t.unstable_now()-feHe||125pt?(He.sortIndex=lt,e(u,He),r(l)===null&&He===r(u)&&(M?(I(pe),pe=-1):M=!0,We(H,lt-pt))):(He.sortIndex=rr,e(l,He),b||v||(b=!0,Fe(W))),He},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(He){var Lt=m;return function(){var lt=m;m=Lt;try{return He.apply(this,arguments)}finally{m=lt}}}})(Vue);jue.exports=Vue;var J8e=jue.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var K8e=E,Of=J8e;function _n(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$B=Object.prototype.hasOwnProperty,Q8e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,tQ={},rQ={};function ebe(t){return $B.call(rQ,t)?!0:$B.call(tQ,t)?!1:Q8e.test(t)?rQ[t]=!0:(tQ[t]=!0,!1)}function tbe(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function rbe(t,e,r,n){if(e===null||typeof e>"u"||tbe(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function _d(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Vc={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Vc[t]=new _d(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Vc[e]=new _d(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Vc[t]=new _d(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Vc[t]=new _d(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Vc[t]=new _d(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Vc[t]=new _d(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Vc[t]=new _d(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Vc[t]=new _d(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Vc[t]=new _d(t,5,!1,t.toLowerCase(),null,!1,!1)});var aW=/[\-:]([a-z])/g;function lW(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(aW,lW);Vc[e]=new _d(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aW,lW);Vc[e]=new _d(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aW,lW);Vc[e]=new _d(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Vc[t]=new _d(t,1,!1,t.toLowerCase(),null,!1,!1)});Vc.xlinkHref=new _d("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Vc[t]=new _d(t,1,!1,t.toLowerCase(),null,!0,!0)});function uW(t,e,r,n){var i=Vc.hasOwnProperty(e)?Vc[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{xD=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?db(t):""}function nbe(t){switch(t.tag){case 5:return db(t.type);case 16:return db("Lazy");case 13:return db("Suspense");case 19:return db("SuspenseList");case 0:case 2:case 15:return t=wD(t.type,!1),t;case 11:return t=wD(t.type.render,!1),t;case 1:return t=wD(t.type,!0),t;default:return""}}function FB(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case t4:return"Fragment";case e4:return"Portal";case OB:return"Profiler";case cW:return"StrictMode";case NB:return"Suspense";case DB:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Gue:return(t.displayName||"Context")+".Consumer";case Hue:return(t._context.displayName||"Context")+".Provider";case hW:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case dW:return e=t.displayName||null,e!==null?e:FB(t.type)||"Memo";case Mv:e=t._payload,t=t._init;try{return FB(t(e))}catch{}}return null}function ibe(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return FB(e);case 8:return e===cW?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function C2(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Wue(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function sbe(t){var e=Wue(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function sT(t){t._valueTracker||(t._valueTracker=sbe(t))}function Zue(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Wue(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function ck(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zB(t,e){var r=e.checked;return Al({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function iQ(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=C2(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Yue(t,e){e=e.checked,e!=null&&uW(t,"checked",e,!1)}function BB(t,e){Yue(t,e);var r=C2(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?jB(t,e.type,r):e.hasOwnProperty("defaultValue")&&jB(t,e.type,C2(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function sQ(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function jB(t,e,r){(e!=="number"||ck(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var fb=Array.isArray;function E4(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=oT.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function iC(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var g6={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},obe=["Webkit","ms","Moz","O"];Object.keys(g6).forEach(function(t){obe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),g6[e]=g6[t]})});function Que(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||g6.hasOwnProperty(t)&&g6[t]?(""+e).trim():e+"px"}function ece(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Que(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var abe=Al({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function HB(t,e){if(e){if(abe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(_n(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(_n(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(_n(61))}if(e.style!=null&&typeof e.style!="object")throw Error(_n(62))}}function GB(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qB=null;function fW(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var WB=null,M4=null,T4=null;function lQ(t){if(t=RS(t)){if(typeof WB!="function")throw Error(_n(280));var e=t.stateNode;e&&(e=HP(e),WB(t.stateNode,t.type,e))}}function tce(t){M4?T4?T4.push(t):T4=[t]:M4=t}function rce(){if(M4){var t=M4,e=T4;if(T4=M4=null,lQ(t),e)for(t=0;t>>=0,t===0?32:31-(vbe(t)/_be|0)|0}var aT=64,lT=4194304;function pb(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function pk(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=pb(a):(s&=o,s!==0&&(n=pb(s)))}else o=r&~i,o!==0?n=pb(o):s!==0&&(n=pb(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function TS(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-V1(e),t[e]=r}function Cbe(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=v6),yQ=" ",vQ=!1;function bce(t,e){switch(t){case"keyup":return Jbe.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cce(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var r4=!1;function Qbe(t,e){switch(t){case"compositionend":return Cce(e);case"keypress":return e.which!==32?null:(vQ=!0,yQ);case"textInput":return t=e.data,t===yQ&&vQ?null:t;default:return null}}function e6e(t,e){if(r4)return t==="compositionend"||!wW&&bce(t,e)?(t=xce(),SR=vW=Bv=null,r4=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bQ(r)}}function Tce(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Tce(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ice(){for(var t=window,e=ck();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=ck(t.document)}return e}function bW(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function u6e(t){var e=Ice(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Tce(r.ownerDocument.documentElement,r)){if(n!==null&&bW(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=CQ(r,s);var o=CQ(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,n4=null,QB=null,x6=null,ej=!1;function SQ(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ej||n4==null||n4!==ck(n)||(n=n4,"selectionStart"in n&&bW(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),x6&&cC(x6,n)||(x6=n,n=yk(QB,"onSelect"),0o4||(t.current=oj[o4],oj[o4]=null,o4--)}function Oa(t,e){o4++,oj[o4]=t.current,t.current=e}var S2={},Ah=q2(S2),Ud=q2(!1),h5=S2;function nw(t,e){var r=t.type.contextTypes;if(!r)return S2;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Hd(t){return t=t.childContextTypes,t!=null}function _k(){Ka(Ud),Ka(Ah)}function kQ(t,e,r){if(Ah.current!==S2)throw Error(_n(168));Oa(Ah,e),Oa(Ud,r)}function Dce(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(_n(108,ibe(t)||"Unknown",i));return Al({},r,n)}function xk(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||S2,h5=Ah.current,Oa(Ah,t),Oa(Ud,Ud.current),!0}function AQ(t,e,r){var n=t.stateNode;if(!n)throw Error(_n(169));r?(t=Dce(t,e,h5),n.__reactInternalMemoizedMergedChildContext=t,Ka(Ud),Ka(Ah),Oa(Ah,t)):Ka(Ud),Oa(Ud,r)}var Lg=null,GP=!1,OD=!1;function Fce(t){Lg===null?Lg=[t]:Lg.push(t)}function w6e(t){GP=!0,Fce(t)}function W2(){if(!OD&&Lg!==null){OD=!0;var t=0,e=ha;try{var r=Lg;for(ha=1;t>=o,i-=o,Og=1<<32-V1(e)+i|r<pe?(ge=K,K=null):ge=K.sibling;var fe=m(I,K,j[pe],H);if(fe===null){K===null&&(K=ge);break}t&&K&&fe.alternate===null&&e(I,K),A=s(fe,A,pe),re===null?W=fe:re.sibling=fe,re=fe,K=ge}if(pe===j.length)return r(I,K),gl&&s3(I,pe),W;if(K===null){for(;pepe?(ge=K,K=null):ge=K.sibling;var ee=m(I,K,fe.value,H);if(ee===null){K===null&&(K=ge);break}t&&K&&ee.alternate===null&&e(I,K),A=s(ee,A,pe),re===null?W=ee:re.sibling=ee,re=ee,K=ge}if(fe.done)return r(I,K),gl&&s3(I,pe),W;if(K===null){for(;!fe.done;pe++,fe=j.next())fe=f(I,fe.value,H),fe!==null&&(A=s(fe,A,pe),re===null?W=fe:re.sibling=fe,re=fe);return gl&&s3(I,pe),W}for(K=n(I,K);!fe.done;pe++,fe=j.next())fe=v(K,I,pe,fe.value,H),fe!==null&&(t&&fe.alternate!==null&&K.delete(fe.key===null?pe:fe.key),A=s(fe,A,pe),re===null?W=fe:re.sibling=fe,re=fe);return t&&K.forEach(function(be){return e(I,be)}),gl&&s3(I,pe),W}function O(I,A,j,H){if(typeof j=="object"&&j!==null&&j.type===t4&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case iT:e:{for(var W=j.key,re=A;re!==null;){if(re.key===W){if(W=j.type,W===t4){if(re.tag===7){r(I,re.sibling),A=i(re,j.props.children),A.return=I,I=A;break e}}else if(re.elementType===W||typeof W=="object"&&W!==null&&W.$$typeof===Mv&&OQ(W)===re.type){r(I,re.sibling),A=i(re,j.props),A.ref=L8(I,re,j),A.return=I,I=A;break e}r(I,re);break}else e(I,re);re=re.sibling}j.type===t4?(A=Q3(j.props.children,I.mode,H,j.key),A.return=I,I=A):(H=AR(j.type,j.key,j.props,null,I.mode,H),H.ref=L8(I,A,j),H.return=I,I=H)}return o(I);case e4:e:{for(re=j.key;A!==null;){if(A.key===re)if(A.tag===4&&A.stateNode.containerInfo===j.containerInfo&&A.stateNode.implementation===j.implementation){r(I,A.sibling),A=i(A,j.children||[]),A.return=I,I=A;break e}else{r(I,A);break}else e(I,A);A=A.sibling}A=UD(j,I.mode,H),A.return=I,I=A}return o(I);case Mv:return re=j._init,O(I,A,re(j._payload),H)}if(fb(j))return b(I,A,j,H);if(E8(j))return M(I,A,j,H);mT(I,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,A!==null&&A.tag===6?(r(I,A.sibling),A=i(A,j),A.return=I,I=A):(r(I,A),A=VD(j,I.mode,H),A.return=I,I=A),o(I)):r(I,A)}return O}var sw=Vce(!0),Uce=Vce(!1),Ck=q2(null),Sk=null,u4=null,MW=null;function TW(){MW=u4=Sk=null}function IW(t){var e=Ck.current;Ka(Ck),t._currentValue=e}function uj(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function R4(t,e){Sk=t,MW=u4=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Vd=!0),t.firstContext=null)}function Op(t){var e=t._currentValue;if(MW!==t)if(t={context:t,memoizedValue:e,next:null},u4===null){if(Sk===null)throw Error(_n(308));u4=t,Sk.dependencies={lanes:0,firstContext:t}}else u4=u4.next=t;return e}var H3=null;function RW(t){H3===null?H3=[t]:H3.push(t)}function Hce(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,RW(e)):(r.next=i.next,i.next=r),e.interleaved=r,Qg(t,n)}function Qg(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Tv=!1;function LW(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gce(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Bg(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function o2(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Po&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,Qg(t,r)}return i=n.interleaved,i===null?(e.next=e,RW(n)):(e.next=i.next,i.next=e),n.interleaved=e,Qg(t,r)}function MR(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,mW(t,r)}}function NQ(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Ek(t,e,r,n){var i=t.updateQueue;Tv=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,d=u=l=null,a=s;do{var m=a.lane,v=a.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=t,M=a;switch(m=e,v=r,M.tag){case 1:if(b=M.payload,typeof b=="function"){f=b.call(v,f,m);break e}f=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=M.payload,m=typeof b=="function"?b.call(v,f,m):b,m==null)break e;f=Al({},f,m);break e;case 2:Tv=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,m=i.effects,m===null?i.effects=[a]:m.push(a))}else v={eventTime:v,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=v,l=f):d=d.next=v,o|=m;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;m=a,a=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);p5|=o,t.lanes=o,t.memoizedState=f}}function DQ(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=DD.transition;DD.transition={};try{t(!1),e()}finally{ha=r,DD.transition=n}}function lhe(){return Np().memoizedState}function E6e(t,e,r){var n=l2(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},uhe(t))che(e,r);else if(r=Hce(t,e,r,n),r!==null){var i=dd();U1(r,t,n,i),hhe(r,e,n)}}function M6e(t,e,r){var n=l2(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(uhe(t))che(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,X1(a,o)){var l=e.interleaved;l===null?(i.next=i,RW(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=Hce(t,e,i,n),r!==null&&(i=dd(),U1(r,t,n,i),hhe(r,e,n))}}function uhe(t){var e=t.alternate;return t===Ll||e!==null&&e===Ll}function che(t,e){w6=Tk=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function hhe(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,mW(t,r)}}var Ik={readContext:Op,useCallback:dh,useContext:dh,useEffect:dh,useImperativeHandle:dh,useInsertionEffect:dh,useLayoutEffect:dh,useMemo:dh,useReducer:dh,useRef:dh,useState:dh,useDebugValue:dh,useDeferredValue:dh,useTransition:dh,useMutableSource:dh,useSyncExternalStore:dh,useId:dh,unstable_isNewReconciler:!1},T6e={readContext:Op,useCallback:function(t,e){return B0().memoizedState=[t,e===void 0?null:e],t},useContext:Op,useEffect:zQ,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,IR(4194308,4,nhe.bind(null,e,t),r)},useLayoutEffect:function(t,e){return IR(4194308,4,t,e)},useInsertionEffect:function(t,e){return IR(4,2,t,e)},useMemo:function(t,e){var r=B0();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=B0();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=E6e.bind(null,Ll,t),[n.memoizedState,t]},useRef:function(t){var e=B0();return t={current:t},e.memoizedState=t},useState:FQ,useDebugValue:FW,useDeferredValue:function(t){return B0().memoizedState=t},useTransition:function(){var t=FQ(!1),e=t[0];return t=S6e.bind(null,t[1]),B0().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ll,i=B0();if(gl){if(r===void 0)throw Error(_n(407));r=r()}else{if(r=e(),pc===null)throw Error(_n(349));f5&30||Yce(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,zQ(Jce.bind(null,n,s,t),[t]),n.flags|=2048,vC(9,Xce.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=B0(),e=pc.identifierPrefix;if(gl){var r=Ng,n=Og;r=(n&~(1<<32-V1(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=gC++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Z0]=e,t[fC]=n,whe(t,e,!1,!1),e.stateNode=t;e:{switch(o=GB(r,n),r){case"dialog":Ga("cancel",t),Ga("close",t),i=n;break;case"iframe":case"object":case"embed":Ga("load",t),i=n;break;case"video":case"audio":for(i=0;ilw&&(e.flags|=128,n=!0,k8(s,!1),e.lanes=4194304)}else{if(!n)if(t=Mk(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),k8(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!gl)return fh(e),null}else 2*su()-s.renderingStartTime>lw&&r!==1073741824&&(e.flags|=128,n=!0,k8(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=su(),e.sibling=null,r=Sl.current,Oa(Sl,n?r&1|2:r&1),e):(fh(e),null);case 22:case 23:return HW(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xf&1073741824&&(fh(e),e.subtreeFlags&6&&(e.flags|=8192)):fh(e),null;case 24:return null;case 25:return null}throw Error(_n(156,e.tag))}function O6e(t,e){switch(SW(e),e.tag){case 1:return Hd(e.type)&&_k(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ow(),Ka(Ud),Ka(Ah),PW(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return AW(e),null;case 13:if(Ka(Sl),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(_n(340));iw()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ka(Sl),null;case 4:return ow(),null;case 10:return IW(e.type._context),null;case 22:case 23:return HW(),null;case 24:return null;default:return null}}var yT=!1,Mh=!1,N6e=typeof WeakSet=="function"?WeakSet:Set,Mi=null;function c4(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ul(t,e,n)}else r.current=null}function vj(t,e,r){try{r()}catch(n){Ul(t,e,n)}}var XQ=!1;function D6e(t,e){if(tj=mk,t=Ice(),bW(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,f=t,m=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)m=f,f=v;for(;;){if(f===t)break t;if(m===r&&++u===i&&(a=o),m===s&&++d===n&&(l=o),(v=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(rj={focusedElem:t,selectionRange:r},mk=!1,Mi=e;Mi!==null;)if(e=Mi,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Mi=t;else for(;Mi!==null;){e=Mi;try{var b=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var M=b.memoizedProps,O=b.memoizedState,I=e.stateNode,A=I.getSnapshotBeforeUpdate(e.elementType===e.type?M:L1(e.type,M),O);I.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var j=e.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_n(163))}}catch(H){Ul(e,e.return,H)}if(t=e.sibling,t!==null){t.return=e.return,Mi=t;break}Mi=e.return}return b=XQ,XQ=!1,b}function b6(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&vj(e,r,s)}i=i.next}while(i!==n)}}function ZP(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function _j(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function She(t){var e=t.alternate;e!==null&&(t.alternate=null,She(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Z0],delete e[fC],delete e[sj],delete e[_6e],delete e[x6e])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ehe(t){return t.tag===5||t.tag===3||t.tag===4}function JQ(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ehe(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function xj(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=vk));else if(n!==4&&(t=t.child,t!==null))for(xj(t,e,r),t=t.sibling;t!==null;)xj(t,e,r),t=t.sibling}function wj(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(wj(t,e,r),t=t.sibling;t!==null;)wj(t,e,r),t=t.sibling}var $c=null,A1=!1;function Vy(t,e,r){for(r=r.child;r!==null;)Mhe(t,e,r),r=r.sibling}function Mhe(t,e,r){if(tm&&typeof tm.onCommitFiberUnmount=="function")try{tm.onCommitFiberUnmount(BP,r)}catch{}switch(r.tag){case 5:Mh||c4(r,e);case 6:var n=$c,i=A1;$c=null,Vy(t,e,r),$c=n,A1=i,$c!==null&&(A1?(t=$c,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):$c.removeChild(r.stateNode));break;case 18:$c!==null&&(A1?(t=$c,r=r.stateNode,t.nodeType===8?$D(t.parentNode,r):t.nodeType===1&&$D(t,r),lC(t)):$D($c,r.stateNode));break;case 4:n=$c,i=A1,$c=r.stateNode.containerInfo,A1=!0,Vy(t,e,r),$c=n,A1=i;break;case 0:case 11:case 14:case 15:if(!Mh&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&vj(r,e,o),i=i.next}while(i!==n)}Vy(t,e,r);break;case 1:if(!Mh&&(c4(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ul(r,e,a)}Vy(t,e,r);break;case 21:Vy(t,e,r);break;case 22:r.mode&1?(Mh=(n=Mh)||r.memoizedState!==null,Vy(t,e,r),Mh=n):Vy(t,e,r);break;default:Vy(t,e,r)}}function KQ(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new N6e),e.forEach(function(n){var i=q6e.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function d1(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=su()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*z6e(n/1960))-n,10t?16:t,jv===null)var n=!1;else{if(t=jv,jv=null,kk=0,Po&6)throw Error(_n(331));var i=Po;for(Po|=4,Mi=t.current;Mi!==null;){var s=Mi,o=s.child;if(Mi.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lsu()-VW?K3(t,0):jW|=r),Gd(t,e)}function $he(t,e){e===0&&(t.mode&1?(e=lT,lT<<=1,!(lT&130023424)&&(lT=4194304)):e=1);var r=dd();t=Qg(t,e),t!==null&&(TS(t,e,r),Gd(t,r))}function G6e(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),$he(t,r)}function q6e(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(_n(314))}n!==null&&n.delete(e),$he(t,r)}var Ohe;Ohe=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ud.current)Vd=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Vd=!1,P6e(t,e,r);Vd=!!(t.flags&131072)}else Vd=!1,gl&&e.flags&1048576&&zce(e,bk,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;RR(t,e),t=e.pendingProps;var i=nw(e,Ah.current);R4(e,r),i=OW(null,e,n,t,i,r);var s=NW();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Hd(n)?(s=!0,xk(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,LW(e),i.updater=WP,e.stateNode=i,i._reactInternals=e,hj(e,n,t,r),e=pj(null,e,n,!0,s,r)):(e.tag=0,gl&&s&&CW(e),id(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(RR(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=Z6e(n),t=L1(n,t),i){case 0:e=fj(null,e,n,t,r);break e;case 1:e=WQ(null,e,n,t,r);break e;case 11:e=GQ(null,e,n,t,r);break e;case 14:e=qQ(null,e,n,L1(n.type,t),r);break e}throw Error(_n(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:L1(n,i),fj(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:L1(n,i),WQ(t,e,n,i,r);case 3:e:{if(vhe(e),t===null)throw Error(_n(387));n=e.pendingProps,s=e.memoizedState,i=s.element,Gce(t,e),Ek(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=aw(Error(_n(423)),e),e=ZQ(t,e,n,r,i);break e}else if(n!==i){i=aw(Error(_n(424)),e),e=ZQ(t,e,n,r,i);break e}else for(Tf=s2(e.stateNode.containerInfo.firstChild),Lf=e,gl=!0,N1=null,r=Uce(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(iw(),n===i){e=ey(t,e,r);break e}id(t,e,n,r)}e=e.child}return e;case 5:return qce(e),t===null&&lj(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,nj(n,i)?o=null:s!==null&&nj(n,s)&&(e.flags|=32),yhe(t,e),id(t,e,o,r),e.child;case 6:return t===null&&lj(e),null;case 13:return _he(t,e,r);case 4:return kW(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=sw(e,null,n,r):id(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:L1(n,i),GQ(t,e,n,i,r);case 7:return id(t,e,e.pendingProps,r),e.child;case 8:return id(t,e,e.pendingProps.children,r),e.child;case 12:return id(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Oa(Ck,n._currentValue),n._currentValue=o,s!==null)if(X1(s.value,o)){if(s.children===i.children&&!Ud.current){e=ey(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Bg(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),uj(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(_n(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),uj(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}id(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,R4(e,r),i=Op(i),n=n(i),e.flags|=1,id(t,e,n,r),e.child;case 14:return n=e.type,i=L1(n,e.pendingProps),i=L1(n.type,i),qQ(t,e,n,i,r);case 15:return mhe(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:L1(n,i),RR(t,e),e.tag=1,Hd(n)?(t=!0,xk(e)):t=!1,R4(e,r),dhe(e,n,i),hj(e,n,i,r),pj(null,e,n,!0,t,r);case 19:return xhe(t,e,r);case 22:return ghe(t,e,r)}throw Error(_n(156,e.tag))};function Nhe(t,e){return uce(t,e)}function W6e(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ep(t,e,r,n){return new W6e(t,e,r,n)}function qW(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Z6e(t){if(typeof t=="function")return qW(t)?1:0;if(t!=null){if(t=t.$$typeof,t===hW)return 11;if(t===dW)return 14}return 2}function u2(t,e){var r=t.alternate;return r===null?(r=Ep(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function AR(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")qW(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case t4:return Q3(r.children,i,s,e);case cW:o=8,i|=8;break;case OB:return t=Ep(12,r,e,i|2),t.elementType=OB,t.lanes=s,t;case NB:return t=Ep(13,r,e,i),t.elementType=NB,t.lanes=s,t;case DB:return t=Ep(19,r,e,i),t.elementType=DB,t.lanes=s,t;case que:return XP(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Hue:o=10;break e;case Gue:o=9;break e;case hW:o=11;break e;case dW:o=14;break e;case Mv:o=16,n=null;break e}throw Error(_n(130,t==null?t:typeof t,""))}return e=Ep(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Q3(t,e,r,n){return t=Ep(7,t,n,e),t.lanes=r,t}function XP(t,e,r,n){return t=Ep(22,t,n,e),t.elementType=que,t.lanes=r,t.stateNode={isHidden:!1},t}function VD(t,e,r){return t=Ep(6,t,null,e),t.lanes=r,t}function UD(t,e,r){return e=Ep(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Y6e(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=CD(0),this.expirationTimes=CD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CD(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function WW(t,e,r,n,i,s,o,a,l){return t=new Y6e(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ep(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},LW(s),t}function X6e(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bhe)}catch(t){console.error(t)}}Bhe(),Bue.exports=Df;var z5=Bue.exports;const tCe=H2(z5);var jhe,oee=z5;jhe=oee.createRoot,oee.hydrateRoot;function rCe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function JW(...t){return e=>t.forEach(r=>rCe(r,e))}function So(...t){return E.useCallback(JW(...t),t)}var qd=E.forwardRef((t,e)=>{const{children:r,...n}=t,i=E.Children.toArray(r),s=i.find(nCe);if(s){const o=s.props.children,a=i.map(l=>l===s?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:l);return oe.jsx(Mj,{...n,ref:e,children:E.isValidElement(o)?E.cloneElement(o,void 0,a):null})}return oe.jsx(Mj,{...n,ref:e,children:r})});qd.displayName="Slot";var Mj=E.forwardRef((t,e)=>{const{children:r,...n}=t;if(E.isValidElement(r)){const i=sCe(r);return E.cloneElement(r,{...iCe(n,r.props),ref:e?JW(e,i):i})}return E.Children.count(r)>1?E.Children.only(null):null});Mj.displayName="SlotClone";var Vhe=({children:t})=>oe.jsx(oe.Fragment,{children:t});function nCe(t){return E.isValidElement(t)&&t.type===Vhe}function iCe(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}function sCe(t){var n,i;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var oCe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],no=oCe.reduce((t,e)=>{const r=E.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?qd:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),oe.jsx(a,{...o,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function aCe(t,e){t&&z5.flushSync(()=>t.dispatchEvent(e))}var lCe="VisuallyHidden",t$=E.forwardRef((t,e)=>oe.jsx(no.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));t$.displayName=lCe;var uCe=t$,Uhe={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var n=[],i=0;ib,Object.values(b));return oe.jsx(M.Provider,{value:O,children:v})}function d(f,m){const v=(m==null?void 0:m[t][l])||a,b=E.useContext(v);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,d]}const i=()=>{const s=r.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,hCe(i,...e)]}function hCe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ls(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}var Zu=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},dCe=Fue.useId||(()=>{}),fCe=0;function kS(t){const[e,r]=E.useState(dCe());return Zu(()=>{t||r(n=>n??String(fCe++))},[t]),t||(e?`radix-${e}`:"")}function Nc(t){const e=E.useRef(t);return E.useEffect(()=>{e.current=t}),E.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function ty({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=pCe({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Nc(r),l=E.useCallback(u=>{if(s){const f=typeof u=="function"?u(t):u;f!==t&&a(f)}else i(u)},[s,t,i,a]);return[o,l]}function pCe({defaultProp:t,onChange:e}){const r=E.useState(t),[n]=r,i=E.useRef(n),s=Nc(e);return E.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function mCe(t,e=globalThis==null?void 0:globalThis.document){const r=Nc(t);E.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var gCe="DismissableLayer",Tj="dismissableLayer.update",yCe="dismissableLayer.pointerDownOutside",vCe="dismissableLayer.focusOutside",aee,Hhe=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),KW=E.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=E.useContext(Hhe),[d,f]=E.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),b=So(e,K=>f(K)),M=Array.from(u.layers),[O]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),I=M.indexOf(O),A=d?M.indexOf(d):-1,j=u.layersWithOutsidePointerEventsDisabled.size>0,H=A>=I,W=wCe(K=>{const pe=K.target,ge=[...u.branches].some(fe=>fe.contains(pe));!H||ge||(i==null||i(K),o==null||o(K),K.defaultPrevented||a==null||a())},m),re=bCe(K=>{const pe=K.target;[...u.branches].some(fe=>fe.contains(pe))||(s==null||s(K),o==null||o(K),K.defaultPrevented||a==null||a())},m);return mCe(K=>{A===u.layers.size-1&&(n==null||n(K),!K.defaultPrevented&&a&&(K.preventDefault(),a()))},m),E.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(aee=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),lee(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=aee)}},[d,m,r,u]),E.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),lee())},[d,u]),E.useEffect(()=>{const K=()=>v({});return document.addEventListener(Tj,K),()=>document.removeEventListener(Tj,K)},[]),oe.jsx(no.div,{...l,ref:b,style:{pointerEvents:j?H?"auto":"none":void 0,...t.style},onFocusCapture:Ls(t.onFocusCapture,re.onFocusCapture),onBlurCapture:Ls(t.onBlurCapture,re.onBlurCapture),onPointerDownCapture:Ls(t.onPointerDownCapture,W.onPointerDownCapture)})});KW.displayName=gCe;var _Ce="DismissableLayerBranch",xCe=E.forwardRef((t,e)=>{const r=E.useContext(Hhe),n=E.useRef(null),i=So(e,n);return E.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),oe.jsx(no.div,{...t,ref:i})});xCe.displayName=_Ce;function wCe(t,e=globalThis==null?void 0:globalThis.document){const r=Nc(t),n=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){Ghe(yCe,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function bCe(t,e=globalThis==null?void 0:globalThis.document){const r=Nc(t),n=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!n.current&&Ghe(vCe,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function lee(){const t=new CustomEvent(Tj);document.dispatchEvent(t)}function Ghe(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?aCe(i,s):i.dispatchEvent(s)}var HD="focusScope.autoFocusOnMount",GD="focusScope.autoFocusOnUnmount",uee={bubbles:!1,cancelable:!0},CCe="FocusScope",qhe=E.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=E.useState(null),u=Nc(i),d=Nc(s),f=E.useRef(null),m=So(e,M=>l(M)),v=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let M=function(j){if(v.paused||!a)return;const H=j.target;a.contains(H)?f.current=H:uv(f.current,{select:!0})},O=function(j){if(v.paused||!a)return;const H=j.relatedTarget;H!==null&&(a.contains(H)||uv(f.current,{select:!0}))},I=function(j){if(document.activeElement===document.body)for(const W of j)W.removedNodes.length>0&&uv(a)};document.addEventListener("focusin",M),document.addEventListener("focusout",O);const A=new MutationObserver(I);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",M),document.removeEventListener("focusout",O),A.disconnect()}}},[n,a,v.paused]),E.useEffect(()=>{if(a){hee.add(v);const M=document.activeElement;if(!a.contains(M)){const I=new CustomEvent(HD,uee);a.addEventListener(HD,u),a.dispatchEvent(I),I.defaultPrevented||(SCe(RCe(Whe(a)),{select:!0}),document.activeElement===M&&uv(a))}return()=>{a.removeEventListener(HD,u),setTimeout(()=>{const I=new CustomEvent(GD,uee);a.addEventListener(GD,d),a.dispatchEvent(I),I.defaultPrevented||uv(M??document.body,{select:!0}),a.removeEventListener(GD,d),hee.remove(v)},0)}}},[a,u,d,v]);const b=E.useCallback(M=>{if(!r&&!n||v.paused)return;const O=M.key==="Tab"&&!M.altKey&&!M.ctrlKey&&!M.metaKey,I=document.activeElement;if(O&&I){const A=M.currentTarget,[j,H]=ECe(A);j&&H?!M.shiftKey&&I===H?(M.preventDefault(),r&&uv(j,{select:!0})):M.shiftKey&&I===j&&(M.preventDefault(),r&&uv(H,{select:!0})):I===A&&M.preventDefault()}},[r,n,v.paused]);return oe.jsx(no.div,{tabIndex:-1,...o,ref:m,onKeyDown:b})});qhe.displayName=CCe;function SCe(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(uv(n,{select:e}),document.activeElement!==r)return}function ECe(t){const e=Whe(t),r=cee(e,t),n=cee(e.reverse(),t);return[r,n]}function Whe(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function cee(t,e){for(const r of t)if(!MCe(r,{upTo:e}))return r}function MCe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function TCe(t){return t instanceof HTMLInputElement&&"select"in t}function uv(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&TCe(t)&&e&&t.select()}}var hee=ICe();function ICe(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=dee(t,e),t.unshift(e)},remove(e){var r;t=dee(t,e),(r=t[0])==null||r.resume()}}}function dee(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function RCe(t){return t.filter(e=>e.tagName!=="A")}var LCe="Portal",Zhe=E.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[i,s]=E.useState(!1);Zu(()=>s(!0),[]);const o=r||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?tCe.createPortal(oe.jsx(no.div,{...n,ref:e}),o):null});Zhe.displayName=LCe;function kCe(t,e){return E.useReducer((r,n)=>e[r][n]??r,t)}var Z2=t=>{const{present:e,children:r}=t,n=ACe(e),i=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),s=So(n.ref,PCe(i));return typeof r=="function"||n.isPresent?E.cloneElement(i,{ref:s}):null};Z2.displayName="Presence";function ACe(t){const[e,r]=E.useState(),n=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),o=t?"mounted":"unmounted",[a,l]=kCe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=xT(n.current);s.current=a==="mounted"?u:"none"},[a]),Zu(()=>{const u=n.current,d=i.current;if(d!==t){const m=s.current,v=xT(u);t?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Zu(()=>{if(e){const u=f=>{const v=xT(n.current).includes(f.animationName);f.target===e&&v&&z5.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===e&&(s.current=xT(n.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function xT(t){return(t==null?void 0:t.animationName)||"none"}function PCe(t){var n,i;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var qD=0;function $Ce(){E.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??fee()),document.body.insertAdjacentElement("beforeend",t[1]??fee()),qD++,()=>{qD===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),qD--}},[])}function fee(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Y0=function(){return Y0=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return JCe;var e=KCe(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},eSe=Khe(),tSe=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(NCe,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(PR,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat($R,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(PR," .").concat(PR,` { + right: 0 `).concat(n,`; + } + + .`).concat($R," .").concat($R,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(DCe,": ").concat(a,`px; + } +`)},rSe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=E.useMemo(function(){return QCe(i)},[i]);return E.createElement(eSe,{styles:tSe(s,!e,i,r?"":"!important")})},Ij=!1;if(typeof window<"u")try{var wT=Object.defineProperty({},"passive",{get:function(){return Ij=!0,!0}});window.addEventListener("test",wT,wT),window.removeEventListener("test",wT,wT)}catch{Ij=!1}var j9=Ij?{passive:!1}:!1,nSe=function(t){return t.tagName==="TEXTAREA"},Qhe=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!nSe(t)&&r[e]==="visible")},iSe=function(t){return Qhe(t,"overflowY")},sSe=function(t){return Qhe(t,"overflowX")},mee=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=ede(t,n);if(i){var s=tde(t,n),o=s[1],a=s[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},oSe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},aSe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},ede=function(t,e){return t==="v"?iSe(e):sSe(e)},tde=function(t,e){return t==="v"?oSe(e):aSe(e)},lSe=function(t,e){return t==="h"&&e==="rtl"?-1:1},uSe=function(t,e,r,n,i){var s=lSe(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),u=!1,d=o>0,f=0,m=0;do{var v=tde(t,a),b=v[0],M=v[1],O=v[2],I=M-O-s*b;(b||I)&&ede(t,a)&&(f+=I,m+=b),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(m)<1||!i))&&(u=!0),u},bT=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},gee=function(t){return[t.deltaX,t.deltaY]},yee=function(t){return t&&"current"in t?t.current:t},cSe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},hSe=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},dSe=0,V9=[];function fSe(t){var e=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),i=E.useState(dSe++)[0],s=E.useState(Khe)[0],o=E.useRef(t);E.useEffect(function(){o.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var M=OCe([t.lockRef.current],(t.shards||[]).map(yee),!0).filter(Boolean);return M.forEach(function(O){return O.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),M.forEach(function(O){return O.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=E.useCallback(function(M,O){if("touches"in M&&M.touches.length===2)return!o.current.allowPinchZoom;var I=bT(M),A=r.current,j="deltaX"in M?M.deltaX:A[0]-I[0],H="deltaY"in M?M.deltaY:A[1]-I[1],W,re=M.target,K=Math.abs(j)>Math.abs(H)?"h":"v";if("touches"in M&&K==="h"&&re.type==="range")return!1;var pe=mee(K,re);if(!pe)return!0;if(pe?W=K:(W=K==="v"?"h":"v",pe=mee(K,re)),!pe)return!1;if(!n.current&&"changedTouches"in M&&(j||H)&&(n.current=W),!W)return!0;var ge=n.current||W;return uSe(ge,O,M,ge==="h"?j:H,!0)},[]),l=E.useCallback(function(M){var O=M;if(!(!V9.length||V9[V9.length-1]!==s)){var I="deltaY"in O?gee(O):bT(O),A=e.current.filter(function(W){return W.name===O.type&&(W.target===O.target||O.target===W.shadowParent)&&cSe(W.delta,I)})[0];if(A&&A.should){O.cancelable&&O.preventDefault();return}if(!A){var j=(o.current.shards||[]).map(yee).filter(Boolean).filter(function(W){return W.contains(O.target)}),H=j.length>0?a(O,j[0]):!o.current.noIsolation;H&&O.cancelable&&O.preventDefault()}}},[]),u=E.useCallback(function(M,O,I,A){var j={name:M,delta:O,target:I,should:A,shadowParent:pSe(I)};e.current.push(j),setTimeout(function(){e.current=e.current.filter(function(H){return H!==j})},1)},[]),d=E.useCallback(function(M){r.current=bT(M),n.current=void 0},[]),f=E.useCallback(function(M){u(M.type,gee(M),M.target,a(M,t.lockRef.current))},[]),m=E.useCallback(function(M){u(M.type,bT(M),M.target,a(M,t.lockRef.current))},[]);E.useEffect(function(){return V9.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,j9),document.addEventListener("touchmove",l,j9),document.addEventListener("touchstart",d,j9),function(){V9=V9.filter(function(M){return M!==s}),document.removeEventListener("wheel",l,j9),document.removeEventListener("touchmove",l,j9),document.removeEventListener("touchstart",d,j9)}},[]);var v=t.removeScrollBar,b=t.inert;return E.createElement(E.Fragment,null,b?E.createElement(s,{styles:hSe(i)}):null,v?E.createElement(rSe,{gapMode:t.gapMode}):null)}function pSe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const mSe=HCe(Jhe,fSe);var rde=E.forwardRef(function(t,e){return E.createElement(r$,Y0({},t,{ref:e,sideCar:mSe}))});rde.classNames=r$.classNames;var gSe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},U9=new WeakMap,CT=new WeakMap,ST={},XD=0,nde=function(t){return t&&(t.host||nde(t.parentNode))},ySe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=nde(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},vSe=function(t,e,r,n){var i=ySe(e,Array.isArray(t)?t:[t]);ST[r]||(ST[r]=new WeakMap);var s=ST[r],o=[],a=new Set,l=new Set(i),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var v=m.getAttribute(n),b=v!==null&&v!=="false",M=(U9.get(m)||0)+1,O=(s.get(m)||0)+1;U9.set(m,M),s.set(m,O),o.push(m),M===1&&b&&CT.set(m,!0),O===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(I){console.error("aria-hidden: cannot operate on ",m,I)}})};return d(e),a.clear(),XD++,function(){o.forEach(function(f){var m=U9.get(f)-1,v=s.get(f)-1;U9.set(f,m),s.set(f,v),m||(CT.has(f)||f.removeAttribute(n),CT.delete(f)),v||f.removeAttribute(r)}),XD--,XD||(U9=new WeakMap,U9=new WeakMap,CT=new WeakMap,ST={})}},_Se=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=gSe(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),vSe(n,i,r,"aria-hidden")):function(){return null}};const Vp={asChild:{type:"boolean"}},QW={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}},ide={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}},eZ=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],xSe=["auto","gray","mauve","slate","sage","olive","sand"],Up={color:{type:"enum",values:eZ,default:void 0}},wSe={color:{type:"enum",values:eZ,default:""}},Y2={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},bSe=["normal","start","end","both"],sde={trim:{type:"enum",className:"rt-r-lt",values:bSe,responsive:!0}},CSe=["left","center","right"],SSe={align:{type:"enum",className:"rt-r-ta",values:CSe,responsive:!0}},ESe=["wrap","nowrap","pretty","balance"],MSe={wrap:{type:"enum",className:"rt-r-tw",values:ESe,responsive:!0}},TSe={truncate:{type:"boolean",className:"rt-truncate"}},ISe=["light","regular","medium","bold"],RSe={weight:{type:"enum",className:"rt-r-weight",values:ISe,responsive:!0}},tZ=["initial","xs","sm","md","lg","xl"];function ode(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function E6(t){return typeof t=="object"&&Object.keys(t).some(e=>tZ.includes(e))}function LSe({className:t,customProperties:e,...r}){const n=ade({allowArbitraryValues:!0,className:t,...r}),i=kSe({customProperties:e,...r});return[n,i]}function ade({allowArbitraryValues:t,value:e,className:r,propValues:n,parseValue:i=s=>s}){const s=[];if(e){if(typeof e=="string"&&n.includes(e))return vee(r,e,i);if(E6(e)){const o=e;for(const a in o){if(!ode(o,a)||!tZ.includes(a))continue;const l=o[a];if(l!==void 0){if(n.includes(l)){const u=vee(r,l,i),d=a==="initial"?u:`${a}:${u}`;s.push(d)}else if(t){const u=a==="initial"?r:`${a}:${r}`;s.push(u)}}}return s.join(" ")}if(t)return r}}function vee(t,e,r){const n=t?"-":"",i=r(e),s=i==null?void 0:i.startsWith("-"),o=s?"-":"",a=s?i==null?void 0:i.substring(1):i;return`${o}${t}${n}${a}`}function kSe({customProperties:t,value:e,propValues:r,parseValue:n=i=>i}){let i={};if(!(!e||typeof e=="string"&&r.includes(e))){if(typeof e=="string"&&(i=Object.fromEntries(t.map(s=>[s,e]))),E6(e)){const s=e;for(const o in s){if(!ode(s,o)||!tZ.includes(o))continue;const a=s[o];if(!r.includes(a))for(const l of t)i={[o==="initial"?l:`${l}-${o}`]:a,...i}}}for(const s in i){const o=i[s];o!==void 0&&(i[s]=n(o))}return i}}function _ee(...t){let e={};for(const r of t)r&&(e={...e,...r});return Object.keys(e).length?e:void 0}function ASe(...t){return Object.assign({},...t)}function Da(t,...e){let r,n;const i={...t},s=ASe(...e);for(const o in s){let a=i[o];const l=s[o];if(l.default!==void 0&&a===void 0&&(a=l.default),l.type==="enum"&&![l.default,...l.values].includes(a)&&!E6(a)&&(a=l.default),i[o]=a,"className"in l&&l.className){delete i[o];const u="responsive"in l;if(!a||E6(a)&&!u)continue;if(E6(a)&&(l.default!==void 0&&a.initial===void 0&&(a.initial=l.default),l.type==="enum"&&([l.default,...l.values].includes(a.initial)||(a.initial=l.default))),l.type==="enum"){const d=ade({allowArbitraryValues:!1,value:a,className:l.className,propValues:l.values,parseValue:l.parseValue});r=Ws(r,d);continue}if(l.type==="string"||l.type==="enum | string"){const d=l.type==="string"?[]:l.values,[f,m]=LSe({className:l.className,customProperties:l.customProperties,propValues:d,parseValue:l.parseValue,value:a});n=_ee(n,m),r=Ws(r,f);continue}if(l.type==="boolean"&&a){r=Ws(r,l.className);continue}}}return i.className=Ws(r,t.className),i.style=_ee(n,t.style),i}const W_=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],lu={m:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:W_,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}},PSe=["span","div","label","p"],$Se=["1","2","3","4","5","6","7","8","9"],OSe={as:{type:"enum",values:PSe,default:"span"},...Vp,size:{type:"enum",className:"rt-r-size",values:$Se,responsive:!0},...RSe,...SSe,...sde,...TSe,...MSe,...Up,...Y2},Ln=E.forwardRef((t,e)=>{const{children:r,className:n,asChild:i,as:s="span",color:o,...a}=Da(t,OSe,lu);return E.createElement(qd,{"data-accent-color":o,...a,ref:e,className:Ws("rt-Text",n)},i?r:E.createElement(s,null,r))});Ln.displayName="Text";const NSe=["top","right","bottom","left"],E2=Math.min,Sf=Math.max,$k=Math.round,ET=Math.floor,M2=t=>({x:t,y:t}),DSe={left:"right",right:"left",bottom:"top",top:"bottom"},FSe={start:"end",end:"start"};function Rj(t,e,r){return Sf(t,E2(e,r))}function ry(t,e){return typeof t=="function"?t(e):t}function ny(t){return t.split("-")[0]}function Hw(t){return t.split("-")[1]}function rZ(t){return t==="x"?"y":"x"}function nZ(t){return t==="y"?"height":"width"}function T2(t){return["top","bottom"].includes(ny(t))?"y":"x"}function iZ(t){return rZ(T2(t))}function zSe(t,e,r){r===void 0&&(r=!1);const n=Hw(t),i=iZ(t),s=nZ(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Ok(o)),[o,Ok(o)]}function BSe(t){const e=Ok(t);return[Lj(t),e,Lj(e)]}function Lj(t){return t.replace(/start|end/g,e=>FSe[e])}function jSe(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function VSe(t,e,r,n){const i=Hw(t);let s=jSe(ny(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Lj)))),s}function Ok(t){return t.replace(/left|right|bottom|top/g,e=>DSe[e])}function USe(t){return{top:0,right:0,bottom:0,left:0,...t}}function lde(t){return typeof t!="number"?USe(t):{top:t,right:t,bottom:t,left:t}}function Nk(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function xee(t,e,r){let{reference:n,floating:i}=t;const s=T2(e),o=iZ(e),a=nZ(o),l=ny(e),u=s==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,m=n[a]/2-i[a]/2;let v;switch(l){case"top":v={x:d,y:n.y-i.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-i.width,y:f};break;default:v={x:n.x,y:n.y}}switch(Hw(e)){case"start":v[o]-=m*(r&&u?-1:1);break;case"end":v[o]+=m*(r&&u?-1:1);break}return v}const HSe=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:f}=xee(u,n,l),m=n,v={},b=0;for(let M=0;M({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:d=0}=ry(t,e)||{};if(u==null)return{};const f=lde(d),m={x:r,y:n},v=iZ(i),b=nZ(v),M=await o.getDimensions(u),O=v==="y",I=O?"top":"left",A=O?"bottom":"right",j=O?"clientHeight":"clientWidth",H=s.reference[b]+s.reference[v]-m[v]-s.floating[b],W=m[v]-s.reference[v],re=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let K=re?re[j]:0;(!K||!await(o.isElement==null?void 0:o.isElement(re)))&&(K=a.floating[j]||s.floating[b]);const pe=H/2-W/2,ge=K/2-M[b]/2-1,fe=E2(f[I],ge),ee=E2(f[A],ge),be=fe,le=K-M[b]-ee,ve=K/2-M[b]/2+pe,Pe=Rj(be,ve,le),Fe=!l.arrow&&Hw(i)!=null&&ve!==Pe&&s.reference[b]/2-(veve<=0)){var ee,be;const ve=(((ee=s.flip)==null?void 0:ee.index)||0)+1,Pe=K[ve];if(Pe)return{data:{index:ve,overflows:fe},reset:{placement:Pe}};let Fe=(be=fe.filter(We=>We.overflows[0]<=0).sort((We,He)=>We.overflows[1]-He.overflows[1])[0])==null?void 0:be.placement;if(!Fe)switch(v){case"bestFit":{var le;const We=(le=fe.filter(He=>{if(re){const Lt=T2(He.placement);return Lt===A||Lt==="y"}return!0}).map(He=>[He.placement,He.overflows.filter(Lt=>Lt>0).reduce((Lt,lt)=>Lt+lt,0)]).sort((He,Lt)=>He[1]-Lt[1])[0])==null?void 0:le[0];We&&(Fe=We);break}case"initialPlacement":Fe=a;break}if(i!==Fe)return{reset:{placement:Fe}}}return{}}}};function wee(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function bee(t){return NSe.some(e=>t[e]>=0)}const WSe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ry(t,e);switch(n){case"referenceHidden":{const s=await xC(e,{...i,elementContext:"reference"}),o=wee(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:bee(o)}}}case"escaped":{const s=await xC(e,{...i,altBoundary:!0}),o=wee(s,r.floating);return{data:{escapedOffsets:o,escaped:bee(o)}}}default:return{}}}}};async function ZSe(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ny(r),a=Hw(r),l=T2(r)==="y",u=["left","top"].includes(o)?-1:1,d=s&&l?-1:1,f=ry(e,t);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof b=="number"&&(v=a==="end"?b*-1:b),l?{x:v*d,y:m*u}:{x:m*u,y:v*d}}const YSe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await ZSe(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},XSe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:O=>{let{x:I,y:A}=O;return{x:I,y:A}}},...l}=ry(t,e),u={x:r,y:n},d=await xC(e,l),f=T2(ny(i)),m=rZ(f);let v=u[m],b=u[f];if(s){const O=m==="y"?"top":"left",I=m==="y"?"bottom":"right",A=v+d[O],j=v-d[I];v=Rj(A,v,j)}if(o){const O=f==="y"?"top":"left",I=f==="y"?"bottom":"right",A=b+d[O],j=b-d[I];b=Rj(A,b,j)}const M=a.fn({...e,[m]:v,[f]:b});return{...M,data:{x:M.x-r,y:M.y-n,enabled:{[m]:s,[f]:o}}}}}},JSe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ry(t,e),d={x:r,y:n},f=T2(i),m=rZ(f);let v=d[m],b=d[f];const M=ry(a,e),O=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(l){const j=m==="y"?"height":"width",H=s.reference[m]-s.floating[j]+O.mainAxis,W=s.reference[m]+s.reference[j]-O.mainAxis;vW&&(v=W)}if(u){var I,A;const j=m==="y"?"width":"height",H=["top","left"].includes(ny(i)),W=s.reference[f]-s.floating[j]+(H&&((I=o.offset)==null?void 0:I[f])||0)+(H?0:O.crossAxis),re=s.reference[f]+s.reference[j]+(H?0:((A=o.offset)==null?void 0:A[f])||0)-(H?O.crossAxis:0);bre&&(b=re)}return{[m]:v,[f]:b}}}},KSe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...u}=ry(t,e),d=await xC(e,u),f=ny(i),m=Hw(i),v=T2(i)==="y",{width:b,height:M}=s.floating;let O,I;f==="top"||f==="bottom"?(O=f,I=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(I=f,O=m==="end"?"top":"bottom");const A=M-d.top-d.bottom,j=b-d.left-d.right,H=E2(M-d[O],A),W=E2(b-d[I],j),re=!e.middlewareData.shift;let K=H,pe=W;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(pe=j),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(K=A),re&&!m){const fe=Sf(d.left,0),ee=Sf(d.right,0),be=Sf(d.top,0),le=Sf(d.bottom,0);v?pe=b-2*(fe!==0||ee!==0?fe+ee:Sf(d.left,d.right)):K=M-2*(be!==0||le!==0?be+le:Sf(d.top,d.bottom))}await l({...e,availableWidth:pe,availableHeight:K});const ge=await o.getDimensions(a.floating);return b!==ge.width||M!==ge.height?{reset:{rects:!0}}:{}}}};function n$(){return typeof window<"u"}function Gw(t){return ude(t)?(t.nodeName||"").toLowerCase():"#document"}function kf(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function vm(t){var e;return(e=(ude(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ude(t){return n$()?t instanceof Node||t instanceof kf(t).Node:!1}function J1(t){return n$()?t instanceof Element||t instanceof kf(t).Element:!1}function am(t){return n$()?t instanceof HTMLElement||t instanceof kf(t).HTMLElement:!1}function Cee(t){return!n$()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kf(t).ShadowRoot}function AS(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=K1(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function QSe(t){return["table","td","th"].includes(Gw(t))}function i$(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function sZ(t){const e=oZ(),r=J1(t)?K1(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function eEe(t){let e=I2(t);for(;am(e)&&!uw(e);){if(sZ(e))return e;if(i$(e))return null;e=I2(e)}return null}function oZ(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function uw(t){return["html","body","#document"].includes(Gw(t))}function K1(t){return kf(t).getComputedStyle(t)}function s$(t){return J1(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function I2(t){if(Gw(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Cee(t)&&t.host||vm(t);return Cee(e)?e.host:e}function cde(t){const e=I2(t);return uw(e)?t.ownerDocument?t.ownerDocument.body:t.body:am(e)&&AS(e)?e:cde(e)}function wC(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=cde(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=kf(i);if(s){const a=kj(o);return e.concat(o,o.visualViewport||[],AS(i)?i:[],a&&r?wC(a):[])}return e.concat(i,wC(i,[],r))}function kj(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function hde(t){const e=K1(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=am(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=$k(r)!==s||$k(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function aZ(t){return J1(t)?t:t.contextElement}function k4(t){const e=aZ(t);if(!am(e))return M2(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=hde(e);let o=(s?$k(r.width):r.width)/n,a=(s?$k(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const tEe=M2(0);function dde(t){const e=kf(t);return!oZ()||!e.visualViewport?tEe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function rEe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==kf(t)?!1:e}function g5(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=aZ(t);let o=M2(1);e&&(n?J1(n)&&(o=k4(n)):o=k4(t));const a=rEe(s,r,n)?dde(s):M2(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const m=kf(s),v=n&&J1(n)?kf(n):n;let b=m,M=kj(b);for(;M&&n&&v!==b;){const O=k4(M),I=M.getBoundingClientRect(),A=K1(M),j=I.left+(M.clientLeft+parseFloat(A.paddingLeft))*O.x,H=I.top+(M.clientTop+parseFloat(A.paddingTop))*O.y;l*=O.x,u*=O.y,d*=O.x,f*=O.y,l+=j,u+=H,b=kf(M),M=kj(b)}}return Nk({width:d,height:f,x:l,y:u})}function nEe(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=vm(n),a=e?i$(e.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=M2(1);const d=M2(0),f=am(n);if((f||!f&&!s)&&((Gw(n)!=="body"||AS(o))&&(l=s$(n)),am(n))){const m=g5(n);u=k4(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function iEe(t){return Array.from(t.getClientRects())}function Aj(t,e){const r=s$(t).scrollLeft;return e?e.left+r:g5(vm(t)).left+r}function sEe(t){const e=vm(t),r=s$(t),n=t.ownerDocument.body,i=Sf(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Sf(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Aj(t);const a=-r.scrollTop;return K1(n).direction==="rtl"&&(o+=Sf(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function oEe(t,e){const r=kf(t),n=vm(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=oZ();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function aEe(t,e){const r=g5(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=am(t)?k4(t):M2(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,u=n*s.y;return{width:o,height:a,x:l,y:u}}function See(t,e,r){let n;if(e==="viewport")n=oEe(t,r);else if(e==="document")n=sEe(vm(t));else if(J1(e))n=aEe(e,r);else{const i=dde(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Nk(n)}function fde(t,e){const r=I2(t);return r===e||!J1(r)||uw(r)?!1:K1(r).position==="fixed"||fde(r,e)}function lEe(t,e){const r=e.get(t);if(r)return r;let n=wC(t,[],!1).filter(a=>J1(a)&&Gw(a)!=="body"),i=null;const s=K1(t).position==="fixed";let o=s?I2(t):t;for(;J1(o)&&!uw(o);){const a=K1(o),l=sZ(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||AS(o)&&!l&&fde(t,o))?n=n.filter(d=>d!==o):i=a,o=I2(o)}return e.set(t,n),n}function uEe(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?i$(e)?[]:lEe(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,d)=>{const f=See(e,d,i);return u.top=Sf(f.top,u.top),u.right=E2(f.right,u.right),u.bottom=E2(f.bottom,u.bottom),u.left=Sf(f.left,u.left),u},See(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cEe(t){const{width:e,height:r}=hde(t);return{width:e,height:r}}function hEe(t,e,r){const n=am(e),i=vm(e),s=r==="fixed",o=g5(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=M2(0);if(n||!n&&!s)if((Gw(e)!=="body"||AS(i))&&(a=s$(e)),n){const v=g5(e,!0,s,e);l.x=v.x+e.clientLeft,l.y=v.y+e.clientTop}else i&&(l.x=Aj(i));let u=0,d=0;if(i&&!n&&!s){const v=i.getBoundingClientRect();d=v.top+a.scrollTop,u=v.left+a.scrollLeft-Aj(i,v)}const f=o.left+a.scrollLeft-l.x-u,m=o.top+a.scrollTop-l.y-d;return{x:f,y:m,width:o.width,height:o.height}}function JD(t){return K1(t).position==="static"}function Eee(t,e){if(!am(t)||K1(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return vm(t)===r&&(r=r.ownerDocument.body),r}function pde(t,e){const r=kf(t);if(i$(t))return r;if(!am(t)){let i=I2(t);for(;i&&!uw(i);){if(J1(i)&&!JD(i))return i;i=I2(i)}return r}let n=Eee(t,e);for(;n&&QSe(n)&&JD(n);)n=Eee(n,e);return n&&uw(n)&&JD(n)&&!sZ(n)?r:n||eEe(t)||r}const dEe=async function(t){const e=this.getOffsetParent||pde,r=this.getDimensions,n=await r(t.floating);return{reference:hEe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fEe(t){return K1(t).direction==="rtl"}const pEe={convertOffsetParentRelativeRectToViewportRelativeRect:nEe,getDocumentElement:vm,getClippingRect:uEe,getOffsetParent:pde,getElementRects:dEe,getClientRects:iEe,getDimensions:cEe,getScale:k4,isElement:J1,isRTL:fEe};function mEe(t,e){let r=null,n;const i=vm(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:d,width:f,height:m}=t.getBoundingClientRect();if(a||e(),!f||!m)return;const v=ET(d),b=ET(i.clientWidth-(u+f)),M=ET(i.clientHeight-(d+m)),O=ET(u),A={rootMargin:-v+"px "+-b+"px "+-M+"px "+-O+"px",threshold:Sf(0,E2(1,l))||1};let j=!0;function H(W){const re=W[0].intersectionRatio;if(re!==l){if(!j)return o();re?o(!1,re):n=setTimeout(()=>{o(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(H,{...A,root:i.ownerDocument})}catch{r=new IntersectionObserver(H,A)}r.observe(t)}return o(!0),s}function gEe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=aZ(t),d=i||s?[...u?wC(u):[],...wC(e)]:[];d.forEach(I=>{i&&I.addEventListener("scroll",r,{passive:!0}),s&&I.addEventListener("resize",r)});const f=u&&a?mEe(u,r):null;let m=-1,v=null;o&&(v=new ResizeObserver(I=>{let[A]=I;A&&A.target===u&&v&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=v)==null||j.observe(e)})),r()}),u&&!l&&v.observe(u),v.observe(e));let b,M=l?g5(t):null;l&&O();function O(){const I=g5(t);M&&(I.x!==M.x||I.y!==M.y||I.width!==M.width||I.height!==M.height)&&r(),M=I,b=requestAnimationFrame(O)}return r(),()=>{var I;d.forEach(A=>{i&&A.removeEventListener("scroll",r),s&&A.removeEventListener("resize",r)}),f==null||f(),(I=v)==null||I.disconnect(),v=null,l&&cancelAnimationFrame(b)}}const yEe=YSe,vEe=XSe,_Ee=qSe,xEe=KSe,wEe=WSe,Mee=GSe,bEe=JSe,CEe=(t,e,r)=>{const n=new Map,i={platform:pEe,...r},s={...i.platform,_c:n};return HSe(t,e,{...i,platform:s})};var OR=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Dk(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Dk(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!Dk(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function mde(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Tee(t,e){const r=mde(t);return Math.round(e*r)/r}function KD(t){const e=E.useRef(t);return OR(()=>{e.current=t}),e}function SEe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[d,f]=E.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=E.useState(n);Dk(m,n)||v(n);const[b,M]=E.useState(null),[O,I]=E.useState(null),A=E.useCallback(He=>{He!==re.current&&(re.current=He,M(He))},[]),j=E.useCallback(He=>{He!==K.current&&(K.current=He,I(He))},[]),H=s||b,W=o||O,re=E.useRef(null),K=E.useRef(null),pe=E.useRef(d),ge=l!=null,fe=KD(l),ee=KD(i),be=KD(u),le=E.useCallback(()=>{if(!re.current||!K.current)return;const He={placement:e,strategy:r,middleware:m};ee.current&&(He.platform=ee.current),CEe(re.current,K.current,He).then(Lt=>{const lt={...Lt,isPositioned:be.current!==!1};ve.current&&!Dk(pe.current,lt)&&(pe.current=lt,z5.flushSync(()=>{f(lt)}))})},[m,e,r,ee,be]);OR(()=>{u===!1&&pe.current.isPositioned&&(pe.current.isPositioned=!1,f(He=>({...He,isPositioned:!1})))},[u]);const ve=E.useRef(!1);OR(()=>(ve.current=!0,()=>{ve.current=!1}),[]),OR(()=>{if(H&&(re.current=H),W&&(K.current=W),H&&W){if(fe.current)return fe.current(H,W,le);le()}},[H,W,le,fe,ge]);const Pe=E.useMemo(()=>({reference:re,floating:K,setReference:A,setFloating:j}),[A,j]),Fe=E.useMemo(()=>({reference:H,floating:W}),[H,W]),We=E.useMemo(()=>{const He={position:r,left:0,top:0};if(!Fe.floating)return He;const Lt=Tee(Fe.floating,d.x),lt=Tee(Fe.floating,d.y);return a?{...He,transform:"translate("+Lt+"px, "+lt+"px)",...mde(Fe.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Lt,top:lt}},[r,a,Fe.floating,d.x,d.y]);return E.useMemo(()=>({...d,update:le,refs:Pe,elements:Fe,floatingStyles:We}),[d,le,Pe,Fe,We])}const EEe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Mee({element:n.current,padding:i}).fn(r):{}:n?Mee({element:n,padding:i}).fn(r):{}}}},MEe=(t,e)=>({...yEe(t),options:[t,e]}),TEe=(t,e)=>({...vEe(t),options:[t,e]}),IEe=(t,e)=>({...bEe(t),options:[t,e]}),REe=(t,e)=>({..._Ee(t),options:[t,e]}),LEe=(t,e)=>({...xEe(t),options:[t,e]}),kEe=(t,e)=>({...wEe(t),options:[t,e]}),AEe=(t,e)=>({...EEe(t),options:[t,e]});var PEe="Arrow",gde=E.forwardRef((t,e)=>{const{children:r,width:n=10,height:i=5,...s}=t;return oe.jsx(no.svg,{...s,ref:e,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:oe.jsx("polygon",{points:"0,0 30,0 15,10"})})});gde.displayName=PEe;var $Ee=gde;function o$(t){const[e,r]=E.useState(void 0);return Zu(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var lZ="Popper",[yde,a$]=zf(lZ),[OEe,vde]=yde(lZ),_de=t=>{const{__scopePopper:e,children:r}=t,[n,i]=E.useState(null);return oe.jsx(OEe,{scope:e,anchor:n,onAnchorChange:i,children:r})};_de.displayName=lZ;var xde="PopperAnchor",wde=E.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=vde(xde,r),o=E.useRef(null),a=So(e,o);return E.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:oe.jsx(no.div,{...i,ref:a})});wde.displayName=xde;var uZ="PopperContent",[NEe,DEe]=yde(uZ),bde=E.forwardRef((t,e)=>{var tr,Se,je,et,yt,we;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...M}=t,O=vde(uZ,r),[I,A]=E.useState(null),j=So(e,ft=>A(ft)),[H,W]=E.useState(null),re=o$(H),K=(re==null?void 0:re.width)??0,pe=(re==null?void 0:re.height)??0,ge=n+(s!=="center"?"-"+s:""),fe=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},ee=Array.isArray(u)?u:[u],be=ee.length>0,le={padding:fe,boundary:ee.filter(zEe),altBoundary:be},{refs:ve,floatingStyles:Pe,placement:Fe,isPositioned:We,middlewareData:He}=SEe({strategy:"fixed",placement:ge,whileElementsMounted:(...ft)=>gEe(...ft,{animationFrame:v==="always"}),elements:{reference:O.anchor},middleware:[MEe({mainAxis:i+pe,alignmentAxis:o}),l&&TEe({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?IEe():void 0,...le}),l&&REe({...le}),LEe({...le,apply:({elements:ft,rects:qt,availableWidth:_r,availableHeight:rt})=>{const{width:Xe,height:Ze}=qt.reference,it=ft.floating.style;it.setProperty("--radix-popper-available-width",`${_r}px`),it.setProperty("--radix-popper-available-height",`${rt}px`),it.setProperty("--radix-popper-anchor-width",`${Xe}px`),it.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),H&&AEe({element:H,padding:a}),BEe({arrowWidth:K,arrowHeight:pe}),m&&kEe({strategy:"referenceHidden",...le})]}),[Lt,lt]=Ede(Fe),pt=Nc(b);Zu(()=>{We&&(pt==null||pt())},[We,pt]);const rr=(tr=He.arrow)==null?void 0:tr.x,Tt=(Se=He.arrow)==null?void 0:Se.y,Je=((je=He.arrow)==null?void 0:je.centerOffset)!==0,[pr,Ut]=E.useState();return Zu(()=>{I&&Ut(window.getComputedStyle(I).zIndex)},[I]),oe.jsx("div",{ref:ve.setFloating,"data-radix-popper-content-wrapper":"",style:{...Pe,transform:We?Pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pr,"--radix-popper-transform-origin":[(et=He.transformOrigin)==null?void 0:et.x,(yt=He.transformOrigin)==null?void 0:yt.y].join(" "),...((we=He.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:oe.jsx(NEe,{scope:r,placedSide:Lt,onArrowChange:W,arrowX:rr,arrowY:Tt,shouldHideArrow:Je,children:oe.jsx(no.div,{"data-side":Lt,"data-align":lt,...M,ref:j,style:{...M.style,animation:We?void 0:"none"}})})})});bde.displayName=uZ;var Cde="PopperArrow",FEe={top:"bottom",right:"left",bottom:"top",left:"right"},Sde=E.forwardRef(function(e,r){const{__scopePopper:n,...i}=e,s=DEe(Cde,n),o=FEe[s.placedSide];return oe.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:oe.jsx($Ee,{...i,ref:r,style:{...i.style,display:"block"}})})});Sde.displayName=Cde;function zEe(t){return t!==null}var BEe=t=>({name:"transformOrigin",options:t,fn(e){var O,I,A;const{placement:r,rects:n,middlewareData:i}=e,o=((O=i.arrow)==null?void 0:O.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,d]=Ede(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((I=i.arrow)==null?void 0:I.x)??0)+a/2,v=(((A=i.arrow)==null?void 0:A.y)??0)+l/2;let b="",M="";return u==="bottom"?(b=o?f:`${m}px`,M=`${-l}px`):u==="top"?(b=o?f:`${m}px`,M=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,M=o?f:`${v}px`):u==="left"&&(b=`${n.floating.width+l}px`,M=o?f:`${v}px`),{data:{x:b,y:M}}}});function Ede(t){const[e,r="center"]=t.split("-");return[e,r]}var jEe=_de,Mde=wde,Tde=bde,Ide=Sde,[l$,iMt]=zf("Tooltip",[a$]),cZ=a$(),Rde="TooltipProvider",VEe=700,Iee="tooltip.open",[UEe,Lde]=l$(Rde),kde=t=>{const{__scopeTooltip:e,delayDuration:r=VEe,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:s}=t,[o,a]=E.useState(!0),l=E.useRef(!1),u=E.useRef(0);return E.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),oe.jsx(UEe,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(d=>{l.current=d},[]),disableHoverableContent:i,children:s})};kde.displayName=Rde;var Ade="Tooltip",[sMt,u$]=l$(Ade),Pj="TooltipTrigger",HEe=E.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,i=u$(Pj,r),s=Lde(Pj,r),o=cZ(r),a=E.useRef(null),l=So(e,a,i.onTriggerChange),u=E.useRef(!1),d=E.useRef(!1),f=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),oe.jsx(Mde,{asChild:!0,...o,children:oe.jsx(no.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:l,onPointerMove:Ls(t.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ls(t.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Ls(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ls(t.onFocus,()=>{u.current||i.onOpen()}),onBlur:Ls(t.onBlur,i.onClose),onClick:Ls(t.onClick,i.onClose)})})});HEe.displayName=Pj;var GEe="TooltipPortal",[oMt,qEe]=l$(GEe,{forceMount:void 0}),cw="TooltipContent",WEe=E.forwardRef((t,e)=>{const r=qEe(cw,t.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...s}=t,o=u$(cw,t.__scopeTooltip);return oe.jsx(Z2,{present:n||o.open,children:o.disableHoverableContent?oe.jsx(Pde,{side:i,...s,ref:e}):oe.jsx(ZEe,{side:i,...s,ref:e})})}),ZEe=E.forwardRef((t,e)=>{const r=u$(cw,t.__scopeTooltip),n=Lde(cw,t.__scopeTooltip),i=E.useRef(null),s=So(e,i),[o,a]=E.useState(null),{trigger:l,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=n,m=E.useCallback(()=>{a(null),f(!1)},[f]),v=E.useCallback((b,M)=>{const O=b.currentTarget,I={x:b.clientX,y:b.clientY},A=KEe(I,O.getBoundingClientRect()),j=QEe(I,A),H=eMe(M.getBoundingClientRect()),W=rMe([...j,...H]);a(W),f(!0)},[f]);return E.useEffect(()=>()=>m(),[m]),E.useEffect(()=>{if(l&&d){const b=O=>v(O,d),M=O=>v(O,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",M),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",M)}}},[l,d,v,m]),E.useEffect(()=>{if(o){const b=M=>{const O=M.target,I={x:M.clientX,y:M.clientY},A=(l==null?void 0:l.contains(O))||(d==null?void 0:d.contains(O)),j=!tMe(I,o);A?m():j&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,o,u,m]),oe.jsx(Pde,{...t,ref:s})}),[YEe,XEe]=l$(Ade,{isInside:!1}),Pde=E.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=u$(cw,r),u=cZ(r),{onClose:d}=l;return E.useEffect(()=>(document.addEventListener(Iee,d),()=>document.removeEventListener(Iee,d)),[d]),E.useEffect(()=>{if(l.trigger){const f=m=>{const v=m.target;v!=null&&v.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),oe.jsx(KW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:oe.jsxs(Tde,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[oe.jsx(Vhe,{children:n}),oe.jsx(YEe,{scope:r,isInside:!0,children:oe.jsx(uCe,{id:l.contentId,role:"tooltip",children:i||n})})]})})});WEe.displayName=cw;var $de="TooltipArrow",JEe=E.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,i=cZ(r);return XEe($de,r).isInside?null:oe.jsx(Ide,{...i,...n,ref:e})});JEe.displayName=$de;function KEe(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,i,s)){case s:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function QEe(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function eMe(t){const{top:e,right:r,bottom:n,left:i}=t;return[{x:i,y:e},{x:r,y:e},{x:r,y:n},{x:i,y:n}]}function tMe(t,e){const{x:r,y:n}=t;let i=!1;for(let s=0,o=e.length-1;sn!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(i=!i)}return i}function rMe(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),nMe(e)}function nMe(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const i=t[n];for(;r.length>=2;){const s=r[r.length-1],o=r[r.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))r.pop();else break}r.push(i)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var iMe=kde,Ode=E.createContext(void 0),sMe=t=>{const{dir:e,children:r}=t;return oe.jsx(Ode.Provider,{value:e,children:r})};function PS(t){const e=E.useContext(Ode);return t||e||"ltr"}function oMe(t){switch(t){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}const Nde=["none","small","medium","large","full"],$S={radius:{type:"enum",values:Nde,default:void 0}},aMe=["inherit","light","dark"],lMe=["solid","translucent"],uMe=["90%","95%","100%","105%","110%"],bf={...Vp,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:aMe,default:"inherit"},accentColor:{type:"enum",values:eZ,default:"indigo"},grayColor:{type:"enum",values:xSe,default:"auto"},panelBackground:{type:"enum",values:lMe,default:"translucent"},radius:{type:"enum",values:Nde,default:"medium"},scaling:{type:"enum",values:uMe,default:"100%"}},H9=()=>{},Fk=E.createContext(void 0);function cMe(){const t=E.useContext(Fk);if(t===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return t}const hZ=E.forwardRef((t,e)=>E.useContext(Fk)===void 0?E.createElement(iMe,{delayDuration:200},E.createElement(sMe,{dir:"ltr"},E.createElement(Dde,{...t,ref:e}))):E.createElement(dZ,{...t,ref:e}));hZ.displayName="Theme";const Dde=E.forwardRef((t,e)=>{const{appearance:r=bf.appearance.default,accentColor:n=bf.accentColor.default,grayColor:i=bf.grayColor.default,panelBackground:s=bf.panelBackground.default,radius:o=bf.radius.default,scaling:a=bf.scaling.default,hasBackground:l=bf.hasBackground.default,...u}=t,[d,f]=E.useState(r);E.useEffect(()=>f(r),[r]);const[m,v]=E.useState(n);E.useEffect(()=>v(n),[n]);const[b,M]=E.useState(i);E.useEffect(()=>M(i),[i]);const[O,I]=E.useState(s);E.useEffect(()=>I(s),[s]);const[A,j]=E.useState(o);E.useEffect(()=>j(o),[o]);const[H,W]=E.useState(a);return E.useEffect(()=>W(a),[a]),E.createElement(dZ,{...u,ref:e,isRoot:!0,hasBackground:l,appearance:d,accentColor:m,grayColor:b,panelBackground:O,radius:A,scaling:H,onAppearanceChange:f,onAccentColorChange:v,onGrayColorChange:M,onPanelBackgroundChange:I,onRadiusChange:j,onScalingChange:W})});Dde.displayName="ThemeRoot";const dZ=E.forwardRef((t,e)=>{const r=E.useContext(Fk),{asChild:n,isRoot:i,hasBackground:s,appearance:o=(r==null?void 0:r.appearance)??bf.appearance.default,accentColor:a=(r==null?void 0:r.accentColor)??bf.accentColor.default,grayColor:l=(r==null?void 0:r.resolvedGrayColor)??bf.grayColor.default,panelBackground:u=(r==null?void 0:r.panelBackground)??bf.panelBackground.default,radius:d=(r==null?void 0:r.radius)??bf.radius.default,scaling:f=(r==null?void 0:r.scaling)??bf.scaling.default,onAppearanceChange:m=H9,onAccentColorChange:v=H9,onGrayColorChange:b=H9,onPanelBackgroundChange:M=H9,onRadiusChange:O=H9,onScalingChange:I=H9,...A}=t,j=n?qd:"div",H=l==="auto"?oMe(a):l,W=t.appearance==="light"||t.appearance==="dark",re=s===void 0?i||W:s;return E.createElement(Fk.Provider,{value:E.useMemo(()=>({appearance:o,accentColor:a,grayColor:l,resolvedGrayColor:H,panelBackground:u,radius:d,scaling:f,onAppearanceChange:m,onAccentColorChange:v,onGrayColorChange:b,onPanelBackgroundChange:M,onRadiusChange:O,onScalingChange:I}),[o,a,l,H,u,d,f,m,v,b,M,O,I])},E.createElement(j,{"data-is-root-theme":i?"true":"false","data-accent-color":a,"data-gray-color":H,"data-has-background":re?"true":"false","data-panel-background":u,"data-radius":d,"data-scaling":f,ref:e,...A,className:Ws("radix-themes",{light:o==="light",dark:o==="dark"},A.className)}))});dZ.displayName="ThemeImpl";function hMe(t,e){const{asChild:r,children:n}=t;if(!r)return typeof e=="function"?e(n):e;const i=E.Children.only(n);return E.cloneElement(i,{children:typeof e=="function"?e(i.props.children):e})}const dMe=["div","span"],fMe=["none","inline","inline-block","block"],pMe={as:{type:"enum",values:dMe,default:"div"},...Vp,display:{type:"enum",className:"rt-r-display",values:fMe,responsive:!0}},Z_=["0","1","2","3","4","5","6","7","8","9"],NR={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:Z_,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:Z_,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:Z_,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:Z_,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:Z_,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:Z_,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:Z_,responsive:!0}},QD=["visible","hidden","clip","scroll","auto"],mMe=["static","relative","absolute","fixed","sticky"],P8=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],gMe=["0","1"],yMe=["0","1"],c$={...NR,...QW,...ide,position:{type:"enum",className:"rt-r-position",values:mMe,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:P8,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:P8,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:P8,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:P8,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:P8,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:QD,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:QD,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:QD,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:gMe,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:yMe,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0}},lm=E.forwardRef((t,e)=>{const{className:r,asChild:n,as:i="div",...s}=Da(t,pMe,c$,lu);return E.createElement(n?qd:i,{...s,ref:e,className:Ws("rt-Box",r)})});lm.displayName="Box";const vMe=["1","2","3","4"],_Me=["classic","solid","soft","surface","outline","ghost"],Ree={...Vp,size:{type:"enum",className:"rt-r-size",values:vMe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:_Me,default:"solid"},...wSe,...Y2,...$S,loading:{type:"boolean",className:"rt-loading",default:!1}},eF=["0","1","2","3","4","5","6","7","8","9"],Fde={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:eF,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:eF,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:eF,responsive:!0}},xMe=["div","span"],wMe=["none","inline-flex","flex"],bMe=["row","column","row-reverse","column-reverse"],CMe=["start","center","end","baseline","stretch"],SMe=["start","center","end","between"],EMe=["nowrap","wrap","wrap-reverse"],zde={as:{type:"enum",values:xMe,default:"div"},...Vp,display:{type:"enum",className:"rt-r-display",values:wMe,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:bMe,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:CMe,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:SMe,parseValue:MMe,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:EMe,responsive:!0},...Fde};function MMe(t){return t==="between"?"space-between":t}const kn=E.forwardRef((t,e)=>{const{className:r,asChild:n,as:i="div",...s}=Da(t,zde,c$,lu);return E.createElement(n?qd:i,{...s,ref:e,className:Ws("rt-Flex",r)})});kn.displayName="Flex";const TMe=["1","2","3"],IMe={size:{type:"enum",className:"rt-r-size",values:TMe,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},Bde=E.forwardRef((t,e)=>{const{className:r,children:n,loading:i,...s}=Da(t,IMe,lu);if(!i)return n;const o=E.createElement("span",{...s,ref:e,className:Ws("rt-Spinner",r)},E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}),E.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?o:E.createElement(kn,{asChild:!0,position:"relative",align:"center",justify:"center"},E.createElement("span",null,E.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),E.createElement(kn,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},E.createElement("span",null,o))))});Bde.displayName="Spinner";function RMe(t,e){if(t!==void 0)return typeof t=="string"?e(t):Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n)]))}function LMe(t){switch(t){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const jde=E.forwardRef((t,e)=>{const{size:r=Ree.size.default}=t,{className:n,children:i,asChild:s,color:o,radius:a,disabled:l=t.loading,...u}=Da(t,Ree,lu);return E.createElement(s?qd:"button",{"data-disabled":l||void 0,"data-accent-color":o,"data-radius":a,...u,ref:e,className:Ws("rt-reset","rt-BaseButton",n),disabled:l},t.loading?E.createElement(E.Fragment,null,E.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},i),E.createElement(t$,null,i),E.createElement(kn,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},E.createElement("span",null,E.createElement(Bde,{size:RMe(r,LMe)})))):i)});jde.displayName="BaseButton";const Eu=E.forwardRef(({className:t,...e},r)=>E.createElement(jde,{...e,ref:r,className:Ws("rt-Button",t)}));Eu.displayName="Button";const kMe=["1","2","3","4","5"],AMe=["surface","classic","ghost"],PMe={...Vp,size:{type:"enum",className:"rt-r-size",values:kMe,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:AMe,default:"surface"}},kl=E.forwardRef((t,e)=>{const{asChild:r,className:n,...i}=Da(t,PMe,lu);return E.createElement(r?qd:"div",{ref:e,...i,className:Ws("rt-reset","rt-BaseCard","rt-Card",n)})});kl.displayName="Card";function h$(t){const e=E.useRef({value:t,previous:t});return E.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var fZ="Checkbox",[$Me,Vde]=zf(fZ),[OMe,NMe]=$Me(fZ),Ude=E.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:u,...d}=t,[f,m]=E.useState(null),v=So(e,j=>m(j)),b=E.useRef(!1),M=f?!!f.closest("form"):!0,[O=!1,I]=ty({prop:i,defaultProp:s,onChange:u}),A=E.useRef(O);return E.useEffect(()=>{const j=f==null?void 0:f.form;if(j){const H=()=>I(A.current);return j.addEventListener("reset",H),()=>j.removeEventListener("reset",H)}},[f,I]),oe.jsxs(OMe,{scope:r,state:O,disabled:a,children:[oe.jsx(no.button,{type:"button",role:"checkbox","aria-checked":e5(O)?"mixed":O,"aria-required":o,"data-state":qde(O),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:v,onKeyDown:Ls(t.onKeyDown,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:Ls(t.onClick,j=>{I(H=>e5(H)?!0:!H),M&&(b.current=j.isPropagationStopped(),b.current||j.stopPropagation())})}),M&&oe.jsx(DMe,{control:f,bubbles:!b.current,name:n,value:l,checked:O,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});Ude.displayName=fZ;var Hde="CheckboxIndicator",Gde=E.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=NMe(Hde,r);return oe.jsx(Z2,{present:n||e5(s.state)||s.state===!0,children:oe.jsx(no.span,{"data-state":qde(s.state),"data-disabled":s.disabled?"":void 0,...i,ref:e,style:{pointerEvents:"none",...t.style}})})});Gde.displayName=Hde;var DMe=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=E.useRef(null),o=h$(r),a=o$(e);return E.useEffect(()=>{const l=s.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&f){const m=new Event("click",{bubbles:n});l.indeterminate=e5(r),f.call(l,e5(r)?!1:r),l.dispatchEvent(m)}},[o,r,n]),oe.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e5(r)?!1:r,...i,tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function e5(t){return t==="indeterminate"}function qde(t){return e5(t)?"indeterminate":t?"checked":"unchecked"}var Wde=Ude,Zde=Gde;function Yde(t){const e=t+"CollectionProvider",[r,n]=zf(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:b,children:M}=v,O=El.useRef(null),I=El.useRef(new Map).current;return oe.jsx(i,{scope:b,itemMap:I,collectionRef:O,children:M})};o.displayName=e;const a=t+"CollectionSlot",l=El.forwardRef((v,b)=>{const{scope:M,children:O}=v,I=s(a,M),A=So(b,I.collectionRef);return oe.jsx(qd,{ref:A,children:O})});l.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=El.forwardRef((v,b)=>{const{scope:M,children:O,...I}=v,A=El.useRef(null),j=So(b,A),H=s(u,M);return El.useEffect(()=>(H.itemMap.set(A,{ref:A,...I}),()=>void H.itemMap.delete(A))),oe.jsx(qd,{[d]:"",ref:j,children:O})});f.displayName=u;function m(v){const b=s(t+"CollectionConsumer",v);return El.useCallback(()=>{const O=b.collectionRef.current;if(!O)return[];const I=Array.from(O.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((H,W)=>I.indexOf(H.ref.current)-I.indexOf(W.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:l,ItemSlot:f},m,n]}var tF="rovingFocusGroup.onEntryFocus",FMe={bubbles:!1,cancelable:!0},d$="RovingFocusGroup",[$j,Xde,zMe]=Yde(d$),[BMe,f$]=zf(d$,[zMe]),[jMe,VMe]=BMe(d$),Jde=E.forwardRef((t,e)=>oe.jsx($j.Provider,{scope:t.__scopeRovingFocusGroup,children:oe.jsx($j.Slot,{scope:t.__scopeRovingFocusGroup,children:oe.jsx(UMe,{...t,ref:e})})}));Jde.displayName=d$;var UMe=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,m=E.useRef(null),v=So(e,m),b=PS(s),[M=null,O]=ty({prop:o,defaultProp:a,onChange:l}),[I,A]=E.useState(!1),j=Nc(u),H=Xde(r),W=E.useRef(!1),[re,K]=E.useState(0);return E.useEffect(()=>{const pe=m.current;if(pe)return pe.addEventListener(tF,j),()=>pe.removeEventListener(tF,j)},[j]),oe.jsx(jMe,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:M,onItemFocus:E.useCallback(pe=>O(pe),[O]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>K(pe=>pe+1),[]),onFocusableItemRemove:E.useCallback(()=>K(pe=>pe-1),[]),children:oe.jsx(no.div,{tabIndex:I||re===0?-1:0,"data-orientation":n,...f,ref:v,style:{outline:"none",...t.style},onMouseDown:Ls(t.onMouseDown,()=>{W.current=!0}),onFocus:Ls(t.onFocus,pe=>{const ge=!W.current;if(pe.target===pe.currentTarget&&ge&&!I){const fe=new CustomEvent(tF,FMe);if(pe.currentTarget.dispatchEvent(fe),!fe.defaultPrevented){const ee=H().filter(Fe=>Fe.focusable),be=ee.find(Fe=>Fe.active),le=ee.find(Fe=>Fe.id===M),Pe=[be,le,...ee].filter(Boolean).map(Fe=>Fe.ref.current);efe(Pe,d)}}W.current=!1}),onBlur:Ls(t.onBlur,()=>A(!1))})})}),Kde="RovingFocusGroupItem",Qde=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=kS(),l=s||a,u=VMe(Kde,r),d=u.currentTabStopId===l,f=Xde(r),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return E.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),oe.jsx($j.ItemSlot,{scope:r,id:l,focusable:n,active:i,children:oe.jsx(no.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:Ls(t.onMouseDown,b=>{n?u.onItemFocus(l):b.preventDefault()}),onFocus:Ls(t.onFocus,()=>u.onItemFocus(l)),onKeyDown:Ls(t.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const M=qMe(b,u.orientation,u.dir);if(M!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let I=f().filter(A=>A.focusable).map(A=>A.ref.current);if(M==="last")I.reverse();else if(M==="prev"||M==="next"){M==="prev"&&I.reverse();const A=I.indexOf(b.currentTarget);I=u.loop?WMe(I,A+1):I.slice(A+1)}setTimeout(()=>efe(I))}})})})});Qde.displayName=Kde;var HMe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function GMe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function qMe(t,e,r){const n=GMe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return HMe[n]}function efe(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function WMe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var tfe=Jde,rfe=Qde;const pZ="CheckboxGroup",[ZMe,nfe]=zf(pZ,[f$,Vde]),ife=f$(),sfe=Vde(),[YMe,XMe]=ZMe(pZ),ofe=E.forwardRef((t,e)=>{const{__scopeCheckboxGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=t,v=ife(r),b=PS(u),[M=[],O]=ty({prop:s,defaultProp:i,onChange:f}),I=E.useCallback(j=>O((H=[])=>[...H,j]),[O]),A=E.useCallback(j=>O((H=[])=>H.filter(W=>W!==j)),[O]);return E.createElement(YMe,{scope:r,name:n,required:o,disabled:a,value:M,onItemCheck:I,onItemUncheck:A},E.createElement(tfe,{asChild:!0,...v,orientation:l,dir:b,loop:d},E.createElement(no.div,{role:"group","data-disabled":a?"":void 0,dir:b,...m,ref:e})))});ofe.displayName=pZ;const afe="CheckboxGroupItem",lfe=E.forwardRef((t,e)=>{var m;const{__scopeCheckboxGroup:r,disabled:n,...i}=t,s=XMe(afe,r),o=s.disabled||n,a=ife(r),l=sfe(r),u=E.useRef(null),d=So(e,u),f=(m=s.value)==null?void 0:m.includes(i.value);return E.createElement(rfe,{asChild:!0,...a,focusable:!o,active:f},E.createElement(Wde,{name:s.name,disabled:o,required:s.required,checked:f,...l,...i,ref:d,onCheckedChange:v=>{v?s.onItemCheck(t.value):s.onItemUncheck(t.value)}}))});lfe.displayName=afe;const JMe="CheckboxGroupIndicator",ufe=E.forwardRef((t,e)=>{const{__scopeCheckboxGroup:r,...n}=t,i=sfe(r);return E.createElement(Zde,{...i,...n,ref:e})});ufe.displayName=JMe;const KMe=ofe,QMe=lfe,eTe=ufe,tTe=["div","span"],rTe=["none","inline-grid","grid"],nTe=["1","2","3","4","5","6","7","8","9"],iTe=["1","2","3","4","5","6","7","8","9"],sTe=["row","column","dense","row-dense","column-dense"],oTe=["start","center","end","baseline","stretch"],aTe=["start","center","end","between"],zk={as:{type:"enum",values:tTe,default:"div"},...Vp,display:{type:"enum",className:"rt-r-display",values:rTe,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:nTe,parseValue:Lee,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:iTe,parseValue:Lee,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:sTe,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:oTe,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:aTe,parseValue:lTe,responsive:!0},...Fde};function Lee(t){return zk.columns.values.includes(t)?t:t!=null&&t.match(/^\d+$/)?`repeat(${t}, minmax(0, 1fr))`:t}function lTe(t){return t==="between"?"space-between":t}const uTe=["1","2","3"],cTe=["classic","surface","soft"],cfe={size:{type:"enum",className:"rt-r-size",values:uTe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:cTe,default:"surface"},...Up,...Y2},B5=E.forwardRef((t,e)=>{const{className:r,asChild:n,as:i="div",...s}=Da(t,zk,c$,lu);return E.createElement(n?qd:i,{...s,ref:e,className:Ws("rt-Grid",r)})});B5.displayName="Grid";const hfe=El.forwardRef((t,e)=>El.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},El.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));hfe.displayName="ThickDividerHorizontalIcon";const p$=El.forwardRef((t,e)=>El.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},El.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));p$.displayName="ThickCheckIcon";const dfe=El.forwardRef((t,e)=>El.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},El.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));dfe.displayName="ChevronDownIcon";const hTe=El.forwardRef((t,e)=>El.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...t,ref:e},El.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));hTe.displayName="ThickChevronRightIcon";const gb={...Vp,...cfe},ffe="CheckboxGroup",[dTe]=zf(ffe,[nfe]),pfe=nfe(),[fTe,mfe]=dTe(ffe),gfe=E.forwardRef(({color:t=gb.color.default,highContrast:e=gb.highContrast.default,size:r=gb.size.default,variant:n=gb.variant.default,...i},s)=>{const{__scopeCheckboxGroup:o,className:a,...l}=Da(i,lu),u=pfe(o);return E.createElement(fTe,{scope:o,color:t,size:r,highContrast:e,variant:n},E.createElement(KMe,{...u,...l,ref:s,className:Ws("rt-CheckboxGroupRoot",a)}))});gfe.displayName="CheckboxGroup.Root";const yfe=E.forwardRef((t,e)=>{const{__scopeCheckboxGroup:r,children:n,className:i,style:s,...o}=t,{size:a}=mfe("CheckboxGroupItem",r);return n?E.createElement(Ln,{as:"label",size:a,className:Ws("rt-CheckboxGroupItem",i),style:s},E.createElement(Oj,{__scopeCheckboxGroup:r,...o,ref:e}),n&&E.createElement("span",{className:"rt-CheckboxGroupItemInner"},n)):E.createElement(Oj,{__scopeCheckboxGroup:r,...o,ref:e,className:i,style:s})});yfe.displayName="CheckboxGroup.Item";const Oj=E.forwardRef(({__scopeCheckboxGroup:t,...e},r)=>{const n=mfe("CheckboxGroupItemCheckbox",t),i=pfe(t),{color:s,className:o}=Da({...e,...n},gb,lu);return E.createElement(QMe,{...i,"data-accent-color":s,...e,ref:r,className:Ws("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxGroupItemCheckbox",o)},E.createElement(eTe,{...i,asChild:!0,className:"rt-BaseCheckboxIndicator"},E.createElement(p$,null)))});Oj.displayName="CheckboxGroup.ItemCheckbox";const Nj=E.forwardRef((t,e)=>{const{className:r,color:n,checked:i,defaultChecked:s,onCheckedChange:o,...a}=Da(t,cfe,lu),[l,u]=ty({prop:i,defaultProp:s,onChange:o});return E.createElement(Wde,{"data-accent-color":n,...a,defaultChecked:s,checked:l,onCheckedChange:u,asChild:!1,ref:e,className:Ws("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxRoot",r)},E.createElement(Zde,{asChild:!0,className:"rt-BaseCheckboxIndicator rt-CheckboxIndicator"},E.createElement(l==="indeterminate"?hfe:p$,null)))});Nj.displayName="Checkbox";const pTe=["1","2","3","4"],mTe=["none","initial"],gTe=["left","center","right"],yTe={...Vp,size:{type:"enum",className:"rt-r-size",values:pTe,default:"4",responsive:!0},display:{type:"enum",className:"rt-r-display",values:mTe,parseValue:vTe,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:gTe,parseValue:_Te,responsive:!0}};function vTe(t){return t==="initial"?"flex":t}function _Te(t){return t==="left"?"start":t==="right"?"end":t}const m$=E.forwardRef(({width:t,minWidth:e,maxWidth:r,height:n,minHeight:i,maxHeight:s,...o},a)=>{const{asChild:l,children:u,className:d,...f}=Da(o,yTe,c$,lu),{className:m,style:v}=Da({width:t,minWidth:e,maxWidth:r,height:n,minHeight:i,maxHeight:s},QW,ide);return E.createElement(l?qd:"div",{...f,ref:a,className:Ws("rt-Container",d)},hMe({asChild:l,children:u},b=>E.createElement("div",{className:Ws("rt-ContainerInner",m),style:v},b)))});m$.displayName="Container";function Dj(t,[e,r]){return Math.min(r,Math.max(e,t))}function xTe(t,e){return E.useReducer((r,n)=>e[r][n]??r,t)}var mZ="ScrollArea",[vfe,aMt]=zf(mZ),[wTe,Hp]=vfe(mZ),_fe=E.forwardRef((t,e)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:s=600,...o}=t,[a,l]=E.useState(null),[u,d]=E.useState(null),[f,m]=E.useState(null),[v,b]=E.useState(null),[M,O]=E.useState(null),[I,A]=E.useState(0),[j,H]=E.useState(0),[W,re]=E.useState(!1),[K,pe]=E.useState(!1),ge=So(e,ee=>l(ee)),fe=PS(i);return oe.jsx(wTe,{scope:r,type:n,dir:fe,scrollHideDelay:s,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:W,onScrollbarXEnabledChange:re,scrollbarY:M,onScrollbarYChange:O,scrollbarYEnabled:K,onScrollbarYEnabledChange:pe,onCornerWidthChange:A,onCornerHeightChange:H,children:oe.jsx(no.div,{dir:fe,...o,ref:ge,style:{position:"relative","--radix-scroll-area-corner-width":I+"px","--radix-scroll-area-corner-height":j+"px",...t.style}})})});_fe.displayName=mZ;var xfe="ScrollAreaViewport",wfe=E.forwardRef((t,e)=>{const{__scopeScrollArea:r,children:n,nonce:i,...s}=t,o=Hp(xfe,r),a=E.useRef(null),l=So(e,a,o.onViewportChange);return oe.jsxs(oe.Fragment,{children:[oe.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),oe.jsx(no.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:oe.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});wfe.displayName=xfe;var _m="ScrollAreaScrollbar",bfe=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Hp(_m,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,a=t.orientation==="horizontal";return E.useEffect(()=>(a?s(!0):o(!0),()=>{a?s(!1):o(!1)}),[a,s,o]),i.type==="hover"?oe.jsx(bTe,{...n,ref:e,forceMount:r}):i.type==="scroll"?oe.jsx(CTe,{...n,ref:e,forceMount:r}):i.type==="auto"?oe.jsx(Cfe,{...n,ref:e,forceMount:r}):i.type==="always"?oe.jsx(gZ,{...n,ref:e}):null});bfe.displayName=_m;var bTe=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Hp(_m,t.__scopeScrollArea),[s,o]=E.useState(!1);return E.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),oe.jsx(Z2,{present:r||s,children:oe.jsx(Cfe,{"data-state":s?"visible":"hidden",...n,ref:e})})}),CTe=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Hp(_m,t.__scopeScrollArea),s=t.orientation==="horizontal",o=y$(()=>l("SCROLL_END"),100),[a,l]=xTe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return E.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,i.scrollHideDelay,l]),E.useEffect(()=>{const u=i.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const v=u[d];f!==v&&(l("SCROLL"),o()),f=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[i.viewport,s,l,o]),oe.jsx(Z2,{present:r||a!=="hidden",children:oe.jsx(gZ,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:e,onPointerEnter:Ls(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ls(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Cfe=E.forwardRef((t,e)=>{const r=Hp(_m,t.__scopeScrollArea),{forceMount:n,...i}=t,[s,o]=E.useState(!1),a=t.orientation==="horizontal",l=y$(()=>{if(r.viewport){const u=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=t,i=Hp(_m,t.__scopeScrollArea),s=E.useRef(null),o=E.useRef(0),[a,l]=E.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Tfe(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function f(m,v){return LTe(m,o.current,a,v)}return r==="horizontal"?oe.jsx(STe,{...d,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollLeft,v=kee(m,a,i.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,i.dir))}}):r==="vertical"?oe.jsx(ETe,{...d,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollTop,v=kee(m,a);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null}),STe=E.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,...i}=t,s=Hp(_m,t.__scopeScrollArea),[o,a]=E.useState(),l=E.useRef(null),u=So(e,l,s.onScrollbarXChange);return E.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),oe.jsx(Efe,{"data-orientation":"horizontal",...i,ref:u,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":g$(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+d.deltaX;t.onWheelScroll(m),Rfe(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:jk(o.paddingLeft),paddingEnd:jk(o.paddingRight)}})}})}),ETe=E.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,...i}=t,s=Hp(_m,t.__scopeScrollArea),[o,a]=E.useState(),l=E.useRef(null),u=So(e,l,s.onScrollbarYChange);return E.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),oe.jsx(Efe,{"data-orientation":"vertical",...i,ref:u,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":g$(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const m=s.viewport.scrollTop+d.deltaY;t.onWheelScroll(m),Rfe(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:jk(o.paddingTop),paddingEnd:jk(o.paddingBottom)}})}})}),[MTe,Sfe]=vfe(_m),Efe=E.forwardRef((t,e)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=t,v=Hp(_m,r),[b,M]=E.useState(null),O=So(e,ge=>M(ge)),I=E.useRef(null),A=E.useRef(""),j=v.viewport,H=n.content-n.viewport,W=Nc(d),re=Nc(l),K=y$(f,10);function pe(ge){if(I.current){const fe=ge.clientX-I.current.left,ee=ge.clientY-I.current.top;u({x:fe,y:ee})}}return E.useEffect(()=>{const ge=fe=>{const ee=fe.target;(b==null?void 0:b.contains(ee))&&W(fe,H)};return document.addEventListener("wheel",ge,{passive:!1}),()=>document.removeEventListener("wheel",ge,{passive:!1})},[j,b,H,W]),E.useEffect(re,[n,re]),hw(b,K),hw(v.content,K),oe.jsx(MTe,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:Nc(s),onThumbPointerUp:Nc(o),onThumbPositionChange:re,onThumbPointerDown:Nc(a),children:oe.jsx(no.div,{...m,ref:O,style:{position:"absolute",...m.style},onPointerDown:Ls(t.onPointerDown,ge=>{ge.button===0&&(ge.target.setPointerCapture(ge.pointerId),I.current=b.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),pe(ge))}),onPointerMove:Ls(t.onPointerMove,pe),onPointerUp:Ls(t.onPointerUp,ge=>{const fe=ge.target;fe.hasPointerCapture(ge.pointerId)&&fe.releasePointerCapture(ge.pointerId),document.body.style.webkitUserSelect=A.current,v.viewport&&(v.viewport.style.scrollBehavior=""),I.current=null})})})}),Bk="ScrollAreaThumb",Mfe=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Sfe(Bk,t.__scopeScrollArea);return oe.jsx(Z2,{present:r||i.hasThumb,children:oe.jsx(TTe,{ref:e,...n})})}),TTe=E.forwardRef((t,e)=>{const{__scopeScrollArea:r,style:n,...i}=t,s=Hp(Bk,r),o=Sfe(Bk,r),{onThumbPositionChange:a}=o,l=So(e,f=>o.onThumbChange(f)),u=E.useRef(),d=y$(()=>{u.current&&(u.current(),u.current=void 0)},100);return E.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(d(),!u.current){const v=kTe(f,a);u.current=v,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,d,a]),oe.jsx(no.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ls(t.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),b=f.clientX-v.left,M=f.clientY-v.top;o.onThumbPointerDown({x:b,y:M})}),onPointerUp:Ls(t.onPointerUp,o.onThumbPointerUp)})});Mfe.displayName=Bk;var yZ="ScrollAreaCorner",ITe=E.forwardRef((t,e)=>{const r=Hp(yZ,t.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?oe.jsx(RTe,{...t,ref:e}):null});ITe.displayName=yZ;var RTe=E.forwardRef((t,e)=>{const{__scopeScrollArea:r,...n}=t,i=Hp(yZ,r),[s,o]=E.useState(0),[a,l]=E.useState(0),u=!!(s&&a);return hw(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),hw(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),u?oe.jsx(no.div,{...n,ref:e,style:{width:s,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function jk(t){return t?parseInt(t,10):0}function Tfe(t,e){const r=t/e;return isNaN(r)?0:r}function g$(t){const e=Tfe(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=(t.scrollbar.size-r)*e;return Math.max(n,18)}function LTe(t,e,r,n="ltr"){const i=g$(r),s=i/2,o=e||s,a=i-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Ife([l,u],f)(t)}function kee(t,e,r="ltr"){const n=g$(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,a=s-n,l=r==="ltr"?[0,o]:[o*-1,0],u=Dj(t,l);return Ife([0,o],[0,a])(u)}function Ife(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function Rfe(t,e){return t>0&&t{})=>{let r={left:t.scrollLeft,top:t.scrollTop},n=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=r.left!==s.left,a=r.top!==s.top;(o||a)&&e(),r=s,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function y$(t,e){const r=Nc(t),n=E.useRef(0);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),E.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,e)},[r,e])}function hw(t,e){const r=Nc(e);Zu(()=>{let n=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(t),()=>{window.cancelAnimationFrame(n),i.unobserve(t)}}},[t,r])}var ATe=_fe,PTe=wfe,$Te=bfe,OTe=Mfe;const NTe=["start","center","end","baseline","stretch"],DTe=["horizontal","vertical"],FTe=["1","2","3"],zTe={orientation:{type:"enum",className:"rt-r-orientation",values:DTe,default:"horizontal",responsive:!0},size:{type:"enum",className:"rt-r-size",values:FTe,default:"2",responsive:!0},trim:{...sde.trim,className:"rt-r-trim"}},BTe={align:{type:"enum",className:"rt-r-ai",values:NTe,responsive:!0}},jTe={...QW,...Up,...Y2},Lfe=E.forwardRef((t,e)=>{const{className:r,...n}=Da(t,zTe,lu);return E.createElement(Ln,{asChild:!0},E.createElement("dl",{...n,ref:e,className:Ws("rt-DataListRoot",r)}))});Lfe.displayName="DataList.Root";const kfe=E.forwardRef((t,e)=>{const{className:r,...n}=Da(t,BTe);return E.createElement("div",{...n,ref:e,className:Ws("rt-DataListItem",r)})});kfe.displayName="DataList.Item";const Afe=E.forwardRef((t,e)=>{const{className:r,color:n,...i}=Da(t,jTe);return E.createElement("dt",{...i,"data-accent-color":n,ref:e,className:Ws("rt-DataListLabel",r)})});Afe.displayName="DataList.Label";const Pfe=E.forwardRef(({children:t,className:e,...r},n)=>E.createElement("dd",{...r,ref:n,className:Ws(e,"rt-DataListValue")},t));Pfe.displayName="DataList.Value";const VTe=["all","x","y","top","bottom","left","right"],UTe=["border-box","padding-box"],Y_=["current","0"],HTe={...Vp,side:{type:"enum",className:"rt-r-side",values:VTe,default:"all",responsive:!0},clip:{type:"enum",className:"rt-r-clip",values:UTe,default:"border-box",responsive:!0},p:{type:"enum",className:"rt-r-p",values:Y_,parseValue:X_,responsive:!0},px:{type:"enum",className:"rt-r-px",values:Y_,parseValue:X_,responsive:!0},py:{type:"enum",className:"rt-r-py",values:Y_,parseValue:X_,responsive:!0},pt:{type:"enum",className:"rt-r-pt",values:Y_,parseValue:X_,responsive:!0},pr:{type:"enum",className:"rt-r-pr",values:Y_,parseValue:X_,responsive:!0},pb:{type:"enum",className:"rt-r-pb",values:Y_,parseValue:X_,responsive:!0},pl:{type:"enum",className:"rt-r-pl",values:Y_,parseValue:X_,responsive:!0}};function X_(t){return t==="current"?"inset":t}const vZ=E.forwardRef((t,e)=>{const{asChild:r,className:n,...i}=Da(t,HTe,lu);return E.createElement(r?qd:"div",{...i,ref:e,className:Ws("rt-Inset",n)})});vZ.displayName="Inset";var _Z="Radio",[GTe,$fe]=zf(_Z),[qTe,WTe]=GTe(_Z),Ofe=E.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...u}=t,[d,f]=E.useState(null),m=So(e,M=>f(M)),v=E.useRef(!1),b=d?!!d.closest("form"):!0;return oe.jsxs(qTe,{scope:r,checked:i,disabled:o,children:[oe.jsx(no.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ffe(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:m,onClick:Ls(t.onClick,M=>{i||l==null||l(),b&&(v.current=M.isPropagationStopped(),v.current||M.stopPropagation())})}),b&&oe.jsx(ZTe,{control:d,bubbles:!v.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}})]})});Ofe.displayName=_Z;var Nfe="RadioIndicator",Dfe=E.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=WTe(Nfe,r);return oe.jsx(Z2,{present:n||s.checked,children:oe.jsx(no.span,{"data-state":Ffe(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});Dfe.displayName=Nfe;var ZTe=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=E.useRef(null),o=h$(r),a=o$(e);return E.useEffect(()=>{const l=s.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&f){const m=new Event("click",{bubbles:n});f.call(l,r),l.dispatchEvent(m)}},[o,r,n]),oe.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ffe(t){return t?"checked":"unchecked"}var YTe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],xZ="RadioGroup",[XTe,zfe]=zf(xZ,[f$,$fe]),Bfe=f$(),jfe=$fe(),[JTe,KTe]=XTe(xZ),Vfe=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...m}=t,v=Bfe(r),b=PS(u),[M,O]=ty({prop:s,defaultProp:i,onChange:f});return oe.jsx(JTe,{scope:r,name:n,required:o,disabled:a,value:M,onValueChange:O,children:oe.jsx(tfe,{asChild:!0,...v,orientation:l,dir:b,loop:d,children:oe.jsx(no.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:b,...m,ref:e})})})});Vfe.displayName=xZ;var Ufe="RadioGroupItem",Hfe=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=KTe(Ufe,r),o=s.disabled||n,a=Bfe(r),l=jfe(r),u=E.useRef(null),d=So(e,u),f=s.value===i.value,m=E.useRef(!1);return E.useEffect(()=>{const v=M=>{YTe.includes(M.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",b)}},[]),oe.jsx(rfe,{asChild:!0,...a,focusable:!o,active:f,children:oe.jsx(Ofe,{disabled:o,required:s.required,checked:f,...l,...i,name:s.name,ref:d,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ls(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Ls(i.onFocus,()=>{var v;m.current&&((v=u.current)==null||v.click())})})})});Hfe.displayName=Ufe;var QTe="RadioGroupIndicator",eIe=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=jfe(r);return oe.jsx(Dfe,{...i,...n,ref:e})});eIe.displayName=QTe;var Gfe=Vfe,qfe=Hfe;const tIe=["1","2","3"],rIe=["surface","classic"],nIe={...Vp,size:{type:"enum",className:"rt-r-size",values:tIe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:rIe,default:"surface"},...Up,...Y2,columns:{...zk.columns,default:"repeat(auto-fit, minmax(160px, 1fr))"},gap:{...zk.gap,default:"4"}},wZ=E.forwardRef((t,e)=>{const{className:r,color:n,...i}=Da(t,nIe,lu);return E.createElement(B5,{asChild:!0},E.createElement(Gfe,{"data-accent-color":n,...i,ref:e,className:Ws("rt-RadioCardsRoot",r)}))});wZ.displayName="RadioCards.Root";const bC=E.forwardRef(({className:t,...e},r)=>E.createElement(qfe,{...e,asChild:!1,ref:r,className:Ws("rt-reset","rt-BaseCard","rt-RadioCardsItem",t)}));bC.displayName="RadioCards.Item";const iIe=["1","2","3"],sIe=["classic","surface","soft"],yb={...Vp,size:{type:"enum",className:"rt-r-size",values:iIe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:sIe,default:"surface"},...Up,...Y2},Wfe="RadioGroup",[oIe]=zf(Wfe,[zfe]),Zfe=zfe(),[aIe,Yfe]=oIe(Wfe),Xfe=E.forwardRef(({color:t=yb.color.default,highContrast:e=yb.highContrast.default,size:r=yb.size.default,variant:n=yb.variant.default,...i},s)=>{const{__scopeRadioGroup:o,className:a,...l}=Da(i,lu),u=Zfe(o);return E.createElement(aIe,{scope:o,color:t,highContrast:e,size:r,variant:n},E.createElement(Gfe,{...u,...l,ref:s,className:Ws("rt-RadioGroupRoot",a)}))});Xfe.displayName="RadioGroup.Root";const Jfe=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,children:n,className:i,style:s,...o}=t,{size:a}=Yfe("RadioGroupItem",r);return n?E.createElement(Ln,{as:"label",size:a,className:Ws("rt-RadioGroupItem",i),style:s},E.createElement(Fj,{__scopeRadioGroup:r,...o,ref:e}),n&&E.createElement("span",{className:"rt-RadioGroupItemInner"},n)):E.createElement(Fj,{__scopeRadioGroup:r,...o,ref:e,className:i,style:s})});Jfe.displayName="RadioGroup.Item";const Fj=E.forwardRef(({__scopeRadioGroup:t,...e},r)=>{const n=Yfe("RadioGroupItemRadio",t),i=Zfe(t),{color:s,className:o}=Da({...e,...n},yb,lu);return E.createElement(qfe,{...i,"data-accent-color":s,...e,asChild:!1,ref:r,className:Ws("rt-reset","rt-BaseRadioRoot",o)})});Fj.displayName="RadioGroup.ItemRadio";var lIe=[" ","Enter","ArrowUp","ArrowDown"],uIe=[" ","Enter"],OS="Select",[v$,_$,cIe]=Yde(OS),[qw,lMt]=zf(OS,[cIe,a$]),x$=a$(),[hIe,X2]=qw(OS),[dIe,fIe]=qw(OS),Kfe=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:m,required:v}=t,b=x$(e),[M,O]=E.useState(null),[I,A]=E.useState(null),[j,H]=E.useState(!1),W=PS(u),[re=!1,K]=ty({prop:n,defaultProp:i,onChange:s}),[pe,ge]=ty({prop:o,defaultProp:a,onChange:l}),fe=E.useRef(null),ee=M?!!M.closest("form"):!0,[be,le]=E.useState(new Set),ve=Array.from(be).map(Pe=>Pe.props.value).join(";");return oe.jsx(jEe,{...b,children:oe.jsxs(hIe,{required:v,scope:e,trigger:M,onTriggerChange:O,valueNode:I,onValueNodeChange:A,valueNodeHasChildren:j,onValueNodeHasChildrenChange:H,contentId:kS(),value:pe,onValueChange:ge,open:re,onOpenChange:K,dir:W,triggerPointerDownPosRef:fe,disabled:m,children:[oe.jsx(v$.Provider,{scope:e,children:oe.jsx(dIe,{scope:t.__scopeSelect,onNativeOptionAdd:E.useCallback(Pe=>{le(Fe=>new Set(Fe).add(Pe))},[]),onNativeOptionRemove:E.useCallback(Pe=>{le(Fe=>{const We=new Set(Fe);return We.delete(Pe),We})},[]),children:r})}),ee?oe.jsxs(bpe,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:pe,onChange:Pe=>ge(Pe.target.value),disabled:m,children:[pe===void 0?oe.jsx("option",{value:""}):null,Array.from(be)]},ve):null]})})};Kfe.displayName=OS;var Qfe="SelectTrigger",epe=E.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=x$(r),o=X2(Qfe,r),a=o.disabled||n,l=So(e,o.onTriggerChange),u=_$(r),[d,f,m]=Cpe(b=>{const M=u().filter(A=>!A.disabled),O=M.find(A=>A.value===o.value),I=Spe(M,b,O);I!==void 0&&o.onValueChange(I.value)}),v=()=>{a||(o.onOpenChange(!0),m())};return oe.jsx(Mde,{asChild:!0,...s,children:oe.jsx(no.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":wpe(o.value)?"":void 0,...i,ref:l,onClick:Ls(i.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ls(i.onPointerDown,b=>{const M=b.target;M.hasPointerCapture(b.pointerId)&&M.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ls(i.onKeyDown,b=>{const M=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(M&&b.key===" ")&&lIe.includes(b.key)&&(v(),b.preventDefault())})})})});epe.displayName=Qfe;var tpe="SelectValue",rpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=X2(tpe,r),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=So(e,l.onValueNodeChange);return Zu(()=>{u(d)},[u,d]),oe.jsx(no.span,{...a,ref:f,style:{pointerEvents:"none"},children:wpe(l.value)?oe.jsx(oe.Fragment,{children:o}):s})});rpe.displayName=tpe;var pIe="SelectIcon",npe=E.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return oe.jsx(no.span,{"aria-hidden":!0,...i,ref:e,children:n||"▼"})});npe.displayName=pIe;var mIe="SelectPortal",ipe=t=>oe.jsx(Zhe,{asChild:!0,...t});ipe.displayName=mIe;var y5="SelectContent",spe=E.forwardRef((t,e)=>{const r=X2(y5,t.__scopeSelect),[n,i]=E.useState();if(Zu(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?z5.createPortal(oe.jsx(ope,{scope:t.__scopeSelect,children:oe.jsx(v$.Slot,{scope:t.__scopeSelect,children:oe.jsx("div",{children:t.children})})}),s):null}return oe.jsx(ape,{...t,ref:e})});spe.displayName=y5;var Eg=10,[ope,J2]=qw(y5),gIe="SelectContentImpl",ape=E.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:b,hideWhenDetached:M,avoidCollisions:O,...I}=t,A=X2(y5,r),[j,H]=E.useState(null),[W,re]=E.useState(null),K=So(e,tr=>H(tr)),[pe,ge]=E.useState(null),[fe,ee]=E.useState(null),be=_$(r),[le,ve]=E.useState(!1),Pe=E.useRef(!1);E.useEffect(()=>{if(j)return _Se(j)},[j]),$Ce();const Fe=E.useCallback(tr=>{const[Se,...je]=be().map(we=>we.ref.current),[et]=je.slice(-1),yt=document.activeElement;for(const we of tr)if(we===yt||(we==null||we.scrollIntoView({block:"nearest"}),we===Se&&W&&(W.scrollTop=0),we===et&&W&&(W.scrollTop=W.scrollHeight),we==null||we.focus(),document.activeElement!==yt))return},[be,W]),We=E.useCallback(()=>Fe([pe,j]),[Fe,pe,j]);E.useEffect(()=>{le&&We()},[le,We]);const{onOpenChange:He,triggerPointerDownPosRef:Lt}=A;E.useEffect(()=>{if(j){let tr={x:0,y:0};const Se=et=>{var yt,we;tr={x:Math.abs(Math.round(et.pageX)-(((yt=Lt.current)==null?void 0:yt.x)??0)),y:Math.abs(Math.round(et.pageY)-(((we=Lt.current)==null?void 0:we.y)??0))}},je=et=>{tr.x<=10&&tr.y<=10?et.preventDefault():j.contains(et.target)||He(!1),document.removeEventListener("pointermove",Se),Lt.current=null};return Lt.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",je,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",je,{capture:!0})}}},[j,He,Lt]),E.useEffect(()=>{const tr=()=>He(!1);return window.addEventListener("blur",tr),window.addEventListener("resize",tr),()=>{window.removeEventListener("blur",tr),window.removeEventListener("resize",tr)}},[He]);const[lt,pt]=Cpe(tr=>{const Se=be().filter(yt=>!yt.disabled),je=Se.find(yt=>yt.ref.current===document.activeElement),et=Spe(Se,tr,je);et&&setTimeout(()=>et.ref.current.focus())}),rr=E.useCallback((tr,Se,je)=>{const et=!Pe.current&&!je;(A.value!==void 0&&A.value===Se||et)&&(ge(tr),et&&(Pe.current=!0))},[A.value]),Tt=E.useCallback(()=>j==null?void 0:j.focus(),[j]),Je=E.useCallback((tr,Se,je)=>{const et=!Pe.current&&!je;(A.value!==void 0&&A.value===Se||et)&&ee(tr)},[A.value]),pr=n==="popper"?zj:lpe,Ut=pr===zj?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:b,hideWhenDetached:M,avoidCollisions:O}:{};return oe.jsx(ope,{scope:r,content:j,viewport:W,onViewportChange:re,itemRefCallback:rr,selectedItem:pe,onItemLeave:Tt,itemTextRefCallback:Je,focusSelectedItem:We,selectedItemText:fe,position:n,isPositioned:le,searchRef:lt,children:oe.jsx(rde,{as:qd,allowPinchZoom:!0,children:oe.jsx(qhe,{asChild:!0,trapped:A.open,onMountAutoFocus:tr=>{tr.preventDefault()},onUnmountAutoFocus:Ls(i,tr=>{var Se;(Se=A.trigger)==null||Se.focus({preventScroll:!0}),tr.preventDefault()}),children:oe.jsx(KW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:tr=>tr.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:oe.jsx(pr,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:tr=>tr.preventDefault(),...I,...Ut,onPlaced:()=>ve(!0),ref:K,style:{display:"flex",flexDirection:"column",outline:"none",...I.style},onKeyDown:Ls(I.onKeyDown,tr=>{const Se=tr.ctrlKey||tr.altKey||tr.metaKey;if(tr.key==="Tab"&&tr.preventDefault(),!Se&&tr.key.length===1&&pt(tr.key),["ArrowUp","ArrowDown","Home","End"].includes(tr.key)){let et=be().filter(yt=>!yt.disabled).map(yt=>yt.ref.current);if(["ArrowUp","End"].includes(tr.key)&&(et=et.slice().reverse()),["ArrowUp","ArrowDown"].includes(tr.key)){const yt=tr.target,we=et.indexOf(yt);et=et.slice(we+1)}setTimeout(()=>Fe(et)),tr.preventDefault()}})})})})})})});ape.displayName=gIe;var yIe="SelectItemAlignedPosition",lpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=X2(y5,r),o=J2(y5,r),[a,l]=E.useState(null),[u,d]=E.useState(null),f=So(e,K=>d(K)),m=_$(r),v=E.useRef(!1),b=E.useRef(!0),{viewport:M,selectedItem:O,selectedItemText:I,focusSelectedItem:A}=o,j=E.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&M&&O&&I){const K=s.trigger.getBoundingClientRect(),pe=u.getBoundingClientRect(),ge=s.valueNode.getBoundingClientRect(),fe=I.getBoundingClientRect();if(s.dir!=="rtl"){const yt=fe.left-pe.left,we=ge.left-yt,ft=K.left-we,qt=K.width+ft,_r=Math.max(qt,pe.width),rt=window.innerWidth-Eg,Xe=Dj(we,[Eg,rt-_r]);a.style.minWidth=qt+"px",a.style.left=Xe+"px"}else{const yt=pe.right-fe.right,we=window.innerWidth-ge.right-yt,ft=window.innerWidth-K.right-we,qt=K.width+ft,_r=Math.max(qt,pe.width),rt=window.innerWidth-Eg,Xe=Dj(we,[Eg,rt-_r]);a.style.minWidth=qt+"px",a.style.right=Xe+"px"}const ee=m(),be=window.innerHeight-Eg*2,le=M.scrollHeight,ve=window.getComputedStyle(u),Pe=parseInt(ve.borderTopWidth,10),Fe=parseInt(ve.paddingTop,10),We=parseInt(ve.borderBottomWidth,10),He=parseInt(ve.paddingBottom,10),Lt=Pe+Fe+le+He+We,lt=Math.min(O.offsetHeight*5,Lt),pt=window.getComputedStyle(M),rr=parseInt(pt.paddingTop,10),Tt=parseInt(pt.paddingBottom,10),Je=K.top+K.height/2-Eg,pr=be-Je,Ut=O.offsetHeight/2,tr=O.offsetTop+Ut,Se=Pe+Fe+tr,je=Lt-Se;if(Se<=Je){const yt=O===ee[ee.length-1].ref.current;a.style.bottom="0px";const we=u.clientHeight-M.offsetTop-M.offsetHeight,ft=Math.max(pr,Ut+(yt?Tt:0)+we+We),qt=Se+ft;a.style.height=qt+"px"}else{const yt=O===ee[0].ref.current;a.style.top="0px";const ft=Math.max(Je,Pe+M.offsetTop+(yt?rr:0)+Ut)+je;a.style.height=ft+"px",M.scrollTop=Se-Je+M.offsetTop}a.style.margin=`${Eg}px 0`,a.style.minHeight=lt+"px",a.style.maxHeight=be+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,s.trigger,s.valueNode,a,u,M,O,I,s.dir,n]);Zu(()=>j(),[j]);const[H,W]=E.useState();Zu(()=>{u&&W(window.getComputedStyle(u).zIndex)},[u]);const re=E.useCallback(K=>{K&&b.current===!0&&(j(),A==null||A(),b.current=!1)},[j,A]);return oe.jsx(_Ie,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:re,children:oe.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:H},children:oe.jsx(no.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});lpe.displayName=yIe;var vIe="SelectPopperPosition",zj=E.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Eg,...s}=t,o=x$(r);return oe.jsx(Tde,{...o,...s,ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zj.displayName=vIe;var[_Ie,bZ]=qw(y5,{}),Bj="SelectViewport",upe=E.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...i}=t,s=J2(Bj,r),o=bZ(Bj,r),a=So(e,s.onViewportChange),l=E.useRef(0);return oe.jsxs(oe.Fragment,{children:[oe.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),oe.jsx(v$.Slot,{scope:r,children:oe.jsx(no.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"auto",...i.style},onScroll:Ls(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const b=window.innerHeight-Eg*2,M=parseFloat(f.style.minHeight),O=parseFloat(f.style.height),I=Math.max(M,O);if(I0?H:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});upe.displayName=Bj;var cpe="SelectGroup",[xIe,wIe]=qw(cpe),hpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=kS();return oe.jsx(xIe,{scope:r,id:i,children:oe.jsx(no.div,{role:"group","aria-labelledby":i,...n,ref:e})})});hpe.displayName=cpe;var dpe="SelectLabel",fpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=wIe(dpe,r);return oe.jsx(no.div,{id:i.id,...n,ref:e})});fpe.displayName=dpe;var Vk="SelectItem",[bIe,ppe]=qw(Vk),mpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=X2(Vk,r),l=J2(Vk,r),u=a.value===n,[d,f]=E.useState(s??""),[m,v]=E.useState(!1),b=So(e,I=>{var A;return(A=l.itemRefCallback)==null?void 0:A.call(l,I,n,i)}),M=kS(),O=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return oe.jsx(bIe,{scope:r,value:n,disabled:i,textId:M,isSelected:u,onItemTextChange:E.useCallback(I=>{f(A=>A||((I==null?void 0:I.textContent)??"").trim())},[]),children:oe.jsx(v$.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:oe.jsx(no.div,{role:"option","aria-labelledby":M,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:Ls(o.onFocus,()=>v(!0)),onBlur:Ls(o.onBlur,()=>v(!1)),onPointerUp:Ls(o.onPointerUp,O),onPointerMove:Ls(o.onPointerMove,I=>{var A;i?(A=l.onItemLeave)==null||A.call(l):I.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ls(o.onPointerLeave,I=>{var A;I.currentTarget===document.activeElement&&((A=l.onItemLeave)==null||A.call(l))}),onKeyDown:Ls(o.onKeyDown,I=>{var j;((j=l.searchRef)==null?void 0:j.current)!==""&&I.key===" "||(uIe.includes(I.key)&&O(),I.key===" "&&I.preventDefault())})})})})});mpe.displayName=Vk;var vb="SelectItemText",gpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=X2(vb,r),a=J2(vb,r),l=ppe(vb,r),u=fIe(vb,r),[d,f]=E.useState(null),m=So(e,I=>f(I),l.onItemTextChange,I=>{var A;return(A=a.itemTextRefCallback)==null?void 0:A.call(a,I,l.value,l.disabled)}),v=d==null?void 0:d.textContent,b=E.useMemo(()=>oe.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:M,onNativeOptionRemove:O}=u;return Zu(()=>(M(b),()=>O(b)),[M,O,b]),oe.jsxs(oe.Fragment,{children:[oe.jsx(no.span,{id:l.textId,...s,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?z5.createPortal(s.children,o.valueNode):null]})});gpe.displayName=vb;var ype="SelectItemIndicator",vpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return ppe(ype,r).isSelected?oe.jsx(no.span,{"aria-hidden":!0,...n,ref:e}):null});vpe.displayName=ype;var jj="SelectScrollUpButton",CIe=E.forwardRef((t,e)=>{const r=J2(jj,t.__scopeSelect),n=bZ(jj,t.__scopeSelect),[i,s]=E.useState(!1),o=So(e,n.onScrollButtonChange);return Zu(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),i?oe.jsx(_pe,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});CIe.displayName=jj;var Vj="SelectScrollDownButton",SIe=E.forwardRef((t,e)=>{const r=J2(Vj,t.__scopeSelect),n=bZ(Vj,t.__scopeSelect),[i,s]=E.useState(!1),o=So(e,n.onScrollButtonChange);return Zu(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),i?oe.jsx(_pe,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});SIe.displayName=Vj;var _pe=E.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=t,s=J2("SelectScrollButton",r),o=E.useRef(null),a=_$(r),l=E.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return E.useEffect(()=>()=>l(),[l]),Zu(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),oe.jsx(no.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Ls(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:Ls(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:Ls(i.onPointerLeave,()=>{l()})})}),EIe="SelectSeparator",xpe=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return oe.jsx(no.div,{"aria-hidden":!0,...n,ref:e})});xpe.displayName=EIe;var Uj="SelectArrow",MIe=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=x$(r),s=X2(Uj,r),o=J2(Uj,r);return s.open&&o.position==="popper"?oe.jsx(Ide,{...i,...n,ref:e}):null});MIe.displayName=Uj;function wpe(t){return t===""||t===void 0}var bpe=E.forwardRef((t,e)=>{const{value:r,...n}=t,i=E.useRef(null),s=So(e,i),o=h$(r);return E.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&d){const f=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(f)}},[o,r]),oe.jsx(t$,{asChild:!0,children:oe.jsx("select",{...n,ref:s,defaultValue:r})})});bpe.displayName="BubbleSelect";function Cpe(t){const e=Nc(t),r=E.useRef(""),n=E.useRef(0),i=E.useCallback(o=>{const a=r.current+o;e(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function Spe(t,e,r){const i=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=TIe(t,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function TIe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var IIe=Kfe,RIe=epe,LIe=rpe,kIe=npe,AIe=ipe,PIe=spe,$Ie=upe,OIe=hpe,NIe=fpe,DIe=mpe,FIe=gpe,zIe=vpe,BIe=xpe;const jIe=["1","2","3"],CZ={size:{type:"enum",className:"rt-r-size",values:jIe,default:"2",responsive:!0}},VIe=["classic","surface","soft","ghost"],UIe={variant:{type:"enum",className:"rt-variant",values:VIe,default:"surface"},...Up,...$S,placeholder:{type:"string"}},HIe=["solid","soft"],GIe={variant:{type:"enum",className:"rt-variant",values:HIe,default:"solid"},...Up,...Y2},SZ=E.createContext({}),dw=t=>{const{children:e,size:r=CZ.size.default,...n}=t;return E.createElement(IIe,{...n},E.createElement(SZ.Provider,{value:E.useMemo(()=>({size:r}),[r])},e))};dw.displayName="Select.Root";const fw=E.forwardRef((t,e)=>{const r=E.useContext(SZ),{children:n,className:i,color:s,radius:o,placeholder:a,...l}=Da({size:r==null?void 0:r.size,...t},{size:CZ.size},UIe,lu);return E.createElement(RIe,{asChild:!0},E.createElement("button",{"data-accent-color":s,"data-radius":o,...l,ref:e,className:Ws("rt-reset","rt-SelectTrigger",i)},E.createElement("span",{className:"rt-SelectTriggerInner"},E.createElement(LIe,{placeholder:a},n)),E.createElement(kIe,{asChild:!0},E.createElement(dfe,{className:"rt-SelectIcon"}))))});fw.displayName="Select.Trigger";const pw=E.forwardRef((t,e)=>{const r=E.useContext(SZ),{className:n,children:i,color:s,container:o,...a}=Da({size:r==null?void 0:r.size,...t},{size:CZ.size},GIe),l=cMe(),u=s||l.accentColor;return E.createElement(AIe,{container:o},E.createElement(hZ,{asChild:!0},E.createElement(PIe,{"data-accent-color":u,sideOffset:4,...a,asChild:!1,ref:e,className:Ws({"rt-PopperContent":a.position==="popper"},"rt-SelectContent",n)},E.createElement(ATe,{type:"auto",className:"rt-ScrollAreaRoot"},E.createElement($Ie,{asChild:!0,className:"rt-SelectViewport"},E.createElement(PTe,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),E.createElement($Te,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},E.createElement(OTe,{className:"rt-ScrollAreaThumb"}))))))});pw.displayName="Select.Content";const mw=E.forwardRef((t,e)=>{const{className:r,children:n,...i}=t;return E.createElement(DIe,{...i,asChild:!1,ref:e,className:Ws("rt-SelectItem",r)},E.createElement(zIe,{className:"rt-SelectItemIndicator"},E.createElement(p$,{className:"rt-SelectItemIndicatorIcon"})),E.createElement(FIe,null,n))});mw.displayName="Select.Item";const qIe=E.forwardRef(({className:t,...e},r)=>E.createElement(OIe,{...e,asChild:!1,ref:r,className:Ws("rt-SelectGroup",t)}));qIe.displayName="Select.Group";const WIe=E.forwardRef(({className:t,...e},r)=>E.createElement(NIe,{...e,asChild:!1,ref:r,className:Ws("rt-SelectLabel",t)}));WIe.displayName="Select.Label";const ZIe=E.forwardRef(({className:t,...e},r)=>E.createElement(BIe,{...e,asChild:!1,ref:r,className:Ws("rt-SelectSeparator",t)}));ZIe.displayName="Select.Separator";const YIe=["horizontal","vertical"],XIe=["1","2","3","4"],JIe={orientation:{type:"enum",className:"rt-r-orientation",values:YIe,default:"horizontal",responsive:!0},size:{type:"enum",className:"rt-r-size",values:XIe,default:"1",responsive:!0},color:{...Up.color,default:"gray"},decorative:{type:"boolean",default:!0}},gw=E.forwardRef((t,e)=>{const{className:r,color:n,decorative:i,...s}=Da(t,JIe,lu);return E.createElement("span",{"data-accent-color":n,role:i?void 0:"separator",...s,ref:e,className:Ws("rt-Separator",r)})});gw.displayName="Separator";var EZ="Switch",[KIe,uMt]=zf(EZ),[QIe,eRe]=KIe(EZ),Epe=E.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:u,...d}=t,[f,m]=E.useState(null),v=So(e,A=>m(A)),b=E.useRef(!1),M=f?!!f.closest("form"):!0,[O=!1,I]=ty({prop:i,defaultProp:s,onChange:u});return oe.jsxs(QIe,{scope:r,checked:O,disabled:a,children:[oe.jsx(no.button,{type:"button",role:"switch","aria-checked":O,"aria-required":o,"data-state":Ipe(O),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:v,onClick:Ls(t.onClick,A=>{I(j=>!j),M&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})}),M&&oe.jsx(tRe,{control:f,bubbles:!b.current,name:n,value:l,checked:O,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});Epe.displayName=EZ;var Mpe="SwitchThumb",Tpe=E.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=eRe(Mpe,r);return oe.jsx(no.span,{"data-state":Ipe(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:e})});Tpe.displayName=Mpe;var tRe=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=E.useRef(null),o=h$(r),a=o$(e);return E.useEffect(()=>{const l=s.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&f){const m=new Event("click",{bubbles:n});f.call(l,r),l.dispatchEvent(m)}},[o,r,n]),oe.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ipe(t){return t?"checked":"unchecked"}var rRe=Epe,nRe=Tpe;const iRe=["1","2","3"],sRe=["classic","surface","soft"],oRe={size:{type:"enum",className:"rt-r-size",values:iRe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:sRe,default:"surface"},...Up,...Y2,...$S},MZ=E.forwardRef((t,e)=>{const{className:r,color:n,radius:i,...s}=Da(t,oRe,lu);return E.createElement(rRe,{"data-accent-color":n,"data-radius":i,...s,asChild:!1,ref:e,className:Ws("rt-reset","rt-SwitchRoot",r)},E.createElement(nRe,{className:Ws("rt-SwitchThumb",{"rt-high-contrast":t.highContrast})}))});MZ.displayName="Switch";const aRe=["1","2","3"],lRe=["classic","surface","soft"],uRe=["none","vertical","horizontal","both"],cRe={size:{type:"enum",className:"rt-r-size",values:aRe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:lRe,default:"surface"},resize:{type:"enum",className:"rt-r-resize",values:uRe,responsive:!0},...Up,...$S},Rpe=E.forwardRef((t,e)=>{const{className:r,color:n,radius:i,style:s,...o}=Da(t,cRe,lu);return E.createElement("div",{"data-accent-color":n,"data-radius":i,className:Ws("rt-TextAreaRoot",r),style:s},E.createElement("textarea",{className:"rt-reset rt-TextAreaInput",ref:e,...o}))});Rpe.displayName="TextArea";const hRe=["1","2","3"],dRe=["classic","surface","soft"],fRe={size:{type:"enum",className:"rt-r-size",values:hRe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:dRe,default:"surface"},...Up,...$S},pRe=["left","right"],mRe={side:{type:"enum",values:pRe},...Up,gap:zde.gap,px:NR.px,pl:NR.pl,pr:NR.pr},w$=E.forwardRef((t,e)=>{const r=E.useRef(null),{children:n,className:i,color:s,radius:o,style:a,...l}=Da(t,fRe,lu);return E.createElement("div",{"data-accent-color":s,"data-radius":o,style:a,className:Ws("rt-TextFieldRoot",i),onPointerDown:u=>{const d=u.target;if(d.closest("input, button, a"))return;const f=r.current;if(!f)return;const m=d.closest(` + .rt-TextFieldSlot[data-side='right'], + .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left']) + `)?f.value.length:0;requestAnimationFrame(()=>{try{f.setSelectionRange(m,m)}catch{}f.focus()})}},E.createElement("input",{spellCheck:"false",...l,ref:JW(r,e),className:"rt-reset rt-TextFieldInput"}),n)});w$.displayName="TextField.Root";const TZ=E.forwardRef((t,e)=>{const{className:r,color:n,side:i,...s}=Da(t,mRe);return E.createElement("div",{"data-accent-color":n,"data-side":i,...s,ref:e,className:Ws("rt-TextFieldSlot",r)})});TZ.displayName="TextField.Slot";/** + * @remix-run/router v1.19.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function CC(){return CC=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Lpe(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function yRe(){return Math.random().toString(36).substr(2,8)}function Pee(t,e){return{usr:t.state,key:t.key,idx:e}}function Hj(t,e,r,n){return r===void 0&&(r=null),CC({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ww(e):e,{state:r,key:e&&e.key||n||yRe()})}function Uk(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ww(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function vRe(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=Vv.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(CC({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Vv.Pop;let O=d(),I=O==null?null:O-u;u=O,l&&l({action:a,location:M.location,delta:I})}function m(O,I){a=Vv.Push;let A=Hj(M.location,O,I);u=d()+1;let j=Pee(A,u),H=M.createHref(A);try{o.pushState(j,"",H)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;i.location.assign(H)}s&&l&&l({action:a,location:M.location,delta:1})}function v(O,I){a=Vv.Replace;let A=Hj(M.location,O,I);u=d();let j=Pee(A,u),H=M.createHref(A);o.replaceState(j,"",H),s&&l&&l({action:a,location:M.location,delta:0})}function b(O){let I=i.location.origin!=="null"?i.location.origin:i.location.href,A=typeof O=="string"?O:Uk(O);return A=A.replace(/ $/,"%20"),ou(I,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,I)}let M={get action(){return a},get location(){return t(i,o)},listen(O){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Aee,f),l=O,()=>{i.removeEventListener(Aee,f),l=null}},createHref(O){return e(i,O)},createURL:b,encodeLocation(O){let I=b(O);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:m,replace:v,go(O){return o.go(O)}};return M}var $ee;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})($ee||($ee={}));function _Re(t,e,r){return r===void 0&&(r="/"),xRe(t,e,r,!1)}function xRe(t,e,r,n){let i=typeof e=="string"?Ww(e):e,s=IZ(i.pathname||"/",r);if(s==null)return null;let o=kpe(t);wRe(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ou(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=c2([n,l.relativePath]),d=r.concat(l);s.children&&s.children.length>0&&(ou(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kpe(s.children,e,d,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:IRe(u,s.index),routesMeta:d})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Ape(s.path))i(s,o,l)}),e}function Ape(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=Ape(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function wRe(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:RRe(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const bRe=/^:[\w-]+$/,CRe=3,SRe=2,ERe=1,MRe=10,TRe=-2,Oee=t=>t==="*";function IRe(t,e){let r=t.split("/"),n=r.length;return r.some(Oee)&&(n+=TRe),e&&(n+=SRe),r.filter(i=>!Oee(i)).reduce((i,s)=>i+(bRe.test(s)?CRe:s===""?ERe:MRe),n)}function RRe(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function LRe(t,e,r){let{routesMeta:n}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:m,isOptional:v}=d;if(m==="*"){let M=a[f]||"";o=s.slice(0,s.length-M.length).replace(/(.)\/+$/,"$1")}const b=a[f];return v&&!b?u[m]=void 0:u[m]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function kRe(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Lpe(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function ARe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Lpe(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function IZ(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function PRe(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ww(t):t;return{pathname:r?r.startsWith("/")?r:$Re(r,e):e,search:DRe(n),hash:FRe(i)}}function $Re(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function rF(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ORe(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function RZ(t,e){let r=ORe(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function LZ(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ww(t):(i=CC({},t),ou(!i.pathname||!i.pathname.includes("?"),rF("?","pathname","search",i)),ou(!i.pathname||!i.pathname.includes("#"),rF("#","pathname","hash",i)),ou(!i.search||!i.search.includes("#"),rF("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}a=f>=0?e[f]:"/"}let l=PRe(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const c2=t=>t.join("/").replace(/\/\/+/g,"/"),NRe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),DRe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,FRe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function zRe(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Ppe=["post","put","patch","delete"];new Set(Ppe);const BRe=["get",...Ppe];new Set(BRe);/** + * React Router v6.26.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function SC(){return SC=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),E.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=LZ(u,JSON.parse(o),s,d.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:c2([e,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[e,n,o,s,t])}function Npe(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=E.useContext(K2),{matches:i}=E.useContext(Q2),{pathname:s}=Yw(),o=JSON.stringify(RZ(i,n.v7_relativeSplatPath));return E.useMemo(()=>LZ(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function HRe(t,e){return GRe(t,e)}function GRe(t,e,r,n){Zw()||ou(!1);let{navigator:i}=E.useContext(K2),{matches:s}=E.useContext(Q2),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Yw(),d;if(e){var f;let O=typeof e=="string"?Ww(e):e;l==="/"||(f=O.pathname)!=null&&f.startsWith(l)||ou(!1),d=O}else d=u;let m=d.pathname||"/",v=m;if(l!=="/"){let O=l.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(O.length).join("/")}let b=_Re(t,{pathname:v}),M=XRe(b&&b.map(O=>Object.assign({},O,{params:Object.assign({},a,O.params),pathname:c2([l,i.encodeLocation?i.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?l:c2([l,i.encodeLocation?i.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),s,r,n);return e&&M?E.createElement(b$.Provider,{value:{location:SC({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Vv.Pop}},M):M}function qRe(){let t=eLe(),e=zRe(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),r?E.createElement("pre",{style:i},r):null,null)}const WRe=E.createElement(qRe,null);class ZRe extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?E.createElement(Q2.Provider,{value:this.props.routeContext},E.createElement($pe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YRe(t){let{routeContext:e,match:r,children:n}=t,i=E.useContext(kZ);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(Q2.Provider,{value:e},n)}function XRe(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var s;if(!r)return null;if(r.errors)t=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(i=r)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ou(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,m)=>{let v,b=!1,M=null,O=null;r&&(v=a&&f.route.id?a[f.route.id]:void 0,M=f.route.errorElement||WRe,l&&(u<0&&m===0?(b=!0,O=null):u===m&&(b=!0,O=f.route.hydrateFallbackElement||null)));let I=e.concat(o.slice(0,m+1)),A=()=>{let j;return v?j=M:b?j=O:f.route.Component?j=E.createElement(f.route.Component,null):f.route.element?j=f.route.element:j=d,E.createElement(YRe,{match:f,routeContext:{outlet:d,matches:I,isDataRoute:r!=null},children:j})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(ZRe,{location:r.location,revalidation:r.revalidation,component:M,error:v,children:A(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):A()},null)}var Dpe=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Dpe||{}),Hk=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Hk||{});function JRe(t){let e=E.useContext(kZ);return e||ou(!1),e}function KRe(t){let e=E.useContext(jRe);return e||ou(!1),e}function QRe(t){let e=E.useContext(Q2);return e||ou(!1),e}function Fpe(t){let e=QRe(),r=e.matches[e.matches.length-1];return r.route.id||ou(!1),r.route.id}function eLe(){var t;let e=E.useContext($pe),r=KRe(Hk.UseRouteError),n=Fpe(Hk.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function tLe(){let{router:t}=JRe(Dpe.UseNavigateStable),e=Fpe(Hk.UseNavigateStable),r=E.useRef(!1);return Ope(()=>{r.current=!0}),E.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,SC({fromRouteId:e},s)))},[t,e])}function rLe(t){let{to:e,replace:r,state:n,relative:i}=t;Zw()||ou(!1);let{future:s,static:o}=E.useContext(K2),{matches:a}=E.useContext(Q2),{pathname:l}=Yw(),u=C$(),d=LZ(e,RZ(a,s.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return E.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:i}),[u,f,i,r,n]),null}function Cx(t){ou(!1)}function nLe(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Vv.Pop,navigator:s,static:o=!1,future:a}=t;Zw()&&ou(!1);let l=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:s,static:o,future:SC({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=Ww(n));let{pathname:d="/",search:f="",hash:m="",state:v=null,key:b="default"}=n,M=E.useMemo(()=>{let O=IZ(d,l);return O==null?null:{location:{pathname:O,search:f,hash:m,state:v,key:b},navigationType:i}},[l,d,f,m,v,b,i]);return M==null?null:E.createElement(K2.Provider,{value:u},E.createElement(b$.Provider,{children:r,value:M}))}function iLe(t){let{children:e,location:r}=t;return HRe(Gj(e),r)}new Promise(()=>{});function Gj(t,e){e===void 0&&(e=[]);let r=[];return E.Children.forEach(t,(n,i)=>{if(!E.isValidElement(n))return;let s=[...e,i];if(n.type===E.Fragment){r.push.apply(r,Gj(n.props.children,s));return}n.type!==Cx&&ou(!1),!n.props.index||!n.props.children||ou(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Gj(n.props.children,s)),r.push(o)}),r}/** + * React Router DOM v6.26.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function qj(){return qj=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function oLe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function aLe(t,e){return t.button===0&&(!e||e==="_self")&&!oLe(t)}function Wj(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function lLe(t,e){let r=Wj(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(s=>{r.append(i,s)})}),r}const uLe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],cLe="6";try{window.__reactRouterVersion=cLe}catch{}const hLe="startTransition",Dee=Fue[hLe];function dLe(t){let{basename:e,children:r,future:n,window:i}=t,s=E.useRef();s.current==null&&(s.current=gRe({window:i,v5Compat:!0}));let o=s.current,[a,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=E.useCallback(f=>{u&&Dee?Dee(()=>l(f)):l(f)},[l,u]);return E.useLayoutEffect(()=>o.listen(d),[o,d]),E.createElement(nLe,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const fLe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pLe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ud=E.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=e,m=sLe(e,uLe),{basename:v}=E.useContext(K2),b,M=!1;if(typeof u=="string"&&pLe.test(u)&&(b=u,fLe))try{let j=new URL(window.location.href),H=u.startsWith("//")?new URL(j.protocol+u):new URL(u),W=IZ(H.pathname,v);H.origin===j.origin&&W!=null?u=W+H.search+H.hash:M=!0}catch{}let O=VRe(u,{relative:i}),I=mLe(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,unstable_viewTransition:f});function A(j){n&&n(j),j.defaultPrevented||I(j)}return E.createElement("a",qj({},m,{href:b||O,onClick:M||s?n:A,ref:r,target:l}))});var Fee;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Fee||(Fee={}));var zee;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(zee||(zee={}));function mLe(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=C$(),u=Yw(),d=Npe(t,{relative:o});return E.useCallback(f=>{if(aLe(f,r)){f.preventDefault();let m=n!==void 0?n:Uk(u)===Uk(d);l(t,{replace:m,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,d,n,i,r,t,s,o,a])}function zpe(t){let e=E.useRef(Wj(t)),r=E.useRef(!1),n=Yw(),i=E.useMemo(()=>lLe(n.search,r.current?null:e.current),[n.search]),s=C$(),o=E.useCallback((a,l)=>{const u=Wj(typeof a=="function"?a(i):a);r.current=!0,s("?"+u,l)},[s,i]);return[i,o]}function T(t,e,r,n){var i,s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function cMt(t,e){return function(r,n){e(r,n,t)}}let Uv;function Sr(t){return typeof Uv[t]=="function"?Uv[t]=Uv[t](globalThis):Uv[t]}var xue,wue,bue,Cue;Uv=(xue=globalThis.dojoConfig)!=null&&xue.has||(wue=globalThis.esriConfig)!=null&&wue.has?{...(bue=globalThis.dojoConfig)==null?void 0:bue.has,...(Cue=globalThis.esriConfig)==null?void 0:Cue.has}:{},Sr.add=(t,e,r,n)=>((n||Uv[t]===void 0)&&(Uv[t]=e),r&&Sr(t)),Sr.cache=Uv,Sr.add("big-integer-warning-enabled",!0),Sr.add("esri-deprecation-warnings",!0),Sr.add("esri-tests-disable-screenshots",!1),Sr.add("esri-tests-use-full-window",!1),Sr.add("esri-tests-post-to-influx",!0),(()=>{var e;Sr.add("host-webworker",globalThis.WorkerGlobalScope!==void 0&&self instanceof globalThis.WorkerGlobalScope);const t=typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document;if(Sr.add("host-browser",t),Sr.add("host-node",typeof globalThis.process=="object"&&((e=globalThis.process.versions)==null?void 0:e.node)&&globalThis.process.versions.v8),Sr.add("dom",t),Sr("host-browser")){const r=navigator,n=r.userAgent,i=r.appVersion,s=parseFloat(i);if(Sr.add("wp",parseFloat(n.split("Windows Phone")[1])||void 0),Sr.add("msapp",parseFloat(n.split("MSAppHost/")[1])||void 0),Sr.add("khtml",i.includes("Konqueror")?s:void 0),Sr.add("edge",parseFloat(n.split("Edge/")[1])||void 0),Sr.add("opr",parseFloat(n.split("OPR/")[1])||void 0),Sr.add("webkit",!Sr("wp")&&!Sr("edge")&&parseFloat(n.split("WebKit/")[1])||void 0),Sr.add("chrome",!Sr("edge")&&!Sr("opr")&&parseFloat(n.split("Chrome/")[1])||void 0),Sr.add("android",!Sr("wp")&&parseFloat(n.split("Android ")[1])||void 0),Sr.add("safari",!i.includes("Safari")||Sr("wp")||Sr("chrome")||Sr("android")||Sr("edge")||Sr("opr")?void 0:parseFloat(i.split("Version/")[1])),Sr.add("mac",i.includes("Macintosh")),!Sr("wp")&&/(iPhone|iPod|iPad)/.test(n)){const o=RegExp.$1.replace(/P/,"p"),a=/OS ([\d_]+)/.test(n)?RegExp.$1:"1",l=parseFloat(a.replace(/_/,".").replaceAll("_",""));Sr.add(o,l),Sr.add("ios",l)}Sr("webkit")||(!n.includes("Gecko")||Sr("wp")||Sr("khtml")||Sr("edge")||Sr.add("mozilla",s),Sr("mozilla")&&Sr.add("ff",parseFloat(n.split("Firefox/")[1]||n.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const t=navigator.userAgent,e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(t),r=/iPhone/i.test(t);e&&Sr.add("esri-mobile",e),r&&Sr.add("esri-iPhone",r),Sr.add("esri-geolocation",!!navigator.geolocation)}Sr.add("esri-wasm","WebAssembly"in globalThis),Sr.add("esri-performance-mode-frames-between-render",20),Sr.add("esri-force-performance-mode",!1),Sr.add("esri-shared-array-buffer",()=>{const t="SharedArrayBuffer"in globalThis,e=globalThis.crossOriginIsolated===!1;return t&&!e}),Sr.add("wasm-simd",()=>{const t=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(t))}),Sr.add("esri-atomics","Atomics"in globalThis),Sr.add("esri-workers","Worker"in globalThis),Sr.add("web-feat:cache","caches"in globalThis),Sr.add("esri-workers-arraybuffer-transfer",!Sr("safari")||Number(Sr("safari"))>=12),Sr.add("workers-pool-size",8),Sr.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),Sr.add("featurelayer-simplify-payload-size-factors",[1,1,4]),Sr.add("featurelayer-fast-triangulation-enabled",!0),Sr.add("featurelayer-animation-enabled",!0),Sr.add("featurelayer-snapshot-enabled",!0),Sr.add("featurelayer-snapshot-point-min-threshold",8e4),Sr.add("featurelayer-snapshot-point-max-threshold",4e5),Sr.add("featurelayer-snapshot-point-coverage",.1),Sr.add("featurelayer-query-max-depth",4),Sr.add("featurelayer-query-pausing-enabled",!1),Sr.add("featurelayer-advanced-symbols",!1),Sr.add("featurelayer-pbf",!0),Sr.add("featurelayer-pbf-statistics",!1),Sr.add("feature-layers-workers",!0),Sr.add("feature-polyline-generalization-factor",1),Sr.add("mapview-transitions-duration",200),Sr.add("mapview-essential-goto-duration",200),Sr.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),Sr.add("mapserver-pbf-version-support",10.81),Sr.add("mapservice-popup-identify-max-tolerance",20),Sr("host-webworker")||Sr("host-browser")&&(Sr.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),Sr.add("esri-image-decode",()=>{if("decode"in new Image){const t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,',void t.decode().then(()=>{Sr.add("esri-image-decode",!0,!0,!0)}).catch(()=>{Sr.add("esri-image-decode",!1,!0,!0)})}return!1}),Sr.add("esri-url-encodes-apostrophe",()=>{const t=window.document.createElement("a");return t.href="?'",t.href.includes("?%27")}))})();const Bee=new WeakMap;function gLe(t,e,r=!1){const n=`🛑 DEPRECATED - ${e}`;if(!r)return void t.warn(n);let i=Bee.get(t);i||(i=new Set,Bee.set(t,i)),i.has(e)||(i.add(e),t.warn(n))}function Bpe(t,e,r={}){if(Sr("esri-deprecation-warnings")){const{moduleName:n}=r;EC(t,`Function: ${(n?n+"::":"")+e+"()"}`,r)}}function yLe(t,e,r={}){if(Sr("esri-deprecation-warnings")){const{moduleName:n}=r;EC(t,`Property: ${(n?n+"::":"")+e}`,r)}}function vLe(t,e,r={}){Sr("esri-deprecation-warnings")&&EC(t,`Multiple argument constructor: ${e}`,{warnOnce:!0,replacement:`new ${e}({ })`,...r})}function EC(t,e,r={}){if(Sr("esri-deprecation-warnings")){const{replacement:n,version:i,see:s,warnOnce:o}=r;let a=e;n&&(a+=` + 🛠️ Replacement: ${n}`),i&&(a+=` + ⚙️ Version: ${i}`),s&&(a+=` + 🔗 See ${s} for more details.`),gLe(t,a,o)}}function hMt(t){const e=[];return function*(){yield*e;for(const r of t)e.push(r),yield r}}function dMt(t,e){for(const r of t)if(r!=null&&e(r))return r}function jee(t){return t!=null&&typeof t[Symbol.iterator]=="function"}let AZ=class{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach(r=>{e+=r.length}),e}add(e,r){if(jee(e)){const n=this._getOrCreateGroup(r);for(const i of e)Uee(i)&&n.push(i)}else Uee(e)&&this._getOrCreateGroup(r).push(e);return this}forEach(e,r){if(typeof e=="function")this._groups.forEach(n=>n.forEach(e));else{const n=this._getGroup(e);n&&r&&n.forEach(r)}}has(e){return this._groups.has(MT(e))}remove(e){if(typeof e!="string"&&jee(e)){for(const r of e)this.remove(r);return this}return this.has(e)?(Vee(this._getGroup(e)),this._groups.delete(MT(e)),this):this}removeAll(){return this._groups.forEach(Vee),this._groups.clear(),this}removeReference(e){return this._groups.delete(e),this}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const r=[];return this._groups.set(MT(e),r),r}_getGroup(e){return this._groups.get(MT(e))}};function MT(t){return t||"_default_"}function Vee(t){for(const e of t)e instanceof AZ?e.removeAll():e.remove()}function Uee(t){return t!=null&&(!!t.remove||t instanceof AZ)}let nF=class a3{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*a3._m}getInt(){return this._seed=(a3._a*this._seed+a3._c)%a3._m,this._seed}getFloat(){return this.getInt()/(a3._m-1)}getIntRange(e,r){return Math.round(this.getFloatRange(e,r))}getFloatRange(e,r){const n=r-e;return e+this.getInt()/a3._m*n}};nF._m=2147483647,nF._a=48271,nF._c=0;function S$(t,e,r){if(t==null&&e==null)return!0;if(t==null||e==null||t.length!==e.length)return!1;if(r){for(let n=0;n!t.some(o=>r(o,s))),i=t.filter(s=>!e.some(o=>r(o,s)))):(n=e.filter(s=>!t.includes(s)),i=t.filter(s=>!e.includes(s))),{added:n,removed:i}}let jpe=class{constructor(){this.last=0}};const Vpe=new jpe;function Zj(t,e,r,n){n=n||Vpe;const i=Math.max(0,n.last-10);for(let o=i;oe+(r?ELe(r)?SLe(r,$Z()):r.byteLength+MLe:0),0)}const MLe=145,xMt=1024;function wMt(t){return M$(t)||E$(t)||DZ(t)||NZ(t)||OZ(t)}function bMt(t){return M$(t)||E$(t)}function CMt(t){return M$(t)?179769e303:E$(t)?3402823e32:Xpe(t)?4294967295:Ype(t)?65535:Wpe(t)||Zpe(t)?255:DZ(t)?2147483647:NZ(t)?32767:OZ(t)?127:256}function FZ(t,e){let r;for(r in t)t.hasOwnProperty(r)&&t[r]===void 0&&delete t[r];return t}function Qt(t){if(!t||typeof t!="object"||typeof t=="function")return t;const e=e1e(t);if(e!=null)return e;if(Jpe(t))return t.clone();if(Kpe(t))return t.map(Qt);if(Qpe(t))return t.clone();const r={};for(const n of Object.getOwnPropertyNames(t))r[n]=Qt(t[n]);return r}function Yj(t){if(!t||typeof t!="object"||typeof t=="function"||"HTMLElement"in globalThis&&t instanceof HTMLElement)return t;const e=e1e(t);if(e!=null)return e;if(Kpe(t)){let r=!0;const n=t.map(i=>{const s=Yj(i);return i!=null&&s==null&&(r=!1),s});return r?n:null}if(Jpe(t))return t.clone();if(t instanceof File||t instanceof Blob)return t;if(!Qpe(t)){const r=new(Object.getPrototypeOf(t)).constructor;for(const n of Object.getOwnPropertyNames(t)){const i=t[n],s=Yj(i);if(i!=null&&s==null)return null;r[n]=s}return r}return null}function Jpe(t){return typeof t.clone=="function"}function Kpe(t){return typeof t.map=="function"&&typeof t.forEach=="function"}function Qpe(t){return typeof t.notifyChange=="function"&&typeof t.watch=="function"}function Hee(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function e1e(t){if(OZ(t)||Wpe(t)||Zpe(t)||NZ(t)||Ype(t)||DZ(t)||Xpe(t)||E$(t)||M$(t))return t.slice();if(t instanceof Date)return new Date(t.getTime());if(t instanceof ArrayBuffer)return t.slice(0,t.byteLength);if(t instanceof Map){const e=new Map;for(const[r,n]of t)e.set(r,Qt(n));return e}if(t instanceof Set){const e=new Set;for(const r of t)e.add(Qt(r));return e}return null}function zZ(t,e){return t===e||typeof t=="number"&&isNaN(t)&&typeof e=="number"&&isNaN(e)||typeof(t==null?void 0:t.getTime)=="function"&&typeof(e==null?void 0:e.getTime)=="function"&&t.getTime()===e.getTime()||!1}function TLe(t,e){return t===e||(t==null||typeof t=="string"?t===e:typeof t=="number"?t===e||typeof e=="number"&&isNaN(t)&&isNaN(e):t instanceof Date?e instanceof Date&&t.getTime()===e.getTime():Array.isArray(t)?Array.isArray(e)&&S$(t,e):t instanceof Set?e instanceof Set&&RLe(t,e):t instanceof Map?e instanceof Map&&LLe(t,e):!!Hee(t)&&Hee(e)&&ILe(t,e))}function ILe(t,e){if(t===null||e===null)return!1;const r=Object.keys(t);if(e===null||Object.keys(e).length!==r.length)return!1;for(const n of r)if(t[n]!==e[n]||!Object.prototype.hasOwnProperty.call(e,n))return!1;return!0}function RLe(t,e){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}function LLe(t,e){if(t.size!==e.size)return!1;for(const[r,n]of t){const i=e.get(r);if(i!==n||i===void 0&&!e.has(r))return!1}return!0}function BZ(t,e,r=!1){return r1e(t,e,r)}function Hv(t,e){if(e!=null)return e[t]||t1e(t.split("."),!1,e)}function Ph(t,e,r){const n=t.split("."),i=n.pop(),s=t1e(n,!0,r);s&&i&&(s[i]=e)}function Gee(t,e){if(t==null&&e==null)return!1;if(t==null||e==null)return!0;if(typeof t=="object"){if(Array.isArray(t)){const r=e;if(t.length!==r.length)return!0;for(let n=0;n{let s=n[i],o=e[i];return s===o?n:s===void 0?(n[i]=Qt(o),n):(Array.isArray(o)||Array.isArray(n)?(s=s?Array.isArray(s)?n[i]=s.concat():n[i]=[s]:n[i]=[],o&&(Array.isArray(o)||(o=[o]),r?o.forEach(a=>{s.includes(a)||s.push(a)}):n[i]=o.concat())):o&&typeof o=="object"?n[i]=r1e(s,o,r):n.hasOwnProperty(i)&&!e.hasOwnProperty(i)||(n[i]=o),n)},t||{}):t}var Sue;const Ao={apiKey:void 0,applicationName:"",applicationUrl:(Sue=globalThis.location)==null?void 0:Sue.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(BZ(Ao,globalThis.esriConfig,!0),delete Ao.has),!Ao.assetsPath){{const t="4.30";Ao.assetsPath=`https://js.arcgis.com/${t}/@arcgis/core/assets`}Ao.defaultAssetsPath=Ao.assetsPath}const kLe=/\{([^}]+)\}/g;function qee(t){return t??""}function T$(t,e){return e?t.replaceAll(kLe,typeof e=="object"?(r,n)=>qee(Hv(n,e)):(r,n)=>qee(e(n))):t}function SMt(t,e){return t.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,r=>e!=null&&e.includes(r)?r:`\\${r}`)}function n1e(t){let e=0;for(let r=0;r=df._tickCounter)return;this._loggedMessages[e].set(i,df._tickCounter),df._scheduleTickCounterIncrement()}for(const i of Ao.log.interceptors)if(i(e,this.module,...n))return;this._inheritedWriter()(e,this.module,...n)}}_parentWithMember(e,r){let n=this;for(;n!=null;){const i=n[e];if(i!=null)return i;n=n.parent}return r}_inheritedWriter(){return this._parentWithMember("writer",ALe)}_matchLevel(e){const r=Ao.log.level||"warn";return Zee[this._parentWithMember("level",r)]<=Zee[e]}static _scheduleTickCounterIncrement(){df._tickCounterScheduled||(df._tickCounterScheduled=!0,Promise.resolve().then(()=>{df._tickCounter++,df._tickCounterScheduled=!1}))}};function ALe(t,e,...r){console[t](`[${e}]`,...r)}function PLe(...t){return n1e(JSON.stringify(t,(r,n)=>typeof n!="object"||Array.isArray(n)?n:"[Object]"))}li._loggers=new Map,li._tickCounter=0,li._tickCounterScheduled=!1,li._throttlingDisabled=!1;function $Le(t,e){if(t==null)throw new Error(e??"value is None")}function t5(t){return t==null||t.destroy(),null}function MMt(t){return t==null||t.dispose(),null}function H1(t){return t==null||t.remove(),null}function i1e(t){return t==null||t.abort(),null}function TMt(t){return t==null||t.release(),null}function OLe(t,e,r){return t!=null&&e!=null?r!=null?r(t,e):t.equals(e):t===e}function NLe(t,e){let r;return t.some((n,i)=>(r=e(n,i),r!=null)),r??void 0}const s1e=Symbol("Accessor-beforeDestroy"),DLe={remove:()=>{}};function Hl(t){return t?{remove(){t&&(t(),t=void 0)}}:DLe}function FLe(t){t.forEach(e=>e==null?void 0:e.remove())}function NS(t){return Hl(()=>FLe(t))}function md(t){return t.__accessor__??null}function zLe(t,e){var r;return((r=t==null?void 0:t.metadata)==null?void 0:r[e])!=null}function DR(t,e,r){return r?Gk(t,e,{policy:r,path:""}):Gk(t,e,null)}function Gk(t,e,r){return e?Object.keys(e).reduce((n,i)=>{const s=i;let o=null,a="merge";if(r&&(o=r.path?`${r.path}.${i}`:i,a=r.policy(o)),a==="replace"||a==="replace-arrays"&&Array.isArray(n[s]))return n[s]=e[s],n;if(n[s]===void 0)return n[s]=Qt(e[s]),n;let l=n[s],u=e[s];if(l===u)return n;if(Array.isArray(u)||Array.isArray(n))l=l?Array.isArray(l)?n[s]=l.concat():n[s]=[l]:n[s]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach(d=>{l.includes(d)||l.push(d)}));else if(u&&typeof u=="object")if(r){const d=r.path;r.path=o,n[s]=Gk(l,u,r),r.path=d}else n[s]=Gk(l,u,null);else n.hasOwnProperty(i)&&!e.hasOwnProperty(i)||(n[s]=u);return n},t||{}):t}function o1e(t){return Array.isArray(t)?t:t.split(".")}function Yee(t){return t.includes(",")?t.split(",").map(e=>e.trim()):[t.trim()]}function BLe(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...Yee(r));return e}return Yee(t)}function a1e(t,e,r,n){const i=BLe(e);if(i.length!==1){const s=i.map(o=>n(t,o,r));return NS(s)}return n(t,i[0],r)}function l1e(t,e){const r=t[t.length-1]==="?"?t.slice(0,-1):t;if(e.getItemAt!=null||Array.isArray(e)){const i=parseInt(r,10);if(!isNaN(i))return Array.isArray(e)?e[i]:e.at(i)}const n=md(e);return zLe(n,r)?n.get(r):e[r]}function u1e(t,e,r){if(t==null)return t;const n=l1e(e[r],t);return!n&&r=this._pool.length)){for(let r=e;r0){if(!(i+n{},onTrackingEnd:()=>{}},_b=[];let M6=Wk;function ds(t){M6.onObservableAccessed(t)}let FR=!1,zR=!1;function iy(t,e,r){if(FR)return jZ(t,e,r);h1e(t);const n=e.call(r);return d1e(),n}function YLe(t,e){return iy(Wk,t,e)}function jZ(t,e,r){const n=FR;FR=!0,h1e(t);let i=null;try{i=e.call(r)}catch(s){zR&&li.getLogger("esri.core.accessorSupport.tracking").error(s)}return d1e(),FR=n,i}function h1e(t){M6=t,_b.push(t)}function d1e(){const t=_b.length;if(t>1){const e=_b.pop();M6=_b[t-2],e.onTrackingEnd()}else if(t===1){const e=_b.pop();M6=Wk,e.onTrackingEnd()}else M6=Wk}function f1e(t,e){if(e.flags&ia.DepTrackingInitialized)return;const r=zR;zR=!1,e.flags&ia.AutoTracked?jZ(e,e.metadata.get,t):p1e(t,e),zR=r}const XLe=[];function p1e(t,e){e.flags&ia.ExplicitlyTracking||(e.flags|=ia.ExplicitlyTracking,jZ(e,()=>{const r=e.metadata.dependsOn||XLe;for(const n of r)if(typeof n!="string"||n.includes(".")){const i=o1e(n);for(let s=0,o=t;s{this._handles.push(e.observe(this))}),this._accessed.clear())}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~ia.Dirty,this.onCommitted()}_clearObservationHandles(){const e=this._handles;if(e!==null){for(let r=0;r0)for(const r of e)r.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const r=e.slice();for(const n of r)n.onCommitted()}}},JLe=class m1e{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const r=new m1e;return this._values.forEach((n,i)=>{e&&e.has(i)||r.set(i,Qt(n))}),r}get(e){return this._values.get(e)}originOf(){return qs.USER}keys(){return[...this._values.keys()]}set(e,r){this._values.set(e,r)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}};function TT(t,e,r){return t!==void 0}function Qee(t,e,r,n){return t!==void 0&&(!(r==null&&t.flags&ia.NonNullable)||(n.lifecycle,Nd.INITIALIZING,!1))}let KLe=class{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=Nd.INITIALIZING,this.store=new JLe,this._origin=qs.USER;const r=this.host.constructor.__accessorMetadata__;for(const n in r){const i=new Kee(n,r[n]);this.propertiesByName.set(n,i)}this.metadata=r}initialize(){this.lifecycle=Nd.CONSTRUCTING}constructed(){this.lifecycle=Nd.CONSTRUCTED}destroy(){this.lifecycle=Nd.DESTROYED,this.propertiesByName.forEach(e=>e.destroy())}get initialized(){return this.lifecycle!==Nd.INITIALIZING}get(e){const r=this.propertiesByName.get(e);if(r.metadata.get)return r.getComputed(this);ds(r);const n=this.store;return n.has(e)?n.get(e):r.metadata.value}originOf(e){const r=this.store.originOf(e);if(r===void 0){const n=this.propertiesByName.get(e);if(n!==void 0&&n.flags&ia.HasDefaultValue)return"defaults"}return qk(r)}has(e){return this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const r=this.propertiesByName.get(e);if(TT(r))return this.store.has(e)?this.store.get(e):r.metadata.value}internalSet(e,r){const n=this.propertiesByName.get(e);TT(n)&&this._internalSet(n,r)}getDependsInfo(e,r,n){const i=this.propertiesByName.get(r);if(!TT(i))return"";const s=new Set,o=iy({onObservableAccessed:l=>s.add(l),onTrackingEnd:()=>{}},()=>{var l;return(l=i.metadata.get)==null?void 0:l.call(e)});let a=`${n}${e.declaredClass.split(".").pop()}.${r}: ${o} +`;if(s.size===0)return a;n+=" ";for(const l of s)l instanceof Kee&&(a+=`${n}${l.propertyName}: undefined +`);return a}setAtOrigin(e,r,n){const i=this.propertiesByName.get(e);if(TT(i))return this._setAtOrigin(i,r,n)}isOverridden(e){const r=this.propertiesByName.get(e);return r!==void 0&&!!(r.flags&ia.Overridden)}clearOverride(e){const r=this.propertiesByName.get(e);r&&r.flags&ia.Overridden&&(r.flags&=~ia.Overridden,r.notifyChange())}override(e,r){const n=this.propertiesByName.get(e);if(!Qee(n,e,r,this))return;const i=n.metadata.cast;if(i){const s=this._cast(i,r),{valid:o,value:a}=s;if(iF.release(s),!o)return;r=a}n.flags|=ia.Overridden,this._internalSet(n,r)}set(e,r){const n=this.propertiesByName.get(e);if(!Qee(n,e,r,this))return;const i=n.metadata.cast;if(i){const o=this._cast(i,r),{valid:a,value:l}=o;if(iF.release(o),!a)return;r=l}const s=n.metadata.set;s?s.call(this.host,r):this._internalSet(n,r)}setDefaultOrigin(e){this._origin=Gv(e)}getDefaultOrigin(){return qk(this._origin)}notifyChange(e){const r=this.propertiesByName.get(e);r!==void 0&&r.notifyChange()}invalidate(e){const r=this.propertiesByName.get(e);r!==void 0&&r.invalidate()}commit(e){const r=this.propertiesByName.get(e);r!==void 0&&r.commit()}_internalSet(e,r){const n=this.lifecycle!==Nd.INITIALIZING?this._origin:qs.DEFAULTS;this._setAtOrigin(e,r,n)}_setAtOrigin(e,r,n){const i=this.store,s=e.propertyName;i.has(s,n)&&zZ(r,i.get(s))&&~e.flags&ia.Overridden&&n===i.originOf(s)||(e.invalidate(),i.set(s,r,n),e.commit(),f1e(this.host,e))}_cast(e,r){const n=iF.acquire();return n.valid=!0,n.value=r,e&&(n.value=e.call(this.host,r,n)),n}},QLe=class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}};const iF=new zS(QLe);function eke(t,e){return t.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(r,n)=>n===""?"$":(Hv(n,e)??"").toString())}let g1e=class{constructor(e,r,n=void 0){this.name=e,this.details=n,this.message=(r&&eke(r,n))??""}toString(){return"["+this.name+"]: "+this.message}},Pr=class y1e extends g1e{constructor(e,r,n){super(e,r,n)}toJSON(){if(this.details!=null)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(e,r)=>{if(r&&typeof r=="object"&&typeof r.toJSON=="function")return r;try{return Qt(r)}catch{return"[object]"}}))}}catch(e){throw li.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new y1e(e.name,e.message,e.details)}};Pr.prototype.type="error";function Zk(t,e,r){if(t&&e)if(typeof e=="object")for(const n of Object.getOwnPropertyNames(e))Zk(t,n,e[n]);else{if(e.includes(".")){const i=e.split("."),s=i.splice(-1,1)[0];return void Zk(R2(t,i),s,r)}const n=t.__accessor__;n!=null&&tke(e,n),t[e]=r}}function tke(t,e){if(Sr("esri-unknown-property-errors")&&!rke(t,e))throw new Pr("set:unknown-property",nke(t,e))}function rke(t,e){return e.metadata[t]!=null}function nke(t,e){return"setting unknown property '"+t+"' on instance of "+e.host.declaredClass}let ike;function ske(){return ike}var ete;(function(t){t[t.Ignore=0]="Ignore",t[t.Destroy=1]="Destroy",t[t.ThrowError=2]="ThrowError"})(ete||(ete={}));function oke(t){t.length=0}let G0=class{constructor(e=50,r=50){this._pool=new zS(Array,void 0,oke,r,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return sF.acquire()}static release(e){return sF.release(e)}static prune(){sF.prune()}};const sF=new G0(100);let ake=class extends zS{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const r=super.acquire(...e);return this._set.delete(r),r}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}};const IT=[];function Yk(t){IT.push(t),IT.length===1&&queueMicrotask(()=>{const e=IT.slice();IT.length=0;for(const r of e)r()})}let v1e=class{constructor(e,r=30){this.name=e,this._counter=0,this._samples=new Array(r)}record(e){e!=null&&(this._samples[++this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort((e,r)=>e-r)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((e,r)=>e+r,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}};var Kj;(function(t){const e=(s,o,a,l)=>{let u=o,d=o;const f=a>>>1,m=s[u-1];for(;d<=f;){d=u<<1,dso?1:0;function n(s,o,a,l){o===void 0&&(o=0),a===void 0&&(a=s.length),l===void 0&&(l=r);for(let d=a>>>1;d>o;d--)e(s,d,a,l);const u=o+1;for(let d=a-1;d>o;d--){const f=s[o];s[o]=s[d],s[d]=f,e(s,u,d,l)}}function*i(s,o,a,l){o===void 0&&(o=0),a===void 0&&(a=s.length),l===void 0&&(l=r);for(let d=a>>>1;d>o;d--)e(s,d,a,l),yield;const u=o+1;for(let d=a-1;d>o;d--){const f=s[o];s[o]=s[d],s[d]=f,e(s,u,d,l),yield}}t.sort=n,t.iterableSort=i})(Kj||(Kj={}));const tte=Kj,lke=1.5,uke=1.1;let Xk=class{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new jpe,e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),e.deallocator!==void 0&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>rte(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const r=new Array;for(let n=0;n=this._length))return this.data[e]}includes(e,r){const n=this.data.indexOf(e,r);return n!==-1&&nthis._length){if(this._allocator){for(;this._length=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,r=e.length,n){this.length=xLe(this.data,e,this.length,r,this._hint,n),this._shrink()}front(){if(this.length!==0)return this.data[0]}back(){if(this.length!==0)return this.data[this.length-1]}swapElements(e,r){if(e>=this.length||r>=this.length||e===r)return;const n=this.data[e];this.data[e]=this.data[r],this.data[r]=n}sort(e){tte.sort(this.data,0,this.length,e)}iterableSort(e){return tte.iterableSort(this.data,0,this.length,e)}some(e,r){for(let n=0;nlke*t.length&&(t.data.length=Math.floor(t.length*uke))}function cke(t){return{setTimeout:(e,r)=>{const n=t.setTimeout(e,r);return Hl(()=>t.clearTimeout(n))}}}const hke=cke(globalThis);function R$(t){return dke(t)||_1e(t)}function dke(t){return t!=null&&typeof t=="object"&&"on"in t&&typeof t.on=="function"}function _1e(t){return t!=null&&typeof t=="object"&&"addEventListener"in t&&typeof t.addEventListener=="function"}function r5(t,e,r){if(!R$(t))throw new TypeError("target is not a Evented or EventTarget object");return _1e(t)?fke(t,e,r):t.on(e,r)}function fke(t,e,r,n){if(Array.isArray(e)){const i=e.slice();for(const s of i)t.addEventListener(s,r,n);return Hl(()=>{for(const s of i)t.removeEventListener(s,r,n)})}return t.addEventListener(e,r,n),Hl(()=>t.removeEventListener(e,r,n))}function x1e(t,e,r){if(!R$(t))throw new TypeError("target is not a Evented or EventTarget object");if("once"in t)return t.once(e,r);const n=r5(t,e,i=>{n.remove(),r.call(t,i)});return n}function Bc(t="Aborted"){return new Pr("AbortError",t)}function Q1(t,e="Aborted"){if(sy(t))throw Bc(e)}function L$(t){return t instanceof AbortSignal?t:t==null?void 0:t.signal}function sy(t){const e=L$(t);return e!=null&&e.aborted}function q0(t){if(i0(t))throw t}function nte(t){if(!i0(t))throw t}function bp(t,e){const r=L$(t);if(r!=null){if(!r.aborted)return x1e(r,"abort",()=>e());e()}}function w1e(t,e){const r=L$(t);if(r!=null)return Q1(r),x1e(r,"abort",()=>e(Bc()))}function pke(t,e){return L$(e)==null?t:new Promise((r,n)=>{let i=bp(e,()=>n(Bc()));const s=()=>{i=H1(i)};t.then(s,s),t.then(r,n)})}function i0(t){return(t==null?void 0:t.name)==="AbortError"}async function mke(t){try{return await t}catch(e){if(!i0(e))throw e;return}}async function VZ(t){if(!t)return;if(typeof t.forEach!="function"){const r=Object.keys(t),n=r.map(o=>t[o]),i=await VZ(n),s={};return r.map((o,a)=>s[o]=i[a]),s}const e=t;return Promise.allSettled(e).then(r=>Array.from(e,(n,i)=>{const s=r[i];return s.status==="fulfilled"?{promise:n,value:s.value}:{promise:n,error:s.reason}}))}async function FMt(t){return(await Promise.allSettled(t)).filter(e=>e.status==="fulfilled").map(e=>e.value)}async function zMt(t){return(await Promise.allSettled(t)).filter(e=>e.status==="rejected").map(e=>e.reason)}function gke(t,e=void 0,r){const n=new AbortController;return bp(r,()=>n.abort()),new Promise((i,s)=>{let o=setTimeout(()=>{o=0,i(e)},t);bp(n,()=>{o&&(clearTimeout(o),s(Bc()))})})}function BS(t){return t&&typeof t.then=="function"}function ite(t){return BS(t)?t:Promise.resolve(t)}function UZ(t,e=-1){let r,n,i,s,o=null;const a=(...l)=>{if(r){n=l,s&&s.reject(Bc()),s=Mp();const m=s.promise;if(o){const v=o;o=null,v.abort()}return m}if(i=s||Mp(),s=null,e>0){const m=new AbortController;r=ite(t(...l,m.signal));const v=r;gke(e).then(()=>{r===v&&(s?m.abort():o=m)})}else r=1,r=ite(t(...l));const u=()=>{const m=n;n=i=r=o=null,m!=null&&a(...m)},d=r,f=i;return d.then(u,u),d.then(f.resolve,f.reject),f.promise};return a}function Mp(){let t,e;const r=new Promise((i,s)=>{t=i,e=s}),n=i=>{t(i)};return n.resolve=i=>t(i),n.reject=i=>e(i),n.timeout=(i,s)=>hke.setTimeout(()=>n.reject(s),i),n.promise=r,n}async function ste(t){await Promise.resolve(),Q1(t)}function BMt(t){return t}function jMt(t){return 1e3*t}function VMt(t){return t}let yke=class{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}},ote=0;const $8={time:0,deltaTime:0,elapsedFrameTime:0,frameDuration:0},Qj=["prepare","preRender","render","postRender","update","finish"],eV=[],MC=new Xk;function vke(){}const tV={frameTasks:MC,willDispatch:!1,clearFrameTasks:_ke,dispatch:C1e,executeFrameTasks:xke,reschedule:vke};function HZ(t){const e=new yke(t);return eV.push(e),tV.willDispatch||(tV.willDispatch=!0,Yk(C1e)),e}function _ke(t=!1){MC.forAll(e=>{e.removed=!0}),t&&b1e()}function xke(t){const e=t-ote;ote=t;const r=1e3/60,n=Math.max(0,e-r);$8.time=t,$8.frameDuration=r-n;for(let i=0;i{var l;a.paused||a.removed||(i===0&&a.ticks++,a.phases[o]&&($8.elapsedFrameTime=performance.now()-t,$8.deltaTime=a.ticks===0?0:e,(l=a.phases[o])==null||l.call(a,$8)))}),wke[i].record(performance.now()-s)}b1e(),bke.record(performance.now()-t)}const RT=new Xk;function b1e(){MC.forAll(t=>{t.removed&&RT.push(t)}),MC.removeUnorderedMany(RT.data,RT.length),RT.clear()}function C1e(){for(;eV.length;){const t=eV.shift();t.isActive&&t.callback()}tV.willDispatch=!1}function HMt(t=1,e){const r=Mp(),n=()=>{sy(e)?r.reject(Bc()):t===0?r():(--t,Yk(()=>n()))};return n(),r.promise}const wke=Qj.map(t=>new v1e(t)),bke=new v1e("total");function Jk(t,e){if(!e)return t;for(const r of e)r!=null&&t.add(r);return t}function ate(t,e){return e!=null&&t.add(e),t}function Cke(t,e){const r=new Set;return Jk(r,t),Jk(r,e),r}function GMt(t,e){const r=new Set;for(const n of e)t.has(n)&&r.add(n);return r}function qMt(t,e){if(!t||!e)return!1;if(t===e)return!0;for(const r of t)if(!e.has(r))return!1;return!0}function WMt(t,e){if(t==null&&e==null)return!0;if(t==null||e==null||t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}function ZMt(t,e){const r=new Set(t);for(const n of e)r.delete(n);return r}let Ske=0;function T6(){return++Ske}let k$=class{constructor(e){this._accessed=new Set,this._handles=[],this._observerObject=new Eke(e),lte.register(this,new WeakRef(this._observerObject),this)}destroy(){var e;lte.unregister(this._observerObject),this._accessed.clear(),(e=this._observerObject)==null||e.destroy(),this.clear()}onObservableAccessed(e){this._accessed.add(e)}onTrackingEnd(){const e=this._handles,r=this._observerObject;this._accessed.forEach(n=>{e.push(n.observe(r))}),this._accessed.clear()}clear(){const e=this._handles;for(let r=0;r0?e-1:0}destroy(){this.destroyed=!0,this._notify=Mke}};const lte=new FinalizationRegistry(t=>{var e;(e=t.deref())==null||e.destroy()});function Mke(){}let A4=!1;const Kk=[];function S1e(t,e){let r=new k$(s),n=null,i=!1;function s(){if(!r||i)return;if(A4)return void M1e(s);const a=n;r.clear(),A4=!0,i=!0,n=iy(r,t),i=!1,A4=!1,e(n,a),T1e()}function o(){r&&(r.destroy(),r=null,n=null)}return i=!0,n=iy(r,t),i=!1,Hl(o)}function E1e(t,e){let r=new k$(i),n=null;function i(){e(n,o)}function s(){r&&(r.destroy(),r=null),n=null}function o(){return r?(r.clear(),n=iy(r,t),n):null}return o(),Hl(s)}function Tke(t){let e=new k$(n),r=!1;function n(){e&&!r&&(A4?M1e(n):(e.clear(),A4=!0,r=!0,iy(e,t),r=!1,A4=!1,T1e()))}function i(){e&&(e.destroy(),e=null)}return r=!0,iy(e,t),r=!1,Hl(i)}function M1e(t){Kk.includes(t)||Kk.unshift(t)}function T1e(){for(;Kk.length;)Kk.pop()()}var I6;(function(t){t[t.Untracked=0]="Untracked",t[t.Tracked=1]="Tracked"})(I6||(I6={}));let TC=class{constructor(){this.uid=T6(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,r,n,i,s){return this.pool.acquire(I6.Untracked,e,r,n,i,s,zZ)}static acquireTracked(e,r,n,i){return this.pool.acquire(I6.Tracked,e,r,n,null,null,i)}notify(e,r){this.type===I6.Untracked?this.callback.call(this.target,e,r,this.path,this.target):this.callback.call(null,e,r,void 0,void 0)}acquire(e,r,n,i,s,o,a){this.uid=T6(),this.removed=!1,this.type=e,this.oldValue=r,this.callback=n,this.getValue=i,this.target=s,this.path=o,this.equals=a}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=T6(),this.removed=!0}};TC.pool=new ake(TC);const BR=new G0,h2=new Set;let Qk;function eA(t){h2.delete(t),h2.add(t),Qk||(Qk=HZ(Lke))}function Ike(t){if(t.removed)return;const e=t.oldValue,r=t.getValue();t.equals(e,r)||(t.oldValue=r,t.notify(r,e))}function Rke(t){for(const e of h2.values())e.target===t&&(e.removed=!0)}function Lke(){let t=10;for(;Qk&&t--;){Qk=null;const e=kke(),r=BR.acquire();for(const n of e){const i=n.uid;Ike(n),i===n.uid&&n.removed&&r.push(n)}for(const n of h2)n.removed&&(r.push(n),h2.delete(n));for(const n of r)TC.pool.release(n);BR.release(r),BR.release(e),Ake.forEach(n=>n())}}function kke(){const t=BR.acquire();t.length=h2.size;let e=0;for(const r of h2)t[e]=r,++e;return h2.clear(),t}const Ake=new Set;function Pke(t,e,r){let n=a1e(t,e,r,(i,s,o)=>{let a,l,u=E1e(()=>DS(i,s),(d,f)=>{var m;((m=i.__accessor__)==null?void 0:m.lifecycle)===Nd.DESTROYED||a&&a.uid!==l?n.remove():(a||(a=TC.acquireUntracked(d,o,f,i,s),l=a.uid),eA(a))});return Hl(()=>{u.remove(),a&&(a.uid!==l||a.removed||(a.removed=!0,eA(a)),a=null),n=u=null})});return n}function $ke(t,e,r){const n=a1e(t,e,r,(i,s,o)=>{let a=!1;return S1e(()=>DS(i,s),(l,u)=>{i.__accessor__.lifecycle!==Nd.DESTROYED?a||(a=!0,zZ(u,l)||o.call(i,l,u,s,i),a=!1):n.remove()})});return n}function Oke(t,e,r,n=!1){return t.__accessor__&&t.__accessor__.lifecycle!==Nd.DESTROYED?n?$ke(t,e,r):Pke(t,e,r):Hl()}function Nke(t,e,r){let n,i,s=E1e(t,(o,a)=>{n&&n.uid!==i?s.remove():(n||(n=TC.acquireTracked(o,e,a,r),i=n.uid),eA(n))});return Hl(()=>{s.remove(),n&&(n.uid!==i||n.removed||(n.removed=!0,eA(n)),n=null),s=null})}function Dke(t,e,r){let n=!1;return S1e(t,(i,s)=>{n||(n=!0,r(s,i)||e(i,s),n=!1)})}function Fke(t,e,r=!1,n=TLe){return r?Dke(t,e,n):Nke(t,e,n)}function KMt(t,e){for(const[r,n]of t)if(e(n,r))return!0;return!1}function I1e(t,e,r){const n=t.get(e);if(n!==void 0)return n;const i=r();return t.set(e,i),i}function QMt(t){const e=new Map;return r=>(e.has(r)||e.set(r,t(r)),e.get(r))}const P4=()=>li.getLogger("esri.core.accessorSupport.ensureTypes");function zke(t){return t==null?t:new Date(t)}function Bke(t){return t==null?t:!!t}function jS(t){return t==null?t:t.toString()}function A$(t){return t==null?t:(t=parseFloat(t),isNaN(t)?0:t)}function GZ(t){return t==null?t:Math.round(parseFloat(t))}function jke(t){return null}function R1e(t){return(t==null?void 0:t.constructor)&&t.constructor.__accessorMetadata__!==void 0}function tA(t,e){return e!=null&&t&&!(e instanceof t)}function L1e(t){return t&&"isCollection"in t}function ute(t){return t!=null&&t.Type?typeof t.Type=="function"?t.Type:t.Type.base:null}function Vke(t,e){if(!(e!=null&&e.constructor)||!L1e(e.constructor))return rV(t,e)?e:new t(e);const r=ute(t.prototype.itemType),n=ute(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(rV(t,e),e):new t(e):e}function rV(t,e){return!!R1e(e)&&(P4().error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+P$(t)+"'"),!0)}function qZ(t,e){return e==null?e:L1e(t)?Vke(t,e):tA(t,e)?rV(t,e)?e:new t(e):e}function P$(t){var e;return((e=t==null?void 0:t.prototype)==null?void 0:e.declaredClass)||"unknown"}const Uke=new WeakMap;function Hke(t){switch(t){case Number:return A$;case Qa:return GZ;case Boolean:return Bke;case String:return jS;case Date:return zke;case $$:return jke;default:return I1e(Uke,t,()=>qZ.bind(null,t))}}function gc(t,e){const r=Hke(t);return arguments.length===1?r:r(e)}function IC(t,e,r){return arguments.length===1?IC.bind(null,t):e&&(Array.isArray(e)?e.map(n=>t(n,r)):[t(e,r)])}function Gke(t,e){return arguments.length===1?IC(r=>gc(t,r)):IC(r=>gc(t,r),e)}function k1e(t,e,r){return e!==0&&Array.isArray(r)?r.map(n=>k1e(t,e-1,n)):t(r)}function rA(t,e,r){if(arguments.length===2)return s=>rA(t,e,s);if(!r)return r;r=k1e(t,e,r);let n=e,i=r;for(;n>0&&Array.isArray(i);)n--,i=i[0];if(i!==void 0)for(let s=0;sgc(t,n),e):rA(n=>gc(t,n),e,r)}function A1e(t){return!!Array.isArray(t)&&!t.some(e=>{const r=typeof e;return!(r==="string"||r==="number"||r==="function"&&t.length>1)})}function nV(t,e){if(arguments.length===2)return nV(t).call(null,e);const r=new Set,n=t.filter(a=>typeof a!="function"),i=t.filter(a=>typeof a=="function");for(const a of t)typeof a!="string"&&typeof a!="number"||r.add(a);let s=null,o=null;return(a,l)=>{if(a==null)return a;const u=typeof a,d=u==="string"||u==="number";return d&&(r.has(a)||i.some(f=>u==="string"&&f===String||u==="number"&&f===Number))||u==="object"&&i.some(f=>!tA(a,f))?a:(d&&n.length?(s||(s=n.map(f=>typeof f=="string"?`'${f}'`:`${f}`).join(", ")),P4().error("Accessor#set",`'${a}' is not a valid value for this property, only the following values are valid: ${s}`)):typeof a=="object"&&i.length?(o||(o=i.map(f=>P$(f)).join(", ")),P4().error("Accessor#set",`'${a}' is not a valid value for this property, value must be one of ${o}`)):P4().error("Accessor#set",`'${a}' is not a valid value for this property`),l&&(l.valid=!1),null)}}function um(t,e){if(arguments.length===2)return um(t).call(null,e);const r={},n=[],i=[];for(const l in t.typeMap){const u=t.typeMap[l];r[l]=gc(u),n.push(P$(u)),i.push(l)}const s=()=>`'${n.join("', '")}'`,o=()=>`'${i.join("', '")}'`,a=typeof t.key=="string"?l=>l[t.key]:t.key;return l=>{if(t.base&&!tA(t.base,l)||l==null)return l;const u=a(l)||t.defaultKeyValue,d=r[u];if(!d)return P4().error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!tA(t.typeMap[u],l))return l;if(typeof t.key=="string"&&!R1e(l)){const f={};for(const m in l)m!==t.key&&(f[m]=l[m]);return d(f)}return d(l)}}let Qa=class{},$$=class{};const rTt={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function Wke(t){if(!t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function P1e(t){switch(t.type){case"native":return gc(t.value);case"array":return IC(P1e(t.value));case"one-of":return Zke(t);default:return null}}function Zke(t){let e=null;return(r,n)=>sV(r,t)?r:(e==null&&(e=iV(t)),P4().error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}function iV(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case Qa:return"integer";case Date:return"date";case $$:return"null";default:return P$(t.value)}case"array":return`array of ${iV(t.value)}`;case"one-of":{const e=t.values.map(r=>iV(r));return`one of ${e.slice(0,-1)} or ${e[e.length-1]}`}}return"unknown"}function sV(t,e){if(t==null)return!0;switch(e.type){case"native":switch(e.value){case Number:case Qa:return typeof t=="number";case Boolean:return typeof t=="boolean";case String:return typeof t=="string";case $$:return t===null}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some(r=>!sV(r,e.value));case"one-of":return e.values.some(r=>sV(t,r))}}function B(t={}){return(e,r)=>{if(e===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`);const n=Object.getOwnPropertyDescriptor(e,r),i=I$(e,r);n&&(n.get||n.set?(i.get=n.get||i.get,i.set=n.set||i.set):"value"in n&&("value"in t&&li.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,t),i.value=t.value=n.value)),t.readOnly!=null&&(i.readOnly=t.readOnly);const s=t.aliasOf;if(s){const l=typeof s=="string"?s:s.source,u=typeof s=="string"?null:s.overridable===!0;let d;i.dependsOn=[l],i.get=function(){let f=R2(this,l);if(typeof f=="function"){d||(d=l.split(".").slice(0,-1).join("."));const m=R2(this,d);m&&(f=f.bind(m))}return f},i.readOnly||(i.set=u?function(f){this._override(r,f)}:function(f){Zk(this,l,f)})}const o=t.type,a=t.types;i.cast||(o?i.cast=Yke(o):a&&(Array.isArray(a)?i.cast=IC(um(a[0])):i.cast=um(a))),jLe(i,t),t.range&&(i.cast=Xke(i.cast,t.range))}}function $1e(t,e,r){const n=I$(t,r);n.json||(n.json={});let i=n.json;return e!==void 0&&(i.origins||(i.origins={}),i.origins[e]||(i.origins[e]={}),i=i.origins[e]),i}function Yke(t){let e=0,r=t;if(Wke(t))return P1e(t);for(;Array.isArray(r)&&r.length===1&&typeof r[0]!="string"&&typeof r[0]!="number";)r=r[0],e++;const n=r;if(A1e(n))return e===0?nV(n):rA(nV(n),e);if(e===1)return Gke(n);if(e>1)return qke(n,e);const i=t;return i.from?i.from:gc(i)}function Xke(t,e){return r=>{let n=+t(r);return e.step!=null&&(n=Math.round(n/e.step)*e.step),e.min!=null&&(n=Math.max(e.min,n)),e.max!=null&&(n=Math.min(e.max,n)),n}}function Jke(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const n in r)if(e[n]){const i=e[n];r[n].forEach(s=>{e[s]=i}),delete e[n]}}}let cm=class extends g1e{constructor(e,r,n){super(e,r,n)}};cm.prototype.type="warning";function O1e(t){var e;return!!t&&((e=t.prototype)==null?void 0:e.declaredClass)&&t.prototype.declaredClass.indexOf("esri.core.Collection")===0}const oV=()=>li.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function cte(t,e,r){var n,i;t&&(!r&&!e.read||(n=e.read)!=null&&n.reader||((i=e.read)==null?void 0:i.enabled)===!1||eAe(t)&&Ph("read.reader",Xw(t),e))}function Xw(t){var r,n;const e=t.ndimArray??0;if(e>1)return Qke(t);if(e===1)return hte(t);if("type"in t&&D1e(t.type)){const i=(n=(r=t.type.prototype)==null?void 0:r.itemType)==null?void 0:n.Type,s=hte(typeof i=="function"?{type:i}:{types:i});return(o,a,l)=>{const u=s(o,a,l);return u&&new t.type(u)}}return WZ(t)}function WZ(t){return"type"in t?Kke(t.type):tAe(t.types)}function Kke(t){return t.prototype.read?(e,r,n)=>{if(e==null)return e;const i=typeof e;if(i!=="object")return void oV().error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${i}'`);const s=new t;return s.read(e,n),s}:t.fromJSON}function N1e(t,e,r,n){return n!==0&&Array.isArray(e)?e.map(i=>N1e(t,i,r,n-1)):t(e,void 0,r)}function Qke(t){const e=WZ(t),r=N1e.bind(null,e),n=t.ndimArray??0;return(i,s,o)=>{if(i==null)return i;i=r(i,o,n);let a=n,l=i;for(;a>0&&Array.isArray(l);)a--,l=l[0];if(l!==void 0)for(let u=0;u{if(r==null)return r;if(Array.isArray(r)){const o=[];for(const a of r){const l=e(a,void 0,i);l!==void 0&&o.push(l)}return o}const s=e(r,void 0,i);return s!==void 0?[s]:void 0}}function D1e(t){if(!O1e(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&(typeof e.Type=="function"?ZZ(e.Type):F1e(e.Type))}function eAe(t){return"types"in t?F1e(t.types):ZZ(t.type)}function ZZ(t){return!Array.isArray(t)&&!!t&&t.prototype&&("read"in t.prototype||"fromJSON"in t||D1e(t))}function F1e(t){for(const e in t.typeMap)if(!ZZ(t.typeMap[e]))return!1;return!0}function tAe(t){let e=null;const r=t.errorContext??"type",n=t.validate;return(i,s,o)=>{if(i==null)return i;const a=typeof i;if(a!=="object")return void oV().error(`Expected JSON value of type 'object' to deserialize, but got '${a}'`);e||(e=rAe(t));const l=t.key;if(typeof l!="string")return;const u=i[l],d=u?e[u]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!d){const m=`Type '${u||"unknown"}' is not supported`;return o!=null&&o.messages&&i&&o.messages.push(new cm(`${r}:unsupported`,m,{definition:i,context:o})),void oV().error(m)}const f=new d;return f.read(i,o),n?n(f):f}}function rAe(t){var r,n;const e={};for(const i in t.typeMap){const s=t.typeMap[i],o=FS(s.prototype);if(typeof t.key=="function")continue;const a=o[t.key];if(!a)continue;if((r=a.json)!=null&&r.type&&Array.isArray(a.json.type)&&a.json.type.length===1&&typeof a.json.type[0]=="string"){e[a.json.type[0]]=s;continue}const l=(n=a.json)==null?void 0:n.write;if(!(l!=null&&l.writer)){e[i]=s;continue}const u=l.target,d=typeof u=="string"?u:t.key,f={};l.writer(i,f,d),f[d]&&(e[f[d]]=s)}return e}function nAe(t){if(t.json||(t.json={}),fte(t.json),pte(t.json),dte(t.json),t.json.origins)for(const e in t.json.origins)fte(t.json.origins[e]),pte(t.json.origins[e]),dte(t.json.origins[e]);return!0}function dte(t){t.name&&(t.read&&typeof t.read=="object"?t.read.source===void 0&&(t.read.source=t.name):t.read={source:t.name},t.write&&typeof t.write=="object"?t.write.target===void 0&&(t.write.target=t.name):t.write={target:t.name})}function fte(t){typeof t.read=="boolean"?t.read={enabled:t.read}:typeof t.read=="function"?t.read={enabled:!0,reader:t.read}:t.read&&typeof t.read=="object"&&t.read.enabled===void 0&&(t.read.enabled=!0)}function pte(t){typeof t.write=="boolean"?t.write={enabled:t.write}:typeof t.write=="function"?t.write={enabled:!0,writer:t.write}:t.write&&typeof t.write=="object"&&t.write.enabled===void 0&&(t.write.enabled=!0)}function mte(t,e){if(!e.write||e.write.writer||e.write.enabled===!1&&!e.write.overridePolicy)return;const r=(t==null?void 0:t.ndimArray)??0;t&&(r===1||"type"in t&&O1e(t.type))?e.write.writer=aAe:r>1?e.write.writer=lAe(r):e.types?Array.isArray(e.types)?e.write.writer=sAe(e.types[0]):e.write.writer=iAe(e.types):e.write.writer=RC}function iAe(t){return(e,r,n,i)=>e?z1e(e,t,i)?RC(e,r,n,i):void 0:RC(e,r,n,i)}function z1e(t,e,r){for(const n in e.typeMap)if(t instanceof e.typeMap[n])return!0;if(r!=null&&r.messages){const n=e.errorContext??"type",i=`Values of type '${(typeof e.key!="function"?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new Pr(`${n}:unsupported`,i,{definition:t,context:r})),li.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function sAe(t){return(e,r,n,i)=>!e||!Array.isArray(e)?RC(e,r,n,i):RC(e.filter(s=>z1e(s,t,i)),r,n,i)}function RC(t,e,r,n){Ph(r,nA(t,n),e)}function nA(t,e){return t&&typeof t.write=="function"?t.write({},e):t&&typeof t.toJSON=="function"?t.toJSON():typeof t=="number"?oAe(t):t}function oAe(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function aAe(t,e,r,n){let i;t===null?i=null:t&&typeof t.map=="function"?(i=t.map(s=>nA(s,n)),typeof i.toArray=="function"&&(i=i.toArray())):i=[nA(t,n)],Ph(r,i,e)}function B1e(t,e,r){return r!==0&&Array.isArray(t)?t.map(n=>B1e(n,e,r-1)):nA(t,e)}function lAe(t){return(e,r,n,i)=>{let s;if(e===null)s=null;else{s=B1e(e,i,t);let o=t,a=s;for(;o>0&&Array.isArray(a);)o--,a=a[0];if(a!==void 0)for(let l=0;l{t??(t="esri.core.Accessor"),e.prototype.declaredClass=t,mAe(e);const r=[],n=[];let i=e.prototype;for(;i;)i.hasOwnProperty("initialize")&&!oF.has(i.initialize)&&(oF.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!aF.has(i.destroy)&&(aF.add(i.destroy),n.push(i.destroy)),i=Object.getPrototypeOf(i);oF.clear(),aF.clear();const s=class extends e{constructor(...a){if(super(...a),this.constructor===s&&typeof this.postscript=="function"){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let l=r.length-1;l>=0;l--)r[l].call(this)}}),n.length){let l=!1;const u=this[s1e];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!l){l=!0,u.call(this);for(let d=0;d{li.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${e}'`)};var U1e,H1e;function gAe(t){var e;if(t==null)return{value:t};if(Array.isArray(t))return{type:[t[0]],value:null};switch(typeof t){case"object":return(e=t.constructor)!=null&&e.__accessorMetadata__||t instanceof Date?{type:t.constructor,value:t}:t;case"boolean":return{type:Boolean,value:t};case"string":return{type:String,value:t};case"number":return{type:Number,value:t};case"function":return{type:t,value:null};default:return}}const I0=Symbol("Accessor-Handles"),uV=Symbol("Accessor-Initialized");let Iu=class G1e{static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:r,declaredClass:n,constructor:i}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const s=this;class o extends s{constructor(...l){super(...l),this.inherited=null,i&&i.apply(this,l)}}FS(o.prototype);for(const a in e){const l=e[a];o.prototype[a]=typeof l=="function"?function(...u){const d=this.inherited;let f;this.inherited=function(...m){if(s.prototype[a])return s.prototype[a].apply(this,m)};try{f=l.apply(this,u)}catch(m){throw this.inherited=d,m}return this.inherited=d,f}:e[a]}for(const a in r){const l=gAe(r[a]);B(l)(o.prototype,a)}return _t(n)(o)}constructor(...e){var n;if(this[U1e]=null,this[H1e]=!1,this.constructor===G1e)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const r=new KLe(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:r}),e.length>0&&(r.ctorArgs=((n=this.normalizeCtorArgs)==null?void 0:n.apply(this,e))??e[0])}postscript(){const e=this.__accessor__,r=e.ctorArgs;e.initialize(),r&&(this.set(r),e.ctorArgs=null),e.constructed(),this.initialize(),this[uV]=!0}initialize(){}[s1e](){this[I0]=t5(this[I0])}destroy(){var e;this.destroyed||(Rke(this),this.__accessor__.destroy(),(e=ske())==null||e.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[uV]}get destroyed(){var e;return((e=this.__accessor__)==null?void 0:e.lifecycle)===Nd.DESTROYED||!1}commitProperty(e){R2(this,e)}get(e){return Bpe(li.getLogger(this),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),R2(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,r){return Zk(this,e,r),this}watch(e,r,n){return Oke(this,e,r,n)}addHandles(e,r){if(this.destroyed){const n=Array.isArray(e)?e:[e];for(const i of n)i.remove();return}(this[I0]??(this[I0]=new AZ)).add(e,r)}removeHandles(e){var r;(r=this[I0])==null||r.remove(e)}removeAllHandles(){var e;(e=this[I0])==null||e.removeAll()}removeHandlesReference(e){var r;(r=this[I0])==null||r.removeReference(e)}hasHandles(e){var r;return((r=this[I0])==null?void 0:r.has(e))===!0}_override(e,r){r===void 0?this.__accessor__.clearOverride(e):this.__accessor__.override(e,r)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,r){r==null?this.__accessor__.clearOverride(e):this.__accessor__.override(e,r)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,r){return this.__accessor__.internalSet(e,r),this}};U1e=I0,H1e=uV;let yAe=class q1e{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const r=new q1e;return this._values.forEach((n,i)=>{e&&e.has(i)||r.set(i,Qt(n.value),n.origin)}),r}get(e,r){r=this._normalizeOrigin(r);const n=this._values.get(e);return r==null||(n==null?void 0:n.origin)===r?n==null?void 0:n.value:void 0}originOf(e){var r;return((r=this._values.get(e))==null?void 0:r.origin)??qs.USER}keys(e){e=this._normalizeOrigin(e);const r=[...this._values.keys()];return e==null?r:r.filter(n=>{var i;return((i=this._values.get(n))==null?void 0:i.origin)===e})}set(e,r,n){if((n=this._normalizeOrigin(n))===qs.DEFAULTS){const i=this._values.get(e);if((i==null?void 0:i.origin)!=null&&i.origin>n)return}this._values.set(e,new vAe(r,n))}delete(e,r){var n;(r=this._normalizeOrigin(r))!=null&&((n=this._values.get(e))==null?void 0:n.origin)!==r||this._values.delete(e)}has(e,r){var n;return(r=this._normalizeOrigin(r))!=null?((n=this._values.get(e))==null?void 0:n.origin)===r:this._values.has(e)}forEach(e){this._values.forEach(({value:r},n)=>e(r,n))}_normalizeOrigin(e){if(e!=null)return e===qs.DEFAULTS?e:qs.USER}},vAe=class{constructor(e,r){this.value=e,this.origin=r}};function W1e(t,e,r){e.keys().forEach(i=>{r.set(i,e.get(i),qs.DEFAULTS)});const n=t.metadata;Object.keys(n).forEach(i=>{t.internalGet(i)&&r.set(i,t.internalGet(i),qs.DEFAULTS)})}function _Ae(t,e,r){if(!(t!=null&&t.read)||t.read.enabled===!1||!t.read.source)return!1;const n=t.read.source;if(typeof n=="string"){if(n===e||n.includes(".")&&n.indexOf(e)===0&&Xee(n,r))return!0}else for(const i of n)if(i===e||i.includes(".")&&i.indexOf(e)===0&&Xee(i,r))return!0;return!1}function xAe(t){return t&&(!t.read||t.read.enabled!==!1&&!t.read.source)}function wAe(t,e,r,n,i){let s=aV(e[r],i);xAe(s)&&(t[r]=!0);for(const o of Object.getOwnPropertyNames(e))s=aV(e[o],i),_Ae(s,r,n)&&(t[o]=!0)}function bAe(t,e,r,n){const i=r.metadata,s=uAe(i[e],n),o=s==null?void 0:s.default;if(o===void 0)return;const a=typeof o=="function"?o.call(t,e,n):o;a!==void 0&&r.set(e,a)}const Z1e={origin:"service"};function Y1e(t,e,r=Z1e){if(!e||typeof e!="object")return;const n=md(t),i=n.metadata,s={};for(const o of Object.getOwnPropertyNames(e))wAe(s,i,o,e,r);n.setDefaultOrigin(r.origin);for(const o of Object.getOwnPropertyNames(s)){const a=aV(i[o],r).read,l=a==null?void 0:a.source;let u;u=l&&typeof l=="string"?DS(e,l):e[o],a!=null&&a.reader&&(u=a.reader.call(t,u,e,r)),u!==void 0&&n.set(o,u)}if(!r||!r.ignoreDefaults){n.setDefaultOrigin("defaults");for(const o of Object.getOwnPropertyNames(i))s[o]||bAe(t,o,n,r)}n.setDefaultOrigin("user")}function CAe(t,e,r,n=Z1e){var s;const i={...n,messages:[]};r(i),(s=i.messages)==null||s.forEach(o=>{o.type!=="warning"||t.loaded?n!=null&&n.messages&&n.messages.push(o):t.loadWarnings.push(o)})}function SAe(t,e,r,n,i){var o,a;const s={};return(a=(o=e.write)==null?void 0:o.writer)==null||a.call(t,n,s,r,i),s}function X1e(t,e,r,n,i,s){if(!(n!=null&&n.write))return!1;const o=R2(t,r);if(!i&&n.write.overridePolicy){const a=n.write.overridePolicy.call(t,o,r,s??void 0);a!==void 0&&(i=a)}if(i||(i=n.write),!i||i.enabled===!1||i.layerContainerTypes&&(s!=null&&s.layerContainerType)&&!i.layerContainerTypes.includes(s.layerContainerType))return!1;if((o===null&&!i.allowNull&&!i.writerEnsuresNonNull||o===void 0)&&i.isRequired){const a=new Pr("web-document-write:property-required",`Missing value for required property '${r}' on '${t.declaredClass}'`,{propertyName:r,target:t});return a&&(s!=null&&s.messages)?s.messages.push(a):a&&!s&&li.getLogger("esri.core.accessorSupport.write").error(a.name,a.message),!1}return!(o===void 0||o===null&&!i.allowNull&&!i.writerEnsuresNonNull||!i.alwaysWriteDefaults&&(!e.store.multipleOriginsSupported||e.store.originOf(r)===qs.DEFAULTS)&&EAe(t,r,s,n,o)||!i.ignoreOrigin&&(s!=null&&s.origin)&&e.store.multipleOriginsSupported&&e.store.originOf(r)0&&(e=DR(e,d),(o=(s=r==null?void 0:r.resources)==null?void 0:s.pendingOperations)!=null&&o.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then(()=>DR(e,d,()=>"replace-arrays"))),r!=null&&r.writtenProperties&&r.writtenProperties.push({target:t,propName:a,oldOrigin:ZLe(n.store.originOf(a)),newOrigin:r.origin}))}return e}const XZ=t=>{let e=class extends t{constructor(...r){super(...r);const n=md(this),i=n.store,s=new yAe;n.store=s,W1e(n,i,s)}read(r,n){Y1e(this,r,n)}write(r,n){return J1e(this,r??{},n)}toJSON(r){return this.write({},r)}static fromJSON(r,n){return TAe.call(this,r,n)}};return e=T([_t("esri.core.JSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function TAe(t,e){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(t,e),r}function iA(t){return t&&typeof t=="object"&&"toJSON"in t&&typeof t.toJSON=="function"}let qr=class extends XZ(Iu){};qr=T([_t("esri.core.JSONSupport")],qr);var cV;let Rc=cV=class extends qr{constructor(t){super(t),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return cV.fromJSON(this.toJSON())}};T([B({json:{write:!0}})],Rc.prototype,"appId",void 0),T([B({json:{write:!0}})],Rc.prototype,"authNamespace",void 0),T([B({json:{write:!0}})],Rc.prototype,"expiration",void 0),T([B({json:{write:!0}})],Rc.prototype,"flowType",void 0),T([B({json:{write:!0}})],Rc.prototype,"forceLogin",void 0),T([B({json:{write:!0}})],Rc.prototype,"forceUserId",void 0),T([B({json:{write:!0}})],Rc.prototype,"locale",void 0),T([B({json:{write:!0}})],Rc.prototype,"minTimeUntilExpiration",void 0),T([B({json:{write:!0}})],Rc.prototype,"popup",void 0),T([B({json:{write:!0}})],Rc.prototype,"popupCallbackUrl",void 0),T([B({json:{write:!0}})],Rc.prototype,"popupWindowFeatures",void 0),T([B({json:{write:!0}})],Rc.prototype,"portalUrl",void 0),T([B({json:{write:!0}})],Rc.prototype,"preserveUrlHash",void 0),T([B({json:{write:!0}})],Rc.prototype,"userId",void 0),Rc=cV=T([_t("esri.identity.OAuthInfo")],Rc);const hV=Rc,IAe=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,RAe={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function yte(t){const e=t==null?void 0:t.match(IAe);if(!e)return null;const[,r,n,i]=e;if(!r)return null;let s=null,o=null,a=null;const{devext:l,qaext:u,www:d}=RAe;if(n)if(s=r,i)switch(i.toLowerCase()){case"devext":({customBaseUrl:o,portalHostname:a}=l);break;case"qa":({customBaseUrl:o,portalHostname:a}=u);break;default:return null}else({customBaseUrl:o,portalHostname:a}=d);else switch(r.toLowerCase()){case"devext":({customBaseUrl:o,portalHostname:a}=l);break;case"qaext":({customBaseUrl:o,portalHostname:a}=u);break;case"www":({customBaseUrl:o,portalHostname:a}=d);break;default:return null}return{customBaseUrl:o,isPortal:!1,portalHostname:a,urlKey:s}}function K1e(t){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(t)}function sA(t){const e=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,n=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return e.test(t)?t=t.replace(e,"https://www.arcgis.com"):r.test(t)?t=t.replace(r,"https://devext.arcgis.com"):n.test(t)&&(t=t.replace(n,"https://qaext.arcgis.com")),t}function LAe(t){const e=atob(t),r=new Uint8Array(e.length);for(let n=0;nli.getLogger("esri.core.urlUtils"),Jw=Ao.request,vte="esri/config: esriConfig.request.proxyUrl is not set.",Q1e=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,e0e=/^\s*http:/i,PAe=/^\s*https:/i,$Ae=/^\s*file:/i,OAe=/:\d+$/,NAe=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,DAe=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),FAe=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");let Ef=class{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let r=this.uri.match(DAe);this.scheme=r[2]||(r[1]?"":null),this.authority=r[4]||(r[3]?"":null),this.path=r[5],this.query=r[7]||(r[6]?"":null),this.fragment=r[9]||(r[8]?"":null),this.authority!=null&&(r=this.authority.match(FAe),this.user=r[3]||null,this.password=r[4]||null,this.host=r[6]||r[7],this.port=r[9]||null)}toString(){return this.uri}};const LT={},zAe=new Ef(Ao.applicationUrl);let Ih=zAe;const BAe=jAe();let JZ=BAe;const KZ=()=>Ih,aTt=()=>JZ;function jAe(){const t=Ih.path,e=t.substring(0,t.lastIndexOf(t.split("/")[t.split("/").length-1]));return`${`${Ih.scheme}://${Ih.host}${Ih.port!=null?`:${Ih.port}`:""}`}${e}`}function fd(t){if(!t)return null;const e={path:null,query:null},r=new Ef(t),n=t.indexOf("?");return r.query===null?e.path=t:(e.path=t.substring(0,n),e.query=q3(r.query)),r.fragment&&(e.hash=r.fragment,r.query===null&&(e.path=e.path.substring(0,e.path.length-(r.fragment.length+1)))),e}function q3(t){const e=t.split("&"),r={};for(const n of e){if(!n)continue;const i=n.indexOf("=");let s,o;i<0?(s=decodeURIComponent(n),o=""):(s=decodeURIComponent(n.slice(0,i)),o=decodeURIComponent(n.slice(i+1)));let a=r[s];typeof a=="string"&&(a=r[s]=[a]),Array.isArray(a)?a.push(o):r[s]=o}return r}function v5(t,e){return t?Object.keys(t).map(r=>{const n=t[r];if(n==null)return"";const i=encodeURIComponent(r)+"=",s=e==null?void 0:e[r];return s?i+encodeURIComponent(s(n)):Array.isArray(n)?n.map(o=>iA(o)?i+encodeURIComponent(JSON.stringify(o)):i+encodeURIComponent(o)).join("&"):iA(n)?i+encodeURIComponent(JSON.stringify(n)):i+encodeURIComponent(n)}).filter(r=>r).join("&"):""}function VAe(t=!1){let e,r=Jw.proxyUrl;if(typeof t=="string"){e=ZAe(t);const n=VS(t);n&&(r=n.proxyUrl)}else e=!!t;if(!r)throw AAe().warn(vte),new Pr("urlUtils:proxy-not-set",vte);return e&&fV()&&(r=nY(r)),fd(r)}function lTt(t){const e=VS(t);let r,n;if(e){const i=QZ(e.proxyUrl);r=i.path,n=i.query?q3(i.query):null}if(r){const i=fd(t);t=r+"?"+i.path;const s=v5({...n,...i.query});s&&(t=`${t}?${s}`)}return t}const O8={path:"",query:""};function QZ(t){const e=t.indexOf("?");return e!==-1?(O8.path=t.slice(0,e),O8.query=t.slice(e+1)):(O8.path=t,O8.query=null),O8}function t0e(t){return t=(t=aA(t=ePe(t=QZ(t).path),!0)).toLowerCase()}function UAe(t){const e={proxyUrl:t.proxyUrl,urlPrefix:t0e(t.urlPrefix)},r=Jw.proxyRules,n=e.urlPrefix;let i=r.length;for(let s=0;s0?t.substring(0,e):t.replace(/\/+$/,"")}function dV(t,e=Jw.interceptors){const r=n=>n==null||n instanceof RegExp&&n.test(t)||typeof n=="string"&&t.startsWith(n);if(e){for(const n of e)if(Array.isArray(n.urls)){if(n.urls.some(r))return n}else if(r(n.urls))return n}return null}function Ad(t,e,r=!1){if(!t||!e)return!1;const n=mV(t),i=mV(e);return!(!r&&n.scheme!==i.scheme)&&n.host!=null&&i.host!=null&&n.host.toLowerCase()===i.host.toLowerCase()&&n.port===i.port}function eY(t){if(typeof t=="string"){if(!Af(t))return!0;t=mV(t)}if(Ad(t,Ih))return!0;const e=Jw.trustedServers||[];for(let r=0;r(v=f.indexOf(m,v))===-1?f.length:v;let l=a(i,"/",i.indexOf("//")+2),u=-1;for(;i.slice(0,l+1)===s.slice(0,l)+"/"&&(u=l+1,l!==i.length);)l=a(i,"/",l+1);if(u===-1||o&&u0)for(let f=0;fs?i.concat(s.split("/")):i,[]);for(let i=0;i0&&r[r.length-1]!==".."?r.pop():(!s&&i===n.length-1||s&&(s!=="."||r.length===0))&&r.push(s)}return r.join("/")}function kp(t,e=!1){if(t==null||O$(t)||j5(t))return null;let r=t.indexOf("://");if(r===-1&&e_(t))r=2;else{if(r===-1)return null;r+=3}const n=t.indexOf("/",r);return n!==-1&&(t=t.slice(0,n)),e&&(t=aA(t,!0)),t}function Af(t){return e_(t)||rY(t)}function O$(t){return t!=null&&t.slice(0,5)==="blob:"}function j5(t){return t!=null&&t.slice(0,5)==="data:"}function qAe(t){const e=LC(t);return e!=null&&e.isBase64?LAe(e.data):null}function lF(t){return kAe(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const WAe=/^data:(.*?)(;base64)?,(.*)$/;function LC(t){const e=t.match(WAe);if(!e)return null;const[,r,n,i]=e;return{mediaType:r,isBase64:!!n,data:i}}function n0e(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function uTt(t){return(await fetch(t)).blob()}function cTt(t){const e=qAe(t);if(!e)return null;const r=LC(t);return new Blob([e],{type:r.mediaType})}function e_(t){return t!=null&&t[0]==="/"&&t[1]==="/"}function rY(t){return t!=null&&Q1e.test(t)}function ZAe(t){return t!=null&&PAe.test(t)||Ih.scheme==="https"&&e_(t)}function YAe(t){return t!=null&&e0e.test(t)||Ih.scheme==="http"&&e_(t)}function XAe(t){return t!=null&&$Ae.test(t)}function nY(t){return e_(t)?`https:${t}`:t.replace(e0e,"https:")}function JAe(){return Ih.scheme==="http"}function fV(){return Ih.scheme==="https"}function aA(t,e=!1){return e_(t)?t.slice(2):(t=t.replace(Q1e,""),e&&t.length>1&&t[0]==="/"&&t[1]==="/"&&(t=t.slice(2)),t)}function KAe(t){const e=t.indexOf("//"),r=t.indexOf("/",e+2);return r===-1?t:t.slice(0,r)}function QAe(t){let e=0;if(Af(t)){const n=t.indexOf("//");n!==-1&&(e=n+2)}const r=t.lastIndexOf("/");return rn===i||n.endsWith(`.${i}`))||fV()&&!VS(t))&&(t=nY(t)),t}function pV(t,e,r){if(!(e&&r&&t&&Af(t)))return t;const n=t.indexOf("//"),i=t.indexOf("/",n+2),s=t.indexOf(":",n+2),o=Math.min(i<0?t.length:i,s<0?t.length:s);return t.slice(n+2,o).toLowerCase()!==e.toLowerCase()?t:`${t.slice(0,n+2)}${r}${t.slice(o)}`}function mV(t){return typeof t=="string"?new Ef(Bd(t)):(t.scheme||(t.scheme=Ih.scheme),t)}function s0e(t,e){const r=fd(t),n=Object.keys(r.query||{});return n.length>0&&e&&e.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function iPe(t,e,r){const n=fd(t),i=n.query||{};return i[e]=String(r),`${n.path}?${v5(i)}`}function jR(t,e){if(!e)return t;const r=fd(t),n=r.query||{};for(const[s,o]of Object.entries(e))o!=null&&(n[s]=o);const i=v5(n);return i?`${r.path}?${i}`:r.path}function dTt(t){if(t==null)return null;const e=t.match(o0e);return e?e[2]:null}function _te(t){if(t==null)return null;const e=t.match(o0e);return e?{path:e[1],extension:e[2]}:{path:t,extension:null}}async function fTt(t){return typeof t=="string"?LC(t)??{data:t}:new Promise((e,r)=>{const n=new FileReader;n.readAsDataURL(t),n.onload=()=>e(LC(n.result)),n.onerror=i=>r(i)})}const o0e=/([^.]*)\.([^/]*)$/,a0e="20240724",l0e="ac51c09e1d17be02f839eb2e22bd05fd7a16c2d3";Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));const sPe="4.30";let ws,iY=sPe;iY="4.30.9";function oPe(t){ws=t}function pTt(t){const e=ws==null?void 0:ws.findCredential(t);return e!=null&&e.token?iPe(t,"token",e.token):t}Sr("host-webworker");const aPe="modulepreload",lPe=function(t){return"/"+t},xte={},fs=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=lPe(l),l in xte)return;xte[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":aPe,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((m,v)=>{f.addEventListener("load",m),f.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},uPe=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function u0e(t){const e=kp(t,!0);return!!e&&e.endsWith(".arcgis.com")&&!uPe.has(e)&&!t.endsWith("/sharing/rest/generateToken")}function cPe(t,e,r=!1,n){return new Promise((i,s)=>{if(sy(n))return void s(wte());let o=()=>{u(),s(new Error(`Unable to load ${e}`))},a=()=>{const d=t;u(),i(d)},l=()=>{if(!t)return;const d=t;u(),d.src="",s(wte())};const u=()=>{Sr("esri-image-decode")||(t.removeEventListener("error",o),t.removeEventListener("load",a)),o=null,a=null,t=null,n!=null&&n.removeEventListener("abort",l),l=null,r&&URL.revokeObjectURL(e)};n!=null&&n.addEventListener("abort",l),Sr("esri-image-decode")?t.decode().then(a,o):(t.addEventListener("error",o),t.addEventListener("load",a))})}function wte(){try{return new DOMException("Aborted","AbortError")}catch{const t=new Error;return t.name="AbortError",t}}const c0e="Timeout exceeded";function hPe(){return new Error(c0e)}function mTt(t){return typeof t=="object"&&!!t&&"message"in t&&t.message===c0e}function dPe(t){Ao.request.crossOriginNoCorsDomains||(Ao.request.crossOriginNoCorsDomains={});const e=Ao.request.crossOriginNoCorsDomains;for(let r of t)r=r.toLowerCase(),/^https?:\/\//.test(r)?e[kp(r)??""]=0:(e[kp("http://"+r)??""]=0,e[kp("https://"+r)??""]=0)}function fPe(t){const e=Ao.request.crossOriginNoCorsDomains;if(e){let r=kp(t);if(r)return r=r.toLowerCase(),!Ad(r,KZ())&&e[r]({data:v,getAllHeaders:vw,getHeader:vw,httpStatus:200,requestOptions:i.requestOptions,url:i.url}),o=dV(t,gp.internalInterceptors);if(o){const v=await Cte(o,i);if(v!=null)return s(v)}let a=dV(t);if(a){const v=await Cte(a,i);if(v!=null)return s(v);a.after||a.error||(a=null)}if(t=i.url,(e=i.requestOptions).responseType==="image"&&(Sr("host-webworker")||Sr("host-node")))throw nm("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),i);if(e.method==="head"){if(e.body)throw nm("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),i);if(r||n)throw nm("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),i)}if(await _Pe(),lA)return lA.execute(t,e);const l=new AbortController,u=bp(e,()=>l.abort()),d={controller:l,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:a,params:i,redoRequest:!1,useIdentity:gp.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},f=await CPe(d).finally(()=>u==null?void 0:u.remove());return(m=a==null?void 0:a.after)==null||m.call(a,f),f}let lA;const gp=Ao.request,h0e="FormData"in globalThis,mPe=new Set([499,498,403,401]),gPe=new Set(["COM_0056","COM_0057","SB_0008"]),yPe=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],vw=()=>null,uA=Symbol();function vPe(t){const e=kp(t);e&&!sa._corsServers.includes(e)&&sa._corsServers.push(e)}function bte(t){const e=kp(t);return!e||e.endsWith(".arcgis.com")||sa._corsServers.includes(e)||eY(e)}function nm(t,e,r,n){let i="Error";const s={url:r.url,requestOptions:r.requestOptions,getAllHeaders:vw,getHeader:vw,ssl:!1};if(e instanceof Pr)return e.details?(e.details=Qt(e.details),e.details.url=r.url,e.details.requestOptions=r.requestOptions):e.details=s,e;if(e){const o=n&&(()=>Array.from(n.headers)),a=n&&(d=>n.headers.get(d)),l=n==null?void 0:n.status,u=e.message;u&&(i=u),o&&a&&(s.getAllHeaders=o,s.getHeader=a),s.httpStatus=(e.httpCode!=null?e.httpCode:e.code)||l||0,s.subCode=e.subcode,s.messageCode=e.messageCode,typeof e.details=="string"?s.messages=[e.details]:s.messages=e.details,s.raw=uA in e?e[uA]:e}return i0(e)?Bc():new Pr(t,i,s)}async function _Pe(){Sr("host-webworker")&&!lA&&(lA=await fs(()=>import("./request-CIjms0zq.js"),[]))}async function gV(){ws||await fs(()=>Promise.resolve().then(()=>YFe),void 0)}async function xPe(t){var a;const e=t.params.url,r=t.params.requestOptions,n=t.controller.signal,i=r.body;let s=null,o=null;if(h0e&&"HTMLFormElement"in globalThis&&(i instanceof FormData?s=i:i instanceof HTMLFormElement&&(s=new FormData(i))),typeof i=="string"&&(o=i),t.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:r.method==="head"?"HEAD":"GET",mode:"cors",priority:gp.priority,redirect:"follow",signal:n},(s||o)&&(t.fetchOptions.body=s||o),r.authMode==="anonymous"&&(t.useIdentity=!1),t.hasToken=!!(/token=/i.test(e)||(a=r.query)!=null&&a.token||s!=null&&s.get("token")),!t.hasToken&&Ao.apiKey&&u0e(e)&&(r.query||(r.query={}),r.query.token=Ao.apiKey,t.hasToken=!0),t.useIdentity&&!t.hasToken&&!t.credentialToken&&!d0e(e)&&!sy(n)){let l;r.authMode==="immediate"?(await gV(),l=await ws.getCredential(e,{signal:n}),t.credential=l):r.authMode==="no-prompt"?(await gV(),l=await ws.getCredential(e,{prompt:!1,signal:n}).catch(()=>{}),t.credential=l):ws&&(l=ws.findCredential(e)),l&&(t.credentialToken=l.token,t.useSSL=!!l.ssl)}}function d0e(t){return yPe.some(e=>e.test(t))}async function wPe(t){let e=t.params.url;const r=t.params.requestOptions,n=t.fetchOptions??{},i=O$(e)||j5(e),s=r.responseType||"json",o=i?0:r.timeout!=null?r.timeout:gp.timeout;let a=!1;if(!i){t.useSSL&&(e=nY(e));let m={...r.query};t.credentialToken&&(m.token=t.credentialToken);let v=v5(m);Sr("esri-url-encodes-apostrophe")&&(v=v.replaceAll("'","%27"));const b=e.length+1+v.length;let M;a=r.method==="delete"||r.method==="post"||r.method==="put"||!!r.body||b>gp.maxUrlLength;const O=r.useProxy||!!VS(e);if(O){const I=VAe(e);M=I.path,!a&&M.length+1+b>gp.maxUrlLength&&(a=!0),I.query&&(m={...I.query,...m})}if(n.method==="HEAD"&&(a||O)){if(a)throw b>gp.maxUrlLength?nm("request:invalid-parameters",new Error("URL exceeds maximum length"),t.params):nm("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),t.params);if(O)throw nm("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),t.params)}if(a?(n.method=r.method==="delete"?"DELETE":r.method==="put"?"PUT":"POST",r.body?e=jR(e,m):(n.body=v5(m),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):e=jR(e,m),O&&(t.useProxy=!0,e=`${M}?${e}`),m.token&&h0e&&n.body instanceof FormData&&!K1e(e)&&n.body.set("token",m.token),r.hasOwnProperty("withCredentials"))t.withCredentials=r.withCredentials;else if(!Ad(e,KZ())){if(eY(e))t.withCredentials=!0;else if(ws){const I=ws.findServerInfo(e);I!=null&&I.webTierAuth&&(t.withCredentials=!0)}}t.withCredentials&&(n.credentials="include",fPe(e)&&await pPe(a?jR(e,m):e))}let l,u,d=0,f=!1;o>0&&(d=setTimeout(()=>{f=!0,t.controller.abort()},o));try{if(r.responseType==="native-request-init")u=n,u.url=e;else if(r.responseType!=="image"||n.cache!=="default"||n.method!=="GET"||a||bPe(r.headers)||!i&&!t.useProxy&&gp.proxyUrl&&!bte(e)){if(sa._beforeFetch&&await sa._beforeFetch(e,n),l=await fetch(e,n),sa._afterFetch&&await sa._afterFetch(l),t.useProxy||vPe(e),r.responseType==="native")u=l;else if(n.method!=="HEAD")if(l.ok){switch(s){case"array-buffer":u=await l.arrayBuffer();break;case"blob":case"image":u=await l.blob();break;default:u=await l.text()}if(d&&(clearTimeout(d),d=0),s==="json"||s==="xml"||s==="document")if(u)switch(s){case"json":u=JSON.parse(u);break;case"xml":u=Ste(u,"application/xml");break;case"document":u=Ste(u,"text/html")}else u=null;if(u){if(s==="array-buffer"||s==="blob"){const m=l.headers.get("Content-Type");if(m&&/application\/json|text\/plain/i.test(m)&&u[s==="blob"?"size":"byteLength"]<=750)try{const v=await new Response(u).json();v.error&&(u=v)}catch{}}s==="image"&&u instanceof Blob&&(u=await Ete(URL.createObjectURL(u),t,!0))}}else{u=await l.text();try{u=JSON.parse(u)}catch{}}}else u=await Ete(e,t)}catch(m){if(m.name==="AbortError")throw f?hPe():Bc("Request canceled");if(!(!l&&m instanceof TypeError&&gp.proxyUrl)||r.body||r.method==="delete"||r.method==="head"||r.method==="post"||r.method==="put"||t.useProxy||bte(e))throw m;t.redoRequest=!0,UAe({proxyUrl:gp.proxyUrl,urlPrefix:kp(e)??""})}finally{d&&clearTimeout(d)}return[l,u]}async function Cte(t,e){if(t.responseData!=null)return t.responseData;if(t.headers&&(e.requestOptions.headers={...e.requestOptions.headers,...t.headers}),t.query&&(e.requestOptions.query={...e.requestOptions.query,...t.query}),t.before){let r,n;try{n=await t.before(e)}catch(i){r=nm("request:interceptor",i,e)}if((n instanceof Error||n instanceof Pr)&&(r=nm("request:interceptor",n,e)),r)throw t.error&&t.error(r),r;return n}}function bPe(t){if(t){for(const e of Object.getOwnPropertyNames(t))if(t[e])return!0}return!1}function Ste(t,e){let r;try{r=new DOMParser().parseFromString(t,e)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function CPe(t){var s,o;let e,r;await xPe(t);try{do[e,r]=await wPe(t);while(!await SPe(t,e,r))}catch(a){const l=nm("request:server",a,t.params,e);throw l.details.ssl=t.useSSL,(s=t.interceptor)!=null&&s.error&&t.interceptor.error(l),l}const n=t.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!t.hasToken&&!t.credentialToken&&((o=r.user)!=null&&o.username)&&!eY(n)){const a=kp(n,!0);a&&gp.trustedServers.push(a)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&dPe(r.authorizedCrossOriginNoCorsDomains)}const i=t.credential;if(i&&ws){const a=ws.findServerInfo(i.server);let l=a==null?void 0:a.owningSystemUrl;if(l){l=l.replace(/\/?$/,"/sharing");const u=ws.findCredential(l,i.userId);u&&ws._getIdenticalSvcIdx(l,u)===-1&&u.resources.unshift(l)}}return{data:r,getAllHeaders:e?()=>Array.from(e.headers):vw,getHeader:e?a=>e.headers.get(a):vw,httpStatus:(e==null?void 0:e.status)??200,requestOptions:t.params.requestOptions,ssl:t.useSSL,url:t.params.url}}async function SPe(t,e,r){var u;if(t.redoRequest)return t.redoRequest=!1,!1;const n=t.params.requestOptions;if(!e||n.responseType==="native"||n.responseType==="native-request-init")return!0;let i,s;if(r&&(r.error&&typeof r.error=="object"?i=r.error:r.status==="error"&&Array.isArray(r.messages)&&(i={...r},i[uA]=r,i.details=r.messages)),!i&&!e.ok)throw i=new Error(`Unable to load ${e.url} status: ${e.status}`),i[uA]=r,i;let o,a=null;i&&(s=Number(i.code),a=i.hasOwnProperty("subcode")?Number(i.subcode):null,o=i.messageCode,o=o==null?void 0:o.toUpperCase());const l=n.authMode;if(s===403&&(a===4||(u=i.message)!=null&&u.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!t.useSSL)return t.useSSL=!0,!1}else if(!t.hasToken&&t.useIdentity&&(l!=="no-prompt"||s===498)&&s!==void 0&&mPe.has(s)&&!d0e(t.params.url)&&(s!==403||(!o||!gPe.has(o))&&(a==null||a===2&&t.credentialToken))){await gV();try{const d=await ws.getCredential(t.params.url,{error:nm("request:server",i,t.params),prompt:l!=="no-prompt",signal:t.controller.signal,token:t.credentialToken});return t.credential=d,t.credentialToken=d.token,t.useSSL=t.useSSL||d.ssl,!1}catch(d){if(l==="no-prompt")return t.credential=void 0,t.credentialToken=void 0,!1;i=d}}if(i)throw i;return!0}function Ete(t,e,r=!1){const n=e.controller.signal,i=new Image;return e.withCredentials?i.crossOrigin="use-credentials":i.crossOrigin="anonymous",i.alt="",i.fetchPriority=gp.priority,i.src=t,cPe(i,t,r,n)}sa._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],sa._beforeFetch=void 0,sa._afterFetch=void 0;let VR=class f0e{constructor(){this._emitter=new f0e.EventEmitter(this)}emit(e,r){return this._emitter.emit(e,r)}on(e,r){return this._emitter.on(e,r)}once(e,r){return this._emitter.once(e,r)}hasEventListener(e){return this._emitter.hasEventListener(e)}};(function(t){class e{constructor(i=null){this._target=i,this._listenersMap=null}clear(){var i;(i=this._listenersMap)==null||i.clear(),this._listenersMap=null}destroy(){this.clear()}emit(i,s){var u;let o=(u=this._listenersMap)==null?void 0:u.get(i);if(!o)return!1;const a=this._target||this;let l=!1;for(const d of o.slice()){const f="deref"in d?d.deref():d;f?f==null||f.call(a,s):l=!0}return l&&(o=o.filter(d=>!("deref"in d)||d.deref()!=null),this._listenersMap.set(i,o)),o.length>0}on(i,s){if(Array.isArray(i)){const a=i.map(l=>this.on(l,s));return NS(a)}if(i.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??(this._listenersMap=new Map);const o=this._listenersMap.get(i)||[];return o.push(s),this._listenersMap.set(i,o),Hl(()=>{var u;const a=(u=this._listenersMap)==null?void 0:u.get(i),l=(a==null?void 0:a.indexOf(s))??-1;l>=0&&a.splice(l,1)})}once(i,s){const o=this.on(i,a=>{o.remove();const l="deref"in s?s.deref():s;l==null||l.call(null,a)});return o}hasEventListener(i){var o;const s=(o=this._listenersMap)==null?void 0:o.get(i);return s!=null&&s.length>0}}t.EventEmitter=e,t.EventedMixin=n=>{let i=class extends n{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(s,o){return this._emitter.emit(s,o)}on(s,o){return this._emitter.on(s,o)}once(s,o){return this._emitter.once(s,o)}hasEventListener(s){return this._emitter.hasEventListener(s)}};return i=T([_t("esri.core.Evented")],i),i};let r=class extends Iu{constructor(){super(...arguments),this._emitter=new VR.EventEmitter(this)}destroy(){this._emitter.clear()}emit(n,i){return this._emitter.emit(n,i)}on(n,i){return this._emitter.on(n,i)}once(n,i){return this._emitter.once(n,i)}hasEventListener(n){return this._emitter.hasEventListener(n)}};r=T([_t("esri.core.Evented.EventedAccessor")],r),t.EventedAccessor=r})(VR||(VR={}));const Kw=VR;let ro=class{constructor(e,r={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=e,this._options=r,this.apiValues=[],this.jsonValues=[],this._apiToJSON=EPe(e),this.apiValues=Mte(this._apiToJSON),this.jsonValues=Mte(this._jsonToAPI),this.read=n=>this.fromJSON(n),this.write=(n,i,s)=>{const o=this.toJSON(n);o!==void 0&&Ph(s,o,i)},this.write.isJSONMapWriter=!0}toJSON(e){if(e==null)return null;if(this._apiToJSON.hasOwnProperty(e)){const r=this._apiToJSON[e];return this._options.useNumericKeys?+r:r}return this._options.ignoreUnknown?void 0:e}fromJSON(e){return e!=null&&this._jsonToAPI.hasOwnProperty(e)?this._jsonToAPI[e]:this._options.ignoreUnknown?void 0:e}};function EPe(t){const e={};for(const r in t)e[t[r]]=r;return e}function Mte(t){const e=[];for(const r in t)e.push(r);return e.sort(),e}function Dh(){return function(t,e){return new ro(t,{ignoreUnknown:!0,...e})}}let R6;var Eue,Mue;const MPe=((Eue=globalThis.esriConfig)==null?void 0:Eue.locale)??((Mue=globalThis.dojoConfig)==null?void 0:Mue.locale);function p0e(){var t;return MPe??((t=globalThis.navigator)==null?void 0:t.language)??"en"}function im(){return R6===void 0&&(R6=p0e()),R6}function yTt(t=im()){const e=/^([a-zA-Z]{2,3})(?:[_-]\w+)*$/.exec(t);return e==null?void 0:e[1].toLowerCase()}const UR=[];function TPe(t){return UR.push(t),Hl(()=>UR.splice(UR.indexOf(t),1))}const HR=[];function sY(t){return HR.push(t),Hl(()=>HR.splice(HR.indexOf(t),1))}function IPe(){const t=p0e();R6!==t&&([...HR].forEach(e=>e(t)),R6=t,[...UR].forEach(e=>e(t)))}var Tue;(Tue=globalThis.addEventListener)==null||Tue.call(globalThis,"languagechange",IPe);const Tte=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);class V5 extends Error{}class RPe extends V5{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class LPe extends V5{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class kPe extends V5{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class d4 extends V5{}class m0e extends V5{constructor(e){super(`Invalid unit ${e}`)}}class Dd extends V5{}class Uy extends V5{constructor(){super("Zone is an abstract class")}}const ti="numeric",e0="short",Pf="long",cA={year:ti,month:ti,day:ti},g0e={year:ti,month:e0,day:ti},APe={year:ti,month:e0,day:ti,weekday:e0},y0e={year:ti,month:Pf,day:ti},v0e={year:ti,month:Pf,day:ti,weekday:Pf},_0e={hour:ti,minute:ti},x0e={hour:ti,minute:ti,second:ti},w0e={hour:ti,minute:ti,second:ti,timeZoneName:e0},b0e={hour:ti,minute:ti,second:ti,timeZoneName:Pf},C0e={hour:ti,minute:ti,hourCycle:"h23"},S0e={hour:ti,minute:ti,second:ti,hourCycle:"h23"},E0e={hour:ti,minute:ti,second:ti,hourCycle:"h23",timeZoneName:e0},M0e={hour:ti,minute:ti,second:ti,hourCycle:"h23",timeZoneName:Pf},T0e={year:ti,month:ti,day:ti,hour:ti,minute:ti},I0e={year:ti,month:ti,day:ti,hour:ti,minute:ti,second:ti},R0e={year:ti,month:e0,day:ti,hour:ti,minute:ti},L0e={year:ti,month:e0,day:ti,hour:ti,minute:ti,second:ti},PPe={year:ti,month:e0,day:ti,weekday:e0,hour:ti,minute:ti},k0e={year:ti,month:Pf,day:ti,hour:ti,minute:ti,timeZoneName:e0},A0e={year:ti,month:Pf,day:ti,hour:ti,minute:ti,second:ti,timeZoneName:e0},P0e={year:ti,month:Pf,day:ti,weekday:Pf,hour:ti,minute:ti,timeZoneName:Pf},$0e={year:ti,month:Pf,day:ti,weekday:Pf,hour:ti,minute:ti,second:ti,timeZoneName:Pf};class Qw{get type(){throw new Uy}get name(){throw new Uy}get ianaName(){return this.name}get isUniversal(){throw new Uy}offsetName(e,r){throw new Uy}formatOffset(e,r){throw new Uy}offset(e){throw new Uy}equals(e){throw new Uy}get isValid(){throw new Uy}}let uF=null;class N$ extends Qw{static get instance(){return uF===null&&(uF=new N$),uF}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return U0e(e,r,n)}formatOffset(e,r){return L6(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let GR={};function $Pe(t){return GR[t]||(GR[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),GR[t]}const OPe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function NPe(t,e){const r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,s,o,a,l,u,d]=n;return[o,i,s,a,l,u,d]}function DPe(t,e){const r=t.formatToParts(e),n=[];for(let i=0;i=0?b:1e3+b,(m-v)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Ite={};function FPe(t,e={}){const r=JSON.stringify([t,e]);let n=Ite[r];return n||(n=new Intl.ListFormat(t,e),Ite[r]=n),n}let yV={};function vV(t,e={}){const r=JSON.stringify([t,e]);let n=yV[r];return n||(n=new Intl.DateTimeFormat(t,e),yV[r]=n),n}let _V={};function zPe(t,e={}){const r=JSON.stringify([t,e]);let n=_V[r];return n||(n=new Intl.NumberFormat(t,e),_V[r]=n),n}let xV={};function BPe(t,e={}){const{base:r,...n}=e,i=JSON.stringify([t,n]);let s=xV[i];return s||(s=new Intl.RelativeTimeFormat(t,e),xV[i]=s),s}let xb=null;function jPe(){return xb||(xb=new Intl.DateTimeFormat().resolvedOptions().locale,xb)}let Rte={};function VPe(t){let e=Rte[t];if(!e){const r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,Rte[t]=e}return e}function UPe(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const r=t.indexOf("-u-");if(r===-1)return[t];{let n,i;try{n=vV(t).resolvedOptions(),i=t}catch{const l=t.substring(0,r);n=vV(l).resolvedOptions(),i=l}const{numberingSystem:s,calendar:o}=n;return[i,s,o]}}function HPe(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function GPe(t){const e=[];for(let r=1;r<=12;r++){const n=vs.utc(2009,r,1);e.push(t(n))}return e}function qPe(t){const e=[];for(let r=1;r<=7;r++){const n=vs.utc(2016,11,13+r);e.push(t(n))}return e}function AT(t,e,r,n){const i=t.listingMode();return i==="error"?null:i==="en"?r(e):n(e)}function WPe(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class ZPe{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...o}=n;if(!r||Object.keys(o).length>0){const a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=zPe(e,a)}}format(e){if(this.inf){const r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{const r=this.floor?Math.floor(e):uY(e,3);return bu(r,this.padTo)}}}class YPe{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Nf.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=vV(r,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class XPe{constructor(e,r,n){this.opts={style:"long",...n},!r&&j0e()&&(this.rtf=BPe(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):g$e(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}}const JPe={firstDay:1,minimalDays:4,weekend:[6,7]};let Cl=class wb{static fromOpts(e){return wb.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,i,s=!1){const o=e||nu.defaultLocale,a=o||(s?"en-US":jPe()),l=r||nu.defaultNumberingSystem,u=n||nu.defaultOutputCalendar,d=wV(i)||nu.defaultWeekSettings;return new wb(a,l,u,d,o)}static resetCache(){xb=null,yV={},_V={},xV={}}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return wb.create(e,r,n,i)}constructor(e,r,n,i,s){const[o,a,l]=UPe(e);this.locale=o,this.numberingSystem=r||a||null,this.outputCalendar=n||l||null,this.weekSettings=i,this.intl=HPe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=WPe(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:wb.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,wV(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return AT(this,e,q0e,()=>{const n=r?{month:e,day:"numeric"}:{month:e},i=r?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=GPe(s=>this.extract(s,n,"month"))),this.monthsCache[i][e]})}weekdays(e,r=!1){return AT(this,e,Y0e,()=>{const n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=qPe(s=>this.extract(s,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return AT(this,void 0,()=>X0e,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vs.utc(2016,11,13,9),vs.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return AT(this,e,J0e,()=>{const r={era:e};return this.eraCache[e]||(this.eraCache[e]=[vs.utc(-40,1,1),vs.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){const i=this.dtFormatter(e,r),s=i.formatToParts(),o=s.find(a=>a.type.toLowerCase()===n);return o?o.value:null}numberFormatter(e={}){return new ZPe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new YPe(e,this.intl,r)}relFormatter(e={}){return new XPe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return FPe(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:V0e()?VPe(this.locale):JPe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}},cF=null;class Dc extends Qw{static get utcInstance(){return cF===null&&(cF=new Dc(0)),cF}static instance(e){return e===0?Dc.utcInstance:new Dc(e)}static parseSpecifier(e){if(e){const r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new Dc(z$(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${L6(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${L6(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return L6(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class KPe extends Qw{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Nv(t,e){if(Rs(t)||t===null)return e;if(t instanceof Qw)return t;if(t$e(t)){const r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?N$.instance:r==="utc"||r==="gmt"?Dc.utcInstance:Dc.parseSpecifier(r)||Nf.create(t)}else return n5(t)?Dc.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new KPe(t)}let Lte=()=>Date.now(),kte="system",Ate=null,Pte=null,$te=null,Ote=60,Nte,Dte=null;class nu{static get now(){return Lte}static set now(e){Lte=e}static set defaultZone(e){kte=e}static get defaultZone(){return Nv(kte,N$.instance)}static get defaultLocale(){return Ate}static set defaultLocale(e){Ate=e}static get defaultNumberingSystem(){return Pte}static set defaultNumberingSystem(e){Pte=e}static get defaultOutputCalendar(){return $te}static set defaultOutputCalendar(e){$te=e}static get defaultWeekSettings(){return Dte}static set defaultWeekSettings(e){Dte=wV(e)}static get twoDigitCutoffYear(){return Ote}static set twoDigitCutoffYear(e){Ote=e%100}static get throwOnInvalid(){return Nte}static set throwOnInvalid(e){Nte=e}static resetCaches(){Cl.resetCache(),Nf.resetCache()}}class z1{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const O0e=[0,31,59,90,120,151,181,212,243,273,304,334],N0e=[0,31,60,91,121,152,182,213,244,274,305,335];function Tp(t,e){return new z1("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function oY(t,e,r){const n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return i===0?7:i}function D0e(t,e,r){return r+(US(t)?N0e:O0e)[e-1]}function F0e(t,e){const r=US(t)?N0e:O0e,n=r.findIndex(s=>skC(n,e,r)?(u=n+1,l=1):u=n,{weekYear:u,weekNumber:l,weekday:a,...B$(t)}}function Fte(t,e=4,r=1){const{weekYear:n,weekNumber:i,weekday:s}=t,o=aY(oY(n,1,e),r),a=$4(n);let l=i*7+s-o-7+e,u;l<1?(u=n-1,l+=$4(u)):l>a?(u=n+1,l-=$4(n)):u=n;const{month:d,day:f}=F0e(u,l);return{year:u,month:d,day:f,...B$(t)}}function hF(t){const{year:e,month:r,day:n}=t,i=D0e(e,r,n);return{year:e,ordinal:i,...B$(t)}}function zte(t){const{year:e,ordinal:r}=t,{month:n,day:i}=F0e(e,r);return{year:e,month:n,day:i,...B$(t)}}function Bte(t,e){if(!Rs(t.localWeekday)||!Rs(t.localWeekNumber)||!Rs(t.localWeekYear)){if(!Rs(t.weekday)||!Rs(t.weekNumber)||!Rs(t.weekYear))throw new d4("Cannot mix locale-based week fields with ISO-based week fields");return Rs(t.localWeekday)||(t.weekday=t.localWeekday),Rs(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Rs(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function QPe(t,e=4,r=1){const n=D$(t.weekYear),i=Ip(t.weekNumber,1,kC(t.weekYear,e,r)),s=Ip(t.weekday,1,7);return n?i?s?!1:Tp("weekday",t.weekday):Tp("week",t.weekNumber):Tp("weekYear",t.weekYear)}function e$e(t){const e=D$(t.year),r=Ip(t.ordinal,1,$4(t.year));return e?r?!1:Tp("ordinal",t.ordinal):Tp("year",t.year)}function z0e(t){const e=D$(t.year),r=Ip(t.month,1,12),n=Ip(t.day,1,dA(t.year,t.month));return e?r?n?!1:Tp("day",t.day):Tp("month",t.month):Tp("year",t.year)}function B0e(t){const{hour:e,minute:r,second:n,millisecond:i}=t,s=Ip(e,0,23)||e===24&&r===0&&n===0&&i===0,o=Ip(r,0,59),a=Ip(n,0,59),l=Ip(i,0,999);return s?o?a?l?!1:Tp("millisecond",i):Tp("second",n):Tp("minute",r):Tp("hour",e)}function Rs(t){return typeof t>"u"}function n5(t){return typeof t=="number"}function D$(t){return typeof t=="number"&&t%1===0}function t$e(t){return typeof t=="string"}function r$e(t){return Object.prototype.toString.call(t)==="[object Date]"}function j0e(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function V0e(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function n$e(t){return Array.isArray(t)?t:[t]}function jte(t,e,r){if(t.length!==0)return t.reduce((n,i)=>{const s=[e(i),i];return n&&r(n[0],s[0])===n[0]?n:s},null)[1]}function i$e(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function _w(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function wV(t){if(t==null)return null;if(typeof t!="object")throw new Dd("Week settings must be an object");if(!Ip(t.firstDay,1,7)||!Ip(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Ip(e,1,7)))throw new Dd("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Ip(t,e,r){return D$(t)&&t>=e&&t<=r}function s$e(t,e){return t-e*Math.floor(t/e)}function bu(t,e=2){const r=t<0;let n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function Iv(t){if(!(Rs(t)||t===null||t===""))return parseInt(t,10)}function J_(t){if(!(Rs(t)||t===null||t===""))return parseFloat(t)}function lY(t){if(!(Rs(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function uY(t,e,r=!1){const n=10**e;return(r?Math.trunc:Math.round)(t*n)/n}function US(t){return t%4===0&&(t%100!==0||t%400===0)}function $4(t){return US(t)?366:365}function dA(t,e){const r=s$e(e-1,12)+1,n=t+(e-r)/12;return r===2?US(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function F$(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Vte(t,e,r){return-aY(oY(t,1,e),r)+e-1}function kC(t,e=4,r=1){const n=Vte(t,e,r),i=Vte(t+1,e,r);return($4(t)-n+i)/7}function bV(t){return t>99?t:t>nu.twoDigitCutoffYear?1900+t:2e3+t}function U0e(t,e,r,n=null){const i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const o={timeZoneName:e,...s},a=new Intl.DateTimeFormat(r,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function z$(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);const n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function H0e(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Dd(`Invalid unit value ${t}`);return e}function fA(t,e){const r={};for(const n in t)if(_w(t,n)){const i=t[n];if(i==null)continue;r[e(n)]=H0e(i)}return r}function L6(t,e){const r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${bu(r,2)}:${bu(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${bu(r,2)}${bu(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function B$(t){return i$e(t,["hour","minute","second","millisecond"])}const o$e=["January","February","March","April","May","June","July","August","September","October","November","December"],G0e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a$e=["J","F","M","A","M","J","J","A","S","O","N","D"];function q0e(t){switch(t){case"narrow":return[...a$e];case"short":return[...G0e];case"long":return[...o$e];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const W0e=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Z0e=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],l$e=["M","T","W","T","F","S","S"];function Y0e(t){switch(t){case"narrow":return[...l$e];case"short":return[...Z0e];case"long":return[...W0e];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const X0e=["AM","PM"],u$e=["Before Christ","Anno Domini"],c$e=["BC","AD"],h$e=["B","A"];function J0e(t){switch(t){case"narrow":return[...h$e];case"short":return[...c$e];case"long":return[...u$e];default:return null}}function d$e(t){return X0e[t.hour<12?0:1]}function f$e(t,e){return Y0e(e)[t.weekday-1]}function p$e(t,e){return q0e(e)[t.month-1]}function m$e(t,e){return J0e(e)[t.year<0?0:1]}function g$e(t,e,r="always",n=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&s){const f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${i[t][0]}`;case-1:return f?"yesterday":`last ${i[t][0]}`;case 0:return f?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,u=i[t],d=n?l?u[1]:u[2]||u[1]:l?i[t][0]:t;return o?`${a} ${d} ago`:`in ${a} ${d}`}function Ute(t,e){let r="";for(const n of t)n.literal?r+=n.val:r+=e(n.val);return r}const y$e={D:cA,DD:g0e,DDD:y0e,DDDD:v0e,t:_0e,tt:x0e,ttt:w0e,tttt:b0e,T:C0e,TT:S0e,TTT:E0e,TTTT:M0e,f:T0e,ff:R0e,fff:k0e,ffff:P0e,F:I0e,FF:L0e,FFF:A0e,FFFF:$0e};class Rh{static create(e,r={}){return new Rh(e,r)}static parseFormat(e){let r=null,n="",i=!1;const s=[];for(let o=0;o0&&s.push({literal:i||/^\s+$/.test(n),val:n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return y$e[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0){if(this.opts.forceSimple)return bu(e,r);const n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,r){const n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(v,b)=>this.loc.extract(e,v,b),o=v=>e.isOffsetFixed&&e.offset===0&&v.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,v.format):"",a=()=>n?d$e(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(v,b)=>n?p$e(e,v):s(b?{month:v}:{month:v,day:"numeric"},"month"),u=(v,b)=>n?f$e(e,v):s(b?{weekday:v}:{weekday:v,month:"long",day:"numeric"},"weekday"),d=v=>{const b=Rh.macroTokenToFormatOpts(v);return b?this.formatWithSystemDefault(e,b):v},f=v=>n?m$e(e,v):s({era:v},"era"),m=v=>{switch(v){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(v)}};return Ute(Rh.parseFormat(r),m)}formatDurationFromString(e,r){const n=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>u=>{const d=n(u);return d?this.num(l.get(d),u.length):u},s=Rh.parseFormat(r),o=s.reduce((l,{literal:u,val:d})=>u?l:l.concat(d),[]),a=e.shiftTo(...o.map(n).filter(l=>l));return Ute(s,i(a))}}const K0e=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function e7(...t){const e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function t7(...t){return e=>t.reduce(([r,n,i],s)=>{const[o,a,l]=s(e,i);return[{...r,...o},a||n,l]},[{},null,1]).slice(0,2)}function r7(t,...e){if(t==null)return[null,null];for(const[r,n]of e){const i=r.exec(t);if(i)return n(i)}return[null,null]}function Q0e(...t){return(e,r)=>{const n={};let i;for(i=0;iv!==void 0&&(b||v&&d)?-v:v;return[{years:m(J_(r)),months:m(J_(n)),weeks:m(J_(i)),days:m(J_(s)),hours:m(J_(o)),minutes:m(J_(a)),seconds:m(J_(l),l==="-0"),milliseconds:m(lY(u),f)}]}const L$e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function dY(t,e,r,n,i,s,o){const a={year:e.length===2?bV(Iv(e)):Iv(e),month:G0e.indexOf(r)+1,day:Iv(n),hour:Iv(i),minute:Iv(s)};return o&&(a.second=Iv(o)),t&&(a.weekday=t.length>3?W0e.indexOf(t)+1:Z0e.indexOf(t)+1),a}const k$e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function A$e(t){const[,e,r,n,i,s,o,a,l,u,d,f]=t,m=dY(e,i,n,r,s,o,a);let v;return l?v=L$e[l]:u?v=0:v=z$(d,f),[m,new Dc(v)]}function P$e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const $$e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,O$e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,N$e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Hte(t){const[,e,r,n,i,s,o,a]=t;return[dY(e,i,n,r,s,o,a),Dc.utcInstance]}function D$e(t){const[,e,r,n,i,s,o,a]=t;return[dY(e,a,r,n,i,s,o),Dc.utcInstance]}const F$e=e7(_$e,hY),z$e=e7(x$e,hY),B$e=e7(w$e,hY),j$e=e7(tme),nme=t7(M$e,n7,HS,GS),V$e=t7(b$e,n7,HS,GS),U$e=t7(C$e,n7,HS,GS),H$e=t7(n7,HS,GS);function G$e(t){return r7(t,[F$e,nme],[z$e,V$e],[B$e,U$e],[j$e,H$e])}function q$e(t){return r7(P$e(t),[k$e,A$e])}function W$e(t){return r7(t,[$$e,Hte],[O$e,Hte],[N$e,D$e])}function Z$e(t){return r7(t,[I$e,R$e])}const Y$e=t7(n7);function X$e(t){return r7(t,[T$e,Y$e])}const J$e=e7(S$e,E$e),K$e=e7(rme),Q$e=t7(n7,HS,GS);function eOe(t){return r7(t,[J$e,nme],[K$e,Q$e])}const Gte="Invalid Duration",ime={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},tOe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ime},rp=146097/400,G9=146097/4800,rOe={years:{quarters:4,months:12,weeks:rp/7,days:rp,hours:rp*24,minutes:rp*24*60,seconds:rp*24*60*60,milliseconds:rp*24*60*60*1e3},quarters:{months:3,weeks:rp/28,days:rp/4,hours:rp*24/4,minutes:rp*24*60/4,seconds:rp*24*60*60/4,milliseconds:rp*24*60*60*1e3/4},months:{weeks:G9/7,days:G9,hours:G9*24,minutes:G9*24*60,seconds:G9*24*60*60,milliseconds:G9*24*60*60*1e3},...ime},W3=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],nOe=W3.slice(0).reverse();function Hy(t,e,r=!1){const n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Th(n)}function sme(t,e){let r=e.milliseconds??0;for(const n of nOe.slice(1))e[n]&&(r+=e[n]*t[n].milliseconds);return r}function qte(t,e){const r=sme(t,e)<0?-1:1;W3.reduceRight((n,i)=>{if(Rs(e[i]))return n;if(n){const s=e[n]*r,o=t[i][n],a=Math.floor(s/o);e[i]+=a*r,e[n]-=a*o*r}return i},null),W3.reduce((n,i)=>{if(Rs(e[i]))return n;if(n){const s=e[n]%1;e[n]-=s,e[i]+=s*t[n][i]}return i},null)}function iOe(t){const e={};for(const[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}let Th=class Lc{constructor(e){const r=e.conversionAccuracy==="longterm"||!1;let n=r?rOe:tOe;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Cl.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return Lc.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new Dd(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Lc({values:fA(e,Lc.normalizeUnit),loc:Cl.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(n5(e))return Lc.fromMillis(e);if(Lc.isDuration(e))return e;if(typeof e=="object")return Lc.fromObject(e);throw new Dd(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){const[n]=Z$e(e);return n?Lc.fromObject(n,r):Lc.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){const[n]=X$e(e);return n?Lc.fromObject(n,r):Lc.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new Dd("need to specify a reason the Duration is invalid");const n=e instanceof z1?e:new z1(e,r);if(nu.throwOnInvalid)throw new kPe(n);return new Lc({invalid:n})}static normalizeUnit(e){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new m0e(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){const n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Rh.create(this.loc,n).formatDurationFromString(this,e):Gte}toHuman(e={}){if(!this.isValid)return Gte;const r=W3.map(n=>{const i=this.values[n];return Rs(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=uY(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},vs.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?sme(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const r=Lc.fromDurationLike(e),n={};for(const i of W3)(_w(r.values,i)||_w(this.values,i))&&(n[i]=r.get(i)+this.get(i));return Hy(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const r=Lc.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;const r={};for(const n of Object.keys(this.values))r[n]=H0e(e(this.values[n],n));return Hy(this,{values:r},!0)}get(e){return this[Lc.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const r={...this.values,...fA(e,Lc.normalizeUnit)};return Hy(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:n};return Hy(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return qte(this.matrix,e),Hy(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=iOe(this.normalize().shiftToAll().toObject());return Hy(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Lc.normalizeUnit(o));const r={},n={},i=this.toObject();let s;for(const o of W3)if(e.indexOf(o)>=0){s=o;let a=0;for(const u in n)a+=this.matrix[u][o]*n[u],n[u]=0;n5(i[o])&&(a+=i[o]);const l=Math.trunc(a);r[o]=l,n[o]=(a*1e3-l*1e3)/1e3}else n5(i[o])&&(n[o]=i[o]);for(const o in n)n[o]!==0&&(r[s]+=o===s?n[o]:n[o]/this.matrix[s][o]);return qte(this.matrix,r),Hy(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return Hy(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(const n of W3)if(!r(this.values[n],e.values[n]))return!1;return!0}};const q9="Invalid Interval";function sOe(t,e){return!t||!t.isValid?Vl.invalid("missing or invalid start"):!e||!e.isValid?Vl.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?Vl.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];const r=e.map(D8).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),n=[];let{s:i}=this,s=0;for(;i+this.e?this.e:o;n.push(Vl.fromDateTimes(i,a)),i=a,s+=1}return n}splitBy(e){const r=Th.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,s;const o=[];for(;nl*i));s=+a>+this.e?this.e:a,o.push(Vl.fromDateTimes(n,s)),n=s,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const r=this.s>e.s?this.s:e.s,n=this.e=n?null:Vl.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;const r=this.se.e?this.e:e.e;return Vl.fromDateTimes(r,n)}static merge(e){const[r,n]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0;const i=[],s=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...s),a=o.sort((l,u)=>l.time-u.time);for(const l of a)n+=l.type==="s"?1:-1,n===1?r=l.time:(r&&+r!=+l.time&&i.push(Vl.fromDateTimes(r,l.time)),r=null);return Vl.merge(i)}difference(...e){return Vl.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:q9}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=cA,r={}){return this.isValid?Rh.create(this.s.loc.clone(r),e).formatInterval(this):q9}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:q9}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:q9}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:q9}toFormat(e,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:q9}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):Th.invalid(this.invalidReason)}mapEndpoints(e){return Vl.fromDateTimes(e(this.s),e(this.e))}}class PT{static hasDST(e=nu.defaultZone){const r=vs.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return Nf.isValidZone(e)}static normalizeZone(e){return Nv(e,nu.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||Cl.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||Cl.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||Cl.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Cl.create(r,n,s)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Cl.create(r,n,s)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Cl.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Cl.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Cl.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return Cl.create(r,null,"gregory").eras(e)}static features(){return{relative:j0e(),localeWeek:V0e()}}}function Wte(t,e){const r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(Th.fromMillis(n).as("days"))}function oOe(t,e,r){const n=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const d=Wte(l,u);return(d-d%7)/7}],["days",Wte]],i={},s=t;let o,a;for(const[l,u]of n)r.indexOf(l)>=0&&(o=l,i[l]=u(t,e),a=s.plus(i),a>e?(i[l]--,t=s.plus(i),t>e&&(a=t,i[l]--,t=s.plus(i))):t=a);return[t,i,a,o]}function aOe(t,e,r,n){let[i,s,o,a]=oOe(t,e,r);const l=e-i,u=r.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);u.length===0&&(o0?Th.fromMillis(l,n).shiftTo(...u).plus(d):d}const fY={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Zte={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lOe=fY.hanidec.replace(/[\[|\]]/g,"").split("");function uOe(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r=s&&n<=o&&(e+=n-s)}}return parseInt(e,10)}else return e}function p1({numberingSystem:t},e=""){return new RegExp(`${fY[t||"latn"]}${e}`)}const cOe="missing Intl.DateTimeFormat.formatToParts support";function Wo(t,e=r=>r){return{regex:t,deser:([r])=>e(uOe(r))}}const hOe=" ",ome=`[ ${hOe}]`,ame=new RegExp(ome,"g");function dOe(t){return t.replace(/\./g,"\\.?").replace(ame,ome)}function Yte(t){return t.replace(/\./g,"").replace(ame," ").toLowerCase()}function m1(t,e){return t===null?null:{regex:RegExp(t.map(dOe).join("|")),deser:([r])=>t.findIndex(n=>Yte(r)===Yte(n))+e}}function Xte(t,e){return{regex:t,deser:([,r,n])=>z$(r,n),groups:e}}function $T(t){return{regex:t,deser:([e])=>e}}function fOe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function pOe(t,e){const r=p1(e),n=p1(e,"{2}"),i=p1(e,"{3}"),s=p1(e,"{4}"),o=p1(e,"{6}"),a=p1(e,"{1,2}"),l=p1(e,"{1,3}"),u=p1(e,"{1,6}"),d=p1(e,"{1,9}"),f=p1(e,"{2,4}"),m=p1(e,"{4,6}"),v=O=>({regex:RegExp(fOe(O.val)),deser:([I])=>I,literal:!0}),M=(O=>{if(t.literal)return v(O);switch(O.val){case"G":return m1(e.eras("short"),0);case"GG":return m1(e.eras("long"),0);case"y":return Wo(u);case"yy":return Wo(f,bV);case"yyyy":return Wo(s);case"yyyyy":return Wo(m);case"yyyyyy":return Wo(o);case"M":return Wo(a);case"MM":return Wo(n);case"MMM":return m1(e.months("short",!0),1);case"MMMM":return m1(e.months("long",!0),1);case"L":return Wo(a);case"LL":return Wo(n);case"LLL":return m1(e.months("short",!1),1);case"LLLL":return m1(e.months("long",!1),1);case"d":return Wo(a);case"dd":return Wo(n);case"o":return Wo(l);case"ooo":return Wo(i);case"HH":return Wo(n);case"H":return Wo(a);case"hh":return Wo(n);case"h":return Wo(a);case"mm":return Wo(n);case"m":return Wo(a);case"q":return Wo(a);case"qq":return Wo(n);case"s":return Wo(a);case"ss":return Wo(n);case"S":return Wo(l);case"SSS":return Wo(i);case"u":return $T(d);case"uu":return $T(a);case"uuu":return Wo(r);case"a":return m1(e.meridiems(),0);case"kkkk":return Wo(s);case"kk":return Wo(f,bV);case"W":return Wo(a);case"WW":return Wo(n);case"E":case"c":return Wo(r);case"EEE":return m1(e.weekdays("short",!1),1);case"EEEE":return m1(e.weekdays("long",!1),1);case"ccc":return m1(e.weekdays("short",!0),1);case"cccc":return m1(e.weekdays("long",!0),1);case"Z":case"ZZ":return Xte(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return Xte(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return $T(/[a-z_+-/]{1,256}?/i);case" ":return $T(/[^\S\n\r]/);default:return v(O)}})(t)||{invalidReason:cOe};return M.token=t,M}const mOe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function gOe(t,e,r){const{type:n,value:i}=t;if(n==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const s=e[n];let o=n;n==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=r.hour12?"hour12":"hour24");let a=mOe[o];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function yOe(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function vOe(t,e,r){const n=t.match(e);if(n){const i={};let s=1;for(const o in r)if(_w(r,o)){const a=r[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(s,s+l))),s+=l}return[n,i]}else return[n,{}]}function _Oe(t){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,n;return Rs(t.z)||(r=Nf.create(t.z)),Rs(t.Z)||(r||(r=new Dc(t.Z)),n=t.Z),Rs(t.q)||(t.M=(t.q-1)*3+1),Rs(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Rs(t.u)||(t.S=lY(t.u)),[Object.keys(t).reduce((s,o)=>{const a=e(o);return a&&(s[a]=t[o]),s},{}),r,n]}let dF=null;function xOe(){return dF||(dF=vs.fromMillis(1555555555555)),dF}function wOe(t,e){if(t.literal)return t;const r=Rh.macroTokenToFormatOpts(t.val),n=cme(r,e);return n==null||n.includes(void 0)?t:n}function lme(t,e){return Array.prototype.concat(...t.map(r=>wOe(r,e)))}function ume(t,e,r){const n=lme(Rh.parseFormat(r),t),i=n.map(o=>pOe(o,t)),s=i.find(o=>o.invalidReason);if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[o,a]=yOe(i),l=RegExp(o,"i"),[u,d]=vOe(e,l,a),[f,m,v]=d?_Oe(d):[null,null,void 0];if(_w(d,"a")&&_w(d,"H"))throw new d4("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:l,rawMatches:u,matches:d,result:f,zone:m,specificOffset:v}}}function bOe(t,e,r){const{result:n,zone:i,specificOffset:s,invalidReason:o}=ume(t,e,r);return[n,i,s,o]}function cme(t,e){if(!t)return null;const n=Rh.create(e,t).dtFormatter(xOe()),i=n.formatToParts(),s=n.resolvedOptions();return i.map(o=>gOe(o,t,s))}const fF="Invalid DateTime",Jte=864e13;function OT(t){return new z1("unsupported zone",`the zone "${t.name}" is not supported`)}function pF(t){return t.weekData===null&&(t.weekData=hA(t.c)),t.weekData}function mF(t){return t.localWeekData===null&&(t.localWeekData=hA(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function K_(t,e){const r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new vs({...r,...e,old:r})}function hme(t,e,r){let n=t-e*60*1e3;const i=r.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;const s=r.offset(n);return i===s?[n,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function NT(t,e){t+=e*60*1e3;const r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function qR(t,e,r){return hme(F$(t),e,r)}function Kte(t,e){const r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:n,month:i,day:Math.min(t.c.day,dA(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Th.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=F$(s);let[l,u]=hme(a,r,t.zone);return o!==0&&(l+=o,u=t.zone.offset(l)),{ts:l,o:u}}function N8(t,e,r,n,i,s){const{setZone:o,zone:a}=r;if(t&&Object.keys(t).length!==0||e){const l=e||a,u=vs.fromObject(t,{...r,zone:l,specificOffset:s});return o?u:u.setZone(a)}else return vs.invalid(new z1("unparsable",`the input "${i}" can't be parsed as ${n}`))}function DT(t,e,r=!0){return t.isValid?Rh.create(Cl.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function gF(t,e){const r=t.c.year>9999||t.c.year<0;let n="";return r&&t.c.year>=0&&(n+="+"),n+=bu(t.c.year,r?6:4),e?(n+="-",n+=bu(t.c.month),n+="-",n+=bu(t.c.day)):(n+=bu(t.c.month),n+=bu(t.c.day)),n}function Qte(t,e,r,n,i,s){let o=bu(t.c.hour);return e?(o+=":",o+=bu(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!r)&&(o+=":")):o+=bu(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!r)&&(o+=bu(t.c.second),(t.c.millisecond!==0||!n)&&(o+=".",o+=bu(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!s?o+="Z":t.o<0?(o+="-",o+=bu(Math.trunc(-t.o/60)),o+=":",o+=bu(Math.trunc(-t.o%60))):(o+="+",o+=bu(Math.trunc(t.o/60)),o+=":",o+=bu(Math.trunc(t.o%60)))),s&&(o+="["+t.zone.ianaName+"]"),o}const dme={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},COe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},SOe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fme=["year","month","day","hour","minute","second","millisecond"],EOe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],MOe=["year","ordinal","hour","minute","second","millisecond"];function TOe(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new m0e(t);return e}function ere(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return TOe(t)}}function tre(t,e){const r=Nv(e.zone,nu.defaultZone),n=Cl.fromObject(e),i=nu.now();let s,o;if(Rs(t.year))s=i;else{for(const u of fme)Rs(t[u])&&(t[u]=dme[u]);const a=z0e(t)||B0e(t);if(a)return vs.invalid(a);const l=r.offset(i);[s,o]=qR(t,l,r)}return new vs({ts:s,zone:r,loc:n,o})}function rre(t,e,r){const n=Rs(r.round)?!0:r.round,i=(o,a)=>(o=uY(o,n||r.calendary?0:2,!0),e.loc.clone(r).relFormatter(r).format(o,a)),s=o=>r.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(r.unit)return i(s(r.unit),r.unit);for(const o of r.units){const a=s(o);if(Math.abs(a)>=1)return i(a,o)}return i(t>e?-0:0,r.units[r.units.length-1])}function nre(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}class vs{constructor(e){const r=e.zone||nu.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new z1("invalid input"):null)||(r.isValid?null:OT(r));this.ts=Rs(e.ts)?nu.now():e.ts;let i=null,s=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,s]=[e.old.c,e.old.o];else{const a=r.offset(this.ts);i=NT(this.ts,a),n=Number.isNaN(i.year)?new z1("invalid input"):null,i=n?null:i,s=n?null:a}this._zone=r,this.loc=e.loc||Cl.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new vs({})}static local(){const[e,r]=nre(arguments),[n,i,s,o,a,l,u]=r;return tre({year:n,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static utc(){const[e,r]=nre(arguments),[n,i,s,o,a,l,u]=r;return e.zone=Dc.utcInstance,tre({year:n,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static fromJSDate(e,r={}){const n=r$e(e)?e.valueOf():NaN;if(Number.isNaN(n))return vs.invalid("invalid input");const i=Nv(r.zone,nu.defaultZone);return i.isValid?new vs({ts:n,zone:i,loc:Cl.fromObject(r)}):vs.invalid(OT(i))}static fromMillis(e,r={}){if(n5(e))return e<-Jte||e>Jte?vs.invalid("Timestamp out of range"):new vs({ts:e,zone:Nv(r.zone,nu.defaultZone),loc:Cl.fromObject(r)});throw new Dd(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(n5(e))return new vs({ts:e*1e3,zone:Nv(r.zone,nu.defaultZone),loc:Cl.fromObject(r)});throw new Dd("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};const n=Nv(r.zone,nu.defaultZone);if(!n.isValid)return vs.invalid(OT(n));const i=Cl.fromObject(r),s=fA(e,ere),{minDaysInFirstWeek:o,startOfWeek:a}=Bte(s,i),l=nu.now(),u=Rs(r.specificOffset)?n.offset(l):r.specificOffset,d=!Rs(s.ordinal),f=!Rs(s.year),m=!Rs(s.month)||!Rs(s.day),v=f||m,b=s.weekYear||s.weekNumber;if((v||d)&&b)throw new d4("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(m&&d)throw new d4("Can't mix ordinal dates with month/day");const M=b||s.weekday&&!v;let O,I,A=NT(l,u);M?(O=EOe,I=COe,A=hA(A,o,a)):d?(O=MOe,I=SOe,A=hF(A)):(O=fme,I=dme);let j=!1;for(const fe of O){const ee=s[fe];Rs(ee)?j?s[fe]=I[fe]:s[fe]=A[fe]:j=!0}const H=M?QPe(s,o,a):d?e$e(s):z0e(s),W=H||B0e(s);if(W)return vs.invalid(W);const re=M?Fte(s,o,a):d?zte(s):s,[K,pe]=qR(re,u,n),ge=new vs({ts:K,zone:n,o:pe,loc:i});return s.weekday&&v&&e.weekday!==ge.weekday?vs.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${ge.toISO()}`):ge}static fromISO(e,r={}){const[n,i]=G$e(e);return N8(n,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){const[n,i]=q$e(e);return N8(n,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){const[n,i]=W$e(e);return N8(n,i,r,"HTTP",r)}static fromFormat(e,r,n={}){if(Rs(e)||Rs(r))throw new Dd("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,o=Cl.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[a,l,u,d]=bOe(o,e,r);return d?vs.invalid(d):N8(a,l,n,`format ${r}`,e,u)}static fromString(e,r,n={}){return vs.fromFormat(e,r,n)}static fromSQL(e,r={}){const[n,i]=eOe(e);return N8(n,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new Dd("need to specify a reason the DateTime is invalid");const n=e instanceof z1?e:new z1(e,r);if(nu.throwOnInvalid)throw new RPe(n);return new vs({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){const n=cme(e,Cl.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return lme(Rh.parseFormat(e),Cl.fromObject(r)).map(i=>i.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?pF(this).weekYear:NaN}get weekNumber(){return this.isValid?pF(this).weekNumber:NaN}get weekday(){return this.isValid?pF(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?mF(this).weekday:NaN}get localWeekNumber(){return this.isValid?mF(this).weekNumber:NaN}get localWeekYear(){return this.isValid?mF(this).weekYear:NaN}get ordinal(){return this.isValid?hF(this.c).ordinal:NaN}get monthShort(){return this.isValid?PT.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?PT.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?PT.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?PT.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,r=6e4,n=F$(this.c),i=this.zone.offset(n-e),s=this.zone.offset(n+e),o=this.zone.offset(n-i*r),a=this.zone.offset(n-s*r);if(o===a)return[this];const l=n-o*r,u=n-a*r,d=NT(l,o),f=NT(u,a);return d.hour===f.hour&&d.minute===f.minute&&d.second===f.second&&d.millisecond===f.millisecond?[K_(this,{ts:l}),K_(this,{ts:u})]:[this]}get isInLeapYear(){return US(this.year)}get daysInMonth(){return dA(this.year,this.month)}get daysInYear(){return this.isValid?$4(this.year):NaN}get weeksInWeekYear(){return this.isValid?kC(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?kC(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:r,numberingSystem:n,calendar:i}=Rh.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(Dc.instance(e),r)}toLocal(){return this.setZone(nu.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=Nv(e,nu.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||n){const s=e.offset(this.ts),o=this.toObject();[i]=qR(o,s,e)}return K_(this,{ts:i,zone:e})}else return vs.invalid(OT(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){const i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return K_(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const r=fA(e,ere),{minDaysInFirstWeek:n,startOfWeek:i}=Bte(r,this.loc),s=!Rs(r.weekYear)||!Rs(r.weekNumber)||!Rs(r.weekday),o=!Rs(r.ordinal),a=!Rs(r.year),l=!Rs(r.month)||!Rs(r.day),u=a||l,d=r.weekYear||r.weekNumber;if((u||o)&&d)throw new d4("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new d4("Can't mix ordinal dates with month/day");let f;s?f=Fte({...hA(this.c,n,i),...r},n,i):Rs(r.ordinal)?(f={...this.toObject(),...r},Rs(r.day)&&(f.day=Math.min(dA(f.year,f.month),f.day))):f=zte({...hF(this.c),...r});const[m,v]=qR(f,this.o,this.zone);return K_(this,{ts:m,o:v})}plus(e){if(!this.isValid)return this;const r=Th.fromDurationLike(e);return K_(this,Kte(this,r))}minus(e){if(!this.isValid)return this;const r=Th.fromDurationLike(e).negate();return K_(this,Kte(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;const n={},i=Th.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(r){const s=this.loc.getStartOfWeek(),{weekday:o}=this;othis.valueOf(),a=o?this:e,l=o?e:this,u=aOe(a,l,s,i);return o?u.negate():u}diffNow(e="milliseconds",r={}){return this.diff(vs.now(),e,r)}until(e){return this.isValid?Vl.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(r,n)<=i&&i<=s.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const r=e.base||vs.fromObject({},{zone:this.zone}),n=e.padding?thisr.valueOf(),Math.min)}static max(...e){if(!e.every(vs.isDateTime))throw new Dd("max requires all arguments be DateTimes");return jte(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){const{locale:i=null,numberingSystem:s=null}=n,o=Cl.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return ume(o,e,r)}static fromStringExplain(e,r,n={}){return vs.fromFormatExplain(e,r,n)}static get DATE_SHORT(){return cA}static get DATE_MED(){return g0e}static get DATE_MED_WITH_WEEKDAY(){return APe}static get DATE_FULL(){return y0e}static get DATE_HUGE(){return v0e}static get TIME_SIMPLE(){return _0e}static get TIME_WITH_SECONDS(){return x0e}static get TIME_WITH_SHORT_OFFSET(){return w0e}static get TIME_WITH_LONG_OFFSET(){return b0e}static get TIME_24_SIMPLE(){return C0e}static get TIME_24_WITH_SECONDS(){return S0e}static get TIME_24_WITH_SHORT_OFFSET(){return E0e}static get TIME_24_WITH_LONG_OFFSET(){return M0e}static get DATETIME_SHORT(){return T0e}static get DATETIME_SHORT_WITH_SECONDS(){return I0e}static get DATETIME_MED(){return R0e}static get DATETIME_MED_WITH_SECONDS(){return L0e}static get DATETIME_MED_WITH_WEEKDAY(){return PPe}static get DATETIME_FULL(){return k0e}static get DATETIME_FULL_WITH_SECONDS(){return A0e}static get DATETIME_HUGE(){return P0e}static get DATETIME_HUGE_WITH_SECONDS(){return $0e}}function D8(t){if(vs.isDateTime(t))return t;if(t&&t.valueOf&&n5(t.valueOf()))return vs.fromJSDate(t);if(t&&typeof t=="object")return vs.fromObject(t);throw new Dd(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const L2="system",AC="unknown",pA="UTC",IOe=Intl.DateTimeFormat().resolvedOptions().timeZone;function ROe(t){return"timeZoneIANA"in t}function LOe(t){return t.startsWith("UTC")}function mA(t,e=!1){return{json:{read:{source:t,reader:(r,n)=>n[t]?WR(n[t]):null},write:!!e&&{allowNull:!0,writer(r,n){n[t]=r?kOe(r):null}}}}}function WR(t,e=L2){return t?ROe(t)?t.timeZoneIANA:AOe(t,e):e}function kOe(t){return{timeZoneIANA:t}}function AOe(t,e=L2){if(!t||!Tte.has(t.timeZone))return e;const r=Tte.get(t.timeZone);return LOe(t.timeZone)||t.respectsDaylightSaving?r:POe(r)}function POe(t){const e=vs.local().setZone(t),r=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);return r===0?"Etc/UTC":`Etc/GMT${Dc.instance(-r).formatOffset(0,"narrow")}`}const E0={year:"numeric",month:"numeric",day:"numeric"},F8={year:"numeric",month:"long",day:"numeric"},z8={year:"numeric",month:"short",day:"numeric"},B8={year:"numeric",month:"long",weekday:"long",day:"numeric"},Rv={hour:"numeric",minute:"numeric"},l3={...Rv,second:"numeric"},pme={hourCycle:"h23"},j8={...Rv,...pme},V8={...l3,...pme},mme={"short-date":E0,"short-date-short-time":{...E0,...Rv},"short-date-short-time-24":{...E0,...j8},"short-date-long-time":{...E0,...l3},"short-date-long-time-24":{...E0,...V8},"short-date-le":E0,"short-date-le-short-time":{...E0,...Rv},"short-date-le-short-time-24":{...E0,...j8},"short-date-le-long-time":{...E0,...l3},"short-date-le-long-time-24":{...E0,...V8},"long-month-day-year":F8,"long-month-day-year-short-time":{...F8,...Rv},"long-month-day-year-short-time-24":{...F8,...j8},"long-month-day-year-long-time":{...F8,...l3},"long-month-day-year-long-time-24":{...F8,...V8},"day-short-month-year":z8,"day-short-month-year-short-time":{...z8,...Rv},"day-short-month-year-short-time-24":{...z8,...j8},"day-short-month-year-long-time":{...z8,...l3},"day-short-month-year-long-time-24":{...z8,...V8},"long-date":B8,"long-date-short-time":{...B8,...Rv},"long-date-short-time-24":{...B8,...j8},"long-date-long-time":{...B8,...l3},"long-date-long-time-24":{...B8,...V8},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":Rv,"long-time":l3},$Oe=Dh()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),OOe={ar:"ar-u-nu-latn-ca-gregory"};let CV=new WeakMap;const NOe=mme["short-date-short-time"];function DOe(t){let e=CV.get(t);if(!e){const r=im(),n=OOe[r]||r,i=pY(t.timeZone??L2),s={...t,timeZone:i};e=new Intl.DateTimeFormat(n,s),CV.set(t,e)}return e}function vTt(t){return mme[t]}function gA(t,e=NOe){return DOe(e).format(t)}function pY(t){switch(t){case L2:return IOe;case AC:return pA;default:return t}}sY(()=>{CV=new WeakMap});const FOe={ar:"ar-u-nu-latn"};let ZR=new WeakMap,gme={};function zOe(t){const e=t||gme;if(!ZR.has(e)){const r=im(),n=FOe[im()]||r;ZR.set(e,new Intl.NumberFormat(n,t))}return ZR.get(e)}function yA(t,e){return Object.is(t,-0)&&(t=0),zOe(e).format(t)}sY(()=>{ZR=new WeakMap,gme={}});const yme=()=>li.getLogger("esri.intl.substitute");function BOe(t,e,r={}){const{format:n={}}=r;return T$(t,i=>jOe(i,e,n))}function jOe(t,e,r){let n,i;const s=t.indexOf(":");if(s===-1?n=t.trim():(n=t.slice(0,s).trim(),i=t.slice(s+1).trim()),!n)return"";const o=Hv(n,e);if(o==null)return"";const a=(i?r==null?void 0:r[i]:null)??(r==null?void 0:r[n]);return a?VOe(o,a):i?UOe(o,i):mY(o)}function VOe(t,e){switch(e.type){case"date":return gA(t,e.intlOptions);case"number":return yA(t,e.intlOptions);default:return yme().warn("missing format descriptor for key {key}"),mY(t)}}function UOe(t,e){switch(e.toLowerCase()){case"dateformat":return gA(t);case"numberformat":return yA(t);default:return yme().warn(`inline format is unsupported since 4.12: ${e}`),/^(dateformat|datestring)/i.test(e)?gA(t):/^numberformat/i.test(e)?yA(t):mY(t)}}function mY(t){switch(typeof t){case"string":return t;case"number":return yA(t);case"boolean":return""+t;default:return t instanceof Date?gA(t):""}}const ire=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,HOe={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function sre(t){return t in HOe}const bb=[],N4=new Map;function ore(t){for(const e of N4.keys())vme(t.pattern,e)&&N4.delete(e)}function GOe(t){return bb.includes(t)||(ore(t),bb.unshift(t)),Hl(()=>{const e=bb.indexOf(t);e>-1&&(bb.splice(e,1),ore(t))})}async function qOe(t){const e=im();N4.has(t)||N4.set(t,ZOe(t,e));const r=N4.get(t);return r&&await YOe.add(r),r}function WOe(t){if(!ire.test(t))return null;const e=ire.exec(t);if(e===null)return null;const[,r,n]=e,i=r+(n?"-"+n.toUpperCase():"");return sre(i)?i:sre(r)?r:null}async function ZOe(t,e){const r=[];for(const n of bb)if(vme(n.pattern,t))try{return await n.fetchMessageBundle(t,e)}catch(i){r.push(i)}throw r.length?new Pr("intl:message-bundle-error",`Errors occurred while loading "${t}"`,{errors:r}):new Pr("intl:no-message-bundle-loader",`No loader found for message bundle "${t}"`)}function vme(t,e){return typeof t=="string"?e.startsWith(t):t.test(e)}sY(()=>{N4.clear()});const YOe=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(t){return this._increase(),t.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=Mp())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&this._numLoading===0&&(this._dfd.resolve(),this._dfd=null)}};async function XOe(t,e,r,n){const i=e.exec(r);if(!i)throw new Pr("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${e}"`);const s=i[1]?`${i[1]}/`:"",o=i[2],a=WOe(n),l=`${s}${o}.json`,u=a?`${s}${o}_${a}.json`:l;let d;try{d=await are(t(u))}catch(f){if(u===l)throw new Pr("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:f});try{d=await are(t(l))}catch(m){throw new Pr("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:m})}}return d}async function are(t){if(lre.fetchBundleAsset!=null)return lre.fetchBundleAsset(t);const e=await sa(t,{responseType:"text"});return JSON.parse(e.data)}let JOe=class{constructor({base:e="",pattern:r,location:n=new URL(window.location.href)}){let i;i=typeof n=="string"?s=>new URL(s,new URL(n,window.location.href)).href:n instanceof URL?s=>new URL(s,n).href:n,this.pattern=typeof r=="string"?new RegExp(`^${r}`):r,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,r){return XOe(this.getAssetUrl,this.matcher,e,r)}};function KOe(t){return new JOe(t)}const lre={};function qS(t){if(!Ao.assetsPath)throw li.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new Pr("assets:path-not-set","config.assetsPath is not set");return yw(Ao.assetsPath,t)}GOe(KOe({pattern:"esri/",location:qS}));function QOe(t){return typeof t=="string"?document.getElementById(t):t??null}var Lv;(function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"})(Lv||(Lv={}));let eNe=class{constructor(){this._resolver=Mp(),this._status=Lv.PENDING,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=Lv.RESOLVED,this._cleanUp()},()=>{this._status=Lv.REJECTED,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===Lv.RESOLVED}isRejected(){return this._status===Lv.REJECTED}isFulfilled(){return this._status!==Lv.PENDING}abort(){this._resolver.reject(Bc())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=Mp(),r=[...this._resolvingPromises,e.promise],n=this._allPromise=Promise.all(r);n.then(()=>{this.isFulfilled()||this._allPromise!==n||this._resolver.resolve()},i=>{this.isFulfilled()||this._allPromise!==n||i0(i)||this._resolver.reject(i)}),e.resolve()}};const gY=t=>{let e=class extends t{constructor(...r){super(...r),this._promiseProps=new eNe,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(r,n){return this._promiseProps.promise.then(()=>this).then(r,n)}catch(r){return this.when(null,r)}addResolvingPromise(r){r&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in r?r.when():r)}};return e=T([_t("esri.core.Promise")],e),e};let SV=class extends gY(Iu){};SV=T([_t("esri.core.Promise")],SV);function bTt(t,e,r){return VZ(t.map((n,i)=>e.apply(r,[n,i])))}async function CTt(t,e,r){return(await VZ(t.map((n,i)=>e.apply(r,[n,i])))).map(n=>n.value)}function yY(t){return{ok:!0,value:t}}function vY(t){return{ok:!1,error:t}}function tNe(t){return t!=null&&t.ok===!0?t.value:null}function rNe(t){return t!=null&&t.ok===!1?t.error:null}async function _me(t){if(t==null)return{ok:!1,error:new Error("no promise provided")};try{return yY(await t)}catch(e){return vY(e)}}async function nNe(t){try{return yY(await t)}catch(e){return q0(e),vY(e)}}function STt(t,e){return new cv(t,e)}let cv=class extends Iu{get value(){return tNe(this._result)}get error(){return rNe(this._result)}get finished(){return this._result!=null}constructor(e,r){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=i1e(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(i=>{this._result=yY(i),this._cleanup()},i=>{this._result=vY(i),this._cleanup()}),this._abortHandle=bp(r,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=H1(this._abortHandle),this._abortController=null}};T([B()],cv.prototype,"value",null),T([B()],cv.prototype,"error",null),T([B()],cv.prototype,"finished",null),T([B()],cv.prototype,"promise",void 0),T([B()],cv.prototype,"_result",void 0),cv=T([_t("esri.core.asyncUtils.ReactiveTask")],cv);var zo;(function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"})(zo||(zo={}));function xme(t){return(e,r)=>{e[r]=t}}let _Y=class extends c1e{notify(){const e=this._observers;if(e&&e.length>0){const r=e.slice();for(const n of r)n.onInvalidated(),n.onCommitted()}}};var kg;let iNe=class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},sNe=class{constructor(e,r,n,i,s){this.target=e,this.added=r,this.removed=n,this.start=i,this.deleteCount=s}};const np=new zS(iNe,void 0,t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1});function ure(t){t&&typeof t=="object"&&"destroy"in t&&typeof t.destroy=="function"&&t.destroy()}function yF(t){return t?t instanceof Mg?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function vF(t){if(t!=null&&t.length)return t[0]}function oNe(t,e,r,n){const i=Math.min(t.length-r,e.length-n);let s=0;for(;s{t.push(i),wme(t,r.call(n,i,s,o),r,n)})}const Gy=new Set,qy=new Set,Wy=new Set,_F=new Map;let aNe=0,Mg=kg=class extends Kw.EventedAccessor{static isCollection(t){return t!=null&&t instanceof kg}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _Y,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:aNe++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof kg?{items:t}:t:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return ds(this._observable),this._items}set items(t){this._emitBeforeChanges(zo.ADD)||(this._splice(0,this.length,yF(t)),this._emitAfterChanges(zo.ADD))}hasEventListener(t){return!this.destroyed&&(t==="change"?this._chgListeners.length>0:this._emitter.hasEventListener(t))}on(t,e){if(this.destroyed)return Hl();if(t==="change"){const r=this._chgListeners,n={removed:!1,callback:e};return r.push(n),this._notifications&&this._notifications.push({listeners:r.slice(),items:this._items.slice(),changes:[]}),Hl(()=>{n.removed=!0,r.splice(r.indexOf(n),1)})}return this._emitter.on(t,e)}once(t,e){const r="deref"in e?()=>e.deref():()=>e,n=this.on(t,i=>{var s;(s=r())==null||s.call(null,i),n.remove()});return n}add(t,e){if(ds(this._observable),this._emitBeforeChanges(zo.ADD))return this;const r=this.getNextIndex(e??null);return this._splice(r,0,[t]),this._emitAfterChanges(zo.ADD),this}addMany(t,e=this._items.length){if(ds(this._observable),!(t!=null&&t.length))return this;if(this._emitBeforeChanges(zo.ADD))return this;const r=this.getNextIndex(e);return this._splice(r,0,yF(t)),this._emitAfterChanges(zo.ADD),this}at(t){if(ds(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if(ds(this._observable),!this.length||this._emitBeforeChanges(zo.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(zo.REMOVE),t}_removeAllRaw(){return this.length===0?[]:this._splice(0,this.length)||[]}clone(){return ds(this._observable),this._createNewInstance({items:this._items.map(Qt)})}concat(...t){ds(this._observable);const e=t.map(yF);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if(ds(this._observable),!this.length||this._emitBeforeChanges(zo.REMOVE))return;const r=this._splice(0,this.length),n=r.length;for(let i=0;ie&&(t=e),t}includes(t,e=0){return ds(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return ds(this._observable),this._items.indexOf(t,e)}join(t=","){return ds(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return ds(this._observable),this._items.lastIndexOf(t,e)}map(t,e){ds(this._observable);const r=this._items.map(t,e);return new kg({items:r})}reorder(t,e=this.length-1){ds(this._observable);const r=this.indexOf(t);if(r!==-1){if(e<0?e=0:e>=this.length&&(e=this.length-1),r!==e){if(this._emitBeforeChanges(zo.MOVE))return t;this._splice(r,1),this._splice(e,0,[t]),this._emitAfterChanges(zo.MOVE)}return t}}pop(){if(ds(this._observable),!this.length||this._emitBeforeChanges(zo.REMOVE))return;const t=vF(this._splice(this.length-1,1));return this._emitAfterChanges(zo.REMOVE),t}push(...t){return ds(this._observable),this._emitBeforeChanges(zo.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(zo.ADD)),this.length}reduce(t,e){ds(this._observable);const r=this._items;return arguments.length===2?r.reduce(t,e):r.reduce(t)}reduceRight(t,e){ds(this._observable);const r=this._items;return arguments.length===2?r.reduceRight(t,e):r.reduceRight(t)}remove(t){return ds(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if(ds(this._observable),t<0||t>=this.length||this._emitBeforeChanges(zo.REMOVE))return;const e=vF(this._splice(t,1));return this._emitAfterChanges(zo.REMOVE),e}removeMany(t){if(ds(this._observable),!(t!=null&&t.length)||this._emitBeforeChanges(zo.REMOVE))return[];const e=t instanceof kg?t.toArray():t,r=this._items,n=[],i=e.length;for(let s=0;s-1){const l=1+oNe(e,r,s+1,a+1),u=this._splice(a,l);u&&u.length>0&&n.push.apply(n,u),s+=l-1}}return this._emitAfterChanges(zo.REMOVE),n}reverse(){if(ds(this._observable),this._emitBeforeChanges(zo.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(zo.MOVE),this}shift(){if(ds(this._observable),!this.length||this._emitBeforeChanges(zo.REMOVE))return;const t=vF(this._splice(0,1));return this._emitAfterChanges(zo.REMOVE),t}slice(t=0,e=this.length){return ds(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return ds(this._observable),this._items.some(t,e)}sort(t){if(ds(this._observable),!this.length||this._emitBeforeChanges(zo.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(zo.MOVE),this}splice(t,e,...r){ds(this._observable);const n=(e?zo.REMOVE:0)|(r.length?zo.ADD:0);if(this._emitBeforeChanges(n))return[];const i=this._splice(t,e,r)||[];return this._emitAfterChanges(n),i}toArray(){return ds(this._observable),this._items.slice()}toJSON(){return ds(this._observable),this.toArray()}toLocaleString(){return ds(this._observable),this._items.toLocaleString()}toString(){return ds(this._observable),this._items.toString()}unshift(...t){return ds(this._observable),!t.length||this._emitBeforeChanges(zo.ADD)||(this._splice(0,0,t),this._emitAfterChanges(zo.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,r){const n=this._items,i=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=HZ(()=>this._dispatchChange())),t<0&&(t+=this.length),e){if(o=n.splice(t,e),this.hasEventListener("before-remove")){const a=np.acquire();a.target=this,a.cancellable=!0;for(let l=0,u=o.length;l{n.push(l)});const i=G0.acquire();qy.forEach(l=>{i.push(l)});const s=this._items,o=e.items,a=G0.acquire();if(Wy.forEach(l=>{o.indexOf(l)!==s.indexOf(l)&&a.push(l)}),e.listeners&&(n.length||i.length||a.length)){const l={target:this,added:n,removed:i,moved:a},u=e.listeners.length;for(let d=0;d{if(!t)return kg;if(_F.has(t))return _F.get(t);let e=null;if(typeof t=="function")e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const n in t.typeMap){const i=t.typeMap[n].prototype.declaredClass;e?e+=` | ${i}`:e=i}let r=class extends kg{};return T([xme({Type:t,ensureType:typeof t=="function"?gc(t):um(t)})],r.prototype,"itemType",void 0),r=T([_t(`esri.core.Collection<${e}>`)],r),_F.set(t,r),r},T([B()],Mg.prototype,"_updating",void 0),T([B()],Mg.prototype,"length",void 0),T([B()],Mg.prototype,"items",null),T([B({readOnly:!0})],Mg.prototype,"updating",null),Mg=kg=T([_t("esri.core.Collection")],Mg);const $o=Mg;function d2(t,e,r={}){return xY(t,e,r,bme)}function EV(t,e,r={}){return xY(t,e,r,Cme)}function xY(t,e,r={},n){let i=null;const s=r.once?(o,a)=>{n(o)&&(H1(i),e(o,a))}:(o,a)=>{n(o)&&e(o,a)};if(i=Fke(t,s,r.sync,r.equals),r.initial){const o=t();s(o,o)}return i}function lNe(t,e,r,n={}){let i=null,s=null,o=null;function a(){var d;i&&s&&(s.remove(),(d=n.onListenerRemove)==null||d.call(n,i),i=null,s=null)}function l(d){n.once&&n.once&&H1(o),r(d)}const u=d2(t,(d,f)=>{var m;a(),R$(d)&&(i=d,s=r5(d,e,l),(m=n.onListenerAdd)==null||m.call(n,d))},{sync:n.sync,initial:!0});return o=Hl(()=>{u.remove(),a()}),o}function RTt(t,e){return uNe(t,Cme,e)}function uNe(t,e,r){if(sy(r))return Promise.reject(Bc());const n=t();if(e!=null&&e(n))return Promise.resolve(n);let i=null;function s(){i=H1(i)}return new Promise((o,a)=>{i=NS([bp(r,()=>{s(),a(Bc())}),xY(t,l=>{s(),o(l)},{sync:!1,once:!0},e??bme)])})}function bme(t){return!0}function Cme(t){return!!t}const Sme={sync:!0},LTt={initial:!0},Eme={sync:!0,initial:!0},cNe="randomUUID"in crypto;function wY(){if(cNe)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=r=>t[r].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function kTt(){return`{${wY().toUpperCase()}}`}function hNe(){return`{${wY()}}`}const dNe=Object.prototype.toString;function fNe(t){const e="__accessorMetadata__"in t?gc(t):t;return function(...r){if(r.push(e),typeof r[2]=="number")throw new Error("Using @cast has parameter decorator is not supported since 4.16");return pNe.apply(this,r)}}function pNe(t,e,r,n){I$(t,e).cast=n}function mNe(t){return(e,r)=>{I$(e,t).cast=e[r]}}function Pl(...t){if(t.length!==3||typeof t[1]!="string")return t.length===1&&dNe.call(t[0])==="[object Function]"?fNe(t[0]):t.length===1&&typeof t[0]=="string"?mNe(t[0]):void 0}/*! + * @esri/arcgis-html-sanitizer - v4.0.3 - Wed Jul 03 2024 17:50:35 GMT-0400 (Eastern Daylight Time) + * Copyright (c) 2024 - Environmental Systems Research Institute, Inc. + * Apache-2.0 + * + * js-xss + * Copyright (c) 2012-2018 Zongmin Lei(雷宗民) + * http://ucdok.com + * MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var vA=function(){return vA=Object.assign||function(e){for(var r,n=1,i=arguments.length;n/g,ONe=/"/g,NNe=/"/g,DNe=/&#([a-zA-Z0-9]*);?/gim,FNe=/:?/gim,zNe=/&newline;?/gim,zT=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,hre=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,dre=/u\s*r\s*l\s*\(.*/gi;function kme(t){return t.replace(ONe,""")}function Ame(t){return t.replace(NNe,'"')}function Pme(t){return t.replace(DNe,function(r,n){return n[0]==="x"||n[0]==="X"?String.fromCharCode(parseInt(n.substr(1),16)):String.fromCharCode(parseInt(n,10))})}function $me(t){return t.replace(FNe,":").replace(zNe," ")}function Ome(t){for(var e="",r=0,n=t.length;r",n);if(i===-1)break;r=i+3}return e}function UNe(t){var e=t.split("");return e=e.filter(function(r){var n=r.charCodeAt(0);return n===127?!1:n<=31?n===10||n===13:!0}),e.join("")}Ol.whiteList=Ime();Ol.getDefaultWhiteList=Ime;Ol.onTag=INe;Ol.onIgnoreTag=RNe;Ol.onTagAttr=LNe;Ol.onIgnoreTagAttr=kNe;Ol.safeAttrValue=ANe;Ol.escapeHtml=Lme;Ol.escapeQuote=kme;Ol.unescapeQuote=Ame;Ol.escapeHtmlEntities=Pme;Ol.escapeDangerHtml5Entities=$me;Ol.clearNonPrintableCharacter=Ome;Ol.friendlyAttrValue=Nme;Ol.escapeAttrValue=Dme;Ol.onIgnoreTagStripAll=BNe;Ol.StripTagBody=jNe;Ol.stripCommentTag=VNe;Ol.stripBlankChar=UNe;Ol.cssFilter=Rme;Ol.getDefaultCSSWhiteList=TNe;var j$={},kv=CY;function HNe(t){var e=kv.spaceIndex(t),r;return e===-1?r=t.slice(1,-1):r=t.slice(1,e+1),r=kv.trim(r).toLowerCase(),r.slice(0,1)==="/"&&(r=r.slice(1)),r.slice(-1)==="/"&&(r=r.slice(0,-1)),r}function GNe(t){return t.slice(0,2)===""){n+=r(t.slice(i,s)),d=t.slice(s,a+1),u=HNe(d),n+=e(s,n.length,u,d,GNe(d)),i=a+1,s=!1;continue}if(f==='"'||f==="'")for(var m=1,v=t.charAt(a-m);v.trim()===""||v==="=";){if(v==="="){o=f;continue e}v=t.charAt(a-++m)}}else if(f===o){o=!1;continue}}return i0;e--){var r=t[e];if(r!==" ")return r==="="?e:-1}}function KNe(t){return t[0]==='"'&&t[t.length-1]==='"'||t[0]==="'"&&t[t.length-1]==="'"}function fre(t){return KNe(t)?t.substr(1,t.length-2):t}j$.parseTag=qNe;j$.parseAttr=ZNe;var QNe=bY.FilterCSS,k1=Ol,Fme=j$,eDe=Fme.parseTag,tDe=Fme.parseAttr,YR=CY;function BT(t){return t==null}function rDe(t){var e=YR.spaceIndex(t);if(e===-1)return{html:"",closing:t[t.length-2]==="/"};t=YR.trim(t.slice(e+1,-1));var r=t[t.length-1]==="/";return r&&(t=YR.trim(t.slice(0,-1))),{html:t,closing:r}}function nDe(t){var e={};for(var r in t)e[r]=t[r];return e}function iDe(t){var e={};for(var r in t)Array.isArray(t[r])?e[r.toLowerCase()]=t[r].map(function(n){return n.toLowerCase()}):e[r.toLowerCase()]=t[r];return e}function zme(t){t=nDe(t||{}),t.stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=k1.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=iDe(t.whiteList||t.allowList):t.whiteList=k1.whiteList,t.onTag=t.onTag||k1.onTag,t.onTagAttr=t.onTagAttr||k1.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||k1.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||k1.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||k1.safeAttrValue,t.escapeHtml=t.escapeHtml||k1.escapeHtml,this.options=t,t.css===!1?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new QNe(t.css))}zme.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,r=e.options,n=r.whiteList,i=r.onTag,s=r.onIgnoreTag,o=r.onTagAttr,a=r.onIgnoreTagAttr,l=r.safeAttrValue,u=r.escapeHtml,d=e.cssFilter;r.stripBlankChar&&(t=k1.stripBlankChar(t)),r.allowCommentTag||(t=k1.stripCommentTag(t));var f=!1;r.stripIgnoreTagBody&&(f=k1.StripTagBody(r.stripIgnoreTagBody,s),s=f.onIgnoreTag);var m=eDe(t,function(v,b,M,O,I){var A={sourcePosition:v,position:b,isClosing:I,isWhite:Object.prototype.hasOwnProperty.call(n,M)},j=i(M,O,A);if(!BT(j))return j;if(A.isWhite){if(A.isClosing)return"";var H=rDe(O),W=n[M],re=tDe(H.html,function(K,pe){var ge=YR.indexOf(W,K)!==-1,fe=o(M,K,pe,ge);return BT(fe)?ge?(pe=l(M,K,pe,d),pe?K+'="'+pe+'"':K):(fe=a(M,K,pe,ge),BT(fe)?void 0:fe):fe});return O="<"+M,re&&(O+=" "+re),H.closing&&(O+=" /"),O+=">",O}else return j=s(M,O,A),BT(j)?u(O):j},u);return f&&(m=f.remove(m)),m};var sDe=zme;(function(t,e){var r=Ol,n=j$,i=sDe;function s(a,l){var u=new i(l);return u.process(a)}e=t.exports=s,e.filterXSS=s,e.FilterXSS=i,function(){for(var a in r)e[a]=r[a];for(var l in n)e[l]=n[l]}();function o(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=t.exports)})(MV,MV.exports);var W9=MV.exports,oDe=function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},aDe=function(){function t(e,r){var n=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],details:["style"],div:["align","style","aria-label","aria-hidden"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=vA(vA({},W9.getDefaultCSSWhiteList()),{flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,"line-height":!0,"justify-content":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(s,o,a,l){return s==="a"&&o==="href"||(s==="img"||s==="source")&&o==="src"?n.sanitizeUrl(a):W9.safeAttrValue(s,o,a,l)}},this._entityMap={"&":"8","<":"<",">":">",'"':""","'":"'","/":"/"};var i;e&&!r?i=e:e&&r?(i=Object.create(this.arcgisFilterOptions),i.css={whiteList:this.arcgisCSSWhiteList},Object.keys(e).forEach(function(s){if(s==="whiteList")i.whiteList=n._extendObjectOfArrays([n.arcgisWhiteList,e.whiteList||{}]);else if(s==="css"){var o=e.css.whiteList;o!=null&&e.css instanceof Object&&Object.keys(o).forEach(function(a){return i.css.whiteList[a]=o[a]})}else i[s]=e[s]})):(i=Object.create(this.arcgisFilterOptions),i.whiteList=this.arcgisWhiteList,i.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=i,this._xssFilter=new W9.FilterXSS(i)}return t.prototype.sanitize=function(e,r){switch(r===void 0&&(r={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,r);default:return r.allowUndefined&&typeof e>"u"?void 0:null}},t.prototype.sanitizeUrl=function(e,r){var n=(r??{}).isProtocolRequired,i=n===void 0?!0:n,s=this._trim(e.substring(0,e.indexOf(":"))),o=e==="/",a=/^#/.test(e),l=s&&this.allowedProtocols.indexOf(s.toLowerCase())>-1;return o||a||l?W9.escapeAttrValue(e):!s&&!i?W9.escapeAttrValue("https://".concat(e)):""},t.prototype.sanitizeHTMLAttribute=function(e,r,n,i){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(e,r,n,i):W9.safeAttrValue(e,r,n,i)},t.prototype.validate=function(e,r){r===void 0&&(r={});var n=this.sanitize(e,r);return{isValid:e===n,sanitized:n}},t.prototype.encodeHTML=function(e){var r=this;return String(e).replace(/[&<>"'\/]/g,function(n){return r._entityMap[n]})},t.prototype.encodeAttrValue=function(e){var r=/^[a-zA-Z0-9]$/;return String(e).replace(/[\x00-\xFF]/g,function(n,i){return r.test(n)?n:"&#x".concat(Number(e.charCodeAt(i)).toString(16),";")})},t.prototype._extendObjectOfArrays=function(e){var r={};return e.forEach(function(n){Object.keys(n).forEach(function(i){Array.isArray(n[i])&&Array.isArray(r[i])?r[i]=r[i].concat(n[i]):r[i]=n[i]})}),r},t.prototype._iterateOverObject=function(e,r){var n=this;r===void 0&&(r={});try{var i=!1,s=void 0;if(Array.isArray(e))s=e.reduce(function(a,l){var u=n.validate(l,r);return u.isValid?a.concat([l]):(i=!0,a.concat([u.sanitized]))},[]);else if(oDe(e)){var o=Object.keys(e);s=o.reduce(function(a,l){var u=e[l],d=n.validate(u,r);return d.isValid?a[l]=u:(i=!0,a[l]=d.sanitized),a},{})}else return r.allowUndefined&&typeof e>"u"?void 0:null;return i?s:e}catch{return null}},t.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},t}();const V$=new Map;function Bme(){V$.clear()}function lDe(t){return V$.get(t)}function uDe(t,e){V$.set(t,e)}function xF(t){V$.delete(t)}function cDe(...t){const e=G0.acquire();for(let n=0;n{const t=new Map,e=new ResizeObserver(n=>{var i;Bme();for(const s of n)(i=t.get(s.target))==null||i(s)}),r=(n,i,s)=>(t.set(n,i),e.observe(n,s),Hl(()=>{e.unobserve(n),t.delete(n)}));return(n,i,s)=>{let o=null;return NS([d2(()=>typeof n=="function"?n():n,a=>{o==null||o.remove(),a&&(o=r(a,i,s))},Eme),Hl(()=>o==null?void 0:o.remove())])}})();const hDe=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"],dDe=hDe.reduce((t,e)=>(t[e]=[],t),{}),fDe=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],jme=new aDe({whiteList:dDe,onTagAttr:(t,e,r)=>{const n=`${e}="${r}"`;if(fDe.includes(e))return n},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),Vme="http://www.w3.org/",U$=`${Vme}2000/svg`,Ume=`${Vme}1999/xlink`;let pre=[],SY=(t,e)=>{let r={};return Object.keys(t).forEach(n=>{r[n]=t[n]}),e&&Object.keys(e).forEach(n=>{r[n]=e[n]}),r},EY=(t,e)=>t.vnodeSelector===e.vnodeSelector&&(t.properties&&e.properties?t.properties.key===e.properties.key&&t.properties.bind===e.properties.bind:!t.properties&&!e.properties),Hme=t=>{if(typeof t!="string")throw new Error("Style values must be strings")},pDe=(t,e,r)=>{if(e.vnodeSelector!==""){for(let n=r;n{let i=t[e];if(i.vnodeSelector==="")return;let s=i.properties;if(!(s&&(s.key===void 0?s.bind:s.key))){for(let o=0;o{if(t.properties){let e=t.properties.enterAnimation;e&&e(t.domNode,t.properties)}},IV=[],RV=!1,Gme=t=>{(t.children||[]).forEach(Gme),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},mre=()=>{RV=!1,IV.forEach(Gme),IV.length=0},gre=t=>{IV.push(t),RV||(RV=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(mre,{timeout:16}):setTimeout(mre,16))},yre=t=>{let e=t.domNode;if(t.properties){let r=t.properties.exitAnimation;if(r)return e.style.pointerEvents="none",void r(e,()=>{e.parentNode&&(e.parentNode.removeChild(e),gre(t))},t.properties)}e.parentNode&&(e.parentNode.removeChild(e),gre(t))},gDe=(t,e,r)=>{if(!e)return;let n=r.eventHandlerInterceptor,i=Object.keys(e),s=i.length;for(let o=0;o{if(e)for(let n of e)f4(n,t,void 0,r)},qme=(t,e,r)=>{yDe(t,e.children,r),e.text&&(t.textContent=e.text),gDe(t,e.properties,r),e.properties&&e.properties.afterCreate&&e.properties.afterCreate.apply(e.properties.bind||e.properties,[t,r,e.vnodeSelector,e.properties,e.children])},f4=(t,e,r,n)=>{let i,s=0,o=t.vnodeSelector,a=e.ownerDocument;if(o==="")i=t.domNode=a.createTextNode(t.text),r!==void 0?e.insertBefore(i,r):e.appendChild(i);else{for(let l=0;l<=o.length;++l){let u=o.charAt(l);if(l===o.length||u==="."||u==="#"){let d=o.charAt(s-1),f=o.slice(s,l);d==="."?i.classList.add(f):d==="#"?i.id=f:(f==="svg"&&(n=SY(n,{namespace:U$})),n.namespace!==void 0?i=t.domNode=a.createElementNS(n.namespace,f):(i=t.domNode=t.domNode||a.createElement(f),f==="input"&&t.properties&&t.properties.type!==void 0&&i.setAttribute("type",t.properties.type)),r!==void 0?e.insertBefore(i,r):i.parentNode!==e&&e.appendChild(i)),s=l+1}}qme(i,t,n)}},kV=(t,e,r)=>{e&&e.split(" ").forEach(n=>{n&&t.classList.toggle(n,r)})},vDe=(t,e,r,n)=>{if(!r)return;let i=!1,s=Object.keys(r),o=s.length;for(let a=0;a{if(r===n)return!1;n=n||pre;let s,o=(r=r||pre).length,a=n.length,l=0,u=0,d=!1;for(;u=0){for(s=l;sl)for(s=l;s{let n=t.domNode,i=!1;if(t===e)return!1;let s=!1;if(e.vnodeSelector===""){if(e.text!==t.text){let o=n.ownerDocument.createTextNode(e.text);return n.parentNode.replaceChild(o,n),e.domNode=o,i=!0,i}e.domNode=n}else e.vnodeSelector.lastIndexOf("svg",0)===0&&(r=SY(r,{namespace:U$})),t.text!==e.text&&(s=!0,e.text===void 0?n.removeChild(n.firstChild):n.textContent=e.text),e.domNode=n,s=_De(e,n,t.children,e.children,r)||s,s=vDe(n,t.properties,e.properties,r)||s,e.properties&&e.properties.afterUpdate&&e.properties.afterUpdate.apply(e.properties.bind||e.properties,[n,r,e.vnodeSelector,e.properties,e.children]);return s&&e.properties&&e.properties.updateAnimation&&e.properties.updateAnimation(n,e.properties,t.properties),i};let H8=(t,e)=>({getLastRender:()=>t,update:r=>{if(t.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let n=t;t=r,xA(n,r,e)},domNode:t.domNode});const xDe={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(t,e,r)=>{e.charAt(0)==="-"?t.style.setProperty(e,r):t.style[e]=r}};let G8=t=>SY(xDe,t),jT={create:(t,e)=>(e=G8(e),f4(t,document.createElement("div"),void 0,e),H8(t,e)),append:(t,e,r)=>(r=G8(r),f4(e,t,void 0,r),H8(e,r)),insertBefore:(t,e,r)=>(r=G8(r),f4(e,t.parentNode,t,r),H8(e,r)),merge:(t,e,r)=>(r=G8(r),e.domNode=t,qme(t,e,r),H8(e,r)),replace:(t,e,r)=>(r=G8(r),f4(e,t.parentNode,t,r),t.parentNode.removeChild(t),H8(e,r))};const wDe={handleInterceptedEvent:(t,e,r,n)=>(t.scheduleRender(),e.properties[`on${n.type}`].apply(e.properties.bind||r,[n]))},bDe={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(t,e,r)=>{e.charAt(0)==="-"?t.style.setProperty(e,r):t.style[e]=r}},CDe=t=>({...bDe,...t}),SDe=(t,e)=>{const r=[];for(;t&&t!==e;)r.push(t),t=t.parentNode;return r},EDe=(t,e)=>t.find(e),vre=(t,e,r=!1)=>{let n=t;return e.forEach((i,s)=>{const o=n!=null&&n.children?EDe(n.children,a=>a.domNode===i):void 0;r&&!o&&s!==e.length-1||(n=o)}),n},MDe=t=>{let e;const r={...wDe,...t},n=CDe(r),i=n.performanceLogger;let s,o=!0,a=!1;const l=[],u=[],d=(m,v,b)=>{var I;let M;n.eventHandlerInterceptor=(A,j,H,W)=>function(re){let K;i("domEvent",re);const pe=SDe(re.currentTarget,M.domNode),ge=pe.some(ee=>{var be;return customElements.get((be=ee==null?void 0:ee.tagName)==null?void 0:be.toLowerCase())});if(re.eventPhase===Event.CAPTURING_PHASE||!ge)pe.reverse(),K=vre(M.getLastRender(),pe);else{const ee=re.composedPath(),be=ee.slice(ee.indexOf(re.currentTarget),ee.indexOf(M.domNode)).reverse();K=vre(M.getLastRender(),be,!0)}let fe;return K&&(fe=r.handleInterceptedEvent(e,K,this,re)),i("domEventProcessed",re),fe},(I=r.postProcessProjectionOptions)==null||I.call(r,n);const O=b();M=m(v,O,n),n.eventHandlerInterceptor=void 0,l.push(M),u.push(b),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(M,O)};let f=()=>{if(s=void 0,o){o=!1,i("renderStart",void 0);for(let m=0;m{s||a||(s=requestAnimationFrame(f))},stop:()=>{s&&(cancelAnimationFrame(s),s=void 0),a=!0},resume:()=>{a=!1,o=!0,e.scheduleRender()},append:(m,v)=>{d(jT.append,m,v)},insertBefore:(m,v)=>{d(jT.insertBefore,m,v)},merge:(m,v)=>{d(jT.merge,m,v)},replace:(m,v)=>{d(jT.replace,m,v)},detach:m=>{for(let v=0;v{for(var r in e)IDe(t,r,{get:e[r],enumerable:!0})},Yme=new WeakMap,H5=t=>Yme.get(t),LDe=(t,e)=>{const r={$flags$:0,$hostElement$:t,$cmpMeta$:e,$instanceValues$:new Map};return Yme.set(t,r)},_re=(t,e)=>e in t,WS=(t,e)=>(0,console.error)(t,e),wA=new Map,kDe=[],ADe="slot-fb{display:contents}slot-fb[hidden]{display:none}",xre="http://www.w3.org/1999/xlink",ZS=typeof window<"u"?window:{},G1=ZS.document||{head:{}},PTt=ZS.HTMLElement||class{},yc={$flags$:0,$resourcesUrl$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,r,n)=>t.addEventListener(e,r,n),rel:(t,e,r,n)=>t.removeEventListener(e,r,n),ce:(t,e)=>new CustomEvent(t,e)},PDe=(()=>{let t=!1;try{G1.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch{}return t})(),$De=t=>Promise.resolve(t),ODe=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),AV=!1,PV=[],Xme=[],Jme=(t,e)=>r=>{t.push(r),AV||(AV=!0,e&&yc.$flags$&4?NDe($V):yc.raf($V))},wre=t=>{for(let e=0;e{wre(PV),wre(Xme),(AV=PV.length>0)&&yc.raf($V)},NDe=t=>$De().then(t),$Tt=Jme(PV,!1),DDe=Jme(Xme,!0),FDe=t=>{const e=new URL(t,yc.$resourcesUrl$);return e.origin!==ZS.location.origin?e.href:e.pathname},zDe=t=>yc.$resourcesUrl$=t,bre={},BDe="http://www.w3.org/2000/svg",jDe="http://www.w3.org/1999/xhtml",VDe=t=>t!=null,MY=t=>(t=typeof t,t==="object"||t==="function");function UDe(t){var e,r,n;return(n=(r=(e=t.head)==null?void 0:e.querySelector('meta[name="csp-nonce"]'))==null?void 0:r.getAttribute("content"))!=null?n:void 0}var HDe={};RDe(HDe,{err:()=>Kme,map:()=>GDe,ok:()=>OV,unwrap:()=>qDe,unwrapErr:()=>WDe});var OV=t=>({isOk:!0,isErr:!1,value:t}),Kme=t=>({isOk:!1,isErr:!0,value:t});function GDe(t,e){if(t.isOk){const r=e(t.value);return r instanceof Promise?r.then(n=>OV(n)):OV(r)}if(t.isErr){const r=t.value;return Kme(r)}throw"should never get here"}var qDe=t=>{if(t.isOk)return t.value;throw t.value},WDe=t=>{if(t.isErr)return t.value;throw t.value},_5=(t,e="")=>()=>{},Qme=(t,e,...r)=>{let n=null,i=null,s=null,o=!1,a=!1;const l=[],u=f=>{for(let m=0;mf[m]).join(" "))}}if(typeof t=="function")return t(e===null?{}:e,l,XDe);const d=bA(t,null);return d.$attrs$=e,l.length>0&&(d.$children$=l),d.$key$=i,d.$name$=s,d},bA=(t,e)=>{const r={$flags$:0,$tag$:t,$text$:e,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},ZDe={},YDe=t=>t&&t.$tag$===ZDe,XDe={forEach:(t,e)=>t.map(Cre).forEach(e),map:(t,e)=>t.map(Cre).map(e).map(JDe)},Cre=t=>({vattrs:t.$attrs$,vchildren:t.$children$,vkey:t.$key$,vname:t.$name$,vtag:t.$tag$,vtext:t.$text$}),JDe=t=>{if(typeof t.vtag=="function"){const r={...t.vattrs};return t.vkey&&(r.key=t.vkey),t.vname&&(r.name=t.vname),Qme(t.vtag,r,...t.vchildren||[])}const e=bA(t.vtag,t.vtext);return e.$attrs$=t.vattrs,e.$children$=t.vchildren,e.$key$=t.vkey,e.$name$=t.vname,e},KDe=t=>kDe.map(e=>e(t)).find(e=>!!e),QDe=(t,e)=>t!=null&&!MY(t)?e&4?t==="false"?!1:t===""||!!t:e&2?parseFloat(t):e&1?String(t):t:t,eFe=t=>t,OTt=(t,e,r)=>{const n=eFe(t);return{emit:i=>tFe(n,e,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:i})}},tFe=(t,e,r)=>{const n=yc.ce(e,r);return t.dispatchEvent(n),n},Sre=new WeakMap,rFe=(t,e,r)=>{let n=wA.get(t);ODe&&r?(n=n||new CSSStyleSheet,typeof n=="string"?n=e:n.replaceSync(e)):n=e,wA.set(t,n)},nFe=(t,e,r)=>{var n;const i=ege(e,r),s=wA.get(i);if(t=t.nodeType===11?t:G1,s)if(typeof s=="string"){t=t.head||t;let o=Sre.get(t),a;if(o||Sre.set(t,o=new Set),!o.has(i)){{a=G1.createElement("style"),a.innerHTML=s;const l=(n=yc.$nonce$)!=null?n:UDe(G1);l!=null&&a.setAttribute("nonce",l),(!(e.$flags$&1)||e.$flags$&1&&t.nodeName!=="HEAD")&&t.insertBefore(a,t.querySelector("link"))}e.$flags$&4&&(a.innerHTML+=ADe),o&&o.add(i)}}else t.adoptedStyleSheets.includes(s)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,s]);return i},iFe=t=>{const e=t.$cmpMeta$,r=t.$hostElement$,n=e.$flags$,i=_5("attachStyles",e.$tagName$),s=nFe(r.shadowRoot?r.shadowRoot:r.getRootNode(),e,t.$modeName$);n&10&&n&2&&(r["s-sc"]=s,r.classList.add(s+"-h"),n&2&&r.classList.add(s+"-s")),i()},ege=(t,e)=>"sc-"+(e&&t.$flags$&32?t.$tagName$+"-"+e:t.$tagName$),Ere=(t,e,r,n,i,s)=>{if(r!==n){let o=_re(t,e),a=e.toLowerCase();if(e==="class"){const l=t.classList,u=Mre(r),d=Mre(n);l.remove(...u.filter(f=>f&&!d.includes(f))),l.add(...d.filter(f=>f&&!u.includes(f)))}else if(e==="style"){for(const l in r)(!n||n[l]==null)&&(l.includes("-")?t.style.removeProperty(l):t.style[l]="");for(const l in n)(!r||n[l]!==r[l])&&(l.includes("-")?t.style.setProperty(l,n[l]):t.style[l]=n[l])}else if(e!=="key")if(e==="ref")n&&n(t);else if(!t.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):_re(ZS,a)?e=a.slice(2):e=a[2]+e.slice(3),r||n){const l=e.endsWith(tge);e=e.replace(oFe,""),r&&yc.rel(t,e,r,l),n&&yc.ael(t,e,n,l)}}else{const l=MY(n);if((o||l&&n!==null)&&!i)try{if(t.tagName.includes("-"))t[e]=n;else{const d=n??"";e==="list"?o=!1:(r==null||t[e]!=d)&&(t[e]=d)}}catch{}let u=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(e=a,u=!0),n==null||n===!1?(n!==!1||t.getAttribute(e)==="")&&(u?t.removeAttributeNS(xre,e):t.removeAttribute(e)):(!o||s&4||i)&&!l&&(n=n===!0?"":n,u?t.setAttributeNS(xre,e,n):t.setAttribute(e,n))}}},sFe=/\s/,Mre=t=>t?t.split(sFe):[],tge="Capture",oFe=new RegExp(tge+"$"),rge=(t,e,r)=>{const n=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,i=t&&t.$attrs$||bre,s=e.$attrs$||bre;for(const o of Tre(Object.keys(i)))o in s||Ere(n,o,i[o],void 0,r,e.$flags$);for(const o of Tre(Object.keys(s)))Ere(n,o,i[o],s[o],r,e.$flags$)};function Tre(t){return t.includes("ref")?[...t.filter(e=>e!=="ref"),"ref"]:t}var Sx,NV,xw,CA=!1,SA=!1,TY=!1,wf=!1,EA=(t,e,r,n)=>{var i;const s=e.$children$[r];let o=0,a,l,u;if(CA||(TY=!0,s.$tag$==="slot"&&(Sx&&n.classList.add(Sx+"-s"),s.$flags$|=s.$children$?2:1)),s.$text$!==null)a=s.$elm$=G1.createTextNode(s.$text$);else if(s.$flags$&1)a=s.$elm$=G1.createTextNode("");else{if(wf||(wf=s.$tag$==="svg"),a=s.$elm$=G1.createElementNS(wf?BDe:jDe,!CA&&Cp.slotRelocation&&s.$flags$&2?"slot-fb":s.$tag$),wf&&s.$tag$==="foreignObject"&&(wf=!1),rge(null,s,wf),!!a.getRootNode().querySelector("body")&&Cp.scoped&&VDe(Sx)&&a["s-si"]!==Sx&&a.classList.add(a["s-si"]=Sx),RY(a,n),s.$children$)for(o=0;o{yc.$flags$|=1;const r=Array.from(t.childNodes);if(t["s-sr"]&&Cp.experimentalSlotFixes){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===xw&&r.push(n)}for(let n=r.length-1;n>=0;n--){const i=r[n];i["s-hn"]!==xw&&i["s-ol"]&&(f2(sge(i),i,IY(i)),i["s-ol"].remove(),i["s-ol"]=void 0,i["s-sh"]=void 0,TY=!0),e&&PC(i,e)}yc.$flags$&=-2},nge=(t,e,r,n,i,s)=>{let o=t["s-cr"]&&t["s-cr"].parentNode||t,a;for(o.shadowRoot&&o.tagName===xw&&(o=o.shadowRoot);i<=s;++i)n[i]&&(a=EA(null,r,i,t),a&&(n[i].$elm$=a,f2(o,a,IY(e))))},ige=(t,e,r)=>{for(let n=e;n<=r;++n){const i=t[n];if(i){const s=i.$elm$;lge(i),s&&(SA=!0,s["s-ol"]?s["s-ol"].remove():PC(s,!0),s.remove())}}},aFe=(t,e,r,n,i=!1)=>{let s=0,o=0,a=0,l=0,u=e.length-1,d=e[0],f=e[u],m=n.length-1,v=n[0],b=n[m],M,O;for(;s<=u&&o<=m;)if(d==null)d=e[++s];else if(f==null)f=e[--u];else if(v==null)v=n[++o];else if(b==null)b=n[--m];else if(VT(d,v,i))Ex(d,v,i),d=e[++s],v=n[++o];else if(VT(f,b,i))Ex(f,b,i),f=e[--u],b=n[--m];else if(VT(d,b,i))(d.$tag$==="slot"||b.$tag$==="slot")&&PC(d.$elm$.parentNode,!1),Ex(d,b,i),f2(t,d.$elm$,f.$elm$.nextSibling),d=e[++s],b=n[--m];else if(VT(f,v,i))(d.$tag$==="slot"||b.$tag$==="slot")&&PC(f.$elm$.parentNode,!1),Ex(f,v,i),f2(t,f.$elm$,d.$elm$),f=e[--u],v=n[++o];else{for(a=-1,l=s;l<=u;++l)if(e[l]&&e[l].$key$!==null&&e[l].$key$===v.$key$){a=l;break}a>=0?(O=e[a],O.$tag$!==v.$tag$?M=EA(e&&e[o],r,a,t):(Ex(O,v,i),e[a]=void 0,M=O.$elm$),v=n[++o]):(M=EA(e&&e[o],r,o,t),v=n[++o]),M&&f2(sge(d.$elm$),M,IY(d.$elm$))}s>u?nge(t,n[m+1]==null?null:n[m+1].$elm$,r,n,o,m):o>m&&ige(e,s,u)},VT=(t,e,r=!1)=>t.$tag$===e.$tag$?t.$tag$==="slot"?"$nodeId$"in t&&r&&t.$elm$.nodeType!==8?!1:t.$name$===e.$name$:r?!0:t.$key$===e.$key$:!1,IY=t=>t&&t["s-ol"]||t,sge=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,Ex=(t,e,r=!1)=>{const n=e.$elm$=t.$elm$,i=t.$children$,s=e.$children$,o=e.$tag$,a=e.$text$;let l;a===null?(wf=o==="svg"?!0:o==="foreignObject"?!1:wf,o==="slot"&&!CA||rge(t,e,wf),i!==null&&s!==null?aFe(n,i,e,s,r):s!==null?(t.$text$!==null&&(n.textContent=""),nge(n,null,e,s,0,s.length-1)):!r&&Cp.updatable&&i!==null&&ige(i,0,i.length-1),wf&&o==="svg"&&(wf=!1)):(l=n["s-cr"])?l.parentNode.textContent=a:t.$text$!==a&&(n.data=a)},oge=t=>{const e=t.childNodes;for(const r of e)if(r.nodeType===1){if(r["s-sr"]){const n=r["s-sn"];r.hidden=!1;for(const i of e)if(i!==r){if(i["s-hn"]!==r["s-hn"]||n!==""){if(i.nodeType===1&&(n===i.getAttribute("slot")||n===i["s-sn"])||i.nodeType===3&&n===i["s-sn"]){r.hidden=!0;break}}else if(i.nodeType===1||i.nodeType===3&&i.textContent.trim()!==""){r.hidden=!0;break}}}oge(r)}},Ag=[],age=t=>{let e,r,n;for(const i of t.childNodes){if(i["s-sr"]&&(e=i["s-cr"])&&e.parentNode){r=e.parentNode.childNodes;const s=i["s-sn"];for(n=r.length-1;n>=0;n--)if(e=r[n],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==i["s-hn"]&&!Cp.experimentalSlotFixes)if(Ire(e,s)){let o=Ag.find(a=>a.$nodeToRelocate$===e);SA=!0,e["s-sn"]=e["s-sn"]||s,o?(o.$nodeToRelocate$["s-sh"]=i["s-hn"],o.$slotRefNode$=i):(e["s-sh"]=i["s-hn"],Ag.push({$slotRefNode$:i,$nodeToRelocate$:e})),e["s-sr"]&&Ag.map(a=>{Ire(a.$nodeToRelocate$,e["s-sn"])&&(o=Ag.find(l=>l.$nodeToRelocate$===e),o&&!a.$slotRefNode$&&(a.$slotRefNode$=o.$slotRefNode$))})}else Ag.some(o=>o.$nodeToRelocate$===e)||Ag.push({$nodeToRelocate$:e})}i.nodeType===1&&age(i)}},Ire=(t,e)=>t.nodeType===1?t.getAttribute("slot")===null&&e===""||t.getAttribute("slot")===e:t["s-sn"]===e?!0:e==="",lge=t=>{t.$attrs$&&t.$attrs$.ref&&t.$attrs$.ref(null),t.$children$&&t.$children$.map(lge)},f2=(t,e,r)=>{const n=t==null?void 0:t.insertBefore(e,r);return RY(e,t),n},uge=t=>{const e=[];return t&&e.push(...t["s-scs"]||[],t["s-si"],t["s-sc"],...uge(t.parentElement)),e},RY=(t,e,r=!1)=>{var n;if(t&&e&&t.nodeType===1){const i=new Set(uge(e).filter(Boolean));if(i.size&&((n=t.classList)==null||n.add(...t["s-scs"]=[...i]),t["s-ol"]||r))for(const s of Array.from(t.childNodes))RY(s,t,!0)}},lFe=(t,e,r=!1)=>{var n,i,s,o,a;const l=t.$hostElement$,u=t.$cmpMeta$,d=t.$vnode$||bA(null,null),f=YDe(e)?e:Qme(null,null,e);if(xw=l.tagName,u.$attrsToReflect$&&(f.$attrs$=f.$attrs$||{},u.$attrsToReflect$.map(([m,v])=>f.$attrs$[v]=l[m])),r&&f.$attrs$)for(const m of Object.keys(f.$attrs$))l.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(f.$attrs$[m]=l[m]);f.$tag$=null,f.$flags$|=4,t.$vnode$=f,f.$elm$=d.$elm$=l.shadowRoot||l,Sx=l["s-sc"],CA=(u.$flags$&1)!==0,NV=l["s-cr"],SA=!1,Ex(d,f,r);{if(yc.$flags$|=1,TY){age(f.$elm$);for(const m of Ag){const v=m.$nodeToRelocate$;if(!v["s-ol"]){const b=G1.createTextNode("");b["s-nr"]=v,f2(v.parentNode,v["s-ol"]=b,v)}}for(const m of Ag){const v=m.$nodeToRelocate$,b=m.$slotRefNode$;if(b){const M=b.parentNode;let O=b.nextSibling;{let I=(n=v["s-ol"])==null?void 0:n.previousSibling;for(;I;){let A=(i=I["s-nr"])!=null?i:null;if(A&&A["s-sn"]===v["s-sn"]&&M===A.parentNode){for(A=A.nextSibling;A===v||A!=null&&A["s-sr"];)A=A==null?void 0:A.nextSibling;if(!A||!A["s-nr"]){O=A;break}}I=I.previousSibling}}(!O&&M!==v.parentNode||v.nextSibling!==O)&&v!==O&&(!v["s-hn"]&&v["s-ol"]&&(v["s-hn"]=v["s-ol"].parentNode.nodeName),f2(M,v,O),v.nodeType===1&&(v.hidden=(s=v["s-ih"])!=null?s:!1)),v&&typeof b["s-rf"]=="function"&&b["s-rf"](v)}else v.nodeType===1&&(r&&(v["s-ih"]=(o=v.hidden)!=null?o:!1),v.hidden=!0)}}SA&&oge(f.$elm$),yc.$flags$&=-2,Ag.length=0}if(Cp.experimentalScopedSlotChanges&&u.$flags$&2)for(const m of f.$elm$.childNodes)m["s-hn"]!==xw&&!m["s-sh"]&&(r&&m["s-ih"]==null&&(m["s-ih"]=(a=m.hidden)!=null?a:!1),m.hidden=!0);NV=void 0},uFe=(t,e)=>{},LY=(t,e)=>(t.$flags$|=16,uFe(t,t.$ancestorComponent$),DDe(()=>cFe(t,e))),cFe=(t,e)=>{const r=t.$hostElement$,n=_5("scheduleUpdate",t.$cmpMeta$.$tagName$),i=r;if(!i)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return e?s=D4(i,"componentWillLoad"):s=D4(i,"componentWillUpdate"),s=Rre(s,()=>D4(i,"componentWillRender")),n(),Rre(s,()=>dFe(t,i,e))},Rre=(t,e)=>hFe(t)?t.then(e).catch(r=>{console.error(r),e()}):e(),hFe=t=>t instanceof Promise||t&&t.then&&typeof t.then=="function",dFe=async(t,e,r)=>{const n=t.$hostElement$,i=_5("update",t.$cmpMeta$.$tagName$);n["s-rc"],r&&iFe(t);const s=_5("render",t.$cmpMeta$.$tagName$);fFe(t,e,n,r),s(),i(),pFe(t)},Lre=null,fFe=(t,e,r,n)=>{try{Lre=e,e=e.render&&e.render(),t.$flags$&=-17,t.$flags$|=2,(Cp.hasRenderFn||Cp.reflect)&&(Cp.vdomRender||Cp.reflect)&&(Cp.hydrateServerSide||lFe(t,e,n))}catch(l){WS(l,t.$hostElement$)}return Lre=null,null},pFe=t=>{const e=t.$cmpMeta$.$tagName$,r=t.$hostElement$,n=_5("postUpdate",e),i=r;t.$ancestorComponent$,D4(i,"componentDidRender"),t.$flags$&64?(D4(i,"componentDidUpdate"),n()):(t.$flags$|=64,D4(i,"componentDidLoad"),n())},NTt=t=>{{const e=H5(t),r=e.$hostElement$.isConnected;return r&&(e.$flags$&18)===2&&LY(e,!1),r}},D4=(t,e,r)=>{if(t&&t[e])try{return t[e](r)}catch(n){WS(n)}},mFe=(t,e)=>H5(t).$instanceValues$.get(e),gFe=(t,e,r,n)=>{const i=H5(t),s=t,o=i.$instanceValues$.get(e),a=i.$flags$,l=s;r=QDe(r,n.$members$[e][0]);const u=Number.isNaN(o)&&Number.isNaN(r);if(r!==o&&!u){i.$instanceValues$.set(e,r);{if(n.$watchers$&&a&128){const f=n.$watchers$[e];f&&f.map(m=>{try{l[m](r,o,e)}catch(v){WS(v,s)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(r,o,e)===!1)return;LY(i,!1)}}}},yFe=(t,e,r)=>{var n,i;const s=t.prototype;if(e.$members$||e.$watchers$||t.watchers){t.watchers&&!e.$watchers$&&(e.$watchers$=t.watchers);const o=Object.entries((n=e.$members$)!=null?n:{});o.map(([a,[l]])=>{(l&31||l&32)&&Object.defineProperty(s,a,{get(){return mFe(this,a)},set(u){gFe(this,a,u,e)},configurable:!0,enumerable:!0})});{const a=new Map;s.attributeChangedCallback=function(l,u,d){yc.jmp(()=>{var f;const m=a.get(l);if(this.hasOwnProperty(m))d=this[m],delete this[m];else{if(s.hasOwnProperty(m)&&typeof this[m]=="number"&&this[m]==d)return;if(m==null){const v=H5(this),b=v==null?void 0:v.$flags$;if(b&&!(b&8)&&b&128&&d!==u){const O=this,I=(f=e.$watchers$)==null?void 0:f[l];I==null||I.forEach(A=>{O[A]!=null&&O[A].call(O,d,u,l)})}return}}this[m]=d===null&&typeof this[m]=="boolean"?!1:d})},t.observedAttributes=Array.from(new Set([...Object.keys((i=e.$watchers$)!=null?i:{}),...o.filter(([l,u])=>u[0]&15).map(([l,u])=>{var d;const f=u[1]||l;return a.set(f,l),u[0]&512&&((d=e.$attrsToReflect$)==null||d.push([l,f])),f})]))}}return t},vFe=async(t,e,r,n)=>{let i;if(!(e.$flags$&32)){e.$flags$|=32,r.$lazyBundleId$;{i=t.constructor;const o=t.localName;customElements.whenDefined(o).then(()=>e.$flags$|=128)}if(i&&i.style){let o;typeof i.style=="string"?o=i.style:typeof i.style!="string"&&(e.$modeName$=KDe(t),e.$modeName$&&(o=i.style[e.$modeName$]));const a=ege(r,e.$modeName$);if(!wA.has(a)){const l=_5("registerStyles",r.$tagName$);rFe(a,o,!!(r.$flags$&1)),l()}}}e.$ancestorComponent$,LY(e,!0)},kre=t=>{},_Fe=t=>{if(!(yc.$flags$&1)){const e=H5(t),r=e.$cmpMeta$,n=_5("connectedCallback",r.$tagName$);e.$flags$&1?(cge(t,e,r.$listeners$),e!=null&&e.$lazyInstance$?kre(e.$lazyInstance$):e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>kre(e.$lazyInstance$))):(e.$flags$|=1,r.$flags$&12&&xFe(t),r.$members$&&Object.entries(r.$members$).map(([i,[s]])=>{if(s&31&&t.hasOwnProperty(i)){const o=t[i];delete t[i],t[i]=o}}),vFe(t,e,r)),n()}},xFe=t=>{const e=t["s-cr"]=G1.createComment("");e["s-cn"]=!0,f2(t,e,t.firstChild)},wFe=async t=>{if(!(yc.$flags$&1)){const e=H5(t);e.$rmListeners$&&(e.$rmListeners$.map(r=>r()),e.$rmListeners$=void 0)}},DTt=(t,e)=>{const r={$flags$:e[0],$tagName$:e[1]};r.$members$=e[2],r.$listeners$=e[3],r.$watchers$=t.$watchers$,r.$attrsToReflect$=[];const n=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__registerHost(){LDe(this,r)},connectedCallback(){const s=H5(this);cge(this,s,r.$listeners$),_Fe(this),n&&n.call(this)},disconnectedCallback(){wFe(this),i&&i.call(this)},__attachShadow(){if(!this.shadowRoot)this.attachShadow({mode:"open",delegatesFocus:!!(r.$flags$&16)});else if(this.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${r.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}),t.is=r.$tagName$,yFe(t,r)},cge=(t,e,r,n)=>{r&&r.map(([i,s,o])=>{const a=CFe(t,i),l=bFe(e,o),u=SFe(i);yc.ael(a,s,l,u),(e.$rmListeners$=e.$rmListeners$||[]).push(()=>yc.rel(a,s,l,u))})},bFe=(t,e)=>r=>{var n;try{Cp.lazyLoad||t.$hostElement$[e](r)}catch(i){WS(i)}},CFe=(t,e)=>e&4?G1:e&8?ZS:e&16?G1.body:t,SFe=t=>PDe?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const jg=globalThis.calciteConfig,FTt=(jg==null?void 0:jg.focusTrapStack)||[],zTt=(jg==null?void 0:jg.logLevel)||"info",Are="2.13.0",EFe="2024-10-01",MFe="42c132913";function TFe(){if(jg&&jg.version)return;console.info(`Using Calcite Components ${Are} [Date: ${EFe}, Revision: ${MFe}]`);const t=jg||globalThis.calciteConfig||{};Object.defineProperty(t,"version",{value:Are,writable:!1}),globalThis.calciteConfig=t}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const IFe=()=>typeof navigator<"u"&&typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document;/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */function Pre(){const{classList:t}=document.body,e=window.matchMedia("(prefers-color-scheme: dark)").matches,r=()=>t.contains(Zme)||t.contains(Wme)&&e?"dark":"light",n=o=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:o}})),i=o=>{s!==o&&n(o),s=o};let s=r();n(s),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>i(o.matches?"dark":"light")),new MutationObserver(()=>i(r())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}function RFe(){IFe()&&(document.readyState==="interactive"?Pre():document.addEventListener("DOMContentLoaded",()=>Pre(),{once:!0})),TFe()}const LFe=RFe;LFe();let hge;function kFe(){try{FDe(".")}catch{zDe(Bd(qS(hge)))}}function AFe(t){var r;const e=[];for(const n of Object.keys(t))customElements.get(`calcite-${n}`)||e.push((r=t[n])==null?void 0:r.call(t));return e.length>0?Promise.all(e):null}hge="components/assets";const dge=Symbol("widget"),fge=Symbol("widget-test-data"),PFe=[],$Fe={},MA=new WeakMap;function pge(t,e){let r=e.children;if(r!=null&&r.length)for(let i=0;imge(t))),queueMicrotask(()=>{o[fge].projector.renderNow()})}function NFe(t,e,r,{widgetProperties:n}){var s;const i=MA.get(t);i&&(i.set(n),(s=i.afterUpdate)==null||s.call(i,i,t))}function mge(t){var r;const e=MA.get(t);e&&((r=e.afterRemoved)==null||r.call(e,e,t),e.destroy(),MA.delete(t))}function TA(t){return typeof t=="function"&&t[dge]}const $re=new Set;function DFe(t){$re.add(t),t.finally(()=>$re.delete(t))}var gge;const FFe="esri.widgets.Widget";let zFe=0;function yge(t,e){const r=Object.prototype.hasOwnProperty;for(const n in e)r.call(e,n)&&r.call(t,n)&&(t[n]!=null&&e[n]!=null&&typeof t[n]=="object"&&typeof e[n]=="object"?yge(t[n],e[n]):t[n]=e[n]);return t}const BFe=MDe({postProcessProjectionOptions(t){const e=t.eventHandlerInterceptor,r=/capture$/i;t.eventHandlerInterceptor=(n,i,s,o)=>{const a=e==null?void 0:e(n,i,s,o),l=r.test(n);if(!((n=n.replace(r,"")).toLowerCase()in s)||l){const u=n[2].toLowerCase()+n.slice(3),d=v=>a==null?void 0:a.call(s,v);s.addEventListener(u,d,l);const f=()=>s.removeEventListener(u,d,l),m=o.afterRemoved;o.afterRemoved=v=>{m==null||m(v),f()}}return a}},handleInterceptedEvent(t,e,r,n){const{eventPhase:i,type:s}=n,o=i===Event.CAPTURING_PHASE;let a=`on${s}${o?"capture":""}`;const l=e.properties;(l&&a in l||(a=`on${s[0].toUpperCase()}${s.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Bme(),t.scheduleRender(),l[a].call(l.bind||r,n))}});let bF=!1,Nu=class extends gY(Kw.EventedAccessor){constructor(e,r){super(e,r),this._attached=!1,this._projector=BFe,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=UZ(async()=>{var l;if((l=this._messageBundleProps)!=null&&l.length){const u=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:d,propertyName:f})=>{if(this.destroyed)return;let m=await qOe(d);this.uiStrings&&Object.keys(this.uiStrings)&&(m=yge(Qt(m),this.uiStrings)),this[f]=m}));if(this.destroyed)return;for(const d of u)d.status==="rejected"&&li.getLogger(this).error("widget-intl:locale-error",this.declaredClass,d.reason)}await this.loadLocale()}),kFe();const n="esri-widget-uid-"+wY(),i=this.render.bind(this);this._trackingTarget=new k$(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const s=()=>({vnodeSelector:"div",properties:{key:`${n}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),o=()=>{var f,m;if(!this._readyForTrueRender||this.destroyed)return null;const l=i()??s(),u=l.properties??(l.properties={});if(u.key??(u.key=n),TA(l.vnodeSelector)){if(!this.visible)return s()}else this.visible?u.styles||(u.styles={}):(u.class="",u.styles={display:"none"}),(f=u.styles).display??(f.display="");let d=0;return(m=l.children)==null||m.forEach(v=>{var b;TA(v.vnodeSelector)||(v.properties??(v.properties={}),(b=v.properties).key??(b.key=`${this.id}--${d++}`))}),pge(this,l)};this.render=()=>{if(bF)return o();let l=lDe(this)??null;if(l)return l;this._trackingTarget.clear(),bF=!0;try{l=iy(this._trackingTarget,o)}catch(u){throw li.getLogger(this).error(u),u}finally{bF=!1}return l&&uDe(this,l),l};const a=this.beforeFirstRender();a?this._resourcesFetch=a.then(()=>{this._readyForTrueRender=!0,this._postInitialize()}):(this._resourcesFetch=Promise.resolve().then(()=>{this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),DFe(this._resourcesFetch)}normalizeCtorArgs(e,r){const n={...e};return r&&(n.container=r),n}postInitialize(){}beforeFirstRender(){var r;const e=this.loadDependencies();return(r=this._messageBundleProps)!=null&&r.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(nte):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(t5(this._trackingTarget),t5(this.viewModel),this._detach(this.container),this._set("container",null),this._emitter.clear(),this.render=()=>null,this._projector=null,xF(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return QOe(e)}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){var e;return this._get("id")||((e=this.container)==null?void 0:e.id)||Date.now().toString(16)+"-widget-"+zFe++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(gge=dge,fge)](){return{projector:this._projector}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(xF(this),this._projector.scheduleRender())}own(e){Bpe(li.getLogger(this),"`Widget.own()` is deprecated in favor of 'Widget.addHandles()'",{replacement:"Widget.addHandles()",version:"4.28"}),this.addHandles(e)}classes(...e){return cDe.apply(this,e)}renderNow(){xF(this),this._projector.renderNow()}_postInitialize(){var r;if(this.destroyed)return;this.scheduleRender(),(r=this._delegatedEventNames)!=null&&r.length&&this.addHandles(d2(()=>this.viewModel,(n,i)=>{i&&this.removeHandles("delegated-events"),n&&R$(n)&&this.addHandles(this._delegatedEventNames.map(s=>r5(n,s,o=>{this.emit(s,o)})),"delegated-events")},Eme)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(nte),this.scheduleRender()};this.addHandles([TPe(e),d2(()=>this.uiStrings,e),EV(()=>this.container,n=>{this.destroyed||this._attach(n)},{initial:!0,once:!0})])}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){var r;this._attached&&(this._projector.detach(this.render),this._attached=!1),(r=e==null?void 0:e.parentNode)==null||r.removeChild(e)}};Nu[gge]=!0,T([B()],Nu.prototype,"_readyForTrueRender",void 0),T([B({value:null})],Nu.prototype,"container",null),T([Pl("container")],Nu.prototype,"castContainer",null),T([B()],Nu.prototype,"icon",null),T([B()],Nu.prototype,"id",null),T([B()],Nu.prototype,"label",null),T([B()],Nu.prototype,"renderable",null),T([B()],Nu.prototype,"uiStrings",void 0),T([B()],Nu.prototype,"viewModel",void 0),T([B({value:!0})],Nu.prototype,"visible",null),T([B()],Nu.prototype,"key",void 0),T([B()],Nu.prototype,"children",void 0),T([B()],Nu.prototype,"afterCreate",void 0),T([B()],Nu.prototype,"afterUpdate",void 0),T([B()],Nu.prototype,"afterRemoved",void 0),Nu=T([_t(FFe)],Nu);const jFe=Nu;function Ore(t){return(e,r)=>{e.hasOwnProperty("_messageBundleProps")||(e._messageBundleProps=e._messageBundleProps?e._messageBundleProps.slice():[]),e._messageBundleProps.push({bundlePath:t,propertyName:r})}}var VFe=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},vge=function(t,e){for(var r=0,n=t.length;rfs(()=>import("./calcite-button-tKmnUUcr.js"),__vite__mapDeps([0,1,2,3,4,5])),input:()=>fs(()=>import("./calcite-input-D7abHyRn.js"),__vite__mapDeps([6,2,1,4,3])),label:()=>fs(()=>import("./calcite-label-A-HJpZEQ.js"),__vite__mapDeps([7,3,2])),modal:()=>fs(()=>import("./calcite-modal-DHLYHRNO.js"),__vite__mapDeps([8,9,4,2,5])),notice:()=>fs(()=>import("./calcite-notice-Ck_wHSpF.js"),__vite__mapDeps([10,9,4,2]))})}get title(){var e;return(e=this.commonMessages)==null?void 0:e.auth.signIn}render(){var j;const{open:e,title:r,messages:n,signingIn:i,oAuthPrompt:s,server:o,resource:a,error:l}=this,{info:u,oAuthInfo:d,lblItem:f,invalidUser:m,noAuthService:v,lblUser:b,lblPwd:M,lblCancel:O,lblSigning:I,lblOk:A}=n;return Td("div",{class:this.classes(SF.base,WFe())},Td("form",{bind:this,onsubmit:this._submit},Td("calcite-modal",{bind:this,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteModalClose:this._cancel,onCalciteModalOpen:this._focusUsernameInput},Td("div",{slot:"header"},r),Td("div",{slot:"content"},Td("div",{class:SF.info},BOe(s?d:u,{server:o&&/\.arcgis\.com/i.test(o)?ZFe:o,resource:`(${a||f})`})),l?Td("calcite-notice",{class:SF.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Td("div",{slot:"message"},(j=l.details)!=null&&j.httpStatus?m:v)):null,s?null:[Td("calcite-label",null,b,Td("calcite-input",{afterCreate:H=>this._usernameInputNode=H,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Td("calcite-label",null,M,Td("calcite-input",{afterCreate:H=>this._passwordInputNode=H,bind:this,name:"password",required:!0,type:"password",value:""}))]),Td("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"secondary",type:"button",width:"full"},O),Td("calcite-button",{loading:!!i,slot:"primary",type:"submit",width:"full"},i?I:A))))}_focusUsernameInput(){requestAnimationFrame(()=>{var e;(e=this._usernameInputNode)==null||e.setFocus()})}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){var n,i;e.preventDefault(),this._set("signingIn",!0);const r=this.oAuthPrompt?{}:{username:(n=this._usernameInputNode)==null?void 0:n.value,password:(i=this._passwordInputNode)==null?void 0:i.value};this.emit("submit",r)}};T([B({readOnly:!0})],ff.prototype,"container",void 0),T([B(),Ore("esri/t9n/common")],ff.prototype,"commonMessages",void 0),T([B()],ff.prototype,"error",void 0),T([B(),Ore("esri/identity/t9n/identity")],ff.prototype,"messages",void 0),T([B()],ff.prototype,"oAuthPrompt",void 0),T([B()],ff.prototype,"open",void 0),T([B()],ff.prototype,"signingIn",void 0),T([B()],ff.prototype,"server",void 0),T([B({readOnly:!0})],ff.prototype,"title",null),T([B()],ff.prototype,"resource",void 0),ff=T([_t("esri.identity.IdentityModal")],ff);const Nre=ff,EF="esriJSAPIOAuth";let DV=class{constructor(e,r){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=r,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token)){if(this.expires==null&&this.refreshToken)e=!0;else if(this.expires){const r=Date.now();this.expires>r&&(this.expires-r)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}}return e}save(){if(!this.storage)return!1;const e=this._load(),r=this.oAuthInfo;if(r!=null&&r.authNamespace&&r.portalUrl){let n=e[r.authNamespace];n||(n=e[r.authNamespace]={}),this.appId||(this.appId=r.appId),n[r.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(EF,JSON.stringify(e))}catch(i){return console.warn(i),!1}return!0}return!1}destroy(){const e=this._load(),r=this.oAuthInfo;if(r!=null&&r.appId&&(r!=null&&r.portalUrl)&&(this.expires==null||this.expires>Date.now())&&(this.refreshToken||this.token)){const n=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",i=new FormData;if(i.append("f","json"),i.append("auth_token",this.refreshToken||this.token),i.append("client_id",r.appId),i.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),typeof navigator.sendBeacon=="function")navigator.sendBeacon(n,i);else{const s=new XMLHttpRequest;s.open("POST",n),s.send(i)}}if(r!=null&&r.authNamespace&&r.portalUrl&&this.storage){const n=e[r.authNamespace];if(n){delete n[r.portalUrl];try{this.storage.setItem(EF,JSON.stringify(e))}catch(i){console.log(i)}}}r&&(r._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),r=this.oAuthInfo;if(r!=null&&r.authNamespace&&r.portalUrl){let n=e[r.authNamespace];n&&(n=n[r.portalUrl],n&&(this.appId=n.appId,this.codeVerifier=n.codeVerifier,this.expires=n.expires,this.refreshToken=n.refreshToken,this.ssl=n.ssl,this.stateUID=n.stateUID,this.token=n.token,this.userId=n.userId))}}_load(){let e={};if(this.storage){const r=this.storage.getItem(EF);if(r)try{e=JSON.parse(r)}catch(n){console.warn(n)}}return e}};DV.prototype.declaredClass="esri.identity.OAuthCredential";let pf=class extends qr{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};T([B({json:{write:!0}})],pf.prototype,"adminTokenServiceUrl",void 0),T([B({json:{write:!0}})],pf.prototype,"currentVersion",void 0),T([B({json:{write:!0}})],pf.prototype,"hasPortal",void 0),T([B({json:{write:!0}})],pf.prototype,"hasServer",void 0),T([B({json:{write:!0}})],pf.prototype,"owningSystemUrl",void 0),T([B({json:{write:!0}})],pf.prototype,"owningTenant",void 0),T([B({json:{write:!0}})],pf.prototype,"server",void 0),T([B({json:{write:!0}})],pf.prototype,"shortLivedTokenValidity",void 0),T([B({json:{write:!0}})],pf.prototype,"tokenServiceUrl",void 0),T([B({json:{write:!0}})],pf.prototype,"webTierAuth",void 0),pf=T([_t("esri.identity.ServerInfo")],pf);const MF=pf,XR={},_ge=t=>{const e=new Ef(t.owningSystemUrl).host,r=new Ef(t.server).host,n=/.+\.arcgis\.com$/i;return n.test(e)&&n.test(r)},FV=(t,e)=>!!(_ge(t)&&e&&e.some(r=>r.test(t.server)));let JR=null,KR=null;try{JR=window.localStorage,KR=window.sessionStorage}catch{}let xge=class extends Kw{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin=window.origin!=="null"?window.origin:window.location.origin,this._appUrlObj=fd(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const r=this.serverInfos;r?(e=e.filter(n=>!this.findServerInfo(n.server)),this.serverInfos=r.concat(e)):this.serverInfos=e,e.forEach(n=>{n.owningSystemUrl&&this._portals.push(n.owningSystemUrl),n.hasPortal&&this._portals.push(n.server)})}registerOAuthInfos(e){const r=this.oAuthInfos;if(r){for(const n of e){const i=this.findOAuthInfo(n.portalUrl);i&&r.splice(r.indexOf(i),1)}this.oAuthInfos=r.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const r=this._sanitizeUrl(e.server),n=this._isServerRsrc(r);let i,s=this.findServerInfo(r),o=!0;s||(s=new MF,s.server=this._getServerInstanceRoot(r),n?s.hasServer=!0:(s.tokenServiceUrl=this._getTokenSvcUrl(r),s.hasPortal=!0),this.registerServers([s])),i=this._findCredential(r),i?(delete e.server,Object.assign(i,e),o=!1):(i=new Ya({userId:e.userId,server:s.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:n?"server":"portal"}),i.resources=[r],this.credentials.push(i)),i.emitTokenChange(!1),o||i.refreshServerTokens()}toJSON(){return FZ({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;typeof e=="string"&&(e=JSON.parse(e));const r=e.serverInfos,n=e.oAuthInfos,i=e.credentials;if(r){const s=[];r.forEach(o=>{o.server&&o.tokenServiceUrl&&s.push(o.declaredClass?o:new MF(o))}),s.length&&this.registerServers(s)}if(n){const s=[];n.forEach(o=>{o.appId&&s.push(o.declaredClass?o:new hV(o))}),s.length&&this.registerOAuthInfos(s)}i&&i.forEach(s=>{s.server&&s.token&&s.expires&&s.expires>Date.now()&&((s=s.declaredClass?s:new Ya(s)).emitTokenChange(),this.credentials.push(s))})}findServerInfo(e){let r;e=this._sanitizeUrl(e);for(const n of this.serverInfos)if(this._hasSameServerInstance(n.server,e)){r=n;break}return r}findOAuthInfo(e){let r;e=this._sanitizeUrl(e);for(const n of this.oAuthInfos)if(this._hasSameServerInstance(n.portalUrl,e)){r=n;break}return r}findCredential(e,r){if(!e)return;let n;e=this._sanitizeUrl(e);const i=this._isServerRsrc(e)?"server":"portal";if(r){for(const s of this.credentials)if(this._hasSameServerInstance(s.server,e)&&r===s.userId&&s.scope===i){n=s;break}}else for(const s of this.credentials)if(this._hasSameServerInstance(s.server,e)&&this._getIdenticalSvcIdx(e,s)!==-1&&s.scope===i){n=s;break}return n}getCredential(e,r){let n,i,s=!0;r&&(n=!!r.token,i=r.error,s=r.prompt!==!1),r={...r},e=this._sanitizeUrl(e);const o=new AbortController,a=Mp();if(r.signal&&bp(r.signal,()=>{o.abort()}),bp(o,()=>{a.reject(new Pr("identity-manager:user-aborted","ABORTED"))}),sy(o))return a.promise;r.signal=o.signal;const l=this._isAdminResource(e),u=n?this.findCredential(e):null;let d;if(u&&i&&i.details&&i.details.httpStatus===498)u.destroy();else if(u)return d=new Pr("identity-manager:not-authorized","You are currently signed in as: '"+u.userId+"'. You do not have access to this resource: "+e,{error:i}),a.reject(d),a.promise;const f=this._findCredential(e,r);if(f)return a.resolve(f),a.promise;let m=this.findServerInfo(e);if(m)!m.hasPortal&&m.server&&m.owningSystemUrl&&this._hasSameServerInstance(m.server,m.owningSystemUrl)&&(m.hasPortal=!0),!m.hasServer&&this._isServerRsrc(e)&&(m._restInfoPms=this._getTokenSvcUrl(e),m.hasServer=!0);else{const v=this._getTokenSvcUrl(e);if(!v)return d=new Pr("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;m=new MF,m.server=this._getServerInstanceRoot(e),typeof v=="string"?(m.tokenServiceUrl=v,m.hasPortal=!0):(m._restInfoPms=v,m.hasServer=!0),this.registerServers([m])}return m.hasPortal&&m._selfReq===void 0&&(s||Ad(m.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(v=>v.tokenServiceUrl===m.tokenServiceUrl))&&(m._selfReq={owningTenant:r==null?void 0:r.owningTenant,selfDfd:this._getPortalSelf(m.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,m,r,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,r,n){const i=this._rePortalTokenSvc.test(e.tokenServiceUrl),s=new Ef(this._appOrigin),o=e.shortLivedTokenValidity;let a,l,u,d,f,m,v,b;r&&(b=this.tokenValidity||o||this._defaultTokenValidity,b>o&&o>0&&(b=o)),n&&(a=n.isAdmin,l=n.serverUrl,u=n.token,m=n.signal,v=n.ssl,e.customParameters=n.customParameters),a?d=e.adminTokenServiceUrl:(d=e.tokenServiceUrl,f=new Ef(d.toLowerCase()),e.webTierAuth&&(n!=null&&n.serverUrl)&&!v&&s.scheme==="http"&&(Ad(s.uri,d,!0)||f.scheme==="https"&&s.host===f.host&&s.port==="7080"&&f.port==="7443")&&(d=d.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const M={query:{request:"getToken",username:r==null?void 0:r.username,password:r==null?void 0:r.password,serverUrl:l,token:u,expiration:b,referer:a||i?this._appOrigin:null,client:a?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,n),signal:m,...n==null?void 0:n.ioArgs};return i||(M.withCredentials=!1),sa(d,M).then(O=>{const I=O.data;if(!(I!=null&&I.token))return new Pr("identity-manager:authentication-failed","Unable to generate token");const A=e.server;return XR[A]||(XR[A]={}),r&&(XR[A][r.username]=r.password),I.validity=b,I})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,r,n){let i=!1;return this.getCredential(e,{prompt:!1}).then(s=>{let o;const a={f:"json"};if(s.scope==="portal")if(r&&(this._doPortalSignIn(e)||n!=null&&n.force))o=s.server+"/sharing/rest/oauth2/validateAppAccess",a.client_id=r;else{if(!s.token)return{credential:s};o=s.server+"/sharing/rest"}else{if(!s.token)return{credential:s};o=s.server+"/rest/services"}return s.token&&(a.token=s.token),sa(o,{query:a,authMode:"anonymous"}).then(l=>{if(l.data.valid===!1)throw new Pr("identity-manager:not-authorized",`You are currently signed in as: '${s.userId}'.`,l.data);return i=!!l.data.viewOnlyUserTypeApp,{credential:s}}).catch(l=>{var d;if(l.name==="identity-manager:not-authorized")throw l;const u=(d=l.details)==null?void 0:d.httpStatus;if(u===498)throw s.destroy(),new Pr("identity-manager:not-authenticated","User is not signed in.");if(u===400)throw new Pr("identity-manager:invalid-request");return{credential:s}})}).then(s=>({credential:s.credential,viewOnly:i}))}setOAuthResponseHash(e){e&&(e.charAt(0)==="#"&&(e=e.substring(1)),this._processOAuthPopupParams(q3(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,r,n={}){const i=Mp(),s=()=>{var d;l==null||l.remove(),u==null||u.remove(),(d=this.dialog)==null||d.destroy(),this.dialog=l=u=null},o=()=>{s(),this._oAuthDfd=null,i.reject(new Pr("identity-manager:user-aborted","ABORTED"))};n.signal&&bp(n.signal,()=>{o()});const a=new Nre({open:!0,resource:this.getResourceName(e),server:r.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",o),u=a.on("submit",d=>{this.generateToken(r,d,{isAdmin:n.isAdmin,signal:n.signal}).then(f=>{s();const m=new Ya({userId:d.username,server:r.server??void 0,token:f.token,expires:f.expires!=null?Number(f.expires):null,ssl:!!f.ssl,isAdmin:n.isAdmin,validity:f.validity});i.resolve(m)}).catch(f=>{a.error=f,a.signingIn=!1})});return i.promise}oAuthSignIn(e,r,n,i){this._oAuthDfd=Mp();const s=this._oAuthDfd;let o;i!=null&&i.signal&&bp(i.signal,()=>{const m=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;m&&!m.closed?m.close():this.dialog&&d()}),s.resUrl_=e,s.sinfo_=r,s.oinfo_=n;const a=n._oAuthCred;if(a.storage&&(n.flowType==="authorization-code"||n.flowType==="auto"&&r.currentVersion>=8.4)){let m=crypto.getRandomValues(new Uint8Array(32));o=lF(m),a.codeVerifier=o,m=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=lF(m),a.save()||(a.codeVerifier=o=null)}else a.codeVerifier=null;let l,u;this._getCodeChallenge(o).then(m=>{const v=!i||i.oAuthPopupConfirmation!==!1;if(!n.popup||!v)return void this._doOAuthSignIn(e,r,n,m);const b=new Nre({oAuthPrompt:!0,server:r.server,open:!0});this.dialog=b,this.emit("dialog-create"),l=b.on("cancel",d),u=b.on("submit",()=>{f(),this._doOAuthSignIn(e,r,n,m)})});const d=()=>{f(),this._oAuthDfd=null,s.reject(new Pr("identity-manager:user-aborted","ABORTED"))},f=()=>{var m;l==null||l.remove(),u==null||u.remove(),(m=this.dialog)==null||m.destroy(),this.dialog=null};return s.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=r5(window,"message",r=>{var n;if((r.origin===this._appOrigin||r.origin.endsWith(".arcgis.com"))&&((n=r.data)==null?void 0:n.type)==="arcgis:auth:requestCredential"){const i=r.source;this.getCredential(e).then(s=>{i.postMessage({type:"arcgis:auth:credential",credential:{expires:s.expires,server:s.server,ssl:s.ssl,token:s.token,userId:s.userId}},r.origin)}).catch(s=>{i.postMessage({type:"arcgis:auth:error",error:{name:s.name,message:s.message}},r.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){var n,i;let e=window.location.hash;if(e){e.charAt(0)==="#"&&(e=e.substring(1));const s=q3(e);let o=!1;if(s.access_token&&s.expires_in&&s.state&&s.hasOwnProperty("username"))try{s.state=JSON.parse(s.state),s.state.portalUrl&&(this._oAuthLocationParams=s,o=!0)}catch{}else if(s.error&&s.error_description&&(console.log("IdentityManager OAuth Error: ",s.error," - ",s.error_description),s.error==="access_denied"&&(o=!0,s.state)))try{s.state=JSON.parse(s.state)}catch{}o&&(window.location.hash=((n=s.state)==null?void 0:n.hash)||"")}let r=window.location.search;if(r){r.charAt(0)==="?"&&(r=r.substring(1));const s=q3(r);let o=!1;if(s.code&&s.state)try{s.state=JSON.parse(s.state),s.state.portalUrl&&s.state.uid&&(this._oAuthLocationParams=s,o=!0)}catch{}else if(s.error&&s.error_description&&(console.log("IdentityManager OAuth Error: ",s.error," - ",s.error_description),s.error==="access_denied"&&(o=!0,s.state)))try{s.state=JSON.parse(s.state)}catch{}if(o){const a={...s};["code","error","error_description","message_code","persist","state"].forEach(d=>{delete a[d]});const l=v5(a),u=window.location.pathname+(l?`?${l}`:"")+(((i=s.state)==null?void 0:i.hash)||"");window.history.replaceState(window.history.state,"",u)}}}_getOAuthToken(e,r,n,i,s){return e=e.replace(/^http:/i,"https:"),sa(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&s?{grant_type:"authorization_code",code:r,redirect_uri:i,client_id:n,code_verifier:s}:{grant_type:"refresh_token",refresh_token:r,client_id:n}}).then(o=>o.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r);return lF(new Uint8Array(n))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const r=new Pr("identity-manager:user-aborted","ABORTED");this._errbackFunc(r)}}_findCredential(e,r){let n,i,s,o,a=-1;const l=r==null?void 0:r.token,u=r==null?void 0:r.resource,d=this._isServerRsrc(e)?"server":"portal",f=this.credentials.filter(m=>this._hasSameServerInstance(m.server,e)&&m.scope===d);if(e=u||e,f.length)if(f.length===1){if(n=f[0],s=this.findServerInfo(n.server),i=s==null?void 0:s.owningSystemUrl,o=i?this.findCredential(i,n.userId):void 0,a=this._getIdenticalSvcIdx(e,n),!l)return a===-1&&n.resources.push(e),this._addResource(e,o),n;a!==-1&&(n.resources.splice(a,1),this._removeResource(e,o))}else{let m,v;if(f.some(b=>(v=this._getIdenticalSvcIdx(e,b),v!==-1&&(m=b,s=this.findServerInfo(m.server),i=s==null?void 0:s.owningSystemUrl,o=i?this.findCredential(i,m.userId):void 0,a=v,!0))),l)m&&(m.resources.splice(a,1),this._removeResource(e,o));else if(m)return this._addResource(e,o),m}}_findOAuthInfo(e){let r=this.findOAuthInfo(e);if(!r){for(const n of this.oAuthInfos)if(this._isIdProvider(n.portalUrl,e)){r=n;break}}return r}_addResource(e,r){r&&this._getIdenticalSvcIdx(e,r)===-1&&r.resources.push(e)}_removeResource(e,r){let n=-1;r&&(n=this._getIdenticalSvcIdx(e,r),n>-1&&r.resources.splice(n,1))}_useProxy(e,r){return(r==null?void 0:r.isAdmin)&&!Ad(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&String(e.currentVersion)==="10.1"&&!Ad(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const r=new Ef(e);return r.scheme+"://"+r.host+(r.port!=null?":"+r.port:"")}_getServerInstanceRoot(e){const r=e.toLowerCase();let n=r.indexOf(this._agsRest);return n===-1&&this._isAdminResource(e)&&(n=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),n!==-1||K1e(r)||(n=r.indexOf("/sharing")),n===-1&&r.endsWith("/")&&(n=r.length-1),n>-1?e.substring(0,n):e}_hasSameServerInstance(e,r){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),r=this._getServerInstanceRoot(r).toLowerCase(),e=sA(e),r=sA(r),(e=e.substring(e.indexOf(":")))===(r=r.substring(r.indexOf(":")))}_sanitizeUrl(e){const r=(Ao.request.proxyUrl||"").toLowerCase(),n=r?e.toLowerCase().indexOf(r+"?"):-1;return n!==-1&&(e=e.substring(n+r.length+1)),e=Lp(e),fd(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,r){let n=!1;if(this._isRESTService(e)&&this._isRESTService(r)){const i=this._getSuffix(e).toLowerCase(),s=this._getSuffix(r).toLowerCase();if(n=i===s,!n){const o=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;n=i.replaceAll(o,"$1")===s.replaceAll(o,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(r)?n=!0:this._isServerRsrc(e)||this._isServerRsrc(r)||!this._isPortalDomain(e)||(n=!0);return n}_isPortalDomain(e){const r=new Ef(e.toLowerCase()),n=this._portalConfig;let i=this._gwDomains.some(s=>s.regex.test(r.uri));return!i&&n&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(n.restBaseUrl),r.uri)),i||Ao.portalUrl&&(i=Ad(r,Ao.portalUrl,!0)),i||(i=this._portals.some(s=>this._hasSameServerInstance(s,r.uri))),i=i||this._agsPortal.test(r.path),i}_isIdProvider(e,r){let n=-1,i=-1;this._gwDomains.forEach((o,a)=>{n===-1&&o.regex.test(e)&&(n=a),i===-1&&o.regex.test(r)&&(i=a)});let s=!1;if(n>-1&&i>-1&&(n===0||n===4?i!==0&&i!==4||(s=!0):n===1?i!==1&&i!==2||(s=!0):n===2?i===2&&(s=!0):n===3&&i===3&&(s=!0)),!s){const o=this.findServerInfo(r),a=o==null?void 0:o.owningSystemUrl;a&&_ge(o)&&this._isPortalDomain(a)&&this._isIdProvider(e,a)&&(s=!0)}return s}_getIdenticalSvcIdx(e,r){let n=-1;for(let i=0;io.data),{adminUrl:r,promise:n}}if(this._isPortalDomain(e)){let s="";if(this._gwDomains.some(o=>(o.regex.test(e)&&(s=o.tokenServiceUrl),!!s)),s||this._portals.some(o=>(this._hasSameServerInstance(o,e)&&(s=o+this._gwTokenUrl),!!s)),s||(i=e.toLowerCase().indexOf("/sharing"),i!==-1&&(s=e.substring(0,i)+this._gwTokenUrl)),s||(s=this._getOrigin(e)+this._gwTokenUrl),s){const o=new Ef(e).port;/^http:\/\//i.test(e)&&o==="7080"&&(s=s.replace(/:7080/i,":7443")),s=s.replace(/http:/i,"https:")}return s}}_processOAuthResponseParams(e,r,n){const i=r._oAuthCred;if(e.code){const o=i.codeVerifier;return i.codeVerifier=null,i.stateUID=null,i.save(),this._getOAuthToken(n.server,e.code,r.appId,this._getRedirectURI(r,!0),o).then(a=>{const l=new Ya({userId:a.username,server:n.server??void 0,token:a.access_token,expires:Date.now()+1e3*a.expires_in,ssl:a.ssl,oAuthState:e.state,_oAuthCred:i});return r.userId=l.userId,i.storage=a.persist?JR:KR,i.refreshToken=a.refresh_token,i.token=null,i.expires=a.refresh_token_expires_in?Date.now()+1e3*a.refresh_token_expires_in:null,i.userId=l.userId,i.ssl=l.ssl,i.save(),l})}const s=new Ya({userId:e.username,server:n.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:e.ssl==="true",oAuthState:e.state,_oAuthCred:i});return r.userId=s.userId,i.storage=e.persist?JR:KR,i.refreshToken=null,i.token=s.token,i.expires=s.expires,i.userId=s.userId,i.ssl=s.ssl,i.save(),Promise.resolve(s)}_processOAuthPopupParams(e){var n;const r=this._oAuthDfd;if(this._oAuthDfd=null,r)if(clearInterval(this._oAuthIntervalId),(n=this._oAuthOnPopupHandle)==null||n.remove(),e.error){const i=e.error==="access_denied",s=new Pr(i?"identity-manager:user-aborted":"identity-manager:authentication-failed",i?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);r.reject(s)}else this._processOAuthResponseParams(e,r.oinfo_,r.sinfo_).then(i=>{r.resolve(i)}).catch(i=>{r.reject(i)})}_setOAuthResponseQueryString(e){e&&(e.charAt(0)==="?"&&(e=e.substring(1)),this._processOAuthPopupParams(q3(e)))}async _exchangeToken(e,r,n){return(await sa(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:r,token:n}})).data.token}async _getPlatformSelf(e,r){var n;if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const i=await sa(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":r,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,i.data}catch(i){throw((n=i.details)==null?void 0:n.messageCode)==="OAUTH_0066"&&(this._getPlatformSelfError=[i,Date.now()]),i}}_getPortalSelf(e,r){let n;return this._gwDomains.some(i=>(i.regex.test(e)&&(n=i.customBaseUrl),!!n)),n?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:n,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(r)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),sa(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(i=>i.data))}_doPortalSignIn(e){const r=this._portalConfig,n=window.location.href,i=this.findServerInfo(e);return!(!r&&!this._isPortalDomain(n)||!(i?i.hasPortal||i.owningSystemUrl&&this._isPortalDomain(i.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(n,e)||r&&(this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),e)||this._isIdProvider(r.restBaseUrl,e))||Ad(n,e,!0)))}_checkProtocol(e,r,n,i){let s=!0;const o=i?r.adminTokenServiceUrl:r.tokenServiceUrl;return o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&VS(o)&&(s=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:r}),!s)&&n(new Pr("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),s}_enqueue(e,r,n,i,s,o){return i||(i=Mp()),i.resUrl_=e,i.sinfo_=r,i.options_=n,i.admin_=s,i.refresh_=o,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(i)):this._xoReqs.push(i):this._doSignIn(i),i.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const r=u=>{var O;const d=(O=e.options_)==null?void 0:O.resource,f=e.resUrl_,m=e.refresh_;let v=!1;this.credentials.includes(u)||(m&&this.credentials.includes(m)?(m.userId=u.userId,m.token=u.token,m.expires=u.expires,m.validity=u.validity,m.ssl=u.ssl,m.creationTime=u.creationTime,v=!0,u=m):this.credentials.push(u)),u.resources||(u.resources=[]),u.resources.includes(d||f)||u.resources.push(d||f),u.scope=this._isServerRsrc(f)?"server":"portal",u.emitTokenChange();const b=this._soReqs,M={};this._soReqs=[],b.forEach(I=>{if(!this._isIdenticalService(f,I.resUrl_)){const A=this._getSuffix(I.resUrl_);M[A]||(M[A]=!0,u.resources.push(I.resUrl_))}}),e.resolve(u),b.forEach(I=>{this._hasSameServerInstance(this._getServerInstanceRoot(f),I.resUrl_)?I.resolve(u):this._soReqs.push(I)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,v||this.emit("credential-create",{credential:u}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},n=u=>{e.reject(u),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},i=(u,d,f,m)=>{var A,j,H;const v=e.sinfo_,b=!e.options_||e.options_.prompt!==!1,M=v.hasPortal&&this._findOAuthInfo(e.resUrl_);let O,I;if(u)r(new Ya({userId:u,server:v.server??void 0,token:f??void 0,expires:m!=null?Number(m):null,ssl:!!d}));else if(window!==window.parent&&((A=this._appUrlObj.query)!=null&&A["arcgis-auth-origin"])&&((j=this._appUrlObj.query)!=null&&j["arcgis-auth-portal"])&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const W=r5(window,"message",re=>{re.source===window.parent&&re.data&&(re.data.type==="arcgis:auth:credential"?(W.remove(),re.data.credential.expires{W.remove()})}else if(M){let W=M._oAuthCred;if(!W){const re=new DV(M,JR),K=new DV(M,KR);re.isValid()&&K.isValid()?re.expires>K.expires?(W=re,K.destroy()):(W=K,re.destroy()):W=re.isValid()?re:K,M._oAuthCred=W}if(W.isValid()){O=new Ya({userId:W.userId??void 0,server:v.server??void 0,token:W.token??void 0,expires:W.expires,ssl:W.ssl??void 0,_oAuthCred:W});const re=M.appId!==W.appId&&this._doPortalSignIn(e.resUrl_);re||W.refreshToken?(e._pendingDfd=W.refreshToken?this._getOAuthToken(v.server,W.refreshToken,W.appId).then(K=>(O.expires=Date.now()+1e3*K.expires_in,O.token=K.access_token,O)):Promise.resolve(O),e._pendingDfd.then(K=>re?this._exchangeToken(K.server,M.appId,K.token).then(pe=>(K.token=pe,K)).catch(()=>K):K).then(K=>{r(K)}).catch(()=>{W==null||W.destroy(),i()})):r(O)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(M.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===W.stateUID&&W.codeVerifier)){const re=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(re,M,v).then(K=>{r(K)}).catch(n)}else{const re=()=>{b?e._pendingDfd=this.oAuthSignIn(e.resUrl_,v,M,e.options_).then(r,n):(I=new Pr("identity-manager:not-authenticated","User is not signed in."),n(I))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(v.server,M.appId).then(K=>{Ad(K.portalUrl,this._appOrigin,!0)?(O=new Ya({userId:K.username,server:v.server??void 0,expires:Date.now()+1e3*K.expires_in,token:K.token}),r(O)):re()}).catch(re):re()}}else if(b){if(this._checkProtocol(e.resUrl_,v,n,e.admin_)){let W=e.options_;e.admin_&&(W=W||{},W.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,v,W).then(r,n)}}else I=new Pr("identity-manager:not-authenticated","User is not signed in."),n(I)},s=()=>{const u=e.sinfo_,d=u.owningSystemUrl,f=e.options_;let m,v,b,M;if(f&&(m=f.token,v=f.error,b=f.prompt),M=this._findCredential(d,{token:m,resource:e.resUrl_}),!M){for(const O of this.credentials)if(this._isIdProvider(d,O.server)){M=O;break}}if(M){const O=this.findCredential(e.resUrl_,M.userId);if(O)r(O);else if(FV(u,this._legacyFed)){const I=M.toJSON();I.server=u.server,I.resources=null,r(new Ya(I))}else(e._pendingDfd=this.generateToken(this.findServerInfo(M.server),null,{serverUrl:e.resUrl_,token:M.token,signal:e.options_.signal,ssl:M.ssl})).then(I=>{r(new Ya({userId:M==null?void 0:M.userId,server:u.server??void 0,token:I.token,expires:I.expires!=null?Number(I.expires):null,ssl:!!I.ssl,isAdmin:e.admin_,validity:I.validity}))},n)}else this._busy=null,m&&(e.options_.token=null),(e._pendingDfd=this.getCredential(d.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:u.owningTenant,signal:e.options_.signal,token:m,error:v,prompt:b})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},O=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(O)})};this._errbackFunc=n;const o=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),l=e.sinfo_._restInfoPms;l?l.promise.then(u=>{const d=e.sinfo_;if(d._restInfoPms){d.adminTokenServiceUrl=d._restInfoPms.adminUrl,d._restInfoPms=null,d.tokenServiceUrl=(Hv("authInfo.tokenServicesUrl",u)||Hv("authInfo.tokenServiceUrl",u)||Hv("tokenServiceUrl",u))??null,d.shortLivedTokenValidity=Hv("authInfo.shortLivedTokenValidity",u)??null,d.currentVersion=u.currentVersion,d.owningTenant=u.owningTenant;const f=d.owningSystemUrl=u.owningSystemUrl;f&&this._portals.push(f)}a&&d.owningSystemUrl?s():i()},()=>{e.sinfo_._restInfoPms=null;const u=new Pr("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");n(u)}):a&&o?s():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(u=>{var M;const d={};let f,m,v,b;return u&&(f=(M=u.user)==null?void 0:M.username,d.username=f,d.allSSL=u.allSSL,m=u.supportsOAuth,b=parseFloat(u.currentVersion),u.portalMode==="multitenant"&&(v=u.customBaseUrl),e.sinfo_.currentVersion=b),e.sinfo_.webTierAuth=!!f,f&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:d.allSSL}).catch(()=>null).then(O=>(d.portalToken=O==null?void 0:O.token,d.tokenExpiration=O==null?void 0:O.expires,d)):!f&&m&&b>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:v,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>d):d}).catch(()=>null).then(u=>{e.sinfo_._selfReq=null,u?i(u.username,u.allSSL,u.portalToken,u.tokenExpiration):i()}):i()}_generateOAuthInfo(e){let r,n=null,i=e.portalUrl;const s=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){n=window.location.href;let l=n.indexOf("?");l>-1&&(n=n.slice(0,l)),l=n.search(/\/(apps|home)\//),n=l>-1?n.slice(0,l):null}return a&&n?(this._hasTestedIfAppIsOnPortal=!0,r=sa(n+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new hV({appId:"arcgisonline",popupCallbackUrl:n+"/home/oauth-callback.html"})})):r=Promise.resolve(),r.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),sa(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:Bd(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(l=>{if(l.data.valid){const u=this._defaultOAuthInfo.clone();l.data.urlKey&&s?u.portalUrl="https://"+l.data.urlKey.toLowerCase()+"."+s:u.portalUrl=i,u.popup=window!==window.top||!(Ad(i,this._appOrigin)||this._gwDomains.some(d=>d.regex.test(i)&&d.regex.test(this._appOrigin))),this.oAuthInfos.push(u)}})})}_doOAuthSignIn(e,r,n,i){const s=n._oAuthCred,o={portalUrl:n.portalUrl};!n.popup&&n.preserveUrlHash&&window.location.hash&&(o.hash=window.location.hash),s.stateUID&&(o.uid=s.stateUID);const a={client_id:n.appId,response_type:s.codeVerifier?"code":"token",state:JSON.stringify(o),expiration:n.expiration,locale:n.locale,redirect_uri:this._getRedirectURI(n,!!s.codeVerifier)};n.forceLogin&&(a.force_login=!0),n.forceUserId&&n.userId&&(a.prepopulatedusername=n.userId),!n.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),s.codeVerifier&&(a.code_challenge=i||s.codeVerifier,a.code_challenge_method=i?"S256":"plain");const l=n.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",u=l+"?"+v5(a);if(n.popup){const d=window.open(u,"esriJSAPIOAuth",n.popupWindowFeatures);if(d)d.focus(),this._oAuthDfd.oAuthWin_=d,this._oAuthIntervalId=setInterval(()=>{if(d.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const f=this._oAuthDfd;if(f){const m=new Pr("identity-manager:user-aborted","ABORTED");f.reject(m)}}},500),this._oAuthOnPopupHandle=r5(window,["arcgis:auth:hash","arcgis:auth:location:search"],f=>{f.type==="arcgis:auth:hash"?this.setOAuthResponseHash(f.detail):this._setOAuthResponseQueryString(f.detail)});else{const f=new Pr("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(f)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:l,resourceUrl:e,serverInfo:r,oAuthInfo:n}):window.location.href=u}_getRedirectURI(e,r){const n=window.location.href.replace(/#.*$/,"");if(e.popup)return Bd(e.popupCallbackUrl);if(r){const i=fd(n);return i.query&&["code","error","error_description","message_code","persist","state"].forEach(s=>{delete i.query[s]}),jR(i.path,i.query)}return n}};xge.prototype.declaredClass="esri.identity.IdentityManagerBase";let Ya=class extends Kw.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e!=null&&e._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],this.creationTime==null&&(this.creationTime=Date.now())}refreshToken(){const e=ws,r=e.findServerInfo(this.server),n=r==null?void 0:r.owningSystemUrl,i=!!n&&this.scope==="server",s=i&&FV(r,e._legacyFed),o=r.webTierAuth,a=o&&e.normalizeWebTierAuth,l=XR[this.server],u=l==null?void 0:l[this.userId];let d,f=this.resources&&this.resources[0],m=i?e.findServerInfo(n):null,v={username:this.userId,password:u};if(o&&!a)return;i&&!m&&e.serverInfos.some(M=>(e._isIdProvider(n,M.server)&&(m=M),!!m));const b=m?e.findCredential(m.server,this.userId):null;if(!i||b){if(!s){if(i)d={serverUrl:f,token:b==null?void 0:b.token,ssl:b==null?void 0:b.ssl};else if(a)v=null,d={ssl:this.ssl};else{if(!u){let M;return f&&(f=e._sanitizeUrl(f),this._enqueued=1,M=e._enqueue(f,r,null,null,this.isAdmin,this),M.then(()=>{this._enqueued=0,this.refreshServerTokens()}).catch(()=>{this._enqueued=0})),M}this.isAdmin&&(d={isAdmin:!0})}return e.generateToken(i?m:r,i?null:v,d).then(M=>{this.token=M.token,this.expires=M.expires!=null?Number(M.expires):null,this.creationTime=Date.now(),this.validity=M.validity,this.emitTokenChange(),this.refreshServerTokens()}).catch(()=>{})}b==null||b.refreshToken()}}refreshServerTokens(){if(this.scope==="portal"){const e=ws;e.credentials.forEach(r=>{const n=e.findServerInfo(r.server),i=n==null?void 0:n.owningSystemUrl;r!==this&&r.userId===this.userId&&i&&r.scope==="server"&&(e._hasSameServerInstance(this.server,i)||e._isIdProvider(i,this.server))&&(FV(n,e._legacyFed)?(r.token=this.token,r.expires=this.expires,r.creationTime=this.creationTime,r.validity=this.validity,r.emitTokenChange()):r.refreshToken())})}}emitTokenChange(e){clearTimeout(this._refreshTimer);const r=ws,n=this.server?r.findServerInfo(this.server):null,i=n==null?void 0:n.owningSystemUrl,s=i?r.findServerInfo(i):null;e===!1||i&&this.scope!=="portal"&&(!(s!=null&&s.webTierAuth)||r.normalizeWebTierAuth)||this.expires==null&&this.validity==null||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=ws,r=e.credentials.indexOf(this);r>-1&&e.credentials.splice(r,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=FZ({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),r=this.resources;return r&&r.length>0&&(e.resources=r.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,r=2**31-1;let n=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();n<0?n=0:n>r&&(n=r),this._refreshTimer=setTimeout(this.refreshToken.bind(this),n>e?n-e:n)}};T([B()],Ya.prototype,"creationTime",void 0),T([B()],Ya.prototype,"expires",void 0),T([B()],Ya.prototype,"isAdmin",void 0),T([B()],Ya.prototype,"oAuthState",void 0),T([B()],Ya.prototype,"resources",void 0),T([B()],Ya.prototype,"scope",void 0),T([B()],Ya.prototype,"server",void 0),T([B()],Ya.prototype,"ssl",void 0),T([B()],Ya.prototype,"token",void 0),T([B()],Ya.prototype,"tokenRefreshBuffer",void 0),T([B()],Ya.prototype,"userId",void 0),T([B()],Ya.prototype,"validity",void 0),Ya=T([_t("esri.identity.Credential")],Ya);let wge=class extends xge{};wge.prototype.declaredClass="esri.identity.IdentityManager";const F3=new wge;oPe(F3);const YFe=Object.freeze(Object.defineProperty({__proto__:null,default:F3},Symbol.toStringTag,{value:"Module"})),bge=E.createContext(),XFe=({children:t})=>{const[e,r]=E.useState(!1),[n,i]=E.useState(""),[s,o]=E.useState(null),a="https://detroitmi.maps.arcgis.com";E.useEffect(()=>{const f=new hV({appId:"0baTjvsIAAccckbL",popup:!1});F3.registerOAuthInfos([f]),F3.checkSignInStatus(a+"/sharing").then(()=>{r(!0),l()}).catch(()=>{r(!1)})},[]);const l=()=>{F3.getCredential(a+"/sharing").then(f=>{i(f.userId),o(f.token)}).catch(f=>{console.error(f)})},u=()=>{F3.getCredential(a).then(()=>{r(!0),l(),navigat}).catch(f=>{console.error(f)})},d=()=>{F3.destroyCredentials(),r(!1),i(""),o(null)};return oe.jsx(bge.Provider,{value:{isAuthenticated:e,token:s,username:n,handleSignIn:u,handleSignOut:d},children:t})},G5=()=>E.useContext(bge);function Qe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}var JFe=["color"],KFe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JFe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877197 7.49984C0.877197 3.84216 3.84234 0.877014 7.50003 0.877014C11.1577 0.877014 14.1229 3.84216 14.1229 7.49984C14.1229 11.1575 11.1577 14.1227 7.50003 14.1227C3.84234 14.1227 0.877197 11.1575 0.877197 7.49984ZM7.50003 1.82701C4.36702 1.82701 1.8272 4.36683 1.8272 7.49984C1.8272 10.6328 4.36702 13.1727 7.50003 13.1727C10.633 13.1727 13.1729 10.6328 13.1729 7.49984C13.1729 4.36683 10.633 1.82701 7.50003 1.82701ZM7.12457 9.00001C7.06994 9.12735 6.33165 11.9592 6.33165 11.9592C6.26018 12.226 5.98601 12.3843 5.71928 12.3128C5.45255 12.2413 5.29425 11.9672 5.36573 11.7004C5.36573 11.7004 6.24661 8.87268 6.24661 8.27007V6.80099L4.28763 6.27608C4.0209 6.20461 3.86261 5.93045 3.93408 5.66371C4.00555 5.39698 4.27972 5.23869 4.54645 5.31016C4.54645 5.31016 6.20042 5.87268 6.84579 5.87268H8.15505C8.80042 5.87268 10.4534 5.31042 10.4534 5.31042C10.7202 5.23895 10.9943 5.39724 11.0658 5.66397C11.1373 5.93071 10.979 6.20487 10.7122 6.27635L8.74661 6.80303V8.27007C8.74661 8.87268 9.62663 11.6971 9.62663 11.6971C9.6981 11.9639 9.5398 12.238 9.27307 12.3095C9.00634 12.381 8.73217 12.2227 8.6607 11.956C8.6607 11.956 7.91994 9.12735 7.86866 9.00001C7.81994 8.87268 7.65006 8.87268 7.65006 8.87268H7.34317C7.34317 8.87268 7.16994 8.87268 7.12457 9.00001ZM7.50043 5.12007C8.12175 5.12007 8.62543 4.61639 8.62543 3.99507C8.62543 3.37375 8.12175 2.87007 7.50043 2.87007C6.87911 2.87007 6.37543 3.37375 6.37543 3.99507C6.37543 4.61639 6.87911 5.12007 7.50043 5.12007Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),QFe=["color"],eze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,QFe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0 1.5C0 1.22386 0.223858 1 0.5 1H2.5C2.77614 1 3 1.22386 3 1.5C3 1.77614 2.77614 2 2.5 2H0.5C0.223858 2 0 1.77614 0 1.5ZM4 1.5C4 1.22386 4.22386 1 4.5 1H14.5C14.7761 1 15 1.22386 15 1.5C15 1.77614 14.7761 2 14.5 2H4.5C4.22386 2 4 1.77614 4 1.5ZM4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5C12 4.77614 11.7761 5 11.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM0 7.5C0 7.22386 0.223858 7 0.5 7H2.5C2.77614 7 3 7.22386 3 7.5C3 7.77614 2.77614 8 2.5 8H0.5C0.223858 8 0 7.77614 0 7.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H4.5C4.22386 11 4 10.7761 4 10.5ZM0 13.5C0 13.2239 0.223858 13 0.5 13H2.5C2.77614 13 3 13.2239 3 13.5C3 13.7761 2.77614 14 2.5 14H0.5C0.223858 14 0 13.7761 0 13.5ZM4 13.5C4 13.2239 4.22386 13 4.5 13H14.5C14.7761 13 15 13.2239 15 13.5C15 13.7761 14.7761 14 14.5 14H4.5C4.22386 14 4 13.7761 4 13.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tze=["color"],rze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10.5 1.75003C10.7107 1.75003 10.8988 1.88217 10.9703 2.08042L13.9703 10.4C14.064 10.6598 13.9293 10.9463 13.6696 11.04C13.4098 11.1336 13.1233 10.999 13.0296 10.7392L12.0477 8.01606H8.95227L7.97031 10.7392C7.87664 10.999 7.59012 11.1336 7.33035 11.04C7.07058 10.9463 6.93593 10.6598 7.0296 10.4L10.0296 2.08042C10.1011 1.88217 10.2892 1.75003 10.5 1.75003ZM10.5 3.72402L11.7411 7.16606H9.25877L10.5 3.72402ZM2.49949 2.09997C2.7204 2.09997 2.89949 2.27906 2.89949 2.49997L2.89949 9.53428L4.21664 8.21713C4.37285 8.06092 4.62612 8.06092 4.78233 8.21713C4.93854 8.37334 4.93854 8.6266 4.78233 8.78281L2.78233 10.7828C2.70732 10.8578 2.60557 10.9 2.49949 10.9C2.3934 10.9 2.29166 10.8578 2.21664 10.7828L0.216645 8.78281C0.0604349 8.6266 0.0604349 8.37334 0.216645 8.21713C0.372854 8.06092 0.62612 8.06092 0.78233 8.21713L2.09949 9.53428L2.09949 2.49997C2.09949 2.27906 2.27857 2.09997 2.49949 2.09997ZM0.0999695 13.5001C0.0999695 13.2791 0.279056 13.1001 0.499969 13.1001H14.5C14.7209 13.1001 14.9 13.2791 14.9 13.5001C14.9 13.721 14.7209 13.9001 14.5 13.9001H0.499969C0.279056 13.9001 0.0999695 13.721 0.0999695 13.5001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nze=["color"],ize=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sze=["color"],oze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.99988 6C1.44759 6 0.999877 6.44772 0.999877 7L0.999877 8C0.999877 8.55228 1.44759 9 1.99988 9L6.99988 9L6.99988 13.5C6.99988 13.7761 7.22374 14 7.49988 14C7.77602 14 7.99988 13.7761 7.99988 13.5L7.99988 9L12.9999 9C13.5522 9 13.9999 8.55228 13.9999 8L13.9999 7C13.9999 6.44772 13.5522 6 12.9999 6L7.99988 6L7.99988 1.5C7.99988 1.22386 7.77602 1 7.49988 1C7.22373 1 6.99988 1.22386 6.99988 1.5L6.99988 6L1.99988 6Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aze=["color"],lze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.99988 1C6.44759 1 5.99988 1.44772 5.99988 2V7H1.49988C1.22374 7 0.999878 7.22386 0.999878 7.5C0.999878 7.77614 1.22374 8 1.49988 8H5.99988V13C5.99988 13.5523 6.44759 14 6.99988 14H7.99988C8.55216 14 8.99988 13.5523 8.99988 13V8H13.4999C13.776 8 13.9999 7.77614 13.9999 7.5C13.9999 7.22386 13.776 7 13.4999 7H8.99988V2C8.99988 1.44772 8.55216 1 7.99988 1L6.99988 1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uze=["color"],cze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hze=["color"],dze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fze=["color"],pze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mze=["color"],Cge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 0.75L9.75 3H5.25L7.5 0.75ZM7.5 14.25L9.75 12H5.25L7.5 14.25ZM3 5.25L0.75 7.5L3 9.75V5.25ZM14.25 7.5L12 5.25V9.75L14.25 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),gze=["color"],yze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,gze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.8914 2.1937C9.1158 2.35464 9.16725 2.66701 9.00631 2.89141L2.47388 12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7762 13.7761 13 13.5 13H1.5C1.31254 13 1.14082 12.8952 1.0552 12.7284C0.969578 12.5616 0.984438 12.361 1.09369 12.2086L8.19369 2.30862C8.35462 2.08422 8.667 2.03277 8.8914 2.1937ZM11.1 6.50001C11.1 6.22387 11.3238 6.00001 11.6 6.00001C11.8761 6.00001 12.1 6.22387 12.1 6.50001C12.1 6.77615 11.8761 7.00001 11.6 7.00001C11.3238 7.00001 11.1 6.77615 11.1 6.50001ZM10.4 4.00001C10.1239 4.00001 9.90003 4.22387 9.90003 4.50001C9.90003 4.77615 10.1239 5.00001 10.4 5.00001C10.6762 5.00001 10.9 4.77615 10.9 4.50001C10.9 4.22387 10.6762 4.00001 10.4 4.00001ZM12.1 8.50001C12.1 8.22387 12.3238 8.00001 12.6 8.00001C12.8761 8.00001 13.1 8.22387 13.1 8.50001C13.1 8.77615 12.8761 9.00001 12.6 9.00001C12.3238 9.00001 12.1 8.77615 12.1 8.50001ZM13.4 10C13.1239 10 12.9 10.2239 12.9 10.5C12.9 10.7761 13.1239 11 13.4 11C13.6762 11 13.9 10.7761 13.9 10.5C13.9 10.2239 13.6762 10 13.4 10Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),vze=["color"],_ze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,vze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.30902 1C2.93025 1 2.58398 1.214 2.41459 1.55279L1.05279 4.27639C1.01807 4.34582 1 4.42238 1 4.5V13C1 13.5523 1.44772 14 2 14H13C13.5523 14 14 13.5523 14 13V4.5C14 4.42238 13.9819 4.34582 13.9472 4.27639L12.5854 1.55281C12.416 1.21403 12.0698 1.00003 11.691 1.00003L7.5 1.00001L3.30902 1ZM3.30902 2L7 2.00001V4H2.30902L3.30902 2ZM8 4V2.00002L11.691 2.00003L12.691 4H8ZM7.5 5H13V13H2V5H7.5ZM5.5 7C5.22386 7 5 7.22386 5 7.5C5 7.77614 5.22386 8 5.5 8H9.5C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7H5.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xze=["color"],wze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.3536 3.64644C11.5488 3.8417 11.5488 4.15828 11.3536 4.35354L4.70711 11L9 11C9.27614 11 9.5 11.2239 9.5 11.5C9.5 11.7761 9.27614 12 9 12L3.5 12C3.36739 12 3.24021 11.9473 3.14645 11.8536C3.05268 11.7598 3 11.6326 3 11.5L3 5.99999C3 5.72385 3.22386 5.49999 3.5 5.49999C3.77614 5.49999 4 5.72385 4 5.99999V10.2929L10.6464 3.64643C10.8417 3.45117 11.1583 3.45117 11.3536 3.64644Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),bze=["color"],Cze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,bze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.64645 3.64644C3.45118 3.8417 3.45118 4.15828 3.64645 4.35354L10.2929 11L6 11C5.72386 11 5.5 11.2239 5.5 11.5C5.5 11.7761 5.72386 12 6 12L11.5 12C11.6326 12 11.7598 11.9473 11.8536 11.8536C11.9473 11.7598 12 11.6326 12 11.5L12 5.99999C12 5.72385 11.7761 5.49999 11.5 5.49999C11.2239 5.49999 11 5.72385 11 5.99999V10.2929L4.35355 3.64643C4.15829 3.45117 3.84171 3.45117 3.64645 3.64644Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Sze=["color"],Eze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Sze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Mze=["color"],Sge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Mze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Tze=["color"],p2=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Tze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Ize=["color"],Rze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Ize);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.3536 11.3536C11.5488 11.1583 11.5488 10.8417 11.3536 10.6465L4.70711 4L9 4C9.27614 4 9.5 3.77614 9.5 3.5C9.5 3.22386 9.27614 3 9 3L3.5 3C3.36739 3 3.24021 3.05268 3.14645 3.14645C3.05268 3.24022 3 3.36739 3 3.5L3 9.00001C3 9.27615 3.22386 9.50001 3.5 9.50001C3.77614 9.50001 4 9.27615 4 9.00001V4.70711L10.6464 11.3536C10.8417 11.5488 11.1583 11.5488 11.3536 11.3536Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Lze=["color"],kze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Lze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Aze=["color"],Pze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Aze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$ze=["color"],Ege=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$ze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.5 2H12.5C12.7761 2 13 2.22386 13 2.5V12.5C13 12.7761 12.7761 13 12.5 13H2.5C2.22386 13 2 12.7761 2 12.5V2.5C2 2.22386 2.22386 2 2.5 2ZM1 2.5C1 1.67157 1.67157 1 2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5ZM7.5 4C7.77614 4 8 3.77614 8 3.5C8 3.22386 7.77614 3 7.5 3C7.22386 3 7 3.22386 7 3.5C7 3.77614 7.22386 4 7.5 4ZM8 5.5C8 5.77614 7.77614 6 7.5 6C7.22386 6 7 5.77614 7 5.5C7 5.22386 7.22386 5 7.5 5C7.77614 5 8 5.22386 8 5.5ZM7.5 8C7.77614 8 8 7.77614 8 7.5C8 7.22386 7.77614 7 7.5 7C7.22386 7 7 7.22386 7 7.5C7 7.77614 7.22386 8 7.5 8ZM10 7.5C10 7.77614 9.77614 8 9.5 8C9.22386 8 9 7.77614 9 7.5C9 7.22386 9.22386 7 9.5 7C9.77614 7 10 7.22386 10 7.5ZM11.5 8C11.7761 8 12 7.77614 12 7.5C12 7.22386 11.7761 7 11.5 7C11.2239 7 11 7.22386 11 7.5C11 7.77614 11.2239 8 11.5 8Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Oze=["color"],Nze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Oze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Dze=["color"],Fze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Dze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 1C5 0.447715 5.44772 0 6 0H9C9.55228 0 10 0.447715 10 1V2H14C14.5523 2 15 2.44772 15 3V6C15 6.8888 14.6131 7.68734 14 8.23608V11.5C14 12.3284 13.3284 13 12.5 13H2.5C1.67157 13 1 12.3284 1 11.5V8.2359C0.38697 7.68721 0 6.88883 0 6V3C0 2.44772 0.447716 2 1 2H5V1ZM9 1V2H6V1H9ZM1 3H5H5.5H9.5H10H14V6C14 6.654 13.6866 7.23467 13.1997 7.6004C12.8655 7.85144 12.4508 8 12 8H8V7.5C8 7.22386 7.77614 7 7.5 7C7.22386 7 7 7.22386 7 7.5V8H3C2.5493 8 2.1346 7.85133 1.80029 7.60022C1.31335 7.23446 1 6.65396 1 6V3ZM7 9H3C2.64961 9 2.31292 8.93972 2 8.82905V11.5C2 11.7761 2.22386 12 2.5 12H12.5C12.7761 12 13 11.7761 13 11.5V8.82915C12.6871 8.93978 12.3504 9 12 9H8V9.5C8 9.77614 7.77614 10 7.5 10C7.22386 10 7 9.77614 7 9.5V9Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zze=["color"],Bze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 6H11.5C12.3284 6 13 6.67157 13 7.5C13 8.32843 12.3284 9 11.5 9H3.5C2.67157 9 2 8.32843 2 7.5C2 6.67157 2.67157 6 3.5 6ZM1 7.5C1 6.11929 2.11929 5 3.5 5H11.5C12.8807 5 14 6.11929 14 7.5C14 8.88071 12.8807 10 11.5 10H3.5C2.11929 10 1 8.88071 1 7.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jze=["color"],Vze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.5 1C11.7761 1 12 1.22386 12 1.5V13.5C12 13.7761 11.7761 14 11.5 14C11.2239 14 11 13.7761 11 13.5V1.5C11 1.22386 11.2239 1 11.5 1ZM9.5 3C9.77614 3 10 3.22386 10 3.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5V3.5C9 3.22386 9.22386 3 9.5 3ZM13.5 3C13.7761 3 14 3.22386 14 3.5V13.5C14 13.7761 13.7761 14 13.5 14C13.2239 14 13 13.7761 13 13.5V3.5C13 3.22386 13.2239 3 13.5 3ZM5.5 4C5.77614 4 6 4.22386 6 4.5V13.5C6 13.7761 5.77614 14 5.5 14C5.22386 14 5 13.7761 5 13.5V4.5C5 4.22386 5.22386 4 5.5 4ZM1.5 5C1.77614 5 2 5.22386 2 5.5V13.5C2 13.7761 1.77614 14 1.5 14C1.22386 14 1 13.7761 1 13.5V5.5C1 5.22386 1.22386 5 1.5 5ZM7.5 5C7.77614 5 8 5.22386 8 5.5V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.5C7 5.22386 7.22386 5 7.5 5ZM3.5 7C3.77614 7 4 7.22386 4 7.5V13.5C4 13.7761 3.77614 14 3.5 14C3.22386 14 3 13.7761 3 13.5V7.5C3 7.22386 3.22386 7 3.5 7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Uze=["color"],Hze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Uze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.60124 1.25086C8.60124 1.75459 8.26278 2.17927 7.80087 2.30989C10.1459 2.4647 12 4.41582 12 6.79999V10.25C12 11.0563 12.0329 11.7074 12.7236 12.0528C12.931 12.1565 13.0399 12.3892 12.9866 12.6149C12.9333 12.8406 12.7319 13 12.5 13H8.16144C8.36904 13.1832 8.49997 13.4513 8.49997 13.75C8.49997 14.3023 8.05226 14.75 7.49997 14.75C6.94769 14.75 6.49997 14.3023 6.49997 13.75C6.49997 13.4513 6.63091 13.1832 6.83851 13H2.49999C2.2681 13 2.06664 12.8406 2.01336 12.6149C1.96009 12.3892 2.06897 12.1565 2.27638 12.0528C2.96708 11.7074 2.99999 11.0563 2.99999 10.25V6.79999C2.99999 4.41537 4.85481 2.46396 7.20042 2.3098C6.73867 2.17908 6.40036 1.75448 6.40036 1.25086C6.40036 0.643104 6.89304 0.150421 7.5008 0.150421C8.10855 0.150421 8.60124 0.643104 8.60124 1.25086ZM7.49999 3.29999C5.56699 3.29999 3.99999 4.86699 3.99999 6.79999V10.25L4.00002 10.3009C4.0005 10.7463 4.00121 11.4084 3.69929 12H11.3007C10.9988 11.4084 10.9995 10.7463 11 10.3009L11 10.25V6.79999C11 4.86699 9.43299 3.29999 7.49999 3.29999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Gze=["color"],qze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Gze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 9C3 6.5 4.5 4.25 7.5 1.5C10.5 4.25 12 6.5 12 9C12 11.4853 9.98528 13.5 7.5 13.5C5.01472 13.5 3 11.4853 3 9ZM10.9524 8.30307C9.67347 7.82121 8.2879 8.46208 6.98956 9.06259C5.9327 9.55142 4.93365 10.0135 4.09695 9.82153C4.03357 9.55804 4 9.28294 4 9C4 7.11203 5.02686 5.27195 7.5 2.87357C9.66837 4.97639 10.725 6.65004 10.9524 8.30307Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Wze=["color"],Zze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Wze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 2.5C3 2.22386 3.22386 2 3.5 2H11.5C11.7761 2 12 2.22386 12 2.5V13.5C12 13.6818 11.9014 13.8492 11.7424 13.9373C11.5834 14.0254 11.3891 14.0203 11.235 13.924L7.5 11.5896L3.765 13.924C3.61087 14.0203 3.41659 14.0254 3.25762 13.9373C3.09864 13.8492 3 13.6818 3 13.5V2.5ZM4 3V12.5979L6.97 10.7416C7.29427 10.539 7.70573 10.539 8.03 10.7416L11 12.5979V3H4Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Yze=["color"],Xze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Yze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 2C3.22386 2 3 2.22386 3 2.5V13.5C3 13.6818 3.09864 13.8492 3.25762 13.9373C3.41659 14.0254 3.61087 14.0203 3.765 13.924L7.5 11.5896L11.235 13.924C11.3891 14.0203 11.5834 14.0254 11.7424 13.9373C11.9014 13.8492 12 13.6818 12 13.5V2.5C12 2.22386 11.7761 2 11.5 2H3.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Jze=["color"],Kze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Jze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("rect",{x:"7",y:"5",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"3",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"9",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"11",width:"1",height:"1",rx:".5",fill:n}))}),Qze=["color"],eBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Qze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 13.25L14 13.25V14.75L1 14.75V13.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("rect",{x:"7",y:"5",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"5",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"3",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"3",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"9",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"9",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"11",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"11",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"5",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"3",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"7",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"1",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"9",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"11",width:"1",height:"1",rx:".5",fill:n}))}),tBe=["color"],rBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nBe=["color"],iBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sBe=["color"],oBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.75 1L1.75 14L0.249999 14L0.25 1L1.75 1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("rect",{x:"10",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 10 7)",fill:n}),E.createElement("rect",{x:"10",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 10 13)",fill:n}),E.createElement("rect",{x:"12",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 12 7)",fill:n}),E.createElement("rect",{x:"12",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 12 13)",fill:n}),E.createElement("rect",{x:"8",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 8 7)",fill:n}),E.createElement("rect",{x:"14",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 14 7)",fill:n}),E.createElement("rect",{x:"8",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 8 13)",fill:n}),E.createElement("rect",{x:"14",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 14 13)",fill:n}),E.createElement("rect",{x:"8",y:"5",width:"1",height:"1",rx:".5",transform:"rotate(90 8 5)",fill:n}),E.createElement("rect",{x:"14",y:"5",width:"1",height:"1",rx:".5",transform:"rotate(90 14 5)",fill:n}),E.createElement("rect",{x:"8",y:"3",width:"1",height:"1",rx:".5",transform:"rotate(90 8 3)",fill:n}),E.createElement("rect",{x:"14",y:"3",width:"1",height:"1",rx:".5",transform:"rotate(90 14 3)",fill:n}),E.createElement("rect",{x:"8",y:"9",width:"1",height:"1",rx:".5",transform:"rotate(90 8 9)",fill:n}),E.createElement("rect",{x:"14",y:"9",width:"1",height:"1",rx:".5",transform:"rotate(90 14 9)",fill:n}),E.createElement("rect",{x:"8",y:"11",width:"1",height:"1",rx:".5",transform:"rotate(90 8 11)",fill:n}),E.createElement("rect",{x:"14",y:"11",width:"1",height:"1",rx:".5",transform:"rotate(90 14 11)",fill:n}),E.createElement("rect",{x:"6",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 6 7)",fill:n}),E.createElement("rect",{x:"6",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 6 13)",fill:n}),E.createElement("rect",{x:"4",y:"7",width:"1",height:"1",rx:".5",transform:"rotate(90 4 7)",fill:n}),E.createElement("rect",{x:"4",y:"13",width:"1",height:"1",rx:".5",transform:"rotate(90 4 13)",fill:n}),E.createElement("rect",{x:"10",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 10 1)",fill:n}),E.createElement("rect",{x:"12",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 12 1)",fill:n}),E.createElement("rect",{x:"8",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 8 1)",fill:n}),E.createElement("rect",{x:"14",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 14 1)",fill:n}),E.createElement("rect",{x:"6",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 6 1)",fill:n}),E.createElement("rect",{x:"4",y:"1",width:"1",height:"1",rx:".5",transform:"rotate(90 4 1)",fill:n}))}),aBe=["color"],lBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("rect",{x:"7",y:"5.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"5.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"3.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"3.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"9.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"9.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"11.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"11.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"5.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"3.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"9.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"11.025",width:"1",height:"1",rx:".5",fill:n}))}),uBe=["color"],cBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.25 1L13.25 14L14.75 14L14.75 1L13.25 1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 5 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 5 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 3 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 3 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 5)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 5)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 3)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 3)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 9)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 9)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 11)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 11)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 9 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 9 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 11 7)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 11 13)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 5 1)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 3 1)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 7 1)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 1 1)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 9 1)",fill:n}),E.createElement("rect",{width:"1",height:"1",rx:".5",transform:"matrix(0 1 1 0 11 1)",fill:n}))}),hBe=["color"],dBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fBe=["color"],pBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("rect",{x:"7",y:"5.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"3.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"13.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"1.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"13",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"5",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"3",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"9",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"11",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"9.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"7",y:"11.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("rect",{x:"1",y:"7.025",width:"1",height:"1",rx:".5",fill:n}),E.createElement("path",{d:"M1 1.49994C1 1.2238 1.22386 0.999939 1.5 0.999939H6V1.99994H2V5.99994H1V1.49994ZM13 1.99994H9V0.999939H13.5C13.7761 0.999939 14 1.2238 14 1.49994V5.99994H13V1.99994ZM1 13.4999V8.99994H2V12.9999H6V13.9999H1.5C1.22386 13.9999 1 13.7761 1 13.4999ZM13 12.9999V8.99994H14V13.4999C14 13.7761 13.7761 13.9999 13.5 13.9999H9.5V12.9999H13Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mBe=["color"],gBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H3.5C3.77614 7 4 7.22386 4 7.5C4 7.77614 3.77614 8 3.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11C1.77614 11 2 11.2239 2 11.5C2 11.7761 1.77614 12 1.5 12C1.22386 12 1 11.7761 1 11.5ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11ZM11 11.5C11 11.2239 11.2239 11 11.5 11C11.7761 11 12 11.2239 12 11.5C12 11.7761 11.7761 12 11.5 12C11.2239 12 11 11.7761 11 11.5ZM13.5 11C13.2239 11 13 11.2239 13 11.5C13 11.7761 13.2239 12 13.5 12C13.7761 12 14 11.7761 14 11.5C14 11.2239 13.7761 11 13.5 11ZM6.5 7C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H8.5C8.77614 8 9 7.77614 9 7.5C9 7.22386 8.77614 7 8.5 7H6.5ZM11 7.5C11 7.22386 11.2239 7 11.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H11.5C11.2239 8 11 7.77614 11 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yBe=["color"],vBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14 1.75L1 1.75L1 0.249999L14 0.25L14 1.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("rect",{x:"8",y:"10",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 10)",fill:n}),E.createElement("rect",{x:"2",y:"10",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 10)",fill:n}),E.createElement("rect",{x:"8",y:"12",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 12)",fill:n}),E.createElement("rect",{x:"2",y:"12",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 12)",fill:n}),E.createElement("rect",{x:"8",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 8)",fill:n}),E.createElement("rect",{x:"8",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 14)",fill:n}),E.createElement("rect",{x:"2",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 8)",fill:n}),E.createElement("rect",{x:"2",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 14)",fill:n}),E.createElement("rect",{x:"10",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 10 8)",fill:n}),E.createElement("rect",{x:"10",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 10 14)",fill:n}),E.createElement("rect",{x:"12",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 12 8)",fill:n}),E.createElement("rect",{x:"12",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 12 14)",fill:n}),E.createElement("rect",{x:"6",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 6 8)",fill:n}),E.createElement("rect",{x:"6",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 6 14)",fill:n}),E.createElement("rect",{x:"4",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 4 8)",fill:n}),E.createElement("rect",{x:"4",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 4 14)",fill:n}),E.createElement("rect",{x:"8",y:"6",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 6)",fill:n}),E.createElement("rect",{x:"2",y:"6",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 6)",fill:n}),E.createElement("rect",{x:"8",y:"4",width:"1",height:"1",rx:".5",transform:"rotate(-180 8 4)",fill:n}),E.createElement("rect",{x:"2",y:"4",width:"1",height:"1",rx:".5",transform:"rotate(-180 2 4)",fill:n}),E.createElement("rect",{x:"14",y:"10",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 10)",fill:n}),E.createElement("rect",{x:"14",y:"12",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 12)",fill:n}),E.createElement("rect",{x:"14",y:"8",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 8)",fill:n}),E.createElement("rect",{x:"14",y:"14",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 14)",fill:n}),E.createElement("rect",{x:"14",y:"6",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 6)",fill:n}),E.createElement("rect",{x:"14",y:"4",width:"1",height:"1",rx:".5",transform:"rotate(-180 14 4)",fill:n}))}),_Be=["color"],xBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_Be);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 3H14V4H1V3ZM1 6H14V8H1V6ZM14 10.25H1V12.75H14V10.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wBe=["color"],bBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),CBe=["color"],SBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,CBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.99998 0.999976C1.44769 0.999976 0.999976 1.44769 0.999976 1.99998V13C0.999976 13.5523 1.44769 14 1.99998 14H13C13.5523 14 14 13.5523 14 13V1.99998C14 1.44769 13.5523 0.999976 13 0.999976H1.99998ZM1.99998 1.99998L13 1.99998V13H1.99998V1.99998ZM4.49996 3.99996C4.22382 3.99996 3.99996 4.22382 3.99996 4.49996V10.5C3.99996 10.7761 4.22382 11 4.49996 11H10.5C10.7761 11 11 10.7761 11 10.5V4.49996C11 4.22382 10.7761 3.99996 10.5 3.99996H4.49996ZM4.99996 9.99996V4.99996H9.99996V9.99996H4.99996Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),EBe=["color"],MBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 5H13C13.5523 5 14 5.44772 14 6V9C14 9.55228 13.5523 10 13 10H2C1.44772 10 1 9.55228 1 9V6C1 5.44772 1.44772 5 2 5ZM0 6C0 4.89543 0.895431 4 2 4H13C14.1046 4 15 4.89543 15 6V9C15 10.1046 14.1046 11 13 11H2C0.89543 11 0 10.1046 0 9V6ZM4.5 6.75C4.08579 6.75 3.75 7.08579 3.75 7.5C3.75 7.91421 4.08579 8.25 4.5 8.25C4.91421 8.25 5.25 7.91421 5.25 7.5C5.25 7.08579 4.91421 6.75 4.5 6.75ZM6.75 7.5C6.75 7.08579 7.08579 6.75 7.5 6.75C7.91421 6.75 8.25 7.08579 8.25 7.5C8.25 7.91421 7.91421 8.25 7.5 8.25C7.08579 8.25 6.75 7.91421 6.75 7.5ZM10.5 6.75C10.0858 6.75 9.75 7.08579 9.75 7.5C9.75 7.91421 10.0858 8.25 10.5 8.25C10.9142 8.25 11.25 7.91421 11.25 7.5C11.25 7.08579 10.9142 6.75 10.5 6.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),TBe=["color"],IBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,TBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),RBe=["color"],Mge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,RBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 3C1.44772 3 1 3.44772 1 4V11C1 11.5523 1.44772 12 2 12H13C13.5523 12 14 11.5523 14 11V4C14 3.44772 13.5523 3 13 3H2ZM0 4C0 2.89543 0.895431 2 2 2H13C14.1046 2 15 2.89543 15 4V11C15 12.1046 14.1046 13 13 13H2C0.895431 13 0 12.1046 0 11V4ZM2 4.25C2 4.11193 2.11193 4 2.25 4H4.75C4.88807 4 5 4.11193 5 4.25V5.75454C5 5.89261 4.88807 6.00454 4.75 6.00454H2.25C2.11193 6.00454 2 5.89261 2 5.75454V4.25ZM12.101 7.58421C12.101 9.02073 10.9365 10.1853 9.49998 10.1853C8.06346 10.1853 6.89893 9.02073 6.89893 7.58421C6.89893 6.14769 8.06346 4.98315 9.49998 4.98315C10.9365 4.98315 12.101 6.14769 12.101 7.58421ZM13.101 7.58421C13.101 9.57302 11.4888 11.1853 9.49998 11.1853C7.51117 11.1853 5.89893 9.57302 5.89893 7.58421C5.89893 5.5954 7.51117 3.98315 9.49998 3.98315C11.4888 3.98315 13.101 5.5954 13.101 7.58421Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),LBe=["color"],kBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,LBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H12.5C12.7761 3 13 3.22386 13 3.5V9.5C13 9.77614 12.7761 10 12.5 10H2.5C2.22386 10 2 9.77614 2 9.5V3.5ZM2 10.9146C1.4174 10.7087 1 10.1531 1 9.5V3.5C1 2.67157 1.67157 2 2.5 2H12.5C13.3284 2 14 2.67157 14 3.5V9.5C14 10.1531 13.5826 10.7087 13 10.9146V11.5C13 12.3284 12.3284 13 11.5 13H3.5C2.67157 13 2 12.3284 2 11.5V10.9146ZM12 11V11.5C12 11.7761 11.7761 12 11.5 12H3.5C3.22386 12 3 11.7761 3 11.5V11H12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ABe=["color"],PBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ABe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.5 3C2.22386 3 2 3.22386 2 3.5V9.5C2 9.77614 2.22386 10 2.5 10H12.5C12.7761 10 13 9.77614 13 9.5V3.5C13 3.22386 12.7761 3 12.5 3H2.5ZM1 9.5C1 10.1531 1.4174 10.7087 2 10.9146V11.5C2 12.3284 2.67157 13 3.5 13H11.5C12.3284 13 13 12.3284 13 11.5V10.9146C13.5826 10.7087 14 10.1531 14 9.5V3.5C14 2.67157 13.3284 2 12.5 2H2.5C1.67157 2 1 2.67157 1 3.5V9.5ZM12 11.5V11H3V11.5C3 11.7761 3.22386 12 3.5 12H11.5C11.7761 12 12 11.7761 12 11.5ZM5.5 6C5.22386 6 5 6.22386 5 6.5C5 6.77614 5.22386 7 5.5 7H9.5C9.77614 7 10 6.77614 10 6.5C10 6.22386 9.77614 6 9.5 6H5.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$Be=["color"],OBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$Be);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H12.5C12.7761 3 13 3.22386 13 3.5V9.5C13 9.77614 12.7761 10 12.5 10H2.5C2.22386 10 2 9.77614 2 9.5V3.5ZM2 10.9146C1.4174 10.7087 1 10.1531 1 9.5V3.5C1 2.67157 1.67157 2 2.5 2H12.5C13.3284 2 14 2.67157 14 3.5V9.5C14 10.1531 13.5826 10.7087 13 10.9146V11.5C13 12.3284 12.3284 13 11.5 13H3.5C2.67157 13 2 12.3284 2 11.5V10.9146ZM12 11V11.5C12 11.7761 11.7761 12 11.5 12H3.5C3.22386 12 3 11.7761 3 11.5V11H12ZM5 6.5C5 6.22386 5.22386 6 5.5 6H7V4.5C7 4.22386 7.22386 4 7.5 4C7.77614 4 8 4.22386 8 4.5V6H9.5C9.77614 6 10 6.22386 10 6.5C10 6.77614 9.77614 7 9.5 7H8V8.5C8 8.77614 7.77614 9 7.5 9C7.22386 9 7 8.77614 7 8.5V7H5.5C5.22386 7 5 6.77614 5 6.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),NBe=["color"],H$=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,NBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),DBe=["color"],FBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,DBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.81809 4.18179C8.99383 4.35753 8.99383 4.64245 8.81809 4.81819L6.13629 7.49999L8.81809 10.1818C8.99383 10.3575 8.99383 10.6424 8.81809 10.8182C8.64236 10.9939 8.35743 10.9939 8.1817 10.8182L5.1817 7.81819C5.09731 7.73379 5.0499 7.61933 5.0499 7.49999C5.0499 7.38064 5.09731 7.26618 5.1817 7.18179L8.1817 4.18179C8.35743 4.00605 8.64236 4.00605 8.81809 4.18179Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zBe=["color"],G$=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.18194 4.18185C6.35767 4.00611 6.6426 4.00611 6.81833 4.18185L9.81833 7.18185C9.90272 7.26624 9.95013 7.3807 9.95013 7.50005C9.95013 7.6194 9.90272 7.73386 9.81833 7.81825L6.81833 10.8182C6.6426 10.994 6.35767 10.994 6.18194 10.8182C6.0062 10.6425 6.0062 10.3576 6.18194 10.1819L8.86374 7.50005L6.18194 4.81825C6.0062 4.64251 6.0062 4.35759 6.18194 4.18185Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),BBe=["color"],jBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,BBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),VBe=["color"],UBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,VBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.18179 8.81819C4.00605 8.64245 4.00605 8.35753 4.18179 8.18179L7.18179 5.18179C7.26618 5.0974 7.38064 5.04999 7.49999 5.04999C7.61933 5.04999 7.73379 5.0974 7.81819 5.18179L10.8182 8.18179C10.9939 8.35753 10.9939 8.64245 10.8182 8.81819C10.6424 8.99392 10.3575 8.99392 10.1818 8.81819L7.49999 6.13638L4.81819 8.81819C4.64245 8.99392 4.35753 8.99392 4.18179 8.81819Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),HBe=["color"],GBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,HBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.5 3L2.5 3.00002C1.67157 3.00002 1 3.6716 1 4.50002V9.50003C1 10.3285 1.67157 11 2.5 11H7.50003C7.63264 11 7.75982 11.0527 7.85358 11.1465L10 13.2929V11.5C10 11.2239 10.2239 11 10.5 11H12.5C13.3284 11 14 10.3285 14 9.50003V4.5C14 3.67157 13.3284 3 12.5 3ZM2.49999 2.00002L12.5 2C13.8807 2 15 3.11929 15 4.5V9.50003C15 10.8807 13.8807 12 12.5 12H11V14.5C11 14.7022 10.8782 14.8845 10.6913 14.9619C10.5045 15.0393 10.2894 14.9965 10.1464 14.8536L7.29292 12H2.5C1.11929 12 0 10.8807 0 9.50003V4.50002C0 3.11931 1.11928 2.00003 2.49999 2.00002Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),qBe=["color"],WBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,qBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ZBe=["color"],kY=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ZBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),YBe=["color"],XBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,YBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 3H12V12H3L3 3ZM2 3C2 2.44771 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44771 13 2 12.5523 2 12V3ZM10.3498 5.51105C10.506 5.28337 10.4481 4.97212 10.2204 4.81587C9.99275 4.65961 9.6815 4.71751 9.52525 4.94519L6.64048 9.14857L5.19733 7.40889C5.02102 7.19635 4.7058 7.16699 4.49327 7.34329C4.28073 7.5196 4.25137 7.83482 4.42767 8.04735L6.2934 10.2964C6.39348 10.4171 6.54437 10.4838 6.70097 10.4767C6.85757 10.4695 7.00177 10.3894 7.09047 10.2601L10.3498 5.51105Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),JBe=["color"],KBe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),QBe=["color"],eje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,QBe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tje=["color"],rje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nje=["color"],ije=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sje=["color"],oje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aje=["color"],lje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.877075C3.84222 0.877075 0.877075 3.84222 0.877075 7.49991C0.877075 11.1576 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1576 14.1227 7.49991C14.1227 3.84222 11.1576 0.877075 7.49991 0.877075ZM3.85768 3.15057C4.84311 2.32448 6.11342 1.82708 7.49991 1.82708C10.6329 1.82708 13.1727 4.36689 13.1727 7.49991C13.1727 8.88638 12.6753 10.1567 11.8492 11.1421L3.85768 3.15057ZM3.15057 3.85768C2.32448 4.84311 1.82708 6.11342 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C8.88638 13.1727 10.1567 12.6753 11.1421 11.8492L3.15057 3.85768Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uje=["color"],cje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM11 2V2.25C11 2.66421 10.6642 3 10.25 3H4.75C4.33579 3 4 2.66421 4 2.25V2H3.5C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V2.5C12 2.22386 11.7761 2 11.5 2H11Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hje=["color"],dje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H7V13H3.5C3.22386 13 3 12.7761 3 12.5V2.5C3 2.22386 3.22386 2 3.5 2H4V2.25C4 2.66421 4.33579 3 4.75 3H10.25C10.6642 3 11 2.66421 11 2.25V2H11.5C11.7761 2 12 2.22386 12 2.5V7H13V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM9 8.5C9 8.77614 8.77614 9 8.5 9C8.22386 9 8 8.77614 8 8.5C8 8.22386 8.22386 8 8.5 8C8.77614 8 9 8.22386 9 8.5ZM10.5 9C10.7761 9 11 8.77614 11 8.5C11 8.22386 10.7761 8 10.5 8C10.2239 8 10 8.22386 10 8.5C10 8.77614 10.2239 9 10.5 9ZM13 8.5C13 8.77614 12.7761 9 12.5 9C12.2239 9 12 8.77614 12 8.5C12 8.22386 12.2239 8 12.5 8C12.7761 8 13 8.22386 13 8.5ZM14.5 9C14.7761 9 15 8.77614 15 8.5C15 8.22386 14.7761 8 14.5 8C14.2239 8 14 8.22386 14 8.5C14 8.77614 14.2239 9 14.5 9ZM15 10.5C15 10.7761 14.7761 11 14.5 11C14.2239 11 14 10.7761 14 10.5C14 10.2239 14.2239 10 14.5 10C14.7761 10 15 10.2239 15 10.5ZM14.5 13C14.7761 13 15 12.7761 15 12.5C15 12.2239 14.7761 12 14.5 12C14.2239 12 14 12.2239 14 12.5C14 12.7761 14.2239 13 14.5 13ZM14.5 15C14.7761 15 15 14.7761 15 14.5C15 14.2239 14.7761 14 14.5 14C14.2239 14 14 14.2239 14 14.5C14 14.7761 14.2239 15 14.5 15ZM8.5 11C8.77614 11 9 10.7761 9 10.5C9 10.2239 8.77614 10 8.5 10C8.22386 10 8 10.2239 8 10.5C8 10.7761 8.22386 11 8.5 11ZM9 12.5C9 12.7761 8.77614 13 8.5 13C8.22386 13 8 12.7761 8 12.5C8 12.2239 8.22386 12 8.5 12C8.77614 12 9 12.2239 9 12.5ZM8.5 15C8.77614 15 9 14.7761 9 14.5C9 14.2239 8.77614 14 8.5 14C8.22386 14 8 14.2239 8 14.5C8 14.7761 8.22386 15 8.5 15ZM11 14.5C11 14.7761 10.7761 15 10.5 15C10.2239 15 10 14.7761 10 14.5C10 14.2239 10.2239 14 10.5 14C10.7761 14 11 14.2239 11 14.5ZM12.5 15C12.7761 15 13 14.7761 13 14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5C12 14.7761 12.2239 15 12.5 15Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fje=["color"],pje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mje=["color"],gje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yje=["color"],vje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.71144 0.796902C7.57741 0.734357 7.42257 0.734357 7.28855 0.796902L1.28855 3.5969C1.11251 3.67905 0.999993 3.85573 0.999993 4.04999V10.95C0.999993 11.1443 1.11251 11.3209 1.28855 11.4031L7.28855 14.2031C7.42257 14.2656 7.57741 14.2656 7.71144 14.2031L13.7114 11.4031C13.8875 11.3209 14 11.1443 14 10.95V4.04999C14 3.85573 13.8875 3.67905 13.7114 3.5969L7.71144 0.796902ZM7.49999 3.15674L5.98039 2.51091L7.49999 1.80176L9.01959 2.51091L7.49999 3.15674ZM7.69556 4.16018L10.2382 3.07958L12.2719 4.02865L7.49999 6.05671L2.72808 4.02865L4.76181 3.07958L7.30442 4.16018C7.42939 4.2133 7.57059 4.2133 7.69556 4.16018ZM7.99999 6.93078L13 4.80578V7.92966L11.0821 8.8119C10.7273 8.97509 10.5 9.32988 10.5 9.72039V11.7982L7.99999 12.9649V6.93078ZM11.5 11.3316L13 10.6316V9.03039L11.5 9.72039V11.3316ZM6.99999 6.93078V12.9649L4.50231 11.7993V9.72036C4.50231 9.32985 4.27499 8.97506 3.92022 8.81187L1.99999 7.92856V4.80578L6.99999 6.93078ZM1.99999 10.6316L3.50231 11.3326L3.50231 9.72036L1.99999 9.02929V10.6316Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),_je=["color"],xje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_je);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.49985C0.877075 3.84216 3.84222 0.877014 7.49991 0.877014C11.1576 0.877014 14.1227 3.84216 14.1227 7.49985C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49985ZM3.78135 3.21565C4.68298 2.43239 5.83429 1.92904 7.09998 1.84089V6.53429L3.78135 3.21565ZM3.21567 3.78134C2.43242 4.68298 1.92909 5.83428 1.84095 7.09997H6.5343L3.21567 3.78134ZM6.5343 7.89997H1.84097C1.92916 9.16562 2.43253 10.3169 3.21579 11.2185L6.5343 7.89997ZM3.78149 11.7842C4.6831 12.5673 5.83435 13.0707 7.09998 13.1588V8.46566L3.78149 11.7842ZM7.89998 8.46566V13.1588C9.16559 13.0706 10.3168 12.5673 11.2184 11.7841L7.89998 8.46566ZM11.7841 11.2184C12.5673 10.3168 13.0707 9.16558 13.1588 7.89997H8.46567L11.7841 11.2184ZM8.46567 7.09997H13.1589C13.0707 5.83432 12.5674 4.68305 11.7842 3.78143L8.46567 7.09997ZM11.2185 3.21573C10.3169 2.43246 9.16565 1.92909 7.89998 1.8409V6.53429L11.2185 3.21573Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wje=["color"],bje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.00012 1.5C8.00012 1.22386 7.77626 1 7.50012 1C7.22398 1 7.00012 1.22386 7.00012 1.5V13.5C7.00012 13.7761 7.22398 14 7.50012 14C7.77626 14 8.00012 13.7761 8.00012 13.5V1.5ZM3.31812 5.818C3.49386 5.64227 3.49386 5.35734 3.31812 5.18161C3.14239 5.00587 2.85746 5.00587 2.68173 5.18161L0.681729 7.18161C0.505993 7.35734 0.505993 7.64227 0.681729 7.818L2.68173 9.818C2.85746 9.99374 3.14239 9.99374 3.31812 9.818C3.49386 9.64227 3.49386 9.35734 3.31812 9.18161L2.08632 7.9498H5.50017C5.7487 7.9498 5.95017 7.74833 5.95017 7.4998C5.95017 7.25128 5.7487 7.0498 5.50017 7.0498H2.08632L3.31812 5.818ZM12.3181 5.18161C12.1424 5.00587 11.8575 5.00587 11.6817 5.18161C11.506 5.35734 11.506 5.64227 11.6817 5.818L12.9135 7.0498H9.50017C9.25164 7.0498 9.05017 7.25128 9.05017 7.4998C9.05017 7.74833 9.25164 7.9498 9.50017 7.9498H12.9135L11.6817 9.18161C11.506 9.35734 11.506 9.64227 11.6817 9.818C11.8575 9.99374 12.1424 9.99374 12.3181 9.818L14.3181 7.818C14.4939 7.64227 14.4939 7.35734 14.3181 7.18161L12.3181 5.18161Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Cje=["color"],Sje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Cje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.14998 14V1H0.849976V14H2.14998ZM6.14998 14V1H4.84998V14H6.14998ZM10.15 1V14H8.84998V1H10.15ZM14.15 14V1H12.85V14H14.15Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Eje=["color"],Mje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Eje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.94969 7.49989C9.94969 8.85288 8.85288 9.94969 7.49989 9.94969C6.14691 9.94969 5.0501 8.85288 5.0501 7.49989C5.0501 6.14691 6.14691 5.0501 7.49989 5.0501C8.85288 5.0501 9.94969 6.14691 9.94969 7.49989ZM10.8632 8C10.6213 9.64055 9.20764 10.8997 7.49989 10.8997C5.79214 10.8997 4.37847 9.64055 4.13662 8H0.5C0.223858 8 0 7.77614 0 7.5C0 7.22386 0.223858 7 0.5 7H4.13659C4.37835 5.35935 5.79206 4.1001 7.49989 4.1001C9.20772 4.1001 10.6214 5.35935 10.8632 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H10.8632Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Tje=["color"],Ije=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Tje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.67129 3.14634C4.47603 3.34161 4.47603 3.65819 4.67129 3.85345L7.14616 6.32833C7.34142 6.52359 7.65801 6.52359 7.85327 6.32833L10.3281 3.85345C10.5234 3.65819 10.5234 3.34161 10.3281 3.14634L7.85327 0.671471C7.65801 0.476209 7.34142 0.476209 7.14616 0.671471L4.67129 3.14634ZM7.49971 5.26766L5.73195 3.4999L7.49971 1.73213L9.26748 3.4999L7.49971 5.26766ZM8.67129 7.14634C8.47603 7.34161 8.47603 7.65819 8.67129 7.85345L11.1462 10.3283C11.3414 10.5236 11.658 10.5236 11.8533 10.3283L14.3281 7.85345C14.5234 7.65819 14.5234 7.34161 14.3281 7.14634L11.8533 4.67147C11.658 4.47621 11.3414 4.47621 11.1462 4.67147L8.67129 7.14634ZM11.4997 9.26766L9.73195 7.4999L11.4997 5.73213L13.2675 7.4999L11.4997 9.26766ZM4.67129 11.8535C4.47603 11.6582 4.47603 11.3416 4.67129 11.1463L7.14616 8.67147C7.34142 8.47621 7.65801 8.47621 7.85327 8.67147L10.3281 11.1463C10.5234 11.3416 10.5234 11.6582 10.3281 11.8535L7.85327 14.3283C7.65801 14.5236 7.34142 14.5236 7.14616 14.3283L4.67129 11.8535ZM5.73195 11.4999L7.49971 13.2677L9.26748 11.4999L7.49971 9.73213L5.73195 11.4999ZM0.671288 7.14649C0.476026 7.34175 0.476026 7.65834 0.671288 7.8536L3.14616 10.3285C3.34142 10.5237 3.65801 10.5237 3.85327 10.3285L6.32814 7.8536C6.5234 7.65834 6.5234 7.34175 6.32814 7.14649L3.85327 4.67162C3.65801 4.47636 3.34142 4.47636 3.14616 4.67162L0.671288 7.14649ZM3.49972 9.26781L1.73195 7.50005L3.49972 5.73228L5.26748 7.50005L3.49972 9.26781Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Rje=["color"],Lje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Rje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.87935 1H3.9H11.1H11.1207C11.5231 0.999994 11.8553 0.999989 12.1259 1.0221C12.407 1.04506 12.6653 1.09434 12.908 1.21799C13.2843 1.40973 13.5903 1.7157 13.782 2.09202C13.9057 2.33469 13.9549 2.59304 13.9779 2.87409C14 3.14468 14 3.47686 14 3.87934V3.9V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H3.9H3.87934C3.47686 14 3.14468 14 2.87409 13.9779C2.59304 13.9549 2.33469 13.9057 2.09202 13.782C1.7157 13.5903 1.40973 13.2843 1.21799 12.908C1.09434 12.6653 1.04506 12.407 1.0221 12.1259C0.999989 11.8553 0.999994 11.5231 1 11.1207V11.1207V11.1V3.9V3.87935V3.87934C0.999994 3.47686 0.999989 3.14468 1.0221 2.87409C1.04506 2.59304 1.09434 2.33469 1.21799 2.09202C1.40973 1.7157 1.7157 1.40973 2.09202 1.21799C2.33469 1.09434 2.59304 1.04506 2.87409 1.0221C3.14469 0.999989 3.47687 0.999994 3.87935 1ZM2.95552 2.01878C2.73631 2.03669 2.62421 2.06915 2.54601 2.10899C2.35785 2.20487 2.20487 2.35785 2.10899 2.54601C2.06915 2.62421 2.03669 2.73631 2.01878 2.95552C2.00039 3.18056 2 3.47171 2 3.9V7H7V2H3.9C3.47171 2 3.18056 2.00039 2.95552 2.01878ZM7 8H2V11.1C2 11.5283 2.00039 11.8194 2.01878 12.0445C2.03669 12.2637 2.06915 12.3758 2.10899 12.454C2.20487 12.6422 2.35785 12.7951 2.54601 12.891C2.62421 12.9309 2.73631 12.9633 2.95552 12.9812C3.18056 12.9996 3.47171 13 3.9 13H7V8ZM8 8H13V11.1C13 11.5283 12.9996 11.8194 12.9812 12.0445C12.9633 12.2637 12.9309 12.3758 12.891 12.454C12.7951 12.6422 12.6422 12.7951 12.454 12.891C12.3758 12.9309 12.2637 12.9633 12.0445 12.9812C11.8194 12.9996 11.5283 13 11.1 13H8V8ZM13 7H8V2H11.1C11.5283 2 11.8194 2.00039 12.0445 2.01878C12.2637 2.03669 12.3758 2.06915 12.454 2.10899C12.6422 2.20487 12.7951 2.35785 12.891 2.54601C12.9309 2.62421 12.9633 2.73631 12.9812 2.95552C12.9996 3.18056 13 3.47171 13 3.9V7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),kje=["color"],Aje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,kje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.85367 1.48956C7.65841 1.29429 7.34182 1.29429 7.14656 1.48956L1.48971 7.14641C1.29445 7.34167 1.29445 7.65825 1.48971 7.85352L7.14656 13.5104C7.34182 13.7056 7.65841 13.7056 7.85367 13.5104L13.5105 7.85352C13.7058 7.65825 13.7058 7.34167 13.5105 7.14641L7.85367 1.48956ZM7.5 2.55033L2.55037 7.49996L7.5 12.4496V2.55033Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Pje=["color"],$je=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Pje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.1465 1.48959C7.34176 1.29432 7.65835 1.29432 7.85361 1.48959L13.5105 7.14644C13.7057 7.3417 13.7057 7.65829 13.5105 7.85355L7.85361 13.5104C7.65835 13.7057 7.34176 13.7057 7.1465 13.5104L1.48965 7.85355C1.29439 7.65829 1.29439 7.3417 1.48965 7.14644L7.1465 1.48959ZM7.50005 2.55025L2.55031 7.49999L7.50005 12.4497L12.4498 7.49999L7.50005 2.55025Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Oje=["color"],Nje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Oje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.85361 1.48959C7.65835 1.29432 7.34176 1.29432 7.1465 1.48959L1.48965 7.14644C1.29439 7.3417 1.29439 7.65829 1.48965 7.85355L3.9645 10.3284L1.64644 12.6464C1.45118 12.8417 1.45118 13.1583 1.64644 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.6716 11.0355L7.1465 13.5104C7.34176 13.7057 7.65835 13.7057 7.85361 13.5104L13.5105 7.85355C13.7057 7.65829 13.7057 7.3417 13.5105 7.14644L11.0356 4.67154L13.3535 2.35355C13.5488 2.15829 13.5488 1.84171 13.3535 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.3285 3.96443L7.85361 1.48959ZM9.62135 4.67154L7.50005 2.55025L2.55031 7.49999L4.6716 9.62129L9.62135 4.67154ZM5.37871 10.3284L7.50005 12.4497L12.4498 7.49999L10.3285 5.37865L5.37871 10.3284Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Dje=["color"],Fje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Dje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.8034 7.14644C12.9986 6.95118 13.3152 6.95118 13.5105 7.14644C13.7057 7.3417 13.7057 7.65829 13.5105 7.85355C13.3152 8.04881 12.9986 8.04881 12.8034 7.85355C12.6081 7.65828 12.6081 7.3417 12.8034 7.14644ZM12.0962 8.56065C12.2915 8.75592 12.2915 9.0725 12.0962 9.26776C11.901 9.46302 11.5844 9.46302 11.3891 9.26776C11.1939 9.0725 11.1939 8.75592 11.3891 8.56065C11.5844 8.36539 11.901 8.36539 12.0962 8.56065ZM10.682 9.97487C10.8773 10.1701 10.8773 10.4867 10.682 10.682C10.4868 10.8772 10.1702 10.8772 9.97493 10.682C9.77967 10.4867 9.77967 10.1701 9.97493 9.97487C10.1702 9.7796 10.4868 9.7796 10.682 9.97487ZM9.26782 11.3891C9.46308 11.5843 9.46308 11.9009 9.26782 12.0962C9.07256 12.2915 8.75598 12.2915 8.56071 12.0962C8.36545 11.9009 8.36545 11.5843 8.56072 11.3891C8.75598 11.1938 9.07256 11.1938 9.26782 11.3891ZM7.1465 13.5104C6.95124 13.3151 6.95124 12.9986 7.1465 12.8033C7.17091 12.7789 7.19721 12.7575 7.22494 12.7392C7.41901 12.6111 7.68275 12.6324 7.85361 12.8033C8.04887 12.9986 8.04887 13.3151 7.85361 13.5104C7.65835 13.7057 7.34176 13.7057 7.1465 13.5104Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M2.90386 8.56065C2.7086 8.75592 2.7086 9.0725 2.90386 9.26776 3.09912 9.46302 3.41571 9.46302 3.61097 9.26776 3.80623 9.0725 3.80623 8.75592 3.61097 8.56065 3.41571 8.36539 3.09912 8.36539 2.90386 8.56065zM4.31807 9.97487C4.12281 10.1701 4.12281 10.4867 4.31807 10.682 4.51334 10.8772 4.82992 10.8772 5.02518 10.682 5.22044 10.4867 5.22044 10.1701 5.02518 9.97487 4.82992 9.7796 4.51334 9.7796 4.31807 9.97487zM5.73229 11.3891C5.53703 11.5843 5.53703 11.9009 5.73229 12.0962 5.92755 12.2914 6.24413 12.2915 6.43939 12.0962 6.63466 11.9009 6.63466 11.5843 6.43939 11.3891 6.24413 11.1938 5.92755 11.1938 5.73229 11.3891zM2.19675 7.85355C2.36761 7.68269 2.38897 7.41895 2.26082 7.22488 2.09046 6.96684 1.71063 6.92546 1.48965 7.14644 1.29439 7.3417 1.29439 7.65829 1.48965 7.85355 1.68491 8.04881 2.00149 8.04881 2.19675 7.85355zM3.61097 5.73223C3.41571 5.53696 3.09912 5.53696 2.90386 5.73223 2.7086 5.92749 2.7086 6.24407 2.90386 6.43933 3.09912 6.6346 3.41571 6.6346 3.61097 6.43933 3.80623 6.24407 3.80623 5.92749 3.61097 5.73223zM5.02518 4.31801C4.82992 4.12275 4.51334 4.12275 4.31807 4.31801 4.12281 4.51328 4.12281 4.82986 4.31807 5.02512 4.51334 5.22038 4.82992 5.22038 5.02518 5.02512 5.22044 4.82986 5.22044 4.51328 5.02518 4.31801zM6.43939 2.9038C6.24413 2.70854 5.92755 2.70854 5.73229 2.9038 5.53703 3.09906 5.53703 3.41564 5.73229 3.61091 5.92755 3.80617 6.24413 3.80617 6.43939 3.61091 6.63466 3.41564 6.63466 3.09906 6.43939 2.9038zM7.85361 1.48959C7.65835 1.29432 7.34176 1.29432 7.1465 1.48959 6.95124 1.68485 6.95124 2.00143 7.1465 2.19669 7.34176 2.39196 7.65835 2.39196 7.85361 2.19669 8.04887 2.00143 8.04887 1.68485 7.85361 1.48959zM9.26782 2.9038C9.07256 2.70854 8.75598 2.70854 8.56071 2.9038 8.36545 3.09906 8.36545 3.41564 8.56071 3.61091 8.75598 3.80617 9.07256 3.80617 9.26782 3.61091 9.46308 3.41564 9.46308 3.09906 9.26782 2.9038zM10.682 4.31801C10.4868 4.12275 10.1702 4.12275 9.97493 4.31801 9.77967 4.51328 9.77967 4.82986 9.97493 5.02512 10.1702 5.22038 10.4868 5.22038 10.682 5.02512 10.8773 4.82986 10.8773 4.51328 10.682 4.31801zM12.0962 5.73223C11.901 5.53696 11.5844 5.53696 11.3891 5.73223 11.1939 5.92749 11.1939 6.24407 11.3891 6.43933 11.5844 6.6346 11.901 6.6346 12.0962 6.43933 12.2915 6.24407 12.2915 5.92749 12.0962 5.73223z",fill:n}))}),zje=["color"],Bje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 1.5C2 1.77614 1.77614 2 1.5 2C1.22386 2 1 1.77614 1 1.5C1 1.22386 1.22386 1 1.5 1C1.77614 1 2 1.22386 2 1.5ZM5 13H10V2L5 2L5 13ZM4 13C4 13.5523 4.44772 14 5 14H10C10.5523 14 11 13.5523 11 13V2C11 1.44772 10.5523 1 10 1H5C4.44772 1 4 1.44771 4 2V13ZM13.5 2C13.7761 2 14 1.77614 14 1.5C14 1.22386 13.7761 1 13.5 1C13.2239 1 13 1.22386 13 1.5C13 1.77614 13.2239 2 13.5 2ZM2 3.5C2 3.77614 1.77614 4 1.5 4C1.22386 4 1 3.77614 1 3.5C1 3.22386 1.22386 3 1.5 3C1.77614 3 2 3.22386 2 3.5ZM13.5 4C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3C13.2239 3 13 3.22386 13 3.5C13 3.77614 13.2239 4 13.5 4ZM2 5.5C2 5.77614 1.77614 6 1.5 6C1.22386 6 1 5.77614 1 5.5C1 5.22386 1.22386 5 1.5 5C1.77614 5 2 5.22386 2 5.5ZM13.5 6C13.7761 6 14 5.77614 14 5.5C14 5.22386 13.7761 5 13.5 5C13.2239 5 13 5.22386 13 5.5C13 5.77614 13.2239 6 13.5 6ZM2 7.5C2 7.77614 1.77614 8 1.5 8C1.22386 8 1 7.77614 1 7.5C1 7.22386 1.22386 7 1.5 7C1.77614 7 2 7.22386 2 7.5ZM13.5 8C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7C13.2239 7 13 7.22386 13 7.5C13 7.77614 13.2239 8 13.5 8ZM2 9.5C2 9.77614 1.77614 10 1.5 10C1.22386 10 1 9.77614 1 9.5C1 9.22386 1.22386 9 1.5 9C1.77614 9 2 9.22386 2 9.5ZM13.5 10C13.7761 10 14 9.77614 14 9.5C14 9.22386 13.7761 9 13.5 9C13.2239 9 13 9.22386 13 9.5C13 9.77614 13.2239 10 13.5 10ZM2 11.5C2 11.7761 1.77614 12 1.5 12C1.22386 12 1 11.7761 1 11.5C1 11.2239 1.22386 11 1.5 11C1.77614 11 2 11.2239 2 11.5ZM13.5 12C13.7761 12 14 11.7761 14 11.5C14 11.2239 13.7761 11 13.5 11C13.2239 11 13 11.2239 13 11.5C13 11.7761 13.2239 12 13.5 12ZM2 13.5C2 13.7761 1.77614 14 1.5 14C1.22386 14 1 13.7761 1 13.5C1 13.2239 1.22386 13 1.5 13C1.77614 13 2 13.2239 2 13.5ZM13.5 14C13.7761 14 14 13.7761 14 13.5C14 13.2239 13.7761 13 13.5 13C13.2239 13 13 13.2239 13 13.5C13 13.7761 13.2239 14 13.5 14Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jje=["color"],Vje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.0697 1.76746C12.4807 1.21947 11.4605 0.454311 11.0495 1.0023C10.6385 1.55028 11.6588 2.31544 12.0697 1.76746ZM8.39263 1.07811C7.15585 0.950602 5.7823 1.16348 4.58433 1.70937C3.38552 2.25563 2.32735 3.15309 1.78844 4.41832C1.37574 5.38724 1.01715 6.28113 1.00088 7.44354C0.984724 8.59844 1.30522 9.96898 2.13174 11.928C2.61142 13.0649 4.03963 13.5446 5.13895 13.8079C6.40836 14.1119 7.80857 14.1914 8.6644 14.0742C9.36515 13.9782 10.1448 13.8284 10.7987 13.297C11.8977 12.4039 12.9009 11.3955 13.4994 10.3393C14.104 9.27221 14.3256 8.09207 13.7216 6.95324C13.5628 6.65373 13.316 6.57734 13.0412 6.4923C12.9374 6.46016 12.8295 6.42678 12.7209 6.37966C11.6211 5.90234 10.9646 5.34963 10.9135 5.02876C10.8656 4.72808 10.9221 4.51463 10.9811 4.29181C11.0129 4.17199 11.0453 4.04947 11.0626 3.90922C11.0838 3.73737 11.0814 3.33319 10.6996 3.12761C10.4048 2.96888 10.2164 2.65843 10.0407 2.36904C9.99742 2.29775 9.95492 2.22773 9.9118 2.16158C9.62634 1.72367 9.20769 1.16213 8.39263 1.07811ZM4.99899 2.61935C3.96483 3.09058 3.12554 3.83097 2.70846 4.81018C2.29808 5.77368 2.01406 6.50873 2.00079 7.45753C1.98741 8.41385 2.25043 9.6368 3.0531 11.5393C3.39181 12.3421 4.62167 12.6557 5.37186 12.8354C6.5493 13.1174 7.822 13.1802 8.52868 13.0834C9.21271 12.9897 9.74568 12.8642 10.1681 12.5209C11.229 11.6587 12.121 10.7435 12.6293 9.84635C12.9349 9.30709 13.5141 7.7028 12.6292 7.3873C10.7539 6.71875 10.262 6.06669 9.99011 5.41268C9.80915 4.97744 9.82868 4.52282 9.95741 4.07885L9.95741 4.07884C9.97662 4.0126 9.99538 3.94791 10.0334 3.88882C9.81857 3.73676 9.6515 3.55195 9.51464 3.3715C9.42876 3.25828 9.3469 3.12099 9.26197 2.97856C9.01866 2.57052 8.75018 2.12027 8.29008 2.07283C7.22889 1.96343 6.03398 2.14772 4.99899 2.61935ZM13.2081 3.77471C13.441 3.22671 12.4547 2.63606 12.0822 3.10163C11.5817 3.72732 12.9029 4.49281 13.2081 3.77471ZM14.3672 2.26031C14.9668 2.27493 15.1551 1.11603 14.5718 0.949371C13.8076 0.731026 13.5918 2.24139 14.3672 2.26031ZM14.2857 5.09098C14.8644 5.10004 15.0462 4.38222 14.4832 4.27899C13.7455 4.14375 13.5373 5.07927 14.2857 5.09098ZM6.9075 4.28672C6.46898 4.66754 6.0522 4.15185 5.97983 3.7365C5.86848 3.09744 6.33696 2.56856 6.94823 2.91156C7.43344 3.18382 7.26678 3.97471 6.9075 4.28672ZM4.94455 5.88184C5.40885 5.41754 4.59567 4.57013 4.11425 5.05154C3.83338 5.33242 4.00936 5.65376 4.23744 5.88184C4.43271 6.0771 4.74929 6.0771 4.94455 5.88184ZM6.97716 6.71984C7.31181 7.38914 8.48804 6.79159 7.99413 6.14788C7.86519 5.97983 7.68657 5.9494 7.62145 5.94207C7.21217 5.89601 6.76349 6.2925 6.97716 6.71984ZM6.98798 8.72461C7.14066 9.1188 7.51122 9.3187 7.91915 9.1633C8.27434 9.02799 8.33186 8.39689 8.17175 8.07427C8.02331 7.77514 7.63956 7.67793 7.33747 7.79417C6.98512 7.92976 6.85672 8.38708 6.98576 8.71889L6.98798 8.72461ZM10.3885 8.84081C10.7575 8.6566 11.4617 8.82771 11.4617 9.31199C11.4617 9.71286 10.9587 10.2165 10.5634 10.2826C10.1813 10.3465 9.70515 9.97581 9.76648 9.57718C9.81445 9.26539 10.1217 8.97401 10.3885 8.84081ZM7.56704 10.8432C7.33461 10.7502 7.14353 10.8601 7.11437 10.8769L7.11279 10.8778C6.90782 10.9949 6.71383 11.2439 6.6747 11.4842C6.59018 12.0034 7.13199 12.1239 7.52661 12.0987C8.2074 12.0553 8.06547 11.0426 7.56704 10.8432ZM4.8805 10.8932C5.0674 10.7723 5.15658 10.5363 5.08293 10.3153C4.93046 9.79687 4.3246 9.71252 3.96561 10.1297C3.79336 10.3299 3.80749 10.6274 3.99214 10.8105L3.99495 10.814L3.9979 10.8176C4.22025 11.0942 4.63624 11.1857 4.8805 10.8932ZM3.04695 7.81318C3.33147 8.0977 3.60077 8.15067 3.98443 8.05859C4.60826 7.90887 4.13814 6.24299 3.047 6.87296C2.70939 7.06788 2.86716 7.63339 3.04695 7.81318Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Uje=["color"],Hje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Uje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Gje=["color"],qje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Gje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.87737 12H9.9H11.5C11.7761 12 12 11.7761 12 11.5C12 11.2239 11.7761 11 11.5 11H9.9C8.77164 11 7.95545 10.9996 7.31352 10.9472C6.67744 10.8952 6.25662 10.7946 5.91103 10.6185C5.25247 10.283 4.71703 9.74753 4.38148 9.08897C4.20539 8.74338 4.10481 8.32256 4.05284 7.68648C4.00039 7.04455 4 6.22836 4 5.1V3.5C4 3.22386 3.77614 3 3.5 3C3.22386 3 3 3.22386 3 3.5V5.1V5.12263C3 6.22359 3 7.08052 3.05616 7.76791C3.11318 8.46584 3.23058 9.0329 3.49047 9.54296C3.9219 10.3897 4.61031 11.0781 5.45704 11.5095C5.9671 11.7694 6.53416 11.8868 7.23209 11.9438C7.91948 12 8.77641 12 9.87737 12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Wje=["color"],Zje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Wje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.12263 12H5.1H3.5C3.22386 12 3 11.7761 3 11.5C3 11.2239 3.22386 11 3.5 11H5.1C6.22836 11 7.04455 10.9996 7.68648 10.9472C8.32256 10.8952 8.74338 10.7946 9.08897 10.6185C9.74753 10.283 10.283 9.74753 10.6185 9.08897C10.7946 8.74338 10.8952 8.32256 10.9472 7.68648C10.9996 7.04455 11 6.22836 11 5.1V3.5C11 3.22386 11.2239 3 11.5 3C11.7761 3 12 3.22386 12 3.5V5.1V5.12263C12 6.22359 12 7.08052 11.9438 7.76791C11.8868 8.46584 11.7694 9.0329 11.5095 9.54296C11.0781 10.3897 10.3897 11.0781 9.54296 11.5095C9.0329 11.7694 8.46584 11.8868 7.76791 11.9438C7.08052 12 6.22359 12 5.12263 12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Yje=["color"],Xje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Yje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.87737 3H9.9H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H9.9C8.77164 4 7.95545 4.00039 7.31352 4.05284C6.67744 4.10481 6.25662 4.20539 5.91103 4.38148C5.25247 4.71703 4.71703 5.25247 4.38148 5.91103C4.20539 6.25662 4.10481 6.67744 4.05284 7.31352C4.00039 7.95545 4 8.77164 4 9.9V11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5V9.9V9.87737C3 8.77641 3 7.91948 3.05616 7.23209C3.11318 6.53416 3.23058 5.9671 3.49047 5.45704C3.9219 4.61031 4.61031 3.9219 5.45704 3.49047C5.9671 3.23058 6.53416 3.11318 7.23209 3.05616C7.91948 3 8.77641 3 9.87737 3Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Jje=["color"],Kje=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Jje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.12263 3H5.1H3.5C3.22386 3 3 3.22386 3 3.5C3 3.77614 3.22386 4 3.5 4H5.1C6.22836 4 7.04455 4.00039 7.68648 4.05284C8.32256 4.10481 8.74338 4.20539 9.08897 4.38148C9.74753 4.71703 10.283 5.25247 10.6185 5.91103C10.7946 6.25662 10.8952 6.67744 10.9472 7.31352C10.9996 7.95545 11 8.77164 11 9.9V11.5C11 11.7761 11.2239 12 11.5 12C11.7761 12 12 11.7761 12 11.5V9.9V9.87737C12 8.77641 12 7.91948 11.9438 7.23209C11.8868 6.53416 11.7694 5.9671 11.5095 5.45704C11.0781 4.61031 10.3897 3.9219 9.54296 3.49047C9.0329 3.23058 8.46584 3.11318 7.76791 3.05616C7.08052 3 6.22359 3 5.12263 3Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Qje=["color"],eVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Qje);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.5 2L4.87935 2C4.47687 1.99999 4.14469 1.99999 3.87409 2.0221C3.59304 2.04506 3.33469 2.09434 3.09202 2.21799C2.7157 2.40973 2.40973 2.7157 2.21799 3.09202C2.09434 3.33469 2.04506 3.59304 2.0221 3.87409C1.99999 4.14468 1.99999 4.47686 2 4.87933V4.87935V5.5C2 5.77614 2.22386 6 2.5 6C2.77614 6 3 5.77614 3 5.5V4.9C3 4.47171 3.00039 4.18056 3.01878 3.95552C3.03669 3.73631 3.06915 3.62421 3.10899 3.54601C3.20487 3.35785 3.35785 3.20487 3.54601 3.10899C3.62421 3.06915 3.73631 3.03669 3.95552 3.01878C4.18056 3.00039 4.47171 3 4.9 3H5.5C5.77614 3 6 2.77614 6 2.5C6 2.22386 5.77614 2 5.5 2ZM13 9.5C13 9.22386 12.7761 9 12.5 9C12.2239 9 12 9.22386 12 9.5V10.1C12 10.5283 11.9996 10.8194 11.9812 11.0445C11.9633 11.2637 11.9309 11.3758 11.891 11.454C11.7951 11.6422 11.6422 11.7951 11.454 11.891C11.3758 11.9309 11.2637 11.9633 11.0445 11.9812C10.8194 11.9996 10.5283 12 10.1 12H9.5C9.22386 12 9 12.2239 9 12.5C9 12.7761 9.22386 13 9.5 13H10.1206C10.5231 13 10.8553 13 11.1259 12.9779C11.407 12.9549 11.6653 12.9057 11.908 12.782C12.2843 12.5903 12.5903 12.2843 12.782 11.908C12.9057 11.6653 12.9549 11.407 12.9779 11.1259C13 10.8553 13 10.5232 13 10.1207V10.1207V10.1207V10.1206V9.5ZM2.5 9C2.77614 9 3 9.22386 3 9.5V10.1C3 10.5283 3.00039 10.8194 3.01878 11.0445C3.03669 11.2637 3.06915 11.3758 3.10899 11.454C3.20487 11.6422 3.35785 11.7951 3.54601 11.891C3.62421 11.9309 3.73631 11.9633 3.95552 11.9812C4.18056 11.9996 4.47171 12 4.9 12H5.5C5.77614 12 6 12.2239 6 12.5C6 12.7761 5.77614 13 5.5 13H4.87935C4.47687 13 4.14469 13 3.87409 12.9779C3.59304 12.9549 3.33469 12.9057 3.09202 12.782C2.7157 12.5903 2.40973 12.2843 2.21799 11.908C2.09434 11.6653 2.04506 11.407 2.0221 11.1259C1.99999 10.8553 1.99999 10.5231 2 10.1207V10.1206V10.1V9.5C2 9.22386 2.22386 9 2.5 9ZM10.1 3C10.5283 3 10.8194 3.00039 11.0445 3.01878C11.2637 3.03669 11.3758 3.06915 11.454 3.10899C11.6422 3.20487 11.7951 3.35785 11.891 3.54601C11.9309 3.62421 11.9633 3.73631 11.9812 3.95552C11.9996 4.18056 12 4.47171 12 4.9V5.5C12 5.77614 12.2239 6 12.5 6C12.7761 6 13 5.77614 13 5.5V4.87935V4.87934C13 4.47686 13 4.14468 12.9779 3.87409C12.9549 3.59304 12.9057 3.33469 12.782 3.09202C12.5903 2.7157 12.2843 2.40973 11.908 2.21799C11.6653 2.09434 11.407 2.04506 11.1259 2.0221C10.8553 1.99999 10.5231 1.99999 10.1206 2L10.1 2H9.5C9.22386 2 9 2.22386 9 2.5C9 2.77614 9.22386 3 9.5 3H10.1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tVe=["color"],rVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.15 7.49998C13.15 4.66458 10.9402 1.84998 7.50002 1.84998C4.7217 1.84998 3.34851 3.90636 2.76336 4.99997H4.5C4.77614 4.99997 5 5.22383 5 5.49997C5 5.77611 4.77614 5.99997 4.5 5.99997H1.5C1.22386 5.99997 1 5.77611 1 5.49997V2.49997C1 2.22383 1.22386 1.99997 1.5 1.99997C1.77614 1.99997 2 2.22383 2 2.49997V4.31318C2.70453 3.07126 4.33406 0.849976 7.50002 0.849976C11.5628 0.849976 14.15 4.18537 14.15 7.49998C14.15 10.8146 11.5628 14.15 7.50002 14.15C5.55618 14.15 3.93778 13.3808 2.78548 12.2084C2.16852 11.5806 1.68668 10.839 1.35816 10.0407C1.25306 9.78536 1.37488 9.49315 1.63024 9.38806C1.8856 9.28296 2.17781 9.40478 2.2829 9.66014C2.56374 10.3425 2.97495 10.9745 3.4987 11.5074C4.47052 12.4963 5.83496 13.15 7.50002 13.15C10.9402 13.15 13.15 10.3354 13.15 7.49998ZM7 10V5.00001H8V10H7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nVe=["color"],iVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.15 7.49998C13.15 4.66458 10.9402 1.84998 7.50002 1.84998C4.72167 1.84998 3.34849 3.9064 2.76335 5H4.5C4.77614 5 5 5.22386 5 5.5C5 5.77614 4.77614 6 4.5 6H1.5C1.22386 6 1 5.77614 1 5.5V2.5C1 2.22386 1.22386 2 1.5 2C1.77614 2 2 2.22386 2 2.5V4.31318C2.70453 3.07126 4.33406 0.849976 7.50002 0.849976C11.5628 0.849976 14.15 4.18537 14.15 7.49998C14.15 10.8146 11.5628 14.15 7.50002 14.15C5.55618 14.15 3.93778 13.3808 2.78548 12.2084C2.16852 11.5806 1.68668 10.839 1.35816 10.0407C1.25306 9.78536 1.37488 9.49315 1.63024 9.38806C1.8856 9.28296 2.17781 9.40478 2.2829 9.66014C2.56374 10.3425 2.97495 10.9745 3.4987 11.5074C4.47052 12.4963 5.83496 13.15 7.50002 13.15C10.9402 13.15 13.15 10.3354 13.15 7.49998ZM7.5 4.00001C7.77614 4.00001 8 4.22387 8 4.50001V7.29291L9.85355 9.14646C10.0488 9.34172 10.0488 9.65831 9.85355 9.85357C9.65829 10.0488 9.34171 10.0488 9.14645 9.85357L7.14645 7.85357C7.05268 7.7598 7 7.63262 7 7.50001V4.50001C7 4.22387 7.22386 4.00001 7.5 4.00001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sVe=["color"],oVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 8.00684e-07C3.77614 7.88614e-07 4 0.223859 4 0.500001L4 3.00006L11.5 3.00006C11.7761 3.00006 12 3.22392 12 3.50006L12 11.0001L14.5 11C14.7761 11 15 11.2238 15 11.5C15 11.7761 14.7762 12 14.5 12L12 12.0001L12 14.5C12 14.7761 11.7761 15 11.5 15C11.2239 15 11 14.7761 11 14.5L11 12.0001L3.5 12.0001C3.22386 12.0001 3 11.7762 3 11.5001L3 4.00005L0.499989 4C0.223847 4 -6.10541e-06 3.77613 -5.02576e-07 3.49999C5.13006e-06 3.22385 0.223867 3 0.50001 3L3 3.00005L3 0.500001C3 0.223859 3.22386 8.12755e-07 3.5 8.00684e-07ZM4 4.00006L4 11.0001L11 11.0001L11 4.00006L4 4.00006Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aVe=["color"],lVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uVe=["color"],cVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hVe=["color"],dVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fVe=["color"],pVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.50207C0.877075 3.84319 3.84319 0.877075 7.50208 0.877075C11.1609 0.877075 14.1271 3.84319 14.1271 7.50207C14.1271 11.1609 11.1609 14.1271 7.50208 14.1271C3.84319 14.1271 0.877075 11.1609 0.877075 7.50207ZM1.84898 7.00003C2.0886 4.26639 4.26639 2.0886 7.00003 1.84898V4.50003C7.00003 4.77617 7.22388 5.00003 7.50003 5.00003C7.77617 5.00003 8.00003 4.77617 8.00003 4.50003V1.84862C10.7356 2.08643 12.9154 4.26502 13.1552 7.00003H10.5C10.2239 7.00003 10 7.22388 10 7.50003C10 7.77617 10.2239 8.00003 10.5 8.00003H13.1555C12.9176 10.7369 10.7369 12.9176 8.00003 13.1555V10.5C8.00003 10.2239 7.77617 10 7.50003 10C7.22388 10 7.00003 10.2239 7.00003 10.5V13.1552C4.26502 12.9154 2.08643 10.7356 1.84862 8.00003H4.50003C4.77617 8.00003 5.00003 7.77617 5.00003 7.50003C5.00003 7.22388 4.77617 7.00003 4.50003 7.00003H1.84898Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mVe=["color"],gVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V1.80687C10.6922 2.0935 12.8167 4.28012 13.0068 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H12.9888C12.7094 10.6244 10.6244 12.7094 8 12.9888V14.5C8 14.7761 7.77614 15 7.5 15C7.22386 15 7 14.7761 7 14.5V13.0068C4.28012 12.8167 2.0935 10.6922 1.80687 8H0.5C0.223858 8 0 7.77614 0 7.5C0 7.22386 0.223858 7 0.5 7H1.78886C1.98376 4.21166 4.21166 1.98376 7 1.78886V0.5C7 0.223858 7.22386 0 7.5 0ZM8 12.0322V9.5C8 9.22386 7.77614 9 7.5 9C7.22386 9 7 9.22386 7 9.5V12.054C4.80517 11.8689 3.04222 10.1668 2.76344 8H5.5C5.77614 8 6 7.77614 6 7.5C6 7.22386 5.77614 7 5.5 7H2.7417C2.93252 4.73662 4.73662 2.93252 7 2.7417V5.5C7 5.77614 7.22386 6 7.5 6C7.77614 6 8 5.77614 8 5.5V2.76344C10.1668 3.04222 11.8689 4.80517 12.054 7H9.5C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8H12.0322C11.7621 10.0991 10.0991 11.7621 8 12.0322Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yVe=["color"],vVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.60913 0.0634287C4.39082 0.0088505 4.16575 0.12393 4.08218 0.332867L3.1538 2.6538L0.832866 3.58218C0.702884 3.63417 0.604504 3.7437 0.566705 3.87849C0.528906 4.01329 0.555994 4.158 0.639992 4.26999L2.01148 6.09864L1.06343 9.89085C1.00944 10.1068 1.12145 10.3298 1.32691 10.4154L4.20115 11.613L5.62557 13.7496C5.73412 13.9124 5.93545 13.9864 6.12362 13.9327L9.62362 12.9327C9.62988 12.9309 9.63611 12.929 9.64229 12.9269L12.6423 11.9269C12.7923 11.8769 12.905 11.7519 12.9393 11.5976L13.9393 7.09761C13.9776 6.92506 13.9114 6.74605 13.77 6.63999L11.95 5.27499V2.99999C11.95 2.82955 11.8537 2.67373 11.7012 2.5975L8.70124 1.0975C8.67187 1.08282 8.64098 1.07139 8.60913 1.06343L4.60913 0.0634287ZM11.4323 6.01173L12.7748 7.01858L10.2119 9.15429C10.1476 9.20786 10.0995 9.2783 10.0731 9.35769L9.25382 11.8155L7.73849 10.8684C7.52774 10.7367 7.25011 10.8007 7.11839 11.0115C6.98667 11.2222 7.05074 11.4999 7.26149 11.6316L8.40341 12.3453L6.19221 12.9771L4.87441 11.0004C4.82513 10.9265 4.75508 10.8688 4.67307 10.8346L2.03046 9.73352L2.85134 6.44999H4.99999C5.24852 6.44999 5.44999 6.24852 5.44999 5.99999C5.44999 5.75146 5.24852 5.54999 4.99999 5.54999H2.72499L1.7123 4.19974L3.51407 3.47903L6.35769 4.4269C6.53655 4.48652 6.73361 4.42832 6.85138 4.28111L8.62413 2.06518L11.05 3.27811V5.19533L8.83287 6.08218C8.70996 6.13134 8.61494 6.23212 8.57308 6.35769L8.07308 7.85769C7.99449 8.09346 8.12191 8.34831 8.35769 8.4269C8.59346 8.50549 8.84831 8.37807 8.9269 8.14229L9.3609 6.84029L11.4323 6.01173ZM7.71052 1.76648L6.34462 3.47386L4.09505 2.724L4.77192 1.03183L7.71052 1.76648ZM10.2115 11.7885L12.116 11.1537L12.7745 8.19034L10.8864 9.76374L10.2115 11.7885Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),_Ve=["color"],AY=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_Ve);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xVe=["color"],wVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),bVe=["color"],CVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,bVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.5 1C4.22386 1 4 1.22386 4 1.5C4 1.77614 4.22386 2 4.5 2C5.42215 2 6.0399 2.23054 6.42075 2.56379C6.79286 2.88939 7 3.36626 7 4V7H5.75C5.47386 7 5.25 7.22386 5.25 7.5C5.25 7.77614 5.47386 8 5.75 8H7V11C7 11.6337 6.79286 12.1106 6.42075 12.4362C6.0399 12.7695 5.42215 13 4.5 13C4.22386 13 4 13.2239 4 13.5C4 13.7761 4.22386 14 4.5 14C5.57785 14 6.4601 13.7305 7.07925 13.1888C7.24168 13.0467 7.38169 12.8896 7.5 12.7198C7.61832 12.8896 7.75832 13.0467 7.92075 13.1888C8.5399 13.7305 9.42215 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.57785 13 8.9601 12.7695 8.57925 12.4362C8.20714 12.1106 8 11.6337 8 11V8H9.25C9.52614 8 9.75 7.77614 9.75 7.5C9.75 7.22386 9.52614 7 9.25 7H8V4C8 3.36626 8.20714 2.88939 8.57925 2.56379C8.9601 2.23054 9.57785 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.42215 1 8.5399 1.26946 7.92075 1.81121C7.75832 1.95333 7.61832 2.11043 7.5 2.28023C7.38168 2.11043 7.24168 1.95333 7.07925 1.81121C6.4601 1.26946 5.57785 1 4.5 1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),SVe=["color"],EVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,SVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 7.5C5 7.22386 5.22386 7 5.5 7H9.5C9.77614 7 10 7.22386 10 7.5C10 7.77614 9.77614 8 9.5 8H5.5C5.22386 8 5 7.77614 5 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),MVe=["color"],TVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,MVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.8 1L2.74967 0.99997C2.52122 0.999752 2.32429 0.999564 2.14983 1.04145C1.60136 1.17312 1.17312 1.60136 1.04145 2.14983C0.999564 2.32429 0.999752 2.52122 0.99997 2.74967L1 2.8V5.2L0.99997 5.25033C0.999752 5.47878 0.999564 5.67572 1.04145 5.85017C1.17312 6.39864 1.60136 6.82688 2.14983 6.95856C2.32429 7.00044 2.52122 7.00025 2.74967 7.00003L2.8 7H5.2L5.25033 7.00003C5.47878 7.00025 5.67572 7.00044 5.85017 6.95856C6.39864 6.82688 6.82688 6.39864 6.95856 5.85017C7.00044 5.67572 7.00025 5.47878 7.00003 5.25033L7 5.2V2.8L7.00003 2.74967C7.00025 2.52122 7.00044 2.32429 6.95856 2.14983C6.82688 1.60136 6.39864 1.17312 5.85017 1.04145C5.67572 0.999564 5.47878 0.999752 5.25033 0.99997L5.2 1H2.8ZM2.38328 2.01382C2.42632 2.00348 2.49222 2 2.8 2H5.2C5.50779 2 5.57369 2.00348 5.61672 2.01382C5.79955 2.05771 5.94229 2.20045 5.98619 2.38328C5.99652 2.42632 6 2.49222 6 2.8V5.2C6 5.50779 5.99652 5.57369 5.98619 5.61672C5.94229 5.79955 5.79955 5.94229 5.61672 5.98619C5.57369 5.99652 5.50779 6 5.2 6H2.8C2.49222 6 2.42632 5.99652 2.38328 5.98619C2.20045 5.94229 2.05771 5.79955 2.01382 5.61672C2.00348 5.57369 2 5.50779 2 5.2V2.8C2 2.49222 2.00348 2.42632 2.01382 2.38328C2.05771 2.20045 2.20045 2.05771 2.38328 2.01382ZM9.8 1L9.74967 0.99997C9.52122 0.999752 9.32429 0.999564 9.14983 1.04145C8.60136 1.17312 8.17312 1.60136 8.04145 2.14983C7.99956 2.32429 7.99975 2.52122 7.99997 2.74967L8 2.8V5.2L7.99997 5.25033C7.99975 5.47878 7.99956 5.67572 8.04145 5.85017C8.17312 6.39864 8.60136 6.82688 9.14983 6.95856C9.32429 7.00044 9.52122 7.00025 9.74967 7.00003L9.8 7H12.2L12.2503 7.00003C12.4788 7.00025 12.6757 7.00044 12.8502 6.95856C13.3986 6.82688 13.8269 6.39864 13.9586 5.85017C14.0004 5.67572 14.0003 5.47878 14 5.25033L14 5.2V2.8L14 2.74967C14.0003 2.52122 14.0004 2.32429 13.9586 2.14983C13.8269 1.60136 13.3986 1.17312 12.8502 1.04145C12.6757 0.999564 12.4788 0.999752 12.2503 0.99997L12.2 1H9.8ZM9.38328 2.01382C9.42632 2.00348 9.49222 2 9.8 2H12.2C12.5078 2 12.5737 2.00348 12.6167 2.01382C12.7995 2.05771 12.9423 2.20045 12.9862 2.38328C12.9965 2.42632 13 2.49222 13 2.8V5.2C13 5.50779 12.9965 5.57369 12.9862 5.61672C12.9423 5.79955 12.7995 5.94229 12.6167 5.98619C12.5737 5.99652 12.5078 6 12.2 6H9.8C9.49222 6 9.42632 5.99652 9.38328 5.98619C9.20045 5.94229 9.05771 5.79955 9.01382 5.61672C9.00348 5.57369 9 5.50779 9 5.2V2.8C9 2.49222 9.00348 2.42632 9.01382 2.38328C9.05771 2.20045 9.20045 2.05771 9.38328 2.01382ZM2.74967 7.99997L2.8 8H5.2L5.25033 7.99997C5.47878 7.99975 5.67572 7.99956 5.85017 8.04145C6.39864 8.17312 6.82688 8.60136 6.95856 9.14983C7.00044 9.32429 7.00025 9.52122 7.00003 9.74967L7 9.8V12.2L7.00003 12.2503C7.00025 12.4788 7.00044 12.6757 6.95856 12.8502C6.82688 13.3986 6.39864 13.8269 5.85017 13.9586C5.67572 14.0004 5.47878 14.0003 5.25033 14L5.2 14H2.8L2.74967 14C2.52122 14.0003 2.32429 14.0004 2.14983 13.9586C1.60136 13.8269 1.17312 13.3986 1.04145 12.8502C0.999564 12.6757 0.999752 12.4788 0.99997 12.2503L1 12.2V9.8L0.99997 9.74967C0.999752 9.52122 0.999564 9.32429 1.04145 9.14983C1.17312 8.60136 1.60136 8.17312 2.14983 8.04145C2.32429 7.99956 2.52122 7.99975 2.74967 7.99997ZM2.8 9C2.49222 9 2.42632 9.00348 2.38328 9.01382C2.20045 9.05771 2.05771 9.20045 2.01382 9.38328C2.00348 9.42632 2 9.49222 2 9.8V12.2C2 12.5078 2.00348 12.5737 2.01382 12.6167C2.05771 12.7995 2.20045 12.9423 2.38328 12.9862C2.42632 12.9965 2.49222 13 2.8 13H5.2C5.50779 13 5.57369 12.9965 5.61672 12.9862C5.79955 12.9423 5.94229 12.7995 5.98619 12.6167C5.99652 12.5737 6 12.5078 6 12.2V9.8C6 9.49222 5.99652 9.42632 5.98619 9.38328C5.94229 9.20045 5.79955 9.05771 5.61672 9.01382C5.57369 9.00348 5.50779 9 5.2 9H2.8ZM9.8 8L9.74967 7.99997C9.52122 7.99975 9.32429 7.99956 9.14983 8.04145C8.60136 8.17312 8.17312 8.60136 8.04145 9.14983C7.99956 9.32429 7.99975 9.52122 7.99997 9.74967L8 9.8V12.2L7.99997 12.2503C7.99975 12.4788 7.99956 12.6757 8.04145 12.8502C8.17312 13.3986 8.60136 13.8269 9.14983 13.9586C9.32429 14.0004 9.52122 14.0003 9.74967 14L9.8 14H12.2L12.2503 14C12.4788 14.0003 12.6757 14.0004 12.8502 13.9586C13.3986 13.8269 13.8269 13.3986 13.9586 12.8502C14.0004 12.6757 14.0003 12.4788 14 12.2503L14 12.2V9.8L14 9.74967C14.0003 9.52122 14.0004 9.32429 13.9586 9.14983C13.8269 8.60136 13.3986 8.17312 12.8502 8.04145C12.6757 7.99956 12.4788 7.99975 12.2503 7.99997L12.2 8H9.8ZM9.38328 9.01382C9.42632 9.00348 9.49222 9 9.8 9H12.2C12.5078 9 12.5737 9.00348 12.6167 9.01382C12.7995 9.05771 12.9423 9.20045 12.9862 9.38328C12.9965 9.42632 13 9.49222 13 9.8V12.2C13 12.5078 12.9965 12.5737 12.9862 12.6167C12.9423 12.7995 12.7995 12.9423 12.6167 12.9862C12.5737 12.9965 12.5078 13 12.2 13H9.8C9.49222 13 9.42632 12.9965 9.38328 12.9862C9.20045 12.9423 9.05771 12.7995 9.01382 12.6167C9.00348 12.5737 9 12.5078 9 12.2V9.8C9 9.49222 9.00348 9.42632 9.01382 9.38328C9.05771 9.20045 9.20045 9.05771 9.38328 9.01382Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),IVe=["color"],RVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,IVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 3.25C1 3.11193 1.11193 3 1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25ZM1.25 2C0.559643 2 0 2.55964 0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25ZM9.01091 12H5.98909L5.79222 13.05H9.20778L9.01091 12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),LVe=["color"],kVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,LVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.00014 2.73895C3.00014 2.94698 2.76087 3.06401 2.59666 2.93628L1.00386 1.69744C0.875177 1.59735 0.875177 1.40286 1.00386 1.30277L2.59666 0.063928C2.76087 -0.0637944 3.00014 0.0532293 3.00014 0.261266V1.00012H9.00009V0.261296C9.00009 0.0532591 9.23936 -0.0637646 9.40358 0.0639578L10.9964 1.3028C11.1251 1.40289 11.1251 1.59738 10.9964 1.69747L9.40358 2.93631C9.23936 3.06404 9.00009 2.94701 9.00009 2.73898V2.00012H3.00014V2.73895ZM9.50002 4.99998H2.50002C2.22388 4.99998 2.00002 5.22384 2.00002 5.49998V12.5C2.00002 12.7761 2.22388 13 2.50002 13H9.50002C9.77616 13 10 12.7761 10 12.5V5.49998C10 5.22384 9.77616 4.99998 9.50002 4.99998ZM2.50002 3.99998C1.67159 3.99998 1.00002 4.67156 1.00002 5.49998V12.5C1.00002 13.3284 1.67159 14 2.50002 14H9.50002C10.3284 14 11 13.3284 11 12.5V5.49998C11 4.67156 10.3284 3.99998 9.50002 3.99998H2.50002ZM14.7389 6.00001H14V12H14.7389C14.9469 12 15.064 12.2393 14.9362 12.4035L13.6974 13.9963C13.5973 14.125 13.4028 14.125 13.3027 13.9963L12.0639 12.4035C11.9362 12.2393 12.0532 12 12.2612 12H13V6.00001H12.2612C12.0532 6.00001 11.9361 5.76074 12.0639 5.59653L13.3027 4.00373C13.4028 3.87505 13.5973 3.87505 13.6974 4.00374L14.9362 5.59653C15.0639 5.76074 14.9469 6.00001 14.7389 6.00001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),AVe=["color"],PVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,AVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.877075C3.84222 0.877075 0.877075 3.84222 0.877075 7.49991C0.877075 11.1576 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1576 14.1227 7.49991C14.1227 3.84222 11.1576 0.877075 7.49991 0.877075ZM1.82708 7.49991C1.82708 4.36689 4.36689 1.82707 7.49991 1.82707C10.6329 1.82707 13.1727 4.36689 13.1727 7.49991C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49991ZM8.37287 7.50006C8.37287 7.98196 7.98221 8.37263 7.5003 8.37263C7.01839 8.37263 6.62773 7.98196 6.62773 7.50006C6.62773 7.01815 7.01839 6.62748 7.5003 6.62748C7.98221 6.62748 8.37287 7.01815 8.37287 7.50006ZM9.32287 7.50006C9.32287 8.50664 8.50688 9.32263 7.5003 9.32263C6.49372 9.32263 5.67773 8.50664 5.67773 7.50006C5.67773 6.49348 6.49372 5.67748 7.5003 5.67748C8.50688 5.67748 9.32287 6.49348 9.32287 7.50006Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$Ve=["color"],OVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$Ve);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.07451 1.82584C5.03267 1.81926 4.99014 1.81825 4.94803 1.82284C4.10683 1.91446 2.82673 2.36828 2.07115 2.77808C2.02106 2.80525 1.97621 2.84112 1.93869 2.88402C1.62502 3.24266 1.34046 3.82836 1.11706 4.38186C0.887447 4.95076 0.697293 5.55032 0.588937 5.98354C0.236232 7.39369 0.042502 9.08728 0.0174948 10.6925C0.0162429 10.7729 0.0351883 10.8523 0.0725931 10.9234C0.373679 11.496 1.02015 12.027 1.66809 12.4152C2.32332 12.8078 3.08732 13.1182 3.70385 13.1778C3.85335 13.1922 4.00098 13.1358 4.10282 13.0255C4.2572 12.8581 4.5193 12.4676 4.71745 12.1643C4.80739 12.0267 4.89157 11.8953 4.95845 11.7901C5.62023 11.9106 6.45043 11.9801 7.50002 11.9801C8.54844 11.9801 9.37796 11.9107 10.0394 11.7905C10.1062 11.8957 10.1903 12.0269 10.2801 12.1643C10.4783 12.4676 10.7404 12.8581 10.8947 13.0255C10.9966 13.1358 11.1442 13.1922 11.2937 13.1778C11.9102 13.1182 12.6742 12.8078 13.3295 12.4152C13.9774 12.027 14.6239 11.496 14.925 10.9234C14.9624 10.8523 14.9813 10.7729 14.9801 10.6925C14.9551 9.08728 14.7613 7.39369 14.4086 5.98354C14.3003 5.55032 14.1101 4.95076 13.8805 4.38186C13.6571 3.82836 13.3725 3.24266 13.0589 2.88402C13.0214 2.84112 12.9765 2.80525 12.9264 2.77808C12.1708 2.36828 10.8907 1.91446 10.0495 1.82284C10.0074 1.81825 9.96489 1.81926 9.92305 1.82584C9.71676 1.85825 9.5391 1.96458 9.40809 2.06355C9.26977 2.16804 9.1413 2.29668 9.0304 2.42682C8.86968 2.61544 8.71437 2.84488 8.61428 3.06225C8.27237 3.03501 7.90138 3.02 7.5 3.02C7.0977 3.02 6.72593 3.03508 6.38337 3.06244C6.28328 2.84501 6.12792 2.61549 5.96716 2.42682C5.85626 2.29668 5.72778 2.16804 5.58947 2.06355C5.45846 1.96458 5.2808 1.85825 5.07451 1.82584ZM11.0181 11.5382C11.0395 11.5713 11.0615 11.6051 11.0838 11.6392C11.2169 11.843 11.3487 12.0385 11.4508 12.1809C11.8475 12.0916 12.352 11.8818 12.8361 11.5917C13.3795 11.2661 13.8098 10.8918 14.0177 10.5739C13.9852 9.06758 13.7993 7.50369 13.4773 6.21648C13.38 5.82759 13.2038 5.27021 12.9903 4.74117C12.7893 4.24326 12.5753 3.82162 12.388 3.5792C11.7376 3.24219 10.7129 2.88582 10.0454 2.78987C10.0308 2.79839 10.0113 2.81102 9.98675 2.82955C9.91863 2.881 9.84018 2.95666 9.76111 3.04945C9.71959 3.09817 9.68166 3.1471 9.64768 3.19449C9.953 3.25031 10.2253 3.3171 10.4662 3.39123C11.1499 3.6016 11.6428 3.89039 11.884 4.212C12.0431 4.42408 12.0001 4.72494 11.788 4.884C11.5759 5.04306 11.2751 5.00008 11.116 4.788C11.0572 4.70961 10.8001 4.4984 10.1838 4.30877C9.58933 4.12585 8.71356 3.98 7.5 3.98C6.28644 3.98 5.41067 4.12585 4.81616 4.30877C4.19988 4.4984 3.94279 4.70961 3.884 4.788C3.72494 5.00008 3.42408 5.04306 3.212 4.884C2.99992 4.72494 2.95694 4.42408 3.116 4.212C3.35721 3.89039 3.85011 3.6016 4.53383 3.39123C4.77418 3.31727 5.04571 3.25062 5.35016 3.19488C5.31611 3.14738 5.27808 3.09831 5.23645 3.04945C5.15738 2.95666 5.07893 2.881 5.01081 2.82955C4.98628 2.81102 4.96674 2.79839 4.95217 2.78987C4.28464 2.88582 3.25999 3.24219 2.60954 3.5792C2.42226 3.82162 2.20825 4.24326 2.00729 4.74117C1.79376 5.27021 1.61752 5.82759 1.52025 6.21648C1.19829 7.50369 1.01236 9.06758 0.97986 10.5739C1.18772 10.8918 1.61807 11.2661 2.16148 11.5917C2.64557 11.8818 3.15003 12.0916 3.5468 12.1809C3.64885 12.0385 3.78065 11.843 3.9138 11.6392C3.93626 11.6048 3.95838 11.5708 3.97996 11.5375C3.19521 11.2591 2.77361 10.8758 2.50064 10.4664C2.35359 10.2458 2.4132 9.94778 2.63377 9.80074C2.85435 9.65369 3.15236 9.71329 3.29941 9.93387C3.56077 10.3259 4.24355 11.0201 7.50002 11.0201C10.7565 11.0201 11.4392 10.326 11.7006 9.93386C11.8477 9.71329 12.1457 9.65369 12.3663 9.80074C12.5869 9.94779 12.6465 10.2458 12.4994 10.4664C12.2262 10.8762 11.8041 11.2598 11.0181 11.5382ZM4.08049 7.01221C4.32412 6.74984 4.65476 6.60162 5.00007 6.59998C5.34538 6.60162 5.67603 6.74984 5.91966 7.01221C6.16329 7.27459 6.30007 7.62974 6.30007 7.99998C6.30007 8.37021 6.16329 8.72536 5.91966 8.98774C5.67603 9.25011 5.34538 9.39833 5.00007 9.39998C4.65476 9.39833 4.32412 9.25011 4.08049 8.98774C3.83685 8.72536 3.70007 8.37021 3.70007 7.99998C3.70007 7.62974 3.83685 7.27459 4.08049 7.01221ZM9.99885 6.59998C9.65354 6.60162 9.3229 6.74984 9.07926 7.01221C8.83563 7.27459 8.69885 7.62974 8.69885 7.99998C8.69885 8.37021 8.83563 8.72536 9.07926 8.98774C9.3229 9.25011 9.65354 9.39833 9.99885 9.39998C10.3442 9.39833 10.6748 9.25011 10.9184 8.98774C11.1621 8.72536 11.2989 8.37021 11.2989 7.99998C11.2989 7.62974 11.1621 7.27459 10.9184 7.01221C10.6748 6.74984 10.3442 6.60162 9.99885 6.59998Z",fill:n}))}),NVe=["color"],DVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,NVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),FVe=["color"],zVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,FVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),BVe=["color"],jVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,BVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 9.125C8.39746 9.125 9.125 8.39746 9.125 7.5C9.125 6.60254 8.39746 5.875 7.5 5.875C6.60254 5.875 5.875 6.60254 5.875 7.5C5.875 8.39746 6.60254 9.125 7.5 9.125ZM7.5 10.125C8.94975 10.125 10.125 8.94975 10.125 7.5C10.125 6.05025 8.94975 4.875 7.5 4.875C6.05025 4.875 4.875 6.05025 4.875 7.5C4.875 8.94975 6.05025 10.125 7.5 10.125Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),VVe=["color"],UVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,VVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:n}))}),HVe=["color"],GVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,HVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),qVe=["color"],WVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,qVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ZVe=["color"],YVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ZVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.85355 2.14645C3.65829 1.95118 3.34171 1.95118 3.14645 2.14645C2.95118 2.34171 2.95118 2.65829 3.14645 2.85355L7.14645 6.85355C7.34171 7.04882 7.65829 7.04882 7.85355 6.85355L11.8536 2.85355C12.0488 2.65829 12.0488 2.34171 11.8536 2.14645C11.6583 1.95118 11.3417 1.95118 11.1464 2.14645L7.5 5.79289L3.85355 2.14645ZM3.85355 8.14645C3.65829 7.95118 3.34171 7.95118 3.14645 8.14645C2.95118 8.34171 2.95118 8.65829 3.14645 8.85355L7.14645 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L11.8536 8.85355C12.0488 8.65829 12.0488 8.34171 11.8536 8.14645C11.6583 7.95118 11.3417 7.95118 11.1464 8.14645L7.5 11.7929L3.85355 8.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),XVe=["color"],Tge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,XVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),JVe=["color"],PY=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),KVe=["color"],QVe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,KVe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.1464 6.85355C11.3417 7.04882 11.6583 7.04882 11.8536 6.85355C12.0488 6.65829 12.0488 6.34171 11.8536 6.14645L7.85355 2.14645C7.65829 1.95118 7.34171 1.95118 7.14645 2.14645L3.14645 6.14645C2.95118 6.34171 2.95118 6.65829 3.14645 6.85355C3.34171 7.04882 3.65829 7.04882 3.85355 6.85355L7.5 3.20711L11.1464 6.85355ZM11.1464 12.8536C11.3417 13.0488 11.6583 13.0488 11.8536 12.8536C12.0488 12.6583 12.0488 12.3417 11.8536 12.1464L7.85355 8.14645C7.65829 7.95118 7.34171 7.95118 7.14645 8.14645L3.14645 12.1464C2.95118 12.3417 2.95118 12.6583 3.14645 12.8536C3.34171 13.0488 3.65829 13.0488 3.85355 12.8536L7.5 9.20711L11.1464 12.8536Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),eUe=["color"],IA=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,eUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tUe=["color"],rUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("circle",{cx:"4.5",cy:"2.5",r:".6",fill:n}),E.createElement("circle",{cx:"4.5",cy:"4.5",r:".6",fill:n}),E.createElement("circle",{cx:"4.5",cy:"6.499",r:".6",fill:n}),E.createElement("circle",{cx:"4.5",cy:"8.499",r:".6",fill:n}),E.createElement("circle",{cx:"4.5",cy:"10.498",r:".6",fill:n}),E.createElement("circle",{cx:"4.5",cy:"12.498",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"2.5",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"4.5",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"6.499",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"8.499",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"10.498",r:".6",fill:n}),E.createElement("circle",{cx:"6.5",cy:"12.498",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"2.5",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"4.5",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"6.499",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"8.499",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"10.498",r:".6",fill:n}),E.createElement("circle",{cx:"8.499",cy:"12.498",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"2.5",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"4.5",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"6.499",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"8.499",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"10.498",r:".6",fill:n}),E.createElement("circle",{cx:"10.499",cy:"12.498",r:".6",fill:n}))}),nUe=["color"],iUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sUe=["color"],oUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.49998 4.09998C2.27906 4.09998 2.09998 4.27906 2.09998 4.49998C2.09998 4.72089 2.27906 4.89998 2.49998 4.89998H12.5C12.7209 4.89998 12.9 4.72089 12.9 4.49998C12.9 4.27906 12.7209 4.09998 12.5 4.09998H2.49998ZM2.49998 6.09998C2.27906 6.09998 2.09998 6.27906 2.09998 6.49998C2.09998 6.72089 2.27906 6.89998 2.49998 6.89998H12.5C12.7209 6.89998 12.9 6.72089 12.9 6.49998C12.9 6.27906 12.7209 6.09998 12.5 6.09998H2.49998ZM2.09998 8.49998C2.09998 8.27906 2.27906 8.09998 2.49998 8.09998H12.5C12.7209 8.09998 12.9 8.27906 12.9 8.49998C12.9 8.72089 12.7209 8.89998 12.5 8.89998H2.49998C2.27906 8.89998 2.09998 8.72089 2.09998 8.49998ZM2.49998 10.1C2.27906 10.1 2.09998 10.2791 2.09998 10.5C2.09998 10.7209 2.27906 10.9 2.49998 10.9H12.5C12.7209 10.9 12.9 10.7209 12.9 10.5C12.9 10.2791 12.7209 10.1 12.5 10.1H2.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aUe=["color"],lUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.09998 12.5C4.09998 12.7209 4.27906 12.9 4.49998 12.9C4.72089 12.9 4.89998 12.7209 4.89998 12.5L4.89998 2.50002C4.89998 2.27911 4.72089 2.10003 4.49998 2.10003C4.27906 2.10003 4.09998 2.27911 4.09998 2.50002L4.09998 12.5ZM6.09998 12.5C6.09998 12.7209 6.27906 12.9 6.49998 12.9C6.72089 12.9 6.89998 12.7209 6.89998 12.5L6.89998 2.50002C6.89998 2.27911 6.72089 2.10003 6.49998 2.10003C6.27906 2.10003 6.09998 2.27911 6.09998 2.50002L6.09998 12.5ZM8.49998 12.9C8.27906 12.9 8.09998 12.7209 8.09998 12.5L8.09998 2.50002C8.09998 2.27911 8.27906 2.10002 8.49998 2.10002C8.72089 2.10002 8.89998 2.27911 8.89998 2.50002L8.89998 12.5C8.89998 12.7209 8.72089 12.9 8.49998 12.9ZM10.1 12.5C10.1 12.7209 10.2791 12.9 10.5 12.9C10.7209 12.9 10.9 12.7209 10.9 12.5L10.9 2.50002C10.9 2.27911 10.7209 2.10002 10.5 2.10002C10.2791 2.10002 10.1 2.27911 10.1 2.50002L10.1 12.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uUe=["color"],cUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10.3285 1.13607C10.1332 0.940809 9.81662 0.940808 9.62136 1.13607C9.42609 1.33133 9.42609 1.64792 9.62136 1.84318L10.2744 2.49619L5.42563 6.13274L4.31805 5.02516C4.12279 4.8299 3.80621 4.8299 3.61095 5.02516C3.41569 5.22042 3.41569 5.537 3.61095 5.73226L5.02516 7.14648L6.08582 8.20714L2.81545 11.4775C2.62019 11.6728 2.62019 11.9894 2.81545 12.1846C3.01072 12.3799 3.3273 12.3799 3.52256 12.1846L6.79293 8.91425L7.85359 9.97491L9.2678 11.3891C9.46306 11.5844 9.77965 11.5844 9.97491 11.3891C10.1702 11.1939 10.1702 10.8773 9.97491 10.682L8.86733 9.57443L12.5039 4.7257L13.1569 5.37871C13.3522 5.57397 13.6687 5.57397 13.864 5.37871C14.0593 5.18345 14.0593 4.86687 13.864 4.6716L12.8033 3.61094L11.3891 2.19673L10.3285 1.13607ZM6.13992 6.84702L10.9887 3.21047L11.7896 4.01142L8.15305 8.86015L6.13992 6.84702Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hUe=["color"],dUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.62129 1.13607C9.81656 0.940808 10.1331 0.940809 10.3284 1.13607L11.3891 2.19673L12.8033 3.61094L13.8639 4.6716C14.0592 4.86687 14.0592 5.18345 13.8639 5.37871C13.6687 5.57397 13.3521 5.57397 13.1568 5.37871L12.5038 4.7257L8.86727 9.57443L9.97485 10.682C10.1701 10.8773 10.1701 11.1939 9.97485 11.3891C9.77959 11.5844 9.463 11.5844 9.26774 11.3891L7.85353 9.97491L6.79287 8.91425L3.5225 12.1846C3.32724 12.3799 3.01065 12.3799 2.81539 12.1846C2.62013 11.9894 2.62013 11.6728 2.81539 11.4775L6.08576 8.20714L5.0251 7.14648L3.61089 5.73226C3.41563 5.537 3.41562 5.22042 3.61089 5.02516C3.80615 4.8299 4.12273 4.8299 4.31799 5.02516L5.42557 6.13274L10.2743 2.49619L9.62129 1.84318C9.42603 1.64792 9.42603 1.33133 9.62129 1.13607Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M9.62129 1.13607C9.81656 0.940808 10.1331 0.940809 10.3284 1.13607L11.3891 2.19673L12.8033 3.61094L13.8639 4.6716C14.0592 4.86687 14.0592 5.18345 13.8639 5.37871C13.6687 5.57397 13.3521 5.57397 13.1568 5.37871L12.5038 4.7257L8.86727 9.57443L9.97485 10.682C10.1701 10.8773 10.1701 11.1939 9.97485 11.3891C9.77959 11.5844 9.463 11.5844 9.26774 11.3891L7.85353 9.97491L6.79287 8.91425L3.5225 12.1846C3.32724 12.3799 3.01065 12.3799 2.81539 12.1846C2.62013 11.9894 2.62013 11.6728 2.81539 11.4775L6.08576 8.20714L5.0251 7.14648L3.61089 5.73226C3.41563 5.537 3.41562 5.22042 3.61089 5.02516C3.80615 4.8299 4.12273 4.8299 4.31799 5.02516L5.42557 6.13274L10.2743 2.49619L9.62129 1.84318C9.42603 1.64792 9.42603 1.33133 9.62129 1.13607Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fUe=["color"],pUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49999 3.09998C7.27907 3.09998 7.09999 3.27906 7.09999 3.49998C7.09999 3.72089 7.27907 3.89998 7.49999 3.89998H14.5C14.7209 3.89998 14.9 3.72089 14.9 3.49998C14.9 3.27906 14.7209 3.09998 14.5 3.09998H7.49999ZM7.49998 5.1C7.27907 5.1 7.09998 5.27908 7.09998 5.5C7.09998 5.72091 7.27907 5.9 7.49998 5.9H14.5C14.7209 5.9 14.9 5.72091 14.9 5.5C14.9 5.27908 14.7209 5.1 14.5 5.1H7.49998ZM7.1 7.5C7.1 7.27908 7.27909 7.1 7.5 7.1H14.5C14.7209 7.1 14.9 7.27908 14.9 7.5C14.9 7.72091 14.7209 7.9 14.5 7.9H7.5C7.27909 7.9 7.1 7.72091 7.1 7.5ZM7.49998 9.1C7.27907 9.1 7.09998 9.27908 7.09998 9.5C7.09998 9.72091 7.27907 9.9 7.49998 9.9H14.5C14.7209 9.9 14.9 9.72091 14.9 9.5C14.9 9.27908 14.7209 9.1 14.5 9.1H7.49998ZM7.09998 11.5C7.09998 11.2791 7.27907 11.1 7.49998 11.1H14.5C14.7209 11.1 14.9 11.2791 14.9 11.5C14.9 11.7209 14.7209 11.9 14.5 11.9H7.49998C7.27907 11.9 7.09998 11.7209 7.09998 11.5ZM2.5 9.25003L5 6.00003H0L2.5 9.25003Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mUe=["color"],Ige=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.5 1C4.22386 1 4 1.22386 4 1.5C4 1.77614 4.22386 2 4.5 2H12V13H4.5C4.22386 13 4 13.2239 4 13.5C4 13.7761 4.22386 14 4.5 14H12C12.5523 14 13 13.5523 13 13V2C13 1.44772 12.5523 1 12 1H4.5ZM6.60355 4.89645C6.40829 4.70118 6.09171 4.70118 5.89645 4.89645C5.70118 5.09171 5.70118 5.40829 5.89645 5.60355L7.29289 7H0.5C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H7.29289L5.89645 9.39645C5.70118 9.59171 5.70118 9.90829 5.89645 10.1036C6.09171 10.2988 6.40829 10.2988 6.60355 10.1036L8.85355 7.85355C9.04882 7.65829 9.04882 7.34171 8.85355 7.14645L6.60355 4.89645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),gUe=["color"],yUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,gUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 2.5C2 2.22386 2.22386 2 2.5 2H5.5C5.77614 2 6 2.22386 6 2.5C6 2.77614 5.77614 3 5.5 3H3V5.5C3 5.77614 2.77614 6 2.5 6C2.22386 6 2 5.77614 2 5.5V2.5ZM9 2.5C9 2.22386 9.22386 2 9.5 2H12.5C12.7761 2 13 2.22386 13 2.5V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3H9.5C9.22386 3 9 2.77614 9 2.5ZM2.5 9C2.77614 9 3 9.22386 3 9.5V12H5.5C5.77614 12 6 12.2239 6 12.5C6 12.7761 5.77614 13 5.5 13H2.5C2.22386 13 2 12.7761 2 12.5V9.5C2 9.22386 2.22386 9 2.5 9ZM12.5 9C12.7761 9 13 9.22386 13 9.5V12.5C13 12.7761 12.7761 13 12.5 13H9.5C9.22386 13 9 12.7761 9 12.5C9 12.2239 9.22386 12 9.5 12H12V9.5C12 9.22386 12.2239 9 12.5 9Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),vUe=["color"],_Ue=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,vUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 2C0.447715 2 0 2.44772 0 3V12C0 12.5523 0.447715 13 1 13H14C14.5523 13 15 12.5523 15 12V3C15 2.44772 14.5523 2 14 2H1ZM1 3L14 3V3.92494C13.9174 3.92486 13.8338 3.94751 13.7589 3.99505L7.5 7.96703L1.24112 3.99505C1.16621 3.94751 1.0826 3.92486 1 3.92494V3ZM1 4.90797V12H14V4.90797L7.74112 8.87995C7.59394 8.97335 7.40606 8.97335 7.25888 8.87995L1 4.90797Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xUe=["color"],wUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.94721 0.164594C7.66569 0.0238299 7.33431 0.0238302 7.05279 0.164594L0.552786 3.41459C0.214002 3.58399 0 3.93025 0 4.30902V12C0 12.5523 0.447715 13 1 13H14C14.5523 13 15 12.5523 15 12V4.30902C15 3.93025 14.786 3.58399 14.4472 3.41459L7.94721 0.164594ZM13.5689 4.09349L7.5 1.05902L1.43105 4.09349L7.5 7.29136L13.5689 4.09349ZM1 4.88366V12H14V4.88366L7.70977 8.19813C7.57848 8.26731 7.42152 8.26731 7.29023 8.19813L1 4.88366Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),bUe=["color"],CUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,bUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.36052 0.72921C8.55578 0.533948 8.87236 0.533948 9.06763 0.72921L14.2708 5.93235C14.466 6.12761 14.466 6.4442 14.2708 6.63946L8.95513 11.9551L7.3466 13.5636C6.76081 14.1494 5.81106 14.1494 5.22528 13.5636L1.43635 9.7747C0.850563 9.18891 0.850563 8.23917 1.43635 7.65338L3.04488 6.04485L8.36052 0.72921ZM8.71407 1.78987L4.10554 6.3984L8.60157 10.8944L13.2101 6.28591L8.71407 1.78987ZM7.89447 11.6015L3.39843 7.10551L2.14346 8.36049C1.94819 8.55575 1.94819 8.87233 2.14346 9.06759L5.93238 12.8565C6.12765 13.0518 6.44423 13.0518 6.63949 12.8565L7.89447 11.6015Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),SUe=["color"],$Y=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,SUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),EUe=["color"],Rge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 1C2.44771 1 2 1.44772 2 2V13C2 13.5523 2.44772 14 3 14H10.5C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13H3V2L10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1H3ZM12.6036 4.89645C12.4083 4.70118 12.0917 4.70118 11.8964 4.89645C11.7012 5.09171 11.7012 5.40829 11.8964 5.60355L13.2929 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H13.2929L11.8964 9.39645C11.7012 9.59171 11.7012 9.90829 11.8964 10.1036C12.0917 10.2988 12.4083 10.2988 12.6036 10.1036L14.8536 7.85355C15.0488 7.65829 15.0488 7.34171 14.8536 7.14645L12.6036 4.89645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),MUe=["color"],TUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,MUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.5 2C5.77614 2 6 2.22386 6 2.5V5.5C6 5.77614 5.77614 6 5.5 6H2.5C2.22386 6 2 5.77614 2 5.5C2 5.22386 2.22386 5 2.5 5H5V2.5C5 2.22386 5.22386 2 5.5 2ZM9.5 2C9.77614 2 10 2.22386 10 2.5V5H12.5C12.7761 5 13 5.22386 13 5.5C13 5.77614 12.7761 6 12.5 6H9.5C9.22386 6 9 5.77614 9 5.5V2.5C9 2.22386 9.22386 2 9.5 2ZM2 9.5C2 9.22386 2.22386 9 2.5 9H5.5C5.77614 9 6 9.22386 6 9.5V12.5C6 12.7761 5.77614 13 5.5 13C5.22386 13 5 12.7761 5 12.5V10H2.5C2.22386 10 2 9.77614 2 9.5ZM9 9.5C9 9.22386 9.22386 9 9.5 9H12.5C12.7761 9 13 9.22386 13 9.5C13 9.77614 12.7761 10 12.5 10H10V12.5C10 12.7761 9.77614 13 9.5 13C9.22386 13 9 12.7761 9 12.5V9.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),IUe=["color"],RUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,IUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),LUe=["color"],kUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,LUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14.7649 6.07596C14.9991 6.22231 15.0703 6.53079 14.9239 6.76495C14.4849 7.46743 13.9632 8.10645 13.3702 8.66305L14.5712 9.86406C14.7664 10.0593 14.7664 10.3759 14.5712 10.5712C14.3759 10.7664 14.0593 10.7664 13.8641 10.5712L12.6011 9.30817C11.805 9.90283 10.9089 10.3621 9.93375 10.651L10.383 12.3277C10.4544 12.5944 10.2961 12.8685 10.0294 12.94C9.76267 13.0115 9.4885 12.8532 9.41704 12.5865L8.95917 10.8775C8.48743 10.958 8.00036 10.9999 7.50001 10.9999C6.99965 10.9999 6.51257 10.958 6.04082 10.8775L5.58299 12.5864C5.51153 12.8532 5.23737 13.0115 4.97064 12.94C4.7039 12.8686 4.5456 12.5944 4.61706 12.3277L5.06625 10.651C4.09111 10.3621 3.19503 9.90282 2.3989 9.30815L1.1359 10.5712C0.940638 10.7664 0.624058 10.7664 0.428798 10.5712C0.233537 10.3759 0.233537 10.0593 0.428798 9.86405L1.62982 8.66303C1.03682 8.10643 0.515113 7.46742 0.0760677 6.76495C-0.0702867 6.53079 0.000898544 6.22231 0.235065 6.07596C0.469231 5.9296 0.777703 6.00079 0.924058 6.23496C1.40354 7.00213 1.989 7.68057 2.66233 8.2427C2.67315 8.25096 2.6837 8.25972 2.69397 8.26898C4.00897 9.35527 5.65537 9.99991 7.50001 9.99991C10.3078 9.99991 12.6564 8.5063 14.076 6.23495C14.2223 6.00079 14.5308 5.9296 14.7649 6.07596Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),AUe=["color"],PUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,AUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$Ue=["color"],OUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$Ue);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),NUe=["color"],DUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,NUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82708 7.49972C1.82708 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82708 10.6327 1.82708 7.49972ZM5.03747 9.21395C4.87949 8.98746 4.56782 8.93193 4.34133 9.08991C4.11484 9.24789 4.05931 9.55956 4.21729 9.78605C4.93926 10.8211 6.14033 11.5 7.50004 11.5C8.85974 11.5 10.0608 10.8211 10.7828 9.78605C10.9408 9.55956 10.8852 9.24789 10.6587 9.08991C10.4323 8.93193 10.1206 8.98746 9.9626 9.21395C9.41963 9.99238 8.51907 10.5 7.50004 10.5C6.481 10.5 5.58044 9.99238 5.03747 9.21395ZM5.37503 6.84998C5.85828 6.84998 6.25003 6.45815 6.25003 5.97498C6.25003 5.4918 5.85828 5.09998 5.37503 5.09998C4.89179 5.09998 4.50003 5.4918 4.50003 5.97498C4.50003 6.45815 4.89179 6.84998 5.37503 6.84998ZM10.5 5.97498C10.5 6.45815 10.1083 6.84998 9.62503 6.84998C9.14179 6.84998 8.75003 6.45815 8.75003 5.97498C8.75003 5.4918 9.14179 5.09998 9.62503 5.09998C10.1083 5.09998 10.5 5.4918 10.5 5.97498Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),FUe=["color"],zUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,FUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.00005 2.04999H5.52505C4.71043 2.04999 4.05005 2.71037 4.05005 3.52499C4.05005 4.33961 4.71043 4.99999 5.52505 4.99999H7.00005V2.04999ZM7.00005 1.04999H8.00005H9.47505C10.842 1.04999 11.95 2.15808 11.95 3.52499C11.95 4.33163 11.5642 5.04815 10.9669 5.49999C11.5642 5.95184 11.95 6.66836 11.95 7.475C11.95 8.8419 10.842 9.95 9.47505 9.95C8.92236 9.95 8.41198 9.76884 8.00005 9.46266V9.95L8.00005 11.425C8.00005 12.7919 6.89195 13.9 5.52505 13.9C4.15814 13.9 3.05005 12.7919 3.05005 11.425C3.05005 10.6183 3.43593 9.90184 4.03317 9.44999C3.43593 8.99814 3.05005 8.28163 3.05005 7.475C3.05005 6.66836 3.43594 5.95184 4.03319 5.5C3.43594 5.04815 3.05005 4.33163 3.05005 3.52499C3.05005 2.15808 4.15814 1.04999 5.52505 1.04999H7.00005ZM8.00005 2.04999V4.99999H9.47505C10.2897 4.99999 10.95 4.33961 10.95 3.52499C10.95 2.71037 10.2897 2.04999 9.47505 2.04999H8.00005ZM5.52505 8.94998H7.00005L7.00005 7.4788L7.00005 7.475L7.00005 7.4712V6H5.52505C4.71043 6 4.05005 6.66038 4.05005 7.475C4.05005 8.28767 4.70727 8.94684 5.5192 8.94999L5.52505 8.94998ZM4.05005 11.425C4.05005 10.6123 4.70727 9.95315 5.5192 9.94999L5.52505 9.95H7.00005L7.00005 11.425C7.00005 12.2396 6.33967 12.9 5.52505 12.9C4.71043 12.9 4.05005 12.2396 4.05005 11.425ZM8.00005 7.47206C8.00164 6.65879 8.66141 6 9.47505 6C10.2897 6 10.95 6.66038 10.95 7.475C10.95 8.28962 10.2897 8.95 9.47505 8.95C8.66141 8.95 8.00164 8.29121 8.00005 7.47794V7.47206Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),BUe=["color"],jUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,BUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 2C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V6H8.5C8.22386 6 8 5.77614 8 5.5V2H3.5ZM9 2.70711L11.2929 5H9V2.70711ZM2 2.5C2 1.67157 2.67157 1 3.5 1H8.5C8.63261 1 8.75979 1.05268 8.85355 1.14645L12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5V12.5C13 13.3284 12.3284 14 11.5 14H3.5C2.67157 14 2 13.3284 2 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),VUe=["color"],UUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,VUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 2.5C3 2.22386 3.22386 2 3.5 2H9.29289L12 4.70711V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.60355C13 4.40464 12.921 4.21388 12.7803 4.07322L9.85355 1.14645C9.75979 1.05268 9.63261 1 9.5 1H3.5ZM5.25 7C4.97386 7 4.75 7.22386 4.75 7.5C4.75 7.77614 4.97386 8 5.25 8H9.75C10.0261 8 10.25 7.77614 10.25 7.5C10.25 7.22386 10.0261 7 9.75 7H5.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),HUe=["color"],GUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,HUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 2C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V4.70711L9.29289 2H3.5ZM2 2.5C2 1.67157 2.67157 1 3.5 1H9.5C9.63261 1 9.75979 1.05268 9.85355 1.14645L12.7803 4.07322C12.921 4.21388 13 4.40464 13 4.60355V12.5C13 13.3284 12.3284 14 11.5 14H3.5C2.67157 14 2 13.3284 2 12.5V2.5ZM4.75 7.5C4.75 7.22386 4.97386 7 5.25 7H7V5.25C7 4.97386 7.22386 4.75 7.5 4.75C7.77614 4.75 8 4.97386 8 5.25V7H9.75C10.0261 7 10.25 7.22386 10.25 7.5C10.25 7.77614 10.0261 8 9.75 8H8V9.75C8 10.0261 7.77614 10.25 7.5 10.25C7.22386 10.25 7 10.0261 7 9.75V8H5.25C4.97386 8 4.75 7.77614 4.75 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),qUe=["color"],WUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,qUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 2.5C3 2.22386 3.22386 2 3.5 2H9.08579C9.21839 2 9.34557 2.05268 9.43934 2.14645L11.8536 4.56066C11.9473 4.65443 12 4.78161 12 4.91421V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.91421C13 4.51639 12.842 4.13486 12.5607 3.85355L10.1464 1.43934C9.86514 1.15804 9.48361 1 9.08579 1H3.5ZM4.5 4C4.22386 4 4 4.22386 4 4.5C4 4.77614 4.22386 5 4.5 5H7.5C7.77614 5 8 4.77614 8 4.5C8 4.22386 7.77614 4 7.5 4H4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H10.5C10.7761 11 11 10.7761 11 10.5C11 10.2239 10.7761 10 10.5 10H4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ZUe=["color"],YUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ZUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.10505 12C4.70805 12 4.4236 11.912 4.25171 11.736C4.0839 11.5559 4 11.2715 4 10.8827V4.11733C4 3.72033 4.08595 3.43588 4.25784 3.26398C4.43383 3.08799 4.71623 3 5.10505 3C6.42741 3 8.25591 3 9.02852 3C10.1373 3 11.0539 3.98153 11.0539 5.1846C11.0539 6.08501 10.6037 6.81855 9.70327 7.23602C10.8657 7.44851 11.5176 8.62787 11.5176 9.48128C11.5176 10.5125 10.9902 12 9.27734 12C8.77742 12 6.42626 12 5.10505 12ZM8.37891 8.00341H5.8V10.631H8.37891C8.9 10.631 9.6296 10.1211 9.6296 9.29877C9.6296 8.47643 8.9 8.00341 8.37891 8.00341ZM5.8 4.36903V6.69577H8.17969C8.53906 6.69577 9.27734 6.35939 9.27734 5.50002C9.27734 4.64064 8.48047 4.36903 8.17969 4.36903H5.8Z",fill:n}))}),XUe=["color"],JUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,XUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.5 4.5C2.5 3.09886 3.59886 2 5 2H12.499C12.7752 2 13 2.22386 13 2.5C13 2.77614 12.7761 3 12.5 3H8.69244L8.40509 3.85458C8.18869 4.49752 7.89401 5.37197 7.58091 6.29794C7.50259 6.52956 7.42308 6.76453 7.34332 7H8.5C8.77614 7 9 7.22386 9 7.5C9 7.77614 8.77614 8 8.5 8H7.00407C6.56724 9.28543 6.16435 10.4613 5.95799 11.0386C5.63627 11.9386 5.20712 12.4857 4.66741 12.7778C4.16335 13.0507 3.64154 13.0503 3.28378 13.05L3.25 13.05C2.94624 13.05 2.7 12.8037 2.7 12.5C2.7 12.1962 2.94624 11.95 3.25 11.95C3.64182 11.95 3.9035 11.9405 4.14374 11.8105C4.36443 11.691 4.65532 11.4148 4.92217 10.6683C5.10695 10.1514 5.45375 9.14134 5.8422 8H4.5C4.22386 8 4 7.77614 4 7.5C4 7.22386 4.22386 7 4.5 7H6.18187C6.30127 6.64785 6.42132 6.29323 6.53887 5.94559C6.85175 5.02025 7.14627 4.14631 7.36256 3.50368L7.53192 3H5C4.15114 3 3.5 3.65114 3.5 4.5C3.5 4.77614 3.27614 5 3 5C2.72386 5 2.5 4.77614 2.5 4.5Z",fill:n}))}),KUe=["color"],QUe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,KUe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),eHe=["color"],tHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,eHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),rHe=["color"],nHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,rHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),iHe=["color"],sHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,iHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.03791 9.98075C0.934777 9.6583 1.11603 9.37719 1.40005 9.24871C1.68408 9.12022 2.09463 9.13412 2.27071 9.45426C2.85393 10.5147 3.64599 10.7282 4.48665 10.7282C5.52721 10.7282 6.29659 10.2615 6.29659 9.45426C6.29659 8.8047 5.9119 8.46416 4.87134 8.14253L4.15872 7.92181C2.64518 7.44883 1.88842 6.69206 1.88842 5.45601C1.88842 3.79743 3.27583 2.6875 5.24342 2.6875C6.91733 2.6875 7.97409 3.33536 8.43833 4.31065C8.57087 4.58909 8.57614 4.91294 8.22794 5.19114C7.87974 5.46934 7.52351 5.34799 7.23327 5.03839C6.47215 4.22653 5.99545 4.04968 5.25604 4.04968C4.1398 4.04968 3.547 4.63618 3.547 5.27943C3.547 5.86592 3.96322 6.23169 4.94702 6.5344L5.67856 6.76143C7.22994 7.23441 7.97409 7.95964 7.97409 9.17047C7.97409 10.7723 6.69389 12.0903 4.46143 12.0903C2.86612 12.0903 1.40005 11.1131 1.03791 9.98075ZM11.8491 8.77985C10.661 8.39543 10.1649 7.86114 10.1649 6.98805C10.1649 5.86736 11.1636 5.04639 12.6128 5.04639C13.8546 5.04639 14.6629 5.63345 14.9778 6.6346C15.0443 6.84599 14.9593 6.98006 14.7475 7.0491C14.5394 7.11697 14.3176 7.09974 14.238 6.89611C13.9356 6.12273 13.352 5.76311 12.5998 5.76311C11.6467 5.76311 11.0135 6.25178 11.0135 6.91638C11.0135 7.45066 11.3464 7.75038 12.2473 8.04358L12.8348 8.23254C14.062 8.62999 14.5516 9.13821 14.5516 10.0178C14.5516 11.1972 13.481 12.0442 11.9927 12.0442C10.6439 12.0442 9.65644 11.2809 9.41979 10.3361C9.36535 10.1188 9.41192 10.0287 9.70039 9.96184C9.98886 9.89499 10.0714 9.89918 10.1715 10.1369C10.4555 10.8114 11.1531 11.3275 12.0318 11.3275C12.9914 11.3275 13.6834 10.7802 13.6834 10.0634C13.6834 9.53567 13.3961 9.28807 12.4366 8.97532L11.8491 8.77985Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),oHe=["color"],aHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,oHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11 1.5C11 1.22386 10.7761 1 10.5 1C10.2239 1 10 1.22386 10 1.5V4H5V1.5C5 1.22386 4.77614 1 4.5 1C4.22386 1 4 1.22386 4 1.5V4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H4V10H1.5C1.22386 10 1 10.2239 1 10.5C1 10.7761 1.22386 11 1.5 11H4V13.5C4 13.7761 4.22386 14 4.5 14C4.77614 14 5 13.7761 5 13.5V11H10V13.5C10 13.7761 10.2239 14 10.5 14C10.7761 14 11 13.7761 11 13.5V11H13.5C13.7761 11 14 10.7761 14 10.5C14 10.2239 13.7761 10 13.5 10H11V5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H11V1.5ZM10 10V5H5V10H10Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),lHe=["color"],uHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,lHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.3825 1.29567C3.46241 1.11432 3.64188 0.997284 3.84005 0.997284H11.5C11.7761 0.997284 12 1.22114 12 1.49728V5.5C12 5.77614 11.7761 6 11.5 6H8.63521L11.5288 9.16247C11.6626 9.3087 11.6974 9.52015 11.6175 9.70154C11.5376 9.88293 11.3582 10 11.16 10H8V13.5C8 13.7022 7.87818 13.8845 7.69134 13.9619C7.5045 14.0393 7.28945 13.9966 7.14645 13.8536L3.14645 9.85355C3.05268 9.75979 3 9.63261 3 9.5V5.5C3 5.22386 3.22386 5 3.5 5H6.36531L3.47105 1.83468C3.33732 1.68844 3.30259 1.47701 3.3825 1.29567ZM7.72032 5L4.97474 1.99728H11V5H7.72032ZM7.27978 6H4V9H7.5H10.0247L7.27978 6ZM4.70711 10L7 12.2929V10H4.70711Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),cHe=["color"],hHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,cHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),dHe=["color"],Lge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,dHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fHe=["color"],pHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49996 1.80002C4.35194 1.80002 1.79996 4.352 1.79996 7.50002C1.79996 10.648 4.35194 13.2 7.49996 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.352 10.648 1.80002 7.49996 1.80002ZM0.899963 7.50002C0.899963 3.85494 3.85488 0.900024 7.49996 0.900024C11.145 0.900024 14.1 3.85494 14.1 7.50002C14.1 11.1451 11.145 14.1 7.49996 14.1C3.85488 14.1 0.899963 11.1451 0.899963 7.50002Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M13.4999 7.89998H1.49994V7.09998H13.4999V7.89998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M7.09991 13.5V1.5H7.89991V13.5H7.09991zM10.375 7.49998C10.375 5.32724 9.59364 3.17778 8.06183 1.75656L8.53793 1.24341C10.2396 2.82218 11.075 5.17273 11.075 7.49998 11.075 9.82724 10.2396 12.1778 8.53793 13.7566L8.06183 13.2434C9.59364 11.8222 10.375 9.67273 10.375 7.49998zM3.99969 7.5C3.99969 5.17611 4.80786 2.82678 6.45768 1.24719L6.94177 1.75281C5.4582 3.17323 4.69969 5.32389 4.69969 7.5 4.6997 9.67611 5.45822 11.8268 6.94179 13.2472L6.45769 13.7528C4.80788 12.1732 3.9997 9.8239 3.99969 7.5z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M7.49996 3.95801C9.66928 3.95801 11.8753 4.35915 13.3706 5.19448 13.5394 5.28875 13.5998 5.50197 13.5055 5.67073 13.4113 5.83948 13.198 5.89987 13.0293 5.8056 11.6794 5.05155 9.60799 4.65801 7.49996 4.65801 5.39192 4.65801 3.32052 5.05155 1.97064 5.8056 1.80188 5.89987 1.58866 5.83948 1.49439 5.67073 1.40013 5.50197 1.46051 5.28875 1.62927 5.19448 3.12466 4.35915 5.33063 3.95801 7.49996 3.95801zM7.49996 10.85C9.66928 10.85 11.8753 10.4488 13.3706 9.6135 13.5394 9.51924 13.5998 9.30601 13.5055 9.13726 13.4113 8.9685 13.198 8.90812 13.0293 9.00238 11.6794 9.75643 9.60799 10.15 7.49996 10.15 5.39192 10.15 3.32052 9.75643 1.97064 9.00239 1.80188 8.90812 1.58866 8.9685 1.49439 9.13726 1.40013 9.30601 1.46051 9.51924 1.62927 9.6135 3.12466 10.4488 5.33063 10.85 7.49996 10.85z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mHe=["color"],gHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.5 2H8V7H13V2.5C13 2.22386 12.7761 2 12.5 2ZM13 8H8V13H12.5C12.7761 13 13 12.7761 13 12.5V8ZM7 7V2H2.5C2.22386 2 2 2.22386 2 2.5V7H7ZM2 8V12.5C2 12.7761 2.22386 13 2.5 13H7V8H2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yHe=["color"],kge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.44995 0.949951C1.31734 0.949951 1.19016 1.00263 1.0964 1.0964C1.00263 1.19017 0.949951 1.31735 0.949951 1.44995L0.949966 3.44995C0.949969 3.7261 1.17383 3.94995 1.44997 3.94995C1.72611 3.94995 1.94997 3.72609 1.94997 3.44995L1.94995 1.94995H3.44997C3.72611 1.94995 3.94997 1.72609 3.94997 1.44995C3.94997 1.17381 3.72611 0.949951 3.44997 0.949951H1.44995ZM5.94995 0.949951C5.67381 0.949951 5.44995 1.17381 5.44995 1.44995C5.44995 1.72609 5.67381 1.94995 5.94995 1.94995H8.94995C9.22609 1.94995 9.44995 1.72609 9.44995 1.44995C9.44995 1.17381 9.22609 0.949951 8.94995 0.949951H5.94995ZM5.44995 13.45C5.44995 13.1738 5.67381 12.95 5.94995 12.95H8.94995C9.22609 12.95 9.44995 13.1738 9.44995 13.45C9.44995 13.7261 9.22609 13.95 8.94995 13.95H5.94995C5.67381 13.95 5.44995 13.7261 5.44995 13.45ZM1.94995 5.94995C1.94995 5.67381 1.72609 5.44995 1.44995 5.44995C1.17381 5.44995 0.949951 5.67381 0.949951 5.94995V8.94995C0.949951 9.22609 1.17381 9.44995 1.44995 9.44995C1.72609 9.44995 1.94995 9.22609 1.94995 8.94995V5.94995ZM13.45 5.44995C13.7261 5.44995 13.95 5.67381 13.95 5.94995V8.94995C13.95 9.22609 13.7261 9.44995 13.45 9.44995C13.1738 9.44995 12.95 9.22609 12.95 8.94995V5.94995C12.95 5.67381 13.1738 5.44995 13.45 5.44995ZM11.45 0.949951C11.1738 0.949951 10.95 1.17381 10.95 1.44995C10.95 1.72609 11.1738 1.94995 11.45 1.94995H12.9499V3.44995C12.9499 3.72609 13.1738 3.94995 13.4499 3.94995C13.7261 3.94995 13.9499 3.72609 13.9499 3.44995V1.44995C13.9499 1.17381 13.7252 0.949951 13.449 0.949951H11.45ZM1.44995 10.95C1.72609 10.95 1.94995 11.1738 1.94995 11.45V12.95H3.44997C3.72611 12.95 3.94997 13.1738 3.94997 13.45C3.94997 13.7261 3.72611 13.95 3.44997 13.95H1.44995C1.17381 13.95 0.949951 13.7261 0.949951 13.45V11.45C0.949951 11.1738 1.17381 10.95 1.44995 10.95ZM13.95 11.45C13.95 11.1738 13.7261 10.95 13.45 10.95C13.1738 10.9499 12.95 11.1738 12.95 11.4499L12.9491 12.95H11.45C11.1738 12.95 10.95 13.1738 10.95 13.45C10.95 13.7261 11.1738 13.95 11.45 13.95H13.4499C13.7261 13.95 13.9499 13.7261 13.9499 13.45L13.95 11.45Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),vHe=["color"],_He=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,vHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM7.00003 1.84861C4.10114 2.1017 1.82707 4.53515 1.82707 7.49972C1.82707 10.4643 4.10114 12.8977 7.00003 13.1508V1.84861ZM8.00003 13.1508C10.8988 12.8976 13.1727 10.4642 13.1727 7.49972C13.1727 4.53524 10.8988 2.10185 8.00003 1.84864V13.1508Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xHe=["color"],wHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM7.49988 1.82689C4.36688 1.8269 1.82707 4.36672 1.82707 7.49972C1.82707 10.6327 4.36688 13.1725 7.49988 13.1726V1.82689Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),bHe=["color"],CHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,bHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),SHe=["color"],EHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,SHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.8113 1.64706C6.62188 2.87918 6.68268 3.88523 6.76848 5.30499C6.78415 5.56426 6.80065 5.83732 6.81661 6.12808C6.83111 6.39208 6.63758 6.62172 6.37495 6.65217C6.11232 6.68262 5.87138 6.50334 5.82509 6.24304L5.74754 5.80698C5.64402 5.16529 5.48355 4.25481 5.17807 3.44741C4.86241 2.61312 4.4486 2.04121 3.93436 1.86044C3.64994 1.76104 3.41901 1.84279 3.25868 2.01052C3.08746 2.18962 2.9976 2.47065 3.0627 2.75399C3.2146 3.34424 3.44627 3.9167 3.69836 4.51802C3.72082 4.57158 3.74346 4.62543 3.76621 4.67954C3.9954 5.22457 4.23619 5.7972 4.41644 6.39081L4.41691 6.39238C4.562 6.87586 4.65646 7.2595 4.73086 7.56165C4.76034 7.68138 4.78667 7.78831 4.81175 7.88359C4.86768 8.09606 4.77836 8.32014 4.59161 8.43588C4.40486 8.55161 4.16445 8.53188 3.99907 8.38725C3.73749 8.15848 3.515 7.92784 3.31817 7.71802C3.27627 7.67335 3.23602 7.63018 3.19705 7.58838C3.04777 7.42826 2.91712 7.28812 2.78334 7.16029C2.45989 6.85122 2.18398 6.68004 1.80585 6.64369L1.80324 6.64343C1.56117 6.61888 1.41402 6.66441 1.31756 6.72627C1.21899 6.78947 1.11988 6.90414 1.03784 7.1123C0.976576 7.28492 1.01515 7.62987 1.1929 7.96911L1.19728 7.97747C1.40086 8.38452 1.74475 8.81587 2.18141 9.29299C2.39739 9.52898 2.62872 9.76849 2.86934 10.0174L2.87966 10.0281C3.11546 10.2721 3.35962 10.5247 3.59713 10.7827C4.4288 11.6863 5.27706 12.7538 5.4627 14H11.5087C11.5636 12.4353 11.8756 11.268 12.2875 10.1346C12.4454 9.70041 12.6121 9.28412 12.7826 8.85829C13.1097 8.04139 13.4509 7.18937 13.7705 6.10824C14.0989 4.99737 14.0097 4.37033 13.8613 4.03984C13.717 3.71858 13.4914 3.61786 13.3816 3.59606C13.1381 3.54774 13.0384 3.60947 12.9698 3.67901C12.867 3.78316 12.7698 3.98273 12.6921 4.30269C12.6166 4.61345 12.5752 4.96517 12.533 5.32501L12.5298 5.35285C12.4924 5.67242 12.4505 6.03016 12.3665 6.30098C12.3383 6.40699 12.2819 6.50407 12.1979 6.57539C12.1382 6.6261 12.0104 6.70818 11.8309 6.69312C11.5424 6.66891 11.3712 6.42143 11.365 6.14783C11.356 5.75454 11.3883 5.35864 11.4074 4.96608C11.4428 4.23646 11.477 3.5337 11.4245 2.8342L11.4242 2.82934C11.3916 2.32997 11.0493 2.00228 10.7007 1.9228C10.5305 1.88401 10.369 1.90601 10.2347 1.9835C10.103 2.05946 9.95535 2.21318 9.8574 2.51394L9.85631 2.51726C9.81525 2.6404 9.77298 2.87753 9.73606 3.2124C9.70044 3.53542 9.67337 3.91279 9.65156 4.29418C9.6329 4.62033 9.61785 4.9584 9.60434 5.26194C9.58728 5.64529 9.57267 5.97357 9.55633 6.1532C9.54983 6.22459 9.52939 6.29493 9.49501 6.35785C9.47356 6.39711 9.36115 6.60947 9.07106 6.61843C8.77917 6.62744 8.63975 6.40057 8.61698 6.35919C8.55634 6.24899 8.55066 6.11807 8.54754 5.99283C8.54474 5.88064 8.54294 5.71798 8.54174 5.54767C8.53935 5.20582 8.53935 4.81919 8.53935 4.70952C8.53935 3.6657 8.53838 2.65372 8.44714 1.64372C8.39183 1.24127 8.06278 1.00455 7.6436 1.00005C7.22399 0.995552 6.87918 1.22704 6.8113 1.64706ZM9.41219 1.3617C9.21469 0.448484 8.39913 0.00810324 7.65433 0.00011154C6.86452 -0.00836308 5.98761 0.465881 5.82365 1.49037L5.82318 1.49334C5.78239 1.7584 5.75229 2.01481 5.7309 2.26652C5.39423 1.67364 4.92622 1.14894 4.2655 0.916859C3.58661 0.679312 2.9492 0.887087 2.53582 1.31952C2.13415 1.73971 1.94438 2.36742 2.09031 2.98746L2.09269 2.99713C2.26478 3.66808 2.52396 4.30316 2.77613 4.90465C2.79814 4.95717 2.8201 5.00941 2.84194 5.06139C3.02139 5.48842 3.19378 5.89866 3.33871 6.31256C2.96404 5.98142 2.51925 5.70796 1.90276 5.6484C1.48865 5.60663 1.10391 5.67536 0.777805 5.88444C0.454239 6.0919 0.240671 6.40405 0.104187 6.75406L0.100868 6.76281C-0.10184 7.31286 0.0663312 7.97157 0.304895 8.42897C0.573704 8.96474 0.996104 9.47904 1.44372 9.96813C1.67046 10.2159 1.91136 10.4652 2.15033 10.7124L2.15682 10.7191C2.39524 10.9658 2.63217 11.2109 2.86134 11.4599C3.80937 12.49 4.50002 13.4632 4.50002 14.5C4.50002 14.7761 4.72388 15 5.00002 15H12C12.2762 15 12.5 14.7761 12.5 14.5C12.5 12.8212 12.8021 11.6462 13.2274 10.4762C13.3653 10.0968 13.5216 9.70579 13.6868 9.29247C14.0238 8.44922 14.398 7.51298 14.7295 6.39175C15.0956 5.15324 15.0559 4.25904 14.7735 3.63017C14.487 2.99208 13.9798 2.6953 13.5763 2.6152C13.1276 2.52614 12.7367 2.60475 12.4268 2.83081C12.4253 2.80773 12.4236 2.78468 12.4219 2.76167C12.3587 1.8105 11.6907 1.12285 10.923 0.947821C10.5346 0.859287 10.1111 0.900393 9.73509 1.11724C9.61852 1.18446 9.51055 1.26623 9.41219 1.3617Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),MHe=["color"],THe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,MHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.75432 2.0502C8.50579 2.0502 8.30432 2.25167 8.30432 2.5002C8.30432 2.74873 8.50579 2.9502 8.75432 2.9502H9.94997V7.05004H5.04997V2.9502H6.25432C6.50285 2.9502 6.70432 2.74873 6.70432 2.5002C6.70432 2.25167 6.50285 2.0502 6.25432 2.0502H2.75432C2.50579 2.0502 2.30432 2.25167 2.30432 2.5002C2.30432 2.74873 2.50579 2.9502 2.75432 2.9502H3.94997V12.0502H2.75432C2.50579 12.0502 2.30432 12.2517 2.30432 12.5002C2.30432 12.7487 2.50579 12.9502 2.75432 12.9502H6.25432C6.50285 12.9502 6.70432 12.7487 6.70432 12.5002C6.70432 12.2517 6.50285 12.0502 6.25432 12.0502H5.04997V7.95004H9.94997V12.0502H8.75432C8.50579 12.0502 8.30432 12.2517 8.30432 12.5002C8.30432 12.7487 8.50579 12.9502 8.75432 12.9502H12.2543C12.5028 12.9502 12.7043 12.7487 12.7043 12.5002C12.7043 12.2517 12.5028 12.0502 12.2543 12.0502H11.05V2.9502H12.2543C12.5028 2.9502 12.7043 2.74873 12.7043 2.5002C12.7043 2.25167 12.5028 2.0502 12.2543 2.0502H8.75432Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),IHe=["color"],RHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,IHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.89346 2.35248C3.49195 2.35248 2.35248 3.49359 2.35248 4.90532C2.35248 6.38164 3.20954 7.9168 4.37255 9.33522C5.39396 10.581 6.59464 11.6702 7.50002 12.4778C8.4054 11.6702 9.60608 10.581 10.6275 9.33522C11.7905 7.9168 12.6476 6.38164 12.6476 4.90532C12.6476 3.49359 11.5081 2.35248 10.1066 2.35248C9.27059 2.35248 8.81894 2.64323 8.5397 2.95843C8.27877 3.25295 8.14623 3.58566 8.02501 3.88993C8.00391 3.9429 7.98315 3.99501 7.96211 4.04591C7.88482 4.23294 7.7024 4.35494 7.50002 4.35494C7.29765 4.35494 7.11523 4.23295 7.03793 4.04592C7.01689 3.99501 6.99612 3.94289 6.97502 3.8899C6.8538 3.58564 6.72126 3.25294 6.46034 2.95843C6.18109 2.64323 5.72945 2.35248 4.89346 2.35248ZM1.35248 4.90532C1.35248 2.94498 2.936 1.35248 4.89346 1.35248C6.0084 1.35248 6.73504 1.76049 7.20884 2.2953C7.32062 2.42147 7.41686 2.55382 7.50002 2.68545C7.58318 2.55382 7.67941 2.42147 7.79119 2.2953C8.265 1.76049 8.99164 1.35248 10.1066 1.35248C12.064 1.35248 13.6476 2.94498 13.6476 4.90532C13.6476 6.74041 12.6013 8.50508 11.4008 9.96927C10.2636 11.3562 8.92194 12.5508 8.00601 13.3664C7.94645 13.4194 7.88869 13.4709 7.83291 13.5206C7.64324 13.6899 7.3568 13.6899 7.16713 13.5206C7.11135 13.4709 7.05359 13.4194 6.99403 13.3664C6.0781 12.5508 4.73641 11.3562 3.59926 9.96927C2.39872 8.50508 1.35248 6.74041 1.35248 4.90532Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),LHe=["color"],kHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,LHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.35248 4.90532C1.35248 2.94498 2.936 1.35248 4.89346 1.35248C6.25769 1.35248 6.86058 1.92336 7.50002 2.93545C8.13946 1.92336 8.74235 1.35248 10.1066 1.35248C12.064 1.35248 13.6476 2.94498 13.6476 4.90532C13.6476 6.74041 12.6013 8.50508 11.4008 9.96927C10.2636 11.3562 8.92194 12.5508 8.00601 13.3664C7.94645 13.4194 7.88869 13.4709 7.83291 13.5206C7.64324 13.6899 7.3568 13.6899 7.16713 13.5206C7.11135 13.4709 7.05359 13.4194 6.99403 13.3664C6.0781 12.5508 4.73641 11.3562 3.59926 9.96927C2.39872 8.50508 1.35248 6.74041 1.35248 4.90532Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),AHe=["color"],PHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,AHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$He=["color"],OHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$He);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.3536 13.3536C12.1583 13.5488 11.8417 13.5488 11.6465 13.3536L6.39645 8.10355C6.36478 8.07188 6.33824 8.03702 6.31685 8H5.00002C4.78719 8 4.59769 7.86528 4.52777 7.66426L2.12777 0.764277C2.05268 0.548387 2.13355 0.309061 2.3242 0.182972C2.51486 0.0568819 2.76674 0.0761337 2.93602 0.229734L8.336 5.12972C8.44044 5.22449 8.50001 5.35897 8.50001 5.5V5.81684C8.53702 5.83824 8.57189 5.86478 8.60356 5.89645L13.8536 11.1464C14.0488 11.3417 14.0488 11.6583 13.8536 11.8536L12.3536 13.3536ZM8.25 6.95711L7.45711 7.75L12 12.2929L12.7929 11.5L8.25 6.95711ZM3.71669 2.28845L5.35549 7H6.2929L7.50001 5.79289V5.72146L3.71669 2.28845Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),NHe=["color"],DHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,NHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.07926 0.222253C7.31275 -0.007434 7.6873 -0.007434 7.92079 0.222253L14.6708 6.86227C14.907 7.09465 14.9101 7.47453 14.6778 7.71076C14.4454 7.947 14.0655 7.95012 13.8293 7.71773L13 6.90201V12.5C13 12.7761 12.7762 13 12.5 13H2.50002C2.22388 13 2.00002 12.7761 2.00002 12.5V6.90201L1.17079 7.71773C0.934558 7.95012 0.554672 7.947 0.32229 7.71076C0.0899079 7.47453 0.0930283 7.09465 0.32926 6.86227L7.07926 0.222253ZM7.50002 1.49163L12 5.91831V12H10V8.49999C10 8.22385 9.77617 7.99999 9.50002 7.99999H6.50002C6.22388 7.99999 6.00002 8.22385 6.00002 8.49999V12H3.00002V5.91831L7.50002 1.49163ZM7.00002 12H9.00002V8.99999H7.00002V12Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),FHe=["color"],zHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,FHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 0.0032959C6.80473 0.0032959 6.24953 0.281106 6.25 0.749995C6.25 0.997258 6.42446 1.12014 6.57687 1.22749C6.69507 1.31074 6.8 1.38465 6.8 1.5C6.8 1.7071 6.06224 1.74264 5.19789 1.78427C3.97553 1.84314 2.5 1.91421 2.5 2.5C2.5 2.77614 2.72386 3 3 3H12C12.2761 3 12.5 2.77614 12.5 2.5C12.5 1.91421 11.0245 1.84314 9.80211 1.78427C8.93776 1.74264 8.2 1.7071 8.2 1.5C8.2 1.38465 8.30493 1.31074 8.42313 1.22749C8.57554 1.12014 8.75 0.997258 8.75 0.749995C8.75047 0.281106 8.19527 0.0032959 7.5 0.0032959ZM2.89451 6.12266C2.25806 6.52471 1.90417 7.31118 2.02473 8.0556L2.83588 12.4772C3.00993 13.3562 3.7629 14 4.66061 14H10.3373C11.2354 14 11.9884 13.3562 12.1625 12.4772L12.9736 8.05607C13.089 7.32358 12.8284 6.53276 12.1331 6.09373C11.7283 5.83013 11.6412 5.33231 12.1331 5.12796C12.8284 4.86435 12.6948 4 12 4H10.3001H6.80005H2.99996C2.30469 4 2.19878 4.89328 2.89451 5.15689C3.38642 5.33231 3.29939 5.83013 2.89451 6.12266ZM8.20006 6.25C8.20006 5.81769 8.08572 5.37615 7.90635 5L4.11093 5C4.20626 5.21312 4.2419 5.43889 4.22904 5.65521C4.19522 6.22412 3.84587 6.66899 3.48016 6.93322L3.45492 6.95146L3.42858 6.9681C3.13407 7.15414 2.95801 7.53989 3.01058 7.88749L3.81797 12.2886C3.90513 12.7154 4.26148 13 4.66061 13H10.3373C10.737 13 11.0932 12.7153 11.1804 12.2886L11.9874 7.8898C12.048 7.48247 11.8954 7.12631 11.5992 6.93927L11.5875 6.93184L11.5875 6.93176C11.1947 6.67602 10.8331 6.22785 10.7986 5.64798C10.7846 5.412 10.8264 5.19397 10.9112 5H9.05517C9.01987 5.14611 9.00006 5.31201 9.00006 5.5C9.00006 5.9745 9.21679 6.37127 9.44367 6.78662C9.69284 7.24278 9.95425 7.72136 9.95425 8.34993C9.95425 9.2698 9.49868 9.84205 8.62189 9.84205C8.13206 9.84205 7.57818 9.46097 7.57818 8.75781C7.57818 8.35279 7.71558 8.01646 7.86121 7.65998C8.0254 7.25806 8.20006 6.83051 8.20006 6.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),BHe=["color"],jHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,BHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14 11.0001V4.00006L1 4.00006L1 11.0001H14ZM15 4.00006V11.0001C15 11.5523 14.5523 12.0001 14 12.0001H1C0.447715 12.0001 0 11.5523 0 11.0001V4.00006C0 3.44778 0.447715 3.00006 1 3.00006H14C14.5523 3.00006 15 3.44778 15 4.00006ZM2 5.25C2 5.11193 2.11193 5 2.25 5H5.75C5.88807 5 6 5.11193 6 5.25V9.75C6 9.88807 5.88807 10 5.75 10H2.25C2.11193 10 2 9.88807 2 9.75V5.25ZM7.5 7C7.22386 7 7 7.22386 7 7.5C7 7.77614 7.22386 8 7.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H7.5ZM7 9.5C7 9.22386 7.22386 9 7.5 9H12.5C12.7761 9 13 9.22386 13 9.5C13 9.77614 12.7761 10 12.5 10H7.5C7.22386 10 7 9.77614 7 9.5ZM7.5 5C7.22386 5 7 5.22386 7 5.5C7 5.77614 7.22386 6 7.5 6H11.5C11.7761 6 12 5.77614 12 5.5C12 5.22386 11.7761 5 11.5 5H7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),VHe=["color"],UHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,VHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),HHe=["color"],GHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,HHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),qHe=["color"],WHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,qHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ZHe=["color"],YHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ZHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9091 12.909C13.2365 12.5817 13.4918 12.1895 13.6588 11.7577C13.8195 11.3443 13.9294 10.8718 13.961 10.1799C13.9926 9.48665 14.0001 9.26529 14.0001 7.50001C14.0001 5.73473 13.9926 5.51328 13.961 4.82008C13.9294 4.12821 13.8195 3.65573 13.6588 3.24228C13.4956 2.80857 13.2398 2.41567 12.9091 2.091C12.5844 1.76028 12.1915 1.50437 11.7578 1.34113C11.3443 1.18056 10.8718 1.0707 10.1799 1.03924C9.48675 1.00748 9.26537 1 7.50006 1C5.73476 1 5.51333 1.00748 4.82014 1.03912C4.12826 1.0707 3.65578 1.18056 3.24233 1.34125C2.80862 1.50447 2.41573 1.76032 2.09105 2.09098C1.76032 2.41563 1.5044 2.80852 1.34113 3.24225C1.18056 3.65573 1.0707 4.12821 1.03924 4.82008C1.00748 5.51328 1 5.73471 1 7.50001C1 9.26532 1.00748 9.48675 1.03924 10.1799C1.07083 10.8718 1.18069 11.3443 1.34138 11.7577C1.5046 12.1915 1.76045 12.5843 2.09111 12.909C2.41578 13.2397 2.80867 13.4955 3.24238 13.6587C3.65586 13.8194 4.12834 13.9293 4.82019 13.9609C5.51348 13.9925 5.73483 14 7.50012 14C9.2654 14 9.48685 13.9925 10.18 13.9609C10.8719 13.9293 11.3444 13.8194 11.7578 13.6587C12.1896 13.4917 12.5818 13.2364 12.9091 12.909ZM1.99949 6.73496C1.99974 6.94524 2.00005 7.19543 2.00005 7.50002C2.00005 7.80461 1.99974 8.0548 1.99949 8.26507C1.99849 9.08596 1.99824 9.29856 2.01963 9.7655C2.04625 10.3509 2.07823 10.7811 2.17588 11.1053C2.26976 11.417 2.37505 11.7342 2.7188 12.1171C3.06255 12.4999 3.39411 12.6733 3.81645 12.8007C4.23879 12.928 4.7696 12.9554 5.23052 12.9764C5.75332 13.0003 5.96052 13.0002 7.05714 12.9999L7.50006 12.9999C7.79304 12.9999 8.03569 13.0001 8.2409 13.0004C9.08195 13.0013 9.29425 13.0015 9.76575 12.9799C10.3512 12.9533 10.7814 12.9213 11.1056 12.8237C11.4173 12.7298 11.7345 12.6245 12.1173 12.2807C12.5001 11.937 12.6735 11.6054 12.8009 11.1831C12.9283 10.7607 12.9557 10.2299 12.9767 9.76902C13.0005 9.24689 13.0004 9.04027 13.0002 7.94749V7.94738L13.0001 7.50039L13.0001 7.05747C13.0004 5.96085 13.0005 5.75365 12.9766 5.23085C12.9556 4.76993 12.9282 4.23912 12.8009 3.81678C12.6735 3.39445 12.5001 3.06288 12.1173 2.71913C11.7345 2.37538 11.4172 2.27009 11.1056 2.17621C10.7813 2.07856 10.3511 2.04658 9.76571 2.01996C9.29421 1.99836 9.08194 1.99859 8.24092 1.99951H8.24092C8.0357 1.99974 7.79305 2.00001 7.50006 2.00001L7.05704 1.99993C5.96051 1.99964 5.75331 1.99958 5.23052 2.02343C4.7696 2.04446 4.23879 2.07183 3.81645 2.19921C3.39411 2.32659 3.06255 2.49999 2.7188 2.88281C2.37505 3.26562 2.26976 3.58286 2.17588 3.89453C2.07823 4.21874 2.04625 4.64894 2.01963 5.23437C1.99824 5.70131 1.99849 5.91401 1.99949 6.73496ZM7.49996 5.25015C6.25741 5.25015 5.25012 6.25744 5.25012 7.49999C5.25012 8.74254 6.25741 9.74983 7.49996 9.74983C8.74251 9.74983 9.7498 8.74254 9.7498 7.49999C9.7498 6.25744 8.74251 5.25015 7.49996 5.25015ZM4.25012 7.49999C4.25012 5.70515 5.70512 4.25015 7.49996 4.25015C9.2948 4.25015 10.7498 5.70515 10.7498 7.49999C10.7498 9.29483 9.2948 10.7498 7.49996 10.7498C5.70512 10.7498 4.25012 9.29483 4.25012 7.49999ZM10.9697 4.7803C11.3839 4.7803 11.7197 4.44452 11.7197 4.0303C11.7197 3.61609 11.3839 3.2803 10.9697 3.2803C10.5555 3.2803 10.2197 3.61609 10.2197 4.0303C10.2197 4.44452 10.5555 4.7803 10.9697 4.7803Z",fill:n}))}),XHe=["color"],JHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,XHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 4H1.5C1.22386 4 1 4.22386 1 4.5V10.5C1 10.7761 1.22386 11 1.5 11H13.5C13.7761 11 14 10.7761 14 10.5V4.5C14 4.22386 13.7761 4 13.5 4ZM1.5 3C0.671573 3 0 3.67157 0 4.5V10.5C0 11.3284 0.671573 12 1.5 12H13.5C14.3284 12 15 11.3284 15 10.5V4.5C15 3.67157 14.3284 3 13.5 3H1.5ZM2 5H3V6H2V5ZM5 5H4V6H5V5ZM6 5H7V6H6V5ZM9 5H8V6H9V5ZM10 5H11V6H10V5ZM13 5H12V6H13V5ZM11 7H12V8H11V7ZM13 9H12V10H13V9ZM9 7H10V8H9V7ZM8 7H7V8H8V7ZM5 7H6V8H5V7ZM4 7H3V8H4V7ZM2 9H3V10H2V9ZM11 9H4V10H11V9Z",fill:n}))}),KHe=["color"],QHe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,KHe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),eGe=["color"],tGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,eGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 4.25C2 4.11193 2.11193 4 2.25 4H12.75C12.8881 4 13 4.11193 13 4.25V11.5H2V4.25ZM2.25 3C1.55964 3 1 3.55964 1 4.25V12H0V12.5C0 12.7761 0.223858 13 0.5 13H14.5C14.7761 13 15 12.7761 15 12.5V12H14V4.25C14 3.55964 13.4404 3 12.75 3H2.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),rGe=["color"],nGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,rGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.75432 0.819537C7.59742 0.726821 7.4025 0.726821 7.24559 0.819537L1.74559 4.06954C1.59336 4.15949 1.49996 4.32317 1.49996 4.5C1.49996 4.67683 1.59336 4.84051 1.74559 4.93046L7.24559 8.18046C7.4025 8.27318 7.59742 8.27318 7.75432 8.18046L13.2543 4.93046C13.4066 4.84051 13.5 4.67683 13.5 4.5C13.5 4.32317 13.4066 4.15949 13.2543 4.06954L7.75432 0.819537ZM7.49996 7.16923L2.9828 4.5L7.49996 1.83077L12.0171 4.5L7.49996 7.16923ZM1.5695 7.49564C1.70998 7.2579 2.01659 7.17906 2.25432 7.31954L7.49996 10.4192L12.7456 7.31954C12.9833 7.17906 13.2899 7.2579 13.4304 7.49564C13.5709 7.73337 13.4921 8.03998 13.2543 8.18046L7.75432 11.4305C7.59742 11.5232 7.4025 11.5232 7.24559 11.4305L1.74559 8.18046C1.50786 8.03998 1.42901 7.73337 1.5695 7.49564ZM1.56949 10.4956C1.70998 10.2579 2.01658 10.1791 2.25432 10.3195L7.49996 13.4192L12.7456 10.3195C12.9833 10.1791 13.2899 10.2579 13.4304 10.4956C13.5709 10.7334 13.4921 11.04 13.2543 11.1805L7.75432 14.4305C7.59742 14.5232 7.4025 14.5232 7.24559 14.4305L1.74559 11.1805C1.50785 11.04 1.42901 10.7334 1.56949 10.4956Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),iGe=["color"],sGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,iGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9 2H6V13H9V2ZM10 2V13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2H10ZM2.5 2H5V13H2.5C2.22386 13 2 12.7761 2 12.5V2.5C2 2.22386 2.22386 2 2.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),oGe=["color"],aGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,oGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),lGe=["color"],uGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,lGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),cGe=["color"],hGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,cGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.2895 2.75C11.4964 2.74979 11.6821 2.87701 11.7565 3.07003L14.9664 11.39C15.0657 11.6477 14.9375 11.9371 14.6798 12.0365C14.4222 12.1359 14.1328 12.0076 14.0334 11.75L12.9822 9.02537H9.61106L8.56672 11.749C8.46786 12.0068 8.1787 12.1357 7.92086 12.0369C7.66302 11.938 7.53415 11.6488 7.63301 11.391L10.8232 3.07099C10.8972 2.87782 11.0826 2.75021 11.2895 2.75ZM11.2915 4.64284L12.6543 8.17537H9.93698L11.2915 4.64284ZM2.89895 5.20703C1.25818 5.20703 0.00915527 6.68569 0.00915527 8.60972C0.00915527 10.6337 1.35818 12.0124 2.89895 12.0124C3.72141 12.0124 4.57438 11.6692 5.15427 11.0219V11.53C5.15427 11.7785 5.35574 11.98 5.60427 11.98C5.8528 11.98 6.05427 11.7785 6.05427 11.53V5.72C6.05427 5.47147 5.8528 5.27 5.60427 5.27C5.35574 5.27 5.15427 5.47147 5.15427 5.72V6.22317C4.60543 5.60095 3.79236 5.20703 2.89895 5.20703ZM5.15427 9.79823V7.30195C4.76393 6.58101 3.94144 6.05757 3.08675 6.05757C2.10885 6.05757 1.03503 6.96581 1.03503 8.60955C1.03503 10.1533 2.00885 11.1615 3.08675 11.1615C3.97011 11.1615 4.77195 10.4952 5.15427 9.79823Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),dGe=["color"],fGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,dGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),pGe=["color"],mGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,pGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),gGe=["color"],yGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,gGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.69667 0.0403541C8.90859 0.131038 9.03106 0.354857 8.99316 0.582235L8.0902 6.00001H12.5C12.6893 6.00001 12.8625 6.10701 12.9472 6.27641C13.0319 6.4458 13.0136 6.6485 12.8999 6.80001L6.89997 14.8C6.76167 14.9844 6.51521 15.0503 6.30328 14.9597C6.09135 14.869 5.96888 14.6452 6.00678 14.4178L6.90974 9H2.49999C2.31061 9 2.13748 8.893 2.05278 8.72361C1.96809 8.55422 1.98636 8.35151 2.09999 8.2L8.09997 0.200038C8.23828 0.0156255 8.48474 -0.0503301 8.69667 0.0403541ZM3.49999 8.00001H7.49997C7.64695 8.00001 7.78648 8.06467 7.88148 8.17682C7.97648 8.28896 8.01733 8.43723 7.99317 8.5822L7.33027 12.5596L11.5 7.00001H7.49997C7.353 7.00001 7.21347 6.93534 7.11846 6.8232C7.02346 6.71105 6.98261 6.56279 7.00678 6.41781L7.66968 2.44042L3.49999 8.00001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),vGe=["color"],_Ge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,vGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xGe=["color"],Age=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wGe=["color"],bGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),CGe=["color"],SGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,CGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L13.3536 2.35355ZM2.03735 8.46678C2.17398 9.12619 2.66918 9.67103 3.33886 9.89338L2.57833 10.6539C1.80843 10.2534 1.23784 9.53693 1.05815 8.66967C0.999538 8.38681 0.999604 8.06004 0.999703 7.56313L0.999711 7.50001L0.999703 7.43689C0.999604 6.93998 0.999538 6.61321 1.05815 6.33035C1.29846 5.17053 2.2379 4.28039 3.4182 4.055C3.70687 3.99988 4.04134 3.99993 4.56402 4.00001L4.62471 4.00001H5.49971C5.77585 4.00001 5.99971 4.22387 5.99971 4.50001C5.99971 4.77615 5.77585 5.00001 5.49971 5.00001H4.62471C4.02084 5.00001 3.78907 5.00225 3.60577 5.03725C2.80262 5.19062 2.19157 5.78895 2.03735 6.53324C2.00233 6.70225 1.99971 6.91752 1.99971 7.50001C1.99971 8.08251 2.00233 8.29778 2.03735 8.46678ZM12.9621 6.53324C12.8255 5.87397 12.3304 5.32922 11.661 5.10679L12.4215 4.34631C13.1912 4.74686 13.7616 5.46323 13.9413 6.33035C13.9999 6.61321 13.9998 6.93998 13.9997 7.43688L13.9997 7.50001L13.9997 7.56314C13.9998 8.06005 13.9999 8.38681 13.9413 8.66967C13.701 9.8295 12.7615 10.7196 11.5812 10.945C11.2925 11.0001 10.9581 11.0001 10.4354 11L10.3747 11H9.49971C9.22357 11 8.99971 10.7762 8.99971 10.5C8.99971 10.2239 9.22357 10 9.49971 10H10.3747C10.9786 10 11.2104 9.99777 11.3937 9.96277C12.1968 9.8094 12.8079 9.21108 12.9621 8.46678C12.9971 8.29778 12.9997 8.08251 12.9997 7.50001C12.9997 6.91752 12.9971 6.70225 12.9621 6.53324Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),EGe=["color"],MGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.50021 0C4.77635 0 5.0002 0.223853 5.0002 0.49999V2.49995C5.0002 2.77609 4.77635 2.99994 4.50021 2.99994C4.22408 2.99994 4.00022 2.77609 4.00022 2.49995V0.49999C4.00022 0.223853 4.22408 0 4.50021 0ZM0.646451 0.64647C0.84171 0.451212 1.15829 0.451212 1.35354 0.64647L2.85351 2.14644C3.04877 2.3417 3.04877 2.65827 2.85351 2.85353C2.65826 3.04879 2.34168 3.04879 2.14642 2.85353L0.646452 1.35356C0.451193 1.1583 0.451193 0.841728 0.646451 0.64647ZM0.00030517 4.49991C0.00030517 4.22377 0.224158 3.99992 0.500295 3.99992H2.50025C2.77639 3.99992 3.00024 4.22377 3.00024 4.49991C3.00024 4.77605 2.77639 4.9999 2.50025 4.9999H0.500295C0.224158 4.9999 0.00030517 4.77605 0.00030517 4.49991ZM12.0001 10.4998C12.0001 10.2236 12.2239 9.9998 12.5001 9.9998H14.5C14.7761 9.9998 15 10.2236 15 10.4998C15 10.7759 14.7761 10.9998 14.5 10.9998H12.5001C12.2239 10.9998 12.0001 10.7759 12.0001 10.4998ZM10.5001 11.9998C10.7762 11.9998 11.0001 12.2236 11.0001 12.4997V14.4997C11.0001 14.7758 10.7762 14.9997 10.5001 14.9997C10.224 14.9997 10.0001 14.7758 10.0001 14.4997V12.4997C10.0001 12.2236 10.224 11.9998 10.5001 11.9998ZM12.1462 12.1462C12.3415 11.951 12.658 11.951 12.8533 12.1462L14.3533 13.6462C14.5485 13.8415 14.5485 14.158 14.3533 14.3533C14.158 14.5485 13.8414 14.5485 13.6462 14.3533L12.1462 12.8533C11.951 12.6581 11.951 12.3415 12.1462 12.1462ZM7.76478 3.69938C8.19177 3.27238 8.35724 3.11008 8.5116 3.00522C9.18794 2.54577 10.0431 2.53677 10.6784 2.95401C10.8227 3.04875 10.9767 3.19911 11.3886 3.61099C11.8005 4.02287 11.9509 4.17694 12.0456 4.3212C12.4628 4.95653 12.4539 5.81168 11.9944 6.48802C11.8895 6.64238 11.7272 6.80785 11.3002 7.23484L10.6815 7.85354C10.4863 8.0488 10.4863 8.36538 10.6815 8.56064C10.8768 8.75589 11.1934 8.75589 11.3886 8.56064L12.0073 7.94193L12.0502 7.89903C12.4199 7.5295 12.6564 7.29303 12.8216 7.04993C13.4968 6.05598 13.5316 4.7623 12.8815 3.77228C12.7229 3.53083 12.4918 3.29982 12.1404 2.94853L12.0957 2.9039L12.0511 2.85925C11.6998 2.50782 11.4688 2.27672 11.2273 2.11816C10.2373 1.46798 8.94364 1.50284 7.94968 2.17805C7.70659 2.34319 7.47012 2.57973 7.1006 2.94936L7.1006 2.94937L7.05769 2.99228L6.43898 3.61099C6.24372 3.80625 6.24372 4.12282 6.43898 4.31808C6.63424 4.51334 6.95081 4.51334 7.14607 4.31808L7.76478 3.69938ZM2.99191 7.05807L2.94899 7.10097C2.57935 7.4705 2.34282 7.70697 2.17767 7.95006C1.50246 8.94401 1.4676 10.2377 2.11778 11.2277C2.27634 11.4692 2.50744 11.7002 2.85886 12.0515L2.85888 12.0515L2.90352 12.0961L2.94815 12.1407L2.94815 12.1407L2.94817 12.1408C3.29945 12.4922 3.53045 12.7233 3.7719 12.8818C4.76193 13.532 6.0556 13.4972 7.04956 12.8219C7.29265 12.6568 7.52912 12.4203 7.89865 12.0506L7.94155 12.0077L8.56026 11.389C8.75552 11.1937 8.75552 10.8772 8.56026 10.6819C8.365 10.4867 8.04842 10.4867 7.85317 10.6819L7.23446 11.3006C6.80747 11.7276 6.642 11.8899 6.48764 11.9948C5.8113 12.4542 4.95615 12.4632 4.32082 12.046C4.17656 11.9512 4.02249 11.8009 3.61061 11.389C3.19873 10.9771 3.04837 10.8231 2.95363 10.6788C2.53639 10.0435 2.54539 9.18832 3.00484 8.51198C3.10971 8.35761 3.27201 8.19215 3.699 7.76516L4.3177 7.14645C4.51296 6.95119 4.51296 6.63462 4.3177 6.43936C4.12245 6.2441 3.80587 6.2441 3.61061 6.43936L2.99191 7.05807Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),TGe=["color"],IGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,TGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),RGe=["color"],LGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,RGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10.6788 2.95419C10.0435 2.53694 9.18829 2.54594 8.51194 3.00541C8.35757 3.11027 8.1921 3.27257 7.7651 3.69957L7.14638 4.31829C6.95112 4.51355 6.63454 4.51355 6.43928 4.31829C6.24401 4.12303 6.24401 3.80645 6.43928 3.61119L7.058 2.99247C7.0725 2.97797 7.08679 2.96366 7.1009 2.94955C7.47044 2.57991 7.70691 2.34336 7.95001 2.17822C8.94398 1.50299 10.2377 1.46813 11.2277 2.11832C11.4692 2.27689 11.7002 2.508 12.0515 2.85942C12.0662 2.8741 12.081 2.88898 12.0961 2.90408C12.1112 2.91917 12.1261 2.93405 12.1408 2.94871C12.4922 3.30001 12.7233 3.53102 12.8819 3.77248C13.5321 4.76252 13.4972 6.05623 12.822 7.0502C12.6568 7.2933 12.4203 7.52976 12.0507 7.89929C12.0366 7.9134 12.0222 7.92771 12.0077 7.94221L11.389 8.56093C11.1938 8.7562 10.8772 8.7562 10.6819 8.56093C10.4867 8.36567 10.4867 8.04909 10.6819 7.85383L11.3006 7.23511C11.7276 6.80811 11.8899 6.64264 11.9948 6.48827C12.4543 5.81192 12.4633 4.95675 12.046 4.32141C11.9513 4.17714 11.8009 4.02307 11.389 3.61119C10.9771 3.1993 10.8231 3.04893 10.6788 2.95419ZM4.31796 6.43961C4.51322 6.63487 4.51322 6.95146 4.31796 7.14672L3.69924 7.76544C3.27224 8.19244 3.10993 8.35791 3.00507 8.51227C2.54561 9.18863 2.53661 10.0438 2.95385 10.6791C3.0486 10.8234 3.19896 10.9775 3.61085 11.3894C4.02274 11.8012 4.17681 11.9516 4.32107 12.0464C4.95642 12.4636 5.81158 12.4546 6.48794 11.9951C6.6423 11.8903 6.80777 11.728 7.23477 11.301L7.85349 10.6823C8.04875 10.487 8.36533 10.487 8.5606 10.6823C8.75586 10.8775 8.75586 11.1941 8.5606 11.3894L7.94188 12.0081C7.92738 12.0226 7.91307 12.0369 7.89897 12.051C7.52943 12.4206 7.29296 12.6572 7.04986 12.8223C6.05589 13.4976 4.76219 13.5324 3.77214 12.8822C3.53068 12.7237 3.29967 12.4925 2.94837 12.1411C2.93371 12.1264 2.91883 12.1116 2.90374 12.0965C2.88865 12.0814 2.87377 12.0665 2.8591 12.0518C2.50766 11.7005 2.27656 11.4695 2.11799 11.2281C1.4678 10.238 1.50265 8.94432 2.17788 7.95035C2.34303 7.70724 2.57957 7.47077 2.94922 7.10124C2.96333 7.08713 2.97763 7.07283 2.99213 7.05833L3.61085 6.43961C3.80611 6.24435 4.12269 6.24435 4.31796 6.43961Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),kGe=["color"],AGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,kGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 1C1.44772 1 1 1.44772 1 2V13C1 13.5523 1.44772 14 2 14H13C13.5523 14 14 13.5523 14 13V2C14 1.44772 13.5523 1 13 1H2ZM3.05 6H4.95V12H3.05V6ZM5.075 4.005C5.075 4.59871 4.59371 5.08 4 5.08C3.4063 5.08 2.925 4.59871 2.925 4.005C2.925 3.41129 3.4063 2.93 4 2.93C4.59371 2.93 5.075 3.41129 5.075 4.005ZM12 8.35713C12 6.55208 10.8334 5.85033 9.67449 5.85033C9.29502 5.83163 8.91721 5.91119 8.57874 6.08107C8.32172 6.21007 8.05265 6.50523 7.84516 7.01853H7.79179V6.00044H6V12.0047H7.90616V8.8112C7.8786 8.48413 7.98327 8.06142 8.19741 7.80987C8.41156 7.55832 8.71789 7.49825 8.95015 7.46774H9.02258C9.62874 7.46774 10.0786 7.84301 10.0786 8.78868V12.0047H11.9847L12 8.35713Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),PGe=["color"],$Ge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,PGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 5.25C1.91421 5.25 2.25 4.91421 2.25 4.5C2.25 4.08579 1.91421 3.75 1.5 3.75C1.08579 3.75 0.75 4.08579 0.75 4.5C0.75 4.91421 1.08579 5.25 1.5 5.25ZM4 4.5C4 4.22386 4.22386 4 4.5 4H13.5C13.7761 4 14 4.22386 14 4.5C14 4.77614 13.7761 5 13.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H13.5C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H13.5C13.7761 11 14 10.7761 14 10.5C14 10.2239 13.7761 10 13.5 10H4.5ZM2.25 7.5C2.25 7.91421 1.91421 8.25 1.5 8.25C1.08579 8.25 0.75 7.91421 0.75 7.5C0.75 7.08579 1.08579 6.75 1.5 6.75C1.91421 6.75 2.25 7.08579 2.25 7.5ZM1.5 11.25C1.91421 11.25 2.25 10.9142 2.25 10.5C2.25 10.0858 1.91421 9.75 1.5 9.75C1.08579 9.75 0.75 10.0858 0.75 10.5C0.75 10.9142 1.08579 11.25 1.5 11.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),OGe=["color"],NGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,OGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),DGe=["color"],FGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,DGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.4986 0C6.3257 0 5.36107 0.38943 4.73753 1.19361C4.23745 1.83856 4 2.68242 4 3.63325H5C5 2.84313 5.19691 2.23312 5.5278 1.80636C5.91615 1.30552 6.55152 1 7.4986 1C8.35683 1 8.96336 1.26502 9.35846 1.68623C9.75793 2.11211 10 2.76044 10 3.63601V6H3C2.44772 6 2 6.44772 2 7V13C2 13.5523 2.44772 14 3 14H12C12.5523 14 13 13.5523 13 13V7C13 6.44771 12.5523 6 12 6H11V3.63601C11 2.58135 10.7065 1.66167 10.0878 1.0021C9.46477 0.337871 8.57061 0 7.4986 0ZM3 7H12V13H3V7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zGe=["color"],BGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jGe=["color"],VGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.35355 1.85355C3.54882 1.65829 3.54882 1.34171 3.35355 1.14645C3.15829 0.951184 2.84171 0.951184 2.64645 1.14645L0.646447 3.14645C0.451184 3.34171 0.451184 3.65829 0.646447 3.85355L2.64645 5.85355C2.84171 6.04882 3.15829 6.04882 3.35355 5.85355C3.54882 5.65829 3.54882 5.34171 3.35355 5.14645L2.20711 4H9.5C11.433 4 13 5.567 13 7.5C13 7.77614 13.2239 8 13.5 8C13.7761 8 14 7.77614 14 7.5C14 5.01472 11.9853 3 9.5 3H2.20711L3.35355 1.85355ZM2 7.5C2 7.22386 1.77614 7 1.5 7C1.22386 7 1 7.22386 1 7.5C1 9.98528 3.01472 12 5.5 12H12.7929L11.6464 13.1464C11.4512 13.3417 11.4512 13.6583 11.6464 13.8536C11.8417 14.0488 12.1583 14.0488 12.3536 13.8536L14.3536 11.8536C14.5488 11.6583 14.5488 11.3417 14.3536 11.1464L12.3536 9.14645C12.1583 8.95118 11.8417 8.95118 11.6464 9.14645C11.4512 9.34171 11.4512 9.65829 11.6464 9.85355L12.7929 11H5.5C3.567 11 2 9.433 2 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),UGe=["color"],HGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,UGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.9 0.499976C13.9 0.279062 13.7209 0.0999756 13.5 0.0999756C13.2791 0.0999756 13.1 0.279062 13.1 0.499976V1.09998H12.5C12.2791 1.09998 12.1 1.27906 12.1 1.49998C12.1 1.72089 12.2791 1.89998 12.5 1.89998H13.1V2.49998C13.1 2.72089 13.2791 2.89998 13.5 2.89998C13.7209 2.89998 13.9 2.72089 13.9 2.49998V1.89998H14.5C14.7209 1.89998 14.9 1.72089 14.9 1.49998C14.9 1.27906 14.7209 1.09998 14.5 1.09998H13.9V0.499976ZM11.8536 3.14642C12.0488 3.34168 12.0488 3.65826 11.8536 3.85353L10.8536 4.85353C10.6583 5.04879 10.3417 5.04879 10.1465 4.85353C9.9512 4.65827 9.9512 4.34169 10.1465 4.14642L11.1464 3.14643C11.3417 2.95116 11.6583 2.95116 11.8536 3.14642ZM9.85357 5.14642C10.0488 5.34168 10.0488 5.65827 9.85357 5.85353L2.85355 12.8535C2.65829 13.0488 2.34171 13.0488 2.14645 12.8535C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L9.14646 5.14642C9.34172 4.95116 9.65831 4.95116 9.85357 5.14642ZM13.5 5.09998C13.7209 5.09998 13.9 5.27906 13.9 5.49998V6.09998H14.5C14.7209 6.09998 14.9 6.27906 14.9 6.49998C14.9 6.72089 14.7209 6.89998 14.5 6.89998H13.9V7.49998C13.9 7.72089 13.7209 7.89998 13.5 7.89998C13.2791 7.89998 13.1 7.72089 13.1 7.49998V6.89998H12.5C12.2791 6.89998 12.1 6.72089 12.1 6.49998C12.1 6.27906 12.2791 6.09998 12.5 6.09998H13.1V5.49998C13.1 5.27906 13.2791 5.09998 13.5 5.09998ZM8.90002 0.499976C8.90002 0.279062 8.72093 0.0999756 8.50002 0.0999756C8.2791 0.0999756 8.10002 0.279062 8.10002 0.499976V1.09998H7.50002C7.2791 1.09998 7.10002 1.27906 7.10002 1.49998C7.10002 1.72089 7.2791 1.89998 7.50002 1.89998H8.10002V2.49998C8.10002 2.72089 8.2791 2.89998 8.50002 2.89998C8.72093 2.89998 8.90002 2.72089 8.90002 2.49998V1.89998H9.50002C9.72093 1.89998 9.90002 1.72089 9.90002 1.49998C9.90002 1.27906 9.72093 1.09998 9.50002 1.09998H8.90002V0.499976Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),GGe=["color"],Pge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,GGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),qGe=["color"],WGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,qGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.49988 2.00012C1.77602 2.00012 1.99988 1.77626 1.99988 1.50012C1.99988 1.22398 1.77602 1.00012 1.49988 1.00012C1.22374 1.00012 0.999878 1.22398 0.999878 1.50012C0.999878 1.77626 1.22374 2.00012 1.49988 2.00012ZM4.49988 2.00012C4.77602 2.00012 4.99988 1.77626 4.99988 1.50012C4.99988 1.22398 4.77602 1.00012 4.49988 1.00012C4.22374 1.00012 3.99988 1.22398 3.99988 1.50012C3.99988 1.77626 4.22374 2.00012 4.49988 2.00012ZM7.99988 1.50012C7.99988 1.77626 7.77602 2.00012 7.49988 2.00012C7.22374 2.00012 6.99988 1.77626 6.99988 1.50012C6.99988 1.22398 7.22374 1.00012 7.49988 1.00012C7.77602 1.00012 7.99988 1.22398 7.99988 1.50012ZM10.4999 2.00012C10.776 2.00012 10.9999 1.77626 10.9999 1.50012C10.9999 1.22398 10.776 1.00012 10.4999 1.00012C10.2237 1.00012 9.99988 1.22398 9.99988 1.50012C9.99988 1.77626 10.2237 2.00012 10.4999 2.00012ZM13.9999 1.50012C13.9999 1.77626 13.776 2.00012 13.4999 2.00012C13.2237 2.00012 12.9999 1.77626 12.9999 1.50012C12.9999 1.22398 13.2237 1.00012 13.4999 1.00012C13.776 1.00012 13.9999 1.22398 13.9999 1.50012ZM1.49988 14.0001C1.77602 14.0001 1.99988 13.7763 1.99988 13.5001C1.99988 13.224 1.77602 13.0001 1.49988 13.0001C1.22374 13.0001 0.999878 13.224 0.999878 13.5001C0.999878 13.7763 1.22374 14.0001 1.49988 14.0001ZM1.99988 10.5001C1.99988 10.7763 1.77602 11.0001 1.49988 11.0001C1.22374 11.0001 0.999878 10.7763 0.999878 10.5001C0.999878 10.224 1.22374 10.0001 1.49988 10.0001C1.77602 10.0001 1.99988 10.224 1.99988 10.5001ZM1.49988 8.00012C1.77602 8.00012 1.99988 7.77626 1.99988 7.50012C1.99988 7.22398 1.77602 7.00012 1.49988 7.00012C1.22374 7.00012 0.999878 7.22398 0.999878 7.50012C0.999878 7.77626 1.22374 8.00012 1.49988 8.00012ZM1.99988 4.50012C1.99988 4.77626 1.77602 5.00012 1.49988 5.00012C1.22374 5.00012 0.999878 4.77626 0.999878 4.50012C0.999878 4.22398 1.22374 4.00012 1.49988 4.00012C1.77602 4.00012 1.99988 4.22398 1.99988 4.50012ZM13.4999 11.0001C13.776 11.0001 13.9999 10.7763 13.9999 10.5001C13.9999 10.224 13.776 10.0001 13.4999 10.0001C13.2237 10.0001 12.9999 10.224 12.9999 10.5001C12.9999 10.7763 13.2237 11.0001 13.4999 11.0001ZM13.9999 7.50012C13.9999 7.77626 13.776 8.00012 13.4999 8.00012C13.2237 8.00012 12.9999 7.77626 12.9999 7.50012C12.9999 7.22398 13.2237 7.00012 13.4999 7.00012C13.776 7.00012 13.9999 7.22398 13.9999 7.50012ZM13.4999 5.00012C13.776 5.00012 13.9999 4.77626 13.9999 4.50012C13.9999 4.22398 13.776 4.00012 13.4999 4.00012C13.2237 4.00012 12.9999 4.22398 12.9999 4.50012C12.9999 4.77626 13.2237 5.00012 13.4999 5.00012ZM4.99988 13.5001C4.99988 13.7763 4.77602 14.0001 4.49988 14.0001C4.22374 14.0001 3.99988 13.7763 3.99988 13.5001C3.99988 13.224 4.22374 13.0001 4.49988 13.0001C4.77602 13.0001 4.99988 13.224 4.99988 13.5001ZM7.49988 14.0001C7.77602 14.0001 7.99988 13.7763 7.99988 13.5001C7.99988 13.224 7.77602 13.0001 7.49988 13.0001C7.22374 13.0001 6.99988 13.224 6.99988 13.5001C6.99988 13.7763 7.22374 14.0001 7.49988 14.0001ZM10.9999 13.5001C10.9999 13.7763 10.776 14.0001 10.4999 14.0001C10.2237 14.0001 9.99988 13.7763 9.99988 13.5001C9.99988 13.224 10.2237 13.0001 10.4999 13.0001C10.776 13.0001 10.9999 13.224 10.9999 13.5001ZM13.4999 14.0001C13.776 14.0001 13.9999 13.7763 13.9999 13.5001C13.9999 13.224 13.776 13.0001 13.4999 13.0001C13.2237 13.0001 12.9999 13.224 12.9999 13.5001C12.9999 13.7763 13.2237 14.0001 13.4999 14.0001ZM3.99988 5.00012C3.99988 4.44784 4.44759 4.00012 4.99988 4.00012H9.99988C10.5522 4.00012 10.9999 4.44784 10.9999 5.00012V10.0001C10.9999 10.5524 10.5522 11.0001 9.99988 11.0001H4.99988C4.44759 11.0001 3.99988 10.5524 3.99988 10.0001V5.00012ZM4.99988 5.00012H9.99988V10.0001H4.99988V5.00012Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),ZGe=["color"],YGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,ZGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 2H14V13H1L1 2ZM0 2C0 1.44772 0.447715 1 1 1H14C14.5523 1 15 1.44772 15 2V13C15 13.5523 14.5523 14 14 14H1C0.447715 14 0 13.5523 0 13V2ZM4.875 7.5C4.875 6.05025 6.05025 4.875 7.5 4.875C8.94975 4.875 10.125 6.05025 10.125 7.5C10.125 8.94975 8.94975 10.125 7.5 10.125C6.05025 10.125 4.875 8.94975 4.875 7.5ZM7.5 3.875C5.49797 3.875 3.875 5.49797 3.875 7.5C3.875 9.50203 5.49797 11.125 7.5 11.125C9.50203 11.125 11.125 9.50203 11.125 7.5C11.125 5.49797 9.50203 3.875 7.5 3.875Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),XGe=["color"],JGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,XGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 1C0.447715 1 0 1.44772 0 2V13C0 13.5523 0.447715 14 1 14H14C14.5523 14 15 13.5523 15 13V2C15 1.44772 14.5523 1 14 1H1ZM7.5 10.625C9.22589 10.625 10.625 9.22589 10.625 7.5C10.625 5.77411 9.22589 4.375 7.5 4.375C5.77411 4.375 4.375 5.77411 4.375 7.5C4.375 9.22589 5.77411 10.625 7.5 10.625Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),KGe=["color"],QGe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,KGe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),eqe=["color"],tqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,eqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM4.50003 7C4.22389 7 4.00003 7.22386 4.00003 7.5C4.00003 7.77614 4.22389 8 4.50003 8H10.5C10.7762 8 11 7.77614 11 7.5C11 7.22386 10.7762 7 10.5 7H4.50003Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),rqe=["color"],nqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,rqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.14921 3.99996C2.14921 2.97778 2.97784 2.14915 4.00002 2.14915C5.02219 2.14915 5.85083 2.97778 5.85083 3.99996C5.85083 5.02213 5.02219 5.85077 4.00002 5.85077C2.97784 5.85077 2.14921 5.02213 2.14921 3.99996ZM4.00002 1.24915C2.48079 1.24915 1.24921 2.48073 1.24921 3.99996C1.24921 5.51919 2.48079 6.75077 4.00002 6.75077C5.51925 6.75077 6.75083 5.51919 6.75083 3.99996C6.75083 2.48073 5.51925 1.24915 4.00002 1.24915ZM5.82034 11.0001L2.49998 12.8369V9.16331L5.82034 11.0001ZM2.63883 8.21159C2.17228 7.9535 1.59998 8.29093 1.59998 8.82411V13.1761C1.59998 13.7093 2.17228 14.0467 2.63883 13.7886L6.57235 11.6126C7.05389 11.3462 7.05389 10.654 6.57235 10.3876L2.63883 8.21159ZM8.30001 9.00003C8.30001 8.61343 8.61341 8.30003 9.00001 8.30003H13C13.3866 8.30003 13.7 8.61343 13.7 9.00003V13C13.7 13.3866 13.3866 13.7 13 13.7H9.00001C8.61341 13.7 8.30001 13.3866 8.30001 13V9.00003ZM9.20001 9.20003V12.8H12.8V9.20003H9.20001ZM13.4432 2.19311C13.6189 2.01737 13.6189 1.73245 13.4432 1.55671C13.2675 1.38098 12.9826 1.38098 12.8068 1.55671L11 3.36353L9.19321 1.55674C9.01748 1.381 8.73255 1.381 8.55682 1.55674C8.38108 1.73247 8.38108 2.0174 8.55682 2.19313L10.3636 3.99992L8.55682 5.80671C8.38108 5.98245 8.38108 6.26737 8.55682 6.44311C8.73255 6.61885 9.01748 6.61885 9.19321 6.44311L11 4.63632L12.8068 6.44314C12.9826 6.61887 13.2675 6.61887 13.4432 6.44314C13.6189 6.2674 13.6189 5.98247 13.4432 5.80674L11.6364 3.99992L13.4432 2.19311Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),iqe=["color"],sqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,iqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),oqe=["color"],aqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,oqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 1.5C5 1.22386 4.77614 1 4.5 1C4.22386 1 4 1.22386 4 1.5L4 7C4 7.01671 4.00082 7.03323 4.00242 7.04952C2.86009 7.28022 2 8.28967 2 9.5C2 10.7103 2.86009 11.7198 4.00242 11.9505C4.00082 11.9668 4 11.9833 4 12V13.5C4 13.7761 4.22386 14 4.5 14C4.77614 14 5 13.7761 5 13.5V12C5 11.9833 4.99918 11.9668 4.99758 11.9505C6.1399 11.7198 7 10.7103 7 9.5C7 8.28967 6.1399 7.28022 4.99758 7.04952C4.99918 7.03323 5 7.01671 5 7L5 1.5ZM11 1.5C11 1.22386 10.7761 1 10.5 1C10.2239 1 10 1.22386 10 1.5V3C10 3.01671 10.0008 3.03323 10.0024 3.04952C8.8601 3.28022 8 4.28967 8 5.5C8 6.71033 8.8601 7.71978 10.0024 7.95048C10.0008 7.96677 10 7.98329 10 8V13.5C10 13.7761 10.2239 14 10.5 14C10.7761 14 11 13.7761 11 13.5V8C11 7.98329 10.9992 7.96677 10.9976 7.95048C12.1399 7.71978 13 6.71033 13 5.5C13 4.28967 12.1399 3.28022 10.9976 3.04952C10.9992 3.03323 11 3.01671 11 3V1.5ZM4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8ZM9 5.5C9 4.67157 9.67157 4 10.5 4C11.3284 4 12 4.67157 12 5.5C12 6.32843 11.3284 7 10.5 7C9.67157 7 9 6.32843 9 5.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),lqe=["color"],uqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,lqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4 2.5C4 2.22386 4.22386 2 4.5 2H10.5C10.7761 2 11 2.22386 11 2.5V12.5C11 12.7761 10.7761 13 10.5 13H4.5C4.22386 13 4 12.7761 4 12.5V2.5ZM4.5 1C3.67157 1 3 1.67157 3 2.5V12.5C3 13.3284 3.67157 14 4.5 14H10.5C11.3284 14 12 13.3284 12 12.5V2.5C12 1.67157 11.3284 1 10.5 1H4.5ZM6 11.65C5.8067 11.65 5.65 11.8067 5.65 12C5.65 12.1933 5.8067 12.35 6 12.35H9C9.1933 12.35 9.35 12.1933 9.35 12C9.35 11.8067 9.1933 11.65 9 11.65H6Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),cqe=["color"],hqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,cqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.25925 3.16667L4.37036 5.33333V1L7.25925 3.16667ZM1 8.22222L3.88889 6.05555L1 3.88889V8.22222ZM1 14L3.88889 11.8333L1 9.66666V14ZM7.74072 8.22222L10.6296 6.05555L7.74072 3.88889V8.22222ZM14 3.16667L11.1111 5.33333V1L14 3.16667ZM11.1111 11.1111L14 8.94444L11.1111 6.77777V11.1111ZM3.88889 11.1111L1 8.94444L3.88889 6.77777V11.1111ZM4.37036 6.05555L7.25925 8.22222V3.88889L4.37036 6.05555ZM3.88889 5.33333L1 3.16667L3.88889 1V5.33333ZM7.74072 3.16667L10.6296 5.33333V1L7.74072 3.16667ZM14 8.22222L11.1111 6.05555L14 3.88889V8.22222ZM11.1111 11.8333L14 14V9.66666L11.1111 11.8333Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),dqe=["color"],fqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,dqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),pqe=["color"],mqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,pqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.81819 0.93179C7.64245 0.756054 7.35753 0.756054 7.18179 0.93179L5.43179 2.68179C5.25605 2.85753 5.25605 3.14245 5.43179 3.31819C5.60753 3.49392 5.89245 3.49392 6.06819 3.31819L6.99999 2.38638V5.49999C6.99999 5.77613 7.22385 5.99999 7.49999 5.99999C7.77613 5.99999 7.99999 5.77613 7.99999 5.49999V2.38638L8.93179 3.31819C9.10753 3.49392 9.39245 3.49392 9.56819 3.31819C9.74392 3.14245 9.74392 2.85753 9.56819 2.68179L7.81819 0.93179ZM7.99999 9.49999C7.99999 9.22385 7.77613 8.99999 7.49999 8.99999C7.22385 8.99999 6.99999 9.22385 6.99999 9.49999V12.6136L6.06819 11.6818C5.89245 11.5061 5.60753 11.5061 5.43179 11.6818C5.25605 11.8575 5.25605 12.1424 5.43179 12.3182L7.18179 14.0682C7.35753 14.2439 7.64245 14.2439 7.81819 14.0682L9.56819 12.3182C9.74392 12.1424 9.74392 11.8575 9.56819 11.6818C9.39245 11.5061 9.10753 11.5061 8.93179 11.6818L7.99999 12.6136V9.49999ZM8.99999 7.49999C8.99999 7.22385 9.22385 6.99999 9.49999 6.99999H12.6136L11.6818 6.06819C11.5061 5.89245 11.5061 5.60753 11.6818 5.43179C11.8575 5.25605 12.1424 5.25605 12.3182 5.43179L14.0682 7.18179C14.2439 7.35753 14.2439 7.64245 14.0682 7.81819L12.3182 9.56819C12.1424 9.74392 11.8575 9.74392 11.6818 9.56819C11.5061 9.39245 11.5061 9.10753 11.6818 8.93179L12.6136 7.99999H9.49999C9.22385 7.99999 8.99999 7.77613 8.99999 7.49999ZM3.31819 6.06819L2.38638 6.99999H5.49999C5.77613 6.99999 5.99999 7.22385 5.99999 7.49999C5.99999 7.77613 5.77613 7.99999 5.49999 7.99999H2.38638L3.31819 8.93179C3.49392 9.10753 3.49392 9.39245 3.31819 9.56819C3.14245 9.74392 2.85753 9.74392 2.68179 9.56819L0.93179 7.81819C0.756054 7.64245 0.756054 7.35753 0.93179 7.18179L2.68179 5.43179C2.85753 5.25605 3.14245 5.25605 3.31819 5.43179C3.49392 5.60753 3.49392 5.89245 3.31819 6.06819Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),gqe=["color"],yqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,gqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.25781 3.11684C3.67771 3.45796 3.83523 3.43193 4.62369 3.37933L12.0571 2.93299C12.2147 2.93299 12.0836 2.77571 12.0311 2.74957L10.7965 1.85711C10.56 1.67347 10.2448 1.46315 9.64083 1.51576L2.44308 2.04074C2.18059 2.06677 2.12815 2.19801 2.2327 2.30322L3.25781 3.11684ZM3.7041 4.84917V12.6704C3.7041 13.0907 3.91415 13.248 4.38693 13.222L12.5562 12.7493C13.0292 12.7233 13.0819 12.4341 13.0819 12.0927V4.32397C13.0819 3.98306 12.9508 3.79921 12.6612 3.82545L4.12422 4.32397C3.80918 4.35044 3.7041 4.50803 3.7041 4.84917ZM11.7688 5.26872C11.8212 5.50518 11.7688 5.74142 11.5319 5.76799L11.1383 5.84641V11.6205C10.7965 11.8042 10.4814 11.9092 10.2188 11.9092C9.79835 11.9092 9.69305 11.7779 9.37812 11.3844L6.80345 7.34249V11.2532L7.61816 11.437C7.61816 11.437 7.61816 11.9092 6.96086 11.9092L5.14879 12.0143C5.09615 11.9092 5.14879 11.647 5.33259 11.5944L5.80546 11.4634V6.29276L5.1489 6.24015C5.09625 6.00369 5.22739 5.66278 5.5954 5.63631L7.53935 5.50528L10.2188 9.5998V5.97765L9.53564 5.89924C9.4832 5.61018 9.69305 5.40028 9.95576 5.37425L11.7688 5.26872ZM1.83874 1.33212L9.32557 0.780787C10.245 0.701932 10.4815 0.754753 11.0594 1.17452L13.4492 2.85424C13.8436 3.14309 13.975 3.22173 13.975 3.53661V12.7493C13.975 13.3266 13.7647 13.6681 13.0293 13.7203L4.33492 14.2454C3.78291 14.2717 3.52019 14.193 3.23111 13.8253L1.47116 11.5419C1.1558 11.1216 1.02466 10.8071 1.02466 10.4392V2.25041C1.02466 1.77825 1.23504 1.38441 1.83874 1.33212Z",fill:n}))}),vqe=["color"],_qe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,vqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 1.5C4.5 4.25 3 6.5 3 9C3 11.4853 5.01472 13.5 7.5 13.5C9.98528 13.5 12 11.4853 12 9C12 6.5 10.5 4.25 7.5 1.5ZM11 9C11 7.11203 9.97315 5.27195 7.5 2.87357C5.02686 5.27195 4 7.11203 4 9C4 10.933 5.567 12.5 7.5 12.5C9.433 12.5 11 10.933 11 9Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),xqe=["color"],wqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,xqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 13C12.5523 13 13 12.5523 13 12V3C13 2.44771 12.5523 2 12 2H3C2.44771 2 2 2.44771 2 3V6.5C2 6.77614 2.22386 7 2.5 7C2.77614 7 3 6.77614 3 6.5V3H12V12H8.5C8.22386 12 8 12.2239 8 12.5C8 12.7761 8.22386 13 8.5 13H12ZM9 6.5C9 6.5001 9 6.50021 9 6.50031V6.50035V9.5C9 9.77614 8.77614 10 8.5 10C8.22386 10 8 9.77614 8 9.5V7.70711L2.85355 12.8536C2.65829 13.0488 2.34171 13.0488 2.14645 12.8536C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L7.29289 7H5.5C5.22386 7 5 6.77614 5 6.5C5 6.22386 5.22386 6 5.5 6H8.5C8.56779 6 8.63244 6.01349 8.69139 6.03794C8.74949 6.06198 8.80398 6.09744 8.85143 6.14433C8.94251 6.23434 8.9992 6.35909 8.99999 6.49708L8.99999 6.49738",fill:n}))}),bqe=["color"],Cqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,bqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.49985 1.10001C3.27894 1.10001 3.09985 1.27909 3.09985 1.50001C3.09985 1.72092 3.27894 1.90001 3.49985 1.90001H11.4999C11.7208 1.90001 11.8999 1.72092 11.8999 1.50001C11.8999 1.27909 11.7208 1.10001 11.4999 1.10001H3.49985ZM4.99995 4.25001C4.99995 3.97387 4.77609 3.75001 4.49995 3.75001C4.22381 3.75001 3.99995 3.97387 3.99995 4.25001V9.55001C3.99995 11.483 5.56695 13.05 7.49995 13.05C9.43295 13.05 11 11.483 11 9.55001V4.25001C11 3.97387 10.7761 3.75001 10.5 3.75001C10.2238 3.75001 9.99995 3.97387 9.99995 4.25001V9.55001C9.99995 10.9307 8.88066 12.05 7.49995 12.05C6.11924 12.05 4.99995 10.9307 4.99995 9.55001V4.25001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Sqe=["color"],Eqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Sqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.85714 2H12.1429C12.6162 2 13 2.38376 13 2.85714V12.1429C13 12.6162 12.6162 13 12.1429 13H2.85714C2.38376 13 2 12.6162 2 12.1429V2.85714C2 2.38376 2.38376 2 2.85714 2ZM1 2.85714C1 1.83147 1.83147 1 2.85714 1H12.1429C13.1685 1 14 1.83147 14 2.85714V12.1429C14 13.1685 13.1685 14 12.1429 14H2.85714C1.83147 14 1 13.1685 1 12.1429V2.85714ZM7.49988 5.00012C7.77602 5.00012 7.99988 4.77626 7.99988 4.50012C7.99988 4.22398 7.77602 4.00012 7.49988 4.00012C7.22374 4.00012 6.99988 4.22398 6.99988 4.50012C6.99988 4.77626 7.22374 5.00012 7.49988 5.00012ZM4.49988 11.0001C4.77602 11.0001 4.99988 10.7763 4.99988 10.5001C4.99988 10.224 4.77602 10.0001 4.49988 10.0001C4.22374 10.0001 3.99988 10.224 3.99988 10.5001C3.99988 10.7763 4.22374 11.0001 4.49988 11.0001ZM4.99988 7.50012C4.99988 7.77626 4.77602 8.00012 4.49988 8.00012C4.22374 8.00012 3.99988 7.77626 3.99988 7.50012C3.99988 7.22398 4.22374 7.00012 4.49988 7.00012C4.77602 7.00012 4.99988 7.22398 4.99988 7.50012ZM4.49988 5.00012C4.77602 5.00012 4.99988 4.77626 4.99988 4.50012C4.99988 4.22398 4.77602 4.00012 4.49988 4.00012C4.22374 4.00012 3.99988 4.22398 3.99988 4.50012C3.99988 4.77626 4.22374 5.00012 4.49988 5.00012ZM10.9999 10.5001C10.9999 10.7763 10.776 11.0001 10.4999 11.0001C10.2237 11.0001 9.99988 10.7763 9.99988 10.5001C9.99988 10.224 10.2237 10.0001 10.4999 10.0001C10.776 10.0001 10.9999 10.224 10.9999 10.5001ZM10.4999 8.00012C10.776 8.00012 10.9999 7.77626 10.9999 7.50012C10.9999 7.22398 10.776 7.00012 10.4999 7.00012C10.2237 7.00012 9.99988 7.22398 9.99988 7.50012C9.99988 7.77626 10.2237 8.00012 10.4999 8.00012ZM10.9999 4.50012C10.9999 4.77626 10.776 5.00012 10.4999 5.00012C10.2237 5.00012 9.99988 4.77626 9.99988 4.50012C9.99988 4.22398 10.2237 4.00012 10.4999 4.00012C10.776 4.00012 10.9999 4.22398 10.9999 4.50012ZM7.49988 11.0001C7.77602 11.0001 7.99988 10.7763 7.99988 10.5001C7.99988 10.224 7.77602 10.0001 7.49988 10.0001C7.22374 10.0001 6.99988 10.224 6.99988 10.5001C6.99988 10.7763 7.22374 11.0001 7.49988 11.0001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Mqe=["color"],Tqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Mqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Iqe=["color"],Rqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Iqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Lqe=["color"],kqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Lqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645ZM4.42166 9.28547L11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Aqe=["color"],Pqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Aqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),$qe=["color"],$ge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,$qe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 0.875C5.49797 0.875 3.875 2.49797 3.875 4.5C3.875 6.15288 4.98124 7.54738 6.49373 7.98351C5.2997 8.12901 4.27557 8.55134 3.50407 9.31167C2.52216 10.2794 2.02502 11.72 2.02502 13.5999C2.02502 13.8623 2.23769 14.0749 2.50002 14.0749C2.76236 14.0749 2.97502 13.8623 2.97502 13.5999C2.97502 11.8799 3.42786 10.7206 4.17091 9.9883C4.91536 9.25463 6.02674 8.87499 7.49995 8.87499C8.97317 8.87499 10.0846 9.25463 10.8291 9.98831C11.5721 10.7206 12.025 11.8799 12.025 13.5999C12.025 13.8623 12.2376 14.0749 12.5 14.0749C12.7623 14.075 12.975 13.8623 12.975 13.6C12.975 11.72 12.4778 10.2794 11.4959 9.31166C10.7244 8.55135 9.70025 8.12903 8.50625 7.98352C10.0187 7.5474 11.125 6.15289 11.125 4.5C11.125 2.49797 9.50203 0.875 7.5 0.875ZM4.825 4.5C4.825 3.02264 6.02264 1.825 7.5 1.825C8.97736 1.825 10.175 3.02264 10.175 4.5C10.175 5.97736 8.97736 7.175 7.5 7.175C6.02264 7.175 4.825 5.97736 4.825 4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Oqe=["color"],Nqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Oqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.85001 7.50043C1.85001 4.37975 4.37963 1.85001 7.50001 1.85001C10.6204 1.85001 13.15 4.37975 13.15 7.50043C13.15 10.6211 10.6204 13.1509 7.50001 13.1509C4.37963 13.1509 1.85001 10.6211 1.85001 7.50043ZM7.50001 0.850006C3.82728 0.850006 0.850006 3.82753 0.850006 7.50043C0.850006 11.1733 3.82728 14.1509 7.50001 14.1509C11.1727 14.1509 14.15 11.1733 14.15 7.50043C14.15 3.82753 11.1727 0.850006 7.50001 0.850006ZM7.00001 8.00001V3.12811C7.16411 3.10954 7.33094 3.10001 7.50001 3.10001C9.93006 3.10001 11.9 5.07014 11.9 7.50043C11.9 7.66935 11.8905 7.83604 11.872 8.00001H7.00001Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Dqe=["color"],Fqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Dqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3 5.5C3 7.983 4.99169 9 7 9V12.5C7 12.7761 7.22386 13 7.5 13C7.77614 13 8 12.7761 8 12.5V9V3.1H9V12.5C9 12.7761 9.22386 13 9.5 13C9.77614 13 10 12.7761 10 12.5V3.1H11.5C11.8038 3.1 12.05 2.85376 12.05 2.55C12.05 2.24624 11.8038 2 11.5 2H9.5H8H7.5H7C4.99169 2 3 3.017 3 5.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zqe=["color"],Bqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.5 13.95C13.7485 13.95 13.95 13.7485 13.95 13.5C13.95 13.2514 13.7485 13.05 13.5 13.05L1.49995 13.05C1.25142 13.05 1.04995 13.2514 1.04995 13.5C1.04995 13.7485 1.25142 13.95 1.49995 13.95L13.5 13.95ZM11.0681 7.5683C11.2439 7.39257 11.2439 7.10764 11.0681 6.93191C10.8924 6.75617 10.6075 6.75617 10.4317 6.93191L7.94993 9.41371L7.94993 1.49998C7.94993 1.25146 7.74846 1.04998 7.49993 1.04998C7.2514 1.04998 7.04993 1.25146 7.04993 1.49998L7.04993 9.41371L4.56813 6.93191C4.39239 6.75617 4.10746 6.75617 3.93173 6.93191C3.75599 7.10764 3.75599 7.39257 3.93173 7.5683L7.18173 10.8183C7.35746 10.994 7.64239 10.994 7.81812 10.8183L11.0681 7.5683Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jqe=["color"],Vqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.05005 13.5C2.05005 13.7485 2.25152 13.95 2.50005 13.95C2.74858 13.95 2.95005 13.7485 2.95005 13.5L2.95005 1.49995C2.95005 1.25142 2.74858 1.04995 2.50005 1.04995C2.25152 1.04995 2.05005 1.25142 2.05005 1.49995L2.05005 13.5ZM8.4317 11.0681C8.60743 11.2439 8.89236 11.2439 9.06809 11.0681C9.24383 10.8924 9.24383 10.6075 9.06809 10.4317L6.58629 7.94993L14.5 7.94993C14.7485 7.94993 14.95 7.74846 14.95 7.49993C14.95 7.2514 14.7485 7.04993 14.5 7.04993L6.58629 7.04993L9.06809 4.56813C9.24383 4.39239 9.24383 4.10746 9.06809 3.93173C8.89236 3.75599 8.60743 3.75599 8.4317 3.93173L5.1817 7.18173C5.00596 7.35746 5.00596 7.64239 5.1817 7.81812L8.4317 11.0681Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Uqe=["color"],Hqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Uqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.95 1.50005C12.95 1.25152 12.7485 1.05005 12.5 1.05005C12.2514 1.05005 12.05 1.25152 12.05 1.50005L12.05 13.5C12.05 13.7486 12.2514 13.95 12.5 13.95C12.7485 13.95 12.95 13.7486 12.95 13.5L12.95 1.50005ZM6.5683 3.93188C6.39257 3.75614 6.10764 3.75614 5.93191 3.93188C5.75617 4.10761 5.75617 4.39254 5.93191 4.56827L8.41371 7.05007L0.499984 7.05007C0.251456 7.05007 0.0499847 7.25155 0.0499847 7.50007C0.0499846 7.7486 0.251457 7.95007 0.499984 7.95007L8.41371 7.95007L5.93191 10.4319C5.75617 10.6076 5.75617 10.8925 5.93191 11.0683C6.10764 11.244 6.39257 11.244 6.56831 11.0683L9.8183 7.81827C9.99404 7.64254 9.99404 7.35761 9.8183 7.18188L6.5683 3.93188Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Gqe=["color"],qqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Gqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.50005 1.05005C1.25152 1.05005 1.05005 1.25152 1.05005 1.50005C1.05005 1.74858 1.25152 1.95005 1.50005 1.95005L13.5 1.95005C13.7486 1.95005 13.95 1.74858 13.95 1.50005C13.95 1.25152 13.7486 1.05005 13.5 1.05005H1.50005ZM3.93188 7.43169C3.75614 7.60743 3.75614 7.89236 3.93188 8.06809C4.10761 8.24383 4.39254 8.24383 4.56827 8.06809L7.05007 5.58629V13.5C7.05007 13.7485 7.25155 13.95 7.50007 13.95C7.7486 13.95 7.95007 13.7485 7.95007 13.5L7.95007 5.58629L10.4319 8.06809C10.6076 8.24383 10.8925 8.24383 11.0683 8.06809C11.244 7.89235 11.244 7.60743 11.0683 7.43169L7.81827 4.18169C7.64254 4.00596 7.35761 4.00596 7.18188 4.18169L3.93188 7.43169Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Wqe=["color"],Zqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Wqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Yqe=["color"],Xqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Yqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Jqe=["color"],Kqe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Jqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),Qqe=["color"],eWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,Qqe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.07505 4.10001C5.07505 2.91103 6.25727 1.92502 7.50005 1.92502C8.74283 1.92502 9.92505 2.91103 9.92505 4.10001C9.92505 5.19861 9.36782 5.71436 8.61854 6.37884L8.58757 6.4063C7.84481 7.06467 6.92505 7.87995 6.92505 9.5C6.92505 9.81757 7.18248 10.075 7.50005 10.075C7.81761 10.075 8.07505 9.81757 8.07505 9.5C8.07505 8.41517 8.62945 7.90623 9.38156 7.23925L9.40238 7.22079C10.1496 6.55829 11.075 5.73775 11.075 4.10001C11.075 2.12757 9.21869 0.775024 7.50005 0.775024C5.7814 0.775024 3.92505 2.12757 3.92505 4.10001C3.92505 4.41758 4.18249 4.67501 4.50005 4.67501C4.81761 4.67501 5.07505 4.41758 5.07505 4.10001ZM7.50005 13.3575C7.9833 13.3575 8.37505 12.9657 8.37505 12.4825C8.37505 11.9992 7.9833 11.6075 7.50005 11.6075C7.0168 11.6075 6.62505 11.9992 6.62505 12.4825C6.62505 12.9657 7.0168 13.3575 7.50005 13.3575Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tWe=["color"],rWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nWe=["color"],iWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9.42503 3.44136C10.0561 3.23654 10.7837 3.2402 11.3792 3.54623C12.7532 4.25224 13.3477 6.07191 12.7946 8C12.5465 8.8649 12.1102 9.70472 11.1861 10.5524C10.262 11.4 8.98034 11.9 8.38571 11.9C8.17269 11.9 8 11.7321 8 11.525C8 11.3179 8.17644 11.15 8.38571 11.15C9.06497 11.15 9.67189 10.7804 10.3906 10.236C10.9406 9.8193 11.3701 9.28633 11.608 8.82191C12.0628 7.93367 12.0782 6.68174 11.3433 6.34901C10.9904 6.73455 10.5295 6.95946 9.97725 6.95946C8.7773 6.95946 8.0701 5.99412 8.10051 5.12009C8.12957 4.28474 8.66032 3.68954 9.42503 3.44136ZM3.42503 3.44136C4.05614 3.23654 4.78366 3.2402 5.37923 3.54623C6.7532 4.25224 7.34766 6.07191 6.79462 8C6.54654 8.8649 6.11019 9.70472 5.1861 10.5524C4.26201 11.4 2.98034 11.9 2.38571 11.9C2.17269 11.9 2 11.7321 2 11.525C2 11.3179 2.17644 11.15 2.38571 11.15C3.06497 11.15 3.67189 10.7804 4.39058 10.236C4.94065 9.8193 5.37014 9.28633 5.60797 8.82191C6.06282 7.93367 6.07821 6.68174 5.3433 6.34901C4.99037 6.73455 4.52948 6.95946 3.97725 6.95946C2.7773 6.95946 2.0701 5.99412 2.10051 5.12009C2.12957 4.28474 2.66032 3.68954 3.42503 3.44136Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sWe=["color"],oWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49985 0.877045C3.84216 0.877045 0.877014 3.84219 0.877014 7.49988C0.877014 11.1575 3.84216 14.1227 7.49985 14.1227C11.1575 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1575 0.877045 7.49985 0.877045ZM1.82701 7.49988C1.82701 4.36686 4.36683 1.82704 7.49985 1.82704C10.6328 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6328 13.1727 7.49985 13.1727C4.36683 13.1727 1.82701 10.6329 1.82701 7.49988ZM7.49999 9.49999C8.60456 9.49999 9.49999 8.60456 9.49999 7.49999C9.49999 6.39542 8.60456 5.49999 7.49999 5.49999C6.39542 5.49999 5.49999 6.39542 5.49999 7.49999C5.49999 8.60456 6.39542 9.49999 7.49999 9.49999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aWe=["color"],lWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.2 1H4.17741H4.1774C3.86936 0.999988 3.60368 0.999978 3.38609 1.02067C3.15576 1.04257 2.92825 1.09113 2.71625 1.22104C2.51442 1.34472 2.34473 1.51442 2.22104 1.71625C2.09113 1.92825 2.04257 2.15576 2.02067 2.38609C1.99998 2.60367 1.99999 2.86935 2 3.17738V3.1774V3.2V11.8V11.8226V11.8226C1.99999 12.1307 1.99998 12.3963 2.02067 12.6139C2.04257 12.8442 2.09113 13.0717 2.22104 13.2837C2.34473 13.4856 2.51442 13.6553 2.71625 13.779C2.92825 13.9089 3.15576 13.9574 3.38609 13.9793C3.60368 14 3.86937 14 4.17741 14H4.2H10.8H10.8226C11.1306 14 11.3963 14 11.6139 13.9793C11.8442 13.9574 12.0717 13.9089 12.2837 13.779C12.4856 13.6553 12.6553 13.4856 12.779 13.2837C12.9089 13.0717 12.9574 12.8442 12.9793 12.6139C13 12.3963 13 12.1306 13 11.8226V11.8V3.2V3.17741C13 2.86936 13 2.60368 12.9793 2.38609C12.9574 2.15576 12.9089 1.92825 12.779 1.71625C12.6553 1.51442 12.4856 1.34472 12.2837 1.22104C12.0717 1.09113 11.8442 1.04257 11.6139 1.02067C11.3963 0.999978 11.1306 0.999988 10.8226 1H10.8H4.2ZM3.23875 2.07368C3.26722 2.05623 3.32362 2.03112 3.48075 2.01618C3.64532 2.00053 3.86298 2 4.2 2H10.8C11.137 2 11.3547 2.00053 11.5193 2.01618C11.6764 2.03112 11.7328 2.05623 11.7613 2.07368C11.8285 2.11491 11.8851 2.17147 11.9263 2.23875C11.9438 2.26722 11.9689 2.32362 11.9838 2.48075C11.9995 2.64532 12 2.86298 12 3.2V11.8C12 12.137 11.9995 12.3547 11.9838 12.5193C11.9689 12.6764 11.9438 12.7328 11.9263 12.7613C11.8851 12.8285 11.8285 12.8851 11.7613 12.9263C11.7328 12.9438 11.6764 12.9689 11.5193 12.9838C11.3547 12.9995 11.137 13 10.8 13H4.2C3.86298 13 3.64532 12.9995 3.48075 12.9838C3.32362 12.9689 3.26722 12.9438 3.23875 12.9263C3.17147 12.8851 3.11491 12.8285 3.07368 12.7613C3.05624 12.7328 3.03112 12.6764 3.01618 12.5193C3.00053 12.3547 3 12.137 3 11.8V3.2C3 2.86298 3.00053 2.64532 3.01618 2.48075C3.03112 2.32362 3.05624 2.26722 3.07368 2.23875C3.11491 2.17147 3.17147 2.11491 3.23875 2.07368ZM5 10C4.72386 10 4.5 10.2239 4.5 10.5C4.5 10.7761 4.72386 11 5 11H8C8.27614 11 8.5 10.7761 8.5 10.5C8.5 10.2239 8.27614 10 8 10H5ZM4.5 7.5C4.5 7.22386 4.72386 7 5 7H10C10.2761 7 10.5 7.22386 10.5 7.5C10.5 7.77614 10.2761 8 10 8H5C4.72386 8 4.5 7.77614 4.5 7.5ZM5 4C4.72386 4 4.5 4.22386 4.5 4.5C4.5 4.77614 4.72386 5 5 5H10C10.2761 5 10.5 4.77614 10.5 4.5C10.5 4.22386 10.2761 4 10 4H5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uWe=["color"],cWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.84998 7.49998C1.84998 4.66458 4.05979 1.84998 7.49998 1.84998C10.2783 1.84998 11.6515 3.9064 12.2367 5H10.5C10.2239 5 10 5.22386 10 5.5C10 5.77614 10.2239 6 10.5 6H13.5C13.7761 6 14 5.77614 14 5.5V2.5C14 2.22386 13.7761 2 13.5 2C13.2239 2 13 2.22386 13 2.5V4.31318C12.2955 3.07126 10.6659 0.849976 7.49998 0.849976C3.43716 0.849976 0.849976 4.18537 0.849976 7.49998C0.849976 10.8146 3.43716 14.15 7.49998 14.15C9.44382 14.15 11.0622 13.3808 12.2145 12.2084C12.8315 11.5806 13.3133 10.839 13.6418 10.0407C13.7469 9.78536 13.6251 9.49315 13.3698 9.38806C13.1144 9.28296 12.8222 9.40478 12.7171 9.66014C12.4363 10.3425 12.0251 10.9745 11.5013 11.5074C10.5295 12.4963 9.16504 13.15 7.49998 13.15C4.05979 13.15 1.84998 10.3354 1.84998 7.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hWe=["color"],dWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fWe=["color"],pWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.04995 2.74995C3.04995 2.44619 2.80371 2.19995 2.49995 2.19995C2.19619 2.19995 1.94995 2.44619 1.94995 2.74995V12.25C1.94995 12.5537 2.19619 12.8 2.49995 12.8C2.80371 12.8 3.04995 12.5537 3.04995 12.25V2.74995ZM5.73333 2.30776C5.57835 2.22596 5.39185 2.23127 5.24177 2.32176C5.0917 2.41225 4.99995 2.57471 4.99995 2.74995V12.25C4.99995 12.4252 5.0917 12.5877 5.24177 12.6781C5.39185 12.7686 5.57835 12.7739 5.73333 12.6921L14.7333 7.94214C14.8973 7.85559 15 7.68539 15 7.49995C15 7.31452 14.8973 7.14431 14.7333 7.05776L5.73333 2.30776ZM5.99995 11.4207V3.5792L13.4287 7.49995L5.99995 11.4207Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mWe=["color"],gWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.85357 3.85355L7.65355 3.05353C8.2981 2.40901 9.42858 1.96172 10.552 1.80125C11.1056 1.72217 11.6291 1.71725 12.0564 1.78124C12.4987 1.84748 12.7698 1.97696 12.8965 2.10357C13.0231 2.23018 13.1526 2.50125 13.2188 2.94357C13.2828 3.37086 13.2779 3.89439 13.1988 4.44801C13.0383 5.57139 12.591 6.70188 11.9464 7.34645L7.49999 11.7929L6.35354 10.6465C6.15827 10.4512 5.84169 10.4512 5.64643 10.6465C5.45117 10.8417 5.45117 11.1583 5.64643 11.3536L7.14644 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L8.40073 12.3064L9.57124 14.2572C9.65046 14.3893 9.78608 14.4774 9.9389 14.4963C10.0917 14.5151 10.2447 14.4624 10.3535 14.3536L12.3535 12.3536C12.4648 12.2423 12.5172 12.0851 12.495 11.9293L12.0303 8.67679L12.6536 8.05355C13.509 7.19808 14.0117 5.82855 14.1887 4.58943C14.2784 3.9618 14.2891 3.33847 14.2078 2.79546C14.1287 2.26748 13.9519 1.74482 13.6035 1.39645C13.2552 1.04809 12.7325 0.871332 12.2045 0.792264C11.6615 0.710945 11.0382 0.721644 10.4105 0.8113C9.17143 0.988306 7.80189 1.491 6.94644 2.34642L6.32322 2.96968L3.07071 2.50504C2.91492 2.48278 2.75773 2.53517 2.64645 2.64646L0.646451 4.64645C0.537579 4.75533 0.484938 4.90829 0.50375 5.0611C0.522563 5.21391 0.61073 5.34954 0.742757 5.42876L2.69364 6.59928L2.14646 7.14645C2.0527 7.24022 2.00002 7.3674 2.00002 7.50001C2.00002 7.63261 2.0527 7.75979 2.14646 7.85356L3.64647 9.35356C3.84173 9.54883 4.15831 9.54883 4.35357 9.35356C4.54884 9.1583 4.54884 8.84172 4.35357 8.64646L3.20712 7.50001L3.85357 6.85356L6.85357 3.85355ZM10.0993 13.1936L9.12959 11.5775L11.1464 9.56067L11.4697 11.8232L10.0993 13.1936ZM3.42251 5.87041L5.43935 3.85356L3.17678 3.53034L1.80638 4.90074L3.42251 5.87041ZM2.35356 10.3535C2.54882 10.1583 2.54882 9.8417 2.35356 9.64644C2.1583 9.45118 1.84171 9.45118 1.64645 9.64644L0.646451 10.6464C0.451188 10.8417 0.451188 11.1583 0.646451 11.3535C0.841713 11.5488 1.1583 11.5488 1.35356 11.3535L2.35356 10.3535ZM3.85358 11.8536C4.04884 11.6583 4.04885 11.3417 3.85359 11.1465C3.65833 10.9512 3.34175 10.9512 3.14648 11.1465L1.14645 13.1464C0.95119 13.3417 0.951187 13.6583 1.14645 13.8535C1.34171 14.0488 1.65829 14.0488 1.85355 13.8536L3.85358 11.8536ZM5.35356 13.3535C5.54882 13.1583 5.54882 12.8417 5.35356 12.6464C5.1583 12.4512 4.84171 12.4512 4.64645 12.6464L3.64645 13.6464C3.45119 13.8417 3.45119 14.1583 3.64645 14.3535C3.84171 14.5488 4.1583 14.5488 4.35356 14.3535L5.35356 13.3535ZM9.49997 6.74881C10.1897 6.74881 10.7488 6.1897 10.7488 5.5C10.7488 4.8103 10.1897 4.25118 9.49997 4.25118C8.81026 4.25118 8.25115 4.8103 8.25115 5.5C8.25115 6.1897 8.81026 6.74881 9.49997 6.74881Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yWe=["color"],vWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.59664 2.93628C7.76085 3.06401 8.00012 2.94698 8.00012 2.73895V1.99998C9.98143 2 11.1848 2.3637 11.9105 3.08945C12.6363 3.81522 13 5.0186 13 6.99998C13 7.27613 13.2239 7.49998 13.5 7.49998C13.7761 7.49998 14 7.27613 14 6.99998C14 4.9438 13.6325 3.39719 12.6176 2.38234C11.6028 1.36752 10.0562 0.999999 8.00012 0.999984V0.261266C8.00012 0.0532293 7.76085 -0.0637944 7.59664 0.063928L6.00384 1.30277C5.87516 1.40286 5.87516 1.59735 6.00384 1.69744L7.59664 2.93628ZM9.5 5H2.5C2.22386 5 2 5.22386 2 5.5V12.5C2 12.7761 2.22386 13 2.5 13H9.5C9.77614 13 10 12.7761 10 12.5V5.5C10 5.22386 9.77614 5 9.5 5ZM2.5 4C1.67157 4 1 4.67157 1 5.5V12.5C1 13.3284 1.67157 14 2.5 14H9.5C10.3284 14 11 13.3284 11 12.5V5.5C11 4.67157 10.3284 4 9.5 4H2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),_We=["color"],xWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_We);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wWe=["color"],bWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14 12.85L1 12.85L1 14.15L14 14.15L14 12.85ZM14 8.85002L1 8.85002L1 10.15L14 10.15L14 8.85002ZM1 4.85003L14 4.85003L14 6.15003L1 6.15002L1 4.85003ZM14 0.850025L1 0.850025L1 2.15002L14 2.15002L14 0.850025Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),CWe=["color"],SWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,CWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.5 4C0.223858 4 0 4.22386 0 4.5V10.5C0 10.7761 0.223858 11 0.5 11H14.5C14.7761 11 15 10.7761 15 10.5V4.5C15 4.22386 14.7761 4 14.5 4H0.5ZM1 10V5H2.075V7.5C2.075 7.73472 2.26528 7.925 2.5 7.925C2.73472 7.925 2.925 7.73472 2.925 7.5V5H4.075V6.5C4.075 6.73472 4.26528 6.925 4.5 6.925C4.73472 6.925 4.925 6.73472 4.925 6.5V5H6.075V6.5C6.075 6.73472 6.26528 6.925 6.5 6.925C6.73472 6.925 6.925 6.73472 6.925 6.5V5H8.075V7.5C8.075 7.73472 8.26528 7.925 8.5 7.925C8.73472 7.925 8.925 7.73472 8.925 7.5V5H10.075V6.5C10.075 6.73472 10.2653 6.925 10.5 6.925C10.7347 6.925 10.925 6.73472 10.925 6.5V5H12.075V6.5C12.075 6.73472 12.2653 6.925 12.5 6.925C12.7347 6.925 12.925 6.73472 12.925 6.5V5H14V10H1Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),EWe=["color"],MWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.5 0C0.223858 0 0 0.223858 0 0.5V14.5C0 14.7761 0.223858 15 0.5 15H4.5C4.77614 15 5 14.7761 5 14.5V5H14.5C14.7761 5 15 4.77614 15 4.5V0.5C15 0.223858 14.7761 0 14.5 0H0.5ZM1 4.07505L1 1H4.07502C4.07502 1 4.07502 1 4.07502 1L4.07505 4.07507L1 4.07505ZM0.999997 4.92505L1 14H4V12.925H2.75002C2.5153 12.925 2.32502 12.7348 2.32502 12.5C2.32502 12.2653 2.5153 12.075 2.75002 12.075H4V10.925H2.25002C2.0153 10.925 1.82502 10.7347 1.82502 10.5C1.82502 10.2653 2.0153 10.075 2.25002 10.075H4V8.92504L2.75002 8.92502C2.5153 8.92502 2.32502 8.73474 2.32502 8.50002C2.32503 8.26529 2.51531 8.07502 2.75003 8.07502L4 8.07504V6.92502L2.74999 6.925C2.51527 6.925 2.325 6.73472 2.325 6.5C2.325 6.26528 2.51529 6.075 2.75001 6.075L4 6.07502V4.92507L0.999997 4.92505ZM4.92505 4H6.075V2.75006C6.075 2.51534 6.26528 2.32506 6.5 2.32506C6.73472 2.32506 6.925 2.51534 6.925 2.75006V4H8.07502V2.75005C8.07502 2.51533 8.2653 2.32505 8.50002 2.32505C8.73474 2.32505 8.92502 2.51533 8.92502 2.75005V4H10.0751V2.25005C10.0751 2.01533 10.2653 1.82505 10.5001 1.82505C10.7348 1.82505 10.9251 2.01533 10.9251 2.25005V4H12.0751V2.75005C12.0751 2.51533 12.2654 2.32505 12.5001 2.32505C12.7348 2.32505 12.9251 2.51533 12.9251 2.75005V4H14V1H4.92502L4.92505 4Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),TWe=["color"],IWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,TWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.949988 4.48455C0.949988 5.34059 1.64395 6.03455 2.49999 6.03455C3.35603 6.03455 4.04999 5.34059 4.04999 4.48455C4.04999 3.6285 3.35603 2.93455 2.49999 2.93455C1.64395 2.93455 0.949988 3.6285 0.949988 4.48455ZM2.49999 6.93455C1.14689 6.93455 0.0499878 5.83764 0.0499878 4.48455C0.0499878 3.13145 1.14689 2.03455 2.49999 2.03455C3.85309 2.03455 4.94999 3.13145 4.94999 4.48455C4.94999 4.80813 4.88726 5.11707 4.77329 5.39985L5.73655 6.04413C5.72943 6.06656 5.72269 6.08914 5.71635 6.11188L5.56288 6.66186L5.21005 6.89773L4.21554 6.23366C3.77357 6.6672 3.168 6.93455 2.49999 6.93455ZM0.949991 10.5C0.949991 9.64394 1.64395 8.94998 2.49999 8.94998C3.35603 8.94998 4.04999 9.64394 4.04999 10.5C4.04999 11.356 3.35603 12.05 2.49999 12.05C1.64395 12.05 0.949991 11.356 0.949991 10.5ZM2.49999 8.04998C1.14689 8.04998 0.0499908 9.14688 0.0499908 10.5C0.0499908 11.8531 1.14689 12.95 2.49999 12.95C3.85309 12.95 4.94999 11.8531 4.94999 10.5C4.94999 10.1803 4.88877 9.87497 4.77743 9.595L15 2.75737L14.0486 2.85737C12.7077 2.9983 11.4091 3.40895 10.231 4.06461L7.15646 5.77564C6.92307 5.90553 6.75134 6.12339 6.67955 6.38066L6.42653 7.28737L4.22437 8.75957C3.78166 8.32091 3.17246 8.04998 2.49999 8.04998ZM7.14435 9.2149L7.15646 9.22176L10.231 10.9328C11.4091 11.5884 12.7077 11.9991 14.0486 12.14L15 12.24L8.81072 8.1003L7.14435 9.2149Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),RWe=["color"],LWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,RWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 1.5C2 1.77614 1.77614 2 1.5 2C1.22386 2 1 1.77614 1 1.5C1 1.22386 1.22386 1 1.5 1C1.77614 1 2 1.22386 2 1.5ZM2 5L2 10H13V5H2ZM2 4C1.44772 4 1 4.44772 1 5V10C1 10.5523 1.44772 11 2 11H13C13.5523 11 14 10.5523 14 10V5C14 4.44772 13.5523 4 13 4H2ZM1.5 14C1.77614 14 2 13.7761 2 13.5C2 13.2239 1.77614 13 1.5 13C1.22386 13 1 13.2239 1 13.5C1 13.7761 1.22386 14 1.5 14ZM4 1.5C4 1.77614 3.77614 2 3.5 2C3.22386 2 3 1.77614 3 1.5C3 1.22386 3.22386 1 3.5 1C3.77614 1 4 1.22386 4 1.5ZM3.5 14C3.77614 14 4 13.7761 4 13.5C4 13.2239 3.77614 13 3.5 13C3.22386 13 3 13.2239 3 13.5C3 13.7761 3.22386 14 3.5 14ZM6 1.5C6 1.77614 5.77614 2 5.5 2C5.22386 2 5 1.77614 5 1.5C5 1.22386 5.22386 1 5.5 1C5.77614 1 6 1.22386 6 1.5ZM5.5 14C5.77614 14 6 13.7761 6 13.5C6 13.2239 5.77614 13 5.5 13C5.22386 13 5 13.2239 5 13.5C5 13.7761 5.22386 14 5.5 14ZM8 1.5C8 1.77614 7.77614 2 7.5 2C7.22386 2 7 1.77614 7 1.5C7 1.22386 7.22386 1 7.5 1C7.77614 1 8 1.22386 8 1.5ZM7.5 14C7.77614 14 8 13.7761 8 13.5C8 13.2239 7.77614 13 7.5 13C7.22386 13 7 13.2239 7 13.5C7 13.7761 7.22386 14 7.5 14ZM10 1.5C10 1.77614 9.77614 2 9.5 2C9.22386 2 9 1.77614 9 1.5C9 1.22386 9.22386 1 9.5 1C9.77614 1 10 1.22386 10 1.5ZM9.5 14C9.77614 14 10 13.7761 10 13.5C10 13.2239 9.77614 13 9.5 13C9.22386 13 9 13.2239 9 13.5C9 13.7761 9.22386 14 9.5 14ZM12 1.5C12 1.77614 11.7761 2 11.5 2C11.2239 2 11 1.77614 11 1.5C11 1.22386 11.2239 1 11.5 1C11.7761 1 12 1.22386 12 1.5ZM11.5 14C11.7761 14 12 13.7761 12 13.5C12 13.2239 11.7761 13 11.5 13C11.2239 13 11 13.2239 11 13.5C11 13.7761 11.2239 14 11.5 14ZM14 1.5C14 1.77614 13.7761 2 13.5 2C13.2239 2 13 1.77614 13 1.5C13 1.22386 13.2239 1 13.5 1C13.7761 1 14 1.22386 14 1.5ZM13.5 14C13.7761 14 14 13.7761 14 13.5C14 13.2239 13.7761 13 13.5 13C13.2239 13 13 13.2239 13 13.5C13 13.7761 13.2239 14 13.5 14Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),kWe=["color"],Oge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,kWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6 3.5C6 2.67157 6.67157 2 7.5 2C8.32843 2 9 2.67157 9 3.5C9 4.32843 8.32843 5 7.5 5C6.67157 5 6 4.32843 6 3.5ZM8 5.94999C9.14112 5.71836 10 4.70948 10 3.5C10 2.11929 8.88071 1 7.5 1C6.11929 1 5 2.11929 5 3.5C5 4.70948 5.85888 5.71836 7 5.94999V13.5C7 13.7761 7.22386 14 7.5 14C7.77614 14 8 13.7761 8 13.5V5.94999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),AWe=["color"],Nge=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,AWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10 3.5C10 4.70948 9.14112 5.71836 8 5.94999V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.94999C5.85888 5.71836 5 4.70948 5 3.5C5 2.11929 6.11929 1 7.5 1C8.88071 1 10 2.11929 10 3.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),PWe=["color"],$We=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,PWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),OWe=["color"],NWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,OWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{opacity:".05",d:"M12.1619 3.85182C8.35817 4.88918 4.88936 8.358 3.85199 12.1617L3.3696 12.0301C4.45356 8.05564 8.05581 4.45339 12.0303 3.36943L12.1619 3.85182Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".1",d:"M11.8807 3.42707C8.03441 4.50542 4.50561 8.03422 3.42726 11.8805L2.94582 11.7456C4.07129 7.73121 7.7314 4.0711 11.7458 2.94563L11.8807 3.42707Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".15",d:"M11.5201 3.02556C7.69092 4.16199 4.16779 7.68323 3.02805 11.512L2.54883 11.3694C3.73676 7.37869 7.38659 3.73076 11.3778 2.54623L11.5201 3.02556Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".2",d:"M11.0468 2.66169C7.31117 3.87664 3.87918 7.3079 2.66298 11.0434L2.18754 10.8886C3.45324 7.00109 7.00445 3.45062 10.8921 2.18621L11.0468 2.66169Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".25",d:"M10.5201 2.32365C6.92091 3.61447 3.62391 6.90876 2.32845 10.5073L1.858 10.338C3.20398 6.59909 6.61155 3.19424 10.3513 1.85301L10.5201 2.32365Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".3",d:"M9.90222 2.03122C6.50003 3.39465 3.39968 6.49367 2.03399 9.89551L1.56998 9.70924C2.98651 6.18076 6.18728 2.98133 9.71622 1.5671L9.90222 2.03122Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".35",d:"M9.20727 1.78873C6.06136 3.20349 3.21103 6.05203 1.79331 9.19738L1.33747 8.99192C2.80536 5.73528 5.74485 2.7976 9.0022 1.33272L9.20727 1.78873Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".4",d:"M8.40713 1.62085C5.59323 3.05117 3.05794 5.58509 1.62544 8.39847L1.17987 8.1716C2.66036 5.26397 5.27232 2.6534 8.18057 1.17513L8.40713 1.62085Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".45",d:"M7.46207 1.56747C5.08689 2.94695 2.95362 5.07912 1.57249 7.45379L1.14028 7.20241C2.56503 4.75273 4.7607 2.55818 7.21096 1.1351L7.46207 1.56747Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".5",d:"M6.30407 1.70487C4.51964 2.91063 2.90983 4.52061 1.7043 6.30513L1.28998 6.02524C2.5313 4.18773 4.18673 2.53214 6.02413 1.29059L6.30407 1.70487Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),DWe=["color"],FWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,DWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 9.1488 1.47969 10.657 2.4767 11.8162L1.64647 12.6464C1.45121 12.8417 1.45121 13.1583 1.64647 13.3535C1.84173 13.5488 2.15832 13.5488 2.35358 13.3535L3.18383 12.5233C4.34302 13.5202 5.8511 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 5.85107 13.5202 4.34298 12.5233 3.1838L13.3536 2.35355C13.5488 2.15829 13.5488 1.8417 13.3536 1.64644C13.1583 1.45118 12.8417 1.45118 12.6465 1.64644L11.8162 2.47667C10.657 1.47966 9.14883 0.877045 7.49991 0.877045ZM11.1423 3.15065C10.1568 2.32449 8.88644 1.82704 7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 8.88641 2.32452 10.1568 3.15069 11.1422L11.1423 3.15065ZM3.85781 11.8493C4.84322 12.6753 6.11348 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 6.11345 12.6754 4.84319 11.8493 3.85778L3.85781 11.8493Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zWe=["color"],BWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{opacity:".05",d:"M12.1398 3.88617C13.8553 4.94159 15 6.83701 15 9.00001C15 12.3137 12.3137 15 9.00002 15C6.84351 15 4.95296 13.8621 3.89569 12.1552L4.32076 11.8919C5.29069 13.4578 7.02376 14.5 9.00002 14.5C12.0376 14.5 14.5 12.0375 14.5 9.00001C14.5 7.01781 13.4516 5.28027 11.8778 4.31203L12.1398 3.88617Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".2",d:"M12.851 5.07321C13.8684 6.07106 14.5 7.46199 14.5 9C14.5 12.0375 12.0376 14.5 9.00004 14.5C7.46215 14.5 6.07132 13.8685 5.07349 12.8513L5.43043 12.5011C6.3381 13.4264 7.60186 14 9.00004 14C11.7614 14 14 11.7614 14 9C14 7.60171 13.4264 6.33786 12.5009 5.43017L12.851 5.07321Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".35",d:"M13.3022 6.45071C13.7455 7.19737 14 8.06935 14 9.00001C14 11.7614 11.7614 14 9.00002 14C8.04868 14 7.15868 13.7341 6.40118 13.2724L6.66142 12.8454C7.34275 13.2607 8.14306 13.5 9.00002 13.5C11.4853 13.5 13.5 11.4853 13.5 9.00001C13.5 8.16165 13.271 7.37754 12.8722 6.70599L13.3022 6.45071Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".5",d:"M13.3745 7.94022C13.4566 8.28031 13.5 8.63525 13.5 9.00001C13.5 11.4853 11.4853 13.5 9.00003 13.5C8.61104 13.5 8.23323 13.4506 7.87268 13.3576L7.99759 12.8734C8.31768 12.956 8.65353 13 9.00003 13C11.2091 13 13 11.2091 13 9.00001C13 8.67509 12.9613 8.35953 12.8884 8.05757L13.3745 7.94022Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{opacity:".65",d:"M12.9155 9.82133C12.5898 11.3813 11.3562 12.6072 9.79205 12.9215L9.69354 12.4313C11.0613 12.1565 12.1413 11.0834 12.4261 9.71915L12.9155 9.82133Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}),E.createElement("path",{d:"M1.2771 7.50253C1.2771 4.06456 4.06413 1.27753 7.5021 1.27753C10.94 1.27753 13.7271 4.06456 13.7271 7.50253C13.7271 10.9405 10.94 13.7275 7.5021 13.7275C4.06413 13.7275 1.2771 10.9405 1.2771 7.50253ZM7.5021 2.22753C4.5888 2.22753 2.2271 4.58923 2.2271 7.50253C2.2271 10.4158 4.5888 12.7775 7.5021 12.7775C10.4154 12.7775 12.7771 10.4158 12.7771 7.50253C12.7771 4.58923 10.4154 2.22753 7.5021 2.22753Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jWe=["color"],VWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 7.50003C5 8.32845 4.32843 9.00003 3.5 9.00003C2.67157 9.00003 2 8.32845 2 7.50003C2 6.6716 2.67157 6.00003 3.5 6.00003C4.32843 6.00003 5 6.6716 5 7.50003ZM5.71313 8.66388C5.29445 9.45838 4.46048 10 3.5 10C2.11929 10 1 8.88074 1 7.50003C1 6.11931 2.11929 5.00003 3.5 5.00003C4.46048 5.00003 5.29445 5.54167 5.71313 6.33616L9.10424 4.21671C9.03643 3.98968 9 3.74911 9 3.50003C9 2.11932 10.1193 1.00003 11.5 1.00003C12.8807 1.00003 14 2.11932 14 3.50003C14 4.88074 12.8807 6.00003 11.5 6.00003C10.6915 6.00003 9.97264 5.61624 9.51566 5.0209L5.9853 7.22738C5.99502 7.31692 6 7.40789 6 7.50003C6 7.59216 5.99502 7.68312 5.9853 7.77267L9.51567 9.97915C9.97265 9.38382 10.6915 9.00003 11.5 9.00003C12.8807 9.00003 14 10.1193 14 11.5C14 12.8807 12.8807 14 11.5 14C10.1193 14 9 12.8807 9 11.5C9 11.2509 9.03643 11.0104 9.10425 10.7833L5.71313 8.66388ZM11.5 5.00003C12.3284 5.00003 13 4.32846 13 3.50003C13 2.6716 12.3284 2.00003 11.5 2.00003C10.6716 2.00003 10 2.6716 10 3.50003C10 4.32846 10.6716 5.00003 11.5 5.00003ZM13 11.5C13 12.3285 12.3284 13 11.5 13C10.6716 13 10 12.3285 10 11.5C10 10.6716 10.6716 10 11.5 10C12.3284 10 13 10.6716 13 11.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),UWe=["color"],HWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,UWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.5 5.00006C3.22386 5.00006 3 5.22392 3 5.50006L3 11.5001C3 11.7762 3.22386 12.0001 3.5 12.0001L11.5 12.0001C11.7761 12.0001 12 11.7762 12 11.5001L12 5.50006C12 5.22392 11.7761 5.00006 11.5 5.00006L10.25 5.00006C9.97386 5.00006 9.75 4.7762 9.75 4.50006C9.75 4.22392 9.97386 4.00006 10.25 4.00006L11.5 4.00006C12.3284 4.00006 13 4.67163 13 5.50006L13 11.5001C13 12.3285 12.3284 13.0001 11.5 13.0001L3.5 13.0001C2.67157 13.0001 2 12.3285 2 11.5001L2 5.50006C2 4.67163 2.67157 4.00006 3.5 4.00006L4.75 4.00006C5.02614 4.00006 5.25 4.22392 5.25 4.50006C5.25 4.7762 5.02614 5.00006 4.75 5.00006L3.5 5.00006ZM7 1.6364L5.5682 3.0682C5.39246 3.24393 5.10754 3.24393 4.9318 3.0682C4.75607 2.89246 4.75607 2.60754 4.9318 2.4318L7.1818 0.181802C7.26619 0.09741 7.38065 0.049999 7.5 0.049999C7.61935 0.049999 7.73381 0.09741 7.8182 0.181802L10.0682 2.4318C10.2439 2.60754 10.2439 2.89246 10.0682 3.0682C9.89246 3.24393 9.60754 3.24393 9.4318 3.0682L8 1.6364L8 8.5C8 8.77614 7.77614 9 7.5 9C7.22386 9 7 8.77614 7 8.5L7 1.6364Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),GWe=["color"],qWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,GWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M12.3536 1.14645C12.1583 0.951184 11.8417 0.951184 11.6464 1.14645C11.4512 1.34171 11.4512 1.65829 11.6464 1.85355L12.7929 3H12C10.7037 3 9.71111 3.58423 8.87248 4.38931C8.20065 5.03427 7.59349 5.85684 6.99461 6.6682C6.86287 6.84668 6.73154 7.02462 6.6 7.2C5.10874 9.18835 3.49037 11 0.5 11C0.223858 11 0 11.2239 0 11.5C0 11.7761 0.223858 12 0.5 12C4.00963 12 5.89126 9.81165 7.4 7.8C7.54367 7.60845 7.6832 7.41962 7.81996 7.23454L7.82005 7.23443L7.82006 7.23441C8.41674 6.42695 8.96069 5.69085 9.56502 5.11069C10.2889 4.41577 11.0463 4 12 4H12.7929L11.6464 5.14645C11.4512 5.34171 11.4512 5.65829 11.6464 5.85355C11.8417 6.04882 12.1583 6.04882 12.3536 5.85355L14.3536 3.85355C14.5488 3.65829 14.5488 3.34171 14.3536 3.14645L12.3536 1.14645ZM0.5 3C3.35278 3 5.12992 4.44588 6.50548 6.06746L6.3762 6.24266C6.2483 6.4161 6.12293 6.58609 6 6.75C5.96397 6.79804 5.92798 6.84581 5.892 6.89331C4.57348 5.29306 3.02637 4 0.5 4C0.223858 4 0 3.77614 0 3.5C0 3.22386 0.223858 3 0.5 3ZM8.87248 10.6107C8.37284 10.131 7.90897 9.55314 7.45767 8.95468C7.64688 8.71693 7.82704 8.48061 8 8.25L8.08987 8.12987C8.58412 8.79402 9.05288 9.39766 9.56502 9.88931C10.2889 10.5842 11.0463 11 12 11H12.7929L11.6464 9.85355C11.4512 9.65829 11.4512 9.34171 11.6464 9.14645C11.8417 8.95118 12.1583 8.95118 12.3536 9.14645L14.3536 11.1464C14.5488 11.3417 14.5488 11.6583 14.3536 11.8536L12.3536 13.8536C12.1583 14.0488 11.8417 14.0488 11.6464 13.8536C11.4512 13.6583 11.4512 13.3417 11.6464 13.1464L12.7929 12H12C10.7037 12 9.71111 11.4158 8.87248 10.6107Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),WWe=["color"],ZWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,WWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),YWe=["color"],XWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,YWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.53731 0.826873C7.5125 0.824392 7.4875 0.824392 7.46269 0.826873L3.96269 1.17687C3.85672 1.18747 3.76025 1.24262 3.69736 1.32857L0.699771 5.42528C0.654046 5.48627 0.62647 5.56165 0.625057 5.6434C0.625019 5.6456 0.625 5.64781 0.625 5.65001C0.625 5.65052 0.625001 5.65103 0.625003 5.65153C0.625363 5.74237 0.658021 5.82559 0.712087 5.8903L7.21042 13.7883C7.28165 13.8749 7.38789 13.925 7.5 13.925C7.61211 13.925 7.71835 13.8749 7.78958 13.7883L14.2879 5.89031C14.342 5.8256 14.3746 5.74237 14.375 5.65153C14.375 5.65103 14.375 5.65052 14.375 5.65001C14.375 5.64849 14.375 5.64697 14.375 5.64545C14.3749 5.63963 14.3747 5.63382 14.3744 5.62801C14.37 5.55219 14.3431 5.48242 14.3002 5.42527L11.3026 1.32857C11.2397 1.24262 11.1433 1.18747 11.0373 1.17687L7.53731 0.826873ZM10.925 5.27501V5.25236L10.9223 5.27501H10.925ZM10.9342 5.17498H13.1877L11.2495 2.5261L10.9342 5.17498ZM10.5707 1.88395L8.04432 1.63131L10.1747 5.21034L10.5707 1.88395ZM6.95568 1.63131L4.42931 1.88395L4.82531 5.21034L6.95568 1.63131ZM3.75046 2.5261L1.81226 5.17498H4.0658L3.75046 2.5261ZM1.79416 6.02501L6.75861 12.0587L4.22371 6.0669C4.21787 6.0531 4.21314 6.0391 4.20949 6.02501H1.79416ZM5.15055 6.02501L7.49999 12.1085L9.84943 6.02501H9.78681H5.21319H5.15055ZM10.7905 6.02501C10.7869 6.0391 10.7821 6.0531 10.7763 6.0669L8.24139 12.0587L13.2058 6.02501H10.7905ZM7.5 2.18317L9.34038 5.27501H5.65962L7.5 2.18317Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),JWe=["color"],KWe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.10876 14L9.46582 1H10.8178L5.46074 14H4.10876Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),QWe=["color"],eZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,QWe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10.3004 7.49991C10.3004 8.4943 9.49426 9.30041 8.49988 9.30041C7.50549 9.30041 6.69938 8.4943 6.69938 7.49991C6.69938 6.50553 7.50549 5.69942 8.49988 5.69942C9.49426 5.69942 10.3004 6.50553 10.3004 7.49991ZM11.205 8C10.9699 9.28029 9.84816 10.2504 8.49988 10.2504C7.1516 10.2504 6.0299 9.28029 5.79473 8H0.5C0.223858 8 0 7.77614 0 7.5C0 7.22386 0.223858 7 0.5 7H5.7947C6.0298 5.71962 7.15154 4.74942 8.49988 4.74942C9.84822 4.74942 10.97 5.71962 11.2051 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H11.205Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tZe=["color"],rZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14.4999 0.999994C14.2237 0.999994 13.9999 1.22385 13.9999 1.49999L13.9999 5.99995L9.99992 5.99995C9.44764 5.99995 8.99993 6.44766 8.99993 6.99994L8.99993 7.99994C8.99993 8.55222 9.44764 8.99993 9.99992 8.99993L13.9999 8.99993L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999994 14.4999 0.999994ZM4.99996 5.99995L0.999992 5.99995L0.999992 1.49999C0.999992 1.22385 0.776136 0.999994 0.499996 0.999994C0.223856 0.999994 -9.7852e-09 1.22385 -2.18557e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 8.99993L4.99996 8.99993C5.55224 8.99993 5.99995 8.55222 5.99995 7.99993L5.99995 6.99994C5.99995 6.44766 5.55224 5.99995 4.99996 5.99995Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nZe=["color"],iZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1L9 1V5C9 5.55228 8.55228 6 8 6H7C6.44772 6 6 5.55228 6 5V1H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM7 9C6.44772 9 6 9.44771 6 10V14H1.49988C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H9V10C9 9.44772 8.55228 9 8 9H7Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sZe=["color"],oZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992ZM0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992ZM1.99998 6.99994C1.99998 6.44766 2.44769 5.99995 2.99998 5.99995L5.99995 5.99995C6.55223 5.99995 6.99994 6.44766 6.99994 6.99994L6.99994 7.99993C6.99994 8.55221 6.55223 8.99992 5.99995 8.99992L2.99998 8.99992C2.4477 8.99992 1.99998 8.55221 1.99998 7.99993L1.99998 6.99994ZM8.99993 5.99995C8.44765 5.99995 7.99993 6.44766 7.99993 6.99994L7.99993 7.99993C7.99993 8.55221 8.44765 8.99992 8.99993 8.99992L11.9999 8.99992C12.5522 8.99992 12.9999 8.55221 12.9999 7.99993L12.9999 6.99994C12.9999 6.44766 12.5522 5.99995 11.9999 5.99995L8.99993 5.99995Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aZe=["color"],lZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM7 2C6.44772 2 6 2.44772 6 3V6C6 6.55228 6.44772 7 7 7H8C8.55228 7 9 6.55228 9 6V3C9 2.44772 8.55228 2 8 2H7ZM7 8C6.44772 8 6 8.44771 6 9V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V9C9 8.44772 8.55228 8 8 8H7ZM1.49988 14C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H1.49988Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uZe=["color"],cZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.46968 1.05085C7.64122 1.13475 7.75 1.30904 7.75 1.5V13.5C7.75 13.691 7.64122 13.8653 7.46968 13.9492C7.29813 14.0331 7.09377 14.0119 6.94303 13.8947L3.2213 11H1.5C0.671571 11 0 10.3284 0 9.5V5.5C0 4.67158 0.671573 4 1.5 4H3.2213L6.94303 1.10533C7.09377 0.988085 7.29813 0.966945 7.46968 1.05085ZM6.75 2.52232L3.69983 4.89468C3.61206 4.96294 3.50405 5 3.39286 5H1.5C1.22386 5 1 5.22386 1 5.5V9.5C1 9.77615 1.22386 10 1.5 10H3.39286C3.50405 10 3.61206 10.0371 3.69983 10.1053L6.75 12.4777V2.52232ZM10.2784 3.84804C10.4623 3.72567 10.7106 3.77557 10.833 3.95949C12.2558 6.09798 12.2558 8.90199 10.833 11.0405C10.7106 11.2244 10.4623 11.2743 10.2784 11.1519C10.0944 11.0296 10.0445 10.7813 10.1669 10.5973C11.4111 8.72728 11.4111 6.27269 10.1669 4.40264C10.0445 4.21871 10.0944 3.97041 10.2784 3.84804ZM12.6785 1.43044C12.5356 1.2619 12.2832 1.24104 12.1147 1.38386C11.9462 1.52667 11.9253 1.77908 12.0681 1.94762C14.7773 5.14488 14.7773 9.85513 12.0681 13.0524C11.9253 13.2209 11.9462 13.4733 12.1147 13.6161C12.2832 13.759 12.5356 13.7381 12.6785 13.5696C15.6406 10.0739 15.6406 4.92612 12.6785 1.43044Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hZe=["color"],dZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8 1.5C8 1.31062 7.893 1.13749 7.72361 1.05279C7.55421 0.968093 7.35151 0.986371 7.2 1.1L3.33333 4H1.5C0.671573 4 0 4.67158 0 5.5V9.5C0 10.3284 0.671573 11 1.5 11H3.33333L7.2 13.9C7.35151 14.0136 7.55421 14.0319 7.72361 13.9472C7.893 13.8625 8 13.6894 8 13.5V1.5ZM3.8 4.9L7 2.5V12.5L3.8 10.1C3.71345 10.0351 3.60819 10 3.5 10H1.5C1.22386 10 1 9.77614 1 9.5V5.5C1 5.22386 1.22386 5 1.5 5H3.5C3.60819 5 3.71345 4.96491 3.8 4.9ZM10.833 3.95949C10.7106 3.77557 10.4623 3.72567 10.2784 3.84804C10.0944 3.97041 10.0445 4.21871 10.1669 4.40264C11.4111 6.27268 11.4111 8.72728 10.1669 10.5973C10.0445 10.7813 10.0944 11.0296 10.2784 11.1519C10.4623 11.2743 10.7106 11.2244 10.833 11.0405C12.2558 8.90199 12.2558 6.09798 10.833 3.95949Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fZe=["color"],pZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.72361 1.05279C7.893 1.13749 8 1.31062 8 1.5V13.5C8 13.6894 7.893 13.8625 7.72361 13.9472C7.55421 14.0319 7.35151 14.0136 7.2 13.9L3.33333 11H1.5C0.671573 11 0 10.3284 0 9.5V5.5C0 4.67158 0.671573 4 1.5 4H3.33333L7.2 1.1C7.35151 0.986371 7.55421 0.968093 7.72361 1.05279ZM7 2.5L3.8 4.9C3.71345 4.96491 3.60819 5 3.5 5H1.5C1.22386 5 1 5.22386 1 5.5V9.5C1 9.77614 1.22386 10 1.5 10H3.5C3.60819 10 3.71345 10.0351 3.8 10.1L7 12.5V2.5ZM14.8536 5.14645C15.0488 5.34171 15.0488 5.65829 14.8536 5.85355L13.2071 7.5L14.8536 9.14645C15.0488 9.34171 15.0488 9.65829 14.8536 9.85355C14.6583 10.0488 14.3417 10.0488 14.1464 9.85355L12.5 8.20711L10.8536 9.85355C10.6583 10.0488 10.3417 10.0488 10.1464 9.85355C9.95118 9.65829 9.95118 9.34171 10.1464 9.14645L11.7929 7.5L10.1464 5.85355C9.95118 5.65829 9.95118 5.34171 10.1464 5.14645C10.3417 4.95118 10.6583 4.95118 10.8536 5.14645L12.5 6.79289L14.1464 5.14645C14.3417 4.95118 14.6583 4.95118 14.8536 5.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mZe=["color"],gZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8 1.5C8 1.31062 7.893 1.13749 7.72361 1.05279C7.55421 0.968093 7.35151 0.986371 7.2 1.1L3.33333 4H1.5C0.671573 4 0 4.67158 0 5.5V9.5C0 10.3284 0.671573 11 1.5 11H3.33333L7.2 13.9C7.35151 14.0136 7.55421 14.0319 7.72361 13.9472C7.893 13.8625 8 13.6894 8 13.5V1.5ZM3.8 4.9L7 2.5V12.5L3.8 10.1C3.71345 10.0351 3.60819 10 3.5 10H1.5C1.22386 10 1 9.77614 1 9.5V5.5C1 5.22386 1.22386 5 1.5 5H3.5C3.60819 5 3.71345 4.96491 3.8 4.9ZM10.083 5.05577C9.96066 4.87185 9.71235 4.82195 9.52843 4.94432C9.3445 5.06669 9.2946 5.31499 9.41697 5.49892C10.2207 6.70693 10.2207 8.29303 9.41697 9.50104C9.2946 9.68496 9.3445 9.93326 9.52843 10.0556C9.71235 10.178 9.96066 10.1281 10.083 9.94418C11.0653 8.46773 11.0653 6.53222 10.083 5.05577Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yZe=["color"],vZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 1H1.5H13.5H14V1.5V13.5V14H13.5H1.5H1V13.5V1.5V1ZM2 2V13H13V2H2Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),_Ze=["color"],xZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_Ze);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.75432 1.81954C7.59742 1.72682 7.4025 1.72682 7.24559 1.81954L1.74559 5.06954C1.59336 5.15949 1.49996 5.32317 1.49996 5.5C1.49996 5.67683 1.59336 5.84051 1.74559 5.93046L7.24559 9.18046C7.4025 9.27318 7.59742 9.27318 7.75432 9.18046L13.2543 5.93046C13.4066 5.84051 13.5 5.67683 13.5 5.5C13.5 5.32317 13.4066 5.15949 13.2543 5.06954L7.75432 1.81954ZM7.49996 8.16923L2.9828 5.5L7.49996 2.83077L12.0171 5.5L7.49996 8.16923ZM2.25432 8.31954C2.01658 8.17906 1.70998 8.2579 1.56949 8.49564C1.42901 8.73337 1.50785 9.03998 1.74559 9.18046L7.24559 12.4305C7.4025 12.5232 7.59742 12.5232 7.75432 12.4305L13.2543 9.18046C13.4921 9.03998 13.5709 8.73337 13.4304 8.49564C13.2899 8.2579 12.9833 8.17906 12.7456 8.31954L7.49996 11.4192L2.25432 8.31954Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wZe=["color"],bZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.97942 1.25171L6.9585 1.30199L5.58662 4.60039C5.54342 4.70426 5.44573 4.77523 5.3336 4.78422L1.7727 5.0697L1.71841 5.07405L1.38687 5.10063L1.08608 5.12475C0.820085 5.14607 0.712228 5.47802 0.914889 5.65162L1.14406 5.84793L1.39666 6.06431L1.43802 6.09974L4.15105 8.42374C4.23648 8.49692 4.2738 8.61176 4.24769 8.72118L3.41882 12.196L3.40618 12.249L3.32901 12.5725L3.25899 12.866C3.19708 13.1256 3.47945 13.3308 3.70718 13.1917L3.9647 13.0344L4.24854 12.861L4.29502 12.8326L7.34365 10.9705C7.43965 10.9119 7.5604 10.9119 7.6564 10.9705L10.705 12.8326L10.7515 12.861L11.0354 13.0344L11.2929 13.1917C11.5206 13.3308 11.803 13.1256 11.7411 12.866L11.671 12.5725L11.5939 12.249L11.5812 12.196L10.7524 8.72118C10.7263 8.61176 10.7636 8.49692 10.849 8.42374L13.562 6.09974L13.6034 6.06431L13.856 5.84793L14.0852 5.65162C14.2878 5.47802 14.18 5.14607 13.914 5.12475L13.6132 5.10063L13.2816 5.07405L13.2274 5.0697L9.66645 4.78422C9.55432 4.77523 9.45663 4.70426 9.41343 4.60039L8.04155 1.30199L8.02064 1.25171L7.89291 0.944609L7.77702 0.665992C7.67454 0.419604 7.32551 0.419604 7.22303 0.665992L7.10715 0.944609L6.97942 1.25171ZM7.50003 2.60397L6.50994 4.98442C6.32273 5.43453 5.89944 5.74207 5.41351 5.78103L2.84361 5.98705L4.8016 7.66428C5.17183 7.98142 5.33351 8.47903 5.2204 8.95321L4.62221 11.461L6.8224 10.1171C7.23842 9.86302 7.76164 9.86302 8.17766 10.1171L10.3778 11.461L9.77965 8.95321C9.66654 8.47903 9.82822 7.98142 10.1984 7.66428L12.1564 5.98705L9.58654 5.78103C9.10061 5.74207 8.67732 5.43453 8.49011 4.98442L7.50003 2.60397Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),CZe=["color"],SZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,CZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.22303 0.665992C7.32551 0.419604 7.67454 0.419604 7.77702 0.665992L9.41343 4.60039C9.45663 4.70426 9.55432 4.77523 9.66645 4.78422L13.914 5.12475C14.18 5.14607 14.2878 5.47802 14.0852 5.65162L10.849 8.42374C10.7636 8.49692 10.7263 8.61176 10.7524 8.72118L11.7411 12.866C11.803 13.1256 11.5206 13.3308 11.2929 13.1917L7.6564 10.9705C7.5604 10.9119 7.43965 10.9119 7.34365 10.9705L3.70718 13.1917C3.47945 13.3308 3.19708 13.1256 3.25899 12.866L4.24769 8.72118C4.2738 8.61176 4.23648 8.49692 4.15105 8.42374L0.914889 5.65162C0.712228 5.47802 0.820086 5.14607 1.08608 5.12475L5.3336 4.78422C5.44573 4.77523 5.54342 4.70426 5.58662 4.60039L7.22303 0.665992Z",fill:n}))}),EZe=["color"],MZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.84998 7.49998C1.84998 7.21321 1.87134 6.93143 1.91256 6.65615L9.56374 2.23875C9.86311 2.35627 10.15 2.49861 10.4219 2.66322L3.77065 6.50332C3.73669 6.52183 3.70482 6.5449 3.67602 6.57238C3.5911 6.65308 3.54245 6.76286 3.53682 6.87658C3.53359 6.9418 3.54451 7.00831 3.57086 7.07137C3.58927 7.1157 3.6149 7.15742 3.64744 7.19458C3.67306 7.22396 3.702 7.24941 3.73337 7.27069L7.32533 9.83813L3.87232 11.8317C2.63604 10.7953 1.84998 9.23944 1.84998 7.49998ZM8.36843 10.2751C8.37682 10.2706 8.38509 10.2659 8.39322 10.2608L9.84091 9.42499C9.84706 9.42163 9.85314 9.41812 9.85915 9.41446L11.3101 8.57677C11.3655 8.54649 11.4154 8.504 11.4554 8.44995C11.6034 8.25031 11.5616 7.96848 11.362 7.82046L7.82779 5.20017L11.2161 3.24393C12.4013 4.27963 13.15 5.80237 13.15 7.49998C13.15 7.83546 13.1207 8.16411 13.0647 8.48353L5.56875 12.8113C5.26138 12.6995 4.96646 12.5618 4.68662 12.4008L8.36843 10.2751ZM8.18149 9.34383L4.81659 6.93868L5.50918 6.53881L8.80604 8.98324L8.18149 9.34383ZM6.35875 6.04832L6.97822 5.69067L10.2751 8.13506L9.6556 8.49275L6.35875 6.04832ZM8.3318 1.91078L2.24263 5.42636C3.06941 3.33188 5.11164 1.84998 7.49998 1.84998C7.78258 1.84998 8.06033 1.87072 8.3318 1.91078ZM6.84684 13.1126C7.06114 13.1373 7.27908 13.15 7.49998 13.15C9.8246 13.15 11.8213 11.7461 12.6886 9.7399L6.84684 13.1126ZM7.49998 0.849976C3.82728 0.849976 0.849976 3.82728 0.849976 7.49998C0.849976 11.1727 3.82728 14.15 7.49998 14.15C11.1727 14.15 14.15 11.1727 14.15 7.49998C14.15 3.82728 11.1727 0.849976 7.49998 0.849976Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),TZe=["color"],IZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,TZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 3C2 2.44772 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3ZM12 3H3V12H12V3Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),RZe=["color"],LZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,RZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),kZe=["color"],AZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,kZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 5.99995L0.999992 5.99995L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 8.99992L13.9999 8.99992L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),PZe=["color"],$Ze=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,PZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H6H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM9 14V1L6 1V14H1.49988C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H9Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),OZe=["color"],NZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,OZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),DZe=["color"],FZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,DZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),zZe=["color"],BZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10.5 4C8.567 4 7 5.567 7 7.5C7 9.433 8.567 11 10.5 11C12.433 11 14 9.433 14 7.5C14 5.567 12.433 4 10.5 4ZM7.67133 11C6.65183 10.175 6 8.91363 6 7.5C6 6.08637 6.65183 4.82498 7.67133 4H4.5C2.567 4 1 5.567 1 7.5C1 9.433 2.567 11 4.5 11H7.67133ZM0 7.5C0 5.01472 2.01472 3 4.5 3H10.5C12.9853 3 15 5.01472 15 7.5C15 9.98528 12.9853 12 10.5 12H4.5C2.01472 12 0 9.98528 0 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),jZe=["color"],VZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.90321 7.29677C1.90321 10.341 4.11041 12.4147 6.58893 12.8439C6.87255 12.893 7.06266 13.1627 7.01355 13.4464C6.96444 13.73 6.69471 13.9201 6.41109 13.871C3.49942 13.3668 0.86084 10.9127 0.86084 7.29677C0.860839 5.76009 1.55996 4.55245 2.37639 3.63377C2.96124 2.97568 3.63034 2.44135 4.16846 2.03202L2.53205 2.03202C2.25591 2.03202 2.03205 1.80816 2.03205 1.53202C2.03205 1.25588 2.25591 1.03202 2.53205 1.03202L5.53205 1.03202C5.80819 1.03202 6.03205 1.25588 6.03205 1.53202L6.03205 4.53202C6.03205 4.80816 5.80819 5.03202 5.53205 5.03202C5.25591 5.03202 5.03205 4.80816 5.03205 4.53202L5.03205 2.68645L5.03054 2.68759L5.03045 2.68766L5.03044 2.68767L5.03043 2.68767C4.45896 3.11868 3.76059 3.64538 3.15554 4.3262C2.44102 5.13021 1.90321 6.10154 1.90321 7.29677ZM13.0109 7.70321C13.0109 4.69115 10.8505 2.6296 8.40384 2.17029C8.12093 2.11718 7.93465 1.84479 7.98776 1.56188C8.04087 1.27898 8.31326 1.0927 8.59616 1.14581C11.4704 1.68541 14.0532 4.12605 14.0532 7.70321C14.0532 9.23988 13.3541 10.4475 12.5377 11.3662C11.9528 12.0243 11.2837 12.5586 10.7456 12.968L12.3821 12.968C12.6582 12.968 12.8821 13.1918 12.8821 13.468C12.8821 13.7441 12.6582 13.968 12.3821 13.968L9.38205 13.968C9.10591 13.968 8.88205 13.7441 8.88205 13.468L8.88205 10.468C8.88205 10.1918 9.10591 9.96796 9.38205 9.96796C9.65819 9.96796 9.88205 10.1918 9.88205 10.468L9.88205 12.3135L9.88362 12.3123C10.4551 11.8813 11.1535 11.3546 11.7585 10.6738C12.4731 9.86976 13.0109 8.89844 13.0109 7.70321Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),UZe=["color"],HZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,UZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8 2H12.5C12.7761 2 13 2.22386 13 2.5V5H8V2ZM7 5V2H2.5C2.22386 2 2 2.22386 2 2.5V5H7ZM2 6V9H7V6H2ZM8 6H13V9H8V6ZM8 10H13V12.5C13 12.7761 12.7761 13 12.5 13H8V10ZM2 12.5V10H7V13H2.5C2.22386 13 2 12.7761 2 12.5ZM1 2.5C1 1.67157 1.67157 1 2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),GZe=["color"],qZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,GZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.900024 7.50002C0.900024 3.85495 3.85495 0.900024 7.50002 0.900024C11.1451 0.900024 14.1 3.85495 14.1 7.50002C14.1 11.1451 11.1451 14.1 7.50002 14.1C3.85495 14.1 0.900024 11.1451 0.900024 7.50002ZM7.50002 1.80002C4.35201 1.80002 1.80002 4.35201 1.80002 7.50002C1.80002 10.648 4.35201 13.2 7.50002 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.35201 10.648 1.80002 7.50002 1.80002ZM3.07504 7.50002C3.07504 5.05617 5.05618 3.07502 7.50004 3.07502C9.94388 3.07502 11.925 5.05617 11.925 7.50002C11.925 9.94386 9.94388 11.925 7.50004 11.925C5.05618 11.925 3.07504 9.94386 3.07504 7.50002ZM7.50004 3.92502C5.52562 3.92502 3.92504 5.52561 3.92504 7.50002C3.92504 9.47442 5.52563 11.075 7.50004 11.075C9.47444 11.075 11.075 9.47442 11.075 7.50002C11.075 5.52561 9.47444 3.92502 7.50004 3.92502ZM7.50004 5.25002C6.2574 5.25002 5.25004 6.25739 5.25004 7.50002C5.25004 8.74266 6.2574 9.75002 7.50004 9.75002C8.74267 9.75002 9.75004 8.74266 9.75004 7.50002C9.75004 6.25738 8.74267 5.25002 7.50004 5.25002ZM6.05004 7.50002C6.05004 6.69921 6.69923 6.05002 7.50004 6.05002C8.30084 6.05002 8.95004 6.69921 8.95004 7.50002C8.95004 8.30083 8.30084 8.95002 7.50004 8.95002C6.69923 8.95002 6.05004 8.30083 6.05004 7.50002Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),WZe=["color"],ZZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,WZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.94993 2.95002L3.94993 4.49998C3.94993 4.74851 3.74845 4.94998 3.49993 4.94998C3.2514 4.94998 3.04993 4.74851 3.04993 4.49998V2.50004C3.04993 2.45246 3.05731 2.40661 3.07099 2.36357C3.12878 2.18175 3.29897 2.05002 3.49993 2.05002H11.4999C11.6553 2.05002 11.7922 2.12872 11.8731 2.24842C11.9216 2.32024 11.9499 2.40682 11.9499 2.50002L11.9499 2.50004V4.49998C11.9499 4.74851 11.7485 4.94998 11.4999 4.94998C11.2514 4.94998 11.0499 4.74851 11.0499 4.49998V2.95002H8.04993V12.05H9.25428C9.50281 12.05 9.70428 12.2515 9.70428 12.5C9.70428 12.7486 9.50281 12.95 9.25428 12.95H5.75428C5.50575 12.95 5.30428 12.7486 5.30428 12.5C5.30428 12.2515 5.50575 12.05 5.75428 12.05H6.94993V2.95002H3.94993Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),YZe=["color"],XZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,YZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.89949 5.50002C3.89949 5.27911 3.7204 5.10003 3.49949 5.10003C3.27857 5.10003 3.09949 5.27911 3.09949 5.50002L3.09949 12.5343L1.78233 11.2172C1.62612 11.061 1.37285 11.061 1.21664 11.2172C1.06043 11.3734 1.06043 11.6267 1.21664 11.7829L3.21664 13.7829C3.29166 13.8579 3.3934 13.9 3.49949 13.9C3.60557 13.9 3.70732 13.8579 3.78233 13.7829L5.78233 11.7829C5.93854 11.6267 5.93854 11.3734 5.78233 11.2172C5.62612 11.061 5.37285 11.061 5.21664 11.2172L3.89949 12.5343L3.89949 5.50002ZM8.49998 13C8.22383 13 7.99998 12.7762 7.99998 12.5C7.99998 12.2239 8.22383 12 8.49998 12H14.5C14.7761 12 15 12.2239 15 12.5C15 12.7762 14.7761 13 14.5 13H8.49998ZM8.49998 10C8.22383 10 7.99998 9.77617 7.99998 9.50002C7.99998 9.22388 8.22383 9.00002 8.49998 9.00002H14.5C14.7761 9.00002 15 9.22388 15 9.50002C15 9.77617 14.7761 10 14.5 10H8.49998ZM7.99998 6.50002C7.99998 6.77617 8.22383 7.00002 8.49998 7.00002H14.5C14.7761 7.00002 15 6.77617 15 6.50002C15 6.22388 14.7761 6.00002 14.5 6.00002H8.49998C8.22383 6.00002 7.99998 6.22388 7.99998 6.50002Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),JZe=["color"],KZe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),QZe=["color"],eYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,QZe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tYe=["color"],rYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nYe=["color"],iYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.49949 14.9C3.7204 14.9 3.89949 14.7209 3.89949 14.5L3.89949 10.4657L5.21664 11.7829C5.37285 11.9391 5.62612 11.9391 5.78233 11.7829C5.93854 11.6267 5.93854 11.3734 5.78233 11.2172L3.78233 9.21718C3.70732 9.14217 3.60557 9.10002 3.49949 9.10002C3.3934 9.10002 3.29166 9.14217 3.21664 9.21718L1.21664 11.2172C1.06043 11.3734 1.06043 11.6267 1.21664 11.7829C1.37285 11.9391 1.62612 11.9391 1.78233 11.7829L3.09949 10.4657L3.09949 14.5C3.09949 14.7209 3.27857 14.9 3.49949 14.9ZM7.99998 10.5C7.99998 10.7762 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7762 15 10.5C15 10.2239 14.7761 10 14.5 10H8.49998C8.22383 10 7.99998 10.2239 7.99998 10.5ZM7.99998 7.50002C7.99998 7.77617 8.22383 8.00002 8.49998 8.00002H14.5C14.7761 8.00002 15 7.77617 15 7.50002C15 7.22388 14.7761 7.00002 14.5 7.00002H8.49998C8.22383 7.00002 7.99998 7.22388 7.99998 7.50002ZM8.49998 5.00002C8.22383 5.00002 7.99998 4.77617 7.99998 4.50002C7.99998 4.22388 8.22383 4.00002 8.49998 4.00002H14.5C14.7761 4.00002 15 4.22388 15 4.50002C15 4.77617 14.7761 5.00002 14.5 5.00002H8.49998ZM3.89949 0.500025C3.89949 0.279111 3.7204 0.100025 3.49949 0.100025C3.27857 0.100025 3.09949 0.279111 3.09949 0.500025L3.09949 4.53434L1.78233 3.21718C1.62612 3.06097 1.37285 3.06097 1.21664 3.21718C1.06043 3.37339 1.06043 3.62666 1.21664 3.78287L3.21664 5.78287C3.29166 5.85788 3.3934 5.90002 3.49949 5.90002C3.60557 5.90002 3.70732 5.85788 3.78233 5.78287L5.78233 3.78287C5.93854 3.62666 5.93854 3.37339 5.78233 3.21718C5.62612 3.06097 5.37285 3.06097 5.21664 3.21718L3.89949 4.53434L3.89949 0.500025Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sYe=["color"],oYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aYe=["color"],lYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M3.89949 9.49998C3.89949 9.72089 3.7204 9.89997 3.49949 9.89997C3.27857 9.89997 3.09949 9.72089 3.09949 9.49998L3.09949 2.46566L1.78233 3.78282C1.62612 3.93903 1.37285 3.93903 1.21664 3.78282C1.06043 3.62661 1.06043 3.37334 1.21664 3.21713L3.21664 1.21713C3.29166 1.14212 3.3934 1.09998 3.49949 1.09998C3.60557 1.09998 3.70732 1.14212 3.78233 1.21713L5.78233 3.21713C5.93854 3.37334 5.93854 3.62661 5.78233 3.78282C5.62612 3.93903 5.37285 3.93903 5.21664 3.78282L3.89949 2.46566L3.89949 9.49998ZM8.49998 1.99998C8.22383 1.99998 7.99998 2.22383 7.99998 2.49998C7.99998 2.77612 8.22383 2.99998 8.49998 2.99998H14.5C14.7761 2.99998 15 2.77612 15 2.49998C15 2.22383 14.7761 1.99998 14.5 1.99998H8.49998ZM8.49998 4.99998C8.22383 4.99998 7.99998 5.22383 7.99998 5.49998C7.99998 5.77612 8.22383 5.99998 8.49998 5.99998H14.5C14.7761 5.99998 15 5.77612 15 5.49998C15 5.22383 14.7761 4.99998 14.5 4.99998H8.49998ZM7.99998 8.49998C7.99998 8.22383 8.22383 7.99998 8.49998 7.99998H14.5C14.7761 7.99998 15 8.22383 15 8.49998C15 8.77612 14.7761 8.99998 14.5 8.99998H8.49998C8.22383 8.99998 7.99998 8.77612 7.99998 8.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uYe=["color"],cYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L11.9291 2.36383C11.9159 2.32246 11.897 2.28368 11.8732 2.24845C11.7923 2.12875 11.6554 2.05005 11.5001 2.05005H3.50005C3.29909 2.05005 3.1289 2.18178 3.07111 2.3636C3.05743 2.40665 3.05005 2.45249 3.05005 2.50007V4.50001C3.05005 4.74854 3.25152 4.95001 3.50005 4.95001C3.74858 4.95001 3.95005 4.74854 3.95005 4.50001V2.95005H6.95006V7.34284L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L6.95006 8.75705V12.0501H5.7544C5.50587 12.0501 5.3044 12.2515 5.3044 12.5001C5.3044 12.7486 5.50587 12.9501 5.7544 12.9501H9.2544C9.50293 12.9501 9.7044 12.7486 9.7044 12.5001C9.7044 12.2515 9.50293 12.0501 9.2544 12.0501H8.05006V7.65705L13.3536 2.35355ZM8.05006 6.24284L11.0501 3.24283V2.95005H8.05006V6.24284Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hYe=["color"],dYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5 3.5C5 3.22386 5.22386 3 5.5 3H9.5C9.77614 3 10 3.22386 10 3.5V6H12.5C12.6873 6 12.8589 6.10467 12.9446 6.27121C13.0303 6.43774 13.0157 6.63821 12.9069 6.79062L7.90687 13.7906C7.81301 13.922 7.66148 14 7.5 14C7.33853 14 7.18699 13.922 7.09314 13.7906L2.09314 6.79062C1.98427 6.63821 1.96972 6.43774 2.05542 6.27121C2.14112 6.10467 2.31271 6 2.5 6H5V3.5ZM6 4V6.5C6 6.77614 5.77614 7 5.5 7H3.4716L7.5 12.6398L11.5284 7H9.5C9.22386 7 9 6.77614 9 6.5V4H6Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fYe=["color"],pYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1 7.5C1 7.66148 1.07798 7.81301 1.20938 7.90687L8.20938 12.9069C8.36179 13.0157 8.56226 13.0303 8.72879 12.9446C8.89533 12.8589 9 12.6873 9 12.5L9 10L11.5 10C11.7761 10 12 9.77614 12 9.5L12 5.5C12 5.22386 11.7761 5 11.5 5L9 5L9 2.5C9 2.31271 8.89533 2.14112 8.72879 2.05542C8.56226 1.96972 8.36179 1.98427 8.20938 2.09313L1.20938 7.09314C1.07798 7.18699 1 7.33853 1 7.5ZM8 3.4716L8 5.5C8 5.77614 8.22386 6 8.5 6L11 6L11 9L8.5 9C8.22386 9 8 9.22386 8 9.5L8 11.5284L2.36023 7.5L8 3.4716Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mYe=["color"],gYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14 7.5C14 7.66148 13.922 7.81301 13.7906 7.90687L6.79062 12.9069C6.63821 13.0157 6.43774 13.0303 6.27121 12.9446C6.10467 12.8589 6 12.6873 6 12.5L6 10L3.5 10C3.22386 10 3 9.77614 3 9.5L3 5.5C3 5.22386 3.22386 5 3.5 5L6 5L6 2.5C6 2.31271 6.10467 2.14112 6.27121 2.05542C6.43774 1.96972 6.63821 1.98427 6.79062 2.09313L13.7906 7.09314C13.922 7.18699 14 7.33853 14 7.5ZM7 3.4716L7 5.5C7 5.77614 6.77614 6 6.5 6L4 6L4 9L6.5 9C6.77614 9 7 9.22386 7 9.5L7 11.5284L12.6398 7.5L7 3.4716Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),yYe=["color"],vYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,yYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.5 1C7.66148 1 7.81301 1.07798 7.90687 1.20938L12.9069 8.20938C13.0157 8.36179 13.0303 8.56226 12.9446 8.72879C12.8589 8.89533 12.6873 9 12.5 9H10V11.5C10 11.7761 9.77614 12 9.5 12H5.5C5.22386 12 5 11.7761 5 11.5V9H2.5C2.31271 9 2.14112 8.89533 2.05542 8.72879C1.96972 8.56226 1.98427 8.36179 2.09314 8.20938L7.09314 1.20938C7.18699 1.07798 7.33853 1 7.5 1ZM3.4716 8H5.5C5.77614 8 6 8.22386 6 8.5V11H9V8.5C9 8.22386 9.22386 8 9.5 8H11.5284L7.5 2.36023L3.4716 8Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),_Ye=["color"],xYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,_Ye);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49998 0.849976C7.22383 0.849976 6.99998 1.07383 6.99998 1.34998V3.52234C6.99998 3.79848 7.22383 4.02234 7.49998 4.02234C7.77612 4.02234 7.99998 3.79848 7.99998 3.52234V1.8718C10.8862 2.12488 13.15 4.54806 13.15 7.49998C13.15 10.6204 10.6204 13.15 7.49998 13.15C4.37957 13.15 1.84998 10.6204 1.84998 7.49998C1.84998 6.10612 2.35407 4.83128 3.19049 3.8459C3.36919 3.63538 3.34339 3.31985 3.13286 3.14115C2.92234 2.96245 2.60681 2.98825 2.42811 3.19877C1.44405 4.35808 0.849976 5.86029 0.849976 7.49998C0.849976 11.1727 3.82728 14.15 7.49998 14.15C11.1727 14.15 14.15 11.1727 14.15 7.49998C14.15 3.82728 11.1727 0.849976 7.49998 0.849976ZM6.74049 8.08072L4.22363 4.57237C4.15231 4.47295 4.16346 4.33652 4.24998 4.25C4.33649 4.16348 4.47293 4.15233 4.57234 4.22365L8.08069 6.74051C8.56227 7.08599 8.61906 7.78091 8.19998 8.2C7.78089 8.61909 7.08597 8.56229 6.74049 8.08072Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),wYe=["color"],bYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,wYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.5 2C3.11929 2 2 3.11929 2 4.5C2 5.88072 3.11929 7 4.5 7C5.88072 7 7 5.88072 7 4.5C7 3.11929 5.88072 2 4.5 2ZM3 4.5C3 3.67157 3.67157 3 4.5 3C5.32843 3 6 3.67157 6 4.5C6 5.32843 5.32843 6 4.5 6C3.67157 6 3 5.32843 3 4.5ZM10.5 2C9.11929 2 8 3.11929 8 4.5C8 5.88072 9.11929 7 10.5 7C11.8807 7 13 5.88072 13 4.5C13 3.11929 11.8807 2 10.5 2ZM9 4.5C9 3.67157 9.67157 3 10.5 3C11.3284 3 12 3.67157 12 4.5C12 5.32843 11.3284 6 10.5 6C9.67157 6 9 5.32843 9 4.5ZM2 10.5C2 9.11929 3.11929 8 4.5 8C5.88072 8 7 9.11929 7 10.5C7 11.8807 5.88072 13 4.5 13C3.11929 13 2 11.8807 2 10.5ZM4.5 9C3.67157 9 3 9.67157 3 10.5C3 11.3284 3.67157 12 4.5 12C5.32843 12 6 11.3284 6 10.5C6 9.67157 5.32843 9 4.5 9ZM10.5 8C9.11929 8 8 9.11929 8 10.5C8 11.8807 9.11929 13 10.5 13C11.8807 13 13 11.8807 13 10.5C13 9.11929 11.8807 8 10.5 8ZM9 10.5C9 9.67157 9.67157 9 10.5 9C11.3284 9 12 9.67157 12 10.5C12 11.3284 11.3284 12 10.5 12C9.67157 12 9 11.3284 9 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),CYe=["color"],SYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,CYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M13.0502 2.74989C13.0502 2.44613 12.804 2.19989 12.5002 2.19989C12.1965 2.19989 11.9502 2.44613 11.9502 2.74989V7.2825C11.9046 7.18802 11.8295 7.10851 11.7334 7.05776L2.73338 2.30776C2.5784 2.22596 2.3919 2.23127 2.24182 2.32176C2.09175 2.41225 2 2.57471 2 2.74995V12.25C2 12.4252 2.09175 12.5877 2.24182 12.6781C2.3919 12.7686 2.5784 12.7739 2.73338 12.6921L11.7334 7.94214C11.8295 7.89139 11.9046 7.81188 11.9502 7.7174V12.2499C11.9502 12.5536 12.1965 12.7999 12.5002 12.7999C12.804 12.7999 13.0502 12.5536 13.0502 12.2499V2.74989ZM3 11.4207V3.5792L10.4288 7.49995L3 11.4207Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),EYe=["color"],MYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,EYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.94976 2.74989C1.94976 2.44613 2.196 2.19989 2.49976 2.19989C2.80351 2.19989 3.04976 2.44613 3.04976 2.74989V7.2825C3.0954 7.18802 3.17046 7.10851 3.26662 7.05776L12.2666 2.30776C12.4216 2.22596 12.6081 2.23127 12.7582 2.32176C12.9083 2.41225 13 2.57471 13 2.74995V12.25C13 12.4252 12.9083 12.5877 12.7582 12.6781C12.6081 12.7686 12.4216 12.7739 12.2666 12.6921L3.26662 7.94214C3.17046 7.89139 3.0954 7.81188 3.04976 7.7174V12.2499C3.04976 12.5536 2.80351 12.7999 2.49976 12.7999C2.196 12.7999 1.94976 12.5536 1.94976 12.2499V2.74989ZM4.57122 7.49995L12 11.4207V3.5792L4.57122 7.49995Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),TYe=["color"],IYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,TYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.849976 1.74998C0.849976 1.25292 1.25292 0.849976 1.74998 0.849976H3.24998C3.74703 0.849976 4.14998 1.25292 4.14998 1.74998V2.04998H10.85V1.74998C10.85 1.25292 11.2529 0.849976 11.75 0.849976H13.25C13.747 0.849976 14.15 1.25292 14.15 1.74998V3.24998C14.15 3.74703 13.747 4.14998 13.25 4.14998H12.95V10.85H13.25C13.747 10.85 14.15 11.2529 14.15 11.75V13.25C14.15 13.747 13.747 14.15 13.25 14.15H11.75C11.2529 14.15 10.85 13.747 10.85 13.25V12.95H4.14998V13.25C4.14998 13.747 3.74703 14.15 3.24998 14.15H1.74998C1.25292 14.15 0.849976 13.747 0.849976 13.25V11.75C0.849976 11.2529 1.25292 10.85 1.74998 10.85H2.04998V4.14998H1.74998C1.25292 4.14998 0.849976 3.74703 0.849976 3.24998V1.74998ZM2.94998 4.14998V10.85H3.24998C3.74703 10.85 4.14998 11.2529 4.14998 11.75V12.05H10.85V11.75C10.85 11.2529 11.2529 10.85 11.75 10.85H12.05V4.14998H11.75C11.2529 4.14998 10.85 3.74703 10.85 3.24998V2.94998H4.14998V3.24998C4.14998 3.74703 3.74703 4.14998 3.24998 4.14998H2.94998ZM2.34998 1.74998H1.74998V2.34998V2.64998V3.24998H2.34998H2.64998H3.24998V2.64998V2.34998V1.74998H2.64998H2.34998ZM5.09998 5.99998C5.09998 5.50292 5.50292 5.09998 5.99998 5.09998H6.99998C7.49703 5.09998 7.89998 5.50292 7.89998 5.99998V6.99998C7.89998 7.03591 7.89787 7.07134 7.89378 7.10618C7.92861 7.10208 7.96405 7.09998 7.99998 7.09998H8.99998C9.49703 7.09998 9.89998 7.50292 9.89998 7.99998V8.99998C9.89998 9.49703 9.49703 9.89998 8.99998 9.89998H7.99998C7.50292 9.89998 7.09998 9.49703 7.09998 8.99998V7.99998C7.09998 7.96405 7.10208 7.92861 7.10618 7.89378C7.07134 7.89787 7.03591 7.89998 6.99998 7.89998H5.99998C5.50292 7.89998 5.09998 7.49703 5.09998 6.99998V5.99998ZM6.09998 5.99998H5.99998V6.09998V6.89998V6.99998H6.09998H6.89998H6.99998V6.89998V6.09998V5.99998H6.89998H6.09998ZM7.99998 7.99998H8.09998H8.89998H8.99998V8.09998V8.89998V8.99998H8.89998H8.09998H7.99998V8.89998V8.09998V7.99998ZM2.64998 11.75H2.34998H1.74998V12.35V12.65V13.25H2.34998H2.64998H3.24998V12.65V12.35V11.75H2.64998ZM11.75 1.74998H12.35H12.65H13.25V2.34998V2.64998V3.24998H12.65H12.35H11.75V2.64998V2.34998V1.74998ZM12.65 11.75H12.35H11.75V12.35V12.65V13.25H12.35H12.65H13.25V12.65V12.35V11.75H12.65Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),RYe=["color"],LYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,RYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{opacity:".25",d:"M0 0H3V3H0V0ZM6 3H3V6H0V9H3V12H0V15H3V12H6V15H9V12H12V15H15V12H12V9H15V6H12V3H15V0H12V3H9V0H6V3ZM6 6V3H9V6H6ZM6 9H3V6H6V9ZM9 9V6H12V9H9ZM9 9H6V12H9V9Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),kYe=["color"],AYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,kYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),PYe=["color"],$Ye=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,PYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:n}))}),OYe=["color"],NYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,OYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M9 4L9 11L4.5 7.5L9 4Z",fill:n}))}),DYe=["color"],FYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,DYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6 11L6 4L10.5 7.5L6 11Z",fill:n}))}),zYe=["color"],BYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,zYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:n}))}),jYe=["color"],VYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,jYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.23336 4.69629C7.23336 2.96884 8.63335 1.56857 10.36 1.56857C11.3736 1.56857 12.183 2.04804 12.7254 2.74385C13.3079 2.62467 13.8557 2.40913 14.3513 2.11508C14.1559 2.72598 13.7424 3.2396 13.2033 3.56463C13.2038 3.56568 13.2042 3.56674 13.2047 3.56779C13.7334 3.50361 14.2364 3.36302 14.7048 3.15546L14.7037 3.15715C14.3667 3.66183 13.9431 4.10736 13.4561 4.47034C13.4823 4.64672 13.4956 4.82427 13.4956 5.00079C13.4956 8.6871 10.6873 12.9746 5.52122 12.9746C3.93906 12.9746 2.46544 12.511 1.22505 11.7152C0.992632 11.5661 0.925108 11.2568 1.07423 11.0244C1.0874 11.0038 1.10183 10.9846 1.11734 10.9666C1.20582 10.8202 1.37438 10.7309 1.5554 10.7522C2.47066 10.8601 3.38568 10.7485 4.19219 10.3962C3.39226 10.0434 2.77129 9.35975 2.50204 8.51974C2.45359 8.3686 2.48835 8.20311 2.59351 8.08422C2.59716 8.0801 2.60087 8.07606 2.60464 8.0721C1.96391 7.50819 1.55973 6.68208 1.55973 5.76143V5.72759C1.55973 5.56814 1.64411 5.42059 1.78155 5.33974C1.82671 5.31317 1.87537 5.29511 1.92532 5.28558C1.70549 4.86154 1.58116 4.37984 1.58116 3.86958C1.58116 3.40165 1.58384 2.81192 1.91332 2.28081C1.98718 2.16175 2.10758 2.08915 2.2364 2.07195C2.42588 2.01237 2.64087 2.06969 2.77406 2.23302C3.86536 3.57126 5.44066 4.49583 7.23366 4.73961L7.23336 4.69629ZM5.52122 11.9746C4.73387 11.9746 3.97781 11.8435 3.27248 11.6023C4.13012 11.4538 4.95307 11.1159 5.66218 10.5602C5.81211 10.4427 5.87182 10.2435 5.81126 10.0629C5.7507 9.88234 5.583 9.75943 5.39255 9.75607C4.68968 9.74366 4.06712 9.39716 3.67793 8.86845C3.86828 8.85306 4.05428 8.82039 4.23445 8.77167C4.43603 8.71716 4.57363 8.53114 4.56674 8.32243C4.55985 8.11372 4.41029 7.93718 4.20555 7.89607C3.42694 7.73977 2.79883 7.16764 2.56169 6.42174C2.76255 6.47025 2.97102 6.4991 3.18482 6.5061C3.38563 6.51267 3.56646 6.38533 3.62795 6.19405C3.68943 6.00277 3.61666 5.79391 3.44963 5.68224C2.86523 5.29155 2.48116 4.62464 2.48116 3.86958C2.48116 3.70213 2.48352 3.55268 2.49355 3.41719C3.85115 4.79913 5.70873 5.68931 7.77588 5.79338C7.93225 5.80126 8.08328 5.73543 8.18395 5.61553C8.28463 5.49562 8.32332 5.33548 8.28851 5.18284C8.25255 5.02517 8.23336 4.86284 8.23336 4.69629C8.23336 3.52085 9.18591 2.56857 10.36 2.56857C11.5943 2.56857 12.4956 3.71208 12.4956 5.00079C12.4956 8.25709 10.0202 11.9746 5.52122 11.9746Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),UYe=["color"],HYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,UYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),GYe=["color"],qYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,GYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.90321 7.29677C1.90321 10.341 4.11041 12.4147 6.58893 12.8439C6.87255 12.893 7.06266 13.1627 7.01355 13.4464C6.96444 13.73 6.69471 13.9201 6.41109 13.871C3.49942 13.3668 0.86084 10.9127 0.86084 7.29677C0.860839 5.76009 1.55996 4.55245 2.37639 3.63377C2.96124 2.97568 3.63034 2.44135 4.16846 2.03202L2.53205 2.03202C2.25591 2.03202 2.03205 1.80816 2.03205 1.53202C2.03205 1.25588 2.25591 1.03202 2.53205 1.03202L5.53205 1.03202C5.80819 1.03202 6.03205 1.25588 6.03205 1.53202L6.03205 4.53202C6.03205 4.80816 5.80819 5.03202 5.53205 5.03202C5.25591 5.03202 5.03205 4.80816 5.03205 4.53202L5.03205 2.68645L5.03054 2.68759L5.03045 2.68766L5.03044 2.68767L5.03043 2.68767C4.45896 3.11868 3.76059 3.64538 3.15554 4.3262C2.44102 5.13021 1.90321 6.10154 1.90321 7.29677ZM13.0109 7.70321C13.0109 4.69115 10.8505 2.6296 8.40384 2.17029C8.12093 2.11718 7.93465 1.84479 7.98776 1.56188C8.04087 1.27898 8.31326 1.0927 8.59616 1.14581C11.4704 1.68541 14.0532 4.12605 14.0532 7.70321C14.0532 9.23988 13.3541 10.4475 12.5377 11.3662C11.9528 12.0243 11.2837 12.5586 10.7456 12.968L12.3821 12.968C12.6582 12.968 12.8821 13.1918 12.8821 13.468C12.8821 13.7441 12.6582 13.968 12.3821 13.968L9.38205 13.968C9.10591 13.968 8.88205 13.7441 8.88205 13.468L8.88205 10.468C8.88205 10.1918 9.10591 9.96796 9.38205 9.96796C9.65819 9.96796 9.88205 10.1918 9.88205 10.468L9.88205 12.3135L9.88362 12.3123C10.4551 11.8813 11.1535 11.3546 11.7585 10.6738C12.4731 9.86976 13.0109 8.89844 13.0109 7.70321Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),WYe=["color"],ZYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,WYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.81825 1.18188C7.64251 1.00615 7.35759 1.00615 7.18185 1.18188L4.18185 4.18188C4.00611 4.35762 4.00611 4.64254 4.18185 4.81828C4.35759 4.99401 4.64251 4.99401 4.81825 4.81828L7.05005 2.58648V9.49996C7.05005 9.74849 7.25152 9.94996 7.50005 9.94996C7.74858 9.94996 7.95005 9.74849 7.95005 9.49996V2.58648L10.1819 4.81828C10.3576 4.99401 10.6425 4.99401 10.8182 4.81828C10.994 4.64254 10.994 4.35762 10.8182 4.18188L7.81825 1.18188ZM2.5 9.99997C2.77614 9.99997 3 10.2238 3 10.5V12C3 12.5538 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2238 12.2239 9.99997 12.5 9.99997C12.7761 9.99997 13 10.2238 13 10.5V12C13 13.104 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2238 2.22386 9.99997 2.5 9.99997Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),YYe=["color"],XYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,YYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),JYe=["color"],KYe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,JYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49985 0.877045C3.84216 0.877045 0.877014 3.84219 0.877014 7.49988C0.877014 9.1488 1.47963 10.657 2.47665 11.8162L1.64643 12.6464C1.45117 12.8417 1.45117 13.1583 1.64643 13.3535C1.8417 13.5488 2.15828 13.5488 2.35354 13.3535L3.18377 12.5233C4.34296 13.5202 5.85104 14.1227 7.49985 14.1227C11.1575 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 5.85107 13.5202 4.34299 12.5233 3.1838L13.3535 2.35354C13.5488 2.15827 13.5488 1.84169 13.3535 1.64643C13.1583 1.45117 12.8417 1.45117 12.6464 1.64643L11.8162 2.47668C10.657 1.47966 9.14877 0.877045 7.49985 0.877045ZM11.1422 3.15066C10.1567 2.32449 8.88639 1.82704 7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.88642 2.32446 10.1568 3.15063 11.1422L11.1422 3.15066ZM3.85776 11.8493C4.84317 12.6753 6.11343 13.1727 7.49985 13.1727C10.6328 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 6.11346 12.6753 4.8432 11.8493 3.85779L3.85776 11.8493Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),QYe=["color"],eXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,QYe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7.49998 1L6.92321 2.00307L1.17498 12L0.599976 13H1.7535H13.2464H14.4L13.825 12L8.07674 2.00307L7.49998 1ZM7.49998 3.00613L2.3285 12H12.6714L7.49998 3.00613Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),tXe=["color"],rXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,tXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),nXe=["color"],iXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,nXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M7 2H1.5C1.22386 2 1 2.22386 1 2.5V7H7V2ZM8 2V7H14V2.5C14 2.22386 13.7761 2 13.5 2H8ZM7 8H1V12.5C1 12.7761 1.22386 13 1.5 13H7V8ZM8 13V8H14V12.5C14 12.7761 13.7761 13 13.5 13H8ZM1.5 1C0.671573 1 0 1.67157 0 2.5V12.5C0 13.3284 0.671573 14 1.5 14H13.5C14.3284 14 15 13.3284 15 12.5V2.5C15 1.67157 14.3284 1 13.5 1H1.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),sXe=["color"],oXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,sXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M1.5 2H13.5C13.7761 2 14 2.22386 14 2.5V7H1V2.5C1 2.22386 1.22386 2 1.5 2ZM1 8V12.5C1 12.7761 1.22386 13 1.5 13H13.5C13.7761 13 14 12.7761 14 12.5V8H1ZM0 2.5C0 1.67157 0.671573 1 1.5 1H13.5C14.3284 1 15 1.67157 15 2.5V12.5C15 13.3284 14.3284 14 13.5 14H1.5C0.671573 14 0 13.3284 0 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),aXe=["color"],lXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,aXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M14 2.58711L1.85163 13H13.5C13.7761 13 14 12.7761 14 12.5V2.58711ZM0.762879 13.8067L0.825396 13.8796L0.854717 13.8545C1.05017 13.9478 1.26899 14 1.5 14H13.5C14.3284 14 15 13.3284 15 12.5V2.5C15 1.93949 14.6926 1.45078 14.2371 1.19331L14.1746 1.12037L14.1453 1.1455C13.9498 1.05222 13.731 1 13.5 1H1.5C0.671573 1 0 1.67157 0 2.5V12.5C0 13.0605 0.307435 13.5492 0.762879 13.8067ZM1 12.4129L13.1484 2H1.5C1.22386 2 1 2.22386 1 2.5V12.4129Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),uXe=["color"],cXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,uXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M8 2H13.5C13.7761 2 14 2.22386 14 2.5V12.5C14 12.7761 13.7761 13 13.5 13H8V2ZM7 2H1.5C1.22386 2 1 2.22386 1 2.5V12.5C1 12.7761 1.22386 13 1.5 13H7V2ZM0 2.5C0 1.67157 0.671573 1 1.5 1H13.5C14.3284 1 15 1.67157 15 2.5V12.5C15 13.3284 14.3284 14 13.5 14H1.5C0.671573 14 0 13.3284 0 12.5V2.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),hXe=["color"],dXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,hXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),fXe=["color"],pXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,fXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159ZM4.25 6.5C4.25 6.22386 4.47386 6 4.75 6H6V4.75C6 4.47386 6.22386 4.25 6.5 4.25C6.77614 4.25 7 4.47386 7 4.75V6H8.25C8.52614 6 8.75 6.22386 8.75 6.5C8.75 6.77614 8.52614 7 8.25 7H7V8.25C7 8.52614 6.77614 8.75 6.5 8.75C6.22386 8.75 6 8.52614 6 8.25V7H4.75C4.47386 7 4.25 6.77614 4.25 6.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}),mXe=["color"],gXe=E.forwardRef(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=Qe(t,mXe);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),E.createElement("path",{d:"M6.5 10C8.433 10 10 8.433 10 6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10ZM6.5 11C7.56251 11 8.53901 10.6318 9.30884 10.0159L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L10.0159 9.30884C10.6318 8.53901 11 7.56251 11 6.5C11 4.01472 8.98528 2 6.5 2C4.01472 2 2 4.01472 2 6.5C2 8.98528 4.01472 11 6.5 11ZM4.75 6C4.47386 6 4.25 6.22386 4.25 6.5C4.25 6.77614 4.47386 7 4.75 7H8.25C8.52614 7 8.75 6.77614 8.75 6.5C8.75 6.22386 8.52614 6 8.25 6H4.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});const yXe=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityIcon:KFe,ActivityLogIcon:eze,AlignBaselineIcon:rze,AlignBottomIcon:ize,AlignCenterHorizontallyIcon:oze,AlignCenterVerticallyIcon:lze,AlignLeftIcon:cze,AlignRightIcon:dze,AlignTopIcon:pze,AllSidesIcon:Cge,AngleIcon:yze,ArchiveIcon:_ze,ArrowBottomLeftIcon:wze,ArrowBottomRightIcon:Cze,ArrowDownIcon:Eze,ArrowLeftIcon:Sge,ArrowRightIcon:p2,ArrowTopLeftIcon:Rze,ArrowTopRightIcon:kze,ArrowUpIcon:Pze,AspectRatioIcon:Ege,AvatarIcon:Nze,BackpackIcon:Fze,BadgeIcon:Bze,BarChartIcon:Vze,BellIcon:Hze,BlendingModeIcon:qze,BookmarkFilledIcon:Xze,BookmarkIcon:Zze,BorderAllIcon:Kze,BorderBottomIcon:eBe,BorderDashedIcon:rBe,BorderDottedIcon:iBe,BorderLeftIcon:oBe,BorderNoneIcon:lBe,BorderRightIcon:cBe,BorderSolidIcon:dBe,BorderSplitIcon:pBe,BorderStyleIcon:gBe,BorderTopIcon:vBe,BorderWidthIcon:xBe,BoxIcon:bBe,BoxModelIcon:SBe,ButtonIcon:MBe,CalendarIcon:IBe,CameraIcon:Mge,CardStackIcon:kBe,CardStackMinusIcon:PBe,CardStackPlusIcon:OBe,CaretDownIcon:H$,CaretLeftIcon:FBe,CaretRightIcon:G$,CaretSortIcon:jBe,CaretUpIcon:UBe,ChatBubbleIcon:GBe,CheckCircledIcon:kY,CheckIcon:WBe,CheckboxIcon:XBe,ChevronDownIcon:KBe,ChevronLeftIcon:eje,ChevronRightIcon:rje,ChevronUpIcon:ije,CircleBackslashIcon:lje,CircleIcon:oje,ClipboardCopyIcon:dje,ClipboardIcon:cje,ClockIcon:pje,CodeIcon:gje,CodeSandboxLogoIcon:vje,ColorWheelIcon:xje,ColumnSpacingIcon:bje,ColumnsIcon:Sje,CommitIcon:Mje,Component1Icon:Ije,Component2Icon:Lje,ComponentBooleanIcon:Aje,ComponentInstanceIcon:$je,ComponentNoneIcon:Nje,ComponentPlaceholderIcon:Fje,ContainerIcon:Bje,CookieIcon:Vje,CopyIcon:Hje,CornerBottomLeftIcon:qje,CornerBottomRightIcon:Zje,CornerTopLeftIcon:Xje,CornerTopRightIcon:Kje,CornersIcon:eVe,CountdownTimerIcon:rVe,CounterClockwiseClockIcon:iVe,CropIcon:oVe,Cross1Icon:lVe,Cross2Icon:cVe,CrossCircledIcon:dVe,Crosshair1Icon:pVe,Crosshair2Icon:gVe,CrumpledPaperIcon:vVe,CubeIcon:AY,CursorArrowIcon:wVe,CursorTextIcon:CVe,DashIcon:EVe,DashboardIcon:TVe,DesktopIcon:RVe,DimensionsIcon:kVe,DiscIcon:PVe,DiscordLogoIcon:OVe,DividerHorizontalIcon:DVe,DividerVerticalIcon:zVe,DotFilledIcon:UVe,DotIcon:jVe,DotsHorizontalIcon:GVe,DotsVerticalIcon:WVe,DoubleArrowDownIcon:YVe,DoubleArrowLeftIcon:Tge,DoubleArrowRightIcon:PY,DoubleArrowUpIcon:QVe,DownloadIcon:IA,DragHandleDots1Icon:rUe,DragHandleDots2Icon:iUe,DragHandleHorizontalIcon:oUe,DragHandleVerticalIcon:lUe,DrawingPinFilledIcon:dUe,DrawingPinIcon:cUe,DropdownMenuIcon:pUe,EnterFullScreenIcon:yUe,EnterIcon:Ige,EnvelopeClosedIcon:_Ue,EnvelopeOpenIcon:wUe,EraserIcon:CUe,ExclamationTriangleIcon:$Y,ExitFullScreenIcon:TUe,ExitIcon:Rge,ExternalLinkIcon:RUe,EyeClosedIcon:kUe,EyeNoneIcon:PUe,EyeOpenIcon:OUe,FaceIcon:DUe,FigmaLogoIcon:zUe,FileIcon:jUe,FileMinusIcon:UUe,FilePlusIcon:GUe,FileTextIcon:WUe,FontBoldIcon:YUe,FontFamilyIcon:JUe,FontItalicIcon:QUe,FontRomanIcon:tHe,FontSizeIcon:nHe,FontStyleIcon:sHe,FrameIcon:aHe,FramerLogoIcon:uHe,GearIcon:hHe,GitHubLogoIcon:Lge,GlobeIcon:pHe,GridIcon:gHe,GroupIcon:kge,Half1Icon:_He,Half2Icon:wHe,HamburgerMenuIcon:CHe,HandIcon:EHe,HeadingIcon:THe,HeartFilledIcon:kHe,HeartIcon:RHe,HeightIcon:PHe,HobbyKnifeIcon:OHe,HomeIcon:DHe,IconJarLogoIcon:zHe,IdCardIcon:jHe,ImageIcon:UHe,InfoCircledIcon:GHe,InputIcon:WHe,InstagramLogoIcon:YHe,KeyboardIcon:JHe,LapTimerIcon:QHe,LaptopIcon:tGe,LayersIcon:nGe,LayoutIcon:sGe,LetterCaseCapitalizeIcon:aGe,LetterCaseLowercaseIcon:uGe,LetterCaseToggleIcon:hGe,LetterCaseUppercaseIcon:fGe,LetterSpacingIcon:mGe,LightningBoltIcon:yGe,LineHeightIcon:_Ge,Link1Icon:Age,Link2Icon:bGe,LinkBreak1Icon:SGe,LinkBreak2Icon:MGe,LinkNone1Icon:IGe,LinkNone2Icon:LGe,LinkedInLogoIcon:AGe,ListBulletIcon:$Ge,LockClosedIcon:NGe,LockOpen1Icon:FGe,LockOpen2Icon:BGe,LoopIcon:VGe,MagicWandIcon:HGe,MagnifyingGlassIcon:Pge,MarginIcon:WGe,MaskOffIcon:YGe,MaskOnIcon:JGe,MinusCircledIcon:tqe,MinusIcon:QGe,MixIcon:nqe,MixerHorizontalIcon:sqe,MixerVerticalIcon:aqe,MobileIcon:uqe,ModulzLogoIcon:hqe,MoonIcon:fqe,MoveIcon:mqe,NotionLogoIcon:yqe,OpacityIcon:_qe,OpenInNewWindowIcon:wqe,OverlineIcon:Cqe,PaddingIcon:Eqe,PaperPlaneIcon:Tqe,PauseIcon:Rqe,Pencil1Icon:kqe,Pencil2Icon:Pqe,PersonIcon:$ge,PieChartIcon:Nqe,PilcrowIcon:Fqe,PinBottomIcon:Bqe,PinLeftIcon:Vqe,PinRightIcon:Hqe,PinTopIcon:qqe,PlayIcon:Zqe,PlusCircledIcon:Kqe,PlusIcon:Xqe,QuestionMarkCircledIcon:rWe,QuestionMarkIcon:eWe,QuoteIcon:iWe,RadiobuttonIcon:oWe,ReaderIcon:lWe,ReloadIcon:cWe,ResetIcon:dWe,ResumeIcon:pWe,RocketIcon:gWe,RotateCounterClockwiseIcon:vWe,RowSpacingIcon:xWe,RowsIcon:bWe,RulerHorizontalIcon:SWe,RulerSquareIcon:MWe,ScissorsIcon:IWe,SectionIcon:LWe,SewingPinFilledIcon:Nge,SewingPinIcon:Oge,ShadowIcon:$We,ShadowInnerIcon:NWe,ShadowNoneIcon:FWe,ShadowOuterIcon:BWe,Share1Icon:VWe,Share2Icon:HWe,ShuffleIcon:qWe,SizeIcon:ZWe,SketchLogoIcon:XWe,SlashIcon:KWe,SliderIcon:eZe,SpaceBetweenHorizontallyIcon:rZe,SpaceBetweenVerticallyIcon:iZe,SpaceEvenlyHorizontallyIcon:oZe,SpaceEvenlyVerticallyIcon:lZe,SpeakerLoudIcon:cZe,SpeakerModerateIcon:dZe,SpeakerOffIcon:pZe,SpeakerQuietIcon:gZe,SquareIcon:vZe,StackIcon:xZe,StarFilledIcon:SZe,StarIcon:bZe,StitchesLogoIcon:MZe,StopIcon:IZe,StopwatchIcon:LZe,StretchHorizontallyIcon:AZe,StretchVerticallyIcon:$Ze,StrikethroughIcon:NZe,SunIcon:FZe,SwitchIcon:BZe,SymbolIcon:VZe,TableIcon:HZe,TargetIcon:qZe,TextAlignBottomIcon:XZe,TextAlignCenterIcon:KZe,TextAlignJustifyIcon:eYe,TextAlignLeftIcon:rYe,TextAlignMiddleIcon:iYe,TextAlignRightIcon:oYe,TextAlignTopIcon:lYe,TextIcon:ZZe,TextNoneIcon:cYe,ThickArrowDownIcon:dYe,ThickArrowLeftIcon:pYe,ThickArrowRightIcon:gYe,ThickArrowUpIcon:vYe,TimerIcon:xYe,TokensIcon:bYe,TrackNextIcon:SYe,TrackPreviousIcon:MYe,TransformIcon:IYe,TransparencyGridIcon:LYe,TrashIcon:AYe,TriangleDownIcon:$Ye,TriangleLeftIcon:NYe,TriangleRightIcon:FYe,TriangleUpIcon:BYe,TwitterLogoIcon:VYe,UnderlineIcon:HYe,UpdateIcon:qYe,UploadIcon:ZYe,ValueIcon:XYe,ValueNoneIcon:KYe,VercelLogoIcon:eXe,VideoIcon:rXe,ViewGridIcon:iXe,ViewHorizontalIcon:oXe,ViewNoneIcon:lXe,ViewVerticalIcon:cXe,WidthIcon:dXe,ZoomInIcon:pXe,ZoomOutIcon:gXe},Symbol.toStringTag,{value:"Module"})),D1={"/":{name:"Home",url:"/",icon:"HomeIcon",private:!1,show:!0},map:{name:"Map",url:"/map",description:"View a map of the address, building, parcel, and streets data together.",questions:["Which buildings are linked to that street?"],icon:"GlobeIcon",private:!1,show:!0},geocoder:{name:"Geocoder",url:"/geocoder",description:"Locate and attach information to many addresses at once.",questions:["What council district & neighborhood does this address fall in?","We need geographic coordinates for these addresses."],icon:"Crosshair2Icon",private:!1,show:!0},mailer:{name:"Mailer",url:"/mailer",description:"Create mailing lists",questions:["I'd like to send a mailing to all owner-occupants in a historic district."],icon:"EnvelopeOpenIcon",private:!0,show:!0}},Dge=({name:t,...e})=>{const r=yXe[t];return r?oe.jsx(r,{...e}):(console.warn(`Icon "${t}" not found`),null)},vXe=()=>{const{isAuthenticated:t,username:e,handleSignIn:r,handleSignOut:n}=G5();let i=Object.keys(D1).filter(s=>!(D1[s].private&&!t));return oe.jsx("footer",{className:"p-2 sm:p-4",children:oe.jsxs(m$,{size:"5",children:[oe.jsxs(B5,{columns:{initial:"1",xs:"2",sm:"4"},rows:{initial:"auto",sm:"1"},gap:"4",children:[oe.jsx(kn,{direction:"column",gap:"2",children:oe.jsx(kn,{direction:"column",gap:"2",children:i.map(s=>oe.jsx(ud,{to:D1[s].url,children:oe.jsxs(kn,{align:"center",gap:"2",children:[oe.jsx(Dge,{name:D1[s].icon}),oe.jsx(Ln,{size:"2",weight:"medium",children:D1[s].name})]})},s))})}),oe.jsxs(kn,{direction:"column",gap:"1",children:[oe.jsx(Ln,{size:"2",weight:"bold",children:"Resources"}),oe.jsx(ud,{to:"https://base-units-detroitmi.hub.arcgis.com/",children:oe.jsx(Ln,{size:"2",children:"Base Units Hub"})}),oe.jsx(ud,{to:"https://data.detroitmi.gov/",children:oe.jsx(Ln,{size:"2",children:"Open Data Portal"})})]}),oe.jsx("div",{}),oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsx(Ln,{size:"2",weight:"bold",children:"About this site"}),oe.jsx(ud,{to:"https://github.com/CityOfDetroit/base-unit-tools",children:oe.jsxs(kn,{direction:"row",align:"center",gap:"1",children:[oe.jsx(Ln,{size:"2",children:"View on GitHub"}),oe.jsx(Lge,{})]})}),oe.jsx(ud,{to:"https://app.smartsheet.com/b/form/6919c51a844448e2a6811f04a6267292",children:oe.jsx(kn,{direction:"row",align:"center",gap:"1",children:oe.jsx(Ln,{size:"2",children:"Contact/feedback form"})})})]})]}),oe.jsx(gw,{size:"4",className:"my-4 w-svw"}),oe.jsx(kn,{align:"center",className:"w-full",justify:"center",children:oe.jsxs(Ln,{size:"1",color:"gray",children:["City of Detroit, ",new Date().getFullYear()]})})]})})},_Xe=()=>{const{isAuthenticated:t,username:e,handleSignIn:r,handleSignOut:n}=G5();return oe.jsxs(kn,{direction:"column",gap:"2",gridColumn:{initial:"auto",sm:"span 2"},align:{initial:"start",sm:"end"},justify:{initial:"start",sm:"end"},children:[t&&oe.jsxs(kn,{direction:"row",gap:"2",align:"center",children:[oe.jsx($ge,{}),oe.jsx(Ln,{size:"1",weight:"medium",color:"gray",children:e}),oe.jsxs(Eu,{onClick:n,size:"1",className:"w-full",variant:"soft",color:"ruby",children:[oe.jsx("span",{children:"Log out"}),oe.jsx(Rge,{})]})]}),!t&&oe.jsx(kn,{gap:"4",direction:"row",justify:{initial:"start",md:"end"},align:"center",children:oe.jsxs(Eu,{onClick:r,size:"1",variant:"soft",color:"blue",children:[oe.jsx(Ln,{size:"1",weight:"medium",children:"ArcGIS Online login"}),oe.jsx(Ige,{})]})})]})},xXe=()=>{const{isAuthenticated:t,username:e,handleSignIn:r,handleSignOut:n}=G5();return oe.jsx("header",{className:"flex flex-col gap-2",children:oe.jsx(m$,{size:"5",children:oe.jsxs("div",{className:"flex justify-between items-center",children:[oe.jsx("div",{className:"flex flex-col gap-2",children:oe.jsx(ud,{to:"/",children:oe.jsx("h1",{className:"cod-style",children:"Base Unit Tools"})})}),oe.jsx(_Xe,{isAuthenticated:t,username:e,handleSignIn:r,handleSignOut:n})]})})})},wXe=({children:t})=>oe.jsxs("div",{className:"min-h-screen",children:[oe.jsx(xXe,{}),oe.jsx("main",{children:t}),oe.jsx(vXe,{})]});var Sh=63710088e-1,Fge={centimeters:Sh*100,centimetres:Sh*100,degrees:360/(2*Math.PI),feet:Sh*3.28084,inches:Sh*39.37,kilometers:Sh/1e3,kilometres:Sh/1e3,meters:Sh,metres:Sh,miles:Sh/1609.344,millimeters:Sh*1e3,millimetres:Sh*1e3,nauticalmiles:Sh/1852,radians:1,yards:Sh*1.0936};function YS(t,e,r={}){const n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function zge(t,e,r={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Dre(t[0])||!Dre(t[1]))throw new Error("coordinates must contain numbers");return YS({type:"Point",coordinates:t},e,r)}function bXe(t,e,r={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;s1)return 1;for(var y=p,C=0;C<8;C++){var $=this.sampleCurveX(y)-p;if(Math.abs($)$?U=y:q=y,y=.5*(q-U)+U;return y},solve:function(p,h){return this.sampleCurveY(this.solveCurveX(p,h))}};var b=l(m);let M,O;function I(){return M==null&&(M=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),M}function A(){if(O==null&&(O=!1,I())){const h=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(h){for(let C=0;C<5*5;C++){const $=4*C;h.fillStyle=`rgb(${$},${$+1},${$+2})`,h.fillRect(C%5,Math.floor(C/5),1,1)}const y=h.getImageData(0,0,5,5).data;for(let C=0;C<5*5*4;C++)if(C%4!=3&&y[C]!==C){O=!0;break}}}return O||!1}function j(p,h,y,C){const $=new b(p,h,y,C);return V=>$.solve(V)}const H=j(.25,.1,.25,1);function W(p,h,y){return Math.min(y,Math.max(h,p))}function re(p,h,y){const C=y-h,$=((p-h)%C+C)%C+h;return $===h?y:$}function K(p,...h){for(const y of h)for(const C in y)p[C]=y[C];return p}let pe=1;function ge(p,h,y){const C={};for(const $ in p)C[$]=h.call(this,p[$],$,p);return C}function fe(p,h,y){const C={};for(const $ in p)h.call(this,p[$],$,p)&&(C[$]=p[$]);return C}function ee(p){return Array.isArray(p)?p.map(ee):typeof p=="object"&&p?ge(p,ee):p}const be={};function le(p){be[p]||(typeof console<"u"&&console.warn(p),be[p]=!0)}function ve(p,h,y){return(y.y-p.y)*(h.x-p.x)>(h.y-p.y)*(y.x-p.x)}function Pe(p){return typeof WorkerGlobalScope<"u"&&p!==void 0&&p instanceof WorkerGlobalScope}let Fe=null;function We(p){return typeof ImageBitmap<"u"&&p instanceof ImageBitmap}const He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Lt(p,h,y,C,$){return a(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const V=new VideoFrame(p,{timestamp:0});try{const U=V==null?void 0:V.format;if(!U||!U.startsWith("BGR")&&!U.startsWith("RGB"))throw new Error(`Unrecognized format ${U}`);const q=U.startsWith("BGR"),J=new Uint8ClampedArray(C*$*4);if(yield V.copyTo(J,function(se,he,ye,Ee,Re){const De=4*Math.max(-he,0),Ne=(Math.max(0,ye)-ye)*Ee*4+De,ht=4*Ee,gt=Math.max(0,he),er=Math.max(0,ye);return{rect:{x:gt,y:er,width:Math.min(se.width,he+Ee)-gt,height:Math.min(se.height,ye+Re)-er},layout:[{offset:Ne,stride:ht}]}}(p,h,y,C,$)),q)for(let se=0;sePe(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,je=function(p,h){if(/:\/\//.test(p.url)&&!/^https?:|^file:/.test(p.url)){const C=pr(p.url);if(C)return C(p,h);if(Pe(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:p,targetMapId:Ut},h)}if(!(/^file:/.test(y=p.url)||/^file:/.test(Se())&&!/^\w+:/.test(y))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(C,$){return a(this,void 0,void 0,function*(){const V=new Request(C.url,{method:C.method||"GET",body:C.body,credentials:C.credentials,headers:C.headers,cache:C.cache,referrer:Se(),signal:$.signal});C.type!=="json"||V.headers.has("Accept")||V.headers.set("Accept","application/json");const U=yield fetch(V);if(!U.ok){const se=yield U.blob();throw new tr(U.status,U.statusText,C.url,se)}let q;q=C.type==="arrayBuffer"||C.type==="image"?U.arrayBuffer():C.type==="json"?U.json():U.text();const J=yield q;if($.signal.aborted)throw Tt();return{data:J,cacheControl:U.headers.get("Cache-Control"),expires:U.headers.get("Expires")}})}(p,h);if(Pe(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:p,mustQueue:!0,targetMapId:Ut},h)}var y;return function(C,$){return new Promise((V,U)=>{var q;const J=new XMLHttpRequest;J.open(C.method||"GET",C.url,!0),C.type!=="arrayBuffer"&&C.type!=="image"||(J.responseType="arraybuffer");for(const se in C.headers)J.setRequestHeader(se,C.headers[se]);C.type==="json"&&(J.responseType="text",!((q=C.headers)===null||q===void 0)&&q.Accept||J.setRequestHeader("Accept","application/json")),J.withCredentials=C.credentials==="include",J.onerror=()=>{U(new Error(J.statusText))},J.onload=()=>{if(!$.signal.aborted)if((J.status>=200&&J.status<300||J.status===0)&&J.response!==null){let se=J.response;if(C.type==="json")try{se=JSON.parse(J.response)}catch(he){return void U(he)}V({data:se,cacheControl:J.getResponseHeader("Cache-Control"),expires:J.getResponseHeader("Expires")})}else{const se=new Blob([J.response],{type:J.getResponseHeader("Content-Type")});U(new tr(J.status,J.statusText,C.url,se))}},$.signal.addEventListener("abort",()=>{J.abort(),U(Tt())}),J.send(C.body)})}(p,h)};function et(p){if(!p||p.indexOf("://")<=0||p.indexOf("data:image/")===0||p.indexOf("blob:")===0)return!0;const h=new URL(p),y=window.location;return h.protocol===y.protocol&&h.host===y.host}function yt(p,h,y){y[p]&&y[p].indexOf(h)!==-1||(y[p]=y[p]||[],y[p].push(h))}function we(p,h,y){if(y&&y[p]){const C=y[p].indexOf(h);C!==-1&&y[p].splice(C,1)}}class ft{constructor(h,y={}){K(this,y),this.type=h}}class qt extends ft{constructor(h,y={}){super("error",K({error:h},y))}}class _r{on(h,y){return this._listeners=this._listeners||{},yt(h,y,this._listeners),this}off(h,y){return we(h,y,this._listeners),we(h,y,this._oneTimeListeners),this}once(h,y){return y?(this._oneTimeListeners=this._oneTimeListeners||{},yt(h,y,this._oneTimeListeners),this):new Promise(C=>this.once(h,C))}fire(h,y){typeof h=="string"&&(h=new ft(h,y||{}));const C=h.type;if(this.listens(C)){h.target=this;const $=this._listeners&&this._listeners[C]?this._listeners[C].slice():[];for(const q of $)q.call(this,h);const V=this._oneTimeListeners&&this._oneTimeListeners[C]?this._oneTimeListeners[C].slice():[];for(const q of V)we(C,q,this._oneTimeListeners),q.call(this,h);const U=this._eventedParent;U&&(K(h,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),U.fire(h))}else h instanceof qt&&console.error(h.error);return this}listens(h){return this._listeners&&this._listeners[h]&&this._listeners[h].length>0||this._oneTimeListeners&&this._oneTimeListeners[h]&&this._oneTimeListeners[h].length>0||this._eventedParent&&this._eventedParent.listens(h)}setEventedParent(h,y){return this._eventedParent=h,this._eventedParentData=y,this}}var rt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Xe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ze(p,h){const y={};for(const C in p)C!=="ref"&&(y[C]=p[C]);return Xe.forEach(C=>{C in h&&(y[C]=h[C])}),y}function it(p,h){if(Array.isArray(p)){if(!Array.isArray(h)||p.length!==h.length)return!1;for(let y=0;y`:p.itemType.kind==="value"?"array":`array<${h}>`}return p.kind}const Be=[ni,or,vt,ot,lr,Gi,br,Me(Tr),zn,pi,nt];function ze(p,h){if(h.kind==="error")return null;if(p.kind==="array"){if(h.kind==="array"&&(h.N===0&&h.itemType.kind==="value"||!ze(p.itemType,h.itemType))&&(typeof p.N!="number"||p.N===h.N))return null}else{if(p.kind===h.kind)return null;if(p.kind==="value"){for(const y of Be)if(!ze(y,h))return null}}return`Expected ${Ie(p)} but found ${Ie(h)} instead.`}function At(p,h){return h.some(y=>y.kind===p.kind)}function zt(p,h){return h.some(y=>y==="null"?p===null:y==="array"?Array.isArray(p):y==="object"?p&&!Array.isArray(p)&&typeof p=="object":y===typeof p)}function Yt(p,h){return p.kind==="array"&&h.kind==="array"?p.itemType.kind===h.itemType.kind&&typeof p.N=="number":p.kind===h.kind}const wt=.96422,ur=.82521,me=4/29,Ye=6/29,$t=3*Ye*Ye,Nt=Ye*Ye*Ye,Jt=Math.PI/180,cr=180/Math.PI;function Br(p){return(p%=360)<0&&(p+=360),p}function Lr([p,h,y,C]){let $,V;const U=mi((.2225045*(p=hn(p))+.7168786*(h=hn(h))+.0606169*(y=hn(y)))/1);p===h&&h===y?$=V=U:($=mi((.4360747*p+.3850649*h+.1430804*y)/wt),V=mi((.0139322*p+.0971045*h+.7141733*y)/ur));const q=116*U-16;return[q<0?0:q,500*($-U),200*(U-V),C]}function hn(p){return p<=.04045?p/12.92:Math.pow((p+.055)/1.055,2.4)}function mi(p){return p>Nt?Math.pow(p,1/3):p/$t+me}function sn([p,h,y,C]){let $=(p+16)/116,V=isNaN(h)?$:$+h/500,U=isNaN(y)?$:$-y/200;return $=1*si($),V=wt*si(V),U=ur*si(U),[cn(3.1338561*V-1.6168667*$-.4906146*U),cn(-.9787684*V+1.9161415*$+.033454*U),cn(.0719453*V-.2289914*$+1.4052427*U),C]}function cn(p){return(p=p<=.00304?12.92*p:1.055*Math.pow(p,1/2.4)-.055)<0?0:p>1?1:p}function si(p){return p>Ye?p*p*p:$t*(p-me)}function gn(p){return parseInt(p.padEnd(2,p),16)/255}function _i(p,h){return Xi(h?p/100:p,0,1)}function Xi(p,h,y){return Math.min(Math.max(h,p),y)}function Vi(p){return!p.some(Number.isNaN)}const Ta={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Oi{constructor(h,y,C,$=1,V=!0){this.r=h,this.g=y,this.b=C,this.a=$,V||(this.r*=$,this.g*=$,this.b*=$,$||this.overwriteGetter("rgb",[h,y,C,$]))}static parse(h){if(h instanceof Oi)return h;if(typeof h!="string")return;const y=function(C){if((C=C.toLowerCase().trim())==="transparent")return[0,0,0,0];const $=Ta[C];if($){const[U,q,J]=$;return[U/255,q/255,J/255,1]}if(C.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(C)){const U=C.length<6?1:2;let q=1;return[gn(C.slice(q,q+=U)),gn(C.slice(q,q+=U)),gn(C.slice(q,q+=U)),gn(C.slice(q,q+U)||"ff")]}if(C.startsWith("rgb")){const U=C.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(U){const[q,J,se,he,ye,Ee,Re,De,Ne,ht,gt,er]=U,Bt=[he||" ",Re||" ",ht].join("");if(Bt===" "||Bt===" /"||Bt===",,"||Bt===",,,"){const jt=[se,Ee,Ne].join(""),fr=jt==="%%%"?100:jt===""?255:0;if(fr){const Vr=[Xi(+J/fr,0,1),Xi(+ye/fr,0,1),Xi(+De/fr,0,1),gt?_i(+gt,er):1];if(Vi(Vr))return Vr}}return}}const V=C.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(V){const[U,q,J,se,he,ye,Ee,Re,De]=V,Ne=[J||" ",he||" ",Ee].join("");if(Ne===" "||Ne===" /"||Ne===",,"||Ne===",,,"){const ht=[+q,Xi(+se,0,100),Xi(+ye,0,100),Re?_i(+Re,De):1];if(Vi(ht))return function([gt,er,Bt,jt]){function fr(Vr){const Rn=(Vr+gt/30)%12,ki=er*Math.min(Bt,1-Bt);return Bt-ki*Math.max(-1,Math.min(Rn-3,9-Rn,1))}return gt=Br(gt),er/=100,Bt/=100,[fr(0),fr(8),fr(4),jt]}(ht)}}}(h);return y?new Oi(...y,!1):void 0}get rgb(){const{r:h,g:y,b:C,a:$}=this,V=$||1/0;return this.overwriteGetter("rgb",[h/V,y/V,C/V,$])}get hcl(){return this.overwriteGetter("hcl",function(h){const[y,C,$,V]=Lr(h),U=Math.sqrt(C*C+$*$);return[Math.round(1e4*U)?Br(Math.atan2($,C)*cr):NaN,U,y,V]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Lr(this.rgb))}overwriteGetter(h,y){return Object.defineProperty(this,h,{value:y}),y}toString(){const[h,y,C,$]=this.rgb;return`rgba(${[h,y,C].map(V=>Math.round(255*V)).join(",")},${$})`}}Oi.black=new Oi(0,0,0,1),Oi.white=new Oi(1,1,1,1),Oi.transparent=new Oi(0,0,0,0),Oi.red=new Oi(1,0,0,1);class Jo{constructor(h,y,C){this.sensitivity=h?y?"variant":"case":y?"accent":"base",this.locale=C,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(h,y){return this.collator.compare(h,y)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Go{constructor(h,y,C,$,V){this.text=h,this.image=y,this.scale=C,this.fontStack=$,this.textColor=V}}class $n{constructor(h){this.sections=h}static fromString(h){return new $n([new Go(h,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(h=>h.text.length!==0||h.image&&h.image.name.length!==0)}static factory(h){return h instanceof $n?h:$n.fromString(h)}toString(){return this.sections.length===0?"":this.sections.map(h=>h.text).join("")}}class wo{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof wo)return h;if(typeof h=="number")return new wo([h,h,h,h]);if(Array.isArray(h)&&!(h.length<1||h.length>4)){for(const y of h)if(typeof y!="number")return;switch(h.length){case 1:h=[h[0],h[0],h[0],h[0]];break;case 2:h=[h[0],h[1],h[0],h[1]];break;case 3:h=[h[0],h[1],h[2],h[1]]}return new wo(h)}}toString(){return JSON.stringify(this.values)}}const aa=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class As{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof As)return h;if(Array.isArray(h)&&!(h.length<1)&&h.length%2==0){for(let y=0;y=0&&p<=255&&typeof h=="number"&&h>=0&&h<=255&&typeof y=="number"&&y>=0&&y<=255?C===void 0||typeof C=="number"&&C>=0&&C<=1?null:`Invalid rgba value [${[p,h,y,C].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof C=="number"?[p,h,y,C]:[p,h,y]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ko(p){if(p===null||typeof p=="string"||typeof p=="boolean"||typeof p=="number"||p instanceof Oi||p instanceof Jo||p instanceof $n||p instanceof wo||p instanceof As||p instanceof Xs)return!0;if(Array.isArray(p)){for(const h of p)if(!Ko(h))return!1;return!0}if(typeof p=="object"){for(const h in p)if(!Ko(p[h]))return!1;return!0}return!1}function Zs(p){if(p===null)return ni;if(typeof p=="string")return vt;if(typeof p=="boolean")return ot;if(typeof p=="number")return or;if(p instanceof Oi)return lr;if(p instanceof Jo)return Zn;if(p instanceof $n)return Gi;if(p instanceof wo)return zn;if(p instanceof As)return nt;if(p instanceof Xs)return pi;if(Array.isArray(p)){const h=p.length;let y;for(const C of p){const $=Zs(C);if(y){if(y===$)continue;y=Tr;break}y=$}return Me(y||Tr,h)}return br}function Qo(p){const h=typeof p;return p===null?"":h==="string"||h==="number"||h==="boolean"?String(p):p instanceof Oi||p instanceof $n||p instanceof wo||p instanceof As||p instanceof Xs?p.toString():JSON.stringify(p)}class nl{constructor(h,y){this.type=h,this.value=y}static parse(h,y){if(h.length!==2)return y.error(`'literal' expression requires exactly one argument, but found ${h.length-1} instead.`);if(!Ko(h[1]))return y.error("invalid value");const C=h[1];let $=Zs(C);const V=y.expectedType;return $.kind!=="array"||$.N!==0||!V||V.kind!=="array"||typeof V.N=="number"&&V.N!==0||($=V),new nl($,C)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class bo{constructor(h){this.name="ExpressionEvaluationError",this.message=h}toJSON(){return this.message}}const mt={string:vt,number:or,boolean:ot,object:br};class dr{constructor(h,y){this.type=h,this.args=y}static parse(h,y){if(h.length<2)return y.error("Expected at least one argument.");let C,$=1;const V=h[0];if(V==="array"){let q,J;if(h.length>2){const se=h[1];if(typeof se!="string"||!(se in mt)||se==="object")return y.error('The item type argument of "array" must be one of string, number, boolean',1);q=mt[se],$++}else q=Tr;if(h.length>3){if(h[2]!==null&&(typeof h[2]!="number"||h[2]<0||h[2]!==Math.floor(h[2])))return y.error('The length argument to "array" must be a positive integer literal',2);J=h[2],$++}C=Me(q,J)}else{if(!mt[V])throw new Error(`Types doesn't contain name = ${V}`);C=mt[V]}const U=[];for(;$h.outputDefined())}}const Or={"to-boolean":ot,"to-color":lr,"to-number":or,"to-string":vt};class Xn{constructor(h,y){this.type=h,this.args=y}static parse(h,y){if(h.length<2)return y.error("Expected at least one argument.");const C=h[0];if(!Or[C])throw new Error(`Can't parse ${C} as it is not part of the known types`);if((C==="to-boolean"||C==="to-string")&&h.length!==2)return y.error("Expected one argument.");const $=Or[C],V=[];for(let U=1;U4?`Invalid rbga value ${JSON.stringify(y)}: expected an array containing either three or four numeric values.`:yl(y[0],y[1],y[2],y[3]),!C))return new Oi(y[0]/255,y[1]/255,y[2]/255,y[3])}throw new bo(C||`Could not parse color from value '${typeof y=="string"?y:JSON.stringify(y)}'`)}case"padding":{let y;for(const C of this.args){y=C.evaluate(h);const $=wo.parse(y);if($)return $}throw new bo(`Could not parse padding from value '${typeof y=="string"?y:JSON.stringify(y)}'`)}case"variableAnchorOffsetCollection":{let y;for(const C of this.args){y=C.evaluate(h);const $=As.parse(y);if($)return $}throw new bo(`Could not parse variableAnchorOffsetCollection from value '${typeof y=="string"?y:JSON.stringify(y)}'`)}case"number":{let y=null;for(const C of this.args){if(y=C.evaluate(h),y===null)return 0;const $=Number(y);if(!isNaN($))return $}throw new bo(`Could not convert ${JSON.stringify(y)} to number.`)}case"formatted":return $n.fromString(Qo(this.args[0].evaluate(h)));case"resolvedImage":return Xs.fromString(Qo(this.args[0].evaluate(h)));default:return Qo(this.args[0].evaluate(h))}}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every(h=>h.outputDefined())}}const Us=["Unknown","Point","LineString","Polygon"];class Js{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Us[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(h){let y=this._parseColorCache[h];return y||(y=this._parseColorCache[h]=Oi.parse(h)),y}}class co{constructor(h,y,C=[],$,V=new ar,U=[]){this.registry=h,this.path=C,this.key=C.map(q=>`[${q}]`).join(""),this.scope=V,this.errors=U,this.expectedType=$,this._isConstant=y}parse(h,y,C,$,V={}){return y?this.concat(y,C,$)._parse(h,V):this._parse(h,V)}_parse(h,y){function C($,V,U){return U==="assert"?new dr(V,[$]):U==="coerce"?new Xn(V,[$]):$}if(h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const $=h[0];if(typeof $!="string")return this.error(`Expression name must be a string, but found ${typeof $} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const V=this.registry[$];if(V){let U=V.parse(h,this);if(!U)return null;if(this.expectedType){const q=this.expectedType,J=U.type;if(q.kind!=="string"&&q.kind!=="number"&&q.kind!=="boolean"&&q.kind!=="object"&&q.kind!=="array"||J.kind!=="value")if(q.kind!=="color"&&q.kind!=="formatted"&&q.kind!=="resolvedImage"||J.kind!=="value"&&J.kind!=="string")if(q.kind!=="padding"||J.kind!=="value"&&J.kind!=="number"&&J.kind!=="array")if(q.kind!=="variableAnchorOffsetCollection"||J.kind!=="value"&&J.kind!=="array"){if(this.checkSubtype(q,J))return null}else U=C(U,q,y.typeAnnotation||"coerce");else U=C(U,q,y.typeAnnotation||"coerce");else U=C(U,q,y.typeAnnotation||"coerce");else U=C(U,q,y.typeAnnotation||"assert")}if(!(U instanceof nl)&&U.type.kind!=="resolvedImage"&&this._isConstant(U)){const q=new Js;try{U=new nl(U.type,U.evaluate(q))}catch(J){return this.error(J.message),null}}return U}return this.error(`Unknown expression "${$}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(h===void 0?"'undefined' value invalid. Use null instead.":typeof h=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof h} instead.`)}concat(h,y,C){const $=typeof h=="number"?this.path.concat(h):this.path,V=C?this.scope.concat(C):this.scope;return new co(this.registry,this._isConstant,$,y||null,V,this.errors)}error(h,...y){const C=`${this.key}${y.map($=>`[${$}]`).join("")}`;this.errors.push(new Mr(C,h))}checkSubtype(h,y){const C=ze(h,y);return C&&this.error(C),C}}class il{constructor(h,y){this.type=y.type,this.bindings=[].concat(h),this.result=y}evaluate(h){return this.result.evaluate(h)}eachChild(h){for(const y of this.bindings)h(y[1]);h(this.result)}static parse(h,y){if(h.length<4)return y.error(`Expected at least 3 arguments, but found ${h.length-1} instead.`);const C=[];for(let V=1;V=C.length)throw new bo(`Array index out of bounds: ${y} > ${C.length-1}.`);if(y!==Math.floor(y))throw new bo(`Array index must be an integer, but found ${y} instead.`);return C[y]}eachChild(h){h(this.index),h(this.input)}outputDefined(){return!1}}class ae{constructor(h,y){this.type=ot,this.needle=h,this.haystack=y}static parse(h,y){if(h.length!==3)return y.error(`Expected 2 arguments, but found ${h.length-1} instead.`);const C=y.parse(h[1],1,Tr),$=y.parse(h[2],2,Tr);return C&&$?At(C.type,[ot,vt,or,ni,Tr])?new ae(C,$):y.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ie(C.type)} instead`):null}evaluate(h){const y=this.needle.evaluate(h),C=this.haystack.evaluate(h);if(!C)return!1;if(!zt(y,["boolean","string","number","null"]))throw new bo(`Expected first argument to be of type boolean, string, number or null, but found ${Ie(Zs(y))} instead.`);if(!zt(C,["string","array"]))throw new bo(`Expected second argument to be of type array or string, but found ${Ie(Zs(C))} instead.`);return C.indexOf(y)>=0}eachChild(h){h(this.needle),h(this.haystack)}outputDefined(){return!0}}class $e{constructor(h,y,C){this.type=or,this.needle=h,this.haystack=y,this.fromIndex=C}static parse(h,y){if(h.length<=2||h.length>=5)return y.error(`Expected 3 or 4 arguments, but found ${h.length-1} instead.`);const C=y.parse(h[1],1,Tr),$=y.parse(h[2],2,Tr);if(!C||!$)return null;if(!At(C.type,[ot,vt,or,ni,Tr]))return y.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ie(C.type)} instead`);if(h.length===4){const V=y.parse(h[3],3,or);return V?new $e(C,$,V):null}return new $e(C,$)}evaluate(h){const y=this.needle.evaluate(h),C=this.haystack.evaluate(h);if(!zt(y,["boolean","string","number","null"]))throw new bo(`Expected first argument to be of type boolean, string, number or null, but found ${Ie(Zs(y))} instead.`);let $;if(this.fromIndex&&($=this.fromIndex.evaluate(h)),zt(C,["string"])){const V=C.indexOf(y,$);return V===-1?-1:[...C.slice(0,V)].length}if(zt(C,["array"]))return C.indexOf(y,$);throw new bo(`Expected second argument to be of type array or string, but found ${Ie(Zs(C))} instead.`)}eachChild(h){h(this.needle),h(this.haystack),this.fromIndex&&h(this.fromIndex)}outputDefined(){return!1}}class ut{constructor(h,y,C,$,V,U){this.inputType=h,this.type=y,this.input=C,this.cases=$,this.outputs=V,this.otherwise=U}static parse(h,y){if(h.length<5)return y.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if(h.length%2!=1)return y.error("Expected an even number of arguments.");let C,$;y.expectedType&&y.expectedType.kind!=="value"&&($=y.expectedType);const V={},U=[];for(let se=2;seNumber.MAX_SAFE_INTEGER)return Ee.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof De=="number"&&Math.floor(De)!==De)return Ee.error("Numeric branch labels must be integer values.");if(C){if(Ee.checkSubtype(C,Zs(De)))return null}else C=Zs(De);if(V[String(De)]!==void 0)return Ee.error("Branch labels must be unique.");V[String(De)]=U.length}const Re=y.parse(ye,se,$);if(!Re)return null;$=$||Re.type,U.push(Re)}const q=y.parse(h[1],1,Tr);if(!q)return null;const J=y.parse(h[h.length-1],h.length-1,$);return J?q.type.kind!=="value"&&y.concat(1).checkSubtype(C,q.type)?null:new ut(C,$,q,V,U,J):null}evaluate(h){const y=this.input.evaluate(h);return(Zs(y)===this.inputType&&this.outputs[this.cases[y]]||this.otherwise).evaluate(h)}eachChild(h){h(this.input),this.outputs.forEach(h),h(this.otherwise)}outputDefined(){return this.outputs.every(h=>h.outputDefined())&&this.otherwise.outputDefined()}}class kt{constructor(h,y,C){this.type=h,this.branches=y,this.otherwise=C}static parse(h,y){if(h.length<4)return y.error(`Expected at least 3 arguments, but found only ${h.length-1}.`);if(h.length%2!=0)return y.error("Expected an odd number of arguments.");let C;y.expectedType&&y.expectedType.kind!=="value"&&(C=y.expectedType);const $=[];for(let U=1;Uy.outputDefined())&&this.otherwise.outputDefined()}}class Dt{constructor(h,y,C,$){this.type=h,this.input=y,this.beginIndex=C,this.endIndex=$}static parse(h,y){if(h.length<=2||h.length>=5)return y.error(`Expected 3 or 4 arguments, but found ${h.length-1} instead.`);const C=y.parse(h[1],1,Tr),$=y.parse(h[2],2,or);if(!C||!$)return null;if(!At(C.type,[Me(Tr),vt,Tr]))return y.error(`Expected first argument to be of type array or string, but found ${Ie(C.type)} instead`);if(h.length===4){const V=y.parse(h[3],3,or);return V?new Dt(C.type,C,$,V):null}return new Dt(C.type,C,$)}evaluate(h){const y=this.input.evaluate(h),C=this.beginIndex.evaluate(h);let $;if(this.endIndex&&($=this.endIndex.evaluate(h)),zt(y,["string"]))return[...y].slice(C,$).join("");if(zt(y,["array"]))return y.slice(C,$);throw new bo(`Expected first argument to be of type array or string, but found ${Ie(Zs(y))} instead.`)}eachChild(h){h(this.input),h(this.beginIndex),this.endIndex&&h(this.endIndex)}outputDefined(){return!1}}function Zt(p,h){const y=p.length-1;let C,$,V=0,U=y,q=0;for(;V<=U;)if(q=Math.floor((V+U)/2),C=p[q],$=p[q+1],C<=h){if(q===y||h<$)return q;V=q+1}else{if(!(C>h))throw new bo("Input is not a number.");U=q-1}return 0}class Nr{constructor(h,y,C){this.type=h,this.input=y,this.labels=[],this.outputs=[];for(const[$,V]of C)this.labels.push($),this.outputs.push(V)}static parse(h,y){if(h.length-1<4)return y.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return y.error("Expected an even number of arguments.");const C=y.parse(h[1],1,or);if(!C)return null;const $=[];let V=null;y.expectedType&&y.expectedType.kind!=="value"&&(V=y.expectedType);for(let U=1;U=q)return y.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',se);const ye=y.parse(J,he,V);if(!ye)return null;V=V||ye.type,$.push([q,ye])}return new Nr(V,C,$)}evaluate(h){const y=this.labels,C=this.outputs;if(y.length===1)return C[0].evaluate(h);const $=this.input.evaluate(h);if($<=y[0])return C[0].evaluate(h);const V=y.length;return $>=y[V-1]?C[V-1].evaluate(h):C[Zt(y,$)].evaluate(h)}eachChild(h){h(this.input);for(const y of this.outputs)h(y)}outputDefined(){return this.outputs.every(h=>h.outputDefined())}}function Hr(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var Fr=an;function an(p,h,y,C){this.cx=3*p,this.bx=3*(y-p)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*h,this.by=3*(C-h)-this.cy,this.ay=1-this.cy-this.by,this.p1x=p,this.p1y=h,this.p2x=y,this.p2y=C}an.prototype={sampleCurveX:function(p){return((this.ax*p+this.bx)*p+this.cx)*p},sampleCurveY:function(p){return((this.ay*p+this.by)*p+this.cy)*p},sampleCurveDerivativeX:function(p){return(3*this.ax*p+2*this.bx)*p+this.cx},solveCurveX:function(p,h){if(h===void 0&&(h=1e-6),p<0)return 0;if(p>1)return 1;for(var y=p,C=0;C<8;C++){var $=this.sampleCurveX(y)-p;if(Math.abs($)$?U=y:q=y,y=.5*(q-U)+U;return y},solve:function(p,h){return this.sampleCurveY(this.solveCurveX(p,h))}};var ln=Hr(Fr);function xi(p,h,y){return p+y*(h-p)}function ms(p,h,y){return p.map((C,$)=>xi(C,h[$],y))}const Gn={number:xi,color:function(p,h,y,C="rgb"){switch(C){case"rgb":{const[$,V,U,q]=ms(p.rgb,h.rgb,y);return new Oi($,V,U,q,!1)}case"hcl":{const[$,V,U,q]=p.hcl,[J,se,he,ye]=h.hcl;let Ee,Re;if(isNaN($)||isNaN(J))isNaN($)?isNaN(J)?Ee=NaN:(Ee=J,U!==1&&U!==0||(Re=se)):(Ee=$,he!==1&&he!==0||(Re=V));else{let er=J-$;J>$&&er>180?er-=360:J<$&&$-J>180&&(er+=360),Ee=$+y*er}const[De,Ne,ht,gt]=function([er,Bt,jt,fr]){return er=isNaN(er)?0:er*Jt,sn([jt,Math.cos(er)*Bt,Math.sin(er)*Bt,fr])}([Ee,Re??xi(V,se,y),xi(U,he,y),xi(q,ye,y)]);return new Oi(De,Ne,ht,gt,!1)}case"lab":{const[$,V,U,q]=sn(ms(p.lab,h.lab,y));return new Oi($,V,U,q,!1)}}},array:ms,padding:function(p,h,y){return new wo(ms(p.values,h.values,y))},variableAnchorOffsetCollection:function(p,h,y){const C=p.values,$=h.values;if(C.length!==$.length)throw new bo(`Cannot interpolate values of different length. from: ${p.toString()}, to: ${h.toString()}`);const V=[];for(let U=0;Utypeof he!="number"||he<0||he>1))return y.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:se}}}if(h.length-1<4)return y.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return y.error("Expected an even number of arguments.");if(V=y.parse(V,2,or),!V)return null;const q=[];let J=null;C==="interpolate-hcl"||C==="interpolate-lab"?J=lr:y.expectedType&&y.expectedType.kind!=="value"&&(J=y.expectedType);for(let se=0;se=he)return y.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Ee);const De=y.parse(ye,Re,J);if(!De)return null;J=J||De.type,q.push([he,De])}return Yt(J,or)||Yt(J,lr)||Yt(J,zn)||Yt(J,nt)||Yt(J,Me(or))?new ys(J,C,$,V,q):y.error(`Type ${Ie(J)} is not interpolatable.`)}evaluate(h){const y=this.labels,C=this.outputs;if(y.length===1)return C[0].evaluate(h);const $=this.input.evaluate(h);if($<=y[0])return C[0].evaluate(h);const V=y.length;if($>=y[V-1])return C[V-1].evaluate(h);const U=Zt(y,$),q=ys.interpolationFactor(this.interpolation,$,y[U],y[U+1]),J=C[U].evaluate(h),se=C[U+1].evaluate(h);switch(this.operator){case"interpolate":return Gn[this.type.kind](J,se,q);case"interpolate-hcl":return Gn.color(J,se,q,"hcl");case"interpolate-lab":return Gn.color(J,se,q,"lab")}}eachChild(h){h(this.input);for(const y of this.outputs)h(y)}outputDefined(){return this.outputs.every(h=>h.outputDefined())}}function kr(p,h,y,C){const $=C-y,V=p-y;return $===0?0:h===1?V/$:(Math.pow(h,V)-1)/(Math.pow(h,$)-1)}class Un{constructor(h,y){this.type=h,this.args=y}static parse(h,y){if(h.length<2)return y.error("Expectected at least one argument.");let C=null;const $=y.expectedType;$&&$.kind!=="value"&&(C=$);const V=[];for(const q of h.slice(1)){const J=y.parse(q,1+V.length,C,void 0,{typeAnnotation:"omit"});if(!J)return null;C=C||J.type,V.push(J)}if(!C)throw new Error("No output type");const U=$&&V.some(q=>ze($,q.type));return new Un(U?Tr:C,V)}evaluate(h){let y,C=null,$=0;for(const V of this.args)if($++,C=V.evaluate(h),C&&C instanceof Xs&&!C.available&&(y||(y=C.name),C=null,$===this.args.length&&(C=y)),C!==null)break;return C}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every(h=>h.outputDefined())}}function Ss(p,h){return p==="=="||p==="!="?h.kind==="boolean"||h.kind==="string"||h.kind==="number"||h.kind==="null"||h.kind==="value":h.kind==="string"||h.kind==="number"||h.kind==="value"}function go(p,h,y,C){return C.compare(h,y)===0}function Ks(p,h,y){const C=p!=="=="&&p!=="!=";return class Uge{constructor(V,U,q){this.type=ot,this.lhs=V,this.rhs=U,this.collator=q,this.hasUntypedArgument=V.type.kind==="value"||U.type.kind==="value"}static parse(V,U){if(V.length!==3&&V.length!==4)return U.error("Expected two or three arguments.");const q=V[0];let J=U.parse(V[1],1,Tr);if(!J)return null;if(!Ss(q,J.type))return U.concat(1).error(`"${q}" comparisons are not supported for type '${Ie(J.type)}'.`);let se=U.parse(V[2],2,Tr);if(!se)return null;if(!Ss(q,se.type))return U.concat(2).error(`"${q}" comparisons are not supported for type '${Ie(se.type)}'.`);if(J.type.kind!==se.type.kind&&J.type.kind!=="value"&&se.type.kind!=="value")return U.error(`Cannot compare types '${Ie(J.type)}' and '${Ie(se.type)}'.`);C&&(J.type.kind==="value"&&se.type.kind!=="value"?J=new dr(se.type,[J]):J.type.kind!=="value"&&se.type.kind==="value"&&(se=new dr(J.type,[se])));let he=null;if(V.length===4){if(J.type.kind!=="string"&&se.type.kind!=="string"&&J.type.kind!=="value"&&se.type.kind!=="value")return U.error("Cannot use collator to compare non-string types.");if(he=U.parse(V[3],3,Zn),!he)return null}return new Uge(J,se,he)}evaluate(V){const U=this.lhs.evaluate(V),q=this.rhs.evaluate(V);if(C&&this.hasUntypedArgument){const J=Zs(U),se=Zs(q);if(J.kind!==se.kind||J.kind!=="string"&&J.kind!=="number")throw new bo(`Expected arguments for "${p}" to be (string, string) or (number, number), but found (${J.kind}, ${se.kind}) instead.`)}if(this.collator&&!C&&this.hasUntypedArgument){const J=Zs(U),se=Zs(q);if(J.kind!=="string"||se.kind!=="string")return h(V,U,q)}return this.collator?y(V,U,q,this.collator.evaluate(V)):h(V,U,q)}eachChild(V){V(this.lhs),V(this.rhs),this.collator&&V(this.collator)}outputDefined(){return!0}}}const Wc=Ks("==",function(p,h,y){return h===y},go),Ps=Ks("!=",function(p,h,y){return h!==y},function(p,h,y,C){return!go(0,h,y,C)}),_s=Ks("<",function(p,h,y){return h",function(p,h,y){return h>y},function(p,h,y,C){return C.compare(h,y)>0}),wd=Ks("<=",function(p,h,y){return h<=y},function(p,h,y,C){return C.compare(h,y)<=0}),gs=Ks(">=",function(p,h,y){return h>=y},function(p,h,y,C){return C.compare(h,y)>=0});class Hs{constructor(h,y,C){this.type=Zn,this.locale=C,this.caseSensitive=h,this.diacriticSensitive=y}static parse(h,y){if(h.length!==2)return y.error("Expected one argument.");const C=h[1];if(typeof C!="object"||Array.isArray(C))return y.error("Collator options argument must be an object.");const $=y.parse(C["case-sensitive"]!==void 0&&C["case-sensitive"],1,ot);if(!$)return null;const V=y.parse(C["diacritic-sensitive"]!==void 0&&C["diacritic-sensitive"],1,ot);if(!V)return null;let U=null;return C.locale&&(U=y.parse(C.locale,1,vt),!U)?null:new Hs($,V,U)}evaluate(h){return new Jo(this.caseSensitive.evaluate(h),this.diacriticSensitive.evaluate(h),this.locale?this.locale.evaluate(h):null)}eachChild(h){h(this.caseSensitive),h(this.diacriticSensitive),this.locale&&h(this.locale)}outputDefined(){return!1}}class fa{constructor(h,y,C,$,V){this.type=vt,this.number=h,this.locale=y,this.currency=C,this.minFractionDigits=$,this.maxFractionDigits=V}static parse(h,y){if(h.length!==3)return y.error("Expected two arguments.");const C=y.parse(h[1],1,or);if(!C)return null;const $=h[2];if(typeof $!="object"||Array.isArray($))return y.error("NumberFormat options argument must be an object.");let V=null;if($.locale&&(V=y.parse($.locale,1,vt),!V))return null;let U=null;if($.currency&&(U=y.parse($.currency,1,vt),!U))return null;let q=null;if($["min-fraction-digits"]&&(q=y.parse($["min-fraction-digits"],1,or),!q))return null;let J=null;return $["max-fraction-digits"]&&(J=y.parse($["max-fraction-digits"],1,or),!J)?null:new fa(C,V,U,q,J)}evaluate(h){return new Intl.NumberFormat(this.locale?this.locale.evaluate(h):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(h):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(h):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(h):void 0}).format(this.number.evaluate(h))}eachChild(h){h(this.number),this.locale&&h(this.locale),this.currency&&h(this.currency),this.minFractionDigits&&h(this.minFractionDigits),this.maxFractionDigits&&h(this.maxFractionDigits)}outputDefined(){return!1}}class _c{constructor(h){this.type=Gi,this.sections=h}static parse(h,y){if(h.length<2)return y.error("Expected at least one argument.");const C=h[1];if(!Array.isArray(C)&&typeof C=="object")return y.error("First argument must be an image or text section.");const $=[];let V=!1;for(let U=1;U<=h.length-1;++U){const q=h[U];if(V&&typeof q=="object"&&!Array.isArray(q)){V=!1;let J=null;if(q["font-scale"]&&(J=y.parse(q["font-scale"],1,or),!J))return null;let se=null;if(q["text-font"]&&(se=y.parse(q["text-font"],1,Me(vt)),!se))return null;let he=null;if(q["text-color"]&&(he=y.parse(q["text-color"],1,lr),!he))return null;const ye=$[$.length-1];ye.scale=J,ye.font=se,ye.textColor=he}else{const J=y.parse(h[U],1,Tr);if(!J)return null;const se=J.type.kind;if(se!=="string"&&se!=="value"&&se!=="null"&&se!=="resolvedImage")return y.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");V=!0,$.push({content:J,scale:null,font:null,textColor:null})}}return new _c($)}evaluate(h){return new $n(this.sections.map(y=>{const C=y.content.evaluate(h);return Zs(C)===pi?new Go("",C,null,null,null):new Go(Qo(C),null,y.scale?y.scale.evaluate(h):null,y.font?y.font.evaluate(h).join(","):null,y.textColor?y.textColor.evaluate(h):null)}))}eachChild(h){for(const y of this.sections)h(y.content),y.scale&&h(y.scale),y.font&&h(y.font),y.textColor&&h(y.textColor)}outputDefined(){return!1}}class xc{constructor(h){this.type=pi,this.input=h}static parse(h,y){if(h.length!==2)return y.error("Expected two arguments.");const C=y.parse(h[1],1,vt);return C?new xc(C):y.error("No image name provided.")}evaluate(h){const y=this.input.evaluate(h),C=Xs.fromString(y);return C&&h.availableImages&&(C.available=h.availableImages.indexOf(y)>-1),C}eachChild(h){h(this.input)}outputDefined(){return!1}}class Bh{constructor(h){this.type=or,this.input=h}static parse(h,y){if(h.length!==2)return y.error(`Expected 1 argument, but found ${h.length-1} instead.`);const C=y.parse(h[1],1);return C?C.type.kind!=="array"&&C.type.kind!=="string"&&C.type.kind!=="value"?y.error(`Expected argument of type string or array, but found ${Ie(C.type)} instead.`):new Bh(C):null}evaluate(h){const y=this.input.evaluate(h);if(typeof y=="string")return[...y].length;if(Array.isArray(y))return y.length;throw new bo(`Expected value to be of type string or array, but found ${Ie(Zs(y))} instead.`)}eachChild(h){h(this.input)}outputDefined(){return!1}}const Nl=8192;function Zp(p,h){const y=(180+p[0])/360,C=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+p[1]*Math.PI/360)))/360,$=Math.pow(2,h.z);return[Math.round(y*$*Nl),Math.round(C*$*Nl)]}function wc(p,h){const y=Math.pow(2,h.z);return[($=(p[0]/Nl+h.x)/y,360*$-180),(C=(p[1]/Nl+h.y)/y,360/Math.PI*Math.atan(Math.exp((180-360*C)*Math.PI/180))-90)];var C,$}function ne(p,h){p[0]=Math.min(p[0],h[0]),p[1]=Math.min(p[1],h[1]),p[2]=Math.max(p[2],h[0]),p[3]=Math.max(p[3],h[1])}function Te(p,h){return!(p[0]<=h[0]||p[2]>=h[2]||p[1]<=h[1]||p[3]>=h[3])}function ke(p,h,y){const C=p[0]-h[0],$=p[1]-h[1],V=p[0]-y[0],U=p[1]-y[1];return C*U-V*$==0&&C*V<=0&&$*U<=0}function Ve(p,h,y,C){return($=[C[0]-y[0],C[1]-y[1]])[0]*(V=[h[0]-p[0],h[1]-p[1]])[1]-$[1]*V[0]!=0&&!(!wr(p,h,y,C)||!wr(y,C,p,h));var $,V}function Et(p,h,y){for(const C of y)for(let $=0;$($=p)[1]!=(U=q[J+1])[1]>$[1]&&$[0]<(U[0]-V[0])*($[1]-V[1])/(U[1]-V[1])+V[0]&&(C=!C)}var $,V,U;return C}function Mt(p,h){for(const y of h)if(at(p,y))return!0;return!1}function mr(p,h){for(const y of p)if(!at(y,h))return!1;for(let y=0;y0&&q<0||U<0&&q>0}function Gr(p,h,y){const C=[];for(let $=0;$y[2]){const $=.5*C;let V=p[0]-y[0]>$?-C:y[0]-p[0]>$?C:0;V===0&&(V=p[0]-y[2]>$?-C:y[2]-p[0]>$?C:0),p[0]+=V}ne(h,p)}function Er(p,h,y,C){const $=Math.pow(2,C.z)*Nl,V=[C.x*Nl,C.y*Nl],U=[];for(const q of p)for(const J of q){const se=[J.x+V[0],J.y+V[1]];on(se,h,y,$),U.push(se)}return U}function tn(p,h,y,C){const $=Math.pow(2,C.z)*Nl,V=[C.x*Nl,C.y*Nl],U=[];for(const J of p){const se=[];for(const he of J){const ye=[he.x+V[0],he.y+V[1]];ne(h,ye),se.push(ye)}U.push(se)}if(h[2]-h[0]<=$/2){(q=h)[0]=q[1]=1/0,q[2]=q[3]=-1/0;for(const J of U)for(const se of J)on(se,h,y,$)}var q;return U}class Jr{constructor(h,y){this.type=ot,this.geojson=h,this.geometries=y}static parse(h,y){if(h.length!==2)return y.error(`'within' expression requires exactly one argument, but found ${h.length-1} instead.`);if(Ko(h[1])){const C=h[1];if(C.type==="FeatureCollection"){const $=[];for(const V of C.features){const{type:U,coordinates:q}=V.geometry;U==="Polygon"&&$.push(q),U==="MultiPolygon"&&$.push(...q)}if($.length)return new Jr(C,{type:"MultiPolygon",coordinates:$})}else if(C.type==="Feature"){const $=C.geometry.type;if($==="Polygon"||$==="MultiPolygon")return new Jr(C,C.geometry)}else if(C.type==="Polygon"||C.type==="MultiPolygon")return new Jr(C,C)}return y.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return function(y,C){const $=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],U=y.canonicalID();if(C.type==="Polygon"){const q=Gr(C.coordinates,V,U),J=Er(y.geometry(),$,V,U);if(!Te($,V))return!1;for(const se of J)if(!at(se,q))return!1}if(C.type==="MultiPolygon"){const q=Xr(C.coordinates,V,U),J=Er(y.geometry(),$,V,U);if(!Te($,V))return!1;for(const se of J)if(!Mt(se,q))return!1}return!0}(h,this.geometries);if(h.geometryType()==="LineString")return function(y,C){const $=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],U=y.canonicalID();if(C.type==="Polygon"){const q=Gr(C.coordinates,V,U),J=tn(y.geometry(),$,V,U);if(!Te($,V))return!1;for(const se of J)if(!mr(se,q))return!1}if(C.type==="MultiPolygon"){const q=Xr(C.coordinates,V,U),J=tn(y.geometry(),$,V,U);if(!Te($,V))return!1;for(const se of J)if(!yr(se,q))return!1}return!0}(h,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Nn=class{constructor(p=[],h=(y,C)=>yC?1:0){if(this.data=p,this.length=this.data.length,this.compare=h,this.length>0)for(let y=(this.length>>1)-1;y>=0;y--)this._down(y)}push(p){this.data.push(p),this._up(this.length++)}pop(){if(this.length===0)return;const p=this.data[0],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),p}peek(){return this.data[0]}_up(p){const{data:h,compare:y}=this,C=h[p];for(;p>0;){const $=p-1>>1,V=h[$];if(y(C,V)>=0)break;h[p]=V,p=$}h[p]=C}_down(p){const{data:h,compare:y}=this,C=this.length>>1,$=h[p];for(;p=0)break;h[p]=h[V],p=V}h[p]=$}};function ui(p,h,y,C,$){wi(p,h,y,C||p.length-1,$||Wr)}function wi(p,h,y,C,$){for(;C>y;){if(C-y>600){var V=C-y+1,U=h-y+1,q=Math.log(V),J=.5*Math.exp(2*q/3),se=.5*Math.sqrt(q*J*(V-J)/V)*(U-V/2<0?-1:1);wi(p,h,Math.max(y,Math.floor(h-U*J/V+se)),Math.min(C,Math.floor(h+(V-U)*J/V+se)),$)}var he=p[h],ye=y,Ee=C;for(Dn(p,y,h),$(p[C],he)>0&&Dn(p,y,C);ye0;)Ee--}$(p[y],he)===0?Dn(p,y,Ee):Dn(p,++Ee,C),Ee<=h&&(y=Ee+1),h<=Ee&&(C=Ee-1)}}function Dn(p,h,y){var C=p[h];p[h]=p[y],p[y]=C}function Wr(p,h){return ph?1:0}function Fn(p,h){if(p.length<=1)return[p];const y=[];let C,$;for(const V of p){const U=Ti(V);U!==0&&(V.area=Math.abs(U),$===void 0&&($=U<0),$===U<0?(C&&y.push(C),C=[V]):C.push(V))}if(C&&y.push(C),h>1)for(let V=0;V1?(se=h[J+1][0],he=h[J+1][1]):Re>0&&(se+=ye/this.kx*Re,he+=Ee/this.ky*Re)),ye=this.wrap(y[0]-se)*this.kx,Ee=(y[1]-he)*this.ky;const De=ye*ye+Ee*Ee;De180;)h-=360;return h}}function hi(p,h){return h[0]-p[0]}function us(p){return p[1]-p[0]+1}function di(p,h){return p[1]>=p[0]&&p[1]p[1])return[null,null];const y=us(p);if(h){if(y===2)return[p,null];const $=Math.floor(y/2);return[[p[0],p[0]+$],[p[0]+$,p[1]]]}if(y===1)return[p,null];const C=Math.floor(y/2)-1;return[[p[0],p[0]+C],[p[0]+C+1,p[1]]]}function ci(p,h){if(!di(h,p.length))return[1/0,1/0,-1/0,-1/0];const y=[1/0,1/0,-1/0,-1/0];for(let C=h[0];C<=h[1];++C)ne(y,p[C]);return y}function ns(p){const h=[1/0,1/0,-1/0,-1/0];for(const y of p)for(const C of y)ne(h,C);return h}function Qs(p){return p[0]!==-1/0&&p[1]!==-1/0&&p[2]!==1/0&&p[3]!==1/0}function ho(p,h,y){if(!Qs(p)||!Qs(h))return NaN;let C=0,$=0;return p[2]h[2]&&(C=p[0]-h[2]),p[1]>h[3]&&($=p[1]-h[3]),p[3]=C)return C;if(Te($,V)){if(xa(p,h))return 0}else if(xa(h,p))return 0;let U=1/0;for(const q of p)for(let J=0,se=q.length,he=se-1;J0;){const J=U.pop();if(J[0]>=V)continue;const se=J[1],he=h?50:100;if(us(se)<=he){if(!di(se,p.length))return NaN;if(h){const ye=Ni(p,se,y,C);if(isNaN(ye)||ye===0)return ye;V=Math.min(V,ye)}else for(let ye=se[0];ye<=se[1];++ye){const Ee=ea(p[ye],y,C);if(V=Math.min(V,Ee),V===0)return 0}}else{const ye=cs(se,h);Es(U,V,C,p,q,ye[0]),Es(U,V,C,p,q,ye[1])}}return V}function Yu(p,h,y,C,$,V=1/0){let U=Math.min(V,$.distance(p[0],y[0]));if(U===0)return U;const q=new Nn([[0,[0,p.length-1],[0,y.length-1]]],hi);for(;q.length>0;){const J=q.pop();if(J[0]>=U)continue;const se=J[1],he=J[2],ye=h?50:100,Ee=C?50:100;if(us(se)<=ye&&us(he)<=Ee){if(!di(se,p.length)&&di(he,y.length))return NaN;let Re;if(h&&C)Re=Mo(p,se,y,he,$),U=Math.min(U,Re);else if(h&&!C){const De=p.slice(se[0],se[1]+1);for(let Ne=he[0];Ne<=he[1];++Ne)if(Re=jn(y[Ne],De,$),U=Math.min(U,Re),U===0)return U}else if(!h&&C){const De=y.slice(he[0],he[1]+1);for(let Ne=se[0];Ne<=se[1];++Ne)if(Re=jn(p[Ne],De,$),U=Math.min(U,Re),U===0)return U}else Re=Ji(p,se,y,he,$),U=Math.min(U,Re)}else{const Re=cs(se,h),De=cs(he,C);Dl(q,U,$,p,y,Re[0],De[0]),Dl(q,U,$,p,y,Re[0],De[1]),Dl(q,U,$,p,y,Re[1],De[0]),Dl(q,U,$,p,y,Re[1],De[1])}}return U}function jh(p){return p.type==="MultiPolygon"?p.coordinates.map(h=>({type:"Polygon",coordinates:h})):p.type==="MultiLineString"?p.coordinates.map(h=>({type:"LineString",coordinates:h})):p.type==="MultiPoint"?p.coordinates.map(h=>({type:"Point",coordinates:h})):[p]}class vl{constructor(h,y){this.type=or,this.geojson=h,this.geometries=y}static parse(h,y){if(h.length!==2)return y.error(`'distance' expression requires exactly one argument, but found ${h.length-1} instead.`);if(Ko(h[1])){const C=h[1];if(C.type==="FeatureCollection")return new vl(C,C.features.map($=>jh($.geometry)).flat());if(C.type==="Feature")return new vl(C,jh(C.geometry));if("type"in C&&"coordinates"in C)return new vl(C,jh(C))}return y.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return function(y,C){const $=y.geometry(),V=$.flat().map(J=>wc([J.x,J.y],y.canonical));if($.length===0)return NaN;const U=new ss(V[0][1]);let q=1/0;for(const J of C){switch(J.type){case"Point":q=Math.min(q,Yu(V,!1,[J.coordinates],!1,U,q));break;case"LineString":q=Math.min(q,Yu(V,!1,J.coordinates,!0,U,q));break;case"Polygon":q=Math.min(q,Ru(V,!1,J.coordinates,U,q))}if(q===0)return q}return q}(h,this.geometries);if(h.geometryType()==="LineString")return function(y,C){const $=y.geometry(),V=$.flat().map(J=>wc([J.x,J.y],y.canonical));if($.length===0)return NaN;const U=new ss(V[0][1]);let q=1/0;for(const J of C){switch(J.type){case"Point":q=Math.min(q,Yu(V,!0,[J.coordinates],!1,U,q));break;case"LineString":q=Math.min(q,Yu(V,!0,J.coordinates,!0,U,q));break;case"Polygon":q=Math.min(q,Ru(V,!0,J.coordinates,U,q))}if(q===0)return q}return q}(h,this.geometries);if(h.geometryType()==="Polygon")return function(y,C){const $=y.geometry();if($.length===0||$[0].length===0)return NaN;const V=Fn($,0).map(J=>J.map(se=>se.map(he=>wc([he.x,he.y],y.canonical)))),U=new ss(V[0][0][0][1]);let q=1/0;for(const J of C)for(const se of V){switch(J.type){case"Point":q=Math.min(q,Ru([J.coordinates],!1,se,U,q));break;case"LineString":q=Math.min(q,Ru(J.coordinates,!0,se,U,q));break;case"Polygon":q=Math.min(q,is(se,J.coordinates,U,q))}if(q===0)return q}return q}(h,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const sl={"==":Wc,"!=":Ps,">":xd,"<":_s,">=":gs,"<=":wd,array:dr,at:Y,boolean:dr,case:kt,coalesce:Un,collator:Hs,format:_c,image:xc,in:ae,"index-of":$e,interpolate:ys,"interpolate-hcl":ys,"interpolate-lab":ys,length:Bh,let:il,literal:nl,match:ut,number:dr,"number-format":fa,object:dr,slice:Dt,step:Nr,string:dr,"to-boolean":Xn,"to-color":Xn,"to-number":Xn,"to-string":Xn,var:ps,within:Jr,distance:vl};class _l{constructor(h,y,C,$){this.name=h,this.type=y,this._evaluate=C,this.args=$}evaluate(h){return this._evaluate(h,this.args)}eachChild(h){this.args.forEach(h)}outputDefined(){return!1}static parse(h,y){const C=h[0],$=_l.definitions[C];if(!$)return y.error(`Unknown expression "${C}". If you wanted a literal array, use ["literal", [...]].`,0);const V=Array.isArray($)?$[0]:$.type,U=Array.isArray($)?[[$[1],$[2]]]:$.overloads,q=U.filter(([se])=>!Array.isArray(se)||se.length===h.length-1);let J=null;for(const[se,he]of q){J=new co(y.registry,uu,y.path,null,y.scope);const ye=[];let Ee=!1;for(let Re=1;Re{return Ee=ye,Array.isArray(Ee)?`(${Ee.map(Ie).join(", ")})`:`(${Ie(Ee.type)}...)`;var Ee}).join(" | "),he=[];for(let ye=1;ye{y=h?y&&uu(C):y&&C instanceof nl}),!!y&&cu(p)&&eo(p,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function cu(p){if(p instanceof _l&&(p.name==="get"&&p.args.length===1||p.name==="feature-state"||p.name==="has"&&p.args.length===1||p.name==="properties"||p.name==="geometry-type"||p.name==="id"||/^filter-/.test(p.name))||p instanceof Jr||p instanceof vl)return!1;let h=!0;return p.eachChild(y=>{h&&!cu(y)&&(h=!1)}),h}function pa(p){if(p instanceof _l&&p.name==="feature-state")return!1;let h=!0;return p.eachChild(y=>{h&&!pa(y)&&(h=!1)}),h}function eo(p,h){if(p instanceof _l&&h.indexOf(p.name)>=0)return!1;let y=!0;return p.eachChild(C=>{y&&!eo(C,h)&&(y=!1)}),y}function Ju(p){return{result:"success",value:p}}function bc(p){return{result:"error",value:p}}function ql(p){return p["property-type"]==="data-driven"||p["property-type"]==="cross-faded-data-driven"}function Fl(p){return!!p.expression&&p.expression.parameters.indexOf("zoom")>-1}function za(p){return!!p.expression&&p.expression.interpolated}function Ot(p){return p instanceof Number?"number":p instanceof String?"string":p instanceof Boolean?"boolean":Array.isArray(p)?"array":p===null?"null":typeof p}function hr(p){return typeof p=="object"&&p!==null&&!Array.isArray(p)}function En(p){return p}function bi(p,h){const y=h.type==="color",C=p.stops&&typeof p.stops[0][0]=="object",$=C||!(C||p.property!==void 0),V=p.type||(za(h)?"exponential":"interval");if(y||h.type==="padding"){const he=y?Oi.parse:wo.parse;(p=vr({},p)).stops&&(p.stops=p.stops.map(ye=>[ye[0],he(ye[1])])),p.default=he(p.default?p.default:h.default)}if(p.colorSpace&&(U=p.colorSpace)!=="rgb"&&U!=="hcl"&&U!=="lab")throw new Error(`Unknown color space: "${p.colorSpace}"`);var U;let q,J,se;if(V==="exponential")q=g;else if(V==="interval")q=F;else if(V==="categorical"){q=ts,J=Object.create(null);for(const he of p.stops)J[he[0]]=he[1];se=typeof p.stops[0][0]}else{if(V!=="identity")throw new Error(`Unknown function type "${V}"`);q=_}if(C){const he={},ye=[];for(let De=0;DeDe[0]),evaluate:({zoom:De},Ne)=>g({stops:Ee,base:p.base},h,De).evaluate(De,Ne)}}if($){const he=V==="exponential"?{name:"exponential",base:p.base!==void 0?p.base:1}:null;return{kind:"camera",interpolationType:he,interpolationFactor:ys.interpolationFactor.bind(void 0,he),zoomStops:p.stops.map(ye=>ye[0]),evaluate:({zoom:ye})=>q(p,h,ye,J,se)}}return{kind:"source",evaluate(he,ye){const Ee=ye&&ye.properties?ye.properties[p.property]:void 0;return Ee===void 0?hs(p.default,h.default):q(p,h,Ee,J,se)}}}function hs(p,h,y){return p!==void 0?p:h!==void 0?h:y!==void 0?y:void 0}function ts(p,h,y,C,$){return hs(typeof y===$?C[y]:void 0,p.default,h.default)}function F(p,h,y){if(Ot(y)!=="number")return hs(p.default,h.default);const C=p.stops.length;if(C===1||y<=p.stops[0][0])return p.stops[0][1];if(y>=p.stops[C-1][0])return p.stops[C-1][1];const $=Zt(p.stops.map(V=>V[0]),y);return p.stops[$][1]}function g(p,h,y){const C=p.base!==void 0?p.base:1;if(Ot(y)!=="number")return hs(p.default,h.default);const $=p.stops.length;if($===1||y<=p.stops[0][0])return p.stops[0][1];if(y>=p.stops[$-1][0])return p.stops[$-1][1];const V=Zt(p.stops.map(he=>he[0]),y),U=function(he,ye,Ee,Re){const De=Re-Ee,Ne=he-Ee;return De===0?0:ye===1?Ne/De:(Math.pow(ye,Ne)-1)/(Math.pow(ye,De)-1)}(y,C,p.stops[V][0],p.stops[V+1][0]),q=p.stops[V][1],J=p.stops[V+1][1],se=Gn[h.type]||En;return typeof q.evaluate=="function"?{evaluate(...he){const ye=q.evaluate.apply(void 0,he),Ee=J.evaluate.apply(void 0,he);if(ye!==void 0&&Ee!==void 0)return se(ye,Ee,U,p.colorSpace)}}:se(q,J,U,p.colorSpace)}function _(p,h,y){switch(h.type){case"color":y=Oi.parse(y);break;case"formatted":y=$n.fromString(y.toString());break;case"resolvedImage":y=Xs.fromString(y.toString());break;case"padding":y=wo.parse(y);break;default:Ot(y)===h.type||h.type==="enum"&&h.values[y]||(y=void 0)}return hs(y,p.default,h.default)}_l.register(sl,{error:[{kind:"error"},[vt],(p,[h])=>{throw new bo(h.evaluate(p))}],typeof:[vt,[Tr],(p,[h])=>Ie(Zs(h.evaluate(p)))],"to-rgba":[Me(or,4),[lr],(p,[h])=>{const[y,C,$,V]=h.evaluate(p).rgb;return[255*y,255*C,255*$,V]}],rgb:[lr,[or,or,or],Gl],rgba:[lr,[or,or,or,or],Gl],has:{type:ot,overloads:[[[vt],(p,[h])=>Xu(h.evaluate(p),p.properties())],[[vt,br],(p,[h,y])=>Xu(h.evaluate(p),y.evaluate(p))]]},get:{type:Tr,overloads:[[[vt],(p,[h])=>Lu(h.evaluate(p),p.properties())],[[vt,br],(p,[h,y])=>Lu(h.evaluate(p),y.evaluate(p))]]},"feature-state":[Tr,[vt],(p,[h])=>Lu(h.evaluate(p),p.featureState||{})],properties:[br,[],p=>p.properties()],"geometry-type":[vt,[],p=>p.geometryType()],id:[Tr,[],p=>p.id()],zoom:[or,[],p=>p.globals.zoom],"heatmap-density":[or,[],p=>p.globals.heatmapDensity||0],"line-progress":[or,[],p=>p.globals.lineProgress||0],accumulated:[Tr,[],p=>p.globals.accumulated===void 0?null:p.globals.accumulated],"+":[or,ta(or),(p,h)=>{let y=0;for(const C of h)y+=C.evaluate(p);return y}],"*":[or,ta(or),(p,h)=>{let y=1;for(const C of h)y*=C.evaluate(p);return y}],"-":{type:or,overloads:[[[or,or],(p,[h,y])=>h.evaluate(p)-y.evaluate(p)],[[or],(p,[h])=>-h.evaluate(p)]]},"/":[or,[or,or],(p,[h,y])=>h.evaluate(p)/y.evaluate(p)],"%":[or,[or,or],(p,[h,y])=>h.evaluate(p)%y.evaluate(p)],ln2:[or,[],()=>Math.LN2],pi:[or,[],()=>Math.PI],e:[or,[],()=>Math.E],"^":[or,[or,or],(p,[h,y])=>Math.pow(h.evaluate(p),y.evaluate(p))],sqrt:[or,[or],(p,[h])=>Math.sqrt(h.evaluate(p))],log10:[or,[or],(p,[h])=>Math.log(h.evaluate(p))/Math.LN10],ln:[or,[or],(p,[h])=>Math.log(h.evaluate(p))],log2:[or,[or],(p,[h])=>Math.log(h.evaluate(p))/Math.LN2],sin:[or,[or],(p,[h])=>Math.sin(h.evaluate(p))],cos:[or,[or],(p,[h])=>Math.cos(h.evaluate(p))],tan:[or,[or],(p,[h])=>Math.tan(h.evaluate(p))],asin:[or,[or],(p,[h])=>Math.asin(h.evaluate(p))],acos:[or,[or],(p,[h])=>Math.acos(h.evaluate(p))],atan:[or,[or],(p,[h])=>Math.atan(h.evaluate(p))],min:[or,ta(or),(p,h)=>Math.min(...h.map(y=>y.evaluate(p)))],max:[or,ta(or),(p,h)=>Math.max(...h.map(y=>y.evaluate(p)))],abs:[or,[or],(p,[h])=>Math.abs(h.evaluate(p))],round:[or,[or],(p,[h])=>{const y=h.evaluate(p);return y<0?-Math.round(-y):Math.round(y)}],floor:[or,[or],(p,[h])=>Math.floor(h.evaluate(p))],ceil:[or,[or],(p,[h])=>Math.ceil(h.evaluate(p))],"filter-==":[ot,[vt,Tr],(p,[h,y])=>p.properties()[h.value]===y.value],"filter-id-==":[ot,[Tr],(p,[h])=>p.id()===h.value],"filter-type-==":[ot,[vt],(p,[h])=>p.geometryType()===h.value],"filter-<":[ot,[vt,Tr],(p,[h,y])=>{const C=p.properties()[h.value],$=y.value;return typeof C==typeof $&&C<$}],"filter-id-<":[ot,[Tr],(p,[h])=>{const y=p.id(),C=h.value;return typeof y==typeof C&&y":[ot,[vt,Tr],(p,[h,y])=>{const C=p.properties()[h.value],$=y.value;return typeof C==typeof $&&C>$}],"filter-id->":[ot,[Tr],(p,[h])=>{const y=p.id(),C=h.value;return typeof y==typeof C&&y>C}],"filter-<=":[ot,[vt,Tr],(p,[h,y])=>{const C=p.properties()[h.value],$=y.value;return typeof C==typeof $&&C<=$}],"filter-id-<=":[ot,[Tr],(p,[h])=>{const y=p.id(),C=h.value;return typeof y==typeof C&&y<=C}],"filter->=":[ot,[vt,Tr],(p,[h,y])=>{const C=p.properties()[h.value],$=y.value;return typeof C==typeof $&&C>=$}],"filter-id->=":[ot,[Tr],(p,[h])=>{const y=p.id(),C=h.value;return typeof y==typeof C&&y>=C}],"filter-has":[ot,[Tr],(p,[h])=>h.value in p.properties()],"filter-has-id":[ot,[],p=>p.id()!==null&&p.id()!==void 0],"filter-type-in":[ot,[Me(vt)],(p,[h])=>h.value.indexOf(p.geometryType())>=0],"filter-id-in":[ot,[Me(Tr)],(p,[h])=>h.value.indexOf(p.id())>=0],"filter-in-small":[ot,[vt,Me(Tr)],(p,[h,y])=>y.value.indexOf(p.properties()[h.value])>=0],"filter-in-large":[ot,[vt,Me(Tr)],(p,[h,y])=>function(C,$,V,U){for(;V<=U;){const q=V+U>>1;if($[q]===C)return!0;$[q]>C?U=q-1:V=q+1}return!1}(p.properties()[h.value],y.value,0,y.value.length-1)],all:{type:ot,overloads:[[[ot,ot],(p,[h,y])=>h.evaluate(p)&&y.evaluate(p)],[ta(ot),(p,h)=>{for(const y of h)if(!y.evaluate(p))return!1;return!0}]]},any:{type:ot,overloads:[[[ot,ot],(p,[h,y])=>h.evaluate(p)||y.evaluate(p)],[ta(ot),(p,h)=>{for(const y of h)if(y.evaluate(p))return!0;return!1}]]},"!":[ot,[ot],(p,[h])=>!h.evaluate(p)],"is-supported-script":[ot,[vt],(p,[h])=>{const y=p.globals&&p.globals.isSupportedScript;return!y||y(h.evaluate(p))}],upcase:[vt,[vt],(p,[h])=>h.evaluate(p).toUpperCase()],downcase:[vt,[vt],(p,[h])=>h.evaluate(p).toLowerCase()],concat:[vt,ta(Tr),(p,h)=>h.map(y=>Qo(y.evaluate(p))).join("")],"resolved-locale":[vt,[Zn],(p,[h])=>h.evaluate(p).resolvedLocale()]});class w{constructor(h,y){var C;this.expression=h,this._warningHistory={},this._evaluator=new Js,this._defaultValue=y?(C=y).type==="color"&&hr(C.default)?new Oi(0,0,0,0):C.type==="color"?Oi.parse(C.default)||null:C.type==="padding"?wo.parse(C.default)||null:C.type==="variableAnchorOffsetCollection"?As.parse(C.default)||null:C.default===void 0?null:C.default:null,this._enumValues=y&&y.type==="enum"?y.values:null}evaluateWithoutErrorHandling(h,y,C,$,V,U){return this._evaluator.globals=h,this._evaluator.feature=y,this._evaluator.featureState=C,this._evaluator.canonical=$,this._evaluator.availableImages=V||null,this._evaluator.formattedSection=U,this.expression.evaluate(this._evaluator)}evaluate(h,y,C,$,V,U){this._evaluator.globals=h,this._evaluator.feature=y||null,this._evaluator.featureState=C||null,this._evaluator.canonical=$,this._evaluator.availableImages=V||null,this._evaluator.formattedSection=U||null;try{const q=this.expression.evaluate(this._evaluator);if(q==null||typeof q=="number"&&q!=q)return this._defaultValue;if(this._enumValues&&!(q in this._enumValues))throw new bo(`Expected value to be one of ${Object.keys(this._enumValues).map(J=>JSON.stringify(J)).join(", ")}, but found ${JSON.stringify(q)} instead.`);return q}catch(q){return this._warningHistory[q.message]||(this._warningHistory[q.message]=!0,typeof console<"u"&&console.warn(q.message)),this._defaultValue}}}function k(p){return Array.isArray(p)&&p.length>0&&typeof p[0]=="string"&&p[0]in sl}function G(p,h){const y=new co(sl,uu,[],h?function($){const V={color:lr,string:vt,number:or,enum:vt,boolean:ot,formatted:Gi,padding:zn,resolvedImage:pi,variableAnchorOffsetCollection:nt};return $.type==="array"?Me(V[$.value]||Tr,$.length):V[$.type]}(h):void 0),C=y.parse(p,void 0,void 0,void 0,h&&h.type==="string"?{typeAnnotation:"coerce"}:void 0);return C?Ju(new w(C,h)):bc(y.errors)}class te{constructor(h,y){this.kind=h,this._styleExpression=y,this.isStateDependent=h!=="constant"&&!pa(y.expression)}evaluateWithoutErrorHandling(h,y,C,$,V,U){return this._styleExpression.evaluateWithoutErrorHandling(h,y,C,$,V,U)}evaluate(h,y,C,$,V,U){return this._styleExpression.evaluate(h,y,C,$,V,U)}}class ue{constructor(h,y,C,$){this.kind=h,this.zoomStops=C,this._styleExpression=y,this.isStateDependent=h!=="camera"&&!pa(y.expression),this.interpolationType=$}evaluateWithoutErrorHandling(h,y,C,$,V,U){return this._styleExpression.evaluateWithoutErrorHandling(h,y,C,$,V,U)}evaluate(h,y,C,$,V,U){return this._styleExpression.evaluate(h,y,C,$,V,U)}interpolationFactor(h,y,C){return this.interpolationType?ys.interpolationFactor(this.interpolationType,h,y,C):0}}function Ce(p,h){const y=G(p,h);if(y.result==="error")return y;const C=y.value.expression,$=cu(C);if(!$&&!ql(h))return bc([new Mr("","data expressions not supported")]);const V=eo(C,["zoom"]);if(!V&&!Fl(h))return bc([new Mr("","zoom expressions not supported")]);const U=It(C);return U||V?U instanceof Mr?bc([U]):U instanceof ys&&!za(h)?bc([new Mr("",'"interpolate" expressions cannot be used with this property')]):Ju(U?new ue($?"camera":"composite",y.value,U.labels,U instanceof ys?U.interpolation:void 0):new te($?"constant":"source",y.value)):bc([new Mr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ue{constructor(h,y){this._parameters=h,this._specification=y,vr(this,bi(this._parameters,this._specification))}static deserialize(h){return new Ue(h._parameters,h._specification)}static serialize(h){return{_parameters:h._parameters,_specification:h._specification}}}function It(p){let h=null;if(p instanceof il)h=It(p.result);else if(p instanceof Un){for(const y of p.args)if(h=It(y),h)break}else(p instanceof Nr||p instanceof ys)&&p.input instanceof _l&&p.input.name==="zoom"&&(h=p);return h instanceof Mr||p.eachChild(y=>{const C=It(y);C instanceof Mr?h=C:!h&&C?h=new Mr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):h&&C&&h!==C&&(h=new Mr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),h}function Vt(p){if(p===!0||p===!1)return!0;if(!Array.isArray(p)||p.length===0)return!1;switch(p[0]){case"has":return p.length>=2&&p[1]!=="$id"&&p[1]!=="$type";case"in":return p.length>=3&&(typeof p[1]!="string"||Array.isArray(p[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return p.length!==3||Array.isArray(p[1])||Array.isArray(p[2]);case"any":case"all":for(const h of p.slice(1))if(!Vt(h)&&typeof h!="boolean")return!1;return!0;default:return!0}}const gr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function rn(p){if(p==null)return{filter:()=>!0,needGeometry:!1};Vt(p)||(p=Sn(p));const h=G(p,gr);if(h.result==="error")throw new Error(h.value.map(y=>`${y.key}: ${y.message}`).join(", "));return{filter:(y,C,$)=>h.value.evaluate(y,C,{},$),needGeometry:yi(p)}}function Zr(p,h){return ph?1:0}function yi(p){if(!Array.isArray(p))return!1;if(p[0]==="within"||p[0]==="distance")return!0;for(let h=1;h"||h==="<="||h===">="?jr(p[1],p[2],h):h==="any"?(y=p.slice(1),["any"].concat(y.map(Sn))):h==="all"?["all"].concat(p.slice(1).map(Sn)):h==="none"?["all"].concat(p.slice(1).map(Sn).map(Ts)):h==="in"?Ms(p[1],p.slice(2)):h==="!in"?Ts(Ms(p[1],p.slice(2))):h==="has"?Os(p[1]):h!=="!has"||Ts(Os(p[1]));var y}function jr(p,h,y){switch(p){case"$type":return[`filter-type-${y}`,h];case"$id":return[`filter-id-${y}`,h];default:return[`filter-${y}`,p,h]}}function Ms(p,h){if(h.length===0)return!1;switch(p){case"$type":return["filter-type-in",["literal",h]];case"$id":return["filter-id-in",["literal",h]];default:return h.length>200&&!h.some(y=>typeof y!=typeof h[0])?["filter-in-large",p,["literal",h.sort(Zr)]]:["filter-in-small",p,["literal",h]]}}function Os(p){switch(p){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",p]}}function Ts(p){return["!",p]}function io(p){const h=typeof p;if(h==="number"||h==="boolean"||h==="string"||p==null)return JSON.stringify(p);if(Array.isArray(p)){let $="[";for(const V of p)$+=`${io(V)},`;return`${$}]`}const y=Object.keys(p).sort();let C="{";for(let $=0;$C.maximum?[new xt(h,y,`${y} is greater than the maximum value ${C.maximum}`)]:[]}function Cc(p){const h=p.valueSpec,y=Ns(p.value.type);let C,$,V,U={};const q=y!=="categorical"&&p.value.property===void 0,J=!q,se=Ot(p.value.stops)==="array"&&Ot(p.value.stops[0])==="array"&&Ot(p.value.stops[0][0])==="object",he=Io({key:p.key,value:p.value,valueSpec:p.styleSpec.function,validateSpec:p.validateSpec,style:p.style,styleSpec:p.styleSpec,objectElementValidators:{stops:function(Re){if(y==="identity")return[new xt(Re.key,Re.value,'identity function may not have a "stops" property')];let De=[];const Ne=Re.value;return De=De.concat(ja({key:Re.key,value:Ne,valueSpec:Re.valueSpec,validateSpec:Re.validateSpec,style:Re.style,styleSpec:Re.styleSpec,arrayElementValidator:ye})),Ot(Ne)==="array"&&Ne.length===0&&De.push(new xt(Re.key,Ne,"array must have at least one stop")),De},default:function(Re){return Re.validateSpec({key:Re.key,value:Re.value,valueSpec:h,validateSpec:Re.validateSpec,style:Re.style,styleSpec:Re.styleSpec})}}});return y==="identity"&&q&&he.push(new xt(p.key,p.value,'missing required property "property"')),y==="identity"||p.value.stops||he.push(new xt(p.key,p.value,'missing required property "stops"')),y==="exponential"&&p.valueSpec.expression&&!za(p.valueSpec)&&he.push(new xt(p.key,p.value,"exponential functions not supported")),p.styleSpec.$version>=8&&(J&&!ql(p.valueSpec)?he.push(new xt(p.key,p.value,"property functions not supported")):q&&!Fl(p.valueSpec)&&he.push(new xt(p.key,p.value,"zoom functions not supported"))),y!=="categorical"&&!se||p.value.property!==void 0||he.push(new xt(p.key,p.value,'"property" property is required')),he;function ye(Re){let De=[];const Ne=Re.value,ht=Re.key;if(Ot(Ne)!=="array")return[new xt(ht,Ne,`array expected, ${Ot(Ne)} found`)];if(Ne.length!==2)return[new xt(ht,Ne,`array length 2 expected, length ${Ne.length} found`)];if(se){if(Ot(Ne[0])!=="object")return[new xt(ht,Ne,`object expected, ${Ot(Ne[0])} found`)];if(Ne[0].zoom===void 0)return[new xt(ht,Ne,"object stop key must have zoom")];if(Ne[0].value===void 0)return[new xt(ht,Ne,"object stop key must have value")];if(V&&V>Ns(Ne[0].zoom))return[new xt(ht,Ne[0].zoom,"stop zoom values must appear in ascending order")];Ns(Ne[0].zoom)!==V&&(V=Ns(Ne[0].zoom),$=void 0,U={}),De=De.concat(Io({key:`${ht}[0]`,value:Ne[0],valueSpec:{zoom:{}},validateSpec:Re.validateSpec,style:Re.style,styleSpec:Re.styleSpec,objectElementValidators:{zoom:Zc,value:Ee}}))}else De=De.concat(Ee({key:`${ht}[0]`,value:Ne[0],valueSpec:{},validateSpec:Re.validateSpec,style:Re.style,styleSpec:Re.styleSpec},Ne));return k(To(Ne[1]))?De.concat([new xt(`${ht}[1]`,Ne[1],"expressions are not allowed in function stops.")]):De.concat(Re.validateSpec({key:`${ht}[1]`,value:Ne[1],valueSpec:h,validateSpec:Re.validateSpec,style:Re.style,styleSpec:Re.styleSpec}))}function Ee(Re,De){const Ne=Ot(Re.value),ht=Ns(Re.value),gt=Re.value!==null?Re.value:De;if(C){if(Ne!==C)return[new xt(Re.key,gt,`${Ne} stop domain type must match previous stop domain type ${C}`)]}else C=Ne;if(Ne!=="number"&&Ne!=="string"&&Ne!=="boolean")return[new xt(Re.key,gt,"stop domain value must be a number, string, or boolean")];if(Ne!=="number"&&y!=="categorical"){let er=`number expected, ${Ne} found`;return ql(h)&&y===void 0&&(er+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xt(Re.key,gt,er)]}return y!=="categorical"||Ne!=="number"||isFinite(ht)&&Math.floor(ht)===ht?y!=="categorical"&&Ne==="number"&&$!==void 0&&ht<$?[new xt(Re.key,gt,"stop domain values must appear in ascending order")]:($=ht,y==="categorical"&&ht in U?[new xt(Re.key,gt,"stop domain values must be unique")]:(U[ht]=!0,[])):[new xt(Re.key,gt,`integer expected, found ${ht}`)]}}function ku(p){const h=(p.expressionContext==="property"?Ce:G)(To(p.value),p.valueSpec);if(h.result==="error")return h.value.map(C=>new xt(`${p.key}${C.key}`,p.value,C.message));const y=h.value.expression||h.value._styleExpression.expression;if(p.expressionContext==="property"&&p.propertyKey==="text-font"&&!y.outputDefined())return[new xt(p.key,p.value,`Invalid data expression for "${p.propertyKey}". Output values must be contained as literals within the expression.`)];if(p.expressionContext==="property"&&p.propertyType==="layout"&&!pa(y))return[new xt(p.key,p.value,'"feature-state" data expressions are not supported with layout properties.')];if(p.expressionContext==="filter"&&!pa(y))return[new xt(p.key,p.value,'"feature-state" data expressions are not supported with filters.')];if(p.expressionContext&&p.expressionContext.indexOf("cluster")===0){if(!eo(y,["zoom","feature-state"]))return[new xt(p.key,p.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(p.expressionContext==="cluster-initial"&&!cu(y))return[new xt(p.key,p.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Va(p){const h=p.key,y=p.value,C=p.valueSpec,$=[];return Array.isArray(C.values)?C.values.indexOf(Ns(y))===-1&&$.push(new xt(h,y,`expected one of [${C.values.join(", ")}], ${JSON.stringify(y)} found`)):Object.keys(C.values).indexOf(Ns(y))===-1&&$.push(new xt(h,y,`expected one of [${Object.keys(C.values).join(", ")}], ${JSON.stringify(y)} found`)),$}function Jd(p){return Vt(To(p.value))?ku(vr({},p,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Vh(p)}function Vh(p){const h=p.value,y=p.key;if(Ot(h)!=="array")return[new xt(y,h,`array expected, ${Ot(h)} found`)];const C=p.styleSpec;let $,V=[];if(h.length<1)return[new xt(y,h,"filter array must have at least 1 element")];switch(V=V.concat(Va({key:`${y}[0]`,value:h[0],valueSpec:C.filter_operator,style:p.style,styleSpec:p.styleSpec})),Ns(h[0])){case"<":case"<=":case">":case">=":h.length>=2&&Ns(h[1])==="$type"&&V.push(new xt(y,h,`"$type" cannot be use with operator "${h[0]}"`));case"==":case"!=":h.length!==3&&V.push(new xt(y,h,`filter array for operator "${h[0]}" must have 3 elements`));case"in":case"!in":h.length>=2&&($=Ot(h[1]),$!=="string"&&V.push(new xt(`${y}[1]`,h[1],`string expected, ${$} found`)));for(let U=2;U{se in y&&h.push(new xt(C,y[se],`"${se}" is prohibited for ref layers`))}),$.layers.forEach(se=>{Ns(se.id)===q&&(J=se)}),J?J.ref?h.push(new xt(C,y.ref,"ref cannot reference another ref layer")):U=Ns(J.type):h.push(new xt(C,y.ref,`ref layer "${q}" not found`))}else if(U!=="background")if(y.source){const J=$.sources&&$.sources[y.source],se=J&&Ns(J.type);J?se==="vector"&&U==="raster"?h.push(new xt(C,y.source,`layer "${y.id}" requires a raster source`)):se!=="raster-dem"&&U==="hillshade"?h.push(new xt(C,y.source,`layer "${y.id}" requires a raster-dem source`)):se==="raster"&&U!=="raster"?h.push(new xt(C,y.source,`layer "${y.id}" requires a vector source`)):se!=="vector"||y["source-layer"]?se==="raster-dem"&&U!=="hillshade"?h.push(new xt(C,y.source,"raster-dem source can only be used with layer type 'hillshade'.")):U!=="line"||!y.paint||!y.paint["line-gradient"]||se==="geojson"&&J.lineMetrics||h.push(new xt(C,y,`layer "${y.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):h.push(new xt(C,y,`layer "${y.id}" must specify a "source-layer"`)):h.push(new xt(C,y.source,`source "${y.source}" not found`))}else h.push(new xt(C,y,'missing required property "source"'));return h=h.concat(Io({key:C,value:y,valueSpec:V.layer,style:p.style,styleSpec:p.styleSpec,validateSpec:p.validateSpec,objectElementValidators:{"*":()=>[],type:()=>p.validateSpec({key:`${C}.type`,value:y.type,valueSpec:V.layer.type,style:p.style,styleSpec:p.styleSpec,validateSpec:p.validateSpec,object:y,objectKey:"type"}),filter:Jd,layout:J=>Io({layer:y,key:J.key,value:J.value,style:J.style,styleSpec:J.styleSpec,validateSpec:J.validateSpec,objectElementValidators:{"*":se=>m_(vr({layerType:U},se))}}),paint:J=>Io({layer:y,key:J.key,value:J.value,style:J.style,styleSpec:J.styleSpec,validateSpec:J.validateSpec,objectElementValidators:{"*":se=>Yc(vr({layerType:U},se))}})}})),h}function Yp(p){const h=p.value,y=p.key,C=Ot(h);return C!=="string"?[new xt(y,h,`string expected, ${C} found`)]:[]}const Xp={promoteId:function({key:p,value:h}){if(Ot(h)==="string")return Yp({key:p,value:h});{const y=[];for(const C in h)y.push(...Yp({key:`${p}.${C}`,value:h[C]}));return y}}};function qf(p){const h=p.value,y=p.key,C=p.styleSpec,$=p.style,V=p.validateSpec;if(!h.type)return[new xt(y,h,'"type" is required')];const U=Ns(h.type);let q;switch(U){case"vector":case"raster":return q=Io({key:y,value:h,valueSpec:C[`source_${U.replace("-","_")}`],style:p.style,styleSpec:C,objectElementValidators:Xp,validateSpec:V}),q;case"raster-dem":return q=function(J){var se;const he=(se=J.sourceName)!==null&&se!==void 0?se:"",ye=J.value,Ee=J.styleSpec,Re=Ee.source_raster_dem,De=J.style;let Ne=[];const ht=Ot(ye);if(ye===void 0)return Ne;if(ht!=="object")return Ne.push(new xt("source_raster_dem",ye,`object expected, ${ht} found`)),Ne;const gt=Ns(ye.encoding)==="custom",er=["redFactor","greenFactor","blueFactor","baseShift"],Bt=J.value.encoding?`"${J.value.encoding}"`:"Default";for(const jt in ye)!gt&&er.includes(jt)?Ne.push(new xt(jt,ye[jt],`In "${he}": "${jt}" is only valid when "encoding" is set to "custom". ${Bt} encoding found`)):Re[jt]?Ne=Ne.concat(J.validateSpec({key:jt,value:ye[jt],valueSpec:Re[jt],validateSpec:J.validateSpec,style:De,styleSpec:Ee})):Ne.push(new xt(jt,ye[jt],`unknown property "${jt}"`));return Ne}({sourceName:y,value:h,style:p.style,styleSpec:C,validateSpec:V}),q;case"geojson":if(q=Io({key:y,value:h,valueSpec:C.source_geojson,style:$,styleSpec:C,validateSpec:V,objectElementValidators:Xp}),h.cluster)for(const J in h.clusterProperties){const[se,he]=h.clusterProperties[J],ye=typeof se=="string"?[se,["accumulated"],["get",J]]:se;q.push(...ku({key:`${y}.${J}.map`,value:he,validateSpec:V,expressionContext:"cluster-map"})),q.push(...ku({key:`${y}.${J}.reduce`,value:ye,validateSpec:V,expressionContext:"cluster-reduce"}))}return q;case"video":return Io({key:y,value:h,valueSpec:C.source_video,style:$,validateSpec:V,styleSpec:C});case"image":return Io({key:y,value:h,valueSpec:C.source_image,style:$,validateSpec:V,styleSpec:C});case"canvas":return[new xt(y,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Va({key:`${y}.type`,value:h.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:$,validateSpec:V,styleSpec:C})}}function Tm(p){const h=p.value,y=p.styleSpec,C=y.light,$=p.style;let V=[];const U=Ot(h);if(h===void 0)return V;if(U!=="object")return V=V.concat([new xt("light",h,`object expected, ${U} found`)]),V;for(const q in h){const J=q.match(/^(.*)-transition$/);V=V.concat(J&&C[J[1]]&&C[J[1]].transition?p.validateSpec({key:q,value:h[q],valueSpec:y.transition,validateSpec:p.validateSpec,style:$,styleSpec:y}):C[q]?p.validateSpec({key:q,value:h[q],valueSpec:C[q],validateSpec:p.validateSpec,style:$,styleSpec:y}):[new xt(q,h[q],`unknown property "${q}"`)])}return V}function y_(p){const h=p.value,y=p.styleSpec,C=y.sky,$=p.style,V=Ot(h);if(h===void 0)return[];if(V!=="object")return[new xt("sky",h,`object expected, ${V} found`)];let U=[];for(const q in h)U=U.concat(C[q]?p.validateSpec({key:q,value:h[q],valueSpec:C[q],style:$,styleSpec:y}):[new xt(q,h[q],`unknown property "${q}"`)]);return U}function vy(p){const h=p.value,y=p.styleSpec,C=y.terrain,$=p.style;let V=[];const U=Ot(h);if(h===void 0)return V;if(U!=="object")return V=V.concat([new xt("terrain",h,`object expected, ${U} found`)]),V;for(const q in h)V=V.concat(C[q]?p.validateSpec({key:q,value:h[q],valueSpec:C[q],validateSpec:p.validateSpec,style:$,styleSpec:y}):[new xt(q,h[q],`unknown property "${q}"`)]);return V}function v_(p){let h=[];const y=p.value,C=p.key;if(Array.isArray(y)){const $=[],V=[];for(const U in y)y[U].id&&$.includes(y[U].id)&&h.push(new xt(C,y,`all the sprites' ids must be unique, but ${y[U].id} is duplicated`)),$.push(y[U].id),y[U].url&&V.includes(y[U].url)&&h.push(new xt(C,y,`all the sprites' URLs must be unique, but ${y[U].url} is duplicated`)),V.push(y[U].url),h=h.concat(Io({key:`${C}[${U}]`,value:y[U],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:p.validateSpec}));return h}return Yp({key:C,value:y})}const _y={"*":()=>[],array:ja,boolean:function(p){const h=p.value,y=p.key,C=Ot(h);return C!=="boolean"?[new xt(y,h,`boolean expected, ${C} found`)]:[]},number:Zc,color:function(p){const h=p.key,y=p.value,C=Ot(y);return C!=="string"?[new xt(h,y,`color expected, ${C} found`)]:Oi.parse(String(y))?[]:[new xt(h,y,`color expected, "${y}" found`)]},constants:Ba,enum:Va,filter:Jd,function:Cc,layer:g_,object:Io,source:qf,light:Tm,sky:y_,terrain:vy,projection:function(p){const h=p.value,y=p.styleSpec,C=y.projection,$=p.style,V=Ot(h);if(h===void 0)return[];if(V!=="object")return[new xt("projection",h,`object expected, ${V} found`)];let U=[];for(const q in h)U=U.concat(C[q]?p.validateSpec({key:q,value:h[q],valueSpec:C[q],style:$,styleSpec:y}):[new xt(q,h[q],`unknown property "${q}"`)]);return U},string:Yp,formatted:function(p){return Yp(p).length===0?[]:ku(p)},resolvedImage:function(p){return Yp(p).length===0?[]:ku(p)},padding:function(p){const h=p.key,y=p.value;if(Ot(y)==="array"){if(y.length<1||y.length>4)return[new xt(h,y,`padding requires 1 to 4 values; ${y.length} values found`)];const C={type:"number"};let $=[];for(let V=0;V[]}})),p.constants&&(y=y.concat(Ba({key:"constants",value:p.constants,style:p,styleSpec:h,validateSpec:ga}))),xy(y)}function bd(p){return function(h){return p({...h,validateSpec:ga})}}function xy(p){return[].concat(p).sort((h,y)=>h.line-y.line)}function Uh(p){return function(...h){return xy(p.apply(this,h))}}Xc.source=Uh(bd(qf)),Xc.sprite=Uh(bd(v_)),Xc.glyphs=Uh(bd(Wl)),Xc.light=Uh(bd(Tm)),Xc.sky=Uh(bd(y_)),Xc.terrain=Uh(bd(vy)),Xc.layer=Uh(bd(g_)),Xc.filter=Uh(bd(Jd)),Xc.paintProperty=Uh(bd(Yc)),Xc.layoutProperty=Uh(bd(m_));const Kd=Xc,Im=Kd.light,__=Kd.sky,Jp=Kd.paintProperty,l0=Kd.layoutProperty;function Kp(p,h){let y=!1;if(h&&h.length)for(const C of h)p.fire(new qt(new Error(C.message))),y=!0;return y}class Qd{constructor(h,y,C){const $=this.cells=[];if(h instanceof ArrayBuffer){this.arrayBuffer=h;const U=new Int32Array(this.arrayBuffer);h=U[0],this.d=(y=U[1])+2*(C=U[2]);for(let J=0;J=ye[De+0]&&$>=ye[De+1])?(q[Re]=!0,U.push(he[Re])):q[Re]=!1}}}}_forEachCell(h,y,C,$,V,U,q,J){const se=this._convertToCellCoord(h),he=this._convertToCellCoord(y),ye=this._convertToCellCoord(C),Ee=this._convertToCellCoord($);for(let Re=se;Re<=ye;Re++)for(let De=he;De<=Ee;De++){const Ne=this.d*De+Re;if((!J||J(this._convertFromCellCoord(Re),this._convertFromCellCoord(De),this._convertFromCellCoord(Re+1),this._convertFromCellCoord(De+1)))&&V.call(this,h,y,C,$,Ne,U,q,J))return}}_convertFromCellCoord(h){return(h-this.padding)/this.scale}_convertToCellCoord(h){return Math.max(0,Math.min(this.d-1,Math.floor(h*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const h=this.cells,y=3+this.cells.length+1+1;let C=0;for(let U=0;U=0)continue;const U=p[V];$[V]=Zl[y].shallow.indexOf(V)>=0?U:u0(U,h)}p instanceof Error&&($.message=p.message)}if($.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&($.$name=y),$}function ef(p){if(o9(p))return p;if(Array.isArray(p))return p.map(ef);if(typeof p!="object")throw new Error("can't deserialize object of type "+typeof p);const h=x_(p)||"Object";if(!Zl[h])throw new Error(`can't deserialize unregistered class ${h}`);const{klass:y}=Zl[h];if(!y)throw new Error(`can't deserialize unregistered class ${h}`);if(y.deserialize)return y.deserialize(p);const C=Object.create(y.prototype);for(const $ of Object.keys(p)){if($==="$name")continue;const V=p[$];C[$]=Zl[h].shallow.indexOf($)>=0?V:ef(V)}return C}class Qp{constructor(){this.first=!0}update(h,y){const C=Math.floor(h);return this.first?(this.first=!1,this.lastIntegerZoom=C,this.lastIntegerZoomTime=0,this.lastZoom=h,this.lastFloorZoom=C,!0):(this.lastFloorZoom>C?(this.lastIntegerZoom=C+1,this.lastIntegerZoomTime=y):this.lastFloorZoomp>=128&&p<=255,"Hangul Jamo":p=>p>=4352&&p<=4607,Khmer:p=>p>=6016&&p<=6143,"General Punctuation":p=>p>=8192&&p<=8303,"Letterlike Symbols":p=>p>=8448&&p<=8527,"Number Forms":p=>p>=8528&&p<=8591,"Miscellaneous Technical":p=>p>=8960&&p<=9215,"Control Pictures":p=>p>=9216&&p<=9279,"Optical Character Recognition":p=>p>=9280&&p<=9311,"Enclosed Alphanumerics":p=>p>=9312&&p<=9471,"Geometric Shapes":p=>p>=9632&&p<=9727,"Miscellaneous Symbols":p=>p>=9728&&p<=9983,"Miscellaneous Symbols and Arrows":p=>p>=11008&&p<=11263,"Ideographic Description Characters":p=>p>=12272&&p<=12287,"CJK Symbols and Punctuation":p=>p>=12288&&p<=12351,Katakana:p=>p>=12448&&p<=12543,Kanbun:p=>p>=12688&&p<=12703,"CJK Strokes":p=>p>=12736&&p<=12783,"Enclosed CJK Letters and Months":p=>p>=12800&&p<=13055,"CJK Compatibility":p=>p>=13056&&p<=13311,"Yijing Hexagram Symbols":p=>p>=19904&&p<=19967,"Private Use Area":p=>p>=57344&&p<=63743,"Vertical Forms":p=>p>=65040&&p<=65055,"CJK Compatibility Forms":p=>p>=65072&&p<=65103,"Small Form Variants":p=>p>=65104&&p<=65135,"Halfwidth and Fullwidth Forms":p=>p>=65280&&p<=65519};function Ge(p){for(const h of p)if(w_(h.charCodeAt(0)))return!0;return!1}function c0(p){for(const h of p)if(!bs(h.charCodeAt(0)))return!1;return!0}function h0(p){const h=p.map(y=>{try{return new RegExp(`\\p{sc=${y}}`,"u").source}catch{return null}}).filter(y=>y);return new RegExp(h.join("|"),"u")}const Jc=h0(["Arab","Dupl","Mong","Ougr","Syrc"]);function bs(p){return!Jc.test(String.fromCodePoint(p))}const a9=h0(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function w_(p){return!(p!==746&&p!==747&&(p<4352||!(Ds["CJK Compatibility Forms"](p)&&!(p>=65097&&p<=65103)||Ds["CJK Compatibility"](p)||Ds["CJK Strokes"](p)||!(!Ds["CJK Symbols and Punctuation"](p)||p>=12296&&p<=12305||p>=12308&&p<=12319||p===12336)||Ds["Enclosed CJK Letters and Months"](p)||Ds["Ideographic Description Characters"](p)||Ds.Kanbun(p)||Ds.Katakana(p)&&p!==12540||!(!Ds["Halfwidth and Fullwidth Forms"](p)||p===65288||p===65289||p===65293||p>=65306&&p<=65310||p===65339||p===65341||p===65343||p>=65371&&p<=65503||p===65507||p>=65512&&p<=65519)||!(!Ds["Small Form Variants"](p)||p>=65112&&p<=65118||p>=65123&&p<=65126)||Ds["Vertical Forms"](p)||Ds["Yijing Hexagram Symbols"](p)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(p))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(p))||a9.test(String.fromCodePoint(p)))))}function l9(p){return!(w_(p)||function(h){return!!(Ds["Latin-1 Supplement"](h)&&(h===167||h===169||h===174||h===177||h===188||h===189||h===190||h===215||h===247)||Ds["General Punctuation"](h)&&(h===8214||h===8224||h===8225||h===8240||h===8241||h===8251||h===8252||h===8258||h===8263||h===8264||h===8265||h===8273)||Ds["Letterlike Symbols"](h)||Ds["Number Forms"](h)||Ds["Miscellaneous Technical"](h)&&(h>=8960&&h<=8967||h>=8972&&h<=8991||h>=8996&&h<=9e3||h===9003||h>=9085&&h<=9114||h>=9150&&h<=9165||h===9167||h>=9169&&h<=9179||h>=9186&&h<=9215)||Ds["Control Pictures"](h)&&h!==9251||Ds["Optical Character Recognition"](h)||Ds["Enclosed Alphanumerics"](h)||Ds["Geometric Shapes"](h)||Ds["Miscellaneous Symbols"](h)&&!(h>=9754&&h<=9759)||Ds["Miscellaneous Symbols and Arrows"](h)&&(h>=11026&&h<=11055||h>=11088&&h<=11097||h>=11192&&h<=11243)||Ds["CJK Symbols and Punctuation"](h)||Ds.Katakana(h)||Ds["Private Use Area"](h)||Ds["CJK Compatibility Forms"](h)||Ds["Small Form Variants"](h)||Ds["Halfwidth and Fullwidth Forms"](h)||h===8734||h===8756||h===8757||h>=9984&&h<=10087||h>=10102&&h<=10131||h===65532||h===65533)}(p))}const e1=h0(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function b_(p){return e1.test(String.fromCodePoint(p))}function I7(p,h){return!(!h&&b_(p)||p>=2304&&p<=3583||p>=3840&&p<=4255||Ds.Khmer(p))}function R7(p){for(const h of p)if(b_(h.charCodeAt(0)))return!0;return!1}const Sc=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(p){this.pluginStatus=p.pluginStatus,this.pluginURL=p.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(p){this.applyArabicShaping=p.applyArabicShaping,this.processBidirectionalText=p.processBidirectionalText,this.processStyledBidirectionalText=p.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class ra{constructor(h,y){this.zoom=h,y?(this.now=y.now,this.fadeDuration=y.fadeDuration,this.zoomHistory=y.zoomHistory,this.transition=y.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qp,this.transition={})}isSupportedScript(h){return function(y,C){for(const $ of y)if(!I7($.charCodeAt(0),C))return!1;return!0}(h,Sc.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const h=this.zoom,y=h-Math.floor(h),C=this.crossFadingFactor();return h>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:y+(1-y)*C}:{fromScale:.5,toScale:1,t:1-(1-C)*y}}}class Qu{constructor(h,y){this.property=h,this.value=y,this.expression=function(C,$){if(hr(C))return new Ue(C,$);if(k(C)){const V=Ce(C,$);if(V.result==="error")throw new Error(V.value.map(U=>`${U.key}: ${U.message}`).join(", "));return V.value}{let V=C;return $.type==="color"&&typeof C=="string"?V=Oi.parse(C):$.type!=="padding"||typeof C!="number"&&!Array.isArray(C)?$.type==="variableAnchorOffsetCollection"&&Array.isArray(C)&&(V=As.parse(C)):V=wo.parse(C),{kind:"constant",evaluate:()=>V}}}(y===void 0?h.specification.default:y,h.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(h,y,C){return this.property.possiblyEvaluate(this,h,y,C)}}class by{constructor(h){this.property=h,this.value=new Qu(h,void 0)}transitioned(h,y){return new u9(this.property,this.value,y,K({},h.transition,this.transition),h.now)}untransitioned(){return new u9(this.property,this.value,null,{},0)}}class Cy{constructor(h){this._properties=h,this._values=Object.create(h.defaultTransitionablePropertyValues)}getValue(h){return ee(this._values[h].value.value)}setValue(h,y){Object.prototype.hasOwnProperty.call(this._values,h)||(this._values[h]=new by(this._values[h].property)),this._values[h].value=new Qu(this._values[h].property,y===null?void 0:ee(y))}getTransition(h){return ee(this._values[h].transition)}setTransition(h,y){Object.prototype.hasOwnProperty.call(this._values,h)||(this._values[h]=new by(this._values[h].property)),this._values[h].transition=ee(y)||void 0}serialize(){const h={};for(const y of Object.keys(this._values)){const C=this.getValue(y);C!==void 0&&(h[y]=C);const $=this.getTransition(y);$!==void 0&&(h[`${y}-transition`]=$)}return h}transitioned(h,y){const C=new Rm(this._properties);for(const $ of Object.keys(this._values))C._values[$]=this._values[$].transitioned(h,y._values[$]);return C}untransitioned(){const h=new Rm(this._properties);for(const y of Object.keys(this._values))h._values[y]=this._values[y].untransitioned();return h}}class u9{constructor(h,y,C,$,V){this.property=h,this.value=y,this.begin=V+$.delay||0,this.end=this.begin+$.duration||0,h.specification.transition&&($.delay||$.duration)&&(this.prior=C)}possiblyEvaluate(h,y,C){const $=h.now||0,V=this.value.possiblyEvaluate(h,y,C),U=this.prior;if(U){if($>this.end)return this.prior=null,V;if(this.value.isDataDriven())return this.prior=null,V;if($=1)return 1;const se=J*J,he=se*J;return 4*(J<.5?he:3*(J-se)+he-.75)}(q))}}return V}}class Rm{constructor(h){this._properties=h,this._values=Object.create(h.defaultTransitioningPropertyValues)}possiblyEvaluate(h,y,C){const $=new km(this._properties);for(const V of Object.keys(this._values))$._values[V]=this._values[V].possiblyEvaluate(h,y,C);return $}hasTransition(){for(const h of Object.keys(this._values))if(this._values[h].prior)return!0;return!1}}class Lm{constructor(h){this._properties=h,this._values=Object.create(h.defaultPropertyValues)}hasValue(h){return this._values[h].value!==void 0}getValue(h){return ee(this._values[h].value)}setValue(h,y){this._values[h]=new Qu(this._values[h].property,y===null?void 0:ee(y))}serialize(){const h={};for(const y of Object.keys(this._values)){const C=this.getValue(y);C!==void 0&&(h[y]=C)}return h}possiblyEvaluate(h,y,C){const $=new km(this._properties);for(const V of Object.keys(this._values))$._values[V]=this._values[V].possiblyEvaluate(h,y,C);return $}}class zl{constructor(h,y,C){this.property=h,this.value=y,this.parameters=C}isConstant(){return this.value.kind==="constant"}constantOr(h){return this.value.kind==="constant"?this.value.value:h}evaluate(h,y,C,$){return this.property.evaluate(this.value,this.parameters,h,y,C,$)}}class km{constructor(h){this._properties=h,this._values=Object.create(h.defaultPossiblyEvaluatedValues)}get(h){return this._values[h]}}class ii{constructor(h){this.specification=h}possiblyEvaluate(h,y){if(h.isDataDriven())throw new Error("Value should not be data driven");return h.expression.evaluate(y)}interpolate(h,y,C){const $=Gn[this.specification.type];return $?$(h,y,C):h}}class Di{constructor(h,y){this.specification=h,this.overrides=y}possiblyEvaluate(h,y,C,$){return new zl(this,h.expression.kind==="constant"||h.expression.kind==="camera"?{kind:"constant",value:h.expression.evaluate(y,null,{},C,$)}:h.expression,y)}interpolate(h,y,C){if(h.value.kind!=="constant"||y.value.kind!=="constant")return h;if(h.value.value===void 0||y.value.value===void 0)return new zl(this,{kind:"constant",value:void 0},h.parameters);const $=Gn[this.specification.type];if($){const V=$(h.value.value,y.value.value,C);return new zl(this,{kind:"constant",value:V},h.parameters)}return h}evaluate(h,y,C,$,V,U){return h.kind==="constant"?h.value:h.evaluate(y,C,$,V,U)}}class Sy extends Di{possiblyEvaluate(h,y,C,$){if(h.value===void 0)return new zl(this,{kind:"constant",value:void 0},y);if(h.expression.kind==="constant"){const V=h.expression.evaluate(y,null,{},C,$),U=h.property.specification.type==="resolvedImage"&&typeof V!="string"?V.name:V,q=this._calculate(U,U,U,y);return new zl(this,{kind:"constant",value:q},y)}if(h.expression.kind==="camera"){const V=this._calculate(h.expression.evaluate({zoom:y.zoom-1}),h.expression.evaluate({zoom:y.zoom}),h.expression.evaluate({zoom:y.zoom+1}),y);return new zl(this,{kind:"constant",value:V},y)}return new zl(this,h.expression,y)}evaluate(h,y,C,$,V,U){if(h.kind==="source"){const q=h.evaluate(y,C,$,V,U);return this._calculate(q,q,q,y)}return h.kind==="composite"?this._calculate(h.evaluate({zoom:Math.floor(y.zoom)-1},C,$),h.evaluate({zoom:Math.floor(y.zoom)},C,$),h.evaluate({zoom:Math.floor(y.zoom)+1},C,$),y):h.value}_calculate(h,y,C,$){return $.zoom>$.zoomHistory.lastIntegerZoom?{from:h,to:y}:{from:C,to:y}}interpolate(h){return h}}class Ey{constructor(h){this.specification=h}possiblyEvaluate(h,y,C,$){if(h.value!==void 0){if(h.expression.kind==="constant"){const V=h.expression.evaluate(y,null,{},C,$);return this._calculate(V,V,V,y)}return this._calculate(h.expression.evaluate(new ra(Math.floor(y.zoom-1),y)),h.expression.evaluate(new ra(Math.floor(y.zoom),y)),h.expression.evaluate(new ra(Math.floor(y.zoom+1),y)),y)}}_calculate(h,y,C,$){return $.zoom>$.zoomHistory.lastIntegerZoom?{from:h,to:y}:{from:C,to:y}}interpolate(h){return h}}class tf{constructor(h){this.specification=h}possiblyEvaluate(h,y,C,$){return!!h.expression.evaluate(y,null,{},C,$)}interpolate(){return!1}}class z{constructor(h){this.properties=h,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const y in h){const C=h[y];C.specification.overridable&&this.overridableProperties.push(y);const $=this.defaultPropertyValues[y]=new Qu(C,void 0),V=this.defaultTransitionablePropertyValues[y]=new by(C);this.defaultTransitioningPropertyValues[y]=V.untransitioned(),this.defaultPossiblyEvaluatedValues[y]=$.possiblyEvaluate({})}}}Hn("DataDrivenProperty",Di),Hn("DataConstantProperty",ii),Hn("CrossFadedDataDrivenProperty",Sy),Hn("CrossFadedProperty",Ey),Hn("ColorRampProperty",tf);const c="-transition";class x extends _r{constructor(h,y){if(super(),this.id=h.id,this.type=h.type,this._featureFilter={filter:()=>!0,needGeometry:!1},h.type!=="custom"&&(this.metadata=h.metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter),y.layout&&(this._unevaluatedLayout=new Lm(y.layout)),y.paint)){this._transitionablePaint=new Cy(y.paint);for(const C in h.paint)this.setPaintProperty(C,h.paint[C],{validate:!1});for(const C in h.layout)this.setLayoutProperty(C,h.layout[C],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new km(y.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(h){return h==="visibility"?this.visibility:this._unevaluatedLayout.getValue(h)}setLayoutProperty(h,y,C={}){y!=null&&this._validate(l0,`layers.${this.id}.layout.${h}`,h,y,C)||(h!=="visibility"?this._unevaluatedLayout.setValue(h,y):this.visibility=y)}getPaintProperty(h){return h.endsWith(c)?this._transitionablePaint.getTransition(h.slice(0,-11)):this._transitionablePaint.getValue(h)}setPaintProperty(h,y,C={}){if(y!=null&&this._validate(Jp,`layers.${this.id}.paint.${h}`,h,y,C))return!1;if(h.endsWith(c))return this._transitionablePaint.setTransition(h.slice(0,-11),y||void 0),!1;{const $=this._transitionablePaint._values[h],V=$.property.specification["property-type"]==="cross-faded-data-driven",U=$.value.isDataDriven(),q=$.value;this._transitionablePaint.setValue(h,y),this._handleSpecialPaintPropertyUpdate(h);const J=this._transitionablePaint._values[h].value;return J.isDataDriven()||U||V||this._handleOverridablePaintPropertyUpdate(h,q,J)}}_handleSpecialPaintPropertyUpdate(h){}_handleOverridablePaintPropertyUpdate(h,y,C){return!1}isHidden(h){return!!(this.minzoom&&h=this.maxzoom)||this.visibility==="none"}updateTransitions(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(h,y){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,y)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,y)}serialize(){const h={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(h.layout=h.layout||{},h.layout.visibility=this.visibility),fe(h,(y,C)=>!(y===void 0||C==="layout"&&!Object.keys(y).length||C==="paint"&&!Object.keys(y).length))}_validate(h,y,C,$,V={}){return(!V||V.validate!==!1)&&Kp(this,h.call(Kd,{key:y,layerType:this.type,objectKey:C,value:$,styleSpec:rt,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const h in this.paint._values){const y=this.paint.get(h);if(y instanceof zl&&ql(y.property.specification)&&(y.value.kind==="source"||y.value.kind==="composite")&&y.value.isStateDependent)return!0}return!1}}const R={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class L{constructor(h,y){this._structArray=h,this._pos1=y*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class D{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(h,y){return h._trim(),y&&(h.isTransferred=!0,y.push(h.arrayBuffer)),{length:h.length,arrayBuffer:h.arrayBuffer}}static deserialize(h){const y=Object.create(this.prototype);return y.arrayBuffer=h.arrayBuffer,y.length=h.length,y.capacity=h.arrayBuffer.byteLength/y.bytesPerElement,y._refreshViews(),y}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(h){this.reserve(h),this.length=h}reserve(h){if(h>this.capacity){this.capacity=Math.max(h,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const y=this.uint8;this._refreshViews(),y&&this.uint8.set(y)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function X(p,h=1){let y=0,C=0;return{members:p.map($=>{const V=R[$.type].BYTES_PER_ELEMENT,U=y=Q(y,Math.max(h,V)),q=$.components||1;return C=Math.max(C,V),y+=V*q,{name:$.name,type:$.type,components:q,offset:U}}),size:Q(y,Math.max(C,h)),alignment:h}}function Q(p,h){return Math.ceil(p/h)*h}class ie extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y){const C=this.length;return this.resize(C+1),this.emplace(C,h,y)}emplace(h,y,C){const $=2*h;return this.int16[$+0]=y,this.int16[$+1]=C,h}}ie.prototype.bytesPerElement=4,Hn("StructArrayLayout2i4",ie);class de extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C){const $=this.length;return this.resize($+1),this.emplace($,h,y,C)}emplace(h,y,C,$){const V=3*h;return this.int16[V+0]=y,this.int16[V+1]=C,this.int16[V+2]=$,h}}de.prototype.bytesPerElement=6,Hn("StructArrayLayout3i6",de);class _e extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$){const V=this.length;return this.resize(V+1),this.emplace(V,h,y,C,$)}emplace(h,y,C,$,V){const U=4*h;return this.int16[U+0]=y,this.int16[U+1]=C,this.int16[U+2]=$,this.int16[U+3]=V,h}}_e.prototype.bytesPerElement=8,Hn("StructArrayLayout4i8",_e);class xe extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U){const q=this.length;return this.resize(q+1),this.emplace(q,h,y,C,$,V,U)}emplace(h,y,C,$,V,U,q){const J=6*h;return this.int16[J+0]=y,this.int16[J+1]=C,this.int16[J+2]=$,this.int16[J+3]=V,this.int16[J+4]=U,this.int16[J+5]=q,h}}xe.prototype.bytesPerElement=12,Hn("StructArrayLayout2i4i12",xe);class Oe extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U){const q=this.length;return this.resize(q+1),this.emplace(q,h,y,C,$,V,U)}emplace(h,y,C,$,V,U,q){const J=4*h,se=8*h;return this.int16[J+0]=y,this.int16[J+1]=C,this.uint8[se+4]=$,this.uint8[se+5]=V,this.uint8[se+6]=U,this.uint8[se+7]=q,h}}Oe.prototype.bytesPerElement=8,Hn("StructArrayLayout2i4ub8",Oe);class qe extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y){const C=this.length;return this.resize(C+1),this.emplace(C,h,y)}emplace(h,y,C){const $=2*h;return this.float32[$+0]=y,this.float32[$+1]=C,h}}qe.prototype.bytesPerElement=8,Hn("StructArrayLayout2f8",qe);class tt extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U,q,J,se,he){const ye=this.length;return this.resize(ye+1),this.emplace(ye,h,y,C,$,V,U,q,J,se,he)}emplace(h,y,C,$,V,U,q,J,se,he,ye){const Ee=10*h;return this.uint16[Ee+0]=y,this.uint16[Ee+1]=C,this.uint16[Ee+2]=$,this.uint16[Ee+3]=V,this.uint16[Ee+4]=U,this.uint16[Ee+5]=q,this.uint16[Ee+6]=J,this.uint16[Ee+7]=se,this.uint16[Ee+8]=he,this.uint16[Ee+9]=ye,h}}tt.prototype.bytesPerElement=20,Hn("StructArrayLayout10ui20",tt);class dt extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U,q,J,se,he,ye,Ee){const Re=this.length;return this.resize(Re+1),this.emplace(Re,h,y,C,$,V,U,q,J,se,he,ye,Ee)}emplace(h,y,C,$,V,U,q,J,se,he,ye,Ee,Re){const De=12*h;return this.int16[De+0]=y,this.int16[De+1]=C,this.int16[De+2]=$,this.int16[De+3]=V,this.uint16[De+4]=U,this.uint16[De+5]=q,this.uint16[De+6]=J,this.uint16[De+7]=se,this.int16[De+8]=he,this.int16[De+9]=ye,this.int16[De+10]=Ee,this.int16[De+11]=Re,h}}dt.prototype.bytesPerElement=24,Hn("StructArrayLayout4i4ui4i24",dt);class bt extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y,C){const $=this.length;return this.resize($+1),this.emplace($,h,y,C)}emplace(h,y,C,$){const V=3*h;return this.float32[V+0]=y,this.float32[V+1]=C,this.float32[V+2]=$,h}}bt.prototype.bytesPerElement=12,Hn("StructArrayLayout3f12",bt);class St extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(h){const y=this.length;return this.resize(y+1),this.emplace(y,h)}emplace(h,y){return this.uint32[1*h+0]=y,h}}St.prototype.bytesPerElement=4,Hn("StructArrayLayout1ul4",St);class Pt extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U,q,J,se){const he=this.length;return this.resize(he+1),this.emplace(he,h,y,C,$,V,U,q,J,se)}emplace(h,y,C,$,V,U,q,J,se,he){const ye=10*h,Ee=5*h;return this.int16[ye+0]=y,this.int16[ye+1]=C,this.int16[ye+2]=$,this.int16[ye+3]=V,this.int16[ye+4]=U,this.int16[ye+5]=q,this.uint32[Ee+3]=J,this.uint16[ye+8]=se,this.uint16[ye+9]=he,h}}Pt.prototype.bytesPerElement=20,Hn("StructArrayLayout6i1ul2ui20",Pt);class ct extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U){const q=this.length;return this.resize(q+1),this.emplace(q,h,y,C,$,V,U)}emplace(h,y,C,$,V,U,q){const J=6*h;return this.int16[J+0]=y,this.int16[J+1]=C,this.int16[J+2]=$,this.int16[J+3]=V,this.int16[J+4]=U,this.int16[J+5]=q,h}}ct.prototype.bytesPerElement=12,Hn("StructArrayLayout2i2i2i12",ct);class Ht extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V){const U=this.length;return this.resize(U+1),this.emplace(U,h,y,C,$,V)}emplace(h,y,C,$,V,U){const q=4*h,J=8*h;return this.float32[q+0]=y,this.float32[q+1]=C,this.float32[q+2]=$,this.int16[J+6]=V,this.int16[J+7]=U,h}}Ht.prototype.bytesPerElement=16,Hn("StructArrayLayout2f1f2i16",Ht);class Wt extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U){const q=this.length;return this.resize(q+1),this.emplace(q,h,y,C,$,V,U)}emplace(h,y,C,$,V,U,q){const J=16*h,se=4*h,he=8*h;return this.uint8[J+0]=y,this.uint8[J+1]=C,this.float32[se+1]=$,this.float32[se+2]=V,this.int16[he+6]=U,this.int16[he+7]=q,h}}Wt.prototype.bytesPerElement=16,Hn("StructArrayLayout2ub2f2i16",Wt);class sr extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y,C){const $=this.length;return this.resize($+1),this.emplace($,h,y,C)}emplace(h,y,C,$){const V=3*h;return this.uint16[V+0]=y,this.uint16[V+1]=C,this.uint16[V+2]=$,h}}sr.prototype.bytesPerElement=6,Hn("StructArrayLayout3ui6",sr);class $r extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt){const er=this.length;return this.resize(er+1),this.emplace(er,h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt)}emplace(h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt,er){const Bt=24*h,jt=12*h,fr=48*h;return this.int16[Bt+0]=y,this.int16[Bt+1]=C,this.uint16[Bt+2]=$,this.uint16[Bt+3]=V,this.uint32[jt+2]=U,this.uint32[jt+3]=q,this.uint32[jt+4]=J,this.uint16[Bt+10]=se,this.uint16[Bt+11]=he,this.uint16[Bt+12]=ye,this.float32[jt+7]=Ee,this.float32[jt+8]=Re,this.uint8[fr+36]=De,this.uint8[fr+37]=Ne,this.uint8[fr+38]=ht,this.uint32[jt+10]=gt,this.int16[Bt+22]=er,h}}$r.prototype.bytesPerElement=48,Hn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$r);class Qr extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt,er,Bt,jt,fr,Vr,Rn,ki,Pn,Mn,ai,Wn){const Vn=this.length;return this.resize(Vn+1),this.emplace(Vn,h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt,er,Bt,jt,fr,Vr,Rn,ki,Pn,Mn,ai,Wn)}emplace(h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne,ht,gt,er,Bt,jt,fr,Vr,Rn,ki,Pn,Mn,ai,Wn,Vn){const Ir=32*h,fi=16*h;return this.int16[Ir+0]=y,this.int16[Ir+1]=C,this.int16[Ir+2]=$,this.int16[Ir+3]=V,this.int16[Ir+4]=U,this.int16[Ir+5]=q,this.int16[Ir+6]=J,this.int16[Ir+7]=se,this.uint16[Ir+8]=he,this.uint16[Ir+9]=ye,this.uint16[Ir+10]=Ee,this.uint16[Ir+11]=Re,this.uint16[Ir+12]=De,this.uint16[Ir+13]=Ne,this.uint16[Ir+14]=ht,this.uint16[Ir+15]=gt,this.uint16[Ir+16]=er,this.uint16[Ir+17]=Bt,this.uint16[Ir+18]=jt,this.uint16[Ir+19]=fr,this.uint16[Ir+20]=Vr,this.uint16[Ir+21]=Rn,this.uint16[Ir+22]=ki,this.uint32[fi+12]=Pn,this.float32[fi+13]=Mn,this.float32[fi+14]=ai,this.uint16[Ir+30]=Wn,this.uint16[Ir+31]=Vn,h}}Qr.prototype.bytesPerElement=64,Hn("StructArrayLayout8i15ui1ul2f2ui64",Qr);class yn extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h){const y=this.length;return this.resize(y+1),this.emplace(y,h)}emplace(h,y){return this.float32[1*h+0]=y,h}}yn.prototype.bytesPerElement=4,Hn("StructArrayLayout1f4",yn);class Tn extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y,C){const $=this.length;return this.resize($+1),this.emplace($,h,y,C)}emplace(h,y,C,$){const V=3*h;return this.uint16[6*h+0]=y,this.float32[V+1]=C,this.float32[V+2]=$,h}}Tn.prototype.bytesPerElement=12,Hn("StructArrayLayout1ui2f12",Tn);class fn extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y,C){const $=this.length;return this.resize($+1),this.emplace($,h,y,C)}emplace(h,y,C,$){const V=4*h;return this.uint32[2*h+0]=y,this.uint16[V+2]=C,this.uint16[V+3]=$,h}}fn.prototype.bytesPerElement=8,Hn("StructArrayLayout1ul2ui8",fn);class pn extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,y){const C=this.length;return this.resize(C+1),this.emplace(C,h,y)}emplace(h,y,C){const $=2*h;return this.uint16[$+0]=y,this.uint16[$+1]=C,h}}pn.prototype.bytesPerElement=4,Hn("StructArrayLayout2ui4",pn);class Yn extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h){const y=this.length;return this.resize(y+1),this.emplace(y,h)}emplace(h,y){return this.uint16[1*h+0]=y,h}}Yn.prototype.bytesPerElement=2,Hn("StructArrayLayout1ui2",Yn);class Ki extends D{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,y,C,$){const V=this.length;return this.resize(V+1),this.emplace(V,h,y,C,$)}emplace(h,y,C,$,V){const U=4*h;return this.float32[U+0]=y,this.float32[U+1]=C,this.float32[U+2]=$,this.float32[U+3]=V,h}}Ki.prototype.bytesPerElement=16,Hn("StructArrayLayout4f16",Ki);class xn extends L{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new f(this.anchorPointX,this.anchorPointY)}}xn.prototype.size=20;class nn extends Pt{get(h){return new xn(this,h)}}Hn("CollisionBoxArray",nn);class Ui extends L{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(h){this._structArray.uint8[this._pos1+37]=h}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(h){this._structArray.uint8[this._pos1+38]=h}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(h){this._structArray.uint32[this._pos4+10]=h}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ui.prototype.size=48;class qo extends $r{get(h){return new Ui(this,h)}}Hn("PlacedSymbolArray",qo);class qi extends L{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(h){this._structArray.uint32[this._pos4+12]=h}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}qi.prototype.size=64;class Cs extends Qr{get(h){return new qi(this,h)}}Hn("SymbolInstanceArray",Cs);class Ro extends yn{getoffsetX(h){return this.float32[1*h+0]}}Hn("GlyphOffsetArray",Ro);class Ia extends de{getx(h){return this.int16[3*h+0]}gety(h){return this.int16[3*h+1]}gettileUnitDistanceFromAnchor(h){return this.int16[3*h+2]}}Hn("SymbolLineVertexArray",Ia);class Kc extends L{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Kc.prototype.size=12;class Is extends Tn{get(h){return new Kc(this,h)}}Hn("TextAnchorOffsetArray",Is);class hu extends L{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}hu.prototype.size=8;class Au extends fn{get(h){return new hu(this,h)}}Hn("FeatureIndexArray",Au);class du extends ie{}class Pu extends ie{}class Qc extends ie{}class d0 extends xe{}class Wf extends Oe{}class t1 extends qe{}class eh extends tt{}class My extends dt{}class r1 extends bt{}class th extends St{}class rh extends ct{}class Cd extends Wt{}class nh extends sr{}class Yl extends pn{}const fu=X([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ec}=fu;class Fs{constructor(h=[]){this.segments=h}prepareSegment(h,y,C,$){let V=this.segments[this.segments.length-1];return h>Fs.MAX_VERTEX_ARRAY_LENGTH&&le(`Max vertices per segment is ${Fs.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${h}`),(!V||V.vertexLength+h>Fs.MAX_VERTEX_ARRAY_LENGTH||V.sortKey!==$)&&(V={vertexOffset:y.length,primitiveOffset:C.length,vertexLength:0,primitiveLength:0},$!==void 0&&(V.sortKey=$),this.segments.push(V)),V}get(){return this.segments}destroy(){for(const h of this.segments)for(const y in h.vaos)h.vaos[y].destroy()}static simpleSegment(h,y,C,$){return new Fs([{vertexOffset:h,primitiveOffset:y,vertexLength:C,primitiveLength:$,vaos:{},sortKey:0}])}}function rf(p,h){return 256*(p=W(Math.floor(p),0,255))+W(Math.floor(h),0,255)}Fs.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Hn("SegmentVector",Fs);const f0=X([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Zf={exports:{}},C_={exports:{}};C_.exports=function(p,h){var y,C,$,V,U,q,J,se;for(C=p.length-(y=3&p.length),$=h,U=3432918353,q=461845907,se=0;se>>16)*U&65535)<<16)&4294967295)<<15|J>>>17))*q+(((J>>>16)*q&65535)<<16)&4294967295)<<13|$>>>19))+((5*($>>>16)&65535)<<16)&4294967295))+((58964+(V>>>16)&65535)<<16);switch(J=0,y){case 3:J^=(255&p.charCodeAt(se+2))<<16;case 2:J^=(255&p.charCodeAt(se+1))<<8;case 1:$^=J=(65535&(J=(J=(65535&(J^=255&p.charCodeAt(se)))*U+(((J>>>16)*U&65535)<<16)&4294967295)<<15|J>>>17))*q+(((J>>>16)*q&65535)<<16)&4294967295}return $^=p.length,$=2246822507*(65535&($^=$>>>16))+((2246822507*($>>>16)&65535)<<16)&4294967295,$=3266489909*(65535&($^=$>>>13))+((3266489909*($>>>16)&65535)<<16)&4294967295,($^=$>>>16)>>>0};var c9=C_.exports,S_={exports:{}};S_.exports=function(p,h){for(var y,C=p.length,$=h^C,V=0;C>=4;)y=1540483477*(65535&(y=255&p.charCodeAt(V)|(255&p.charCodeAt(++V))<<8|(255&p.charCodeAt(++V))<<16|(255&p.charCodeAt(++V))<<24))+((1540483477*(y>>>16)&65535)<<16),$=1540483477*(65535&$)+((1540483477*($>>>16)&65535)<<16)^(y=1540483477*(65535&(y^=y>>>24))+((1540483477*(y>>>16)&65535)<<16)),C-=4,++V;switch(C){case 3:$^=(255&p.charCodeAt(V+2))<<16;case 2:$^=(255&p.charCodeAt(V+1))<<8;case 1:$=1540483477*(65535&($^=255&p.charCodeAt(V)))+((1540483477*($>>>16)&65535)<<16)}return $=1540483477*(65535&($^=$>>>13))+((1540483477*($>>>16)&65535)<<16),($^=$>>>15)>>>0};var Hh=c9,h9=S_.exports;Zf.exports=Hh,Zf.exports.murmur3=Hh,Zf.exports.murmur2=h9;var Am=l(Zf.exports);class p0{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(h,y,C,$){this.ids.push(Ty(h)),this.positions.push(y,C,$)}getPositions(h){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const y=Ty(h);let C=0,$=this.ids.length-1;for(;C<$;){const U=C+$>>1;this.ids[U]>=y?$=U:C=U+1}const V=[];for(;this.ids[C]===y;)V.push({index:this.positions[3*C],start:this.positions[3*C+1],end:this.positions[3*C+2]}),C++;return V}static serialize(h,y){const C=new Float64Array(h.ids),$=new Uint32Array(h.positions);return Pm(C,$,0,C.length-1),y&&y.push(C.buffer,$.buffer),{ids:C,positions:$}}static deserialize(h){const y=new p0;return y.ids=h.ids,y.positions=h.positions,y.indexed=!0,y}}function Ty(p){const h=+p;return!isNaN(h)&&h<=Number.MAX_SAFE_INTEGER?h:Am(String(p))}function Pm(p,h,y,C){for(;y>1];let V=y-1,U=C+1;for(;;){do V++;while(p[V]<$);do U--;while(p[U]>$);if(V>=U)break;m0(p,V,U),m0(h,3*V,3*U),m0(h,3*V+1,3*U+1),m0(h,3*V+2,3*U+2)}U-y`u_${$}`),this.type=C}setUniform(h,y,C){h.set(C.constantOr(this.value))}getBinding(h,y,C){return this.type==="color"?new BE(h,y):new E_(h,y)}}class Iy{constructor(h,y){this.uniformNames=y.map(C=>`u_${C}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(h,y){this.pixelRatioFrom=y.pixelRatio,this.pixelRatioTo=h.pixelRatio,this.patternFrom=y.tlbr,this.patternTo=h.tlbr}setUniform(h,y,C,$){const V=$==="u_pattern_to"?this.patternTo:$==="u_pattern_from"?this.patternFrom:$==="u_pixel_ratio_to"?this.pixelRatioTo:$==="u_pixel_ratio_from"?this.pixelRatioFrom:null;V&&h.set(V)}getBinding(h,y,C){return C.substr(0,9)==="u_pattern"?new d9(h,y):new E_(h,y)}}class Gh{constructor(h,y,C,$){this.expression=h,this.type=C,this.maxValue=0,this.paintVertexAttributes=y.map(V=>({name:`a_${V}`,type:"Float32",components:C==="color"?2:1,offset:0})),this.paintVertexArray=new $}populatePaintArray(h,y,C,$,V){const U=this.paintVertexArray.length,q=this.expression.evaluate(new ra(0),y,{},$,[],V);this.paintVertexArray.resize(h),this._setPaintValue(U,h,q)}updatePaintArray(h,y,C,$){const V=this.expression.evaluate({zoom:0},C,$);this._setPaintValue(h,y,V)}_setPaintValue(h,y,C){if(this.type==="color"){const $=zs(C);for(let V=h;V`u_${q}_t`),this.type=C,this.useIntegerZoom=$,this.zoom=V,this.maxValue=0,this.paintVertexAttributes=y.map(q=>({name:`a_${q}`,type:"Float32",components:C==="color"?4:2,offset:0})),this.paintVertexArray=new U}populatePaintArray(h,y,C,$,V){const U=this.expression.evaluate(new ra(this.zoom),y,{},$,[],V),q=this.expression.evaluate(new ra(this.zoom+1),y,{},$,[],V),J=this.paintVertexArray.length;this.paintVertexArray.resize(h),this._setPaintValue(J,h,U,q)}updatePaintArray(h,y,C,$){const V=this.expression.evaluate({zoom:this.zoom},C,$),U=this.expression.evaluate({zoom:this.zoom+1},C,$);this._setPaintValue(h,y,V,U)}_setPaintValue(h,y,C,$){if(this.type==="color"){const V=zs(C),U=zs($);for(let q=h;q`#define HAS_UNIFORM_${$}`))}return h}getBinderAttributes(){const h=[];for(const y in this.binders){const C=this.binders[y];if(C instanceof Gh||C instanceof Sd)for(let $=0;$!0){this.programConfigurations={};for(const $ of h)this.programConfigurations[$.id]=new jE($,y,C);this.needsUpload=!1,this._featureMap=new p0,this._bufferOffset=0}populatePaintArrays(h,y,C,$,V,U){for(const q in this.programConfigurations)this.programConfigurations[q].populatePaintArrays(h,y,$,V,U);y.id!==void 0&&this._featureMap.add(y.id,C,this._bufferOffset,h),this._bufferOffset=h,this.needsUpload=!0}updatePaintArrays(h,y,C,$){for(const V of C)this.needsUpload=this.programConfigurations[V.id].updatePaintArrays(h,this._featureMap,y,V,$)||this.needsUpload}get(h){return this.programConfigurations[h]}upload(h){if(this.needsUpload){for(const y in this.programConfigurations)this.programConfigurations[y].upload(h);this.needsUpload=!1}}destroy(){for(const h in this.programConfigurations)this.programConfigurations[h].destroy()}}function rN(p,h){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[p]||[p.replace(`${h}-`,"").replace(/-/g,"_")]}function T_(p,h,y){const C={color:{source:qe,composite:Ki},number:{source:yn,composite:qe}},$=function(V){return{"line-pattern":{source:eh,composite:eh},"fill-pattern":{source:eh,composite:eh},"fill-extrusion-pattern":{source:eh,composite:eh}}[V]}(p);return $&&$[y]||C[h][y]}Hn("ConstantBinder",M_),Hn("CrossFadedConstantBinder",Iy),Hn("SourceExpressionBinder",Gh),Hn("CrossFadedCompositeBinder",g0),Hn("CompositeExpressionBinder",Sd),Hn("ProgramConfiguration",jE,{omit:["_buffers"]}),Hn("ProgramConfigurationSet",pu);const Ra=8192,f9=Math.pow(2,14)-1,k7=-f9-1;function Xl(p){const h=Ra/p.extent,y=p.loadGeometry();for(let C=0;CU.x+1||JU.y+1)&&le("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return y}function ih(p,h){return{type:p.type,id:p.id,properties:p.properties,geometry:h?Xl(p):[]}}function Ry(p,h,y,C,$){p.emplaceBack(2*h+(C+1)/2,2*y+($+1)/2)}class p9{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map(y=>y.id),this.index=h.index,this.hasPattern=!1,this.layoutVertexArray=new Pu,this.indexArray=new nh,this.segments=new Fs,this.programConfigurations=new pu(h.layers,h.zoom),this.stateDependentLayerIds=this.layers.filter(y=>y.isStateDependent()).map(y=>y.id)}populate(h,y,C){const $=this.layers[0],V=[];let U=null,q=!1;$.type==="circle"&&(U=$.layout.get("circle-sort-key"),q=!U.isConstant());for(const{feature:J,id:se,index:he,sourceLayerIndex:ye}of h){const Ee=this.layers[0]._featureFilter.needGeometry,Re=ih(J,Ee);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),Re,C))continue;const De=q?U.evaluate(Re,{},C):void 0,Ne={id:se,properties:J.properties,type:J.type,sourceLayerIndex:ye,index:he,geometry:Ee?Re.geometry:Xl(J),patterns:{},sortKey:De};V.push(Ne)}q&&V.sort((J,se)=>J.sortKey-se.sortKey);for(const J of V){const{geometry:se,index:he,sourceLayerIndex:ye}=J,Ee=h[he].feature;this.addFeature(J,se,he,C),y.featureIndex.insert(Ee,se,he,ye,this.index)}}update(h,y,C){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,y,this.stateDependentLayers,C)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Ec),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(h,y,C,$){for(const V of y)for(const U of V){const q=U.x,J=U.y;if(q<0||q>=Ra||J<0||J>=Ra)continue;const se=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,h.sortKey),he=se.vertexLength;Ry(this.layoutVertexArray,q,J,-1,-1),Ry(this.layoutVertexArray,q,J,1,-1),Ry(this.layoutVertexArray,q,J,1,1),Ry(this.layoutVertexArray,q,J,-1,1),this.indexArray.emplaceBack(he,he+1,he+2),this.indexArray.emplaceBack(he,he+3,he+2),se.vertexLength+=4,se.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,C,{},$)}}function I_(p,h){for(let y=0;y1){if(R_(p,h))return!0;for(let C=0;C1?y:y.sub(h)._mult($)._add(h))}function i1(p,h){let y,C,$,V=!1;for(let U=0;Uh.y!=$.y>h.y&&h.x<($.x-C.x)*(h.y-C.y)/($.y-C.y)+C.x&&(V=!V)}return V}function $m(p,h){let y=!1;for(let C=0,$=p.length-1;Ch.y!=U.y>h.y&&h.x<(U.x-V.x)*(h.y-V.y)/(U.y-V.y)+V.x&&(y=!y)}return y}function GE(p,h,y){const C=y[0],$=y[2];if(p.x$.x&&h.x>$.x||p.y$.y&&h.y>$.y)return!1;const V=ve(p,h,y[0]);return V!==ve(p,h,y[1])||V!==ve(p,h,y[2])||V!==ve(p,h,y[3])}function Om(p,h,y){const C=h.paint.get(p).value;return C.kind==="constant"?C.value:y.programConfigurations.get(h.id).getMaxValue(p)}function g9(p){return Math.sqrt(p[0]*p[0]+p[1]*p[1])}function y9(p,h,y,C,$){if(!h[0]&&!h[1])return p;const V=f.convert(h)._mult($);y==="viewport"&&V._rotate(-C);const U=[];for(let q=0;qDm(ht,Ne))}(se,J),Re=ye?he*q:he;for(const De of $)for(const Ne of De){const ht=ye?Ne:Dm(Ne,J);let gt=Re;const er=_9([],[Ne.x,Ne.y,0,1],J);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?gt*=er[3]/U.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(gt*=U.cameraToCenterDistance/er[3]),VE(Ee,ht,gt))return!0}return!1}}function Dm(p,h){const y=_9([],[p.x,p.y,0,1],h);return new f(y[0]/y[3],y[1]/y[3])}class $7 extends p9{}let O7;Hn("HeatmapBucket",$7,{omit:["layers"]});var iN={get paint(){return O7=O7||new z({"heatmap-radius":new Di(rt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Di(rt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ii(rt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tf(rt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ii(rt.paint_heatmap["heatmap-opacity"])})}};function w9(p,{width:h,height:y},C,$){if($){if($ instanceof Uint8ClampedArray)$=new Uint8Array($.buffer);else if($.length!==h*y*C)throw new RangeError(`mismatched image size. expected: ${$.length} but got: ${h*y*C}`)}else $=new Uint8Array(h*y*C);return p.width=h,p.height=y,p.data=$,p}function Fm(p,{width:h,height:y},C){if(h===p.width&&y===p.height)return;const $=w9({},{width:h,height:y},C);zm(p,$,{x:0,y:0},{x:0,y:0},{width:Math.min(p.width,h),height:Math.min(p.height,y)},C),p.width=h,p.height=y,p.data=$.data}function zm(p,h,y,C,$,V){if($.width===0||$.height===0)return h;if($.width>p.width||$.height>p.height||y.x>p.width-$.width||y.y>p.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>h.width||$.height>h.height||C.x>h.width-$.width||C.y>h.height-$.height)throw new RangeError("out of range destination coordinates for image copy");const U=p.data,q=h.data;if(U===q)throw new Error("srcData equals dstData, so image is already copied");for(let J=0;J<$.height;J++){const se=((y.y+J)*p.width+y.x)*V,he=((C.y+J)*h.width+C.x)*V;for(let ye=0;ye<$.width*V;ye++)q[he+ye]=U[se+ye]}return h}class L_{constructor(h,y){w9(this,h,1,y)}resize(h){Fm(this,h,1)}clone(){return new L_({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(h,y,C,$,V){zm(h,y,C,$,V,1)}}class oh{constructor(h,y){w9(this,h,4,y)}resize(h){Fm(this,h,4)}replace(h,y){y?this.data.set(h):this.data=h instanceof Uint8ClampedArray?new Uint8Array(h.buffer):h}clone(){return new oh({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(h,y,C,$,V){zm(h,y,C,$,V,4)}}function N7(p){const h={},y=p.resolution||256,C=p.clips?p.clips.length:1,$=p.image||new oh({width:y,height:C});if(Math.log(y)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${y}`);const V=(U,q,J)=>{h[p.evaluationKey]=J;const se=p.expression.evaluate(h);$.data[U+q+0]=Math.floor(255*se.r/se.a),$.data[U+q+1]=Math.floor(255*se.g/se.a),$.data[U+q+2]=Math.floor(255*se.b/se.a),$.data[U+q+3]=Math.floor(255*se.a)};if(p.clips)for(let U=0,q=0;U80*y){q=1/0,J=1/0;let he=-1/0,ye=-1/0;for(let Ee=y;Ee<$;Ee+=y){const Re=p[Ee],De=p[Ee+1];Rehe&&(he=Re),De>ye&&(ye=De)}se=Math.max(he-q,ye-J),se=se!==0?32767/se:0}return P_(V,U,y,q,J,se,0),U}function F7(p,h,y,C,$){let V;if($===function(U,q,J,se){let he=0;for(let ye=q,Ee=J-se;ye0)for(let U=h;U=h;U-=C)V=eM(U/C|0,p[U],p[U+1],V);return V&&Bm(V,V.next)&&(Hm(V),V=V.next),V}function s1(p,h){if(!p)return p;h||(h=p);let y,C=p;do if(y=!1,C.steiner||!Bm(C,C.next)&&wa(C.prev,C,C.next)!==0)C=C.next;else{if(Hm(C),C=h=C.prev,C===C.next)break;y=!0}while(y||C!==h);return h}function P_(p,h,y,C,$,V,U){if(!p)return;!U&&V&&function(J,se,he,ye){let Ee=J;do Ee.z===0&&(Ee.z=z7(Ee.x,Ee.y,se,he,ye)),Ee.prevZ=Ee.prev,Ee.nextZ=Ee.next,Ee=Ee.next;while(Ee!==J);Ee.prevZ.nextZ=null,Ee.prevZ=null,function(Re){let De,Ne=1;do{let ht,gt=Re;Re=null;let er=null;for(De=0;gt;){De++;let Bt=gt,jt=0;for(let Vr=0;Vr0||fr>0&&Bt;)jt!==0&&(fr===0||!Bt||gt.z<=Bt.z)?(ht=gt,gt=gt.nextZ,jt--):(ht=Bt,Bt=Bt.nextZ,fr--),er?er.nextZ=ht:Re=ht,ht.prevZ=er,er=ht;gt=Bt}er.nextZ=null,Ne*=2}while(De>1)}(Ee)}(p,C,$,V);let q=p;for(;p.prev!==p.next;){const J=p.prev,se=p.next;if(V?o1(p,C,$,V):XE(p))h.push(J.i,p.i,se.i),Hm(p),p=se.next,q=se.next;else if((p=se)===q){U?U===1?P_(p=JE(s1(p),h),h,y,C,$,V,2):U===2&&KE(p,h,y,C,$,V):P_(s1(p),h,y,C,$,V,1);break}}}function XE(p){const h=p.prev,y=p,C=p.next;if(wa(h,y,C)>=0)return!1;const $=h.x,V=y.x,U=C.x,q=h.y,J=y.y,se=C.y,he=$V?$>U?$:U:V>U?V:U,Re=q>J?q>se?q:se:J>se?J:se;let De=C.next;for(;De!==h;){if(De.x>=he&&De.x<=Ee&&De.y>=ye&&De.y<=Re&&y0($,q,V,J,U,se,De.x,De.y)&&wa(De.prev,De,De.next)>=0)return!1;De=De.next}return!0}function o1(p,h,y,C){const $=p.prev,V=p,U=p.next;if(wa($,V,U)>=0)return!1;const q=$.x,J=V.x,se=U.x,he=$.y,ye=V.y,Ee=U.y,Re=qJ?q>se?q:se:J>se?J:se,ht=he>ye?he>Ee?he:Ee:ye>Ee?ye:Ee,gt=z7(Re,De,h,y,C),er=z7(Ne,ht,h,y,C);let Bt=p.prevZ,jt=p.nextZ;for(;Bt&&Bt.z>=gt&&jt&&jt.z<=er;){if(Bt.x>=Re&&Bt.x<=Ne&&Bt.y>=De&&Bt.y<=ht&&Bt!==$&&Bt!==U&&y0(q,he,J,ye,se,Ee,Bt.x,Bt.y)&&wa(Bt.prev,Bt,Bt.next)>=0||(Bt=Bt.prevZ,jt.x>=Re&&jt.x<=Ne&&jt.y>=De&&jt.y<=ht&&jt!==$&&jt!==U&&y0(q,he,J,ye,se,Ee,jt.x,jt.y)&&wa(jt.prev,jt,jt.next)>=0))return!1;jt=jt.nextZ}for(;Bt&&Bt.z>=gt;){if(Bt.x>=Re&&Bt.x<=Ne&&Bt.y>=De&&Bt.y<=ht&&Bt!==$&&Bt!==U&&y0(q,he,J,ye,se,Ee,Bt.x,Bt.y)&&wa(Bt.prev,Bt,Bt.next)>=0)return!1;Bt=Bt.prevZ}for(;jt&&jt.z<=er;){if(jt.x>=Re&&jt.x<=Ne&&jt.y>=De&&jt.y<=ht&&jt!==$&&jt!==U&&y0(q,he,J,ye,se,Ee,jt.x,jt.y)&&wa(jt.prev,jt,jt.next)>=0)return!1;jt=jt.nextZ}return!0}function JE(p,h){let y=p;do{const C=y.prev,$=y.next.next;!Bm(C,$)&&jm(C,y,y.next,$)&&Um(C,$)&&Um($,C)&&(h.push(C.i,y.i,$.i),Hm(y),Hm(y.next),y=p=$),y=y.next}while(y!==p);return s1(y)}function KE(p,h,y,C,$,V){let U=p;do{let q=U.next.next;for(;q!==U.prev;){if(U.i!==q.i&&B7(U,q)){let J=v0(U,q);return U=s1(U,U.next),J=s1(J,J.next),P_(U,h,y,C,$,V,0),void P_(J,h,y,C,$,V,0)}q=q.next}U=U.next}while(U!==p)}function oN(p,h){return p.x-h.x}function QE(p,h){const y=function($,V){let U=V;const q=$.x,J=$.y;let se,he=-1/0;do{if(J<=U.y&&J>=U.next.y&&U.next.y!==U.y){const Ne=U.x+(J-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(Ne<=q&&Ne>he&&(he=Ne,se=U.x=U.x&&U.x>=Ee&&q!==U.x&&y0(Jse.x||U.x===se.x&&aN(se,U)))&&(se=U,De=Ne)}U=U.next}while(U!==ye);return se}(p,h);if(!y)return h;const C=v0(y,p);return s1(C,C.next),s1(y,y.next)}function aN(p,h){return wa(p.prev,p,h.prev)<0&&wa(h.next,p,p.next)<0}function z7(p,h,y,C,$){return(p=1431655765&((p=858993459&((p=252645135&((p=16711935&((p=(p-y)*$|0)|p<<8))|p<<4))|p<<2))|p<<1))|(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-C)*$|0)|h<<8))|h<<4))|h<<2))|h<<1))<<1}function a1(p){let h=p,y=p;do(h.x=(p-U)*(V-q)&&(p-U)*(C-q)>=(y-U)*(h-q)&&(y-U)*(V-q)>=($-U)*(C-q)}function B7(p,h){return p.next.i!==h.i&&p.prev.i!==h.i&&!function(y,C){let $=y;do{if($.i!==y.i&&$.next.i!==y.i&&$.i!==C.i&&$.next.i!==C.i&&jm($,$.next,y,C))return!0;$=$.next}while($!==y);return!1}(p,h)&&(Um(p,h)&&Um(h,p)&&function(y,C){let $=y,V=!1;const U=(y.x+C.x)/2,q=(y.y+C.y)/2;do $.y>q!=$.next.y>q&&$.next.y!==$.y&&U<($.next.x-$.x)*(q-$.y)/($.next.y-$.y)+$.x&&(V=!V),$=$.next;while($!==y);return V}(p,h)&&(wa(p.prev,p,h.prev)||wa(p,h.prev,h))||Bm(p,h)&&wa(p.prev,p,p.next)>0&&wa(h.prev,h,h.next)>0)}function wa(p,h,y){return(h.y-p.y)*(y.x-h.x)-(h.x-p.x)*(y.y-h.y)}function Bm(p,h){return p.x===h.x&&p.y===h.y}function jm(p,h,y,C){const $=Vm(wa(p,h,y)),V=Vm(wa(p,h,C)),U=Vm(wa(y,C,p)),q=Vm(wa(y,C,h));return $!==V&&U!==q||!($!==0||!Zi(p,y,h))||!(V!==0||!Zi(p,C,h))||!(U!==0||!Zi(y,p,C))||!(q!==0||!Zi(y,h,C))}function Zi(p,h,y){return h.x<=Math.max(p.x,y.x)&&h.x>=Math.min(p.x,y.x)&&h.y<=Math.max(p.y,y.y)&&h.y>=Math.min(p.y,y.y)}function Vm(p){return p>0?1:p<0?-1:0}function Um(p,h){return wa(p.prev,p,p.next)<0?wa(p,h,p.next)>=0&&wa(p,p.prev,h)>=0:wa(p,h,p.prev)<0||wa(p,p.next,h)<0}function v0(p,h){const y=C9(p.i,p.x,p.y),C=C9(h.i,h.x,h.y),$=p.next,V=h.prev;return p.next=h,h.prev=p,y.next=$,$.prev=y,C.next=y,y.prev=C,V.next=C,C.prev=V,C}function eM(p,h,y,C){const $=C9(p,h,y);return C?($.next=C.next,$.prev=C,C.next.prev=$,C.next=$):($.prev=$,$.next=$),$}function Hm(p){p.next.prev=p.prev,p.prev.next=p.next,p.prevZ&&(p.prevZ.nextZ=p.nextZ),p.nextZ&&(p.nextZ.prevZ=p.prevZ)}function C9(p,h,y){return{i:p,x:h,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function mu(p,h,y){const C=y.patternDependencies;let $=!1;for(const V of h){const U=V.paint.get(`${p}-pattern`);U.isConstant()||($=!0);const q=U.constantOr(null);q&&($=!0,C[q.to]=!0,C[q.from]=!0)}return $}function j7(p,h,y,C,$){const V=$.patternDependencies;for(const U of h){const q=U.paint.get(`${p}-pattern`).value;if(q.kind!=="constant"){let J=q.evaluate({zoom:C-1},y,{},$.availableImages),se=q.evaluate({zoom:C},y,{},$.availableImages),he=q.evaluate({zoom:C+1},y,{},$.availableImages);J=J&&J.name?J.name:J,se=se&&se.name?se.name:se,he=he&&he.name?he.name:he,V[J]=!0,V[se]=!0,V[he]=!0,y.patterns[U.id]={min:J,mid:se,max:he}}}return y}class V7{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map(y=>y.id),this.index=h.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Qc,this.indexArray=new nh,this.indexArray2=new Yl,this.programConfigurations=new pu(h.layers,h.zoom),this.segments=new Fs,this.segments2=new Fs,this.stateDependentLayerIds=this.layers.filter(y=>y.isStateDependent()).map(y=>y.id)}populate(h,y,C){this.hasPattern=mu("fill",this.layers,y);const $=this.layers[0].layout.get("fill-sort-key"),V=!$.isConstant(),U=[];for(const{feature:q,id:J,index:se,sourceLayerIndex:he}of h){const ye=this.layers[0]._featureFilter.needGeometry,Ee=ih(q,ye);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),Ee,C))continue;const Re=V?$.evaluate(Ee,{},C,y.availableImages):void 0,De={id:J,properties:q.properties,type:q.type,sourceLayerIndex:he,index:se,geometry:ye?Ee.geometry:Xl(q),patterns:{},sortKey:Re};U.push(De)}V&&U.sort((q,J)=>q.sortKey-J.sortKey);for(const q of U){const{geometry:J,index:se,sourceLayerIndex:he}=q;if(this.hasPattern){const ye=j7("fill",this.layers,q,this.zoom,y);this.patternFeatures.push(ye)}else this.addFeature(q,J,se,C,{});y.featureIndex.insert(h[se].feature,J,se,he,this.index)}}update(h,y,C){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,y,this.stateDependentLayers,C)}addFeatures(h,y,C){for(const $ of this.patternFeatures)this.addFeature($,$.geometry,$.index,y,C)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,YE),this.indexBuffer=h.createIndexBuffer(this.indexArray),this.indexBuffer2=h.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(h,y,C,$,V){for(const U of Fn(y,500)){let q=0;for(const Re of U)q+=Re.length;const J=this.segments.prepareSegment(q,this.layoutVertexArray,this.indexArray),se=J.vertexLength,he=[],ye=[];for(const Re of U){if(Re.length===0)continue;Re!==U[0]&&ye.push(he.length/2);const De=this.segments2.prepareSegment(Re.length,this.layoutVertexArray,this.indexArray2),Ne=De.vertexLength;this.layoutVertexArray.emplaceBack(Re[0].x,Re[0].y),this.indexArray2.emplaceBack(Ne+Re.length-1,Ne),he.push(Re[0].x),he.push(Re[0].y);for(let ht=1;ht>3}if($--,C===1||C===2)V+=p.readSVarint(),U+=p.readSVarint(),C===1&&(h&&q.push(h),h=[]),h.push(new H7(V,U));else{if(C!==7)throw new Error("unknown command "+C);h&&h.push(h[0].clone())}}return h&&q.push(h),q},_0.prototype.bbox=function(){var p=this._pbf;p.pos=this._geometry;for(var h=p.readVarint()+p.pos,y=1,C=0,$=0,V=0,U=1/0,q=-1/0,J=1/0,se=-1/0;p.pos>3}if(C--,y===1||y===2)($+=p.readSVarint())q&&(q=$),(V+=p.readSVarint())se&&(se=V);else if(y!==7)throw new Error("unknown command "+y)}return[U,J,q,se]},_0.prototype.toGeoJSON=function(p,h,y){var C,$,V=this.extent*Math.pow(2,y),U=this.extent*p,q=this.extent*h,J=this.loadGeometry(),se=_0.types[this.type];function he(Re){for(var De=0;De>3;$=U===1?C.readString():U===2?C.readFloat():U===3?C.readDouble():U===4?C.readVarint64():U===5?C.readVarint():U===6?C.readSVarint():U===7?C.readBoolean():null}return $}(y))}q7.prototype.feature=function(p){if(p<0||p>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[p];var h=this._pbf.readVarint()+this._pbf.pos;return new $_(this._pbf,h,this.extent,this._keys,this._values)};var pN=G7;function mN(p,h,y){if(p===3){var C=new pN(y,y.readVarint()+y.pos);C.length&&(h[C.name]=C)}}ol.VectorTile=function(p,h){this.layers=p.readFields(mN,{},h)},ol.VectorTileFeature=nM,ol.VectorTileLayer=G7;const gN=ol.VectorTileFeature.types,S9=Math.pow(2,13);function ky(p,h,y,C,$,V,U,q){p.emplaceBack(h,y,2*Math.floor(C*S9)+U,$*S9*2,V*S9*2,Math.round(q))}class W7{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map(y=>y.id),this.index=h.index,this.hasPattern=!1,this.layoutVertexArray=new d0,this.centroidVertexArray=new du,this.indexArray=new nh,this.programConfigurations=new pu(h.layers,h.zoom),this.segments=new Fs,this.stateDependentLayerIds=this.layers.filter(y=>y.isStateDependent()).map(y=>y.id)}populate(h,y,C){this.features=[],this.hasPattern=mu("fill-extrusion",this.layers,y);for(const{feature:$,id:V,index:U,sourceLayerIndex:q}of h){const J=this.layers[0]._featureFilter.needGeometry,se=ih($,J);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),se,C))continue;const he={id:V,sourceLayerIndex:q,index:U,geometry:J?se.geometry:Xl($),properties:$.properties,type:$.type,patterns:{}};this.hasPattern?this.features.push(j7("fill-extrusion",this.layers,he,this.zoom,y)):this.addFeature(he,he.geometry,U,C,{}),y.featureIndex.insert($,he.geometry,U,q,this.index,!0)}}addFeatures(h,y,C){for(const $ of this.features){const{geometry:V}=$;this.addFeature($,V,$.index,y,C)}}update(h,y,C){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,y,this.stateDependentLayers,C)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,l1),this.centroidVertexBuffer=h.createVertexBuffer(this.centroidVertexArray,cN.members,!0),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(h,y,C,$,V){for(const U of Fn(y,500)){const q={x:0,y:0,vertexCount:0};let J=0;for(const De of U)J+=De.length;let se=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const De of U){if(De.length===0||iM(De))continue;let Ne=0;for(let ht=0;ht=1){const er=De[ht-1];if(!Z7(gt,er)){se.vertexLength+4>Fs.MAX_VERTEX_ARRAY_LENGTH&&(se=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Bt=gt.sub(er)._perp()._unit(),jt=er.dist(gt);Ne+jt>32768&&(Ne=0),ky(this.layoutVertexArray,gt.x,gt.y,Bt.x,Bt.y,0,0,Ne),ky(this.layoutVertexArray,gt.x,gt.y,Bt.x,Bt.y,0,1,Ne),q.x+=2*gt.x,q.y+=2*gt.y,q.vertexCount+=2,Ne+=jt,ky(this.layoutVertexArray,er.x,er.y,Bt.x,Bt.y,0,0,Ne),ky(this.layoutVertexArray,er.x,er.y,Bt.x,Bt.y,0,1,Ne),q.x+=2*er.x,q.y+=2*er.y,q.vertexCount+=2;const fr=se.vertexLength;this.indexArray.emplaceBack(fr,fr+2,fr+1),this.indexArray.emplaceBack(fr+1,fr+2,fr+3),se.vertexLength+=4,se.primitiveLength+=2}}}}if(se.vertexLength+J>Fs.MAX_VERTEX_ARRAY_LENGTH&&(se=this.segments.prepareSegment(J,this.layoutVertexArray,this.indexArray)),gN[h.type]!=="Polygon")continue;const he=[],ye=[],Ee=se.vertexLength;for(const De of U)if(De.length!==0){De!==U[0]&&ye.push(he.length/2);for(let Ne=0;NeRa)||p.y===h.y&&(p.y<0||p.y>Ra)}function iM(p){return p.every(h=>h.x<0)||p.every(h=>h.x>Ra)||p.every(h=>h.y<0)||p.every(h=>h.y>Ra)}let Ay;Hn("FillExtrusionBucket",W7,{omit:["layers","features"]});var Y7={get paint(){return Ay=Ay||new z({"fill-extrusion-opacity":new ii(rt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Di(rt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ii(rt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ii(rt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Sy(rt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Di(rt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Di(rt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ii(rt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class sM extends x{constructor(h){super(h,Y7)}createBucket(h){return new W7(h)}queryRadius(){return g9(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(h,y,C,$,V,U,q,J){const se=y9(h,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),U.angle,q),he=this.paint.get("fill-extrusion-height").evaluate(y,C),ye=this.paint.get("fill-extrusion-base").evaluate(y,C),Ee=function(De,Ne,ht,gt){const er=[];for(const Bt of De){const jt=[Bt.x,Bt.y,0,1];_9(jt,jt,Ne),er.push(new f(jt[0]/jt[3],jt[1]/jt[3]))}return er}(se,J),Re=function(De,Ne,ht,gt){const er=[],Bt=[],jt=gt[8]*Ne,fr=gt[9]*Ne,Vr=gt[10]*Ne,Rn=gt[11]*Ne,ki=gt[8]*ht,Pn=gt[9]*ht,Mn=gt[10]*ht,ai=gt[11]*ht;for(const Wn of De){const Vn=[],Ir=[];for(const fi of Wn){const oi=fi.x,Yi=fi.y,Do=gt[0]*oi+gt[4]*Yi+gt[12],ko=gt[1]*oi+gt[5]*Yi+gt[13],Bl=gt[2]*oi+gt[6]*Yi+gt[14],uh=gt[3]*oi+gt[7]*Yi+gt[15],yu=Bl+Vr,ll=uh+Rn,tc=Do+ki,rc=ko+Pn,nc=Bl+Mn,Bs=uh+ai,yo=new f((Do+jt)/ll,(ko+fr)/ll);yo.z=yu/ll,Vn.push(yo);const $u=new f(tc/Bs,rc/Bs);$u.z=nc/Bs,Ir.push($u)}er.push(Vn),Bt.push(Ir)}return[er,Bt]}($,ye,he,J);return function(De,Ne,ht){let gt=1/0;m9(ht,Ne)&&(gt=O_(ht,Ne[0]));for(let er=0;ery.id),this.index=h.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(y=>{this.gradients[y.id]={}}),this.layoutVertexArray=new Wf,this.layoutVertexArray2=new t1,this.indexArray=new nh,this.programConfigurations=new pu(h.layers,h.zoom),this.segments=new Fs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(y=>y.isStateDependent()).map(y=>y.id)}populate(h,y,C){this.hasPattern=mu("line",this.layers,y);const $=this.layers[0].layout.get("line-sort-key"),V=!$.isConstant(),U=[];for(const{feature:q,id:J,index:se,sourceLayerIndex:he}of h){const ye=this.layers[0]._featureFilter.needGeometry,Ee=ih(q,ye);if(!this.layers[0]._featureFilter.filter(new ra(this.zoom),Ee,C))continue;const Re=V?$.evaluate(Ee,{},C):void 0,De={id:J,properties:q.properties,type:q.type,sourceLayerIndex:he,index:se,geometry:ye?Ee.geometry:Xl(q),patterns:{},sortKey:Re};U.push(De)}V&&U.sort((q,J)=>q.sortKey-J.sortKey);for(const q of U){const{geometry:J,index:se,sourceLayerIndex:he}=q;if(this.hasPattern){const ye=j7("line",this.layers,q,this.zoom,y);this.patternFeatures.push(ye)}else this.addFeature(q,J,se,C,{});y.featureIndex.insert(h[se].feature,J,se,he,this.index)}}update(h,y,C){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,y,this.stateDependentLayers,C)}addFeatures(h,y,C){for(const $ of this.patternFeatures)this.addFeature($,$.geometry,$.index,y,C)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=h.createVertexBuffer(this.layoutVertexArray2,yN)),this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Xf),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(h){if(h.properties&&Object.prototype.hasOwnProperty.call(h.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(h.properties,"mapbox_clip_end"))return{start:+h.properties.mapbox_clip_start,end:+h.properties.mapbox_clip_end}}addFeature(h,y,C,$,V){const U=this.layers[0].layout,q=U.get("line-join").evaluate(h,{}),J=U.get("line-cap"),se=U.get("line-miter-limit"),he=U.get("line-round-limit");this.lineClips=this.lineFeatureClips(h);for(const ye of y)this.addLine(ye,h,q,J,se,he);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,C,V,$)}addLine(h,y,C,$,V,U){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let gt=0;gt=2&&h[J-1].equals(h[J-2]);)J--;let se=0;for(;se0;if(Rn&>>se){const ai=Ee.dist(Re);if(ai>2*he){const Wn=Ee.sub(Ee.sub(Re)._mult(he/ai)._round());this.updateDistance(Re,Wn),this.addCurrentVertex(Wn,Ne,0,0,ye),Re=Wn}}const Pn=Re&&De;let Mn=Pn?C:q?"butt":$;if(Pn&&Mn==="round"&&(frV&&(Mn="bevel"),Mn==="bevel"&&(fr>2&&(Mn="flipbevel"),fr100)er=ht.mult(-1);else{const ai=fr*Ne.add(ht).mag()/Ne.sub(ht).mag();er._perp()._mult(ai*(ki?-1:1))}this.addCurrentVertex(Ee,er,0,0,ye),this.addCurrentVertex(Ee,er.mult(-1),0,0,ye)}else if(Mn==="bevel"||Mn==="fakeround"){const ai=-Math.sqrt(fr*fr-1),Wn=ki?ai:0,Vn=ki?0:ai;if(Re&&this.addCurrentVertex(Ee,Ne,Wn,Vn,ye),Mn==="fakeround"){const Ir=Math.round(180*Vr/Math.PI/20);for(let fi=1;fi2*he){const Wn=Ee.add(De.sub(Ee)._mult(he/ai)._round());this.updateDistance(Ee,Wn),this.addCurrentVertex(Wn,ht,0,0,ye),Ee=Wn}}}}addCurrentVertex(h,y,C,$,V,U=!1){const q=y.y*$-y.x,J=-y.y-y.x*$;this.addHalfVertex(h,y.x+y.y*C,y.y-y.x*C,U,!1,C,V),this.addHalfVertex(h,q,J,U,!0,-$,V),this.distance>lM/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(h,y,C,$,V,U))}addHalfVertex({x:h,y},C,$,V,U,q,J){const se=.5*(this.lineClips?this.scaledDistance*(lM-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((h<<1)+(V?1:0),(y<<1)+(U?1:0),Math.round(63*C)+128,Math.round(63*$)+128,1+(q===0?0:q<0?-1:1)|(63&se)<<2,se>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const he=J.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,he),J.primitiveLength++),U?this.e2=he:this.e1=he}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(h,y){this.distance+=h.dist(y),this.updateScaledDistance()}}let uM,cM;Hn("LineBucket",X7,{omit:["layers","patternFeatures"]});var hM={get paint(){return cM=cM||new z({"line-opacity":new Di(rt.paint_line["line-opacity"]),"line-color":new Di(rt.paint_line["line-color"]),"line-translate":new ii(rt.paint_line["line-translate"]),"line-translate-anchor":new ii(rt.paint_line["line-translate-anchor"]),"line-width":new Di(rt.paint_line["line-width"]),"line-gap-width":new Di(rt.paint_line["line-gap-width"]),"line-offset":new Di(rt.paint_line["line-offset"]),"line-blur":new Di(rt.paint_line["line-blur"]),"line-dasharray":new Ey(rt.paint_line["line-dasharray"]),"line-pattern":new Sy(rt.paint_line["line-pattern"]),"line-gradient":new tf(rt.paint_line["line-gradient"])})},get layout(){return uM=uM||new z({"line-cap":new ii(rt.layout_line["line-cap"]),"line-join":new Di(rt.layout_line["line-join"]),"line-miter-limit":new ii(rt.layout_line["line-miter-limit"]),"line-round-limit":new ii(rt.layout_line["line-round-limit"]),"line-sort-key":new Di(rt.layout_line["line-sort-key"])})}};class _N extends Di{possiblyEvaluate(h,y){return y=new ra(Math.floor(y.zoom),{now:y.now,fadeDuration:y.fadeDuration,zoomHistory:y.zoomHistory,transition:y.transition}),super.possiblyEvaluate(h,y)}evaluate(h,y,C,$){return y=K({},y,{zoom:Math.floor(y.zoom)}),super.evaluate(h,y,C,$)}}let E9;class xN extends x{constructor(h){super(h,hM),this.gradientVersion=0,E9||(E9=new _N(hM.paint.properties["line-width"].specification),E9.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(h){if(h==="line-gradient"){const y=this.gradientExpression();this.stepInterpolant=!!function(C){return C._styleExpression!==void 0}(y)&&y._styleExpression.expression instanceof Nr,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(h,y){super.recalculate(h,y),this.paint._values["line-floorwidth"]=E9.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)}createBucket(h){return new X7(h)}queryRadius(h){const y=h,C=dM(Om("line-width",this,y),Om("line-gap-width",this,y)),$=Om("line-offset",this,y);return C/2+Math.abs($)+g9(this.paint.get("line-translate"))}queryIntersectsFeature(h,y,C,$,V,U,q){const J=y9(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),U.angle,q),se=q/2*dM(this.paint.get("line-width").evaluate(y,C),this.paint.get("line-gap-width").evaluate(y,C)),he=this.paint.get("line-offset").evaluate(y,C);return he&&($=function(ye,Ee){const Re=[];for(let De=0;De=3){for(let ht=0;ht0?h+2*p:p}const wN=X([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),fM=X([{name:"a_projected_pos",components:3,type:"Float32"}],4);X([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const pM=X([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);X([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const J7=X([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),bN=X([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function CN(p,h,y){return p.sections.forEach(C=>{C.text=function($,V,U){const q=V.layout.get("text-transform").evaluate(U,{});return q==="uppercase"?$=$.toLocaleUpperCase():q==="lowercase"&&($=$.toLocaleLowerCase()),Sc.applyArabicShaping&&($=Sc.applyArabicShaping($)),$}(C.text,h,y)}),p}X([{name:"triangle",components:3,type:"Uint16"}]),X([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),X([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),X([{type:"Float32",name:"offsetX"}]),X([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),X([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const N_={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var al=24,mM=Lo,gM=function(p,h,y,C,$){var V,U,q=8*$-C-1,J=(1<>1,he=-7,ye=$-1,Ee=-1,Re=p[h+ye];for(ye+=Ee,V=Re&(1<<-he)-1,Re>>=-he,he+=q;he>0;V=256*V+p[h+ye],ye+=Ee,he-=8);for(U=V&(1<<-he)-1,V>>=-he,he+=C;he>0;U=256*U+p[h+ye],ye+=Ee,he-=8);if(V===0)V=1-se;else{if(V===J)return U?NaN:1/0*(Re?-1:1);U+=Math.pow(2,C),V-=se}return(Re?-1:1)*U*Math.pow(2,V-C)},yM=function(p,h,y,C,$,V){var U,q,J,se=8*V-$-1,he=(1<>1,Ee=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,Re=0,De=1,Ne=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(q=isNaN(h)?1:0,U=he):(U=Math.floor(Math.log(h)/Math.LN2),h*(J=Math.pow(2,-U))<1&&(U--,J*=2),(h+=U+ye>=1?Ee/J:Ee*Math.pow(2,1-ye))*J>=2&&(U++,J/=2),U+ye>=he?(q=0,U=he):U+ye>=1?(q=(h*J-1)*Math.pow(2,$),U+=ye):(q=h*Math.pow(2,ye-1)*Math.pow(2,$),U=0));$>=8;p[y+Re]=255&q,Re+=De,q/=256,$-=8);for(U=U<<$|q,se+=$;se>0;p[y+Re]=255&U,Re+=De,U/=256,se-=8);p[y+Re-De]|=128*Ne};function Lo(p){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(p)?p:new Uint8Array(p||0),this.pos=0,this.type=0,this.length=this.buf.length}Lo.Varint=0,Lo.Fixed64=1,Lo.Bytes=2,Lo.Fixed32=5;var K7=4294967296,vM=1/K7,qh=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function u1(p){return p.type===Lo.Bytes?p.readVarint()+p.pos:p.pos+1}function $y(p,h,y){return y?4294967296*h+(p>>>0):4294967296*(h>>>0)+(p>>>0)}function _M(p,h,y){var C=h<=16383?1:h<=2097151?2:h<=268435455?3:Math.floor(Math.log(h)/(7*Math.LN2));y.realloc(C);for(var $=y.pos-1;$>=p;$--)y.buf[$+C]=y.buf[$]}function xM(p,h){for(var y=0;y>>8,p[y+2]=h>>>16,p[y+3]=h>>>24}function wM(p,h){return(p[h]|p[h+1]<<8|p[h+2]<<16)+(p[h+3]<<24)}Lo.prototype={destroy:function(){this.buf=null},readFields:function(p,h,y){for(y=y||this.length;this.pos>3,V=this.pos;this.type=7&C,p($,h,this),this.pos===V&&this.skip(C)}return h},readMessage:function(p,h){return this.readFields(p,h,this.readVarint()+this.pos)},readFixed32:function(){var p=M9(this.buf,this.pos);return this.pos+=4,p},readSFixed32:function(){var p=wM(this.buf,this.pos);return this.pos+=4,p},readFixed64:function(){var p=M9(this.buf,this.pos)+M9(this.buf,this.pos+4)*K7;return this.pos+=8,p},readSFixed64:function(){var p=M9(this.buf,this.pos)+wM(this.buf,this.pos+4)*K7;return this.pos+=8,p},readFloat:function(){var p=gM(this.buf,this.pos,!0,23,4);return this.pos+=4,p},readDouble:function(){var p=gM(this.buf,this.pos,!0,52,8);return this.pos+=8,p},readVarint:function(p){var h,y,C=this.buf;return h=127&(y=C[this.pos++]),y<128?h:(h|=(127&(y=C[this.pos++]))<<7,y<128?h:(h|=(127&(y=C[this.pos++]))<<14,y<128?h:(h|=(127&(y=C[this.pos++]))<<21,y<128?h:function($,V,U){var q,J,se=U.buf;if(q=(112&(J=se[U.pos++]))>>4,J<128||(q|=(127&(J=se[U.pos++]))<<3,J<128)||(q|=(127&(J=se[U.pos++]))<<10,J<128)||(q|=(127&(J=se[U.pos++]))<<17,J<128)||(q|=(127&(J=se[U.pos++]))<<24,J<128)||(q|=(1&(J=se[U.pos++]))<<31,J<128))return $y($,q,V);throw new Error("Expected varint not more than 10 bytes")}(h|=(15&(y=C[this.pos]))<<28,p,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var p=this.readVarint();return p%2==1?(p+1)/-2:p/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var p=this.readVarint()+this.pos,h=this.pos;return this.pos=p,p-h>=12&&qh?function(y,C,$){return qh.decode(y.subarray(C,$))}(this.buf,h,p):function(y,C,$){for(var V="",U=C;U<$;){var q,J,se,he=y[U],ye=null,Ee=he>239?4:he>223?3:he>191?2:1;if(U+Ee>$)break;Ee===1?he<128&&(ye=he):Ee===2?(192&(q=y[U+1]))==128&&(ye=(31&he)<<6|63&q)<=127&&(ye=null):Ee===3?(J=y[U+2],(192&(q=y[U+1]))==128&&(192&J)==128&&((ye=(15&he)<<12|(63&q)<<6|63&J)<=2047||ye>=55296&&ye<=57343)&&(ye=null)):Ee===4&&(J=y[U+2],se=y[U+3],(192&(q=y[U+1]))==128&&(192&J)==128&&(192&se)==128&&((ye=(15&he)<<18|(63&q)<<12|(63&J)<<6|63&se)<=65535||ye>=1114112)&&(ye=null)),ye===null?(ye=65533,Ee=1):ye>65535&&(ye-=65536,V+=String.fromCharCode(ye>>>10&1023|55296),ye=56320|1023&ye),V+=String.fromCharCode(ye),U+=Ee}return V}(this.buf,h,p)},readBytes:function(){var p=this.readVarint()+this.pos,h=this.buf.subarray(this.pos,p);return this.pos=p,h},readPackedVarint:function(p,h){if(this.type!==Lo.Bytes)return p.push(this.readVarint(h));var y=u1(this);for(p=p||[];this.pos127;);else if(h===Lo.Bytes)this.pos=this.readVarint()+this.pos;else if(h===Lo.Fixed32)this.pos+=4;else{if(h!==Lo.Fixed64)throw new Error("Unimplemented type: "+h);this.pos+=8}},writeTag:function(p,h){this.writeVarint(p<<3|h)},realloc:function(p){for(var h=this.length||16;h268435455||p<0?function(h,y){var C,$;if(h>=0?(C=h%4294967296|0,$=h/4294967296|0):($=~(-h/4294967296),4294967295^(C=~(-h%4294967296))?C=C+1|0:(C=0,$=$+1|0)),h>=18446744073709552e3||h<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");y.realloc(10),function(V,U,q){q.buf[q.pos++]=127&V|128,V>>>=7,q.buf[q.pos++]=127&V|128,V>>>=7,q.buf[q.pos++]=127&V|128,V>>>=7,q.buf[q.pos++]=127&V|128,q.buf[q.pos]=127&(V>>>=7)}(C,0,y),function(V,U){var q=(7&V)<<4;U.buf[U.pos++]|=q|((V>>>=3)?128:0),V&&(U.buf[U.pos++]=127&V|((V>>>=7)?128:0),V&&(U.buf[U.pos++]=127&V|((V>>>=7)?128:0),V&&(U.buf[U.pos++]=127&V|((V>>>=7)?128:0),V&&(U.buf[U.pos++]=127&V|((V>>>=7)?128:0),V&&(U.buf[U.pos++]=127&V)))))}($,y)}(p,this):(this.realloc(4),this.buf[this.pos++]=127&p|(p>127?128:0),p<=127||(this.buf[this.pos++]=127&(p>>>=7)|(p>127?128:0),p<=127||(this.buf[this.pos++]=127&(p>>>=7)|(p>127?128:0),p<=127||(this.buf[this.pos++]=p>>>7&127))))},writeSVarint:function(p){this.writeVarint(p<0?2*-p-1:2*p)},writeBoolean:function(p){this.writeVarint(!!p)},writeString:function(p){p=String(p),this.realloc(4*p.length),this.pos++;var h=this.pos;this.pos=function(C,$,V){for(var U,q,J=0;J<$.length;J++){if((U=$.charCodeAt(J))>55295&&U<57344){if(!q){U>56319||J+1===$.length?(C[V++]=239,C[V++]=191,C[V++]=189):q=U;continue}if(U<56320){C[V++]=239,C[V++]=191,C[V++]=189,q=U;continue}U=q-55296<<10|U-56320|65536,q=null}else q&&(C[V++]=239,C[V++]=191,C[V++]=189,q=null);U<128?C[V++]=U:(U<2048?C[V++]=U>>6|192:(U<65536?C[V++]=U>>12|224:(C[V++]=U>>18|240,C[V++]=U>>12&63|128),C[V++]=U>>6&63|128),C[V++]=63&U|128)}return V}(this.buf,p,this.pos);var y=this.pos-h;y>=128&&_M(h,y,this),this.pos=h-1,this.writeVarint(y),this.pos+=y},writeFloat:function(p){this.realloc(4),yM(this.buf,p,this.pos,!0,23,4),this.pos+=4},writeDouble:function(p){this.realloc(8),yM(this.buf,p,this.pos,!0,52,8),this.pos+=8},writeBytes:function(p){var h=p.length;this.writeVarint(h),this.realloc(h);for(var y=0;y=128&&_M(y,C,this),this.pos=y-1,this.writeVarint(C),this.pos+=C},writeMessage:function(p,h,y){this.writeTag(p,Lo.Bytes),this.writeRawMessage(h,y)},writePackedVarint:function(p,h){h.length&&this.writeMessage(p,xM,h)},writePackedSVarint:function(p,h){h.length&&this.writeMessage(p,SN,h)},writePackedBoolean:function(p,h){h.length&&this.writeMessage(p,TN,h)},writePackedFloat:function(p,h){h.length&&this.writeMessage(p,EN,h)},writePackedDouble:function(p,h){h.length&&this.writeMessage(p,MN,h)},writePackedFixed32:function(p,h){h.length&&this.writeMessage(p,Q7,h)},writePackedSFixed32:function(p,h){h.length&&this.writeMessage(p,IN,h)},writePackedFixed64:function(p,h){h.length&&this.writeMessage(p,RN,h)},writePackedSFixed64:function(p,h){h.length&&this.writeMessage(p,LN,h)},writeBytesField:function(p,h){this.writeTag(p,Lo.Bytes),this.writeBytes(h)},writeFixed32Field:function(p,h){this.writeTag(p,Lo.Fixed32),this.writeFixed32(h)},writeSFixed32Field:function(p,h){this.writeTag(p,Lo.Fixed32),this.writeSFixed32(h)},writeFixed64Field:function(p,h){this.writeTag(p,Lo.Fixed64),this.writeFixed64(h)},writeSFixed64Field:function(p,h){this.writeTag(p,Lo.Fixed64),this.writeSFixed64(h)},writeVarintField:function(p,h){this.writeTag(p,Lo.Varint),this.writeVarint(h)},writeSVarintField:function(p,h){this.writeTag(p,Lo.Varint),this.writeSVarint(h)},writeStringField:function(p,h){this.writeTag(p,Lo.Bytes),this.writeString(h)},writeFloatField:function(p,h){this.writeTag(p,Lo.Fixed32),this.writeFloat(h)},writeDoubleField:function(p,h){this.writeTag(p,Lo.Fixed64),this.writeDouble(h)},writeBooleanField:function(p,h){this.writeVarintField(p,!!h)}};var e8=l(mM);const t8=3;function kN(p,h,y){p===1&&y.readMessage(AN,h)}function AN(p,h,y){if(p===3){const{id:C,bitmap:$,width:V,height:U,left:q,top:J,advance:se}=y.readMessage(PN,{});h.push({id:C,bitmap:new L_({width:V+2*t8,height:U+2*t8},$),metrics:{width:V,height:U,left:q,top:J,advance:se}})}}function PN(p,h,y){p===1?h.id=y.readVarint():p===2?h.bitmap=y.readBytes():p===3?h.width=y.readVarint():p===4?h.height=y.readVarint():p===5?h.left=y.readSVarint():p===6?h.top=y.readSVarint():p===7&&(h.advance=y.readVarint())}const bM=t8;function CM(p){let h=0,y=0;for(const U of p)h+=U.w*U.h,y=Math.max(y,U.w);p.sort((U,q)=>q.h-U.h);const C=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),y),h:1/0}];let $=0,V=0;for(const U of p)for(let q=C.length-1;q>=0;q--){const J=C[q];if(!(U.w>J.w||U.h>J.h)){if(U.x=J.x,U.y=J.y,V=Math.max(V,U.y+U.h),$=Math.max($,U.x+U.w),U.w===J.w&&U.h===J.h){const se=C.pop();q=0&&C>=h&&z_[this.text.charCodeAt(C)];C--)y--;this.text=this.text.substring(h,y),this.sectionIndex=this.sectionIndex.slice(h,y)}substring(h,y){const C=new Ny;return C.text=this.text.substring(h,y),C.sectionIndex=this.sectionIndex.slice(h,y),C.sections=this.sections,C}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((h,y)=>Math.max(h,this.sections[y].scale),0)}addTextSection(h,y){this.text+=h.text,this.sections.push(F_.forText(h.scale,h.fontStack||y));const C=this.sections.length-1;for(let $=0;$=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Dy(p,h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De){const Ne=Ny.fromFeature(p,$);let ht;ye===o.ah.vertical&&Ne.verticalizePunctuation();const{processBidirectionalText:gt,processStyledBidirectionalText:er}=Sc;if(gt&&Ne.sections.length===1){ht=[];const fr=gt(Ne.toString(),n8(Ne,se,V,h,C,Re));for(const Vr of fr){const Rn=new Ny;Rn.text=Vr,Rn.sections=Ne.sections;for(let ki=0;ki0&&hh>Jl&&(Jl=hh)}else{const Zh=Rn[so.fontStack],Kl=Zh&&Zh[na];if(Kl&&Kl.rect)Wm=Kl.rect,Ca=Kl.metrics;else{const hh=Vr[so.fontStack],q_=hh&&hh[na];if(!q_)continue;Ca=q_.metrics}ch=(yo-so.scale)*al}Ed?(fr.verticalizable=!0,ic.push({glyph:na,imageName:sf,x:Yi,y:Do+ch,vertical:Ed,scale:so.scale,fontStack:so.fontStack,sectionIndex:Fo,metrics:Ca,rect:Wm}),Yi+=Qf*so.scale+Ir):(ic.push({glyph:na,imageName:sf,x:Yi,y:Do+ch,vertical:Ed,scale:so.scale,fontStack:so.fontStack,sectionIndex:Fo,metrics:Ca,rect:Wm}),Yi+=Ca.advance*so.scale+Ir)}ic.length!==0&&(ko=Math.max(Yi-Ir,ko),DN(ic,0,ic.length-1,uh,Jl)),Yi=0;const Wh=Mn*yo+Jl;vu.lineOffset=Math.max(Jl,$u),Do+=Wh,Bl=Math.max(Wh,Bl),++yu}var ll;const tc=Do-D_,{horizontalAlign:rc,verticalAlign:nc}=T9(ai);(function(Bs,yo,$u,vu,ic,Jl,Wh,Ic,so){const Fo=(yo-$u)*ic;let na=0;na=Jl!==Wh?-Ic*vu-D_:(-vu*so+.5)*Wh;for(const ch of Bs)for(const Ca of ch.positionedGlyphs)Ca.x+=Fo,Ca.y+=na})(fr.positionedLines,uh,rc,nc,ko,Bl,Mn,tc,Pn.length),fr.top+=-nc*tc,fr.bottom=fr.top+tc,fr.left+=-rc*ko,fr.right=fr.left+ko}(jt,h,y,C,ht,U,q,J,ye,se,Ee,De),!function(fr){for(const Vr of fr)if(Vr.positionedGlyphs.length!==0)return!1;return!0}(Bt)&&jt}const z_={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},$N={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},ON={40:!0};function EM(p,h,y,C,$,V){if(h.imageName){const U=C[h.imageName];return U?U.displaySize[0]*h.scale*al/V+$:0}{const U=y[h.fontStack],q=U&&U[p];return q?q.metrics.advance*h.scale+$:0}}function MM(p,h,y,C){const $=Math.pow(p-h,2);return C?p=0;let se=0;for(let ye=0;yese){const he=Math.ceil(V/se);$*=he/U,U=he}return{x1:C,y1:$,x2:C+V,y2:$+U}}function LM(p,h,y,C,$,V){const U=p.image;let q;if(U.content){const ht=U.content,gt=U.pixelRatio||1;q=[ht[0]/gt,ht[1]/gt,U.displaySize[0]-ht[2]/gt,U.displaySize[1]-ht[3]/gt]}const J=h.left*V,se=h.right*V;let he,ye,Ee,Re;y==="width"||y==="both"?(Re=$[0]+J-C[3],ye=$[0]+se+C[1]):(Re=$[0]+(J+se-U.displaySize[0])/2,ye=Re+U.displaySize[0]);const De=h.top*V,Ne=h.bottom*V;return y==="height"||y==="both"?(he=$[1]+De-C[0],Ee=$[1]+Ne+C[2]):(he=$[1]+(De+Ne-U.displaySize[1])/2,Ee=he+U.displaySize[1]),{image:U,top:he,right:ye,bottom:Ee,left:Re,collisionPadding:q}}const B_=255,Jf=128,w0=B_*Jf;function kM(p,h){const{expression:y}=h;if(y.kind==="constant")return{kind:"constant",layoutSize:y.evaluate(new ra(p+1))};if(y.kind==="source")return{kind:"source"};{const{zoomStops:C,interpolationType:$}=y;let V=0;for(;VU.id),this.index=h.index,this.pixelRatio=h.pixelRatio,this.sourceLayerIndex=h.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=v9([]),this.placementViewportMatrix=v9([]);const y=this.layers[0]._unevaluatedLayout._values;this.textSizeData=kM(this.zoom,y["text-size"]),this.iconSizeData=kM(this.zoom,y["icon-size"]);const C=this.layers[0].layout,$=C.get("symbol-sort-key"),V=C.get("symbol-z-order");this.canOverlap=i8(C,"text-overlap","text-allow-overlap")!=="never"||i8(C,"icon-overlap","icon-allow-overlap")!=="never"||C.get("text-ignore-placement")||C.get("icon-ignore-placement"),this.sortFeaturesByKey=V!=="viewport-y"&&!$.isConstant(),this.sortFeaturesByY=(V==="viewport-y"||V==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,C.get("symbol-placement")==="point"&&(this.writingModes=C.get("text-writing-mode").map(U=>o.ah[U])),this.stateDependentLayerIds=this.layers.filter(U=>U.isStateDependent()).map(U=>U.id),this.sourceID=h.sourceID}createArrays(){this.text=new o8(new pu(this.layers,this.zoom,h=>/^text/.test(h))),this.icon=new o8(new pu(this.layers,this.zoom,h=>/^icon/.test(h))),this.glyphOffsetArray=new Ro,this.lineVertexArray=new Ia,this.symbolInstances=new Cs,this.textAnchorOffsets=new Is}calculateGlyphDependencies(h,y,C,$,V){for(let U=0;U0)&&(U.value.kind!=="constant"||U.value.value.length>0),he=J.value.kind!=="constant"||!!J.value.value||Object.keys(J.parameters).length>0,ye=V.get("symbol-sort-key");if(this.features=[],!se&&!he)return;const Ee=y.iconDependencies,Re=y.glyphDependencies,De=y.availableImages,Ne=new ra(this.zoom);for(const{feature:ht,id:gt,index:er,sourceLayerIndex:Bt}of h){const jt=$._featureFilter.needGeometry,fr=ih(ht,jt);if(!$._featureFilter.filter(Ne,fr,C))continue;let Vr,Rn;if(jt||(fr.geometry=Xl(ht)),se){const Pn=$.getValueAndResolveTokens("text-field",fr,C,De),Mn=$n.factory(Pn),ai=this.hasRTLText=this.hasRTLText||BN(Mn);(!ai||Sc.getRTLTextPluginStatus()==="unavailable"||ai&&Sc.isParsed())&&(Vr=CN(Mn,$,fr))}if(he){const Pn=$.getValueAndResolveTokens("icon-image",fr,C,De);Rn=Pn instanceof Xs?Pn:Xs.fromString(Pn)}if(!Vr&&!Rn)continue;const ki=this.sortFeaturesByKey?ye.evaluate(fr,{},C):void 0;if(this.features.push({id:gt,text:Vr,icon:Rn,index:er,sourceLayerIndex:Bt,geometry:fr.geometry,properties:ht.properties,type:FN[ht.type],sortKey:ki}),Rn&&(Ee[Rn.name]=!0),Vr){const Pn=U.evaluate(fr,{},C).join(","),Mn=V.get("text-rotation-alignment")!=="viewport"&&V.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(o.ah.vertical)>=0;for(const ai of Vr.sections)if(ai.image)Ee[ai.image.name]=!0;else{const Wn=Ge(Vr.toString()),Vn=ai.fontStack||Pn,Ir=Re[Vn]=Re[Vn]||{};this.calculateGlyphDependencies(ai.text,Ir,Mn,this.allowVerticalPlacement,Wn)}}}V.get("symbol-placement")==="line"&&(this.features=function(ht){const gt={},er={},Bt=[];let jt=0;function fr(Pn){Bt.push(ht[Pn]),jt++}function Vr(Pn,Mn,ai){const Wn=er[Pn];return delete er[Pn],er[Mn]=Wn,Bt[Wn].geometry[0].pop(),Bt[Wn].geometry[0]=Bt[Wn].geometry[0].concat(ai[0]),Wn}function Rn(Pn,Mn,ai){const Wn=gt[Mn];return delete gt[Mn],gt[Pn]=Wn,Bt[Wn].geometry[0].shift(),Bt[Wn].geometry[0]=ai[0].concat(Bt[Wn].geometry[0]),Wn}function ki(Pn,Mn,ai){const Wn=ai?Mn[0][Mn[0].length-1]:Mn[0][0];return`${Pn}:${Wn.x}:${Wn.y}`}for(let Pn=0;PnPn.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ht,gt)=>ht.sortKey-gt.sortKey)}update(h,y,C){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(h,y,this.layers,C),this.icon.programConfigurations.updatePaintArrays(h,y,this.layers,C))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(h){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(h),this.iconCollisionBox.upload(h)),this.text.upload(h,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(h,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(h,y){const C=this.lineVertexArray.length;if(h.segment!==void 0){let $=h.dist(y[h.segment+1]),V=h.dist(y[h.segment]);const U={};for(let q=h.segment+1;q=0;q--)U[q]={x:y[q].x,y:y[q].y,tileUnitDistanceFromAnchor:V},q>0&&(V+=y[q-1].dist(y[q]));for(let q=0;q0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(h,y){const C=h.placedSymbolArray.get(y),$=C.vertexStartIndex+4*C.numGlyphs;for(let V=C.vertexStartIndex;V<$;V+=4)h.indexArray.emplaceBack(V,V+1,V+2),h.indexArray.emplaceBack(V+1,V+2,V+3)}getSortedSymbolIndexes(h){if(this.sortedAngle===h&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const y=Math.sin(h),C=Math.cos(h),$=[],V=[],U=[];for(let q=0;q$[q]-$[J]||V[J]-V[q]),U}addToSortKeyRanges(h,y){const C=this.sortKeyRanges[this.sortKeyRanges.length-1];C&&C.sortKey===y?C.symbolInstanceEnd=h+1:this.sortKeyRanges.push({sortKey:y,symbolInstanceStart:h,symbolInstanceEnd:h+1})}sortFeatures(h){if(this.sortFeaturesByY&&this.sortedAngle!==h&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(h),this.sortedAngle=h,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const y of this.symbolInstanceIndexes){const C=this.symbolInstances.get(y);this.featureSortOrder.push(C.featureIndex),[C.rightJustifiedTextSymbolIndex,C.centerJustifiedTextSymbolIndex,C.leftJustifiedTextSymbolIndex].forEach(($,V,U)=>{$>=0&&U.indexOf($)===V&&this.addIndicesForPlacedSymbol(this.text,$)}),C.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,C.verticalPlacedTextSymbolIndex),C.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,C.placedIconSymbolIndex),C.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,C.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let AM,l8;Hn("SymbolBucket",Fy,{omit:["layers","collisionBoxArray","features","compareText"]}),Fy.MAX_GLYPHS=65535,Fy.addDynamicAttributes=s8;var L9={get paint(){return l8=l8||new z({"icon-opacity":new Di(rt.paint_symbol["icon-opacity"]),"icon-color":new Di(rt.paint_symbol["icon-color"]),"icon-halo-color":new Di(rt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(rt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(rt.paint_symbol["icon-halo-blur"]),"icon-translate":new ii(rt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ii(rt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(rt.paint_symbol["text-opacity"]),"text-color":new Di(rt.paint_symbol["text-color"],{runtimeType:lr,getOverride:p=>p.textColor,hasOverride:p=>!!p.textColor}),"text-halo-color":new Di(rt.paint_symbol["text-halo-color"]),"text-halo-width":new Di(rt.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(rt.paint_symbol["text-halo-blur"]),"text-translate":new ii(rt.paint_symbol["text-translate"]),"text-translate-anchor":new ii(rt.paint_symbol["text-translate-anchor"])})},get layout(){return AM=AM||new z({"symbol-placement":new ii(rt.layout_symbol["symbol-placement"]),"symbol-spacing":new ii(rt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ii(rt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(rt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ii(rt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ii(rt.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ii(rt.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ii(rt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ii(rt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ii(rt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(rt.layout_symbol["icon-size"]),"icon-text-fit":new ii(rt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ii(rt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(rt.layout_symbol["icon-image"]),"icon-rotate":new Di(rt.layout_symbol["icon-rotate"]),"icon-padding":new Di(rt.layout_symbol["icon-padding"]),"icon-keep-upright":new ii(rt.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(rt.layout_symbol["icon-offset"]),"icon-anchor":new Di(rt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ii(rt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ii(rt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ii(rt.layout_symbol["text-rotation-alignment"]),"text-field":new Di(rt.layout_symbol["text-field"]),"text-font":new Di(rt.layout_symbol["text-font"]),"text-size":new Di(rt.layout_symbol["text-size"]),"text-max-width":new Di(rt.layout_symbol["text-max-width"]),"text-line-height":new ii(rt.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(rt.layout_symbol["text-letter-spacing"]),"text-justify":new Di(rt.layout_symbol["text-justify"]),"text-radial-offset":new Di(rt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ii(rt.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Di(rt.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Di(rt.layout_symbol["text-anchor"]),"text-max-angle":new ii(rt.layout_symbol["text-max-angle"]),"text-writing-mode":new ii(rt.layout_symbol["text-writing-mode"]),"text-rotate":new Di(rt.layout_symbol["text-rotate"]),"text-padding":new ii(rt.layout_symbol["text-padding"]),"text-keep-upright":new ii(rt.layout_symbol["text-keep-upright"]),"text-transform":new Di(rt.layout_symbol["text-transform"]),"text-offset":new Di(rt.layout_symbol["text-offset"]),"text-allow-overlap":new ii(rt.layout_symbol["text-allow-overlap"]),"text-overlap":new ii(rt.layout_symbol["text-overlap"]),"text-ignore-placement":new ii(rt.layout_symbol["text-ignore-placement"]),"text-optional":new ii(rt.layout_symbol["text-optional"])})}};class PM{constructor(h){if(h.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=h.property.overrides?h.property.overrides.runtimeType:ni,this.defaultValue=h}evaluate(h){if(h.formattedSection){const y=this.defaultValue.property.overrides;if(y&&y.hasOverride(h.formattedSection))return y.getOverride(h.formattedSection)}return h.feature&&h.featureState?this.defaultValue.evaluate(h.feature,h.featureState):this.defaultValue.property.specification.default}eachChild(h){this.defaultValue.isConstant()||h(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Hn("FormatSectionOverride",PM,{omit:["defaultValue"]});class k9 extends x{constructor(h){super(h,L9)}recalculate(h,y){if(super.recalculate(h,y),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const C=this.layout.get("text-writing-mode");if(C){const $=[];for(const V of C)$.indexOf(V)<0&&$.push(V);this.layout._values["text-writing-mode"]=$}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(h,y,C,$){const V=this.layout.get(h).evaluate(y,{},C,$),U=this._unevaluatedLayout._values[h];return U.isDataDriven()||k(U.value)||!V?V:function(q,J){return J.replace(/{([^{}]+)}/g,(se,he)=>q&&he in q?String(q[he]):"")}(y.properties,V)}createBucket(h){return new Fy(h)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const h of L9.paint.overridableProperties){if(!k9.hasPaintOverride(this.layout,h))continue;const y=this.paint.get(h),C=new PM(y),$=new w(C,y.property.specification);let V=null;V=y.value.kind==="constant"||y.value.kind==="source"?new te("source",$):new ue("composite",$,y.value.zoomStops),this.paint._values[h]=new zl(y.property,V,y.parameters)}}_handleOverridablePaintPropertyUpdate(h,y,C){return!(!this.layout||y.isDataDriven()||C.isDataDriven())&&k9.hasPaintOverride(this.layout,h)}static hasPaintOverride(h,y){const C=h.get("text-field"),$=L9.paint.properties[y];let V=!1;const U=q=>{for(const J of q)if($.overrides&&$.overrides.hasOverride(J))return void(V=!0)};if(C.value.kind==="constant"&&C.value.value instanceof $n)U(C.value.value.sections);else if(C.value.kind==="source"){const q=se=>{V||(se instanceof nl&&Zs(se.value)===Gi?U(se.value.sections):se instanceof _c?U(se.sections):se.eachChild(q))},J=C.value;J._styleExpression&&q(J._styleExpression.expression)}return V}}let $M;var jN={get paint(){return $M=$M||new z({"background-color":new ii(rt.paint_background["background-color"]),"background-pattern":new Ey(rt.paint_background["background-pattern"]),"background-opacity":new ii(rt.paint_background["background-opacity"])})}};class A9 extends x{constructor(h){super(h,jN)}}let OM;var VN={get paint(){return OM=OM||new z({"raster-opacity":new ii(rt.paint_raster["raster-opacity"]),"raster-hue-rotate":new ii(rt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ii(rt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ii(rt.paint_raster["raster-brightness-max"]),"raster-saturation":new ii(rt.paint_raster["raster-saturation"]),"raster-contrast":new ii(rt.paint_raster["raster-contrast"]),"raster-resampling":new ii(rt.paint_raster["raster-resampling"]),"raster-fade-duration":new ii(rt.paint_raster["raster-fade-duration"])})}};class UN extends x{constructor(h){super(h,VN)}}class HN extends x{constructor(h){super(h,{}),this.onAdd=y=>{this.implementation.onAdd&&this.implementation.onAdd(y,y.painter.context.gl)},this.onRemove=y=>{this.implementation.onRemove&&this.implementation.onRemove(y,y.painter.context.gl)},this.implementation=h}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class GN{constructor(h){this._methodToThrottle=h,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const u8=63710088e-1;class b0{constructor(h,y){if(isNaN(h)||isNaN(y))throw new Error(`Invalid LngLat object: (${h}, ${y})`);if(this.lng=+h,this.lat=+y,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new b0(re(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(h){const y=Math.PI/180,C=this.lat*y,$=h.lat*y,V=Math.sin(C)*Math.sin($)+Math.cos(C)*Math.cos($)*Math.cos((h.lng-this.lng)*y);return u8*Math.acos(Math.min(V,1))}static convert(h){if(h instanceof b0)return h;if(Array.isArray(h)&&(h.length===2||h.length===3))return new b0(Number(h[0]),Number(h[1]));if(!Array.isArray(h)&&typeof h=="object"&&h!==null)return new b0(Number("lng"in h?h.lng:h.lon),Number(h.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const NM=2*Math.PI*u8;function DM(p){return NM*Math.cos(p*Math.PI/180)}function FM(p){return(180+p)/360}function zM(p){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+p*Math.PI/360)))/360}function j_(p,h){return p/DM(h)}function c8(p){return 360/Math.PI*Math.atan(Math.exp((180-360*p)*Math.PI/180))-90}class zy{constructor(h,y,C=0){this.x=+h,this.y=+y,this.z=+C}static fromLngLat(h,y=0){const C=b0.convert(h);return new zy(FM(C.lng),zM(C.lat),j_(y,C.lat))}toLngLat(){return new b0(360*this.x-180,c8(this.y))}toAltitude(){return this.z*DM(c8(this.y))}meterInMercatorCoordinateUnits(){return 1/NM*(h=c8(this.y),1/Math.cos(h*Math.PI/180));var h}}function h8(p,h,y){var C=2*Math.PI*6378137/256/Math.pow(2,y);return[p*C-2*Math.PI*6378137/2,h*C-2*Math.PI*6378137/2]}class V_{constructor(h,y,C){if(!function($,V,U){return!($<0||$>25||U<0||U>=Math.pow(2,$)||V<0||V>=Math.pow(2,$))}(h,y,C))throw new Error(`x=${y}, y=${C}, z=${h} outside of bounds. 0<=x<${Math.pow(2,h)}, 0<=y<${Math.pow(2,h)} 0<=z<=25 `);this.z=h,this.x=y,this.y=C,this.key=By(0,h,h,y,C)}equals(h){return this.z===h.z&&this.x===h.x&&this.y===h.y}url(h,y,C){const $=(U=this.y,q=this.z,J=h8(256*(V=this.x),256*(U=Math.pow(2,q)-U-1),q),se=h8(256*(V+1),256*(U+1),q),J[0]+","+J[1]+","+se[0]+","+se[1]);var V,U,q,J,se;const he=function(ye,Ee,Re){let De,Ne="";for(let ht=ye;ht>0;ht--)De=1<1?"@2x":"").replace(/{quadkey}/g,he).replace(/{bbox-epsg-3857}/g,$)}isChildOf(h){const y=this.z-h.z;return y>0&&h.x===this.x>>y&&h.y===this.y>>y}getTilePoint(h){const y=Math.pow(2,this.z);return new f((h.x*y-this.x)*Ra,(h.y*y-this.y)*Ra)}toString(){return`${this.z}/${this.x}/${this.y}`}}class d8{constructor(h,y){this.wrap=h,this.canonical=y,this.key=By(h,y.z,y.z,y.x,y.y)}}class ah{constructor(h,y,C,$,V){if(h= z; overscaledZ = ${h}; z = ${C}`);this.overscaledZ=h,this.wrap=y,this.canonical=new V_(C,+$,+V),this.key=By(y,h,C,$,V)}clone(){return new ah(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(h){return this.overscaledZ===h.overscaledZ&&this.wrap===h.wrap&&this.canonical.equals(h.canonical)}scaledTo(h){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);const y=this.canonical.z-h;return h>this.canonical.z?new ah(h,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ah(h,this.wrap,h,this.canonical.x>>y,this.canonical.y>>y)}calculateScaledKey(h,y){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);const C=this.canonical.z-h;return h>this.canonical.z?By(this.wrap*+y,h,this.canonical.z,this.canonical.x,this.canonical.y):By(this.wrap*+y,h,h,this.canonical.x>>C,this.canonical.y>>C)}isChildOf(h){if(h.wrap!==this.wrap)return!1;const y=this.canonical.z-h.canonical.z;return h.overscaledZ===0||h.overscaledZ>y&&h.canonical.y===this.canonical.y>>y}children(h){if(this.overscaledZ>=h)return[new ah(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const y=this.canonical.z+1,C=2*this.canonical.x,$=2*this.canonical.y;return[new ah(y,this.wrap,y,C,$),new ah(y,this.wrap,y,C+1,$),new ah(y,this.wrap,y,C,$+1),new ah(y,this.wrap,y,C+1,$+1)]}isLessThan(h){return this.wraph.wrap)&&(this.overscaledZh.overscaledZ)&&(this.canonical.xh.canonical.x)&&this.canonical.ythis.max&&(this.max=ye),ye=this.dim+1||y<-1||y>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(y+1)*this.stride+(h+1)}unpack(h,y,C){return h*this.redFactor+y*this.greenFactor+C*this.blueFactor-this.baseShift}getPixels(){return new oh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(h,y,C){if(this.dim!==h.dim)throw new Error("dem dimension mismatch");let $=y*this.dim,V=y*this.dim+this.dim,U=C*this.dim,q=C*this.dim+this.dim;switch(y){case-1:$=V-1;break;case 1:V=$+1}switch(C){case-1:U=q-1;break;case 1:q=U+1}const J=-y*this.dim,se=-C*this.dim;for(let he=U;he=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${h} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[h]}}class jM{constructor(h,y,C,$,V){this.type="Feature",this._vectorTileFeature=h,h._z=y,h._x=C,h._y=$,this.properties=h.properties,this.id=V}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(h){this._geometry=h}toJSON(){const h={geometry:this.geometry};for(const y in this)y!=="_geometry"&&y!=="_vectorTileFeature"&&(h[y]=this[y]);return h}}class VM{constructor(h,y){this.tileID=h,this.x=h.canonical.x,this.y=h.canonical.y,this.z=h.canonical.z,this.grid=new Qd(Ra,16,0),this.grid3D=new Qd(Ra,16,0),this.featureIndexArray=new Au,this.promoteId=y}insert(h,y,C,$,V,U){const q=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(C,$,V);const J=U?this.grid3D:this.grid;for(let se=0;se=0&&ye[3]>=0&&J.insert(q,ye[0],ye[1],ye[2],ye[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ol.VectorTile(new e8(this.rawTileData)).layers,this.sourceLayerCoder=new BM(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(h,y,C,$){this.loadVTLayers();const V=h.params||{},U=Ra/h.tileSize/h.scale,q=rn(V.filter),J=h.queryGeometry,se=h.queryPadding*U,he=H_(J),ye=this.grid.query(he.minX-se,he.minY-se,he.maxX+se,he.maxY+se),Ee=H_(h.cameraQueryGeometry),Re=this.grid3D.query(Ee.minX-se,Ee.minY-se,Ee.maxX+se,Ee.maxY+se,(ht,gt,er,Bt)=>function(jt,fr,Vr,Rn,ki){for(const Mn of jt)if(fr<=Mn.x&&Vr<=Mn.y&&Rn>=Mn.x&&ki>=Mn.y)return!0;const Pn=[new f(fr,Vr),new f(fr,ki),new f(Rn,ki),new f(Rn,Vr)];if(jt.length>2){for(const Mn of Pn)if($m(jt,Mn))return!0}for(let Mn=0;Mn(Bt||(Bt=Xl(jt)),fr.queryIntersectsFeature(J,jt,Vr,Bt,this.z,h.transform,U,h.pixelPosMatrix)))}return De}loadMatchingFeature(h,y,C,$,V,U,q,J,se,he,ye){const Ee=this.bucketLayerIDs[y];if(U&&!function(ht,gt){for(let er=0;er=0)return!0;return!1}(U,Ee))return;const Re=this.sourceLayerCoder.decode(C),De=this.vtLayers[Re].feature($);if(V.needGeometry){const ht=ih(De,!0);if(!V.filter(new ra(this.tileID.overscaledZ),ht,this.tileID.canonical))return}else if(!V.filter(new ra(this.tileID.overscaledZ),De))return;const Ne=this.getId(De,Re);for(let ht=0;ht{const q=h instanceof km?h.get(U):null;return q&&q.evaluate?q.evaluate(y,C,$):q})}function H_(p){let h=1/0,y=1/0,C=-1/0,$=-1/0;for(const V of p)h=Math.min(h,V.x),y=Math.min(y,V.y),C=Math.max(C,V.x),$=Math.max($,V.y);return{minX:h,minY:y,maxX:C,maxY:$}}function qN(p,h){return h-p}function UM(p,h,y,C,$){const V=[];for(let U=0;U=C&&ye.x>=C||(he.x>=C?he=new f(C,he.y+(C-he.x)/(ye.x-he.x)*(ye.y-he.y))._round():ye.x>=C&&(ye=new f(C,he.y+(C-he.x)/(ye.x-he.x)*(ye.y-he.y))._round()),he.y>=$&&ye.y>=$||(he.y>=$?he=new f(he.x+($-he.y)/(ye.y-he.y)*(ye.x-he.x),$)._round():ye.y>=$&&(ye=new f(he.x+($-he.y)/(ye.y-he.y)*(ye.x-he.x),$)._round()),J&&he.equals(J[J.length-1])||(J=[he],V.push(J)),J.push(ye)))))}}return V}Hn("FeatureIndex",VM,{omit:["rawTileData","sourceLayerCoder"]});class Kf extends f{constructor(h,y,C,$){super(h,y),this.angle=C,$!==void 0&&(this.segment=$)}clone(){return new Kf(this.x,this.y,this.angle,this.segment)}}function p8(p,h,y,C,$){if(h.segment===void 0||y===0)return!0;let V=h,U=h.segment+1,q=0;for(;q>-y/2;){if(U--,U<0)return!1;q-=p[U].dist(V),V=p[U]}q+=p[U].dist(p[U+1]),U++;const J=[];let se=0;for(;qC;)se-=J.shift().angleDelta;if(se>$)return!1;U++,q+=he.dist(ye)}return!0}function HM(p){let h=0;for(let y=0;yse){const De=(se-J)/Re,Ne=Gn.number(ye.x,Ee.x,De),ht=Gn.number(ye.y,Ee.y,De),gt=new Kf(Ne,ht,Ee.angleTo(ye),he);return gt._round(),!U||p8(p,gt,q,U,h)?gt:void 0}J+=Re}}function ZN(p,h,y,C,$,V,U,q,J){const se=GM(C,V,U),he=qM(C,$),ye=he*U,Ee=p[0].x===0||p[0].x===J||p[0].y===0||p[0].y===J;return h-ye=0&&jt=0&&fr=0&&Ee+se<=he){const Vr=new Kf(jt,fr,er,De);Vr._round(),C&&!p8(p,Vr,V,C,$)||Re.push(Vr)}}ye+=gt}return q||Re.length||U||(Re=WM(p,ye/2,y,C,$,V,U,!0,J)),Re}Hn("Anchor",Kf);const jy=Tc;function ZM(p,h,y,C){const $=[],V=p.image,U=V.pixelRatio,q=V.paddedRect.w-2*jy,J=V.paddedRect.h-2*jy;let se={x1:p.left,y1:p.top,x2:p.right,y2:p.bottom};const he=V.stretchX||[[0,q]],ye=V.stretchY||[[0,J]],Ee=(Ir,fi)=>Ir+fi[1]-fi[0],Re=he.reduce(Ee,0),De=ye.reduce(Ee,0),Ne=q-Re,ht=J-De;let gt=0,er=Re,Bt=0,jt=De,fr=0,Vr=Ne,Rn=0,ki=ht;if(V.content&&C){const Ir=V.content,fi=Ir[2]-Ir[0],oi=Ir[3]-Ir[1];(V.textFitWidth||V.textFitHeight)&&(se=RM(p)),gt=P9(he,0,Ir[0]),Bt=P9(ye,0,Ir[1]),er=P9(he,Ir[0],Ir[2]),jt=P9(ye,Ir[1],Ir[3]),fr=Ir[0]-gt,Rn=Ir[1]-Bt,Vr=fi-er,ki=oi-jt}const Pn=se.x1,Mn=se.y1,ai=se.x2-Pn,Wn=se.y2-Mn,Vn=(Ir,fi,oi,Yi)=>{const Do=$9(Ir.stretch-gt,er,ai,Pn),ko=O9(Ir.fixed-fr,Vr,Ir.stretch,Re),Bl=$9(fi.stretch-Bt,jt,Wn,Mn),uh=O9(fi.fixed-Rn,ki,fi.stretch,De),yu=$9(oi.stretch-gt,er,ai,Pn),ll=O9(oi.fixed-fr,Vr,oi.stretch,Re),tc=$9(Yi.stretch-Bt,jt,Wn,Mn),rc=O9(Yi.fixed-Rn,ki,Yi.stretch,De),nc=new f(Do,Bl),Bs=new f(yu,Bl),yo=new f(yu,tc),$u=new f(Do,tc),vu=new f(ko/U,uh/U),ic=new f(ll/U,rc/U),Jl=h*Math.PI/180;if(Jl){const so=Math.sin(Jl),Fo=Math.cos(Jl),na=[Fo,-so,so,Fo];nc._matMult(na),Bs._matMult(na),$u._matMult(na),yo._matMult(na)}const Wh=Ir.stretch+Ir.fixed,Ic=fi.stretch+fi.fixed;return{tl:nc,tr:Bs,bl:$u,br:yo,tex:{x:V.paddedRect.x+jy+Wh,y:V.paddedRect.y+jy+Ic,w:oi.stretch+oi.fixed-Wh,h:Yi.stretch+Yi.fixed-Ic},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vu,pixelOffsetBR:ic,minFontScaleX:Vr/U/ai,minFontScaleY:ki/U/Wn,isSDF:y}};if(C&&(V.stretchX||V.stretchY)){const Ir=YM(he,Ne,Re),fi=YM(ye,ht,De);for(let oi=0;oi0&&(Ne=Math.max(10,Ne),this.circleDiameter=Ne)}else{const Ee=!((ye=U.image)===null||ye===void 0)&&ye.content&&(U.image.textFitWidth||U.image.textFitHeight)?RM(U):{x1:U.left,y1:U.top,x2:U.right,y2:U.bottom};Ee.y1=Ee.y1*q-J[0],Ee.y2=Ee.y2*q+J[2],Ee.x1=Ee.x1*q-J[3],Ee.x2=Ee.x2*q+J[1];const Re=U.collisionPadding;if(Re&&(Ee.x1-=Re[0]*q,Ee.y1-=Re[1]*q,Ee.x2+=Re[2]*q,Ee.y2+=Re[3]*q),he){const De=new f(Ee.x1,Ee.y1),Ne=new f(Ee.x2,Ee.y1),ht=new f(Ee.x1,Ee.y2),gt=new f(Ee.x2,Ee.y2),er=he*Math.PI/180;De._rotate(er),Ne._rotate(er),ht._rotate(er),gt._rotate(er),Ee.x1=Math.min(De.x,Ne.x,ht.x,gt.x),Ee.x2=Math.max(De.x,Ne.x,ht.x,gt.x),Ee.y1=Math.min(De.y,Ne.y,ht.y,gt.y),Ee.y2=Math.max(De.y,Ne.y,ht.y,gt.y)}h.emplaceBack(y.x,y.y,Ee.x1,Ee.y1,Ee.x2,Ee.y2,C,$,V)}this.boxEndIndex=h.length}}class YN{constructor(h=[],y=(C,$)=>C<$?-1:C>$?1:0){if(this.data=h,this.length=this.data.length,this.compare=y,this.length>0)for(let C=(this.length>>1)-1;C>=0;C--)this._down(C)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;const h=this.data[0],y=this.data.pop();return--this.length>0&&(this.data[0]=y,this._down(0)),h}peek(){return this.data[0]}_up(h){const{data:y,compare:C}=this,$=y[h];for(;h>0;){const V=h-1>>1,U=y[V];if(C($,U)>=0)break;y[h]=U,h=V}y[h]=$}_down(h){const{data:y,compare:C}=this,$=this.length>>1,V=y[h];for(;h<$;){let U=1+(h<<1);const q=U+1;if(q=0)break;y[h]=y[U],h=U}y[h]=V}}function XN(p,h=1,y=!1){let C=1/0,$=1/0,V=-1/0,U=-1/0;const q=p[0];for(let Re=0;ReV)&&(V=De.x),(!Re||De.y>U)&&(U=De.y)}const J=Math.min(V-C,U-$);let se=J/2;const he=new YN([],qm);if(J===0)return new f(C,$);for(let Re=C;Reye.d||!ye.d)&&(ye=Re,y&&console.log("found best %d after %d probes",Math.round(1e4*Re.d)/1e4,Ee)),Re.max-ye.d<=h||(se=Re.h/2,he.push(new os(Re.p.x-se,Re.p.y-se,se,p)),he.push(new os(Re.p.x+se,Re.p.y-se,se,p)),he.push(new os(Re.p.x-se,Re.p.y+se,se,p)),he.push(new os(Re.p.x+se,Re.p.y+se,se,p)),Ee+=4)}return y&&(console.log(`num probes: ${Ee}`),console.log(`best distance: ${ye.d}`)),ye.p}function qm(p,h){return h.max-p.max}function os(p,h,y,C){this.p=new f(p,h),this.h=y,this.d=function($,V){let U=!1,q=1/0;for(let J=0;J$.y!=De.y>$.y&&$.x<(De.x-Re.x)*($.y-Re.y)/(De.y-Re.y)+Re.x&&(U=!U),q=Math.min(q,HE($,Re,De))}}return(U?1:-1)*Math.sqrt(q)}(this.p,C),this.max=this.d+this.h*Math.SQRT2}var gu;o.aq=void 0,(gu=o.aq||(o.aq={}))[gu.center=1]="center",gu[gu.left=2]="left",gu[gu.right=3]="right",gu[gu.top=4]="top",gu[gu.bottom=5]="bottom",gu[gu["top-left"]=6]="top-left",gu[gu["top-right"]=7]="top-right",gu[gu["bottom-left"]=8]="bottom-left",gu[gu["bottom-right"]=9]="bottom-right";const xl=7,Ua=Number.POSITIVE_INFINITY;function XM(p,h){return h[1]!==Ua?function(y,C,$){let V=0,U=0;switch(C=Math.abs(C),$=Math.abs($),y){case"top-right":case"top-left":case"top":U=$-xl;break;case"bottom-right":case"bottom-left":case"bottom":U=-$+xl}switch(y){case"top-right":case"bottom-right":case"right":V=-C;break;case"top-left":case"bottom-left":case"left":V=C}return[V,U]}(p,h[0],h[1]):function(y,C){let $=0,V=0;C<0&&(C=0);const U=C/Math.SQRT2;switch(y){case"top-right":case"top-left":V=U-xl;break;case"bottom-right":case"bottom-left":V=-U+xl;break;case"bottom":V=-C+xl;break;case"top":V=C-xl}switch(y){case"top-right":case"bottom-right":$=-U;break;case"top-left":case"bottom-left":$=U;break;case"left":$=C;break;case"right":$=-C}return[$,V]}(p,h[0])}function c1(p,h,y){var C;const $=p.layout,V=(C=$.get("text-variable-anchor-offset"))===null||C===void 0?void 0:C.evaluate(h,{},y);if(V){const q=V.values,J=[];for(let se=0;seEe*al);he.startsWith("top")?ye[1]-=xl:he.startsWith("bottom")&&(ye[1]+=xl),J[se+1]=ye}return new As(J)}const U=$.get("text-variable-anchor");if(U){let q;q=p._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[$.get("text-radial-offset").evaluate(h,{},y)*al,Ua]:$.get("text-offset").evaluate(h,{},y).map(se=>se*al);const J=[];for(const se of U)J.push(se,XM(se,q));return new As(J)}return null}function m8(p){switch(p){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function JN(p,h,y,C,$,V,U,q,J,se,he){let ye=V.textMaxSize.evaluate(h,{});ye===void 0&&(ye=U);const Ee=p.layers[0].layout,Re=Ee.get("icon-offset").evaluate(h,{},he),De=KM(y.horizontal),Ne=U/24,ht=p.tilePixelRatio*Ne,gt=p.tilePixelRatio*ye/24,er=p.tilePixelRatio*q,Bt=p.tilePixelRatio*Ee.get("symbol-spacing"),jt=Ee.get("text-padding")*p.tilePixelRatio,fr=function(Ir,fi,oi,Yi=1){const Do=Ir.get("icon-padding").evaluate(fi,{},oi),ko=Do&&Do.values;return[ko[0]*Yi,ko[1]*Yi,ko[2]*Yi,ko[3]*Yi]}(Ee,h,he,p.tilePixelRatio),Vr=Ee.get("text-max-angle")/180*Math.PI,Rn=Ee.get("text-rotation-alignment")!=="viewport"&&Ee.get("symbol-placement")!=="point",ki=Ee.get("icon-rotation-alignment")==="map"&&Ee.get("symbol-placement")!=="point",Pn=Ee.get("symbol-placement"),Mn=Bt/2,ai=Ee.get("icon-text-fit");let Wn;C&&ai!=="none"&&(p.allowVerticalPlacement&&y.vertical&&(Wn=LM(C,y.vertical,ai,Ee.get("icon-text-fit-padding"),Re,Ne)),De&&(C=LM(C,De,ai,Ee.get("icon-text-fit-padding"),Re,Ne)));const Vn=(Ir,fi)=>{fi.x<0||fi.x>=Ra||fi.y<0||fi.y>=Ra||function(oi,Yi,Do,ko,Bl,uh,yu,ll,tc,rc,nc,Bs,yo,$u,vu,ic,Jl,Wh,Ic,so,Fo,na,ch,Ca,Wm){const sf=oi.addToLineVertexArray(Yi,Do);let Qf,Ed,Zh,Kl,hh=0,q_=0,QM=0,eT=0,w8=-1,b8=-1;const ep={};let C8=Am("");if(oi.allowVerticalPlacement&&ko.vertical){const Ou=ll.layout.get("text-rotate").evaluate(Fo,{},Ca)+90;Zh=new lh(tc,Yi,rc,nc,Bs,ko.vertical,yo,$u,vu,Ou),yu&&(Kl=new lh(tc,Yi,rc,nc,Bs,yu,Jl,Wh,vu,Ou))}if(Bl){const Ou=ll.layout.get("icon-rotate").evaluate(Fo,{}),Yh=ll.layout.get("icon-text-fit")!=="none",Zm=ZM(Bl,Ou,ch,Yh),af=yu?ZM(yu,Ou,ch,Yh):void 0;Ed=new lh(tc,Yi,rc,nc,Bs,Bl,Jl,Wh,!1,Ou),hh=4*Zm.length;const Ym=oi.iconSizeData;let tp=null;Ym.kind==="source"?(tp=[Jf*ll.layout.get("icon-size").evaluate(Fo,{})],tp[0]>w0&&le(`${oi.layerIds[0]}: Value for "icon-size" is >= ${B_}. Reduce your "icon-size".`)):Ym.kind==="composite"&&(tp=[Jf*na.compositeIconSizes[0].evaluate(Fo,{},Ca),Jf*na.compositeIconSizes[1].evaluate(Fo,{},Ca)],(tp[0]>w0||tp[1]>w0)&&le(`${oi.layerIds[0]}: Value for "icon-size" is >= ${B_}. Reduce your "icon-size".`)),oi.addSymbols(oi.icon,Zm,tp,so,Ic,Fo,o.ah.none,Yi,sf.lineStartIndex,sf.lineLength,-1,Ca),w8=oi.icon.placedSymbolArray.length-1,af&&(q_=4*af.length,oi.addSymbols(oi.icon,af,tp,so,Ic,Fo,o.ah.vertical,Yi,sf.lineStartIndex,sf.lineLength,-1,Ca),b8=oi.icon.placedSymbolArray.length-1)}const tT=Object.keys(ko.horizontal);for(const Ou of tT){const Yh=ko.horizontal[Ou];if(!Qf){C8=Am(Yh.text);const af=ll.layout.get("text-rotate").evaluate(Fo,{},Ca);Qf=new lh(tc,Yi,rc,nc,Bs,Yh,yo,$u,vu,af)}const Zm=Yh.positionedLines.length===1;if(QM+=JM(oi,Yi,Yh,uh,ll,vu,Fo,ic,sf,ko.vertical?o.ah.horizontal:o.ah.horizontalOnly,Zm?tT:[Ou],ep,w8,na,Ca),Zm)break}ko.vertical&&(eT+=JM(oi,Yi,ko.vertical,uh,ll,vu,Fo,ic,sf,o.ah.vertical,["vertical"],ep,b8,na,Ca));const eD=Qf?Qf.boxStartIndex:oi.collisionBoxArray.length,tD=Qf?Qf.boxEndIndex:oi.collisionBoxArray.length,rD=Zh?Zh.boxStartIndex:oi.collisionBoxArray.length,nD=Zh?Zh.boxEndIndex:oi.collisionBoxArray.length,iD=Ed?Ed.boxStartIndex:oi.collisionBoxArray.length,sD=Ed?Ed.boxEndIndex:oi.collisionBoxArray.length,oD=Kl?Kl.boxStartIndex:oi.collisionBoxArray.length,aD=Kl?Kl.boxEndIndex:oi.collisionBoxArray.length;let of=-1;const z9=(Ou,Yh)=>Ou&&Ou.circleDiameter?Math.max(Ou.circleDiameter,Yh):Yh;of=z9(Qf,of),of=z9(Zh,of),of=z9(Ed,of),of=z9(Kl,of);const rT=of>-1?1:0;rT&&(of*=Wm/al),oi.glyphOffsetArray.length>=Fy.MAX_GLYPHS&&le("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Fo.sortKey!==void 0&&oi.addToSortKeyRanges(oi.symbolInstances.length,Fo.sortKey);const lD=c1(ll,Fo,Ca),[uD,cD]=function(Ou,Yh){const Zm=Ou.length,af=Yh==null?void 0:Yh.values;if((af==null?void 0:af.length)>0)for(let Ym=0;Ym=0?ep.right:-1,ep.center>=0?ep.center:-1,ep.left>=0?ep.left:-1,ep.vertical||-1,w8,b8,C8,eD,tD,rD,nD,iD,sD,oD,aD,rc,QM,eT,hh,q_,rT,0,yo,of,uD,cD)}(p,fi,Ir,y,C,$,Wn,p.layers[0],p.collisionBoxArray,h.index,h.sourceLayerIndex,p.index,ht,[jt,jt,jt,jt],Rn,J,er,fr,ki,Re,h,V,se,he,U)};if(Pn==="line")for(const Ir of UM(h.geometry,0,0,Ra,Ra)){const fi=ZN(Ir,Bt,Vr,y.vertical||De,C,24,gt,p.overscaling,Ra);for(const oi of fi)De&&KN(p,De.text,Mn,oi)||Vn(Ir,oi)}else if(Pn==="line-center"){for(const Ir of h.geometry)if(Ir.length>1){const fi=WN(Ir,Vr,y.vertical||De,C,24,gt);fi&&Vn(Ir,fi)}}else if(h.type==="Polygon")for(const Ir of Fn(h.geometry,0)){const fi=XN(Ir,16);Vn(Ir[0],new Kf(fi.x,fi.y,0))}else if(h.type==="LineString")for(const Ir of h.geometry)Vn(Ir,new Kf(Ir[0].x,Ir[0].y,0));else if(h.type==="Point")for(const Ir of h.geometry)for(const fi of Ir)Vn([fi],new Kf(fi.x,fi.y,0))}function JM(p,h,y,C,$,V,U,q,J,se,he,ye,Ee,Re,De){const Ne=function(er,Bt,jt,fr,Vr,Rn,ki,Pn){const Mn=fr.layout.get("text-rotate").evaluate(Rn,{})*Math.PI/180,ai=[];for(const Wn of Bt.positionedLines)for(const Vn of Wn.positionedGlyphs){if(!Vn.rect)continue;const Ir=Vn.rect||{};let fi=bM+1,oi=!0,Yi=1,Do=0;const ko=(Vr||Pn)&&Vn.vertical,Bl=Vn.metrics.advance*Vn.scale/2;if(Pn&&Bt.verticalizable&&(Do=Wn.lineOffset/2-(Vn.imageName?-(al-Vn.metrics.width*Vn.scale)/2:(Vn.scale-1)*al)),Vn.imageName){const so=ki[Vn.imageName];oi=so.sdf,Yi=so.pixelRatio,fi=Tc/Yi}const uh=Vr?[Vn.x+Bl,Vn.y]:[0,0];let yu=Vr?[0,0]:[Vn.x+Bl+jt[0],Vn.y+jt[1]-Do],ll=[0,0];ko&&(ll=yu,yu=[0,0]);const tc=Vn.metrics.isDoubleResolution?2:1,rc=(Vn.metrics.left-fi)*Vn.scale-Bl+yu[0],nc=(-Vn.metrics.top-fi)*Vn.scale+yu[1],Bs=rc+Ir.w/tc*Vn.scale/Yi,yo=nc+Ir.h/tc*Vn.scale/Yi,$u=new f(rc,nc),vu=new f(Bs,nc),ic=new f(rc,yo),Jl=new f(Bs,yo);if(ko){const so=new f(-Bl,Bl-D_),Fo=-Math.PI/2,na=al/2-Bl,ch=new f(5-D_-na,-(Vn.imageName?na:0)),Ca=new f(...ll);$u._rotateAround(Fo,so)._add(ch)._add(Ca),vu._rotateAround(Fo,so)._add(ch)._add(Ca),ic._rotateAround(Fo,so)._add(ch)._add(Ca),Jl._rotateAround(Fo,so)._add(ch)._add(Ca)}if(Mn){const so=Math.sin(Mn),Fo=Math.cos(Mn),na=[Fo,-so,so,Fo];$u._matMult(na),vu._matMult(na),ic._matMult(na),Jl._matMult(na)}const Wh=new f(0,0),Ic=new f(0,0);ai.push({tl:$u,tr:vu,bl:ic,br:Jl,tex:Ir,writingMode:Bt.writingMode,glyphOffset:uh,sectionIndex:Vn.sectionIndex,isSDF:oi,pixelOffsetTL:Wh,pixelOffsetBR:Ic,minFontScaleX:0,minFontScaleY:0})}return ai}(0,y,q,$,V,U,C,p.allowVerticalPlacement),ht=p.textSizeData;let gt=null;ht.kind==="source"?(gt=[Jf*$.layout.get("text-size").evaluate(U,{})],gt[0]>w0&&le(`${p.layerIds[0]}: Value for "text-size" is >= ${B_}. Reduce your "text-size".`)):ht.kind==="composite"&&(gt=[Jf*Re.compositeTextSizes[0].evaluate(U,{},De),Jf*Re.compositeTextSizes[1].evaluate(U,{},De)],(gt[0]>w0||gt[1]>w0)&&le(`${p.layerIds[0]}: Value for "text-size" is >= ${B_}. Reduce your "text-size".`)),p.addSymbols(p.text,Ne,gt,q,V,U,se,h,J.lineStartIndex,J.lineLength,Ee,De);for(const er of he)ye[er]=p.text.placedSymbolArray.length-1;return 4*Ne.length}function KM(p){for(const h in p)return p[h];return null}function KN(p,h,y,C){const $=p.compareText;if(h in $){const V=$[h];for(let U=V.length-1;U>=0;U--)if(C.dist(V[U])>4;if($!==1)throw new Error(`Got v${$} data when expected v1.`);const V=N9[15&C];if(!V)throw new Error("Unrecognized array type.");const[U]=new Uint16Array(h,2,1),[q]=new Uint32Array(h,4,1);return new g8(q,U,V,h)}constructor(h,y=64,C=Float64Array,$){if(isNaN(h)||h<0)throw new Error(`Unpexpected numItems value: ${h}.`);this.numItems=+h,this.nodeSize=Math.min(Math.max(+y,2),65535),this.ArrayType=C,this.IndexArrayType=h<65536?Uint16Array:Uint32Array;const V=N9.indexOf(this.ArrayType),U=2*h*this.ArrayType.BYTES_PER_ELEMENT,q=h*this.IndexArrayType.BYTES_PER_ELEMENT,J=(8-q%8)%8;if(V<0)throw new Error(`Unexpected typed array class: ${C}.`);$&&$ instanceof ArrayBuffer?(this.data=$,this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+q+J,2*h),this._pos=2*h,this._finished=!0):(this.data=new ArrayBuffer(8+U+q+J),this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+q+J,2*h),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+V]),new Uint16Array(this.data,2,1)[0]=y,new Uint32Array(this.data,4,1)[0]=h)}add(h,y){const C=this._pos>>1;return this.ids[C]=C,this.coords[this._pos++]=h,this.coords[this._pos++]=y,C}finish(){const h=this._pos>>1;if(h!==this.numItems)throw new Error(`Added ${h} items when expected ${this.numItems}.`);return nf(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(h,y,C,$){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:V,coords:U,nodeSize:q}=this,J=[0,V.length-1,0],se=[];for(;J.length;){const he=J.pop()||0,ye=J.pop()||0,Ee=J.pop()||0;if(ye-Ee<=q){for(let ht=Ee;ht<=ye;ht++){const gt=U[2*ht],er=U[2*ht+1];gt>=h&><=C&&er>=y&&er<=$&&se.push(V[ht])}continue}const Re=Ee+ye>>1,De=U[2*Re],Ne=U[2*Re+1];De>=h&&De<=C&&Ne>=y&&Ne<=$&&se.push(V[Re]),(he===0?h<=De:y<=Ne)&&(J.push(Ee),J.push(Re-1),J.push(1-he)),(he===0?C>=De:$>=Ne)&&(J.push(Re+1),J.push(ye),J.push(1-he))}return se}within(h,y,C){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:$,coords:V,nodeSize:U}=this,q=[0,$.length-1,0],J=[],se=C*C;for(;q.length;){const he=q.pop()||0,ye=q.pop()||0,Ee=q.pop()||0;if(ye-Ee<=U){for(let ht=Ee;ht<=ye;ht++)Ha(V[2*ht],V[2*ht+1],h,y)<=se&&J.push($[ht]);continue}const Re=Ee+ye>>1,De=V[2*Re],Ne=V[2*Re+1];Ha(De,Ne,h,y)<=se&&J.push($[Re]),(he===0?h-C<=De:y-C<=Ne)&&(q.push(Ee),q.push(Re-1),q.push(1-he)),(he===0?h+C>=De:y+C>=Ne)&&(q.push(Re+1),q.push(ye),q.push(1-he))}return J}}function nf(p,h,y,C,$,V){if($-C<=y)return;const U=C+$>>1;y8(p,h,U,C,$,V),nf(p,h,y,C,U-1,1-V),nf(p,h,y,U+1,$,1-V)}function y8(p,h,y,C,$,V){for(;$>C;){if($-C>600){const se=$-C+1,he=y-C+1,ye=Math.log(se),Ee=.5*Math.exp(2*ye/3),Re=.5*Math.sqrt(ye*Ee*(se-Ee)/se)*(he-se/2<0?-1:1);y8(p,h,y,Math.max(C,Math.floor(y-he*Ee/se+Re)),Math.min($,Math.floor(y+(se-he)*Ee/se+Re)),V)}const U=h[2*y+V];let q=C,J=$;for(C0(p,h,C,y),h[2*$+V]>U&&C0(p,h,C,$);qU;)J--}h[2*C+V]===U?C0(p,h,C,J):(J++,C0(p,h,J,$)),J<=y&&(C=J+1),y<=J&&($=J-1)}}function C0(p,h,y,C){ba(p,y,C),ba(h,2*y,2*C),ba(h,2*y+1,2*C+1)}function ba(p,h,y){const C=p[h];p[h]=p[y],p[y]=C}function Ha(p,h,y,C){const $=p-y,V=h-C;return $*$+V*V}var D9;o.bg=void 0,(D9=o.bg||(o.bg={})).create="create",D9.load="load",D9.fullLoad="fullLoad";let F9=null,G_=[];const v8=1e3/60,_8="loadTime",x8="fullLoadTime",QN={mark(p){performance.mark(p)},frame(p){const h=p;F9!=null&&G_.push(h-F9),F9=h},clearMetrics(){F9=null,G_=[],performance.clearMeasures(_8),performance.clearMeasures(x8);for(const p in o.bg)performance.clearMarks(o.bg[p])},getPerformanceMetrics(){performance.measure(_8,o.bg.create,o.bg.load),performance.measure(x8,o.bg.create,o.bg.fullLoad);const p=performance.getEntriesByName(_8)[0].duration,h=performance.getEntriesByName(x8)[0].duration,y=G_.length,C=1/(G_.reduce((V,U)=>V+U,0)/y/1e3),$=G_.filter(V=>V>v8).reduce((V,U)=>V+(U-v8)/v8,0);return{loadTime:p,fullLoadTime:h,fps:C,percentDroppedFrames:$/(y+$)*100,totalFrames:y}}};o.$=class extends _e{},o.A=Nm,o.B=__,o.C=function(p){if(Fe==null){const h=p.navigator?p.navigator.userAgent:null;Fe=!!p.safari||!(!h||!(/\b(iPad|iPhone|iPod)\b/.test(h)||h.match("Safari")&&!h.match("Chrome")))}return Fe},o.D=ii,o.E=_r,o.F=class{constructor(p,h){this.target=p,this.mapId=h,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new GN(()=>this.process()),this.subscription=function(y,C,$,V){return y.addEventListener(C,$,!1),{unsubscribe:()=>{y.removeEventListener(C,$,!1)}}}(this.target,"message",y=>this.receive(y)),this.globalScope=Pe(self)?p:window}registerMessageHandler(p,h){this.messageHandlers[p]=h}sendAsync(p,h){return new Promise((y,C)=>{const $=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[$]={resolve:y,reject:C},h&&h.signal.addEventListener("abort",()=>{delete this.resolveRejects[$];const q={id:$,type:"",origin:location.origin,targetMapId:p.targetMapId,sourceMapId:this.mapId};this.target.postMessage(q)},{once:!0});const V=[],U=Object.assign(Object.assign({},p),{id:$,sourceMapId:this.mapId,origin:location.origin,data:u0(p.data,V)});this.target.postMessage(U,{transfer:V})})}receive(p){const h=p.data,y=h.id;if(!(h.origin!=="file://"&&location.origin!=="file://"&&h.origin!=="resource://android"&&location.origin!=="resource://android"&&h.origin!==location.origin||h.targetMapId&&this.mapId!==h.targetMapId)){if(h.type===""){delete this.tasks[y];const C=this.abortControllers[y];return delete this.abortControllers[y],void(C&&C.abort())}if(Pe(self)||h.mustQueue)return this.tasks[y]=h,this.taskQueue.push(y),void this.invoker.trigger();this.processTask(y,h)}}process(){if(this.taskQueue.length===0)return;const p=this.taskQueue.shift(),h=this.tasks[p];delete this.tasks[p],this.taskQueue.length>0&&this.invoker.trigger(),h&&this.processTask(p,h)}processTask(p,h){return a(this,void 0,void 0,function*(){if(h.type===""){const $=this.resolveRejects[p];return delete this.resolveRejects[p],$?void(h.error?$.reject(ef(h.error)):$.resolve(ef(h.data))):void 0}if(!this.messageHandlers[h.type])return void this.completeTask(p,new Error(`Could not find a registered handler for ${h.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const y=ef(h.data),C=new AbortController;this.abortControllers[p]=C;try{const $=yield this.messageHandlers[h.type](h.sourceMapId,y,C);this.completeTask(p,null,$)}catch($){this.completeTask(p,$)}})}completeTask(p,h,y){const C=[];delete this.abortControllers[p];const $={id:p,type:"",sourceMapId:this.mapId,origin:location.origin,error:h?u0(h):null,data:u0(y,C)};this.target.postMessage($,{transfer:C})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},o.G=Ut,o.H=function(){var p=new Nm(16);return Nm!=Float32Array&&(p[1]=0,p[2]=0,p[3]=0,p[4]=0,p[6]=0,p[7]=0,p[8]=0,p[9]=0,p[11]=0,p[12]=0,p[13]=0,p[14]=0),p[0]=1,p[5]=1,p[10]=1,p[15]=1,p},o.I=r8,o.J=function(p,h,y){var C,$,V,U,q,J,se,he,ye,Ee,Re,De,Ne=y[0],ht=y[1],gt=y[2];return h===p?(p[12]=h[0]*Ne+h[4]*ht+h[8]*gt+h[12],p[13]=h[1]*Ne+h[5]*ht+h[9]*gt+h[13],p[14]=h[2]*Ne+h[6]*ht+h[10]*gt+h[14],p[15]=h[3]*Ne+h[7]*ht+h[11]*gt+h[15]):($=h[1],V=h[2],U=h[3],q=h[4],J=h[5],se=h[6],he=h[7],ye=h[8],Ee=h[9],Re=h[10],De=h[11],p[0]=C=h[0],p[1]=$,p[2]=V,p[3]=U,p[4]=q,p[5]=J,p[6]=se,p[7]=he,p[8]=ye,p[9]=Ee,p[10]=Re,p[11]=De,p[12]=C*Ne+q*ht+ye*gt+h[12],p[13]=$*Ne+J*ht+Ee*gt+h[13],p[14]=V*Ne+se*ht+Re*gt+h[14],p[15]=U*Ne+he*ht+De*gt+h[15]),p},o.K=function(p,h,y){var C=y[0],$=y[1],V=y[2];return p[0]=h[0]*C,p[1]=h[1]*C,p[2]=h[2]*C,p[3]=h[3]*C,p[4]=h[4]*$,p[5]=h[5]*$,p[6]=h[6]*$,p[7]=h[7]*$,p[8]=h[8]*V,p[9]=h[9]*V,p[10]=h[10]*V,p[11]=h[11]*V,p[12]=h[12],p[13]=h[13],p[14]=h[14],p[15]=h[15],p},o.L=Mc,o.M=function(p,h){const y={};for(let C=0;C{const h=window.document.createElement("video");return h.muted=!0,new Promise(y=>{h.onloadstart=()=>{y(h)};for(const C of p){const $=window.document.createElement("source");et(C)||(h.crossOrigin="Anonymous"),$.src=C,h.appendChild($)}})},o.a4=function(){return pe++},o.a5=nn,o.a6=Fy,o.a7=rn,o.a8=ih,o.a9=jM,o.aA=function(p){if(p.type==="custom")return new HN(p);switch(p.type){case"background":return new A9(p);case"circle":return new x9(p);case"fill":return new lN(p);case"fill-extrusion":return new sM(p);case"heatmap":return new ZE(p);case"hillshade":return new b9(p);case"line":return new xN(p);case"raster":return new UN(p);case"symbol":return new k9(p)}},o.aB=ee,o.aC=function(p,h){if(!p)return[{command:"setStyle",args:[h]}];let y=[];try{if(!it(p.version,h.version))return[{command:"setStyle",args:[h]}];it(p.center,h.center)||y.push({command:"setCenter",args:[h.center]}),it(p.zoom,h.zoom)||y.push({command:"setZoom",args:[h.zoom]}),it(p.bearing,h.bearing)||y.push({command:"setBearing",args:[h.bearing]}),it(p.pitch,h.pitch)||y.push({command:"setPitch",args:[h.pitch]}),it(p.sprite,h.sprite)||y.push({command:"setSprite",args:[h.sprite]}),it(p.glyphs,h.glyphs)||y.push({command:"setGlyphs",args:[h.glyphs]}),it(p.transition,h.transition)||y.push({command:"setTransition",args:[h.transition]}),it(p.light,h.light)||y.push({command:"setLight",args:[h.light]}),it(p.terrain,h.terrain)||y.push({command:"setTerrain",args:[h.terrain]}),it(p.sky,h.sky)||y.push({command:"setSky",args:[h.sky]}),it(p.projection,h.projection)||y.push({command:"setProjection",args:[h.projection]});const C={},$=[];(function(U,q,J,se){let he;for(he in q=q||{},U=U||{})Object.prototype.hasOwnProperty.call(U,he)&&(Object.prototype.hasOwnProperty.call(q,he)||Ur(he,J,se));for(he in q)Object.prototype.hasOwnProperty.call(q,he)&&(Object.prototype.hasOwnProperty.call(U,he)?it(U[he],q[he])||(U[he].type==="geojson"&&q[he].type==="geojson"&&Rr(U,q,he)?Xt(J,{command:"setGeoJSONSourceData",args:[he,q[he].data]}):In(he,q,J,se)):xr(he,q,J))})(p.sources,h.sources,$,C);const V=[];p.layers&&p.layers.forEach(U=>{"source"in U&&C[U.source]?y.push({command:"removeLayer",args:[U.id]}):V.push(U)}),y=y.concat($),function(U,q,J){q=q||[];const se=(U=U||[]).map(Kr),he=q.map(Kr),ye=U.reduce(Ft,{}),Ee=q.reduce(Ft,{}),Re=se.slice(),De=Object.create(null);let Ne,ht,gt,er,Bt;for(let jt=0,fr=0;jt@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(y,C,$,V)=>{const U=$||V;return h[C]=!U||U.toLowerCase(),""}),h["max-age"]){const y=parseInt(h["max-age"],10);isNaN(y)?delete h["max-age"]:h["max-age"]=y}return h},o.ab=function(p,h){const y=[];for(const C in p)C in h||y.push(C);return y},o.ac=W,o.ad=function(p,h,y){var C=Math.sin(y),$=Math.cos(y),V=h[0],U=h[1],q=h[2],J=h[3],se=h[4],he=h[5],ye=h[6],Ee=h[7];return h!==p&&(p[8]=h[8],p[9]=h[9],p[10]=h[10],p[11]=h[11],p[12]=h[12],p[13]=h[13],p[14]=h[14],p[15]=h[15]),p[0]=V*$+se*C,p[1]=U*$+he*C,p[2]=q*$+ye*C,p[3]=J*$+Ee*C,p[4]=se*$-V*C,p[5]=he*$-U*C,p[6]=ye*$-q*C,p[7]=Ee*$-J*C,p},o.ae=function(p){var h=new Nm(16);return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h[4]=p[4],h[5]=p[5],h[6]=p[6],h[7]=p[7],h[8]=p[8],h[9]=p[9],h[10]=p[10],h[11]=p[11],h[12]=p[12],h[13]=p[13],h[14]=p[14],h[15]=p[15],h},o.af=_9,o.ag=function(p,h){let y=0,C=0;if(p.kind==="constant")C=p.layoutSize;else if(p.kind!=="source"){const{interpolationType:$,minZoom:V,maxZoom:U}=p,q=$?W(ys.interpolationFactor($,h,V,U),0,1):0;p.kind==="camera"?C=Gn.number(p.minSize,p.maxSize,q):y=q}return{uSizeT:y,uSize:C}},o.ai=function(p,{uSize:h,uSizeT:y},{lowerSize:C,upperSize:$}){return p.kind==="source"?C/Jf:p.kind==="composite"?Gn.number(C/Jf,$/Jf,y):h},o.aj=s8,o.ak=function(p,h,y,C){const $=h.y-p.y,V=h.x-p.x,U=C.y-y.y,q=C.x-y.x,J=U*V-q*$;if(J===0)return null;const se=(q*(p.y-y.y)-U*(p.x-y.x))/J;return new f(p.x+se*V,p.y+se*$)},o.al=UM,o.am=I_,o.an=v9,o.ao=function(p){let h=1/0,y=1/0,C=-1/0,$=-1/0;for(const V of p)h=Math.min(h,V.x),y=Math.min(y,V.y),C=Math.max(C,V.x),$=Math.max($,V.y);return[h,y,C,$]},o.ap=al,o.ar=i8,o.as=function(p,h){var y=h[0],C=h[1],$=h[2],V=h[3],U=h[4],q=h[5],J=h[6],se=h[7],he=h[8],ye=h[9],Ee=h[10],Re=h[11],De=h[12],Ne=h[13],ht=h[14],gt=h[15],er=y*q-C*U,Bt=y*J-$*U,jt=y*se-V*U,fr=C*J-$*q,Vr=C*se-V*q,Rn=$*se-V*J,ki=he*Ne-ye*De,Pn=he*ht-Ee*De,Mn=he*gt-Re*De,ai=ye*ht-Ee*Ne,Wn=ye*gt-Re*Ne,Vn=Ee*gt-Re*ht,Ir=er*Vn-Bt*Wn+jt*ai+fr*Mn-Vr*Pn+Rn*ki;return Ir?(p[0]=(q*Vn-J*Wn+se*ai)*(Ir=1/Ir),p[1]=($*Wn-C*Vn-V*ai)*Ir,p[2]=(Ne*Rn-ht*Vr+gt*fr)*Ir,p[3]=(Ee*Vr-ye*Rn-Re*fr)*Ir,p[4]=(J*Mn-U*Vn-se*Pn)*Ir,p[5]=(y*Vn-$*Mn+V*Pn)*Ir,p[6]=(ht*jt-De*Rn-gt*Bt)*Ir,p[7]=(he*Rn-Ee*jt+Re*Bt)*Ir,p[8]=(U*Wn-q*Mn+se*ki)*Ir,p[9]=(C*Mn-y*Wn-V*ki)*Ir,p[10]=(De*Vr-Ne*jt+gt*er)*Ir,p[11]=(ye*jt-he*Vr-Re*er)*Ir,p[12]=(q*Pn-U*ai-J*ki)*Ir,p[13]=(y*ai-C*Pn+$*ki)*Ir,p[14]=(Ne*Bt-De*fr-ht*er)*Ir,p[15]=(he*fr-ye*Bt+Ee*er)*Ir,p):null},o.at=m8,o.au=T9,o.av=g8,o.aw=function(){const p={},h=rt.$version;for(const y in rt.$root){const C=rt.$root[y];if(C.required){let $=null;$=y==="version"?h:C.type==="array"?[]:{},$!=null&&(p[y]=$)}}return p},o.ax=Qp,o.ay=Se,o.az=function(p){p=p.slice();const h=Object.create(null);for(let y=0;y25||C<0||C>=1||y<0||y>=1)},o.bc=function(p,h){return p[0]=h[0],p[1]=0,p[2]=0,p[3]=0,p[4]=0,p[5]=h[1],p[6]=0,p[7]=0,p[8]=0,p[9]=0,p[10]=h[2],p[11]=0,p[12]=0,p[13]=0,p[14]=0,p[15]=1,p},o.bd=class extends de{},o.be=u8,o.bf=QN,o.bh=tr,o.bi=function(p,h){Je.REGISTERED_PROTOCOLS[p]=h},o.bj=function(p){delete Je.REGISTERED_PROTOCOLS[p]},o.bk=function(p,h){const y={};for(let $=0;$Vn*al)}let Pn=U?"center":y.get("text-justify").evaluate(se,{},p.canonical);const Mn=y.get("symbol-placement")==="point"?y.get("text-max-width").evaluate(se,{},p.canonical)*al:1/0,ai=()=>{p.bucket.allowVerticalPlacement&&Ge(jt)&&(De.vertical=Dy(Ne,p.glyphMap,p.glyphPositions,p.imagePositions,he,Mn,V,Rn,"left",Vr,gt,o.ah.vertical,!0,Ee,ye))};if(!U&&ki){const Wn=new Set;if(Pn==="auto")for(let Ir=0;Ira(void 0,void 0,void 0,function*(){if(p.byteLength===0)return createImageBitmap(new ImageData(1,1));const h=new Blob([new Uint8Array(p)],{type:"image/png"});try{return createImageBitmap(h)}catch(y){throw new Error(`Could not load image because of ${y.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),o.e=K,o.f=p=>new Promise((h,y)=>{const C=new Image;C.onload=()=>{h(C),URL.revokeObjectURL(C.src),C.onload=null,window.requestAnimationFrame(()=>{C.src=He})},C.onerror=()=>y(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const $=new Blob([new Uint8Array(p)],{type:"image/png"});C.src=p.byteLength?URL.createObjectURL($):He}),o.g=pr,o.h=(p,h)=>je(K(p,{type:"json"}),h),o.i=Pe,o.j=qt,o.k=ft,o.l=(p,h)=>je(K(p,{type:"arrayBuffer"}),h),o.m=je,o.n=function(p){return new e8(p).readFields(kN,[])},o.o=L_,o.p=CM,o.q=z,o.r=Im,o.s=et,o.t=Kp,o.u=Kd,o.v=rt,o.w=le,o.x=function([p,h,y]){return h+=90,h*=Math.PI/180,y*=Math.PI/180,{x:p*Math.cos(h)*Math.sin(y),y:p*Math.sin(h)*Math.sin(y),z:p*Math.cos(y)}},o.y=Gn,o.z=ra}),i("worker",["./shared"],function(o){class a{constructor(Me){this.keyCache={},Me&&this.replace(Me)}replace(Me){this._layerConfigs={},this._layers={},this.update(Me,[])}update(Me,Ie){for(const ze of Me){this._layerConfigs[ze.id]=ze;const At=this._layers[ze.id]=o.aA(ze);At._featureFilter=o.a7(At.filter),this.keyCache[ze.id]&&delete this.keyCache[ze.id]}for(const ze of Ie)delete this.keyCache[ze],delete this._layerConfigs[ze],delete this._layers[ze];this.familiesBySource={};const Be=o.bk(Object.values(this._layerConfigs),this.keyCache);for(const ze of Be){const At=ze.map(Ye=>this._layers[Ye.id]),zt=At[0];if(zt.visibility==="none")continue;const Yt=zt.source||"";let wt=this.familiesBySource[Yt];wt||(wt=this.familiesBySource[Yt]={});const ur=zt.sourceLayer||"_geojsonTileLayer";let me=wt[ur];me||(me=wt[ur]=[]),me.push(At)}}}class l{constructor(Me){const Ie={},Be=[];for(const Yt in Me){const wt=Me[Yt],ur=Ie[Yt]={};for(const me in wt){const Ye=wt[+me];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const $t={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};Be.push($t),ur[me]={rect:$t,metrics:Ye.metrics}}}const{w:ze,h:At}=o.p(Be),zt=new o.o({width:ze||1,height:At||1});for(const Yt in Me){const wt=Me[Yt];for(const ur in wt){const me=wt[+ur];if(!me||me.bitmap.width===0||me.bitmap.height===0)continue;const Ye=Ie[Yt][ur].rect;o.o.copy(me.bitmap,zt,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},me.bitmap)}}this.image=zt,this.positions=Ie}}o.bl("GlyphAtlas",l);class u{constructor(Me){this.tileID=new o.S(Me.tileID.overscaledZ,Me.tileID.wrap,Me.tileID.canonical.z,Me.tileID.canonical.x,Me.tileID.canonical.y),this.uid=Me.uid,this.zoom=Me.zoom,this.pixelRatio=Me.pixelRatio,this.tileSize=Me.tileSize,this.source=Me.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Me.showCollisionBoxes,this.collectResourceTiming=!!Me.collectResourceTiming,this.returnDependencies=!!Me.returnDependencies,this.promoteId=Me.promoteId,this.inFlightDependencies=[]}parse(Me,Ie,Be,ze){return o._(this,void 0,void 0,function*(){this.status="parsing",this.data=Me,this.collisionBoxArray=new o.a5;const At=new o.bm(Object.keys(Me.layers).sort()),zt=new o.bn(this.tileID,this.promoteId);zt.bucketLayerIDs=[];const Yt={},wt={featureIndex:zt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Be},ur=Ie.familiesBySource[this.source];for(const cn in ur){const si=Me.layers[cn];if(!si)continue;si.version===1&&o.w(`Vector tile source "${this.source}" layer "${cn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const gn=At.encode(cn),_i=[];for(let Xi=0;Xi=Vi.maxzoom||Vi.visibility!=="none"&&(d(Xi,this.zoom,Be),(Yt[Vi.id]=Vi.createBucket({index:zt.bucketLayerIDs.length,layers:Xi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:gn,sourceID:this.source})).populate(_i,wt,this.tileID.canonical),zt.bucketLayerIDs.push(Xi.map(Ta=>Ta.id)))}}const me=o.aF(wt.glyphDependencies,cn=>Object.keys(cn).map(Number));this.inFlightDependencies.forEach(cn=>cn==null?void 0:cn.abort()),this.inFlightDependencies=[];let Ye=Promise.resolve({});if(Object.keys(me).length){const cn=new AbortController;this.inFlightDependencies.push(cn),Ye=ze.sendAsync({type:"GG",data:{stacks:me,source:this.source,tileID:this.tileID,type:"glyphs"}},cn)}const $t=Object.keys(wt.iconDependencies);let Nt=Promise.resolve({});if($t.length){const cn=new AbortController;this.inFlightDependencies.push(cn),Nt=ze.sendAsync({type:"GI",data:{icons:$t,source:this.source,tileID:this.tileID,type:"icons"}},cn)}const Jt=Object.keys(wt.patternDependencies);let cr=Promise.resolve({});if(Jt.length){const cn=new AbortController;this.inFlightDependencies.push(cn),cr=ze.sendAsync({type:"GI",data:{icons:Jt,source:this.source,tileID:this.tileID,type:"patterns"}},cn)}const[Br,Lr,hn]=yield Promise.all([Ye,Nt,cr]),mi=new l(Br),sn=new o.bo(Lr,hn);for(const cn in Yt){const si=Yt[cn];si instanceof o.a6?(d(si.layers,this.zoom,Be),o.bp({bucket:si,glyphMap:Br,glyphPositions:mi.positions,imageMap:Lr,imagePositions:sn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):si.hasPattern&&(si instanceof o.bq||si instanceof o.br||si instanceof o.bs)&&(d(si.layers,this.zoom,Be),si.addFeatures(wt,this.tileID.canonical,sn.patternPositions))}return this.status="done",{buckets:Object.values(Yt).filter(cn=>!cn.isEmpty()),featureIndex:zt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:mi.image,imageAtlas:sn,glyphMap:this.returnDependencies?Br:null,iconMap:this.returnDependencies?Lr:null,glyphPositions:this.returnDependencies?mi.positions:null}})}}function d(nt,Me,Ie){const Be=new o.z(Me);for(const ze of nt)ze.recalculate(Be,Ie)}class f{constructor(Me,Ie,Be){this.actor=Me,this.layerIndex=Ie,this.availableImages=Be,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Me,Ie){return o._(this,void 0,void 0,function*(){const Be=yield o.l(Me.request,Ie);try{return{vectorTile:new o.bt.VectorTile(new o.bu(Be.data)),rawData:Be.data,cacheControl:Be.cacheControl,expires:Be.expires}}catch(ze){const At=new Uint8Array(Be.data);let zt=`Unable to parse the tile at ${Me.request.url}, `;throw zt+=At[0]===31&&At[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${ze.message}`,new Error(zt)}})}loadTile(Me){return o._(this,void 0,void 0,function*(){const Ie=Me.uid,Be=!!(Me&&Me.request&&Me.request.collectResourceTiming)&&new o.bv(Me.request),ze=new u(Me);this.loading[Ie]=ze;const At=new AbortController;ze.abort=At;try{const zt=yield this.loadVectorTile(Me,At);if(delete this.loading[Ie],!zt)return null;const Yt=zt.rawData,wt={};zt.expires&&(wt.expires=zt.expires),zt.cacheControl&&(wt.cacheControl=zt.cacheControl);const ur={};if(Be){const Ye=Be.finish();Ye&&(ur.resourceTiming=JSON.parse(JSON.stringify(Ye)))}ze.vectorTile=zt.vectorTile;const me=ze.parse(zt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ie]=ze,this.fetching[Ie]={rawTileData:Yt,cacheControl:wt,resourceTiming:ur};try{const Ye=yield me;return o.e({rawTileData:Yt.slice(0)},Ye,wt,ur)}finally{delete this.fetching[Ie]}}catch(zt){throw delete this.loading[Ie],ze.status="done",this.loaded[Ie]=ze,zt}})}reloadTile(Me){return o._(this,void 0,void 0,function*(){const Ie=Me.uid;if(!this.loaded||!this.loaded[Ie])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Be=this.loaded[Ie];if(Be.showCollisionBoxes=Me.showCollisionBoxes,Be.status==="parsing"){const ze=yield Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor);let At;if(this.fetching[Ie]){const{rawTileData:zt,cacheControl:Yt,resourceTiming:wt}=this.fetching[Ie];delete this.fetching[Ie],At=o.e({rawTileData:zt.slice(0)},ze,Yt,wt)}else At=ze;return At}if(Be.status==="done"&&Be.vectorTile)return Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Me){return o._(this,void 0,void 0,function*(){const Ie=this.loading,Be=Me.uid;Ie&&Ie[Be]&&Ie[Be].abort&&(Ie[Be].abort.abort(),delete Ie[Be])})}removeTile(Me){return o._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Me.uid]&&delete this.loaded[Me.uid]})}}class m{constructor(){this.loaded={}}loadTile(Me){return o._(this,void 0,void 0,function*(){const{uid:Ie,encoding:Be,rawImageData:ze,redFactor:At,greenFactor:zt,blueFactor:Yt,baseShift:wt}=Me,ur=ze.width+2,me=ze.height+2,Ye=o.b(ze)?new o.R({width:ur,height:me},yield o.bw(ze,-1,-1,ur,me)):ze,$t=new o.bx(Ie,Ye,Be,At,zt,Yt,wt);return this.loaded=this.loaded||{},this.loaded[Ie]=$t,$t})}removeTile(Me){const Ie=this.loaded,Be=Me.uid;Ie&&Ie[Be]&&delete Ie[Be]}}function v(nt,Me){if(nt.length!==0){b(nt[0],Me);for(var Ie=1;Ie=Math.abs(Yt)?Ie-wt+Yt:Yt-wt+Ie,Ie=wt}Ie+Be>=0!=!!Me&&nt.reverse()}var M=o.by(function nt(Me,Ie){var Be,ze=Me&&Me.type;if(ze==="FeatureCollection")for(Be=0;Be>31}function Pe(nt,Me){for(var Ie=nt.loadGeometry(),Be=nt.type,ze=0,At=0,zt=Ie.length,Yt=0;Ytnt},Lt=Math.fround||(lt=new Float32Array(1),nt=>(lt[0]=+nt,lt[0]));var lt;const pt=3,rr=5,Tt=6;class Je{constructor(Me){this.options=Object.assign(Object.create(He),Me),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Me){const{log:Ie,minZoom:Be,maxZoom:ze}=this.options;Ie&&console.time("total time");const At=`prepare ${Me.length} points`;Ie&&console.time(At),this.points=Me;const zt=[];for(let wt=0;wt=Be;wt--){const ur=+Date.now();Yt=this.trees[wt]=this._createTree(this._cluster(Yt,wt)),Ie&&console.log("z%d: %d clusters in %dms",wt,Yt.numItems,+Date.now()-ur)}return Ie&&console.timeEnd("total time"),this}getClusters(Me,Ie){let Be=((Me[0]+180)%360+360)%360-180;const ze=Math.max(-90,Math.min(90,Me[1]));let At=Me[2]===180?180:((Me[2]+180)%360+360)%360-180;const zt=Math.max(-90,Math.min(90,Me[3]));if(Me[2]-Me[0]>=360)Be=-180,At=180;else if(Be>At){const Ye=this.getClusters([Be,ze,180,zt],Ie),$t=this.getClusters([-180,ze,At,zt],Ie);return Ye.concat($t)}const Yt=this.trees[this._limitZoom(Ie)],wt=Yt.range(tr(Be),Se(zt),tr(At),Se(ze)),ur=Yt.data,me=[];for(const Ye of wt){const $t=this.stride*Ye;me.push(ur[$t+rr]>1?pr(ur,$t,this.clusterProps):this.points[ur[$t+pt]])}return me}getChildren(Me){const Ie=this._getOriginId(Me),Be=this._getOriginZoom(Me),ze="No cluster with the specified id.",At=this.trees[Be];if(!At)throw new Error(ze);const zt=At.data;if(Ie*this.stride>=zt.length)throw new Error(ze);const Yt=this.options.radius/(this.options.extent*Math.pow(2,Be-1)),wt=At.within(zt[Ie*this.stride],zt[Ie*this.stride+1],Yt),ur=[];for(const me of wt){const Ye=me*this.stride;zt[Ye+4]===Me&&ur.push(zt[Ye+rr]>1?pr(zt,Ye,this.clusterProps):this.points[zt[Ye+pt]])}if(ur.length===0)throw new Error(ze);return ur}getLeaves(Me,Ie,Be){const ze=[];return this._appendLeaves(ze,Me,Ie=Ie||10,Be=Be||0,0),ze}getTile(Me,Ie,Be){const ze=this.trees[this._limitZoom(Me)],At=Math.pow(2,Me),{extent:zt,radius:Yt}=this.options,wt=Yt/zt,ur=(Be-wt)/At,me=(Be+1+wt)/At,Ye={features:[]};return this._addTileFeatures(ze.range((Ie-wt)/At,ur,(Ie+1+wt)/At,me),ze.data,Ie,Be,At,Ye),Ie===0&&this._addTileFeatures(ze.range(1-wt/At,ur,1,me),ze.data,At,Be,At,Ye),Ie===At-1&&this._addTileFeatures(ze.range(0,ur,wt/At,me),ze.data,-1,Be,At,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(Me){let Ie=this._getOriginZoom(Me)-1;for(;Ie<=this.options.maxZoom;){const Be=this.getChildren(Me);if(Ie++,Be.length!==1)break;Me=Be[0].properties.cluster_id}return Ie}_appendLeaves(Me,Ie,Be,ze,At){const zt=this.getChildren(Ie);for(const Yt of zt){const wt=Yt.properties;if(wt&&wt.cluster?At+wt.point_count<=ze?At+=wt.point_count:At=this._appendLeaves(Me,wt.cluster_id,Be,ze,At):At1;let me,Ye,$t;if(ur)me=Ut(Ie,wt,this.clusterProps),Ye=Ie[wt],$t=Ie[wt+1];else{const cr=this.points[Ie[wt+pt]];me=cr.properties;const[Br,Lr]=cr.geometry.coordinates;Ye=tr(Br),$t=Se(Lr)}const Nt={type:1,geometry:[[Math.round(this.options.extent*(Ye*At-Be)),Math.round(this.options.extent*($t*At-ze))]],tags:me};let Jt;Jt=ur||this.options.generateId?Ie[wt+pt]:this.points[Ie[wt+pt]].id,Jt!==void 0&&(Nt.id=Jt),zt.features.push(Nt)}}_limitZoom(Me){return Math.max(this.options.minZoom,Math.min(Math.floor(+Me),this.options.maxZoom+1))}_cluster(Me,Ie){const{radius:Be,extent:ze,reduce:At,minPoints:zt}=this.options,Yt=Be/(ze*Math.pow(2,Ie)),wt=Me.data,ur=[],me=this.stride;for(let Ye=0;YeIe&&(Br+=wt[hn+rr])}if(Br>cr&&Br>=zt){let Lr,hn=$t*cr,mi=Nt*cr,sn=-1;const cn=((Ye/me|0)<<5)+(Ie+1)+this.points.length;for(const si of Jt){const gn=si*me;if(wt[gn+2]<=Ie)continue;wt[gn+2]=Ie;const _i=wt[gn+rr];hn+=wt[gn]*_i,mi+=wt[gn+1]*_i,wt[gn+4]=cn,At&&(Lr||(Lr=this._map(wt,Ye,!0),sn=this.clusterProps.length,this.clusterProps.push(Lr)),At(Lr,this._map(wt,gn)))}wt[Ye+4]=cn,ur.push(hn/Br,mi/Br,1/0,cn,-1,Br),At&&ur.push(sn)}else{for(let Lr=0;Lr1)for(const Lr of Jt){const hn=Lr*me;if(!(wt[hn+2]<=Ie)){wt[hn+2]=Ie;for(let mi=0;mi>5}_getOriginZoom(Me){return(Me-this.points.length)%32}_map(Me,Ie,Be){if(Me[Ie+rr]>1){const zt=this.clusterProps[Me[Ie+Tt]];return Be?Object.assign({},zt):zt}const ze=this.points[Me[Ie+pt]].properties,At=this.options.map(ze);return Be&&At===ze?Object.assign({},At):At}}function pr(nt,Me,Ie){return{type:"Feature",id:nt[Me+pt],properties:Ut(nt,Me,Ie),geometry:{type:"Point",coordinates:[(Be=nt[Me],360*(Be-.5)),je(nt[Me+1])]}};var Be}function Ut(nt,Me,Ie){const Be=nt[Me+rr],ze=Be>=1e4?`${Math.round(Be/1e3)}k`:Be>=1e3?Math.round(Be/100)/10+"k":Be,At=nt[Me+Tt],zt=At===-1?{}:Object.assign({},Ie[At]);return Object.assign(zt,{cluster:!0,cluster_id:nt[Me+pt],point_count:Be,point_count_abbreviated:ze})}function tr(nt){return nt/360+.5}function Se(nt){const Me=Math.sin(nt*Math.PI/180),Ie=.5-.25*Math.log((1+Me)/(1-Me))/Math.PI;return Ie<0?0:Ie>1?1:Ie}function je(nt){const Me=(180-360*nt)*Math.PI/180;return 360*Math.atan(Math.exp(Me))/Math.PI-90}function et(nt,Me,Ie,Be){let ze=Be;const At=Me+(Ie-Me>>1);let zt,Yt=Ie-Me;const wt=nt[Me],ur=nt[Me+1],me=nt[Ie],Ye=nt[Ie+1];for(let $t=Me+3;$tze)zt=$t,ze=Nt;else if(Nt===ze){const Jt=Math.abs($t-At);JtBe&&(zt-Me>3&&et(nt,Me,zt,Be),nt[zt+2]=ze,Ie-zt>3&&et(nt,zt,Ie,Be))}function yt(nt,Me,Ie,Be,ze,At){let zt=ze-Ie,Yt=At-Be;if(zt!==0||Yt!==0){const wt=((nt-Ie)*zt+(Me-Be)*Yt)/(zt*zt+Yt*Yt);wt>1?(Ie=ze,Be=At):wt>0&&(Ie+=zt*wt,Be+=Yt*wt)}return zt=nt-Ie,Yt=Me-Be,zt*zt+Yt*Yt}function we(nt,Me,Ie,Be){const ze={id:nt??null,type:Me,geometry:Ie,tags:Be,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Me==="Point"||Me==="MultiPoint"||Me==="LineString")ft(ze,Ie);else if(Me==="Polygon")ft(ze,Ie[0]);else if(Me==="MultiLineString")for(const At of Ie)ft(ze,At);else if(Me==="MultiPolygon")for(const At of Ie)ft(ze,At[0]);return ze}function ft(nt,Me){for(let Ie=0;Ie0&&(zt+=Be?(ze*me-ur*At)/2:Math.sqrt(Math.pow(ur-ze,2)+Math.pow(me-At,2))),ze=ur,At=me}const Yt=Me.length-3;Me[2]=1,et(Me,0,Yt,Ie),Me[Yt+2]=1,Me.size=Math.abs(zt),Me.start=0,Me.end=Me.size}function Xe(nt,Me,Ie,Be){for(let ze=0;ze1?1:Ie}function Xt(nt,Me,Ie,Be,ze,At,zt,Yt){if(Be/=Me,At>=(Ie/=Me)&&zt=Be)return null;const wt=[];for(const ur of nt){const me=ur.geometry;let Ye=ur.type;const $t=ze===0?ur.minX:ur.minY,Nt=ze===0?ur.maxX:ur.maxY;if($t>=Ie&&Nt=Be)continue;let Jt=[];if(Ye==="Point"||Ye==="MultiPoint")xr(me,Jt,Ie,Be,ze);else if(Ye==="LineString")Ur(me,Jt,Ie,Be,ze,!1,Yt.lineMetrics);else if(Ye==="MultiLineString")Rr(me,Jt,Ie,Be,ze,!1);else if(Ye==="Polygon")Rr(me,Jt,Ie,Be,ze,!0);else if(Ye==="MultiPolygon")for(const cr of me){const Br=[];Rr(cr,Br,Ie,Be,ze,!0),Br.length&&Jt.push(Br)}if(Jt.length){if(Yt.lineMetrics&&Ye==="LineString"){for(const cr of Jt)wt.push(we(ur.id,Ye,cr,ur.tags));continue}Ye!=="LineString"&&Ye!=="MultiLineString"||(Jt.length===1?(Ye="LineString",Jt=Jt[0]):Ye="MultiLineString"),Ye!=="Point"&&Ye!=="MultiPoint"||(Ye=Jt.length===3?"Point":"MultiPoint"),wt.push(we(ur.id,Ye,Jt,ur.tags))}}return wt.length?wt:null}function xr(nt,Me,Ie,Be,ze){for(let At=0;At=Ie&&zt<=Be&&mn(Me,nt[At],nt[At+1],nt[At+2])}}function Ur(nt,Me,Ie,Be,ze,At,zt){let Yt=In(nt);const wt=ze===0?Kr:Ft;let ur,me,Ye=nt.start;for(let Br=0;BrIe&&(me=wt(Yt,Lr,hn,sn,cn,Ie),zt&&(Yt.start=Ye+ur*me)):si>Be?gn=Ie&&(me=wt(Yt,Lr,hn,sn,cn,Ie),_i=!0),gn>Be&&si<=Be&&(me=wt(Yt,Lr,hn,sn,cn,Be),_i=!0),!At&&_i&&(zt&&(Yt.end=Ye+ur*me),Me.push(Yt),Yt=In(nt)),zt&&(Ye+=ur)}let $t=nt.length-3;const Nt=nt[$t],Jt=nt[$t+1],cr=ze===0?Nt:Jt;cr>=Ie&&cr<=Be&&mn(Yt,Nt,Jt,nt[$t+2]),$t=Yt.length-3,At&&$t>=3&&(Yt[$t]!==Yt[0]||Yt[$t+1]!==Yt[1])&&mn(Yt,Yt[0],Yt[1],Yt[2]),Yt.length&&Me.push(Yt)}function In(nt){const Me=[];return Me.size=nt.size,Me.start=nt.start,Me.end=nt.end,Me}function Rr(nt,Me,Ie,Be,ze,At){for(const zt of nt)Ur(zt,Me,Ie,Be,ze,At,!1)}function mn(nt,Me,Ie,Be){nt.push(Me,Ie,Be)}function Kr(nt,Me,Ie,Be,ze,At){const zt=(At-Me)/(Be-Me);return mn(nt,At,Ie+(ze-Ie)*zt,1),zt}function Ft(nt,Me,Ie,Be,ze,At){const zt=(At-Ie)/(ze-Ie);return mn(nt,Me+(Be-Me)*zt,At,1),zt}function xt(nt,Me){const Ie=[];for(let Be=0;Be0&&Me.size<(ze?zt:Be))return void(Ie.numPoints+=Me.length/3);const Yt=[];for(let wt=0;wtzt)&&(Ie.numSimplified++,Yt.push(Me[wt],Me[wt+1])),Ie.numPoints++;ze&&function(wt,ur){let me=0;for(let Ye=0,$t=wt.length,Nt=$t-2;Ye<$t;Nt=Ye,Ye+=2)me+=(wt[Ye]-wt[Nt])*(wt[Ye+1]+wt[Nt+1]);if(me>0===ur)for(let Ye=0,$t=wt.length;Ye<$t/2;Ye+=2){const Nt=wt[Ye],Jt=wt[Ye+1];wt[Ye]=wt[$t-2-Ye],wt[Ye+1]=wt[$t-1-Ye],wt[$t-2-Ye]=Nt,wt[$t-1-Ye]=Jt}}(Yt,At),nt.push(Yt)}const ot={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class lr{constructor(Me,Ie){const Be=(Ie=this.options=function(At,zt){for(const Yt in zt)At[Yt]=zt[Yt];return At}(Object.create(ot),Ie)).debug;if(Be&&console.time("preprocess data"),Ie.maxZoom<0||Ie.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");let ze=function(At,zt){const Yt=[];if(At.type==="FeatureCollection")for(let wt=0;wt1&&console.time("creation"),Nt=this.tiles[$t]=ni(Me,Ie,Be,ze,ur),this.tileCoords.push({z:Ie,x:Be,y:ze}),me)){me>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,Be,ze,Nt.numFeatures,Nt.numPoints,Nt.numSimplified),console.timeEnd("creation"));const _i=`z${Ie}`;this.stats[_i]=(this.stats[_i]||0)+1,this.total++}if(Nt.source=Me,At==null){if(Ie===ur.indexMaxZoom||Nt.numPoints<=ur.indexMaxPoints)continue}else{if(Ie===ur.maxZoom||Ie===At)continue;if(At!=null){const _i=At-Ie;if(Be!==zt>>_i||ze!==Yt>>_i)continue}}if(Nt.source=null,Me.length===0)continue;me>1&&console.time("clipping");const Jt=.5*ur.buffer/ur.extent,cr=.5-Jt,Br=.5+Jt,Lr=1+Jt;let hn=null,mi=null,sn=null,cn=null,si=Xt(Me,Ye,Be-Jt,Be+Br,0,Nt.minX,Nt.maxX,ur),gn=Xt(Me,Ye,Be+cr,Be+Lr,0,Nt.minX,Nt.maxX,ur);Me=null,si&&(hn=Xt(si,Ye,ze-Jt,ze+Br,1,Nt.minY,Nt.maxY,ur),mi=Xt(si,Ye,ze+cr,ze+Lr,1,Nt.minY,Nt.maxY,ur),si=null),gn&&(sn=Xt(gn,Ye,ze-Jt,ze+Br,1,Nt.minY,Nt.maxY,ur),cn=Xt(gn,Ye,ze+cr,ze+Lr,1,Nt.minY,Nt.maxY,ur),gn=null),me>1&&console.timeEnd("clipping"),wt.push(hn||[],Ie+1,2*Be,2*ze),wt.push(mi||[],Ie+1,2*Be,2*ze+1),wt.push(sn||[],Ie+1,2*Be+1,2*ze),wt.push(cn||[],Ie+1,2*Be+1,2*ze+1)}}getTile(Me,Ie,Be){Me=+Me,Ie=+Ie,Be=+Be;const ze=this.options,{extent:At,debug:zt}=ze;if(Me<0||Me>24)return null;const Yt=1<1&&console.log("drilling down to z%d-%d-%d",Me,Ie,Be);let ur,me=Me,Ye=Ie,$t=Be;for(;!ur&&me>0;)me--,Ye>>=1,$t>>=1,ur=this.tiles[br(me,Ye,$t)];return ur&&ur.source?(zt>1&&(console.log("found parent tile z%d-%d-%d",me,Ye,$t),console.time("drilling down")),this.splitTile(ur.source,me,Ye,$t,Me,Ie,Be),zt>1&&console.timeEnd("drilling down"),this.tiles[wt]?Mr(this.tiles[wt],At):null):null}}function br(nt,Me,Ie){return 32*((1<{Ye.properties=Nt;const Jt={};for(const cr of $t)Jt[cr]=wt[cr].evaluate(me,Ye);return Jt},zt.reduce=(Nt,Jt)=>{Ye.properties=Jt;for(const cr of $t)me.accumulated=Nt[cr],Nt[cr]=ur[cr].evaluate(me,Ye)},zt}(Me)).load((yield this._pendingData).features):(ze=yield this._pendingData,new lr(ze,Me.geojsonVtOptions)),this.loaded={};const At={};if(Be){const zt=Be.finish();zt&&(At.resourceTiming={},At.resourceTiming[Me.source]=JSON.parse(JSON.stringify(zt)))}return At}catch(At){if(delete this._pendingRequest,o.bB(At))return{abandoned:!0};throw At}var ze})}getData(){return o._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Me){const Ie=this.loaded;return Ie&&Ie[Me.uid]?super.reloadTile(Me):this.loadTile(Me)}loadAndProcessGeoJSON(Me,Ie){return o._(this,void 0,void 0,function*(){let Be=yield this.loadGeoJSON(Me,Ie);if(delete this._pendingRequest,typeof Be!="object")throw new Error(`Input data given to '${Me.source}' is not a valid GeoJSON object.`);if(M(Be,!0),Me.filter){const ze=o.bC(Me.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ze.result==="error")throw new Error(ze.value.map(zt=>`${zt.key}: ${zt.message}`).join(", "));Be={type:"FeatureCollection",features:Be.features.filter(zt=>ze.value.evaluate({zoom:0},zt))}}return Be})}loadGeoJSON(Me,Ie){return o._(this,void 0,void 0,function*(){const{promoteId:Be}=Me;if(Me.request){const ze=yield o.h(Me.request,Ie);return this._dataUpdateable=Zn(ze.data,Be)?Gi(ze.data,Be):void 0,ze.data}if(typeof Me.data=="string")try{const ze=JSON.parse(Me.data);return this._dataUpdateable=Zn(ze,Be)?Gi(ze,Be):void 0,ze}catch{throw new Error(`Input data given to '${Me.source}' is not a valid GeoJSON object.`)}if(!Me.dataDiff)throw new Error(`Input data given to '${Me.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Me.source}`);return function(ze,At,zt){var Yt,wt,ur,me;if(At.removeAll&&ze.clear(),At.remove)for(const Ye of At.remove)ze.delete(Ye);if(At.add)for(const Ye of At.add){const $t=Tr(Ye,zt);$t!=null&&ze.set($t,Ye)}if(At.update)for(const Ye of At.update){let $t=ze.get(Ye.id);if($t==null)continue;const Nt=!Ye.removeAllProperties&&(((Yt=Ye.removeProperties)===null||Yt===void 0?void 0:Yt.length)>0||((wt=Ye.addOrUpdateProperties)===null||wt===void 0?void 0:wt.length)>0);if((Ye.newGeometry||Ye.removeAllProperties||Nt)&&($t=Object.assign({},$t),ze.set(Ye.id,$t),Nt&&($t.properties=Object.assign({},$t.properties))),Ye.newGeometry&&($t.geometry=Ye.newGeometry),Ye.removeAllProperties)$t.properties={};else if(((ur=Ye.removeProperties)===null||ur===void 0?void 0:ur.length)>0)for(const Jt of Ye.removeProperties)Object.prototype.hasOwnProperty.call($t.properties,Jt)&&delete $t.properties[Jt];if(((me=Ye.addOrUpdateProperties)===null||me===void 0?void 0:me.length)>0)for(const{key:Jt,value:cr}of Ye.addOrUpdateProperties)$t.properties[Jt]=cr}}(this._dataUpdateable,Me.dataDiff,Be),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Me){return o._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Me){return this._geoJSONIndex.getClusterExpansionZoom(Me.clusterId)}getClusterChildren(Me){return this._geoJSONIndex.getChildren(Me.clusterId)}getClusterLeaves(Me){return this._geoJSONIndex.getLeaves(Me.clusterId,Me.limit,Me.offset)}}class pi{constructor(Me){this.self=Me,this.actor=new o.F(Me),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ie,Be)=>{if(this.externalWorkerSourceTypes[Ie])throw new Error(`Worker source with name "${Ie}" already registered.`);this.externalWorkerSourceTypes[Ie]=Be},this.self.addProtocol=o.bi,this.self.removeProtocol=o.bj,this.self.registerRTLTextPlugin=Ie=>{if(o.bD.isParsed())throw new Error("RTL text plugin already registered.");o.bD.setMethods(Ie)},this.actor.registerMessageHandler("LDT",(Ie,Be)=>this._getDEMWorkerSource(Ie,Be.source).loadTile(Be)),this.actor.registerMessageHandler("RDT",(Ie,Be)=>o._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ie,Be.source).removeTile(Be)})),this.actor.registerMessageHandler("GCEZ",(Ie,Be)=>o._(this,void 0,void 0,function*(){return this._getWorkerSource(Ie,Be.type,Be.source).getClusterExpansionZoom(Be)})),this.actor.registerMessageHandler("GCC",(Ie,Be)=>o._(this,void 0,void 0,function*(){return this._getWorkerSource(Ie,Be.type,Be.source).getClusterChildren(Be)})),this.actor.registerMessageHandler("GCL",(Ie,Be)=>o._(this,void 0,void 0,function*(){return this._getWorkerSource(Ie,Be.type,Be.source).getClusterLeaves(Be)})),this.actor.registerMessageHandler("LD",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).loadData(Be)),this.actor.registerMessageHandler("GD",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).getData()),this.actor.registerMessageHandler("LT",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).loadTile(Be)),this.actor.registerMessageHandler("RT",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).reloadTile(Be)),this.actor.registerMessageHandler("AT",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).abortTile(Be)),this.actor.registerMessageHandler("RMT",(Ie,Be)=>this._getWorkerSource(Ie,Be.type,Be.source).removeTile(Be)),this.actor.registerMessageHandler("RS",(Ie,Be)=>o._(this,void 0,void 0,function*(){if(!this.workerSources[Ie]||!this.workerSources[Ie][Be.type]||!this.workerSources[Ie][Be.type][Be.source])return;const ze=this.workerSources[Ie][Be.type][Be.source];delete this.workerSources[Ie][Be.type][Be.source],ze.removeSource!==void 0&&ze.removeSource(Be)})),this.actor.registerMessageHandler("RM",Ie=>o._(this,void 0,void 0,function*(){delete this.layerIndexes[Ie],delete this.availableImages[Ie],delete this.workerSources[Ie],delete this.demWorkerSources[Ie]})),this.actor.registerMessageHandler("SR",(Ie,Be)=>o._(this,void 0,void 0,function*(){this.referrer=Be})),this.actor.registerMessageHandler("SRPS",(Ie,Be)=>this._syncRTLPluginState(Ie,Be)),this.actor.registerMessageHandler("IS",(Ie,Be)=>o._(this,void 0,void 0,function*(){this.self.importScripts(Be)})),this.actor.registerMessageHandler("SI",(Ie,Be)=>this._setImages(Ie,Be)),this.actor.registerMessageHandler("UL",(Ie,Be)=>o._(this,void 0,void 0,function*(){this._getLayerIndex(Ie).update(Be.layers,Be.removedIds)})),this.actor.registerMessageHandler("SL",(Ie,Be)=>o._(this,void 0,void 0,function*(){this._getLayerIndex(Ie).replace(Be)}))}_setImages(Me,Ie){return o._(this,void 0,void 0,function*(){this.availableImages[Me]=Ie;for(const Be in this.workerSources[Me]){const ze=this.workerSources[Me][Be];for(const At in ze)ze[At].availableImages=Ie}})}_syncRTLPluginState(Me,Ie){return o._(this,void 0,void 0,function*(){if(o.bD.isParsed())return o.bD.getState();if(Ie.pluginStatus!=="loading")return o.bD.setState(Ie),Ie;const Be=Ie.pluginURL;if(this.self.importScripts(Be),o.bD.isParsed()){const ze={pluginStatus:"loaded",pluginURL:Be};return o.bD.setState(ze),ze}throw o.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Be}`)})}_getAvailableImages(Me){let Ie=this.availableImages[Me];return Ie||(Ie=[]),Ie}_getLayerIndex(Me){let Ie=this.layerIndexes[Me];return Ie||(Ie=this.layerIndexes[Me]=new a),Ie}_getWorkerSource(Me,Ie,Be){if(this.workerSources[Me]||(this.workerSources[Me]={}),this.workerSources[Me][Ie]||(this.workerSources[Me][Ie]={}),!this.workerSources[Me][Ie][Be]){const ze={sendAsync:(At,zt)=>(At.targetMapId=Me,this.actor.sendAsync(At,zt))};switch(Ie){case"vector":this.workerSources[Me][Ie][Be]=new f(ze,this._getLayerIndex(Me),this._getAvailableImages(Me));break;case"geojson":this.workerSources[Me][Ie][Be]=new zn(ze,this._getLayerIndex(Me),this._getAvailableImages(Me));break;default:this.workerSources[Me][Ie][Be]=new this.externalWorkerSourceTypes[Ie](ze,this._getLayerIndex(Me),this._getAvailableImages(Me))}}return this.workerSources[Me][Ie][Be]}_getDEMWorkerSource(Me,Ie){return this.demWorkerSources[Me]||(this.demWorkerSources[Me]={}),this.demWorkerSources[Me][Ie]||(this.demWorkerSources[Me][Ie]=new m),this.demWorkerSources[Me][Ie]}}return o.i(self)&&(self.worker=new pi(self)),pi}),i("index",["exports","./shared"],function(o,a){var l="4.7.1";let u,d;const f={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:z=>new Promise((c,x)=>{const R=requestAnimationFrame(c);z.signal.addEventListener("abort",()=>{cancelAnimationFrame(R),x(a.c())})}),getImageData(z,c=0){return this.getImageCanvasContext(z).getImageData(-c,-c,z.width+2*c,z.height+2*c)},getImageCanvasContext(z){const c=window.document.createElement("canvas"),x=c.getContext("2d",{willReadFrequently:!0});if(!x)throw new Error("failed to create canvas 2d context");return c.width=z.width,c.height=z.height,x.drawImage(z,0,0,z.width,z.height),x},resolveURL:z=>(u||(u=document.createElement("a")),u.href=z,u.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(d==null&&(d=matchMedia("(prefers-reduced-motion: reduce)")),d.matches)}};class m{static testProp(c){if(!m.docStyle)return c[0];for(let x=0;x{window.removeEventListener("click",m.suppressClickInternal,!0)},0)}static getScale(c){const x=c.getBoundingClientRect();return{x:x.width/c.offsetWidth||1,y:x.height/c.offsetHeight||1,boundingClientRect:x}}static getPoint(c,x,R){const L=x.boundingClientRect;return new a.P((R.clientX-L.left)/x.x-c.clientLeft,(R.clientY-L.top)/x.y-c.clientTop)}static mousePos(c,x){const R=m.getScale(c);return m.getPoint(c,R,x)}static touchPos(c,x){const R=[],L=m.getScale(c);for(let D=0;D{b&&A(b),b=null,I=!0},M.onerror=()=>{O=!0,b=null},M.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(z){let c,x,R,L;z.resetRequestQueue=()=>{c=[],x=0,R=0,L={}},z.addThrottleControl=ie=>{const de=R++;return L[de]=ie,de},z.removeThrottleControl=ie=>{delete L[ie],X()},z.getImage=(ie,de,_e=!0)=>new Promise((xe,Oe)=>{v.supported&&(ie.headers||(ie.headers={}),ie.headers.accept="image/webp,*/*"),a.e(ie,{type:"image"}),c.push({abortController:de,requestParameters:ie,supportImageRefresh:_e,state:"queued",onError:qe=>{Oe(qe)},onSuccess:qe=>{xe(qe)}}),X()});const D=ie=>a._(this,void 0,void 0,function*(){ie.state="running";const{requestParameters:de,supportImageRefresh:_e,onError:xe,onSuccess:Oe,abortController:qe}=ie,tt=_e===!1&&!a.i(self)&&!a.g(de.url)&&(!de.headers||Object.keys(de.headers).reduce((St,Pt)=>St&&Pt==="accept",!0));x++;const dt=tt?Q(de,qe):a.m(de,qe);try{const St=yield dt;delete ie.abortController,ie.state="completed",St.data instanceof HTMLImageElement||a.b(St.data)?Oe(St):St.data&&Oe({data:yield(bt=St.data,typeof createImageBitmap=="function"?a.d(bt):a.f(bt)),cacheControl:St.cacheControl,expires:St.expires})}catch(St){delete ie.abortController,xe(St)}finally{x--,X()}var bt}),X=()=>{const ie=(()=>{for(const de of Object.keys(L))if(L[de]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let de=x;de0;de++){const _e=c.shift();_e.abortController.signal.aborted?de--:D(_e)}},Q=(ie,de)=>new Promise((_e,xe)=>{const Oe=new Image,qe=ie.url,tt=ie.credentials;tt&&tt==="include"?Oe.crossOrigin="use-credentials":(tt&&tt==="same-origin"||!a.s(qe))&&(Oe.crossOrigin="anonymous"),de.signal.addEventListener("abort",()=>{Oe.src="",xe(a.c())}),Oe.fetchPriority="high",Oe.onload=()=>{Oe.onerror=Oe.onload=null,_e({data:Oe})},Oe.onerror=()=>{Oe.onerror=Oe.onload=null,de.signal.aborted||xe(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Oe.src=qe})}(j||(j={})),j.resetRequestQueue();class H{constructor(c){this._transformRequestFn=c}transformRequest(c,x){return this._transformRequestFn&&this._transformRequestFn(c,x)||{url:c}}setTransformRequest(c){this._transformRequestFn=c}}function W(z){var c=new a.A(3);return c[0]=z[0],c[1]=z[1],c[2]=z[2],c}var re,K=function(z,c,x){return z[0]=c[0]-x[0],z[1]=c[1]-x[1],z[2]=c[2]-x[2],z};re=new a.A(3),a.A!=Float32Array&&(re[0]=0,re[1]=0,re[2]=0);var pe=function(z){var c=z[0],x=z[1];return c*c+x*x};function ge(z){const c=[];if(typeof z=="string")c.push({id:"default",url:z});else if(z&&z.length>0){const x=[];for(const{id:R,url:L}of z){const D=`${R}${L}`;x.indexOf(D)===-1&&(x.push(D),c.push({id:R,url:L}))}}return c}function fe(z,c,x){const R=z.split("?");return R[0]+=`${c}${x}`,R.join("?")}(function(){var z=new a.A(2);a.A!=Float32Array&&(z[0]=0,z[1]=0)})();class ee{constructor(c,x,R,L){this.context=c,this.format=R,this.texture=c.gl.createTexture(),this.update(x,L)}update(c,x,R){const{width:L,height:D}=c,X=!(this.size&&this.size[0]===L&&this.size[1]===D||R),{context:Q}=this,{gl:ie}=Q;if(this.useMipmap=!!(x&&x.useMipmap),ie.bindTexture(ie.TEXTURE_2D,this.texture),Q.pixelStoreUnpackFlipY.set(!1),Q.pixelStoreUnpack.set(1),Q.pixelStoreUnpackPremultiplyAlpha.set(this.format===ie.RGBA&&(!x||x.premultiply!==!1)),X)this.size=[L,D],c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.b(c)?ie.texImage2D(ie.TEXTURE_2D,0,this.format,this.format,ie.UNSIGNED_BYTE,c):ie.texImage2D(ie.TEXTURE_2D,0,this.format,L,D,0,this.format,ie.UNSIGNED_BYTE,c.data);else{const{x:de,y:_e}=R||{x:0,y:0};c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.b(c)?ie.texSubImage2D(ie.TEXTURE_2D,0,de,_e,ie.RGBA,ie.UNSIGNED_BYTE,c):ie.texSubImage2D(ie.TEXTURE_2D,0,de,_e,L,D,ie.RGBA,ie.UNSIGNED_BYTE,c.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ie.generateMipmap(ie.TEXTURE_2D)}bind(c,x,R){const{context:L}=this,{gl:D}=L;D.bindTexture(D.TEXTURE_2D,this.texture),R!==D.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(R=D.LINEAR),c!==this.filter&&(D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MAG_FILTER,c),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MIN_FILTER,R||c),this.filter=c),x!==this.wrap&&(D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_S,x),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_T,x),this.wrap=x)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:c}=this.context;c.deleteTexture(this.texture),this.texture=null}}function be(z){const{userImage:c}=z;return!!(c&&c.render&&c.render())&&(z.data.replace(new Uint8Array(c.data.buffer)),!0)}class le extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(c){if(this.loaded!==c&&(this.loaded=c,c)){for(const{ids:x,promiseResolve:R}of this.requestors)R(this._getImagesForIds(x));this.requestors=[]}}getImage(c){const x=this.images[c];if(x&&!x.data&&x.spriteData){const R=x.spriteData;x.data=new a.R({width:R.width,height:R.height},R.context.getImageData(R.x,R.y,R.width,R.height).data),x.spriteData=null}return x}addImage(c,x){if(this.images[c])throw new Error(`Image id ${c} already exist, use updateImage instead`);this._validate(c,x)&&(this.images[c]=x)}_validate(c,x){let R=!0;const L=x.data||x.spriteData;return this._validateStretch(x.stretchX,L&&L.width)||(this.fire(new a.j(new Error(`Image "${c}" has invalid "stretchX" value`))),R=!1),this._validateStretch(x.stretchY,L&&L.height)||(this.fire(new a.j(new Error(`Image "${c}" has invalid "stretchY" value`))),R=!1),this._validateContent(x.content,x)||(this.fire(new a.j(new Error(`Image "${c}" has invalid "content" value`))),R=!1),R}_validateStretch(c,x){if(!c)return!0;let R=0;for(const L of c){if(L[0]{let L=!0;if(!this.isLoaded())for(const D of c)this.images[D]||(L=!1);this.isLoaded()||L?x(this._getImagesForIds(c)):this.requestors.push({ids:c,promiseResolve:x})})}_getImagesForIds(c){const x={};for(const R of c){let L=this.getImage(R);L||(this.fire(new a.k("styleimagemissing",{id:R})),L=this.getImage(R)),L?x[R]={data:L.data.clone(),pixelRatio:L.pixelRatio,sdf:L.sdf,version:L.version,stretchX:L.stretchX,stretchY:L.stretchY,content:L.content,textFitWidth:L.textFitWidth,textFitHeight:L.textFitHeight,hasRenderCallback:!!(L.userImage&&L.userImage.render)}:a.w(`Image "${R}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return x}getPixelSize(){const{width:c,height:x}=this.atlasImage;return{width:c,height:x}}getPattern(c){const x=this.patterns[c],R=this.getImage(c);if(!R)return null;if(x&&x.position.version===R.version)return x.position;if(x)x.position.version=R.version;else{const L={w:R.data.width+2,h:R.data.height+2,x:0,y:0},D=new a.I(L,R);this.patterns[c]={bin:L,position:D}}return this._updatePatternAtlas(),this.patterns[c].position}bind(c){const x=c.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new ee(c,this.atlasImage,x.RGBA),this.atlasTexture.bind(x.LINEAR,x.CLAMP_TO_EDGE)}_updatePatternAtlas(){const c=[];for(const D in this.patterns)c.push(this.patterns[D].bin);const{w:x,h:R}=a.p(c),L=this.atlasImage;L.resize({width:x||1,height:R||1});for(const D in this.patterns){const{bin:X}=this.patterns[D],Q=X.x+1,ie=X.y+1,de=this.getImage(D).data,_e=de.width,xe=de.height;a.R.copy(de,L,{x:0,y:0},{x:Q,y:ie},{width:_e,height:xe}),a.R.copy(de,L,{x:0,y:xe-1},{x:Q,y:ie-1},{width:_e,height:1}),a.R.copy(de,L,{x:0,y:0},{x:Q,y:ie+xe},{width:_e,height:1}),a.R.copy(de,L,{x:_e-1,y:0},{x:Q-1,y:ie},{width:1,height:xe}),a.R.copy(de,L,{x:0,y:0},{x:Q+_e,y:ie},{width:1,height:xe})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(c){for(const x of c){if(this.callbackDispatchedThisFrame[x])continue;this.callbackDispatchedThisFrame[x]=!0;const R=this.getImage(x);R||a.w(`Image with ID: "${x}" was not found`),be(R)&&this.updateImage(x,R)}}}const ve=1e20;function Pe(z,c,x,R,L,D,X,Q,ie){for(let de=c;de-1);ie++,D[ie]=Q,X[ie]=de,X[ie+1]=ve}for(let Q=0,ie=0;Q65535)throw new Error("glyphs > 65535 not supported");if(R.ranges[D])return{stack:c,id:x,glyph:L};if(!this.url)throw new Error("glyphsUrl is not set");if(!R.requests[D]){const Q=We.loadGlyphRange(c,D,this.url,this.requestManager);R.requests[D]=Q}const X=yield R.requests[D];for(const Q in X)this._doesCharSupportLocalGlyph(+Q)||(R.glyphs[+Q]=X[+Q]);return R.ranges[D]=!0,{stack:c,id:x,glyph:X[x]||null}})}_doesCharSupportLocalGlyph(c){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(c))}_tinySDF(c,x,R){const L=this.localIdeographFontFamily;if(!L||!this._doesCharSupportLocalGlyph(R))return;let D=c.tinySDF;if(!D){let Q="400";/bold/i.test(x)?Q="900":/medium/i.test(x)?Q="500":/light/i.test(x)&&(Q="200"),D=c.tinySDF=new We.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:L,fontWeight:Q})}const X=D.draw(String.fromCharCode(R));return{id:R,bitmap:new a.o({width:X.width||60,height:X.height||60},X.data),metrics:{width:X.glyphWidth/2||24,height:X.glyphHeight/2||24,left:X.glyphLeft/2+.5||0,top:X.glyphTop/2-27.5||-8,advance:X.glyphAdvance/2||24,isDoubleResolution:!0}}}}We.loadGlyphRange=function(z,c,x,R){return a._(this,void 0,void 0,function*(){const L=256*c,D=L+255,X=R.transformRequest(x.replace("{fontstack}",z).replace("{range}",`${L}-${D}`),"Glyphs"),Q=yield a.l(X,new AbortController);if(!Q||!Q.data)throw new Error(`Could not load glyph range. range: ${c}, ${L}-${D}`);const ie={};for(const de of a.n(Q.data))ie[de.id]=de;return ie})},We.TinySDF=class{constructor({fontSize:z=24,buffer:c=3,radius:x=8,cutoff:R=.25,fontFamily:L="sans-serif",fontWeight:D="normal",fontStyle:X="normal"}={}){this.buffer=c,this.cutoff=R,this.radius=x;const Q=this.size=z+4*c,ie=this._createCanvas(Q),de=this.ctx=ie.getContext("2d",{willReadFrequently:!0});de.font=`${X} ${D} ${z}px ${L}`,de.textBaseline="alphabetic",de.textAlign="left",de.fillStyle="black",this.gridOuter=new Float64Array(Q*Q),this.gridInner=new Float64Array(Q*Q),this.f=new Float64Array(Q),this.z=new Float64Array(Q+1),this.v=new Uint16Array(Q)}_createCanvas(z){const c=document.createElement("canvas");return c.width=c.height=z,c}draw(z){const{width:c,actualBoundingBoxAscent:x,actualBoundingBoxDescent:R,actualBoundingBoxLeft:L,actualBoundingBoxRight:D}=this.ctx.measureText(z),X=Math.ceil(x),Q=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(D-L))),ie=Math.min(this.size-this.buffer,X+Math.ceil(R)),de=Q+2*this.buffer,_e=ie+2*this.buffer,xe=Math.max(de*_e,0),Oe=new Uint8ClampedArray(xe),qe={data:Oe,width:de,height:_e,glyphWidth:Q,glyphHeight:ie,glyphTop:X,glyphLeft:0,glyphAdvance:c};if(Q===0||ie===0)return qe;const{ctx:tt,buffer:dt,gridInner:bt,gridOuter:St}=this;tt.clearRect(dt,dt,Q,ie),tt.fillText(z,dt,dt+X);const Pt=tt.getImageData(dt,dt,Q,ie);St.fill(ve,0,xe),bt.fill(0,0,xe);for(let ct=0;ct0?$r*$r:0,bt[sr]=$r<0?$r*$r:0}}Pe(St,0,0,de,_e,de,this.f,this.v,this.z),Pe(bt,dt,dt,Q,ie,de,this.f,this.v,this.z);for(let ct=0;ct1&&(ie=c[++Q]);const _e=Math.abs(de-ie.left),xe=Math.abs(de-ie.right),Oe=Math.min(_e,xe);let qe;const tt=D/R*(L+1);if(ie.isDash){const dt=L-Math.abs(tt);qe=Math.sqrt(Oe*Oe+dt*dt)}else qe=L-Math.sqrt(Oe*Oe+tt*tt);this.data[X+de]=Math.max(0,Math.min(255,qe+128))}}}addRegularDash(c){for(let Q=c.length-1;Q>=0;--Q){const ie=c[Q],de=c[Q+1];ie.zeroLength?c.splice(Q,1):de&&de.isDash===ie.isDash&&(de.left=ie.left,c.splice(Q,1))}const x=c[0],R=c[c.length-1];x.isDash===R.isDash&&(x.left=R.left-this.width,R.right=x.right+this.width);const L=this.width*this.nextRow;let D=0,X=c[D];for(let Q=0;Q1&&(X=c[++D]);const ie=Math.abs(Q-X.left),de=Math.abs(Q-X.right),_e=Math.min(ie,de);this.data[L+Q]=Math.max(0,Math.min(255,(X.isDash?_e:-_e)+128))}}addDash(c,x){const R=x?7:0,L=2*R+1;if(this.nextRow+L>this.height)return a.w("LineAtlas out of space"),null;let D=0;for(let Q=0;Q{x.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Je]}numActive(){return Object.keys(this.active).length}}const Ut=Math.floor(f.hardwareConcurrency/2);let tr,Se;function je(){return tr||(tr=new pr),tr}pr.workerCount=a.C(globalThis)?Math.max(Math.min(Ut,3),1):1;class et{constructor(c,x){this.workerPool=c,this.actors=[],this.currentActor=0,this.id=x;const R=this.workerPool.acquire(x);for(let L=0;L{x.remove()}),this.actors=[],c&&this.workerPool.release(this.id)}registerMessageHandler(c,x){for(const R of this.actors)R.registerMessageHandler(c,x)}}function yt(){return Se||(Se=new et(je(),a.G),Se.registerMessageHandler("GR",(z,c,x)=>a.m(c,x))),Se}function we(z,c){const x=a.H();return a.J(x,x,[1,1,0]),a.K(x,x,[.5*z.width,.5*z.height,1]),a.L(x,x,z.calculatePosMatrix(c.toUnwrapped()))}function ft(z,c,x,R,L,D){const X=function(xe,Oe,qe){if(xe)for(const tt of xe){const dt=Oe[tt];if(dt&&dt.source===qe&&dt.type==="fill-extrusion")return!0}else for(const tt in Oe){const dt=Oe[tt];if(dt.source===qe&&dt.type==="fill-extrusion")return!0}return!1}(L&&L.layers,c,z.id),Q=D.maxPitchScaleFactor(),ie=z.tilesIn(R,Q,X);ie.sort(qt);const de=[];for(const xe of ie)de.push({wrappedTileID:xe.tileID.wrapped().key,queryResults:xe.tile.queryRenderedFeatures(c,x,z._state,xe.queryGeometry,xe.cameraQueryGeometry,xe.scale,L,D,Q,we(z.transform,xe.tileID))});const _e=function(xe){const Oe={},qe={};for(const tt of xe){const dt=tt.queryResults,bt=tt.wrappedTileID,St=qe[bt]=qe[bt]||{};for(const Pt in dt){const ct=dt[Pt],Ht=St[Pt]=St[Pt]||{},Wt=Oe[Pt]=Oe[Pt]||[];for(const sr of ct)Ht[sr.featureIndex]||(Ht[sr.featureIndex]=!0,Wt.push(sr))}}return Oe}(de);for(const xe in _e)_e[xe].forEach(Oe=>{const qe=Oe.feature,tt=z.getFeatureState(qe.layer["source-layer"],qe.id);qe.source=qe.layer.source,qe.layer["source-layer"]&&(qe.sourceLayer=qe.layer["source-layer"]),qe.state=tt});return _e}function qt(z,c){const x=z.tileID,R=c.tileID;return x.overscaledZ-R.overscaledZ||x.canonical.y-R.canonical.y||x.wrap-R.wrap||x.canonical.x-R.canonical.x}function _r(z,c,x){return a._(this,void 0,void 0,function*(){let R=z;if(z.url?R=(yield a.h(c.transformRequest(z.url,"Source"),x)).data:yield f.frameAsync(x),!R)return null;const L=a.M(a.e(R,z),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in R&&R.vector_layers&&(L.vectorLayerIds=R.vector_layers.map(D=>D.id)),L})}class rt{constructor(c,x){c&&(x?this.setSouthWest(c).setNorthEast(x):Array.isArray(c)&&(c.length===4?this.setSouthWest([c[0],c[1]]).setNorthEast([c[2],c[3]]):this.setSouthWest(c[0]).setNorthEast(c[1])))}setNorthEast(c){return this._ne=c instanceof a.N?new a.N(c.lng,c.lat):a.N.convert(c),this}setSouthWest(c){return this._sw=c instanceof a.N?new a.N(c.lng,c.lat):a.N.convert(c),this}extend(c){const x=this._sw,R=this._ne;let L,D;if(c instanceof a.N)L=c,D=c;else{if(!(c instanceof rt))return Array.isArray(c)?c.length===4||c.every(Array.isArray)?this.extend(rt.convert(c)):this.extend(a.N.convert(c)):c&&("lng"in c||"lon"in c)&&"lat"in c?this.extend(a.N.convert(c)):this;if(L=c._sw,D=c._ne,!L||!D)return this}return x||R?(x.lng=Math.min(L.lng,x.lng),x.lat=Math.min(L.lat,x.lat),R.lng=Math.max(D.lng,R.lng),R.lat=Math.max(D.lat,R.lat)):(this._sw=new a.N(L.lng,L.lat),this._ne=new a.N(D.lng,D.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(c){const{lng:x,lat:R}=a.N.convert(c);let L=this._sw.lng<=x&&x<=this._ne.lng;return this._sw.lng>this._ne.lng&&(L=this._sw.lng>=x&&x>=this._ne.lng),this._sw.lat<=R&&R<=this._ne.lat&&L}static convert(c){return c instanceof rt?c:c&&new rt(c)}static fromLngLat(c,x=0){const R=360*x/40075017,L=R/Math.cos(Math.PI/180*c.lat);return new rt(new a.N(c.lng-L,c.lat-R),new a.N(c.lng+L,c.lat+R))}adjustAntiMeridian(){const c=new a.N(this._sw.lng,this._sw.lat),x=new a.N(this._ne.lng,this._ne.lat);return new rt(c,c.lng>x.lng?new a.N(x.lng+360,x.lat):x)}}class Xe{constructor(c,x,R){this.bounds=rt.convert(this.validateBounds(c)),this.minzoom=x||0,this.maxzoom=R||24}validateBounds(c){return Array.isArray(c)&&c.length===4?[Math.max(-180,c[0]),Math.max(-90,c[1]),Math.min(180,c[2]),Math.min(90,c[3])]:[-180,-90,180,90]}contains(c){const x=Math.pow(2,c.z),R=Math.floor(a.O(this.bounds.getWest())*x),L=Math.floor(a.Q(this.bounds.getNorth())*x),D=Math.ceil(a.O(this.bounds.getEast())*x),X=Math.ceil(a.Q(this.bounds.getSouth())*x);return c.x>=R&&c.x=L&&c.y{this._options.tiles=c}),this}setUrl(c){return this.setSourceProperty(()=>{this.url=c,this._options.url=c}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(c){return a._(this,void 0,void 0,function*(){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),R={request:this.map._requestManager.transformRequest(x,"Tile"),uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,tileSize:this.tileSize*c.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};R.request.collectResourceTiming=this._collectResourceTiming;let L="RT";if(c.actor&&c.state!=="expired"){if(c.state==="loading")return new Promise((D,X)=>{c.reloadPromise={resolve:D,reject:X}})}else c.actor=this.dispatcher.getActor(),L="LT";c.abortController=new AbortController;try{const D=yield c.actor.sendAsync({type:L,data:R},c.abortController);if(delete c.abortController,c.aborted)return;this._afterTileLoadWorkerResponse(c,D)}catch(D){if(delete c.abortController,c.aborted)return;if(D&&D.status!==404)throw D;this._afterTileLoadWorkerResponse(c,null)}})}_afterTileLoadWorkerResponse(c,x){if(x&&x.resourceTiming&&(c.resourceTiming=x.resourceTiming),x&&this.map._refreshExpiredTiles&&c.setExpiryData(x),c.loadVectorData(x,this.map.painter),c.reloadPromise){const R=c.reloadPromise;c.reloadPromise=null,this.loadTile(c).then(R.resolve).catch(R.reject)}}abortTile(c){return a._(this,void 0,void 0,function*(){c.abortController&&(c.abortController.abort(),delete c.abortController),c.actor&&(yield c.actor.sendAsync({type:"AT",data:{uid:c.uid,type:this.type,source:this.id}}))})}unloadTile(c){return a._(this,void 0,void 0,function*(){c.unloadVectorData(),c.actor&&(yield c.actor.sendAsync({type:"RMT",data:{uid:c.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class it extends a.E{constructor(c,x,R,L){super(),this.id=c,this.dispatcher=R,this.setEventedParent(L),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},x),a.e(this,a.M(x,["url","scheme","tileSize"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const c=yield _r(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,c&&(a.e(this,c),c.bounds&&(this.tileBounds=new Xe(c.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(c){this._tileJSONRequest=null,this.fire(new a.j(c))}})}loaded(){return this._loaded}onAdd(c){this.map=c,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(c){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),c(),this.load()}setTiles(c){return this.setSourceProperty(()=>{this._options.tiles=c}),this}setUrl(c){return this.setSourceProperty(()=>{this.url=c,this._options.url=c}),this}serialize(){return a.e({},this._options)}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}loadTile(c){return a._(this,void 0,void 0,function*(){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);c.abortController=new AbortController;try{const R=yield j.getImage(this.map._requestManager.transformRequest(x,"Tile"),c.abortController,this.map._refreshExpiredTiles);if(delete c.abortController,c.aborted)return void(c.state="unloaded");if(R&&R.data){this.map._refreshExpiredTiles&&R.cacheControl&&R.expires&&c.setExpiryData({cacheControl:R.cacheControl,expires:R.expires});const L=this.map.painter.context,D=L.gl,X=R.data;c.texture=this.map.painter.getTileTexture(X.width),c.texture?c.texture.update(X,{useMipmap:!0}):(c.texture=new ee(L,X,D.RGBA,{useMipmap:!0}),c.texture.bind(D.LINEAR,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST)),c.state="loaded"}}catch(R){if(delete c.abortController,c.aborted)c.state="unloaded";else if(R)throw c.state="errored",R}})}abortTile(c){return a._(this,void 0,void 0,function*(){c.abortController&&(c.abortController.abort(),delete c.abortController)})}unloadTile(c){return a._(this,void 0,void 0,function*(){c.texture&&this.map.painter.saveTileTexture(c.texture)})}hasTransition(){return!1}}class Xt extends it{constructor(c,x,R,L){super(c,x,R,L),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},x),this.encoding=x.encoding||"mapbox",this.redFactor=x.redFactor,this.greenFactor=x.greenFactor,this.blueFactor=x.blueFactor,this.baseShift=x.baseShift}loadTile(c){return a._(this,void 0,void 0,function*(){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),R=this.map._requestManager.transformRequest(x,"Tile");c.neighboringTiles=this._getNeighboringTiles(c.tileID),c.abortController=new AbortController;try{const L=yield j.getImage(R,c.abortController,this.map._refreshExpiredTiles);if(delete c.abortController,c.aborted)return void(c.state="unloaded");if(L&&L.data){const D=L.data;this.map._refreshExpiredTiles&&L.cacheControl&&L.expires&&c.setExpiryData({cacheControl:L.cacheControl,expires:L.expires});const X=a.b(D)&&a.U()?D:yield this.readImageNow(D),Q={type:this.type,uid:c.uid,source:this.id,rawImageData:X,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!c.actor||c.state==="expired"){c.actor=this.dispatcher.getActor();const ie=yield c.actor.sendAsync({type:"LDT",data:Q});c.dem=ie,c.needsHillshadePrepare=!0,c.needsTerrainPrepare=!0,c.state="loaded"}}}catch(L){if(delete c.abortController,c.aborted)c.state="unloaded";else if(L)throw c.state="errored",L}})}readImageNow(c){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&a.V()){const x=c.width+2,R=c.height+2;try{return new a.R({width:x,height:R},yield a.W(c,-1,-1,x,R))}catch{}}return f.getImageData(c,1)})}_getNeighboringTiles(c){const x=c.canonical,R=Math.pow(2,x.z),L=(x.x-1+R)%R,D=x.x===0?c.wrap-1:c.wrap,X=(x.x+1+R)%R,Q=x.x+1===R?c.wrap+1:c.wrap,ie={};return ie[new a.S(c.overscaledZ,D,x.z,L,x.y).key]={backfilled:!1},ie[new a.S(c.overscaledZ,Q,x.z,X,x.y).key]={backfilled:!1},x.y>0&&(ie[new a.S(c.overscaledZ,D,x.z,L,x.y-1).key]={backfilled:!1},ie[new a.S(c.overscaledZ,c.wrap,x.z,x.x,x.y-1).key]={backfilled:!1},ie[new a.S(c.overscaledZ,Q,x.z,X,x.y-1).key]={backfilled:!1}),x.y+10&&a.e(D,{resourceTiming:L}),this.fire(new a.k("data",Object.assign(Object.assign({},D),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},D),{sourceDataType:"content"})))}catch(R){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(R))}})}loaded(){return this._pendingLoads===0}loadTile(c){return a._(this,void 0,void 0,function*(){const x=c.actor?"RT":"LT";c.actor=this.actor;const R={type:this.type,uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};c.abortController=new AbortController;const L=yield this.actor.sendAsync({type:x,data:R},c.abortController);delete c.abortController,c.unloadVectorData(),c.aborted||c.loadVectorData(L,this.map.painter,x==="RT")})}abortTile(c){return a._(this,void 0,void 0,function*(){c.abortController&&(c.abortController.abort(),delete c.abortController),c.aborted=!0})}unloadTile(c){return a._(this,void 0,void 0,function*(){c.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:c.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Ur=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class In extends a.E{constructor(c,x,R,L){super(),this.id=c,this.dispatcher=R,this.coordinates=x.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(L),this.options=x}load(c){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const x=yield j.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,x&&x.data&&(this.image=x.data,c&&(this.coordinates=c),this._finishLoading())}catch(x){this._request=null,this._loaded=!0,this.fire(new a.j(x))}})}loaded(){return this._loaded}updateImage(c){return c.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=c.url,this.load(c.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(c){this.map=c,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(c){this.coordinates=c;const x=c.map(a.Z.fromLngLat);this.tileID=function(L){let D=1/0,X=1/0,Q=-1/0,ie=-1/0;for(const Oe of L)D=Math.min(D,Oe.x),X=Math.min(X,Oe.y),Q=Math.max(Q,Oe.x),ie=Math.max(ie,Oe.y);const de=Math.max(Q-D,ie-X),_e=Math.max(0,Math.floor(-Math.log(de)/Math.LN2)),xe=Math.pow(2,_e);return new a.a1(_e,Math.floor((D+Q)/2*xe),Math.floor((X+ie)/2*xe))}(x),this.minzoom=this.maxzoom=this.tileID.z;const R=x.map(L=>this.tileID.getTilePoint(L)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(R[0].x,R[0].y,0,0),this._boundsArray.emplaceBack(R[1].x,R[1].y,a.X,0),this._boundsArray.emplaceBack(R[3].x,R[3].y,0,a.X),this._boundsArray.emplaceBack(R[2].x,R[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const c=this.map.painter.context,x=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,Ur.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new ee(c,this.image,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let R=!1;for(const L in this.tiles){const D=this.tiles[L];D.state!=="loaded"&&(D.state="loaded",D.texture=this.texture,R=!0)}R&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(c){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(c.tileID.canonical)?(this.tiles[String(c.tileID.wrap)]=c,c.buckets={}):c.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Rr extends In{constructor(c,x,R,L){super(c,x,R,L),this.roundZoom=!0,this.type="video",this.options=x}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;const c=this.options;this.urls=[];for(const x of c.urls)this.urls.push(this.map._requestManager.transformRequest(x,"Source").url);try{const x=yield a.a3(this.urls);if(this._loaded=!0,!x)return;this.video=x,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(x){this.fire(new a.j(x))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(c){if(this.video){const x=this.video.seekable;cx.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${x.start(0)} and ${x.end(0)}-second mark.`))):this.video.currentTime=c}}getVideo(){return this.video}onAdd(c){this.map||(this.map=c,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const c=this.map.painter.context,x=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,Ur.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE),x.texSubImage2D(x.TEXTURE_2D,0,0,0,x.RGBA,x.UNSIGNED_BYTE,this.video)):(this.texture=new ee(c,this.video,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let R=!1;for(const L in this.tiles){const D=this.tiles[L];D.state!=="loaded"&&(D.state="loaded",D.texture=this.texture,R=!0)}R&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class mn extends In{constructor(c,x,R,L){super(c,x,R,L),x.coordinates?Array.isArray(x.coordinates)&&x.coordinates.length===4&&!x.coordinates.some(D=>!Array.isArray(D)||D.length!==2||D.some(X=>typeof X!="number"))||this.fire(new a.j(new a.a2(`sources.${c}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${c}`,null,'missing required property "coordinates"'))),x.animate&&typeof x.animate!="boolean"&&this.fire(new a.j(new a.a2(`sources.${c}`,null,'optional "animate" property must be a boolean value'))),x.canvas?typeof x.canvas=="string"||x.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${c}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${c}`,null,'missing required property "canvas"'))),this.options=x,this.animate=x.animate===void 0||x.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(c){this.map=c,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let c=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,c=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,c=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const x=this.map.painter.context,R=x.gl;this.boundsBuffer||(this.boundsBuffer=x.createVertexBuffer(this._boundsArray,Ur.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(c||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ee(x,this.canvas,R.RGBA,{premultiply:!0});let L=!1;for(const D in this.tiles){const X=this.tiles[D];X.state!=="loaded"&&(X.state="loaded",X.texture=this.texture,L=!0)}L&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const c of[this.canvas.width,this.canvas.height])if(isNaN(c)||c<=0)return!0;return!1}}const Kr={},Ft=z=>{switch(z){case"geojson":return xr;case"image":return In;case"raster":return it;case"raster-dem":return Xt;case"vector":return Ze;case"video":return Rr;case"canvas":return mn}return Kr[z]},xt="RTLPluginLoaded";class vr extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=yt()}_syncState(c){return this.status=c,this.dispatcher.broadcast("SRPS",{pluginStatus:c,pluginURL:this.url}).catch(x=>{throw this.status="error",x})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(c){return a._(this,arguments,void 0,function*(x,R=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=f.resolveURL(x),!this.url)throw new Error(`requested url ${x} is invalid`);if(this.status==="unavailable"){if(!R)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(xt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Mr=null;function ar(){return Mr||(Mr=new vr),Mr}class ni{constructor(c,x){this.timeAdded=0,this.fadeEndTime=0,this.tileID=c,this.uid=a.a4(),this.uses=0,this.tileSize=x,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(c){const x=c+this.timeAdded;xD.getLayer(de)).filter(Boolean);if(ie.length!==0){Q.layers=ie,Q.stateDependentLayerIds&&(Q.stateDependentLayers=Q.stateDependentLayerIds.map(de=>ie.filter(_e=>_e.id===de)[0]));for(const de of ie)X[de.id]=Q}}return X}(c.buckets,x.style),this.hasSymbolBuckets=!1;for(const L in this.buckets){const D=this.buckets[L];if(D instanceof a.a6){if(this.hasSymbolBuckets=!0,!R)break;D.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const L in this.buckets){const D=this.buckets[L];if(D instanceof a.a6&&D.hasRTLText){this.hasRTLText=!0,ar().lazyLoad();break}}this.queryPadding=0;for(const L in this.buckets){const D=this.buckets[L];this.queryPadding=Math.max(this.queryPadding,x.style.getLayer(L).queryRadius(D))}c.imageAtlas&&(this.imageAtlas=c.imageAtlas),c.glyphAtlasImage&&(this.glyphAtlasImage=c.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(const c in this.buckets)this.buckets[c].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(c){return this.buckets[c.id]}upload(c){for(const R in this.buckets){const L=this.buckets[R];L.uploadPending()&&L.upload(c)}const x=c.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ee(c,this.imageAtlas.image,x.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ee(c,this.glyphAtlasImage,x.ALPHA),this.glyphAtlasImage=null)}prepare(c){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(c,this.imageAtlasTexture)}queryRenderedFeatures(c,x,R,L,D,X,Q,ie,de,_e){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:L,cameraQueryGeometry:D,scale:X,tileSize:this.tileSize,pixelPosMatrix:_e,transform:ie,params:Q,queryPadding:this.queryPadding*de},c,x,R):{}}querySourceFeatures(c,x){const R=this.latestFeatureIndex;if(!R||!R.rawTileData)return;const L=R.loadVTLayers(),D=x&&x.sourceLayer?x.sourceLayer:"",X=L._geojsonTileLayer||L[D];if(!X)return;const Q=a.a7(x&&x.filter),{z:ie,x:de,y:_e}=this.tileID.canonical,xe={z:ie,x:de,y:_e};for(let Oe=0;OeR)L=!1;else if(x)if(this.expirationTime{this.remove(c,D)},R)),this.data[L].push(D),this.order.push(L),this.order.length>this.max){const X=this._getAndRemoveByKey(this.order[0]);X&&this.onRemove(X)}return this}has(c){return c.wrapped().key in this.data}getAndRemove(c){return this.has(c)?this._getAndRemoveByKey(c.wrapped().key):null}_getAndRemoveByKey(c){const x=this.data[c].shift();return x.timeout&&clearTimeout(x.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),x.value}getByKey(c){const x=this.data[c];return x?x[0].value:null}get(c){return this.has(c)?this.data[c.wrapped().key][0].value:null}remove(c,x){if(!this.has(c))return this;const R=c.wrapped().key,L=x===void 0?0:this.data[R].indexOf(x),D=this.data[R][L];return this.data[R].splice(L,1),D.timeout&&clearTimeout(D.timeout),this.data[R].length===0&&delete this.data[R],this.onRemove(D.value),this.order.splice(this.order.indexOf(R),1),this}setMaxSize(c){for(this.max=c;this.order.length>this.max;){const x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this}filter(c){const x=[];for(const R in this.data)for(const L of this.data[R])c(L.value)||x.push(L);for(const R of x)this.remove(R.value.tileID,R)}}class vt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(c,x,R){const L=String(x);if(this.stateChanges[c]=this.stateChanges[c]||{},this.stateChanges[c][L]=this.stateChanges[c][L]||{},a.e(this.stateChanges[c][L],R),this.deletedStates[c]===null){this.deletedStates[c]={};for(const D in this.state[c])D!==L&&(this.deletedStates[c][D]=null)}else if(this.deletedStates[c]&&this.deletedStates[c][L]===null){this.deletedStates[c][L]={};for(const D in this.state[c][L])R[D]||(this.deletedStates[c][L][D]=null)}else for(const D in R)this.deletedStates[c]&&this.deletedStates[c][L]&&this.deletedStates[c][L][D]===null&&delete this.deletedStates[c][L][D]}removeFeatureState(c,x,R){if(this.deletedStates[c]===null)return;const L=String(x);if(this.deletedStates[c]=this.deletedStates[c]||{},R&&x!==void 0)this.deletedStates[c][L]!==null&&(this.deletedStates[c][L]=this.deletedStates[c][L]||{},this.deletedStates[c][L][R]=null);else if(x!==void 0)if(this.stateChanges[c]&&this.stateChanges[c][L])for(R in this.deletedStates[c][L]={},this.stateChanges[c][L])this.deletedStates[c][L][R]=null;else this.deletedStates[c][L]=null;else this.deletedStates[c]=null}getState(c,x){const R=String(x),L=a.e({},(this.state[c]||{})[R],(this.stateChanges[c]||{})[R]);if(this.deletedStates[c]===null)return{};if(this.deletedStates[c]){const D=this.deletedStates[c][x];if(D===null)return{};for(const X in D)delete L[X]}return L}initializeTileState(c,x){c.setFeatureState(this.state,x)}coalesceChanges(c,x){const R={};for(const L in this.stateChanges){this.state[L]=this.state[L]||{};const D={};for(const X in this.stateChanges[L])this.state[L][X]||(this.state[L][X]={}),a.e(this.state[L][X],this.stateChanges[L][X]),D[X]=this.state[L][X];R[L]=D}for(const L in this.deletedStates){this.state[L]=this.state[L]||{};const D={};if(this.deletedStates[L]===null)for(const X in this.state[L])D[X]={},this.state[L][X]={};else for(const X in this.deletedStates[L]){if(this.deletedStates[L][X]===null)this.state[L][X]={};else for(const Q of Object.keys(this.deletedStates[L][X]))delete this.state[L][X][Q];D[X]=this.state[L][X]}R[L]=R[L]||{},a.e(R[L],D)}if(this.stateChanges={},this.deletedStates={},Object.keys(R).length!==0)for(const L in c)c[L].setFeatureState(R,x)}}class ot extends a.E{constructor(c,x,R){super(),this.id=c,this.dispatcher=R,this.on("data",L=>this._dataHandler(L)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((L,D,X,Q)=>{const ie=new(Ft(D.type))(L,D,X,Q);if(ie.id!==L)throw new Error(`Expected Source id to be ${L} instead of ${ie.id}`);return ie})(c,x,R,this),this._tiles={},this._cache=new or(0,L=>this._unloadTile(L)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new vt,this._didEmitContent=!1,this._updated=!1}onAdd(c){this.map=c,this._maxTileCacheSize=c?c._maxTileCacheSize:null,this._maxTileCacheZoomLevels=c?c._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(c)}onRemove(c){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(c)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const c in this._tiles){const x=this._tiles[c];if(x.state!=="loaded"&&x.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const c=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,c&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(c,x,R){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(c),this._tileLoaded(c,x,R)}catch(L){c.state="errored",L.status!==404?this._source.fire(new a.j(L,{tile:c})):this.update(this.transform,this.terrain)}})}_unloadTile(c){this._source.unloadTile&&this._source.unloadTile(c)}_abortTile(c){this._source.abortTile&&this._source.abortTile(c),this._source.fire(new a.k("dataabort",{tile:c,coord:c.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(c){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const x in this._tiles){const R=this._tiles[x];R.upload(c),R.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(c=>c.tileID).sort(lr).map(c=>c.key)}getRenderableIds(c){const x=[];for(const R in this._tiles)this._isIdRenderable(R,c)&&x.push(this._tiles[R]);return c?x.sort((R,L)=>{const D=R.tileID,X=L.tileID,Q=new a.P(D.canonical.x,D.canonical.y)._rotate(this.transform.angle),ie=new a.P(X.canonical.x,X.canonical.y)._rotate(this.transform.angle);return D.overscaledZ-X.overscaledZ||ie.y-Q.y||ie.x-Q.x}).map(R=>R.tileID.key):x.map(R=>R.tileID).sort(lr).map(R=>R.key)}hasRenderableParent(c){const x=this.findLoadedParent(c,0);return!!x&&this._isIdRenderable(x.tileID.key)}_isIdRenderable(c,x){return this._tiles[c]&&this._tiles[c].hasData()&&!this._coveredTiles[c]&&(x||!this._tiles[c].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const c in this._tiles)this._tiles[c].state!=="errored"&&this._reloadTile(c,"reloading")}}_reloadTile(c,x){return a._(this,void 0,void 0,function*(){const R=this._tiles[c];R&&(R.state!=="loading"&&(R.state=x),yield this._loadTile(R,c,x))})}_tileLoaded(c,x,R){c.timeAdded=f.now(),R==="expired"&&(c.refreshedUponExpiration=!0),this._setTileReloadTimer(x,c),this.getSource().type==="raster-dem"&&c.dem&&this._backfillDEM(c),this._state.initializeTileState(c,this.map?this.map.painter:null),c.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:c,coord:c.tileID}))}_backfillDEM(c){const x=this.getRenderableIds();for(let L=0;L1||(Math.abs(X)>1&&(Math.abs(X+ie)===1?X+=ie:Math.abs(X-ie)===1&&(X-=ie)),D.dem&&L.dem&&(L.dem.backfillBorder(D.dem,X,Q),L.neighboringTiles&&L.neighboringTiles[de]&&(L.neighboringTiles[de].backfilled=!0)))}}getTile(c){return this.getTileByID(c.key)}getTileByID(c){return this._tiles[c]}_retainLoadedChildren(c,x,R,L){for(const D in this._tiles){let X=this._tiles[D];if(L[D]||!X.hasData()||X.tileID.overscaledZ<=x||X.tileID.overscaledZ>R)continue;let Q=X.tileID;for(;X&&X.tileID.overscaledZ>x+1;){const de=X.tileID.scaledTo(X.tileID.overscaledZ-1);X=this._tiles[de.key],X&&X.hasData()&&(Q=de)}let ie=Q;for(;ie.overscaledZ>x;)if(ie=ie.scaledTo(ie.overscaledZ-1),c[ie.key]){L[Q.key]=Q;break}}}findLoadedParent(c,x){if(c.key in this._loadedParentTiles){const R=this._loadedParentTiles[c.key];return R&&R.tileID.overscaledZ>=x?R:null}for(let R=c.overscaledZ-1;R>=x;R--){const L=c.scaledTo(R),D=this._getLoadedTile(L);if(D)return D}}findLoadedSibling(c){return this._getLoadedTile(c)}_getLoadedTile(c){const x=this._tiles[c.key];return x&&x.hasData()?x:this._cache.getByKey(c.wrapped().key)}updateCacheSize(c){const x=Math.ceil(c.width/this._source.tileSize)+1,R=Math.ceil(c.height/this._source.tileSize)+1,L=Math.floor(x*R*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),D=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,L):L;this._cache.setMaxSize(D)}handleWrapJump(c){const x=Math.round((c-(this._prevLng===void 0?c:this._prevLng))/360);if(this._prevLng=c,x){const R={};for(const L in this._tiles){const D=this._tiles[L];D.tileID=D.tileID.unwrapTo(D.tileID.wrap+x),R[D.tileID.key]=D}this._tiles=R;for(const L in this._timers)clearTimeout(this._timers[L]),delete this._timers[L];for(const L in this._tiles)this._setTileReloadTimer(L,this._tiles[L])}}_updateCoveredAndRetainedTiles(c,x,R,L,D,X){const Q={},ie={},de=Object.keys(c),_e=f.now();for(const xe of de){const Oe=c[xe],qe=this._tiles[xe];if(!qe||qe.fadeEndTime!==0&&qe.fadeEndTime<=_e)continue;const tt=this.findLoadedParent(Oe,x),dt=this.findLoadedSibling(Oe),bt=tt||dt||null;bt&&(this._addTile(bt.tileID),Q[bt.tileID.key]=bt.tileID),ie[xe]=Oe}this._retainLoadedChildren(ie,L,R,c);for(const xe in Q)c[xe]||(this._coveredTiles[xe]=!0,c[xe]=Q[xe]);if(X){const xe={},Oe={};for(const qe of D)this._tiles[qe.key].hasData()?xe[qe.key]=qe:Oe[qe.key]=qe;for(const qe in Oe){const tt=Oe[qe].children(this._source.maxzoom);this._tiles[tt[0].key]&&this._tiles[tt[1].key]&&this._tiles[tt[2].key]&&this._tiles[tt[3].key]&&(xe[tt[0].key]=c[tt[0].key]=tt[0],xe[tt[1].key]=c[tt[1].key]=tt[1],xe[tt[2].key]=c[tt[2].key]=tt[2],xe[tt[3].key]=c[tt[3].key]=tt[3],delete Oe[qe])}for(const qe in Oe){const tt=Oe[qe],dt=this.findLoadedParent(tt,this._source.minzoom),bt=this.findLoadedSibling(tt),St=dt||bt||null;if(St){xe[St.tileID.key]=c[St.tileID.key]=St.tileID;for(const Pt in xe)xe[Pt].isChildOf(St.tileID)&&delete xe[Pt]}}for(const qe in this._tiles)xe[qe]||(this._coveredTiles[qe]=!0)}}update(c,x){if(!this._sourceLoaded||this._paused)return;let R;this.transform=c,this.terrain=x,this.updateCacheSize(c),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?R=c.getVisibleUnwrappedCoordinates(this._source.tileID).map(_e=>new a.S(_e.canonical.z,_e.wrap,_e.canonical.z,_e.canonical.x,_e.canonical.y)):(R=c.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:x}),this._source.hasTile&&(R=R.filter(_e=>this._source.hasTile(_e)))):R=[];const L=c.coveringZoomLevel(this._source),D=Math.max(L-ot.maxOverzooming,this._source.minzoom),X=Math.max(L+ot.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const _e={};for(const xe of R)if(xe.canonical.z>this._source.minzoom){const Oe=xe.scaledTo(xe.canonical.z-1);_e[Oe.key]=Oe;const qe=xe.scaledTo(Math.max(this._source.minzoom,Math.min(xe.canonical.z,5)));_e[qe.key]=qe}R=R.concat(Object.values(_e))}const Q=R.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Q&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const ie=this._updateRetainedTiles(R,L);br(this._source.type)&&this._updateCoveredAndRetainedTiles(ie,D,X,L,R,x);for(const _e in ie)this._tiles[_e].clearFadeHold();const de=a.ab(this._tiles,ie);for(const _e of de){const xe=this._tiles[_e];xe.hasSymbolBuckets&&!xe.holdingForFade()?xe.setHoldDuration(this.map._fadeDuration):xe.hasSymbolBuckets&&!xe.symbolFadeFinished()||this._removeTile(_e)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const c in this._tiles)this._tiles[c].holdingForFade()&&this._removeTile(c)}_updateRetainedTiles(c,x){var R;const L={},D={},X=Math.max(x-ot.maxOverzooming,this._source.minzoom),Q=Math.max(x+ot.maxUnderzooming,this._source.minzoom),ie={};for(const de of c){const _e=this._addTile(de);L[de.key]=de,_e.hasData()||xthis._source.maxzoom){const Oe=de.children(this._source.maxzoom)[0],qe=this.getTile(Oe);if(qe&&qe.hasData()){L[Oe.key]=Oe;continue}}else{const Oe=de.children(this._source.maxzoom);if(L[Oe[0].key]&&L[Oe[1].key]&&L[Oe[2].key]&&L[Oe[3].key])continue}let xe=_e.wasRequested();for(let Oe=de.overscaledZ-1;Oe>=X;--Oe){const qe=de.scaledTo(Oe);if(D[qe.key])break;if(D[qe.key]=!0,_e=this.getTile(qe),!_e&&xe&&(_e=this._addTile(qe)),_e){const tt=_e.hasData();if((tt||!(!((R=this.map)===null||R===void 0)&&R.cancelPendingTileRequestsWhileZooming)||xe)&&(L[qe.key]=qe),xe=_e.wasRequested(),tt)break}}}return L}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const c in this._tiles){const x=[];let R,L=this._tiles[c].tileID;for(;L.overscaledZ>0;){if(L.key in this._loadedParentTiles){R=this._loadedParentTiles[L.key];break}x.push(L.key);const D=L.scaledTo(L.overscaledZ-1);if(R=this._getLoadedTile(D),R)break;L=D}for(const D of x)this._loadedParentTiles[D]=R}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const c in this._tiles){const x=this._tiles[c].tileID,R=this._getLoadedTile(x);this._loadedSiblingTiles[x.key]=R}}_addTile(c){let x=this._tiles[c.key];if(x)return x;x=this._cache.getAndRemove(c),x&&(this._setTileReloadTimer(c.key,x),x.tileID=c,this._state.initializeTileState(x,this.map?this.map.painter:null),this._cacheTimers[c.key]&&(clearTimeout(this._cacheTimers[c.key]),delete this._cacheTimers[c.key],this._setTileReloadTimer(c.key,x)));const R=x;return x||(x=new ni(c,this._source.tileSize*c.overscaleFactor()),this._loadTile(x,c.key,x.state)),x.uses++,this._tiles[c.key]=x,R||this._source.fire(new a.k("dataloading",{tile:x,coord:x.tileID,dataType:"source"})),x}_setTileReloadTimer(c,x){c in this._timers&&(clearTimeout(this._timers[c]),delete this._timers[c]);const R=x.getExpiryTimeout();R&&(this._timers[c]=setTimeout(()=>{this._reloadTile(c,"expired"),delete this._timers[c]},R))}_removeTile(c){const x=this._tiles[c];x&&(x.uses--,delete this._tiles[c],this._timers[c]&&(clearTimeout(this._timers[c]),delete this._timers[c]),x.uses>0||(x.hasData()&&x.state!=="reloading"?this._cache.add(x.tileID,x,x.getExpiryTimeout()):(x.aborted=!0,this._abortTile(x),this._unloadTile(x))))}_dataHandler(c){const x=c.sourceDataType;c.dataType==="source"&&x==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&c.dataType==="source"&&x==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const c in this._tiles)this._removeTile(c);this._cache.reset()}tilesIn(c,x,R){const L=[],D=this.transform;if(!D)return L;const X=R?D.getCameraQueryGeometry(c):c,Q=c.map(tt=>D.pointCoordinate(tt,this.terrain)),ie=X.map(tt=>D.pointCoordinate(tt,this.terrain)),de=this.getIds();let _e=1/0,xe=1/0,Oe=-1/0,qe=-1/0;for(const tt of ie)_e=Math.min(_e,tt.x),xe=Math.min(xe,tt.y),Oe=Math.max(Oe,tt.x),qe=Math.max(qe,tt.y);for(let tt=0;tt=0&&ct[1].y+Pt>=0){const Ht=Q.map(sr=>bt.getTilePoint(sr)),Wt=ie.map(sr=>bt.getTilePoint(sr));L.push({tile:dt,tileID:bt,queryGeometry:Ht,cameraQueryGeometry:Wt,scale:St})}}return L}getVisibleCoordinates(c){const x=this.getRenderableIds(c).map(R=>this._tiles[R].tileID);for(const R of x)R.posMatrix=this.transform.calculatePosMatrix(R.toUnwrapped());return x}hasTransition(){if(this._source.hasTransition())return!0;if(br(this._source.type)){const c=f.now();for(const x in this._tiles)if(this._tiles[x].fadeEndTime>=c)return!0}return!1}setFeatureState(c,x,R){this._state.updateState(c=c||"_geojsonTileLayer",x,R)}removeFeatureState(c,x,R){this._state.removeFeatureState(c=c||"_geojsonTileLayer",x,R)}getFeatureState(c,x){return this._state.getState(c=c||"_geojsonTileLayer",x)}setDependencies(c,x,R){const L=this._tiles[c];L&&L.setDependencies(x,R)}reloadTilesForDependencies(c,x){for(const R in this._tiles)this._tiles[R].hasDependency(c,x)&&this._reloadTile(R,"reloading");this._cache.filter(R=>!R.hasDependency(c,x))}}function lr(z,c){const x=Math.abs(2*z.wrap)-+(z.wrap<0),R=Math.abs(2*c.wrap)-+(c.wrap<0);return z.overscaledZ-c.overscaledZ||R-x||c.canonical.y-z.canonical.y||c.canonical.x-z.canonical.x}function br(z){return z==="raster"||z==="image"||z==="video"}ot.maxOverzooming=10,ot.maxUnderzooming=3;class Tr{constructor(c,x){this.reset(c,x)}reset(c,x){this.points=c||[],this._distances=[0];for(let R=1;R0?(L-X)/Q:0;return this.points[D].mult(1-ie).add(this.points[x].mult(ie))}}function Zn(z,c){let x=!0;return z==="always"||z!=="never"&&c!=="never"||(x=!1),x}class Gi{constructor(c,x,R){const L=this.boxCells=[],D=this.circleCells=[];this.xCellCount=Math.ceil(c/R),this.yCellCount=Math.ceil(x/R);for(let X=0;Xthis.width||L<0||x>this.height)return[];const ie=[];if(c<=0&&x<=0&&this.width<=R&&this.height<=L){if(D)return[{key:null,x1:c,y1:x,x2:R,y2:L}];for(let de=0;de0}hitTestCircle(c,x,R,L,D){const X=c-R,Q=c+R,ie=x-R,de=x+R;if(Q<0||X>this.width||de<0||ie>this.height)return!1;const _e=[];return this._forEachCell(X,ie,Q,de,this._queryCellCircle,_e,{hitTest:!0,overlapMode:L,circle:{x:c,y:x,radius:R},seenUids:{box:{},circle:{}}},D),_e.length>0}_queryCell(c,x,R,L,D,X,Q,ie){const{seenUids:de,hitTest:_e,overlapMode:xe}=Q,Oe=this.boxCells[D];if(Oe!==null){const tt=this.bboxes;for(const dt of Oe)if(!de.box[dt]){de.box[dt]=!0;const bt=4*dt,St=this.boxKeys[dt];if(c<=tt[bt+2]&&x<=tt[bt+3]&&R>=tt[bt+0]&&L>=tt[bt+1]&&(!ie||ie(St))&&(!_e||!Zn(xe,St.overlapMode))&&(X.push({key:St,x1:tt[bt],y1:tt[bt+1],x2:tt[bt+2],y2:tt[bt+3]}),_e))return!0}}const qe=this.circleCells[D];if(qe!==null){const tt=this.circles;for(const dt of qe)if(!de.circle[dt]){de.circle[dt]=!0;const bt=3*dt,St=this.circleKeys[dt];if(this._circleAndRectCollide(tt[bt],tt[bt+1],tt[bt+2],c,x,R,L)&&(!ie||ie(St))&&(!_e||!Zn(xe,St.overlapMode))){const Pt=tt[bt],ct=tt[bt+1],Ht=tt[bt+2];if(X.push({key:St,x1:Pt-Ht,y1:ct-Ht,x2:Pt+Ht,y2:ct+Ht}),_e)return!0}}}return!1}_queryCellCircle(c,x,R,L,D,X,Q,ie){const{circle:de,seenUids:_e,overlapMode:xe}=Q,Oe=this.boxCells[D];if(Oe!==null){const tt=this.bboxes;for(const dt of Oe)if(!_e.box[dt]){_e.box[dt]=!0;const bt=4*dt,St=this.boxKeys[dt];if(this._circleAndRectCollide(de.x,de.y,de.radius,tt[bt+0],tt[bt+1],tt[bt+2],tt[bt+3])&&(!ie||ie(St))&&!Zn(xe,St.overlapMode))return X.push(!0),!0}}const qe=this.circleCells[D];if(qe!==null){const tt=this.circles;for(const dt of qe)if(!_e.circle[dt]){_e.circle[dt]=!0;const bt=3*dt,St=this.circleKeys[dt];if(this._circlesCollide(tt[bt],tt[bt+1],tt[bt+2],de.x,de.y,de.radius)&&(!ie||ie(St))&&!Zn(xe,St.overlapMode))return X.push(!0),!0}}}_forEachCell(c,x,R,L,D,X,Q,ie){const de=this._convertToXCellCoord(c),_e=this._convertToYCellCoord(x),xe=this._convertToXCellCoord(R),Oe=this._convertToYCellCoord(L);for(let qe=de;qe<=xe;qe++)for(let tt=_e;tt<=Oe;tt++)if(D.call(this,c,x,R,L,this.xCellCount*tt+qe,X,Q,ie))return}_convertToXCellCoord(c){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(c*this.xScale)))}_convertToYCellCoord(c){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(c*this.yScale)))}_circlesCollide(c,x,R,L,D,X){const Q=L-c,ie=D-x,de=R+X;return de*de>Q*Q+ie*ie}_circleAndRectCollide(c,x,R,L,D,X,Q){const ie=(X-L)/2,de=Math.abs(c-(L+ie));if(de>ie+R)return!1;const _e=(Q-D)/2,xe=Math.abs(x-(D+_e));if(xe>_e+R)return!1;if(de<=ie||xe<=_e)return!0;const Oe=de-ie,qe=xe-_e;return Oe*Oe+qe*qe<=R*R}}function zn(z,c,x,R,L){const D=a.H();return c?(a.K(D,D,[1/L,1/L,1]),x||a.ad(D,D,R.angle)):a.L(D,R.labelPlaneMatrix,z),D}function pi(z,c,x,R,L){if(c){const D=a.ae(z);return a.K(D,D,[L,L,1]),x||a.ad(D,D,-R.angle),D}return R.glCoordMatrix}function nt(z,c,x,R){let L;R?(L=[z,c,R(z,c),1],a.af(L,L,x)):(L=[z,c,0,1],cr(L,L,x));const D=L[3];return{point:new a.P(L[0]/D,L[1]/D),signedDistanceFromCamera:D,isOccluded:!1}}function Me(z,c){return .5+z/c*.5}function Ie(z,c){return z.x>=-c[0]&&z.x<=c[0]&&z.y>=-c[1]&&z.y<=c[1]}function Be(z,c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe,tt){const dt=R?z.textSizeData:z.iconSizeData,bt=a.ag(dt,x.transform.zoom),St=[256/x.width*2+1,256/x.height*2+1],Pt=R?z.text.dynamicLayoutVertexArray:z.icon.dynamicLayoutVertexArray;Pt.clear();const ct=z.lineVertexArray,Ht=R?z.text.placedSymbolArray:z.icon.placedSymbolArray,Wt=x.transform.width/x.transform.height;let sr=!1;for(let $r=0;$rMath.abs(x.x-c.x)*R?{useVertical:!0}:(z===a.ah.vertical?c.yx.x)?{needsFlipping:!0}:null}function zt(z,c,x,R,L,D,X,Q,ie,de,_e){const xe=x/24,Oe=c.lineOffsetX*xe,qe=c.lineOffsetY*xe;let tt;if(c.numGlyphs>1){const dt=c.glyphStartIndex+c.numGlyphs,bt=c.lineStartIndex,St=c.lineStartIndex+c.lineLength,Pt=ze(xe,Q,Oe,qe,R,c,_e,z);if(!Pt)return{notEnoughRoom:!0};const ct=nt(Pt.first.point.x,Pt.first.point.y,X,z.getElevation).point,Ht=nt(Pt.last.point.x,Pt.last.point.y,X,z.getElevation).point;if(L&&!R){const Wt=At(c.writingMode,ct,Ht,de);if(Wt)return Wt}tt=[Pt.first];for(let Wt=c.glyphStartIndex+1;Wt0?ct.point:function(sr,$r,Qr,yn,Tn,fn){return Yt(sr,$r,Qr,1,Tn,fn)}(z.tileAnchorPoint,Pt,bt,0,D,z),Wt=At(c.writingMode,bt,Ht,de);if(Wt)return Wt}const dt=$t(xe*Q.getoffsetX(c.glyphStartIndex),Oe,qe,R,c.segment,c.lineStartIndex,c.lineStartIndex+c.lineLength,z,_e);if(!dt||z.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};tt=[dt]}for(const dt of tt)a.aj(ie,dt.point,dt.angle);return{}}function Yt(z,c,x,R,L,D){const X=z.add(z.sub(c)._unit()),Q=L!==void 0?nt(X.x,X.y,L,D.getElevation).point:ur(X.x,X.y,D).point,ie=x.sub(Q);return x.add(ie._mult(R/ie.mag()))}function wt(z,c,x){const R=c.projectionCache;if(R.projections[z])return R.projections[z];const L=new a.P(c.lineVertexArray.getx(z),c.lineVertexArray.gety(z)),D=ur(L.x,L.y,c);if(D.signedDistanceFromCamera>0)return R.projections[z]=D.point,R.anyProjectionOccluded=R.anyProjectionOccluded||D.isOccluded,D.point;const X=z-x.direction;return function(Q,ie,de,_e,xe){return Yt(Q,ie,de,_e,void 0,xe)}(x.distanceFromAnchor===0?c.tileAnchorPoint:new a.P(c.lineVertexArray.getx(X),c.lineVertexArray.gety(X)),L,x.previousVertex,x.absOffsetX-x.distanceFromAnchor+1,c)}function ur(z,c,x){const R=z+x.translation[0],L=c+x.translation[1];let D;return!x.pitchWithMap&&x.projection.useSpecialProjectionForSymbols?(D=x.projection.projectTileCoordinates(R,L,x.unwrappedTileID,x.getElevation),D.point.x=(.5*D.point.x+.5)*x.width,D.point.y=(.5*-D.point.y+.5)*x.height):(D=nt(R,L,x.labelPlaneMatrix,x.getElevation),D.isOccluded=!1),D}function me(z,c,x){return z._unit()._perp()._mult(c*x)}function Ye(z,c,x,R,L,D,X,Q,ie){if(Q.projectionCache.offsets[z])return Q.projectionCache.offsets[z];const de=x.add(c);if(z+ie.direction=L)return Q.projectionCache.offsets[z]=de,de;const _e=wt(z+ie.direction,Q,ie),xe=me(_e.sub(x),X,ie.direction),Oe=x.add(xe),qe=_e.add(xe);return Q.projectionCache.offsets[z]=a.ak(D,de,Oe,qe)||de,Q.projectionCache.offsets[z]}function $t(z,c,x,R,L,D,X,Q,ie){const de=R?z-c:z+c;let _e=de>0?1:-1,xe=0;R&&(_e*=-1,xe=Math.PI),_e<0&&(xe+=Math.PI);let Oe,qe=_e>0?D+L:D+L+1;Q.projectionCache.cachedAnchorPoint?Oe=Q.projectionCache.cachedAnchorPoint:(Oe=ur(Q.tileAnchorPoint.x,Q.tileAnchorPoint.y,Q).point,Q.projectionCache.cachedAnchorPoint=Oe);let tt,dt,bt=Oe,St=Oe,Pt=0,ct=0;const Ht=Math.abs(de),Wt=[];let sr;for(;Pt+ct<=Ht;){if(qe+=_e,qe=X)return null;Pt+=ct,St=bt,dt=tt;const yn={absOffsetX:Ht,direction:_e,distanceFromAnchor:Pt,previousVertex:St};if(bt=wt(qe,Q,yn),x===0)Wt.push(St),sr=bt.sub(St);else{let Tn;const fn=bt.sub(St);Tn=fn.mag()===0?me(wt(qe+_e,Q,yn).sub(bt),x,_e):me(fn,x,_e),dt||(dt=St.add(Tn)),tt=Ye(qe,Tn,bt,D,X,dt,x,Q,yn),Wt.push(dt),sr=tt.sub(dt)}ct=sr.mag()}const $r=sr._mult((Ht-Pt)/ct)._add(dt||St),Qr=xe+Math.atan2(bt.y-St.y,bt.x-St.x);return Wt.push($r),{point:$r,angle:ie?Qr:0,path:Wt}}const Nt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Jt(z,c){for(let x=0;x=1;qi--)nn.push(Ki.path[qi]);for(let qi=1;qiCs.signedDistanceFromCamera<=0)?[]:qi.map(Cs=>Cs.point)}let qo=[];if(nn.length>0){const qi=nn[0].clone(),Cs=nn[0].clone();for(let Ro=1;Ro=fn.x&&Cs.x<=pn.x&&qi.y>=fn.y&&Cs.y<=pn.y?[nn]:Cs.xpn.x||Cs.ypn.y?[]:a.al([nn],fn.x,fn.y,pn.x,pn.y)}for(const qi of qo){Yn.reset(qi,.25*Tn);let Cs=0;Cs=Yn.length<=.5*Tn?1:Math.ceil(Yn.paddedLength/Ui)+1;for(let Ro=0;Ront(L.x,L.y,R,x.getElevation))}queryRenderedSymbols(c){if(c.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const x=[];let R=1/0,L=1/0,D=-1/0,X=-1/0;for(const _e of c){const xe=new a.P(_e.x+Br,_e.y+Br);R=Math.min(R,xe.x),L=Math.min(L,xe.y),D=Math.max(D,xe.x),X=Math.max(X,xe.y),x.push(xe)}const Q=this.grid.query(R,L,D,X).concat(this.ignoredGrid.query(R,L,D,X)),ie={},de={};for(const _e of Q){const xe=_e.key;if(ie[xe.bucketInstanceId]===void 0&&(ie[xe.bucketInstanceId]={}),ie[xe.bucketInstanceId][xe.featureIndex])continue;const Oe=[new a.P(_e.x1,_e.y1),new a.P(_e.x2,_e.y1),new a.P(_e.x2,_e.y2),new a.P(_e.x1,_e.y2)];a.am(x,Oe)&&(ie[xe.bucketInstanceId][xe.featureIndex]=!0,de[xe.bucketInstanceId]===void 0&&(de[xe.bucketInstanceId]=[]),de[xe.bucketInstanceId].push(xe.featureIndex))}return de}insertCollisionBox(c,x,R,L,D,X){(R?this.ignoredGrid:this.grid).insert({bucketInstanceId:L,featureIndex:D,collisionGroupID:X,overlapMode:x},c[0],c[1],c[2],c[3])}insertCollisionCircles(c,x,R,L,D,X){const Q=R?this.ignoredGrid:this.grid,ie={bucketInstanceId:L,featureIndex:D,collisionGroupID:X,overlapMode:x};for(let de=0;de=this.screenRightBoundary||Lthis.screenBottomBoundary}isInsideGrid(c,x,R,L){return R>=0&&c=0&&xthis.projectAndGetPerspectiveRatio(R,Tn.x,Tn.y,L,de));Qr=yn.some(Tn=>!Tn.isOccluded),$r=yn.map(Tn=>Tn.point)}else Qr=!0;return{box:a.ao($r),allPointsOccluded:!Qr}}}function hn(z,c,x){return c*(a.X/(z.tileSize*Math.pow(2,x-z.tileID.overscaledZ)))}class mi{constructor(c,x,R,L){this.opacity=c?Math.max(0,Math.min(1,c.opacity+(c.placed?x:-x))):L&&R?1:0,this.placed=R}isHidden(){return this.opacity===0&&!this.placed}}class sn{constructor(c,x,R,L,D){this.text=new mi(c?c.text:null,x,R,D),this.icon=new mi(c?c.icon:null,x,L,D)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class cn{constructor(c,x,R){this.text=c,this.icon=x,this.skipFade=R}}class si{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class gn{constructor(c,x,R,L,D){this.bucketInstanceId=c,this.featureIndex=x,this.sourceLayerIndex=R,this.bucketIndex=L,this.tileID=D}}class _i{constructor(c){this.crossSourceCollisions=c,this.maxGroupID=0,this.collisionGroups={}}get(c){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[c]){const x=++this.maxGroupID;this.collisionGroups[c]={ID:x,predicate:R=>R.collisionGroupID===x}}return this.collisionGroups[c]}}function Xi(z,c,x,R,L){const{horizontalAlign:D,verticalAlign:X}=a.au(z);return new a.P(-(D-.5)*c+R[0]*L,-(X-.5)*x+R[1]*L)}class Vi{constructor(c,x,R,L,D,X){this.transform=c.clone(),this.terrain=R,this.collisionIndex=new Lr(this.transform,x),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=L,this.retainedQueryData={},this.collisionGroups=new _i(D),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=X,X&&(X.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(c){const x=this.terrain;return x?(R,L)=>x.getElevation(c,R,L):null}getBucketParts(c,x,R,L){const D=R.getBucket(x),X=R.latestFeatureIndex;if(!D||!X||x.id!==D.layerIds[0])return;const Q=R.collisionBoxArray,ie=D.layers[0].layout,de=D.layers[0].paint,_e=Math.pow(2,this.transform.zoom-R.tileID.overscaledZ),xe=R.tileSize/a.X,Oe=R.tileID.toUnwrapped(),qe=this.transform.calculatePosMatrix(Oe),tt=ie.get("text-pitch-alignment")==="map",dt=ie.get("text-rotation-alignment")==="map",bt=hn(R,1,this.transform.zoom),St=this.collisionIndex.mapProjection.translatePosition(this.transform,R,de.get("text-translate"),de.get("text-translate-anchor")),Pt=this.collisionIndex.mapProjection.translatePosition(this.transform,R,de.get("icon-translate"),de.get("icon-translate-anchor")),ct=zn(qe,tt,dt,this.transform,bt);let Ht=null;if(tt){const sr=pi(qe,tt,dt,this.transform,bt);Ht=a.L([],this.transform.labelPlaneMatrix,sr)}this.retainedQueryData[D.bucketInstanceId]=new gn(D.bucketInstanceId,X,D.sourceLayerIndex,D.index,R.tileID);const Wt={bucket:D,layout:ie,translationText:St,translationIcon:Pt,posMatrix:qe,unwrappedTileID:Oe,textLabelPlaneMatrix:ct,labelToScreenMatrix:Ht,scale:_e,textPixelRatio:xe,holdingForFade:R.holdingForFade(),collisionBoxArray:Q,partiallyEvaluatedTextSize:a.ag(D.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(D.sourceID)};if(L)for(const sr of D.sortKeyRanges){const{sortKey:$r,symbolInstanceStart:Qr,symbolInstanceEnd:yn}=sr;c.push({sortKey:$r,symbolInstanceStart:Qr,symbolInstanceEnd:yn,parameters:Wt})}else c.push({symbolInstanceStart:0,symbolInstanceEnd:D.symbolInstances.length,parameters:Wt})}attemptAnchorPlacement(c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe,tt,dt,bt,St,Pt,ct){const Ht=a.aq[c.textAnchor],Wt=[c.textOffset0,c.textOffset1],sr=Xi(Ht,R,L,Wt,D),$r=this.collisionIndex.placeCollisionBox(x,Oe,ie,de,_e,Q,X,bt,xe.predicate,ct,sr);if((!Pt||this.collisionIndex.placeCollisionBox(Pt,Oe,ie,de,_e,Q,X,St,xe.predicate,ct,sr).placeable)&&$r.placeable){let Qr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[qe.crossTileID]&&this.prevPlacement.placements[qe.crossTileID]&&this.prevPlacement.placements[qe.crossTileID].text&&(Qr=this.prevPlacement.variableOffsets[qe.crossTileID].anchor),qe.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[qe.crossTileID]={textOffset:Wt,width:R,height:L,anchor:Ht,textBoxScale:D,prevAnchor:Qr},this.markUsedJustification(tt,Ht,qe,dt),tt.allowVerticalPlacement&&(this.markUsedOrientation(tt,dt,qe),this.placedOrientations[qe.crossTileID]=dt),{shift:sr,placedGlyphBoxes:$r}}}placeLayerBucketPart(c,x,R){const{bucket:L,layout:D,translationText:X,translationIcon:Q,posMatrix:ie,unwrappedTileID:de,textLabelPlaneMatrix:_e,labelToScreenMatrix:xe,textPixelRatio:Oe,holdingForFade:qe,collisionBoxArray:tt,partiallyEvaluatedTextSize:dt,collisionGroup:bt}=c.parameters,St=D.get("text-optional"),Pt=D.get("icon-optional"),ct=a.ar(D,"text-overlap","text-allow-overlap"),Ht=ct==="always",Wt=a.ar(D,"icon-overlap","icon-allow-overlap"),sr=Wt==="always",$r=D.get("text-rotation-alignment")==="map",Qr=D.get("text-pitch-alignment")==="map",yn=D.get("icon-text-fit")!=="none",Tn=D.get("symbol-z-order")==="viewport-y",fn=Ht&&(sr||!L.hasIconData()||Pt),pn=sr&&(Ht||!L.hasTextData()||St);!L.collisionArrays&&tt&&L.deserializeCollisionBoxes(tt);const Yn=this._getTerrainElevationFunc(this.retainedQueryData[L.bucketInstanceId].tileID),Ki=(xn,nn,Ui)=>{var qo,qi;if(x[xn.crossTileID])return;if(qe)return void(this.placements[xn.crossTileID]=new cn(!1,!1,!1));let Cs=!1,Ro=!1,Ia=!0,Kc=null,Is={box:null,placeable:!1,offscreen:null},hu={box:null,placeable:!1,offscreen:null},Au=null,du=null,Pu=null,Qc=0,d0=0,Wf=0;nn.textFeatureIndex?Qc=nn.textFeatureIndex:xn.useRuntimeCollisionCircles&&(Qc=xn.featureIndex),nn.verticalTextFeatureIndex&&(d0=nn.verticalTextFeatureIndex);const t1=nn.textBox;if(t1){const th=Yl=>{let fu=a.ah.horizontal;if(L.allowVerticalPlacement&&!Yl&&this.prevPlacement){const Ec=this.prevPlacement.placedOrientations[xn.crossTileID];Ec&&(this.placedOrientations[xn.crossTileID]=Ec,fu=Ec,this.markUsedOrientation(L,fu,xn))}return fu},rh=(Yl,fu)=>{if(L.allowVerticalPlacement&&xn.numVerticalGlyphVertices>0&&nn.verticalTextBox){for(const Ec of L.writingModes)if(Ec===a.ah.vertical?(Is=fu(),hu=Is):Is=Yl(),Is&&Is.placeable)break}else Is=Yl()},Cd=xn.textAnchorOffsetStartIndex,nh=xn.textAnchorOffsetEndIndex;if(nh===Cd){const Yl=(fu,Ec)=>{const Fs=this.collisionIndex.placeCollisionBox(fu,ct,Oe,ie,de,Qr,$r,X,bt.predicate,Yn);return Fs&&Fs.placeable&&(this.markUsedOrientation(L,Ec,xn),this.placedOrientations[xn.crossTileID]=Ec),Fs};rh(()=>Yl(t1,a.ah.horizontal),()=>{const fu=nn.verticalTextBox;return L.allowVerticalPlacement&&xn.numVerticalGlyphVertices>0&&fu?Yl(fu,a.ah.vertical):{box:null,offscreen:null}}),th(Is&&Is.placeable)}else{let Yl=a.aq[(qi=(qo=this.prevPlacement)===null||qo===void 0?void 0:qo.variableOffsets[xn.crossTileID])===null||qi===void 0?void 0:qi.anchor];const fu=(Fs,rf,f0)=>{const Zf=Fs.x2-Fs.x1,C_=Fs.y2-Fs.y1,c9=xn.textBoxScale,S_=yn&&Wt==="never"?rf:null;let Hh=null,h9=ct==="never"?1:2,Am="never";Yl&&h9++;for(let p0=0;p0fu(t1,nn.iconBox,a.ah.horizontal),()=>{const Fs=nn.verticalTextBox;return L.allowVerticalPlacement&&(!Is||!Is.placeable)&&xn.numVerticalGlyphVertices>0&&Fs?fu(Fs,nn.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Is&&(Cs=Is.placeable,Ia=Is.offscreen);const Ec=th(Is&&Is.placeable);if(!Cs&&this.prevPlacement){const Fs=this.prevPlacement.variableOffsets[xn.crossTileID];Fs&&(this.variableOffsets[xn.crossTileID]=Fs,this.markUsedJustification(L,Fs.anchor,xn,Ec))}}}if(Au=Is,Cs=Au&&Au.placeable,Ia=Au&&Au.offscreen,xn.useRuntimeCollisionCircles){const th=L.text.placedSymbolArray.get(xn.centerJustifiedTextSymbolIndex),rh=a.ai(L.textSizeData,dt,th),Cd=D.get("text-padding");du=this.collisionIndex.placeCollisionCircles(ct,th,L.lineVertexArray,L.glyphOffsetArray,rh,ie,de,_e,xe,R,Qr,bt.predicate,xn.collisionCircleDiameter,Cd,X,Yn),du.circles.length&&du.collisionDetected&&!R&&a.w("Collisions detected, but collision boxes are not shown"),Cs=Ht||du.circles.length>0&&!du.collisionDetected,Ia=Ia&&du.offscreen}if(nn.iconFeatureIndex&&(Wf=nn.iconFeatureIndex),nn.iconBox){const th=rh=>this.collisionIndex.placeCollisionBox(rh,Wt,Oe,ie,de,Qr,$r,Q,bt.predicate,Yn,yn&&Kc?Kc:void 0);hu&&hu.placeable&&nn.verticalIconBox?(Pu=th(nn.verticalIconBox),Ro=Pu.placeable):(Pu=th(nn.iconBox),Ro=Pu.placeable),Ia=Ia&&Pu.offscreen}const eh=St||xn.numHorizontalGlyphVertices===0&&xn.numVerticalGlyphVertices===0,My=Pt||xn.numIconVertices===0;eh||My?My?eh||(Ro=Ro&&Cs):Cs=Ro&&Cs:Ro=Cs=Ro&&Cs;const r1=Ro&&Pu.placeable;if(Cs&&Au.placeable&&this.collisionIndex.insertCollisionBox(Au.box,ct,D.get("text-ignore-placement"),L.bucketInstanceId,hu&&hu.placeable&&d0?d0:Qc,bt.ID),r1&&this.collisionIndex.insertCollisionBox(Pu.box,Wt,D.get("icon-ignore-placement"),L.bucketInstanceId,Wf,bt.ID),du&&Cs&&this.collisionIndex.insertCollisionCircles(du.circles,ct,D.get("text-ignore-placement"),L.bucketInstanceId,Qc,bt.ID),R&&this.storeCollisionData(L.bucketInstanceId,Ui,nn,Au,Pu,du),xn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(L.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[xn.crossTileID]=new cn(Cs||fn,Ro||pn,Ia||L.justReloaded),x[xn.crossTileID]=!0};if(Tn){if(c.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const xn=L.getSortedSymbolIndexes(this.transform.angle);for(let nn=xn.length-1;nn>=0;--nn){const Ui=xn[nn];Ki(L.symbolInstances.get(Ui),L.collisionArrays[Ui],Ui)}}else for(let xn=c.symbolInstanceStart;xn=0&&(c.text.placedSymbolArray.get(Q).crossTileID=D>=0&&Q!==D?0:R.crossTileID)}markUsedOrientation(c,x,R){const L=x===a.ah.horizontal||x===a.ah.horizontalOnly?x:0,D=x===a.ah.vertical?x:0,X=[R.leftJustifiedTextSymbolIndex,R.centerJustifiedTextSymbolIndex,R.rightJustifiedTextSymbolIndex];for(const Q of X)c.text.placedSymbolArray.get(Q).placedOrientation=L;R.verticalPlacedTextSymbolIndex&&(c.text.placedSymbolArray.get(R.verticalPlacedTextSymbolIndex).placedOrientation=D)}commit(c){this.commitTime=c,this.zoomAtLastRecencyCheck=this.transform.zoom;const x=this.prevPlacement;let R=!1;this.prevZoomAdjustment=x?x.zoomAdjustment(this.transform.zoom):0;const L=x?x.symbolFadeChange(c):1,D=x?x.opacities:{},X=x?x.variableOffsets:{},Q=x?x.placedOrientations:{};for(const ie in this.placements){const de=this.placements[ie],_e=D[ie];_e?(this.opacities[ie]=new sn(_e,L,de.text,de.icon),R=R||de.text!==_e.text.placed||de.icon!==_e.icon.placed):(this.opacities[ie]=new sn(null,L,de.text,de.icon,de.skipFade),R=R||de.text||de.icon)}for(const ie in D){const de=D[ie];if(!this.opacities[ie]){const _e=new sn(de,L,!1,!1);_e.isHidden()||(this.opacities[ie]=_e,R=R||de.text.placed||de.icon.placed)}}for(const ie in X)this.variableOffsets[ie]||!this.opacities[ie]||this.opacities[ie].isHidden()||(this.variableOffsets[ie]=X[ie]);for(const ie in Q)this.placedOrientations[ie]||!this.opacities[ie]||this.opacities[ie].isHidden()||(this.placedOrientations[ie]=Q[ie]);if(x&&x.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");R?this.lastPlacementChangeTime=c:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=x?x.lastPlacementChangeTime:c)}updateLayerOpacities(c,x){const R={};for(const L of x){const D=L.getBucket(c);D&&L.latestFeatureIndex&&c.id===D.layerIds[0]&&this.updateBucketOpacities(D,L.tileID,R,L.collisionBoxArray)}}updateBucketOpacities(c,x,R,L){c.hasTextData()&&(c.text.opacityVertexArray.clear(),c.text.hasVisibleVertices=!1),c.hasIconData()&&(c.icon.opacityVertexArray.clear(),c.icon.hasVisibleVertices=!1),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexArray.clear(),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexArray.clear();const D=c.layers[0],X=D.layout,Q=new sn(null,0,!1,!1,!0),ie=X.get("text-allow-overlap"),de=X.get("icon-allow-overlap"),_e=D._unevaluatedLayout.hasValue("text-variable-anchor")||D._unevaluatedLayout.hasValue("text-variable-anchor-offset"),xe=X.get("text-rotation-alignment")==="map",Oe=X.get("text-pitch-alignment")==="map",qe=X.get("icon-text-fit")!=="none",tt=new sn(null,0,ie&&(de||!c.hasIconData()||X.get("icon-optional")),de&&(ie||!c.hasTextData()||X.get("text-optional")),!0);!c.collisionArrays&&L&&(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData())&&c.deserializeCollisionBoxes(L);const dt=(St,Pt,ct)=>{for(let Ht=0;Ht0,Qr=this.placedOrientations[Pt.crossTileID],yn=Qr===a.ah.vertical,Tn=Qr===a.ah.horizontal||Qr===a.ah.horizontalOnly;if(ct>0||Ht>0){const pn=Xs(sr.text);dt(c.text,ct,yn?yl:pn),dt(c.text,Ht,Tn?yl:pn);const Yn=sr.text.isHidden();[Pt.rightJustifiedTextSymbolIndex,Pt.centerJustifiedTextSymbolIndex,Pt.leftJustifiedTextSymbolIndex].forEach(nn=>{nn>=0&&(c.text.placedSymbolArray.get(nn).hidden=Yn||yn?1:0)}),Pt.verticalPlacedTextSymbolIndex>=0&&(c.text.placedSymbolArray.get(Pt.verticalPlacedTextSymbolIndex).hidden=Yn||Tn?1:0);const Ki=this.variableOffsets[Pt.crossTileID];Ki&&this.markUsedJustification(c,Ki.anchor,Pt,Qr);const xn=this.placedOrientations[Pt.crossTileID];xn&&(this.markUsedJustification(c,"left",Pt,xn),this.markUsedOrientation(c,xn,Pt))}if($r){const pn=Xs(sr.icon),Yn=!(qe&&Pt.verticalPlacedIconSymbolIndex&&yn);Pt.placedIconSymbolIndex>=0&&(dt(c.icon,Pt.numIconVertices,Yn?pn:yl),c.icon.placedSymbolArray.get(Pt.placedIconSymbolIndex).hidden=sr.icon.isHidden()),Pt.verticalPlacedIconSymbolIndex>=0&&(dt(c.icon,Pt.numVerticalIconVertices,Yn?yl:pn),c.icon.placedSymbolArray.get(Pt.verticalPlacedIconSymbolIndex).hidden=sr.icon.isHidden())}const fn=bt&&bt.has(St)?bt.get(St):{text:null,icon:null};if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){const pn=c.collisionArrays[St];if(pn){let Yn=new a.P(0,0);if(pn.textBox||pn.verticalTextBox){let Ki=!0;if(_e){const xn=this.variableOffsets[Wt];xn?(Yn=Xi(xn.anchor,xn.width,xn.height,xn.textOffset,xn.textBoxScale),xe&&Yn._rotate(Oe?this.transform.angle:-this.transform.angle)):Ki=!1}if(pn.textBox||pn.verticalTextBox){let xn;pn.textBox&&(xn=yn),pn.verticalTextBox&&(xn=Tn),Ta(c.textCollisionBox.collisionVertexArray,sr.text.placed,!Ki||xn,fn.text,Yn.x,Yn.y)}}if(pn.iconBox||pn.verticalIconBox){const Ki=!!(!Tn&&pn.verticalIconBox);let xn;pn.iconBox&&(xn=Ki),pn.verticalIconBox&&(xn=!Ki),Ta(c.iconCollisionBox.collisionVertexArray,sr.icon.placed,xn,fn.icon,qe?Yn.x:0,qe?Yn.y:0)}}}}if(c.sortFeatures(this.transform.angle),this.retainedQueryData[c.bucketInstanceId]&&(this.retainedQueryData[c.bucketInstanceId].featureSortOrder=c.featureSortOrder),c.hasTextData()&&c.text.opacityVertexBuffer&&c.text.opacityVertexBuffer.updateData(c.text.opacityVertexArray),c.hasIconData()&&c.icon.opacityVertexBuffer&&c.icon.opacityVertexBuffer.updateData(c.icon.opacityVertexArray),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexBuffer&&c.iconCollisionBox.collisionVertexBuffer.updateData(c.iconCollisionBox.collisionVertexArray),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexBuffer&&c.textCollisionBox.collisionVertexBuffer.updateData(c.textCollisionBox.collisionVertexArray),c.text.opacityVertexArray.length!==c.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${c.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${c.text.layoutVertexArray.length}) / 4`);if(c.icon.opacityVertexArray.length!==c.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${c.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${c.icon.layoutVertexArray.length}) / 4`);if(c.bucketInstanceId in this.collisionCircleArrays){const St=this.collisionCircleArrays[c.bucketInstanceId];c.placementInvProjMatrix=St.invProjMatrix,c.placementViewportMatrix=St.viewportMatrix,c.collisionCircleArray=St.circles,delete this.collisionCircleArrays[c.bucketInstanceId]}}symbolFadeChange(c){return this.fadeDuration===0?1:(c-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(c){return Math.max(0,(this.transform.zoom-c)/1.5)}hasTransitions(c){return this.stale||c-this.lastPlacementChangeTimec}setStale(){this.stale=!0}}function Ta(z,c,x,R,L,D){R&&R.length!==0||(R=[0,0,0,0]);const X=R[0]-Br,Q=R[1]-Br,ie=R[2]-Br,de=R[3]-Br;z.emplaceBack(c?1:0,x?1:0,L||0,D||0,X,Q),z.emplaceBack(c?1:0,x?1:0,L||0,D||0,ie,Q),z.emplaceBack(c?1:0,x?1:0,L||0,D||0,ie,de),z.emplaceBack(c?1:0,x?1:0,L||0,D||0,X,de)}const Oi=Math.pow(2,25),Jo=Math.pow(2,24),Go=Math.pow(2,17),$n=Math.pow(2,16),wo=Math.pow(2,9),aa=Math.pow(2,8),As=Math.pow(2,1);function Xs(z){if(z.opacity===0&&!z.placed)return 0;if(z.opacity===1&&z.placed)return 4294967295;const c=z.placed?1:0,x=Math.floor(127*z.opacity);return x*Oi+c*Jo+x*Go+c*$n+x*wo+c*aa+x*As+c}const yl=0;function Ko(){return{isOccluded:(z,c,x)=>!1,getPitchedTextCorrection:(z,c,x)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(z,c,x,R){throw new Error("Not implemented.")},translatePosition:(z,c,x,R)=>function(L,D,X,Q,ie=!1){if(!X[0]&&!X[1])return[0,0];const de=ie?Q==="map"?L.angle:0:Q==="viewport"?-L.angle:0;if(de){const _e=Math.sin(de),xe=Math.cos(de);X=[X[0]*xe-X[1]*_e,X[0]*_e+X[1]*xe]}return[ie?X[0]:hn(D,X[0],L.zoom),ie?X[1]:hn(D,X[1],L.zoom)]}(z,c,x,R),getCircleRadiusCorrection:z=>1}}class Zs{constructor(c){this._sortAcrossTiles=c.layout.get("symbol-z-order")!=="viewport-y"&&!c.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(c,x,R,L,D){const X=this._bucketParts;for(;this._currentTileIndexQ.sortKey-ie.sortKey));this._currentPartIndex!this._forceFullPlacement&&f.now()-L>2;for(;this._currentPlacementIndex>=0;){const X=x[c[this._currentPlacementIndex]],Q=this.placement.collisionIndex.transform.zoom;if(X.type==="symbol"&&(!X.minzoom||X.minzoom<=Q)&&(!X.maxzoom||X.maxzoom>Q)){if(this._inProgressLayer||(this._inProgressLayer=new Zs(X)),this._inProgressLayer.continuePlacement(R[X.source],this.placement,this._showCollisionBoxes,X,D))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(c){return this.placement.commit(c),this.placement}}const nl=512/a.X/2;class bo{constructor(c,x,R){this.tileID=c,this.bucketInstanceId=R,this._symbolsByKey={};const L=new Map;for(let D=0;D({x:Math.floor(ie.anchorX*nl),y:Math.floor(ie.anchorY*nl)})),crossTileIDs:X.map(ie=>ie.crossTileID)};if(Q.positions.length>128){const ie=new a.av(Q.positions.length,16,Uint16Array);for(const{x:de,y:_e}of Q.positions)ie.add(de,_e);ie.finish(),delete Q.positions,Q.index=ie}this._symbolsByKey[D]=Q}}getScaledCoordinates(c,x){const{x:R,y:L,z:D}=this.tileID.canonical,{x:X,y:Q,z:ie}=x.canonical,de=nl/Math.pow(2,ie-D),_e=(Q*a.X+c.anchorY)*de,xe=L*a.X*nl;return{x:Math.floor((X*a.X+c.anchorX)*de-R*a.X*nl),y:Math.floor(_e-xe)}}findMatches(c,x,R){const L=this.tileID.canonical.zc)}}class mt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class dr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(c){const x=Math.round((c-this.lng)/360);if(x!==0)for(const R in this.indexes){const L=this.indexes[R],D={};for(const X in L){const Q=L[X];Q.tileID=Q.tileID.unwrapTo(Q.tileID.wrap+x),D[Q.tileID.key]=Q}this.indexes[R]=D}this.lng=c}addBucket(c,x,R){if(this.indexes[c.overscaledZ]&&this.indexes[c.overscaledZ][c.key]){if(this.indexes[c.overscaledZ][c.key].bucketInstanceId===x.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(c.overscaledZ,this.indexes[c.overscaledZ][c.key])}for(let D=0;Dc.overscaledZ)for(const Q in X){const ie=X[Q];ie.tileID.isChildOf(c)&&ie.findMatches(x.symbolInstances,c,L)}else{const Q=X[c.scaledTo(Number(D)).key];Q&&Q.findMatches(x.symbolInstances,c,L)}}for(let D=0;D{x[R]=!0});for(const R in this.layerIndexes)x[R]||delete this.layerIndexes[R]}}const Xn=(z,c)=>a.t(z,c&&c.filter(x=>x.identifier!=="source.canvas")),Us=a.aw();class Js extends a.E{constructor(c,x={}){super(),this._rtlPluginLoaded=()=>{for(const R in this.sourceCaches){const L=this.sourceCaches[R].getSource().type;L!=="vector"&&L!=="geojson"||this.sourceCaches[R].reload()}},this.map=c,this.dispatcher=new et(je(),c._getMapId()),this.dispatcher.registerMessageHandler("GG",(R,L)=>this.getGlyphs(R,L)),this.dispatcher.registerMessageHandler("GI",(R,L)=>this.getImages(R,L)),this.imageManager=new le,this.imageManager.setEventedParent(this),this.glyphManager=new We(c._requestManager,x.localIdeographFontFamily),this.lineAtlas=new Tt(256,512),this.crossTileSymbolIndex=new Or,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),ar().on(xt,this._rtlPluginLoaded),this.on("data",R=>{if(R.dataType!=="source"||R.sourceDataType!=="metadata")return;const L=this.sourceCaches[R.sourceId];if(!L)return;const D=L.getSource();if(D&&D.vectorLayerIds)for(const X in this._layers){const Q=this._layers[X];Q.source===D.id&&this._validateLayer(Q)}})}loadURL(c,x={},R){this.fire(new a.k("dataloading",{dataType:"style"})),x.validate=typeof x.validate!="boolean"||x.validate;const L=this.map._requestManager.transformRequest(c,"Style");this._loadStyleRequest=new AbortController;const D=this._loadStyleRequest;a.h(L,this._loadStyleRequest).then(X=>{this._loadStyleRequest=null,this._load(X.data,x,R)}).catch(X=>{this._loadStyleRequest=null,X&&!D.signal.aborted&&this.fire(new a.j(X))})}loadJSON(c,x={},R){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,f.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,x.validate=x.validate!==!1,this._load(c,x,R)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(Us,{validate:!1})}_load(c,x,R){var L;const D=x.transformStyle?x.transformStyle(R,c):c;if(!x.validate||!Xn(this,a.u(D))){this._loaded=!0,this.stylesheet=D;for(const X in D.sources)this.addSource(X,D.sources[X],{validate:!1});D.sprite?this._loadSprite(D.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(D.glyphs),this._createLayers(),this.light=new lt(this.stylesheet.light),this.sky=new rr(this.stylesheet.sky),this.map.setTerrain((L=this.stylesheet.terrain)!==null&&L!==void 0?L:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){const c=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",c),this._order=c.map(x=>x.id),this._layers={},this._serializedLayers=null;for(const x of c){const R=a.aA(x);R.setEventedParent(this,{layer:{id:x.id}}),this._layers[x.id]=R}}_loadSprite(c,x=!1,R=void 0){let L;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(D,X,Q,ie){return a._(this,void 0,void 0,function*(){const de=ge(D),_e=Q>1?"@2x":"",xe={},Oe={};for(const{id:qe,url:tt}of de){const dt=X.transformRequest(fe(tt,_e,".json"),"SpriteJSON");xe[qe]=a.h(dt,ie);const bt=X.transformRequest(fe(tt,_e,".png"),"SpriteImage");Oe[qe]=j.getImage(bt,ie)}return yield Promise.all([...Object.values(xe),...Object.values(Oe)]),function(qe,tt){return a._(this,void 0,void 0,function*(){const dt={};for(const bt in qe){dt[bt]={};const St=f.getImageCanvasContext((yield tt[bt]).data),Pt=(yield qe[bt]).data;for(const ct in Pt){const{width:Ht,height:Wt,x:sr,y:$r,sdf:Qr,pixelRatio:yn,stretchX:Tn,stretchY:fn,content:pn,textFitWidth:Yn,textFitHeight:Ki}=Pt[ct];dt[bt][ct]={data:null,pixelRatio:yn,sdf:Qr,stretchX:Tn,stretchY:fn,content:pn,textFitWidth:Yn,textFitHeight:Ki,spriteData:{width:Ht,height:Wt,x:sr,y:$r,context:St}}}}return dt})}(xe,Oe)})}(c,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(D=>{if(this._spriteRequest=null,D)for(const X in D){this._spritesImagesIds[X]=[];const Q=this._spritesImagesIds[X]?this._spritesImagesIds[X].filter(ie=>!(ie in D)):[];for(const ie of Q)this.imageManager.removeImage(ie),this._changedImages[ie]=!0;for(const ie in D[X]){const de=X==="default"?ie:`${X}:${ie}`;this._spritesImagesIds[X].push(de),de in this.imageManager.images?this.imageManager.updateImage(de,D[X][ie],!1):this.imageManager.addImage(de,D[X][ie]),x&&(this._changedImages[de]=!0)}}}).catch(D=>{this._spriteRequest=null,L=D,this.fire(new a.j(L))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),x&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),R&&R(L)})}_unloadSprite(){for(const c of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(c),this._changedImages[c]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(c){const x=this.sourceCaches[c.source];if(!x)return;const R=c.sourceLayer;if(!R)return;const L=x.getSource();(L.type==="geojson"||L.vectorLayerIds&&L.vectorLayerIds.indexOf(R)===-1)&&this.fire(new a.j(new Error(`Source layer "${R}" does not exist on source "${L.id}" as specified by style layer "${c.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const c in this.sourceCaches)if(!this.sourceCaches[c].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(c,x=!1){const R=this._serializedAllLayers();if(!c||c.length===0)return Object.values(x?a.aB(R):R);const L=[];for(const D of c)if(R[D]){const X=x?a.aB(R[D]):R[D];L.push(X)}return L}_serializedAllLayers(){let c=this._serializedLayers;if(c)return c;c=this._serializedLayers={};const x=Object.keys(this._layers);for(const R of x){const L=this._layers[R];L.type!=="custom"&&(c[R]=L.serialize())}return c}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(const c in this.sourceCaches)if(this.sourceCaches[c].hasTransition())return!0;for(const c in this._layers)if(this._layers[c].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(c){if(!this._loaded)return;const x=this._changed;if(x){const L=Object.keys(this._updatedLayers),D=Object.keys(this._removedLayers);(L.length||D.length)&&this._updateWorkerLayers(L,D);for(const X in this._updatedSources){const Q=this._updatedSources[X];if(Q==="reload")this._reloadSource(X);else{if(Q!=="clear")throw new Error(`Invalid action ${Q}`);this._clearSource(X)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const X in this._updatedPaintProps)this._layers[X].updateTransitions(c);this.light.updateTransitions(c),this.sky.updateTransitions(c),this._resetUpdates()}const R={};for(const L in this.sourceCaches){const D=this.sourceCaches[L];R[L]=D.used,D.used=!1}for(const L of this._order){const D=this._layers[L];D.recalculate(c,this._availableImages),!D.isHidden(c.zoom)&&D.source&&(this.sourceCaches[D.source].used=!0)}for(const L in R){const D=this.sourceCaches[L];!!R[L]!=!!D.used&&D.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:L}))}this.light.recalculate(c),this.sky.recalculate(c),this.z=c.zoom,x&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const c=Object.keys(this._changedImages);if(c.length){for(const x in this.sourceCaches)this.sourceCaches[x].reloadTilesForDependencies(["icons","patterns"],c);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const c in this.sourceCaches)this.sourceCaches[c].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(c,x){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(c,!1),removedIds:x})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(c,x={}){var R;this._checkLoaded();const L=this.serialize();if(c=x.transformStyle?x.transformStyle(L,c):c,((R=x.validate)===null||R===void 0||R)&&Xn(this,a.u(c)))return!1;(c=a.aB(c)).layers=a.az(c.layers);const D=a.aC(L,c),X=this._getOperationsToPerform(D);if(X.unimplemented.length>0)throw new Error(`Unimplemented: ${X.unimplemented.join(", ")}.`);if(X.operations.length===0)return!1;for(const Q of X.operations)Q();return this.stylesheet=c,this._serializedLayers=null,!0}_getOperationsToPerform(c){const x=[],R=[];for(const L of c)switch(L.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":x.push(()=>this.addLayer.apply(this,L.args));break;case"removeLayer":x.push(()=>this.removeLayer.apply(this,L.args));break;case"setPaintProperty":x.push(()=>this.setPaintProperty.apply(this,L.args));break;case"setLayoutProperty":x.push(()=>this.setLayoutProperty.apply(this,L.args));break;case"setFilter":x.push(()=>this.setFilter.apply(this,L.args));break;case"addSource":x.push(()=>this.addSource.apply(this,L.args));break;case"removeSource":x.push(()=>this.removeSource.apply(this,L.args));break;case"setLayerZoomRange":x.push(()=>this.setLayerZoomRange.apply(this,L.args));break;case"setLight":x.push(()=>this.setLight.apply(this,L.args));break;case"setGeoJSONSourceData":x.push(()=>this.setGeoJSONSourceData.apply(this,L.args));break;case"setGlyphs":x.push(()=>this.setGlyphs.apply(this,L.args));break;case"setSprite":x.push(()=>this.setSprite.apply(this,L.args));break;case"setSky":x.push(()=>this.setSky.apply(this,L.args));break;case"setTerrain":x.push(()=>this.map.setTerrain.apply(this,L.args));break;case"setTransition":x.push(()=>{});break;default:R.push(L.command)}return{operations:x,unimplemented:R}}addImage(c,x){if(this.getImage(c))return this.fire(new a.j(new Error(`An image named "${c}" already exists.`)));this.imageManager.addImage(c,x),this._afterImageUpdated(c)}updateImage(c,x){this.imageManager.updateImage(c,x)}getImage(c){return this.imageManager.getImage(c)}removeImage(c){if(!this.getImage(c))return this.fire(new a.j(new Error(`An image named "${c}" does not exist.`)));this.imageManager.removeImage(c),this._afterImageUpdated(c)}_afterImageUpdated(c){this._availableImages=this.imageManager.listImages(),this._changedImages[c]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(c,x,R={}){if(this._checkLoaded(),this.sourceCaches[c]!==void 0)throw new Error(`Source "${c}" already exists.`);if(!x.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(x).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(x.type)>=0&&this._validate(a.u.source,`sources.${c}`,x,null,R))return;this.map&&this.map._collectResourceTiming&&(x.collectResourceTiming=!0);const L=this.sourceCaches[c]=new ot(c,x,this.dispatcher);L.style=this,L.setEventedParent(this,()=>({isSourceLoaded:L.loaded(),source:L.serialize(),sourceId:c})),L.onAdd(this.map),this._changed=!0}removeSource(c){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error("There is no source with this ID");for(const R in this._layers)if(this._layers[R].source===c)return this.fire(new a.j(new Error(`Source "${c}" cannot be removed while layer "${R}" is using it.`)));const x=this.sourceCaches[c];delete this.sourceCaches[c],delete this._updatedSources[c],x.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:c})),x.setEventedParent(null),x.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(c,x){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error(`There is no source with this ID=${c}`);const R=this.sourceCaches[c].getSource();if(R.type!=="geojson")throw new Error(`geojsonSource.type is ${R.type}, which is !== 'geojson`);R.setData(x),this._changed=!0}getSource(c){return this.sourceCaches[c]&&this.sourceCaches[c].getSource()}addLayer(c,x,R={}){this._checkLoaded();const L=c.id;if(this.getLayer(L))return void this.fire(new a.j(new Error(`Layer "${L}" already exists on this map.`)));let D;if(c.type==="custom"){if(Xn(this,a.aD(c)))return;D=a.aA(c)}else{if("source"in c&&typeof c.source=="object"&&(this.addSource(L,c.source),c=a.aB(c),c=a.e(c,{source:L})),this._validate(a.u.layer,`layers.${L}`,c,{arrayIndex:-1},R))return;D=a.aA(c),this._validateLayer(D),D.setEventedParent(this,{layer:{id:L}})}const X=x?this._order.indexOf(x):this._order.length;if(x&&X===-1)this.fire(new a.j(new Error(`Cannot add layer "${L}" before non-existing layer "${x}".`)));else{if(this._order.splice(X,0,L),this._layerOrderChanged=!0,this._layers[L]=D,this._removedLayers[L]&&D.source&&D.type!=="custom"){const Q=this._removedLayers[L];delete this._removedLayers[L],Q.type!==D.type?this._updatedSources[D.source]="clear":(this._updatedSources[D.source]="reload",this.sourceCaches[D.source].pause())}this._updateLayer(D),D.onAdd&&D.onAdd(this.map)}}moveLayer(c,x){if(this._checkLoaded(),this._changed=!0,!this._layers[c])return void this.fire(new a.j(new Error(`The layer '${c}' does not exist in the map's style and cannot be moved.`)));if(c===x)return;const R=this._order.indexOf(c);this._order.splice(R,1);const L=x?this._order.indexOf(x):this._order.length;x&&L===-1?this.fire(new a.j(new Error(`Cannot move layer "${c}" before non-existing layer "${x}".`))):(this._order.splice(L,0,c),this._layerOrderChanged=!0)}removeLayer(c){this._checkLoaded();const x=this._layers[c];if(!x)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${c}".`)));x.setEventedParent(null);const R=this._order.indexOf(c);this._order.splice(R,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[c]=x,delete this._layers[c],this._serializedLayers&&delete this._serializedLayers[c],delete this._updatedLayers[c],delete this._updatedPaintProps[c],x.onRemove&&x.onRemove(this.map)}getLayer(c){return this._layers[c]}getLayersOrder(){return[...this._order]}hasLayer(c){return c in this._layers}setLayerZoomRange(c,x,R){this._checkLoaded();const L=this.getLayer(c);L?L.minzoom===x&&L.maxzoom===R||(x!=null&&(L.minzoom=x),R!=null&&(L.maxzoom=R),this._updateLayer(L)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${c}".`)))}setFilter(c,x,R={}){this._checkLoaded();const L=this.getLayer(c);if(L){if(!a.aE(L.filter,x))return x==null?(L.filter=void 0,void this._updateLayer(L)):void(this._validate(a.u.filter,`layers.${L.id}.filter`,x,null,R)||(L.filter=a.aB(x),this._updateLayer(L)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${c}".`)))}getFilter(c){return a.aB(this.getLayer(c).filter)}setLayoutProperty(c,x,R,L={}){this._checkLoaded();const D=this.getLayer(c);D?a.aE(D.getLayoutProperty(x),R)||(D.setLayoutProperty(x,R,L),this._updateLayer(D)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${c}".`)))}getLayoutProperty(c,x){const R=this.getLayer(c);if(R)return R.getLayoutProperty(x);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${c}".`)))}setPaintProperty(c,x,R,L={}){this._checkLoaded();const D=this.getLayer(c);D?a.aE(D.getPaintProperty(x),R)||(D.setPaintProperty(x,R,L)&&this._updateLayer(D),this._changed=!0,this._updatedPaintProps[c]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${c}".`)))}getPaintProperty(c,x){return this.getLayer(c).getPaintProperty(x)}setFeatureState(c,x){this._checkLoaded();const R=c.source,L=c.sourceLayer,D=this.sourceCaches[R];if(D===void 0)return void this.fire(new a.j(new Error(`The source '${R}' does not exist in the map's style.`)));const X=D.getSource().type;X==="geojson"&&L?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):X!=="vector"||L?(c.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),D.setFeatureState(L,c.id,x)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(c,x){this._checkLoaded();const R=c.source,L=this.sourceCaches[R];if(L===void 0)return void this.fire(new a.j(new Error(`The source '${R}' does not exist in the map's style.`)));const D=L.getSource().type,X=D==="vector"?c.sourceLayer:void 0;D!=="vector"||X?x&&typeof c.id!="string"&&typeof c.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):L.removeFeatureState(X,c.id,x):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(c){this._checkLoaded();const x=c.source,R=c.sourceLayer,L=this.sourceCaches[x];if(L!==void 0)return L.getSource().type!=="vector"||R?(c.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),L.getFeatureState(R,c.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${x}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const c=a.aF(this.sourceCaches,D=>D.serialize()),x=this._serializeByIds(this._order,!0),R=this.map.getTerrain()||void 0,L=this.stylesheet;return a.aG({version:L.version,name:L.name,metadata:L.metadata,light:L.light,sky:L.sky,center:L.center,zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,sprite:L.sprite,glyphs:L.glyphs,transition:L.transition,sources:c,layers:x,terrain:R},D=>D!==void 0)}_updateLayer(c){this._updatedLayers[c.id]=!0,c.source&&!this._updatedSources[c.source]&&this.sourceCaches[c.source].getSource().type!=="raster"&&(this._updatedSources[c.source]="reload",this.sourceCaches[c.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(c){const x=X=>this._layers[X].type==="fill-extrusion",R={},L=[];for(let X=this._order.length-1;X>=0;X--){const Q=this._order[X];if(x(Q)){R[Q]=X;for(const ie of c){const de=ie[Q];if(de)for(const _e of de)L.push(_e)}}}L.sort((X,Q)=>Q.intersectionZ-X.intersectionZ);const D=[];for(let X=this._order.length-1;X>=0;X--){const Q=this._order[X];if(x(Q))for(let ie=L.length-1;ie>=0;ie--){const de=L[ie].feature;if(R[de.layer.id]{const Qr=St.featureSortOrder;if(Qr){const yn=Qr.indexOf(sr.featureIndex);return Qr.indexOf($r.featureIndex)-yn}return $r.featureIndex-sr.featureIndex});for(const sr of Wt)Ht.push(sr)}}for(const St in tt)tt[St].forEach(Pt=>{const ct=Pt.feature,Ht=de[Q[St].source].getFeatureState(ct.layer["source-layer"],ct.id);ct.source=ct.layer.source,ct.layer["source-layer"]&&(ct.sourceLayer=ct.layer["source-layer"]),ct.state=Ht});return tt}(this._layers,X,this.sourceCaches,c,x,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(D)}querySourceFeatures(c,x){x&&x.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",x.filter,null,x);const R=this.sourceCaches[c];return R?function(L,D){const X=L.getRenderableIds().map(de=>L.getTileByID(de)),Q=[],ie={};for(let de=0;deOe.getTileByID(qe)).sort((qe,tt)=>tt.tileID.overscaledZ-qe.tileID.overscaledZ||(qe.tileID.isLessThan(tt.tileID)?-1:1))}const xe=this.crossTileSymbolIndex.addLayer(_e,ie[_e.source],c.center.lng);X=X||xe}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((D=D||this._layerOrderChanged||R===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(f.now(),c.zoom))&&(this.pauseablePlacement=new Qo(c,this.map.terrain,this._order,D,x,R,L,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ie),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(f.now()),Q=!0),X&&this.pauseablePlacement.placement.setStale()),Q||X)for(const de of this._order){const _e=this._layers[de];_e.type==="symbol"&&this.placement.updateLayerOpacities(_e,ie[_e.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(f.now())}_releaseSymbolFadeTiles(){for(const c in this.sourceCaches)this.sourceCaches[c].releaseSymbolFadeTiles()}getImages(c,x){return a._(this,void 0,void 0,function*(){const R=yield this.imageManager.getImages(x.icons);this._updateTilesForChangedImages();const L=this.sourceCaches[x.source];return L&&L.setDependencies(x.tileID.key,x.type,x.icons),R})}getGlyphs(c,x){return a._(this,void 0,void 0,function*(){const R=yield this.glyphManager.getGlyphs(x.stacks),L=this.sourceCaches[x.source];return L&&L.setDependencies(x.tileID.key,x.type,[""]),R})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(c,x={}){this._checkLoaded(),c&&this._validate(a.u.glyphs,"glyphs",c,null,x)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=c,this.glyphManager.entries={},this.glyphManager.setURL(c))}addSprite(c,x,R={},L){this._checkLoaded();const D=[{id:c,url:x}],X=[...ge(this.stylesheet.sprite),...D];this._validate(a.u.sprite,"sprite",X,null,R)||(this.stylesheet.sprite=X,this._loadSprite(D,!0,L))}removeSprite(c){this._checkLoaded();const x=ge(this.stylesheet.sprite);if(x.find(R=>R.id===c)){if(this._spritesImagesIds[c])for(const R of this._spritesImagesIds[c])this.imageManager.removeImage(R),this._changedImages[R]=!0;x.splice(x.findIndex(R=>R.id===c),1),this.stylesheet.sprite=x.length>0?x:void 0,delete this._spritesImagesIds[c],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${c}" doesn't exists on this map.`)))}getSprite(){return ge(this.stylesheet.sprite)}setSprite(c,x={},R){this._checkLoaded(),c&&this._validate(a.u.sprite,"sprite",c,null,x)||(this.stylesheet.sprite=c,c?this._loadSprite(c,!0,R):(this._unloadSprite(),R&&R(null)))}}var co=a.Y([{name:"a_pos",type:"Int16",components:2}]);const il={prelude:ps(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} +#ifdef TERRAIN3D +uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; +#endif +const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { +#ifdef TERRAIN3D +highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}`),background:ps(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:ps(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ps(`varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ps("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:ps(`uniform highp float u_intensity;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:ps(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ps("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ps("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:ps("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:ps(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:ps(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:ps(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:ps(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:ps(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:ps(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:ps(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:ps(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:ps(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:ps(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:ps(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ps(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:ps(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:ps(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:ps(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:ps(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:ps("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ps("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ps("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:ps("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function ps(z,c){const x=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,R=c.match(/attribute ([\w]+) ([\w]+)/g),L=z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),D=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),X=D?D.concat(L):L,Q={};return{fragmentSource:z=z.replace(x,(ie,de,_e,xe,Oe)=>(Q[Oe]=!0,de==="define"?` +#ifndef HAS_UNIFORM_u_${Oe} +varying ${_e} ${xe} ${Oe}; +#else +uniform ${_e} ${xe} u_${Oe}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${Oe} + ${_e} ${xe} ${Oe} = u_${Oe}; +#endif +`)),vertexSource:c=c.replace(x,(ie,de,_e,xe,Oe)=>{const qe=xe==="float"?"vec2":"vec4",tt=Oe.match(/color/)?"color":qe;return Q[Oe]?de==="define"?` +#ifndef HAS_UNIFORM_u_${Oe} +uniform lowp float u_${Oe}_t; +attribute ${_e} ${qe} a_${Oe}; +varying ${_e} ${xe} ${Oe}; +#else +uniform ${_e} ${xe} u_${Oe}; +#endif +`:tt==="vec4"?` +#ifndef HAS_UNIFORM_u_${Oe} + ${Oe} = a_${Oe}; +#else + ${_e} ${xe} ${Oe} = u_${Oe}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${Oe} + ${Oe} = unpack_mix_${tt}(a_${Oe}, u_${Oe}_t); +#else + ${_e} ${xe} ${Oe} = u_${Oe}; +#endif +`:de==="define"?` +#ifndef HAS_UNIFORM_u_${Oe} +uniform lowp float u_${Oe}_t; +attribute ${_e} ${qe} a_${Oe}; +#else +uniform ${_e} ${xe} u_${Oe}; +#endif +`:tt==="vec4"?` +#ifndef HAS_UNIFORM_u_${Oe} + ${_e} ${xe} ${Oe} = a_${Oe}; +#else + ${_e} ${xe} ${Oe} = u_${Oe}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${Oe} + ${_e} ${xe} ${Oe} = unpack_mix_${tt}(a_${Oe}, u_${Oe}_t); +#else + ${_e} ${xe} ${Oe} = u_${Oe}; +#endif +`}),staticAttributes:R,staticUniforms:X}}class Y{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(c,x,R,L,D,X,Q,ie,de){this.context=c;let _e=this.boundPaintVertexBuffers.length!==L.length;for(let xe=0;!_e&&xe({u_matrix:z,u_texture:0,u_ele_delta:c,u_fog_matrix:x,u_fog_color:R?R.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:R?R.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:R?R.calculateFogBlendOpacity(L):0,u_horizon_color:R?R.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:R?R.properties.get("horizon-fog-blend"):1});function $e(z){const c=[];for(let x=0;x({u_depth:new a.aH(sr,$r.u_depth),u_terrain:new a.aH(sr,$r.u_terrain),u_terrain_dim:new a.aI(sr,$r.u_terrain_dim),u_terrain_matrix:new a.aJ(sr,$r.u_terrain_matrix),u_terrain_unpack:new a.aK(sr,$r.u_terrain_unpack),u_terrain_exaggeration:new a.aI(sr,$r.u_terrain_exaggeration)}))(c,Wt),this.binderUniforms=R?R.getUniforms(c,Wt):[]}draw(c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe,tt,dt,bt,St,Pt){const ct=c.gl;if(this.failedToCreate)return;if(c.program.set(this.program),c.setDepthMode(R),c.setStencilMode(L),c.setColorMode(D),c.setCullFace(X),ie){c.activeTexture.set(ct.TEXTURE2),ct.bindTexture(ct.TEXTURE_2D,ie.depthTexture),c.activeTexture.set(ct.TEXTURE3),ct.bindTexture(ct.TEXTURE_2D,ie.texture);for(const Wt in this.terrainUniforms)this.terrainUniforms[Wt].set(ie[Wt])}for(const Wt in this.fixedUniforms)this.fixedUniforms[Wt].set(Q[Wt]);dt&&dt.setUniforms(c,this.binderUniforms,qe,{zoom:tt});let Ht=0;switch(x){case ct.LINES:Ht=2;break;case ct.TRIANGLES:Ht=3;break;case ct.LINE_STRIP:Ht=1}for(const Wt of Oe.get()){const sr=Wt.vaos||(Wt.vaos={});(sr[de]||(sr[de]=new Y)).bind(c,this,_e,dt?dt.getPaintVertexBuffers():[],xe,Wt.vertexOffset,bt,St,Pt),ct.drawElements(x,Wt.primitiveLength*Ht,ct.UNSIGNED_SHORT,Wt.primitiveOffset*Ht*2)}}}function kt(z,c,x){const R=1/hn(x,1,c.transform.tileZoom),L=Math.pow(2,x.tileID.overscaledZ),D=x.tileSize*Math.pow(2,c.transform.tileZoom)/L,X=D*(x.tileID.canonical.x+x.tileID.wrap*L),Q=D*x.tileID.canonical.y;return{u_image:0,u_texsize:x.imageAtlasTexture.size,u_scale:[R,z.fromScale,z.toScale],u_fade:z.t,u_pixel_coord_upper:[X>>16,Q>>16],u_pixel_coord_lower:[65535&X,65535&Q]}}const Dt=(z,c,x,R)=>{const L=c.style.light,D=L.properties.get("position"),X=[D.x,D.y,D.z],Q=function(){var de=new a.A(9);return a.A!=Float32Array&&(de[1]=0,de[2]=0,de[3]=0,de[5]=0,de[6]=0,de[7]=0),de[0]=1,de[4]=1,de[8]=1,de}();L.properties.get("anchor")==="viewport"&&function(de,_e){var xe=Math.sin(_e),Oe=Math.cos(_e);de[0]=Oe,de[1]=xe,de[2]=0,de[3]=-xe,de[4]=Oe,de[5]=0,de[6]=0,de[7]=0,de[8]=1}(Q,-c.transform.angle),function(de,_e,xe){var Oe=_e[0],qe=_e[1],tt=_e[2];de[0]=Oe*xe[0]+qe*xe[3]+tt*xe[6],de[1]=Oe*xe[1]+qe*xe[4]+tt*xe[7],de[2]=Oe*xe[2]+qe*xe[5]+tt*xe[8]}(X,X,Q);const ie=L.properties.get("color");return{u_matrix:z,u_lightpos:X,u_lightintensity:L.properties.get("intensity"),u_lightcolor:[ie.r,ie.g,ie.b],u_vertical_gradient:+x,u_opacity:R}},Zt=(z,c,x,R,L,D,X)=>a.e(Dt(z,c,x,R),kt(D,c,X),{u_height_factor:-Math.pow(2,L.overscaledZ)/X.tileSize/8}),Nr=z=>({u_matrix:z}),Hr=(z,c,x,R)=>a.e(Nr(z),kt(x,c,R)),Fr=(z,c)=>({u_matrix:z,u_world:c}),an=(z,c,x,R,L)=>a.e(Hr(z,c,x,R),{u_world:L}),ln=(z,c,x,R)=>{const L=z.transform;let D,X;if(R.paint.get("circle-pitch-alignment")==="map"){const Q=hn(x,1,L.zoom);D=!0,X=[Q,Q]}else D=!1,X=L.pixelsToGLUnits;return{u_camera_to_center_distance:L.cameraToCenterDistance,u_scale_with_map:+(R.paint.get("circle-pitch-scale")==="map"),u_matrix:z.translatePosMatrix(c.posMatrix,x,R.paint.get("circle-translate"),R.paint.get("circle-translate-anchor")),u_pitch_with_map:+D,u_device_pixel_ratio:z.pixelRatio,u_extrude_scale:X}},xi=(z,c,x)=>({u_matrix:z,u_inv_matrix:c,u_camera_to_center_distance:x.cameraToCenterDistance,u_viewport_size:[x.width,x.height]}),ms=(z,c,x=1)=>({u_matrix:z,u_color:c,u_overlay:0,u_overlay_scale:x}),Gn=z=>({u_matrix:z}),ys=(z,c,x,R)=>({u_matrix:z,u_extrude_scale:hn(c,1,x),u_intensity:R}),kr=(z,c,x,R)=>{const L=a.H();a.aP(L,0,z.width,z.height,0,0,1);const D=z.context.gl;return{u_matrix:L,u_world:[D.drawingBufferWidth,D.drawingBufferHeight],u_image:x,u_color_ramp:R,u_opacity:c.paint.get("heatmap-opacity")}};function Un(z,c){const x=Math.pow(2,c.canonical.z),R=c.canonical.y;return[new a.Z(0,R/x).toLngLat().lat,new a.Z(0,(R+1)/x).toLngLat().lat]}const Ss=(z,c,x,R)=>{const L=z.transform;return{u_matrix:_s(z,c,x,R),u_ratio:1/hn(c,1,L.zoom),u_device_pixel_ratio:z.pixelRatio,u_units_to_pixels:[1/L.pixelsToGLUnits[0],1/L.pixelsToGLUnits[1]]}},go=(z,c,x,R,L)=>a.e(Ss(z,c,x,L),{u_image:0,u_image_height:R}),Ks=(z,c,x,R,L)=>{const D=z.transform,X=Ps(c,D);return{u_matrix:_s(z,c,x,L),u_texsize:c.imageAtlasTexture.size,u_ratio:1/hn(c,1,D.zoom),u_device_pixel_ratio:z.pixelRatio,u_image:0,u_scale:[X,R.fromScale,R.toScale],u_fade:R.t,u_units_to_pixels:[1/D.pixelsToGLUnits[0],1/D.pixelsToGLUnits[1]]}},Wc=(z,c,x,R,L,D)=>{const X=z.lineAtlas,Q=Ps(c,z.transform),ie=x.layout.get("line-cap")==="round",de=X.getDash(R.from,ie),_e=X.getDash(R.to,ie),xe=de.width*L.fromScale,Oe=_e.width*L.toScale;return a.e(Ss(z,c,x,D),{u_patternscale_a:[Q/xe,-de.height/2],u_patternscale_b:[Q/Oe,-_e.height/2],u_sdfgamma:X.width/(256*Math.min(xe,Oe)*z.pixelRatio)/2,u_image:0,u_tex_y_a:de.y,u_tex_y_b:_e.y,u_mix:L.t})};function Ps(z,c){return 1/hn(z,1,c.tileZoom)}function _s(z,c,x,R){return z.translatePosMatrix(R?R.posMatrix:c.tileID.posMatrix,c,x.paint.get("line-translate"),x.paint.get("line-translate-anchor"))}const xd=(z,c,x,R,L)=>{return{u_matrix:z,u_tl_parent:c,u_scale_parent:x,u_buffer_scale:1,u_fade_t:R.mix,u_opacity:R.opacity*L.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:L.paint.get("raster-brightness-min"),u_brightness_high:L.paint.get("raster-brightness-max"),u_saturation_factor:(X=L.paint.get("raster-saturation"),X>0?1-1/(1.001-X):-X),u_contrast_factor:(D=L.paint.get("raster-contrast"),D>0?1/(1-D):1+D),u_spin_weights:wd(L.paint.get("raster-hue-rotate"))};var D,X};function wd(z){z*=Math.PI/180;const c=Math.sin(z),x=Math.cos(z);return[(2*x+1)/3,(-Math.sqrt(3)*c-x+1)/3,(Math.sqrt(3)*c-x+1)/3]}const gs=(z,c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe)=>{const tt=X.transform;return{u_is_size_zoom_constant:+(z==="constant"||z==="source"),u_is_size_feature_constant:+(z==="constant"||z==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:tt.cameraToCenterDistance,u_pitch:tt.pitch/360*2*Math.PI,u_rotate_symbol:+x,u_aspect_ratio:tt.width/tt.height,u_fade_change:X.options.fadeDuration?X.symbolFadeChange:1,u_matrix:Q,u_label_plane_matrix:ie,u_coord_matrix:de,u_is_text:+xe,u_pitch_with_map:+R,u_is_along_line:L,u_is_variable_anchor:D,u_texsize:Oe,u_texture:0,u_translation:_e,u_pitched_scale:qe}},Hs=(z,c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe,tt)=>{const dt=X.transform;return a.e(gs(z,c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,tt),{u_gamma_scale:R?Math.cos(dt._pitch)*dt.cameraToCenterDistance:1,u_device_pixel_ratio:X.pixelRatio,u_is_halo:+qe})},fa=(z,c,x,R,L,D,X,Q,ie,de,_e,xe,Oe,qe)=>a.e(Hs(z,c,x,R,L,D,X,Q,ie,de,_e,!0,xe,!0,qe),{u_texsize_icon:Oe,u_texture_icon:1}),_c=(z,c,x)=>({u_matrix:z,u_opacity:c,u_color:x}),xc=(z,c,x,R,L,D)=>a.e(function(X,Q,ie,de){const _e=ie.imageManager.getPattern(X.from.toString()),xe=ie.imageManager.getPattern(X.to.toString()),{width:Oe,height:qe}=ie.imageManager.getPixelSize(),tt=Math.pow(2,de.tileID.overscaledZ),dt=de.tileSize*Math.pow(2,ie.transform.tileZoom)/tt,bt=dt*(de.tileID.canonical.x+de.tileID.wrap*tt),St=dt*de.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:_e.tl,u_pattern_br_a:_e.br,u_pattern_tl_b:xe.tl,u_pattern_br_b:xe.br,u_texsize:[Oe,qe],u_mix:Q.t,u_pattern_size_a:_e.displaySize,u_pattern_size_b:xe.displaySize,u_scale_a:Q.fromScale,u_scale_b:Q.toScale,u_tile_units_to_pixels:1/hn(de,1,ie.transform.tileZoom),u_pixel_coord_upper:[bt>>16,St>>16],u_pixel_coord_lower:[65535&bt,65535&St]}}(R,D,x,L),{u_matrix:z,u_opacity:c}),Bh={fillExtrusion:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_lightpos:new a.aN(z,c.u_lightpos),u_lightintensity:new a.aI(z,c.u_lightintensity),u_lightcolor:new a.aN(z,c.u_lightcolor),u_vertical_gradient:new a.aI(z,c.u_vertical_gradient),u_opacity:new a.aI(z,c.u_opacity)}),fillExtrusionPattern:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_lightpos:new a.aN(z,c.u_lightpos),u_lightintensity:new a.aI(z,c.u_lightintensity),u_lightcolor:new a.aN(z,c.u_lightcolor),u_vertical_gradient:new a.aI(z,c.u_vertical_gradient),u_height_factor:new a.aI(z,c.u_height_factor),u_image:new a.aH(z,c.u_image),u_texsize:new a.aO(z,c.u_texsize),u_pixel_coord_upper:new a.aO(z,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(z,c.u_pixel_coord_lower),u_scale:new a.aN(z,c.u_scale),u_fade:new a.aI(z,c.u_fade),u_opacity:new a.aI(z,c.u_opacity)}),fill:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix)}),fillPattern:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_image:new a.aH(z,c.u_image),u_texsize:new a.aO(z,c.u_texsize),u_pixel_coord_upper:new a.aO(z,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(z,c.u_pixel_coord_lower),u_scale:new a.aN(z,c.u_scale),u_fade:new a.aI(z,c.u_fade)}),fillOutline:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_world:new a.aO(z,c.u_world)}),fillOutlinePattern:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_world:new a.aO(z,c.u_world),u_image:new a.aH(z,c.u_image),u_texsize:new a.aO(z,c.u_texsize),u_pixel_coord_upper:new a.aO(z,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(z,c.u_pixel_coord_lower),u_scale:new a.aN(z,c.u_scale),u_fade:new a.aI(z,c.u_fade)}),circle:(z,c)=>({u_camera_to_center_distance:new a.aI(z,c.u_camera_to_center_distance),u_scale_with_map:new a.aH(z,c.u_scale_with_map),u_pitch_with_map:new a.aH(z,c.u_pitch_with_map),u_extrude_scale:new a.aO(z,c.u_extrude_scale),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_matrix:new a.aJ(z,c.u_matrix)}),collisionBox:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_pixel_extrude_scale:new a.aO(z,c.u_pixel_extrude_scale)}),collisionCircle:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_inv_matrix:new a.aJ(z,c.u_inv_matrix),u_camera_to_center_distance:new a.aI(z,c.u_camera_to_center_distance),u_viewport_size:new a.aO(z,c.u_viewport_size)}),debug:(z,c)=>({u_color:new a.aL(z,c.u_color),u_matrix:new a.aJ(z,c.u_matrix),u_overlay:new a.aH(z,c.u_overlay),u_overlay_scale:new a.aI(z,c.u_overlay_scale)}),clippingMask:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix)}),heatmap:(z,c)=>({u_extrude_scale:new a.aI(z,c.u_extrude_scale),u_intensity:new a.aI(z,c.u_intensity),u_matrix:new a.aJ(z,c.u_matrix)}),heatmapTexture:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_world:new a.aO(z,c.u_world),u_image:new a.aH(z,c.u_image),u_color_ramp:new a.aH(z,c.u_color_ramp),u_opacity:new a.aI(z,c.u_opacity)}),hillshade:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_image:new a.aH(z,c.u_image),u_latrange:new a.aO(z,c.u_latrange),u_light:new a.aO(z,c.u_light),u_shadow:new a.aL(z,c.u_shadow),u_highlight:new a.aL(z,c.u_highlight),u_accent:new a.aL(z,c.u_accent)}),hillshadePrepare:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_image:new a.aH(z,c.u_image),u_dimension:new a.aO(z,c.u_dimension),u_zoom:new a.aI(z,c.u_zoom),u_unpack:new a.aK(z,c.u_unpack)}),line:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_ratio:new a.aI(z,c.u_ratio),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_units_to_pixels:new a.aO(z,c.u_units_to_pixels)}),lineGradient:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_ratio:new a.aI(z,c.u_ratio),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_units_to_pixels:new a.aO(z,c.u_units_to_pixels),u_image:new a.aH(z,c.u_image),u_image_height:new a.aI(z,c.u_image_height)}),linePattern:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_texsize:new a.aO(z,c.u_texsize),u_ratio:new a.aI(z,c.u_ratio),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_image:new a.aH(z,c.u_image),u_units_to_pixels:new a.aO(z,c.u_units_to_pixels),u_scale:new a.aN(z,c.u_scale),u_fade:new a.aI(z,c.u_fade)}),lineSDF:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_ratio:new a.aI(z,c.u_ratio),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_units_to_pixels:new a.aO(z,c.u_units_to_pixels),u_patternscale_a:new a.aO(z,c.u_patternscale_a),u_patternscale_b:new a.aO(z,c.u_patternscale_b),u_sdfgamma:new a.aI(z,c.u_sdfgamma),u_image:new a.aH(z,c.u_image),u_tex_y_a:new a.aI(z,c.u_tex_y_a),u_tex_y_b:new a.aI(z,c.u_tex_y_b),u_mix:new a.aI(z,c.u_mix)}),raster:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_tl_parent:new a.aO(z,c.u_tl_parent),u_scale_parent:new a.aI(z,c.u_scale_parent),u_buffer_scale:new a.aI(z,c.u_buffer_scale),u_fade_t:new a.aI(z,c.u_fade_t),u_opacity:new a.aI(z,c.u_opacity),u_image0:new a.aH(z,c.u_image0),u_image1:new a.aH(z,c.u_image1),u_brightness_low:new a.aI(z,c.u_brightness_low),u_brightness_high:new a.aI(z,c.u_brightness_high),u_saturation_factor:new a.aI(z,c.u_saturation_factor),u_contrast_factor:new a.aI(z,c.u_contrast_factor),u_spin_weights:new a.aN(z,c.u_spin_weights)}),symbolIcon:(z,c)=>({u_is_size_zoom_constant:new a.aH(z,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(z,c.u_is_size_feature_constant),u_size_t:new a.aI(z,c.u_size_t),u_size:new a.aI(z,c.u_size),u_camera_to_center_distance:new a.aI(z,c.u_camera_to_center_distance),u_pitch:new a.aI(z,c.u_pitch),u_rotate_symbol:new a.aH(z,c.u_rotate_symbol),u_aspect_ratio:new a.aI(z,c.u_aspect_ratio),u_fade_change:new a.aI(z,c.u_fade_change),u_matrix:new a.aJ(z,c.u_matrix),u_label_plane_matrix:new a.aJ(z,c.u_label_plane_matrix),u_coord_matrix:new a.aJ(z,c.u_coord_matrix),u_is_text:new a.aH(z,c.u_is_text),u_pitch_with_map:new a.aH(z,c.u_pitch_with_map),u_is_along_line:new a.aH(z,c.u_is_along_line),u_is_variable_anchor:new a.aH(z,c.u_is_variable_anchor),u_texsize:new a.aO(z,c.u_texsize),u_texture:new a.aH(z,c.u_texture),u_translation:new a.aO(z,c.u_translation),u_pitched_scale:new a.aI(z,c.u_pitched_scale)}),symbolSDF:(z,c)=>({u_is_size_zoom_constant:new a.aH(z,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(z,c.u_is_size_feature_constant),u_size_t:new a.aI(z,c.u_size_t),u_size:new a.aI(z,c.u_size),u_camera_to_center_distance:new a.aI(z,c.u_camera_to_center_distance),u_pitch:new a.aI(z,c.u_pitch),u_rotate_symbol:new a.aH(z,c.u_rotate_symbol),u_aspect_ratio:new a.aI(z,c.u_aspect_ratio),u_fade_change:new a.aI(z,c.u_fade_change),u_matrix:new a.aJ(z,c.u_matrix),u_label_plane_matrix:new a.aJ(z,c.u_label_plane_matrix),u_coord_matrix:new a.aJ(z,c.u_coord_matrix),u_is_text:new a.aH(z,c.u_is_text),u_pitch_with_map:new a.aH(z,c.u_pitch_with_map),u_is_along_line:new a.aH(z,c.u_is_along_line),u_is_variable_anchor:new a.aH(z,c.u_is_variable_anchor),u_texsize:new a.aO(z,c.u_texsize),u_texture:new a.aH(z,c.u_texture),u_gamma_scale:new a.aI(z,c.u_gamma_scale),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_is_halo:new a.aH(z,c.u_is_halo),u_translation:new a.aO(z,c.u_translation),u_pitched_scale:new a.aI(z,c.u_pitched_scale)}),symbolTextAndIcon:(z,c)=>({u_is_size_zoom_constant:new a.aH(z,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(z,c.u_is_size_feature_constant),u_size_t:new a.aI(z,c.u_size_t),u_size:new a.aI(z,c.u_size),u_camera_to_center_distance:new a.aI(z,c.u_camera_to_center_distance),u_pitch:new a.aI(z,c.u_pitch),u_rotate_symbol:new a.aH(z,c.u_rotate_symbol),u_aspect_ratio:new a.aI(z,c.u_aspect_ratio),u_fade_change:new a.aI(z,c.u_fade_change),u_matrix:new a.aJ(z,c.u_matrix),u_label_plane_matrix:new a.aJ(z,c.u_label_plane_matrix),u_coord_matrix:new a.aJ(z,c.u_coord_matrix),u_is_text:new a.aH(z,c.u_is_text),u_pitch_with_map:new a.aH(z,c.u_pitch_with_map),u_is_along_line:new a.aH(z,c.u_is_along_line),u_is_variable_anchor:new a.aH(z,c.u_is_variable_anchor),u_texsize:new a.aO(z,c.u_texsize),u_texsize_icon:new a.aO(z,c.u_texsize_icon),u_texture:new a.aH(z,c.u_texture),u_texture_icon:new a.aH(z,c.u_texture_icon),u_gamma_scale:new a.aI(z,c.u_gamma_scale),u_device_pixel_ratio:new a.aI(z,c.u_device_pixel_ratio),u_is_halo:new a.aH(z,c.u_is_halo),u_translation:new a.aO(z,c.u_translation),u_pitched_scale:new a.aI(z,c.u_pitched_scale)}),background:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_opacity:new a.aI(z,c.u_opacity),u_color:new a.aL(z,c.u_color)}),backgroundPattern:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_opacity:new a.aI(z,c.u_opacity),u_image:new a.aH(z,c.u_image),u_pattern_tl_a:new a.aO(z,c.u_pattern_tl_a),u_pattern_br_a:new a.aO(z,c.u_pattern_br_a),u_pattern_tl_b:new a.aO(z,c.u_pattern_tl_b),u_pattern_br_b:new a.aO(z,c.u_pattern_br_b),u_texsize:new a.aO(z,c.u_texsize),u_mix:new a.aI(z,c.u_mix),u_pattern_size_a:new a.aO(z,c.u_pattern_size_a),u_pattern_size_b:new a.aO(z,c.u_pattern_size_b),u_scale_a:new a.aI(z,c.u_scale_a),u_scale_b:new a.aI(z,c.u_scale_b),u_pixel_coord_upper:new a.aO(z,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(z,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(z,c.u_tile_units_to_pixels)}),terrain:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_texture:new a.aH(z,c.u_texture),u_ele_delta:new a.aI(z,c.u_ele_delta),u_fog_matrix:new a.aJ(z,c.u_fog_matrix),u_fog_color:new a.aL(z,c.u_fog_color),u_fog_ground_blend:new a.aI(z,c.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(z,c.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(z,c.u_horizon_color),u_horizon_fog_blend:new a.aI(z,c.u_horizon_fog_blend)}),terrainDepth:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_ele_delta:new a.aI(z,c.u_ele_delta)}),terrainCoords:(z,c)=>({u_matrix:new a.aJ(z,c.u_matrix),u_texture:new a.aH(z,c.u_texture),u_terrain_coords_id:new a.aI(z,c.u_terrain_coords_id),u_ele_delta:new a.aI(z,c.u_ele_delta)}),sky:(z,c)=>({u_sky_color:new a.aL(z,c.u_sky_color),u_horizon_color:new a.aL(z,c.u_horizon_color),u_horizon:new a.aI(z,c.u_horizon),u_sky_horizon_blend:new a.aI(z,c.u_sky_horizon_blend)})};class Nl{constructor(c,x,R){this.context=c;const L=c.gl;this.buffer=L.createBuffer(),this.dynamicDraw=!!R,this.context.unbindVAO(),c.bindElementBuffer.set(this.buffer),L.bufferData(L.ELEMENT_ARRAY_BUFFER,x.arrayBuffer,this.dynamicDraw?L.DYNAMIC_DRAW:L.STATIC_DRAW),this.dynamicDraw||delete x.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(c){const x=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),x.bufferSubData(x.ELEMENT_ARRAY_BUFFER,0,c.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Zp={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class wc{constructor(c,x,R,L){this.length=x.length,this.attributes=R,this.itemSize=x.bytesPerElement,this.dynamicDraw=L,this.context=c;const D=c.gl;this.buffer=D.createBuffer(),c.bindVertexBuffer.set(this.buffer),D.bufferData(D.ARRAY_BUFFER,x.arrayBuffer,this.dynamicDraw?D.DYNAMIC_DRAW:D.STATIC_DRAW),this.dynamicDraw||delete x.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(c){if(c.length!==this.length)throw new Error(`Length of new data is ${c.length}, which doesn't match current length of ${this.length}`);const x=this.context.gl;this.bind(),x.bufferSubData(x.ARRAY_BUFFER,0,c.arrayBuffer)}enableAttributes(c,x){for(let R=0;R0){const sr=a.H();a.aQ(sr,ct.placementInvProjMatrix,z.transform.glCoordMatrix),a.aQ(sr,sr,ct.placementViewportMatrix),ie.push({circleArray:Wt,circleOffset:_e,transform:Pt.posMatrix,invTransform:sr,coord:Pt}),de+=Wt.length/4,_e=de}Ht&&Q.draw(D,X.LINES,Ni.disabled,is.disabled,z.colorModeForRenderPass(),Es.disabled,{u_matrix:Pt.posMatrix,u_pixel_extrude_scale:[1/(xe=z.transform).width,1/xe.height]},z.style.map.terrain&&z.style.map.terrain.getTerrainData(Pt),x.id,Ht.layoutVertexBuffer,Ht.indexBuffer,Ht.segments,null,z.transform.zoom,null,null,Ht.collisionVertexBuffer)}var xe;if(!L||!ie.length)return;const Oe=z.useProgram("collisionCircle"),qe=new a.aR;qe.resize(4*de),qe._trim();let tt=0;for(const St of ie)for(let Pt=0;Pt=0&&(St[ct.associatedIconIndex]={shiftedAnchor:Ui,angle:qo})}else Jt(ct.numGlyphs,dt)}if(de){bt.clear();const Pt=z.icon.placedSymbolArray;for(let ct=0;ctz.style.map.terrain.getElevation(fn,f0,Zf):null,rf=x.layout.get("text-rotation-alignment")==="map";Be(Yn,fn.posMatrix,z,L,d0,t1,St,de,rf,dt,fn.toUnwrapped(),tt.width,tt.height,eh,Fs)}const th=fn.posMatrix,rh=L&&Qr||r1,Cd=Pt||rh?Yu:d0,nh=Wf,Yl=nn&&x.paint.get(L?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let fu;fu=nn?Yn.iconsInText?fa(Ui.kind,Cs,ct,St,Pt,rh,z,th,Cd,nh,eh,Ia,Au,Tn):Hs(Ui.kind,Cs,ct,St,Pt,rh,z,th,Cd,nh,eh,L,Ia,!0,Tn):gs(Ui.kind,Cs,ct,St,Pt,rh,z,th,Cd,nh,eh,L,Ia,Tn);const Ec={program:qi,buffers:Ki,uniformValues:fu,atlasTexture:Kc,atlasTextureIcon:du,atlasInterpolation:Is,atlasInterpolationIcon:hu,isSDF:nn,hasHalo:Yl};if(Wt&&Yn.canOverlap){sr=!0;const Fs=Ki.segments.get();for(const rf of Fs)yn.push({segments:new a.a0([rf]),sortKey:rf.sortKey,state:Ec,terrainData:Ro})}else yn.push({segments:Ki.segments,sortKey:0,state:Ec,terrainData:Ro})}sr&&yn.sort((fn,pn)=>fn.sortKey-pn.sortKey);for(const fn of yn){const pn=fn.state;if(Oe.activeTexture.set(qe.TEXTURE0),pn.atlasTexture.bind(pn.atlasInterpolation,qe.CLAMP_TO_EDGE),pn.atlasTextureIcon&&(Oe.activeTexture.set(qe.TEXTURE1),pn.atlasTextureIcon&&pn.atlasTextureIcon.bind(pn.atlasInterpolationIcon,qe.CLAMP_TO_EDGE)),pn.isSDF){const Yn=pn.uniformValues;pn.hasHalo&&(Yn.u_is_halo=1,Xu(pn.buffers,fn.segments,x,z,pn.program,$r,_e,xe,Yn,fn.terrainData)),Yn.u_is_halo=0}Xu(pn.buffers,fn.segments,x,z,pn.program,$r,_e,xe,pn.uniformValues,fn.terrainData)}}function Xu(z,c,x,R,L,D,X,Q,ie,de){const _e=R.context;L.draw(_e,_e.gl.TRIANGLES,D,X,Q,Es.disabled,ie,de,x.id,z.layoutVertexBuffer,z.indexBuffer,c,x.paint,R.transform.zoom,z.programConfigurations.get(x.id),z.dynamicLayoutVertexBuffer,z.opacityVertexBuffer)}function Lu(z,c,x,R){const L=z.context,D=L.gl,X=is.disabled,Q=new Ji([D.ONE,D.ONE],a.aM.transparent,[!0,!0,!0,!0]),ie=c.getBucket(x);if(!ie)return;const de=R.key;let _e=x.heatmapFbos.get(de);_e||(_e=uu(L,c.tileSize,c.tileSize),x.heatmapFbos.set(de,_e)),L.bindFramebuffer.set(_e.framebuffer),L.viewport.set([0,0,c.tileSize,c.tileSize]),L.clear({color:a.aM.transparent});const xe=ie.programConfigurations.get(x.id),Oe=z.useProgram("heatmap",xe),qe=z.style.map.terrain.getTerrainData(R);Oe.draw(L,D.TRIANGLES,Ni.disabled,X,Q,Es.disabled,ys(R.posMatrix,c,z.transform.zoom,x.paint.get("heatmap-intensity")),qe,x.id,ie.layoutVertexBuffer,ie.indexBuffer,ie.segments,x.paint,z.transform.zoom,xe)}function ta(z,c,x){const R=z.context,L=R.gl;R.setColorMode(z.colorModeForRenderPass());const D=cu(R,c),X=x.key,Q=c.heatmapFbos.get(X);Q&&(R.activeTexture.set(L.TEXTURE0),L.bindTexture(L.TEXTURE_2D,Q.colorAttachment.get()),R.activeTexture.set(L.TEXTURE1),D.bind(L.LINEAR,L.CLAMP_TO_EDGE),z.useProgram("heatmapTexture").draw(R,L.TRIANGLES,Ni.disabled,is.disabled,z.colorModeForRenderPass(),Es.disabled,kr(z,c,0,1),null,c.id,z.rasterBoundsBuffer,z.quadTriangleIndexBuffer,z.rasterBoundsSegments,c.paint,z.transform.zoom),Q.destroy(),c.heatmapFbos.delete(X))}function uu(z,c,x){var R,L;const D=z.gl,X=D.createTexture();D.bindTexture(D.TEXTURE_2D,X),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_S,D.CLAMP_TO_EDGE),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_T,D.CLAMP_TO_EDGE),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MIN_FILTER,D.LINEAR),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_MAG_FILTER,D.LINEAR);const Q=(R=z.HALF_FLOAT)!==null&&R!==void 0?R:D.UNSIGNED_BYTE,ie=(L=z.RGBA16F)!==null&&L!==void 0?L:D.RGBA;D.texImage2D(D.TEXTURE_2D,0,ie,c,x,0,D.RGBA,Q,null);const de=z.createFramebuffer(c,x,!1,!1);return de.colorAttachment.set(X),de}function cu(z,c){return c.colorRampTexture||(c.colorRampTexture=new ee(z,c.colorRamp,z.gl.RGBA)),c.colorRampTexture}function pa(z,c,x,R,L){if(!x||!R||!R.imageAtlas)return;const D=R.imageAtlas.patternPositions;let X=D[x.to.toString()],Q=D[x.from.toString()];if(!X&&Q&&(X=Q),!Q&&X&&(Q=X),!X||!Q){const ie=L.getPaintProperty(c);X=D[ie],Q=D[ie]}X&&Q&&z.setConstantPatternPositions(X,Q)}function eo(z,c,x,R,L,D,X){const Q=z.context.gl,ie="fill-pattern",de=x.paint.get(ie),_e=de&&de.constantOr(1),xe=x.getCrossfadeParameters();let Oe,qe,tt,dt,bt;X?(qe=_e&&!x.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Oe=Q.LINES):(qe=_e?"fillPattern":"fill",Oe=Q.TRIANGLES);const St=de.constantOr(null);for(const Pt of R){const ct=c.getTile(Pt);if(_e&&!ct.patternsLoaded())continue;const Ht=ct.getBucket(x);if(!Ht)continue;const Wt=Ht.programConfigurations.get(x.id),sr=z.useProgram(qe,Wt),$r=z.style.map.terrain&&z.style.map.terrain.getTerrainData(Pt);_e&&(z.context.activeTexture.set(Q.TEXTURE0),ct.imageAtlasTexture.bind(Q.LINEAR,Q.CLAMP_TO_EDGE),Wt.updatePaintBuffers(xe)),pa(Wt,ie,St,ct,x);const Qr=$r?Pt:null,yn=z.translatePosMatrix(Qr?Qr.posMatrix:Pt.posMatrix,ct,x.paint.get("fill-translate"),x.paint.get("fill-translate-anchor"));if(X){dt=Ht.indexBuffer2,bt=Ht.segments2;const Tn=[Q.drawingBufferWidth,Q.drawingBufferHeight];tt=qe==="fillOutlinePattern"&&_e?an(yn,z,xe,ct,Tn):Fr(yn,Tn)}else dt=Ht.indexBuffer,bt=Ht.segments,tt=_e?Hr(yn,z,xe,ct):Nr(yn);sr.draw(z.context,Oe,L,z.stencilModeForClipping(Pt),D,Es.disabled,tt,$r,x.id,Ht.layoutVertexBuffer,dt,bt,x.paint,z.transform.zoom,Wt)}}function Ju(z,c,x,R,L,D,X){const Q=z.context,ie=Q.gl,de="fill-extrusion-pattern",_e=x.paint.get(de),xe=_e.constantOr(1),Oe=x.getCrossfadeParameters(),qe=x.paint.get("fill-extrusion-opacity"),tt=_e.constantOr(null);for(const dt of R){const bt=c.getTile(dt),St=bt.getBucket(x);if(!St)continue;const Pt=z.style.map.terrain&&z.style.map.terrain.getTerrainData(dt),ct=St.programConfigurations.get(x.id),Ht=z.useProgram(xe?"fillExtrusionPattern":"fillExtrusion",ct);xe&&(z.context.activeTexture.set(ie.TEXTURE0),bt.imageAtlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ct.updatePaintBuffers(Oe)),pa(ct,de,tt,bt,x);const Wt=z.translatePosMatrix(dt.posMatrix,bt,x.paint.get("fill-extrusion-translate"),x.paint.get("fill-extrusion-translate-anchor")),sr=x.paint.get("fill-extrusion-vertical-gradient"),$r=xe?Zt(Wt,z,sr,qe,dt,Oe,bt):Dt(Wt,z,sr,qe);Ht.draw(Q,Q.gl.TRIANGLES,L,D,X,Es.backCCW,$r,Pt,x.id,St.layoutVertexBuffer,St.indexBuffer,St.segments,x.paint,z.transform.zoom,ct,z.style.map.terrain&&St.centroidVertexBuffer)}}function bc(z,c,x,R,L,D,X){const Q=z.context,ie=Q.gl,de=x.fbo;if(!de)return;const _e=z.useProgram("hillshade"),xe=z.style.map.terrain&&z.style.map.terrain.getTerrainData(c);Q.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,de.colorAttachment.get()),_e.draw(Q,ie.TRIANGLES,L,D,X,Es.disabled,((Oe,qe,tt,dt)=>{const bt=tt.paint.get("hillshade-shadow-color"),St=tt.paint.get("hillshade-highlight-color"),Pt=tt.paint.get("hillshade-accent-color");let ct=tt.paint.get("hillshade-illumination-direction")*(Math.PI/180);tt.paint.get("hillshade-illumination-anchor")==="viewport"&&(ct-=Oe.transform.angle);const Ht=!Oe.options.moving;return{u_matrix:dt?dt.posMatrix:Oe.transform.calculatePosMatrix(qe.tileID.toUnwrapped(),Ht),u_image:0,u_latrange:Un(0,qe.tileID),u_light:[tt.paint.get("hillshade-exaggeration"),ct],u_shadow:bt,u_highlight:St,u_accent:Pt}})(z,x,R,xe?c:null),xe,R.id,z.rasterBoundsBuffer,z.quadTriangleIndexBuffer,z.rasterBoundsSegments)}function ql(z,c,x,R,L,D){const X=z.context,Q=X.gl,ie=c.dem;if(ie&&ie.data){const de=ie.dim,_e=ie.stride,xe=ie.getPixels();if(X.activeTexture.set(Q.TEXTURE1),X.pixelStoreUnpackPremultiplyAlpha.set(!1),c.demTexture=c.demTexture||z.getTileTexture(_e),c.demTexture){const qe=c.demTexture;qe.update(xe,{premultiply:!1}),qe.bind(Q.NEAREST,Q.CLAMP_TO_EDGE)}else c.demTexture=new ee(X,xe,Q.RGBA,{premultiply:!1}),c.demTexture.bind(Q.NEAREST,Q.CLAMP_TO_EDGE);X.activeTexture.set(Q.TEXTURE0);let Oe=c.fbo;if(!Oe){const qe=new ee(X,{width:de,height:de,data:null},Q.RGBA);qe.bind(Q.LINEAR,Q.CLAMP_TO_EDGE),Oe=c.fbo=X.createFramebuffer(de,de,!0,!1),Oe.colorAttachment.set(qe.texture)}X.bindFramebuffer.set(Oe.framebuffer),X.viewport.set([0,0,de,de]),z.useProgram("hillshadePrepare").draw(X,Q.TRIANGLES,R,L,D,Es.disabled,((qe,tt)=>{const dt=tt.stride,bt=a.H();return a.aP(bt,0,a.X,-a.X,0,0,1),a.J(bt,bt,[0,-a.X,0]),{u_matrix:bt,u_image:1,u_dimension:[dt,dt],u_zoom:qe.overscaledZ,u_unpack:tt.getUnpackVector()}})(c.tileID,ie),null,x.id,z.rasterBoundsBuffer,z.quadTriangleIndexBuffer,z.rasterBoundsSegments),c.needsHillshadePrepare=!1}}function Fl(z,c,x,R,L,D){const X=R.paint.get("raster-fade-duration");if(!D&&X>0){const Q=f.now(),ie=(Q-z.timeAdded)/X,de=c?(Q-c.timeAdded)/X:-1,_e=x.getSource(),xe=L.coveringZoomLevel({tileSize:_e.tileSize,roundZoom:_e.roundZoom}),Oe=!c||Math.abs(c.tileID.overscaledZ-xe)>Math.abs(z.tileID.overscaledZ-xe),qe=Oe&&z.refreshedUponExpiration?1:a.ac(Oe?ie:1-de,0,1);return z.refreshedUponExpiration&&ie>=1&&(z.refreshedUponExpiration=!1),c?{opacity:1,mix:1-qe}:{opacity:qe,mix:0}}return{opacity:1,mix:0}}const za=new a.aM(1,0,0,1),Ot=new a.aM(0,1,0,1),hr=new a.aM(0,0,1,1),En=new a.aM(1,0,1,1),bi=new a.aM(0,1,1,1);function hs(z,c,x,R){F(z,0,c+x/2,z.transform.width,x,R)}function ts(z,c,x,R){F(z,c-x/2,0,x,z.transform.height,R)}function F(z,c,x,R,L,D){const X=z.context,Q=X.gl;Q.enable(Q.SCISSOR_TEST),Q.scissor(c*z.pixelRatio,x*z.pixelRatio,R*z.pixelRatio,L*z.pixelRatio),X.clear({color:D}),Q.disable(Q.SCISSOR_TEST)}function g(z,c,x){const R=z.context,L=R.gl,D=x.posMatrix,X=z.useProgram("debug"),Q=Ni.disabled,ie=is.disabled,de=z.colorModeForRenderPass(),_e="$debug",xe=z.style.map.terrain&&z.style.map.terrain.getTerrainData(x);R.activeTexture.set(L.TEXTURE0);const Oe=c.getTileByID(x.key).latestRawTileData,qe=Math.floor((Oe&&Oe.byteLength||0)/1024),tt=c.getTile(x).tileSize,dt=512/Math.min(tt,512)*(x.overscaledZ/z.transform.zoom)*.5;let bt=x.canonical.toString();x.overscaledZ!==x.canonical.z&&(bt+=` => ${x.overscaledZ}`),function(St,Pt){St.initDebugOverlayCanvas();const ct=St.debugOverlayCanvas,Ht=St.context.gl,Wt=St.debugOverlayCanvas.getContext("2d");Wt.clearRect(0,0,ct.width,ct.height),Wt.shadowColor="white",Wt.shadowBlur=2,Wt.lineWidth=1.5,Wt.strokeStyle="white",Wt.textBaseline="top",Wt.font="bold 36px Open Sans, sans-serif",Wt.fillText(Pt,5,5),Wt.strokeText(Pt,5,5),St.debugOverlayTexture.update(ct),St.debugOverlayTexture.bind(Ht.LINEAR,Ht.CLAMP_TO_EDGE)}(z,`${bt} ${qe}kB`),X.draw(R,L.TRIANGLES,Q,ie,Ji.alphaBlended,Es.disabled,ms(D,a.aM.transparent,dt),null,_e,z.debugBuffer,z.quadTriangleIndexBuffer,z.debugSegments),X.draw(R,L.LINE_STRIP,Q,ie,de,Es.disabled,ms(D,a.aM.red),xe,_e,z.debugBuffer,z.tileBorderIndexBuffer,z.debugSegments)}function _(z,c,x){const R=z.context,L=R.gl,D=z.colorModeForRenderPass(),X=new Ni(L.LEQUAL,Ni.ReadWrite,z.depthRangeFor3D),Q=z.useProgram("terrain"),ie=c.getTerrainMesh();R.bindFramebuffer.set(null),R.viewport.set([0,0,z.width,z.height]);for(const de of x){const _e=z.renderToTexture.getTexture(de),xe=c.getTerrainData(de.tileID);R.activeTexture.set(L.TEXTURE0),L.bindTexture(L.TEXTURE_2D,_e.texture);const Oe=z.transform.calculatePosMatrix(de.tileID.toUnwrapped()),qe=c.getMeshFrameDelta(z.transform.zoom),tt=z.transform.calculateFogMatrix(de.tileID.toUnwrapped()),dt=ae(Oe,qe,tt,z.style.sky,z.transform.pitch);Q.draw(R,L.TRIANGLES,X,is.disabled,D,Es.backCCW,dt,xe,"terrain",ie.vertexBuffer,ie.indexBuffer,ie.segments)}}class w{constructor(c,x,R){this.vertexBuffer=c,this.indexBuffer=x,this.segments=R}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class k{constructor(c,x){this.context=new ea(c),this.transform=x,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ot.maxUnderzooming+ot.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Or}resize(c,x,R){if(this.width=Math.floor(c*R),this.height=Math.floor(x*R),this.pixelRatio=R,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const L of this.style._order)this.style._layers[L].resize()}setup(){const c=this.context,x=new a.aX;x.emplaceBack(0,0),x.emplaceBack(a.X,0),x.emplaceBack(0,a.X),x.emplaceBack(a.X,a.X),this.tileExtentBuffer=c.createVertexBuffer(x,co.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);const R=new a.aX;R.emplaceBack(0,0),R.emplaceBack(a.X,0),R.emplaceBack(0,a.X),R.emplaceBack(a.X,a.X),this.debugBuffer=c.createVertexBuffer(R,co.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);const L=new a.$;L.emplaceBack(0,0,0,0),L.emplaceBack(a.X,0,a.X,0),L.emplaceBack(0,a.X,0,a.X),L.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=c.createVertexBuffer(L,Ur.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);const D=new a.aX;D.emplaceBack(0,0),D.emplaceBack(1,0),D.emplaceBack(0,1),D.emplaceBack(1,1),this.viewportBuffer=c.createVertexBuffer(D,co.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);const X=new a.aZ;X.emplaceBack(0),X.emplaceBack(1),X.emplaceBack(3),X.emplaceBack(2),X.emplaceBack(0),this.tileBorderIndexBuffer=c.createIndexBuffer(X);const Q=new a.aY;Q.emplaceBack(0,1,2),Q.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=c.createIndexBuffer(Q);const ie=this.context.gl;this.stencilClearMode=new is({func:ie.ALWAYS,mask:0},0,255,ie.ZERO,ie.ZERO,ie.ZERO)}clearStencil(){const c=this.context,x=c.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const R=a.H();a.aP(R,0,this.width,this.height,0,0,1),a.K(R,R,[x.drawingBufferWidth,x.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(c,x.TRIANGLES,Ni.disabled,this.stencilClearMode,Ji.disabled,Es.disabled,Gn(R),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(c,x){if(this.currentStencilSource===c.source||!c.isTileClipped()||!x||!x.length)return;this.currentStencilSource=c.source;const R=this.context,L=R.gl;this.nextStencilID+x.length>256&&this.clearStencil(),R.setColorMode(Ji.disabled),R.setDepthMode(Ni.disabled);const D=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const X of x){const Q=this._tileClippingMaskIDs[X.key]=this.nextStencilID++,ie=this.style.map.terrain&&this.style.map.terrain.getTerrainData(X);D.draw(R,L.TRIANGLES,Ni.disabled,new is({func:L.ALWAYS,mask:0},Q,255,L.KEEP,L.KEEP,L.REPLACE),Ji.disabled,Es.disabled,Gn(X.posMatrix),ie,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const c=this.nextStencilID++,x=this.context.gl;return new is({func:x.NOTEQUAL,mask:255},c,255,x.KEEP,x.KEEP,x.REPLACE)}stencilModeForClipping(c){const x=this.context.gl;return new is({func:x.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,x.KEEP,x.KEEP,x.REPLACE)}stencilConfigForOverlap(c){const x=this.context.gl,R=c.sort((X,Q)=>Q.overscaledZ-X.overscaledZ),L=R[R.length-1].overscaledZ,D=R[0].overscaledZ-L+1;if(D>1){this.currentStencilSource=void 0,this.nextStencilID+D>256&&this.clearStencil();const X={};for(let Q=0;Q({u_sky_color:St.properties.get("sky-color"),u_horizon_color:St.properties.get("horizon-color"),u_horizon:(Pt.height/2+Pt.getHorizon())*ct,u_sky_horizon_blend:St.properties.get("sky-horizon-blend")*Pt.height/2*ct}))(de,ie.style.map.transform,ie.pixelRatio),qe=new Ni(xe.LEQUAL,Ni.ReadWrite,[0,1]),tt=is.disabled,dt=ie.colorModeForRenderPass(),bt=ie.useProgram("sky");if(!de.mesh){const St=new a.aX;St.emplaceBack(-1,-1),St.emplaceBack(1,-1),St.emplaceBack(1,1),St.emplaceBack(-1,1);const Pt=new a.aY;Pt.emplaceBack(0,1,2),Pt.emplaceBack(0,2,3),de.mesh=new w(_e.createVertexBuffer(St,co.members),_e.createIndexBuffer(Pt),a.a0.simpleSegment(0,0,St.length,Pt.length))}bt.draw(_e,xe.TRIANGLES,qe,tt,dt,Es.disabled,Oe,void 0,"sky",de.mesh.vertexBuffer,de.mesh.indexBuffer,de.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=x.showOverdrawInspector,this.depthRangeFor3D=[0,1-(c._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=R.length-1;this.currentLayer>=0;this.currentLayer--){const ie=this.style._layers[R[this.currentLayer]],de=L[ie.source],_e=D[ie.source];this._renderTileClippingMasks(ie,_e),this.renderLayer(this,de,ie,_e)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerbt.source&&!bt.isHidden(_e)?[de.sourceCaches[bt.source]]:[]),qe=Oe.filter(bt=>bt.getSource().type==="vector"),tt=Oe.filter(bt=>bt.getSource().type!=="vector"),dt=bt=>{(!xe||xe.getSource().maxzoomdt(bt)),xe||tt.forEach(bt=>dt(bt)),xe}(this.style,this.transform.zoom);ie&&function(de,_e,xe){for(let Oe=0;Oe0),L&&(a.b0(x,R),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(D,X){const Q=D.context,ie=Q.gl,de=Ji.unblended,_e=new Ni(ie.LEQUAL,Ni.ReadWrite,[0,1]),xe=X.getTerrainMesh(),Oe=X.sourceCache.getRenderableTiles(),qe=D.useProgram("terrainDepth");Q.bindFramebuffer.set(X.getFramebuffer("depth").framebuffer),Q.viewport.set([0,0,D.width/devicePixelRatio,D.height/devicePixelRatio]),Q.clear({color:a.aM.transparent,depth:1});for(const tt of Oe){const dt=X.getTerrainData(tt.tileID),bt={u_matrix:D.transform.calculatePosMatrix(tt.tileID.toUnwrapped()),u_ele_delta:X.getMeshFrameDelta(D.transform.zoom)};qe.draw(Q,ie.TRIANGLES,_e,is.disabled,de,Es.backCCW,bt,dt,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}Q.bindFramebuffer.set(null),Q.viewport.set([0,0,D.width,D.height])}(this,this.style.map.terrain),function(D,X){const Q=D.context,ie=Q.gl,de=Ji.unblended,_e=new Ni(ie.LEQUAL,Ni.ReadWrite,[0,1]),xe=X.getTerrainMesh(),Oe=X.getCoordsTexture(),qe=X.sourceCache.getRenderableTiles(),tt=D.useProgram("terrainCoords");Q.bindFramebuffer.set(X.getFramebuffer("coords").framebuffer),Q.viewport.set([0,0,D.width/devicePixelRatio,D.height/devicePixelRatio]),Q.clear({color:a.aM.transparent,depth:1}),X.coordsIndex=[];for(const dt of qe){const bt=X.getTerrainData(dt.tileID);Q.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,Oe.texture);const St={u_matrix:D.transform.calculatePosMatrix(dt.tileID.toUnwrapped()),u_terrain_coords_id:(255-X.coordsIndex.length)/255,u_texture:0,u_ele_delta:X.getMeshFrameDelta(D.transform.zoom)};tt.draw(Q,ie.TRIANGLES,_e,is.disabled,de,Es.backCCW,St,bt,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments),X.coordsIndex.push(dt.tileID.key)}Q.bindFramebuffer.set(null),Q.viewport.set([0,0,D.width,D.height])}(this,this.style.map.terrain))}renderLayer(c,x,R,L){if(!R.isHidden(this.transform.zoom)&&(R.type==="background"||R.type==="custom"||(L||[]).length))switch(this.id=R.id,R.type){case"symbol":(function(D,X,Q,ie,de){if(D.renderPass!=="translucent")return;const _e=is.disabled,xe=D.colorModeForRenderPass();(Q._unevaluatedLayout.hasValue("text-variable-anchor")||Q._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Oe,qe,tt,dt,bt,St,Pt,ct,Ht){const Wt=qe.transform,sr=Ko(),$r=bt==="map",Qr=St==="map";for(const yn of Oe){const Tn=dt.getTile(yn),fn=Tn.getBucket(tt);if(!fn||!fn.text||!fn.text.segments.get().length)continue;const pn=a.ag(fn.textSizeData,Wt.zoom),Yn=hn(Tn,1,qe.transform.zoom),Ki=zn(yn.posMatrix,Qr,$r,qe.transform,Yn),xn=tt.layout.get("icon-text-fit")!=="none"&&fn.hasIconData();if(pn){const nn=Math.pow(2,Wt.zoom-Tn.tileID.overscaledZ),Ui=qe.style.map.terrain?(qi,Cs)=>qe.style.map.terrain.getElevation(yn,qi,Cs):null,qo=sr.translatePosition(Wt,Tn,Pt,ct);sl(fn,$r,Qr,Ht,Wt,Ki,yn.posMatrix,nn,pn,xn,sr,qo,yn.toUnwrapped(),Ui)}}}(ie,D,Q,X,Q.layout.get("text-rotation-alignment"),Q.layout.get("text-pitch-alignment"),Q.paint.get("text-translate"),Q.paint.get("text-translate-anchor"),de),Q.paint.get("icon-opacity").constantOr(1)!==0&&Gl(D,X,Q,ie,!1,Q.paint.get("icon-translate"),Q.paint.get("icon-translate-anchor"),Q.layout.get("icon-rotation-alignment"),Q.layout.get("icon-pitch-alignment"),Q.layout.get("icon-keep-upright"),_e,xe),Q.paint.get("text-opacity").constantOr(1)!==0&&Gl(D,X,Q,ie,!0,Q.paint.get("text-translate"),Q.paint.get("text-translate-anchor"),Q.layout.get("text-rotation-alignment"),Q.layout.get("text-pitch-alignment"),Q.layout.get("text-keep-upright"),_e,xe),X.map.showCollisionBoxes&&(Ru(D,X,Q,ie,!0),Ru(D,X,Q,ie,!1))})(c,x,R,L,this.style.placement.variableOffsets);break;case"circle":(function(D,X,Q,ie){if(D.renderPass!=="translucent")return;const de=Q.paint.get("circle-opacity"),_e=Q.paint.get("circle-stroke-width"),xe=Q.paint.get("circle-stroke-opacity"),Oe=!Q.layout.get("circle-sort-key").isConstant();if(de.constantOr(1)===0&&(_e.constantOr(1)===0||xe.constantOr(1)===0))return;const qe=D.context,tt=qe.gl,dt=D.depthModeForSublayer(0,Ni.ReadOnly),bt=is.disabled,St=D.colorModeForRenderPass(),Pt=[];for(let ct=0;ctct.sortKey-Ht.sortKey);for(const ct of Pt){const{programConfiguration:Ht,program:Wt,layoutVertexBuffer:sr,indexBuffer:$r,uniformValues:Qr,terrainData:yn}=ct.state;Wt.draw(qe,tt.TRIANGLES,dt,bt,St,Es.disabled,Qr,yn,Q.id,sr,$r,ct.segments,Q.paint,D.transform.zoom,Ht)}})(c,x,R,L);break;case"heatmap":(function(D,X,Q,ie){if(Q.paint.get("heatmap-opacity")===0)return;const de=D.context;if(D.style.map.terrain){for(const _e of ie){const xe=X.getTile(_e);X.hasRenderableParent(_e)||(D.renderPass==="offscreen"?Lu(D,xe,Q,_e):D.renderPass==="translucent"&&ta(D,Q,_e))}de.viewport.set([0,0,D.width,D.height])}else D.renderPass==="offscreen"?function(_e,xe,Oe,qe){const tt=_e.context,dt=tt.gl,bt=is.disabled,St=new Ji([dt.ONE,dt.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Pt,ct,Ht){const Wt=Pt.gl;Pt.activeTexture.set(Wt.TEXTURE1),Pt.viewport.set([0,0,ct.width/4,ct.height/4]);let sr=Ht.heatmapFbos.get(a.aU);sr?(Wt.bindTexture(Wt.TEXTURE_2D,sr.colorAttachment.get()),Pt.bindFramebuffer.set(sr.framebuffer)):(sr=uu(Pt,ct.width/4,ct.height/4),Ht.heatmapFbos.set(a.aU,sr))})(tt,_e,Oe),tt.clear({color:a.aM.transparent});for(let Pt=0;Pt20&&_e.texParameterf(_e.TEXTURE_2D,de.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,de.extTextureFilterAnisotropicMax);const fn=D.style.map.terrain&&D.style.map.terrain.getTerrainData(Pt),pn=fn?Pt:null,Yn=pn?pn.posMatrix:D.transform.calculatePosMatrix(Pt.toUnwrapped(),St),Ki=xd(Yn,yn||[0,0],Qr||1,$r,Q);xe instanceof In?Oe.draw(de,_e.TRIANGLES,ct,is.disabled,qe,Es.disabled,Ki,fn,Q.id,xe.boundsBuffer,D.quadTriangleIndexBuffer,xe.boundsSegments):Oe.draw(de,_e.TRIANGLES,ct,tt[Pt.overscaledZ],qe,Es.disabled,Ki,fn,Q.id,D.rasterBoundsBuffer,D.quadTriangleIndexBuffer,D.rasterBoundsSegments)}})(c,x,R,L);break;case"background":(function(D,X,Q,ie){const de=Q.paint.get("background-color"),_e=Q.paint.get("background-opacity");if(_e===0)return;const xe=D.context,Oe=xe.gl,qe=D.transform,tt=qe.tileSize,dt=Q.paint.get("background-pattern");if(D.isPatternMissing(dt))return;const bt=!dt&&de.a===1&&_e===1&&D.opaquePassEnabledForLayer()?"opaque":"translucent";if(D.renderPass!==bt)return;const St=is.disabled,Pt=D.depthModeForSublayer(0,bt==="opaque"?Ni.ReadWrite:Ni.ReadOnly),ct=D.colorModeForRenderPass(),Ht=D.useProgram(dt?"backgroundPattern":"background"),Wt=ie||qe.coveringTiles({tileSize:tt,terrain:D.style.map.terrain});dt&&(xe.activeTexture.set(Oe.TEXTURE0),D.imageManager.bind(D.context));const sr=Q.getCrossfadeParameters();for(const $r of Wt){const Qr=ie?$r.posMatrix:D.transform.calculatePosMatrix($r.toUnwrapped()),yn=dt?xc(Qr,_e,D,dt,{tileID:$r,tileSize:tt},sr):_c(Qr,_e,de),Tn=D.style.map.terrain&&D.style.map.terrain.getTerrainData($r);Ht.draw(xe,Oe.TRIANGLES,Pt,St,ct,Es.disabled,yn,Tn,Q.id,D.tileExtentBuffer,D.quadTriangleIndexBuffer,D.tileExtentSegments)}})(c,0,R,L);break;case"custom":(function(D,X,Q){const ie=D.context,de=Q.implementation;if(D.renderPass==="offscreen"){const _e=de.prerender;_e&&(D.setCustomLayerDefaults(),ie.setColorMode(D.colorModeForRenderPass()),_e.call(de,ie.gl,D.transform.customLayerMatrix()),ie.setDirty(),D.setBaseState())}else if(D.renderPass==="translucent"){D.setCustomLayerDefaults(),ie.setColorMode(D.colorModeForRenderPass()),ie.setStencilMode(is.disabled);const _e=de.renderingMode==="3d"?new Ni(D.context.gl.LEQUAL,Ni.ReadWrite,D.depthRangeFor3D):D.depthModeForSublayer(0,Ni.ReadOnly);ie.setDepthMode(_e),de.render(ie.gl,D.transform.customLayerMatrix(),{farZ:D.transform.farZ,nearZ:D.transform.nearZ,fov:D.transform._fov,modelViewProjectionMatrix:D.transform.modelViewProjectionMatrix,projectionMatrix:D.transform.projectionMatrix}),ie.setDirty(),D.setBaseState(),ie.bindFramebuffer.set(null)}})(c,0,R)}}translatePosMatrix(c,x,R,L,D){if(!R[0]&&!R[1])return c;const X=D?L==="map"?this.transform.angle:0:L==="viewport"?-this.transform.angle:0;if(X){const de=Math.sin(X),_e=Math.cos(X);R=[R[0]*_e-R[1]*de,R[0]*de+R[1]*_e]}const Q=[D?R[0]:hn(x,R[0],this.transform.zoom),D?R[1]:hn(x,R[1],this.transform.zoom),0],ie=new Float32Array(16);return a.J(ie,c,Q),ie}saveTileTexture(c){const x=this._tileTextures[c.size[0]];x?x.push(c):this._tileTextures[c.size[0]]=[c]}getTileTexture(c){const x=this._tileTextures[c];return x&&x.length>0?x.pop():null}isPatternMissing(c){if(!c)return!1;if(!c.from||!c.to)return!0;const x=this.imageManager.getPattern(c.from.toString()),R=this.imageManager.getPattern(c.to.toString());return!x||!R}useProgram(c,x){this.cache=this.cache||{};const R=c+(x?x.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[R]||(this.cache[R]=new ut(this.context,il[c],x,Bh[c],this._showOverdrawInspector,this.style.map.terrain)),this.cache[R]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ee(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:c,drawingBufferHeight:x}=this.context.gl;return this.width!==c||this.height!==x}}class G{constructor(c,x){this.points=c,this.planes=x}static fromInvProjectionMatrix(c,x,R){const L=Math.pow(2,R),D=[[-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]].map(Q=>{const ie=1/(Q=a.af([],Q,c))[3]/x*L;return a.b1(Q,Q,[ie,ie,1/Q[3],ie])}),X=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Q=>{const ie=function(Oe,qe){var tt=qe[0],dt=qe[1],bt=qe[2],St=tt*tt+dt*dt+bt*bt;return St>0&&(St=1/Math.sqrt(St)),Oe[0]=qe[0]*St,Oe[1]=qe[1]*St,Oe[2]=qe[2]*St,Oe}([],function(Oe,qe,tt){var dt=qe[0],bt=qe[1],St=qe[2],Pt=tt[0],ct=tt[1],Ht=tt[2];return Oe[0]=bt*Ht-St*ct,Oe[1]=St*Pt-dt*Ht,Oe[2]=dt*ct-bt*Pt,Oe}([],K([],D[Q[0]],D[Q[1]]),K([],D[Q[2]],D[Q[1]]))),de=-((_e=ie)[0]*(xe=D[Q[1]])[0]+_e[1]*xe[1]+_e[2]*xe[2]);var _e,xe;return ie.concat(de)});return new G(D,X)}}class te{constructor(c,x){this.min=c,this.max=x,this.center=function(R,L,D){return R[0]=.5*L[0],R[1]=.5*L[1],R[2]=.5*L[2],R}([],function(R,L,D){return R[0]=L[0]+D[0],R[1]=L[1]+D[1],R[2]=L[2]+D[2],R}([],this.min,this.max))}quadrant(c){const x=[c%2==0,c<2],R=W(this.min),L=W(this.max);for(let D=0;D=0&&X++;if(X===0)return 0;X!==x.length&&(R=!1)}if(R)return 2;for(let L=0;L<3;L++){let D=Number.MAX_VALUE,X=-Number.MAX_VALUE;for(let Q=0;Qthis.max[L]-this.min[L])return 0}return 1}}class ue{constructor(c=0,x=0,R=0,L=0){if(isNaN(c)||c<0||isNaN(x)||x<0||isNaN(R)||R<0||isNaN(L)||L<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=x,this.left=R,this.right=L}interpolate(c,x,R){return x.top!=null&&c.top!=null&&(this.top=a.y.number(c.top,x.top,R)),x.bottom!=null&&c.bottom!=null&&(this.bottom=a.y.number(c.bottom,x.bottom,R)),x.left!=null&&c.left!=null&&(this.left=a.y.number(c.left,x.left,R)),x.right!=null&&c.right!=null&&(this.right=a.y.number(c.right,x.right,R)),this}getCenter(c,x){const R=a.ac((this.left+c-this.right)/2,0,c),L=a.ac((this.top+x-this.bottom)/2,0,x);return new a.P(R,L)}equals(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right}clone(){return new ue(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Ce=85.051129;class Ue{constructor(c,x,R,L,D){this.tileSize=512,this._renderWorldCopies=D===void 0||!!D,this._minZoom=c||0,this._maxZoom=x||22,this._minPitch=R??0,this._maxPitch=L??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ue,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const c=new Ue(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return c.apply(this),c}apply(c){this.tileSize=c.tileSize,this.latRange=c.latRange,this.lngRange=c.lngRange,this.width=c.width,this.height=c.height,this._center=c._center,this._elevation=c._elevation,this.minElevationForCurrentTile=c.minElevationForCurrentTile,this.zoom=c.zoom,this.angle=c.angle,this._fov=c._fov,this._pitch=c._pitch,this._unmodified=c._unmodified,this._edgeInsets=c._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(c){this._minZoom!==c&&(this._minZoom=c,this.zoom=Math.max(this.zoom,c))}get maxZoom(){return this._maxZoom}set maxZoom(c){this._maxZoom!==c&&(this._maxZoom=c,this.zoom=Math.min(this.zoom,c))}get minPitch(){return this._minPitch}set minPitch(c){this._minPitch!==c&&(this._minPitch=c,this.pitch=Math.max(this.pitch,c))}get maxPitch(){return this._maxPitch}set maxPitch(c){this._maxPitch!==c&&(this._maxPitch=c,this.pitch=Math.min(this.pitch,c))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(c){c===void 0?c=!0:c===null&&(c=!1),this._renderWorldCopies=c}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(c){const x=-a.b3(c,-180,180)*Math.PI/180;this.angle!==x&&(this._unmodified=!1,this.angle=x,this._calcMatrices(),this.rotationMatrix=function(){var R=new a.A(4);return a.A!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}(),function(R,L,D){var X=L[0],Q=L[1],ie=L[2],de=L[3],_e=Math.sin(D),xe=Math.cos(D);R[0]=X*xe+ie*_e,R[1]=Q*xe+de*_e,R[2]=X*-_e+ie*xe,R[3]=Q*-_e+de*xe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(c){const x=a.ac(c,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==x&&(this._unmodified=!1,this._pitch=x,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(c){c=Math.max(.01,Math.min(60,c)),this._fov!==c&&(this._unmodified=!1,this._fov=c/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(c){const x=Math.min(Math.max(c,this.minZoom),this.maxZoom);this._zoom!==x&&(this._unmodified=!1,this._zoom=x,this.tileZoom=Math.max(0,Math.floor(x)),this.scale=this.zoomScale(x),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(c){c.lat===this._center.lat&&c.lng===this._center.lng||(this._unmodified=!1,this._center=c,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(c){c!==this._elevation&&(this._elevation=c,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(c){this._edgeInsets.equals(c)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,c,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(c){return this._edgeInsets.equals(c)}interpolatePadding(c,x,R){this._unmodified=!1,this._edgeInsets.interpolate(c,x,R),this._constrain(),this._calcMatrices()}coveringZoomLevel(c){const x=(c.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/c.tileSize));return Math.max(0,x)}getVisibleUnwrappedCoordinates(c){const x=[new a.b4(0,c)];if(this._renderWorldCopies){const R=this.pointCoordinate(new a.P(0,0)),L=this.pointCoordinate(new a.P(this.width,0)),D=this.pointCoordinate(new a.P(this.width,this.height)),X=this.pointCoordinate(new a.P(0,this.height)),Q=Math.floor(Math.min(R.x,L.x,D.x,X.x)),ie=Math.floor(Math.max(R.x,L.x,D.x,X.x)),de=1;for(let _e=Q-de;_e<=ie+de;_e++)_e!==0&&x.push(new a.b4(_e,c))}return x}coveringTiles(c){var x,R;let L=this.coveringZoomLevel(c);const D=L;if(c.minzoom!==void 0&&Lc.maxzoom&&(L=c.maxzoom);const X=this.pointCoordinate(this.getCameraPoint()),Q=a.Z.fromLngLat(this.center),ie=Math.pow(2,L),de=[ie*X.x,ie*X.y,0],_e=[ie*Q.x,ie*Q.y,0],xe=G.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,L);let Oe=c.minzoom||0;!c.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Oe=L);const qe=c.terrain?2/Math.min(this.tileSize,c.tileSize)*this.tileSize:3,tt=ct=>({aabb:new te([ct*ie,0,0],[(ct+1)*ie,ie,0]),zoom:0,x:0,y:0,wrap:ct,fullyVisible:!1}),dt=[],bt=[],St=L,Pt=c.reparseOverscaled?D:L;if(this._renderWorldCopies)for(let ct=1;ct<=3;ct++)dt.push(tt(-ct)),dt.push(tt(ct));for(dt.push(tt(0));dt.length>0;){const ct=dt.pop(),Ht=ct.x,Wt=ct.y;let sr=ct.fullyVisible;if(!sr){const fn=ct.aabb.intersects(xe);if(fn===0)continue;sr=fn===2}const $r=c.terrain?de:_e,Qr=ct.aabb.distanceX($r),yn=ct.aabb.distanceY($r),Tn=Math.max(Math.abs(Qr),Math.abs(yn));if(ct.zoom===St||Tn>qe+(1<=Oe){const fn=St-ct.zoom,pn=de[0]-.5-(Ht<>1),Ki=ct.zoom+1;let xn=ct.aabb.quadrant(fn);if(c.terrain){const nn=new a.S(Ki,ct.wrap,Ki,pn,Yn),Ui=c.terrain.getMinMaxElevation(nn),qo=(x=Ui.minElevation)!==null&&x!==void 0?x:this.elevation,qi=(R=Ui.maxElevation)!==null&&R!==void 0?R:this.elevation;xn=new te([xn.min[0],xn.min[1],qo],[xn.max[0],xn.max[1],qi])}dt.push({aabb:xn,zoom:Ki,x:pn,y:Yn,wrap:ct.wrap,fullyVisible:sr})}}return bt.sort((ct,Ht)=>ct.distanceSq-Ht.distanceSq).map(ct=>ct.tileID)}resize(c,x){this.width=c,this.height=x,this.pixelsToGLUnits=[2/c,-2/x],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(c){return Math.pow(2,c)}scaleZoom(c){return Math.log(c)/Math.LN2}project(c){const x=a.ac(c.lat,-85.051129,Ce);return new a.P(a.O(c.lng)*this.worldSize,a.Q(x)*this.worldSize)}unproject(c){return new a.Z(c.x/this.worldSize,c.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(c){const x=this.elevation,R=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,L=this.pointLocation(this.centerPoint,c),D=c.getElevationForLngLatZoom(L,this.tileZoom);if(!(this.elevation-D))return;const X=R+x-D,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/X/a.b5(1,L.lat),ie=this.scaleZoom(Q/this.tileSize);this._elevation=D,this._center=L,this.zoom=ie}setLocationAtPoint(c,x){const R=this.pointCoordinate(x),L=this.pointCoordinate(this.centerPoint),D=this.locationCoordinate(c),X=new a.Z(D.x-(R.x-L.x),D.y-(R.y-L.y));this.center=this.coordinateLocation(X),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(c,x){return x?this.coordinatePoint(this.locationCoordinate(c),x.getElevationForLngLatZoom(c,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(c))}pointLocation(c,x){return this.coordinateLocation(this.pointCoordinate(c,x))}locationCoordinate(c){return a.Z.fromLngLat(c)}coordinateLocation(c){return c&&c.toLngLat()}pointCoordinate(c,x){if(x){const Oe=x.pointCoordinate(c);if(Oe!=null)return Oe}const R=[c.x,c.y,0,1],L=[c.x,c.y,1,1];a.af(R,R,this.pixelMatrixInverse),a.af(L,L,this.pixelMatrixInverse);const D=R[3],X=L[3],Q=R[1]/D,ie=L[1]/X,de=R[2]/D,_e=L[2]/X,xe=de===_e?0:(0-de)/(_e-de);return new a.Z(a.y.number(R[0]/D,L[0]/X,xe)/this.worldSize,a.y.number(Q,ie,xe)/this.worldSize)}coordinatePoint(c,x=0,R=this.pixelMatrix){const L=[c.x*this.worldSize,c.y*this.worldSize,x,1];return a.af(L,L,R),new a.P(L[0]/L[3],L[1]/L[3])}getBounds(){const c=Math.max(0,this.height/2-this.getHorizon());return new rt().extend(this.pointLocation(new a.P(0,c))).extend(this.pointLocation(new a.P(this.width,c))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new rt([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(c){c?(this.lngRange=[c.getWest(),c.getEast()],this.latRange=[c.getSouth(),c.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Ce])}calculateTileMatrix(c){const x=c.canonical,R=this.worldSize/this.zoomScale(x.z),L=x.x+Math.pow(2,x.z)*c.wrap,D=a.an(new Float64Array(16));return a.J(D,D,[L*R,x.y*R,0]),a.K(D,D,[R/a.X,R/a.X,1]),D}calculatePosMatrix(c,x=!1){const R=c.key,L=x?this._alignedPosMatrixCache:this._posMatrixCache;if(L[R])return L[R];const D=this.calculateTileMatrix(c);return a.L(D,x?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,D),L[R]=new Float32Array(D),L[R]}calculateFogMatrix(c){const x=c.key,R=this._fogMatrixCache;if(R[x])return R[x];const L=this.calculateTileMatrix(c);return a.L(L,this.fogMatrix,L),R[x]=new Float32Array(L),R[x]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(c,x){x=a.ac(+x,this.minZoom,this.maxZoom);const R={center:new a.N(c.lng,c.lat),zoom:x};let L=this.lngRange;if(!this._renderWorldCopies&&L===null){const ct=179.9999999999;L=[-ct,ct]}const D=this.tileSize*this.zoomScale(R.zoom);let X=0,Q=D,ie=0,de=D,_e=0,xe=0;const{x:Oe,y:qe}=this.size;if(this.latRange){const ct=this.latRange;X=a.Q(ct[1])*D,Q=a.Q(ct[0])*D,Q-XQ&&(St=Q-ct)}if(L){const ct=(ie+de)/2;let Ht=tt;this._renderWorldCopies&&(Ht=a.b3(tt,ct-D/2,ct+D/2));const Wt=Oe/2;Ht-Wtde&&(bt=de-Wt)}if(bt!==void 0||St!==void 0){const ct=new a.P(bt??tt,St??dt);R.center=this.unproject.call({worldSize:D},ct).wrap()}return R}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const c=this._unmodified,{center:x,zoom:R}=this.getConstrained(this.center,this.zoom);this.center=x,this.zoom=R,this._unmodified=c,this._constraining=!1}_calcMatrices(){if(!this.height)return;const c=this.centerOffset,x=this.point.x,R=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let L=a.an(new Float64Array(16));a.K(L,L,[this.width/2,-this.height/2,1]),a.J(L,L,[1,-1,0]),this.labelPlaneMatrix=L,L=a.an(new Float64Array(16)),a.K(L,L,[1,-1,1]),a.J(L,L,[-1,-1,0]),a.K(L,L,[2/this.width,2/this.height,1]),this.glCoordMatrix=L;const D=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),X=Math.min(this.elevation,this.minElevationForCurrentTile),Q=D-X*this._pixelPerMeter/Math.cos(this._pitch),ie=X<0?Q:D,de=Math.PI/2+this._pitch,_e=this._fov*(.5+c.y/this.height),xe=Math.sin(_e)*ie/Math.sin(a.ac(Math.PI-de-_e,.01,Math.PI-.01)),Oe=this.getHorizon(),qe=2*Math.atan(Oe/this.cameraToCenterDistance)*(.5+c.y/(2*Oe)),tt=Math.sin(qe)*ie/Math.sin(a.ac(Math.PI-de-qe,.01,Math.PI-.01)),dt=Math.min(xe,tt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*dt+ie),this.nearZ=this.height/50,L=new Float64Array(16),a.b6(L,this._fov,this.width/this.height,this.nearZ,this.farZ),L[8]=2*-c.x/this.width,L[9]=2*c.y/this.height,this.projectionMatrix=a.ae(L),a.K(L,L,[1,-1,1]),a.J(L,L,[0,0,-this.cameraToCenterDistance]),a.b7(L,L,this._pitch),a.ad(L,L,this.angle),a.J(L,L,[-x,-R,0]),this.mercatorMatrix=a.K([],L,[this.worldSize,this.worldSize,this.worldSize]),a.K(L,L,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,L),a.J(L,L,[0,0,-this.elevation]),this.modelViewProjectionMatrix=L,this.invModelViewProjectionMatrix=a.as([],L),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,D,this.farZ),this.fogMatrix[8]=2*-c.x/this.width,this.fogMatrix[9]=2*c.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-x,-R,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,L);const bt=this.width%2/2,St=this.height%2/2,Pt=Math.cos(this.angle),ct=Math.sin(this.angle),Ht=x-Math.round(x)+Pt*bt+ct*St,Wt=R-Math.round(R)+Pt*St+ct*bt,sr=new Float64Array(L);if(a.J(sr,sr,[Ht>.5?Ht-1:Ht,Wt>.5?Wt-1:Wt,0]),this.alignedModelViewProjectionMatrix=sr,L=a.as(new Float64Array(16),this.pixelMatrix),!L)throw new Error("failed to invert matrix");this.pixelMatrixInverse=L,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const c=this.pointCoordinate(new a.P(0,0)),x=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.af(x,x,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const c=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,c))}getCameraQueryGeometry(c){const x=this.getCameraPoint();if(c.length===1)return[c[0],x];{let R=x.x,L=x.y,D=x.x,X=x.y;for(const Q of c)R=Math.min(R,Q.x),L=Math.min(L,Q.y),D=Math.max(D,Q.x),X=Math.max(X,Q.y);return[new a.P(R,L),new a.P(D,L),new a.P(D,X),new a.P(R,X),new a.P(R,L)]}}lngLatToCameraDepth(c,x){const R=this.locationCoordinate(c),L=[R.x*this.worldSize,R.y*this.worldSize,x,1];return a.af(L,L,this.modelViewProjectionMatrix),L[2]/L[3]}}function It(z,c){let x,R=!1,L=null,D=null;const X=()=>{L=null,R&&(z.apply(D,x),L=setTimeout(X,c),R=!1)};return(...Q)=>(R=!0,D=this,x=Q,L||X(),L)}class Vt{constructor(c){this._getCurrentHash=()=>{const x=window.location.hash.replace("#","");if(this._hashName){let R;return x.split("&").map(L=>L.split("=")).forEach(L=>{L[0]===this._hashName&&(R=L)}),(R&&R[1]||"").split("/")}return x.split("/")},this._onHashChange=()=>{const x=this._getCurrentHash();if(x.length>=3&&!x.some(R=>isNaN(R))){const R=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(x[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+x[2],+x[1]],zoom:+x[0],bearing:R,pitch:+(x[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const x=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,x)},this._removeHash=()=>{const x=this._getCurrentHash();if(x.length===0)return;const R=x.join("/");let L=R;L.split("&").length>0&&(L=L.split("&")[0]),this._hashName&&(L=`${this._hashName}=${R}`);let D=window.location.hash.replace(L,"");D.startsWith("#&")?D=D.slice(0,1)+D.slice(2):D==="#"&&(D="");let X=window.location.href.replace(/(#.+)?$/,D);X=X.replace("&&","&"),window.history.replaceState(window.history.state,null,X)},this._updateHash=It(this._updateHashUnthrottled,300),this._hashName=c&&encodeURIComponent(c)}addTo(c){return this._map=c,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(c){const x=this._map.getCenter(),R=Math.round(100*this._map.getZoom())/100,L=Math.ceil((R*Math.LN2+Math.log(512/360/.5))/Math.LN10),D=Math.pow(10,L),X=Math.round(x.lng*D)/D,Q=Math.round(x.lat*D)/D,ie=this._map.getBearing(),de=this._map.getPitch();let _e="";if(_e+=c?`/${X}/${Q}/${R}`:`${R}/${Q}/${X}`,(ie||de)&&(_e+="/"+Math.round(10*ie)/10),de&&(_e+=`/${Math.round(de)}`),this._hashName){const xe=this._hashName;let Oe=!1;const qe=window.location.hash.slice(1).split("&").map(tt=>{const dt=tt.split("=")[0];return dt===xe?(Oe=!0,`${dt}=${_e}`):tt}).filter(tt=>tt);return Oe||qe.push(`${xe}=${_e}`),`#${qe.join("&")}`}return`#${_e}`}}const gr={linearity:.3,easing:a.b8(0,0,.3,1)},rn=a.e({deceleration:2500,maxSpeed:1400},gr),Zr=a.e({deceleration:20,maxSpeed:1400},gr),yi=a.e({deceleration:1e3,maxSpeed:360},gr),Sn=a.e({deceleration:1e3,maxSpeed:90},gr);class jr{constructor(c){this._map=c,this.clear()}clear(){this._inertiaBuffer=[]}record(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:f.now(),settings:c})}_drainInertiaBuffer(){const c=this._inertiaBuffer,x=f.now();for(;c.length>0&&x-c[0].time>160;)c.shift()}_onMoveEnd(c){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const x={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:D}of this._inertiaBuffer)x.zoom+=D.zoomDelta||0,x.bearing+=D.bearingDelta||0,x.pitch+=D.pitchDelta||0,D.panDelta&&x.pan._add(D.panDelta),D.around&&(x.around=D.around),D.pinchAround&&(x.pinchAround=D.pinchAround);const R=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,L={};if(x.pan.mag()){const D=Os(x.pan.mag(),R,a.e({},rn,c||{}));L.offset=x.pan.mult(D.amount/x.pan.mag()),L.center=this._map.transform.center,Ms(L,D)}if(x.zoom){const D=Os(x.zoom,R,Zr);L.zoom=this._map.transform.zoom+D.amount,Ms(L,D)}if(x.bearing){const D=Os(x.bearing,R,yi);L.bearing=this._map.transform.bearing+a.ac(D.amount,-179,179),Ms(L,D)}if(x.pitch){const D=Os(x.pitch,R,Sn);L.pitch=this._map.transform.pitch+D.amount,Ms(L,D)}if(L.zoom||L.bearing){const D=x.pinchAround===void 0?x.around:x.pinchAround;L.around=D?this._map.unproject(D):this._map.getCenter()}return this.clear(),a.e(L,{noMoveStart:!0})}}function Ms(z,c){(!z.duration||z.durationx.unproject(ie)),Q=D.reduce((ie,de,_e,xe)=>ie.add(de.div(xe.length)),new a.P(0,0));super(c,{points:D,point:Q,lngLats:X,lngLat:x.unproject(Q),originalEvent:R}),this._defaultPrevented=!1}}class ma extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(c,x,R){super(c,{originalEvent:R}),this._defaultPrevented=!1}}class Ba{constructor(c,x){this._map=c,this._clickTolerance=x.clickTolerance}reset(){delete this._mousedownPos}wheel(c){return this._firePreventable(new ma(c.type,this._map,c))}mousedown(c,x){return this._mousedownPos=x,this._firePreventable(new Ts(c.type,this._map,c))}mouseup(c){this._map.fire(new Ts(c.type,this._map,c))}click(c,x){this._mousedownPos&&this._mousedownPos.dist(x)>=this._clickTolerance||this._map.fire(new Ts(c.type,this._map,c))}dblclick(c){return this._firePreventable(new Ts(c.type,this._map,c))}mouseover(c){this._map.fire(new Ts(c.type,this._map,c))}mouseout(c){this._map.fire(new Ts(c.type,this._map,c))}touchstart(c){return this._firePreventable(new io(c.type,this._map,c))}touchmove(c){this._map.fire(new io(c.type,this._map,c))}touchend(c){this._map.fire(new io(c.type,this._map,c))}touchcancel(c){this._map.fire(new io(c.type,this._map,c))}_firePreventable(c){if(this._map.fire(c),c.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ns{constructor(c){this._map=c}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(c){this._map.fire(new Ts(c.type,this._map,c))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ts("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(c){this._delayContextMenu?this._contextMenuEvent=c:this._ignoreContextMenu||this._map.fire(new Ts(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class To{constructor(c){this._map=c}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(c){return this.transform.pointLocation(a.P.convert(c),this._map.terrain)}}class Io{constructor(c,x){this._map=c,this._tr=new To(c),this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=x.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(c,x){this.isEnabled()&&c.shiftKey&&c.button===0&&(m.disableDrag(),this._startPos=this._lastPos=x,this._active=!0)}mousemoveWindow(c,x){if(!this._active)return;const R=x;if(this._lastPos.equals(R)||!this._box&&R.dist(this._startPos)D.fitScreenCoordinates(R,L,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",c)}keydown(c){this._active&&c.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",c))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(m.remove(this._box),this._box=null),m.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(c,x){return this._map.fire(new a.k(c,{originalEvent:x}))}}function ja(z,c){if(z.length!==c.length)throw new Error(`The number of touches and points are not equal - touches ${z.length}, points ${c.length}`);const x={};for(let R=0;Rthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=c.timeStamp),R.length===this.numTouches&&(this.centroid=function(L){const D=new a.P(0,0);for(const X of L)D._add(X);return D.div(L.length)}(x),this.touches=ja(R,x)))}touchmove(c,x,R){if(this.aborted||!this.centroid)return;const L=ja(R,x);for(const D in this.touches){const X=L[D];(!X||X.dist(this.touches[D])>30)&&(this.aborted=!0)}}touchend(c,x,R){if((!this.centroid||c.timeStamp-this.startTime>500)&&(this.aborted=!0),R.length===0){const L=!this.aborted&&this.centroid;if(this.reset(),L)return L}}}class Cc{constructor(c){this.singleTap=new Zc(c),this.numTaps=c.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(c,x,R){this.singleTap.touchstart(c,x,R)}touchmove(c,x,R){this.singleTap.touchmove(c,x,R)}touchend(c,x,R){const L=this.singleTap.touchend(c,x,R);if(L){const D=c.timeStamp-this.lastTime<500,X=!this.lastTap||this.lastTap.dist(L)<30;if(D&&X||this.reset(),this.count++,this.lastTime=c.timeStamp,this.lastTap=L,this.count===this.numTaps)return this.reset(),L}}}class ku{constructor(c){this._tr=new To(c),this._zoomIn=new Cc({numTouches:1,numTaps:2}),this._zoomOut=new Cc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(c,x,R){this._zoomIn.touchstart(c,x,R),this._zoomOut.touchstart(c,x,R)}touchmove(c,x,R){this._zoomIn.touchmove(c,x,R),this._zoomOut.touchmove(c,x,R)}touchend(c,x,R){const L=this._zoomIn.touchend(c,x,R),D=this._zoomOut.touchend(c,x,R),X=this._tr;return L?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Q=>Q.easeTo({duration:300,zoom:X.zoom+1,around:X.unproject(L)},{originalEvent:c})}):D?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Q=>Q.easeTo({duration:300,zoom:X.zoom-1,around:X.unproject(D)},{originalEvent:c})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Va{constructor(c){this._enabled=!!c.enable,this._moveStateManager=c.moveStateManager,this._clickTolerance=c.clickTolerance||1,this._moveFunction=c.move,this._activateOnStart=!!c.activateOnStart,c.assignEvents(this),this.reset()}reset(c){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(c)}_move(...c){const x=this._moveFunction(...c);if(x.bearingDelta||x.pitchDelta||x.around||x.panDelta)return this._active=!0,x}dragStart(c,x){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(c)&&(this._moveStateManager.startMove(c),this._lastPoint=x.length?x[0]:x,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(c,x){if(!this.isEnabled())return;const R=this._lastPoint;if(!R)return;if(c.preventDefault(),!this._moveStateManager.isValidMoveEvent(c))return void this.reset(c);const L=x.length?x[0]:x;return!this._moved&&L.dist(R){z.mousedown=z.dragStart,z.mousemoveWindow=z.dragMove,z.mouseup=z.dragEnd,z.contextmenu=c=>{c.preventDefault()}},m_=({enable:z,clickTolerance:c,bearingDegreesPerPixelMoved:x=.8})=>{const R=new Vh({checkCorrectEvent:L=>m.mouseButton(L)===0&&L.ctrlKey||m.mouseButton(L)===2});return new Va({clickTolerance:c,move:(L,D)=>({bearingDelta:(D.x-L.x)*x}),moveStateManager:R,enable:z,assignEvents:Yc})},g_=({enable:z,clickTolerance:c,pitchDegreesPerPixelMoved:x=-.5})=>{const R=new Vh({checkCorrectEvent:L=>m.mouseButton(L)===0&&L.ctrlKey||m.mouseButton(L)===2});return new Va({clickTolerance:c,move:(L,D)=>({pitchDelta:(D.y-L.y)*x}),moveStateManager:R,enable:z,assignEvents:Yc})};class Yp{constructor(c,x){this._clickTolerance=c.clickTolerance||1,this._map=x,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(c){return c<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(c,x,R){return this._calculateTransform(c,x,R)}touchmove(c,x,R){if(this._active){if(!this._shouldBePrevented(R.length))return c.preventDefault(),this._calculateTransform(c,x,R);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",c)}}touchend(c,x,R){this._calculateTransform(c,x,R),this._active&&this._shouldBePrevented(R.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(c,x,R){R.length>0&&(this._active=!0);const L=ja(R,x),D=new a.P(0,0),X=new a.P(0,0);let Q=0;for(const de in L){const _e=L[de],xe=this._touches[de];xe&&(D._add(_e),X._add(_e.sub(xe)),Q++,L[de]=_e)}if(this._touches=L,this._shouldBePrevented(Q)||!X.mag())return;const ie=X.div(Q);return this._sum._add(ie),this._sum.mag()Math.abs(z.x)}class ga extends Xp{constructor(c){super(),this._currentTouchCount=0,this._map=c}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(c,x,R){super.touchstart(c,x,R),this._currentTouchCount=R.length}_start(c){this._lastPoints=c,_y(c[0].sub(c[1]))&&(this._valid=!1)}_move(c,x,R){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const L=c[0].sub(this._lastPoints[0]),D=c[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(L,D,R.timeStamp),this._valid?(this._lastPoints=c,this._active=!0,{pitchDelta:(L.y+D.y)/2*-.5}):void 0}gestureBeginsVertically(c,x,R){if(this._valid!==void 0)return this._valid;const L=c.mag()>=2,D=x.mag()>=2;if(!L&&!D)return;if(!L||!D)return this._firstMove===void 0&&(this._firstMove=R),R-this._firstMove<100&&void 0;const X=c.y>0==x.y>0;return _y(c)&&_y(x)&&X}}const Wl={panStep:100,bearingStep:15,pitchStep:10};class Xc{constructor(c){this._tr=new To(c);const x=Wl;this._panStep=x.panStep,this._bearingStep=x.bearingStep,this._pitchStep=x.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(c){if(c.altKey||c.ctrlKey||c.metaKey)return;let x=0,R=0,L=0,D=0,X=0;switch(c.keyCode){case 61:case 107:case 171:case 187:x=1;break;case 189:case 109:case 173:x=-1;break;case 37:c.shiftKey?R=-1:(c.preventDefault(),D=-1);break;case 39:c.shiftKey?R=1:(c.preventDefault(),D=1);break;case 38:c.shiftKey?L=1:(c.preventDefault(),X=-1);break;case 40:c.shiftKey?L=-1:(c.preventDefault(),X=1);break;default:return}return this._rotationDisabled&&(R=0,L=0),{cameraAnimation:Q=>{const ie=this._tr;Q.easeTo({duration:300,easeId:"keyboardHandler",easing:bd,zoom:x?Math.round(ie.zoom)+x*(c.shiftKey?2:1):ie.zoom,bearing:ie.bearing+R*this._bearingStep,pitch:ie.pitch+L*this._pitchStep,offset:[-D*this._panStep,-X*this._panStep],center:ie.center},{originalEvent:c})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function bd(z){return z*(2-z)}const xy=4.000244140625;class Uh{constructor(c,x){this._onTimeout=R=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},this._map=c,this._tr=new To(c),this._triggerRenderFrame=x,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(c){this._defaultZoomRate=c}setWheelZoomRate(c){this._wheelZoomRate=c}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!c&&c.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(c){return!!this._map.cooperativeGestures.isEnabled()&&!(c.ctrlKey||this._map.cooperativeGestures.isBypassed(c))}wheel(c){if(!this.isEnabled())return;if(this._shouldBePrevented(c))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",c);let x=c.deltaMode===WheelEvent.DOM_DELTA_LINE?40*c.deltaY:c.deltaY;const R=f.now(),L=R-(this._lastWheelEventTime||0);this._lastWheelEventTime=R,x!==0&&x%xy==0?this._type="wheel":x!==0&&Math.abs(x)<4?this._type="trackpad":L>400?(this._type=null,this._lastValue=x,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(L*x)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,x+=this._lastValue)),c.shiftKey&&x&&(x/=4),this._type&&(this._lastWheelEvent=c,this._delta-=x,this._active||this._start(c)),c.preventDefault()}_start(c){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const x=m.mousePos(this._map.getCanvas(),c),R=this._tr;this._around=x.y>R.transform.height/2-R.transform.getHorizon()?a.N.convert(this._aroundCenter?R.center:R.unproject(x)):a.N.convert(R.center),this._aroundPoint=R.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const c=this._tr.transform;if(this._delta!==0){const ie=this._type==="wheel"&&Math.abs(this._delta)>xy?this._wheelZoomRate:this._defaultZoomRate;let de=2/(1+Math.exp(-Math.abs(this._delta*ie)));this._delta<0&&de!==0&&(de=1/de);const _e=typeof this._targetZoom=="number"?c.zoomScale(this._targetZoom):c.scale;this._targetZoom=Math.min(c.maxZoom,Math.max(c.minZoom,c.scaleZoom(_e*de))),this._type==="wheel"&&(this._startZoom=c.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const x=typeof this._targetZoom=="number"?this._targetZoom:c.zoom,R=this._startZoom,L=this._easing;let D,X=!1;const Q=f.now()-this._lastWheelEventTime;if(this._type==="wheel"&&R&&L&&Q){const ie=Math.min(Q/200,1),de=L(ie);D=a.y.number(R,x,de),ie<1?this._frameId||(this._frameId=!0):X=!0}else D=x,X=!0;return this._active=!0,X&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!X,zoomDelta:D-c.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(c){let x=a.b9;if(this._prevEase){const R=this._prevEase,L=(f.now()-R.start)/R.duration,D=R.easing(L+.01)-R.easing(L),X=.27/Math.sqrt(D*D+1e-4)*.01,Q=Math.sqrt(.0729-X*X);x=a.b8(X,Q,.25,1)}return this._prevEase={start:f.now(),duration:c,easing:x},x}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Kd{constructor(c,x){this._clickZoom=c,this._tapZoom=x}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Im{constructor(c){this._tr=new To(c),this.reset()}reset(){this._active=!1}dblclick(c,x){return c.preventDefault(),{cameraAnimation:R=>{R.easeTo({duration:300,zoom:this._tr.zoom+(c.shiftKey?-1:1),around:this._tr.unproject(x)},{originalEvent:c})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class __{constructor(){this._tap=new Cc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(c,x,R){if(!this._swipePoint)if(this._tapTime){const L=x[0],D=c.timeStamp-this._tapTime<500,X=this._tapPoint.dist(L)<30;D&&X?R.length>0&&(this._swipePoint=L,this._swipeTouch=R[0].identifier):this.reset()}else this._tap.touchstart(c,x,R)}touchmove(c,x,R){if(this._tapTime){if(this._swipePoint){if(R[0].identifier!==this._swipeTouch)return;const L=x[0],D=L.y-this._swipePoint.y;return this._swipePoint=L,c.preventDefault(),this._active=!0,{zoomDelta:D/128}}}else this._tap.touchmove(c,x,R)}touchend(c,x,R){if(this._tapTime)this._swipePoint&&R.length===0&&this.reset();else{const L=this._tap.touchend(c,x,R);L&&(this._tapTime=c.timeStamp,this._tapPoint=L)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Jp{constructor(c,x,R){this._el=c,this._mousePan=x,this._touchPan=R}enable(c){this._inertiaOptions=c||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class l0{constructor(c,x,R){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=x,this._mousePitch=R}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Kp{constructor(c,x,R,L){this._el=c,this._touchZoom=x,this._touchRotate=R,this._tapDragZoom=L,this._rotationDisabled=!1,this._enabled=!0}enable(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Qd{constructor(c,x){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=c,this._options=x,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const c=this._map.getCanvasContainer();c.classList.add("maplibregl-cooperative-gestures"),this._container=m.create("div","maplibregl-cooperative-gesture-screen",c);let x=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(x=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const R=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),L=document.createElement("div");L.className="maplibregl-desktop-message",L.textContent=x,this._container.appendChild(L);const D=document.createElement("div");D.className="maplibregl-mobile-message",D.textContent=R,this._container.appendChild(D),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(m.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(c){return c[this._bypassKey]}notifyGestureBlocked(c,x){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:c,originalEvent:x})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Zl=z=>z.zoom||z.drag||z.pitch||z.rotate;class Hn extends a.k{}function wy(z){return z.panDelta&&z.panDelta.mag()||z.zoomDelta||z.bearingDelta||z.pitchDelta}class x_{constructor(c,x){this.handleWindowEvent=L=>{this.handleEvent(L,`${L.type}Window`)},this.handleEvent=(L,D)=>{if(L.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const X=L.type==="renderFrame"?void 0:L,Q={needsRenderFrame:!1},ie={},de={},_e=L.touches,xe=_e?this._getMapTouches(_e):void 0,Oe=xe?m.touchPos(this._map.getCanvas(),xe):m.mousePos(this._map.getCanvas(),L);for(const{handlerName:dt,handler:bt,allowed:St}of this._handlers){if(!bt.isEnabled())continue;let Pt;this._blockedByActive(de,St,dt)?bt.reset():bt[D||L.type]&&(Pt=bt[D||L.type](L,Oe,xe),this.mergeHandlerResult(Q,ie,Pt,dt,X),Pt&&Pt.needsRenderFrame&&this._triggerRenderFrame()),(Pt||bt.isActive())&&(de[dt]=bt)}const qe={};for(const dt in this._previousActiveHandlers)de[dt]||(qe[dt]=X);this._previousActiveHandlers=de,(Object.keys(qe).length||wy(Q))&&(this._changes.push([Q,ie,qe]),this._triggerRenderFrame()),(Object.keys(de).length||wy(Q))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:tt}=Q;tt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],tt(this._map))},this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new jr(c),this._bearingSnap=x.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(x);const R=this._el;this._listeners=[[R,"touchstart",{passive:!0}],[R,"touchmove",{passive:!1}],[R,"touchend",void 0],[R,"touchcancel",void 0],[R,"mousedown",void 0],[R,"mousemove",void 0],[R,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[R,"mouseover",void 0],[R,"mouseout",void 0],[R,"dblclick",void 0],[R,"click",void 0],[R,"keydown",{capture:!1}],[R,"keyup",void 0],[R,"wheel",{passive:!1}],[R,"contextmenu",void 0],[window,"blur",void 0]];for(const[L,D,X]of this._listeners)m.addEventListener(L,D,L===document?this.handleWindowEvent:this.handleEvent,X)}destroy(){for(const[c,x,R]of this._listeners)m.removeEventListener(c,x,c===document?this.handleWindowEvent:this.handleEvent,R)}_addDefaultHandlers(c){const x=this._map,R=x.getCanvasContainer();this._add("mapEvent",new Ba(x,c));const L=x.boxZoom=new Io(x,c);this._add("boxZoom",L),c.interactive&&c.boxZoom&&L.enable();const D=x.cooperativeGestures=new Qd(x,c.cooperativeGestures);this._add("cooperativeGestures",D),c.cooperativeGestures&&D.enable();const X=new ku(x),Q=new Im(x);x.doubleClickZoom=new Kd(Q,X),this._add("tapZoom",X),this._add("clickZoom",Q),c.interactive&&c.doubleClickZoom&&x.doubleClickZoom.enable();const ie=new __;this._add("tapDragZoom",ie);const de=x.touchPitch=new ga(x);this._add("touchPitch",de),c.interactive&&c.touchPitch&&x.touchPitch.enable(c.touchPitch);const _e=m_(c),xe=g_(c);x.dragRotate=new l0(c,_e,xe),this._add("mouseRotate",_e,["mousePitch"]),this._add("mousePitch",xe,["mouseRotate"]),c.interactive&&c.dragRotate&&x.dragRotate.enable();const Oe=(({enable:Pt,clickTolerance:ct})=>{const Ht=new Vh({checkCorrectEvent:Wt=>m.mouseButton(Wt)===0&&!Wt.ctrlKey});return new Va({clickTolerance:ct,move:(Wt,sr)=>({around:sr,panDelta:sr.sub(Wt)}),activateOnStart:!0,moveStateManager:Ht,enable:Pt,assignEvents:Yc})})(c),qe=new Yp(c,x);x.dragPan=new Jp(R,Oe,qe),this._add("mousePan",Oe),this._add("touchPan",qe,["touchZoom","touchRotate"]),c.interactive&&c.dragPan&&x.dragPan.enable(c.dragPan);const tt=new v_,dt=new y_;x.touchZoomRotate=new Kp(R,dt,tt,ie),this._add("touchRotate",tt,["touchPan","touchZoom"]),this._add("touchZoom",dt,["touchPan","touchRotate"]),c.interactive&&c.touchZoomRotate&&x.touchZoomRotate.enable(c.touchZoomRotate);const bt=x.scrollZoom=new Uh(x,()=>this._triggerRenderFrame());this._add("scrollZoom",bt,["mousePan"]),c.interactive&&c.scrollZoom&&x.scrollZoom.enable(c.scrollZoom);const St=x.keyboard=new Xc(x);this._add("keyboard",St),c.interactive&&c.keyboard&&x.keyboard.enable(),this._add("blockableMapEvent",new Ns(x))}_add(c,x,R){this._handlers.push({handlerName:c,handler:x,allowed:R}),this._handlersById[c]=x}stop(c){if(!this._updatingCamera){for(const{handler:x}of this._handlers)x.reset();this._inertia.clear(),this._fireEvents({},{},c),this._changes=[]}}isActive(){for(const{handler:c}of this._handlers)if(c.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Zl(this._eventsInProgress)||this.isZooming()}_blockedByActive(c,x,R){for(const L in c)if(L!==R&&(!x||x.indexOf(L)<0))return!0;return!1}_getMapTouches(c){const x=[];for(const R of c)this._el.contains(R.target)&&x.push(R);return x}mergeHandlerResult(c,x,R,L,D){if(!R)return;a.e(c,R);const X={handlerName:L,originalEvent:R.originalEvent||D};R.zoomDelta!==void 0&&(x.zoom=X),R.panDelta!==void 0&&(x.drag=X),R.pitchDelta!==void 0&&(x.pitch=X),R.bearingDelta!==void 0&&(x.rotate=X)}_applyChanges(){const c={},x={},R={};for(const[L,D,X]of this._changes)L.panDelta&&(c.panDelta=(c.panDelta||new a.P(0,0))._add(L.panDelta)),L.zoomDelta&&(c.zoomDelta=(c.zoomDelta||0)+L.zoomDelta),L.bearingDelta&&(c.bearingDelta=(c.bearingDelta||0)+L.bearingDelta),L.pitchDelta&&(c.pitchDelta=(c.pitchDelta||0)+L.pitchDelta),L.around!==void 0&&(c.around=L.around),L.pinchAround!==void 0&&(c.pinchAround=L.pinchAround),L.noInertia&&(c.noInertia=L.noInertia),a.e(x,D),a.e(R,X);this._updateMapTransform(c,x,R),this._changes=[]}_updateMapTransform(c,x,R){const L=this._map,D=L._getTransformForUpdate(),X=L.terrain;if(!(wy(c)||X&&this._terrainMovement))return this._fireEvents(x,R,!0);let{panDelta:Q,zoomDelta:ie,bearingDelta:de,pitchDelta:_e,around:xe,pinchAround:Oe}=c;Oe!==void 0&&(xe=Oe),L._stop(!0),xe=xe||L.transform.centerPoint;const qe=D.pointLocation(Q?xe.sub(Q):xe);de&&(D.bearing+=de),_e&&(D.pitch+=_e),ie&&(D.zoom+=ie),X?this._terrainMovement||!x.drag&&!x.zoom?x.drag&&this._terrainMovement?D.center=D.pointLocation(D.centerPoint.sub(Q)):D.setLocationAtPoint(qe,xe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,D.setLocationAtPoint(qe,xe)):D.setLocationAtPoint(qe,xe),L._applyUpdatedTransform(D),this._map._update(),c.noInertia||this._inertia.record(c),this._fireEvents(x,R,!0)}_fireEvents(c,x,R){const L=Zl(this._eventsInProgress),D=Zl(c),X={};for(const xe in c){const{originalEvent:Oe}=c[xe];this._eventsInProgress[xe]||(X[`${xe}start`]=Oe),this._eventsInProgress[xe]=c[xe]}!L&&D&&this._fireEvent("movestart",D.originalEvent);for(const xe in X)this._fireEvent(xe,X[xe]);D&&this._fireEvent("move",D.originalEvent);for(const xe in c){const{originalEvent:Oe}=c[xe];this._fireEvent(xe,Oe)}const Q={};let ie;for(const xe in this._eventsInProgress){const{handlerName:Oe,originalEvent:qe}=this._eventsInProgress[xe];this._handlersById[Oe].isActive()||(delete this._eventsInProgress[xe],ie=x[Oe]||qe,Q[`${xe}end`]=ie)}for(const xe in Q)this._fireEvent(xe,Q[xe]);const de=Zl(this._eventsInProgress),_e=(L||D)&&!de;if(_e&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const xe=this._map._getTransformForUpdate();xe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(xe)}if(R&&_e){this._updatingCamera=!0;const xe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Oe=qe=>qe!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Hn("renderFrame",{timeStamp:c})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class o9 extends a.E{constructor(c,x){super(),this._renderFrameCallback=()=>{const R=Math.min((f.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(R)),R<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=c,this._bearingSnap=x.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(c,x){return this.jumpTo({center:c},x)}panBy(c,x,R){return c=a.P.convert(c).mult(-1),this.panTo(this.transform.center,a.e({offset:c},x),R)}panTo(c,x,R){return this.easeTo(a.e({center:c},x),R)}getZoom(){return this.transform.zoom}setZoom(c,x){return this.jumpTo({zoom:c},x),this}zoomTo(c,x,R){return this.easeTo(a.e({zoom:c},x),R)}zoomIn(c,x){return this.zoomTo(this.getZoom()+1,c,x),this}zoomOut(c,x){return this.zoomTo(this.getZoom()-1,c,x),this}getBearing(){return this.transform.bearing}setBearing(c,x){return this.jumpTo({bearing:c},x),this}getPadding(){return this.transform.padding}setPadding(c,x){return this.jumpTo({padding:c},x),this}rotateTo(c,x,R){return this.easeTo(a.e({bearing:c},x),R)}resetNorth(c,x){return this.rotateTo(0,a.e({duration:1e3},c),x),this}resetNorthPitch(c,x){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},c),x),this}snapToNorth(c,x){return Math.abs(this.getBearing()){if(this._zooming&&(L.zoom=a.y.number(D,bt,$r)),this._rotating&&(L.bearing=a.y.number(X,de,$r)),this._pitching&&(L.pitch=a.y.number(Q,_e,$r)),this._padding&&(L.interpolatePadding(ie,xe,$r),qe=L.centerPoint.add(Oe)),this.terrain&&!c.freezeElevation&&this._updateElevation($r),Ht)L.setLocationAtPoint(Ht,Wt);else{const Qr=L.zoomScale(L.zoom-D),yn=bt>D?Math.min(2,ct):Math.max(.5,ct),Tn=Math.pow(yn,1-$r),fn=L.unproject(St.add(Pt.mult($r*Tn)).mult(Qr));L.setLocationAtPoint(L.renderWorldCopies?fn.wrap():fn,qe)}this._applyUpdatedTransform(L),this._fireMoveEvents(x)},$r=>{this.terrain&&c.freezeElevation&&this._finalizeElevation(),this._afterEase(x,$r)},c),this}_prepareEase(c,x,R={}){this._moving=!0,x||R.moving||this.fire(new a.k("movestart",c)),this._zooming&&!R.zooming&&this.fire(new a.k("zoomstart",c)),this._rotating&&!R.rotating&&this.fire(new a.k("rotatestart",c)),this._pitching&&!R.pitching&&this.fire(new a.k("pitchstart",c))}_prepareElevation(c){this._elevationCenter=c,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(c,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(c){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const x=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(c<1&&x!==this._elevationTarget){const R=this._elevationTarget-this._elevationStart;this._elevationStart+=c*(R-(x-(R*c+this._elevationStart))/(1-c)),this._elevationTarget=x}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,c)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(c){const x=c.getCameraPosition(),R=this.terrain.getElevationForLngLatZoom(x.lngLat,c.zoom);if(x.altitudethis._elevateCameraIfInsideTerrain(L)),this.transformCameraUpdate&&x.push(L=>this.transformCameraUpdate(L)),!x.length)return;const R=c.clone();for(const L of x){const D=R.clone(),{center:X,zoom:Q,pitch:ie,bearing:de,elevation:_e}=L(D);X&&(D.center=X),Q!==void 0&&(D.zoom=Q),ie!==void 0&&(D.pitch=ie),de!==void 0&&(D.bearing=de),_e!==void 0&&(D.elevation=_e),R.apply(D)}this.transform.apply(R)}_fireMoveEvents(c){this.fire(new a.k("move",c)),this._zooming&&this.fire(new a.k("zoom",c)),this._rotating&&this.fire(new a.k("rotate",c)),this._pitching&&this.fire(new a.k("pitch",c))}_afterEase(c,x){if(this._easeId&&x&&this._easeId===x)return;delete this._easeId;const R=this._zooming,L=this._rotating,D=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,R&&this.fire(new a.k("zoomend",c)),L&&this.fire(new a.k("rotateend",c)),D&&this.fire(new a.k("pitchend",c)),this.fire(new a.k("moveend",c))}flyTo(c,x){var R;if(!c.essential&&f.prefersReducedMotion){const nn=a.M(c,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nn,x)}this.stop(),c=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},c);const L=this._getTransformForUpdate(),D=L.zoom,X=L.bearing,Q=L.pitch,ie=L.padding,de="bearing"in c?this._normalizeBearing(c.bearing,X):X,_e="pitch"in c?+c.pitch:Q,xe="padding"in c?c.padding:L.padding,Oe=a.P.convert(c.offset);let qe=L.centerPoint.add(Oe);const tt=L.pointLocation(qe),{center:dt,zoom:bt}=L.getConstrained(a.N.convert(c.center||tt),(R=c.zoom)!==null&&R!==void 0?R:D);this._normalizeCenter(dt,L);const St=L.zoomScale(bt-D),Pt=L.project(tt),ct=L.project(dt).sub(Pt);let Ht=c.curve;const Wt=Math.max(L.width,L.height),sr=Wt/St,$r=ct.mag();if("minZoom"in c){const nn=a.ac(Math.min(c.minZoom,D,bt),L.minZoom,L.maxZoom),Ui=Wt/L.zoomScale(nn-D);Ht=Math.sqrt(Ui/$r*2)}const Qr=Ht*Ht;function yn(nn){const Ui=(sr*sr-Wt*Wt+(nn?-1:1)*Qr*Qr*$r*$r)/(2*(nn?sr:Wt)*Qr*$r);return Math.log(Math.sqrt(Ui*Ui+1)-Ui)}function Tn(nn){return(Math.exp(nn)-Math.exp(-nn))/2}function fn(nn){return(Math.exp(nn)+Math.exp(-nn))/2}const pn=yn(!1);let Yn=function(nn){return fn(pn)/fn(pn+Ht*nn)},Ki=function(nn){return Wt*((fn(pn)*(Tn(Ui=pn+Ht*nn)/fn(Ui))-Tn(pn))/Qr)/$r;var Ui},xn=(yn(!0)-pn)/Ht;if(Math.abs($r)<1e-6||!isFinite(xn)){if(Math.abs(Wt-sr)<1e-6)return this.easeTo(c,x);const nn=sr0,Yn=Ui=>Math.exp(nn*Ht*Ui)}return c.duration="duration"in c?+c.duration:1e3*xn/("screenSpeed"in c?+c.screenSpeed/Ht:+c.speed),c.maxDuration&&c.duration>c.maxDuration&&(c.duration=0),this._zooming=!0,this._rotating=X!==de,this._pitching=_e!==Q,this._padding=!L.isPaddingEqual(xe),this._prepareEase(x,!1),this.terrain&&this._prepareElevation(dt),this._ease(nn=>{const Ui=nn*xn,qo=1/Yn(Ui);L.zoom=nn===1?bt:D+L.scaleZoom(qo),this._rotating&&(L.bearing=a.y.number(X,de,nn)),this._pitching&&(L.pitch=a.y.number(Q,_e,nn)),this._padding&&(L.interpolatePadding(ie,xe,nn),qe=L.centerPoint.add(Oe)),this.terrain&&!c.freezeElevation&&this._updateElevation(nn);const qi=nn===1?dt:L.unproject(Pt.add(ct.mult(Ki(Ui))).mult(qo));L.setLocationAtPoint(L.renderWorldCopies?qi.wrap():qi,qe),this._applyUpdatedTransform(L),this._fireMoveEvents(x)},()=>{this.terrain&&c.freezeElevation&&this._finalizeElevation(),this._afterEase(x)},c),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(c,x){var R;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const L=this._onEaseEnd;delete this._onEaseEnd,L.call(this,x)}return c||(R=this.handlers)===null||R===void 0||R.stop(!1),this}_ease(c,x,R){R.animate===!1||R.duration===0?(c(1),x()):(this._easeStart=f.now(),this._easeOptions=R,this._onEaseFrame=c,this._onEaseEnd=x,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(c,x){c=a.b3(c,-180,180);const R=Math.abs(c-x);return Math.abs(c-360-x)180?-360:R<-180?360:0}queryTerrainElevation(c){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(c),this.transform.tileZoom)-this.transform.elevation:null}}const u0={compact:!0,customAttribution:'MapLibre'};class ef{constructor(c=u0){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=x=>{!x||x.sourceDataType!=="metadata"&&x.sourceDataType!=="visibility"&&x.dataType!=="style"&&x.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=c}getDefaultPosition(){return"bottom-right"}onAdd(c){return this._map=c,this._compact=this.options.compact,this._container=m.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=m.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=m.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){m.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(c,x){const R=this._map._getUIString(`AttributionControl.${x}`);c.title=R,c.setAttribute("aria-label",R)}_updateAttributions(){if(!this._map.style)return;let c=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?c=c.concat(this.options.customAttribution.map(L=>typeof L!="string"?"":L)):typeof this.options.customAttribution=="string"&&c.push(this.options.customAttribution)),this._map.style.stylesheet){const L=this._map.style.stylesheet;this.styleOwner=L.owner,this.styleId=L.id}const x=this._map.style.sourceCaches;for(const L in x){const D=x[L];if(D.used||D.usedForTerrain){const X=D.getSource();X.attribution&&c.indexOf(X.attribution)<0&&c.push(X.attribution)}}c=c.filter(L=>String(L).trim()),c.sort((L,D)=>L.length-D.length),c=c.filter((L,D)=>{for(let X=D+1;X=0)return!1;return!0});const R=c.join(" | ");R!==this._attribHTML&&(this._attribHTML=R,c.length?(this._innerContainer.innerHTML=R,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Qp{constructor(c={}){this._updateCompact=()=>{const x=this._container.children;if(x.length){const R=x[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&R.classList.add("maplibregl-compact"):R.classList.remove("maplibregl-compact")}},this.options=c}getDefaultPosition(){return"bottom-left"}onAdd(c){this._map=c,this._compact=this.options&&this.options.compact,this._container=m.create("div","maplibregl-ctrl");const x=m.create("a","maplibregl-ctrl-logo");return x.target="_blank",x.rel="noopener nofollow",x.href="https://maplibre.org/",x.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),x.setAttribute("rel","noopener nofollow"),this._container.appendChild(x),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){m.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ds{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(c){const x=++this._id;return this._queue.push({callback:c,id:x,cancelled:!1}),x}remove(c){const x=this._currentlyRunning,R=x?this._queue.concat(x):this._queue;for(const L of R)if(L.id===c)return void(L.cancelled=!0)}run(c=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const x=this._currentlyRunning=this._queue;this._queue=[];for(const R of x)if(!R.cancelled&&(R.callback(c),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ge=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class c0 extends a.E{constructor(c){super(),this.sourceCache=c,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,c.usedForTerrain=!0,c.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(c,x){this.sourceCache.update(c,x),this._renderableTilesKeys=[];const R={};for(const L of c.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:x}))R[L.key]=!0,this._renderableTilesKeys.push(L.key),this._tiles[L.key]||(L.posMatrix=new Float64Array(16),a.aP(L.posMatrix,0,a.X,0,a.X,0,1),this._tiles[L.key]=new ni(L,this.tileSize));for(const L in this._tiles)R[L]||delete this._tiles[L]}freeRtt(c){for(const x in this._tiles){const R=this._tiles[x];(!c||R.tileID.equals(c)||R.tileID.isChildOf(c)||c.isChildOf(R.tileID))&&(R.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(c=>this.getTileByID(c))}getTileByID(c){return this._tiles[c]}getTerrainCoords(c){const x={};for(const R of this._renderableTilesKeys){const L=this._tiles[R].tileID;if(L.canonical.equals(c.canonical)){const D=c.clone();D.posMatrix=new Float64Array(16),a.aP(D.posMatrix,0,a.X,0,a.X,0,1),x[R]=D}else if(L.canonical.isChildOf(c.canonical)){const D=c.clone();D.posMatrix=new Float64Array(16);const X=L.canonical.z-c.canonical.z,Q=L.canonical.x-(L.canonical.x>>X<>X<>X;a.aP(D.posMatrix,0,de,0,de,0,1),a.J(D.posMatrix,D.posMatrix,[-Q*de,-ie*de,0]),x[R]=D}else if(c.canonical.isChildOf(L.canonical)){const D=c.clone();D.posMatrix=new Float64Array(16);const X=c.canonical.z-L.canonical.z,Q=c.canonical.x-(c.canonical.x>>X<>X<>X;a.aP(D.posMatrix,0,a.X,0,a.X,0,1),a.J(D.posMatrix,D.posMatrix,[Q*de,ie*de,0]),a.K(D.posMatrix,D.posMatrix,[1/2**X,1/2**X,0]),x[R]=D}}return x}getSourceTile(c,x){const R=this.sourceCache._source;let L=c.overscaledZ-this.deltaZoom;if(L>R.maxzoom&&(L=R.maxzoom),L=R.minzoom&&(!D||!D.dem);)D=this.sourceCache.getTileByID(c.scaledTo(L--).key);return D}tilesAfterTime(c=Date.now()){return Object.values(this._tiles).filter(x=>x.timeAdded>=c)}}class h0{constructor(c,x,R){this.painter=c,this.sourceCache=new c0(x),this.options=R,this.exaggeration=typeof R.exaggeration=="number"?R.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(c,x,R,L=a.X){var D;if(!(x>=0&&x=0&&Rc.canonical.z&&(c.canonical.z>=L?D=c.canonical.z-L:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const X=c.canonical.x-(c.canonical.x>>D<>D<>8<<4|D>>8,x[X+3]=0;const R=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(x.buffer)),L=new ee(c,R,c.gl.RGBA,{premultiply:!1});return L.bind(c.gl.NEAREST,c.gl.CLAMP_TO_EDGE),this._coordsTexture=L,L}pointCoordinate(c){this.painter.maybeDrawDepthAndCoords(!0);const x=new Uint8Array(4),R=this.painter.context,L=R.gl,D=Math.round(c.x*this.painter.pixelRatio/devicePixelRatio),X=Math.round(c.y*this.painter.pixelRatio/devicePixelRatio),Q=Math.round(this.painter.height/devicePixelRatio);R.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),L.readPixels(D,Q-X-1,1,1,L.RGBA,L.UNSIGNED_BYTE,x),R.bindFramebuffer.set(null);const ie=x[0]+(x[2]>>4<<8),de=x[1]+((15&x[2])<<8),_e=this.coordsIndex[255-x[3]],xe=_e&&this.sourceCache.getTileByID(_e);if(!xe)return null;const Oe=this._coordsTextureSize,qe=(1<c.id!==x),this._recentlyUsed.push(c.id)}stampObject(c){c.stamp=++this._stamp}getOrCreateFreeObject(){for(const x of this._recentlyUsed)if(!this._objects[x].inUse)return this._objects[x];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const c=this._createObject(this._objects.length);return this._objects.push(c),c}freeObject(c){c.inUse=!1}freeAllObjects(){for(const c of this._objects)this.freeObject(c)}isFull(){return!(this._objects.length!c.inUse)===!1}}const bs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class a9{constructor(c,x){this.painter=c,this.terrain=x,this.pool=new Jc(c.context,30,x.sourceCache.tileSize*x.qualityFactor)}destruct(){this.pool.destruct()}getTexture(c){return this.pool.getObjectForId(c.rtt[this._stacks.length-1].id).texture}prepareForRender(c,x){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=c._order.filter(R=>!c._layers[R].isHidden(x)),this._coordsDescendingInv={};for(const R in c.sourceCaches){this._coordsDescendingInv[R]={};const L=c.sourceCaches[R].getVisibleCoordinates();for(const D of L){const X=this.terrain.sourceCache.getTerrainCoords(D);for(const Q in X)this._coordsDescendingInv[R][Q]||(this._coordsDescendingInv[R][Q]=[]),this._coordsDescendingInv[R][Q].push(X[Q])}}this._coordsDescendingInvStr={};for(const R of c._order){const L=c._layers[R],D=L.source;if(bs[L.type]&&!this._coordsDescendingInvStr[D]){this._coordsDescendingInvStr[D]={};for(const X in this._coordsDescendingInv[D])this._coordsDescendingInvStr[D][X]=this._coordsDescendingInv[D][X].map(Q=>Q.key).sort().join()}}for(const R of this._renderableTiles)for(const L in this._coordsDescendingInvStr){const D=this._coordsDescendingInvStr[L][R.tileID.key];D&&D!==R.rttCoords[L]&&(R.rtt=[])}}renderLayer(c){if(c.isHidden(this.painter.transform.zoom))return!1;const x=c.type,R=this.painter,L=this._renderableLayerIds[this._renderableLayerIds.length-1]===c.id;if(bs[x]&&(this._prevType&&bs[this._prevType]||this._stacks.push([]),this._prevType=x,this._stacks[this._stacks.length-1].push(c.id),!L))return!0;if(bs[this._prevType]||bs[x]&&L){this._prevType=x;const D=this._stacks.length-1,X=this._stacks[D]||[];for(const Q of this._renderableTiles){if(this.pool.isFull()&&(_(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Q),Q.rtt[D]){const de=this.pool.getObjectForId(Q.rtt[D].id);if(de.stamp===Q.rtt[D].stamp){this.pool.useObject(de);continue}}const ie=this.pool.getOrCreateFreeObject();this.pool.useObject(ie),this.pool.stampObject(ie),Q.rtt[D]={id:ie.id,stamp:ie.stamp},R.context.bindFramebuffer.set(ie.fbo.framebuffer),R.context.clear({color:a.aM.transparent,stencil:0}),R.currentStencilSource=void 0;for(let de=0;de{z.touchstart=z.dragStart,z.touchmoveWindow=z.dragMove,z.touchend=z.dragEnd},I7={showCompass:!0,showZoom:!0,visualizePitch:!1};class R7{constructor(c,x,R=!1){this.mousedown=X=>{this.startMouse(a.e({},X,{ctrlKey:!0,preventDefault:()=>X.preventDefault()}),m.mousePos(this.element,X)),m.addEventListener(window,"mousemove",this.mousemove),m.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=X=>{this.moveMouse(X,m.mousePos(this.element,X))},this.mouseup=X=>{this.mouseRotate.dragEnd(X),this.mousePitch&&this.mousePitch.dragEnd(X),this.offTemp()},this.touchstart=X=>{X.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,X.targetTouches)[0],this.startTouch(X,this._startPos),m.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),m.addEventListener(window,"touchend",this.touchend))},this.touchmove=X=>{X.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,X.targetTouches)[0],this.moveTouch(X,this._lastPos))},this.touchend=X=>{X.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const L=c.dragRotate._mouseRotate.getClickTolerance(),D=c.dragRotate._mousePitch.getClickTolerance();this.element=x,this.mouseRotate=m_({clickTolerance:L,enable:!0}),this.touchRotate=(({enable:X,clickTolerance:Q,bearingDegreesPerPixelMoved:ie=.8})=>{const de=new Ku;return new Va({clickTolerance:Q,move:(_e,xe)=>({bearingDelta:(xe.x-_e.x)*ie}),moveStateManager:de,enable:X,assignEvents:b_})})({clickTolerance:L,enable:!0}),this.map=c,R&&(this.mousePitch=g_({clickTolerance:D,enable:!0}),this.touchPitch=(({enable:X,clickTolerance:Q,pitchDegreesPerPixelMoved:ie=-.5})=>{const de=new Ku;return new Va({clickTolerance:Q,move:(_e,xe)=>({pitchDelta:(xe.y-_e.y)*ie}),moveStateManager:de,enable:X,assignEvents:b_})})({clickTolerance:D,enable:!0})),m.addEventListener(x,"mousedown",this.mousedown),m.addEventListener(x,"touchstart",this.touchstart,{passive:!1}),m.addEventListener(x,"touchcancel",this.reset)}startMouse(c,x){this.mouseRotate.dragStart(c,x),this.mousePitch&&this.mousePitch.dragStart(c,x),m.disableDrag()}startTouch(c,x){this.touchRotate.dragStart(c,x),this.touchPitch&&this.touchPitch.dragStart(c,x),m.disableDrag()}moveMouse(c,x){const R=this.map,{bearingDelta:L}=this.mouseRotate.dragMove(c,x)||{};if(L&&R.setBearing(R.getBearing()+L),this.mousePitch){const{pitchDelta:D}=this.mousePitch.dragMove(c,x)||{};D&&R.setPitch(R.getPitch()+D)}}moveTouch(c,x){const R=this.map,{bearingDelta:L}=this.touchRotate.dragMove(c,x)||{};if(L&&R.setBearing(R.getBearing()+L),this.touchPitch){const{pitchDelta:D}=this.touchPitch.dragMove(c,x)||{};D&&R.setPitch(R.getPitch()+D)}}off(){const c=this.element;m.removeEventListener(c,"mousedown",this.mousedown),m.removeEventListener(c,"touchstart",this.touchstart,{passive:!1}),m.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),m.removeEventListener(window,"touchend",this.touchend),m.removeEventListener(c,"touchcancel",this.reset),this.offTemp()}offTemp(){m.enableDrag(),m.removeEventListener(window,"mousemove",this.mousemove),m.removeEventListener(window,"mouseup",this.mouseup),m.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),m.removeEventListener(window,"touchend",this.touchend)}}let Sc;function ra(z,c,x){const R=new a.N(z.lng,z.lat);if(z=new a.N(z.lng,z.lat),c){const L=new a.N(z.lng-360,z.lat),D=new a.N(z.lng+360,z.lat),X=x.locationPoint(z).distSqr(c);x.locationPoint(L).distSqr(c)180;){const L=x.locationPoint(z);if(L.x>=0&&L.y>=0&&L.x<=x.width&&L.y<=x.height)break;z.lng>x.center.lng?z.lng-=360:z.lng+=360}return z.lng!==R.lng&&x.locationPoint(z).y>x.height/2-x.getHorizon()?z:R}const Qu={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function by(z,c,x){const R=z.classList;for(const L in Qu)R.remove(`maplibregl-${x}-anchor-${L}`);R.add(`maplibregl-${x}-anchor-${c}`)}class Cy extends a.E{constructor(c){if(super(),this._onKeyPress=x=>{const R=x.code,L=x.charCode||x.keyCode;R!=="Space"&&R!=="Enter"&&L!==32&&L!==13||this.togglePopup()},this._onMapClick=x=>{const R=x.originalEvent.target,L=this._element;this._popup&&(R===L||L.contains(R))&&this.togglePopup()},this._update=x=>{var R;if(!this._map)return;const L=this._map.loaded()&&!this._map.isMoving();((x==null?void 0:x.type)==="terrain"||(x==null?void 0:x.type)==="render"&&!L)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?ra(this._lngLat,this._flatPos,this._map.transform):(R=this._lngLat)===null||R===void 0?void 0:R.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let D="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?D=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(D=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let X="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?X="rotateX(0deg)":this._pitchAlignment==="map"&&(X=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||x&&x.type!=="moveend"||(this._pos=this._pos.round()),m.setTransform(this._element,`${Qu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${X} ${D}`),f.frameAsync(new AbortController).then(()=>{this._updateOpacity(x&&x.type==="moveend")}).catch(()=>{})},this._onMove=x=>{if(!this._isDragging){const R=this._clickTolerance||this._map._clickTolerance;this._isDragging=x.point.dist(this._pointerdownPos)>=R}this._isDragging&&(this._pos=x.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.k("dragend")),this._state="inactive"},this._addDragHandler=x=>{this._element.contains(x.originalEvent.target)&&(x.preventDefault(),this._positionDelta=x.point.sub(this._pos).add(this._offset),this._pointerdownPos=x.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=c&&c.anchor||"center",this._color=c&&c.color||"#3FB1CE",this._scale=c&&c.scale||1,this._draggable=c&&c.draggable||!1,this._clickTolerance=c&&c.clickTolerance||0,this._subpixelPositioning=c&&c.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=c&&c.rotation||0,this._rotationAlignment=c&&c.rotationAlignment||"auto",this._pitchAlignment=c&&c.pitchAlignment&&c.pitchAlignment!=="auto"?c.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(c==null?void 0:c.opacity,c==null?void 0:c.opacityWhenCovered),c&&c.element)this._element=c.element,this._offset=a.P.convert(c&&c.offset||[0,0]);else{this._defaultMarker=!0,this._element=m.create("div");const x=m.createNS("http://www.w3.org/2000/svg","svg"),R=41,L=27;x.setAttributeNS(null,"display","block"),x.setAttributeNS(null,"height",`${R}px`),x.setAttributeNS(null,"width",`${L}px`),x.setAttributeNS(null,"viewBox",`0 0 ${L} ${R}`);const D=m.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"stroke","none"),D.setAttributeNS(null,"stroke-width","1"),D.setAttributeNS(null,"fill","none"),D.setAttributeNS(null,"fill-rule","evenodd");const X=m.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"fill-rule","nonzero");const Q=m.createNS("http://www.w3.org/2000/svg","g");Q.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Q.setAttributeNS(null,"fill","#000000");const ie=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const St of ie){const Pt=m.createNS("http://www.w3.org/2000/svg","ellipse");Pt.setAttributeNS(null,"opacity","0.04"),Pt.setAttributeNS(null,"cx","10.5"),Pt.setAttributeNS(null,"cy","5.80029008"),Pt.setAttributeNS(null,"rx",St.rx),Pt.setAttributeNS(null,"ry",St.ry),Q.appendChild(Pt)}const de=m.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"fill",this._color);const _e=m.createNS("http://www.w3.org/2000/svg","path");_e.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),de.appendChild(_e);const xe=m.createNS("http://www.w3.org/2000/svg","g");xe.setAttributeNS(null,"opacity","0.25"),xe.setAttributeNS(null,"fill","#000000");const Oe=m.createNS("http://www.w3.org/2000/svg","path");Oe.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),xe.appendChild(Oe);const qe=m.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(6.0, 7.0)"),qe.setAttributeNS(null,"fill","#FFFFFF");const tt=m.createNS("http://www.w3.org/2000/svg","g");tt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const dt=m.createNS("http://www.w3.org/2000/svg","circle");dt.setAttributeNS(null,"fill","#000000"),dt.setAttributeNS(null,"opacity","0.25"),dt.setAttributeNS(null,"cx","5.5"),dt.setAttributeNS(null,"cy","5.5"),dt.setAttributeNS(null,"r","5.4999962");const bt=m.createNS("http://www.w3.org/2000/svg","circle");bt.setAttributeNS(null,"fill","#FFFFFF"),bt.setAttributeNS(null,"cx","5.5"),bt.setAttributeNS(null,"cy","5.5"),bt.setAttributeNS(null,"r","5.4999962"),tt.appendChild(dt),tt.appendChild(bt),X.appendChild(Q),X.appendChild(de),X.appendChild(xe),X.appendChild(qe),X.appendChild(tt),x.appendChild(X),x.setAttributeNS(null,"height",R*this._scale+"px"),x.setAttributeNS(null,"width",L*this._scale+"px"),this._element.appendChild(x),this._offset=a.P.convert(c&&c.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",x=>{x.preventDefault()}),this._element.addEventListener("mousedown",x=>{x.preventDefault()}),by(this._element,this._anchor,"marker"),c&&c.className)for(const x of c.className.split(" "))this._element.classList.add(x);this._popup=null}addTo(c){return this.remove(),this._map=c,this._element.setAttribute("aria-label",c._getUIString("Marker.Title")),c.getCanvasContainer().appendChild(this._element),c.on("move",this._update),c.on("moveend",this._update),c.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),m.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(c){return this._lngLat=a.N.convert(c),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(c){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),c){if(!("offset"in c.options)){const L=Math.abs(13.5)/Math.SQRT2;c.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[L,-1*(38.1-13.5+L)],"bottom-right":[-L,-1*(38.1-13.5+L)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=c,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(c){return this._subpixelPositioning=c,this}getPopup(){return this._popup}togglePopup(){const c=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:c?(c.isOpen()?c.remove():(c.setLngLat(this._lngLat),c.addTo(this._map)),this):this}_updateOpacity(c=!1){var x,R;if(!(!((x=this._map)===null||x===void 0)&&x.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(c)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const L=this._map,D=L.terrain.depthAtPoint(this._pos),X=L.terrain.getElevationForLngLatZoom(this._lngLat,L.transform.tileZoom);if(L.transform.lngLatToCameraDepth(this._lngLat,X)-D<.006)return void(this._element.style.opacity=this._opacity);const Q=-this._offset.y/L.transform._pixelPerMeter,ie=Math.sin(L.getPitch()*Math.PI/180)*Q,de=L.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),_e=L.transform.lngLatToCameraDepth(this._lngLat,X+ie)-de>.006;!((R=this._popup)===null||R===void 0)&&R.isOpen()&&_e&&this._popup.remove(),this._element.style.opacity=_e?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(c){return this._offset=a.P.convert(c),this._update(),this}addClassName(c){this._element.classList.add(c)}removeClassName(c){this._element.classList.remove(c)}toggleClassName(c){return this._element.classList.toggle(c)}setDraggable(c){return this._draggable=!!c,this._map&&(c?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(c){return this._rotation=c||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(c){return this._rotationAlignment=c||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(c){return this._pitchAlignment=c&&c!=="auto"?c:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(c,x){return c===void 0&&x===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),c!==void 0&&(this._opacity=c),x!==void 0&&(this._opacityWhenCovered=x),this._map&&this._updateOpacity(!0),this}}const u9={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Rm=0,Lm=!1;const zl={maxWidth:100,unit:"metric"};function km(z,c,x){const R=x&&x.maxWidth||100,L=z._container.clientHeight/2,D=z.unproject([0,L]),X=z.unproject([R,L]),Q=D.distanceTo(X);if(x&&x.unit==="imperial"){const ie=3.2808*Q;ie>5280?ii(c,R,ie/5280,z._getUIString("ScaleControl.Miles")):ii(c,R,ie,z._getUIString("ScaleControl.Feet"))}else x&&x.unit==="nautical"?ii(c,R,Q/1852,z._getUIString("ScaleControl.NauticalMiles")):Q>=1e3?ii(c,R,Q/1e3,z._getUIString("ScaleControl.Kilometers")):ii(c,R,Q,z._getUIString("ScaleControl.Meters"))}function ii(z,c,x,R){const L=function(D){const X=Math.pow(10,`${Math.floor(D)}`.length-1);let Q=D/X;return Q=Q>=10?10:Q>=5?5:Q>=3?3:Q>=2?2:Q>=1?1:function(ie){const de=Math.pow(10,Math.ceil(-Math.log(ie)/Math.LN10));return Math.round(ie*de)/de}(Q),X*Q}(x);z.style.width=c*(L/x)+"px",z.innerHTML=`${L} ${R}`}const Di={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Sy=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ey(z){if(z){if(typeof z=="number"){const c=Math.round(Math.abs(z)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,z),"top-left":new a.P(c,c),"top-right":new a.P(-c,c),bottom:new a.P(0,-z),"bottom-left":new a.P(c,-c),"bottom-right":new a.P(-c,-c),left:new a.P(z,0),right:new a.P(-z,0)}}if(z instanceof a.P||Array.isArray(z)){const c=a.P.convert(z);return{center:c,top:c,"top-left":c,"top-right":c,bottom:c,"bottom-left":c,"bottom-right":c,left:c,right:c}}return{center:a.P.convert(z.center||[0,0]),top:a.P.convert(z.top||[0,0]),"top-left":a.P.convert(z["top-left"]||[0,0]),"top-right":a.P.convert(z["top-right"]||[0,0]),bottom:a.P.convert(z.bottom||[0,0]),"bottom-left":a.P.convert(z["bottom-left"]||[0,0]),"bottom-right":a.P.convert(z["bottom-right"]||[0,0]),left:a.P.convert(z.left||[0,0]),right:a.P.convert(z.right||[0,0])}}return Ey(new a.P(0,0))}const tf=l;o.AJAXError=a.bh,o.Evented=a.E,o.LngLat=a.N,o.MercatorCoordinate=a.Z,o.Point=a.P,o.addProtocol=a.bi,o.config=a.a,o.removeProtocol=a.bj,o.AttributionControl=ef,o.BoxZoomHandler=Io,o.CanvasSource=mn,o.CooperativeGesturesHandler=Qd,o.DoubleClickZoomHandler=Kd,o.DragPanHandler=Jp,o.DragRotateHandler=l0,o.EdgeInsets=ue,o.FullscreenControl=class extends a.E{constructor(z={}){super(),this._onFullscreenChange=()=>{var c;let x=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((c=x==null?void 0:x.shadowRoot)===null||c===void 0)&&c.fullscreenElement;)x=x.shadowRoot.fullscreenElement;x===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,z&&z.container&&(z.container instanceof HTMLElement?this._container=z.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(z){return this._map=z,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){m.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const z=this._fullscreenButton=m.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);m.create("span","maplibregl-ctrl-icon",z).setAttribute("aria-hidden","true"),z.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const z=this._getTitle();this._fullscreenButton.setAttribute("aria-label",z),this._fullscreenButton.title=z}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},o.GeoJSONSource=xr,o.GeolocateControl=class extends a.E{constructor(z){super(),this._onSuccess=c=>{if(this._map){if(this._isOutOfMapMaxBounds(c))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",c)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=c,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(c),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(c),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",c)),this._finish()}},this._updateCamera=c=>{const x=new a.N(c.coords.longitude,c.coords.latitude),R=c.coords.accuracy,L=this._map.getBearing(),D=a.e({bearing:L},this.options.fitBoundsOptions),X=rt.fromLngLat(x,R);this._map.fitBounds(X,D,{geolocateSource:!0})},this._updateMarker=c=>{if(c){const x=new a.N(c.coords.longitude,c.coords.latitude);this._accuracyCircleMarker.setLngLat(x).addTo(this._map),this._userLocationDotMarker.setLngLat(x).addTo(this._map),this._accuracy=c.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=c=>{if(this._map){if(this.options.trackUserLocation)if(c.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const x=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=x,this._geolocateButton.setAttribute("aria-label",x),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(c.code===3&&Lm)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",c)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",c=>c.preventDefault()),this._geolocateButton=m.create("button","maplibregl-ctrl-geolocate",this._container),m.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=c=>{if(this._map){if(c===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");const x=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=x,this._geolocateButton.setAttribute("aria-label",x)}else{const x=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=x,this._geolocateButton.setAttribute("aria-label",x)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Cy({element:this._dotElement}),this._circleElement=m.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Cy({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",x=>{x.geolocateSource||this._watchState!=="ACTIVE_LOCK"||x.originalEvent&&x.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},u9,z)}onAdd(z){return this._map=z,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(c=!1){if(Sc!==void 0&&!c)return Sc;if(window.navigator.permissions===void 0)return Sc=!!window.navigator.geolocation,Sc;try{Sc=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Sc=!!window.navigator.geolocation}return Sc})}().then(c=>this._finishSetupUI(c)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),m.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Rm=0,Lm=!1}_isOutOfMapMaxBounds(z){const c=this._map.getMaxBounds(),x=z.coords;return c&&(x.longitudec.getEast()||x.latitudec.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const z=this._map.getBounds(),c=z.getSouthEast(),x=z.getNorthEast(),R=c.distanceTo(x),L=Math.ceil(this._accuracy/(R/this._map._container.clientHeight)*2);this._circleElement.style.width=`${L}px`,this._circleElement.style.height=`${L}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Rm--,Lm=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let z;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Rm++,Rm>1?(z={maximumAge:6e5,timeout:0},Lm=!0):(z=this.options.positionOptions,Lm=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,z)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},o.Hash=Vt,o.ImageSource=In,o.KeyboardHandler=Xc,o.LngLatBounds=rt,o.LogoControl=Qp,o.Map=class extends o9{constructor(z){a.bf.mark(a.bg.create);const c=Object.assign(Object.assign({},e1),z);if(c.minZoom!=null&&c.maxZoom!=null&&c.minZoom>c.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(c.minPitch!=null&&c.maxPitch!=null&&c.minPitch>c.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(c.minPitch!=null&&c.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(c.maxPitch!=null&&c.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ue(c.minZoom,c.maxZoom,c.minPitch,c.maxPitch,c.renderWorldCopies),{bearingSnap:c.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ds,this._controls=[],this._mapId=a.a4(),this._contextLost=x=>{x.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:x}))},this._contextRestored=x=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:x}))},this._onMapScroll=x=>{if(x.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=c.interactive,this._maxTileCacheSize=c.maxTileCacheSize,this._maxTileCacheZoomLevels=c.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=c.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=c.preserveDrawingBuffer===!0,this._antialias=c.antialias===!0,this._trackResize=c.trackResize===!0,this._bearingSnap=c.bearingSnap,this._refreshExpiredTiles=c.refreshExpiredTiles===!0,this._fadeDuration=c.fadeDuration,this._crossSourceCollisions=c.crossSourceCollisions===!0,this._collectResourceTiming=c.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},w_),c.locale),this._clickTolerance=c.clickTolerance,this._overridePixelRatio=c.pixelRatio,this._maxCanvasSize=c.maxCanvasSize,this.transformCameraUpdate=c.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=c.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=j.addThrottleControl(()=>this.isMoving()),this._requestManager=new H(c.transformRequest),typeof c.container=="string"){if(this._container=document.getElementById(c.container),!this._container)throw new Error(`Container '${c.container}' not found.`)}else{if(!(c.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=c.container}if(c.maxBounds&&this.setMaxBounds(c.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let x=!1;const R=It(L=>{this._trackResize&&!this._removed&&(this.resize(L),this.redraw())},50);this._resizeObserver=new ResizeObserver(L=>{x?R(L):x=!0}),this._resizeObserver.observe(this._container)}this.handlers=new x_(this,c),this._hash=c.hash&&new Vt(typeof c.hash=="string"&&c.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:c.center,zoom:c.zoom,bearing:c.bearing,pitch:c.pitch}),c.bounds&&(this.resize(),this.fitBounds(c.bounds,a.e({},c.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=c.localIdeographFontFamily,this._validateStyle=c.validateStyle,c.style&&this.setStyle(c.style,{localIdeographFontFamily:c.localIdeographFontFamily}),c.attributionControl&&this.addControl(new ef(typeof c.attributionControl=="boolean"?void 0:c.attributionControl)),c.maplibreLogo&&this.addControl(new Qp,c.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",x=>{this._update(x.dataType==="style"),this.fire(new a.k(`${x.dataType}data`,x))}),this.on("dataloading",x=>{this.fire(new a.k(`${x.dataType}dataloading`,x))}),this.on("dataabort",x=>{this.fire(new a.k("sourcedataabort",x))})}_getMapId(){return this._mapId}addControl(z,c){if(c===void 0&&(c=z.getDefaultPosition?z.getDefaultPosition():"top-right"),!z||!z.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const x=z.onAdd(this);this._controls.push(z);const R=this._controlPositions[c];return c.indexOf("bottom")!==-1?R.insertBefore(x,R.firstChild):R.appendChild(x),this}removeControl(z){if(!z||!z.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const c=this._controls.indexOf(z);return c>-1&&this._controls.splice(c,1),z.onRemove(this),this}hasControl(z){return this._controls.indexOf(z)>-1}calculateCameraOptionsFromTo(z,c,x,R){return R==null&&this.terrain&&(R=this.terrain.getElevationForLngLatZoom(x,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(z,c,x,R)}resize(z){var c;const x=this._containerDimensions(),R=x[0],L=x[1],D=this._getClampedPixelRatio(R,L);if(this._resizeCanvas(R,L,D),this.painter.resize(R,L,D),this.painter.overLimit()){const Q=this.painter.context.gl;this._maxCanvasSize=[Q.drawingBufferWidth,Q.drawingBufferHeight];const ie=this._getClampedPixelRatio(R,L);this._resizeCanvas(R,L,ie),this.painter.resize(R,L,ie)}this.transform.resize(R,L),(c=this._requestedCameraState)===null||c===void 0||c.resize(R,L);const X=!this._moving;return X&&(this.stop(),this.fire(new a.k("movestart",z)).fire(new a.k("move",z))),this.fire(new a.k("resize",z)),X&&this.fire(new a.k("moveend",z)),this}_getClampedPixelRatio(z,c){const{0:x,1:R}=this._maxCanvasSize,L=this.getPixelRatio(),D=z*L,X=c*L;return Math.min(D>x?x/D:1,X>R?R/X:1)*L}getPixelRatio(){var z;return(z=this._overridePixelRatio)!==null&&z!==void 0?z:devicePixelRatio}setPixelRatio(z){this._overridePixelRatio=z,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(z){return this.transform.setMaxBounds(rt.convert(z)),this._update()}setMinZoom(z){if((z=z??-2)>=-2&&z<=this.transform.maxZoom)return this.transform.minZoom=z,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=z,this._update(),this.getZoom()>z&&this.setZoom(z),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(z){if((z=z??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(z>=0&&z<=this.transform.maxPitch)return this.transform.minPitch=z,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(z>=this.transform.minPitch)return this.transform.maxPitch=z,this._update(),this.getPitch()>z&&this.setPitch(z),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(z){return this.transform.renderWorldCopies=z,this._update()}project(z){return this.transform.locationPoint(a.N.convert(z),this.style&&this.terrain)}unproject(z){return this.transform.pointLocation(a.P.convert(z),this.terrain)}isMoving(){var z;return this._moving||((z=this.handlers)===null||z===void 0?void 0:z.isMoving())}isZooming(){var z;return this._zooming||((z=this.handlers)===null||z===void 0?void 0:z.isZooming())}isRotating(){var z;return this._rotating||((z=this.handlers)===null||z===void 0?void 0:z.isRotating())}_createDelegatedListener(z,c,x){if(z==="mouseenter"||z==="mouseover"){let R=!1;return{layers:c,listener:x,delegates:{mousemove:D=>{const X=c.filter(ie=>this.getLayer(ie)),Q=X.length!==0?this.queryRenderedFeatures(D.point,{layers:X}):[];Q.length?R||(R=!0,x.call(this,new Ts(z,this,D.originalEvent,{features:Q}))):R=!1},mouseout:()=>{R=!1}}}}if(z==="mouseleave"||z==="mouseout"){let R=!1;return{layers:c,listener:x,delegates:{mousemove:X=>{const Q=c.filter(ie=>this.getLayer(ie));(Q.length!==0?this.queryRenderedFeatures(X.point,{layers:Q}):[]).length?R=!0:R&&(R=!1,x.call(this,new Ts(z,this,X.originalEvent)))},mouseout:X=>{R&&(R=!1,x.call(this,new Ts(z,this,X.originalEvent)))}}}}{const R=L=>{const D=c.filter(Q=>this.getLayer(Q)),X=D.length!==0?this.queryRenderedFeatures(L.point,{layers:D}):[];X.length&&(L.features=X,x.call(this,L),delete L.features)};return{layers:c,listener:x,delegates:{[z]:R}}}}_saveDelegatedListener(z,c){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[z]=this._delegatedListeners[z]||[],this._delegatedListeners[z].push(c)}_removeDelegatedListener(z,c,x){if(!this._delegatedListeners||!this._delegatedListeners[z])return;const R=this._delegatedListeners[z];for(let L=0;Lc.includes(X))){for(const X in D.delegates)this.off(X,D.delegates[X]);return void R.splice(L,1)}}}on(z,c,x){if(x===void 0)return super.on(z,c);const R=this._createDelegatedListener(z,typeof c=="string"?[c]:c,x);this._saveDelegatedListener(z,R);for(const L in R.delegates)this.on(L,R.delegates[L]);return this}once(z,c,x){if(x===void 0)return super.once(z,c);const R=typeof c=="string"?[c]:c,L=this._createDelegatedListener(z,R,x);for(const D in L.delegates){const X=L.delegates[D];L.delegates[D]=(...Q)=>{this._removeDelegatedListener(z,R,x),X(...Q)}}this._saveDelegatedListener(z,L);for(const D in L.delegates)this.once(D,L.delegates[D]);return this}off(z,c,x){return x===void 0?super.off(z,c):(this._removeDelegatedListener(z,typeof c=="string"?[c]:c,x),this)}queryRenderedFeatures(z,c){if(!this.style)return[];let x;const R=z instanceof a.P||Array.isArray(z),L=R?z:[[0,0],[this.transform.width,this.transform.height]];if(c=c||(R?{}:z)||{},L instanceof a.P||typeof L[0]=="number")x=[a.P.convert(L)];else{const D=a.P.convert(L[0]),X=a.P.convert(L[1]);x=[D,new a.P(X.x,D.y),X,new a.P(D.x,X.y),D]}return this.style.queryRenderedFeatures(x,c,this.transform)}querySourceFeatures(z,c){return this.style.querySourceFeatures(z,c)}setStyle(z,c){return(c=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},c)).diff!==!1&&c.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&z?(this._diffStyle(z,c),this):(this._localIdeographFontFamily=c.localIdeographFontFamily,this._updateStyle(z,c))}setTransformRequest(z){return this._requestManager.setTransformRequest(z),this}_getUIString(z){const c=this._locale[z];if(c==null)throw new Error(`Missing UI string '${z}'`);return c}_updateStyle(z,c){if(c.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(z,c));const x=this.style&&c.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!z)),z?(this.style=new Js(this,c||{}),this.style.setEventedParent(this,{style:this.style}),typeof z=="string"?this.style.loadURL(z,c,x):this.style.loadJSON(z,c,x),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Js(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(z,c){if(typeof z=="string"){const x=this._requestManager.transformRequest(z,"Style");a.h(x,new AbortController).then(R=>{this._updateDiff(R.data,c)}).catch(R=>{R&&this.fire(new a.j(R))})}else typeof z=="object"&&this._updateDiff(z,c)}_updateDiff(z,c){try{this.style.setState(z,c)&&this._update(!0)}catch(x){a.w(`Unable to perform style diff: ${x.message||x.error||x}. Rebuilding the style from scratch.`),this._updateStyle(z,c)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(z,c){return this._lazyInitEmptyStyle(),this.style.addSource(z,c),this._update(!0)}isSourceLoaded(z){const c=this.style&&this.style.sourceCaches[z];if(c!==void 0)return c.loaded();this.fire(new a.j(new Error(`There is no source with ID '${z}'`)))}setTerrain(z){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),z){const c=this.style.sourceCaches[z.source];if(!c)throw new Error(`cannot load terrain, because there exists no source with ID: ${z.source}`);this.terrain===null&&c.reload();for(const x in this.style._layers){const R=this.style._layers[x];R.type==="hillshade"&&R.source===z.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new h0(this.painter,c,z),this.painter.renderToTexture=new a9(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=x=>{x.dataType==="style"?this.terrain.sourceCache.freeRtt():x.dataType==="source"&&x.tile&&(x.sourceId!==z.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(x.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:z})),this}getTerrain(){var z,c;return(c=(z=this.terrain)===null||z===void 0?void 0:z.options)!==null&&c!==void 0?c:null}areTilesLoaded(){const z=this.style&&this.style.sourceCaches;for(const c in z){const x=z[c]._tiles;for(const R in x){const L=x[R];if(L.state!=="loaded"&&L.state!=="errored")return!1}}return!0}removeSource(z){return this.style.removeSource(z),this._update(!0)}getSource(z){return this.style.getSource(z)}addImage(z,c,x={}){const{pixelRatio:R=1,sdf:L=!1,stretchX:D,stretchY:X,content:Q,textFitWidth:ie,textFitHeight:de}=x;if(this._lazyInitEmptyStyle(),!(c instanceof HTMLImageElement||a.b(c))){if(c.width===void 0||c.height===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:_e,height:xe,data:Oe}=c,qe=c;return this.style.addImage(z,{data:new a.R({width:_e,height:xe},new Uint8Array(Oe)),pixelRatio:R,stretchX:D,stretchY:X,content:Q,textFitWidth:ie,textFitHeight:de,sdf:L,version:0,userImage:qe}),qe.onAdd&&qe.onAdd(this,z),this}}{const{width:_e,height:xe,data:Oe}=f.getImageData(c);this.style.addImage(z,{data:new a.R({width:_e,height:xe},Oe),pixelRatio:R,stretchX:D,stretchY:X,content:Q,textFitWidth:ie,textFitHeight:de,sdf:L,version:0})}}updateImage(z,c){const x=this.style.getImage(z);if(!x)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const R=c instanceof HTMLImageElement||a.b(c)?f.getImageData(c):c,{width:L,height:D,data:X}=R;if(L===void 0||D===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(L!==x.data.width||D!==x.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const Q=!(c instanceof HTMLImageElement||a.b(c));return x.data.replace(X,Q),this.style.updateImage(z,x),this}getImage(z){return this.style.getImage(z)}hasImage(z){return z?!!this.style.getImage(z):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(z){this.style.removeImage(z)}loadImage(z){return j.getImage(this._requestManager.transformRequest(z,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(z,c){return this._lazyInitEmptyStyle(),this.style.addLayer(z,c),this._update(!0)}moveLayer(z,c){return this.style.moveLayer(z,c),this._update(!0)}removeLayer(z){return this.style.removeLayer(z),this._update(!0)}getLayer(z){return this.style.getLayer(z)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(z,c,x){return this.style.setLayerZoomRange(z,c,x),this._update(!0)}setFilter(z,c,x={}){return this.style.setFilter(z,c,x),this._update(!0)}getFilter(z){return this.style.getFilter(z)}setPaintProperty(z,c,x,R={}){return this.style.setPaintProperty(z,c,x,R),this._update(!0)}getPaintProperty(z,c){return this.style.getPaintProperty(z,c)}setLayoutProperty(z,c,x,R={}){return this.style.setLayoutProperty(z,c,x,R),this._update(!0)}getLayoutProperty(z,c){return this.style.getLayoutProperty(z,c)}setGlyphs(z,c={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(z,c),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(z,c,x={}){return this._lazyInitEmptyStyle(),this.style.addSprite(z,c,x,R=>{R||this._update(!0)}),this}removeSprite(z){return this._lazyInitEmptyStyle(),this.style.removeSprite(z),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(z,c={}){return this._lazyInitEmptyStyle(),this.style.setSprite(z,c,x=>{x||this._update(!0)}),this}setLight(z,c={}){return this._lazyInitEmptyStyle(),this.style.setLight(z,c),this._update(!0)}getLight(){return this.style.getLight()}setSky(z){return this._lazyInitEmptyStyle(),this.style.setSky(z),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(z,c){return this.style.setFeatureState(z,c),this._update()}removeFeatureState(z,c){return this.style.removeFeatureState(z,c),this._update()}getFeatureState(z){return this.style.getFeatureState(z)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let z=0,c=0;return this._container&&(z=this._container.clientWidth||400,c=this._container.clientHeight||300),[z,c]}_setupContainer(){const z=this._container;z.classList.add("maplibregl-map");const c=this._canvasContainer=m.create("div","maplibregl-canvas-container",z);this._interactive&&c.classList.add("maplibregl-interactive"),this._canvas=m.create("canvas","maplibregl-canvas",c),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const x=this._containerDimensions(),R=this._getClampedPixelRatio(x[0],x[1]);this._resizeCanvas(x[0],x[1],R);const L=this._controlContainer=m.create("div","maplibregl-control-container",z),D=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(X=>{D[X]=m.create("div",`maplibregl-ctrl-${X} `,L)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(z,c,x){this._canvas.width=Math.floor(x*z),this._canvas.height=Math.floor(x*c),this._canvas.style.width=`${z}px`,this._canvas.style.height=`${c}px`}_setupPainter(){const z={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let c=null;this._canvas.addEventListener("webglcontextcreationerror",R=>{c={requestedAttributes:z},R&&(c.statusMessage=R.statusMessage,c.type=R.type)},{once:!0});const x=this._canvas.getContext("webgl2",z)||this._canvas.getContext("webgl",z);if(!x){const R="Failed to initialize WebGL";throw c?(c.message=R,new Error(JSON.stringify(c))):new Error(R)}this.painter=new k(x,this.transform),v.testSupport(x)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(z){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||z,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(z){return this._update(),this._renderTaskQueue.add(z)}_cancelRenderFrame(z){this._renderTaskQueue.remove(z)}_render(z){const c=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(z),this._removed)return;let x=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const L=this.transform.zoom,D=f.now();this.style.zoomHistory.update(L,D);const X=new a.z(L,{now:D,fadeDuration:c,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Q=X.crossFadingFactor();Q===1&&Q===this._crossFadingFactor||(x=!0,this._crossFadingFactor=Q),this.style.update(X)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,c,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:c,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||x)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const R=this._sourcesDirty||this._styleDirty||this._placementDirty;return R||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||R||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var z;this._hash&&this._hash.remove();for(const x of this._controls)x.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),j.removeThrottleControl(this._imageQueueHandle),(z=this._resizeObserver)===null||z===void 0||z.disconnect();const c=this.painter.context.gl.getExtension("WEBGL_lose_context");c!=null&&c.loseContext&&c.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),m.remove(this._canvasContainer),m.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frameAsync(this._frameRequest).then(z=>{a.bf.frame(z),this._frameRequest=null,this._render(z)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(z){this._showTileBoundaries!==z&&(this._showTileBoundaries=z,this._update())}get showPadding(){return!!this._showPadding}set showPadding(z){this._showPadding!==z&&(this._showPadding=z,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(z){this._showCollisionBoxes!==z&&(this._showCollisionBoxes=z,z?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(z){this._showOverdrawInspector!==z&&(this._showOverdrawInspector=z,this._update())}get repaint(){return!!this._repaint}set repaint(z){this._repaint!==z&&(this._repaint=z,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(z){this._vertices=z,this._update()}get version(){return l9}getCameraTargetElevation(){return this.transform.elevation}},o.MapMouseEvent=Ts,o.MapTouchEvent=io,o.MapWheelEvent=ma,o.Marker=Cy,o.NavigationControl=class{constructor(z){this._updateZoomButtons=()=>{const c=this._map.getZoom(),x=c===this._map.getMaxZoom(),R=c===this._map.getMinZoom();this._zoomInButton.disabled=x,this._zoomOutButton.disabled=R,this._zoomInButton.setAttribute("aria-disabled",x.toString()),this._zoomOutButton.setAttribute("aria-disabled",R.toString())},this._rotateCompassArrow=()=>{const c=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=c},this._setButtonTitle=(c,x)=>{const R=this._map._getUIString(`NavigationControl.${x}`);c.title=R,c.setAttribute("aria-label",R)},this.options=a.e({},I7,z),this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",c=>c.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",c=>this._map.zoomIn({},{originalEvent:c})),m.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",c=>this._map.zoomOut({},{originalEvent:c})),m.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",c=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:c}):this._map.resetNorth({},{originalEvent:c})}),this._compassIcon=m.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(z){return this._map=z,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new R7(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){m.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(z,c){const x=m.create("button",z,this._container);return x.type="button",x.addEventListener("click",c),x}},o.Popup=class extends a.E{constructor(z){super(),this.remove=()=>(this._content&&m.remove(this._content),this._container&&(m.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=c=>{this._update(c.point)},this._onMouseMove=c=>{this._update(c.point)},this._onDrag=c=>{this._update(c.point)},this._update=c=>{var x;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=m.create("div","maplibregl-popup",this._map.getContainer()),this._tip=m.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Q of this.options.className.split(" "))this._container.classList.add(Q);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?ra(this._lngLat,this._flatPos,this._map.transform):(x=this._lngLat)===null||x===void 0?void 0:x.wrap(),this._trackPointer&&!c)return;const R=this._flatPos=this._pos=this._trackPointer&&c?c:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&c?c:this._map.transform.locationPoint(this._lngLat));let L=this.options.anchor;const D=Ey(this.options.offset);if(!L){const Q=this._container.offsetWidth,ie=this._container.offsetHeight;let de;de=R.y+D.bottom.ythis._map.transform.height-ie?["bottom"]:[],R.xthis._map.transform.width-Q/2&&de.push("right"),L=de.length===0?"bottom":de.join("-")}let X=R.add(D[L]);this.options.subpixelPositioning||(X=X.round()),m.setTransform(this._container,`${Qu[L]} translate(${X.x}px,${X.y}px)`),by(this._container,L,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(Di),z)}addTo(z){return this._map&&this.remove(),this._map=z,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(z){return this._lngLat=a.N.convert(z),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(z){return this.setDOMContent(document.createTextNode(z))}setHTML(z){const c=document.createDocumentFragment(),x=document.createElement("body");let R;for(x.innerHTML=z;R=x.firstChild,R;)c.appendChild(R);return this.setDOMContent(c)}getMaxWidth(){var z;return(z=this._container)===null||z===void 0?void 0:z.style.maxWidth}setMaxWidth(z){return this.options.maxWidth=z,this._update(),this}setDOMContent(z){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=m.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(z),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(z){return this._container&&this._container.classList.add(z),this}removeClassName(z){return this._container&&this._container.classList.remove(z),this}setOffset(z){return this.options.offset=z,this._update(),this}toggleClassName(z){if(this._container)return this._container.classList.toggle(z)}setSubpixelPositioning(z){this.options.subpixelPositioning=z}_createCloseButton(){this.options.closeButton&&(this._closeButton=m.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const z=this._container.querySelector(Sy);z&&z.focus()}},o.RasterDEMTileSource=Xt,o.RasterTileSource=it,o.ScaleControl=class{constructor(z){this._onMove=()=>{km(this._map,this._container,this.options)},this.setUnit=c=>{this.options.unit=c,km(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},zl),z)}getDefaultPosition(){return"bottom-left"}onAdd(z){return this._map=z,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-scale",z.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){m.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},o.ScrollZoomHandler=Uh,o.Style=Js,o.TerrainControl=class{constructor(z){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=z}onAdd(z){return this._map=z,this._container=m.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=m.create("button","maplibregl-ctrl-terrain",this._container),m.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){m.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},o.TwoFingersTouchPitchHandler=ga,o.TwoFingersTouchRotateHandler=v_,o.TwoFingersTouchZoomHandler=y_,o.TwoFingersTouchZoomRotateHandler=Kp,o.VectorTileSource=Ze,o.VideoSource=Rr,o.addSourceType=(z,c)=>a._(void 0,void 0,void 0,function*(){if(Ft(z))throw new Error(`A source type called "${z}" already exists.`);((x,R)=>{Kr[x]=R})(z,c)}),o.clearPrewarmedResources=function(){const z=tr;z&&(z.isPreloaded()&&z.numActive()===1?(z.release(Je),tr=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},o.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},o.getRTLTextPluginStatus=function(){return ar().getRTLTextPluginStatus()},o.getVersion=function(){return tf},o.getWorkerCount=function(){return pr.workerCount},o.getWorkerUrl=function(){return a.a.WORKER_URL},o.importScriptInWorkers=function(z){return yt().broadcast("IS",z)},o.prewarm=function(){je().acquire(Je)},o.setMaxParallelImageRequests=function(z){a.a.MAX_PARALLEL_IMAGE_REQUESTS=z},o.setRTLTextPlugin=function(z,c){return ar().setRTLTextPlugin(z,c)},o.setWorkerCount=function(z){pr.workerCount=z},o.setWorkerUrl=function(z){a.a.WORKER_URL=z}});var s=r;return s})})(Vge);var IXe=Vge.exports;const Hge=H2(IXe),Gge=E.createContext(),RXe=({children:t})=>{const[e,r]=E.useState(()=>!1);E.useEffect(()=>{const i=window.matchMedia("(prefers-color-scheme: dark)"),s=o=>{r(o.matches)};return i.addEventListener("change",s),r(i.matches),()=>i.removeEventListener("change",s)},[]);const n=()=>{r(!1)};return oe.jsx(Gge.Provider,{value:{isDarkMode:e,toggleDarkMode:n},children:t})},LXe=()=>E.useContext(Gge);//! moment.js +//! version : 2.30.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var qge;function ri(){return qge.apply(null,arguments)}function kXe(t){qge=t}function t0(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function i5(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Uo(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function NY(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(Uo(t,e))return!1;return!0}function kd(t){return t===void 0}function oy(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function JS(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Wge(t,e){var r=[],n,i=t.length;for(n=0;n>>0,n;for(n=0;n0)for(r=0;r=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var BY=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,UT=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,RF={},F4={};function es(t,e,r,n){var i=n;typeof n=="string"&&(i=function(){return this[n]()}),t&&(F4[t]=i),e&&(F4[e[0]]=function(){return hm(i.apply(this,arguments),e[1],e[2])}),r&&(F4[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function NXe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function DXe(t){var e=t.match(BY),r,n;for(r=0,n=e.length;r=0&&UT.test(t);)t=t.replace(UT,n),UT.lastIndex=0,r-=1;return t}var FXe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function zXe(t){var e=this._longDateFormat[t],r=this._longDateFormat[t.toUpperCase()];return e||!r?e:(this._longDateFormat[t]=r.match(BY).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[t])}var BXe="Invalid date";function jXe(){return this._invalidDate}var VXe="%d",UXe=/\d{1,2}/;function HXe(t){return this._ordinal.replace("%d",t)}var GXe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function qXe(t,e,r,n){var i=this._relativeTime[r];return wm(i)?i(t,e,r,n):i.replace(/%d/i,t)}function WXe(t,e){var r=this._relativeTime[t>0?"future":"past"];return wm(r)?r(e):r.replace(/%s/i,e)}var jre={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function qp(t){return typeof t=="string"?jre[t]||jre[t.toLowerCase()]:void 0}function jY(t){var e={},r,n;for(n in t)Uo(t,n)&&(r=qp(n),r&&(e[r]=t[n]));return e}var ZXe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function YXe(t){var e=[],r;for(r in t)Uo(t,r)&&e.push({unit:r,priority:ZXe[r]});return e.sort(function(n,i){return n.priority-i.priority}),e}var Jge=/\d/,Bf=/\d\d/,Kge=/\d{3}/,VY=/\d{4}/,W$=/[+-]?\d{6}/,rl=/\d\d?/,Qge=/\d\d\d\d?/,eye=/\d\d\d\d\d\d?/,Z$=/\d{1,3}/,UY=/\d{1,4}/,Y$=/[+-]?\d{1,6}/,i7=/\d+/,X$=/[+-]?\d+/,XXe=/Z|[+-]\d\d:?\d\d/gi,J$=/Z|[+-]\d\d(?::?\d\d)?/gi,JXe=/[+-]?\d+(\.\d{1,3})?/,QS=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,s7=/^[1-9]\d?/,HY=/^([1-9]\d|\d)/,RA;RA={};function Si(t,e,r){RA[t]=wm(e)?e:function(n,i){return n&&r?r:e}}function KXe(t,e){return Uo(RA,t)?RA[t](e._strict,e._locale):new RegExp(QXe(t))}function QXe(t){return Vg(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,r,n,i,s){return r||n||i||s}))}function Vg(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function xp(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function fo(t){var e=+t,r=0;return e!==0&&isFinite(e)&&(r=xp(e)),r}var UV={};function _a(t,e){var r,n=e,i;for(typeof t=="string"&&(t=[t]),oy(e)&&(n=function(s,o){o[e]=fo(s)}),i=t.length,r=0;r68?1900:2e3)};var tye=o7("FullYear",!0);function nJe(){return K$(this.year())}function o7(t,e){return function(r){return r!=null?(rye(this,t,r),ri.updateOffset(this,e),this):$C(this,t)}}function $C(t,e){if(!t.isValid())return NaN;var r=t._d,n=t._isUTC;switch(e){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function rye(t,e,r){var n,i,s,o,a;if(!(!t.isValid()||isNaN(r))){switch(n=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}s=r,o=t.month(),a=t.date(),a=a===29&&o===1&&!K$(s)?28:a,i?n.setUTCFullYear(s,o,a):n.setFullYear(s,o,a)}}function iJe(t){return t=qp(t),wm(this[t])?this[t]():this}function sJe(t,e){if(typeof t=="object"){t=jY(t);var r=YXe(t),n,i=r.length;for(n=0;n=0?(a=new Date(t+400,e,r,n,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,r,n,i,s,o),a}function OC(t){var e,r;return t<100&&t>=0?(r=Array.prototype.slice.call(arguments),r[0]=t+400,e=new Date(Date.UTC.apply(null,r)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function LA(t,e,r){var n=7+e-r,i=(7+OC(t,0,n).getUTCDay()-e)%7;return-i+n-1}function lye(t,e,r,n,i){var s=(7+r-n)%7,o=LA(t,n,i),a=1+7*(e-1)+s+o,l,u;return a<=0?(l=t-1,u=k6(l)+a):a>k6(t)?(l=t+1,u=a-k6(t)):(l=t,u=a),{year:l,dayOfYear:u}}function NC(t,e,r){var n=LA(t.year(),e,r),i=Math.floor((t.dayOfYear()-n-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+Ug(o,e,r)):i>Ug(t.year(),e,r)?(s=i-Ug(t.year(),e,r),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function Ug(t,e,r){var n=LA(t,e,r),i=LA(t+1,e,r);return(k6(t)-n+i)/7}es("w",["ww",2],"wo","week");es("W",["WW",2],"Wo","isoWeek");Si("w",rl,s7);Si("ww",rl,Bf);Si("W",rl,s7);Si("WW",rl,Bf);eE(["w","ww","W","WW"],function(t,e,r,n){e[n.substr(0,1)]=fo(t)});function vJe(t){return NC(t,this._week.dow,this._week.doy).week}var _Je={dow:0,doy:6};function xJe(){return this._week.dow}function wJe(){return this._week.doy}function bJe(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function CJe(t){var e=NC(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}es("d",0,"do","day");es("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});es("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});es("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});es("e",0,0,"weekday");es("E",0,0,"isoWeekday");Si("d",rl);Si("e",rl);Si("E",rl);Si("dd",function(t,e){return e.weekdaysMinRegex(t)});Si("ddd",function(t,e){return e.weekdaysShortRegex(t)});Si("dddd",function(t,e){return e.weekdaysRegex(t)});eE(["dd","ddd","dddd"],function(t,e,r,n){var i=r._locale.weekdaysParse(t,n,r._strict);i!=null?e.d=i:Gs(r).invalidWeekday=t});eE(["d","e","E"],function(t,e,r,n){e[n]=fo(t)});function SJe(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function EJe(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function qY(t,e){return t.slice(e,7).concat(t.slice(0,e))}var MJe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),uye="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),TJe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),IJe=QS,RJe=QS,LJe=QS;function kJe(t,e){var r=t0(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?qY(r,this._week.dow):t?r[t.day()]:r}function AJe(t){return t===!0?qY(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function PJe(t){return t===!0?qY(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function $Je(t,e,r){var n,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=xm([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return r?e==="dddd"?(i=ru.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=ru.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=ru.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=ru.call(this._weekdaysParse,o),i!==-1||(i=ru.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=ru.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=ru.call(this._shortWeekdaysParse,o),i!==-1||(i=ru.call(this._weekdaysParse,o),i!==-1)?i:(i=ru.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=ru.call(this._minWeekdaysParse,o),i!==-1||(i=ru.call(this._weekdaysParse,o),i!==-1)?i:(i=ru.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function OJe(t,e,r){var n,i,s;if(this._weekdaysParseExact)return $Je.call(this,t,e,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=xm([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),r&&e==="dddd"&&this._fullWeekdaysParse[n].test(t))return n;if(r&&e==="ddd"&&this._shortWeekdaysParse[n].test(t))return n;if(r&&e==="dd"&&this._minWeekdaysParse[n].test(t))return n;if(!r&&this._weekdaysParse[n].test(t))return n}}function NJe(t){if(!this.isValid())return t!=null?this:NaN;var e=$C(this,"Day");return t!=null?(t=SJe(t,this.localeData()),this.add(t-e,"d")):e}function DJe(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function FJe(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=EJe(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function zJe(t){return this._weekdaysParseExact?(Uo(this,"_weekdaysRegex")||WY.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Uo(this,"_weekdaysRegex")||(this._weekdaysRegex=IJe),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function BJe(t){return this._weekdaysParseExact?(Uo(this,"_weekdaysRegex")||WY.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Uo(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=RJe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function jJe(t){return this._weekdaysParseExact?(Uo(this,"_weekdaysRegex")||WY.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Uo(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=LJe),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function WY(){function t(d,f){return f.length-d.length}var e=[],r=[],n=[],i=[],s,o,a,l,u;for(s=0;s<7;s++)o=xm([2e3,1]).day(s),a=Vg(this.weekdaysMin(o,"")),l=Vg(this.weekdaysShort(o,"")),u=Vg(this.weekdays(o,"")),e.push(a),r.push(l),n.push(u),i.push(a),i.push(l),i.push(u);e.sort(t),r.sort(t),n.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ZY(){return this.hours()%12||12}function VJe(){return this.hours()||24}es("H",["HH",2],0,"hour");es("h",["hh",2],0,ZY);es("k",["kk",2],0,VJe);es("hmm",0,0,function(){return""+ZY.apply(this)+hm(this.minutes(),2)});es("hmmss",0,0,function(){return""+ZY.apply(this)+hm(this.minutes(),2)+hm(this.seconds(),2)});es("Hmm",0,0,function(){return""+this.hours()+hm(this.minutes(),2)});es("Hmmss",0,0,function(){return""+this.hours()+hm(this.minutes(),2)+hm(this.seconds(),2)});function cye(t,e){es(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}cye("a",!0);cye("A",!1);function hye(t,e){return e._meridiemParse}Si("a",hye);Si("A",hye);Si("H",rl,HY);Si("h",rl,s7);Si("k",rl,s7);Si("HH",rl,Bf);Si("hh",rl,Bf);Si("kk",rl,Bf);Si("hmm",Qge);Si("hmmss",eye);Si("Hmm",Qge);Si("Hmmss",eye);_a(["H","HH"],qu);_a(["k","kk"],function(t,e,r){var n=fo(t);e[qu]=n===24?0:n});_a(["a","A"],function(t,e,r){r._isPm=r._locale.isPM(t),r._meridiem=t});_a(["h","hh"],function(t,e,r){e[qu]=fo(t),Gs(r).bigHour=!0});_a("hmm",function(t,e,r){var n=t.length-2;e[qu]=fo(t.substr(0,n)),e[B1]=fo(t.substr(n)),Gs(r).bigHour=!0});_a("hmmss",function(t,e,r){var n=t.length-4,i=t.length-2;e[qu]=fo(t.substr(0,n)),e[B1]=fo(t.substr(n,2)),e[Fg]=fo(t.substr(i)),Gs(r).bigHour=!0});_a("Hmm",function(t,e,r){var n=t.length-2;e[qu]=fo(t.substr(0,n)),e[B1]=fo(t.substr(n))});_a("Hmmss",function(t,e,r){var n=t.length-4,i=t.length-2;e[qu]=fo(t.substr(0,n)),e[B1]=fo(t.substr(n,2)),e[Fg]=fo(t.substr(i))});function UJe(t){return(t+"").toLowerCase().charAt(0)==="p"}var HJe=/[ap]\.?m?\.?/i,GJe=o7("Hours",!0);function qJe(t,e,r){return t>11?r?"pm":"PM":r?"am":"AM"}var dye={calendar:$Xe,longDateFormat:FXe,invalidDate:BXe,ordinal:VXe,dayOfMonthOrdinalParse:UXe,relativeTime:GXe,months:aJe,monthsShort:nye,week:_Je,weekdays:MJe,weekdaysMin:TJe,weekdaysShort:uye,meridiemParse:HJe},pl={},q8={},DC;function WJe(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r0;){if(i=Q$(s.slice(0,r).join("-")),i)return i;if(n&&n.length>=r&&WJe(s,n)>=r-1)break;r--}e++}return DC}function YJe(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Q$(t){var e=null,r;if(pl[t]===void 0&&typeof module<"u"&&module&&module.exports&&YJe(t))try{e=DC._abbr,r=require,r("./locale/"+t),m2(e)}catch{pl[t]=null}return pl[t]}function m2(t,e){var r;return t&&(kd(e)?r=py(t):r=YY(t,e),r?DC=r:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),DC._abbr}function YY(t,e){if(e!==null){var r,n=dye;if(e.abbr=t,pl[t]!=null)Yge("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=pl[t]._config;else if(e.parentLocale!=null)if(pl[e.parentLocale]!=null)n=pl[e.parentLocale]._config;else if(r=Q$(e.parentLocale),r!=null)n=r._config;else return q8[e.parentLocale]||(q8[e.parentLocale]=[]),q8[e.parentLocale].push({name:t,config:e}),null;return pl[t]=new zY(jV(n,e)),q8[t]&&q8[t].forEach(function(i){YY(i.name,i.config)}),m2(t),pl[t]}else return delete pl[t],null}function XJe(t,e){if(e!=null){var r,n,i=dye;pl[t]!=null&&pl[t].parentLocale!=null?pl[t].set(jV(pl[t]._config,e)):(n=Q$(t),n!=null&&(i=n._config),e=jV(i,e),n==null&&(e.abbr=t),r=new zY(e),r.parentLocale=pl[t],pl[t]=r),m2(t)}else pl[t]!=null&&(pl[t].parentLocale!=null?(pl[t]=pl[t].parentLocale,t===m2()&&m2(t)):pl[t]!=null&&delete pl[t]);return pl[t]}function py(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return DC;if(!t0(t)){if(e=Q$(t),e)return e;t=[t]}return ZJe(t)}function JJe(){return VV(pl)}function XY(t){var e,r=t._a;return r&&Gs(t).overflow===-2&&(e=r[Dg]<0||r[Dg]>11?Dg:r[X0]<1||r[X0]>GY(r[kh],r[Dg])?X0:r[qu]<0||r[qu]>24||r[qu]===24&&(r[B1]!==0||r[Fg]!==0||r[Z3]!==0)?qu:r[B1]<0||r[B1]>59?B1:r[Fg]<0||r[Fg]>59?Fg:r[Z3]<0||r[Z3]>999?Z3:-1,Gs(t)._overflowDayOfYear&&(eX0)&&(e=X0),Gs(t)._overflowWeeks&&e===-1&&(e=tJe),Gs(t)._overflowWeekday&&e===-1&&(e=rJe),Gs(t).overflow=e),t}var KJe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QJe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,eKe=/Z|[+-]\d\d(?::?\d\d)?/,HT=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],LF=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],tKe=/^\/?Date\((-?\d+)/i,rKe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,nKe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fye(t){var e,r,n=t._i,i=KJe.exec(n)||QJe.exec(n),s,o,a,l,u=HT.length,d=LF.length;if(i){for(Gs(t).iso=!0,e=0,r=u;ek6(o)||t._dayOfYear===0)&&(Gs(t)._overflowDayOfYear=!0),r=OC(o,0,t._dayOfYear),t._a[Dg]=r.getUTCMonth(),t._a[X0]=r.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=n[e]=i[e];for(;e<7;e++)t._a[e]=n[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[qu]===24&&t._a[B1]===0&&t._a[Fg]===0&&t._a[Z3]===0&&(t._nextDay=!0,t._a[qu]=0),t._d=(t._useUTC?OC:yJe).apply(null,n),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[qu]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(Gs(t).weekdayMismatch=!0)}}function hKe(t){var e,r,n,i,s,o,a,l,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,r=Mx(e.GG,t._a[kh],NC(el(),1,4).year),n=Mx(e.W,1),i=Mx(e.E,1),(i<1||i>7)&&(l=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=NC(el(),s,o),r=Mx(e.gg,t._a[kh],u.year),n=Mx(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(l=!0)):i=s),n<1||n>Ug(r,s,o)?Gs(t)._overflowWeeks=!0:l!=null?Gs(t)._overflowWeekday=!0:(a=lye(r,n,i,s,o),t._a[kh]=a.year,t._dayOfYear=a.dayOfYear)}ri.ISO_8601=function(){};ri.RFC_2822=function(){};function KY(t){if(t._f===ri.ISO_8601){fye(t);return}if(t._f===ri.RFC_2822){pye(t);return}t._a=[],Gs(t).empty=!0;var e=""+t._i,r,n,i,s,o,a=e.length,l=0,u,d;for(i=Xge(t._f,t._locale).match(BY)||[],d=i.length,r=0;r0&&Gs(t).unusedInput.push(o),e=e.slice(e.indexOf(n)+n.length),l+=n.length),F4[s]?(n?Gs(t).empty=!1:Gs(t).unusedTokens.push(s),eJe(s,n,t)):t._strict&&!n&&Gs(t).unusedTokens.push(s);Gs(t).charsLeftOver=a-l,e.length>0&&Gs(t).unusedInput.push(e),t._a[qu]<=12&&Gs(t).bigHour===!0&&t._a[qu]>0&&(Gs(t).bigHour=void 0),Gs(t).parsedDateParts=t._a.slice(0),Gs(t).meridiem=t._meridiem,t._a[qu]=dKe(t._locale,t._a[qu],t._meridiem),u=Gs(t).era,u!==null&&(t._a[kh]=t._locale.erasConvertYear(u,t._a[kh])),JY(t),XY(t)}function dKe(t,e,r){var n;return r==null?e:t.meridiemHour!=null?t.meridiemHour(e,r):(t.isPM!=null&&(n=t.isPM(r),n&&e<12&&(e+=12),!n&&e===12&&(e=0)),e)}function fKe(t){var e,r,n,i,s,o,a=!1,l=t._f.length;if(l===0){Gs(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;ithis?this:t:q$()});function yye(t,e){var r,n;if(e.length===1&&t0(e[0])&&(e=e[0]),!e.length)return el();for(r=e[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $Ke(){if(!kd(this._isDSTShifted))return this._isDSTShifted;var t={},e;return FY(t,this),t=mye(t),t._a?(e=t._isUTC?xm(t._a):el(t._a),this._isDSTShifted=this.isValid()&&EKe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function OKe(){return this.isValid()?!this._isUTC:!1}function NKe(){return this.isValid()?this._isUTC:!1}function _ye(){return this.isValid()?this._isUTC&&this._offset===0:!1}var DKe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,FKe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function s0(t,e){var r=t,n=null,i,s,o;return eL(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:oy(t)||!isNaN(+t)?(r={},e?r[e]=+t:r.milliseconds=+t):(n=DKe.exec(t))?(i=n[1]==="-"?-1:1,r={y:0,d:fo(n[X0])*i,h:fo(n[qu])*i,m:fo(n[B1])*i,s:fo(n[Fg])*i,ms:fo(HV(n[Z3]*1e3))*i}):(n=FKe.exec(t))?(i=n[1]==="-"?-1:1,r={y:Q_(n[2],i),M:Q_(n[3],i),w:Q_(n[4],i),d:Q_(n[5],i),h:Q_(n[6],i),m:Q_(n[7],i),s:Q_(n[8],i)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=zKe(el(r.from),el(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),s=new eO(r),eL(t)&&Uo(t,"_locale")&&(s._locale=t._locale),eL(t)&&Uo(t,"_isValid")&&(s._isValid=t._isValid),s}s0.fn=eO.prototype;s0.invalid=SKe;function Q_(t,e){var r=t&&parseFloat(t.replace(",","."));return(isNaN(r)?0:r)*e}function Ure(t,e){var r={};return r.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(r.months,"M").isAfter(e)&&--r.months,r.milliseconds=+e-+t.clone().add(r.months,"M"),r}function zKe(t,e){var r;return t.isValid()&&e.isValid()?(e=eX(e,t),t.isBefore(e)?r=Ure(t,e):(r=Ure(e,t),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function xye(t,e){return function(r,n){var i,s;return n!==null&&!isNaN(+n)&&(Yge(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=n,n=s),i=s0(r,n),wye(this,i,t),this}}function wye(t,e,r,n){var i=e._milliseconds,s=HV(e._days),o=HV(e._months);t.isValid()&&(n=n??!0,o&&sye(t,$C(t,"Month")+o*r),s&&rye(t,"Date",$C(t,"Date")+s*r),i&&t._d.setTime(t._d.valueOf()+i*r),n&&ri.updateOffset(t,s||o))}var BKe=xye(1,"add"),jKe=xye(-1,"subtract");function bye(t){return typeof t=="string"||t instanceof String}function VKe(t){return r0(t)||JS(t)||bye(t)||oy(t)||HKe(t)||UKe(t)||t===null||t===void 0}function UKe(t){var e=i5(t)&&!NY(t),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=n.length;for(i=0;ir.valueOf():r.valueOf()9999?QR(r,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):wm(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",QR(r,"Z")):QR(r,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function iQe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",r,n,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),r="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(r+n+i+s)}function sQe(t){t||(t=this.isUtc()?ri.defaultFormatUtc:ri.defaultFormat);var e=QR(this,t);return this.localeData().postformat(e)}function oQe(t,e){return this.isValid()&&(r0(t)&&t.isValid()||el(t).isValid())?s0({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function aQe(t){return this.from(el(),t)}function lQe(t,e){return this.isValid()&&(r0(t)&&t.isValid()||el(t).isValid())?s0({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function uQe(t){return this.to(el(),t)}function Cye(t){var e;return t===void 0?this._locale._abbr:(e=py(t),e!=null&&(this._locale=e),this)}var Sye=Gp("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function Eye(){return this._locale}var kA=1e3,z4=60*kA,AA=60*z4,Mye=(365*400+97)*24*AA;function B4(t,e){return(t%e+e)%e}function Tye(t,e,r){return t<100&&t>=0?new Date(t+400,e,r)-Mye:new Date(t,e,r).valueOf()}function Iye(t,e,r){return t<100&&t>=0?Date.UTC(t+400,e,r)-Mye:Date.UTC(t,e,r)}function cQe(t){var e,r;if(t=qp(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Iye:Tye,t){case"year":e=r(this.year(),0,1);break;case"quarter":e=r(this.year(),this.month()-this.month()%3,1);break;case"month":e=r(this.year(),this.month(),1);break;case"week":e=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=r(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=B4(e+(this._isUTC?0:this.utcOffset()*z4),AA);break;case"minute":e=this._d.valueOf(),e-=B4(e,z4);break;case"second":e=this._d.valueOf(),e-=B4(e,kA);break}return this._d.setTime(e),ri.updateOffset(this,!0),this}function hQe(t){var e,r;if(t=qp(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Iye:Tye,t){case"year":e=r(this.year()+1,0,1)-1;break;case"quarter":e=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=r(this.year(),this.month()+1,1)-1;break;case"week":e=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=AA-B4(e+(this._isUTC?0:this.utcOffset()*z4),AA)-1;break;case"minute":e=this._d.valueOf(),e+=z4-B4(e,z4)-1;break;case"second":e=this._d.valueOf(),e+=kA-B4(e,kA)-1;break}return this._d.setTime(e),ri.updateOffset(this,!0),this}function dQe(){return this._d.valueOf()-(this._offset||0)*6e4}function fQe(){return Math.floor(this.valueOf()/1e3)}function pQe(){return new Date(this.valueOf())}function mQe(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function gQe(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function yQe(){return this.isValid()?this.toISOString():null}function vQe(){return DY(this)}function _Qe(){return Wv({},Gs(this))}function xQe(){return Gs(this).overflow}function wQe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}es("N",0,0,"eraAbbr");es("NN",0,0,"eraAbbr");es("NNN",0,0,"eraAbbr");es("NNNN",0,0,"eraName");es("NNNNN",0,0,"eraNarrow");es("y",["y",1],"yo","eraYear");es("y",["yy",2],0,"eraYear");es("y",["yyy",3],0,"eraYear");es("y",["yyyy",4],0,"eraYear");Si("N",tX);Si("NN",tX);Si("NNN",tX);Si("NNNN",AQe);Si("NNNNN",PQe);_a(["N","NN","NNN","NNNN","NNNNN"],function(t,e,r,n){var i=r._locale.erasParse(t,n,r._strict);i?Gs(r).era=i:Gs(r).invalidEra=t});Si("y",i7);Si("yy",i7);Si("yyy",i7);Si("yyyy",i7);Si("yo",$Qe);_a(["y","yy","yyy","yyyy"],kh);_a(["yo"],function(t,e,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=t.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?e[kh]=r._locale.eraYearOrdinalParse(t,i):e[kh]=parseInt(t,10)});function bQe(t,e){var r,n,i,s=this._eras||py("en")._eras;for(r=0,n=s.length;r=0)return s[n]}function SQe(t,e){var r=t.since<=t.until?1:-1;return e===void 0?ri(t.since).year():ri(t.since).year()+(e-t.offset)*r}function EQe(){var t,e,r,n=this.localeData().eras();for(t=0,e=n.length;ts&&(e=s),jQe.call(this,t,e,r,n,i))}function jQe(t,e,r,n,i){var s=lye(t,e,r,n,i),o=OC(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}es("Q",0,"Qo","quarter");Si("Q",Jge);_a("Q",function(t,e){e[Dg]=(fo(t)-1)*3});function VQe(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}es("D",["DD",2],"Do","date");Si("D",rl,s7);Si("DD",rl,Bf);Si("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});_a(["D","DD"],X0);_a("Do",function(t,e){e[X0]=fo(t.match(rl)[0])});var Lye=o7("Date",!0);es("DDD",["DDDD",3],"DDDo","dayOfYear");Si("DDD",Z$);Si("DDDD",Kge);_a(["DDD","DDDD"],function(t,e,r){r._dayOfYear=fo(t)});function UQe(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}es("m",["mm",2],0,"minute");Si("m",rl,HY);Si("mm",rl,Bf);_a(["m","mm"],B1);var HQe=o7("Minutes",!1);es("s",["ss",2],0,"second");Si("s",rl,HY);Si("ss",rl,Bf);_a(["s","ss"],Fg);var GQe=o7("Seconds",!1);es("S",0,0,function(){return~~(this.millisecond()/100)});es(0,["SS",2],0,function(){return~~(this.millisecond()/10)});es(0,["SSS",3],0,"millisecond");es(0,["SSSS",4],0,function(){return this.millisecond()*10});es(0,["SSSSS",5],0,function(){return this.millisecond()*100});es(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});es(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});es(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});es(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Si("S",Z$,Jge);Si("SS",Z$,Bf);Si("SSS",Z$,Kge);var Zv,kye;for(Zv="SSSS";Zv.length<=9;Zv+="S")Si(Zv,i7);function qQe(t,e){e[Z3]=fo(("0."+t)*1e3)}for(Zv="S";Zv.length<=9;Zv+="S")_a(Zv,qQe);kye=o7("Milliseconds",!1);es("z",0,0,"zoneAbbr");es("zz",0,0,"zoneName");function WQe(){return this._isUTC?"UTC":""}function ZQe(){return this._isUTC?"Coordinated Universal Time":""}var Cn=KS.prototype;Cn.add=BKe;Cn.calendar=WKe;Cn.clone=ZKe;Cn.diff=tQe;Cn.endOf=hQe;Cn.format=sQe;Cn.from=oQe;Cn.fromNow=aQe;Cn.to=lQe;Cn.toNow=uQe;Cn.get=iJe;Cn.invalidAt=xQe;Cn.isAfter=YKe;Cn.isBefore=XKe;Cn.isBetween=JKe;Cn.isSame=KKe;Cn.isSameOrAfter=QKe;Cn.isSameOrBefore=eQe;Cn.isValid=vQe;Cn.lang=Sye;Cn.locale=Cye;Cn.localeData=Eye;Cn.max=vKe;Cn.min=yKe;Cn.parsingFlags=_Qe;Cn.set=sJe;Cn.startOf=cQe;Cn.subtract=jKe;Cn.toArray=mQe;Cn.toObject=gQe;Cn.toDate=pQe;Cn.toISOString=nQe;Cn.inspect=iQe;typeof Symbol<"u"&&Symbol.for!=null&&(Cn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Cn.toJSON=yQe;Cn.toString=rQe;Cn.unix=fQe;Cn.valueOf=dQe;Cn.creationData=wQe;Cn.eraName=EQe;Cn.eraNarrow=MQe;Cn.eraAbbr=TQe;Cn.eraYear=IQe;Cn.year=tye;Cn.isLeapYear=nJe;Cn.weekYear=OQe;Cn.isoWeekYear=NQe;Cn.quarter=Cn.quarters=VQe;Cn.month=oye;Cn.daysInMonth=pJe;Cn.week=Cn.weeks=bJe;Cn.isoWeek=Cn.isoWeeks=CJe;Cn.weeksInYear=zQe;Cn.weeksInWeekYear=BQe;Cn.isoWeeksInYear=DQe;Cn.isoWeeksInISOWeekYear=FQe;Cn.date=Lye;Cn.day=Cn.days=NJe;Cn.weekday=DJe;Cn.isoWeekday=FJe;Cn.dayOfYear=UQe;Cn.hour=Cn.hours=GJe;Cn.minute=Cn.minutes=HQe;Cn.second=Cn.seconds=GQe;Cn.millisecond=Cn.milliseconds=kye;Cn.utcOffset=TKe;Cn.utc=RKe;Cn.local=LKe;Cn.parseZone=kKe;Cn.hasAlignedHourOffset=AKe;Cn.isDST=PKe;Cn.isLocal=OKe;Cn.isUtcOffset=NKe;Cn.isUtc=_ye;Cn.isUTC=_ye;Cn.zoneAbbr=WQe;Cn.zoneName=ZQe;Cn.dates=Gp("dates accessor is deprecated. Use date instead.",Lye);Cn.months=Gp("months accessor is deprecated. Use month instead",oye);Cn.years=Gp("years accessor is deprecated. Use year instead",tye);Cn.zone=Gp("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",IKe);Cn.isDSTShifted=Gp("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",$Ke);function YQe(t){return el(t*1e3)}function XQe(){return el.apply(null,arguments).parseZone()}function Aye(t){return t}var Ho=zY.prototype;Ho.calendar=OXe;Ho.longDateFormat=zXe;Ho.invalidDate=jXe;Ho.ordinal=HXe;Ho.preparse=Aye;Ho.postformat=Aye;Ho.relativeTime=qXe;Ho.pastFuture=WXe;Ho.set=PXe;Ho.eras=bQe;Ho.erasParse=CQe;Ho.erasConvertYear=SQe;Ho.erasAbbrRegex=LQe;Ho.erasNameRegex=RQe;Ho.erasNarrowRegex=kQe;Ho.months=cJe;Ho.monthsShort=hJe;Ho.monthsParse=fJe;Ho.monthsRegex=gJe;Ho.monthsShortRegex=mJe;Ho.week=vJe;Ho.firstDayOfYear=wJe;Ho.firstDayOfWeek=xJe;Ho.weekdays=kJe;Ho.weekdaysMin=PJe;Ho.weekdaysShort=AJe;Ho.weekdaysParse=OJe;Ho.weekdaysRegex=zJe;Ho.weekdaysShortRegex=BJe;Ho.weekdaysMinRegex=jJe;Ho.isPM=UJe;Ho.meridiem=qJe;function PA(t,e,r,n){var i=py(),s=xm().set(n,e);return i[r](s,t)}function Pye(t,e,r){if(oy(t)&&(e=t,t=void 0),t=t||"",e!=null)return PA(t,e,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=PA(t,n,r,"month");return i}function nX(t,e,r,n){typeof t=="boolean"?(oy(e)&&(r=e,e=void 0),e=e||""):(e=t,r=e,t=!1,oy(e)&&(r=e,e=void 0),e=e||"");var i=py(),s=t?i._week.dow:0,o,a=[];if(r!=null)return PA(e,(r+s)%7,n,"day");for(o=0;o<7;o++)a[o]=PA(e,(o+s)%7,n,"day");return a}function JQe(t,e){return Pye(t,e,"months")}function KQe(t,e){return Pye(t,e,"monthsShort")}function QQe(t,e,r){return nX(t,e,r,"weekdays")}function eet(t,e,r){return nX(t,e,r,"weekdaysShort")}function tet(t,e,r){return nX(t,e,r,"weekdaysMin")}m2("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,r=fo(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+r}});ri.lang=Gp("moment.lang is deprecated. Use moment.locale instead.",m2);ri.langData=Gp("moment.langData is deprecated. Use moment.localeData instead.",py);var Jm=Math.abs;function ret(){var t=this._data;return this._milliseconds=Jm(this._milliseconds),this._days=Jm(this._days),this._months=Jm(this._months),t.milliseconds=Jm(t.milliseconds),t.seconds=Jm(t.seconds),t.minutes=Jm(t.minutes),t.hours=Jm(t.hours),t.months=Jm(t.months),t.years=Jm(t.years),this}function $ye(t,e,r,n){var i=s0(e,r);return t._milliseconds+=n*i._milliseconds,t._days+=n*i._days,t._months+=n*i._months,t._bubble()}function net(t,e){return $ye(this,t,e,1)}function iet(t,e){return $ye(this,t,e,-1)}function Hre(t){return t<0?Math.floor(t):Math.ceil(t)}function set(){var t=this._milliseconds,e=this._days,r=this._months,n=this._data,i,s,o,a,l;return t>=0&&e>=0&&r>=0||t<=0&&e<=0&&r<=0||(t+=Hre(qV(r)+e)*864e5,e=0,r=0),n.milliseconds=t%1e3,i=xp(t/1e3),n.seconds=i%60,s=xp(i/60),n.minutes=s%60,o=xp(s/60),n.hours=o%24,e+=xp(o/24),l=xp(Oye(e)),r+=l,e-=Hre(qV(l)),a=xp(r/12),r%=12,n.days=e,n.months=r,n.years=a,this}function Oye(t){return t*4800/146097}function qV(t){return t*146097/4800}function oet(t){if(!this.isValid())return NaN;var e,r,n=this._milliseconds;if(t=qp(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+n/864e5,r=this._months+Oye(e),t){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(e=this._days+Math.round(qV(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return e*24+n/36e5;case"minute":return e*1440+n/6e4;case"second":return e*86400+n/1e3;case"millisecond":return Math.floor(e*864e5)+n;default:throw new Error("Unknown unit "+t)}}function my(t){return function(){return this.as(t)}}var Nye=my("ms"),aet=my("s"),uet=my("m"),cet=my("h"),het=my("d"),det=my("w"),fet=my("M"),pet=my("Q"),met=my("y"),get=Nye;function yet(){return s0(this)}function vet(t){return t=qp(t),this.isValid()?this[t+"s"]():NaN}function q5(t){return function(){return this.isValid()?this._data[t]:NaN}}var _et=q5("milliseconds"),xet=q5("seconds"),wet=q5("minutes"),bet=q5("hours"),Cet=q5("days"),Eet=q5("months"),Met=q5("years");function Tet(){return xp(this.days()/7)}var Tg=Math.round,p4={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Iet(t,e,r,n,i){return i.relativeTime(e||1,!!r,t,n)}function Ret(t,e,r,n){var i=s0(t).abs(),s=Tg(i.as("s")),o=Tg(i.as("m")),a=Tg(i.as("h")),l=Tg(i.as("d")),u=Tg(i.as("M")),d=Tg(i.as("w")),f=Tg(i.as("y")),m=s<=r.ss&&["s",s]||s0,m[4]=n,Iet.apply(null,m)}function Let(t){return t===void 0?Tg:typeof t=="function"?(Tg=t,!0):!1}function ket(t,e){return p4[t]===void 0?!1:e===void 0?p4[t]:(p4[t]=e,t==="s"&&(p4.ss=e-1),!0)}function Aet(t,e){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=p4,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(r=t),typeof e=="object"&&(n=Object.assign({},p4,e),e.s!=null&&e.ss==null&&(n.ss=e.s-1)),i=this.localeData(),s=Ret(this,!r,n,i),r&&(s=i.pastFuture(+this,s)),i.postformat(s)}var kF=Math.abs;function Z9(t){return(t>0)-(t<0)||+t}function rO(){if(!this.isValid())return this.localeData().invalidDate();var t=kF(this._milliseconds)/1e3,e=kF(this._days),r=kF(this._months),n,i,s,o,a=this.asSeconds(),l,u,d,f;return a?(n=xp(t/60),i=xp(n/60),t%=60,n%=60,s=xp(r/12),r%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=Z9(this._months)!==Z9(a)?"-":"",d=Z9(this._days)!==Z9(a)?"-":"",f=Z9(this._milliseconds)!==Z9(a)?"-":"",l+"P"+(s?u+s+"Y":"")+(r?u+r+"M":"")+(e?d+e+"D":"")+(i||n||t?"T":"")+(i?f+i+"H":"")+(n?f+n+"M":"")+(t?f+o+"S":"")):"P0D"}var Eo=eO.prototype;Eo.isValid=CKe;Eo.abs=ret;Eo.add=net;Eo.subtract=iet;Eo.as=oet;Eo.asMilliseconds=Nye;Eo.asSeconds=aet;Eo.asMinutes=uet;Eo.asHours=cet;Eo.asDays=het;Eo.asWeeks=det;Eo.asMonths=fet;Eo.asQuarters=pet;Eo.asYears=met;Eo.valueOf=get;Eo._bubble=set;Eo.clone=yet;Eo.get=vet;Eo.milliseconds=_et;Eo.seconds=xet;Eo.minutes=wet;Eo.hours=bet;Eo.days=Cet;Eo.weeks=Tet;Eo.months=Eet;Eo.years=Met;Eo.humanize=Aet;Eo.toISOString=rO;Eo.toString=rO;Eo.toJSON=rO;Eo.locale=Cye;Eo.localeData=Eye;Eo.toIsoString=Gp("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rO);Eo.lang=Sye;es("X",0,0,"unix");es("x",0,0,"valueOf");Si("x",X$);Si("X",JXe);_a("X",function(t,e,r){r._d=new Date(parseFloat(t)*1e3)});_a("x",function(t,e,r){r._d=new Date(fo(t))});//! moment.js +ri.version="2.30.1";kXe(el);ri.fn=Cn;ri.min=_Ke;ri.max=xKe;ri.now=wKe;ri.utc=xm;ri.unix=YQe;ri.months=JQe;ri.isDate=JS;ri.locale=m2;ri.invalid=q$;ri.duration=s0;ri.isMoment=r0;ri.weekdays=QQe;ri.parseZone=XQe;ri.localeData=py;ri.isDuration=eL;ri.monthsShort=KQe;ri.weekdaysMin=tet;ri.defineLocale=YY;ri.updateLocale=XJe;ri.locales=JJe;ri.weekdaysShort=eet;ri.normalizeUnits=qp;ri.relativeTimeRounding=Let;ri.relativeTimeThreshold=ket;ri.calendarFormat=qKe;ri.prototype=Cn;ri.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};let AF="https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/BaseUnitFeatures/FeatureServer/";const Hi={address:{name:"addresses",singular:"address",label:"Address Point",endpoint:AF+"0",id_column:"address_id",click:"id",interaction:"address-point",highlight:"address-highlight",link:"address-linked",filter_id:"$id",color:"rgb(170, 200, 221)",bg_color:"rgba(170, 200, 221, 1)"},building:{name:"buildings",singular:"building",label:"Building",endpoint:AF+"2",id_column:"building_id",interaction:"building-fill",click:"building_id",color:"rgb(203, 77, 79)",bg_color:"rgba(203, 77, 79, 0.66)",filter_id:"$id",highlight:"building-highlight",link:"building-linked"},parcel:{name:"parcels",singular:"parcel",label:"Parcel",layer_id:"Parcels (Current)",label_column:"address",icon:kge,endpoint:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/parcel_file_current/FeatureServer/0/",id_column:"parcel_id",interaction:"parcel-fill",click:"parcel_id",color:"rgb(163, 200, 112)",bg_color:"rgba(163, 200, 112, 0.75)",highlight:"parcel-highlight",link:"parcel-linked"},street:{name:"streets",singular:"street",label:"Street",endpoint:AF+"1",id_column:"street_id",interaction:"streets-line",click:"street_id",highlight:"streets-highlight",link:"streets-linked",filter_id:"$id",color:"rgb(148, 70, 109)",bg_color:"rgba(148, 70, 109, 1)"}};var $A={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */$A.exports;(function(t,e){(function(){var r,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",f=1,m=2,v=4,b=1,M=2,O=1,I=2,A=4,j=8,H=16,W=32,re=64,K=128,pe=256,ge=512,fe=30,ee="...",be=800,le=16,ve=1,Pe=2,Fe=3,We=1/0,He=9007199254740991,Lt=17976931348623157e292,lt=NaN,pt=4294967295,rr=pt-1,Tt=pt>>>1,Je=[["ary",K],["bind",O],["bindKey",I],["curry",j],["curryRight",H],["flip",ge],["partial",W],["partialRight",re],["rearg",pe]],pr="[object Arguments]",Ut="[object Array]",tr="[object AsyncFunction]",Se="[object Boolean]",je="[object Date]",et="[object DOMException]",yt="[object Error]",we="[object Function]",ft="[object GeneratorFunction]",qt="[object Map]",_r="[object Number]",rt="[object Null]",Xe="[object Object]",Ze="[object Promise]",it="[object Proxy]",Xt="[object RegExp]",xr="[object Set]",Ur="[object String]",In="[object Symbol]",Rr="[object Undefined]",mn="[object WeakMap]",Kr="[object WeakSet]",Ft="[object ArrayBuffer]",xt="[object DataView]",vr="[object Float32Array]",Mr="[object Float64Array]",ar="[object Int8Array]",ni="[object Int16Array]",or="[object Int32Array]",vt="[object Uint8Array]",ot="[object Uint8ClampedArray]",lr="[object Uint16Array]",br="[object Uint32Array]",Tr=/\b__p \+= '';/g,Zn=/\b(__p \+=) '' \+/g,Gi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zn=/&(?:amp|lt|gt|quot|#39);/g,pi=/[&<>"']/g,nt=RegExp(zn.source),Me=RegExp(pi.source),Ie=/<%-([\s\S]+?)%>/g,Be=/<%([\s\S]+?)%>/g,ze=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Yt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wt=/[\\^$.*+?()[\]{}|]/g,ur=RegExp(wt.source),me=/^\s+/,Ye=/\s/,$t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Nt=/\{\n\/\* \[wrapped with (.+)\] \*/,Jt=/,? & /,cr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Br=/[()=,{}\[\]\/\s]/,Lr=/\\(\\)?/g,hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mi=/\w*$/,sn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,si=/^\[object .+?Constructor\]$/,gn=/^0o[0-7]+$/i,_i=/^(?:0|[1-9]\d*)$/,Xi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vi=/($^)/,Ta=/['\n\r\u2028\u2029\\]/g,Oi="\\ud800-\\udfff",Jo="\\u0300-\\u036f",Go="\\ufe20-\\ufe2f",$n="\\u20d0-\\u20ff",wo=Jo+Go+$n,aa="\\u2700-\\u27bf",As="a-z\\xdf-\\xf6\\xf8-\\xff",Xs="\\xac\\xb1\\xd7\\xf7",yl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ko="\\u2000-\\u206f",Zs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qo="A-Z\\xc0-\\xd6\\xd8-\\xde",nl="\\ufe0e\\ufe0f",bo=Xs+yl+Ko+Zs,mt="['’]",dr="["+Oi+"]",Or="["+bo+"]",Xn="["+wo+"]",Us="\\d+",Js="["+aa+"]",co="["+As+"]",il="[^"+Oi+bo+Us+aa+As+Qo+"]",ps="\\ud83c[\\udffb-\\udfff]",Y="(?:"+Xn+"|"+ps+")",ae="[^"+Oi+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",ut="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="["+Qo+"]",Dt="\\u200d",Zt="(?:"+co+"|"+il+")",Nr="(?:"+kt+"|"+il+")",Hr="(?:"+mt+"(?:d|ll|m|re|s|t|ve))?",Fr="(?:"+mt+"(?:D|LL|M|RE|S|T|VE))?",an=Y+"?",ln="["+nl+"]?",xi="(?:"+Dt+"(?:"+[ae,$e,ut].join("|")+")"+ln+an+")*",ms="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Gn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ys=ln+an+xi,kr="(?:"+[Js,$e,ut].join("|")+")"+ys,Un="(?:"+[ae+Xn+"?",Xn,$e,ut,dr].join("|")+")",Ss=RegExp(mt,"g"),go=RegExp(Xn,"g"),Ks=RegExp(ps+"(?="+ps+")|"+Un+ys,"g"),Wc=RegExp([kt+"?"+co+"+"+Hr+"(?="+[Or,kt,"$"].join("|")+")",Nr+"+"+Fr+"(?="+[Or,kt+Zt,"$"].join("|")+")",kt+"?"+Zt+"+"+Hr,kt+"+"+Fr,Gn,ms,Us,kr].join("|"),"g"),Ps=RegExp("["+Dt+Oi+wo+nl+"]"),_s=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],wd=-1,gs={};gs[vr]=gs[Mr]=gs[ar]=gs[ni]=gs[or]=gs[vt]=gs[ot]=gs[lr]=gs[br]=!0,gs[pr]=gs[Ut]=gs[Ft]=gs[Se]=gs[xt]=gs[je]=gs[yt]=gs[we]=gs[qt]=gs[_r]=gs[Xe]=gs[Xt]=gs[xr]=gs[Ur]=gs[mn]=!1;var Hs={};Hs[pr]=Hs[Ut]=Hs[Ft]=Hs[xt]=Hs[Se]=Hs[je]=Hs[vr]=Hs[Mr]=Hs[ar]=Hs[ni]=Hs[or]=Hs[qt]=Hs[_r]=Hs[Xe]=Hs[Xt]=Hs[xr]=Hs[Ur]=Hs[In]=Hs[vt]=Hs[ot]=Hs[lr]=Hs[br]=!0,Hs[yt]=Hs[we]=Hs[mn]=!1;var fa={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_c={"&":"&","<":"<",">":">",'"':""","'":"'"},xc={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bh={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nl=parseFloat,Zp=parseInt,wc=typeof Oc=="object"&&Oc&&Oc.Object===Object&&Oc,ne=typeof self=="object"&&self&&self.Object===Object&&self,Te=wc||ne||Function("return this")(),ke=e&&!e.nodeType&&e,Ve=ke&&!0&&t&&!t.nodeType&&t,Et=Ve&&Ve.exports===ke,at=Et&&wc.process,Mt=function(){try{var g=Ve&&Ve.require&&Ve.require("util").types;return g||at&&at.binding&&at.binding("util")}catch{}}(),mr=Mt&&Mt.isArrayBuffer,yr=Mt&&Mt.isDate,wr=Mt&&Mt.isMap,Gr=Mt&&Mt.isRegExp,Xr=Mt&&Mt.isSet,on=Mt&&Mt.isTypedArray;function Er(g,_,w){switch(w.length){case 0:return g.call(_);case 1:return g.call(_,w[0]);case 2:return g.call(_,w[0],w[1]);case 3:return g.call(_,w[0],w[1],w[2])}return g.apply(_,w)}function tn(g,_,w,k){for(var G=-1,te=g==null?0:g.length;++G-1}function Wr(g,_,w){for(var k=-1,G=g==null?0:g.length;++k-1;);return w}function Yu(g,_){for(var w=g.length;w--&&cs(_,g[w],0)>-1;);return w}function jh(g,_){for(var w=g.length,k=0;w--;)g[w]===_&&++k;return k}var vl=jn(fa),sl=jn(_c);function _l(g){return"\\"+Bh[g]}function Gl(g,_){return g==null?r:g[_]}function Xu(g){return Ps.test(g)}function Lu(g){return _s.test(g)}function ta(g){for(var _,w=[];!(_=g.next()).done;)w.push(_.value);return w}function uu(g){var _=-1,w=Array(g.size);return g.forEach(function(k,G){w[++_]=[G,k]}),w}function cu(g,_){return function(w){return g(_(w))}}function pa(g,_){for(var w=-1,k=g.length,G=0,te=[];++w-1}function Lm(S,N){var Z=this.__data__,ce=tt(Z,S);return ce<0?(++this.size,Z.push([S,N])):Z[ce][1]=N,this}Qu.prototype.clear=by,Qu.prototype.delete=Cy,Qu.prototype.get=u9,Qu.prototype.has=Rm,Qu.prototype.set=Lm;function zl(S){var N=-1,Z=S==null?0:S.length;for(this.clear();++N=N?S:N)),S}function Wt(S,N,Z,ce,Le,Ke){var Rt,Gt=N&f,nr=N&m,Dr=N&v;if(Z&&(Rt=Le?Z(S,ce,Le,Ke):Z(S)),Rt!==r)return Rt;if(!ba(S))return S;var zr=os(S);if(zr){if(Rt=tM(S),!Gt)return Mc(S,Rt)}else{var en=mu(S),Jn=en==we||en==ft;if(c1(S))return GE(S,Gt);if(en==Xe||en==pr||Jn&&!Le){if(Rt=nr||Jn?{}:rM(S),!Gt)return nr?_9(S,St(Rt,S)):nN(S,bt(Rt,S))}else{if(!Hs[en])return Le?S:{};Rt=lN(S,en,Gt)}}Ke||(Ke=new x);var Fi=Ke.get(S);if(Fi)return Fi;Ke.set(S,Rt),$(S)?S.forEach(function(ls){Rt.add(Wt(ls,N,Z,ls,S,Ke))}):D9(S)&&S.forEach(function(ls,oo){Rt.set(oo,Wt(ls,N,Z,oo,S,Ke))});var as=Dr?nr?B7:y0:nr?yo:Bs,Ys=zr?r:as(S);return Jr(Ys||S,function(ls,oo){Ys&&(oo=ls,ls=S[oo]),qe(Rt,oo,Wt(ls,N,Z,oo,S,Ke))}),Rt}function sr(S){var N=Bs(S);return function(Z){return $r(Z,S,N)}}function $r(S,N,Z){var ce=Z.length;if(S==null)return!ce;for(S=Ce(S);ce--;){var Le=Z[ce],Ke=N[Le],Rt=S[Le];if(Rt===r&&!(Le in S)||!Ke(Rt))return!1}return!0}function Qr(S,N,Z){if(typeof S!="function")throw new Vt(o);return Ay(function(){S.apply(r,Z)},N)}function yn(S,N,Z,ce){var Le=-1,Ke=Dn,Rt=!0,Gt=S.length,nr=[],Dr=N.length;if(!Gt)return nr;Z&&(N=Fn(N,is(Z))),ce?(Ke=Wr,Rt=!1):N.length>=i&&(Ke=Dl,Rt=!1,N=new tf(N));e:for(;++LeLe?0:Le+Z),ce=ce===r||ce>Le?Le:Ne(ce),ce<0&&(ce+=Le),ce=Z>ce?0:ht(ce);Z0&&Z(Gt)?N>1?nn(Gt,N-1,Z,ce,Le):An(Le,Gt):ce||(Le[Le.length]=Gt)}return Le}var Ui=O7(),qo=O7(!0);function qi(S,N){return S&&Ui(S,N,Bs)}function Cs(S,N){return S&&qo(S,N,Bs)}function Ro(S,N){return wi(N,function(Z){return nf(S[Z])})}function Ia(S,N){N=Yf(N,S);for(var Z=0,ce=N.length;S!=null&&ZN}function Au(S,N){return S!=null&&jr.call(S,N)}function du(S,N){return S!=null&&N in Ce(S)}function Pu(S,N,Z){return S>=Wl(N,Z)&&S=120&&zr.length>=120)?new tf(Rt&&zr):r}zr=S[0];var en=-1,Jn=Gt[0];e:for(;++en-1;)Gt!==S&&Va.call(Gt,nr,1),Va.call(S,nr,1);return S}function E_(S,N){for(var Z=S?N.length:0,ce=Z-1;Z--;){var Le=N[Z];if(Z==ce||Le!==Ke){var Ke=Le;l1(Le)?Va.call(S,Le,1):Ry(S,Le)}}return S}function d9(S,N){return S+qf(xy()*(N-S+1))}function BE(S,N,Z,ce){for(var Le=-1,Ke=ga(Xp((N-S)/(Z||1)),0),Rt=w(Ke);Ke--;)Rt[ce?Ke:++Le]=S,S+=Z;return Rt}function L7(S,N){var Z="";if(!S||N<1||N>He)return Z;do N%2&&(Z+=S),N=qf(N/2),N&&(S+=S);while(N);return Z}function zs(S,N){return Y7(S9(S,N,Md),S+"")}function M_(S){return de(hh(S))}function Iy(S,N){var Z=hh(S);return O_(Z,Ht(N,0,Z.length))}function Gh(S,N,Z,ce){if(!ba(S))return S;N=Yf(N,S);for(var Le=-1,Ke=N.length,Rt=Ke-1,Gt=S;Gt!=null&&++LeLe?0:Le+N),Z=Z>Le?Le:Z,Z<0&&(Z+=Le),Le=N>Z?0:Z-N>>>0,N>>>=0;for(var Ke=w(Le);++ce>>1,Rt=S[Ke];Rt!==null&&!U(Rt)&&(Z?Rt<=N:Rt=i){var Dr=N?null:P_(S);if(Dr)return eo(Dr);Rt=!1,Le=Dl,nr=new tf}else nr=N?[]:Gt;e:for(;++ce=ce?S:pu(S,N,Z)}var $m=m_||function(S){return Te.clearTimeout(S)};function GE(S,N){if(N)return S.slice();var Z=S.length,ce=ja?ja(Z):new S.constructor(Z);return S.copy(ce),ce}function Om(S){var N=new S.constructor(S.byteLength);return new Io(N).set(new Io(S)),N}function g9(S,N){var Z=N?Om(S.buffer):S.buffer;return new S.constructor(Z,S.byteOffset,S.byteLength)}function y9(S){var N=new S.constructor(S.source,mi.exec(S));return N.lastIndex=S.lastIndex,N}function qE(S){return Qp?Ce(Qp.call(S)):{}}function P7(S,N){var Z=N?Om(S.buffer):S.buffer;return new S.constructor(Z,S.byteOffset,S.length)}function WE(S,N){if(S!==N){var Z=S!==r,ce=S===null,Le=S===S,Ke=U(S),Rt=N!==r,Gt=N===null,nr=N===N,Dr=U(N);if(!Gt&&!Dr&&!Ke&&S>N||Ke&&Rt&&nr&&!Gt&&!Dr||ce&&Rt&&nr||!Z&&nr||!Le)return 1;if(!ce&&!Ke&&!Dr&&S=Gt)return nr;var Dr=Z[ce];return nr*(Dr=="desc"?-1:1)}}return S.index-N.index}function Nm(S,N,Z,ce){for(var Le=-1,Ke=S.length,Rt=Z.length,Gt=-1,nr=N.length,Dr=ga(Ke-Rt,0),zr=w(nr+Dr),en=!ce;++Gt1?Z[Le-1]:r,Rt=Le>2?Z[2]:r;for(Ke=S.length>3&&typeof Ke=="function"?(Le--,Ke):r,Rt&&ol(Z[0],Z[1],Rt)&&(Ke=Le<3?r:Ke,Le=1),N=Ce(N);++ce-1?Le[Ke?N[Rt]:Rt]:r}}function N7(S){return a1(function(N){var Z=N.length,ce=Z,Le=Jc.prototype.thru;for(S&&N.reverse();ce--;){var Ke=N[ce];if(typeof Ke!="function")throw new Vt(o);if(Le&&!Rt&&Bm(Ke)=="wrapper")var Rt=new Jc([],!0)}for(ce=Rt?ce:Z;++ce1&&vo.reverse(),zr&&nrGt))return!1;var Dr=Ke.get(S),zr=Ke.get(N);if(Dr&&zr)return Dr==N&&zr==S;var en=-1,Jn=!0,Fi=Z&M?new tf:r;for(Ke.set(S,N),Ke.set(N,S);++en1?"& ":"")+N[ce],N=N.join(Z>2?", ":" "),S.replace($t,`{ +/* [wrapped with `+N+`] */ +`)}function cN(S){return os(S)||qm(S)||!!(Jd&&S&&S[Jd])}function l1(S,N){var Z=typeof S;return N=N??He,!!N&&(Z=="number"||Z!="symbol"&&_i.test(S))&&S>-1&&S%1==0&&S0){if(++N>=be)return arguments[0]}else N=0;return S.apply(r,arguments)}}function O_(S,N){var Z=-1,ce=S.length,Le=ce-1;for(N=N===r?ce:N;++Z1?S[N-1]:r;return Z=typeof Z=="function"?(S.pop(),Z):r,z_(S,Z)});function T9(S){var N=Ge(S);return N.__chain__=!0,N}function DN(S,N){return N(S),S}function I9(S,N){return N(S)}var RM=a1(function(S){var N=S.length,Z=N?S[0]:0,ce=this.__wrapped__,Le=function(Ke){return ct(Ke,S)};return N>1||this.__actions__.length||!(ce instanceof bs)||!l1(Z)?this.thru(Le):(ce=ce.slice(Z,+Z+(N?1:0)),ce.__actions__.push({func:I9,args:[Le],thisArg:r}),new Jc(ce,this.__chain__).thru(function(Ke){return N&&!Ke.length&&Ke.push(r),Ke}))});function LM(){return T9(this)}function B_(){return new Jc(this.value(),this.__chain__)}function Jf(){this.__values__===r&&(this.__values__=Re(this.value()));var S=this.__index__>=this.__values__.length,N=S?r:this.__values__[this.__index__++];return{done:S,value:N}}function w0(){return this}function kM(S){for(var N,Z=this;Z instanceof h0;){var ce=aM(Z);ce.__index__=0,ce.__values__=r,N?Le.__wrapped__=ce:N=ce;var Le=ce;Z=Z.__wrapped__}return Le.__wrapped__=S,N}function i8(){var S=this.__wrapped__;if(S instanceof bs){var N=S;return this.__actions__.length&&(N=new bs(this)),N=N.reverse(),N.__actions__.push({func:I9,args:[Q7],thisArg:r}),new Jc(N,this.__chain__)}return this.thru(Q7)}function FN(){return VE(this.__wrapped__,this.__actions__)}var zN=x9(function(S,N,Z){jr.call(S,Z)?++S[Z]:Pt(S,Z,1)});function R9(S,N,Z){var ce=os(S)?ui:pn;return Z&&ol(S,N,Z)&&(N=r),ce(S,Zi(N,3))}function s8(S,N){var Z=os(S)?wi:xn;return Z(S,Zi(N,3))}var BN=oh(fM),o8=oh(pM);function a8(S,N){return nn(A9(S,N),1)}function Fy(S,N){return nn(A9(S,N),We)}function AM(S,N,Z){return Z=Z===r?1:Ne(Z),nn(A9(S,N),Z)}function l8(S,N){var Z=os(S)?Jr:Tn;return Z(S,Zi(N,3))}function L9(S,N){var Z=os(S)?Nn:fn;return Z(S,Zi(N,3))}var PM=x9(function(S,N,Z){jr.call(S,Z)?S[Z].push(N):Pt(S,Z,[N])});function k9(S,N,Z,ce){S=xl(S)?S:hh(S),Z=Z&&!ce?Ne(Z):0;var Le=S.length;return Z<0&&(Z=ga(Le+Z,0)),V(S)?Z<=Le&&S.indexOf(N,Z)>-1:!!Le&&cs(S,N,Z)>-1}var $M=zs(function(S,N,Z){var ce=-1,Le=typeof N=="function",Ke=xl(S)?w(S.length):[];return Tn(S,function(Rt){Ke[++ce]=Le?Er(N,Rt,Z):Wf(Rt,N,Z)}),Ke}),jN=x9(function(S,N,Z){Pt(S,Z,N)});function A9(S,N){var Z=os(S)?Fn:C_;return Z(S,Zi(N,3))}function OM(S,N,Z,ce){return S==null?[]:(os(N)||(N=N==null?[]:[N]),Z=ce?r:Z,os(Z)||(Z=Z==null?[]:[Z]),p0(S,N,Z))}var VN=x9(function(S,N,Z){S[Z?0:1].push(N)},function(){return[[],[]]});function UN(S,N,Z){var ce=os(S)?Ti:$s,Le=arguments.length<3;return ce(S,Zi(N,4),Z,Le,Tn)}function HN(S,N,Z){var ce=os(S)?rs:$s,Le=arguments.length<3;return ce(S,Zi(N,4),Z,Le,fn)}function GN(S,N){var Z=os(S)?wi:xn;return Z(S,H_(Zi(N,3)))}function u8(S){var N=os(S)?de:M_;return N(S)}function b0(S,N,Z){(Z?ol(S,N,Z):N===r)?N=1:N=Ne(N);var ce=os(S)?_e:Iy;return ce(S,N)}function NM(S){var N=os(S)?xe:jE;return N(S)}function DM(S){if(S==null)return 0;if(xl(S))return V(S)?Fl(S):S.length;var N=mu(S);return N==qt||N==xr?S.size:rf(S).length}function FM(S,N,Z){var ce=os(S)?gi:rN;return Z&&ol(S,N,Z)&&(N=r),ce(S,Zi(N,3))}var zM=zs(function(S,N){if(S==null)return[];var Z=N.length;return Z>1&&ol(S,N[0],N[1])?N=[]:Z>2&&ol(N[0],N[1],N[2])&&(N=[N[0]]),p0(S,nn(N,1),[])}),j_=g_||function(){return Te.Date.now()};function c8(S,N){if(typeof N!="function")throw new Vt(o);return S=Ne(S),function(){if(--S<1)return N.apply(this,arguments)}}function zy(S,N,Z){return N=Z?r:N,N=S&&N==null?S.length:N,o1(S,K,r,r,r,r,N)}function h8(S,N){var Z;if(typeof N!="function")throw new Vt(o);return S=Ne(S),function(){return--S>0&&(Z=N.apply(this,arguments)),S<=1&&(N=r),Z}}var V_=zs(function(S,N,Z){var ce=O;if(Z.length){var Le=pa(Z,jm(V_));ce|=W}return o1(S,ce,N,Z,Le)}),d8=zs(function(S,N,Z){var ce=O|I;if(Z.length){var Le=pa(Z,jm(d8));ce|=W}return o1(N,ce,S,Z,Le)});function ah(S,N,Z){N=Z?r:N;var ce=o1(S,j,r,r,r,r,r,N);return ce.placeholder=ah.placeholder,ce}function By(S,N,Z){N=Z?r:N;var ce=o1(S,H,r,r,r,r,r,N);return ce.placeholder=By.placeholder,ce}function f8(S,N,Z){var ce,Le,Ke,Rt,Gt,nr,Dr=0,zr=!1,en=!1,Jn=!0;if(typeof S!="function")throw new Vt(o);N=gt(N)||0,ba(Z)&&(zr=!!Z.leading,en="maxWait"in Z,Ke=en?ga(gt(Z.maxWait)||0,N):Ke,Jn="trailing"in Z?!!Z.trailing:Jn);function Fi(Ql){var h1=ce,Xm=Le;return ce=Le=r,Dr=Ql,Rt=S.apply(Xm,h1),Rt}function as(Ql){return Dr=Ql,Gt=Ay(oo,N),zr?Fi(Ql):Rt}function Ys(Ql){var h1=Ql-nr,Xm=Ql-Dr,JK=N-h1;return en?Wl(JK,Ke-Xm):JK}function ls(Ql){var h1=Ql-nr,Xm=Ql-Dr;return nr===r||h1>=N||h1<0||en&&Xm>=Ke}function oo(){var Ql=j_();if(ls(Ql))return vo(Ql);Gt=Ay(oo,Ys(Ql))}function vo(Ql){return Gt=r,Jn&&ce?Fi(Ql):(ce=Le=r,Rt)}function lf(){Gt!==r&&$m(Gt),Dr=0,ce=nr=Le=Gt=r}function Xh(){return Gt===r?Rt:vo(j_())}function uf(){var Ql=j_(),h1=ls(Ql);if(ce=arguments,Le=this,nr=Ql,h1){if(Gt===r)return as(nr);if(en)return $m(Gt),Gt=Ay(oo,N),Fi(nr)}return Gt===r&&(Gt=Ay(oo,N)),Rt}return uf.cancel=lf,uf.flush=Xh,uf}var BM=zs(function(S,N){return Qr(S,1,N)}),jM=zs(function(S,N,Z){return Qr(S,gt(N)||0,Z)});function VM(S){return o1(S,ge)}function U_(S,N){if(typeof S!="function"||N!=null&&typeof N!="function")throw new Vt(o);var Z=function(){var ce=arguments,Le=N?N.apply(this,ce):ce[0],Ke=Z.cache;if(Ke.has(Le))return Ke.get(Le);var Rt=S.apply(this,ce);return Z.cache=Ke.set(Le,Rt)||Ke,Rt};return Z.cache=new(U_.Cache||zl),Z}U_.Cache=zl;function H_(S){if(typeof S!="function")throw new Vt(o);return function(){var N=arguments;switch(N.length){case 0:return!S.call(this);case 1:return!S.call(this,N[0]);case 2:return!S.call(this,N[0],N[1]);case 3:return!S.call(this,N[0],N[1],N[2])}return!S.apply(this,N)}}function qN(S){return h8(2,S)}var UM=HE(function(S,N){N=N.length==1&&os(N[0])?Fn(N[0],is(Zi())):Fn(nn(N,1),is(Zi()));var Z=N.length;return zs(function(ce){for(var Le=-1,Ke=Wl(ce.length,Z);++Le=N}),qm=t1(function(){return arguments}())?t1:function(S){return Ha(S)&&jr.call(S,"callee")&&!ku.call(S,"callee")},os=w.isArray,gu=mr?is(mr):eh;function xl(S){return S!=null&&C0(S.length)&&!nf(S)}function Ua(S){return Ha(S)&&xl(S)}function XM(S){return S===!0||S===!1||Ha(S)&&Is(S)==Se}var c1=y_||yD,m8=yr?is(yr):My;function JN(S){return Ha(S)&&S.nodeType===1&&!h(S)}function JM(S){if(S==null)return!0;if(xl(S)&&(os(S)||typeof S=="string"||typeof S.splice=="function"||c1(S)||q(S)||qm(S)))return!S.length;var N=mu(S);if(N==qt||N==xr)return!S.size;if($_(S))return!rf(S).length;for(var Z in S)if(jr.call(S,Z))return!1;return!0}function KM(S,N){return r1(S,N)}function KN(S,N,Z){Z=typeof Z=="function"?Z:r;var ce=Z?Z(S,N):r;return ce===r?r1(S,N,r,Z):!!ce}function N9(S){if(!Ha(S))return!1;var N=Is(S);return N==yt||N==et||typeof S.message=="string"&&typeof S.name=="string"&&!h(S)}function g8(S){return typeof S=="number"&&vy(S)}function nf(S){if(!ba(S))return!1;var N=Is(S);return N==we||N==ft||N==tr||N==it}function y8(S){return typeof S=="number"&&S==Ne(S)}function C0(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=He}function ba(S){var N=typeof S;return S!=null&&(N=="object"||N=="function")}function Ha(S){return S!=null&&typeof S=="object"}var D9=wr?is(wr):rh;function F9(S,N){return S===N||Cd(S,N,Um(N))}function G_(S,N,Z){return Z=typeof Z=="function"?Z:r,Cd(S,N,Um(N),Z)}function v8(S){return p(S)&&S!=+S}function _8(S){if(dN(S))throw new G(s);return nh(S)}function x8(S){return S===null}function QN(S){return S==null}function p(S){return typeof S=="number"||Ha(S)&&Is(S)==_r}function h(S){if(!Ha(S)||Is(S)!=Xe)return!1;var N=Zc(S);if(N===null)return!0;var Z=jr.call(N,"constructor")&&N.constructor;return typeof Z=="function"&&Z instanceof Z&&Sn.call(Z)==io}var y=Gr?is(Gr):Yl;function C(S){return y8(S)&&S>=-He&&S<=He}var $=Xr?is(Xr):fu;function V(S){return typeof S=="string"||!os(S)&&Ha(S)&&Is(S)==Ur}function U(S){return typeof S=="symbol"||Ha(S)&&Is(S)==In}var q=on?is(on):Ec;function J(S){return S===r}function se(S){return Ha(S)&&mu(S)==mn}function he(S){return Ha(S)&&Is(S)==Kr}var ye=A_(Zf),Ee=A_(function(S,N){return S<=N});function Re(S){if(!S)return[];if(xl(S))return V(S)?za(S):Mc(S);if(Vh&&S[Vh])return ta(S[Vh]());var N=mu(S),Z=N==qt?uu:N==xr?eo:hh;return Z(S)}function De(S){if(!S)return S===0?S:0;if(S=gt(S),S===We||S===-We){var N=S<0?-1:1;return N*Lt}return S===S?S:0}function Ne(S){var N=De(S),Z=N%1;return N===N?Z?N-Z:N:0}function ht(S){return S?Ht(Ne(S),0,pt):0}function gt(S){if(typeof S=="number")return S;if(U(S))return lt;if(ba(S)){var N=typeof S.valueOf=="function"?S.valueOf():S;S=ba(N)?N+"":N}if(typeof S!="string")return S===0?S:+S;S=xa(S);var Z=cn.test(S);return Z||gn.test(S)?Zp(S.slice(2),Z?2:8):sn.test(S)?lt:+S}function er(S){return sh(S,yo(S))}function Bt(S){return S?Ht(Ne(S),-He,He):S===0?S:0}function jt(S){return S==null?"":Xl(S)}var fr=Dm(function(S,N){if($_(N)||xl(N)){sh(N,Bs(N),S);return}for(var Z in N)jr.call(N,Z)&&qe(S,Z,N[Z])}),Vr=Dm(function(S,N){sh(N,yo(N),S)}),Rn=Dm(function(S,N,Z,ce){sh(N,yo(N),S,ce)}),ki=Dm(function(S,N,Z,ce){sh(N,Bs(N),S,ce)}),Pn=a1(ct);function Mn(S,N){var Z=c0(S);return N==null?Z:bt(Z,N)}var ai=zs(function(S,N){S=Ce(S);var Z=-1,ce=N.length,Le=ce>2?N[2]:r;for(Le&&ol(N[0],N[1],Le)&&(ce=1);++Z1),Ke}),sh(S,B7(S),Z),ce&&(Z=Wt(Z,f|m|v,oN));for(var Le=N.length;Le--;)Ry(Z,N[Le]);return Z});function Ic(S,N){return Fo(S,H_(Zi(N)))}var so=a1(function(S,N){return S==null?{}:Ty(S,N)});function Fo(S,N){if(S==null)return{};var Z=Fn(B7(S),function(ce){return[ce]});return N=Zi(N),Pm(S,Z,function(ce,Le){return N(ce,Le[0])})}function na(S,N,Z){N=Yf(N,S);var ce=-1,Le=N.length;for(Le||(Le=1,S=r);++ceN){var ce=S;S=N,N=ce}if(Z||S%1||N%1){var Le=xy();return Wl(S+Le*(N-S+Nl("1e-"+((Le+"").length-1))),N)}return d9(S,N)}var b8=Fm(function(S,N,Z){return N=N.toLowerCase(),S+(Z?ep(N):N)});function ep(S){return hD(jt(S).toLowerCase())}function C8(S){return S=jt(S),S&&S.replace(Xi,vl).replace(go,"")}function tT(S,N,Z){S=jt(S),N=Xl(N);var ce=S.length;Z=Z===r?ce:Ht(Ne(Z),0,ce);var Le=Z;return Z-=N.length,Z>=0&&S.slice(Z,Le)==N}function eD(S){return S=jt(S),S&&Me.test(S)?S.replace(pi,sl):S}function tD(S){return S=jt(S),S&&ur.test(S)?S.replace(wt,"\\$&"):S}var rD=Fm(function(S,N,Z){return S+(Z?"-":"")+N.toLowerCase()}),nD=Fm(function(S,N,Z){return S+(Z?" ":"")+N.toLowerCase()}),iD=w9("toLowerCase");function sD(S,N,Z){S=jt(S),N=Ne(N);var ce=N?Fl(S):0;if(!N||ce>=N)return S;var Le=(N-ce)/2;return b9(qf(Le),Z)+S+b9(Xp(Le),Z)}function oD(S,N,Z){S=jt(S),N=Ne(N);var ce=N?Fl(S):0;return N&&ce>>0,Z?(S=jt(S),S&&(typeof N=="string"||N!=null&&!y(N))&&(N=Xl(N),!N&&Xu(S))?i1(za(S),0,Z):S.split(N,Z)):[]}var cD=Fm(function(S,N,Z){return S+(Z?" ":"")+hD(N)});function Ou(S,N,Z){return S=jt(S),Z=Z==null?0:Ht(Ne(Z),0,S.length),N=Xl(N),S.slice(Z,Z+N.length)==N}function Yh(S,N,Z){var ce=Ge.templateSettings;Z&&ol(S,N,Z)&&(N=r),S=jt(S),N=Rn({},N,ce,JE);var Le=Rn({},N.imports,ce.imports,JE),Ke=Bs(Le),Rt=Es(Le,Ke),Gt,nr,Dr=0,zr=N.interpolate||Vi,en="__p += '",Jn=Ue((N.escape||Vi).source+"|"+zr.source+"|"+(zr===ze?hn:Vi).source+"|"+(N.evaluate||Vi).source+"|$","g"),Fi="//# sourceURL="+(jr.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wd+"]")+` +`;S.replace(Jn,function(ls,oo,vo,lf,Xh,uf){return vo||(vo=lf),en+=S.slice(Dr,uf).replace(Ta,_l),oo&&(Gt=!0,en+=`' + +__e(`+oo+`) + +'`),Xh&&(nr=!0,en+=`'; +`+Xh+`; +__p += '`),vo&&(en+=`' + +((__t = (`+vo+`)) == null ? '' : __t) + +'`),Dr=uf+ls.length,ls}),en+=`'; +`;var as=jr.call(N,"variable")&&N.variable;if(!as)en=`with (obj) { +`+en+` +} +`;else if(Br.test(as))throw new G(a);en=(nr?en.replace(Tr,""):en).replace(Zn,"$1").replace(Gi,"$1;"),en="function("+(as||"obj")+`) { +`+(as?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Gt?", __e = _.escape":"")+(nr?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+en+`return __p +}`;var Ys=YK(function(){return te(Ke,Fi+"return "+en).apply(r,Rt)});if(Ys.source=en,N9(Ys))throw Ys;return Ys}function Zm(S){return jt(S).toLowerCase()}function af(S){return jt(S).toUpperCase()}function Ym(S,N,Z){if(S=jt(S),S&&(Z||N===r))return xa(S);if(!S||!(N=Xl(N)))return S;var ce=za(S),Le=za(N),Ke=Ru(ce,Le),Rt=Yu(ce,Le)+1;return i1(ce,Ke,Rt).join("")}function tp(S,N,Z){if(S=jt(S),S&&(Z||N===r))return S.slice(0,Ot(S)+1);if(!S||!(N=Xl(N)))return S;var ce=za(S),Le=Yu(ce,za(N))+1;return i1(ce,0,Le).join("")}function F7e(S,N,Z){if(S=jt(S),S&&(Z||N===r))return S.replace(me,"");if(!S||!(N=Xl(N)))return S;var ce=za(S),Le=Ru(ce,za(N));return i1(ce,Le).join("")}function z7e(S,N){var Z=fe,ce=ee;if(ba(N)){var Le="separator"in N?N.separator:Le;Z="length"in N?Ne(N.length):Z,ce="omission"in N?Xl(N.omission):ce}S=jt(S);var Ke=S.length;if(Xu(S)){var Rt=za(S);Ke=Rt.length}if(Z>=Ke)return S;var Gt=Z-Fl(ce);if(Gt<1)return ce;var nr=Rt?i1(Rt,0,Gt).join(""):S.slice(0,Gt);if(Le===r)return nr+ce;if(Rt&&(Gt+=nr.length-Gt),y(Le)){if(S.slice(Gt).search(Le)){var Dr,zr=nr;for(Le.global||(Le=Ue(Le.source,jt(mi.exec(Le))+"g")),Le.lastIndex=0;Dr=Le.exec(zr);)var en=Dr.index;nr=nr.slice(0,en===r?Gt:en)}}else if(S.indexOf(Xl(Le),Gt)!=Gt){var Jn=nr.lastIndexOf(Le);Jn>-1&&(nr=nr.slice(0,Jn))}return nr+ce}function B7e(S){return S=jt(S),S&&nt.test(S)?S.replace(zn,hr):S}var j7e=Fm(function(S,N,Z){return S+(Z?" ":"")+N.toUpperCase()}),hD=w9("toUpperCase");function ZK(S,N,Z){return S=jt(S),N=Z?r:N,N===r?Lu(S)?hs(S):hi(S):S.match(N)||[]}var YK=zs(function(S,N){try{return Er(S,r,N)}catch(Z){return N9(Z)?Z:new G(Z)}}),V7e=a1(function(S,N){return Jr(N,function(Z){Z=Xf(Z),Pt(S,Z,V_(S[Z],S))}),S});function U7e(S){var N=S==null?0:S.length,Z=Zi();return S=N?Fn(S,function(ce){if(typeof ce[1]!="function")throw new Vt(o);return[Z(ce[0]),ce[1]]}):[],zs(function(ce){for(var Le=-1;++LeHe)return[];var Z=pt,ce=Wl(S,pt);N=Zi(N),S-=pt;for(var Le=ea(ce,N);++Z0||N<0)?new bs(Z):(S<0?Z=Z.takeRight(-S):S&&(Z=Z.drop(S)),N!==r&&(N=Ne(N),Z=N<0?Z.dropRight(-N):Z.take(N-S)),Z)},bs.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},bs.prototype.toArray=function(){return this.take(pt)},qi(bs.prototype,function(S,N){var Z=/^(?:filter|find|map|reject)|While$/.test(N),ce=/^(?:head|last)$/.test(N),Le=Ge[ce?"take"+(N=="last"?"Right":""):N],Ke=ce||/^find/.test(N);Le&&(Ge.prototype[N]=function(){var Rt=this.__wrapped__,Gt=ce?[1]:arguments,nr=Rt instanceof bs,Dr=Gt[0],zr=nr||os(Rt),en=function(oo){var vo=Le.apply(Ge,An([oo],Gt));return ce&&Jn?vo[0]:vo};zr&&Z&&typeof Dr=="function"&&Dr.length!=1&&(nr=zr=!1);var Jn=this.__chain__,Fi=!!this.__actions__.length,as=Ke&&!Jn,Ys=nr&&!Fi;if(!Ke&&zr){Rt=Ys?Rt:new bs(this);var ls=S.apply(Rt,Gt);return ls.__actions__.push({func:I9,args:[en],thisArg:r}),new Jc(ls,Jn)}return as&&Ys?S.apply(this,Gt):(ls=this.thru(en),as?ce?ls.value()[0]:ls.value():ls)})}),Jr(["pop","push","shift","sort","splice","unshift"],function(S){var N=gr[S],Z=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",ce=/^(?:pop|shift)$/.test(S);Ge.prototype[S]=function(){var Le=arguments;if(ce&&!this.__chain__){var Ke=this.value();return N.apply(os(Ke)?Ke:[],Le)}return this[Z](function(Rt){return N.apply(os(Rt)?Rt:[],Le)})}}),qi(bs.prototype,function(S,N){var Z=Ge[N];if(Z){var ce=Z.name+"";jr.call(Zl,ce)||(Zl[ce]=[]),Zl[ce].push({name:N,func:Z})}}),Zl[Ly(r,I).name]=[{name:"wrapper",func:r}],bs.prototype.clone=a9,bs.prototype.reverse=w_,bs.prototype.value=l9,Ge.prototype.at=RM,Ge.prototype.chain=LM,Ge.prototype.commit=B_,Ge.prototype.next=Jf,Ge.prototype.plant=kM,Ge.prototype.reverse=i8,Ge.prototype.toJSON=Ge.prototype.valueOf=Ge.prototype.value=FN,Ge.prototype.first=Ge.prototype.head,Vh&&(Ge.prototype[Vh]=w0),Ge},F=ts();Ve?((Ve.exports=F)._=F,ke._=F):Te._=F}).call(Oc)})($A,$A.exports);var Pet=$A.exports;const iX=H2(Pet),FC={version:8,sprite:"https://www.arcgis.com/sharing/rest/content/items/46d38d6a32ea412fb5fe4cc521ede94e/resources/sprites/sprite-1689510144076",glyphs:"https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf",sources:{esri:{type:"vector",tiles:["https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/Basemap_Dynamic_Detail/VectorTileServer/tile/{z}/{y}/{x}.pbf"]},labels:{type:"vector",tiles:["https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/Basemap_Dynamic_Labels/VectorTileServer/tile/{z}/{y}/{x}.pbf"]},baseunits:{type:"vector",bounds:[-83.2878,42.255,-82.9105,42.4504],minzoom:0,maxzoom:23,scheme:"xyz",url:"https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/BaseUnitVectorTiles2024/VectorTileServer",tiles:["https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/BaseUnitVectorTiles2024/VectorTileServer/tile/{z}/{y}/{x}.pbf"]},satellite:{type:"raster",tiles:["https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/MiSAIL_2020_6in_Clip_webMerc/MapServer/tile/{z}/{y}/{x}"]},"linen-map":{type:"raster",tiles:["https://tiles.arcgis.com/tiles/qvkbeam7Wirps6zC/arcgis/rest/services/Linen_Map_Mosaic/MapServer/tile/{z}/{y}/{x}"]},result:{type:"geojson",data:{type:"FeatureCollection",features:[]}},"new-point":{type:"geojson",data:{type:"FeatureCollection",features:[]}},mly:{type:"vector",tiles:["https://tiles.mapillary.com/maps/vtp/mly1_computed_public/2/{z}/{x}/{y}?access_token=MLY|4690399437648324|de87555bb6015affa20c3df794ebab15"],maxzoom:14,minzoom:14},projects:{type:"geojson",data:{type:"FeatureCollection",features:[]}},"current-project":{type:"geojson",data:{type:"FeatureCollection",features:[]}}},layers:[{id:"satellite",type:"raster",source:"satellite",minzoom:0,maxzoom:22,paint:{"raster-opacity":1,"raster-saturation":-.75},layout:{visibility:"none"}},{id:"linen-map",type:"raster",source:"linen-map",minzoom:0,maxzoom:22,paint:{"raster-opacity":{stops:[[0,1],[15,1],[22,.5]]},"raster-saturation":0},layout:{visibility:"none"}},{id:"BasemapClipExtent/1",type:"fill",source:"esri","source-layer":"BasemapClipExtent",layout:{},paint:{"fill-color":"#FFFFFF"},minzoom:9},{id:"Reference Polygons/Landmarks",type:"fill",source:"esri","source-layer":"Landmarks",layout:{},paint:{"fill-color":"#E0E0E0"},minzoom:10},{id:"Reference Polygons/Golfcourse",type:"fill",source:"esri","source-layer":"Golfcourse",layout:{visibility:"none"},paint:{"fill-color":"#9FD5B3"},minzoom:10},{id:"Reference Polygons/Cemetery/1",type:"fill",source:"esri","source-layer":"Cemetery",layout:{visibility:"none"},paint:{"fill-color":"#9FD5B3"},minzoom:10},{id:"Reference Polygons/Cemetery/0",type:"fill",source:"esri","source-layer":"Cemetery",layout:{},paint:{"fill-pattern":"Reference Polygons/Cemetery/0"},minzoom:10},{id:"Reference Polygons/Parks",type:"fill",source:"esri","source-layer":"Parks",layout:{visibility:"none"},paint:{"fill-color":"#9FD5B3"},minzoom:10},{id:"Hydro/Hydro Poly",type:"fill",source:"esri","source-layer":"Hydro Poly",layout:{},paint:{"fill-color":"#BFBFBF"},minzoom:10},{id:"Hydro/Hydro Line",type:"line",source:"esri","source-layer":"Hydro Line",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#BFBFBF","line-width":{base:1,stops:[[11,.2],[12,.4],[13,.8],[14,1.5],[15,3],[16,6],[17,12],[18,24]]}},minzoom:10},{id:"Hydro/Detroit River",type:"fill",source:"esri","source-layer":"Detroit River",layout:{},paint:{"fill-color":"#BFBFBF"}},{id:"Runway",type:"fill",source:"esri","source-layer":"Runway",layout:{},paint:{"fill-color":"#FFFFFF"},minzoom:11},{id:"Roads/Freeway",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",0],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.9],[12,1.8],[13,3.6],[14,7.2],[15,14.4],[16,28.8],[17,57.6],[18,115.2]]}},minzoom:9,maxzoom:15},{id:"Roads/Ramp",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.6],[12,1.1],[13,2.3],[14,4.5],[15,9],[16,18],[17,36],[18,72]]}},maxzoom:15,minzoom:10},{id:"Roads/Major",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",2],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.9],[12,1.8],[13,3.6],[14,7.2],[15,14.4],[16,28.8],[17,57.6],[18,115.2]]}},minzoom:9,maxzoom:15},{id:"Roads/Principal Arterial",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",3],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.8],[12,1.5],[13,3],[14,6],[15,12],[16,24],[17,48],[18,96]]}},maxzoom:15,minzoom:10},{id:"Roads/Small",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",4],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.6],[12,1.1],[13,2.3],[14,4.5],[15,9],[16,18],[17,36],[18,72]]}},maxzoom:15,minzoom:10},{id:"Roads/Local",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",5],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.4],[12,.8],[13,1.5],[14,3],[15,6],[16,12],[17,24],[18,48]]}},maxzoom:15,minzoom:11},{id:"Roads/Other Small",type:"line",source:"esri","source-layer":"Roads",filter:["==","_symbol",6],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#EBEBEB","line-width":{base:1,stops:[[11,.2],[12,.4],[13,.8],[14,1.5],[15,3],[16,6],[17,12],[18,24]]}},maxzoom:15,minzoom:12},{id:"Impervious Surface/Details",type:"fill",source:"esri","source-layer":"Impervious Surface",filter:["==","_symbol",1],layout:{},paint:{"fill-color":"#F2F2F2"},minzoom:16},{id:"Impervious Surface/Roads",type:"fill",source:"esri","source-layer":"Impervious Surface",filter:["==","_symbol",0],layout:{},paint:{"fill-color":"#EBEBEB","fill-outline-color":"#BFBFBF"},minzoom:15},{id:"Building Footprints/Buildings",type:"fill",source:"esri","source-layer":"Building Footprints",filter:["==","_symbol",0],layout:{visibility:"none"},paint:{"fill-color":{base:1,stops:[[14,"#E0E0E0"],[15,"#d7d7d7"]]},"fill-outline-color":{base:1,stops:[[14,"#E0E0E0"],[15,"#BDBDBD"]]}},minzoom:14},{id:"Borders/International",type:"line",source:"esri","source-layer":"International",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#9C9C9C","line-width":1.33333,"line-dasharray":[8,4]},minzoom:10},{id:"Borders/Detroit",type:"line",source:"esri","source-layer":"Detroit",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#004445","line-width":4}},{id:"parcel-linked",type:"fill",source:"baseunits","source-layer":"parcels",minzoom:11,filter:["==","parcel_id",""],layout:{visibility:"visible"},paint:{"fill-color":Hi.parcel.color,"fill-opacity":{base:1,stops:[[12,0],[12.1,.1],[12.5,.25],[22,.25]]}}},{id:"parcel-fill",type:"fill",source:"baseunits","source-layer":"parcels",interactive:!0,minzoom:12,layout:{visibility:"visible"},paint:{"fill-color":"rgba(0,0,0,0)"}},{id:"streets-highlight",type:"line",source:"baseunits","source-layer":"streets",filter:["==","$id",""],minzoom:14,layout:{visibility:"visible"},paint:{"line-width":{stops:[[11,3],[15,5.5],[20,42]]},"line-color":Hi.street.color,"line-opacity":.45}},{id:"streets-linked",type:"line",source:"baseunits","source-layer":"streets",filter:["==","$id",""],minzoom:14,layout:{visibility:"visible"},paint:{"line-width":{stops:[[11,3],[15,5.5],[20,42]]},"line-color":Hi.street.color,"line-opacity":.65}},{id:"streets-line",type:"line",source:"baseunits","source-layer":"streets",minzoom:11,layout:{visibility:"visible"},paint:{"line-width":{stops:[[11,1],[15,2],[20,25]]},"line-color":"#ccc","line-opacity":.55}},{id:"Roads/label/Local",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",4],layout:{visibility:"visible","text-size":12,"icon-size":1,"text-font":["Montserrat Regular"],"text-max-width":10,"text-line-height":1.2,"text-padding":2,"text-letter-spacing":.2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-justify":"center","text-rotation-alignment":"auto","text-optional":!0,"icon-allow-overlap":!1,"icon-optional":!1,"icon-ignore-placement":!1,"icon-rotation-alignment":"auto","symbol-placement":"line","symbol-avoid-edges":!1,"symbol-spacing":250,"text-anchor":"center","icon-anchor":"center","icon-offset":[0,0],"text-offset":[0,0],"icon-rotate":0,"text-rotate":0,"text-max-angle":45,"text-field":"{_name}","text-transform":"none"},paint:{"icon-opacity":1,"text-opacity":1,"text-halo-color":"rgba(255,255,255,0.5)","text-halo-width":.533333,"text-halo-blur":0,"text-translate-anchor":"map","icon-translate-anchor":"map","icon-translate":[0,0],"text-translate":[0,0]},showProperties:!1},{id:"Roads/label/Arterial",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",5],layout:{visibility:"visible","text-size":12,"icon-size":1,"text-font":["Montserrat Regular"],"text-max-width":10,"text-line-height":1.2,"text-padding":2,"text-letter-spacing":.2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-justify":"center","text-rotation-alignment":"auto","text-optional":!0,"icon-allow-overlap":!1,"icon-optional":!1,"icon-ignore-placement":!1,"icon-rotation-alignment":"auto","symbol-placement":"line","symbol-avoid-edges":!1,"symbol-spacing":250,"text-anchor":"center","icon-anchor":"center","icon-offset":[0,0],"text-offset":[0,0],"icon-rotate":0,"text-rotate":0,"text-max-angle":45,"text-field":"{_name}","text-transform":"none"},paint:{"icon-opacity":1,"text-opacity":1,"text-halo-color":"rgba(255,255,255,0.5)","text-halo-width":.533333,"text-halo-blur":0,"text-translate-anchor":"map","icon-translate-anchor":"map","icon-translate":[0,0],"text-translate":[0,0]},showProperties:!1},{id:"Roads/label/Arterial (+)",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",3],layout:{visibility:"visible","text-size":12,"icon-size":1,"text-font":["Montserrat Regular"],"text-max-width":10,"text-line-height":1.2,"text-padding":2,"text-letter-spacing":.2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-justify":"center","text-rotation-alignment":"auto","text-optional":!0,"icon-allow-overlap":!1,"icon-optional":!1,"icon-ignore-placement":!1,"icon-rotation-alignment":"auto","symbol-placement":"line","symbol-avoid-edges":!1,"symbol-spacing":250,"text-anchor":"center","icon-anchor":"center","icon-offset":[0,0],"text-offset":[0,0],"icon-rotate":0,"text-rotate":0,"text-max-angle":45,"text-field":"{_name}","text-transform":"none"},paint:{"icon-opacity":1,"text-opacity":1,"text-halo-color":"rgba(255,255,255,0.5)","text-halo-width":.533333,"text-halo-blur":0,"text-translate-anchor":"map","icon-translate-anchor":"map","icon-translate":[0,0],"text-translate":[0,0]},showProperties:!1},{id:"Roads/label/Major Arterial",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",2],layout:{visibility:"visible","text-size":12,"icon-size":1,"text-font":["Montserrat Regular"],"text-max-width":10,"text-line-height":1.2,"text-padding":2,"text-letter-spacing":.2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-justify":"center","text-rotation-alignment":"auto","text-optional":!0,"icon-allow-overlap":!1,"icon-optional":!1,"icon-ignore-placement":!1,"icon-rotation-alignment":"auto","symbol-placement":"line","symbol-avoid-edges":!1,"symbol-spacing":250,"text-anchor":"center","icon-anchor":"center","icon-offset":[0,0],"text-offset":[0,0],"icon-rotate":0,"text-rotate":0,"text-max-angle":45,"text-field":"{_name}","text-transform":"none"},paint:{"icon-opacity":1,"text-opacity":1,"text-halo-color":"rgba(255,255,255,0.5)","text-halo-width":.533333,"text-halo-blur":0,"text-translate-anchor":"map","icon-translate-anchor":"map","icon-translate":[0,0],"text-translate":[0,0]},showProperties:!1},{id:"Roads/label/State Route",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",1],layout:{"symbol-placement":"line","text-font":["Montserrat Regular"],"text-size":8,"text-letter-spacing":.01,"text-field":"{_name}","icon-image":"Roads/State Route/{_len}","icon-rotation-alignment":"viewport","text-rotation-alignment":"viewport","text-optional":!0},paint:{"text-color":"#686868"},showProperties:!1},{id:"Roads/label/Interstate",type:"symbol",source:"labels","source-layer":"Roads/label",filter:["==","_label_class",0],layout:{"symbol-placement":"line","text-font":["Montserrat Regular"],"text-size":8,"text-letter-spacing":.01,"text-field":"{_name}","icon-image":"Roads/Interstate/{_len}","icon-rotation-alignment":"viewport","text-rotation-alignment":"viewport","text-optional":!0},paint:{"text-color":"#686868"},showProperties:!1},{id:"parcel-line",type:"line",source:"baseunits",source:"baseunits","source-layer":"parcels",minzoom:11,layout:{visibility:"visible"},paint:{"line-color":{stops:[[14,"#ccc"],[17,"#bbb"],[17.1,"#aaa"],[18,"#555"]]},"line-width":{base:1,stops:[[12,.1],[14,.75],[17,1.5],[20,4]]},"line-opacity":{base:1,stops:[[14,0],[14.1,.5],[22,1]]}}},{id:"parcel-highlight",type:"line",source:"baseunits","source-layer":"parcels",minzoom:11,filter:["==","parcel_id",""],layout:{visibility:"visible"},paint:{"line-color":Hi.parcel.color,"line-width":{base:1,stops:[[12,.5],[14,2],[15,3],[22,10]]},"line-opacity":{base:1,stops:[[12,0],[12.1,.1],[12.5,1],[22,1]]}}},{id:"building-fill",type:"fill",source:"baseunits","source-layer":"buildings",interactive:!0,minzoom:12,layout:{visibility:"visible"},paint:{"fill-color":{stops:[[14,"#000"],[19,"#fff"]]},"fill-opacity":{stops:[[14,.1],[19,.5]]}}},{id:"building-linked",type:"fill",source:"baseunits","source-layer":"buildings",minzoom:11,filter:["==","id",""],layout:{visibility:"visible"},paint:{"fill-color":Hi.building.color,"fill-opacity":{base:1,stops:[[12,0],[12.1,.1],[12.5,.25],[22,.25]]}}},{id:"building-highlight",type:"line",source:"baseunits","source-layer":"buildings",minzoom:11,filter:["==","id",""],layout:{visibility:"visible"},paint:{"line-color":Hi.building.color,"line-width":{base:1,stops:[[11.5,.1],[13.5,.75],[14,1.5],[21,6]]},"line-opacity":{base:1,stops:[[12,0],[12.1,.1],[12.5,1],[22,1]]}}},{id:"address-highlight",type:"circle",source:"baseunits","source-layer":"addresses",minzoom:11,filter:["==","id",""],layout:{visibility:"visible"},paint:{"circle-radius":{base:1,stops:[[12.5,.2],[13.5,1],[16.5,3],[19,12]]},"circle-color":Hi.address.color,"circle-stroke-color":"#333","circle-stroke-width":1}},{id:"address-linked",type:"circle",source:"baseunits","source-layer":"addresses",minzoom:11,filter:["==","id",""],layout:{visibility:"visible"},paint:{"circle-radius":{base:1,stops:[[12.5,.2],[13.5,1],[16.5,3],[19,12]]},"circle-color":Hi.address.color,"circle-stroke-color":"#333","circle-stroke-width":1}},{id:"address-point",type:"circle",source:"baseunits","source-layer":"addresses",minzoom:13,layout:{visibility:"none"},paint:{"circle-radius":{base:1,stops:[[13,.1],[14,1],[17,4],[19,8]]},"circle-color":"#aaa"}},{id:"address-point-label",source:"baseunits","source-layer":"addresses",type:"symbol",minzoom:18,layout:{"text-field":["get","street_number"],"text-font":["Noto Sans Bold"],"text-offset":[0,-1],visibility:"none"},paint:{"text-halo-color":"white","text-halo-width":2}},{id:"mapillary-images",type:"circle",source:"mly","source-layer":"image",maxzoom:22,minzoom:14,filter:["all",["==","is_pano",!0]],layout:{visibility:"visible"},paint:{"circle-radius":{base:1,stops:[[13,.1],[14,.5],[17,2],[18.5,4],[19,7],[19.5,10]]},"circle-color":"rgba(20,20,120,0)"}},{id:"mapillary-location",type:"symbol",source:"mly","source-layer":"image",filter:["==","id",""],layout:{"icon-rotate":0,"icon-rotation-alignment":"map","icon-image":"video","icon-anchor":"center","icon-size":{base:1,stops:[[13,1],[14,1],[17,1],[19,3]]}},paint:{"icon-opacity":.65}},{id:"result-point",source:"result",type:"circle",paint:{"circle-color":"green"}},{id:"new-address-point",source:"new-point",type:"circle",paint:{"circle-color":"rgba(120,0,0,0.5)","circle-radius":10,"circle-stroke-color":"#ddd","circle-stroke-width":2}},{id:"all-projects-fill",type:"fill",source:"projects",interactive:!0,minzoom:12,layout:{visibility:"visible"},paint:{"fill-color":"rgba(120,0,0,0.15)"}},{id:"current-project-fill",type:"fill",source:"current-project",interactive:!0,minzoom:12,layout:{visibility:"visible"},paint:{"fill-color":"rgba(0,0,120,0.15)"}},{id:"current-project-line",type:"line",source:"current-project",interactive:!0,minzoom:12,layout:{visibility:"visible"},paint:{"line-color":"rgba(0,0,0,0.25)","line-width":3}}],metadata:{arcgisStyleUrl:"https://www.arcgis.com/sharing/rest/content/items/273bf8d5c8ac400183fc24e109d20bcf/resources/styles/root.json",arcgisOriginalItemTitle:"Community"}},$et=()=>{let t=iX.cloneDeep(FC);return t.layers[0].layout.visibility="visible",t.layers[1].layout.visibility="none",t.layers.slice(0,200).forEach((e,r)=>{e.type==="fill"&&e.id.indexOf("parcel")===-1&&(t.layers[r].layout.visibility="none"),e.type==="line"&&e.id.indexOf("Road")===0&&(t.layers[r].layout.visibility="none")}),t.layers.forEach((e,r)=>{e.id==="streets-line"&&(t.layers[r].paint["line-color"]=Hi.street.color,t.layers[r].paint["line-opacity"]=.65),e.id==="streets-highlight"&&(t.layers[r].paint["line-color"]="#fff",t.layers[r].paint["line-opacity"]=.65),e.id==="streets-linked"&&(t.layers[r].paint["line-color"]="#333",t.layers[r].paint["line-opacity"]=.55),e.id==="parcel-line"&&(t.layers[r].paint["line-color"]=Hi.parcel.color,t.layers[r].paint["line-opacity"]=.65),e.id==="parcel-highlight"&&(t.layers[r].paint["line-color"]="#fff",t.layers[r].paint["line-opacity"]=.65),e.id==="building-line"&&(t.layers[r].paint["line-color"]=Hi.building.color,t.layers[r].paint["line-opacity"]=.65)}),t},Oet=()=>{let t=iX.cloneDeep(FC);return t.layers[0].layout.visibility="none",t.layers[1].layout.visibility="visible",t.layers.slice(0,200).forEach((e,r)=>{e.type==="fill"&&e.id.indexOf("parcel")===-1&&(t.layers[r].layout.visibility="none"),e.type==="line"&&e.id.indexOf("Road")===0&&(t.layers[r].layout.visibility="none")}),t},Net=({layer:t,setLayer:e,style:r,feature:n,linkedAddresses:i,refetch:s,streetview:o,viewerImage:a,viewerBearing:l,setSvImages:u})=>{const d=E.useRef(null),f=E.useRef(null);LXe();const[m,v]=E.useState(!1),[b,M]=E.useState([]);let O={streets:FC,satellite:$et(),linen:Oet()};E.useEffect(()=>{m||I()},[m]);const I=()=>{if(d.current&&!f.current){const A=new Hge.Map({container:d.current,style:r?O[r]:FC,center:[-83.07715,42.37927],zoom:10.75});A.on("load",()=>{v(!0)}),A.on("click",j=>{const H=A.queryRenderedFeatures(j.point,{layers:Object.keys(Hi).map(W=>Hi[W].interaction)});M(H)}),A.on("moveend",()=>{if(f.current.getZoom()>16.5){let j=A.queryRenderedFeatures({layers:["mapillary-images"]});u(j)}else u([])}),f.current=A}};return E.useEffect(()=>{f.current&&o&&setTimeout(()=>{f.current.getZoom()<17.5&&f.current.easeTo({zoom:17.51})},100),f.current&&!o&&u([])},[o]),E.useEffect(()=>{f.current&&r&&m&&f.current.setStyle(O[r])},[r]),E.useEffect(()=>{var A;if(f.current&&t&&m&&(Hi[t],Object.keys(Hi).forEach(j=>{let H=Hi[j];H.highlight&&f.current.setFilter(H.highlight,["==","$id",""])}),b.length>0)){let j=b[0];const H=Object.keys(Hi).find(re=>{var K;return Hi[re].interaction===((K=j==null?void 0:j.layer)==null?void 0:K.id)});s(H==="parcel"?j==null?void 0:j.properties.parcel_id:j==null?void 0:j.id,H),e(H);let W=["==","$id",j==null?void 0:j.id];H&&f.current.setFilter((A=Hi[H])==null?void 0:A.highlight,W)}},[b]),E.useEffect(()=>{if(f.current&&n&&n.properties){const A=Hi[t];Object.keys(Hi).forEach(re=>{let K=Hi[re];K.highlight&&f.current.setFilter(K.highlight,["==","$id",""])});let j=["==",t==="parcel"?"parcel_id":"$id",n.properties[A.id_column]];f.current.setFilter(A.highlight,j);const H=jge(n).geometry.coordinates;let W=f.current.getZoom();o&&W<17.5&&(W=17.51),!o&&W<17.5&&(W=16.5),f.current.easeTo({center:H,essential:!0,zoom:W})}},[n]),E.useEffect(()=>{var A;if(f.current&&i.length>0&&m&&Hi[t]){const j=Object.keys(Hi).filter(H=>H!==t);Hi[t].linked&&f.current.setFilter((A=Hi[t])==null?void 0:A.linked,["==","$id",""]),j.forEach(H=>{let W=Hi[H];if(!W.link)return;let re=i.map(pe=>pe.properties[W.id_column]);re=re.filter(pe=>pe!==null);let K=["in",H==="parcel"?"parcel_id":"$id"].concat(Array.from(new Set(re)));f.current.setFilter(W.link,K)})}if(f.current&&t==="address"&&m){const j=Object.keys(Hi).filter(H=>H!==t);f.current.setFilter(Hi[t].link,["==","$id",""]),j.forEach(H=>{let W=Hi[H];if(!W.link)return;let re=["==",H==="parcel"?"parcel_id":"$id",n.properties[W.id_column]];f.current.setFilter(W.link,re)})}f.current&&i.length===0&&t!=="address"&&m&&Object.keys(Hi).forEach(j=>{let H=Hi[j];H.link&&f.current.setFilter(H.link,["==","$id",""])})},[i]),E.useEffect(()=>()=>{f.current&&(f.current.remove(),f.current=null)},[]),E.useEffect(()=>{f.current&&m&&f.current.resize()},[m]),E.useEffect(()=>{f.current&&a&&f.current.setFilter("mapillary-location",["==","id",parseInt(a.image.id)])},[a]),E.useEffect(()=>{f.current&&l&&f.current.setLayoutProperty("mapillary-location","icon-rotate",l-90)},[l]),oe.jsx(lm,{p:"2",children:oe.jsx(lm,{ref:d,height:o?{initial:"250px",sm:"350px",lg:"375px",xl:"500px"}:{initial:"300px",sm:"500px",lg:"705px",xl:"900px"},p:"2"})})},Det=()=>{const{isAuthenticated:t}=G5();return oe.jsx("div",{className:"bg-gray-100 dark:bg-gray-800",children:oe.jsxs(m$,{size:"2",className:"min-h-96",children:[oe.jsxs(lm,{py:"5",children:[oe.jsx("h2",{className:"cod-style py-2",children:"Welcome to the Base Units Tools site"}),oe.jsx("p",{children:"Base Units are the fundamental units of measurement we use to describe our city."})]}),oe.jsx("h3",{children:"Tools available on this site"}),oe.jsx(B5,{columns:"2",gap:"4",p:"3",children:Object.keys(D1).slice(1).map(e=>{if(!(D1[e].private&&!t))return oe.jsx(ud,{to:D1[e].url,children:oe.jsxs(kl,{size:"1",className:"text-sm",children:[oe.jsxs(kn,{direction:"row",align:"center",gap:"2",pb:"2",children:[oe.jsx(Dge,{name:D1[e].icon}),oe.jsx(Ln,{size:"3",weight:"medium",children:D1[e].name})]}),oe.jsx(Ln,{children:D1[e].description})]},e)})})})]})})},Fet=({sendTo:t})=>{const{isAuthenticated:e,username:r,handleSignIn:n,handleSignOut:i}=G5(),[s,o]=zpe(),a=C$();return E.useEffect(()=>{e&&a(`/${s.get("app")}`)},[e]),oe.jsx("div",{children:e?oe.jsx("p",{children:"Hey"}):oe.jsx("button",{className:"text-xs font-semibold opacity-70 hover:opacity-100 hover:bg-blue-300 w-20",onClick:n,children:"Sign In"})})},Fa=t=>{let e=class extends t{clone(){var l;const r=md(this);$Le(r,"unable to clone instance of non-accessor class");const n=r.metadata,i=r.store,s={},o=new Map;for(const u in n){const d=n[u],f=i==null?void 0:i.originOf(u),m=d.clonable;if(d.readOnly||m===!1||f!==qs.USER&&f!==qs.DEFAULTS&&f!==qs.WEB_MAP&&f!==qs.WEB_SCENE)continue;const v=this[u];let b=null;b=typeof m=="function"?m(v):m==="reference"?v:Yj(v),v!=null&&b==null||(f===qs.DEFAULTS?o.set(u,b):s[u]=b)}const a=new(Object.getPrototypeOf(this)).constructor(s);if(o.size){const u=(l=md(a))==null?void 0:l.store;if(u)for(const[d,f]of o)u.set(d,f,qs.DEFAULTS)}return a}};return e=T([_t("esri.core.Clonable")],e),e};let Gre=class extends Fa(Iu){};Gre=T([_t("esri.core.Clonable")],Gre);function un(t,e,r){let n,i;return e===void 0||Array.isArray(e)?(i=t,r=e,n=[void 0]):(i=e,n=Array.isArray(t)?t:[t]),(s,o)=>{const a=s.constructor.prototype;n.forEach(l=>{const u=$1e(s,l,i);u.read&&typeof u.read=="object"||(u.read={}),u.read.reader=a[o],r&&(u.read.source=(u.read.source||[]).concat(r))})}}function On(t,e,r){let n,i;return e===void 0?(i=t,n=[void 0]):typeof e!="string"?(i=t,n=[void 0],r=e):(i=e,n=Array.isArray(t)?t:[t]),(s,o)=>{const a=s.constructor.prototype;for(const l of n){const u=$1e(s,l,i);u.write&&typeof u.write=="object"||(u.write={}),r&&(u.write.target=r),u.write.writer=a[o]}}}async function zet(t,e){const{WhereClause:r}=await fs(()=>import("./WhereClause-CILeHwR9.js").then(n=>n.W),__vite__mapDeps([11,12]));return r.create(t,e)}function Bet(t,e){return t==="1=1"?e??t:e==="1=1"?t??e:t!=null&&t!==""?e!=null&&e!==""?`(${t}) AND (${e})`:t:e}function t_(){return[0,0,0]}function jet(t){return[t[0],t[1],t[2]]}function tE(t,e,r){return[t,e,r]}function Vet(t,e=t_()){const r=Math.min(3,t.length);for(let n=0;n0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function Yye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ptt(t,e,r){const n=e[0],i=e[1],s=e[2],o=r[0],a=r[1],l=r[2];return t[0]=i*l-s*a,t[1]=s*o-n*l,t[2]=n*a-i*o,t}function mtt(t,e,r,n){const i=e[0],s=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=o+n*(r[2]-o),t}function gtt(t,e,r,n,i,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),d=o*(3-2*s);return t[0]=e[0]*a+r[0]*l+n[0]*u+i[0]*d,t[1]=e[1]*a+r[1]*l+n[1]*u+i[1]*d,t[2]=e[2]*a+r[2]*l+n[2]*u+i[2]*d,t}function ytt(t,e,r,n,i,s){const o=1-s,a=o*o,l=s*s,u=a*o,d=3*s*a,f=3*l*o,m=l*s;return t[0]=e[0]*u+r[0]*d+n[0]*f+i[0]*m,t[1]=e[1]*u+r[1]*d+n[1]*f+i[1]*m,t[2]=e[2]*u+r[2]*d+n[2]*f+i[2]*m,t}function vtt(t,e){e=e||1;const r=oX,n=2*r()*Math.PI,i=2*r()-1,s=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*s,t[1]=Math.sin(n)*s,t[2]=i*e,t}function _tt(t,e,r){const n=e[0],i=e[1],s=e[2];return t[0]=r[0]*n+r[4]*i+r[8]*s+r[12],t[1]=r[1]*n+r[5]*i+r[9]*s+r[13],t[2]=r[2]*n+r[6]*i+r[10]*s+r[14],t}function xtt(t,e,r){const n=e[0],i=e[1],s=e[2];return t[0]=n*r[0]+i*r[3]+s*r[6],t[1]=n*r[1]+i*r[4]+s*r[7],t[2]=n*r[2]+i*r[5]+s*r[8],t}function wtt(t,e,r){const n=r[0],i=r[1],s=r[2],o=r[3],a=e[0],l=e[1],u=e[2],d=i*u-s*l,f=s*a-n*u,m=n*l-i*a,v=i*m-s*f,b=s*d-n*m,M=n*f-i*d,O=2*o;return t[0]=a+d*O+2*v,t[1]=l+f*O+2*b,t[2]=u+m*O+2*M,t}function btt(t,e,r,n){const i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[0],s[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),s[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Ctt(t,e,r,n){const i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),s[1]=i[1],s[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Stt(t,e,r,n){const i=[],s=[];return i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],s[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),s[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),s[2]=i[2],t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Ett(t,e){WV(qre,t),WV(Wre,e);const r=Yye(qre,Wre);return r>1?0:r<-1?Math.PI:Math.acos(r)}const qre=t_(),Wre=t_();function Mtt(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Ttt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Itt(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],s=e[0],o=e[1],a=e[2],l=r_();return Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=l*Math.max(1,Math.abs(i),Math.abs(a))}function Rtt(t,e,r){const n=r[0]-e[0],i=r[1]-e[1],s=r[2]-e[2];let o=n*n+i*i+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=n*o,t[1]=i*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const Ltt=Uye,ktt=Hye,Att=Gye,Ptt=qye,$tt=Wye,Ott=aX,Ntt=Zye;Object.freeze(Object.defineProperty({__proto__:null,abs:stt,add:rtt,angle:Ett,bezier:ytt,ceil:ntt,copy:ttt,cross:ptt,direction:Rtt,dist:Ptt,distance:qye,div:Att,divide:Gye,dot:Yye,equals:Itt,exactEquals:Ttt,floor:itt,hermite:gtt,inverse:ftt,len:Ott,length:aX,lerp:mtt,max:ltt,min:att,mul:ktt,multiply:Hye,negate:dtt,normalize:WV,random:vtt,rotateX:btt,rotateY:Ctt,rotateZ:Stt,round:utt,scale:ctt,scaleAndAdd:htt,set:Vye,sign:ott,sqrDist:$tt,sqrLen:Ntt,squaredDistance:Wye,squaredLength:Zye,str:Mtt,sub:Ltt,subtract:Uye,transformMat3:xtt,transformMat4:_tt,transformQuat:wtt},Symbol.toStringTag,{value:"Module"}));const Zre=new Float32Array(1);function ZTt(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function rE(t,e,r){return Math.min(Math.max(t,e),r)}function Dtt(t,e,r){return t+(e-t)*r}function YTt(t,e,r,n,i){return Dtt(n,i,(t-e)/(r-e))}function Ftt(t){return t*Math.PI/180}function ztt(t){return 180*t/Math.PI}function XTt(t){return Math.acos(rE(t,-1,1))}function Xye(t){return Math.asin(rE(t,-1,1))}function PF(t,e,r=1e-6){return t===e?!0:!Number.isFinite(t)||!Number.isFinite(e)?!1:(t>e?t-e:e-t)<=r}const OA=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function ZV(t){return OA.setFloat64(0,t),OA.getBigInt64(0)}function Btt(t){return OA.setBigInt64(0,t),OA.getFloat64(0)}const rL=BigInt("1000000"),jtt=Jye(1);function Jye(t){const e=ZV(t=Math.abs(t)),r=Btt(e<=rL?rL:e-rL);return Math.abs(t-r)}function JTt(t,e,r=jtt){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(r!=null&&Jye(Math.min(Math.abs(t),Math.abs(e)))rL)}function KTt(t){return Kye(Math.max(-Yre,Math.min(t,Yre)))}function Kye(t){return Zre[0]=t,Zre[0]}function QTt(t,e){const r=aX(t),n=Xye(t[2]/r),i=Math.atan2(t[1]/r,t[0]/r);return Vye(e,r,n,i),e}function eIt(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],n=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(PF(e,1)&&PF(r,1)&&PF(n,1))}const Yre=Kye(34028234663852886e22);function tIt(t){return typeof t=="number"}function lX(t){return typeof t=="string"||t instanceof String}const Vtt="yyyy-MM-dd",Utt="TT";var A6;(function(t){t.HM="HH:mm",t.HMS="HH:mm:ss",t.HMS_MS="HH:mm:ss.SSS"})(A6||(A6={}));const Htt=[A6.HMS_MS,A6.HMS,A6.HM,Utt];function Xre(t){if(!t||!lX(t))return null;const e=vs.fromFormat(t,Vtt);return e.isValid?e:null}function Jre(t){return t&&lX(t)?NLe(Htt,e=>{const r=vs.fromFormat(t,e);return r.isValid?r:null})??null:null}function Kre(t){if(!t||!lX(t))return null;const e=vs.fromISO(t);return e.isValid?e:null}var ww;(function(t){t.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",t.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"})(ww||(ww={}));const Gtt=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function qtt(t){return t!=null&&Gtt.has(t.type)}function Qye(t){return t!=null&&(t.type==="date-only"||t.type==="esriFieldTypeDateOnly")}function eve(t){return t!=null&&(t.type==="timestamp-offset"||t.type==="esriFieldTypeTimestampOffset")}function tve(t){return t!=null&&(t.type==="time-only"||t.type==="esriFieldTypeTimeOnly")}function Wtt(t,e,r){const n=t==null?void 0:t.domain;if(!n)return null;switch(n.type){case"range":{const{min:i,max:s}=Ztt(t);if(i!=null&&+es)return ww.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(n.codedValues==null||n.codedValues.every(i=>i==null||i.code!==e))return ww.INVALID_CODED_VALUE}return null}function Ztt(t,e){const r=t==null?void 0:t.domain;if(!r||r.type!=="range")return;const n="range"in r?r.range[0]:r.minValue,i="range"in r?r.range[1]:r.maxValue,s=qtt(t);return Qye(t)||tve(t)||eve(t)?{...Ytt(t,i,n),isInteger:s}:{min:n!=null&&typeof n=="number"?n:null,max:i!=null&&typeof i=="number"?i:null,rawMin:n,rawMax:i,isInteger:s}}function Ytt(t,e,r){var n,i,s,o,a,l;return Qye(t)?{min:(n=Xre(r))==null?void 0:n.toMillis(),max:(i=Xre(e))==null?void 0:i.toMillis(),rawMin:r,rawMax:e}:tve(t)?{min:(s=Jre(r))==null?void 0:s.toMillis(),max:(o=Jre(e))==null?void 0:o.toMillis(),rawMin:r,rawMax:e}:eve(t)?{min:(a=Kre(r))==null?void 0:a.toMillis(),max:(l=Kre(e))==null?void 0:l.toMillis(),rawMin:r,rawMax:e}:{max:null,min:null}}let uX=class{constructor(e,r,n,i){this.semiMajorAxis=e,this.flattening=r,this.outerAtmosphereRimWidth=n;const s=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*s,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=i||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}};const $l=new uX(6378137,1/298.257223563,3e5,.006694379990137799),sm=new uX(3396190,1/169.8944472236118,23e4),k2=new uX(1737400,0,0);let $F,Kt=null;function rve(){return!!Kt}function Xtt(){return!!Sr("esri-wasm")}function nve(){return $F||($F=fs(()=>import("./pe-wasm-CCKBX_Eg.js"),__vite__mapDeps([13,14])).then(t=>t.p).then(({default:t})=>t({locateFile:e=>qS(`esri/geometry/support/${e}`)})).then(t=>{sve(t)}),$F)}var YV,Xa,XV;(function(t){function e(s,o,a){Kt.ensureCache.prepare();const l=z3(a),u=a===l,d=Kt.ensureFloat64(l),f=Kt._pe_geog_to_proj(Kt.getPointer(s),o,d);return f&&Dv(a,o,d,u),f}function r(s,o,a,l){switch(l){case Xa.PE_TRANSFORM_P_TO_G:return n(s,o,a);case Xa.PE_TRANSFORM_G_TO_P:return e(s,o,a)}return 0}function n(s,o,a){return i(s,o,a,0)}function i(s,o,a,l){Kt.ensureCache.prepare();const u=z3(a),d=a===u,f=Kt.ensureFloat64(u),m=Kt._pe_proj_to_geog_center(Kt.getPointer(s),o,f,l);return m&&Dv(a,o,f,d),m}t.geogToProj=e,t.projGeog=r,t.projToGeog=n,t.projToGeogCenter=i})(YV||(YV={})),function(t){function e(){t.PE_BUFFER_MAX=Kt.PeDefs.prototype.PE_BUFFER_MAX,t.PE_NAME_MAX=Kt.PeDefs.prototype.PE_NAME_MAX,t.PE_MGRS_MAX=Kt.PeDefs.prototype.PE_MGRS_MAX,t.PE_USNG_MAX=Kt.PeDefs.prototype.PE_USNG_MAX,t.PE_DD_MAX=Kt.PeDefs.prototype.PE_DD_MAX,t.PE_DDM_MAX=Kt.PeDefs.prototype.PE_DDM_MAX,t.PE_DMS_MAX=Kt.PeDefs.prototype.PE_DMS_MAX,t.PE_UTM_MAX=Kt.PeDefs.prototype.PE_UTM_MAX,t.PE_PARM_MAX=Kt.PeDefs.prototype.PE_PARM_MAX,t.PE_TYPE_NONE=Kt.PeDefs.prototype.PE_TYPE_NONE,t.PE_TYPE_GEOGCS=Kt.PeDefs.prototype.PE_TYPE_GEOGCS,t.PE_TYPE_PROJCS=Kt.PeDefs.prototype.PE_TYPE_PROJCS,t.PE_TYPE_GEOGTRAN=Kt.PeDefs.prototype.PE_TYPE_GEOGTRAN,t.PE_TYPE_COORDSYS=Kt.PeDefs.prototype.PE_TYPE_COORDSYS,t.PE_TYPE_UNIT=Kt.PeDefs.prototype.PE_TYPE_UNIT,t.PE_TYPE_LINUNIT=Kt.PeDefs.prototype.PE_TYPE_LINUNIT,t.PE_STR_OPTS_NONE=Kt.PeDefs.prototype.PE_STR_OPTS_NONE,t.PE_STR_AUTH_NONE=Kt.PeDefs.prototype.PE_STR_AUTH_NONE,t.PE_STR_AUTH_TOP=Kt.PeDefs.prototype.PE_STR_AUTH_TOP,t.PE_STR_NAME_CANON=Kt.PeDefs.prototype.PE_STR_NAME_CANON,t.PE_STR_FMT_WKT=Kt.PeDefs.prototype.PE_STR_FMT_WKT,t.PE_STR_FMT_WKT2=Kt.PeDefs.prototype.PE_STR_FMT_WKT2,t.PE_PARM_X0=Kt.PeDefs.prototype.PE_PARM_X0,t.PE_PARM_ND=Kt.PeDefs.prototype.PE_PARM_ND,t.PE_TRANSFORM_1_TO_2=Kt.PeDefs.prototype.PE_TRANSFORM_1_TO_2,t.PE_TRANSFORM_2_TO_1=Kt.PeDefs.prototype.PE_TRANSFORM_2_TO_1,t.PE_TRANSFORM_P_TO_G=Kt.PeDefs.prototype.PE_TRANSFORM_P_TO_G,t.PE_TRANSFORM_G_TO_P=Kt.PeDefs.prototype.PE_TRANSFORM_G_TO_P,t.PE_HORIZON_RECT=Kt.PeDefs.prototype.PE_HORIZON_RECT,t.PE_HORIZON_POLY=Kt.PeDefs.prototype.PE_HORIZON_POLY,t.PE_HORIZON_LINE=Kt.PeDefs.prototype.PE_HORIZON_LINE,t.PE_HORIZON_DELTA=Kt.PeDefs.prototype.PE_HORIZON_DELTA}t.init=e}(Xa||(Xa={})),function(t){const e={},r={},n=v=>{if(v){const b=v.getType();switch(b){case Xa.PE_TYPE_GEOGCS:v=Kt.castObject(v,Kt.PeGeogcs);break;case Xa.PE_TYPE_PROJCS:v=Kt.castObject(v,Kt.PeProjcs);break;case Xa.PE_TYPE_GEOGTRAN:v=Kt.castObject(v,Kt.PeGeogtran);break;default:b&Xa.PE_TYPE_UNIT&&(v=Kt.castObject(v,Kt.PeUnit))}}return v};function i(){Kt.PeFactory.prototype.initialize(null)}function s(v){return o(Xa.PE_TYPE_COORDSYS,v)}function o(v,b){let M=null,O=e[v];if(O||(O={},e[v]=O),O.hasOwnProperty(String(b)))M=O[b];else{const I=Kt.PeFactory.prototype.factoryByType(v,b);Kt.compare(I,Kt.NULL)||(M=I,O[b]=M)}return M=n(M),M}function a(v,b){let M=null,O=r[v];if(O||(O={},r[v]=O),O.hasOwnProperty(b))M=O[b];else{const I=Kt.PeFactory.prototype.fromString(v,b);Kt.compare(I,Kt.NULL)||(M=I,O[b]=M)}return M=n(M),M}function l(v){return o(Xa.PE_TYPE_GEOGCS,v)}function u(v){return o(Xa.PE_TYPE_GEOGTRAN,v)}function d(v){return Kt.PeFactory.prototype.getCode(v)}function f(v){return o(Xa.PE_TYPE_PROJCS,v)}function m(v){return o(Xa.PE_TYPE_UNIT,v)}t.initialize=i,t.coordsys=s,t.factoryByType=o,t.fromString=a,t.geogcs=l,t.geogtran=u,t.getCode=d,t.projcs=f,t.unit=m}(XV||(XV={}));let ive=null;var NA,JV,KV,QV,DA,eU,FA,zA,tU;function sve(t){function e(s,o,a){s[o]=a(s[o])}Kt=t,Xa.init(),NA.init(),DA.init(),FA.init(),zA.init(),ive=class extends Kt.PeGCSExtent{destroy(){Kt.destroy(this)}};const r=[Kt.PeDatum,Kt.PeGeogcs,Kt.PeGeogtran,Kt.PeObject,Kt.PeParameter,Kt.PePrimem,Kt.PeProjcs,Kt.PeSpheroid,Kt.PeUnit];for(const s of r)e(s.prototype,"getName",o=>function(){return o.call(this,new Array(Xa.PE_NAME_MAX))});for(const s of[Kt.PeGeogtran,Kt.PeProjcs])e(s.prototype,"getParameters",o=>function(){const a=new Array(Xa.PE_PARM_MAX);let l=o.call(this);for(let u=0;ufunction(){const o=this.getSize();if(!o)return null;const a=[];return Dv(a,o,s.call(this)),a}),e(Kt.PeGTlistExtendedEntry.prototype,"getEntries",s=>{const o=Kt._pe_getPeGTlistExtendedGTsSize();return function(){let a=null;const l=s.call(this);if(!Kt.compare(l,Kt.NULL)){a=[l];const u=this.getSteps();if(u>1){const d=Kt.getPointer(l);for(let f=1;ffunction(){let o=this._cache;if(o||(o=new Map,this._cache=o),o.has(s))return o.get(s);let a=null;const l=s.call(this);if(!Kt.compare(l,Kt.NULL)){a=[l];const u=l.getNump();if(u>1){const d=Kt.getPointer(l);for(let f=1;f{e.push(r[0],r[1])})):e=t,e}function Dv(t,e,r,n=!1){if(n)for(let i=0;i<2*e;i++)t[i]=Kt.getValue(r+i*Float64Array.BYTES_PER_ELEMENT,"double");else{const i=t.length===0;for(let s=0;s1)){const v=Kt.getPointer(m);for(let b=1;b{Km(i);const s=i.getGeogtran();Km(s),s.getParameters().forEach(Km),[s.getGeogcs1(),s.getGeogcs2()].forEach(o=>{Km(o);const a=o.getDatum();Km(a),Km(a.getSpheroid()),Km(o.getPrimem()),Km(o.getUnit())})});Kt.PeGTlistExtendedEntry.prototype.Delete(r[0])}}t.destroy=e}(JV||(JV={})),function(t){function e(r,n,i,s,o){Kt.ensureCache.prepare();const a=z3(i),l=i===a,u=Kt.ensureFloat64(a);let d=0;s&&(d=Kt.ensureFloat64(s));const f=Kt._pe_geog_to_geog(Kt.getPointer(r),n,u,d,o);return f&&Dv(i,n,u,l),f}t.geogToGeog=e}(KV||(KV={})),function(t){const e=(u,d,f,m,v,b)=>{let M,O;switch(Kt.ensureCache.prepare(),u){case"dd":M=Kt._pe_geog_to_dd,O=Xa.PE_DD_MAX;break;case"ddm":M=Kt._pe_geog_to_ddm,O=Xa.PE_DDM_MAX;break;case"dms":M=Kt._pe_geog_to_dms,O=Xa.PE_DMS_MAX}let I=0;d&&(I=Kt.getPointer(d));const A=z3(m),j=Kt.ensureFloat64(A),H=GT(f,O),W=M(I,f,j,v,Kt.ensureInt32(H));if(W)for(let re=0;re{let b;switch(Kt.ensureCache.prepare(),u){case"dd":b=Kt._pe_dd_to_geog;break;case"ddm":b=Kt._pe_ddm_to_geog;break;case"dms":b=Kt._pe_dms_to_geog}let M=0;d&&(M=Kt.getPointer(d));const O=m.map(H=>Kt.ensureString(H)),I=Kt.ensureInt32(O),A=Kt.ensureFloat64(new Array(2*f)),j=b(M,f,I,A);return j&&Dv(v,f,A),j};function n(u,d,f,m,v){return e("dms",u,d,f,m,v)}function i(u,d,f,m){return r("dms",u,d,f,m)}function s(u,d,f,m,v){return e("ddm",u,d,f,m,v)}function o(u,d,f,m){return r("ddm",u,d,f,m)}function a(u,d,f,m,v){return e("dd",u,d,f,m,v)}function l(u,d,f,m){return r("dd",u,d,f,m)}t.geogToDms=n,t.dmsToGeog=i,t.geogToDdm=s,t.ddmToGeog=o,t.geogToDd=a,t.ddToGeog=l}(QV||(QV={})),function(t){function e(){t.PE_MGRS_STYLE_NEW=Kt.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,t.PE_MGRS_STYLE_OLD=Kt.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,t.PE_MGRS_STYLE_AUTO=Kt.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,t.PE_MGRS_180_ZONE_1_PLUS=Kt.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,t.PE_MGRS_ADD_SPACES=Kt.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(i,s,o,a,l,u,d){Kt.ensureCache.prepare();let f=0;i&&(f=Kt.getPointer(i));const m=z3(o),v=Kt.ensureFloat64(m),b=GT(s,Xa.PE_MGRS_MAX),M=Kt.ensureInt32(b),O=Kt._pe_geog_to_mgrs_extended(f,s,v,a,l,u,M);if(O)for(let I=0;IKt.ensureString(b)),f=Kt.ensureInt32(d),m=Kt.ensureFloat64(new Array(2*s)),v=Kt._pe_mgrs_to_geog_extended(u,s,f,a,m);return v&&Dv(l,s,m),v}t.init=e,t.geogToMgrsExtended=r,t.mgrsToGeogExtended=n}(DA||(DA={})),function(t){function e(n,i,s,o,a,l,u){Kt.ensureCache.prepare();let d=0;n&&(d=Kt.getPointer(n));const f=z3(s),m=Kt.ensureFloat64(f),v=GT(i,Xa.PE_MGRS_MAX),b=Kt.ensureInt32(v),M=Kt._pe_geog_to_usng(d,i,m,o,a,l,b);if(M)for(let O=0;OKt.ensureString(m)),u=Kt.ensureInt32(l),d=Kt.ensureFloat64(new Array(2*i)),f=Kt._pe_usng_to_geog(a,i,u,d);return f&&Dv(o,i,d),f}t.geogToUsng=e,t.usngToGeog=r}(eU||(eU={})),function(t){function e(){t.PE_UTM_OPTS_NONE=Kt.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,t.PE_UTM_OPTS_ADD_SPACES=Kt.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,t.PE_UTM_OPTS_NS=Kt.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(i,s,o,a,l){Kt.ensureCache.prepare();let u=0;i&&(u=Kt.getPointer(i));const d=z3(o),f=Kt.ensureFloat64(d),m=GT(s,Xa.PE_UTM_MAX),v=Kt.ensureInt32(m),b=Kt._pe_geog_to_utm(u,s,f,a,v);if(b)for(let M=0;MKt.ensureString(b)),f=Kt.ensureInt32(d),m=Kt.ensureFloat64(new Array(2*s)),v=Kt._pe_utm_to_geog(u,s,f,a,m);return v&&Dv(l,s,m),v}t.init=e,t.geogToUtm=r,t.utmToGeog=n}(FA||(FA={})),function(t){const e=new Map;function r(){t.PE_PCSINFO_OPTION_NONE=Kt.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,t.PE_PCSINFO_OPTION_DOMAIN=Kt.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,t.PE_POLE_OUTSIDE_BOUNDARY=Kt.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,t.PE_POLE_POINT=Kt.PePCSInfo.prototype.PE_POLE_POINT}function n(i,s=t.PE_PCSINFO_OPTION_DOMAIN){let o=null,a=null;return e.has(i)&&(a=e.get(i),a[s]&&(o=a[s])),o||(o=Kt.PePCSInfo.prototype.generate(i,s),a||(a=[],e.set(i,a)),a[s]=o),o}t.init=r,t.generate=n}(zA||(zA={})),function(t){function e(){return Kt.PeVersion.prototype.version_string()}t.versionString=e}(tU||(tU={}));const Jtt=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return YV},get PeDefs(){return Xa},get PeFactory(){return XV},get PeGCSExtent(){return ive},get PeGTTransformations(){return KV},get PeGTlistExtended(){return NA},get PeGTlistExtendedEntry(){return JV},get PeNotationDms(){return QV},get PeNotationMgrs(){return DA},get PeNotationUsng(){return eU},get PeNotationUtm(){return FA},get PePCSInfo(){return zA},get PeVersion(){return tU},_init:sve,get _pe(){return Kt},isLoaded:rve,isSupported:Xtt,load:nve},Symbol.toStringTag,{value:"Module"}));var x5;(function(t){t[t.CGCS2000=4490]="CGCS2000",t[t.GCSMARS2000=104971]="GCSMARS2000",t[t.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",t[t.GCSMOON2000=104903]="GCSMOON2000"})(x5||(x5={}));let P;const Ae={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,10477:0,10481:2,10516:2,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1};for(P=2e3;P<=2045;P++)Ae[P]=0;for(P=2056;P<=2065;P++)Ae[P]=0;for(P=2067;P<=2135;P++)Ae[P]=0;for(P=2137;P<=2154;P++)Ae[P]=0;for(P=2161;P<=2170;P++)Ae[P]=0;for(P=2172;P<=2193;P++)Ae[P]=0;for(P=2195;P<=2198;P++)Ae[P]=0;for(P=2200;P<=2203;P++)Ae[P]=0;for(P=2205;P<=2217;P++)Ae[P]=0;for(P=2222;P<=2224;P++)Ae[P]=1;for(P=2225;P<=2250;P++)Ae[P]=2;for(P=2251;P<=2253;P++)Ae[P]=1;for(P=2257;P<=2264;P++)Ae[P]=2;for(P=2274;P<=2279;P++)Ae[P]=2;for(P=2280;P<=2282;P++)Ae[P]=1;for(P=2283;P<=2289;P++)Ae[P]=2;for(P=2290;P<=2292;P++)Ae[P]=0;for(P=2308;P<=2313;P++)Ae[P]=0;for(P=2315;P<=2491;P++)Ae[P]=0;for(P=2494;P<=2866;P++)Ae[P]=0;for(P=2867;P<=2869;P++)Ae[P]=1;for(P=2870;P<=2888;P++)Ae[P]=2;for(P=2891;P<=2895;P++)Ae[P]=2;for(P=2896;P<=2898;P++)Ae[P]=1;for(P=2902;P<=2908;P++)Ae[P]=2;for(P=2915;P<=2920;P++)Ae[P]=2;for(P=2921;P<=2923;P++)Ae[P]=1;for(P=2924;P<=2930;P++)Ae[P]=2;for(P=2931;P<=2962;P++)Ae[P]=0;for(P=2964;P<=2968;P++)Ae[P]=2;for(P=2969;P<=2973;P++)Ae[P]=0;for(P=2975;P<=2991;P++)Ae[P]=0;for(P=2995;P<=3051;P++)Ae[P]=0;for(P=3054;P<=3079;P++)Ae[P]=0;for(P=3081;P<=3088;P++)Ae[P]=0;for(P=3092;P<=3101;P++)Ae[P]=0;for(P=3106;P<=3138;P++)Ae[P]=0;for(P=3146;P<=3151;P++)Ae[P]=0;for(P=3153;P<=3166;P++)Ae[P]=0;for(P=3168;P<=3172;P++)Ae[P]=0;for(P=3174;P<=3203;P++)Ae[P]=0;for(P=3294;P<=3358;P++)Ae[P]=0;for(P=3367;P<=3403;P++)Ae[P]=0;for(P=3408;P<=3416;P++)Ae[P]=0;for(P=3417;P<=3438;P++)Ae[P]=2;for(P=3441;P<=3446;P++)Ae[P]=2;for(P=3447;P<=3450;P++)Ae[P]=0;for(P=3451;P<=3459;P++)Ae[P]=2;for(P=3460;P<=3478;P++)Ae[P]=0;for(P=3554;P<=3559;P++)Ae[P]=0;for(P=3560;P<=3570;P++)Ae[P]=2;for(P=3571;P<=3581;P++)Ae[P]=0;for(P=3594;P<=3597;P++)Ae[P]=0;for(P=3601;P<=3604;P++)Ae[P]=0;for(P=3637;P<=3639;P++)Ae[P]=0;for(P=3665;P<=3667;P++)Ae[P]=0;for(P=3693;P<=3695;P++)Ae[P]=0;for(P=3701;P<=3727;P++)Ae[P]=0;for(P=3728;P<=3739;P++)Ae[P]=2;for(P=3740;P<=3751;P++)Ae[P]=0;for(P=3753;P<=3760;P++)Ae[P]=2;for(P=3761;P<=3773;P++)Ae[P]=0;for(P=3775;P<=3777;P++)Ae[P]=0;for(P=3779;P<=3781;P++)Ae[P]=0;for(P=3783;P<=3785;P++)Ae[P]=0;for(P=3788;P<=3791;P++)Ae[P]=0;for(P=3797;P<=3802;P++)Ae[P]=0;for(P=3814;P<=3816;P++)Ae[P]=0;for(P=3825;P<=3829;P++)Ae[P]=0;for(P=3832;P<=3841;P++)Ae[P]=0;for(P=3844;P<=3852;P++)Ae[P]=0;for(P=3873;P<=3885;P++)Ae[P]=0;for(P=3890;P<=3893;P++)Ae[P]=0;for(P=3907;P<=3912;P++)Ae[P]=0;for(P=3942;P<=3950;P++)Ae[P]=0;for(P=3968;P<=3970;P++)Ae[P]=0;for(P=3973;P<=3976;P++)Ae[P]=0;for(P=3986;P<=3989;P++)Ae[P]=0;for(P=3994;P<=3997;P++)Ae[P]=0;for(P=4048;P<=4051;P++)Ae[P]=0;for(P=4056;P<=4063;P++)Ae[P]=0;for(P=4093;P<=4096;P++)Ae[P]=0;for(P=4390;P<=4398;P++)Ae[P]=0;for(P=4399;P<=4413;P++)Ae[P]=2;for(P=4418;P<=4433;P++)Ae[P]=2;for(P=4455;P<=4457;P++)Ae[P]=2;for(P=4484;P<=4489;P++)Ae[P]=0;for(P=4491;P<=4554;P++)Ae[P]=0;for(P=4568;P<=4589;P++)Ae[P]=0;for(P=4652;P<=4656;P++)Ae[P]=0;for(P=4766;P<=4800;P++)Ae[P]=0;for(P=5014;P<=5016;P++)Ae[P]=0;for(P=5069;P<=5072;P++)Ae[P]=0;for(P=5105;P<=5130;P++)Ae[P]=0;for(P=5167;P<=5188;P++)Ae[P]=0;for(P=5253;P<=5259;P++)Ae[P]=0;for(P=5269;P<=5275;P++)Ae[P]=0;for(P=5292;P<=5311;P++)Ae[P]=0;for(P=5329;P<=5331;P++)Ae[P]=0;for(P=5343;P<=5349;P++)Ae[P]=0;for(P=5355;P<=5357;P++)Ae[P]=0;for(P=5387;P<=5389;P++)Ae[P]=0;for(P=5459;P<=5463;P++)Ae[P]=0;for(P=5479;P<=5482;P++)Ae[P]=0;for(P=5518;P<=5520;P++)Ae[P]=0;for(P=5530;P<=5539;P++)Ae[P]=0;for(P=5550;P<=5552;P++)Ae[P]=0;for(P=5562;P<=5583;P++)Ae[P]=0;for(P=5623;P<=5625;P++)Ae[P]=2;for(P=5631;P<=5639;P++)Ae[P]=0;for(P=5649;P<=5653;P++)Ae[P]=0;for(P=5663;P<=5680;P++)Ae[P]=0;for(P=5682;P<=5685;P++)Ae[P]=0;for(P=5875;P<=5877;P++)Ae[P]=0;for(P=5896;P<=5899;P++)Ae[P]=0;for(P=5921;P<=5940;P++)Ae[P]=0;for(P=6050;P<=6125;P++)Ae[P]=0;for(P=6244;P<=6275;P++)Ae[P]=0;for(P=6328;P<=6348;P++)Ae[P]=0;for(P=6350;P<=6356;P++)Ae[P]=0;for(P=6366;P<=6372;P++)Ae[P]=0;for(P=6381;P<=6387;P++)Ae[P]=0;for(P=6393;P<=6404;P++)Ae[P]=0;for(P=6480;P<=6483;P++)Ae[P]=0;for(P=6511;P<=6514;P++)Ae[P]=0;for(P=6579;P<=6581;P++)Ae[P]=0;for(P=6619;P<=6624;P++)Ae[P]=0;for(P=6625;P<=6627;P++)Ae[P]=2;for(P=6628;P<=6632;P++)Ae[P]=0;for(P=6634;P<=6637;P++)Ae[P]=0;for(P=6669;P<=6692;P++)Ae[P]=0;for(P=6707;P<=6709;P++)Ae[P]=0;for(P=6720;P<=6723;P++)Ae[P]=0;for(P=6732;P<=6738;P++)Ae[P]=0;for(P=6931;P<=6933;P++)Ae[P]=0;for(P=6956;P<=6959;P++)Ae[P]=0;for(P=7005;P<=7007;P++)Ae[P]=0;for(P=7057;P<=7070;P++)Ae[P]=2;for(P=7074;P<=7082;P++)Ae[P]=0;for(P=7109;P<=7118;P++)Ae[P]=0;for(P=7119;P<=7127;P++)Ae[P]=1;for(P=7374;P<=7376;P++)Ae[P]=0;for(P=7528;P<=7586;P++)Ae[P]=0;for(P=7587;P<=7645;P++)Ae[P]=2;for(P=7692;P<=7696;P++)Ae[P]=0;for(P=7755;P<=7787;P++)Ae[P]=0;for(P=7791;P<=7795;P++)Ae[P]=0;for(P=7799;P<=7801;P++)Ae[P]=0;for(P=7803;P<=7805;P++)Ae[P]=0;for(P=7825;P<=7831;P++)Ae[P]=0;for(P=7845;P<=7859;P++)Ae[P]=0;for(P=8013;P<=8032;P++)Ae[P]=0;for(P=8065;P<=8068;P++)Ae[P]=1;for(P=8518;P<=8529;P++)Ae[P]=2;for(P=8533;P<=8536;P++)Ae[P]=2;for(P=8538;P<=8540;P++)Ae[P]=2;for(P=8677;P<=8679;P++)Ae[P]=0;for(P=8836;P<=8840;P++)Ae[P]=0;for(P=8857;P<=8859;P++)Ae[P]=0;for(P=8908;P<=8910;P++)Ae[P]=0;for(P=9154;P<=9159;P++)Ae[P]=0;for(P=9205;P<=9218;P++)Ae[P]=0;for(P=9271;P<=9273;P++)Ae[P]=0;for(P=9295;P<=9297;P++)Ae[P]=0;for(P=9356;P<=9360;P++)Ae[P]=0;for(P=9404;P<=9407;P++)Ae[P]=0;for(P=9476;P<=9482;P++)Ae[P]=0;for(P=9487;P<=9494;P++)Ae[P]=0;for(P=9697;P<=9699;P++)Ae[P]=0;for(P=9821;P<=9865;P++)Ae[P]=0;for(P=10285;P<=10291;P++)Ae[P]=0;for(P=10314;P<=10317;P++)Ae[P]=0;for(P=10448;P<=10465;P++)Ae[P]=0;for(P=10731;P<=10733;P++)Ae[P]=0;for(P=11114;P<=11118;P++)Ae[P]=0;for(P=20004;P<=20032;P++)Ae[P]=0;for(P=20047;P<=20049;P++)Ae[P]=0;for(P=20062;P<=20092;P++)Ae[P]=0;for(P=20135;P<=20138;P++)Ae[P]=0;for(P=20248;P<=20258;P++)Ae[P]=0;for(P=20348;P<=20358;P++)Ae[P]=0;for(P=20436;P<=20440;P++)Ae[P]=0;for(P=20822;P<=20824;P++)Ae[P]=0;for(P=20904;P<=20932;P++)Ae[P]=0;for(P=20934;P<=20936;P++)Ae[P]=0;for(P=21004;P<=21032;P++)Ae[P]=0;for(P=21035;P<=21037;P++)Ae[P]=0;for(P=21095;P<=21097;P++)Ae[P]=0;for(P=21148;P<=21150;P++)Ae[P]=0;for(P=21207;P<=21264;P++)Ae[P]=0;for(P=21307;P<=21364;P++)Ae[P]=0;for(P=21413;P<=21423;P++)Ae[P]=0;for(P=21453;P<=21463;P++)Ae[P]=0;for(P=21473;P<=21483;P++)Ae[P]=0;for(P=21780;P<=21782;P++)Ae[P]=0;for(P=21891;P<=21894;P++)Ae[P]=0;for(P=21896;P<=21899;P++)Ae[P]=0;for(P=22171;P<=22177;P++)Ae[P]=0;for(P=22181;P<=22187;P++)Ae[P]=0;for(P=22191;P<=22197;P++)Ae[P]=0;for(P=22207;P<=22222;P++)Ae[P]=0;for(P=22229;P<=22232;P++)Ae[P]=0;for(P=22234;P<=22236;P++)Ae[P]=0;for(P=22243;P<=22250;P++)Ae[P]=0;for(P=22262;P<=22265;P++)Ae[P]=0;for(P=22307;P<=22322;P++)Ae[P]=0;for(P=22348;P<=22357;P++)Ae[P]=0;for(P=22407;P<=22422;P++)Ae[P]=0;for(P=22462;P<=22465;P++)Ae[P]=0;for(P=22521;P<=22525;P++)Ae[P]=0;for(P=22607;P<=22622;P++)Ae[P]=0;for(P=22641;P<=22646;P++)Ae[P]=0;for(P=22648;P<=22657;P++)Ae[P]=0;for(P=22707;P<=22722;P++)Ae[P]=0;for(P=22762;P<=22765;P++)Ae[P]=0;for(P=22807;P<=22822;P++)Ae[P]=0;for(P=22991;P<=22994;P++)Ae[P]=0;for(P=23028;P<=23038;P++)Ae[P]=0;for(P=23301;P<=23333;P++)Ae[P]=2;for(P=23830;P<=23853;P++)Ae[P]=0;for(P=23866;P<=23872;P++)Ae[P]=0;for(P=23877;P<=23884;P++)Ae[P]=0;for(P=23886;P<=23894;P++)Ae[P]=0;for(P=23946;P<=23948;P++)Ae[P]=0;for(P=24311;P<=24313;P++)Ae[P]=0;for(P=24342;P<=24347;P++)Ae[P]=0;for(P=24370;P<=24374;P++)Ae[P]=10;for(P=24375;P<=24381;P++)Ae[P]=0;for(P=24718;P<=24721;P++)Ae[P]=0;for(P=24817;P<=24821;P++)Ae[P]=0;for(P=24877;P<=24882;P++)Ae[P]=0;for(P=24891;P<=24893;P++)Ae[P]=0;for(P=25391;P<=25395;P++)Ae[P]=0;for(P=25828;P<=25838;P++)Ae[P]=0;for(P=26191;P<=26195;P++)Ae[P]=0;for(P=26391;P<=26393;P++)Ae[P]=0;for(P=26701;P<=26722;P++)Ae[P]=0;for(P=26729;P<=26799;P++)Ae[P]=2;for(P=26801;P<=26803;P++)Ae[P]=2;for(P=26811;P<=26813;P++)Ae[P]=2;for(P=26847;P<=26870;P++)Ae[P]=2;for(P=26891;P<=26899;P++)Ae[P]=0;for(P=26901;P<=26923;P++)Ae[P]=0;for(P=26929;P<=26946;P++)Ae[P]=0;for(P=26948;P<=26998;P++)Ae[P]=0;for(P=27037;P<=27040;P++)Ae[P]=0;for(P=27205;P<=27232;P++)Ae[P]=0;for(P=27258;P<=27260;P++)Ae[P]=0;for(P=27391;P<=27398;P++)Ae[P]=0;for(P=27561;P<=27564;P++)Ae[P]=0;for(P=27571;P<=27574;P++)Ae[P]=0;for(P=27581;P<=27584;P++)Ae[P]=0;for(P=27591;P<=27594;P++)Ae[P]=0;for(P=27700;P<=27707;P++)Ae[P]=0;for(P=28191;P<=28193;P++)Ae[P]=0;for(P=28348;P<=28358;P++)Ae[P]=0;for(P=28402;P<=28432;P++)Ae[P]=0;for(P=28462;P<=28492;P++)Ae[P]=0;for(P=29118;P<=29122;P++)Ae[P]=0;for(P=29168;P<=29172;P++)Ae[P]=0;for(P=29177;P<=29185;P++)Ae[P]=0;for(P=29187;P<=29195;P++)Ae[P]=0;for(P=29900;P<=29903;P++)Ae[P]=0;for(P=30161;P<=30179;P++)Ae[P]=0;for(P=30491;P<=30494;P++)Ae[P]=0;for(P=30729;P<=30732;P++)Ae[P]=0;for(P=31251;P<=31259;P++)Ae[P]=0;for(P=31265;P<=31268;P++)Ae[P]=0;for(P=31275;P<=31279;P++)Ae[P]=0;for(P=31281;P<=31297;P++)Ae[P]=0;for(P=31461;P<=31469;P++)Ae[P]=0;for(P=31491;P<=31495;P++)Ae[P]=0;for(P=31917;P<=31922;P++)Ae[P]=0;for(P=31965;P<=32e3;P++)Ae[P]=0;for(P=32001;P<=32003;P++)Ae[P]=2;for(P=32005;P<=32031;P++)Ae[P]=2;for(P=32033;P<=32060;P++)Ae[P]=2;for(P=32064;P<=32067;P++)Ae[P]=2;for(P=32074;P<=32077;P++)Ae[P]=2;for(P=32081;P<=32086;P++)Ae[P]=0;for(P=32107;P<=32130;P++)Ae[P]=0;for(P=32133;P<=32159;P++)Ae[P]=0;for(P=32164;P<=32167;P++)Ae[P]=2;for(P=32180;P<=32199;P++)Ae[P]=0;for(P=32201;P<=32260;P++)Ae[P]=0;for(P=32301;P<=32360;P++)Ae[P]=0;for(P=32401;P<=32460;P++)Ae[P]=0;for(P=32501;P<=32560;P++)Ae[P]=0;for(P=32601;P<=32662;P++)Ae[P]=0;for(P=32664;P<=32667;P++)Ae[P]=2;for(P=32701;P<=32761;P++)Ae[P]=0;for(P=53001;P<=53004;P++)Ae[P]=0;for(P=53008;P<=53019;P++)Ae[P]=0;for(P=53021;P<=53032;P++)Ae[P]=0;for(P=53034;P<=53037;P++)Ae[P]=0;for(P=53042;P<=53046;P++)Ae[P]=0;for(P=53074;P<=53080;P++)Ae[P]=0;for(P=54001;P<=54004;P++)Ae[P]=0;for(P=54008;P<=54019;P++)Ae[P]=0;for(P=54021;P<=54032;P++)Ae[P]=0;for(P=54034;P<=54037;P++)Ae[P]=0;for(P=54042;P<=54046;P++)Ae[P]=0;for(P=54048;P<=54053;P++)Ae[P]=0;for(P=54074;P<=54080;P++)Ae[P]=0;for(P=54098;P<=54101;P++)Ae[P]=0;for(P=102001;P<=102040;P++)Ae[P]=0;for(P=102042;P<=102063;P++)Ae[P]=0;for(P=102065;P<=102067;P++)Ae[P]=0;for(P=102070;P<=102117;P++)Ae[P]=0;for(P=102122;P<=102216;P++)Ae[P]=0;for(P=102221;P<=102377;P++)Ae[P]=0;for(P=102382;P<=102388;P++)Ae[P]=0;for(P=102389;P<=102398;P++)Ae[P]=2;for(P=102399;P<=102444;P++)Ae[P]=0;for(P=102445;P<=102447;P++)Ae[P]=2;for(P=102448;P<=102458;P++)Ae[P]=0;for(P=102459;P<=102468;P++)Ae[P]=2;for(P=102469;P<=102499;P++)Ae[P]=0;for(P=102500;P<=102519;P++)Ae[P]=1;for(P=102520;P<=102524;P++)Ae[P]=0;for(P=102525;P<=102529;P++)Ae[P]=2;for(P=102530;P<=102588;P++)Ae[P]=0;for(P=102590;P<=102598;P++)Ae[P]=0;for(P=102601;P<=102603;P++)Ae[P]=0;for(P=102605;P<=102628;P++)Ae[P]=0;for(P=102629;P<=102646;P++)Ae[P]=2;for(P=102648;P<=102700;P++)Ae[P]=2;for(P=102701;P<=102703;P++)Ae[P]=0;for(P=102707;P<=102730;P++)Ae[P]=2;for(P=102733;P<=102758;P++)Ae[P]=2;for(P=102767;P<=102900;P++)Ae[P]=0;for(P=102901;P<=102933;P++)Ae[P]=2;for(P=102934;P<=102950;P++)Ae[P]=13;for(P=102951;P<=102963;P++)Ae[P]=0;for(P=102965;P<=102969;P++)Ae[P]=0;for(P=102971;P<=102973;P++)Ae[P]=0;for(P=102975;P<=102989;P++)Ae[P]=0;for(P=102990;P<=102992;P++)Ae[P]=1;for(P=102997;P<=103002;P++)Ae[P]=0;for(P=103003;P<=103008;P++)Ae[P]=2;for(P=103009;P<=103011;P++)Ae[P]=0;for(P=103012;P<=103014;P++)Ae[P]=2;for(P=103019;P<=103021;P++)Ae[P]=0;for(P=103022;P<=103024;P++)Ae[P]=2;for(P=103029;P<=103031;P++)Ae[P]=0;for(P=103032;P<=103034;P++)Ae[P]=2;for(P=103065;P<=103068;P++)Ae[P]=0;for(P=103074;P<=103076;P++)Ae[P]=0;for(P=103077;P<=103079;P++)Ae[P]=1;for(P=103080;P<=103082;P++)Ae[P]=0;for(P=103083;P<=103085;P++)Ae[P]=2;for(P=103090;P<=103093;P++)Ae[P]=0;for(P=103097;P<=103099;P++)Ae[P]=0;for(P=103100;P<=103102;P++)Ae[P]=2;for(P=103107;P<=103109;P++)Ae[P]=0;for(P=103110;P<=103112;P++)Ae[P]=2;for(P=103113;P<=103116;P++)Ae[P]=0;for(P=103117;P<=103120;P++)Ae[P]=2;for(P=103153;P<=103157;P++)Ae[P]=0;for(P=103158;P<=103162;P++)Ae[P]=2;for(P=103163;P<=103165;P++)Ae[P]=0;for(P=103166;P<=103168;P++)Ae[P]=1;for(P=103169;P<=103171;P++)Ae[P]=2;for(P=103186;P<=103188;P++)Ae[P]=0;for(P=103189;P<=103191;P++)Ae[P]=2;for(P=103192;P<=103195;P++)Ae[P]=0;for(P=103196;P<=103199;P++)Ae[P]=2;for(P=103200;P<=103224;P++)Ae[P]=0;for(P=103225;P<=103227;P++)Ae[P]=1;for(P=103232;P<=103237;P++)Ae[P]=0;for(P=103238;P<=103243;P++)Ae[P]=2;for(P=103244;P<=103246;P++)Ae[P]=0;for(P=103247;P<=103249;P++)Ae[P]=2;for(P=103254;P<=103256;P++)Ae[P]=0;for(P=103257;P<=103259;P++)Ae[P]=2;for(P=103264;P<=103266;P++)Ae[P]=0;for(P=103267;P<=103269;P++)Ae[P]=2;for(P=103300;P<=103375;P++)Ae[P]=0;for(P=103381;P<=103383;P++)Ae[P]=0;for(P=103384;P<=103386;P++)Ae[P]=1;for(P=103387;P<=103389;P++)Ae[P]=0;for(P=103390;P<=103392;P++)Ae[P]=2;for(P=103397;P<=103399;P++)Ae[P]=0;for(P=103400;P<=103471;P++)Ae[P]=2;for(P=103476;P<=103478;P++)Ae[P]=0;for(P=103479;P<=103481;P++)Ae[P]=2;for(P=103486;P<=103488;P++)Ae[P]=0;for(P=103489;P<=103491;P++)Ae[P]=2;for(P=103492;P<=103495;P++)Ae[P]=0;for(P=103496;P<=103499;P++)Ae[P]=2;for(P=103528;P<=103543;P++)Ae[P]=0;for(P=103544;P<=103548;P++)Ae[P]=2;for(P=103549;P<=103551;P++)Ae[P]=0;for(P=103552;P<=103554;P++)Ae[P]=1;for(P=103555;P<=103557;P++)Ae[P]=2;for(P=103558;P<=103560;P++)Ae[P]=0;for(P=103571;P<=103573;P++)Ae[P]=0;for(P=103574;P<=103576;P++)Ae[P]=2;for(P=103577;P<=103580;P++)Ae[P]=0;for(P=103581;P<=103583;P++)Ae[P]=2;for(P=103595;P<=103694;P++)Ae[P]=0;for(P=103696;P<=103699;P++)Ae[P]=0;for(P=103700;P<=103793;P++)Ae[P]=2;for(P=103794;P<=103890;P++)Ae[P]=0;for(P=103891;P<=103896;P++)Ae[P]=2;for(P=103900;P<=103971;P++)Ae[P]=2;for(P=103972;P<=103977;P++)Ae[P]=0;for(P=112e3;P<=112101;P++)Ae[P]=0;const ove=[102100,102113,3857,3785],Ktt=[104905,104971],Qtt=[4326,...ove,...Ktt],Qre='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',qT=[-20037508342788905e-9,20037508342788905e-9],WT=[-20037508342787e-6,20037508342787e-6],ave={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:qT,origin:WT,dx:1e-5},102100:{wkTemplate:Qre,valid:qT,origin:WT,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:qT,origin:WT,dx:1e-5},3857:{wkTemplate:Qre,valid:qT,origin:WT,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function Wd(t,e){if(t===e)return!0;if(t==null||e==null)return!1;const r=t.wkid,n=e.wkid;if(r!=null||n!=null){if(r===n||dm(t)&&dm(e))return!0;const o=t.latestWkid;if(o!=null&&n===o)return!0;const a=e.latestWkid;return a!=null&&r===a}let i,s;return t.wkt2&&e.wkt2?(i=t.wkt2,s=e.wkt2):t.wkt&&e.wkt&&(i=t.wkt,s=e.wkt),!(!i||!s)&&i.toUpperCase()===s.toUpperCase()}function nL(t){const e=t==null?void 0:t.wkid;return e!=null&&e>=2e3&&ave[e]||null}function nIt(t){if(!t)return;const{wkid:e,vcsWkid:r}=t;if(e)return r?JSON.stringify({wkid:e,vcsWkid:r}):String(e);const n=t.wkt||t.wkt2;return JSON.stringify(n?r?{wkt:n,vcsWkid:r}:{wkt:n}:{})}function cX(t){if(!Q0(t))return!1;const{wkid:e}=t;if(e)return Ae[e]==null;const r=t.wkt2||t.wkt;return!!r&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(r)}function ert(t){return!(lve(t)||uve(t))}function w5(t){return(t==null?void 0:t.wkid)===4326}function iIt(t){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(t)}function ene(t){return(t==null?void 0:t.wkid)===x5.CGCS2000}function dm(t){const e=t==null?void 0:t.wkid;return e!=null&&e>=2e3&&ove.includes(e)}function trt(t){return(t==null?void 0:t.wkid)===32662}function nO(t){return t===x5.GCSMARS2000||t===x5.GCSMARS2000_SPHERE}function lve(t){return nO(t==null?void 0:t.wkid)}function iO(t){return t===x5.GCSMOON2000}function uve(t){return iO(t==null?void 0:t.wkid)}function rrt(t){const e=t==null?void 0:t.wkid;return e!=null&&e>=2e3&&Qtt.includes(e)}function Q0(t){if(t==null)return!1;const e=t.wkid;return e!=null&&e>=2e3||t.wkt2!=null||t.wkt!=null}const cve={wkid:4326,wkt:T$(ave[4326].wkTemplate,{Central_Meridian:"0.0"})},hve={wkid:102100,latestWkid:3857},nrt={wkid:32662};function hX(t){return{wkt:`GEOCCS["Spherical geocentric", + DATUM["Not specified", + SPHEROID["Sphere",${t.radius},0]], + PRIMEM["Greenwich",0.0, + AUTHORITY["EPSG","8901"]], + UNIT["m",1.0], + AXIS["Geocentric X",OTHER], + AXIS["Geocentric Y",EAST], + AXIS["Geocentric Z",NORTH] + ]`}}const irt=hX($l),dX=hX(sm),fX=hX(k2),srt={wkt:`GEOCCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",${$l.radius},298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["m",1.0, + AUTHORITY["EPSG","9001"]], + AXIS["Geocentric X",OTHER], + AXIS["Geocentric Y",OTHER], + AXIS["Geocentric Z",NORTH], + AUTHORITY["EPSG","4978"] +]`},ort=dX.wkt.toUpperCase(),art=fX.wkt.toUpperCase();function lrt(t){if(t!=null&&Q0(t)){const e=t.wkid,r=t.wkt2??t.wkt;if(nO(e))return sm;const n=r==null?void 0:r.toUpperCase();if(r&&n===ort)return sm;if(iO(e)||n&&n===art)return k2}return $l}function sIt(t){return nO(t)?sm:iO(t)?k2:$l}function BA(t){return Wd(t,irt)}function A2(t){return BA(t)||Wd(t,dX)||Wd(t,fX)}const oIt=39.37,urt=$l.radius*Math.PI/200,dve=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,s5=Ae,fve=/UNIT\[([^\]]+)]/i,crt=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),hrt=Dh()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),M0=t=>t*t,Zy=t=>t*t*t,zC={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:M0(.001)},"square-centimeters":{inBaseUnits:M0(.01)},"square-decimeters":{inBaseUnits:M0(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:M0(1e3)},"square-inches":{inBaseUnits:M0(.0254)},"square-feet":{inBaseUnits:M0(.3048)},"square-yards":{inBaseUnits:M0(.9144)},"square-miles":{inBaseUnits:M0(1609.344)},"square-us-feet":{inBaseUnits:M0(1200/3937)},acres:{inBaseUnits:.0015625*M0(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*Zy(.001)},"cubic-centimeters":{inBaseUnits:1e3*Zy(.01)},"cubic-decimeters":{inBaseUnits:1e3*Zy(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*Zy(1e3)},"cubic-inches":{inBaseUnits:1e3*Zy(.0254)},"cubic-feet":{inBaseUnits:1e3*Zy(.3048)},"cubic-yards":{inBaseUnits:1e3*Zy(.9144)},"cubic-miles":{inBaseUnits:1e3*Zy(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},drt=(()=>{const t={};for(const e in zC)for(const r in zC[e].units)t[r]=e;return t})();function frt(t,e,r){return t*zC[r].units[e].inBaseUnits}function prt(t,e,r){return t/zC[r].units[e].inBaseUnits}function rU(t){const e=drt[t];if(!e)throw new Error("unknown type");return e}function tne(t,e=null){return e=e||rU(t),zC[e].baseUnit===t}function op(t,e,r){if(e===r)return t;const n=rU(e);if(n!==rU(r))throw new Error("incompatible units");const i=tne(e,n)?t:frt(t,e,n);return tne(r,n)?i:prt(i,r,n)}function mrt(t,e,r){return op(t,e,"meters")/(r*Math.PI/180)}function pve(t){return hrt.fromJSON(t.toLowerCase())||null}function jA(t){if(t!=null&&!ert(t))return 1;const e=nE(t);return e>1e5?1:e}function grt(t){return nE(t)>=lrt(t).metersPerDegree?"meters":gve(t)}function nE(t,e=$l.metersPerDegree){return yrt(t,!0)??e}function yrt(t,e=!1){const r=(t==null?void 0:t.wkid)??null,n=(t==null?void 0:t.wkt2)??(t==null?void 0:t.wkt)??null;let i=null;if(r){if(nO(r))return sm.metersPerDegree;if(iO(r))return k2.metersPerDegree;i=s5.values[s5[r]],!i&&e&&crt.has(r)&&(i=urt)}else n&&(vve(n)?i=rne(dve.exec(n),i):yve(n)&&(i=rne(fve.exec(n),i)));return i}function aIt(t){return cX(t)?1:nE(t)}function rne(t,e){return t!=null&&t[1]?mve(t[1]):e}function mve(t){return parseFloat(t.split(",")[1])}function gve(t){const e=(t==null?void 0:t.wkid)??null,r=(t==null?void 0:t.wkt2)??(t==null?void 0:t.wkt)??null;let n=null;if(e)n=s5.units[s5[e]];else if(r){const i=vve(r)?dve:yve(r)?fve:null;if(i){const s=i.exec(r);s!=null&&s[1]&&(n=_rt(s[1]))}}return n!=null?pve(n):null}function yve(t){return/^GEOCCS/i.test(t)}function vve(t){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(t)}const vrt=1e-7;function _rt(t){const e=/[\\"']{1}([^\\"']+)/.exec(t);let r=e==null?void 0:e[1];if(!r||!s5.units.includes(r)){const n=mve(t);r=null;const i=s5.values;for(let s=0;s({enabled:t})}}})],L0.prototype,"hasM",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],L0.prototype,"hasZ",void 0),T([B({type:mo,json:{write:!0},value:mo.WGS84})],L0.prototype,"spatialReference",void 0),T([un("spatialReference")],L0.prototype,"readSpatialReference",null),L0=T([_t("esri.geometry.Geometry")],L0);const W5=L0,Ert=57.29577951308232,Mrt=.017453292519943;function nne(t){return t*Ert}function ine(t){return t*Mrt}function cIt(t){return Math.PI/2-2*Math.atan(Math.exp(-t/$l.radius))}function nU(t){return t.wkid!=null||t.wkt!=null}const OF=[0,0];function VA(t,e,r,n,i){const s=t,o=i;if(o.spatialReference=r,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,OF,n);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,OF,n),[o.xmax,o.ymax]=e(s.xmax,s.ymax,OF,n);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const a="paths"in s?s.paths:s.rings,l=[];let u;for(let d=0;d2&&u[m].push(f[m][2]),f[m].length>3&&u[m].push(f[m][3])}"paths"in o?o.paths=l:o.rings=l}else if("points"in s&&"points"in o){const a=s.points,l=[];for(let u=0;u2&&l[u].push(a[u][2]),a[u].length>3&&l[u].push(a[u][3]);o.points=l}return i}function iL(t,e){const r=t&&(nU(t)?t:t.spatialReference),n=e&&(nU(e)?e:e.spatialReference);return!(t&&"type"in t&&t.type==="mesh"||e&&"type"in e&&e.type==="mesh"||!r||!n)&&(!!Wd(n,r)||dm(n)&&w5(r)||dm(r)&&w5(n))}function _ve(t,e){if(t==null)return null;const r=t.spatialReference,n=e&&(nU(e)?e:e.spatialReference);return iL(r,n)?Wd(r,n)?Qt(t):dm(n)?VA(t,m4,mo.WebMercator,!1,Qt(t)):w5(n)?VA(t,sO,mo.WGS84,!1,Qt(t)):null:null}function m4(t,e,r=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const n=ine(e);return r[0]=ine(t)*$l.radius,r[1]=$l.halfSemiMajorAxis*Math.log((1+Math.sin(n))/(1-Math.sin(n))),r}function sO(t,e,r=[0,0],n=!1){const i=nne(t/$l.radius);return r[0]=n?i:i-360*Math.floor((i+180)/360),r[1]=nne(Math.PI/2-2*Math.atan(Math.exp(-e/$l.radius))),r}function NF(t,e=!1,r=Qt(t)){return VA(t,m4,mo.WebMercator,e,r)}function Cb(t,e=!1,r=Qt(t)){return VA(t,sO,mo.WGS84,e,r)}function Trt(t,e){const r=t.x-e.x,n=t.y-e.y,i=t.z!=null&&e.z!=null?t.z-e.z:0;return Math.sqrt(r*r+n*n+i*i)}function Irt(t){var e;return((e=xve(t,wve))==null?void 0:e[0])??null}function Rrt(t){var e;return((e=xve(t,wve))==null?void 0:e[1])??null}function xve({x:t,y:e,spatialReference:r},n=[0,0]){if(r){if(dm(r))return sO(t,e,n);if(cX(r))return n[0]=t,n[1]=e,n}return null}const wve=[0,0];var sL;const DF=[0,0];function sne(t){return t&&(t.declaredClass==="esri.geometry.SpatialReference"||t.wkid!=null)}let ed=sL=class extends W5{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const r=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(r)?r:r.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,r,n,i){let s;if(Array.isArray(t))s=t,i=e,t=s[0],e=s[1],r=s[2],n=s[3];else if(t&&typeof t=="object"){if(s=t,t=s.x!=null?s.x:s.longitude,e=s.y!=null?s.y:s.latitude,r=s.z,n=s.m,(i=s.spatialReference)&&i.declaredClass!=="esri.geometry.SpatialReference"&&(i=new mo(i)),s.longitude!=null||s.latitude!=null){if(s.longitude==null)li.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(s.latitude==null)li.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!s.declaredClass&&(i!=null&&i.isWebMercator)){const a=m4(s.longitude,s.latitude,DF);t=a[0],e=a[1]}}}else sne(r)?(i=r,r=null):sne(n)&&(i=n,n=null);const o={x:t,y:e};return o.x==null&&o.y!=null?li.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):o.y==null&&o.x!=null&&li.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),i!=null&&(o.spatialReference=i),r!=null&&(o.z=r),n!=null&&(o.m=n),o}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return this.m!==void 0}set hasM(t){t!==(this._get("m")!==void 0)&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return this.z!==void 0}set hasZ(t){t!==(this._get("z")!==void 0)&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return Rrt(this)}set latitude(t){const{spatialReference:e,x:r}=this;t!=null&&e&&(e.isWebMercator?this._set("y",m4(r,t,DF)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return Irt(this)}set longitude(t){const{y:e,spatialReference:r}=this;t!=null&&r&&(r.isWebMercator?this._set("x",m4(t,e,DF)[0]):r.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,r){e[r]=isNaN(t)?"NaN":t}readX(t){return typeof t=="string"?NaN:t}clone(){const t=new sL;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return sL.copy(t,this),this}equals(t){if(t==null)return!1;const{x:e,y:r,z:n,m:i,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:u,spatialReference:d}=t;if(!s.equals(d))if(s.isWebMercator&&d.isWGS84)[l,u]=m4(l,u),d=s;else{if(!s.isWGS84||!d.isWebMercator)return!1;[l,u]=sO(l,u),d=s}return e===l&&r===u&&n===o&&i===a&&s.wkid===d.wkid}offset(t,e,r){return this.x+=t,this.y+=e,r!=null&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const t=nL(this.spatialReference);if(!t)return this;let e=this.x;const[r,n]=t.valid,i=2*n;let s;return e>n?(s=Math.ceil(Math.abs(e-n)/i),e-=s*i):eisNaN(t)?t:A$(t))],ed.prototype,"x",void 0),T([On("x")],ed.prototype,"writeX",null),T([un("x")],ed.prototype,"readX",null),T([B({type:Number,json:{write:!0}})],ed.prototype,"y",void 0),T([B({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],ed.prototype,"z",void 0),T([B({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],ed.prototype,"m",void 0),ed=sL=T([_t("esri.geometry.Point")],ed),ed.prototype.toJSON.isDefaultToJSON=!0;const iu=ed,FF=[0,0];function bve(t,e){return e!=null&&nd(t,e.x,e.y,e.z)}function hIt(t,e){if(!e.points||e.points.length)return!1;for(const r of e.points)if(!bw(t,r))return!1;return!0}function Lrt(t,e){const{xmin:r,ymin:n,zmin:i,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?nd(t,r,n,i)&&nd(t,r,o,i)&&nd(t,s,o,i)&&nd(t,s,n,i)&&nd(t,r,n,a)&&nd(t,r,o,a)&&nd(t,s,o,a)&&nd(t,s,n,a):nd(t,r,n)&&nd(t,r,o)&&nd(t,s,o)&&nd(t,s,n)}function bw(t,e){return nd(t,e[0],e[1])}function krt(t,e){return nd(t,e[0],e[1],e[2])}function nd(t,e,r,n){return e>=t.xmin&&e<=t.xmax&&r>=t.ymin&&r<=t.ymax&&(n==null||!t.hasZ||n>=t.zmin&&n<=t.zmax)}function Art(t,e){return FF[1]=e.y,FF[0]=e.x,Prt(t,FF)}function Prt(t,e){return Cve(t.rings,e)}function Cve(t,e){if(!t)return!1;if($rt(t))return one(!1,t,e);let r=!1;for(let n=0,i=t.length;n=i||m=i)&&u+(i-d)/(m-d)*(f-u)=0&&H<=1&&W>=0&&W<=1&&(i&&(i[0]=s+H*(a-s),i[1]=o+H*(l-o)),!0)}function Urt(t){switch(t){case"esriGeometryEnvelope":case"extent":return Nrt;case"esriGeometryMultipoint":case"multipoint":return Drt;case"esriGeometryPoint":case"point":return Ort;case"esriGeometryPolygon":case"polygon":return zrt;case"esriGeometryPolyline":case"polyline":return jrt}}var ap;function Hrt(t){return t&&(t.declaredClass==="esri.geometry.SpatialReference"||t.wkid!=null)}function Yy(t,e,r){return e==null?r:r==null?e:t(e,r)}let Du=ap=class extends W5{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,r,n,i){return Hrt(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:typeof t=="object"?(t.spatialReference=t.spatialReference==null?mo.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:r,ymax:n,spatialReference:i??mo.WGS84}}static fromBounds(t,e){return new ap({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}static fromPoint(t){return new ap({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new iu({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return this.mmin!=null&&this.mmax!=null}get hasZ(){return this.zmin!=null&&this.zmax!=null}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return t.z!=null&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new ap;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,this.zmin!=null&&(t.zmin=this.zmin,t.zmax=this.zmax),this.mmin!=null&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,r=t.spatialReference;return e&&r&&!e.equals(r)&&iL(e,r)&&(t=e.isWebMercator?NF(t):Cb(t,!0)),t.type==="point"?bve(this,t):t.type==="extent"&&Lrt(this,t)}equals(t){if(this===t)return!0;if(t==null)return!1;const e=this.spatialReference,r=t.spatialReference;return e&&r&&!e.equals(r)&&iL(e,r)&&(t=e.isWebMercator?NF(t):Cb(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),r=this.width*e,n=this.height*e;if(this.xmin+=r,this.ymin+=n,this.xmax-=r,this.ymax-=n,this.hasZ){const i=(this.zmax-this.zmin)*e;this.zmin+=i,this.zmax-=i}if(this.hasM){const i=(this.mmax-this.mmin)*e;this.mmin+=i,this.mmax-=i}return this}intersects(t){if(t==null)return!1;t.type==="mesh"&&(t=t.extent);const e=this.spatialReference,r=t.spatialReference;return e&&r&&!Wd(e,r)&&iL(e,r)&&(t=e.isWebMercator?NF(t):Cb(t,!0)),Urt(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,r){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,r!=null&&(this.zmin+=r,this.zmax+=r),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=Yy(Math.min,this.zmin,t.zmin),this.zmax=Yy(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=Yy(Math.min,this.mmin,t.mmin),this.mmax=Yy(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:t!=null&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=Yy(Math.max,this.zmin,t.zmin),this.zmax=Yy(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=Yy(Math.max,this.mmin,t.mmin),this.mmax=Yy(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=nL(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,r=this._getCM(t);if(r){const n=e.isWebMercator?Cb(r):r;this.xmin-=r.x,this.xmax-=r.x,e.isWebMercator||(n.x=zF(n.x,t).x),this.spatialReference=new mo(T$((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:n.x}))}return this}_getCM(t){let e=null;const[r,n]=t.valid,i=this.xmin,s=this.xmax;return i>=r&&i<=n&&s>=r&&s<=n||(e=this.center),e}_normalize(t,e,r){const n=this.spatialReference;if(!n)return this;const i=r??nL(n);if(i==null)return this;const s=this._getParts(i).map(l=>l.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(i):this.set({xmin:i.valid[0],xmax:i.valid[1]});if(t)return this._shiftCM(i);if(e)return s;let o=!0,a=!0;return s.forEach(l=>{l.hasZ||(o=!1),l.hasM||(a=!1)}),{rings:s.map(l=>{const u=[[l.xmin,l.ymin],[l.xmin,l.ymax],[l.xmax,l.ymax],[l.xmax,l.ymin],[l.xmin,l.ymin]];if(o){const d=(l.zmax-l.zmin)/2;for(let f=0;f0;if(a>2*m){const A=new ap(lM||I?e.push({extent:new ap(v,i,m,s,o),frameIds:[b]},{extent:new ap(f,i,M,s,o),frameIds:[O]}):e.push({extent:new ap(v,i,M,s,o),frameIds:[b]});this.cache._parts=e}const r=this.hasZ,n=this.hasM;if(r||n){const i={};r&&(i.zmin=this.zmin,i.zmax=this.zmax),n&&(i.mmin=this.mmin,i.mmax=this.mmax);for(let s=0;sn?(s=Math.ceil(Math.abs(t-n)/i),t-=s*i,o=s):te==null?r:r==null?e:t(e,r)}function Grt(t){return t&&(t.declaredClass==="esri.geometry.SpatialReference"||t.wkid!=null)}let hv=sU=class extends W5{constructor(...t){super(...t),this.points=[],this.type="multipoint"}normalizeCtorArgs(t,e){var i;if(!t&&!e)return{};const r={};Array.isArray(t)?(r.points=t,r.spatialReference=e):Grt(t)?r.spatialReference=t:(t.points&&(r.points=t.points),t.spatialReference&&(r.spatialReference=t.spatialReference),t.hasZ&&(r.hasZ=t.hasZ),t.hasM&&(r.hasM=t.hasM));const n=(i=r.points)==null?void 0:i[0];return n&&(r.hasZ===void 0&&r.hasM===void 0?(r.hasZ=n.length>2,r.hasM=!1):r.hasZ===void 0?r.hasZ=n.length>3:r.hasM===void 0&&(r.hasM=n.length>3)),r}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=this.points;if(!t.length)return null;const e=new Mu,r=this.hasZ,n=this.hasM,i=r?3:2,s=t[0],o=ane(Math.min),a=ane(Math.max);let l,u,d,f,[m,v]=s,[b,M]=s;for(let O=0,I=t.length;O2){const W=A[2];l=o(l,W),d=a(d,W)}if(n&&A.length>i){const W=A[i];u=o(u,W),f=a(f,W)}}return e.xmin=m,e.ymin=v,e.xmax=b,e.ymax=M,e.spatialReference=this.spatialReference,r?(e.zmin=l,e.zmax=d):(e.zmin=void 0,e.zmax=void 0),n?(e.mmin=u,e.mmax=f):(e.mmin=void 0,e.mmax=void 0),e}writePoints(t,e){e.points=Qt(this.points)}addPoint(t){return Cw(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}clone(){const t={points:Qt(this.points),spatialReference:this.spatialReference};return this.hasZ&&(t.hasZ=!0),this.hasM&&(t.hasM=!0),new sU(t)}getPoint(t){if(!this._validateInputs(t))return null;const e=this.points[t],r={x:e[0],y:e[1],spatialReference:this.spatialReference};let n=2;return this.hasZ&&(r.z=e[2],n=3),this.hasM&&(r.m=e[n]),new iu(r)}removePoint(t){if(!this._validateInputs(t))return null;const e=new iu(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?(Cw(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return t!=null&&t>=0&&t2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}return Math.sqrt(r*r+n*n)}function Wrt(t,e,r){const n=t[0]+r*(e[0]-t[0]),i=t[1]+r*(e[1]-t[1]);return t.length>2&&e.length>2?[n,i,t[2]+r*(e[2]-t[2])]:[n,i]}function fIt(t,e,r,n){const[i,s]=e,[o,a]=r,[l,u]=n,d=l-o,f=u-a,m=d*d+f*f,v=(i-o)*d+(s-a)*f,b=Math.min(1,Math.max(0,v/m));return t[0]=o+d*b,t[1]=a+f*b,t}function pIt(t,e,r,n,i,s){let o=r,a=n,l=i-o,u=s-a;if(l!==0||u!==0){const d=((t-o)*l+(e-a)*u)/(l*l+u*u);d>1?(o=i,a=s):d>0&&(o+=l*d,a+=u*d)}return l=t-o,u=e-a,l*l+u*u}function Mve(t,e){return Wrt(t,e,.5)}function mIt(t){const e=t.length;let r=0;for(let n=0;n=0}function Tve(t){const e=t.length;return e<3||S$(t[0],t[e-1])}function gIt(t){if(!("rings"in t))return!1;let e=!1;for(const r of t.rings)Tve(r)||(r.push(r[0].slice()),e=!0);return e}function yIt(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function Yrt(t){return t?Xrt(t.rings,t.hasZ??!1):null}function Xrt(t,e){if(!(t!=null&&t.length))return null;const r=[],n=[],i=e?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let s=0,o=t.length;s{let a=s[2]-o[2];return a===0&&e&&(a=s[4]-o[4]),a}),n.length&&(r[0]=n[0][0],r[1]=n[0][1],e&&(r[2]=n[0][3]),(r[0]i[1]||r[1]i[3]||e&&(r[2]i[5]))&&(r.length=0)),!r.length){const s=t[0]&&t[0].length?Jrt(t[0],e):null;if(!s)return null;r[0]=s[0],r[1]=s[1],e&&s.length>2&&(r[2]=s[2])}return r}function Ive(t,e,r){let n=0,i=0,s=0,o=0,a=0;const l=t.length?t[0][0]:0,u=t.length?t[0][1]:0,d=t.length&&e?t[0][2]:0;for(let m=0;m2&&b.length>2){const fe=I-d,ee=re-d,be=A*ee-K*fe;s+=(fe+ee)*be,a+=be}Mr[1]&&(r[1]=M),Or[3]&&(r[3]=O),e&&(Ir[5]&&(r[5]=I))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const f=[n/(6*o)+l,i/(6*o)+u,o];return e&&(r[4]===r[5]||a===0?(f[3]=(r[4]+r[5])/2,f[4]=0):(f[3]=s/(6*a)+d,f[4]=a)),f}function vIt(t,e){let r=0,n=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;ae[1]&&(e[1]=d),fe[3]&&(e[3]=f)}return i>0&&(i*=-1),i?(i*=.5,[r/(6*i)+s,n/(6*i)+o,i]):null}function Jrt(t,e){const r=e?[0,0,0]:[0,0],n=e?[0,0,0]:[0,0];let i=0,s=0,o=0,a=0;for(let l=0,u=t.length;l2&&f.length>2&&(r[2]=d[2],n[2]=f[2]);const m=pX(r,n);if(m){i+=m;const v=Mve(d,f);s+=m*v[0],o+=m*v[1],e&&v.length>2&&(a+=m*v[2])}}}return i>0?e?[s/i,o/i,a/i]:[s/i,o/i]:t.length?t[0]:null}function Krt(t){const{hasZ:e,totalSize:r}=t;if(r===0)return null;const n=[],i=[],s=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const o=Ive(qrt(t),t.hasZ,s);o&&i.push(o)}if(i.sort((o,a)=>{let l=o[2]-a[2];return l===0&&e&&(l=o[4]-a[4]),l}),i.length&&(n[0]=i[0][0],n[1]=i[0][1],e&&(n[2]=i[0][3]),(n[0]s[1]||n[1]s[3]||e&&(n[2]s[5]))&&(n.length=0)),!n.length){t.reset(),t.nextPath();const o=t.pathSize?Qrt(t):null;if(!o)return null;n[0]=o[0],n[1]=o[1],e&&o.length>2&&(n[2]=o[2])}return n}function Qrt(t){const{hasZ:e}=t,r=e?[0,0,0]:[0,0],n=e?[0,0,0]:[0,0];let i=0,s=0,o=0,a=0;if(t.nextPoint()){let l=t.x,u=t.y,d=t.z;for(;t.nextPoint();){const f=t.x,m=t.y,v=t.z;r[0]=l,r[1]=u,n[0]=f,n[1]=m,e&&(r[2]=d,n[2]=v);const b=pX(r,n);if(b){i+=b;const M=Mve(r,n);s+=b*M[0],o+=b*M[1],e&&M.length>2&&(a+=b*M[2])}l=f,u=m,d=v}}return i>0?e?[s/i,o/i,a/i]:[s/i,o/i]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}const ent=1e-6;function _It(t){let e=0;for(t.reset();t.nextPath();)e+=t.getCurrentRingArea();if(e=t[2]?0:t[2]-t[0]}function int(t){return t==null||t[1]>=t[3]?0:t[3]-t[1]}function SIt(t){return nnt(t)*int(t)}function EIt(t,e,r){return e>=t[0]&&r>=t[1]&&e<=t[2]&&r<=t[3]}function MIt(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function TIt(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function IIt(t){return t?Rve(t,lne):iE(lne)}function oU(t){return t!=null&&t.length===4}function RIt(t,e){return oU(t)&&oU(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const lne=[1/0,1/0,-1/0,-1/0],snt=[0,0,0,0];function Lve(t){return t.xmin!==void 0&&t.ymin!==void 0&&t.xmax!==void 0&&t.ymax!==void 0}function kve(t){return t.points!==void 0}function Ave(t){return t.x!==void 0&&t.y!==void 0}function Pve(t){return t.paths!==void 0}function $ve(t){return t.rings!==void 0}function Ove(t){function e(r,n){return r==null?n:n==null?r:t(r,n)}return e}const Yv=Ove(Math.min),Xv=Ove(Math.max);function LIt(t,e){return Pve(e)?Sw(t,e.paths,!1,!1):$ve(e)?Sw(t,e.rings,!1,!1):kve(e)?mX(t,e.points,!1,!1,!1,!1):Lve(e)?Nve(t,e):(Ave(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.x,t[3]=e.y),t)}function kIt(t){let e,r,n,i;for(t.reset(),e=n=1/0,r=i=-1/0;t.nextPath();){const s=ont(t);e=Math.min(s[0],e),n=Math.min(s[1],n),r=Math.max(s[2],r),i=Math.max(s[3],i)}return iE([e,n,r,i])}function ont(t){let e,r,n,i;for(e=n=1/0,r=i=-1/0;t.nextPoint();)e=Math.min(t.x,e),n=Math.min(t.y,n),r=Math.max(t.x,r),i=Math.max(t.y,i);return iE([e,n,r,i])}function AIt(t,e){return Pve(e)?Sw(t,e.paths,!0,!1):$ve(e)?Sw(t,e.rings,!0,!1):kve(e)?mX(t,e.points,!0,!1,!0,!1):Lve(e)?Nve(t,e,!0,!1,!0,!1):(Ave(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.x,t[4]=e.y,t[5]=e.z),t)}function Sw(t,e,r,n){const i=r?3:2;if(!e.length||!e[0].length)return null;let s,o,a,l,[u,d]=e[0][0],[f,m]=e[0][0];for(let v=0;v2){const j=O[2];s=Yv(s,j),o=Xv(o,j)}if(n&&O.length>i){const j=O[i];a=Yv(s,j),l=Xv(o,j)}}}return r?n?(t[0]=u,t[1]=d,t[2]=s,t[3]=a,t[4]=f,t[5]=m,t[6]=o,t[7]=l,t.length=8,t):(t[0]=u,t[1]=d,t[2]=s,t[3]=f,t[4]=m,t[5]=o,t.length=6,t):n?(t[0]=u,t[1]=d,t[2]=a,t[3]=f,t[4]=m,t[5]=l,t.length=6,t):(t[0]=u,t[1]=d,t[2]=f,t[3]=m,t.length=4,t)}function Nve(t,e,r,n,i,s){const o=e.xmin,a=e.xmax,l=e.ymin,u=e.ymax;let d=e.zmin,f=e.zmax,m=e.mmin,v=e.mmax;return i?(d=d||0,f=f||0,s?(m=m||0,v=v||0,t[0]=o,t[1]=l,t[2]=d,t[3]=m,t[4]=a,t[5]=u,t[6]=f,t[7]=v,t):(t[0]=o,t[1]=l,t[2]=d,t[3]=a,t[4]=u,t[5]=f,t)):s?(m=m||0,v=v||0,t[0]=o,t[1]=l,t[2]=m,t[3]=a,t[4]=u,t[5]=v,t):(t[0]=o,t[1]=l,t[2]=a,t[3]=u,t)}function mX(t,e,r,n,i,s){const o=r?3:2,a=n&&s,l=r&&i;if(!e.length||!e[0].length)return null;let u,d,f,m,[v,b]=e[0],[M,O]=e[0];for(let I=0;I2){const W=A[2];u=Yv(u,W),d=Xv(d,W)}if(a&&A.length>o){const W=A[o];f=Yv(u,W),m=Xv(d,W)}}return i?(u=u||0,d=d||0,s?(f=f||0,m=m||0,t[0]=v,t[1]=b,t[2]=u,t[3]=f,t[4]=M,t[5]=O,t[6]=d,t[7]=m,t):(t[0]=v,t[1]=b,t[2]=u,t[3]=M,t[4]=O,t[5]=d,t)):s?(f=f||0,m=m||0,t[0]=v,t[1]=b,t[2]=f,t[3]=M,t[4]=O,t[5]=m,t):(t[0]=v,t[1]=b,t[2]=M,t[3]=O,t)}function ant(t){return t.xmin!==void 0&&t.ymin!==void 0&&t.xmax!==void 0&&t.ymax!==void 0}function lnt(t){return t.points!==void 0}function unt(t){return t.x!==void 0&&t.y!==void 0}function cnt(t){return t.paths!==void 0}function hnt(t){return t.rings!==void 0}const gX=[];function Dve(t,e,r,n){return{xmin:t,ymin:e,xmax:r,ymax:n}}function Fve(t,e,r,n,i,s){return{xmin:t,ymin:e,zmin:r,xmax:n,ymax:i,zmax:s}}function zve(t,e,r,n,i,s){return{xmin:t,ymin:e,mmin:r,xmax:n,ymax:i,mmax:s}}function Bve(t,e,r,n,i,s,o,a){return{xmin:t,ymin:e,zmin:r,mmin:n,xmax:i,ymax:s,zmax:o,mmax:a}}function yX(t,e=!1,r=!1){return e?r?Bve(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):Fve(t[0],t[1],t[2],t[3],t[4],t[5]):r?zve(t[0],t[1],t[2],t[3],t[4],t[5]):Dve(t[0],t[1],t[2],t[3])}function PIt(t){return t?ant(t)?t:unt(t)?fnt(t):hnt(t)?jve(t):cnt(t)?Vve(t):lnt(t)?dnt(t):null:null}function dnt(t){const{hasZ:e,hasM:r,points:n}=t;return yX(mX(gX,n,e??!1,r??!1),e,r)}function fnt(t){const{x:e,y:r,z:n,m:i}=t,s=i!=null;return n!=null?s?Bve(e,r,n,i,e,r,n,i):Fve(e,r,n,e,r,n):s?zve(e,r,i,e,r,i):Dve(e,r,e,r)}function jve(t){const{hasZ:e,hasM:r,rings:n}=t,i=Sw(gX,n,e??!1,r??!1);return i?yX(i,e,r):null}function Vve(t){const{hasZ:e,hasM:r,paths:n}=t,i=Sw(gX,n,e??!1,r??!1);return i?yX(i,e,r):null}var oL;function une(t){return!Array.isArray(t[0])}let k0=oL=class extends W5{static fromExtent(t){const e=t.clone().normalize(),r=t.spatialReference;let n=!1,i=!1;for(const o of e)o.hasZ&&(n=!0),o.hasM&&(i=!0);const s={rings:e.map(o=>{const a=[[o.xmin,o.ymin],[o.xmin,o.ymax],[o.xmax,o.ymax],[o.xmax,o.ymin],[o.xmin,o.ymin]];if(n&&o.hasZ){const l=o.zmin+.5*(o.zmax-o.zmin);for(let u=0;u2,n=s.length>3):r===void 0?r=n?s.length>3:s.length>2:n===void 0&&(n=r?s.length>3:s.length>2)),{rings:i,spatialReference:e,hasZ:r,hasM:n}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const t=Yrt(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const e=new iu;return e.x=t[0],e.y=t[1],e.spatialReference=this.spatialReference,this.hasZ&&(e.z=t[2]),e}get extent(){const{spatialReference:t}=this,e=jve(this);if(!e)return null;const r=new Mu(e);return r.spatialReference=t,r}get isSelfIntersecting(){return Vrt(this.rings)}writeRings(t,e){e.rings=Qt(this.rings)}addRing(t){if(!t)return;const e=this.rings,r=e.length;if(une(t)){const n=[];for(let i=0,s=t.length;ii===l&&s===u&&(o==null&&d==null||o===d)&&(a==null&&f==null||a===f);for(let i=0;ithis.hasZ?this.hasM?[r.x,r.y,r.z,r.m]:[r.x,r.y,r.z]:[r.x,r.y]):t;return Zrt(e)}getPoint(t,e){if(!this._validateInputs(t,e))return null;const r=this.rings[t][e],n=this.hasZ,i=this.hasM;return n&&!i?new iu(r[0],r[1],r[2],void 0,this.spatialReference):i&&!n?new iu(r[0],r[1],void 0,r[2],this.spatialReference):n&&i?new iu(r[0],r[1],r[2],r[3],this.spatialReference):new iu(r[0],r[1],this.spatialReference)}insertPoint(t,e,r){return this._validateInputs(t,e,!0)?(Cw(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t].splice(e,0,r),this.notifyChange("rings"),this):this}removePoint(t,e){if(!this._validateInputs(t,e))return null;const r=new iu(this.rings[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(t){if(!this._validateInputs(t,null))return null;const e=this.rings.splice(t,1)[0],r=this.spatialReference,n=e.map(i=>new iu(i,r));return this.notifyChange("rings"),n}setPoint(t,e,r){return this._validateInputs(t,e)?(Cw(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t][e]=r,this.notifyChange("rings"),this):this}_validateInputs(t,e,r=!1){if(t==null||t<0||t>=this.rings.length)return!1;if(e!=null){const n=this.rings[t];if(r&&(e<0||e>n.length)||!r&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};T([B({readOnly:!0})],k0.prototype,"cache",null),T([B({readOnly:!0})],k0.prototype,"centroid",null),T([B({readOnly:!0})],k0.prototype,"extent",null),T([B({readOnly:!0})],k0.prototype,"isSelfIntersecting",null),T([B({type:[[[Number]]],json:{write:{isRequired:!0}}})],k0.prototype,"rings",void 0),T([On("rings")],k0.prototype,"writeRings",null),k0=oL=T([_t("esri.geometry.Polygon")],k0),k0.prototype.toJSON.isDefaultToJSON=!0;const sE=k0;var aU;function pnt(t){return!Array.isArray(t[0])}let dv=aU=class extends W5{constructor(...t){super(...t),this.paths=[],this.type="polyline"}normalizeCtorArgs(t,e){var o,a;let r,n,i=null,s=null;return t&&!Array.isArray(t)?(i=t.paths??null,e||(t.spatialReference?e=t.spatialReference:t.paths||(e=t)),r=t.hasZ,n=t.hasM):i=t,i=i||[],e=e||mo.WGS84,i.length&&((o=i[0])==null?void 0:o[0])!=null&&typeof i[0][0]=="number"&&(i=[i]),s=(a=i[0])==null?void 0:a[0],s&&(r===void 0&&n===void 0?(r=s.length>2,n=!1):r===void 0?r=!n&&s.length>3:n===void 0&&(n=!r&&s.length>3)),{paths:i,spatialReference:e,hasZ:r,hasM:n}}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:t}=this,e=Vve(this);if(!e)return null;const r=new Mu(e);return r.spatialReference=t,r}writePaths(t,e){e.paths=Qt(this.paths)}addPath(t){if(!t)return;const e=this.paths,r=e.length;if(pnt(t)){const n=[];for(let i=0,s=t.length;inew iu(i,r));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;const r=new iu(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),r}setPoint(t,e,r){return this._validateInputs(t,e)?(Cw(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[t][e]=r,this.notifyChange("paths"),this):this}_validateInputs(t,e,r=!1){if(t==null||t<0||t>=this.paths.length)return!1;if(e!=null){const n=this.paths[t];if(r&&(e<0||e>n.length)||!r&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};T([B({readOnly:!0})],dv.prototype,"cache",null),T([B({readOnly:!0})],dv.prototype,"extent",null),T([B({type:[[[Number]]],json:{write:{isRequired:!0}}})],dv.prototype,"paths",void 0),T([On("paths")],dv.prototype,"writePaths",null),dv=aU=T([_t("esri.geometry.Polyline")],dv),dv.prototype.toJSON.isDefaultToJSON=!0;const aO=dv,mnt=Dh()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),cne=Dh()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"});function Uve(t){return t.xmin!==void 0&&t.ymin!==void 0&&t.xmax!==void 0&&t.ymax!==void 0}function Hve(t){return t.points!==void 0}function Gve(t){return t.x!==void 0&&t.y!==void 0}function qve(t){return t.paths!==void 0}function P6(t){return t.rings!==void 0}function oE(t){return t==null?null:t instanceof W5?t:Gve(t)?iu.fromJSON(t):qve(t)?aO.fromJSON(t):P6(t)?sE.fromJSON(t):Hve(t)?oO.fromJSON(t):Uve(t)?Mu.fromJSON(t):null}function $It(t){return t?Gve(t)?"esriGeometryPoint":qve(t)?"esriGeometryPolyline":P6(t)?"esriGeometryPolygon":Uve(t)?"esriGeometryEnvelope":Hve(t)?"esriGeometryMultipoint":null:null}const gnt={esriGeometryPoint:iu,esriGeometryPolyline:aO,esriGeometryPolygon:sE,esriGeometryEnvelope:Mu,esriGeometryMultipoint:oO};function OIt(t){return t&&gnt[t]||null}const a7={base:W5,key:"type",typeMap:{extent:Mu,multipoint:oO,point:iu,polyline:aO,polygon:sE}};um(a7);const ynt=()=>li.getLogger("esri.support.arcadeOnDemand");let BF;function M5(){return BF||(BF=(async()=>{const t=await fs(()=>import("./arcadeUtils-BvZmzJL_.js").then(e=>e.aO),__vite__mapDeps([15,12,16,17,18,19]));return{arcade:t.arcade,arcadeUtils:t,Dictionary:t.Dictionary,Feature:t.arcadeFeature}})()),BF}const vnt=(t,e,r)=>Wve.create(t,e,r,null,["$feature","$view"],[]),_nt=(t,e,r,n)=>Wve.create(t,e,r,n,["$feature","$view"],[]);let Wve=class Zve{constructor(e,r,n,i,s,o,a){this.services=null,this.script=e,this.evaluate=i;const l=Array.isArray(o)?o:o==null?void 0:o.fields;this.fields=l??[],this._syntaxTree=n,this._arcade=r,this._arcadeFeature=s,this._spatialReference=a,this._referencesGeometry=r.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,r,n,i,s,o){const{arcade:a,Feature:l,Dictionary:u}=await M5(),d=mo.fromJSON(r);let f;try{f=a.parseScript(e,o)}catch(pe){return ynt().error(new Pr("arcade-bad-expression","Failed to parse arcade script",{script:e,error:pe})),null}const m=s.reduce((pe,ge)=>({...pe,[ge]:null}),{});let v=null;i!=null&&(v=new u(i),v.immutable=!0,m.$config=null);const b=a.scriptUsesGeometryEngine(f),M=b&&a.enableGeometrySupport(),O=a.scriptUsesFeatureSet(f)&&a.enableFeatureSetSupport(),I=a.scriptIsAsync(f),A=I&&a.enableAsyncSupport(),j={vars:m,spatialReference:d,useAsync:!!A};await Promise.all([M,O,A]);const H=new Set;await a.loadDependentModules(H,f,null,I,b);const W=new u;W.immutable=!1,W.setField("scale",0);const re=a.compileScript(f,j),K=(pe,ge)=>{var ee;const fe=(ee=pe.$view)==null?void 0:ee.timeZone;return"$view"in pe&&pe.$view&&(W.setField("scale",typeof pe.$view=="object"&&"scale"in pe.$view?pe.$view.scale:void 0),pe.$view=W),v&&(pe.$config=v),re({vars:pe,spatialReference:d,services:ge,timeZone:fe})};return new Zve(e,a,f,K,new l,n,d)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}};const xnt=/^([0-9_])/,wnt=/[^a-z0-9_\u0080-\uffff]+/gi;function bnt(t){return t==null?null:t.trim().replaceAll(wnt,"_").replace(xnt,"F$1")||null}const Cnt=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],Snt=["field","normalizationField"];function hne(t,e){if(t!=null&&e!=null){for(const r of Array.isArray(t)?t:[t])if(dne(Cnt,r,e),"visualVariables"in r&&r.visualVariables)for(const n of r.visualVariables)dne(Snt,n,e)}}function dne(t,e,r){if(t)for(const n of t){const i=Hv(n,e),s=i&&typeof i!="function"&&r.get(i);s&&Ph(n,s.name,e)}}function Yve(t,e){var r;if(t!=null&&((r=e==null?void 0:e.fields)!=null&&r.length))if("startField"in t){const n=e.get(t.startField),i=e.get(t.endField);t.startField=(n==null?void 0:n.name)??null,t.endField=(i==null?void 0:i.name)??null}else{const n=e.get(t.startTimeField),i=e.get(t.endTimeField);t.startTimeField=(n==null?void 0:n.name)??null,t.endTimeField=(i==null?void 0:i.name)??null}}const jF=new Set;function vX(t,e){return t&&e?(jF.clear(),lO(jF,t,e),Array.from(jF).sort()):[]}function lO(t,e,r){var n;if(r)if((n=e==null?void 0:e.fields)!=null&&n.length)if(r.includes("*"))for(const{name:i}of e.fields)t.add(i);else for(const i of r)$f(t,e,i);else{if(r.includes("*"))return t.clear(),void t.add("*");for(const i of r)i!=null&&t.add(i)}}function $f(t,e,r){if(typeof r=="string")if(e){const n=e.get(r);n&&t.add(n.name)}else t.add(r)}function NIt(t,e){return e==null||t==null?[]:e.includes("*")?(t.fields??[]).map(r=>r.name):e}async function o0(t,e,r){var s;if(!r)return;const{arcadeUtils:n}=await M5(),i=n.extractFieldNames(r,(s=e==null?void 0:e.fields)==null?void 0:s.map(o=>o.name));for(const o of i)$f(t,e,o)}function Ent({displayField:t,fields:e}){return t||(e!=null&&e.length?VF(e,"name-or-title")||VF(e,"unique-identifier")||VF(e,"type-or-category")||Mnt(e):null)}function Mnt(t){for(const e of t){if(!(e!=null&&e.name))continue;const r=e.name.toLowerCase();if(r.includes("name")||r.includes("title"))return e.name}return null}function VF(t,e){for(const r of t)if(r!=null&&r.valueType&&r.valueType===e)return r.name;return null}function DIt(t){return t?vX(t.fieldsIndex,Xve(t)):[]}function Tnt(t){if(!t)return[];const e=t.geometryFieldsInfo;return e?vX(t.fieldsIndex,[e.shapeAreaField,e.shapeLengthField]):[]}const Int=new Set(["oid","global-id","guid"]),Rnt=new Set(["oid","global-id"]),Lnt=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function knt(t){const e=new Set;Jve(t).forEach(n=>e.add(n)),Tnt(t).forEach(n=>e.add(n.toLowerCase()));const r=t&&"infoFor3D"in t?t.infoFor3D:void 0;return r&&(Object.values(r.assetMapFieldRoles).forEach(n=>e.add(n.toLowerCase())),Object.values(r.transformFieldRoles).forEach(n=>e.add(n.toLowerCase()))),Array.from(e)}function Xve(t){if(!t)return[];const e="editFieldsInfo"in t&&t.editFieldsInfo;if(!e)return[];const{creationDateField:r,creatorField:n,editDateField:i,editorField:s}=e;return[r,n,i,s].filter(Boolean)}function Jve(t){return Xve(t).map(e=>e.toLowerCase())}function Ant(t,e){var r;return t.editable&&!Int.has(t.type)&&!Jve(e).includes(((r=t.name)==null?void 0:r.toLowerCase())??"")}function Pnt(t,e){var n;const r=((n=t.name)==null?void 0:n.toLowerCase())??"";return!((e==null?void 0:e.objectIdField)!=null&&r===e.objectIdField.toLowerCase()||(e==null?void 0:e.globalIdField)!=null&&r===e.globalIdField.toLowerCase()||knt(e).includes(r)||Rnt.has(t.type)||Lnt.some(i=>i.test(r)))}function $nt(t){const e=t.defaultValue;return e!==void 0&&e2e(t,e)?e:t.nullable?null:void 0}function FIt(t){const e=typeof t=="string"?{type:t}:t;return qnt(e)?255:e.type==="esriFieldTypeDate"||e.type==="date"?8:void 0}function Kve(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function Ont(t){return t===null||Kve(t)}function Nnt(t){return t===null||Number.isInteger(t)}function Qve(t){return t!=null&&typeof t=="string"}function Dnt(t){return t===null||Qve(t)}function Fnt(){return!0}function e2e(t,e){let r;switch(t.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":r=t.nullable?Nnt:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=t.nullable?Ont:Kve;break;case"string":case"esriFieldTypeString":r=t.nullable?Dnt:Qve;break;default:r=Fnt}return arguments.length===1?r:r(e)}const znt=["integer","small-integer","big-integer"],Bnt=["single","double"],jnt=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],Vnt=["esriFieldTypeSingle","esriFieldTypeDouble"],Unt=new Set([...znt,...jnt]),Hnt=new Set([...Bnt,...Vnt]),Gnt=Cke(Unt,Hnt);function t2e(t){return t!=null&&Gnt.has(t.type)}function qnt(t){return t!=null&&(t.type==="string"||t.type==="esriFieldTypeString")}function Wnt(t){return t!=null&&(t.type==="date"||t.type==="esriFieldTypeDate")}function zIt(t){return t!=null&&(t.type==="date-only"||t.type==="esriFieldTypeDateOnly")}function BIt(t){return t!=null&&(t.type==="timestamp-offset"||t.type==="esriFieldTypeTimestampOffset")}function Znt(t){return t!=null&&(t.type==="time-only"||t.type==="esriFieldTypeTimeOnly")}function fne(t){return t!=null&&(t.type==="oid"||t.type==="esriFieldTypeOID")}function pne(t){return t!=null&&(t.type==="global-id"||t.type==="esriFieldTypeGlobalID")}function jIt(t,e){return Ynt(t,e)===null}var HA,GA;function VIt(t){return t==null||typeof t=="number"&&isNaN(t)?null:t}function Ynt(t,e){return t==null||t.nullable&&e===null?null:t2e(t)&&!Xnt(t.type,Number(e))?HA.OUT_OF_RANGE:e2e(t,e)?t.domain?Wtt(t,e):null:GA.INVALID_TYPE}function Xnt(t,e){const r=typeof t=="string"?r2e(t):t;if(!r)return!1;const n=r.min,i=r.max;return r.isInteger?Number.isInteger(e)&&e>=n&&e<=i:e>=n&&e<=i}function r2e(t){switch(t){case"esriFieldTypeSmallInteger":case"small-integer":return Jnt;case"esriFieldTypeInteger":case"integer":return Knt;case"esriFieldTypeBigInteger":case"big-integer":return Qnt;case"esriFieldTypeSingle":case"single":return eit;case"esriFieldTypeDouble":case"double":return tit}}(function(t){t.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"})(HA||(HA={})),function(t){t.INVALID_TYPE="type-validation-error::invalid-type"}(GA||(GA={}));const Jnt={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Knt={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Qnt={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},eit={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},tit={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function UIt(t,e,r){switch(t){case ww.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${e.name}, domain: ${JSON.stringify(e.domain)}`;case ww.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${e.name}, domain: ${JSON.stringify(e.domain)}`;case GA.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${e.name}, type: ${e.type}, nullable: ${e.nullable}`;case HA.OUT_OF_RANGE:{const{min:n,max:i}=r2e(e.type);return`Value ${r} is out of range for the number type - field: ${e.name}, type: ${e.type}, value range is ${n} to ${i}`}}}function rit(t){return!!t&&["raster.itempixelvalue","raster.servicepixelvalue"].some(e=>t.toLowerCase().startsWith(e))}function n2e(t){const e=t==null?void 0:t.match(/{[^}]+}/g);return e?e.map(r=>r.slice(1,-1).split(":")[0].trim()):[]}let aL=class extends qr{constructor(e){super(e),this.type=null}};T([B({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],aL.prototype,"type",void 0),aL=T([_t("esri.popup.content.Content")],aL);const n_=aL;var lU;let u3=lU=class extends n_{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new lU({description:this.description,displayType:this.displayType,title:this.title})}};T([B({type:String,json:{write:!0}})],u3.prototype,"description",void 0),T([B({type:["auto","preview","list"],json:{write:!0}})],u3.prototype,"displayType",void 0),T([B({type:String,json:{write:!0}})],u3.prototype,"title",void 0),T([B({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],u3.prototype,"type",void 0),u3=lU=T([_t("esri.popup.content.AttachmentsContent")],u3);const BC=u3;var uU;let c3=uU=class extends n_{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new uU({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?Qt(this.outFields):null})}};T([B()],c3.prototype,"creator",void 0),T([B()],c3.prototype,"destroyer",void 0),T([B()],c3.prototype,"outFields",void 0),T([B({type:["custom"],readOnly:!0})],c3.prototype,"type",void 0),c3=uU=T([_t("esri.popup.content.CustomContent")],c3);const nit=c3;var cU;let Tx=cU=class extends qr{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new cU({title:this.title,expression:this.expression})}};T([B({type:String,json:{write:!0}})],Tx.prototype,"title",void 0),T([B({type:String,json:{write:!0}})],Tx.prototype,"expression",void 0),T([B({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],Tx.prototype,"returnType",void 0),Tx=cU=T([_t("esri.popup.ElementExpressionInfo")],Tx);const iit=Tx;var hU;let Sb=hU=class extends n_{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){var t;return new hU({expressionInfo:(t=this.expressionInfo)==null?void 0:t.clone()})}};T([B({type:iit,json:{write:!0}})],Sb.prototype,"expressionInfo",void 0),T([B({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],Sb.prototype,"type",void 0),Sb=hU=T([_t("esri.popup.content.ExpressionContent")],Sb);const _X=Sb;function ji(t,e={}){const r=t instanceof ro?t:new ro(t,e),n={type:(e==null?void 0:e.ignoreUnknown)??1?r.apiValues:String,json:{type:r.jsonValues,read:!(e!=null&&e.readOnly)&&{reader:r.read},write:{writer:r.write}}};return(e==null?void 0:e.readOnly)!==void 0&&(n.readOnly=!!e.readOnly),(e==null?void 0:e.default)!==void 0&&(n.json.default=e.default),(e==null?void 0:e.name)!==void 0&&(n.json.name=e.name),(e==null?void 0:e.nonNullable)!==void 0&&(n.nonNullable=e.nonNullable),B(n)}let Ix=class extends Fa(qr){constructor(e){super(e),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};T([ji($Oe)],Ix.prototype,"dateFormat",void 0),T([B({type:Boolean,json:{write:!0}})],Ix.prototype,"digitSeparator",void 0),T([B({type:Qa,json:{write:!0}})],Ix.prototype,"places",void 0),Ix=T([_t("esri.popup.support.FieldInfoFormat")],Ix);const lL=Ix;var dU;let x1=dU=class extends qr{constructor(t){super(t),this.fieldName=null,this.format=void 0,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){var t;return new dU({fieldName:this.fieldName,format:(t=this.format)==null?void 0:t.clone(),isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};T([B({type:String,json:{write:!0}})],x1.prototype,"fieldName",void 0),T([B({type:lL,json:{write:!0}})],x1.prototype,"format",void 0),T([B({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],x1.prototype,"isEditable",void 0),T([B({type:String,json:{write:!0}})],x1.prototype,"label",void 0),T([ji(new ro({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],x1.prototype,"stringFieldOption",void 0),T([B({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],x1.prototype,"statisticType",void 0),T([B({type:String,json:{write:!0}})],x1.prototype,"tooltip",void 0),T([B({type:Boolean,json:{write:!0}})],x1.prototype,"visible",void 0),x1=dU=T([_t("esri.popup.FieldInfo")],x1);const xX=x1;var fU;let lg=fU=class extends n_{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map(r=>r.toJSON())}clone(){return new fU(Qt({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};T([B({type:Object,json:{write:!0}})],lg.prototype,"attributes",void 0),T([B({type:String,json:{write:!0}})],lg.prototype,"description",void 0),T([B({type:[xX]})],lg.prototype,"fieldInfos",void 0),T([On("fieldInfos")],lg.prototype,"writeFieldInfos",null),T([B({type:String,json:{write:!0}})],lg.prototype,"title",void 0),T([B({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],lg.prototype,"type",void 0),lg=fU=T([_t("esri.popup.content.FieldsContent")],lg);const jC=lg;let h3=class extends qr{constructor(e){super(e),this.altText=null,this.caption="",this.title="",this.type=null}};T([B({type:String,json:{write:!0}})],h3.prototype,"altText",void 0),T([B({type:String,json:{write:!0}})],h3.prototype,"caption",void 0),T([B({type:String,json:{write:!0}})],h3.prototype,"title",void 0),T([B({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],h3.prototype,"type",void 0),h3=T([_t("esri.popup.content.mixins.MediaInfo")],h3);const wX=h3,qA={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i2e(t){return!!qA[t]||!!qA[t.toLowerCase()]}function bX(t){return qA[t]??qA[t.toLowerCase()]}function sit(t){return[...bX(t)]}function UF(t,e,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?t+(e-t)*n:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function s2e(t,e,r,n=1){const i=(t%360+360)%360/360,s=r<=.5?r*(e+1):r+e-r*e,o=2*r-s;return[Math.round(255*UF(o,s,i+1/3)),Math.round(255*UF(o,s,i)),Math.round(255*UF(o,s,i-1/3)),n]}function oit(t){const e=t.length>5,r=e?8:4,n=(1<>=r,a[3]=i*l/255),l=o&n,o>>=r,a[2]=i*l,l=o&n,o>>=r,a[1]=i*l,l=o&n,o>>=r,a[0]=i*l,a}function ZT(t){return rE(GZ(t),0,255)}function YT(t,e,r){return t=Number(t),isNaN(t)?r:tr?r:t}function XT(t,e){const r=t.toString(16).padStart(2,"0");return e?r.substring(0,1):r}let uL=class Fu{static blendColors(e,r,n,i=new Fu){return i.r=Math.round(e.r+(r.r-e.r)*n),i.g=Math.round(e.g+(r.g-e.g)*n),i.b=Math.round(e.b+(r.b-e.b)*n),i.a=e.a+(r.a-e.a)*n,i._sanitize()}static fromRgb(e,r){const n=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(n){const i=n[2].split(/\s*,\s*/),s=n[1];if(s==="rgb"&&i.length===3||s==="rgba"&&i.length===4){const o=i[0];if(o.charAt(o.length-1)==="%"){const a=i.map(l=>2.56*parseFloat(l));return i.length===4&&(a[3]=parseFloat(i[3])),Fu.fromArray(a,r)}return Fu.fromArray(i.map(a=>parseFloat(a)),r)}if(s==="hsl"&&i.length===3||s==="hsla"&&i.length===4)return Fu.fromArray(s2e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])),r)}return null}static fromHex(e,r=new Fu){if(e[0]!=="#"||isNaN(+`0x${e.substring(1)}`))return null;switch(e.length){case 4:case 5:{const n=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),s=parseInt(e.substring(3,4),16),o=e.length===5?15:parseInt(e.substring(4),16);return Fu.fromArray([n+16*n,i+16*i,s+16*s,(o+16*o)/255],r)}case 7:case 9:{const n=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),s=parseInt(e.substring(5,7),16),o=e.length===7?255:parseInt(e.substring(7),16);return Fu.fromArray([n,i,s,o/255],r)}default:return null}}static fromArray(e,r=new Fu){return r._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(r.a)&&(r.a=1),r._sanitize()}static fromString(e,r){const n=i2e(e)?bX(e):null;return n&&Fu.fromArray(n,r)||Fu.fromRgb(e,r)||Fu.fromHex(e,r)}static fromJSON(e){return e!=null?new Fu([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return e!=null?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return e!=null?[e.r/255,e.g/255,e.b/255,e.a!=null?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return .299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return typeof e=="string"?Fu.fromString(e,this):Array.isArray(e)?Fu.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof Fu||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const r=(e==null?void 0:e.capitalize)??!1,n=(e==null?void 0:e.digits)??6,i=n===3||n===4,s=n===4||n===8,o=`#${XT(this.r,i)}${XT(this.g,i)}${XT(this.b,i)}${s?XT(Math.round(255*this.a),i):""}`;return r?o.toUpperCase():o}toCss(e=!1){const r=this.r+", "+this.g+", "+this.b;return e?`rgba(${r}, ${this.a})`:`rgb(${r})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=Fu.AlphaMode.ALWAYS){const r=ZT(this.r),n=ZT(this.g),i=ZT(this.b);return e===Fu.AlphaMode.ALWAYS||this.a!==1?[r,n,i,ZT(255*this.a)]:[r,n,i]}clone(){return new Fu(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return e!=null&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(YT(this.r,0,255)),this.g=Math.round(YT(this.g,0,255)),this.b=Math.round(YT(this.b,0,255)),this.a=YT(this.a,0,1),this}_set(e,r,n,i){this.r=e,this.g=r,this.b=n,this.a=i}};uL.prototype.declaredClass="esri.Color",function(t){var e;(e=t.AlphaMode||(t.AlphaMode={}))[e.ALWAYS=0]="ALWAYS",e[e.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"}(uL||(uL={}));const ks=uL;var pU;let d3=pU=class extends Iu{constructor(t){super(t),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){var t;return new pU({color:(t=this.color)==null?void 0:t.clone(),fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};T([B()],d3.prototype,"color",void 0),T([B()],d3.prototype,"fieldName",void 0),T([B()],d3.prototype,"tooltip",void 0),T([B()],d3.prototype,"value",void 0),d3=pU=T([_t("esri.popup.content.support.ChartMediaInfoValueSeries")],d3);const ait=d3;var mU;let fv=mU=class extends qr{constructor(t){super(t),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new mU({colors:Qt(this.colors),fields:Qt(this.fields),normalizeField:this.normalizeField,series:Qt(this.series),tooltipField:this.tooltipField})}};T([B({type:[ks],json:{type:[[Qa]],write:!0}})],fv.prototype,"colors",void 0),T([B({type:[String],json:{write:!0}})],fv.prototype,"fields",void 0),T([B({type:String,json:{write:!0}})],fv.prototype,"normalizeField",void 0),T([B({type:[ait],json:{read:!1}})],fv.prototype,"series",void 0),T([B({type:String,json:{write:!0}})],fv.prototype,"tooltipField",void 0),fv=mU=T([_t("esri.popup.content.support.ChartMediaInfoValue")],fv);const lit=fv;let Eb=class extends wX{constructor(e){super(e),this.type=null,this.value=void 0}};T([B({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],Eb.prototype,"type",void 0),T([B({type:lit,json:{write:!0}})],Eb.prototype,"value",void 0),Eb=T([_t("esri.popup.content.mixins.ChartMediaInfo")],Eb);const uO=Eb,cO=Dh()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});var gU;let cL=gU=class extends uO{constructor(t){super(t),this.type="bar-chart"}clone(){var t;return new gU({altText:this.altText,title:this.title,caption:this.caption,value:(t=this.value)==null?void 0:t.clone()})}};T([B({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:cO.write}})],cL.prototype,"type",void 0),cL=gU=T([_t("esri.popup.content.BarChartMediaInfo")],cL);const o2e=cL;var yU;let hL=yU=class extends uO{constructor(t){super(t),this.type="column-chart"}clone(){var t;return new yU({altText:this.altText,title:this.title,caption:this.caption,value:(t=this.value)==null?void 0:t.clone()})}};T([B({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:cO.write}})],hL.prototype,"type",void 0),hL=yU=T([_t("esri.popup.content.ColumnChartMediaInfo")],hL);const a2e=hL;var vU;let Mb=vU=class extends qr{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new vU({linkURL:this.linkURL,sourceURL:this.sourceURL})}};T([B({type:String,json:{write:!0}})],Mb.prototype,"linkURL",void 0),T([B({type:String,json:{write:!0}})],Mb.prototype,"sourceURL",void 0),Mb=vU=T([_t("esri.popup.content.support.ImageMediaInfoValue")],Mb);const uit=Mb;var _U;let Rx=_U=class extends wX{constructor(t){super(t),this.refreshInterval=0,this.type="image",this.value=void 0}clone(){var t;return new _U({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:(t=this.value)==null?void 0:t.clone()})}};T([B({type:Number,json:{write:!0}})],Rx.prototype,"refreshInterval",void 0),T([B({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],Rx.prototype,"type",void 0),T([B({type:uit,json:{write:!0}})],Rx.prototype,"value",void 0),Rx=_U=T([_t("esri.popup.content.ImageMediaInfo")],Rx);const l2e=Rx;var xU;let dL=xU=class extends uO{constructor(t){super(t),this.type="line-chart"}clone(){var t;return new xU({altText:this.altText,title:this.title,caption:this.caption,value:(t=this.value)==null?void 0:t.clone()})}};T([B({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:cO.write}})],dL.prototype,"type",void 0),dL=xU=T([_t("esri.popup.content.LineChartMediaInfo")],dL);const u2e=dL;var wU;let fL=wU=class extends uO{constructor(t){super(t),this.type="pie-chart"}clone(){var t;return new wU({altText:this.altText,title:this.title,caption:this.caption,value:(t=this.value)==null?void 0:t.clone()})}};T([B({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:cO.write}})],fL.prototype,"type",void 0),fL=wU=T([_t("esri.popup.content.PieChartMediaInfo")],fL);const c2e=fL,h2e={base:wX,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":o2e,"column-chart":a2e,"line-chart":u2e,"pie-chart":c2e,image:l2e}};var bU;let w1=bU=class extends n_{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map(e=>e.type==="image"?l2e.fromJSON(e):e.type==="barchart"?o2e.fromJSON(e):e.type==="columnchart"?a2e.fromJSON(e):e.type==="linechart"?u2e.fromJSON(e):e.type==="piechart"?c2e.fromJSON(e):void 0).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map(r=>r.toJSON())}clone(){return new bU(Qt({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};T([B()],w1.prototype,"activeMediaInfoIndex",void 0),T([B({type:Object,json:{write:!0}})],w1.prototype,"attributes",void 0),T([B({type:String,json:{write:!0}})],w1.prototype,"description",void 0),T([B({types:[h2e]})],w1.prototype,"mediaInfos",void 0),T([un("mediaInfos")],w1.prototype,"readMediaInfos",null),T([On("mediaInfos")],w1.prototype,"writeMediaInfos",null),T([B({type:String,json:{write:!0}})],w1.prototype,"title",void 0),T([B({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],w1.prototype,"type",void 0),w1=bU=T([_t("esri.popup.content.MediaContent")],w1);const WA=w1;var CU;let Tb=CU=class extends qr{constructor(t){super(t),this.field=null,this.order=null}clone(){return new CU({field:this.field,order:this.order})}};T([B({type:String,json:{write:!0}})],Tb.prototype,"field",void 0),T([B({type:["asc","desc"],json:{write:!0}})],Tb.prototype,"order",void 0),Tb=CU=T([_t("esri.popup.support.RelatedRecordsInfoFieldOrder")],Tb);const CX=Tb;let A0=class extends Fa(n_){constructor(e){super(e),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};T([B({type:String,json:{write:!0}})],A0.prototype,"description",void 0),T([B({type:Number,json:{type:Qa,write:!0}})],A0.prototype,"displayCount",void 0),T([B({type:["list"],json:{write:!0}})],A0.prototype,"displayType",void 0),T([B({type:[CX],json:{write:!0}})],A0.prototype,"orderByFields",void 0),T([B({type:Number,json:{type:Qa,write:!0}})],A0.prototype,"relationshipId",void 0),T([B({type:String,json:{write:!0}})],A0.prototype,"title",void 0),T([B({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],A0.prototype,"type",void 0),A0=T([_t("esri.popup.content.RelationshipContent")],A0);const ZA=A0;var SU;let Ib=SU=class extends n_{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new SU({text:this.text})}};T([B({type:String,json:{write:!0}})],Ib.prototype,"text",void 0),T([B({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],Ib.prototype,"type",void 0),Ib=SU=T([_t("esri.popup.content.TextContent")],Ib);const YA=Ib,cit={base:null,key:"type",typeMap:{attachment:BC,media:WA,text:YA,expression:_X,field:jC,relationship:ZA}};var EU;let f3=EU=class extends qr{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new EU({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};T([B({type:String,json:{write:!0}})],f3.prototype,"name",void 0),T([B({type:String,json:{write:!0}})],f3.prototype,"title",void 0),T([B({type:String,json:{write:!0}})],f3.prototype,"expression",void 0),T([B({type:["string","number"],json:{write:!0}})],f3.prototype,"returnType",void 0),f3=EU=T([_t("esri.popup.ExpressionInfo")],f3);const hit=f3;var MU;let Rb=MU=class extends qr{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new MU({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};T([B({type:Boolean,json:{write:!0}})],Rb.prototype,"returnTopmostRaster",void 0),T([B({type:Boolean,json:{write:!0}})],Rb.prototype,"showNoDataRecords",void 0),Rb=MU=T([_t("esri.popup.LayerOptions")],Rb);const dit=Rb;var TU;let Lb=TU=class extends qr{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new TU({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?Qt(this.orderByFields):null})}};T([B({type:Boolean,json:{write:!0}})],Lb.prototype,"showRelatedRecords",void 0),T([B({type:[CX],json:{write:!0}})],Lb.prototype,"orderByFields",void 0),Lb=TU=T([_t("esri.popup.RelatedRecordsInfo")],Lb);const fit=Lb;let d2e=0;const SX=t=>{let e=class extends t{constructor(...r){super(...r),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+d2e++})}};return e=T([_t("esri.core.Identifiable")],e),e},YIt=t=>{let e=class extends t{constructor(...r){super(...r),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:d2e++})}};return e=T([_t("esri.core.Identifiable.NumericIdentifiable")],e),e};let mne=class extends SX(class{}){};mne=T([_t("esri.core.Identifiable")],mne);var IU;let lp=IU=class extends SX(Iu){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new IU({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};T([B()],lp.prototype,"active",void 0),T([B()],lp.prototype,"className",void 0),T([B()],lp.prototype,"disabled",void 0),T([B()],lp.prototype,"icon",void 0),T([B()],lp.prototype,"id",void 0),T([B()],lp.prototype,"indicator",void 0),T([B()],lp.prototype,"title",void 0),T([B()],lp.prototype,"type",void 0),T([B()],lp.prototype,"visible",void 0),lp=IU=T([_t("esri.support.actions.ActionBase")],lp);const EX=lp;var RU;let pL=RU=class extends EX{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new RU({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};T([B()],pL.prototype,"image",void 0),pL=RU=T([_t("esri.support.actions.ActionButton")],pL);const pit=pL;var LU;let kb=LU=class extends EX{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new LU({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};T([B()],kb.prototype,"image",void 0),T([B()],kb.prototype,"value",void 0),kb=LU=T([_t("esri.support.actions.ActionToggle")],kb);const mit=kb,Z8="relationships/",gne="expression/",git=$o.ofType({key:"type",defaultKeyValue:"button",base:EX,typeMap:{button:pit,toggle:mit}}),yit={base:n_,key:"type",typeMap:{media:WA,custom:nit,text:YA,attachments:BC,fields:jC,expression:_X,relationship:ZA}},vit=new Set(["attachments","fields","media","text","expression","relationship"]);let zu=class extends Fa(qr){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(e){return Array.isArray(e)?e.map(r=>um(yit,r)):typeof e=="string"||typeof e=="function"||e instanceof HTMLElement||BS(e)?e:(li.getLogger(this).error("content error","unsupported content value",{value:e}),null)}readContent(e,r){const{popupElements:n}=r;return Array.isArray(n)&&n.length>0?this._readPopupInfoElements(r.description,r.mediaInfos,n):this._readPopupInfo(r)}writeContent(e,r,n,i){typeof e!="string"?Array.isArray(e)&&(r.popupElements=e.filter(s=>vit.has(s.type)).map(s=>s==null?void 0:s.toJSON(i)),r.popupElements.forEach(s=>{s.type==="attachments"?this._writeAttachmentContent(r):s.type==="media"?this._writeMediaContent(s,r):s.type==="text"?this._writeTextContent(s,r):s.type==="relationship"&&this._writeRelationshipContent(s,r)})):r.description=e}writeFieldInfos(e,r,n,i){const{content:s}=this,o=Array.isArray(s)?s:null;if(e){const a=o?o.filter(u=>u.type==="fields"):[],l=a.length&&a.every(u=>{var d;return(d=u.fieldInfos)==null?void 0:d.length});r.fieldInfos=e.filter(Boolean).map(u=>{const d=u.toJSON(i);return l&&(d.visible=!1),d})}if(o)for(const a of o)a.type==="fields"&&this._writeFieldsContent(a,r)}writeLayerOptions(e,r,n,i){r[n]=!e||e.showNoDataRecords===null&&e.returnTopmostRaster===null?null:e.toJSON(i)}writeTitle(e,r){r.title=e||""}async collectRequiredFields(e,r){const n=this.expressionInfos||[];await this._collectExpressionInfoFields(e,r,[...n,...this._getContentExpressionInfos(this.content,n)]),lO(e,r,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(e){const r=new Set;return await this.collectRequiredFields(r,e),[...r].sort()}_writeFieldsContent(e,r){if(!Array.isArray(e.fieldInfos)||!e.fieldInfos.length)return;const n=Qt(e.fieldInfos);Array.isArray(r.fieldInfos)?n.forEach(i=>{const s=r.fieldInfos.find(o=>{var a,l;return((a=o.fieldName)==null?void 0:a.toLowerCase())===((l=i.fieldName)==null?void 0:l.toLowerCase())});s?s.visible=!0:r.fieldInfos.push(i)}):r.fieldInfos=n}_writeAttachmentContent(e){e.showAttachments||(e.showAttachments=!0)}_writeRelationshipContent(e,r){var s,o;const n=((s=e.orderByFields)==null?void 0:s.map(a=>this._toFieldOrderJSON(a,e.relationshipId)))||[],i=[...((o=r.relatedRecordsInfo)==null?void 0:o.orderByFields)||[],...n];r.relatedRecordsInfo={showRelatedRecords:!0,...(i==null?void 0:i.length)&&{orderByFields:i}}}_writeTextContent(e,r){!r.description&&e.text&&(r.description=e.text)}_writeMediaContent(e,r){if(!Array.isArray(e.mediaInfos)||!e.mediaInfos.length)return;const n=Qt(e.mediaInfos);Array.isArray(r.mediaInfos)?r.mediaInfos=[...r.mediaInfos,...n]:r.mediaInfos=n}_readPopupInfoElements(e,r,n){const i={description:!1,mediaInfos:!1};return n.map(s=>s.type==="media"?(s.mediaInfos||!r||i.mediaInfos||(s.mediaInfos=r,i.mediaInfos=!0),WA.fromJSON(s)):s.type==="text"?(s.text||!e||i.description||(s.text=e,i.description=!0),YA.fromJSON(s)):s.type==="attachments"?BC.fromJSON(s):s.type==="fields"?jC.fromJSON(s):s.type==="expression"?_X.fromJSON(s):s.type==="relationship"?ZA.fromJSON(s):void 0).filter(Boolean)}_toRelationshipContent(e){const{field:r,order:n}=e;if(!(r!=null&&r.startsWith(Z8)))return null;const i=r.replace(Z8,"").split("/");if(i.length!==2)return null;const s=parseInt(i[0],10),o=i[1];return typeof s=="number"&&o?ZA.fromJSON({relationshipId:s,orderByFields:[{field:o,order:n}]}):null}_toFieldOrderJSON(e,r){const{order:n,field:i}=e;return{field:`${Z8}${r}/${i}`,order:n}}_readPopupInfo({description:e,mediaInfos:r,showAttachments:n,relatedRecordsInfo:i={showRelatedRecords:!1}}){const s=[];e?s.push(new YA({text:e})):s.push(new jC),Array.isArray(r)&&r.length&&s.push(WA.fromJSON({mediaInfos:r})),n&&s.push(BC.fromJSON({displayType:"auto"}));const{showRelatedRecords:o,orderByFields:a}=i;return o&&(a!=null&&a.length)&&a.forEach(l=>{const u=this._toRelationshipContent(l);u&&s.push(u)}),s.length?s:e}_getContentElementFields(e){const r=e==null?void 0:e.type;if(r==="attachments")return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description)];if(r==="custom")return e.outFields||[];if(r==="fields")return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description),...this._getFieldInfoFields(e.fieldInfos??this.fieldInfos)];if(r==="media"){const n=e.mediaInfos||[];return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description),...n.reduce((i,s)=>[...i,...this._getMediaInfoFields(s)],[])]}return r==="text"?this._extractFieldNames(e.text):[]}_getMediaInfoFields(e){const{caption:r,title:n,value:i}=e,s=i||{},{fields:o,normalizeField:a,tooltipField:l,sourceURL:u,linkURL:d}=s,f=[...this._extractFieldNames(n),...this._extractFieldNames(r),...this._extractFieldNames(u),...this._extractFieldNames(d),...o??[]];return a&&f.push(a),l&&f.push(l),f}_getContentExpressionInfos(e,r){return Array.isArray(e)?e.reduce((n,i)=>[...n,...i.type==="expression"&&i.expressionInfo?[i.expressionInfo]:[]],r):[]}_getContentFields(e){return typeof e=="string"?this._extractFieldNames(e):Array.isArray(e)?e.reduce((r,n)=>[...r,...this._getContentElementFields(n)],[]):[]}async _collectExpressionInfoFields(e,r,n){n&&await Promise.all(n.map(i=>o0(e,r,i.expression)))}_getFieldInfoFields(e){return e?e.filter(({fieldName:r,visible:n})=>!(n!==void 0&&!n||!r||r.startsWith(Z8)||r.startsWith(gne))).map(r=>r.fieldName):[]}_getActionsFields(e){return e?e.toArray().reduce((r,n)=>[...r,...this._getActionFields(n)],[]):[]}_getActionFields(e){const{className:r,title:n,type:i}=e,s=i==="button"||i==="toggle"?e.image:"";return[...this._extractFieldNames(n),...this._extractFieldNames(r),...this._extractFieldNames(s)]}_getTitleFields(e){return typeof e=="string"?this._extractFieldNames(e):[]}_extractFieldNames(e){return n2e(e).filter(r=>!(r.indexOf(Z8)===0||r.indexOf(gne)===0))}};T([B({type:git})],zu.prototype,"actions",void 0),T([B()],zu.prototype,"content",void 0),T([Pl("content")],zu.prototype,"castContent",null),T([un("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],zu.prototype,"readContent",null),T([On("content",{popupElements:{type:$o.ofType(cit)},showAttachments:{type:Boolean},mediaInfos:{type:$o.ofType(h2e)},description:{type:String},relatedRecordsInfo:{type:fit}})],zu.prototype,"writeContent",null),T([B({type:[hit],json:{write:!0}})],zu.prototype,"expressionInfos",void 0),T([B({type:[xX]})],zu.prototype,"fieldInfos",void 0),T([On("fieldInfos")],zu.prototype,"writeFieldInfos",null),T([B({type:dit})],zu.prototype,"layerOptions",void 0),T([On("layerOptions")],zu.prototype,"writeLayerOptions",null),T([B({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],zu.prototype,"lastEditInfoEnabled",void 0),T([B()],zu.prototype,"outFields",void 0),T([B()],zu.prototype,"overwriteActions",void 0),T([B()],zu.prototype,"returnGeometry",void 0),T([B({json:{type:String}})],zu.prototype,"title",void 0),T([On("title")],zu.prototype,"writeTitle",null),zu=T([_t("esri.PopupTemplate")],zu);const aE=zu,yne=new ro({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let _it=0,Lx=class extends qr{constructor(e){super(e),this.id="sym"+_it++,this.type=null,this.color=new ks([0,0,0,1])}readColor(e){return(e==null?void 0:e[0])!=null?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,r){}hash(){return JSON.stringify(this.toJSON())}clone(){}};T([B({type:yne.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:yne.write}}})],Lx.prototype,"type",void 0),T([B({type:ks,json:{write:{allowNull:!0}}})],Lx.prototype,"color",void 0),T([un("color")],Lx.prototype,"readColor",null),Lx=T([_t("esri.symbols.Symbol")],Lx);const Gc=Lx;var kU;let pv=kU=class extends Gc{constructor(t){super(t),this.data=null,this.type="cim"}readData(t,e){return e}writeData(t,e){Object.assign(e,t)}async collectRequiredFields(t,e){var r;if(((r=this.data)==null?void 0:r.type)==="CIMSymbolReference"){const n=this.data.primitiveOverrides;if(n){const i=n.map(s=>{const o=s.valueExpressionInfo;return o?o0(t,e,o.expression):null});await Promise.all(i)}}}clone(){return new kU({data:Qt(this.data)})}hash(){return n1e(JSON.stringify(this.data)).toString()}};T([B({json:{write:!1}})],pv.prototype,"color",void 0),T([B({json:{write:!0}})],pv.prototype,"data",void 0),T([un("data",["symbol"])],pv.prototype,"readData",null),T([On("data",{})],pv.prototype,"writeData",null),T([ji({CIMSymbolReference:"cim"},{readOnly:!0})],pv.prototype,"type",void 0),pv=kU=T([_t("esri.symbols.CIMSymbol")],pv);const i_=pv;let kx=class extends qr{constructor(e){super(e),this.enabled=!0,this.type=null,this.ignoreDrivers=!1}writeEnabled(e,r,n){e||(r[n]=e)}};T([B({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],kx.prototype,"enabled",void 0),T([On("enabled")],kx.prototype,"writeEnabled",null),T([B({type:["icon","object","line","path","fill","water","extrude","text"],readOnly:!0})],kx.prototype,"type",void 0),kx=T([_t("esri.symbols.Symbol3DLayer")],kx);const bm=kx,xit=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,wit="screenUtils.toPt: input not recognized!",f2e=96;function bit(t){return t?t/72*f2e:0}function Dp(t){return t?72*t/f2e:0}function lo(t){if(typeof t=="string"){const e=t.match(xit);if(e){const r=Number(e[1]),n=e[3]&&e[3].toLowerCase(),i=t.charAt(0)==="-",s=n==="px"?Dp(r):r;return i?-s:s}return console.warn(wit),null}return t}function eRt(t=0,e=0){return{x:t,y:e}}function MX(t){const e=GZ(100*(1-t));return Math.max(0,Math.min(e,100))}function XA(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}function Cit(t,e){const r=e.transparency!=null?XA(e.transparency):1,n=e.color;return n&&Array.isArray(n)?new ks([n[0]||0,n[1]||0,n[2]||0,r]):null}function Sit(t,e){e.color=t.toJSON().slice(0,3);const r=MX(t.a);r!==0&&(e.transparency=r)}const s_={type:ks,json:{type:[Qa],default:null,read:{source:["color","transparency"],reader:Cit},write:{target:{color:{type:[Qa]},transparency:{type:Qa}},writer:Sit}}},fm={type:Number,cast:lo,json:{write:!0}};let p3=class extends qr{constructor(e){super(e),this.color=new ks([0,0,0,1]),this.extensionLength=0,this.size=Dp(1)}clone(){}cloneProperties(){return{color:Qt(this.color),size:this.size,extensionLength:this.extensionLength}}};T([B({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],p3.prototype,"type",void 0),T([B(s_)],p3.prototype,"color",void 0),T([B({...fm,json:{write:{overridePolicy:t=>({enabled:!!t})}}})],p3.prototype,"extensionLength",void 0),T([B(fm)],p3.prototype,"size",void 0),p3=T([_t("esri.symbols.edges.Edges3D")],p3);const TX=p3;var AU;let mL=AU=class extends TX{constructor(t){super(t),this.type="sketch"}clone(){return new AU(this.cloneProperties())}};T([ji({sketch:"sketch"},{readOnly:!0})],mL.prototype,"type",void 0),mL=AU=T([_t("esri.symbols.edges.SketchEdges3D")],mL);const Eit=mL;var PU;let gL=PU=class extends TX{constructor(t){super(t),this.type="solid"}clone(){return new PU(this.cloneProperties())}};T([ji({solid:"solid"},{readOnly:!0})],gL.prototype,"type",void 0),gL=PU=T([_t("esri.symbols.edges.SolidEdges3D")],gL);const p2e=gL,m2e={types:{key:"type",base:TX,typeMap:{solid:p2e,sketch:Eit}},json:{write:!0}};var $U;let Ap=$U=class extends qr{constructor(t){super(t),this.color=null}clone(){const t={color:this.color!=null?this.color.clone():null};return new $U(t)}};T([B(s_)],Ap.prototype,"color",void 0),Ap=$U=T([_t("esri.symbols.support.Symbol3DMaterial")],Ap);var OU;let mv=OU=class extends bm{constructor(t){super(t),this.type="extrude",this.size=1,this.material=null,this.castShadows=!0,this.edges=null}clone(){var t,e;return new OU({edges:(t=this.edges)==null?void 0:t.clone(),enabled:this.enabled,material:(e=this.material)==null?void 0:e.clone(),castShadows:this.castShadows,size:this.size})}};T([ji({Extrude:"extrude"},{readOnly:!0})],mv.prototype,"type",void 0),T([B({type:Number,json:{write:{enabled:!0,isRequired:!0}},nonNullable:!0})],mv.prototype,"size",void 0),T([B({type:Ap,json:{write:!0}})],mv.prototype,"material",void 0),T([B({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],mv.prototype,"castShadows",void 0),T([B(m2e)],mv.prototype,"edges",void 0),mv=OU=T([_t("esri.symbols.ExtrudeSymbol3DLayer")],mv);const g2e=mv;let Ab=class extends Gc{constructor(e){super(e),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};T([ji({esriSLS:"simple-line"},{readOnly:!0})],Ab.prototype,"type",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],Ab.prototype,"width",void 0),Ab=T([_t("esri.symbols.LineSymbol")],Ab);const Mit=Ab,Tit=["begin","end","begin-end"],y2e=["arrow","circle","square","diamond","cross","x"];var NU;let P0=NU=class extends qr{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,r,n){e[r]=(n==null?void 0:n.origin)==="web-map"?"arrow":t}set color(t){this._set("color",t)}readColor(t){return(t==null?void 0:t[0])!=null?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,r,n){(n==null?void 0:n.origin)==="web-map"||(e[r]=t)}clone(){return new NU({color:Qt(this.color),placement:this.placement,style:this.style})}hash(){var t;return`${this.placement}.${(t=this.color)==null?void 0:t.hash()}.${this.style}`}};T([B({type:["begin","end","begin-end"],json:{write:!0}})],P0.prototype,"placement",void 0),T([ji({"line-marker":"line-marker"},{readOnly:!0}),B({json:{origins:{"web-map":{write:!1}}}})],P0.prototype,"type",void 0),T([B({type:y2e})],P0.prototype,"style",void 0),T([On("style")],P0.prototype,"writeStyle",null),T([B({type:ks,value:null,json:{write:{allowNull:!0}}})],P0.prototype,"color",null),T([un("color")],P0.prototype,"readColor",null),T([On("color")],P0.prototype,"writeColor",null),P0=NU=T([_t("esri.symbols.LineSymbolMarker")],P0);const Iit=P0;var DU;const HF=new ro({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let ug=DU=class extends Mit{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,r,n,i,s){if(t&&typeof t!="string")return t;const o={};return t!=null&&(o.style=t),e!=null&&(o.color=e),r!=null&&(o.width=lo(r)),n!=null&&(o.cap=n),i!=null&&(o.join=i),s!=null&&(o.miterLimit=lo(s)),o}clone(){var t;return new DU({color:Qt(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:(t=this.marker)==null?void 0:t.clone()})}hash(){var t,e;return`${super.hash()}.${(t=this.color)==null?void 0:t.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${(e=this.marker)==null?void 0:e.hash()}`}};T([ji({esriSLS:"simple-line"},{readOnly:!0})],ug.prototype,"type",void 0),T([B({type:HF.apiValues,json:{read:HF.read,write:HF.write}})],ug.prototype,"style",void 0),T([B({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,r)=>({enabled:t!=="round"&&(r==null?void 0:r.origin)==null})}}})],ug.prototype,"cap",void 0),T([B({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,r)=>({enabled:t!=="round"&&(r==null?void 0:r.origin)==null})}}})],ug.prototype,"join",void 0),T([B({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":Iit}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],ug.prototype,"marker",void 0),T([B({type:Number,json:{read:!1,write:!1}})],ug.prototype,"miterLimit",void 0),ug=DU=T([_t("esri.symbols.SimpleLineSymbol")],ug);const jf=ug;let Pb=class extends Gc{constructor(e){super(e),this.outline=null,this.type=null}hash(){var e;return`${this.type}.${(e=this.outline)==null?void 0:e.hash()}`}};T([B({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":jf}},json:{default:null,write:!0}})],Pb.prototype,"outline",void 0),T([B({type:["simple-fill","picture-fill"],readOnly:!0})],Pb.prototype,"type",void 0),Pb=T([_t("esri.symbols.FillSymbol")],Pb);const v2e=Pb;let yL=class extends qr{constructor(e){super(e)}clone(){throw new Error("Subclasses of LinePattern3D should implement their own clone method.")}};T([B({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],yL.prototype,"type",void 0),yL=T([_t("esri.symbols.patterns.LinePattern3D")],yL);const _2e=yL,Rit=["dash","dash-dot","dot","long-dash","long-dash-dot","long-dash-dot-dot","none","short-dash","short-dash-dot","short-dash-dot-dot","short-dot","solid"];var FU;const Lit=Dh()({dash:"dash","dash-dot":"dash-dot","dash-dot-dot":"long-dash-dot-dot",dot:"dot","long-dash":"long-dash","long-dash-dot":"long-dash-dot",null:"none","short-dash":"short-dash","short-dash-dot":"short-dash-dot","short-dash-dot-dot":"short-dash-dot-dot","short-dot":"short-dot",solid:"solid"});let $b=FU=class extends _2e{constructor(t){super(t),this.type="style",this.style="solid"}clone(){const t={style:this.style};return new FU(t)}};T([B({type:["style"]})],$b.prototype,"type",void 0),T([ji(Lit),B({type:Rit})],$b.prototype,"style",void 0),$b=FU=T([_t("esri.symbols.patterns.LineStylePattern3D")],$b);const IX=$b;let vL=class extends qr{constructor(e){super(e),this.type="style"}clone(){throw new Error("Subclasses of Pattern3D should implement their own clone method.")}};T([B({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],vL.prototype,"type",void 0),vL=T([_t("esri.symbols.patterns.Pattern3D")],vL);const x2e=vL,kit=["backward-diagonal","cross","diagonal-cross","forward-diagonal","horizontal","none","solid","vertical"];var zU;let Ob=zU=class extends x2e{constructor(t){super(t),this.type="style",this.style="solid"}clone(){return new zU({style:this.style})}};T([B({type:["style"]})],Ob.prototype,"type",void 0),T([B({type:kit,json:{read:!0,write:!0}})],Ob.prototype,"style",void 0),Ob=zU=T([_t("esri.symbols.patterns.StylePattern3D")],Ob);const w2e=Ob,Ait={types:{key:"type",base:x2e,typeMap:{style:w2e}},json:{write:!0}},b2e={types:{key:"type",base:_2e,typeMap:{style:IX}},json:{write:!0}},$6=new ks("white");new ks("black");const Pit=new ks([255,255,255,0]);function $it(t){return t.r===0&&t.g===0&&t.b===0}var BU;let O6=BU=class extends Ap{constructor(t){super(t),this.colorMixMode=null}clone(){const t={color:this.color!=null?this.color.clone():null,colorMixMode:this.colorMixMode};return new BU(t)}};T([ji({multiply:"multiply",replace:"replace",tint:"tint"})],O6.prototype,"colorMixMode",void 0),O6=BU=T([_t("esri.symbols.support.Symbol3DFillMaterial")],O6);function RX(t=zit){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function LX(t,e,r,n,i,s,o=RX()){return o[0]=t,o[1]=e,o[2]=r,o[3]=n,o[4]=i,o[5]=s,o}function oRt(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new Mu(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function aRt(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function lRt(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function uRt(t,e,r=0,n=e.length/3){let i=t[0],s=t[1],o=t[2],a=t[3],l=t[4],u=t[5];for(let d=0;d=t[3]?0:t[3]-t[0]}function Nit(t){return t[1]>=t[4]?0:t[4]-t[1]}function Dit(t){return t[2]>=t[5]?0:t[5]-t[2]}function cRt(t,e=[0,0,0]){return e[0]=Oit(t),e[1]=Nit(t),e[2]=Dit(t),e}function hRt(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function dRt(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function Fit(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function fRt(t){return t?Fit(t,_ne):RX(_ne)}function pRt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function mRt(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=n,t[4]=i,t[5]=Number.POSITIVE_INFINITY,t}function vne(t){return t.length===6}function gRt(t,e,r){if(t==null||e==null)return t===e;if(!vne(t)||!vne(e))return!1;for(let n=0;n{const e=A$(t);return e===0?1:rE(e,.1,4)},nonNullable:!0},Wit=["left","right","center"],Zit=["baseline","top","middle","bottom"],E2e={type:Wit,nonNullable:!0},M2e={type:Zit,nonNullable:!0};var VU;let hg=VU=class extends qr{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return lo(t)}clone(){return new VU({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};T([B({type:Hit,json:{default:"none",write:!0}})],hg.prototype,"decoration",void 0),T([B({type:String,json:{write:!0}})],hg.prototype,"family",void 0),T([B({type:Number,json:{write:{overridePolicy:(t,e,r)=>({enabled:!r||!r.textSymbol3D})}}})],hg.prototype,"size",void 0),T([Pl("size")],hg.prototype,"castSize",null),T([B({type:Git,json:{default:"normal",write:!0}})],hg.prototype,"style",void 0),T([B({type:qit,json:{default:"normal",write:!0}})],hg.prototype,"weight",void 0),hg=VU=T([_t("esri.symbols.Font")],hg);const hO=hg;function l7(t,e){var n;const r=(n=e==null?void 0:e.url)==null?void 0:n.path;if(t&&r&&(t=Bd(t,r,{preserveProtocolRelative:!0}),e.portalItem&&e.readResourcePaths)){const i=tY(t,e.portalItem.itemUrl);i!=null&&Yit.test(i)&&e.readResourcePaths.push(e.portalItem.resourceFromPath(i).path)}return(t=UU(t,e==null?void 0:e.portal))&&dO.test(t)?PX(t):t}function lE(t,e,r=VC.YES){var i,s;if((t=t&&dO.test(t)?I2e(t):t)==null)return t;!Af(t)&&(e!=null&&e.blockedRelativeUrls)&&e.blockedRelativeUrls.push(t);let n=Bd(t);if(e){const o=((i=e.verifyItemRelativeUrls)==null?void 0:i.rootPath)||((s=e.url)==null?void 0:s.path);if(o){const a=UU(o,e.portal),l=UU(n,e.portal);n=tY(l,a,a),n!=null&&n!==l&&n!==t&&e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=T2e(n,e==null?void 0:e.portal),Af(n)&&(n=Lp(n)),e!=null&&e.resources&&(e!=null&&e.portalItem)&&!Af(n)&&!j5(n)&&r===VC.YES&&e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(n),compress:!1}),n}function AX(t,e,r){return l7(t,r)}function T5(t,e,r,n){const i=lE(t,n);i!==void 0&&(e[r]=i)}const dO=/\/items\/([^/]+)\/resources\/(.*)/,Yit=/^\.\/resources\//;function Xit(t){const e=(t==null?void 0:t.match(dO))??null;return(e==null?void 0:e[1])??null}function Jit(t){const e=(t==null?void 0:t.match(dO))??null;if(e==null)return null;const r=e[2],n=r.lastIndexOf("/");if(n===-1){const{path:o,extension:a}=_te(r);return{prefix:null,filename:o,extension:a}}const{path:i,extension:s}=_te(r.slice(n+1));return{prefix:r.slice(0,n),filename:i,extension:s}}function T2e(t,e){return e&&!e.isPortal&&e.urlKey&&e.customBaseUrl?pV(t,`${e.urlKey}.${e.customBaseUrl}`,e.portalHostname):t}function UU(t,e){if(!e||e.isPortal||!e.urlKey||!e.customBaseUrl)return t;const r=`${e.urlKey}.${e.customBaseUrl}`,n=KZ();return Ad(n,`${n.scheme}://${r}`)?pV(t,e.portalHostname,r):pV(t,r,e.portalHostname)}function PX(t){if(!t)return t||null;let e=t;return e&&ws&&!ws.findCredential(e)&&(e=sA(e),e=e.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),e=e.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),e=e.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),e}function I2e(t){if(!t)return t||null;let e=t;return e=e.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),e=e.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),e=e.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),e&&ws&&!ws.findCredential(e)&&(e=sA(e)),e}var VC;(function(t){t[t.YES=0]="YES",t[t.NO=1]="NO"})(VC||(VC={}));const vRt=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return VC},ensureMainOnlineDomain:T2e,fromCDNUrl:I2e,fromJSON:l7,itemIdFromResourceUrl:Xit,prefixAndFilenameFromResourceUrl:Jit,read:AX,toCDNUrl:PX,toJSON:lE,write:T5},Symbol.toStringTag,{value:"Module"}));var HU;const Kit=Dh()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let g3=HU=class extends qr{constructor(t){super(t)}readHref(t,e,r){return t?l7(t,r):e.dataURI}writeHref(t,e,r,n){t&&(j5(t)?e.dataURI=t:(e.href=lE(t,n),Af(e.href)&&(e.href=Lp(e.href))))}clone(){return new HU({href:this.href,primitive:this.primitive})}};T([B({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],g3.prototype,"href",void 0),T([un("href")],g3.prototype,"readHref",null),T([On("href",{href:{type:String},dataURI:{type:String}})],g3.prototype,"writeHref",null),T([ji(Kit)],g3.prototype,"primitive",void 0),g3=HU=T([_t("esri.symbols.support.IconSymbol3DLayerResource")],g3);var GU;let g4=GU=class extends Iu{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new GU({x:this.x,y:this.y})}};T([B({type:Number})],g4.prototype,"x",void 0),T([B({type:Number})],g4.prototype,"y",void 0),g4=GU=T([_t("esri.symbols.support.Symbol3DAnchorPosition2D")],g4);var qU;let Nb=qU=class extends qr{constructor(t){super(t),this.color=new ks([0,0,0,1]),this.size=Dp(1)}clone(){const t={color:this.color!=null?this.color.clone():null,size:this.size};return new qU(t)}};T([B(s_)],Nb.prototype,"color",void 0),T([B(fm)],Nb.prototype,"size",void 0),Nb=qU=T([_t("esri.symbols.support.Symbol3DIconOutline")],Nb);var Ax;const R2e="esri.symbols.IconSymbol3DLayer";let $0=Ax=class extends bm{constructor(t){super(t),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=null,this.outline=null}clone(){return new Ax({anchor:this.anchor,anchorPosition:Qt(this.anchorPosition),enabled:this.enabled,material:Qt(this.material),outline:Qt(this.outline),resource:Qt(this.resource),size:this.size})}static fromSimpleMarkerSymbol(t){const e=t.color||$6,r=xne(t),n=t.outline&&t.outline.width>0?{size:t.outline.width,color:(t.outline.color||$6).clone()}:null;return new Ax({size:t.size,resource:{primitive:est(t.style)},material:{color:e},outline:n,anchor:r?"relative":void 0,anchorPosition:r})}static fromPictureMarkerSymbol(t){const e=!t.color||$it(t.color)?$6:t.color,r=xne(t);return new Ax({size:t.width<=t.height?t.height:t.width,resource:{href:t.url},material:{color:e.clone()},anchor:r?"relative":void 0,anchorPosition:r})}static fromCIMSymbol(t){return new Ax({resource:{href:n0e({mediaType:"application/json",data:JSON.stringify(t.data)})}})}};T([B({type:Ap,json:{write:!0}})],$0.prototype,"material",void 0),T([B({type:g3,json:{write:!0}})],$0.prototype,"resource",void 0),T([ji({Icon:"icon"},{readOnly:!0})],$0.prototype,"type",void 0),T([B(fm)],$0.prototype,"size",void 0),T([ji({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),B({json:{default:"center"}})],$0.prototype,"anchor",void 0),T([B({type:g4,json:{type:[Number],read:{reader:t=>new g4({x:t[0],y:t[1]})},write:{writer:(t,e)=>{e.anchorPosition=[t.x,t.y]},overridePolicy(){return{enabled:this.anchor==="relative"}}}}})],$0.prototype,"anchorPosition",void 0),T([B({type:Nb,json:{write:!0}})],$0.prototype,"outline",void 0),$0=Ax=T([_t(R2e)],$0);const Y3=$0;function xne(t){const e="width"in t?t.width:t.size,r="height"in t?t.height:t.size,n=wne(t.xoffset),i=wne(t.yoffset);return(n||i)&&e&&r?{x:-n/e,y:i/r}:null}function wne(t){return isFinite(t)?t:0}const Qit={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function est(t){return Qit[t]||(li.getLogger(R2e).warn(`${t} cannot be mapped to Icon symbol. Fallback to "circle"`),"circle")}function tst(t,e,r=$o){return e||(e=new r),e===t||(e.removeAll(),nst(t)?e.addMany(t):t&&e.add(t)),e}function rst(t){return t}function nst(t){return t&&(Array.isArray(t)||"items"in t&&Array.isArray(t.items))}const ist="not-loaded",sst="loading",ost="failed",bne="loaded",L2e=t=>{let e=class extends t{constructor(...r){super(...r),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(n=>{const i=this.load.bind(this);this.load=s=>{const o=new Promise((a,l)=>{const u=w1e(s,l);this.destroyed&&l(new Pr("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(a,l).finally(()=>{u&&u.remove()})});if(this.loadStatus===ist){this._set("loadStatus",sst);const a=this._loadController=new AbortController;i({signal:a.signal})}return n(),o}})),this.when(()=>{this._set("loadStatus",bne),this._loadController=null},n=>{this._set("loadStatus",ost),this._set("loadError",n),this._loadController=null})}destroy(){this._loadController&&(this._loadController=i1e(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===bne}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){var r;return this.isFulfilled()||(this._set("loadError",new Pr("load:cancelled","Cancelled")),(r=this._loadController)==null||r.abort(),this._promiseProps.abort()),this}};return T([B({readOnly:!0})],e.prototype,"loaded",null),T([B({readOnly:!0})],e.prototype,"loadError",void 0),T([B({clonable:!1})],e.prototype,"loadStatus",void 0),T([B({type:[cm],readOnly:!0})],e.prototype,"loadWarnings",null),e=T([_t("esri.core.Loadable")],e),e};let Db=class extends L2e(SV){};Db=T([_t("esri.core.Loadable")],Db),function(t){function e(r){return!(!r||!r.load)}t.LoadableMixin=L2e,t.isLoadable=e}(Db||(Db={}));const fO=Db;let JT;function ast(t){return JT&&!JT.destroyed||(JT=t()),JT}var WU;const lst=new ro({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let up=WU=class extends Iu{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){t!=="asc"&&t!=="desc"||this._set("sortOrder",t)}clone(){return new WU({categories:this.categories?Qt(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map(o=>Array.isArray(o)?JSON.stringify(o):o));let n="";if(this.extent){const o=_ve(this.extent,mo.WGS84);o!=null&&(n=`${o.xmin},${o.ymin},${o.xmax},${o.ymax}`)}let i=this.query;!this.disableExtraQuery&&t.extraQuery&&(i="("+i+")"+t.extraQuery);const s={categories:r,bbox:n,q:i,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(s.sortField=this.sortField.split(",").map(o=>lst.toJSON(o.trim())).join(","),s.sortOrder=this.sortOrder),{query:{...e,...s}}}};T([B()],up.prototype,"categories",void 0),T([B()],up.prototype,"disableExtraQuery",void 0),T([B({type:Mu})],up.prototype,"extent",void 0),T([B()],up.prototype,"filter",void 0),T([B()],up.prototype,"num",void 0),T([B()],up.prototype,"query",void 0),T([B()],up.prototype,"sortField",void 0),T([B()],up.prototype,"sortOrder",null),T([B()],up.prototype,"start",void 0),up=WU=T([_t("esri.portal.PortalQueryParams")],up);const J0=up;var ZU;let _u=ZU=class extends qr{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){var r;const t=this.url,e=this.thumbnail;return t&&e&&this.portal?(r=this.portal)==null?void 0:r.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){var e;const t=(e=this.portal)==null?void 0:e.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then(e=>{const r=e.categorySchema||[];return r.some(n=>n.source==="contentCategorySetsGroupQuery.LivingAtlas")?this._fetchCategorySchemaSet("LivingAtlas",t):r})}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new Pr("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new ZU({sourceJSON:t});return e.read(t),e}queryItems(t,e){let r=gc(J0,t);const n=this.portal;return parseFloat(n.currentVersion)>5?(r=r||new J0,n.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new J0,r.query="group:"+this.id+(r.query?" "+r.query:""),n.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then(n=>{const i=n.contentCategorySetsGroupQuery;if(i){const s=new J0({disableExtraQuery:!0,num:1,query:i});return r.queryGroups(s,e)}throw new Pr("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(n=>{if(n.total){const i=n.results[0],s=new J0({num:1,query:`typekeywords:"${t}"`});return i.queryItems(s,e)}throw new Pr("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(n=>n.total?n.results[0].fetchData("json",e).then(i=>{const s=i==null?void 0:i.categorySchema;return s!=null&&s.length?s:[]}):[])}};T([B()],_u.prototype,"access",void 0),T([B({type:Date})],_u.prototype,"created",void 0),T([B()],_u.prototype,"description",void 0),T([B()],_u.prototype,"id",void 0),T([B()],_u.prototype,"isInvitationOnly",void 0),T([B({type:Date})],_u.prototype,"modified",void 0),T([B()],_u.prototype,"owner",void 0),T([B()],_u.prototype,"portal",void 0),T([B()],_u.prototype,"snippet",void 0),T([B()],_u.prototype,"sortField",void 0),T([B()],_u.prototype,"sortOrder",void 0),T([B()],_u.prototype,"sourceJSON",void 0),T([B()],_u.prototype,"tags",void 0),T([B()],_u.prototype,"thumbnail",void 0),T([B({readOnly:!0})],_u.prototype,"thumbnailUrl",null),T([B()],_u.prototype,"title",void 0),T([B({readOnly:!0})],_u.prototype,"url",null),_u=ZU=T([_t("esri.portal.PortalGroup")],_u);const YU=_u;let y3=class extends Iu{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};T([B()],y3.prototype,"nextQueryParams",void 0),T([B()],y3.prototype,"queryParams",void 0),T([B()],y3.prototype,"results",void 0),T([B()],y3.prototype,"total",void 0),y3=T([_t("esri.portal.PortalQueryResult")],y3);const ust=y3;let dg=class extends qr{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){var r;const e=(r=this.portal)==null?void 0:r.restUrl;return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new Pr("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};T([B({type:Date})],dg.prototype,"created",void 0),T([B()],dg.prototype,"id",void 0),T([B()],dg.prototype,"portal",void 0),T([B()],dg.prototype,"title",void 0),T([B({readOnly:!0})],dg.prototype,"url",null),T([B()],dg.prototype,"username",void 0),dg=T([_t("esri.portal.PortalFolder")],dg);const cst=dg;var XU;let Sa=XU=class extends qr{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){var e;const t=(e=this.portal)==null?void 0:e.restUrl;return t?`${t}/content/users/${this.username}`:null}get url(){var e;const t=(e=this.portal)==null?void 0:e.restUrl;return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t==null?void 0:t.data,n=t==null?void 0:t.folder,i={method:"post"};e&&(i.query=e.createPostQuery(),r!=null&&(typeof r=="string"?i.query.text=r:typeof r=="object"&&(i.query.text=JSON.stringify(r))));let s=this.userContentUrl;return n&&(s+="/"+(typeof n=="string"?n:n.id)),this.portal.request(s+"/addItem",i).then(o=>(e.id=o.id,e.portal=this.portal,e.loaded?e.reload():e.load()))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const n=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:n}),t.id=null,t.portal=null}async deleteItems(t,e=!1){t=t.concat();const r=this.userContentUrl+"/deleteItems",n=[],i=t.map(s=>s.id);if(i.length){const s={method:"post",query:{items:i.join(","),permanentDelete:e}},o=await this.portal.request(r,s);for(const a of o.results){const l=t.find(f=>a.itemId===f.id),u=a.success;let d=null;u?(l.id=null,l.portal=null):a.error&&(d=new Pr("portal:delete-item-failed",a.error.message,a.error)),n.push({item:l,success:u,error:d})}}return n}fetchFolders(){const t={query:{num:1}};return this.portal.request(this.userContentUrl??"",t).then(e=>{let r;return r=e&&e.folders?e.folders.map(n=>{const i=cst.fromJSON(n);return i.portal=this.portal,i}):[],r})}fetchGroups(){return this.portal.request(this.url??"").then(t=>{let e;return e=t&&t.groups?t.groups.map(r=>{const n=YU.fromJSON(r);return n.portal=this.portal,n}):[],e})}async fetchItems(t){t??(t={});let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:r}=await fs(()=>Promise.resolve().then(()=>e5e),void 0),n={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},i=await this.portal.request(e,{query:n});let s;return i!=null&&i.items?(s=i.items.map(o=>{const a=r.fromJSON(o);return a.portal=this.portal,a}),await Promise.all(s.map(o=>o.load())),{items:s,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(t=>t.tags)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new YU({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new Pr("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,n=e?{folderID:typeof e=="string"?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:n})}toJSON(){throw new Pr("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new XU({sourceJSON:t});return e.read(t),e}};T([B()],Sa.prototype,"access",void 0),T([B({type:Date})],Sa.prototype,"created",void 0),T([B()],Sa.prototype,"culture",void 0),T([B()],Sa.prototype,"description",void 0),T([B()],Sa.prototype,"email",void 0),T([B()],Sa.prototype,"favGroupId",void 0),T([B()],Sa.prototype,"fullName",void 0),T([B({type:Date})],Sa.prototype,"modified",void 0),T([B()],Sa.prototype,"orgId",void 0),T([B()],Sa.prototype,"portal",void 0),T([B()],Sa.prototype,"preferredView",void 0),T([B()],Sa.prototype,"privileges",void 0),T([B()],Sa.prototype,"region",void 0),T([B()],Sa.prototype,"role",void 0),T([B()],Sa.prototype,"roleId",void 0),T([B()],Sa.prototype,"sourceJSON",void 0),T([B()],Sa.prototype,"thumbnail",void 0),T([B({readOnly:!0})],Sa.prototype,"thumbnailUrl",null),T([B()],Sa.prototype,"units",void 0),T([B({readOnly:!0})],Sa.prototype,"userContentUrl",null),T([B({readOnly:!0})],Sa.prototype,"url",null),T([B()],Sa.prototype,"username",void 0),T([B()],Sa.prototype,"userLicenseTypeId",void 0),T([B()],Sa.prototype,"userType",void 0),Sa=XU=T([_t("esri.portal.PortalUser")],Sa);const $X=Sa;var mf;let KT;const Cne={PortalGroup:()=>Promise.resolve({default:YU}),PortalItem:()=>fs(()=>Promise.resolve().then(()=>e5e),void 0),PortalUser:()=>Promise.resolve({default:$X})};let wn=mf=class extends XZ(fO){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=Ao.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return typeof t=="string"?{url:t}:t}destroy(){Sne.unregister(this),this.defaultBasemap=t5(this.defaultBasemap),this.defaultDevBasemap=t5(this.defaultDevBasemap),this.defaultVectorBasemap=t5(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=H1(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)Ao.request.trustedServers.includes(e)||Ao.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){var r;const t=(r=this.user)==null?void 0:r.orgId,e=!t||this.canSearchPublic;return this.id&&!e?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t&&t.toLowerCase()}readUser(t){let e=null;return t&&(e=$X.fromJSON(t),e.portal=this),e}load(t){const e=fs(()=>import("./Basemap-drllXW5h.js"),__vite__mapDeps([20,21,22])).then(({default:r})=>{Q1(t),KT=r}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t)).then(r=>{var n;if(ws){const i=ws;this.credential=i.findCredential(this.restUrl),this.credential||this.authMode!==mf.AUTH_MODE_AUTO&&this.authMode!==mf.AUTH_MODE_NO_PROMPT||((n=this._esriIdCredentialCreateHandle)==null||n.remove(),this._esriIdCredentialCreateHandle=i.on("credential-create",hst(new WeakRef(this))),Sne.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=r,this.read(r)});return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await fs(async()=>{const{default:r}=await import("./ElevationLayer-CJdvBfQg.js");return{default:r}},__vite__mapDeps([23,24,25,26,27,28]))).default;return t?t.map(r=>new e({id:r.id,url:r.url})):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if((e==null?void 0:e.include3d)===!0&&this.use3dBasemaps!==!1){const n=await this._fetchBasemaps3D(t,e);r.unshift(...n)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then(e=>e.categorySchema):sy(t)?Promise.reject(Bc()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new J0({num:100,sortField:"title"});if(e!=null&&e.length){const n=[];for(const i of e)n.push(`(title:"${i.title}" AND owner:${i.owner})`);return r.query=n.join(" OR "),this.queryGroups(r,t).then(i=>i.results)}return sy(t)?Promise.reject(Bc()):Promise.resolve([])}fetchRegions(t){var r;const e=((r=this.user)==null?void 0:r.culture)||this.culture||im();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){var r;const e=((r=this.user)==null?void 0:r.culture)||this.culture||im();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return ast(()=>new mf)}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const n=this.restUrl+"/portals/self",i={authMode:t,query:{culture:im().toLowerCase()},withCredentials:!0,...r};return i.authMode==="auto"&&(i.authMode="no-prompt"),e&&(i.query.default=!0),this.request(n,i)}queryPortal(t,e,r,n){const i=gc(J0,e),s=o=>this.request(this.restUrl+t,{...i.toRequestOptions(this),...n}).then(a=>{const l=i.clone();return l.start=a.nextStart,new ust({nextQueryParams:l,queryParams:i,total:a.total,results:mf._resultsToTypedArray(o,{portal:this},a,n)})}).then(a=>Promise.all(a.results.map(l=>typeof l.when=="function"?l.when():a)).then(()=>a,l=>(q0(l),a)));return r&&Cne[r]?Cne[r]().then(({default:o})=>(Q1(n),s(o))):s()}signIn(){if(this.authMode===mf.AUTH_MODE_ANONYMOUS||this.authMode===mf.AUTH_MODE_NO_PROMPT&&!ws)return Promise.reject(new Pr("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if(this.loadStatus==="failed")return Promise.reject(this.loadError);const t=e=>Promise.resolve().then(()=>this.loadStatus==="not-loaded"?(e||(this.authMode="immediate"),this.load().then(()=>null)):this.loadStatus==="loading"?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(r=>{r&&(this.sourceJSON=r,this.read(r))});return ws?ws.getCredential(this.restUrl,{prompt:this.authMode!==mf.AUTH_MODE_NO_PROMPT}).then(e=>t(e)):t(this.credential)}normalizeUrl(t){var r;const e=(r=this.credential)==null?void 0:r.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then(n=>{const i=mf._resultsToTypedArray(r,{portal:this},n);return Promise.all(i.map(s=>typeof s.when=="function"?s.when():n)).then(()=>i,()=>i)})}request(t,e={}){const r={f:"json",...e.query},{authMode:n=this.authMode===mf.AUTH_MODE_ANONYMOUS||this.authMode===mf.AUTH_MODE_NO_PROMPT?this.authMode:"auto",body:i=null,cacheBust:s=!1,method:o="auto",responseType:a="json",signal:l}=e,u={authMode:n,body:i,cacheBust:s,method:o,query:r,responseType:a,timeout:0,signal:l};return e.withCredentials&&(u.withCredentials=!0),sa(this._normalizeSSL(t),u).then(d=>d.data)}toJSON(){throw new Pr("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new mf({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new Pr("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new J0;r.query=t||(Ao.apiKey&&u0e(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const n=await this.queryGroups(r,e);if(!n.total)return[];const i=n.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const s=await i.queryItems(r,e);return s.total?s.results.filter(o=>o.type==="Web Map").map(o=>new KT({portalItem:o})):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const n=new J0({query:r,disableExtraQuery:!0}),i=await this.queryGroups(n,e);if(!i.total)return[];const s=i.results[0];n.num=100,n.query='type:"Web Scene"',n.sortField=s.sortField||"name",n.sortOrder=s.sortOrder||"desc";const o=await s.queryItems(n,e);return o.total?o.results.filter(a=>a.type==="Web Scene").map(a=>new KT({portalItem:a})):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=KT.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,n){let i;if(r){const s=n!=null?n.signal:null;i=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(i=i.map(o=>{const a=Object.assign(t?t.fromJSON(o):o,e);return typeof a.load=="function"&&a.load(s),a}))}else i=[];return i}};wn.AUTH_MODE_ANONYMOUS="anonymous",wn.AUTH_MODE_AUTO="auto",wn.AUTH_MODE_IMMEDIATE="immediate",wn.AUTH_MODE_NO_PROMPT="no-prompt",T([B()],wn.prototype,"access",void 0),T([B()],wn.prototype,"allSSL",void 0),T([B()],wn.prototype,"authMode",void 0),T([B()],wn.prototype,"authorizedCrossOriginDomains",void 0),T([un("authorizedCrossOriginDomains")],wn.prototype,"readAuthorizedCrossOriginDomains",null),T([B()],wn.prototype,"basemapGalleryGroupQuery",void 0),T([B({json:{name:"3DBasemapGalleryGroupQuery"}})],wn.prototype,"basemapGalleryGroupQuery3D",void 0),T([B()],wn.prototype,"bingKey",void 0),T([B()],wn.prototype,"canListApps",void 0),T([B()],wn.prototype,"canListData",void 0),T([B()],wn.prototype,"canListPreProvisionedItems",void 0),T([B()],wn.prototype,"canProvisionDirectPurchase",void 0),T([B()],wn.prototype,"canSearchPublic",void 0),T([B()],wn.prototype,"canShareBingPublic",void 0),T([B()],wn.prototype,"canSharePublic",void 0),T([B()],wn.prototype,"canSignInArcGIS",void 0),T([B()],wn.prototype,"canSignInIDP",void 0),T([B()],wn.prototype,"colorSetsGroupQuery",void 0),T([B()],wn.prototype,"commentsEnabled",void 0),T([B({type:Date})],wn.prototype,"created",void 0),T([B()],wn.prototype,"credential",void 0),T([B()],wn.prototype,"culture",void 0),T([B()],wn.prototype,"currentVersion",void 0),T([B()],wn.prototype,"customBaseUrl",void 0),T([B()],wn.prototype,"defaultBasemap",void 0),T([un("defaultBasemap")],wn.prototype,"readDefaultBasemap",null),T([B()],wn.prototype,"defaultDevBasemap",void 0),T([un("defaultDevBasemap")],wn.prototype,"readDefaultDevBasemap",null),T([B({type:Mu})],wn.prototype,"defaultExtent",void 0),T([B()],wn.prototype,"defaultVectorBasemap",void 0),T([un("defaultVectorBasemap")],wn.prototype,"readDefaultVectorBasemap",null),T([B()],wn.prototype,"description",void 0),T([B()],wn.prototype,"devBasemapGalleryGroupQuery",void 0),T([B()],wn.prototype,"eueiEnabled",void 0),T([B({readOnly:!0})],wn.prototype,"extraQuery",null),T([B()],wn.prototype,"featuredGroups",void 0),T([B()],wn.prototype,"featuredItemsGroupQuery",void 0),T([B()],wn.prototype,"galleryTemplatesGroupQuery",void 0),T([B()],wn.prototype,"layoutGroupQuery",void 0),T([B()],wn.prototype,"livingAtlasGroupQuery",void 0),T([B()],wn.prototype,"hasCategorySchema",void 0),T([B()],wn.prototype,"helpBase",void 0),T([B()],wn.prototype,"helperServices",void 0),T([B()],wn.prototype,"helpMap",void 0),T([B()],wn.prototype,"homePageFeaturedContent",void 0),T([B()],wn.prototype,"homePageFeaturedContentCount",void 0),T([B()],wn.prototype,"httpPort",void 0),T([B()],wn.prototype,"httpsPort",void 0),T([B()],wn.prototype,"id",void 0),T([B()],wn.prototype,"ipCntryCode",void 0),T([B({readOnly:!0})],wn.prototype,"isOrganization",null),T([B()],wn.prototype,"isPortal",void 0),T([B()],wn.prototype,"isReadOnly",void 0),T([B({readOnly:!0})],wn.prototype,"itemPageUrl",null),T([B()],wn.prototype,"layerTemplatesGroupQuery",void 0),T([B()],wn.prototype,"maxTokenExpirationMinutes",void 0),T([B({type:Date})],wn.prototype,"modified",void 0),T([B()],wn.prototype,"name",void 0),T([B()],wn.prototype,"portalHostname",void 0),T([B()],wn.prototype,"portalMode",void 0),T([B()],wn.prototype,"portalProperties",void 0),T([B()],wn.prototype,"region",void 0),T([B()],wn.prototype,"recycleBinEnabled",void 0),T([B({readOnly:!0})],wn.prototype,"restUrl",null),T([B()],wn.prototype,"rotatorPanels",void 0),T([B()],wn.prototype,"showHomePageDescription",void 0),T([B()],wn.prototype,"sourceJSON",void 0),T([B()],wn.prototype,"staticImagesUrl",void 0),T([B({json:{name:"2DStylesGroupQuery"}})],wn.prototype,"stylesGroupQuery2d",void 0),T([B({json:{name:"stylesGroupQuery"}})],wn.prototype,"stylesGroupQuery3d",void 0),T([B()],wn.prototype,"supportsHostedServices",void 0),T([B()],wn.prototype,"symbolSetsGroupQuery",void 0),T([B()],wn.prototype,"templatesGroupQuery",void 0),T([B()],wn.prototype,"thumbnail",void 0),T([B({readOnly:!0})],wn.prototype,"thumbnailUrl",null),T([B()],wn.prototype,"units",void 0),T([B()],wn.prototype,"url",void 0),T([B()],wn.prototype,"urlKey",void 0),T([un("urlKey")],wn.prototype,"readUrlKey",null),T([B()],wn.prototype,"user",void 0),T([un("user")],wn.prototype,"readUser",null),T([B()],wn.prototype,"use3dBasemaps",void 0),T([B()],wn.prototype,"useStandardizedQuery",void 0),T([B()],wn.prototype,"useVectorBasemaps",void 0),T([B()],wn.prototype,"vectorBasemapGalleryGroupQuery",void 0),wn=mf=T([_t("esri.portal.Portal")],wn);const Fp=wn,Sne=new FinalizationRegistry(t=>{t.remove()});function hst(t){const e=ws;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}let v3=class extends Fa(qr){constructor(e){super(e),this.type="style",this.placement="begin-end",this.style="arrow",this.color=null}equals(e){return e!=null&&e.placement===this.placement&&e.style===this.style&&(this.color==null&&e.color==null||this.color!=null&&e.color!=null&&this.color.toJSON()===e.color.toJSON())}};T([B({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],v3.prototype,"type",void 0),T([B({type:Tit,json:{default:"begin-end",write:!0}})],v3.prototype,"placement",void 0),T([B({type:y2e,json:{default:"arrow",write:!0}})],v3.prototype,"style",void 0),T([B({type:ks,json:{type:[Qa],default:null,write:!0}})],v3.prototype,"color",void 0),v3=T([_t("esri.symbols.LineStyleMarker3D")],v3);const JU=v3;var xL;let O0=xL=class extends bm{constructor(t){super(t),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.size=Dp(1),this.pattern=null,this.marker=null}clone(){const t={enabled:this.enabled,material:this.material!=null?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:this.pattern!=null?this.pattern.clone():null,marker:this.marker!=null?this.marker.clone():null};return new xL(t)}static fromSimpleLineSymbol(t){var r;const e={enabled:!0,size:t.width??Dp(1),cap:t.cap||"butt",join:t.join||"miter",pattern:t.style?new IX({style:t.style}):null,material:new Ap({color:(t.color||$6).clone()}),marker:t.marker?new JU({placement:t.marker.placement,style:t.marker.style,color:((r=t.marker.color)==null?void 0:r.clone())??null}):null};return new xL(e)}};T([B({type:Ap,json:{write:!0}})],O0.prototype,"material",void 0),T([ji({Line:"line"},{readOnly:!0})],O0.prototype,"type",void 0),T([B({type:C2e,json:{write:!0,default:"miter"}})],O0.prototype,"join",void 0),T([B({type:kX,json:{write:!0,default:"butt"}})],O0.prototype,"cap",void 0),T([B(fm)],O0.prototype,"size",void 0),T([B(b2e)],O0.prototype,"pattern",void 0),T([B({types:{key:"type",base:JU,typeMap:{style:JU}},json:{write:!0}})],O0.prototype,"marker",void 0),O0=xL=T([_t("esri.symbols.LineSymbol3DLayer")],O0);const u7=O0;var KU;const dst=Dh()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let Fb=KU=class extends qr{clone(){return new KU({href:this.href,primitive:this.primitive})}};T([B({type:String,json:{read:AX,write:T5}})],Fb.prototype,"href",void 0),T([ji(dst)],Fb.prototype,"primitive",void 0),Fb=KU=T([_t("esri.symbols.support.ObjectSymbol3DLayerResource")],Fb);var QU;let B3=QU=class extends Iu{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new QU({x:this.x,y:this.y,z:this.z})}};T([B({type:Number})],B3.prototype,"x",void 0),T([B({type:Number})],B3.prototype,"y",void 0),T([B({type:Number})],B3.prototype,"z",void 0),B3=QU=T([_t("esri.symbols.support.Symbol3DAnchorPosition3D")],B3);var eH;let xh=eH=class extends bm{constructor(t){super(t),this.material=null,this.castShadows=!0,this.resource=null,this.type="object",this.width=void 0,this.height=void 0,this.depth=void 0,this.anchor=void 0,this.anchorPosition=void 0,this.heading=void 0,this.tilt=void 0,this.roll=void 0}clone(){var t,e,r;return new eH({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,anchorPosition:(t=this.anchorPosition)==null?void 0:t.clone(),depth:this.depth,enabled:this.enabled,height:this.height,material:((e=this.material)==null?void 0:e.clone())??null,castShadows:this.castShadows,resource:(r=this.resource)==null?void 0:r.clone(),width:this.width})}get isPrimitive(){return!this.resource||typeof this.resource.href!="string"}};T([B({type:Ap,json:{write:!0}})],xh.prototype,"material",void 0),T([B({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],xh.prototype,"castShadows",void 0),T([B({type:Fb,json:{write:!0}})],xh.prototype,"resource",void 0),T([ji({Object:"object"},{readOnly:!0})],xh.prototype,"type",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"width",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"height",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"depth",void 0),T([ji({center:"center",top:"top",bottom:"bottom",origin:"origin",relative:"relative"}),B({json:{default:"origin"}})],xh.prototype,"anchor",void 0),T([B({type:B3,json:{type:[Number],read:{reader:t=>new B3({x:t[0],y:t[1],z:t[2]})},write:{writer:(t,e)=>{e.anchorPosition=[t.x,t.y,t.z]},overridePolicy(){return{enabled:this.anchor==="relative"}}}}})],xh.prototype,"anchorPosition",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"heading",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"tilt",void 0),T([B({type:Number,json:{write:!0}})],xh.prototype,"roll",void 0),T([B({readOnly:!0})],xh.prototype,"isPrimitive",null),xh=eH=T([_t("esri.symbols.ObjectSymbol3DLayer")],xh);const OX=xh;var tH;let td=tH=class extends bm{constructor(t){super(t),this.material=null,this.castShadows=!0,this.type="path",this.profile="circle",this.join="miter",this.cap="butt",this.width=void 0,this.height=void 0,this.anchor="center",this.profileRotation="all"}readWidth(t,e){return t??(e.height==null&&e.size!=null?e.size:void 0)}readHeight(t,e){return t??(e.width==null&&e.size!=null?e.size:void 0)}clone(){return new tH({enabled:this.enabled,material:this.material!=null?this.material.clone():null,castShadows:this.castShadows,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})}};T([B({type:Ap,json:{write:!0}})],td.prototype,"material",void 0),T([B({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],td.prototype,"castShadows",void 0),T([ji({Path:"path"},{readOnly:!0})],td.prototype,"type",void 0),T([B({type:["circle","quad"],json:{write:!0,default:"circle"}})],td.prototype,"profile",void 0),T([B({type:C2e,json:{write:!0,default:"miter"}})],td.prototype,"join",void 0),T([B({type:Uit,json:{write:!0,default:"butt"}})],td.prototype,"cap",void 0),T([B({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],td.prototype,"width",void 0),T([un("width",["width","size","height"])],td.prototype,"readWidth",null),T([B({type:Number,json:{write:!0}})],td.prototype,"height",void 0),T([un("height",["height","size","width"])],td.prototype,"readHeight",null),T([B({type:["center","bottom","top"],json:{write:!0,default:"center"}})],td.prototype,"anchor",void 0),T([B({type:["heading","all"],json:{write:!0,default:"all"}})],td.prototype,"profileRotation",void 0),td=tH=T([_t("esri.symbols.PathSymbol3DLayer")],td);const NX=td;var rH;let y4=rH=class extends qr{constructor(){super(...arguments),this.color=new ks([0,0,0,1]),this.size=0}clone(){const t={color:Qt(this.color),size:this.size};return new rH(t)}};T([B(s_)],y4.prototype,"color",void 0),T([B(fm)],y4.prototype,"size",void 0),y4=rH=T([_t("esri.symbols.support.Symbol3DHalo")],y4);let N6=class extends Fa(qr){constructor(e){super(e),this.color=null}};T([B(s_)],N6.prototype,"color",void 0),N6=T([_t("esri.symbols.support.Symbol3DTextBackground")],N6);var wL;let Id=wL=class extends bm{constructor(t){super(t),this._userSize=void 0,this.halo=null,this.horizontalAlignment="center",this.lineHeight=1,this.material=null,this.background=null,this.text=null,this.type="text",this.verticalAlignment="baseline"}get font(){return this._get("font")||null}set font(t){t!=null&&this._userSize!=null&&(t.size=this._userSize),this._set("font",t)}writeFont(t,e,r,n){const i={...n,textSymbol3D:!0};e.font=t.write({},i),delete e.font.size}get size(){var t;return this._userSize!=null?this._userSize:((t=this.font)==null?void 0:t.size)!=null?this.font.size:9}set size(t){this._userSize=t,this.font!=null&&(this.font.size=this._userSize),this.notifyChange("size")}clone(){const t=new wL({enabled:this.enabled,font:this.font&&Qt(this.font),halo:this.halo&&Qt(this.halo),horizontalAlignment:this.horizontalAlignment,lineHeight:this.lineHeight,material:this.material!=null?this.material.clone():null,text:this.text,verticalAlignment:this.verticalAlignment,background:Qt(this.background)});return t._userSize=this._userSize,t}static fromTextSymbol(t){return new wL({font:t.font!=null?t.font.clone():new hO,halo:fst(t.haloColor,t.haloSize),horizontalAlignment:t.horizontalAlignment,lineHeight:t.lineHeight,material:t.color?new Ap({color:t.color.clone()}):null,text:t.text,verticalAlignment:t.verticalAlignment,background:t.backgroundColor?new N6({color:t.backgroundColor.clone()}):null})}};function fst(t,e){return t&&e!=null&&e>0?new y4({color:Qt(t),size:e}):null}T([B({type:hO,json:{write:!0}})],Id.prototype,"font",null),T([On("font")],Id.prototype,"writeFont",null),T([B({type:y4,json:{write:!0}})],Id.prototype,"halo",void 0),T([B({...E2e,json:{default:"center",write:!0}})],Id.prototype,"horizontalAlignment",void 0),T([B({...S2e,json:{default:1,write:!0}})],Id.prototype,"lineHeight",void 0),T([B({type:Ap,json:{write:!0}})],Id.prototype,"material",void 0),T([B({type:N6,json:{write:!0}})],Id.prototype,"background",void 0),T([B(fm)],Id.prototype,"size",null),T([B({type:String,json:{write:!0}})],Id.prototype,"text",void 0),T([ji({Text:"text"},{readOnly:!0})],Id.prototype,"type",void 0),T([B({...M2e,json:{default:"baseline",write:!0}})],Id.prototype,"verticalAlignment",void 0),Id=wL=T([_t("esri.symbols.TextSymbol3DLayer")],Id);const c7=Id;var nH;let gv=nH=class extends bm{constructor(t){super(t),this.color=iH.clone(),this.type="water",this.waterbodySize="medium",this.waveDirection=null,this.waveStrength="moderate"}clone(){return new nH({color:Qt(this.color),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})}};T([B({type:ks,nonNullable:!0,json:{type:[Qa],write:(t,e,r)=>e[r]=t.toArray(ks.AlphaMode.UNLESS_OPAQUE),default:()=>iH.clone(),defaultEquals:t=>t.toCss(!0)===iH.toCss(!0)}})],gv.prototype,"color",void 0),T([ji({Water:"water"},{readOnly:!0})],gv.prototype,"type",void 0),T([B({type:["small","medium","large"],json:{write:!0,default:"medium"}})],gv.prototype,"waterbodySize",void 0),T([B({type:Number,json:{write:!0,default:null}})],gv.prototype,"waveDirection",void 0),T([B({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],gv.prototype,"waveStrength",void 0),gv=nH=T([_t("esri.symbols.WaterSymbol3DLayer")],gv);const k2e=gv,iH=new ks([0,119,190]);var sH;let _3=sH=class extends Iu{constructor(t){super(t),this.name=null,this.styleUrl=null,this.styleName=null,this.portal=null}clone(){return new sH({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}};T([B({type:String})],_3.prototype,"name",void 0),T([B({type:String})],_3.prototype,"styleUrl",void 0),T([B({type:String})],_3.prototype,"styleName",void 0),T([B({type:Fp})],_3.prototype,"portal",void 0),_3=sH=T([_t("esri.symbols.support.StyleOrigin")],_3);const oH=_3;var aH;let D6=aH=class extends Iu{constructor(){super(...arguments),this.url=""}clone(){return new aH({url:this.url})}};T([B({type:String})],D6.prototype,"url",void 0),D6=aH=T([_t("esri.symbols.support.Thumbnail")],D6);const A2e={icon:Y3,object:OX,line:u7,path:NX,fill:Z5,extrude:g2e,text:c7,water:k2e},pst=$o.ofType({base:bm,key:"type",typeMap:A2e,errorContext:"symbol-layer"});let N0=class extends Gc{constructor(e){super(e),this.styleOrigin=null,this.thumbnail=null,this.type=null;const r=this.__accessor__&&this.__accessor__.metadata&&this.__accessor__.metadata.symbolLayers,n=r==null?void 0:r.type,i=n||$o;this._set("symbolLayers",new i)}get color(){return null}set color(e){this.constructed&&li.getLogger(this).error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")}set symbolLayers(e){tst(e,this._get("symbolLayers"))}readStyleOrigin(e,r,n){if(e.styleUrl&&e.name){const i=l7(e.styleUrl,n);return new oH({styleUrl:i,name:e.name})}if(e.styleName&&e.name)return new oH({portal:(n==null?void 0:n.portal)||Fp.getDefault(),styleName:e.styleName,name:e.name});n!=null&&n.messages&&n.messages.push(new cm("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:n,definition:e}))}writeStyleOrigin(e,r,n,i){if(e.styleUrl&&e.name){let s=lE(e.styleUrl,i);Af(s)&&(s=Lp(s)),r.styleOrigin={styleUrl:s,name:e.name}}else e.styleName&&e.name&&(e.portal&&(i!=null&&i.portal)&&!r0e(e.portal.restUrl,i.portal.restUrl)?i!=null&&i.messages&&i.messages.push(new cm("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):r.styleOrigin={styleName:e.styleName,name:e.name})}normalizeCtorArgs(e){return e instanceof bm||e&&A2e[e.type]?{symbolLayers:[e]}:Array.isArray(e)?{symbolLayers:e}:e}};T([B({json:{read:!1,write:!1}})],N0.prototype,"color",null),T([B({type:pst,nonNullable:!0,json:{write:!0}}),Pl(rst)],N0.prototype,"symbolLayers",null),T([B({type:oH})],N0.prototype,"styleOrigin",void 0),T([un("styleOrigin")],N0.prototype,"readStyleOrigin",null),T([On("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],N0.prototype,"writeStyleOrigin",null),T([B({type:D6,json:{read:!1}})],N0.prototype,"thumbnail",void 0),T([B({type:["point-3d","line-3d","polygon-3d","mesh-3d","label-3d"],readOnly:!0})],N0.prototype,"type",void 0),N0=T([_t("esri.symbols.Symbol3D")],N0);const h7=N0;let zb=class extends qr{constructor(e){super(e),this.visible=!0}clone(){throw new Error("Subclasses of Callout3D should implement their own clone method.")}};T([B({type:["line"],constructOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],zb.prototype,"type",void 0),T([B({readOnly:!0})],zb.prototype,"visible",void 0),zb=T([_t("esri.symbols.callouts.Callout3D")],zb);const P2e=zb;var lH;let bL=lH=class extends qr{constructor(t){super(t),this.color=new ks("white")}clone(){return new lH({color:Qt(this.color)})}};T([B(s_)],bL.prototype,"color",void 0),bL=lH=T([_t("esri.symbols.callouts.LineCallout3DBorder")],bL);const mst=bL;var uH;let yv=uH=class extends P2e{constructor(t){super(t),this.type="line",this.color=new ks([0,0,0,1]),this.size=Dp(1),this.border=null}get visible(){return this.size>0&&this.color!=null&&this.color.a>0}clone(){return new uH({color:Qt(this.color),size:this.size,border:Qt(this.border)})}};T([ji({line:"line"})],yv.prototype,"type",void 0),T([B(s_)],yv.prototype,"color",void 0),T([B(fm)],yv.prototype,"size",void 0),T([B({type:mst,json:{write:!0}})],yv.prototype,"border",void 0),T([B({readOnly:!0})],yv.prototype,"visible",null),yv=uH=T([_t("esri.symbols.callouts.LineCallout3D")],yv);const $2e=yv;function DX(t){if(!t)return!1;const e=t.verticalOffset;return!!e&&!(e.screenLength<=0||e.maxWorldLength!=null&&e.maxWorldLength<=0)}function O2e(t){if(!t||!t.supportsCallout||!t.supportsCallout())return!1;const e=t.callout;return!!e&&!!e.visible&&!!DX(t)}const N2e={types:{key:"type",base:P2e,typeMap:{line:$2e}},json:{write:!0}};var cH;let Px=cH=class extends qr{constructor(t){super(t),this.screenLength=0,this.minWorldLength=0,this.maxWorldLength=null}clone(){return new cH({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})}};T([B(fm)],Px.prototype,"screenLength",void 0),T([B({type:Number,nonNullable:!0,json:{write:!0,default:0}})],Px.prototype,"minWorldLength",void 0),T([B({type:Number,json:{write:!0}})],Px.prototype,"maxWorldLength",void 0),Px=cH=T([_t("esri.symbols.support.Symbol3DVerticalOffset")],Px);const FX=Px;var CL;const D2e=$o.ofType({base:null,key:"type",typeMap:{text:c7}});let vv=CL=class extends h7{constructor(t){super(t),this.verticalOffset=null,this.callout=null,this.styleOrigin=null,this.symbolLayers=new D2e,this.type="label-3d"}supportsCallout(){return!0}hasVisibleCallout(){return O2e(this)}hasVisibleVerticalOffset(){return DX(this)}clone(){return new CL({styleOrigin:Qt(this.styleOrigin),symbolLayers:Qt(this.symbolLayers),thumbnail:Qt(this.thumbnail),callout:Qt(this.callout),verticalOffset:Qt(this.verticalOffset)})}static fromTextSymbol(t){return new CL({symbolLayers:new $o([c7.fromTextSymbol(t)])})}};T([B({type:FX,json:{write:!0}})],vv.prototype,"verticalOffset",void 0),T([B(N2e)],vv.prototype,"callout",void 0),T([B({json:{read:!1,write:!1}})],vv.prototype,"styleOrigin",void 0),T([B({type:D2e})],vv.prototype,"symbolLayers",void 0),T([ji({LabelSymbol3D:"label-3d"},{readOnly:!0})],vv.prototype,"type",void 0),vv=CL=T([_t("esri.symbols.LabelSymbol3D")],vv);const pO=vv;var SL;const F2e=$o.ofType({base:null,key:"type",typeMap:{line:u7,path:NX}}),gst=$o.ofType({base:null,key:"type",typeMap:{line:u7,path:NX}});let Bb=SL=class extends h7{constructor(t){super(t),this.symbolLayers=new F2e,this.type="line-3d"}clone(){return new SL({styleOrigin:Qt(this.styleOrigin),symbolLayers:Qt(this.symbolLayers),thumbnail:Qt(this.thumbnail)})}static fromSimpleLineSymbol(t){return new SL({symbolLayers:new $o([u7.fromSimpleLineSymbol(t)])})}};T([B({type:F2e,json:{type:gst}})],Bb.prototype,"symbolLayers",void 0),T([ji({LineSymbol3D:"line-3d"},{readOnly:!0})],Bb.prototype,"type",void 0),Bb=SL=T([_t("esri.symbols.LineSymbol3D")],Bb);const Y5=Bb;let _v=class extends Gc{constructor(e){super(e),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};T([B({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],_v.prototype,"angle",void 0),T([B({type:["simple-marker","picture-marker"],readOnly:!0})],_v.prototype,"type",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],_v.prototype,"xoffset",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],_v.prototype,"yoffset",void 0),T([B({type:Number,cast:t=>t==="auto"?t:lo(t),json:{write:!0}})],_v.prototype,"size",void 0),_v=T([_t("esri.symbols.MarkerSymbol")],_v);const z2e=_v;var EL;const B2e=$o.ofType({base:null,key:"type",typeMap:{fill:Z5}});let jb=EL=class extends h7{constructor(t){super(t),this.symbolLayers=new B2e,this.type="mesh-3d"}clone(){return new EL({styleOrigin:Qt(this.styleOrigin),symbolLayers:Qt(this.symbolLayers),thumbnail:Qt(this.thumbnail)})}static fromSimpleFillSymbol(t){return new EL({symbolLayers:new $o([Z5.fromSimpleFillSymbol(t)])})}};T([B({type:B2e})],jb.prototype,"symbolLayers",void 0),T([ji({MeshSymbol3D:"mesh-3d"},{readOnly:!0})],jb.prototype,"type",void 0),jb=EL=T([_t("esri.symbols.MeshSymbol3D")],jb);const uE=jb;function yst(t,e,r){return e.imageData?n0e({mediaType:e.contentType||"image/png",isBase64:!0,data:e.imageData}):j2e(e.url,r)}function j2e(t,e){if(!Af(t)){const r=_st(e);if(r)return yw(r,"images",t)}return l7(t,e)}function vst(t,e,r,n){if(j5(t)){const i=LC(t);if(!i)return;e.contentType=i.mediaType,e.imageData=i.data,r&&r.imageData===e.imageData&&r.url&&T5(r.url,e,"url",n)}else T5(t,e,"url",n)}const V2e={json:{read:{source:["imageData","url"],reader:yst},write:{writer(t,e,r,n){vst(t,e,this.source,n)}}}},U2e={readOnly:!0,json:{read:{source:["imageData","url"],reader(t,e,r){const n={};return e.imageData&&(n.imageData=e.imageData),e.contentType&&(n.contentType=e.contentType),e.url&&(n.url=j2e(e.url,r)),n}}}};function _st(t){var i,s;if(!t)return null;const{origin:e,layer:r}=t;if(e!=="service"&&e!=="portal-item")return null;const n=r==null?void 0:r.type;return n==="feature"||n==="stream"?(i=r.parsedUrl)==null?void 0:i.path:n==="map-image"||n==="tile"?(s=t.url)==null?void 0:s.path:null}var hH;let cp=hH=class extends v2e{constructor(...t){super(...t),this.type="picture-fill",this.url=null,this.xscale=1,this.yscale=1,this.width=12,this.height=12,this.xoffset=0,this.yoffset=0,this.source=null}normalizeCtorArgs(t,e,r,n){if(t&&typeof t!="string"&&t.imageData==null)return t;const i={};return t&&(i.url=t),e&&(i.outline=e),r!=null&&(i.width=lo(r)),n!=null&&(i.height=lo(n)),i}clone(){const t=new hH({color:Qt(this.color),height:this.height,outline:Qt(this.outline),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});return t._set("source",Qt(this.source)),t}hash(){var t;return`${super.hash()}.${(t=this.color)==null?void 0:t.hash()}.${this.height}.${this.url}.${this.width}.${this.xoffset}.${this.xscale}.${this.yoffset}.${this.yscale}`}};T([ji({esriPFS:"picture-fill"},{readOnly:!0})],cp.prototype,"type",void 0),T([B(V2e)],cp.prototype,"url",void 0),T([B({type:Number,json:{write:!0}})],cp.prototype,"xscale",void 0),T([B({type:Number,json:{write:!0}})],cp.prototype,"yscale",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],cp.prototype,"width",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],cp.prototype,"height",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],cp.prototype,"xoffset",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],cp.prototype,"yoffset",void 0),T([B(U2e)],cp.prototype,"source",void 0),cp=hH=T([_t("esri.symbols.PictureFillSymbol")],cp);const zX=cp;var dH;let b1=dH=class extends z2e{constructor(...t){super(...t),this.color=null,this.type="picture-marker",this.url=null,this.source=null,this.height=12,this.width=12,this.size=null}normalizeCtorArgs(t,e,r){if(t&&typeof t!="string"&&t.imageData==null)return t;const n={};return t&&(n.url=t),e!=null&&(n.width=lo(e)),r!=null&&(n.height=lo(r)),n}readHeight(t,e){return e.size||t}readWidth(t,e){return e.size||t}clone(){const t=new dH({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return t._set("source",Qt(this.source)),t}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};T([B({json:{write:!1}})],b1.prototype,"color",void 0),T([ji({esriPMS:"picture-marker"},{readOnly:!0})],b1.prototype,"type",void 0),T([B(V2e)],b1.prototype,"url",void 0),T([B(U2e)],b1.prototype,"source",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],b1.prototype,"height",void 0),T([un("height",["height","size"])],b1.prototype,"readHeight",null),T([B({type:Number,cast:lo,json:{write:!0}})],b1.prototype,"width",void 0),T([B({json:{write:!1}})],b1.prototype,"size",void 0),b1=dH=T([_t("esri.symbols.PictureMarkerSymbol")],b1);const cE=b1;var x3;const H2e=$o.ofType({base:null,key:"type",typeMap:{icon:Y3,object:OX,text:c7}});let w3=x3=class extends h7{constructor(t){super(t),this.verticalOffset=null,this.callout=null,this.symbolLayers=new H2e,this.type="point-3d"}supportsCallout(){if((this.symbolLayers?this.symbolLayers.length:0)<1)return!1;for(const t of this.symbolLayers.items)switch(t.type){case"icon":case"text":case"object":continue;default:return!1}return!0}hasVisibleCallout(){return O2e(this)}hasVisibleVerticalOffset(){return DX(this)}clone(){return new x3({verticalOffset:Qt(this.verticalOffset),callout:Qt(this.callout),styleOrigin:Qt(this.styleOrigin),symbolLayers:Qt(this.symbolLayers),thumbnail:Qt(this.thumbnail)})}static fromSimpleMarkerSymbol(t){return new x3({symbolLayers:new $o([Y3.fromSimpleMarkerSymbol(t)])})}static fromPictureMarkerSymbol(t){return new x3({symbolLayers:new $o([Y3.fromPictureMarkerSymbol(t)])})}static fromCIMSymbol(t){var n,i;if(((i=(n=t.data)==null?void 0:n.symbol)==null?void 0:i.type)!=="CIMPointSymbol")return null;const r=t.data.symbol;return new x3(r!=null&&r.callout?{symbolLayers:new $o([Y3.fromCIMSymbol(t)]),callout:new $2e({size:.5,color:new ks([0,0,0])}),verticalOffset:new FX({screenLength:40})}:{symbolLayers:new $o([Y3.fromCIMSymbol(t)])})}static fromTextSymbol(t){return new x3({symbolLayers:new $o([c7.fromTextSymbol(t)])})}};T([B({type:FX,json:{write:!0}})],w3.prototype,"verticalOffset",void 0),T([B(N2e)],w3.prototype,"callout",void 0),T([B({type:H2e,json:{origins:{"web-scene":{write:!0}}}})],w3.prototype,"symbolLayers",void 0),T([ji({PointSymbol3D:"point-3d"},{readOnly:!0})],w3.prototype,"type",void 0),w3=x3=T([_t("esri.symbols.PointSymbol3D")],w3);const zg=w3;var Vb;const G2e=$o.ofType({base:null,key:"type",typeMap:{extrude:g2e,fill:Z5,icon:Y3,line:u7,object:OX,text:c7,water:k2e}});let Ub=Vb=class extends h7{constructor(t){super(t),this.symbolLayers=new G2e,this.type="polygon-3d"}initialize(){const t=e=>{e.type==="line"&&EC(li.getLogger(this),"LineSymbol3DLayer can not be used as a SymbolLayer with a PolygonSymbol3D symbol anymore.",{replacement:"Use FillSymbol3DLayer.outline instead.",version:"4.28"}),e.type==="text"&&EC(li.getLogger(this),"TextSymbol3DLayer can not be used as a SymbolLayer with a PolygonSymbol3D symbol anymore.",{replacement:"Use Labels instead.",version:"4.28"})};for(const e of this.symbolLayers)t(e);this.addHandles(lNe(()=>this.symbolLayers,"after-add",({item:e})=>t(e),Sme))}clone(){return new Vb({styleOrigin:Qt(this.styleOrigin),symbolLayers:Qt(this.symbolLayers),thumbnail:Qt(this.thumbnail)})}static fromJSON(t){var r;const e=new Vb;if(e.read(t),e.symbolLayers.length===2&&e.symbolLayers.at(0).type==="fill"&&e.symbolLayers.at(1).type==="line"){const n=e.symbolLayers.at(0),i=e.symbolLayers.at(1);!i.enabled||(r=t.symbolLayers)!=null&&r[1]&&t.symbolLayers[1].enable===!1||(n.outline={size:i.size,color:i.material!=null?i.material.color:null}),e.symbolLayers.removeAt(1)}return e}static fromSimpleFillSymbol(t){return new Vb({symbolLayers:new $o([Z5.fromSimpleFillSymbol(t)])})}};T([B({type:G2e,json:{write:!0}})],Ub.prototype,"symbolLayers",void 0),T([ji({PolygonSymbol3D:"polygon-3d"},{readOnly:!0})],Ub.prototype,"type",void 0),Ub=Vb=T([_t("esri.symbols.PolygonSymbol3D")],Ub);const o_=Ub;var fH;const GF=new ro({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let b3=fH=class extends v2e{constructor(...t){super(...t),this.color=new ks([0,0,0,.25]),this.outline=new jf,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,r){if(t&&typeof t!="string")return t;const n={};return t&&(n.style=t),e&&(n.outline=e),r&&(n.color=r),n}clone(){return new fH({color:Qt(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};T([B()],b3.prototype,"color",void 0),T([B()],b3.prototype,"outline",void 0),T([ji({esriSFS:"simple-fill"},{readOnly:!0})],b3.prototype,"type",void 0),T([B({type:GF.apiValues,json:{read:GF.read,write:GF.write}})],b3.prototype,"style",void 0),b3=fH=T([_t("esri.symbols.SimpleFillSymbol")],b3);const a_=b3;var pH;const qF=new ro({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let D0=pH=class extends z2e{constructor(...t){super(...t),this.color=new ks([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new jf}normalizeCtorArgs(t,e,r,n){if(t&&typeof t!="string")return t;const i={};return t&&(i.style=t),e!=null&&(i.size=lo(e)),r&&(i.outline=r),n&&(i.color=n),i}writeColor(t,e){t&&this.style!=="x"&&this.style!=="cross"&&(e.color=t.toJSON()),t===null&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new pH({angle:this.angle,color:Qt(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){var t;return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${(t=this.outline)==null?void 0:t.hash()}`}};T([B()],D0.prototype,"color",void 0),T([On("color")],D0.prototype,"writeColor",null),T([ji({esriSMS:"simple-marker"},{readOnly:!0})],D0.prototype,"type",void 0),T([B()],D0.prototype,"size",void 0),T([B({type:qF.apiValues,json:{read:qF.read,write:qF.write}})],D0.prototype,"style",void 0),T([B({type:String,json:{write:!0}})],D0.prototype,"path",null),T([B({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":jf}},json:{default:null,write:!0}})],D0.prototype,"outline",void 0),D0=pH=T([_t("esri.symbols.SimpleMarkerSymbol")],D0);const Cm=D0;var mH;let qa=mH=class extends Gc{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new hO,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,e,r){if(t&&typeof t!="string")return t;const n={};return t&&(n.text=t),e&&(n.font=e),r&&(n.color=r),n}writeLineWidth(t,e,r,n){n&&typeof n!="string"?n.origin:e[r]=t}castLineWidth(t){return lo(t)}writeLineHeight(t,e,r,n){n&&typeof n!="string"?n.origin:e[r]=t}clone(){return new mH({angle:this.angle,backgroundColor:Qt(this.backgroundColor),borderLineColor:Qt(this.borderLineColor),borderLineSize:this.borderLineSize,color:Qt(this.color),font:this.font&&this.font.clone(),haloColor:Qt(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){var t,e,r;return`${(t=this.backgroundColor)==null?void 0:t.hash()}.${this.borderLineColor}.${this.borderLineSize}.${(e=this.color)==null?void 0:e.hash()}.${this.font&&this.font.hash()}.${(r=this.haloColor)==null?void 0:r.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};T([B({type:ks,json:{write:!0}})],qa.prototype,"backgroundColor",void 0),T([B({type:ks,json:{write:!0}})],qa.prototype,"borderLineColor",void 0),T([B({type:Number,json:{write:!0},cast:lo})],qa.prototype,"borderLineSize",void 0),T([B({type:hO,json:{write:!0}})],qa.prototype,"font",void 0),T([B({...E2e,json:{write:!0}})],qa.prototype,"horizontalAlignment",void 0),T([B({type:Boolean,json:{write:!0}})],qa.prototype,"kerning",void 0),T([B({type:ks,json:{write:!0}})],qa.prototype,"haloColor",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],qa.prototype,"haloSize",void 0),T([B({type:Boolean,json:{write:!0}})],qa.prototype,"rightToLeft",void 0),T([B({type:Boolean,json:{write:!0}})],qa.prototype,"rotated",void 0),T([B({type:String,json:{write:!0}})],qa.prototype,"text",void 0),T([ji({esriTS:"text"},{readOnly:!0})],qa.prototype,"type",void 0),T([B({...M2e,json:{write:!0}})],qa.prototype,"verticalAlignment",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],qa.prototype,"xoffset",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],qa.prototype,"yoffset",void 0),T([B({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],qa.prototype,"angle",void 0),T([B({type:Number,json:{write:!0}})],qa.prototype,"width",void 0),T([B({type:Number})],qa.prototype,"lineWidth",void 0),T([On("lineWidth")],qa.prototype,"writeLineWidth",null),T([Pl("lineWidth")],qa.prototype,"castLineWidth",null),T([B(S2e)],qa.prototype,"lineHeight",void 0),T([On("lineHeight")],qa.prototype,"writeLineHeight",null),qa=mH=T([_t("esri.symbols.TextSymbol")],qa);const d7=qa;var gH;let C1=gH=class extends Gc{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=this.portal!=null?this.portal:Fp.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e==null?void 0:e.portal,super.read(t,e)}clone(){return new gH({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol("webRef",t)}fetchCIMSymbol(t){return this._fetchSymbol("cimRef",t)}async _fetchSymbol(t,e){const r=e!=null?e.cache:null,n=r?this._fetchCacheKey:null;if(r!=null){const a=n&&r.get(n);if(a)return a.clone()}const{resolveWebStyleSymbol:i}=await fs(()=>import("./webStyleSymbolUtils-Bnn0aSrt.js"),__vite__mapDeps([29,30]));Q1(e);const s=i(this,{portal:this.portal},t,e);s.catch(a=>{li.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",a)});const o=await s;return t==="webRef"&&o.type==="point-3d"||t==="cimRef"&&o.type==="cim"?(r!=null&&r.set(n,o.clone()),o):null}};T([B({json:{write:!1}})],C1.prototype,"color",void 0),T([B({type:String,json:{write:!0}})],C1.prototype,"styleName",void 0),T([B({type:Fp,json:{write:!1}})],C1.prototype,"portal",void 0),T([B({type:String,json:{read:AX,write:T5}})],C1.prototype,"styleUrl",void 0),T([B({type:D6,json:{read:!1}})],C1.prototype,"thumbnail",void 0),T([B({type:String,json:{write:!0}})],C1.prototype,"name",void 0),T([ji({styleSymbolReference:"web-style"},{readOnly:!0})],C1.prototype,"type",void 0),T([B()],C1.prototype,"_fetchCacheKey",null),C1=gH=T([_t("esri.symbols.WebStyleSymbol")],C1);const X5=C1;function TRt(t){if(!t)return!1;switch(t.type){case"picture-fill":case"picture-marker":case"simple-fill":case"simple-line":case"simple-marker":case"text":case"cim":return!0;default:return!1}}function Ene(t){if(!t)return!1;switch(t.type){case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":return!0;default:return!1}}const o5={base:Gc,key:"type",typeMap:{"simple-fill":a_,"picture-fill":zX,"picture-marker":cE,"simple-line":jf,"simple-marker":Cm,text:d7,"label-3d":pO,"line-3d":Y5,"mesh-3d":uE,"point-3d":zg,"polygon-3d":o_,"web-style":X5,cim:i_},errorContext:"symbol"},IRt={base:Gc,key:"type",typeMap:{"picture-marker":cE,"simple-marker":Cm,"point-3d":zg,cim:i_},errorContext:"symbol"},RRt={base:Gc,key:"type",typeMap:{"simple-line":jf,"line-3d":Y5,cim:i_},errorContext:"symbol"},LRt={base:Gc,key:"type",typeMap:{"simple-fill":a_,"picture-fill":zX,"polygon-3d":o_,cim:i_},errorContext:"symbol"},xst={base:Gc,key:"type",typeMap:{"picture-marker":cE,"simple-marker":Cm,text:d7,"web-style":X5,cim:i_},errorContext:"symbol"},wst=Xw({types:o5}),q2e={base:Gc,key:"type",typeMap:{"simple-fill":a_,"picture-fill":zX,"picture-marker":cE,"simple-line":jf,"simple-marker":Cm,text:d7,"line-3d":Y5,"mesh-3d":uE,"point-3d":zg,"polygon-3d":o_,"web-style":X5,cim:i_},errorContext:"symbol"},bst={base:Gc,key:"type",typeMap:{text:d7,"label-3d":pO},errorContext:"symbol"},Mne={base:Gc,key:"type",typeMap:{"line-3d":Y5,"mesh-3d":uE,"point-3d":zg,"polygon-3d":o_,"web-style":X5,cim:i_},errorContext:"symbol"},Cst={base:Gc,key:"type",typeMap:{"label-3d":pO},errorContext:"symbol"},W2e=um(o5);var yH;let Hb=yH=class extends qr{constructor(t){super(t),this.minValue=0,this.maxValue=0}clone(){return new yH({minValue:this.minValue,maxValue:this.maxValue})}};T([B({type:Number,json:{write:!0}})],Hb.prototype,"minValue",void 0),T([B({type:Number,json:{write:!0}})],Hb.prototype,"maxValue",void 0),Hb=yH=T([_t("esri.renderers.support.AuthoringInfoClassBreakInfo")],Hb);var vH;let Av=vH=class extends qr{constructor(t){super(t),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=new Array}clone(){return new vH({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:Qt(this.classBreakInfos)})}};T([B({type:String,json:{write:!0}})],Av.prototype,"field",void 0),T([B({type:String,json:{write:!0}})],Av.prototype,"normalizationField",void 0),T([B({type:String,json:{write:!0}})],Av.prototype,"label",void 0),T([B({type:[Hb],json:{write:!0}})],Av.prototype,"classBreakInfos",void 0),Av=vH=T([_t("esri.renderers.support.AuthoringInfoFieldInfo")],Av);var _H;let $x=_H=class extends qr{constructor(t){super(t),this.label=null,this.size=null,this.value=null}clone(){return new _H({label:this.label,value:this.value,size:this.size})}};T([B({type:String,json:{write:!0}})],$x.prototype,"label",void 0),T([B({type:Number,json:{write:!0}})],$x.prototype,"size",void 0),T([B({type:Number,json:{write:!0}})],$x.prototype,"value",void 0),$x=_H=T([_t("esri.renderers.support.AuthoringInfoSizeStop")],$x);const Sst=$x;var xH;const QT=new ro({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),eI=new ro({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),Tne={key:t=>typeof t=="number"?"number":"string",typeMap:{number:Number,string:String},base:null},Ine=["high-to-low","above-and-below","centered-on","extremes"],Rne=[...new Set(["high-to-low","above-and-below","centered-on","extremes","above","below","high-to-low","above-and-below","above","below","reference-size"])],Lne=["seconds","minutes","hours","days","months","years"],Est=["circle","diamond","hexagon-flat","hexagon-pointy","square"];let ac=xH=class extends qr{constructor(t){super(t),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(t){return typeof t=="string"||typeof t=="number"?t:null}get normalizationField(){return this.theme==="reference-size"?this._get("normalizationField"):null}set normalizationField(t){this._set("normalizationField",t)}get referenceSizeScale(){return this.theme==="reference-size"?this._get("referenceSizeScale"):null}set referenceSizeScale(t){this._set("referenceSizeScale",t)}get referenceSizeSymbolStyle(){return this.theme==="reference-size"?this._get("referenceSizeSymbolStyle"):null}set referenceSizeSymbolStyle(t){this._set("referenceSizeSymbolStyle",t)}castStartTime(t){return typeof t=="string"||typeof t=="number"?t:null}get sizeStops(){return this.theme==="reference-size"?this._get("sizeStops"):null}set sizeStops(t){this._set("sizeStops",t)}get style(){return this.type==="color"?this._get("style"):null}set style(t){this._set("style",t)}get theme(){return this.type==="color"||this.type==="size"?this._get("theme")||"high-to-low":null}set theme(t){this._set("theme",t)}clone(){return new xH({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,normalizationField:this.normalizationField,referenceSizeScale:this.referenceSizeScale,referenceSizeSymbolStyle:this.referenceSizeSymbolStyle,sizeStops:Qt(this.sizeStops),startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};T([B({types:Tne,json:{write:!0}})],ac.prototype,"endTime",void 0),T([Pl("endTime")],ac.prototype,"castEndTime",null),T([B({type:String,json:{write:!0}})],ac.prototype,"field",void 0),T([B({type:Number,json:{write:!0}})],ac.prototype,"maxSliderValue",void 0),T([B({type:Number,json:{write:!0}})],ac.prototype,"minSliderValue",void 0),T([B({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],ac.prototype,"normalizationField",null),T([B({type:Number,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],ac.prototype,"referenceSizeScale",null),T([B({type:Est,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],ac.prototype,"referenceSizeSymbolStyle",null),T([B({types:Tne,json:{write:!0}})],ac.prototype,"startTime",void 0),T([Pl("startTime")],ac.prototype,"castStartTime",null),T([B({type:[Sst],json:{origins:{"web-scene":{write:!1}},write:!0}})],ac.prototype,"sizeStops",null),T([B({type:QT.apiValues,value:null,json:{type:QT.jsonValues,read:QT.read,write:QT.write}})],ac.prototype,"style",null),T([B({type:Rne,value:null,json:{type:Rne,origins:{"web-scene":{type:Ine,write:{writer:(t,e)=>{Ine.includes(t)&&(e.theme=t)}}}},write:!0}})],ac.prototype,"theme",null),T([B({type:eI.apiValues,json:{type:eI.jsonValues,read:eI.read,write:eI.write}})],ac.prototype,"type",void 0),T([B({type:Lne,json:{type:Lne,write:!0}})],ac.prototype,"units",void 0),ac=xH=T([_t("esri.renderers.support.AuthoringInfoVisualVariable")],ac);const Mst=ac;let ML=class extends qr{constructor(e){super(e),this.type=null}};T([B({readOnly:!0,json:{read:!1,write:!0}})],ML.prototype,"type",void 0),ML=T([_t("esri.rest.support.ColorRamp")],ML);const BX=ML;var wH;let C3=wH=class extends BX{constructor(t){super(t),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new wH({fromColor:Qt(this.fromColor),toColor:Qt(this.toColor),algorithm:this.algorithm})}};T([ji({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],C3.prototype,"algorithm",void 0),T([B({type:ks,json:{type:[Qa],write:!0}})],C3.prototype,"fromColor",void 0),T([B({type:ks,json:{type:[Qa],write:!0}})],C3.prototype,"toColor",void 0),T([B({type:["algorithmic"]})],C3.prototype,"type",void 0),C3=wH=T([_t("esri.rest.support.AlgorithmicColorRamp")],C3);const jX=C3;var bH;let Gb=bH=class extends BX{constructor(t){super(t),this.colorRamps=null,this.type="multipart"}clone(){return new bH({colorRamps:Qt(this.colorRamps)})}};T([B({type:[jX],json:{write:!0}})],Gb.prototype,"colorRamps",void 0),T([B({type:["multipart"]})],Gb.prototype,"type",void 0),Gb=bH=T([_t("esri.rest.support.MultipartColorRamp")],Gb);const Z2e=Gb,Tst={key:"type",base:BX,typeMap:{algorithmic:jX,multipart:Z2e}};function Ist(t){return t!=null&&t.type?t.type==="algorithmic"?jX.fromJSON(t):t.type==="multipart"?Z2e.fromJSON(t):null:null}var CH;const e3=new ro({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),tI=new ro({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),kne=new ro({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),Ane=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"],Rst=["high-to-low","above-and-below","above","below"],Lst=["flow-line","wave-front"],kst=["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"];let wl=CH=class extends qr{constructor(t){super(t),this.colorRamp=null,this.fadeRatio=null,this.isAutoGenerated=!1,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const t=this._get("classificationMethod"),e=this.type;return e&&e!=="relationship"?e==="class-breaks-size"||e==="class-breaks-color"?t||"manual":null:t}set classificationMethod(t){this._set("classificationMethod",t)}readColorRamp(t){return t?Ist(t):void 0}get fields(){return this.type&&this.type!=="predominance"?null:this._get("fields")}set fields(t){this._set("fields",t)}get field1(){return this.type&&this.type!=="relationship"?null:this._get("field1")}set field1(t){this._set("field1",t)}get field2(){return this.type&&this.type!=="relationship"?null:this._get("field2")}set field2(t){this._set("field2",t)}get flowTheme(){return this.type==="flow"?this._get("flowTheme"):null}set flowTheme(t){this._set("flowTheme",t)}get focus(){return this.type&&this.type!=="relationship"?null:this._get("focus")}set focus(t){this._set("focus",t)}get numClasses(){return this.type&&this.type!=="relationship"?null:this._get("numClasses")}set numClasses(t){this._set("numClasses",t)}get statistics(){return this.type==="univariate-color-size"&&this.univariateTheme==="above-and-below"?this._get("statistics"):null}set statistics(t){this._set("statistics",t)}get standardDeviationInterval(){const t=this.type;return t&&t!=="relationship"&&t!=="class-breaks-size"&&t!=="class-breaks-color"||this.classificationMethod&&this.classificationMethod!=="standard-deviation"?null:this._get("standardDeviationInterval")}set standardDeviationInterval(t){this._set("standardDeviationInterval",t)}get type(){return this._get("type")}set type(t){let e=t;t==="classed-size"?e="class-breaks-size":t==="classed-color"&&(e="class-breaks-color"),this._set("type",e)}get univariateSymbolStyle(){return this.type==="univariate-color-size"&&this.univariateTheme==="above-and-below"?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(t){this._set("univariateSymbolStyle",t)}get univariateTheme(){return this.type==="univariate-color-size"?this._get("univariateTheme"):null}set univariateTheme(t){this._set("univariateTheme",t)}clone(){var t;return new CH({classificationMethod:this.classificationMethod,colorRamp:Qt(this.colorRamp),fadeRatio:Qt(this.fadeRatio),fields:(t=this.fields)==null?void 0:t.slice(0),field1:Qt(this.field1),field2:Qt(this.field2),isAutoGenerated:this.isAutoGenerated,focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,statistics:this.statistics,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(e=>e.clone()),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};T([B({type:e3.apiValues,value:null,json:{type:e3.jsonValues,read:e3.read,write:e3.write,origins:{"web-document":{default:"manual",type:e3.jsonValues,read:e3.read,write:e3.write}}}})],wl.prototype,"classificationMethod",null),T([B({types:Tst,json:{write:!0}})],wl.prototype,"colorRamp",void 0),T([un("colorRamp")],wl.prototype,"readColorRamp",null),T([B({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],wl.prototype,"fadeRatio",void 0),T([B({type:[String],value:null,json:{write:!0}})],wl.prototype,"fields",null),T([B({type:Av,value:null,json:{write:!0}})],wl.prototype,"field1",null),T([B({type:Av,value:null,json:{write:!0}})],wl.prototype,"field2",null),T([B({type:Lst,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],wl.prototype,"flowTheme",null),T([B({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],wl.prototype,"focus",null),T([B({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],wl.prototype,"isAutoGenerated",void 0),T([B({type:Number,value:null,json:{type:Qa,write:!0}})],wl.prototype,"numClasses",null),T([B({type:Ane,json:{type:Ane,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],wl.prototype,"lengthUnit",void 0),T([B({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],wl.prototype,"maxSliderValue",void 0),T([B({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],wl.prototype,"minSliderValue",void 0),T([B({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],wl.prototype,"statistics",null),T([B({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],wl.prototype,"standardDeviationInterval",null),T([B({type:tI.apiValues,value:null,json:{type:tI.jsonValues,read:tI.read,write:tI.write,origins:{"web-scene":{type:kne.jsonValues,write:{writer:kne.write,overridePolicy:t=>({enabled:t!=="flow"})}}}}})],wl.prototype,"type",null),T([B({type:[Mst],json:{write:!0}})],wl.prototype,"visualVariables",void 0),T([B({type:kst,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],wl.prototype,"univariateSymbolStyle",null),T([B({type:Rst,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],wl.prototype,"univariateTheme",null),wl=CH=T([_t("esri.renderers.support.AuthoringInfo")],wl);const VX=wl,WF=new ro({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary",pieChart:"pie-chart"},{ignoreUnknown:!0});let qb=class extends qr{constructor(e){super(e),this.authoringInfo=null,this.type=null}async getRequiredFields(e){if(!this.collectRequiredFields)return[];const r=new Set;return await this.collectRequiredFields(r,e),Array.from(r).sort()}getSymbol(e,r){}async getSymbolAsync(e,r){}getSymbols(){return[]}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};T([B({type:VX,json:{write:!0}})],qb.prototype,"authoringInfo",void 0),T([B({type:WF.apiValues,readOnly:!0,json:{type:WF.jsonValues,read:!1,write:{writer:WF.write,ignoreOrigin:!0}}})],qb.prototype,"type",void 0),qb=T([_t("esri.renderers.Renderer")],qb);const gy=qb;function Ast(t){var e,r;return((r=(e=t.match(Pst))==null?void 0:e[1])==null?void 0:r.replace(/\\'/g,"'"))??null}const Pst=/^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/;var SH;let j4=SH=class extends qr{constructor(){super(...arguments),this.title=null}clone(){return new SH({title:this.title})}};T([B({type:String,json:{write:!0}})],j4.prototype,"title",void 0),j4=SH=T([_t("esri.renderers.support.LegendOptions")],j4);var EH;let TL=EH=class extends j4{constructor(){super(...arguments),this.showLegend=null}clone(){return new EH({title:this.title,showLegend:this.showLegend})}};T([B({type:Boolean,json:{write:!0}})],TL.prototype,"showLegend",void 0),TL=EH=T([_t("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],TL);const Y2e=TL,ZF=new ro({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let S1=class extends qr{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return e==null?e:typeof e=="function"?(li.getLogger(this).error(".field: field must be a string value"),null):jS(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};T([B()],S1.prototype,"index",void 0),T([B({type:ZF.apiValues,readOnly:!0,json:{read:ZF.read,write:ZF.write}})],S1.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],S1.prototype,"field",void 0),T([Pl("field")],S1.prototype,"castField",null),T([B({type:String,json:{write:!0}})],S1.prototype,"valueExpression",void 0),T([B({type:String,json:{write:!0}})],S1.prototype,"valueExpressionTitle",void 0),T([B({readOnly:!0})],S1.prototype,"arcadeRequired",null),T([B({type:Y2e,json:{write:!0}})],S1.prototype,"legendOptions",void 0),S1=T([_t("esri.renderers.visualVariables.VisualVariable")],S1);const hE=S1;var MH;let S3=MH=class extends qr{constructor(t){super(t),this.color=null,this.label=null,this.value=null}writeValue(t,e,r){e[r]=t??0}clone(){return new MH({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};T([B({type:ks,json:{type:[Qa],write:!0}})],S3.prototype,"color",void 0),T([B({type:String,json:{write:!0}})],S3.prototype,"label",void 0),T([B({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],S3.prototype,"value",void 0),T([On("value")],S3.prototype,"writeValue",null),S3=MH=T([_t("esri.renderers.visualVariables.support.ColorStop")],S3);const $st=S3;var TH;let E3=TH=class extends hE{constructor(t){super(t),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(t){t&&Array.isArray(t)&&(t=t.filter(e=>!!e)).sort((e,r)=>e.value-r.value),this._set("stops",t)}clone(){var t;return new TH({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:(t=this.legendOptions)==null?void 0:t.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(t=>t.value||0)}};T([B({readOnly:!0})],E3.prototype,"cache",null),T([B({type:["color"],json:{type:["colorInfo"]}})],E3.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],E3.prototype,"normalizationField",void 0),T([B({type:[$st],json:{write:!0}})],E3.prototype,"stops",null),E3=TH=T([_t("esri.renderers.visualVariables.ColorVariable")],E3);const X2e=E3;var IH;let xv=IH=class extends qr{constructor(t){super(t),this.label=null,this.opacity=null,this.value=null}readOpacity(t,e){return XA(e.transparency)}writeOpacity(t,e,r){e[r]=MX(t)}clone(){return new IH({label:this.label,opacity:this.opacity,value:this.value})}};T([B({type:String,json:{write:!0}})],xv.prototype,"label",void 0),T([B({type:Number,json:{type:Qa,write:{target:"transparency"}}})],xv.prototype,"opacity",void 0),T([un("opacity",["transparency"])],xv.prototype,"readOpacity",null),T([On("opacity")],xv.prototype,"writeOpacity",null),T([B({type:Number,json:{write:!0}})],xv.prototype,"value",void 0),xv=IH=T([_t("esri.renderers.visualVariables.support.OpacityStop")],xv);const Ost=xv;var RH;let M3=RH=class extends hE{constructor(t){super(t),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(t){t&&Array.isArray(t)&&(t=t.filter(e=>!!e)).sort((e,r)=>e.value-r.value),this._set("stops",t)}clone(){var t;return new RH({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:(t=this.legendOptions)==null?void 0:t.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(t=>t.value||0)}};T([B({readOnly:!0})],M3.prototype,"cache",null),T([B({type:["opacity"],json:{type:["transparencyInfo"]}})],M3.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],M3.prototype,"normalizationField",void 0),T([B({type:[Ost],json:{write:!0}})],M3.prototype,"stops",null),M3=RH=T([_t("esri.renderers.visualVariables.OpacityVariable")],M3);const J2e=M3;var LH;let fg=LH=class extends hE{constructor(t){super(t),this.axis=null,this.type="rotation",this.rotationType="geographic",this.valueExpressionTitle=null}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}writeValueExpressionTitleWebScene(t,e,r,n){if(n!=null&&n.messages){const i=`visualVariables[${this.index}]`;n.messages.push(new Pr("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:i+".valueExpressionTitle",context:n}))}}clone(){var t;return new LH({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:(t=this.legendOptions)==null?void 0:t.clone()})}};T([B({readOnly:!0})],fg.prototype,"cache",null),T([B({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],fg.prototype,"axis",void 0),T([B({type:["rotation"],json:{type:["rotationInfo"]}})],fg.prototype,"type",void 0),T([B({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],fg.prototype,"rotationType",void 0),T([B({type:String,json:{write:!0}})],fg.prototype,"valueExpressionTitle",void 0),T([On("web-scene","valueExpressionTitle")],fg.prototype,"writeValueExpressionTitleWebScene",null),fg=LH=T([_t("esri.renderers.visualVariables.RotationVariable")],fg);const K2e=fg;function Nst(t){return lo(t)}var kH;let wv=kH=class extends qr{constructor(t){super(t),this.label=null,this.size=null,this.value=null,this.useMinValue=null,this.useMaxValue=null}clone(){return new kH({label:this.label,size:this.size,value:this.value,useMaxValue:this.useMaxValue,useMinValue:this.useMinValue})}};T([B({type:String,json:{write:!0}})],wv.prototype,"label",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],wv.prototype,"size",void 0),T([B({type:Number,json:{write:!0}})],wv.prototype,"value",void 0),T([B({type:Boolean,json:{write:!1}})],wv.prototype,"useMinValue",void 0),T([B({type:Boolean,json:{write:!1}})],wv.prototype,"useMaxValue",void 0),wv=kH=T([_t("esri.renderers.visualVariables.support.SizeStop")],wv);const IL=wv;var AH;let RL=AH=class extends Y2e{constructor(){super(...arguments),this.customValues=null}clone(){var t;return new AH({title:this.title,showLegend:this.showLegend,customValues:(t=this.customValues)==null?void 0:t.slice(0)})}};T([B({type:[Number],json:{write:!0}})],RL.prototype,"customValues",void 0),RL=AH=T([_t("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],RL);const Dst=RL;var Hg,Vu;function v4(t){return t&&t.declaredClass==="esri.renderers.visualVariables.SizeVariable"}function UC(t){return t!=null&&!isNaN(t)&&isFinite(t)}function Q2e(t){return t.valueExpression?Hg.Expression:t.field&&typeof t.field=="string"?Hg.Field:Hg.Unknown}function Fst(t,e){const r=e||Q2e(t),n=t.valueUnit||"unknown";return r===Hg.Unknown?Vu.Constant:t.stops?Vu.Stops:t.minSize!=null&&t.maxSize!=null&&t.minDataValue!=null&&t.maxDataValue!=null?Vu.ClampedLinear:n==="unknown"?t.minSize!=null&&t.minDataValue!=null?t.minSize&&t.minDataValue?Vu.Proportional:Vu.Additive:Vu.Identity:Vu.RealWorldSize}(function(t){t.Unknown="unknown",t.Expression="expression",t.Field="field"})(Hg||(Hg={})),function(t){t.Unknown="unknown",t.Stops="stops",t.ClampedLinear="clamped-linear",t.Proportional="proportional",t.Additive="additive",t.Constant="constant",t.Identity="identity",t.RealWorldSize="real-world-size"}(Vu||(Vu={}));var PH;function zst(t){if(!t)return null;const e={};for(const r in t){const n=oE(t[r]);n&&(e[r]=n)}return Object.keys(e).length!==0?e:null}function Bst(t){if(t==null)return null;const e={};for(const r in t){const n=t[r];n&&(e[r]=n.toJSON())}return Object.keys(e).length!==0?e:null}let rd=PH=class extends Fa(qr){constructor(t){super(t),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:T6(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&vLe(li.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(t){const e=this._get("aggregateGeometries");JSON.stringify(e)!==JSON.stringify(t)&&this._set("aggregateGeometries",t)}set attributes(t){const e=this._get("attributes");e!==t&&(this._set("attributes",t),this._notifyLayer("attributes",e,t))}set geometry(t){const e=this._get("geometry");e!==t&&(this._set("geometry",t),(t==null?void 0:t.type)!=="mesh"&&this._notifyLayer("geometry",e,t))}set symbol(t){const e=this._get("symbol");e!==t&&(this._set("symbol",t),this._notifyLayer("symbol",e,t))}set visible(t){const e=this._get("visible");e!==t&&(this._set("visible",t),this._notifyLayer("visible",e,t))}cloneShallow(){return new PH({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(t=!1){if(this.popupTemplate)return this.popupTemplate;const e=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[e,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(t&&"defaultPopupTemplate"in r&&r.defaultPopupTemplate!=null)return r.defaultPopupTemplate}return null}getAttribute(t){var e;return(e=this.attributes)==null?void 0:e[t]}setAttribute(t,e){if(this.attributes){const r=this.getAttribute(t);this.attributes[t]=e,this._notifyLayer("attributes",r,e,t)}else this.attributes={[t]:e},this._notifyLayer("attributes",void 0,e,t)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){var t;return{aggregateGeometries:Bst(this.aggregateGeometries),geometry:this.geometry!=null?this.geometry.toJSON():null,symbol:this.symbol!=null?this.symbol.toJSON():null,attributes:iA(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:((t=this.popupTemplate)==null?void 0:t.toJSON())??null}}notifyMeshTransformChanged(t={}){const{geometry:e}=this;if((e==null?void 0:e.type)==="mesh"){const r={origin:e.origin,transform:e.transform};this._notifyLayer("origin-transform",r,r,t.action)}}_notifyLayer(t,e,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:t,oldValue:e,newValue:r};t==="origin-transform"&&(i.action=n),t==="attributes"&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([EV(()=>{var t,e;return((t=this.geometry)==null?void 0:t.type)==="mesh"&&this.geometry.vertexSpace.origin?{localMatrix:(e=this.geometry.transform)==null?void 0:e.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0},({localMatrix:t,origin:e})=>{this._lastMeshTransform.localMatrix===t&&this._lastMeshTransform.origin===e||(this._lastMeshTransform.localMatrix=t,this._lastMeshTransform.origin=e,this.notifyMeshTransformChanged())}),EV(()=>{var t;return((t=this.geometry)==null?void 0:t.type)==="mesh"?{vertexAttributes:this.geometry.vertexAttributes}:void 0},()=>{var e;const t=this.geometry;(t==null?void 0:t.type)==="mesh"&&t.vertexSpace.origin?(this._lastMeshTransform.localMatrix=(e=t.transform)==null?void 0:e.localMatrix,this._lastMeshTransform.origin=t.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(t,e)=>t===e,sync:!0})])}};T([B({value:null,json:{read:zst}})],rd.prototype,"aggregateGeometries",null),T([B({value:null})],rd.prototype,"attributes",null),T([B({value:null,types:a7,json:{read:oE}})],rd.prototype,"geometry",null),T([B({type:Boolean})],rd.prototype,"isAggregate",void 0),T([B({clonable:"reference"})],rd.prototype,"layer",void 0),T([B({clonable:"reference"})],rd.prototype,"origin",void 0),T([B({type:aE})],rd.prototype,"popupTemplate",void 0),T([B({clonable:"reference"})],rd.prototype,"sourceLayer",void 0),T([B({value:null,types:o5})],rd.prototype,"symbol",null),T([B({type:Boolean,value:!0})],rd.prototype,"visible",null),rd=PH=T([_t("esri.Graphic")],rd),function(t){t.generateUID=T6}(rd||(rd={}));const HC=rd;function $Rt(t){}const UX={unknown:1,inches:op(1,"meters","inches"),feet:op(1,"meters","feet"),"us-feet":op(1,"meters","us-feet"),yards:op(1,"meters","yards"),miles:op(1,"meters","miles"),"nautical-miles":op(1,"meters","nautical-miles"),millimeters:op(1,"meters","millimeters"),centimeters:op(1,"meters","centimeters"),decimeters:op(1,"meters","decimeters"),meters:op(1,"meters","meters"),kilometers:op(1,"meters","kilometers"),"decimal-degrees":1/mrt(1,"meters",$l.radius)},e_e=()=>li.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),t_e=t=>e_e().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${t}`),r_e=()=>e_e().error("Use of arcade expressions requires an arcade context");new HC;const n_e=Math.PI,jst=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function ORt(t,e,r){const n="visualVariables"in t&&t.visualVariables?t.visualVariables.find(m=>m.type==="rotation"):t;if(!n)return;if(n.declaredClass!=="esri.renderers.visualVariables.RotationVariable")return void t_e("RotationVariable");const i=n.axis||"heading",s=i==="heading"&&n.rotationType==="arithmetic"?90:0,o=i==="heading"&&n.rotationType==="arithmetic"?-1:1,a=typeof e=="number"?null:e,l=a==null?void 0:a.attributes,u=n.field,{hasExpression:d}=n.cache;n.cache.compiledFunc;let f=0;return!u&&!d?f:d?void r_e():(l&&(f=l[u]||0),f=typeof f!="number"||isNaN(f)?null:s+o*f,f)}function Vst(t,e,r){const n=typeof e=="number",i=n?null:e,s=i==null?void 0:i.attributes;let o=n?e:null;const{isScaleDriven:a}=t.cache;if(t.cache.compiledFunc,a)o=Ust(t);else if(!n)switch(t.inputValueType){case Hg.Expression:return void r_e();case Hg.Field:s&&(o=s[t.field]);break;case Hg.Unknown:o=null}if(!UC(o))return null;if(n||!t.normalizationField)return o;const l=s?parseFloat(s[t.normalizationField]):null;return UC(l)&&l!==0?o/l:null}function Ust(t){let e=null,r=null;const n=t.stops;return n?(e=n[0].value,r=n[n.length-1].value):(e=t.minDataValue||0,r=t.maxDataValue||0),(e+r)/2}function i_e(t,e,r){const n="visualVariables"in t&&t.visualVariables?t.visualVariables.find(s=>s.type==="size"):t;if(!n)return;if(n.declaredClass!=="esri.renderers.visualVariables.SizeVariable")return void t_e("SizeVariable");const i=Xst(Vst(n,e),n,e,r,n.cache.ipData);return i==null||isNaN(i)?0:i}function q1(t,e,r){return t==null?null:v4(t)?i_e(t,e,r):UC(t)?t:null}function s_e(t,e,r){return UC(r)&&t>r?r:UC(e)&&t=e.maxDataValue)return o;if(s==null||o==null)return null;if(e.scaleBy==="area"&&a){const l=a==="circle",u=s*s,d=u+i*(o*o-u);return l?2*Math.sqrt(d/n_e):Math.sqrt(d)}return s+i*(o-s)}function Wst(t,e,r,n){const i=t/e.minDataValue,s=q1(e.minSize,r,n),o=q1(e.maxSize,r,n);let a=null;return a=i*s,s_e(a,s,o)}function Zst(t,e,r,n,i){var l,u,d;const[s,o,a]=Jst(t,i);if(s===o)return q1((l=e.stops)==null?void 0:l[s].size,r,n);{const f=q1((u=e.stops)==null?void 0:u[s].size,r,n);return f+(q1((d=e.stops)==null?void 0:d[o].size,r,n)-f)*a}}function Yst(t,e,r,n){const i=1*UX[e.valueUnit],s=q1(e.minSize,r,n),o=q1(e.maxSize,r,n),{valueRepresentation:a}=e;let l=null;return l=a==="area"?2*Math.sqrt(t/n_e)/i:a==="radius"||a==="distance"?2*t/i:t/i,s_e(l,s,o)}function Xst(t,e,r,n,i){switch(e.transformationType){case Vu.Additive:return Hst(t,e,r,n);case Vu.Constant:return Gst(e,r,n);case Vu.ClampedLinear:return qst(t,e,r,n);case Vu.Proportional:return Wst(t,e,r,n);case Vu.Stops:return Zst(t,e,r,n,i);case Vu.RealWorldSize:return Yst(t,e,r,n);case Vu.Identity:return t;case Vu.Unknown:return null}}function Jst(t,e){if(!e)return;let r=0,n=e.length-1;return e.some((i,s)=>t!!e)).sort((e,r)=>e.value-r.value):t&&(li.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),t=null),this._set("stops",t)}get transformationType(){return Fst(this,this.inputValueType)}readValueExpression(t,e){return t||e.expression&&"$view.scale"}writeValueExpressionWebScene(t,e,r,n){if(t==="$view.scale"){if(n!=null&&n.messages){const i=this.index,s=typeof i=="string"?i:`visualVariables[${i}]`;n.messages.push(new Pr("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:s+".valueExpression",context:n}))}}else e[r]=t}readValueUnit(t){return t?OH.read(t):null}clone(){var t,e;return new $H({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:v4(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:v4(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:(t=this.stops)==null?void 0:t.map(r=>r.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:(e=this.legendOptions)==null?void 0:e.clone()})}flipSizes(){if(this.transformationType===Vu.ClampedLinear){const{minSize:t,maxSize:e}=this;return this.minSize=e,this.maxSize=t,this}if(this.transformationType===Vu.Stops){const t=this.stops;if(!t)return this;const e=t.map(n=>n.size).reverse(),r=t.length;for(let n=0;ne.value||0)}};T([B({readOnly:!0})],Bo.prototype,"cache",null),T([B({type:rI.apiValues,json:{type:rI.jsonValues,origins:{"web-map":{read:!1}},read:rI.read,write:rI.write}})],Bo.prototype,"axis",void 0),T([B()],Bo.prototype,"index",null),T([B({type:String,readOnly:!0})],Bo.prototype,"inputValueType",null),T([B({type:Dst,json:{write:!0}})],Bo.prototype,"legendOptions",void 0),T([B({type:Number,value:null,json:{write:!0}})],Bo.prototype,"maxDataValue",null),T([B({type:Number,value:null,json:{write:!0}})],Bo.prototype,"maxSize",null),T([Pl("maxSize")],Bo.prototype,"castMaxSize",null),T([un("maxSize")],Bo.prototype,"readMaxSize",null),T([B({type:Number,value:null,json:{write:!0}})],Bo.prototype,"minDataValue",null),T([B({type:Number,value:null,json:{write:!0}})],Bo.prototype,"minSize",null),T([Pl("minSize")],Bo.prototype,"castMinSize",null),T([un("minSize")],Bo.prototype,"readMinSize",null),T([B({type:String,json:{write:!0}})],Bo.prototype,"normalizationField",void 0),T([B({readOnly:!0})],Bo.prototype,"arcadeRequired",null),T([B({type:String})],Bo.prototype,"scaleBy",void 0),T([B({type:[IL],value:null,json:{write:!0}})],Bo.prototype,"stops",null),T([B({type:["outline"],json:{write:!0}})],Bo.prototype,"target",void 0),T([B({type:String,readOnly:!0})],Bo.prototype,"transformationType",null),T([B({type:["size"],json:{type:["sizeInfo"]}})],Bo.prototype,"type",void 0),T([B({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],Bo.prototype,"useSymbolValue",void 0),T([B({type:String,json:{write:!0}})],Bo.prototype,"valueExpression",void 0),T([un("valueExpression",["valueExpression","expression"])],Bo.prototype,"readValueExpression",null),T([On("web-scene","valueExpression")],Bo.prototype,"writeValueExpressionWebScene",null),T([B({type:["radius","diameter","area","width","distance"],json:{write:!0}})],Bo.prototype,"valueRepresentation",void 0),T([B({type:OH.apiValues,json:{write:OH.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],Bo.prototype,"valueUnit",void 0),T([un("valueUnit")],Bo.prototype,"readValueUnit",null),Bo=$H=T([_t("esri.renderers.visualVariables.SizeVariable")],Bo);const HX=Bo,Kst={color:X2e,size:HX,opacity:J2e,rotation:K2e},Qst=new ro({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),eot=/^\[([^\]]+)\]$/i;let LL=class extends Iu{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(e){if(this._resetVariables(),e=e&&e.filter(r=>!!r),e==null?void 0:e.length){for(const r of e)switch(r.type){case"color":this.colorVariables.push(r);break;case"opacity":this.opacityVariables.push(r);break;case"rotation":this.rotationVariables.push(r);break;case"size":this.sizeVariables.push(r)}this.sizeVariables.length&&this.sizeVariables.some(r=>!!r.target)&&e.sort((r,n)=>{let i=null;return i=r.target===n.target?0:r.target?1:-1,i});for(let r=0;r{const u=Qst.read(l.type),d=Kst[u];d||(li.getLogger(this).warn(`Unknown variable type: ${u}`),n!=null&&n.messages&&n.messages.push(new cm("visual-variable:unsupported",`visualVariable of type '${u}' is not supported`,{definition:l,context:n})));const f=new d;return f.read(l,n),f})}writeVariables(e,r){const n=[];for(const i of e){const s=i.toJSON(r);s&&n.push(s)}return n}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};T([B()],LL.prototype,"visualVariables",null),LL=T([_t("esri.renderers.visualVariables.VisualVariableFactory")],LL);const tot=LL,rot={base:hE,key:"type",typeMap:{opacity:J2e,color:X2e,rotation:K2e,size:HX}},f7=t=>{let e=class extends t{constructor(){super(...arguments),this._vvFactory=new tot}set visualVariables(r){this._vvFactory.visualVariables=r,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(r,n,i){return this._vvFactory.readVariables(r,n,i)}writeVisualVariables(r,n,i,s){n[i]=this._vvFactory.writeVariables(r,s)}get arcadeRequiredForVisualVariables(){if(!this.visualVariables)return!1;for(const r of this.visualVariables)if(r.arcadeRequired)return!0;return!1}hasVisualVariables(r,n){return r?this.getVisualVariablesForType(r,n).length>0:this.getVisualVariablesForType("size",n).length>0||this.getVisualVariablesForType("color",n).length>0||this.getVisualVariablesForType("opacity",n).length>0||this.getVisualVariablesForType("rotation",n).length>0}getVisualVariablesForType(r,n){const i=this.visualVariables;return i?i.filter(s=>s.type===r&&(typeof n=="string"?s.target===n:n!==!1||!s.target)):[]}async collectVVRequiredFields(r,n){let i=[];this.visualVariables&&(i=i.concat(this.visualVariables));for(const s of i)s&&(s.field&&$f(r,n,s.field),s.normalizationField&&$f(r,n,s.normalizationField),s.valueExpression&&(not(s.valueExpression,r,n)||await o0(r,n,s.valueExpression)))}};return T([B({types:[rot],value:null,json:{write:!0}})],e.prototype,"visualVariables",null),T([un("visualVariables",["visualVariables","rotationType","rotationExpression"])],e.prototype,"readVisualVariables",null),T([On("visualVariables")],e.prototype,"writeVisualVariables",null),e=T([_t("esri.renderers.mixins.VisualVariablesMixin")],e),e};function not(t,e,r){const n=Ast(t);return n!=null&&($f(e,r,n),!0)}const FRt={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o_e(t){const e=t==null?void 0:t.type;return e==="building-scene"||e==="integrated-mesh"||e==="point-cloud"||e==="scene"}function zRt(t){var e;return(t==null?void 0:t.type)==="feature"&&!t.url&&((e=t.source)==null?void 0:e.type)==="memory"}function BRt(t){var e;return((t==null?void 0:t.type)==="feature"||(t==null?void 0:t.type)==="subtype-group")&&((e=t.source)==null?void 0:e.type)==="feature-layer"}async function a_e(t,e){const r=ws==null?void 0:ws.findServerInfo(t);if((r==null?void 0:r.currentVersion)!=null)return r.owningSystemUrl||null;const n=t.toLowerCase().indexOf("/rest/services");if(n===-1)return null;const i=`${t.substring(0,n)}/rest/info`,s=e!=null?e.signal:null,{data:o}=await sa(i,{query:{f:"json"},responseType:"json",signal:s});return(o==null?void 0:o.owningSystemUrl)||null}function iot(t){if(!("capabilities"in t))return!1;switch(t.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function jRt(t){return iot(t)?"effectiveCapabilities"in t?t.effectiveCapabilities:t.capabilities:null}function sot(t){if(!("editingEnabled"in t))return!1;switch(t.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function VRt(t){return!!sot(t)&&("effectiveEditingEnabled"in t?t.effectiveEditingEnabled:t.editingEnabled)}const GX=[252,146,31,255],oot=[153,153,153,255],aot={type:"esriSMS",style:"esriSMSCircle",size:6,color:GX,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},lot={type:"esriSLS",style:"esriSLSSolid",width:.75,color:GX},uot={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},cot={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},hot={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},dot={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},fot={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},pot=Cm.fromJSON(aot),mot=jf.fromJSON(lot),got=a_.fromJSON(uot),yot=d7.fromJSON(cot);Cm.fromJSON(hot);jf.fromJSON(dot);a_.fromJSON(fot);zg.fromSimpleMarkerSymbol(pot);Y5.fromSimpleLineSymbol(mot);o_.fromSimpleFillSymbol(got);new uE({symbolLayers:new $o([new Z5({material:{color:GX},edges:new p2e({size:Dp(1),color:new ks(oot)})})])});const vot=new Y5({symbolLayers:new $o([new u7({material:{color:new ks([0,0,0])},size:Dp(1)})])}),_ot=new o_({symbolLayers:new $o([new Z5({outline:{color:new ks([0,0,0]),size:Dp(1)}})])}),Y9={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function xot(t,e=Y9){var l,u,d,f;if(!t)return{symbol:null};const{retainId:r=Y9.retainId,ignoreDrivers:n=Y9.ignoreDrivers,hasLabelingContext:i=Y9.hasLabelingContext,retainCIM:s=Y9.retainCIM,cimFallbackEnabled:o=Y9.cimFallbackEnabled}=e;let a=null;if(Ene(t)||t instanceof X5)a=t.clone();else if(t.type==="cim"){const m=(u=(l=t.data)==null?void 0:l.symbol)==null?void 0:u.type;switch(m){case"CIMPointSymbol":a=s?t.clone():zg.fromCIMSymbol(t);break;case"CIMLineSymbol":o&&(a=vot.clone(),(d=e==null?void 0:e.logWarning)==null||d.call(e,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":o&&(a=_ot.clone(),(f=e==null?void 0:e.logWarning)==null||f.call(e,"Unsupported CIM polygon symbology converted to fallback 3D polygon symbology"))}if(!a)return{error:new Pr("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${m||"unknown"}' is unsupported in 3D`,{symbol:t})}}else if(t instanceof jf)a=Y5.fromSimpleLineSymbol(t);else if(t instanceof Cm)a=zg.fromSimpleMarkerSymbol(t);else if(t instanceof cE)a=zg.fromPictureMarkerSymbol(t);else if(t instanceof a_)a=e.geometryType&&e.geometryType==="mesh"?uE.fromSimpleFillSymbol(t):o_.fromSimpleFillSymbol(t);else{if(!(t instanceof d7))return{error:new Pr("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${t.type||t.declaredClass}' is unsupported in 3D`,{symbol:t})};a=i?pO.fromTextSymbol(t):zg.fromTextSymbol(t)}return r&&a&&a.type!=="cim"&&(a.id=t.id),n&&Ene(a)&&a.symbolLayers.forEach(m=>m.ignoreDrivers=!0),{symbol:a}}function JA(t,e,r,n){const i=l_e(t,{},{context:n,isLabelSymbol:!1});i!=null&&(e[r]=i)}function One(t,e,r,n){const i=l_e(t,{},{context:n,isLabelSymbol:!0});i!=null&&(e[r]=i)}function Nne(t){return t instanceof h7||t instanceof X5}function l_e(t,e,r){if(t==null)return null;const{context:n,isLabelSymbol:i}=r,s=n==null?void 0:n.origin,o=n==null?void 0:n.messages;if(s==="web-scene"&&!Nne(t)){const a=xot(t,{retainCIM:!0,hasLabelingContext:i});return a.symbol!=null?a.symbol.write(e,n):(o==null||o.push(new Pr("symbol:unsupported",`Symbols of type '${t.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:t,context:n,error:a.error})),null)}return(s==="web-map"||s==="portal-item"&&!o_e(n==null?void 0:n.layer))&&Nne(t)?(o==null||o.push(new Pr("symbol:unsupported",`Symbols of type '${t.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:t,context:n})),null):t.write(e,n)}function URt(t,e){return wst(t,null,e)}const mO={types:q2e,json:{write:{writer:JA},origins:{"web-scene":{types:Mne,write:{writer:JA},read:{reader:Xw({types:Mne})}}}}},qX=BZ({json:{origins:{"web-scene":{write:{isRequired:!0}}}}},mO),u_e={types:{base:Gc,key:"type",typeMap:{"simple-fill":o5.typeMap["simple-fill"],"picture-fill":o5.typeMap["picture-fill"],"polygon-3d":o5.typeMap["polygon-3d"]}},json:{write:{writer:JA},origins:{"web-scene":{type:o_,write:{writer:JA}}}}},kL={cast:t=>t==null||typeof t=="string"||typeof t=="number"?t:`${t}`,json:{type:String,write:{writer:(t,e)=>{e.value=t==null?void 0:t.toString()}}}};var NH;let bv=NH=class extends qr{constructor(t){super(t),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){var t;return new NH({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:((t=this.symbol)==null?void 0:t.clone())??null})}getMeshHash(){const t=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${t}`}};T([B({type:String,json:{write:!0}})],bv.prototype,"description",void 0),T([B({type:String,json:{write:!0}})],bv.prototype,"label",void 0),T([B({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],bv.prototype,"minValue",void 0),T([B({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],bv.prototype,"maxValue",void 0),T([B(qX)],bv.prototype,"symbol",void 0),bv=NH=T([_t("esri.renderers.support.ClassBreakInfo")],bv);const KA=bv;var DH;const c_e="log",AL="percent-of-total",PL="field",nI=new ro({esriNormalizeByLog:c_e,esriNormalizeByPercentOfTotal:AL,esriNormalizeByField:PL}),wot=gc(KA);let xu=DH=class extends f7(gy){constructor(t){super(t),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(t,e,r){if(!Array.isArray(t))return;let n=e.minValue;return t.map(i=>{const s=new KA;return s.read(i,r),s.minValue==null&&(s.minValue=n),s.maxValue==null&&(s.maxValue=s.minValue),n=s.maxValue,s})}writeClassBreakInfos(t,e,r,n){const i=t.map(s=>s.write({},n));this._areClassBreaksConsecutive()&&i.forEach(s=>delete s.classMinValue),e[r]=i}castField(t){return t==null?t:typeof t=="function"?(li.getLogger(this).error(".field: field must be a string value"),null):jS(t)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let t=this._get("normalizationType");const e=!!this.normalizationField,r=this.normalizationTotal!=null;return e||r?(t=e&&PL||r&&AL||null,e&&r&&li.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):t!==PL&&t!==AL||(t=null),t}set normalizationType(t){this._set("normalizationType",t)}addClassBreakInfo(t,e,r){let n=null;n=typeof t=="number"?new KA({minValue:t,maxValue:e,symbol:W2e(r)}):wot(Qt(t)),this.classBreakInfos.push(n),this.classBreakInfos.length===1&&this.notifyChange("minValue")}removeClassBreakInfo(t,e){const r=this.classBreakInfos.length;for(let n=0;n-1?this.classBreakInfos[r].symbol:this.defaultSymbol}async getSymbolAsync(t,e){let r=e;if(this.valueExpression&&(e==null?void 0:e.arcade)==null){const i=await M5(),{arcadeUtils:s}=i;s.hasGeometryOperations(this.valueExpression)&&await s.enableGeometryOperations(),r={...r,arcade:i}}const n=this.getBreakIndex(t,r);return n>-1?this.classBreakInfos[n].symbol:this.defaultSymbol}getSymbols(){const t=[];return this.classBreakInfos.forEach(e=>{e.symbol&&t.push(e.symbol)}),this.defaultSymbol&&t.push(this.defaultSymbol),t}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((t,e)=>t+e.getAttributeHash(),"")}getMeshHash(){const t=JSON.stringify(this.backgroundFillSymbol),e=JSON.stringify(this.defaultSymbol),r=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${t}.${e}.${this.classBreakInfos.reduce((n,i)=>n+i.getMeshHash(),"")}.${r}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){var t,e;return new DH({field:this.field,backgroundFillSymbol:(t=this.backgroundFillSymbol)==null?void 0:t.clone(),defaultLabel:this.defaultLabel,defaultSymbol:(e=this.defaultSymbol)==null?void 0:e.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:Qt(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:Qt(this.visualVariables),legendOptions:Qt(this.legendOptions),authoringInfo:Qt(this.authoringInfo)})}async collectRequiredFields(t,e){const r=[this.collectVVRequiredFields(t,e),this.collectSymbolFields(t,e)];await Promise.all(r)}async collectSymbolFields(t,e){const r=[...this.getSymbols().map(n=>n.collectRequiredFields(t,e)),o0(t,e,this.valueExpression)];$f(t,e,this.field),$f(t,e,this.normalizationField),await Promise.all(r)}_getBreakIndexForExpression(t,e){const{viewingMode:r,scale:n,spatialReference:i,arcade:s,timeZone:o}=e??{},{valueExpression:a}=this;let l=this._compiledValueExpression.valueExpression===a?this._compiledValueExpression.compiledFunction:null;const u=s.arcadeUtils;if(!l){const f=u.createSyntaxTree(a);l=u.createFunction(f),this._compiledValueExpression.compiledFunction=l}this._compiledValueExpression.valueExpression=a;const d=u.executeFunction(l,u.createExecContext(t,u.getViewInfo({viewingMode:r,scale:n,spatialReference:i}),o));return this._getBreakIndexfromInfos(d)}_getBreakIndexForField(t){const e=this.field,r=t.attributes,n=this.normalizationType;let i=parseFloat(r[e]);if(n){const s=this.normalizationTotal,o=parseFloat(this.normalizationField?r[this.normalizationField]:void 0);if(n===c_e)i=Math.log(i)*Math.LOG10E;else if(n!==AL||s==null||isNaN(s)){if(n===PL&&!isNaN(o)){if(isNaN(i)||isNaN(o))return-1;i/=o}}else i=i/s*100}return this._getBreakIndexfromInfos(i)}_getBreakIndexfromInfos(t){const e=this.isMaxInclusive;if(t!=null&&typeof t=="number"&&!isNaN(t))for(let r=0;rA$(t),json:{write:!0}})],xu.prototype,"normalizationTotal",void 0),T([B({type:nI.apiValues,value:null,json:{type:nI.jsonValues,read:nI.read,write:nI.write}})],xu.prototype,"normalizationType",null),T([ji({classBreaks:"class-breaks"})],xu.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],xu.prototype,"valueExpression",void 0),T([B({type:String,json:{write:!0}})],xu.prototype,"valueExpressionTitle",void 0),xu=DH=T([_t("esri.renderers.ClassBreaksRenderer")],xu);const h_e=xu,FH=-3,bot=FH-1;var Ig;(function(t){t[t.ALL=0]="ALL",t[t.SOME=1]="SOME"})(Ig||(Ig={}));let HRt=class{constructor(e,r,n){this.name=e,this._storage=r,this.id=Sot+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),n&&(this._storage.registerRemoveFunc(this.id,n),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,r,n,i=0){this._storage.put(this,e,r,n,i)}pop(e){const r=this._storage.pop(this,e);return r===void 0?++this._miss:++this._hit,r}get(e){const r=this._storage.get(this,e);return r===void 0?++this._miss:++this._hit,r}peek(e){return this._storage.peek(this,e)}updateSize(e,r,n){this._storage.updateSize(this,e,r,n)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}},Cot=class{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new Xk,this._users=new Xk}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,r){this._removeFuncs.push([e,r])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace(r=>r[0]!==e)}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,r){const n=this._db.get(e.id+r);return(n==null?void 0:n.size)??0}put(e,r,n,i,s){r=e.id+r;const o=this._db.get(r);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(r),o.entry!==n&&this._notifyRemove(r,o.entry,o.size,Ig.ALL)),i>this._maxSize)return void this._notifyRemove(r,n,i,Ig.ALL);if(n===void 0)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${r}`),void this._notifyRemove(r,n,0,Ig.ALL);const a=1+Math.max(s,bot)-FH;this._db.set(r,new Eot(n,i,a)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,r,n,i){r=e.id+r;const s=this._db.get(r);if(s&&s.entry===n){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const o=this._notifyRemove(r,n,i,Ig.SOME);if(!(o!=null&&o>0))return void this._db.delete(r);i=o}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,r){r=e.id+r;const n=this._db.get(r);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(r),++this._hit,n.entry;++this._miss}get(e,r){r=e.id+r;const n=this._db.get(r);if(n!==void 0)return this._db.delete(r),n.lives=n.lifetime,this._db.set(r,n),++this._hit,n.entry;++this._miss}peek(e,r){const n=this._db.get(e.id+r);return n?++this._hit:++this._miss,n==null?void 0:n.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},r={},n=new Array;this._db.forEach((o,a)=>{const l=o.lifetime;n[l]=(n[l]||0)+o.size,this._users.forAll(u=>{const{id:d,name:f}=u;if(a.startsWith(d)){const m=r[f]||0;r[f]=m+o.size}})});const i={};this._users.forAll(o=>{const a=o.name;if("hitRate"in o&&typeof o.hitRate=="number"&&!isNaN(o.hitRate)&&o.hitRate>0){const l=r[a]||0;r[a]=l,i[a]=Math.round(100*o.hitRate)+"%"}else i[a]="0%"});const s=Object.keys(r);s.sort((o,a)=>r[a]-r[o]),s.forEach(o=>e[o]=Math.round(r[o]/2**20)+"MB / "+i[o]);for(let o=n.length-1;o>=0;--o){const a=n[o];a&&(e["Priority "+(o+FH-1)]=Math.round(a/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll(e=>e.resetHitRate())}clear(e){const r=e.id;this._db.forEach((n,i)=>{i.startsWith(r)&&(this._size-=n.size,this._db.delete(i),this._notifyRemove(i,n.entry,n.size,Ig.ALL))}),e.size=0}clearAll(){this._db.forEach((e,r)=>this._notifyRemove(r,e.entry,e.size,Ig.ALL)),this._users.forAll(e=>e.size=0),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,r,n,i){let s;return this._removeFuncs.some(o=>{if(e.startsWith(o[0])){const a=o[1](r,i,n);return typeof a=="number"&&(s=a),!0}return!1}),s}_checkSize(){this._users.forAll(e=>this._checkSizeLimits(e)),this._checkSizeLimits()}_checkSizeLimits(e){const r=e??this;if(r.maxSize<0||r.size<=r.maxSize)return;const n=e==null?void 0:e.id;let i=!0;for(;i;){i=!1;for(const[s,o]of this._db)if(o.lifetime===0&&(!n||s.startsWith(n))){if(this._purgeItem(s,o,e),r.size<=.9*r.maxSize)return;i||(i=this._db.has(s))}}for(const[s,o]of this._db)if((!n||s.startsWith(n))&&(this._purgeItem(s,o,e),r.size<=.9*r.maxSize))return}_purgeItem(e,r,n=this._users.find(i=>e.startsWith(i.id))){if(this._db.delete(e),r.lives<=1){this._size-=r.size,n&&(n.size-=r.size);const i=this._notifyRemove(e,r.entry,r.size,Ig.SOME);i!=null&&i>0&&(this._size+=i,n&&(n.size+=i),r.lives=r.lifetime,r.size=i,this._db.set(e,r))}else--r.lives,this._db.set(e,r)}},Sot=0,Eot=class{constructor(e,r,n){this.entry=e,this.size=r,this.lifetime=n,this.lives=n}},Mot=class{constructor(e,r){this._storage=new Cot,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),r&&this._storage.registerRemoveFunc("",r)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,r,n=1){this._storage.put(this,e,r,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}},Tot=class zH{constructor(e,r,n=""){this.major=e,this.minor=r,this._context=n}lessThan(e,r){return this.majorNf.create(r)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return Znt(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){var r;return((r=this.get(e))==null?void 0:r.name)??void 0}toJSON(){return{fields:this.fields.map(e=>iA(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}};function j3(t){return t.trim().toLowerCase()}function Dne(t){var e;return((e=bnt(t))==null?void 0:e.toLowerCase())??""}const f_e=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function Fne(t){const e=new Map;if(!t.fields)return e;const r=t.datesInUnknownTimezone===!0,{timeInfo:n,editFieldsInfo:i}=t,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",o=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=kot(t)?t.dateFieldsTimeZone??null:t.dateFieldsTimeReference?WR(t.dateFieldsTimeReference):null,l=i?Rot(i)?i.timeZone??a:i.dateFieldsTimeReference?WR(i.dateFieldsTimeReference):a??pA:null,u=n?Lot(n)?n.timeZone??a:n.timeReference?WR(n.timeReference):a:null,d=new Map([[j3((i==null?void 0:i.creationDateField)??""),l],[j3((i==null?void 0:i.editDateField)??""),l],[j3(s),u],[j3(o),u]]);for(const{name:f,type:m}of t.fields)if(f_e.has(m))e.set(f,AC);else if(m!=="date"&&m!=="esriFieldTypeDate")e.set(f,null);else if(r)e.set(f,AC);else{const v=d.get(j3(f??""))??a;e.set(f,v)}return e}function Pot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function $ot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Oot(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Not(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function p_e(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}function m_e(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}function g_e(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}function Dot(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Fot(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function zot(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}function Bot(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}function jot(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function Vot(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function Uot(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}function y_e(t,e){const r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+s*s)}function v_e(t,e){const r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return r*r+n*n+i*i+s*s}function __e(t){const e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}function x_e(t){const e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}function Hot(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function Got(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function qot(t,e){const r=e[0],n=e[1],i=e[2],s=e[3];let o=r*r+n*n+i*i+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=s*o),t}function Wot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Zot(t,e,r,n){const i=e[0],s=e[1],o=e[2],a=e[3];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=o+n*(r[2]-o),t[3]=a+n*(r[3]-a),t}function Yot(t,e){const r=oX;let n,i,s,o,a,l;e=e||1;do n=2*r()-1,i=2*r()-1,a=n*n+i*i;while(a>=1);do s=2*r()-1,o=2*r()-1,l=s*s+o*o;while(l>=1);const u=Math.sqrt((1-a)/l);return t[0]=e*n,t[1]=e*i,t[2]=e*s*u,t[3]=e*o*u,t}function Xot(t,e,r){const n=e[0],i=e[1],s=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*s+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*s+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*s+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*s+r[15]*o,t}function Jot(t,e,r){const n=e[0],i=e[1],s=e[2],o=r[0],a=r[1],l=r[2],u=r[3],d=u*n+a*s-l*i,f=u*i+l*n-o*s,m=u*s+o*i-a*n,v=-o*n-a*i-l*s;return t[0]=d*u+v*-o+f*-l-m*-a,t[1]=f*u+v*-a+m*-o-d*-l,t[2]=m*u+v*-l+d*-a-f*-o,t[3]=e[3],t}function Kot(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function Qot(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function eat(t,e){const r=t[0],n=t[1],i=t[2],s=t[3],o=e[0],a=e[1],l=e[2],u=e[3],d=r_();return Math.abs(r-o)<=d*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-a)<=d*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-l)<=d*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(s-u)<=d*Math.max(1,Math.abs(s),Math.abs(u))}const tat=p_e,rat=m_e,nat=g_e,iat=y_e,sat=v_e,oat=__e,aat=x_e;Object.freeze(Object.defineProperty({__proto__:null,add:Not,ceil:Dot,copy:Pot,copyVec3:$ot,dist:iat,distance:y_e,div:nat,divide:g_e,dot:Wot,equals:eat,exactEquals:Qot,floor:Fot,inverse:Got,len:oat,length:__e,lerp:Zot,max:Bot,min:zot,mul:rat,multiply:m_e,negate:Hot,normalize:qot,random:Yot,round:jot,scale:Vot,scaleAndAdd:Uot,set:Oot,sqrDist:sat,sqrLen:aat,squaredDistance:v_e,squaredLength:x_e,str:Kot,sub:tat,subtract:p_e,transformMat4:Xot,transformQuat:Jot},Symbol.toStringTag,{value:"Module"}));function WX(){return[0,0,0,0]}function lat(t){return[t[0],t[1],t[2],t[3]]}function p7(t,e,r,n){return[t,e,r,n]}function uat(t,e=WX()){const r=Math.min(4,t.length);for(let n=0;nn<=.04045?n/12.92:((n+.055)/1.055)**2.4),r=k_e(vat,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function ZX(t){const e=k_e(_at,[t.x/100,t.y/100,t.z/100]).map(r=>{const n=r<=.0031308?12.92*r:1.055*r**.4166666666666667-.055;return Math.min(1,Math.max(n,0))});return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function P_e(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map(r=>r>.008856451679035631?r**.3333333333333333:7.787037037037035*r+.13793103448275862);return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function $_e(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map(n=>n>6/29?n**3:3*(6/29)**2*(n-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function xat(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let s=Math.atan2(n,r);return s=s>0?s:s+2*Math.PI,{l:e,c:i,h:s}}function wat(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}function bat(t){return P_e(A_e(t))}function Cat(t){return ZX($_e(t))}function Sat(t){return xat(P_e(A_e(t)))}function Eat(t){return ZX($_e(wat(t)))}function Mat(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),s=i-Math.min(e,r,n);let o=i,a=s===0?0:i===e?(r-n)/s%6:i===r?(n-e)/s+2:(e-r)/s+4,l=s===0?0:s/o;return a<0&&(a+=6),a*=60,l*=100,o*=100/255,{h:a,s:l,v:o}}function Tat(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,s=i*(1-Math.abs(e%2-1));let o;switch(Math.floor(e)){case 0:o={r:i,g:s,b:0};break;case 1:o={r:s,g:i,b:0};break;case 2:o={r:0,g:i,b:s};break;case 3:o={r:0,g:s,b:i};break;case 4:o={r:s,g:0,b:i};break;case 5:case 6:o={r:i,g:0,b:s};break;default:o={r:0,g:0,b:0}}return o.r=Math.round(o.r+n-i),o.g=Math.round(o.g+n-i),o.b=Math.round(o.b+n-i),o}function YX(t){return T_e(t)?t:L_e(t)?Eat(t):R_e(t)?Cat(t):yat(t)?ZX(t):I_e(t)?Tat(t):t}function JRt(t){return I_e(t)?t:Mat(YX(t))}function KRt(t){return R_e(t)?t:bat(YX(t))}function QRt(t){return L_e(t)?t:Sat(YX(t))}var zne;(function(t){t[t.Low=160]="Low",t[t.High=225]="High"})(zne||(zne={}));const Iat=` /-, +`;function Bne(t){let e=t.length;for(;e--;)if(!Iat.includes(t.charAt(e)))return!1;return!0}function Rat(t,e){const r=[];let n=0,i=-1;do if(i=t.indexOf("[",n),i>=n){if(i>n){const s=t.substr(n,i-n);r.push([s,null,Bne(s)])}if(n=i+1,i=t.indexOf("]",n),i>=n){if(i>n){const s=e[t.substr(n,i-n)];s&&r.push([null,s,!1])}n=i+1}}while(i!==-1);if(nt==null||isNaN(t)?e:t;function Aat(t){return(t?Object.keys(t):[]).map(e=>({name:e,alias:e,type:typeof t[e]=="string"?"esriFieldTypeString":"esriFieldTypeDouble"}))}function XX(t){return t&&t.charAt(0).toLowerCase()+t.substring(1)}function tLt(t,e,r,n,i,s){const{infos:o}=s;let a=1,l=0,u=0,d=0;for(const{offsetX:v,offsetY:b,rotation:M,size:O,frameHeight:I,rotateClockWise:A}of o)u=Une(v,b,l,a,u),d=Vne(v,b,l,a,d),I&&(a*=O/I),l=Hne(M,A,l);const f=Une(n,i,l,a,u),m=Vne(n,i,l,a,d);return{size:t*a,rotation:Hne(e,r,l),offsetX:f,offsetY:m}}function Pat(t){return t!=null&&t.dashTemplate&&typeof t.dashTemplate=="string"&&(t.dashTemplate=t.dashTemplate.split(" ").map(Number)),t}function BH(t){if(t==null)return"Normal";switch(t.type){case"CIMTextSymbol":return t.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const e=t.symbolLayers;if(!e)return"Normal";for(const r of e)if(r.type==="CIMVectorMarker")return BH(r)}break;case"CIMVectorMarker":{const e=t.markerGraphics;if(!e)return"Normal";for(const r of e)if(r.symbol)return BH(r.symbol)}}return"Normal"}function O_e(t,e){if(e!==null){const r=e.get(t);return r?r.name:t}return t}function $at(t){return t.map(e=>({...e,propertyName:XX(e.propertyName)}))}function jne(t){const e={};for(const r in t){const n=t[r];e[XX(r)]=n}return e}function Vne(t,e,r,n,i){const s=r*Math.PI/180;if(s){const o=Math.cos(s);return(Math.sin(s)*t+o*e)*n+i}return e*n+i}function Une(t,e,r,n,i){const s=r*Math.PI/180;return s?(Math.cos(s)*t-Math.sin(s)*e)*n+i:t*n+i}function Hne(t,e,r){return e?r-t:r+t}function rLt(t){return t?{originPosition:t.originPosition==="upper-left"?"upperLeft":t.originPosition==="lower-left"?"lowerLeft":t.originPosition,scale:t.tolerance?[t.tolerance,t.tolerance,1,1]:[1,1,1,1],translate:t.extent!=null?[t.extent.xmin,t.extent.ymax,t.extent.zmin??0,t.extent.mmin??0]:[0,0,0,0]}:null}function Oat(t){return t.originPosition==="lowerLeft"&&t.scale.length===4&&t.translate.length===4}function dE(t){if(Oat(t))return t;const{originPosition:e,scale:r,translate:n}=t,i=r[0]??1,s=r[1]??1;return{originPosition:"lowerLeft",scale:[i,e==="lowerLeft"?s:-s,r[2]??1,r[3]??1],translate:[n[0]??0,n[1]??0,n[2]??0,n[3]??0]}}function Nat({scale:t,translate:e},r){return Math.round((r-e[0])/t[0])}function Dat({scale:t,translate:e},r){return Math.round((r-e[1])/t[1])}function Fat({scale:t,translate:e},r){return Math.round(((r??0)-e[2])/t[2])}function zat({scale:t,translate:e},r){return r?Math.round((r-e[3])/t[3]):0}function fE({scale:t,translate:e},r){return r*t[0]+e[0]}function pE({scale:t,translate:e},r){return r*t[1]+e[1]}function GC({scale:t,translate:e},r){return(r??0)*t[2]+e[2]}function qC({scale:t,translate:e},r){return r?r*t[3]+e[3]:0}function JX(t,e){return t&&e?Uat:t&&!e?jat:!t&&e?Vat:Bat}const Bat=(t,e)=>{const r=new Array(e.length);if(!e.length)return r;const n=e[0];let i=fE(t,n[0]),s=pE(t,n[1]);r[0]=[i,s];const{scale:o,originPosition:a}=t,l=o[0],u=a==="lowerLeft"?o[1]:-o[1];for(let d=1;d{const r=new Array(e.length);if(!e.length)return r;const n=e[0];let i=fE(t,n[0]),s=pE(t,n[1]);r[0]=[i,s,GC(t,n[2])];const{scale:o,originPosition:a}=t,l=o[0],u=a==="lowerLeft"?o[1]:-o[1];for(let d=1;d{const r=new Array(e.length);if(!e.length)return r;const n=e[0];let i=fE(t,n[0]),s=pE(t,n[1]);r[0]=[i,s,qC(t,n[2])];const{scale:o,originPosition:a}=t,l=o[0],u=a==="lowerLeft"?o[1]:-o[1];for(let d=1;d{const r=new Array(e.length);if(!e.length)return r;const n=e[0];let i=fE(t,n[0]),s=pE(t,n[1]);r[0]=[i,s,GC(t,n[2]),qC(t,n[3])];const{scale:o,originPosition:a}=t,l=o[0],u=a==="lowerLeft"?o[1]:-o[1];for(let d=1;dGat(n,e,r,i,s);case"esriGeometryPolygon":return(r,n,i,s)=>qat(n,e,r,i,s);case"esriGeometryPolyline":return(r,n,i,s)=>Wat(n,e,r,i,s);case"esriGeometryMultipoint":return(r,n,i,s)=>Hat(n,e,r,i,s);default:return li.getLogger("esri.views.2d.support.arcadeOnDemand").error(new Pr("mapview-arcade",`Unable to handle geometryType: ${t}`)),r=>r}}const Jat=t=>{if(!t)return[0,0,0,0];const{r:e,g:r,b:n,a:i}=t;return[e,r,n,255*i]};let D_e=class cl{static findApplicableOverrides(e,r,n){if(e&&r){if(e.primitiveName){let i=!1;for(const s of n)if(s.primitiveName===e.primitiveName){i=!0;break}if(!i)for(const s of r)s.primitiveName===e.primitiveName&&n.push(s)}switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(e.effects)for(const i of e.effects)cl.findApplicableOverrides(i,r,n);if(e.symbolLayers)for(const i of e.symbolLayers)cl.findApplicableOverrides(i,r,n);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMVectorMarker":case"CIMCharacterMarker":case"CIMPictureMarker":if(e.effects)for(const i of e.effects)cl.findApplicableOverrides(i,r,n);if(e.markerPlacement&&cl.findApplicableOverrides(e.markerPlacement,r,n),e.type==="CIMVectorMarker"){if(e.markerGraphics)for(const i of e.markerGraphics)cl.findApplicableOverrides(i,r,n),cl.findApplicableOverrides(i.symbol,r,n)}else e.type==="CIMCharacterMarker"?cl.findApplicableOverrides(e.symbol,r,n):e.type==="CIMHatchFill"?cl.findApplicableOverrides(e.lineSymbol,r,n):e.type==="CIMPictureMarker"&&cl.findApplicableOverrides(e.animatedSymbolProperties,r,n)}}}static findEffectOverrides(e,r){if(!e)return null;if(e.type==="CIMGeometricEffectDashes"&&Pat(e),!r||!e.primitiveName)return{type:"cim-effect-param",effect:e,overrides:[]};const n=jne(e),i=e.primitiveName,s=[];for(const o of r)o.primitiveName===i&&s.push(jne(o));return{type:"cim-effect-param",effect:n,overrides:$at(s)}}static async resolveSymbolOverrides(e,r,n,i,s,o,a){if(!(e!=null&&e.symbol))return null;let{symbol:l,primitiveOverrides:u}=e;const d=!!u;if(!d&&!i)return l;l=Qt(l),u=Qt(u);let f=!0;if(r||(r={attributes:{}},f=!1),d){if(f||(u=u.filter(m=>{var v;return!((v=m.valueExpressionInfo)!=null&&v.expression.includes("$feature"))})),a||(u=u.filter(m=>{var v;return!((v=m.valueExpressionInfo)!=null&&v.expression.includes("$view"))})),u.length>0){const m={spatialReference:n,fields:Aat(r.attributes),geometryType:s};await cl.createRenderExpressions(u,m),cl.evaluateOverrides(u,r,s??"esriGeometryPoint",o,a)}cl.applyOverrides(l,u)}return i&&cl.applyDictionaryTextOverrides(l,r,i,null),l}static async createRenderExpressions(e,r){const n=[];for(const i of e){const s=i.valueExpressionInfo;if(!s||cl._expressionToRenderExpression.has(s.expression))continue;const o=vnt(s.expression,r.spatialReference,r.fields);n.push(o),o.then(a=>cl._expressionToRenderExpression.set(s.expression,a))}n.length>0&&await Promise.all(n)}static evaluateOverrides(e,r,n,i,s){const o={$view:{scale:s==null?void 0:s.scale}};for(const a of e){a.value&&typeof a.value=="object"&&T_e(a.value)&&(a.propertyName==="Color"||a.propertyName==="StrokeColor")&&(a.value=Jat(a.value));const l=a.valueExpressionInfo;if(!l)continue;const u=cl._expressionToRenderExpression.get(l.expression);u&&(a.value=Zat(u,r,o,n,i))}}static applyDictionaryTextOverrides(e,r,n,i,s="Normal"){if(e!=null&&e.type)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":case"CIMTextSymbol":{const o=e.symbolLayers;if(!o)return;for(const a of o)a&&a.type==="CIMVectorMarker"&&cl.applyDictionaryTextOverrides(a,r,n,i,e.type==="CIMTextSymbol"?e.textCase:s)}break;case"CIMVectorMarker":{const o=e.markerGraphics;if(!o)return;for(const a of o)a&&cl.applyDictionaryTextOverrides(a,r,n,i)}break;case"CIMMarkerGraphic":{const o=e.textString;if(o&&o.includes("[")){const a=Rat(o,n);e.textString=Lat(r,a,i,s)}}}}static applyOverrides(e,r,n,i){if(e.primitiveName){for(const s of r)if(s.primitiveName===e.primitiveName){const o=XX(s.propertyName);if(i&&i.push({cim:e,nocapPropertyName:o,value:e[o]}),n){let a=!1;for(const l of n)l.primitiveName===e.primitiveName&&(a=!0);a||n.push(s)}s.value!=null&&(e[o]=s.value)}}switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(e.effects)for(const s of e.effects)cl.applyOverrides(s,r,n,i);if(e.symbolLayers)for(const s of e.symbolLayers)cl.applyOverrides(s,r,n,i);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMSolidFill":case"CIMVectorMarker":if(e.effects)for(const s of e.effects)cl.applyOverrides(s,r,n,i);if(e.type==="CIMVectorMarker"&&e.markerGraphics)for(const s of e.markerGraphics)cl.applyOverrides(s,r,n,i),cl.applyOverrides(s.symbol,r,n,i)}}static restoreOverrides(e){for(const r of e)r.cim[r.nocapPropertyName]=r.value}static buildOverrideKey(e){let r="";for(const n of e)n.value!==void 0&&(r+=`${n.primitiveName}${n.propertyName}${JSON.stringify(n.value)}`);return r}static toValue(e,r){if(e==="DashTemplate")return r.split(" ").map(n=>Number(n));if(e==="Color"){const n=new ks(r).toRgba();return n[3]*=255,n}return r}};D_e._expressionToRenderExpression=new Map;const Gne="esri.renderers.support.DictionaryLoader",Kat={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};let F_e=class{constructor(e,r,n){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new Mot(100),this._dictionaryVersion=null,this._fieldIndex=null,this._dictionaryPromise=null,this.url=e,this.config=r,this.fieldMap=n}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,r){var f;let n;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(r));try{n=await this._dictionaryPromise}catch(m){if(i0(m))return this._dictionaryPromise=null,null}const i=(f=this._dictionaryVersion)==null?void 0:f.since(4,0),s={};if(this.fieldMap)for(const m of this._symbolFields){const v=O_e(this.fieldMap[m],this._fieldIndex);if(v){const b=e.attributes[v];s[m]=i?b:b!=null?""+e.attributes[v]:""}else s[m]=""}let o=null;try{o=n==null?void 0:n(s,r)}catch{return null}if(!o||typeof o!="string"||o==="invalid")return null;const a=o.split(";"),l=[],u=[];for(const m of a)if(m)if(m.includes("po:")){const v=m.substr(3).split("|");if(v.length===3){const b=v[0],M=v[1];let O=v[2];if(M==="DashTemplate")O=O.split(" ").map(I=>Number(I));else if(M==="Color"){const I=new ks(O).toRgba();O=[I[0],I[1],I[2],255*I[3]]}else O=Number(O);u.push({primitiveName:b,propertyName:M,value:O,defaultValue:null})}}else if(m.includes("|")){for(const v of m.split("|"))if(this._itemNames.has(v)){l.push(v);break}}else this._itemNames.has(m)&&l.push(m);const d=e.geometry==null||!e.geometry.hasZ&&e.geometry.type==="point";return this._cimPartsToCIMSymbol(e,l,u,d,r)}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void li.getLogger(Gne).error("no valid URL!");const r=sa(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},signal:e!=null?e.signal:null}),[{data:n}]=await Promise.all([r,M5()]);if(!n)throw this._dictionaryPromise=null,new Pr("esri.renderers.DictionaryRenderer","Bad dictionary data!");const{authoringInfo:i,dictionary_version:s,expression:o,itemsNames:a}=n,l=o;let u=!1;s&&(this._dictionaryVersion=Tot.parse(s),u=this._dictionaryVersion.since(4,0)),this._refSymbolUrlTemplate=this.url+"/"+n.cimRefTemplateUrl,this._itemNames=new Set(a),this._symbolFields=i.symbol;const d={};if(this.config){const v=this.config;for(const b in v)d[b]=v[b]}if(i.configuration)for(const v of i.configuration)d.hasOwnProperty(v.name)||(d[v.name]=v.value);const f=[];if(e!=null&&e.fields&&this.fieldMap)for(const v in this.fieldMap){const b=this.fieldMap[v],M=e.fields.filter(O=>O.name.toLowerCase()===(b==null?void 0:b.toLowerCase()));M.length>0&&f.push({...M[0],type:u?M[0].type:"esriFieldTypeString"})}f.length>0&&(this._fieldIndex=new d_e(f));const m=_nt(l,e!=null?e.spatialReference:null,f,d).then(v=>{const b={scale:0};return(M,O)=>{if(v==null)return null;const I=v.repurposeFeature({geometry:null,attributes:M});return b.scale=O!=null?O.scale??void 0:void 0,v.evaluate({$feature:I,$view:b},v.services)}}).catch(v=>(li.getLogger(Gne).error("Creating dictionary expression failed:",v),null));return this._dictionaryPromise=m,m}async _cimPartsToCIMSymbol(e,r,n,i,s){const o=new Array(r.length);for(let u=0;uo.data);const i=this._refSymbolUrlTemplate.replaceAll(/\{itemName\}/gi,e),s=sa(i,{responseType:"json",query:{f:"json"},...r});this._ongoingRequests.set(e,s),s.finally(()=>this._ongoingRequests.delete(e));try{const o=await s;return this._symbolCache.put(e,o.data),o.data}catch(o){throw o}}};function Qat(t,e,r){if(!t||t.length===0)return null;const n={...t[0]};if(t.length>1){n.symbolLayers=[];for(const i of t){const s=i;n.symbolLayers.unshift(...s.symbolLayers)}}return r&&(n.callout=Kat),{type:"CIMSymbolReference",symbol:n,primitiveOverrides:e}}var jH;let E1=jH=class extends f7(gy){constructor(t){super(t),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new F_e(this.url,this.config,this.fieldMap)}writeData(t,e){t&&(e.scalingExpressionInfo={expression:t,returnType:"number"})}writeVisualVariables(t,e,r,n){n!=null&&n.origin||super.writeVisualVariables(t,e,r,n)}clone(){return new jH({config:Qt(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:Qt(this.fieldMap),url:Qt(this.url),visualVariables:Qt(this.visualVariables)})}async getSymbolAsync(t,e){return this._loader.getSymbolAsync(t,e)}async collectRequiredFields(t,e){await this.collectVVRequiredFields(t,e),this.scaleExpression&&await o0(t,e,this.scaleExpression);for(const r in this.fieldMap){const n=this.fieldMap[r];e.has(n)&&t.add(n)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((t,e)=>t+e.getAttributeHash(),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};T([B({type:F_e})],E1.prototype,"_loader",null),T([B({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],E1.prototype,"config",void 0),T([B({type:Object,json:{write:!0}})],E1.prototype,"fieldMap",void 0),T([B({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],E1.prototype,"scaleExpression",void 0),T([On("scaleExpression")],E1.prototype,"writeData",null),T([B({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(t){return{enabled:!!t&&!!this.scaleExpression}}}}})],E1.prototype,"scaleExpressionTitle",void 0),T([B({type:String,json:{write:!0}})],E1.prototype,"url",void 0),T([On("visualVariables")],E1.prototype,"writeVisualVariables",null),E1=jH=T([_t("esri.renderers.DictionaryRenderer")],E1);const elt=E1;var VH;let pg=VH=class extends qr{constructor(t){super(t),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(t){return t==null?t:typeof t=="function"?(li.getLogger(this).error(".field: field must be a string value"),null):jS(t)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){var t;return new VH({color:(t=this.color)==null?void 0:t.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};T([B({type:ks,json:{type:[Number],write:!0}})],pg.prototype,"color",void 0),T([B({type:String,json:{write:!0}})],pg.prototype,"field",void 0),T([Pl("field")],pg.prototype,"castField",null),T([B({type:String,json:{write:!0}})],pg.prototype,"label",void 0),T([B({type:String,json:{write:!0}})],pg.prototype,"valueExpression",void 0),T([B({type:String,json:{write:!0}})],pg.prototype,"valueExpressionTitle",void 0),pg=VH=T([_t("esri.renderers.support.AttributeColorInfo")],pg);const z_e=pg;var UH;let OL=UH=class extends qr{constructor(){super(...arguments),this.unit=null}clone(){return new UH({unit:this.unit})}};T([B({type:String,json:{write:!0}})],OL.prototype,"unit",void 0),OL=UH=T([_t("esri.renderers.support.DotDensityLegendOptions")],OL);const tlt=OL;var HH;let Rd=HH=class extends f7(gy){constructor(t){super(t),this.attributes=null,this.backgroundColor=new ks([0,0,0,0]),this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new jf,this.dotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(t){if(this.referenceScale==null)return this.dotValue;const e=t/this.referenceScale*this.dotValue;return e<1?1:e}getSymbol(){return new a_({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){var t;return((t=this.attributes)==null?void 0:t.reduce((e,r)=>e+r.getAttributeHash(),""))??""}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new HH({attributes:Qt(this.attributes),backgroundColor:Qt(this.backgroundColor),dotBlendingEnabled:Qt(this.dotBlendingEnabled),dotShape:Qt(this.dotShape),dotSize:Qt(this.dotSize),dotValue:Qt(this.dotValue),legendOptions:Qt(this.legendOptions),outline:Qt(this.outline),referenceScale:Qt(this.referenceScale),seed:Qt(this.seed),visualVariables:Qt(this.visualVariables),authoringInfo:Qt(this.authoringInfo)})}getControllerHash(){var e;return`${(e=this.attributes)==null?void 0:e.map(r=>r.field||r.valueExpression||"")}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(t,e){await this.collectVVRequiredFields(t,e);for(const r of this.attributes??[])r.valueExpression&&await o0(t,e,r.valueExpression),r.field&&t.add(r.field)}};T([B({type:[z_e],json:{write:!0}})],Rd.prototype,"attributes",void 0),T([B({type:ks,json:{write:!0}})],Rd.prototype,"backgroundColor",void 0),T([B({type:Boolean,json:{write:!0}})],Rd.prototype,"dotBlendingEnabled",void 0),T([B({type:String,json:{write:!1}})],Rd.prototype,"dotShape",void 0),T([B({type:Number,json:{write:!0}})],Rd.prototype,"dotSize",void 0),T([B({type:tlt,json:{write:!0}})],Rd.prototype,"legendOptions",void 0),T([B({type:jf,json:{default:null,write:!0}})],Rd.prototype,"outline",void 0),T([B({type:Number,json:{write:!0}})],Rd.prototype,"dotValue",void 0),T([B({type:Number,json:{write:!0}})],Rd.prototype,"referenceScale",void 0),T([B({type:Number,json:{write:!0}})],Rd.prototype,"seed",void 0),T([ji({dotDensity:"dot-density"})],Rd.prototype,"type",void 0),Rd=HH=T([_t("esri.renderers.DotDensityRenderer")],Rd);const rlt=Rd;var GH;let Wb=GH=class extends qr{constructor(t){super(t),this.color=null,this.ratio=null}clone(){return new GH({color:this.color&&this.color.clone(),ratio:this.ratio})}};T([B({type:ks,json:{type:[Qa],default:null,write:!0}})],Wb.prototype,"color",void 0),T([B({type:Number,json:{write:!0}})],Wb.prototype,"ratio",void 0),Wb=GH=T([_t("esri.renderers.support.HeatmapColorStop")],Wb);const NL=Wb;let Ox=class extends Fa(qr){constructor(){super(...arguments),this.minLabel=null,this.maxLabel=null,this.title=null}};T([B({type:String,json:{write:!0}})],Ox.prototype,"minLabel",void 0),T([B({type:String,json:{write:!0}})],Ox.prototype,"maxLabel",void 0),T([B({type:String,json:{write:!0}})],Ox.prototype,"title",void 0),Ox=T([_t("esri.renderers.support.HeatmapLegendOptions")],Ox);const KX=2.4;function nlt(t){return Dp(t*KX)}function ilt(t){return bit(t)/KX}function oLt(t,e,r){const n=Math.sqrt(t**2+e**2)/r;return n>1?0:3/(Math.PI*r**2)*(1-n**2)**2}function aLt(t){return typeof t=="function"?t:t?e=>+e[t]:()=>1}var qH;function qne(t){if(t!=null){const{maxDensity:e,minDensity:r,radius:n}=t;if(e!=null||r!=null||n!=null){const{blurRadius:i,maxPixelIntensity:s,minPixelIntensity:o,...a}=t;return a}}return t}let lc=qH=class extends gy{constructor(t){super(t),this.authoringInfo=null,this.colorStops=[new NL({ratio:0,color:new ks("rgba(255, 140, 0, 0)")}),new NL({ratio:.75,color:new ks("rgba(255, 140, 0, 1)")}),new NL({ratio:.9,color:new ks("rgba(255, 0, 0, 1)")})],this.field=null,this.legendOptions=null,this.maxDensity=.04,this.minDensity=0,this.radius=18,this.referenceScale=0,this.type="heatmap",this.valueExpression=null,this.valueExpressionTitle=null,this._warnedProps={blurRadius:!1,maxPixelIntensity:!1,minPixelIntensity:!1}}normalizeCtorArgs(t){return qne(t)}get blurRadius(){return ilt(this.radius)}set blurRadius(t){const e=this.maxPixelIntensity,r=this.minPixelIntensity;this._set("radius",nlt(t)),this._warnAboutDeprecatedGaussianBlurProp("blurRadius","radius"),this._set("maxDensity",e*this._pixelIntensityToDensity),this._set("minDensity",r*this._pixelIntensityToDensity)}get maxPixelIntensity(){return this.maxDensity/this._pixelIntensityToDensity}set maxPixelIntensity(t){this._set("maxDensity",t*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity","maxDensity")}get minPixelIntensity(){return this.minDensity/this._pixelIntensityToDensity}set minPixelIntensity(t){this._set("minDensity",t*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity","minDensity")}get _pixelIntensityToDensity(){return 24/(KX**2*this.blurRadius**4)}_warnAboutDeprecatedGaussianBlurProp(t,e){this._warnedProps[t]||md(this).getDefaultOrigin()==="user"&&(this._warnedProps[t]=!0,HZ(()=>{yLe(li.getLogger(this),t,{replacement:`${String(e)} (suggested value: ${this._get(e)})`,version:"4.24"})}))}read(t,e){t=qne(t),super.read(t,e)}getSymbol(){return new Cm}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}async collectRequiredFields(t,e){const r=this.field,n=this.valueExpression;r&&typeof r=="string"&&$f(t,e,r),n&&typeof n=="string"&&await o0(t,e,n)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new qH({authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),colorStops:Qt(this.colorStops),field:this.field,legendOptions:Qt(this.legendOptions),maxDensity:this.maxDensity,minDensity:this.minDensity,radius:this.radius,referenceScale:this.referenceScale,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};T([B({type:VX,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],lc.prototype,"authoringInfo",void 0),T([B({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],lc.prototype,"blurRadius",null),T([B({type:[NL],json:{write:!0}})],lc.prototype,"colorStops",void 0),T([B({type:String,json:{write:!0}})],lc.prototype,"field",void 0),T([B({type:Ox,json:{write:!0}})],lc.prototype,"legendOptions",void 0),T([B({type:Number,json:{write:!0}})],lc.prototype,"maxDensity",void 0),T([B({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],lc.prototype,"maxPixelIntensity",null),T([B({type:Number,json:{write:!0}})],lc.prototype,"minDensity",void 0),T([B({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],lc.prototype,"minPixelIntensity",null),T([B({type:Number,cast:lo,json:{write:!0}})],lc.prototype,"radius",void 0),T([B({type:Number,range:{min:0},json:{default:0,write:!0}})],lc.prototype,"referenceScale",void 0),T([ji({heatmap:"heatmap"})],lc.prototype,"type",void 0),T([B({type:String,json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],lc.prototype,"valueExpression",void 0),T([B({type:String})],lc.prototype,"valueExpressionTitle",void 0),T([B({readOnly:!0})],lc.prototype,"_pixelIntensityToDensity",null),lc=qH=T([_t("esri.renderers.HeatmapRenderer")],lc);const B_e=lc;let V3=class extends Fa(qr){constructor(){super(...arguments),this.color=new ks([0,0,0,0]),this.label=null,this.threshold=0}};T([B({type:ks,json:{write:!0}})],V3.prototype,"color",void 0),T([B({type:String,json:{write:!0}})],V3.prototype,"label",void 0),T([B({type:Number,range:{min:0,max:1},json:{write:!0}})],V3.prototype,"threshold",void 0),V3=T([_t("esri.renderers.support.OthersCategory")],V3);let DL=class extends Fa(qr){constructor(){super(...arguments),this.title=null}};T([B({type:String,json:{write:!0}})],DL.prototype,"title",void 0),DL=T([_t("esri.renderers.support.PieChartLegendOptions")],DL);let gf=class extends f7(Fa(gy)){constructor(e){super(e),this.attributes=null,this.backgroundFillSymbol=null,this.defaultColor=new ks([0,0,0,0]),this.defaultLabel=null,this.holePercentage=0,this.othersCategory=new V3,this.legendOptions=null,this.outline=null,this.size=12,this.type="pie-chart"}getSymbol(){var e;return new Cm({size:this.size?this.size/2+(((e=this.outline)==null?void 0:e.width)||0):0})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol(),this.backgroundFillSymbol].filter(PZ)}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,r)=>e+r.getAttributeHash(),"")}getMeshHash(){return this.getSymbols().reduce((e,r)=>e+JSON.stringify(r),"")}async collectRequiredFields(e,r){await this.collectVVRequiredFields(e,r);for(const n of this.attributes)n.valueExpression&&await o0(e,r,n.valueExpression),n.field&&e.add(n.field)}};T([B({type:[z_e],json:{write:!0}})],gf.prototype,"attributes",void 0),T([B({type:a_,json:{default:null,write:!0}})],gf.prototype,"backgroundFillSymbol",void 0),T([B({type:ks,json:{write:!0}})],gf.prototype,"defaultColor",void 0),T([B({type:String,json:{write:!0}})],gf.prototype,"defaultLabel",void 0),T([B({type:Number,range:{min:0,max:1},json:{write:!0}})],gf.prototype,"holePercentage",void 0),T([B({type:V3,json:{write:!0}})],gf.prototype,"othersCategory",void 0),T([B({type:DL,json:{write:!0}})],gf.prototype,"legendOptions",void 0),T([B({type:jf,json:{default:null,write:!0}})],gf.prototype,"outline",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],gf.prototype,"size",void 0),T([ji({pieChart:"pie-chart"})],gf.prototype,"type",void 0),gf=T([_t("esri.renderers.PieChartRenderer")],gf);const slt=gf;var WH;let T3=WH=class extends f7(gy){constructor(t){super(t),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(t,e){await Promise.all([this.collectSymbolFields(t,e),this.collectVVRequiredFields(t,e)])}async collectSymbolFields(t,e){await Promise.all(this.getSymbols().map(r=>r.collectRequiredFields(t,e)))}getSymbol(t,e){return this.symbol}async getSymbolAsync(t,e){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((t,e)=>t+e.getAttributeHash(),"")}getMeshHash(){return this.getSymbols().reduce((t,e)=>t+JSON.stringify(e),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new WH({description:this.description,label:this.label,symbol:Qt(this.symbol),visualVariables:Qt(this.visualVariables),authoringInfo:Qt(this.authoringInfo)})}};T([B({type:String,json:{write:!0}})],T3.prototype,"description",void 0),T([B({type:String,json:{write:!0}})],T3.prototype,"label",void 0),T([B(qX)],T3.prototype,"symbol",void 0),T([ji({simple:"simple"})],T3.prototype,"type",void 0),T3=WH=T([_t("esri.renderers.SimpleRenderer")],T3);const m7=T3,olt=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function ZH(t){return t instanceof Iu}function Wne(t){return t instanceof $o?Object.keys(t.items):ZH(t)?md(t).keys():t?Object.keys(t):[]}function iI(t,e){return t instanceof $o?t.items[e]:t[e]}function alt(t,e){return!(!Array.isArray(t)||!Array.isArray(e))&&t.length!==e.length}function F6(t){return t?t.declaredClass:null}function j_e(t,e){var f;const r=t.diff;if(r&&typeof r=="function")return r(t,e);const n=Wne(t),i=Wne(e);if(n.length===0&&i.length===0)return;if(!n.length||!i.length||alt(t,e))return{type:"complete",oldValue:t,newValue:e};const s=i.filter(m=>!n.includes(m)),o=n.filter(m=>!i.includes(m)),a=n.filter(m=>i.includes(m)&&iI(t,m)!==iI(e,m)).concat(s,o).sort(),l=F6(t);if(l&&olt.has(l)&&a.length)return{type:"complete",oldValue:t,newValue:e};let u;const d=ZH(t)&&ZH(e);for(const m of a){const v=iI(t,m),b=iI(e,m);let M;if((d||typeof v!="function"&&typeof b!="function")&&v!==b&&(v!=null||b!=null)){if(r&&r[m]&&typeof r[m]=="function")M=(f=r[m])==null?void 0:f.call(r,v,b);else if(v instanceof Date&&b instanceof Date){if(v.getTime()===b.getTime())continue;M={type:"complete",oldValue:v,newValue:b}}else M=typeof v=="object"&&typeof b=="object"&&F6(v)===F6(b)?j_e(v,b):{type:"complete",oldValue:v,newValue:b};M!=null&&(u!=null?u.diff[m]=M:u={type:"partial",diff:{[m]:M}})}}return u}function hLt(t,e){return llt(t,e)}function llt(t,e){if(t==null)return!1;const r=e.split(".");let n=t;for(const i of r){if(n.type==="complete")return!0;if(n.type!=="partial")return!1;{const s=n.diff[i];if(!s)return!1;n=s}}return!0}function dLt(t,e){if(!t)return!1;if(t.type==="partial"){const r=Object.keys(t.diff);return r.length===1&&r[0]===e}return!1}function ult(t,e){if(typeof t!="function"&&typeof e!="function"&&(t!=null||e!=null))return t==null||e==null||typeof t=="object"&&typeof e=="object"&&F6(t)!==F6(e)?{type:"complete",oldValue:t,newValue:e}:j_e(t,e)}let Nx=class extends Fa(qr){constructor(e){super(e),this.value=null,this.value2=null,this.value3=null}};T([B(kL)],Nx.prototype,"value",void 0),T([B(kL)],Nx.prototype,"value2",void 0),T([B(kL)],Nx.prototype,"value3",void 0),Nx=T([_t("esri.renderers.support.UniqueValue")],Nx);const V4=Nx;let Cv=class extends Fa(qr){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.values=null}castValues(e){if(e==null)return null;const r=typeof(e=Array.isArray(e)?e:[e])[0];return r==="string"||r==="number"?e.map(n=>new V4({value:n})):r==="object"?e[0]instanceof V4?e:e.map(n=>new V4(n)):null}};T([B({type:String,json:{write:!0}})],Cv.prototype,"description",void 0),T([B({type:String,json:{write:!0}})],Cv.prototype,"label",void 0),T([B(mO)],Cv.prototype,"symbol",void 0),T([B({type:[V4],json:{type:[[String]],read:{reader:t=>t?t.map(e=>new V4({value:e[0],value2:e[1],value3:e[2]})):null},write:{writer:(t,e)=>{const r=[];for(const n of t){const i=[n.value,n.value2,n.value3].filter(PZ).map(s=>s.toString());r.push(i)}e.values=r}}}})],Cv.prototype,"values",void 0),T([Pl("values")],Cv.prototype,"castValues",null),Cv=T([_t("esri.renderers.support.UniqueValueClass")],Cv);const V_e=Cv;let Zb=class extends Fa(qr){constructor(e){super(e),this.heading=null,this.classes=null}};T([B({type:String,json:{write:!0}})],Zb.prototype,"heading",void 0),T([B({type:[V_e],json:{write:!0}})],Zb.prototype,"classes",void 0),Zb=T([_t("esri.renderers.support.UniqueValueGroup")],Zb);const YH=Zb;var XH;let I3=XH=class extends qr{constructor(t){super(t),this.description=null,this.label=null,this.symbol=null,this.value=null}clone(){return new XH({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){var e;const t=JSON.stringify((e=this.symbol)==null?void 0:e.toJSON());return`${this.value}.${t}`}};T([B({type:String,json:{write:!0}})],I3.prototype,"description",void 0),T([B({type:String,json:{write:!0}})],I3.prototype,"label",void 0),T([B(qX)],I3.prototype,"symbol",void 0),T([B(kL)],I3.prototype,"value",void 0),I3=XH=T([_t("esri.renderers.support.UniqueValueInfo")],I3);const z6=I3,clt=()=>!!Sr("enable-feature:force-wosr"),hlt=()=>Sr.add("enable-feature:direct-3d-object-feature-layer-display",!0,!0,!0),dlt=()=>Sr.add("enable-feature:direct-3d-object-feature-layer-display",!1,!0,!0),flt=()=>Sr.add("enable-i3s-patching",!0,!0,!0),plt=()=>Sr.add("enable-i3s-patching",!1,!0,!0),gLt=()=>!!Sr("enable-feature:SceneLayer-editing"),mlt=(t="i3s-patching")=>{switch(plt(),dlt(),Sr.add("enable-feature:SceneLayer-editing",!0,!0,!0),t){case"feature-layer-view":hlt();break;case"i3s-patching":flt()}};mlt("i3s-patching");let XF={};async function glt(t,e){try{return{data:(await xlt(t,e)).data,baseUrl:QAe(t),styleUrl:t}}catch(r){return q0(r),null}}function ylt(t,e,r){var o;const n=e.portal!=null?e.portal:Fp.getDefault();let i;const s=`${n.url} - ${(o=n.user)==null?void 0:o.username} - ${t}`;return XF[s]||(XF[s]=vlt(t,n,r).then(a=>(i=a,a.fetchData())).then(a=>({data:a,baseUrl:i.itemUrl??"",styleName:t}))),XF[s]}function vlt(t,e,r){return e.load(r).then(()=>{const n=new J0({disableExtraQuery:!0,query:`owner:${Zne} AND type:${Yne} AND typekeywords:"${t}"`});return e.queryItems(n,r)}).then(({results:n})=>{var o;let i=null;const s=t.toLowerCase();if(n&&Array.isArray(n)){for(const a of n)if(((o=a.typeKeywords)==null?void 0:o.some(u=>u.toLowerCase()===s))&&a.type===Yne&&a.owner===Zne){i=a;break}}if(!i)throw new Pr("symbolstyleutils:style-not-found",`The style '${t}' could not be found`,{styleName:t});return i.load(r)})}function _lt(t,e,r){return(t==null?void 0:t.styleUrl)!=null?glt(t.styleUrl,r):(t==null?void 0:t.styleName)!=null?ylt(t.styleName,e,r):Promise.reject(new Pr("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function yLt(t){return t===null||t.type==="CIMSymbolReference"?t:{type:"CIMSymbolReference",symbol:t}}function vLt(t,e,r=["gltf"]){if(e==="cimRef")return encodeURI(t.cimRef);if(t.formatInfos&&!clt())for(const n of r){const i=t.formatInfos.find(s=>s.type===n);if(i)return i.href}return encodeURI(t.webRef)}function xlt(t,e){const r={responseType:"json",query:{f:"json"},...e};return sa(Lp(t),r)}const Zne="esri_en",Yne="Style",_Lt="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json";var Yb;const U_e="esri.renderers.UniqueValueRenderer",Xy=()=>li.getLogger(U_e),Xne="uvInfos-watcher",Jne="uvGroups-watcher",wlt=",",blt=gc(z6);function Clt(t){const{field1:e,field2:r,field3:n,fieldDelimiter:i,uniqueValueInfos:s,valueExpression:o}=t,a=!(!e||!r);return[{classes:(s??[]).map(l=>{var I;const{symbol:u,label:d,value:f,description:m}=l,[v,b,M]=a?((I=f==null?void 0:f.toString())==null?void 0:I.split(i||""))||[]:[f],O=[];return(e||o)&&O.push(v),r&&O.push(b),n&&O.push(M),{symbol:u,label:d,values:[O],description:m}})}]}let Wa=Yb=class extends f7(gy){constructor(t){super(t),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,r){if(!e&&!r)return;if(!e||!r)return{type:"complete",oldValue:e,newValue:r};let n=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let s=0;sa.value===r[s].value);o?ult(o,r[s])?(i.changed.push({type:"complete",oldValue:o,newValue:r[s]}),n=!0):i.unchanged.push({oldValue:o,newValue:r[s]}):(i.added.push(r[s]),n=!0)}for(let s=0;so.value===e[s].value)||(i.removed.push(e[s]),n=!0);return n?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(t){this._set("field",t),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(t){return t==null||typeof t=="function"?t:jS(t)}writeField(t,e,r,n){typeof t=="string"?e[r]=t:n!=null&&n.messages?n.messages.push(new Pr("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):Xy().error(".field: cannot write field to JSON since it's not a string value")}set field2(t){this._set("field2",t),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(t){this._set("field3",t),this._updateUniqueValues()}set valueExpression(t){this._set("valueExpression",t),this._updateUniqueValues()}set defaultSymbol(t){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",t)}set fieldDelimiter(t){this._set("fieldDelimiter",t),this._updateUniqueValues()}readPortal(t,e,r){return r.portal||Fp.getDefault()}readStyleOrigin(t,e,r){if(e.styleName)return Object.freeze({styleName:e.styleName});if(e.styleUrl){const n=l7(e.styleUrl,r);return Object.freeze({styleUrl:n})}}writeStyleOrigin(t,e,r,n){t.styleName?e.styleName=t.styleName:t.styleUrl&&(e.styleUrl=lE(t.styleUrl,n))}set uniqueValueGroups(t){this.styleOrigin?Xy().error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",t),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(t){this.styleOrigin?Xy().error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",t),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(t,e){var n;if(this.styleOrigin)return void Xy().error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let r;r=typeof t=="object"?blt(t):new z6({value:t,symbol:W2e(e)}),(n=this.uniqueValueInfos)==null||n.push(r),this._valueInfoMap[r.value]=r,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(t){if(this.styleOrigin)return void Xy().error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const e=this.uniqueValueInfos;if(e)for(let r=0;rt+e.getAttributeHash(),"")}getMeshHash(){var n;const t=JSON.stringify(this.backgroundFillSymbol),e=JSON.stringify(this.defaultSymbol),r=(n=this.uniqueValueInfos)==null?void 0:n.reduce((i,s)=>i+s.getMeshHash(),"");return`${t}.${e}.${r}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`}clone(){const t=new Yb({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:Qt(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:Qt(this.visualVariables),legendOptions:Qt(this.legendOptions),authoringInfo:Qt(this.authoringInfo),backgroundFillSymbol:Qt(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(t._isDefaultSymbolDerived=!0),t._set("portal",this.portal);const e=Qt(this.uniqueValueInfos),r=Qt(this.uniqueValueGroups);return this.styleOrigin&&(t._set("styleOrigin",Object.freeze(Qt(this.styleOrigin))),Object.freeze(e),Object.freeze(r)),t._set("uniqueValueInfos",e),t._updateValueInfoMap(),t._set("uniqueValueGroups",r),t._isInfosSource=this._isInfosSource,t._watchUniqueValueInfosAndGroups(),t}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(t,e){const r=[this.collectVVRequiredFields(t,e),this.collectSymbolFields(t,e)];await Promise.all(r)}async collectSymbolFields(t,e){const r=[...this.getSymbols().map(n=>n.collectRequiredFields(t,e)),o0(t,e,this.valueExpression)];$f(t,e,this.field),$f(t,e,this.field2),$f(t,e,this.field3),await Promise.all(r)}populateFromStyle(){return _lt(this.styleOrigin,{portal:this.portal}).then(t=>{var r;const e=[];return this._valueInfoMap={},t!=null&&t.data&&Array.isArray(t.data.items)&&t.data.items.forEach(n=>{const i=new X5({styleUrl:t.styleUrl,styleName:t.styleName,portal:this.portal,name:n.name});this.defaultSymbol||n.name!==t.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const s=new z6({value:n.name,symbol:i});e.push(s),this._valueInfoMap[n.name]=s}),this._set("uniqueValueInfos",Object.freeze(e)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&((r=this.uniqueValueInfos)!=null&&r.length)&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",wlt)}_updateUniqueValues(){this._isInfosSource!=null&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:t}=this;if(t)for(const e of t)this._valueInfoMap[e.value+""]=e}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(Xne);const{uniqueValueInfos:t}=this;if(t){const e=[];for(const r of t)e.push(d2(()=>({symbol:r.symbol,value:r.value,label:r.label,description:r.description}),(n,i)=>{n!==i&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(e,Xne)}}_watchUniqueValueGroups(){this.removeHandles(Jne);const{uniqueValueGroups:t}=this;if(t){const e=[];for(const r of t){e.push(d2(()=>({classes:r.classes}),(n,i)=>{n!==i&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const n of r.classes??[])e.push(d2(()=>({symbol:n.symbol,values:n.values,label:n.label,description:n.description}),(i,s)=>{i!==s&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(e,Jne)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const t=[],{field:e,field2:r,field3:n,fieldDelimiter:i,uniqueValueGroups:s,valueExpression:o}=this;if(!e&&!o)return this._set("uniqueValueInfos",t),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const a=!(!e||!r);for(const l of s)for(const u of l.classes??[]){const{symbol:d,label:f,values:m,description:v}=u;for(const b of m??[]){const{value:M,value2:O,value3:I}=b,A=[M];r&&A.push(O),n&&A.push(I);const j=a?A.join(i||""):A[0]??void 0;t.push(new z6({symbol:d,label:f,value:j,description:v}))}}this._set("uniqueValueInfos",t),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(t=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:e,field2:r,valueExpression:n,fieldDelimiter:i,uniqueValueInfos:s}=this;if(!e&&!n||!s.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const o=!(!e||!r),a=s.map(u=>{var I;const{symbol:d,label:f,value:m,description:v}=u,[b,M,O]=o?((I=m==null?void 0:m.toString())==null?void 0:I.split(i||""))||[]:[m];return new V_e({symbol:d,label:f,description:v,values:[new V4({value:b,value2:M,value3:O})]})}),l=[new YH({classes:a})];t&&Object.freeze(l),this._set("uniqueValueGroups",l),this._watchUniqueValueGroups()}_getUniqueValueInfo(t,e){return this.valueExpression?this._getUnqiueValueInfoForExpression(t,e):this._getUnqiueValueInfoForFields(t)}_getUnqiueValueInfoForExpression(t,e){const{viewingMode:r,scale:n,spatialReference:i,arcade:s,timeZone:o}=e??{};let a=this._cache.compiledFunc;const l=s.arcadeUtils;if(!a){const d=l.createSyntaxTree(this.valueExpression);a=l.createFunction(d),this._cache.compiledFunc=a}const u=l.executeFunction(a,l.createExecContext(t,l.getViewInfo({viewingMode:r,scale:n,spatialReference:i}),o));return this._valueInfoMap[u+""]}_getUnqiueValueInfoForFields(t){const e=this.field,r=t.attributes;let n;if(this.field2){const i=this.field2,s=this.field3,o=[];e&&o.push(r[e]),i&&o.push(r[i]),s&&o.push(r[s]),n=o.join(this.fieldDelimiter||"")}else e&&(n=r[e]);return this._valueInfoMap[n+""]}static fromPortalStyle(t,e){const r=new Yb(e==null?void 0:e.properties);r._set("styleOrigin",Object.freeze({styleName:t})),r._set("portal",(e==null?void 0:e.portal)||Fp.getDefault());const n=r.populateFromStyle();return n.catch(i=>{Xy().error(`#fromPortalStyle('${t}'[, ...])`,"Failed to create unique value renderer from style name",i)}),n}static fromStyleUrl(t,e){const r=new Yb(e==null?void 0:e.properties);r._set("styleOrigin",Object.freeze({styleUrl:t}));const n=r.populateFromStyle();return n.catch(i=>{Xy().error(`#fromStyleUrl('${t}'[, ...])`,"Failed to create unique value renderer from style URL",i)}),n}};T([B({readOnly:!0})],Wa.prototype,"_cache",null),T([ji({uniqueValue:"unique-value"})],Wa.prototype,"type",void 0),T([B(u_e)],Wa.prototype,"backgroundFillSymbol",void 0),T([B({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],Wa.prototype,"field",null),T([Pl("field")],Wa.prototype,"castField",null),T([On("field")],Wa.prototype,"writeField",null),T([B({type:String,value:null,json:{write:!0}})],Wa.prototype,"field2",null),T([B({type:String,value:null,json:{write:!0}})],Wa.prototype,"field3",null),T([B({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],Wa.prototype,"orderByClassesEnabled",void 0),T([B({type:String,value:null,json:{write:!0}})],Wa.prototype,"valueExpression",null),T([B({type:String,json:{write:!0}})],Wa.prototype,"valueExpressionTitle",void 0),T([B({type:j4,json:{write:!0}})],Wa.prototype,"legendOptions",void 0),T([B({type:String,json:{write:!0}})],Wa.prototype,"defaultLabel",void 0),T([B(BZ({...mO},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],Wa.prototype,"defaultSymbol",null),T([B({type:String,value:null,json:{write:!0}})],Wa.prototype,"fieldDelimiter",null),T([B({type:Fp,readOnly:!0})],Wa.prototype,"portal",void 0),T([un("portal",["styleName"])],Wa.prototype,"readPortal",null),T([B({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],Wa.prototype,"styleOrigin",void 0),T([un("styleOrigin",["styleName","styleUrl"])],Wa.prototype,"readStyleOrigin",null),T([On("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],Wa.prototype,"writeStyleOrigin",null),T([B({type:[YH],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(t,e,r)=>(e.uniqueValueGroups||Clt(e)).map(n=>YH.fromJSON(n,r))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],Wa.prototype,"uniqueValueGroups",null),T([B({type:[z6],json:{read:!1,write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],Wa.prototype,"uniqueValueInfos",null),Wa=Yb=T([_t(U_e)],Wa);const QX=Wa,yO={key:"type",base:gy,typeMap:{heatmap:B_e,simple:m7,"unique-value":QX,"class-breaks":h_e,"dot-density":rlt,dictionary:elt,"pie-chart":slt},errorContext:"renderer"},Slt={key:"type",base:gy,typeMap:{simple:m7,"unique-value":QX,"class-breaks":h_e,heatmap:B_e},errorContext:"renderer",validate:Elt};function Elt(t){switch(t.type){case"simple":return Mlt(t);case"unique-value":return Tlt(t);case"class-breaks":return Ilt(t);case"heatmap":return t}}function Mlt(t){if(t.symbol)return t;li.getLogger("esri.renderers.support.types").error("Removed invalid 'simple' renderer without a symbol from web scene.")}function Tlt(t){const e=t.uniqueValueInfos,r=e==null?void 0:e.filter(({symbol:n,label:i},s)=>(n||li.getLogger("esri.renderers.support.types").error(`Removed invalid unique value info ([${s}] ${i}) without a symbol from web scene.`),!!n));return(r==null?void 0:r.length)!==(e==null?void 0:e.length)&&(t.uniqueValueInfos=r),t}function Ilt(t){const e=t.classBreakInfos,r=e==null?void 0:e.filter(({symbol:n,label:i},s)=>(n||li.getLogger("esri.renderers.support.types").error(`Removed invalid class break info ([${s}] ${i}) without a symbol from web scene.`),!!n));return(r==null?void 0:r.length)!==(e==null?void 0:e.length)&&(t.classBreakInfos=r),t}function xLt(t,e){return WC(t,null,e)}const Rlt=Xw({types:yO});function WC(t,e,r){return t?t&&(t.styleName||t.styleUrl)&&t.type!=="uniqueValue"?(r!=null&&r.messages&&r.messages.push(new cm("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+t.type+"'",{definition:t,context:r})),null):Rlt(t,e,r):null}let Llt=class H_e{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(Jj),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const r=new H_e,n=this._originStores[qs.DEFAULTS];n&&n.forEach((i,s)=>{r.set(s,Qt(i),qs.DEFAULTS)});for(let i=qs.SERVICE;i{e&&e.has(a)||r.set(a,Qt(o),i)})}return r}get(e,r){const n=r===void 0?this._values:this._originStores[r];return n?n.get(e):void 0}keys(e){const r=e==null?this._values:this._originStores[e];return r?[...r.keys()]:[]}set(e,r,n=qs.USER){let i=this._originStores[n];if(i||(i=new Map,this._originStores[n]=i),i.set(e,r),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,n),s!==r}return!1}delete(e,r=qs.USER){const n=this._originStores[r];if(!n)return;const i=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===r){this._values.delete(e);for(let s=r-1;s>=0;s--){const o=this._originStores[s];if(o&&o.has(e)){this._values.set(e,o.get(e)),this._propertyOriginMap.set(e,s);break}}}return i}has(e,r){const n=r===void 0?this._values:this._originStores[r];return!!n&&n.has(e)}revert(e,r){for(;r>0&&!this.has(e,r);)--r;const n=this._originStores[r],i=n==null?void 0:n.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,r),s!==i}originOf(e){return this._propertyOriginMap.get(e)||qs.DEFAULTS}forEach(e){this._values.forEach(e)}};const G_e=t=>{let e=class extends t{constructor(...r){super(...r);const n=md(this),i=n.store,s=new Llt;n.store=s,W1e(n,i,s)}read(r,n){Y1e(this,r,n)}getAtOrigin(r,n){const i=JF(this),s=Gv(n);if(typeof r=="string")return i.get(r,s);const o={};return r.forEach(a=>{o[a]=i.get(a,s)}),o}originOf(r){return qk(this.originIdOf(r))}originIdOf(r){return JF(this).originOf(r)}revert(r,n){const i=JF(this),s=Gv(n),o=md(this);let a;a=typeof r=="string"?r==="*"?i.keys(s):[r]:r,a.forEach(l=>{o.invalidate(l),i.revert(l,s),o.commit(l)})}};return e=T([_t("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function JF(t){return md(t).store}let Kne=class extends G_e(Iu){};Kne=T([_t("esri.core.ReadOnlyMultiOriginJSONSupport")],Kne);const klt=t=>{let e=class extends t{constructor(...r){super(...r)}clear(r,n="user"){return KF(this).delete(r,Gv(n))}write(r,n){return J1e(this,r=r||{},n),r}setAtOrigin(r,n,i){md(this).setAtOrigin(r,n,Gv(i))}removeOrigin(r){const n=KF(this),i=Gv(r),s=n.keys(i);for(const o of s)n.originOf(o)===i&&n.set(o,n.get(o,i),qs.USER)}updateOrigin(r,n){const i=KF(this),s=Gv(n),o=R2(this,r);for(let a=s+1;a{let e=class extends klt(G_e(t)){constructor(...r){super(...r)}};return e=T([_t("esri.core.MultiOriginJSONSupport")],e),e};let Qne=class extends q_e(Iu){};Qne=T([_t("esri.core.MultiOriginJSONSupport")],Qne);const mc=(t=>t)(["operational-layers","basemap","ground"]);var JH;let R3=JH=class extends qr{constructor(t){super(t),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new JH({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};T([B({type:String,json:{write:!0}})],R3.prototype,"expression",void 0),T([B({type:String,json:{write:!0}})],R3.prototype,"name",void 0),T([B({type:["boolean","date","number","string"],json:{write:!0}})],R3.prototype,"returnType",void 0),T([B({type:String,json:{write:!0}})],R3.prototype,"title",void 0),R3=JH=T([_t("esri.form.ExpressionInfo")],R3);const Alt=R3;let L3=class extends qr{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};T([B({type:String,json:{write:!0}})],L3.prototype,"description",void 0),T([B({type:String,json:{write:!0}})],L3.prototype,"label",void 0),T([B()],L3.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],L3.prototype,"visibilityExpression",void 0),L3=T([_t("esri.form.elements.Element")],L3);const I5=L3;var KH;let FL=KH=class extends qr{constructor(t){super(t),this.type=null}clone(){return new KH({type:this.type})}};T([B({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],FL.prototype,"type",void 0),FL=KH=T([_t("esri.form.elements.inputs.AttachmentInput")],FL);const Plt=FL;var QH;let k3=QH=class extends I5{constructor(t){super(t),this.attachmentKeyword=null,this.editableExpression=null,this.input=null,this.type="attachment"}clone(){return new QH({attachmentKeyword:this.attachmentKeyword,description:this.description,editableExpression:this.editableExpression,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};T([B({type:String,json:{write:!0}})],k3.prototype,"attachmentKeyword",void 0),T([B({type:String,json:{write:!0}})],k3.prototype,"editableExpression",void 0),T([B({type:Plt,json:{read:{source:"inputType"},write:{target:"inputType"}}})],k3.prototype,"input",void 0),T([B({type:["attachment"],json:{read:!1,write:!0}})],k3.prototype,"type",void 0),k3=QH=T([_t("esri.form.elements.AttachmentElement")],k3);const eie=k3;let zL=class extends qr{constructor(e){super(e),this.type=null}};T([B()],zL.prototype,"type",void 0),zL=T([_t("esri.form.elements.inputs.Input")],zL);const yy=zL;let Xb=class extends yy{constructor(e){super(e),this.maxLength=null,this.minLength=0}};T([B({type:Number,json:{write:!0}})],Xb.prototype,"maxLength",void 0),T([B({type:Number,json:{write:!0}})],Xb.prototype,"minLength",void 0),Xb=T([_t("esri.form.elements.inputs.TextInput")],Xb);const eJ=Xb;var eG;let BL=eG=class extends eJ{constructor(t){super(t),this.type="barcode-scanner"}clone(){return new eG({maxLength:this.maxLength,minLength:this.minLength})}};T([B({type:["barcode-scanner"],json:{read:!1,write:!0}})],BL.prototype,"type",void 0),BL=eG=T([_t("esri.form.elements.inputs.BarcodeScannerInput")],BL);const $lt=BL;var tG;let Dx=tG=class extends yy{constructor(t){super(t),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new tG({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};T([B({type:String,json:{write:!0}})],Dx.prototype,"noValueOptionLabel",void 0),T([B({type:Boolean,json:{write:!0}})],Dx.prototype,"showNoValueOption",void 0),T([B({type:["combo-box"],json:{read:!1,write:!0}})],Dx.prototype,"type",void 0),Dx=tG=T([_t("esri.form.elements.inputs.ComboBoxInput")],Dx);const Olt=Dx;var rG;function tie(t){return t??null}function rie(t){return t??null}let F0=rG=class extends yy{constructor(t){super(t),this.max=null,this.min=null,this.type="date-picker"}readMax(t,e){return tie(e.max)}writeMax(t,e){e.max=rie(t)}readMin(t,e){return tie(e.min)}writeMin(t,e){e.min=rie(t)}clone(){return new rG({max:this.max,min:this.min})}};T([B({type:String,json:{type:String,write:!0}})],F0.prototype,"max",void 0),T([un("max")],F0.prototype,"readMax",null),T([On("max")],F0.prototype,"writeMax",null),T([B({type:String,json:{type:String,write:!0}})],F0.prototype,"min",void 0),T([un("min")],F0.prototype,"readMin",null),T([On("min")],F0.prototype,"writeMin",null),T([B({type:["date-picker"],json:{read:!1,write:!0}})],F0.prototype,"type",void 0),F0=rG=T([_t("esri.form.elements.inputs.DatePickerInput")],F0);const Nlt=F0;var nG;function QF(t){return t??null}function ez(t){return t??null}let Ld=nG=class extends yy{constructor(t){super(t),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(t,e){return QF(e.max)}writeMax(t,e){e.max=ez(t)}readMin(t,e){return QF(e.min)}writeMin(t,e){e.min=ez(t)}readTimeResolution(t,e){return QF(e.timeResolution)}writeTimeResolution(t,e){e.timeResolution=ez(t)}clone(){return new nG({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};T([B({type:Boolean,json:{write:!0}})],Ld.prototype,"includeTimeOffset",void 0),T([B({type:String,json:{type:String,write:!0}})],Ld.prototype,"max",void 0),T([un("max")],Ld.prototype,"readMax",null),T([On("max")],Ld.prototype,"writeMax",null),T([B({type:String,json:{type:String,write:!0}})],Ld.prototype,"min",void 0),T([un("min")],Ld.prototype,"readMin",null),T([On("min")],Ld.prototype,"writeMin",null),T([B({type:String,json:{type:String,write:!0}})],Ld.prototype,"timeResolution",void 0),T([un("timeResolution")],Ld.prototype,"readTimeResolution",null),T([On("timeResolution")],Ld.prototype,"writeTimeResolution",null),T([B({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],Ld.prototype,"type",void 0),Ld=nG=T([_t("esri.form.elements.inputs.DateTimeOffsetPickerInput")],Ld);const Dlt=Ld;var iG;function nie(t){return t!=null?new Date(t):null}function iie(t){return t?t.getTime():null}let M1=iG=class extends yy{constructor(t){super(t),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(t,e){return nie(e.max)}writeMax(t,e){e.max=iie(t)}readMin(t,e){return nie(e.min)}writeMin(t,e){e.min=iie(t)}clone(){return new iG({includeTime:this.includeTime,max:this.max,min:this.min})}};T([B({type:Boolean,json:{write:!0}})],M1.prototype,"includeTime",void 0),T([B({type:Date,json:{type:Number,write:!0}})],M1.prototype,"max",void 0),T([un("max")],M1.prototype,"readMax",null),T([On("max")],M1.prototype,"writeMax",null),T([B({type:Date,json:{type:Number,write:!0}})],M1.prototype,"min",void 0),T([un("min")],M1.prototype,"readMin",null),T([On("min")],M1.prototype,"writeMin",null),T([B({type:["datetime-picker"],json:{read:!1,write:!0}})],M1.prototype,"type",void 0),M1=iG=T([_t("esri.form.elements.inputs.DateTimePickerInput")],M1);const Flt=M1;var sG;let Fx=sG=class extends yy{constructor(t){super(t),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new sG({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};T([B({type:String,json:{write:!0}})],Fx.prototype,"noValueOptionLabel",void 0),T([B({type:Boolean,json:{write:!0}})],Fx.prototype,"showNoValueOption",void 0),T([B({type:["radio-buttons"],json:{read:!1,write:!0}})],Fx.prototype,"type",void 0),Fx=sG=T([_t("esri.form.elements.inputs.RadioButtonsInput")],Fx);const zlt=Fx;var oG;let zx=oG=class extends yy{constructor(t){super(t),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new oG({offValue:this.offValue,onValue:this.onValue})}};T([B({type:[String,Number],json:{write:!0}})],zx.prototype,"offValue",void 0),T([B({type:[String,Number],json:{write:!0}})],zx.prototype,"onValue",void 0),T([B({type:["switch"],json:{read:!1,write:!0}})],zx.prototype,"type",void 0),zx=oG=T([_t("esri.form.elements.inputs.SwitchInput")],zx);const Blt=zx;var aG;let jL=aG=class extends eJ{constructor(t){super(t),this.type="text-area"}clone(){return new aG({maxLength:this.maxLength,minLength:this.minLength})}};T([B({type:["text-area"],json:{read:!1,write:!0}})],jL.prototype,"type",void 0),jL=aG=T([_t("esri.form.elements.inputs.TextAreaInput")],jL);const jlt=jL;var lG;let VL=lG=class extends eJ{constructor(t){super(t),this.type="text-box"}clone(){return new lG({maxLength:this.maxLength,minLength:this.minLength})}};T([B({type:["text-box"],json:{read:!1,write:!0}})],VL.prototype,"type",void 0),VL=lG=T([_t("esri.form.elements.inputs.TextBoxInput")],VL);const Vlt=VL;var uG;function tz(t){return t??null}function rz(t){return t??null}let yf=uG=class extends yy{constructor(t){super(t),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(t,e){return tz(e.max)}writeMax(t,e){e.max=rz(t)}readMin(t,e){return tz(e.min)}writeMin(t,e){e.min=rz(t)}readTimeResolution(t,e){return tz(e.timeResolution)}writeTimeResolution(t,e){e.timeResolution=rz(t)}clone(){return new uG({max:this.max,min:this.min,timeResolution:this.timeResolution})}};T([B({type:String,json:{type:String,write:!0}})],yf.prototype,"max",void 0),T([un("max")],yf.prototype,"readMax",null),T([On("max")],yf.prototype,"writeMax",null),T([B({type:String,json:{type:String,write:!0}})],yf.prototype,"min",void 0),T([un("min")],yf.prototype,"readMin",null),T([On("min")],yf.prototype,"writeMin",null),T([B({type:String,json:{type:String,write:!0}})],yf.prototype,"timeResolution",void 0),T([un("timeResolution")],yf.prototype,"readTimeResolution",null),T([On("timeResolution")],yf.prototype,"writeTimeResolution",null),T([B({type:["time-picker"],json:{read:!1,write:!0}})],yf.prototype,"type",void 0),yf=uG=T([_t("esri.form.elements.inputs.TimePickerInput")],yf);const Ult=yf,Hlt={base:yy,key:"type",typeMap:{"barcode-scanner":$lt,"combo-box":Olt,"date-picker":Nlt,"datetime-picker":Flt,"datetimeoffset-picker":Dlt,"radio-buttons":zlt,switch:Blt,"text-area":jlt,"text-box":Vlt,"time-picker":Ult}};var cG;let Jb=cG=class extends qr{constructor(t){super(t),this.name=null,this.code=null}clone(){return new cG({name:this.name,code:this.code})}};T([B({type:String,json:{write:!0}})],Jb.prototype,"name",void 0),T([B({type:[String,Number],json:{write:!0}})],Jb.prototype,"code",void 0),Jb=cG=T([_t("esri.layers.support.CodedValue")],Jb);const Glt=new ro({inherited:"inherited",codedValue:"coded-value",range:"range"});let Kb=class extends qr{constructor(e){super(e),this.name=null,this.type=null}};T([B({type:String,json:{write:!0}})],Kb.prototype,"name",void 0),T([ji(Glt)],Kb.prototype,"type",void 0),Kb=T([_t("esri.layers.support.Domain")],Kb);const vO=Kb;var hG;let Qb=hG=class extends vO{constructor(t){super(t),this.codedValues=null,this.type="coded-value"}getName(t){let e=null;if(this.codedValues){const r=String(t);this.codedValues.some(n=>(String(n.code)===r&&(e=n.name),!!e))}return e}clone(){return new hG({codedValues:Qt(this.codedValues),name:this.name})}};T([B({type:[Jb],json:{write:!0}})],Qb.prototype,"codedValues",void 0),T([ji({codedValue:"coded-value"})],Qb.prototype,"type",void 0),Qb=hG=T([_t("esri.layers.support.CodedValueDomain")],Qb);const W_e=Qb;var dG;let UL=dG=class extends vO{constructor(t){super(t),this.type="inherited"}clone(){return new dG}};T([ji({inherited:"inherited"})],UL.prototype,"type",void 0),UL=dG=T([_t("esri.layers.support.InheritedDomain")],UL);const Z_e=UL;var fG;let Bx=fG=class extends vO{constructor(t){super(t),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new fG({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};T([B({json:{type:[Number],read:{source:"range",reader:(t,e)=>{var r;return(r=e.range)==null?void 0:r[1]}},write:{enabled:!1,overridePolicy(){return{enabled:this.maxValue!=null&&this.minValue==null}},target:"range",writer(t,e,r){e[r]=[this.minValue||0,t]}}}})],Bx.prototype,"maxValue",void 0),T([B({json:{type:[Number],read:{source:"range",reader:(t,e)=>{var r;return(r=e.range)==null?void 0:r[0]}},write:{target:"range",writer(t,e,r){e[r]=[t,this.maxValue||0]}}}})],Bx.prototype,"minValue",void 0),T([ji({range:"range"})],Bx.prototype,"type",void 0),Bx=fG=T([_t("esri.layers.support.RangeDomain")],Bx);const Y_e=Bx,X_e={key:"type",base:vO,typeMap:{range:Y_e,"coded-value":W_e,inherited:Z_e}};function _O(t){if(!(t!=null&&t.type))return null;switch(t.type){case"range":return Y_e.fromJSON(t);case"codedValue":return W_e.fromJSON(t);case"inherited":return Z_e.fromJSON(t)}return null}var pG;let hp=pG=class extends I5{constructor(t){super(t),this.domain=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}get editable(){return this._get("editable")??!0}set editable(t){this._set("editable",t)}clone(){return new pG({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};T([B({types:X_e,json:{read:{reader:_O},write:!0}})],hp.prototype,"domain",void 0),T([B({type:Boolean,json:{write:!0}})],hp.prototype,"editable",null),T([B({type:String,json:{write:!0}})],hp.prototype,"editableExpression",void 0),T([B({type:String,json:{write:!0}})],hp.prototype,"fieldName",void 0),T([B({type:String,json:{write:!0}})],hp.prototype,"hint",void 0),T([B({types:Hlt,json:{read:{source:"inputType"},write:{target:"inputType"}}})],hp.prototype,"input",void 0),T([B({type:String,json:{write:!0}})],hp.prototype,"requiredExpression",void 0),T([B({type:String,json:{read:!1,write:!0}})],hp.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],hp.prototype,"valueExpression",void 0),hp=pG=T([_t("esri.form.elements.FieldElement")],hp);const sie=hp;var mG;let mg=mG=class extends I5{constructor(t){super(t),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new mG({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:Qt(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};T([B({type:Number,json:{write:!0}})],mg.prototype,"displayCount",void 0),T([B({type:["list"],json:{write:!0}})],mg.prototype,"displayType",void 0),T([B({type:String,json:{write:!0}})],mg.prototype,"editableExpression",void 0),T([B({type:[CX],json:{write:!0}})],mg.prototype,"orderByFields",void 0),T([B({type:Number,json:{write:!0}})],mg.prototype,"relationshipId",void 0),T([B({type:["relationship"],json:{read:!1,write:!0}})],mg.prototype,"type",void 0),mg=mG=T([_t("esri.form.elements.RelationshipElement")],mg);const oie=mg;var gG;let jx=gG=class extends I5{constructor(t){super(t),this.text=null,this.textFormat="plain-text",this.type="text"}clone(){return new gG({text:this.text,textFormat:this.textFormat,visibilityExpression:this.visibilityExpression})}};T([B({type:String,json:{write:!0}})],jx.prototype,"text",void 0),T([B({type:String,json:{write:!0}})],jx.prototype,"textFormat",void 0),T([B({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],jx.prototype,"type",void 0),jx=gG=T([_t("esri.form.elements.TextElement")],jx);const aie=jx;function J_e(t){return{typesWithGroup:{base:I5,key:"type",typeMap:{attachment:eie,field:sie,group:t,relationship:oie,text:aie}},typesWithoutGroup:{base:I5,key:"type",typeMap:{attachment:eie,field:sie,relationship:oie,text:aie}}}}function K_e(t,e,r=!0){if(!t)return null;const n=r?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(i=>n[i.type]).map(i=>n[i.type].fromJSON(i))}function Q_e(t,e,r=!0){if(!t)return null;const n=r?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(i=>n[i.type]).map(i=>i.toJSON())}function e3e(t,e,r=!0){return t?t.map(n=>um(r?e.typesWithGroup:e.typesWithoutGroup,n)):null}var yG;let j0=yG=class extends I5{constructor(t){super(t),this.elements=null,this.initialState="expanded",this.type="group"}castElements(t){return e3e(t,nz,!1)}readElements(t,e){return K_e(e.formElements,nz,!1)}writeElements(t,e){e.formElements=Q_e(t,nz,!1)}clone(){return new yG({description:this.description,elements:Qt(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};T([B({json:{write:!0}})],j0.prototype,"elements",void 0),T([Pl("elements")],j0.prototype,"castElements",null),T([un("elements",["formElements"])],j0.prototype,"readElements",null),T([On("elements")],j0.prototype,"writeElements",null),T([B({type:["collapsed","expanded"],json:{write:!0}})],j0.prototype,"initialState",void 0),T([B({type:String,json:{read:!1,write:!0}})],j0.prototype,"type",void 0),j0=yG=T([_t("esri.form.elements.GroupElement")],j0);const nz=J_e(j0),qlt=j0,Wlt=t=>t.type==="field",Zlt=t=>t.type==="group",Ylt=t=>t.type==="text";var vG;const iz=J_e(qlt);let T1=vG=class extends qr{constructor(t){super(t),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(t){return e3e(t,iz)}readElements(t,e){return K_e(e.formElements,iz)}writeElements(t,e){e.formElements=Q_e(t,iz)}clone(){return new vG({description:this.description,expressionInfos:Qt(this.expressionInfos),elements:Qt(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}async getFieldsUsed(t,e){const r=new Set,{description:n,elements:i,expressionInfos:s,title:o}=this;if(B6(r,t,n),B6(r,t,o),!i)return[];const a=Xlt(i,s).map(l=>o0(r,t,l));await Promise.all(a);for(const l of i)t3e(r,{fieldsIndex:t,relationships:e},l);return Array.from(r).sort()}};function t3e(t,e,r){var i;const{fieldsIndex:n}=e;if(!n||n.fields.length!==t.size)switch(B6(t,n,r.label),B6(t,n,r.description),r.type){case"field":$f(t,n,r.fieldName);break;case"group":r.elements.forEach(s=>t3e(t,e,s));break;case"relationship":if(e.relationships){const s=e.relationships.find(o=>o.id===r.relationshipId);s&&$f(t,n,s.keyField)}lO(t,n,(i=r.orderByFields)==null?void 0:i.map(s=>s.field));break;case"text":B6(t,n,r.text)}}function Xlt(t,e){if(!e||e.length===0)return[];const r=r3e(t),n=[];for(const i of e)r.has(i.name)&&n.push(i.expression);return n}function r3e(t){const e=new Set;for(const r of t)if(ate(e,r.visibilityExpression),!Ylt(r)){if(Zlt(r))Jk(e,r3e(r.elements));else if(ate(e,r.editableExpression),Wlt(r)){const{requiredExpression:n,valueExpression:i}=r;Jk(e,[n,i])}}return e}function B6(t,e,r){lO(t,e,n2e(r))}T([B({type:String,json:{write:!0}})],T1.prototype,"description",void 0),T([B({json:{write:!0}})],T1.prototype,"elements",void 0),T([Pl("elements")],T1.prototype,"castElements",null),T([un("elements",["formElements"])],T1.prototype,"readElements",null),T([On("elements")],T1.prototype,"writeElements",null),T([B({type:[Alt],json:{write:!0}})],T1.prototype,"expressionInfos",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],T1.prototype,"preserveFieldValuesWhenHidden",void 0),T([B({type:String,json:{write:!0}})],T1.prototype,"title",void 0),T1=vG=T([_t("esri.form.FormTemplate")],T1);const Jlt=T1,lie={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function sz(t,e,r,n=L2){const i=new Nf(pY(n)),s=vs.fromJSDate(t,{zone:i}),o=r==="decades"||r==="centuries"?"year":i3e(r);return r==="decades"&&(e*=10),r==="centuries"&&(e*=100),s.plus({[o]:e}).toJSDate()}function TLt(t,e,r="milliseconds"){const n=t.getTime(),i=n3e(e,r,"milliseconds");return new Date(n+i)}function uie(t,e,r=L2){const n=new Nf(pY(r)),i=vs.fromJSDate(t,{zone:n});if(e==="decades"||e==="centuries"){const o=i.startOf("year"),{year:a}=o,l=a-a%(e==="decades"?10:100);return o.set({year:l}).toJSDate()}const s=i3e(e);return i.startOf(s).toJSDate()}function n3e(t,e,r){return t===0?0:t*lie[e]/lie[r]}function i3e(t){switch(t){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}var dp;let _f=dp=class extends qr{static get allTime(){return cie}static get empty(){return Klt}static fromArray(t){return new dp({start:t[0]!=null?new Date(t[0]):t[0],end:t[1]!=null?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return e.end!=null?new Date(e.end):null}writeEnd(t,e){e.end=(t==null?void 0:t.getTime())??null}get isAllTime(){return this.equals(dp.allTime)}get isEmpty(){return this.equals(dp.empty)}readStart(t,e){return e.start!=null?new Date(e.start):null}writeStart(t,e){e.start=(t==null?void 0:t.getTime())??null}clone(){return new dp({end:this.end,start:this.start})}equals(t){var s,o,a,l;if(!t)return!1;const e=((s=this.start)==null?void 0:s.getTime())??this.start,r=((o=this.end)==null?void 0:o.getTime())??this.end,n=((a=t.start)==null?void 0:a.getTime())??t.start,i=((l=t.end)==null?void 0:l.getTime())??t.end;return e===n&&r===i}expandTo(t,e=L2){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=uie(r,t,e));let n=this.end;if(n){const i=uie(n,t,e);n=n.getTime()===i.getTime()?i:sz(i,1,t,e)}return new dp({start:r,end:n})}intersection(t){var a,l,u,d;if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return dp.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=((a=this.start)==null?void 0:a.getTime())??-1/0,r=((l=this.end)==null?void 0:l.getTime())??1/0,n=((u=t.start)==null?void 0:u.getTime())??-1/0,i=((d=t.end)==null?void 0:d.getTime())??1/0;let s,o;return n>=e&&n<=r?s=n:e>=n&&e<=i&&(s=e),r>=n&&r<=i?o=r:i>=e&&i<=r&&(o=i),s==null||o==null||isNaN(s)||isNaN(o)?dp.empty:new dp({start:s===-1/0?null:new Date(s),end:o===1/0?null:new Date(o)})}offset(t,e,r=L2){if(this.isEmpty||this.isAllTime)return this.clone();const n=new dp,{start:i,end:s}=this;return i!=null&&(n.start=sz(i,t,e,r)),s!=null&&(n.end=sz(s,t,e,r)),n}toArray(){var t,e;return this.isEmpty?[void 0,void 0]:[((t=this.start)==null?void 0:t.getTime())??null,((e=this.end)==null?void 0:e.getTime())??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return cie.clone();const e=this.start!=null&&t.start!=null?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=this.end!=null&&t.end!=null?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new dp({start:e,end:r})}};T([B({type:Date,json:{write:{allowNull:!0}}})],_f.prototype,"end",void 0),T([un("end")],_f.prototype,"readEnd",null),T([On("end")],_f.prototype,"writeEnd",null),T([B({readOnly:!0,json:{read:!1}})],_f.prototype,"isAllTime",null),T([B({readOnly:!0,json:{read:!1}})],_f.prototype,"isEmpty",null),T([B({type:Date,json:{write:{allowNull:!0}}})],_f.prototype,"start",void 0),T([un("start")],_f.prototype,"readStart",null),T([On("start")],_f.prototype,"writeStart",null),_f=dp=T([_t("esri.TimeExtent")],_f);const cie=new _f,Klt=new _f({start:void 0,end:void 0}),ay=_f;async function Qlt(t){var n;const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await fs(async()=>{const{fromItem:i}=await import("./portalLayers-CSGJfvg_.js").then(s=>s.p);return{fromItem:i}},__vite__mapDeps([31,32,33]));try{return await r(e)}catch(i){const s=e==null?void 0:e.portalItem,o=(s==null?void 0:s.id)||"unset",a=((n=s==null?void 0:s.portal)==null?void 0:n.url)||Ao.portalUrl;throw li.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+a+"', id: '"+o+"')",i),i}}let eut=0,tu=class extends Kw.EventedMixin(SX(fO)){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new Mu(-180,-90,180,90,mo.WGS84),this.id=Date.now().toString(16)+"-layer-"+eut++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=mo.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const r=typeof e=="string"?{url:e}:e;return(await fs(async()=>{const{fromUrl:n}=await import("./arcgisLayers-zn5ZTq8c.js");return{fromUrl:n}},__vite__mapDeps([34,32,33]))).fromUrl(r)}static fromPortalItem(e){return Qlt(e)}initialize(){this.when().catch(e=>{i0(e)||li.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const r=this;"layers"in e&&e.layers.includes(r)?e.layers.remove(r):"tables"in e&&e.tables.includes(r)?e.tables.remove(r):"baseLayers"in e&&e.baseLayers.includes(r)?e.baseLayers.remove(r):"referenceLayers"in e&&e.referenceLayers.includes(r)&&e.referenceLayers.remove(r),this._set("parent",null)}}get hasAttributionData(){return this.attributionDataUrl!=null}get parsedUrl(){return fd(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await sa(e,{query:{f:"json"},responseType:"json"})).data;throw new Pr("layer:no-attribution-data","Layer does not have attribution data")}};T([B({type:String})],tu.prototype,"attributionDataUrl",void 0),T([B({type:Mu})],tu.prototype,"fullExtent",void 0),T([B({readOnly:!0})],tu.prototype,"hasAttributionData",null),T([B({type:String,clonable:!1})],tu.prototype,"id",void 0),T([B({type:Boolean,nonNullable:!0})],tu.prototype,"legendEnabled",void 0),T([B({type:["show","hide","hide-children"]})],tu.prototype,"listMode",void 0),T([B({type:Number,range:{min:0,max:1},nonNullable:!0})],tu.prototype,"opacity",void 0),T([B({clonable:!1})],tu.prototype,"parent",void 0),T([B({readOnly:!0})],tu.prototype,"parsedUrl",null),T([B({type:Boolean,readOnly:!0})],tu.prototype,"persistenceEnabled",void 0),T([B({type:Boolean})],tu.prototype,"popupEnabled",void 0),T([B({type:Boolean})],tu.prototype,"attributionVisible",void 0),T([B({type:mo})],tu.prototype,"spatialReference",void 0),T([B({type:String})],tu.prototype,"title",void 0),T([B({readOnly:!0,json:{read:!1}})],tu.prototype,"type",void 0),T([B()],tu.prototype,"url",void 0),T([B({type:ay})],tu.prototype,"visibilityTimeExtent",void 0),T([B({type:Boolean,nonNullable:!0})],tu.prototype,"visible",void 0),tu=T([_t("esri.layers.Layer")],tu);const tut=tu;let rut=class{constructor(e=r=>r.values().next().value){this._peeker=e,this._observable=new _Y,this._items=new Set}get length(){return ds(this._observable),this._items.size}clear(){this.length!==0&&(this._items.clear(),this._observable.notify())}last(){if(this.length===0)return;let e;for(e of this._items);return e}peek(){if(this.length!==0)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return ds(this._observable),this._items.has(e)}pop(){if(this.length===0)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(this.length===0)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const r=this.length;return this._items.forEach(n=>{e(n)||this._items.delete(n)}),r!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){ds(this._observable),yield*this._items}};const s3e=new FinalizationRegistry(t=>{t.close()});function nut(t,e){s3e.register(t,e,e)}function iut(t){s3e.unregister(t)}function o3e(t,e){return new Proxy({},{get:(r,n,i)=>(...s)=>{let o,a;const l=s[s.length-1];return sut(l)&&(o=l.signal,a=l.transferList,s.pop()),t.apply(e?`${e}.${n.toString()}`:n.toString(),s,{transferList:a,signal:o})}})}function sut(t){return typeof t=="object"&&!Array.isArray(t)&&t!=null&&("signal"in t||"transferList"in t||Object.keys(t).length===0)}const out={statsWorker:()=>fs(()=>import("./statsWorker-DNhIb11T.js"),__vite__mapDeps([35,36,20,21,22,37,38])),geometryEngineWorker:()=>fs(()=>import("./geometryEngineWorker-ClddcLz0.js").then(t=>t.a),__vite__mapDeps([39,40,14,41])),CSVSourceWorker:()=>fs(()=>import("./CSVSourceWorker-DF7Oy86a.js"),__vite__mapDeps([42,43,41,18,44,17,19,45,46,47,14,48,49,50,51,52,11,12,53,36,20,21,22,37,38,54,16,55])),EdgeProcessingWorker:()=>fs(()=>import("./EdgeProcessingWorker-C7g3lLDX.js"),__vite__mapDeps([56,57,58,59,60,61,62,63,64,65,66,67,68])),ElevationSamplerWorker:()=>fs(()=>import("./ElevationSamplerWorker-Be15mw3K.js"),__vite__mapDeps([69,46,47,14,70,71,72,73,74,75,76,77,78,79,80,58,59,81])),FeatureServiceSnappingSourceWorker:()=>fs(()=>import("./FeatureServiceSnappingSourceWorker-C2uDe4AH.js"),__vite__mapDeps([82,83,44,17,18,19,45,46,47,14,48,49,50,51,52,11,12,41,53,36,20,21,22,37,38,54,25,84,85,86,28])),GeoJSONSourceWorker:()=>fs(()=>import("./GeoJSONSourceWorker-CYe2sh7G.js"),__vite__mapDeps([87,17,18,19,44,45,46,47,14,48,49,50,51,52,11,12,41,53,36,20,21,22,37,38,54,88,43,55,89])),LercWorker:()=>fs(()=>import("./LercWorker-CqHAIE7x.js"),[]),MemorySourceWorker:()=>fs(()=>import("./MemorySourceWorker-DNQM5G5E.js"),__vite__mapDeps([90,17,18,19,91,44,45,46,47,14,48,49,50,51,52,11,12,41,53,36,20,21,22,37,38,54,55,89,43])),PBFDecoderWorker:()=>fs(()=>import("./PBFDecoderWorker-BSA6vg2a.js"),__vite__mapDeps([92,17,18,19,84,85])),FeaturePipelineWorker:()=>fs(()=>import("./FeaturePipelineWorker-Duw9IYNq.js"),__vite__mapDeps([93,25,94,59,95,96,54,97,98,67,14,99,100,18,101,61,62,17,19,48,49,50,51,52,11,12,41,53,36,20,21,22,37,38,47,86,84,85,102,88,43,55,89,103,83])),PointCloudWorker:()=>fs(()=>import("./PointCloudWorker-CH9o2MwU.js"),__vite__mapDeps([104,105,73,106,107,108,66,109,72,74,75,76,110,62])),RasterWorker:()=>fs(()=>import("./RasterWorker-DW_GcoB6.js"),__vite__mapDeps([111,112,14,113])),SceneLayerSnappingSourceWorker:()=>fs(()=>import("./SceneLayerSnappingSourceWorker-DR4W7bTo.js"),__vite__mapDeps([114,115,116,110,73,74,106,62,61,63,64,65,57,58,59,60,66,67,68])),SceneLayerWorker:()=>fs(()=>import("./SceneLayerWorker-cfLEu3Xv.js"),__vite__mapDeps([117,80,70,78,116,110,73,74,106,62,118,75,108,66,119,101,109,72,105,76])),WFSSourceWorker:()=>fs(()=>import("./WFSSourceWorker-BjXlAna2.js"),__vite__mapDeps([120,17,18,19,44,45,46,47,14,48,49,50,51,52,11,12,41,53,36,20,21,22,37,38,54,88,43,89,121,122])),WorkerTileHandler:()=>fs(()=>import("./WorkerTileHandler-CMLMj5UP.js"),__vite__mapDeps([123,124,97,67,68,99,85,100,14])),Lyr3DWorker:()=>fs(()=>import("./Lyr3DWorker-CzF8y3dB.js"),[])},a3e="worker:port-closed";var dc;(function(t){t[t.HANDSHAKE=0]="HANDSHAKE",t[t.OPEN=1]="OPEN",t[t.OPENED=2]="OPENED",t[t.RESPONSE=3]="RESPONSE",t[t.INVOKE=4]="INVOKE",t[t.ABORT=5]="ABORT",t[t.CLOSE=6]="CLOSE",t[t.OPEN_PORT=7]="OPEN_PORT",t[t.ON=8]="ON"})(dc||(dc={}));let aut=0;function l3e(){return aut++}function lut(t){return t&&typeof t=="object"&&("result"in t||"transferList"in t)}function ZC(t){return t?typeof t=="string"?JSON.stringify({name:"message",message:t}):t.toJSON?JSON.stringify(t):JSON.stringify({name:t.name,message:t.message,details:t.details||{stack:t.stack}}):null}function tJ(t,e,r,n){if(e.type===dc.OPEN_PORT)return void t.postMessage(e,[e.port]);if(e.type!==dc.INVOKE&&e.type!==dc.RESPONSE)return void t.postMessage(e);let i;if(lut(r)?(i=hie(r.transferList),e.data=r.result):(i=hie(n),e.data=r),i){if(Sr("ff")){for(const s of i)if("byteLength"in s&&s.byteLength>267386880){const o="Worker call with large ArrayBuffer would crash Firefox";switch(e.type){case dc.INVOKE:throw o;case dc.RESPONSE:return void tJ(t,{type:dc.RESPONSE,jobId:e.jobId,error:ZC(o)})}}}t.postMessage(e,i)}else t.postMessage(e)}function YC(t){if(!t)return null;const e=t.data;return e?typeof e=="string"?JSON.parse(e):e:null}function hie(t){if(!(t!=null&&t.length))return null;if(Sr("esri-workers-arraybuffer-transfer"))return t;const e=t.filter(r=>!uut(r));return e.length?e:null}function uut(t){var e;return t instanceof ArrayBuffer||((e=t==null?void 0:t.constructor)==null?void 0:e.name)==="ArrayBuffer"}async function LLt(t){try{return await t}catch(e){const r=(e==null?void 0:e.name)===a3e;if(!(i0(e)||r))throw e;return}}const{CLOSE:die,ABORT:fie,INVOKE:pie,RESPONSE:Y8,OPEN_PORT:mie,ON:cut}=dc,hut=2;let dut=class{constructor(e){this._invoke=e,this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._timer=null,this._process=this._process.bind(this)}push(e){e.type===dc.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),this._timer===null&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}},P2=class Vx{static connect(e,r){const n=new MessageChannel;let i;i=typeof e=="function"?new e:"default"in e&&typeof e.default=="function"?new e.default:e;const s=new Vx(n.port1,{channel:n,client:i,schedule:r});return typeof i=="object"&&"remoteClient"in i&&(i.remoteClient=s),Vx.clients.set(s,i),n.port2}static loadWorker(e){const r=out[e];return r?r():Promise.resolve(null)}constructor(e,r,n){this._port=e,this._jobQueue=n,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new dut(i=>this._onInvokeMessage(i)),this._client=r.client,this._onMessage=this._onMessage.bind(this),this._channel=r.channel,this._schedule=r.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:die}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,r,n){return this.apply(e,[r],n)}apply(e,r,n){const i=n==null?void 0:n.signal,s=n==null?void 0:n.transferList;if(!this._port)return Promise.reject(new Pr(a3e,`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:r}));const o=l3e();return new Promise((a,l)=>{if(sy(i))return this._processWork(),void l(Bc());const u=bp(i,()=>{const f=this._outJobs.get(o);f&&(this._outJobs.delete(o),this._processWork(),H1(f.abortHandle),this._post({type:fie,jobId:o}),l(Bc()))}),d={resolve:a,reject:l,abortHandle:u,debugInfo:e};this._outJobs.set(o,d),this._post({type:pie,jobId:o,methodName:e,abortable:i!=null},r,s)})}createInvokeProxy(e){return o3e(this,e)}on(e,r){const n=new MessageChannel;function i(s){r(s.data)}return this._port.postMessage({type:dc.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",i),n.port1.start(),Hl(()=>{n.port1.postMessage({type:dc.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",i)})}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:mie,port:e.port2}),e.port1}_processWork(){var o;if(this._outJobs.size>=hut)return;const e=(o=this._jobQueue)==null?void 0:o.pop();if(!e)return;const{methodName:r,data:n,invokeOptions:i,resolver:s}=e;this.apply(r,n,i).then(a=>s.resolve(a)).catch(a=>s.reject(a))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach(e=>{H1(e.abortHandle),e.reject(Bc(`Worker closing, aborting job calling '${e.debugInfo}'`))}),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(e){this._schedule!=null?this._schedule(()=>this._processMessage(e,!0)):this._processMessage(e,!1)}_processMessage(e,r){const n=YC(e);if(n)switch(n.type){case Y8:this._onResponseMessage(n);break;case pie:r?this._onInvokeMessage(n):this._invokeQueue.push(n);break;case fie:this._onAbortMessage(n);break;case die:this._onCloseMessage();break;case mie:this._onOpenPortMessage(n);break;case cut:this._onOnMessage(n)}}_onAbortMessage(e){const r=this._inJobs,n=e.jobId,i=r.get(n);this._invokeQueue.push(e),i&&(i.controller&&i.controller.abort(),r.delete(n))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&Vx.clients.get(this)===e&&e.destroy(),Vx.clients.delete(this),e!=null&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:r,jobId:n,data:i=[],abortable:s}=e,o=s?new AbortController:null,a=this._inJobs;let l,u=this._client,d=u[r];try{if(!d&&r&&r.includes(".")){const f=r.split(".");for(let m=0;m{a.has(n)&&(a.delete(n),this._post({type:Y8,jobId:n},f))},f=>{a.has(n)&&(a.delete(n),i0(f)||this._post({type:Y8,jobId:n,error:ZC(f||{message:`Error encountered at method ${r}`})}))})):this._post({type:Y8,jobId:n},l)}_onOpenPortMessage(e){new Vx(e.port,{client:this._client})}_onOnMessage(e){const{port:r}=e,n=this._client.on(e.eventType,s=>{r.postMessage(s)}),i=r5(e.port,"message",s=>{const o=YC(s);(o==null?void 0:o.type)===dc.CLOSE&&(i.remove(),n.remove(),r.close())})}_onResponseMessage(e){const{jobId:r,error:n,data:i}=e,s=this._outJobs;if(!s.has(r))return;const o=s.get(r);s.delete(r),this._processWork(),H1(o.abortHandle),n?o.reject(Pr.fromJSON(JSON.parse(n))):o.resolve(i)}_post(e,r,n){return tJ(this._port,e,r,n)}};P2.kernelInfo={buildDate:a0e,fullVersion:iY,revision:l0e},P2.clients=new Map;let fut=class{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new rut}destroy(){this.close()}get closed(){var e;return!((e=this._clients)!=null&&e.length)}open(e,r){return new Promise((n,i)=>{let s=!0;const o=a=>{Q1(r.signal),s&&(s=!1,a())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let a=0;a(this._clients[a]=new P2(u,r,this._ongoingJobsQueue),o(n),this._clients[a]),()=>(o(i),null)):(this._clients[a]=new P2(l,r,this._ongoingJobsQueue),this._clientPromises[a]=Promise.resolve(this._clients[a]),o(n))}})}broadcast(e,r,n){const i=new Array(this._clientPromises.length);for(let s=0;sa==null?void 0:a.invoke(e,r,n))}return i}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject(Bc(`Worker closing, aborting job calling '${e.methodName}'`));for(const r of this._clientPromises)r.then(n=>n==null?void 0:n.close());this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,iut(this)}invoke(e,r,n){return this.apply(e,[r],n)}apply(e,r,n){const i=Mp();this._ongoingJobsQueue.push({methodName:e,data:r,invokeOptions:n,resolver:i});for(let s=0;sa==null?void 0:a.jobAdded())}return i.promise}createInvokeProxy(e){return o3e(this,e)}on(e,r){return Promise.all(this._clientPromises).then(()=>NS(this._clients.map(n=>n.on(e,r))))}openPorts(){return new Promise(e=>{const r=new Array(this._clientPromises.length);let n=r.length;for(let i=0;i{s&&(r[i]=s.openPort()),--n==0&&e(r)})})}get test(){}};const put={async request(t,e){var o,a;const r=t.options,n=r.responseType;r.signal=e==null?void 0:e.signal,r.responseType=n==="native"||n==="native-request-init"?"native-request-init":n&&["blob","json","text"].includes(n)&&((o=dV(t.url))!=null&&o.after)?n:"array-buffer";const i=await sa(t.url,r),s={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch((a=i.requestOptions)==null?void 0:a.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=new TextEncoder().encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=new TextEncoder().encode(s.data).buffer}return{result:s,transferList:[s.data]}}},gie={};function mut(t){var r;const e={async:t.async,isDebug:t.isDebug,locale:t.locale,baseUrl:t.baseUrl,has:{...t.has},map:{...t.map},packages:((r=t.packages)==null?void 0:r.concat())||[],paths:{...gie.paths,...t.paths}};return t.hasOwnProperty("async")||(e.async=!0),t.hasOwnProperty("isDebug")||(e.isDebug=!1),t.baseUrl||(e.baseUrl=gie.baseUrl),e}let gut=class{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(r=>{this[r]=(...n)=>e[r](...n)})}},HL=class{constructor(){this._dispatcher=new gut,this._workerPostMessage({type:dc.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){Yk(()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))})}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,r,n){this._dispatcher.addEventListener(e,r,n)}removeEventListener(e,r,n){this._dispatcher.removeEventListener(e,r,n)}_workerPostMessage(e){Yk(()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))})}async _workerMessageHandler(e){const r=YC(e);if(r&&r.type===dc.OPEN){const{modulePath:n,jobId:i}=r;let s=await P2.loadWorker(n);s||(s=await import(n));const o=P2.connect(s);this._workerPostMessage({type:dc.OPENED,jobId:i,data:o})}}};const _G=()=>li.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:yut}=dc,vut='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});';let sI,oI;const yie="Failed to create Worker. Fallback to execute module in main thread";async function _ut(){if(!Sr("esri-workers"))return vie(new HL);if(!sI&&!oI)try{const e=vut.split("{CONFIGURATION}").join(xut());sI=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){oI=e||{}}let t;if(sI)try{t=new Worker(sI,{name:"esri-worker-"+wut++})}catch{_G().warn(yie,oI),t=new HL}else _G().warn(yie,oI),t=new HL;return vie(t)}async function vie(t){return new Promise(e=>{function r(i){const s=YC(i);s&&s.type===yut&&(t.removeEventListener("message",r),t.removeEventListener("error",n),e(t))}function n(i){i.preventDefault(),t.removeEventListener("message",r),t.removeEventListener("error",n),_G().warn("Failed to create Worker. Fallback to execute module in main thread",i),(t=new HL).addEventListener("message",r),t.addEventListener("error",n)}t.addEventListener("message",r),t.addEventListener("error",n)})}function xut(){let t;if(Ao.default!=null){const i={...Ao};delete i.default,t=JSON.parse(JSON.stringify(i))}else t=JSON.parse(JSON.stringify(Ao));t.assetsPath=Bd(t.assetsPath),t.defaultAssetsPath=t.defaultAssetsPath?Bd(t.defaultAssetsPath):void 0,t.request.interceptors=[],t.log.interceptors=[],t.locale=im(),t.has={"esri-csp-restrictions":Sr("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":Sr("esri-2d-update-debug"),"esri-2d-log-updating":Sr("esri-2d-log-updating"),"featurelayer-pbf":Sr("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":Sr("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":Sr("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":Sr("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":Sr("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":Sr("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":Sr("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":Sr("featurelayer-snapshot-enabled"),"esri-atomics":Sr("esri-atomics"),"esri-shared-array-buffer":Sr("esri-shared-array-buffer"),"esri-tiles-debug":Sr("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":Sr("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":Sr("feature-polyline-generalization-factor"),"host-webworker":1},t.workers.loaderUrl&&(t.workers.loaderUrl=Bd(t.workers.loaderUrl)),t.workers.workerPath?t.workers.workerPath=Bd(t.workers.workerPath):t.workers.workerPath=Bd(qS("esri/core/workers/RemoteClient.js")),t.workers.useDynamicImport=!1;const e=Ao.workers.loaderConfig,r=mut({baseUrl:e==null?void 0:e.baseUrl,locale:im(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...e==null?void 0:e.has},map:{...e==null?void 0:e.map},paths:{...e==null?void 0:e.paths},packages:(e==null?void 0:e.packages)||[]});return JSON.stringify({esriConfig:t,loaderConfig:r,kernelInfo:{buildDate:a0e,fullVersion:iY,revision:l0e}})}let wut=0;const{ABORT:_ie,INVOKE:but,OPEN:Cut,OPENED:Sut,RESPONSE:X8}=dc;let Eut=class u3e{static async create(e){const r=await _ut();return new u3e(r,e)}constructor(e,r){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=r,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",n=>{n.preventDefault(),li.getLogger("esri.core.workers.WorkerOwner").error(n)})}terminate(){this.worker.terminate()}async open(e,r={}){const{signal:n}=r,i=l3e();return new Promise((s,o)=>{const a={resolve:s,reject:o,abortHandle:w1e(n,()=>{this._outJobs.delete(i),this._post({type:_ie,jobId:i})})};this._outJobs.set(i,a),this._post({type:Cut,jobId:i,modulePath:e})})}_onMessage(e){const r=YC(e);if(r)switch(r.type){case Sut:this._onOpenedMessage(r);break;case X8:this._onResponseMessage(r);break;case _ie:this._onAbortMessage(r);break;case but:this._onInvokeMessage(r)}}_onAbortMessage(e){const r=this._inJobs,n=e.jobId,i=r.get(n);i&&(i.controller&&i.controller.abort(),r.delete(n))}_onInvokeMessage(e){const{methodName:r,jobId:n,data:i,abortable:s}=e,o=s?new AbortController:null,a=this._inJobs,l=put[r];let u;try{if(typeof l!="function")throw new TypeError(`${r} is not a function`);u=l.call(null,i,{signal:o?o.signal:null})}catch(d){return void this._post({type:X8,jobId:n,error:ZC(d)})}BS(u)?(a.set(n,{controller:o,promise:u}),u.then(d=>{a.has(n)&&(a.delete(n),this._post({type:X8,jobId:n},d))},d=>{a.has(n)&&(a.delete(n),d||(d={message:"Error encountered at method"+r}),i0(d)||this._post({type:X8,jobId:n,error:ZC(d||{message:`Error encountered at method ${r}`})}))})):this._post({type:X8,jobId:n},u)}_onOpenedMessage(e){const{jobId:r,data:n}=e,i=this._outJobs.get(r);i&&(this._outJobs.delete(r),H1(i.abortHandle),i.resolve(n))}_onResponseMessage(e){const{jobId:r,error:n,data:i}=e,s=this._outJobs.get(r);s&&(this._outJobs.delete(r),H1(s.abortHandle),n?s.reject(Pr.fromJSON(JSON.parse(n))):s.resolve(i))}_post(e,r,n){return tJ(this.worker,e,r,n)}};const xie=Sr("host-browser")?Math.min(navigator.hardwareConcurrency-1,Sr("workers-pool-size")):0;let X3=Sr("esri-mobile")?Math.min(xie,3):xie;X3||(X3=Sr("safari")&&Sr("mac")?7:2);let wie=0;const GL=[];async function aI(t,e){const r=new fut,{registryTarget:n,...i}=e;return await r.open(t,i),n&&nut(n,r),r}async function Mut(t,e={}){if(typeof t!="string")throw new Pr("workers:undefined-module","modulePath is missing");let r=e.strategy||"distributed";if(Sr("host-webworker")&&!Sr("esri-workers")&&(r="local"),r==="local"){let n=await P2.loadWorker(t);n||(n=await import(t)),Q1(e.signal);const i=e.client||n;return aI([P2.connect(n,e.schedule)],{...e,client:i})}if(await Tut(),Q1(e.signal),r==="dedicated"){const n=wie++%X3;return aI([await GL[n].open(t,e)],e)}if(e.maxNumWorkers&&e.maxNumWorkers>0){const n=Math.min(e.maxNumWorkers,X3);if(nn.open(t,e)),e)}let lI=null;async function Tut(){if(lI)return lI;new AbortController;const t=[];for(let e=0;e(GL[e]=n,n));t.push(r)}return lI=Promise.all(t),lI}function bie(t,e,r){if(t.hasM==null||t.hasZ)for(const n of e)for(const i of n)i.length>2&&(i[2]*=r)}function Iut(t,e,r){if(!t&&!e||!r)return;const n=jA(r);Cie(t,r,n),Cie(e,r,n)}function Cie(t,e,r){if(t)for(const n of t)Rut(n.geometry,e,r)}function Rut(t,e,r){if(!(t!=null&&t.spatialReference)||Wd(t.spatialReference,e))return;const n=jA(t.spatialReference)/r;if(n!==1){if("x"in t)t.z!=null&&(t.z*=n);else if("rings"in t)bie(t,t.rings,n);else if("paths"in t)bie(t,t.paths,n);else if("points"in t&&(t.hasM==null||t.hasZ))for(const i of t.points)i.length>2&&(i[2]*=n)}}function c3e(t,e,r){if(e==null||r==null||r.vcsWkid||Wd(e,r)||A2(e)||A2(r))return null;const n=jA(e)/jA(r);if(n===1)return null;switch(t){case"point":case"esriGeometryPoint":return i=>Lut(i,n);case"polyline":case"esriGeometryPolyline":return i=>Aut(i,n);case"polygon":case"esriGeometryPolygon":return i=>kut(i,n);case"multipoint":case"esriGeometryMultipoint":return i=>Put(i,n);case"extent":case"esriGeometryEnvelope":return i=>$ut(i,n);default:return null}}function Lut(t,e){(t==null?void 0:t.z)!=null&&(t.z*=e)}function kut(t,e){if(t)for(const r of t.rings)for(const n of r)n.length>2&&(n[2]*=e)}function Aut(t,e){if(t)for(const r of t.paths)for(const n of r)n.length>2&&(n[2]*=e)}function Put(t,e){if(t)for(const r of t.points)r.length>2&&(r[2]*=e)}function $ut(t,e){t&&t.zmin!=null&&t.zmax!=null&&(t.zmin*=e,t.zmax*=e)}function Sie(t,e,r){if(!(r!=null&&r.features)||!r.hasZ)return;const n=c3e(r.geometryType,e,t.outSpatialReference);if(n!=null)for(const i of r.features)n(i.geometry)}const Out=new ro({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});var xG;const Nut=new ro({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let wh=xG=class extends qr{constructor(t){super(t),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(t,{description:e}){let r=null;try{r=e?JSON.parse(e):null}catch{}return(r==null?void 0:r.value)??null}readValueType(t,{description:e}){let r=null;try{r=e?JSON.parse(e):null}catch{}return r?Nut.fromJSON(r.fieldValueType):null}clone(){var t;return new xG({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:((t=this.domain)==null?void 0:t.clone())??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};T([B({type:String,json:{write:!0}})],wh.prototype,"alias",void 0),T([B({type:[String,Number],json:{write:{allowNull:!0}}})],wh.prototype,"defaultValue",void 0),T([B()],wh.prototype,"description",void 0),T([un("description")],wh.prototype,"readDescription",null),T([B({types:X_e,json:{read:{reader:_O},write:!0}})],wh.prototype,"domain",void 0),T([B({type:Boolean,json:{write:!0}})],wh.prototype,"editable",void 0),T([B({type:Qa,json:{write:{overridePolicy:t=>({enabled:Number.isFinite(t)})}}})],wh.prototype,"length",void 0),T([B({type:String,json:{write:!0}})],wh.prototype,"name",void 0),T([B({type:Boolean,json:{write:!0}})],wh.prototype,"nullable",void 0),T([ji(Out)],wh.prototype,"type",void 0),T([B()],wh.prototype,"valueType",void 0),T([un("valueType",["description"])],wh.prototype,"readValueType",null),T([B({type:Boolean,json:{read:!1}})],wh.prototype,"visible",void 0),wh=xG=T([_t("esri.layers.support.Field")],wh);const rJ=wh;var wG;const bG=new ro({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let uc=wG=class extends qr{constructor(t){super(t),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(t,e){var i;const r=mo.fromJSON(e.spatialReference),n=[];for(let s=0;s0)for(let r=0;rMath.round((u-n)/e),o=u=>Math.round((i-u)/r),a=this.features,l=this._getQuantizationFunction(this.geometryType,s,o);for(let u=0,d=a.length;ub*s+n,l=b=>i-b*o;let u=null,d=null;if(this.hasZ&&((m=r==null?void 0:r.scale)==null?void 0:m[2])!=null){const{translate:[,,b],scale:[,,M]}=r;u=O=>O*M+b}if(this.hasM&&((v=r==null?void 0:r.scale)==null?void 0:v[3])!=null){const{translate:[,,,b],scale:[,,,M]}=r;d=O=>O==null?O:O*M+b}const f=this._getHydrationFunction(t,a,l,u,d);for(const{geometry:b}of e)b!=null&&f&&f(b);return this.transform=null,this}_quantizePoints(t,e,r){let n,i;const s=[];for(let o=0,a=t.length;o0){const u=e(l[0]),d=r(l[1]);u===n&&d===i||(s.push([u-n,d-i]),n=u,i=d)}else n=e(l[0]),i=r(l[1]),s.push([n,i])}return s.length>0?s:null}_getQuantizationFunction(t,e,r){return t==="point"?n=>(n.x=e(n.x),n.y=r(n.y),n):t==="polyline"||t==="polygon"?n=>{const i=P6(n)?n.rings:n.paths,s=[];for(let o=0,a=i.length;o0?(P6(n)?n.rings=s:n.paths=s,n):null}:t==="multipoint"?n=>{const i=this._quantizePoints(n.points,e,r);return i&&i.length>0?(n.points=i,n):null}:t==="extent"?n=>n:null}_getHydrationFunction(t,e,r,n,i){return t==="point"?s=>{s.x=e(s.x),s.y=r(s.y),n&&(s.z=n(s.z))}:t==="polyline"||t==="polygon"?s=>{const o=P6(s)?s.rings:s.paths;let a,l;for(let u=0,d=o.length;u0?(a+=b[0],l+=b[1]):(a=b[0],l=b[1]),b[0]=e(a),b[1]=r(l)}}if(n&&i)for(let u=0,d=o.length;u{s.xmin=e(s.xmin),s.ymin=r(s.ymin),s.xmax=e(s.xmax),s.ymax=r(s.ymax),n&&s.zmax!=null&&s.zmin!=null&&(s.zmax=n(s.zmax),s.zmin=n(s.zmin)),i&&s.mmax!=null&&s.mmin!=null&&(s.mmax=i(s.mmax),s.mmin=i(s.mmin))}:t==="multipoint"?s=>{const o=s.points;let a,l;for(let u=0,d=o.length;u0?(a+=f[0],l+=f[1]):(a=f[0],l=f[1]),f[0]=e(a),f[1]=r(l)}if(n&&i)for(let u=0,d=o.length;u({enabled:t})}}})],uc.prototype,"exceededTransferLimit",void 0),T([B({type:[HC],json:{write:!0}})],uc.prototype,"features",void 0),T([un("features")],uc.prototype,"readFeatures",null),T([B({type:[rJ],json:{write:!0}})],uc.prototype,"fields",void 0),T([B({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:bG.read}}})],uc.prototype,"geometryType",void 0),T([On("geometryType")],uc.prototype,"writeGeometryType",null),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],uc.prototype,"hasM",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],uc.prototype,"hasZ",void 0),T([B({types:a7,json:{write:!0}})],uc.prototype,"queryGeometry",void 0),T([un("queryGeometry")],uc.prototype,"readQueryGeometry",null),T([B({type:mo,json:{write:!0}})],uc.prototype,"spatialReference",void 0),T([On("spatialReference")],uc.prototype,"writeSpatialReference",null),T([B({json:{write:!0}})],uc.prototype,"transform",void 0),uc=wG=T([_t("esri.rest.support.FeatureSet")],uc),uc.prototype.toJSON.isDefaultToJSON=!0;const h3e=uc;let Dut=0,Rg=class extends fO.LoadableMixin(gY($o)){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const r=e!=null?e.signal:null;return this.addResolvingPromise(this._startWorker(r)),Promise.resolve(this)}destroy(){var e;(e=this._connection)==null||e.close(),this._connection=null}get _workerGeometryType(){var r;const e=(r=this.layer)==null?void 0:r.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,r={}){await this.load(r);const n=await this._connection.invoke("queryFeatures",e?e.toJSON():null,r);Sie(e,this.layer.spatialReference,n);const i=h3e.fromJSON(n);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const o of i.features){const a=o.attributes[s],l=this._idToClientGraphic.get(a);l&&(o.geometry=l.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,r={}){if(this._requiresClientGraphicMapping())throw new Pr("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(r);const n=await this._connection.invoke("queryFeatures",e?e.toJSON():null,r);return Sie(e,this.layer.spatialReference,n),n}queryFeatureCount(e,r={}){return this.load(r).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,r))}queryObjectIds(e,r={}){return this.load(r).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,r))}queryExtent(e,r={}){return this.load(r).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,r)).then(n=>({count:n.count,extent:Mu.fromJSON(n.extent)}))}querySnapping(e,r={}){return this.load(r).then(()=>this._connection.invoke("querySnapping",e,r))}async _applyEdits(e){if(!this._connection)throw new Pr("feature-layer-source:edit-failure","Memory source not loaded");const r=this.layer.objectIdField;let n=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=d=>"objectId"in d&&d.objectId!=null?d.objectId:"attributes"in d&&d.attributes[r]!=null?d.attributes[r]:null;if(e.addFeatures&&(n=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const d of e.deleteFeatures){const f=o(d);f!=null&&i.push(f)}const a=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures){for(const d of e.updateFeatures)if(s.push(this._serializeFeature(d)),a){const f=o(d);f!=null&&a.set(f,d)}}Iut(n?n.features:null,s,this.layer.spatialReference);const{fullExtent:l,featureEditResults:u}=await this._connection.invoke("applyEdits",{adds:n?n.features:[],updates:s,deletes:i});return this.fullExtent=l,n&&n.finish(u.uidToObjectId),this._updateClientGraphicIds(a,u),this._createEditsResult(u)}async _prepareClientMapping(e,r){if(this._layerOrSourceGeometryType!=="mesh"||e==null)return;const n=[];for(const{geometry:i}of e)i==null||i.type!=="mesh"||i.hasExtent||i.loaded||n.push(i.load({signal:r}));n.length&&await Promise.all(n)}_updateClientGraphicIds(e,r){if(this._idToClientGraphic){if(e)for(const n of r.updateResults){if(!n.success)continue;const i=e.get(n.objectId);i!=null&&this._addIdToClientGraphic(i)}for(const n of r.deleteResults)n.success&&this._idToClientGraphic.delete(n.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const r=e.success===!0?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:r?new Pr("feature-layer-source:edit-failure",r.description,{code:r.code}):null}}_prepareAddFeatures(e){const r=new Map,n=new Array(e.length);let i=null;for(let o=0;o{li.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),b.preventDefault()}));const f={features:d.features,fields:r==null?void 0:r.map(b=>b.toJSON()),geometryType:cne.toJSON(this._workerGeometryType),hasM:this._layerOrSourceGeometryType!=="mesh"&&s,hasZ:this._layerOrSourceGeometryType==="mesh"||o,objectIdField:i,spatialReference:u?null:n&&n.toJSON(),timeInfo:(a==null?void 0:a.toJSON())??null,dateFieldsTimeZone:l},m=await this._connection.invoke("load",f,{signal:e});for(const b of m.warnings)li.getLogger(this.layer).warn("#load()",`${b.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:b});m.featureErrors.length&&li.getLogger(this.layer).warn("#load()",`Encountered ${m.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:m.featureErrors});const v=m.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(v.geometryType=cne.toJSON(d.inferredGeometryType)),this.sourceJSON=v,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),d.finish(m.assignedObjectIds)}};T([xme({Type:HC,ensureType:gc(HC)})],Rg.prototype,"itemType",void 0),T([B()],Rg.prototype,"type",void 0),T([B({constructOnly:!0})],Rg.prototype,"layer",void 0),T([B({readOnly:!0})],Rg.prototype,"_workerGeometryType",null),T([B()],Rg.prototype,"sourceJSON",void 0),Rg=T([_t("esri.layers.graphics.sources.MemorySource")],Rg);function Fut(t){return"portalItem"in t}const zut=t=>{let e=class extends t{get apiKey(){var r;return this._isOverridden("apiKey")?this._get("apiKey"):Fut(this)?(r=this.portalItem)==null?void 0:r.apiKey:null}set apiKey(r){r!=null?this._override("apiKey",r):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return T([B({type:String})],e.prototype,"apiKey",null),e=T([_t("esri.layers.mixins.APIKeyMixin")],e),e},d3e={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},f3e=Object.values(d3e),p3e=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${f3e.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),But=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${f3e.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),jut=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function NLt(t){return p3e.test(t)}function mE(t){if(t==null)return null;const e=fd(t),r=(e==null?void 0:e.path.match(p3e))||(e==null?void 0:e.path.match(But));if(!r)return null;const[,n,i,s,o]=r,a=i.indexOf("/");return{title:nJ(a!==-1?i.slice(a+1):i),serverType:d3e[s.toLowerCase()],sublayer:o!=null&&o!==""?parseInt(o,10):null,url:{path:n}}}function Vut(t){const e=fd(t).path.match(jut);return e?{serviceUrl:e[1],sublayerId:Number(e[2])}:null}function nJ(t){return(t=t.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+t.slice(1)}function Uut(t,e){const r=[];if(t){const n=mE(t);n!=null&&n.title&&r.push(n.title)}if(e){const n=nJ(e);r.push(n)}if(r.length===2){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m3e(t){let e=kp(t,!0);return!!e&&(e=e.toLowerCase(),e.endsWith(".arcgis.com")&&(e.startsWith("services")||e.startsWith("tiles")||e.startsWith("features")))}function Hut(t,e){return t&&i0e(s0e(t,e))}function Gut(t){let{url:e}=t;if(!e)return{url:e};e=s0e(e,t.logger);const r=fd(e),n=mE(r.path);let i;if(n!=null)n.sublayer!=null&&t.layer.layerId==null&&(i=n.sublayer),e=n.url.path;else if(t.nonStandardUrlAllowed){const s=Vut(r.path);s!=null&&(e=s.serviceUrl,i=s.sublayerId)}return{url:i0e(e),layerId:i}}function qut(t,e,r,n,i){T5(e,n,"url",i),n.url&&t.layerId!=null&&(n.url=yw(n.url,r,t.layerId.toString()))}function DLt(t){if(!t)return!1;const e=t.toLowerCase(),r=e.includes("/services/"),n=e.includes("/mapserver/wmsserver"),i=e.includes("/imageserver/wmsserver"),s=e.includes("/wmsserver");return r&&(n||i||s)}const Wut=t=>{let e=class extends t{get title(){if(this._get("title")&&this.originOf("title")!=="defaults")return this._get("title");if(this.url){const r=mE(this.url);if(r!=null&&r.title)return r.title}return this._get("title")||""}set title(r){this._set("title",r)}set url(r){this._set("url",Hut(r,li.getLogger(this)))}};return T([B()],e.prototype,"title",null),T([B({type:String})],e.prototype,"url",null),e=T([_t("esri.layers.mixins.ArcGISService")],e),e};function xO(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Zut(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Yut(t,e,r,n,i,s,o,a,l,u,d,f,m,v,b,M){const O=new Float32Array(16);return O[0]=t,O[1]=e,O[2]=r,O[3]=n,O[4]=i,O[5]=s,O[6]=o,O[7]=a,O[8]=l,O[9]=u,O[10]=d,O[11]=f,O[12]=m,O[13]=v,O[14]=b,O[15]=M,O}function Xut(t,e){return new Float32Array(t,e,16)}const Jut=xO();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:Jut,clone:Zut,create:xO,createView:Xut,fromValues:Yut},Symbol.toStringTag,{value:"Module"}));function Kut(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function l_(t,e,r,n,i,s,o,a,l,u,d,f,m,v,b,M,O){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=s,t[5]=o,t[6]=a,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=m,t[12]=v,t[13]=b,t[14]=M,t[15]=O,t}function wO(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u_(t,e){if(t===e){const r=e[1],n=e[2],i=e[3],s=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=s,t[11]=e[14],t[12]=i,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function Qut(t,e){return g3e(t,e)||wO(t),t}function g3e(t,e){const r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],f=e[9],m=e[10],v=e[11],b=e[12],M=e[13],O=e[14],I=e[15],A=r*a-n*o,j=r*l-i*o,H=r*u-s*o,W=n*l-i*a,re=n*u-s*a,K=i*u-s*l,pe=d*M-f*b,ge=d*O-m*b,fe=d*I-v*b,ee=f*O-m*M,be=f*I-v*M,le=m*I-v*O;let ve=A*le-j*be+H*ee+W*fe-re*ge+K*pe;return ve?(ve=1/ve,t[0]=(a*le-l*be+u*ee)*ve,t[1]=(i*be-n*le-s*ee)*ve,t[2]=(M*K-O*re+I*W)*ve,t[3]=(m*re-f*K-v*W)*ve,t[4]=(l*fe-o*le-u*ge)*ve,t[5]=(r*le-i*fe+s*ge)*ve,t[6]=(O*H-b*K-I*j)*ve,t[7]=(d*K-m*H+v*j)*ve,t[8]=(o*be-a*fe+u*pe)*ve,t[9]=(n*fe-r*be-s*pe)*ve,t[10]=(b*re-M*H+I*A)*ve,t[11]=(f*H-d*re-v*A)*ve,t[12]=(a*ge-o*ee-l*pe)*ve,t[13]=(r*ee-n*ge+i*pe)*ve,t[14]=(M*j-b*W-O*A)*ve,t[15]=(d*W-f*j+m*A)*ve,t):null}function ect(t,e){const r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],f=e[9],m=e[10],v=e[11],b=e[12],M=e[13],O=e[14],I=e[15];return t[0]=a*(m*I-v*O)-f*(l*I-u*O)+M*(l*v-u*m),t[1]=-(n*(m*I-v*O)-f*(i*I-s*O)+M*(i*v-s*m)),t[2]=n*(l*I-u*O)-a*(i*I-s*O)+M*(i*u-s*l),t[3]=-(n*(l*v-u*m)-a*(i*v-s*m)+f*(i*u-s*l)),t[4]=-(o*(m*I-v*O)-d*(l*I-u*O)+b*(l*v-u*m)),t[5]=r*(m*I-v*O)-d*(i*I-s*O)+b*(i*v-s*m),t[6]=-(r*(l*I-u*O)-o*(i*I-s*O)+b*(i*u-s*l)),t[7]=r*(l*v-u*m)-o*(i*v-s*m)+d*(i*u-s*l),t[8]=o*(f*I-v*M)-d*(a*I-u*M)+b*(a*v-u*f),t[9]=-(r*(f*I-v*M)-d*(n*I-s*M)+b*(n*v-s*f)),t[10]=r*(a*I-u*M)-o*(n*I-s*M)+b*(n*u-s*a),t[11]=-(r*(a*v-u*f)-o*(n*v-s*f)+d*(n*u-s*a)),t[12]=-(o*(f*O-m*M)-d*(a*O-l*M)+b*(a*m-l*f)),t[13]=r*(f*O-m*M)-d*(n*O-i*M)+b*(n*m-i*f),t[14]=-(r*(a*O-l*M)-o*(n*O-i*M)+b*(n*l-i*a)),t[15]=r*(a*m-l*f)-o*(n*m-i*f)+d*(n*l-i*a),t}function tct(t){const e=t[0],r=t[1],n=t[2],i=t[3],s=t[4],o=t[5],a=t[6],l=t[7],u=t[8],d=t[9],f=t[10],m=t[11],v=t[12],b=t[13],M=t[14],O=t[15];return(e*o-r*s)*(f*O-m*M)-(e*a-n*s)*(d*O-m*b)+(e*l-i*s)*(d*M-f*b)+(r*a-n*o)*(u*O-m*v)-(r*l-i*o)*(u*M-f*v)+(n*l-i*a)*(u*b-d*v)}function y3e(t,e,r){const n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],u=e[6],d=e[7],f=e[8],m=e[9],v=e[10],b=e[11],M=e[12],O=e[13],I=e[14],A=e[15];let j=r[0],H=r[1],W=r[2],re=r[3];return t[0]=j*n+H*a+W*f+re*M,t[1]=j*i+H*l+W*m+re*O,t[2]=j*s+H*u+W*v+re*I,t[3]=j*o+H*d+W*b+re*A,j=r[4],H=r[5],W=r[6],re=r[7],t[4]=j*n+H*a+W*f+re*M,t[5]=j*i+H*l+W*m+re*O,t[6]=j*s+H*u+W*v+re*I,t[7]=j*o+H*d+W*b+re*A,j=r[8],H=r[9],W=r[10],re=r[11],t[8]=j*n+H*a+W*f+re*M,t[9]=j*i+H*l+W*m+re*O,t[10]=j*s+H*u+W*v+re*I,t[11]=j*o+H*d+W*b+re*A,j=r[12],H=r[13],W=r[14],re=r[15],t[12]=j*n+H*a+W*f+re*M,t[13]=j*i+H*l+W*m+re*O,t[14]=j*s+H*u+W*v+re*I,t[15]=j*o+H*d+W*b+re*A,t}function rct(t,e,r){const n=r[0],i=r[1],s=r[2];if(e===t)t[12]=e[0]*n+e[4]*i+e[8]*s+e[12],t[13]=e[1]*n+e[5]*i+e[9]*s+e[13],t[14]=e[2]*n+e[6]*i+e[10]*s+e[14],t[15]=e[3]*n+e[7]*i+e[11]*s+e[15];else{const o=e[0],a=e[1],l=e[2],u=e[3],d=e[4],f=e[5],m=e[6],v=e[7],b=e[8],M=e[9],O=e[10],I=e[11];t[0]=o,t[1]=a,t[2]=l,t[3]=u,t[4]=d,t[5]=f,t[6]=m,t[7]=v,t[8]=b,t[9]=M,t[10]=O,t[11]=I,t[12]=o*n+d*i+b*s+e[12],t[13]=a*n+f*i+M*s+e[13],t[14]=l*n+m*i+O*s+e[14],t[15]=u*n+v*i+I*s+e[15]}return t}function nct(t,e,r){const n=r[0],i=r[1],s=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ict(t,e,r,n){let i,s,o,a,l,u,d,f,m,v,b,M,O,I,A,j,H,W,re,K,pe,ge,fe,ee,be=n[0],le=n[1],ve=n[2],Pe=Math.sqrt(be*be+le*le+ve*ve);return Pe0?(r[0]=2*(a*o+d*n+l*s-u*i)/f,r[1]=2*(l*o+d*i+u*n-a*s)/f,r[2]=2*(u*o+d*s+a*i-l*n)/f):(r[0]=2*(a*o+d*n+l*s-u*i),r[1]=2*(l*o+d*i+u*n-a*s),r[2]=2*(u*o+d*s+a*i-l*n)),v3e(t,e,r),t}const mct=t_();function gct(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function yct(t,e){const r=e[0],n=e[1],i=e[2],s=e[4],o=e[5],a=e[6],l=e[8],u=e[9],d=e[10];return t[0]=Math.sqrt(r*r+n*n+i*i),t[1]=Math.sqrt(s*s+o*o+a*a),t[2]=Math.sqrt(l*l+u*u+d*d),t}function vct(t,e){const r=e[0]+e[5]+e[10];let n=0;return r>0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t}function _ct(t,e,r,n){const i=e[0],s=e[1],o=e[2],a=e[3],l=i+i,u=s+s,d=o+o,f=i*l,m=i*u,v=i*d,b=s*u,M=s*d,O=o*d,I=a*l,A=a*u,j=a*d,H=n[0],W=n[1],re=n[2];return t[0]=(1-(b+O))*H,t[1]=(m+j)*H,t[2]=(v-A)*H,t[3]=0,t[4]=(m-j)*W,t[5]=(1-(f+O))*W,t[6]=(M+I)*W,t[7]=0,t[8]=(v+A)*re,t[9]=(M-I)*re,t[10]=(1-(f+b))*re,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function xct(t,e,r,n,i){const s=e[0],o=e[1],a=e[2],l=e[3],u=s+s,d=o+o,f=a+a,m=s*u,v=s*d,b=s*f,M=o*d,O=o*f,I=a*f,A=l*u,j=l*d,H=l*f,W=n[0],re=n[1],K=n[2],pe=i[0],ge=i[1],fe=i[2],ee=(1-(M+I))*W,be=(v+H)*W,le=(b-j)*W,ve=(v-H)*re,Pe=(1-(m+I))*re,Fe=(O+A)*re,We=(b+j)*K,He=(O-A)*K,Lt=(1-(m+M))*K;return t[0]=ee,t[1]=be,t[2]=le,t[3]=0,t[4]=ve,t[5]=Pe,t[6]=Fe,t[7]=0,t[8]=We,t[9]=He,t[10]=Lt,t[11]=0,t[12]=r[0]+pe-(ee*pe+ve*ge+We*fe),t[13]=r[1]+ge-(be*pe+Pe*ge+He*fe),t[14]=r[2]+fe-(le*pe+Fe*ge+Lt*fe),t[15]=1,t}function wct(t,e){const r=e[0],n=e[1],i=e[2],s=e[3],o=r+r,a=n+n,l=i+i,u=r*o,d=n*o,f=n*a,m=i*o,v=i*a,b=i*l,M=s*o,O=s*a,I=s*l;return t[0]=1-f-b,t[1]=d+I,t[2]=m-O,t[3]=0,t[4]=d-I,t[5]=1-u-b,t[6]=v+M,t[7]=0,t[8]=m+O,t[9]=v-M,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function bct(t,e,r,n,i,s,o){const a=1/(r-e),l=1/(i-n),u=1/(s-o);return t[0]=2*s*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*l,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*l,t[10]=(o+s)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*s*2*u,t[15]=0,t}function Cct(t,e,r,n,i){const s=1/Math.tan(e/2);let o;return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n),t}function Sct(t,e,r,n){const i=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),u=2/(i+s);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(i-s)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}function Ect(t,e,r,n,i,s,o){const a=1/(e-r),l=1/(n-i),u=1/(s-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*l,t[14]=(o+s)*u,t[15]=1,t}function Mct(t,e,r,n){const i=e[0],s=e[1],o=e[2];let a=i-r[0],l=s-r[1],u=o-r[2];const d=r_();if(Math.abs(a)0&&(v=1/Math.sqrt(v),d*=v,f*=v,m*=v);let b=l*m-u*f,M=u*d-a*m,O=a*f-l*d;return v=b*b+M*M+O*O,v>0&&(v=1/Math.sqrt(v),b*=v,M*=v,O*=v),t[0]=b,t[1]=M,t[2]=O,t[3]=0,t[4]=f*O-m*M,t[5]=m*b-d*O,t[6]=d*M-f*b,t[7]=0,t[8]=d,t[9]=f,t[10]=m,t[11]=0,t[12]=i,t[13]=s,t[14]=o,t[15]=1,t}function Ict(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function Rct(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)}function Lct(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t}function _3e(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function kct(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t}function Act(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t}function Pct(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function $ct(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],u=t[7],d=t[8],f=t[9],m=t[10],v=t[11],b=t[12],M=t[13],O=t[14],I=t[15],A=e[0],j=e[1],H=e[2],W=e[3],re=e[4],K=e[5],pe=e[6],ge=e[7],fe=e[8],ee=e[9],be=e[10],le=e[11],ve=e[12],Pe=e[13],Fe=e[14],We=e[15],He=r_();return Math.abs(r-A)<=He*Math.max(1,Math.abs(r),Math.abs(A))&&Math.abs(n-j)<=He*Math.max(1,Math.abs(n),Math.abs(j))&&Math.abs(i-H)<=He*Math.max(1,Math.abs(i),Math.abs(H))&&Math.abs(s-W)<=He*Math.max(1,Math.abs(s),Math.abs(W))&&Math.abs(o-re)<=He*Math.max(1,Math.abs(o),Math.abs(re))&&Math.abs(a-K)<=He*Math.max(1,Math.abs(a),Math.abs(K))&&Math.abs(l-pe)<=He*Math.max(1,Math.abs(l),Math.abs(pe))&&Math.abs(u-ge)<=He*Math.max(1,Math.abs(u),Math.abs(ge))&&Math.abs(d-fe)<=He*Math.max(1,Math.abs(d),Math.abs(fe))&&Math.abs(f-ee)<=He*Math.max(1,Math.abs(f),Math.abs(ee))&&Math.abs(m-be)<=He*Math.max(1,Math.abs(m),Math.abs(be))&&Math.abs(v-le)<=He*Math.max(1,Math.abs(v),Math.abs(le))&&Math.abs(b-ve)<=He*Math.max(1,Math.abs(b),Math.abs(ve))&&Math.abs(M-Pe)<=He*Math.max(1,Math.abs(M),Math.abs(Pe))&&Math.abs(O-Fe)<=He*Math.max(1,Math.abs(O),Math.abs(Fe))&&Math.abs(I-We)<=He*Math.max(1,Math.abs(I),Math.abs(We))}function Oct(t){const e=r_(),r=t[0],n=t[1],i=t[2],s=t[4],o=t[5],a=t[6],l=t[8],u=t[9],d=t[10];return Math.abs(1-(r*r+s*s+l*l))<=e&&Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(i*i+a*a+d*d))<=e}function Nct(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[4]===0&&t[5]===1&&t[6]===0&&t[8]===0&&t[9]===0&&t[10]===1}const Dct=y3e,Fct=_3e;Object.freeze(Object.defineProperty({__proto__:null,add:Lct,adjoint:ect,copy:Kut,determinant:tct,equals:$ct,exactEquals:Pct,frob:Rct,fromQuat:wct,fromQuat2:pct,fromRotation:cct,fromRotationTranslation:v3e,fromRotationTranslationScale:_ct,fromRotationTranslationScaleOrigin:xct,fromScaling:uct,fromTranslation:lct,fromXRotation:hct,fromYRotation:dct,fromZRotation:fct,frustum:bct,getRotation:vct,getScaling:yct,getTranslation:gct,hasIdentityRotation:Nct,identity:wO,invert:g3e,invertOrIdentity:Qut,isOrthoNormal:Oct,lookAt:Mct,mul:Dct,multiply:y3e,multiplyScalar:kct,multiplyScalarAndAdd:Act,ortho:Ect,perspective:Cct,perspectiveFromFieldOfView:Sct,rotate:ict,rotateX:sct,rotateY:oct,rotateZ:act,scale:nct,set:l_,str:Ict,sub:Fct,subtract:_3e,targetTo:Tct,translate:rct,transpose:u_},Symbol.toStringTag,{value:"Module"}));const zct=(t,e)=>{const r=l_(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return u_(r,r)},Bct=(t,e)=>{const r=l_(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return u_(r,r)},jct=(t,e)=>{const r=1-e,n=l_(t,.2126+.7874*r,.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1);return u_(n,n)},Vct=(t,e)=>{const r=Math.sin(e*Math.PI/180),n=Math.cos(e*Math.PI/180),i=l_(t,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return u_(i,i)},Uct=(t,e)=>{const r=1-2*e,n=l_(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return u_(n,n)},Hct=(t,e)=>{const r=l_(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return u_(r,r)},Gct=(t,e)=>{const r=1-e,n=l_(t,.393+.607*r,.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1);return u_(n,n)};let x3e=class w3e{constructor(e,r,n){this.strength=e,this.radius=r,this.threshold=n,this.type="bloom"}interpolate(e,r,n){this.strength=$d(e.strength,r.strength,n),this.radius=$d(e.radius,r.radius,n),this.threshold=$d(e.threshold,r.threshold,n)}clone(){return new w3e(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:j6(this.radius),strength:this.strength,threshold:this.threshold}}},b3e=class C3e{constructor(e){this.radius=e,this.type="blur"}interpolate(e,r,n){this.radius=Math.round($d(e.radius,r.radius,n))}clone(){return new C3e(this.radius)}toJSON(){return{type:"blur",radius:j6(this.radius)}}},CG=class S3e{constructor(e,r){this.type=e,this.amount=r,this.type!=="invert"&&this.type!=="grayscale"&&this.type!=="sepia"||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,r,n){this.amount=$d(e.amount,r.amount,n),this._updateMatrix()}clone(){return new S3e(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||xO();switch(this.type){case"brightness":this._colorMatrix=zct(e,this.amount);break;case"contrast":this._colorMatrix=Bct(e,this.amount);break;case"grayscale":this._colorMatrix=jct(e,this.amount);break;case"invert":this._colorMatrix=Uct(e,this.amount);break;case"saturate":this._colorMatrix=Hct(e,this.amount);break;case"sepia":this._colorMatrix=Gct(e,this.amount)}}},E3e=class M3e{constructor(e,r,n,i){this.offsetX=e,this.offsetY=r,this.blurRadius=n,this.color=i,this.type="drop-shadow"}interpolate(e,r,n){this.offsetX=$d(e.offsetX,r.offsetX,n),this.offsetY=$d(e.offsetY,r.offsetY,n),this.blurRadius=$d(e.blurRadius,r.blurRadius,n),this.color[0]=Math.round($d(e.color[0],r.color[0],n)),this.color[1]=Math.round($d(e.color[1],r.color[1],n)),this.color[2]=Math.round($d(e.color[2],r.color[2],n)),this.color[3]=$d(e.color[3],r.color[3],n)}clone(){return new M3e(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:j6(this.offsetX),yoffset:j6(this.offsetY),blurRadius:j6(this.blurRadius),color:e}}},T3e=class I3e{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,r,n){this.angle=$d(e.angle,r.angle,n),this._updateMatrix()}clone(){return new I3e(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||xO();this._colorMatrix=Vct(e,this.angle)}},R3e=class L3e{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,r,n){this.amount=$d(e.amount,r.amount,n)}clone(){return new L3e(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}};function $d(t,e,r){return t+(e-t)*r}function j6(t){return Math.round(1e3*Dp(t))/1e3}function qct(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new CG(t.type,0);case"saturate":case"brightness":case"contrast":return new CG(t.type,1);case"opacity":return new R3e(1);case"hue-rotate":return new T3e(0);case"blur":return new b3e(0);case"drop-shadow":return new E3e(0,0,0,[...bX("transparent")]);case"bloom":return new x3e(0,0,1)}}function Wct(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every((n,i)=>n.type===r[i].type)}function Zct(t,e){const r=t.length>e.length?t:e,n=t.length>e.length?e:t;for(let i=n.length;is?i:(s-=i.length,i+(o+=o.repeat(s)).slice(0,s))}function n(i,s){var o,a={},l=(s=s!==void 0?s:{}).grammarSource,u={start:Xi},d=Xi,f="none",m=")",v=",",b="(",M="%",O="px",I="cm",A="mm",j="in",H="pt",W="pc",re="deg",K="rad",pe="grad",ge="turn",fe="#",ee=".",be="e",le=/^[ \t\n\r]/,ve=/^[a-z\-]/,Pe=/^[0-9a-fA-F]/,Fe=/^[+\-]/,We=/^[0-9]/,He=sn("none"),Lt=Lr("none",!1),lt=Lr(")",!1),pt=Lr(",",!1),rr=sn("whitespace"),Tt=hn([" "," ",` +`,"\r"],!1,!1),Je=sn("function"),pr=Lr("(",!1),Ut=sn("identifier"),tr=hn([["a","z"],"-"],!1,!1),Se=sn("percentage"),je=Lr("%",!1),et=sn("length"),yt=Lr("px",!1),we=Lr("cm",!1),ft=Lr("mm",!1),qt=Lr("in",!1),_r=Lr("pt",!1),rt=Lr("pc",!1),Xe=sn("angle"),Ze=Lr("deg",!1),it=Lr("rad",!1),Xt=Lr("grad",!1),xr=Lr("turn",!1),Ur=sn("number"),In=sn("color"),Rr=Lr("#",!1),mn=hn([["0","9"],["a","f"],["A","F"]],!1,!1),Kr=hn(["+","-"],!1,!1),Ft=hn([["0","9"]],!1,!1),xt=Lr(".",!1),vr=Lr("e",!1),Mr=function(){return[]},ar=function(mt,dr){return{type:"function",name:mt,parameters:dr||[]}},ni=function(mt,dr){return dr.length>0?bo(mt,dr,3):[mt]},or=function(mt){return{type:"quantity",value:mt.value,unit:mt.unit}},vt=function(mt){return{type:"color",colorType:mt.type,value:mt.value}},ot=function(mt){return mt},lr=function(){return Br()},br=function(mt){return{value:mt,unit:"%"}},Tr=function(mt){return{value:mt,unit:"px"}},Zn=function(mt){return{value:mt,unit:"cm"}},Gi=function(mt){return{value:mt,unit:"mm"}},zn=function(mt){return{value:mt,unit:"in"}},pi=function(mt){return{value:mt,unit:"pt"}},nt=function(mt){return{value:mt,unit:"pc"}},Me=function(mt){return{value:mt,unit:"deg"}},Ie=function(mt){return{value:mt,unit:"rad"}},Be=function(mt){return{value:mt,unit:"grad"}},ze=function(mt){return{value:mt,unit:"turn"}},At=function(mt){return{value:mt,unit:null}},zt=function(){return{type:"hex",value:Br()}},Yt=function(mt){return{type:"function",value:mt}},wt=function(){return{type:"named",value:Br()}},ur=function(){return parseFloat(Br())},me=0,Ye=0,$t=[{line:1,column:1}],Nt=0,Jt=[],cr=0;if("startRule"in s){if(!(s.startRule in u))throw new Error(`Can't start parsing from rule "`+s.startRule+'".');d=u[s.startRule]}function Br(){return i.substring(Ye,me)}function Lr(mt,dr){return{type:"literal",text:mt,ignoreCase:dr}}function hn(mt,dr,Or){return{type:"class",parts:mt,inverted:dr,ignoreCase:Or}}function mi(){return{type:"end"}}function sn(mt){return{type:"other",description:mt}}function cn(mt){var dr,Or=$t[mt];if(Or)return Or;for(dr=mt-1;!$t[dr];)dr--;for(Or={line:(Or=$t[dr]).line,column:Or.column};drNt&&(Nt=me,Jt=[]),Jt.push(mt))}function _i(mt,dr,Or){return new e(e.buildMessage(mt,dr),mt,dr,Or)}function Xi(){var mt;return(mt=Vi())===a&&(mt=Ta()),mt}function Vi(){var mt,dr;return cr++,mt=me,$n(),i.substr(me,4)===f?(dr=f,me+=4):(dr=a,cr===0&&gn(Lt)),dr!==a?($n(),Ye=mt,mt=Mr()):(me=mt,mt=a),cr--,mt===a&&cr===0&&gn(He),mt}function Ta(){var mt,dr;if(mt=[],(dr=Oi())!==a)for(;dr!==a;)mt.push(dr),dr=Oi();else mt=a;return mt}function Oi(){var mt,dr,Or,Xn;return mt=me,$n(),(dr=wo())!==a?($n(),(Or=Jo())===a&&(Or=null),$n(),i.charCodeAt(me)===41?(Xn=m,me++):(Xn=a,cr===0&&gn(lt)),Xn!==a?($n(),Ye=mt,mt=ar(dr,Or)):(me=mt,mt=a)):(me=mt,mt=a),mt}function Jo(){var mt,dr,Or,Xn,Us,Js,co,il;if(mt=me,(dr=Go())!==a){for(Or=[],Xn=me,Us=$n(),i.charCodeAt(me)===44?(Js=v,me++):(Js=a,cr===0&&gn(pt)),Js===a&&(Js=null),co=$n(),(il=Go())!==a?Xn=Us=[Us,Js,co,il]:(me=Xn,Xn=a);Xn!==a;)Or.push(Xn),Xn=me,Us=$n(),i.charCodeAt(me)===44?(Js=v,me++):(Js=a,cr===0&&gn(pt)),Js===a&&(Js=null),co=$n(),(il=Go())!==a?Xn=Us=[Us,Js,co,il]:(me=Xn,Xn=a);Ye=mt,mt=ni(dr,Or)}else me=mt,mt=a;return mt}function Go(){var mt,dr;return mt=me,(dr=As())===a&&(dr=Xs())===a&&(dr=yl())===a&&(dr=Ko()),dr!==a&&(Ye=mt,dr=or(dr)),(mt=dr)===a&&(mt=me,(dr=Zs())!==a&&(Ye=mt,dr=vt(dr)),mt=dr),mt}function $n(){var mt,dr;for(cr++,mt=[],le.test(i.charAt(me))?(dr=i.charAt(me),me++):(dr=a,cr===0&&gn(Tt));dr!==a;)mt.push(dr),le.test(i.charAt(me))?(dr=i.charAt(me),me++):(dr=a,cr===0&&gn(Tt));return cr--,dr=a,cr===0&&gn(rr),mt}function wo(){var mt,dr,Or;return cr++,mt=me,(dr=aa())!==a?(i.charCodeAt(me)===40?(Or=b,me++):(Or=a,cr===0&&gn(pr)),Or!==a?(Ye=mt,mt=ot(dr)):(me=mt,mt=a)):(me=mt,mt=a),cr--,mt===a&&(dr=a,cr===0&&gn(Je)),mt}function aa(){var mt,dr,Or;if(cr++,mt=me,dr=[],ve.test(i.charAt(me))?(Or=i.charAt(me),me++):(Or=a,cr===0&&gn(tr)),Or!==a)for(;Or!==a;)dr.push(Or),ve.test(i.charAt(me))?(Or=i.charAt(me),me++):(Or=a,cr===0&&gn(tr));else dr=a;return dr!==a&&(Ye=mt,dr=lr()),cr--,(mt=dr)===a&&(dr=a,cr===0&&gn(Ut)),mt}function As(){var mt,dr,Or;return cr++,mt=me,$n(),(dr=Qo())!==a?(i.charCodeAt(me)===37?(Or=M,me++):(Or=a,cr===0&&gn(je)),Or!==a?(Ye=mt,mt=br(dr)):(me=mt,mt=a)):(me=mt,mt=a),cr--,mt===a&&cr===0&&gn(Se),mt}function Xs(){var mt,dr,Or;return cr++,mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===O?(Or=O,me+=2):(Or=a,cr===0&&gn(yt)),Or!==a?(Ye=mt,mt=Tr(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===I?(Or=I,me+=2):(Or=a,cr===0&&gn(we)),Or!==a?(Ye=mt,mt=Zn(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===A?(Or=A,me+=2):(Or=a,cr===0&&gn(ft)),Or!==a?(Ye=mt,mt=Gi(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===j?(Or=j,me+=2):(Or=a,cr===0&&gn(qt)),Or!==a?(Ye=mt,mt=zn(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===H?(Or=H,me+=2):(Or=a,cr===0&&gn(_r)),Or!==a?(Ye=mt,mt=pi(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,$n(),(dr=Qo())!==a?(i.substr(me,2)===W?(Or=W,me+=2):(Or=a,cr===0&&gn(rt)),Or!==a?(Ye=mt,mt=nt(dr)):(me=mt,mt=a)):(me=mt,mt=a)))))),cr--,mt===a&&cr===0&&gn(et),mt}function yl(){var mt,dr,Or;return cr++,mt=me,(dr=Qo())!==a?(i.substr(me,3)===re?(Or=re,me+=3):(Or=a,cr===0&&gn(Ze)),Or!==a?(Ye=mt,mt=Me(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,(dr=Qo())!==a?(i.substr(me,3)===K?(Or=K,me+=3):(Or=a,cr===0&&gn(it)),Or!==a?(Ye=mt,mt=Ie(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,(dr=Qo())!==a?(i.substr(me,4)===pe?(Or=pe,me+=4):(Or=a,cr===0&&gn(Xt)),Or!==a?(Ye=mt,mt=Be(dr)):(me=mt,mt=a)):(me=mt,mt=a),mt===a&&(mt=me,(dr=Qo())!==a?(i.substr(me,4)===ge?(Or=ge,me+=4):(Or=a,cr===0&&gn(xr)),Or!==a?(Ye=mt,mt=ze(dr)):(me=mt,mt=a)):(me=mt,mt=a)))),cr--,mt===a&&(dr=a,cr===0&&gn(Xe)),mt}function Ko(){var mt,dr;return cr++,mt=me,$n(),(dr=Qo())!==a?(Ye=mt,mt=At(dr)):(me=mt,mt=a),cr--,mt===a&&cr===0&&gn(Ur),mt}function Zs(){var mt,dr,Or,Xn;if(cr++,mt=me,i.charCodeAt(me)===35?(dr=fe,me++):(dr=a,cr===0&&gn(Rr)),dr!==a){if(Or=[],Pe.test(i.charAt(me))?(Xn=i.charAt(me),me++):(Xn=a,cr===0&&gn(mn)),Xn!==a)for(;Xn!==a;)Or.push(Xn),Pe.test(i.charAt(me))?(Xn=i.charAt(me),me++):(Xn=a,cr===0&&gn(mn));else Or=a;Or!==a?(Ye=mt,mt=zt()):(me=mt,mt=a)}else me=mt,mt=a;return mt===a&&(mt=me,(dr=Oi())!==a&&(Ye=mt,dr=Yt(dr)),(mt=dr)===a&&(mt=me,(dr=aa())!==a&&(Ye=mt,dr=wt()),mt=dr)),cr--,mt===a&&(dr=a,cr===0&&gn(In)),mt}function Qo(){var mt,dr,Or,Xn,Us,Js,co;for(mt=me,Fe.test(i.charAt(me))?(i.charAt(me),me++):cr===0&&gn(Kr),dr=me,Or=[],We.test(i.charAt(me))?(Xn=i.charAt(me),me++):(Xn=a,cr===0&&gn(Ft));Xn!==a;)Or.push(Xn),We.test(i.charAt(me))?(Xn=i.charAt(me),me++):(Xn=a,cr===0&&gn(Ft));if(i.charCodeAt(me)===46?(Xn=ee,me++):(Xn=a,cr===0&&gn(xt)),Xn!==a){if(Us=[],We.test(i.charAt(me))?(Js=i.charAt(me),me++):(Js=a,cr===0&&gn(Ft)),Js!==a)for(;Js!==a;)Us.push(Js),We.test(i.charAt(me))?(Js=i.charAt(me),me++):(Js=a,cr===0&&gn(Ft));else Us=a;Us!==a?dr=Or=[Or,Xn,Us]:(me=dr,dr=a)}else me=dr,dr=a;if(dr===a)if(dr=[],We.test(i.charAt(me))?(Or=i.charAt(me),me++):(Or=a,cr===0&&gn(Ft)),Or!==a)for(;Or!==a;)dr.push(Or),We.test(i.charAt(me))?(Or=i.charAt(me),me++):(Or=a,cr===0&&gn(Ft));else dr=a;if(dr!==a){if(Or=me,i.charCodeAt(me)===101?(Xn=be,me++):(Xn=a,cr===0&&gn(vr)),Xn!==a){if(Fe.test(i.charAt(me))?(Us=i.charAt(me),me++):(Us=a,cr===0&&gn(Kr)),Us===a&&(Us=null),Js=[],We.test(i.charAt(me))?(co=i.charAt(me),me++):(co=a,cr===0&&gn(Ft)),co!==a)for(;co!==a;)Js.push(co),We.test(i.charAt(me))?(co=i.charAt(me),me++):(co=a,cr===0&&gn(Ft));else Js=a;Js!==a?Or=Xn=[Xn,Us,Js]:(me=Or,Or=a)}else me=Or,Or=a;Or===a&&(Or=null),Ye=mt,mt=ur()}else me=mt,mt=a;return mt}function nl(mt,dr){return mt.map(function(Or){return Or[dr]})}function bo(mt,dr,Or){return[mt].concat(nl(dr,Or))}if((o=d())!==a&&me===i.length)return o;throw o!==a&&me `+d+` +`+m+` | +`+u.line+" | "+v+` +`+m+" | "+r("",l.column-1," ")+r("",b,"^")}else s+=` + at `+d}return s},e.buildMessage=function(i,s){var o={literal:function(v){return'"'+l(v.text)+'"'},class:function(v){var b=v.parts.map(function(M){return Array.isArray(M)?u(M[0])+"-"+u(M[1]):u(M)});return"["+(v.inverted?"^":"")+b.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(v){return v.description}};function a(v){return v.charCodeAt(0).toString(16).toUpperCase()}function l(v){return v.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+a(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+a(b)})}function u(v){return v.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+a(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+a(b)})}function d(v){return o[v.type](v)}function f(v){var b,M,O=v.map(d);if(O.sort(),O.length>0){for(b=1,M=1;b{if(!Number.isFinite(r.scale)||r.scale<=0)throw new Pr("effect:invalid-scale","scale must be finite and greater than 0",{stop:r});return{scale:r.scale,effects:Tie(r.value)}});e.sort((r,n)=>n.effects.length-r.effects.length);for(let r=0;rn.scale-r.scale),e}function Tie(t){let e;if(!t)return[];try{e=Xct.parse(t)}catch(r){throw new Pr("effect:invalid-syntax","Invalid effect syntax",{value:t,error:r})}return e.map(r=>Jct(r))}function Jct(t){try{switch(t.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return Kct(t);case"opacity":return Qct(t);case"hue-rotate":return eht(t);case"blur":return tht(t);case"drop-shadow":return rht(t);case"bloom":return nht(t)}}catch(e){throw e.details.filter=t,e}throw new Pr("effect:unknown-effect",`Effect '${t.name}' is not supported`,{effect:t})}function Kct(t){let e=1;return g7(t.parameters,1),t.parameters.length===1&&(e=P1(t.parameters[0])),new CG(t.name,e)}function Qct(t){let e=1;return g7(t.parameters,1),t.parameters.length===1&&(e=P1(t.parameters[0])),new R3e(e)}function eht(t){let e=0;return g7(t.parameters,1),t.parameters.length===1&&(e=uht(t.parameters[0])),new T3e(e)}function tht(t){let e=0;return g7(t.parameters,1),t.parameters.length===1&&(e=oJ(t.parameters[0]),gE(e,t.parameters[0])),new b3e(e)}function rht(t){const e=[];let r=null;for(const n of t.parameters)if(n.type==="color"){if(e.length&&Object.freeze(e),r)throw new Pr("effect:type-error","Accepts only one color",{});r=cht(n)}else{const i=oJ(n);if(Object.isFrozen(e))throw new Pr("effect:type-error"," parameters not consecutive",{lengths:e});e.push(i),e.length===3&&gE(i,n)}if(e.length<2||e.length>3)throw new Pr("effect:type-error",`Expected {2,3}, Actual: {${e.length}}`,{lengths:e});return new E3e(e[0],e[1],e[2]||0,r||P3e("black"))}function nht(t){let e=1,r=0,n=0;return g7(t.parameters,3),t.parameters[0]&&(e=P1(t.parameters[0])),t.parameters[1]&&(r=oJ(t.parameters[1]),gE(r,t.parameters[1])),t.parameters[2]&&(n=P1(t.parameters[2])),new x3e(e,r,n)}function g7(t,e){if(t.length>e)throw new Pr("effect:type-error",`Function supports up to ${e} parameters, Actual: ${t.length}`,{parameters:t})}function bO(t){if(t.type==="color")return"";if(t.unit){if(t.unit in sJ)return"";if(t.unit in iJ)return"";if(t.unit==="%")return""}return""}function gE(t,e){if(t<0)throw new Pr("effect:type-error",`Negative values are not allowed, Actual: ${t}`,{term:e})}function iht(t){if(t.type!=="quantity"||t.unit!==null)throw new Pr("effect:type-error",`Expected , Actual: ${bO(t)}`,{term:t})}function sht(t){if(t.type!=="quantity"||t.unit!==null&&t.unit!=="%")throw new Pr("effect:type-error",`Expected or , Actual: ${bO(t)}`,{term:t})}const iJ={deg:1,grad:.9,rad:180/Math.PI,turn:360};function oht(t){if(t.type!=="quantity"||!(t.value===0&&t.unit===null||t.unit&&iJ[t.unit]!=null))throw new Pr("effect:type-error",`Expected , Actual: ${bO(t)}`,{term:t})}const sJ={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function aht(t){if(t.type!=="quantity"||!(t.value===0&&t.unit===null||t.unit&&sJ[t.unit]!=null))throw new Pr("effect:type-error",`Expected , Actual: ${bO(t)}`,{term:t})}function P1(t){sht(t);const e=t.value;return gE(e,t),t.unit==="%"?.01*e:e}function lht(t){return iht(t),gE(t.value,t),t.value}function uht(t){return oht(t),t.value*iJ[t.unit]||0}function oJ(t){return aht(t),t.value*sJ[t.unit]||0}function cht(t){switch(t.colorType){case"hex":return oit(t.value);case"named":return P3e(t.value);case"function":return fht(t.value)}}function P3e(t){if(!i2e(t))throw new Pr("effect:unknown-color",`color '${t}' isn't valid`,{namedColor:t});return sit(t)}const hht=/^rgba?/i,dht=/^hsla?/i;function fht(t){if(g7(t.parameters,4),hht.test(t.name))return[P1(t.parameters[0]),P1(t.parameters[1]),P1(t.parameters[2]),t.parameters[3]?P1(t.parameters[3]):1];if(dht.test(t.name))return s2e(lht(t.parameters[0]),P1(t.parameters[1]),P1(t.parameters[2]),t.parameters[3]?P1(t.parameters[3]):1);throw new Pr("effect:syntax-error",`Invalid color function '${t.name}'`,{colorFunction:t})}function XC(t,e,r){var n;try{return mht(t)}catch(i){(n=r==null?void 0:r.messages)==null||n.push(i)}return null}function JC(t,e,r,n){try{const i=pht(t);Ph(r,i,e)}catch(i){n.messages&&n.messages.push(i)}}function pht(t){const e=A3e(t);return e?Yct(e)?e.map(r=>r.toJSON()):e.map(({scale:r,effects:n})=>({scale:r,value:n.map(i=>i.toJSON())})):null}function mht(t){if(!t||t.length===0)return null;if(ght(t)){const e=[];for(const r of t)e.push({scale:r.scale,value:Iie(r.value)});return e}return Iie(t)}function ght(t){const e=t[0];return!!e&&"scale"in e}function Iie(t){if(!(t!=null&&t.length))return"";const e=[];for(const r of t){let n=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":n=[Qm(r,"amount")];break;case"blur":n=[Qm(r,"radius","pt")];break;case"hue-rotate":n=[Qm(r,"angle","deg")];break;case"drop-shadow":n=[Qm(r,"xoffset","pt"),Qm(r,"yoffset","pt"),Qm(r,"blurRadius","pt"),yht(r,"color")];break;case"bloom":n=[Qm(r,"strength"),Qm(r,"radius","pt"),Qm(r,"threshold")]}const i=`${r.type}(${n.filter(Boolean).join(" ")})`;A3e(i),e.push(i)}return e.join(" ")}function Qm(t,e,r){if(t[e]==null)throw new Pr("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});return r?t[e]+r:""+t[e]}function yht(t,e){if(t[e]==null)throw new Pr("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});const r=t[e];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}const vht={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0},"portal-item":{read:!0,write:!0}}}},Rie={read:{reader:XC},write:{allowNull:!0,writer:JC}},_ht={json:{read:!1,write:!1,origins:{"web-map":Rie,"portal-item":Rie}}},xht=t=>{let e=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return T([B(vht)],e.prototype,"blendMode",void 0),T([B(_ht)],e.prototype,"effect",void 0),e=T([_t("esri.layers.mixins.BlendLayer")],e),e},wht=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return T([B({type:Object,json:{write:{overridePolicy:r=>({enabled:!!(r&&Object.keys(r).length>0)})}}})],e.prototype,"customParameters",void 0),e=T([_t("esri.layers.mixins.CustomParametersMixin")],e),e},bht=hNe(),$3e=new Map,O3e=new Map;async function FLt(t,e,r){if(!t||!r)return!1;if(!e)return!0;const n=new URL(t).host;let i=$3e.get(n);if(!i){const s=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");i=(await sa(s,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return i===e}async function zLt(t,e,r=!1){var s,o,a;if(!t||!e)return!0;const n=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=(s=O3e.get(n))==null?void 0:s.entries();if(i){for(const[l,u]of i)if(u.name===e){const d=!((o=u.stack)!=null&&o.hasForwardEdits());if(!d&&r){const[{deleteForwardEdits:f},{default:m}]=await Promise.all([fs(()=>import("./deleteForwardEdits-7rqcQUX6.js"),__vite__mapDeps([125,51])),fs(()=>import("./DeleteForwardEditsParameters-B8V2t6bp.js"),[])]),v=await f(n,l,new m({sessionId:bht,moment:u.moment}));return v.success&&((a=u.stack)==null||a.clearForwardEdits()),v.success}return d}}return!0}function Cht(t,e){var i;if(!t)return!1;const r=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=(i=O3e.get(r))==null?void 0:i.entries();if(n){for(const[s,o]of n)if(o.name===e)return o.lockType==="edit"}return!1}const aJ=new Kw.EventEmitter;function Sht(t){return aJ.on("apply-edits",new WeakRef(t))}function Eht(t){return aJ.on("update-moment",new WeakRef(t))}function BLt(t,e,r=null,n=!1){const i=Mp();return n=e==null||n,aJ.emit("apply-edits",{serviceUrl:t,layerId:e,gdbVersion:r,mayReceiveServiceEdits:n,result:i.promise}),i}const N3e=Symbol();function jLt(t){return t!=null&&typeof t=="object"&&N3e in t}function J8(t){return t!=null&&typeof t=="object"&&"gdbVersion"in t}function oz(t,e,r){const n=new URL(t).host,i=$3e.get(n),s=o=>!o||o===i;return s(e)&&s(r)||e===r}const Mht=t=>{var e;let r=class extends t{constructor(...n){super(...n),this[e]=!0,this._applyEditsHandler=i=>{const{serviceUrl:s,layerId:o,gdbVersion:a,mayReceiveServiceEdits:l,result:u}=i,d=s===this.url,f=o!=null&&this.layerId!=null&&o===this.layerId,m=J8(this),v=J8(this)&&oz(s,a,this.gdbVersion);if(!d||m&&!v||!f&&!l)return;const b=u.then(M=>{var A;if(this.lastEditsEventDate=new Date,f&&(M.addedFeatures.length||M.updatedFeatures.length||M.deletedFeatures.length||M.addedAttachments.length||M.updatedAttachments.length||M.deletedAttachments.length))return this.emit("edits",Qt(M)),M;const O=(A=M.editedFeatures)==null?void 0:A.find(({layerId:j})=>j===this.layerId);if(O){const{adds:j,updates:H,deletes:W}=O.editedFeatures,re={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:j?j.map(({attributes:K})=>({objectId:this.objectIdField&&K[this.objectIdField],globalId:this.globalIdField&&K[this.globalIdField]})):[],deletedFeatures:W?W.map(({attributes:K})=>({objectId:this.objectIdField&&K[this.objectIdField],globalId:this.globalIdField&&K[this.globalIdField]})):[],updatedFeatures:H?H.map(({current:{attributes:K}})=>({objectId:this.objectIdField&&K[this.objectIdField],globalId:this.globalIdField&&K[this.globalIdField]})):[],editedFeatures:Qt(M.editedFeatures),exceededTransferLimit:!1,historicMoment:Qt(M.historicMoment)};return this.emit("edits",re),re}const I={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:Qt(M.editedFeatures),exceededTransferLimit:!1,historicMoment:Qt(M.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(s,a,I.historicMoment)&&this.emit("edits",I),I}).then(M=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(s,a,M.historicMoment)&&(this.historicMoment=M.historicMoment),M));this.emit("apply-edits",{result:b})},this._updateMomentHandler=i=>{const{serviceUrl:s,gdbVersion:o,moment:a}=i,l=s===this.url,u=J8(this),d=J8(this)&&oz(s,o,this.gdbVersion),f=J8(this)&&!oz(s,this.gdbVersion,null);l&&u&&d&&f&&"historicMoment"in this&&this.historicMoment!==a&&(this.historicMoment=a)},this.when().then(()=>{this.addHandles(Sht(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(Eht(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(n,i,s){return"historicMoment"in this&&this.historicMoment!==s&&Cht(n,i)}};return e=N3e,T([B()],r.prototype,"lastEditsEventDate",void 0),r=T([_t("esri.layers.mixins.EditBusLayer")],r),r};var SG;let Ux=SG=class extends qr{constructor(t){super(t),this.type="map-layer"}clone(){const{mapLayerId:t,gdbVersion:e}=this;return new SG({mapLayerId:t,gdbVersion:e})}};T([ji({mapLayer:"map-layer"})],Ux.prototype,"type",void 0),T([B({type:Qa,json:{write:!0}})],Ux.prototype,"mapLayerId",void 0),T([B({type:String,json:{write:!0}})],Ux.prototype,"gdbVersion",void 0),Ux=SG=T([_t("esri.layers.support.source.MapLayerSource")],Ux);var EG;let gg=EG=class extends qr{constructor(t){super(t),this.type="query-table"}clone(){const{workspaceId:t,query:e,oidFields:r,spatialReference:n,geometryType:i}=this,s={workspaceId:t,query:e,oidFields:r,spatialReference:(n==null?void 0:n.clone())??void 0,geometryType:i};return new EG(s)}};T([ji({queryTable:"query-table"})],gg.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],gg.prototype,"workspaceId",void 0),T([B({type:String,json:{write:!0}})],gg.prototype,"query",void 0),T([B({type:String,json:{write:!0}})],gg.prototype,"oidFields",void 0),T([B({type:mo,json:{write:!0}})],gg.prototype,"spatialReference",void 0),T([ji(mnt)],gg.prototype,"geometryType",void 0),gg=EG=T([_t("esri.layers.support.source.QueryTableDataSource")],gg);var MG;let Hx=MG=class extends qr{constructor(t){super(t),this.type="raster"}clone(){const{workspaceId:t,dataSourceName:e}=this;return new MG({workspaceId:t,dataSourceName:e})}};T([ji({raster:"raster"})],Hx.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],Hx.prototype,"dataSourceName",void 0),T([B({type:String,json:{write:!0}})],Hx.prototype,"workspaceId",void 0),Hx=MG=T([_t("esri.layers.support.source.RasterDataSource")],Hx);var TG;let A3=TG=class extends qr{constructor(t){super(t),this.type="table"}clone(){const{workspaceId:t,gdbVersion:e,dataSourceName:r}=this;return new TG({workspaceId:t,gdbVersion:e,dataSourceName:r})}};T([ji({table:"table"})],A3.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],A3.prototype,"workspaceId",void 0),T([B({type:String,json:{write:!0}})],A3.prototype,"gdbVersion",void 0),T([B({type:String,json:{write:!0}})],A3.prototype,"dataSourceName",void 0),A3=TG=T([_t("esri.layers.support.source.TableDataSource")],A3);var IG,RG;const Tht=Dh()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let vf=IG=class extends qr{constructor(t){super(t),this.type="join-table"}readLeftTableSource(t,e,r){return Lie()(t,e,r)}castLeftTableSource(t){return um(LG(),t)}readRightTableSource(t,e,r){return Lie()(t,e,r)}castRightTableSource(t){return um(LG(),t)}clone(){const{leftTableKey:t,rightTableKey:e,leftTableSource:r,rightTableSource:n,joinType:i}=this,s={leftTableKey:t,rightTableKey:e,leftTableSource:(r==null?void 0:r.clone())??void 0,rightTableSource:(n==null?void 0:n.clone())??void 0,joinType:i};return new IG(s)}};T([ji({joinTable:"join-table"})],vf.prototype,"type",void 0),T([B({type:String,json:{write:!0}})],vf.prototype,"leftTableKey",void 0),T([B({type:String,json:{write:!0}})],vf.prototype,"rightTableKey",void 0),T([B({json:{write:!0}})],vf.prototype,"leftTableSource",void 0),T([un("leftTableSource")],vf.prototype,"readLeftTableSource",null),T([Pl("leftTableSource")],vf.prototype,"castLeftTableSource",null),T([B({json:{write:!0}})],vf.prototype,"rightTableSource",void 0),T([un("rightTableSource")],vf.prototype,"readRightTableSource",null),T([Pl("rightTableSource")],vf.prototype,"castRightTableSource",null),T([ji(Tht)],vf.prototype,"joinType",void 0),vf=IG=T([_t("esri.layers.support.source.JoinTableDataSource")],vf);let az=null;function Lie(){return az||(az=Xw({types:LG()})),az}let lz=null;function LG(){return lz||(lz={key:"type",base:null,typeMap:{"data-layer":$1,"map-layer":Ux}}),lz}const Iht={key:"type",base:null,typeMap:{"join-table":vf,"query-table":gg,raster:Hx,table:A3}};let $1=RG=class extends qr{constructor(t){super(t),this.type="data-layer"}clone(){const{fields:t,dataSource:e}=this;return new RG({fields:t,dataSource:e})}};T([ji({dataLayer:"data-layer"})],$1.prototype,"type",void 0),T([B({type:[rJ],json:{write:!0}})],$1.prototype,"fields",void 0),T([B({types:Iht,json:{write:!0}})],$1.prototype,"dataSource",void 0),$1=RG=T([_t("esri.layers.support.source.DataLayerSource")],$1),$1.from=gc($1);let P3=class extends Fa(qr){constructor(e){super(e),this.onFields=null,this.operator=null,this.searchTerm=null,this.searchType=null}};T([B({type:[String],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.onFields!=null&&this.onFields.length>0}}}}})],P3.prototype,"onFields",void 0),T([B({type:String,json:{write:!0}})],P3.prototype,"operator",void 0),T([B({type:String,json:{write:!0}})],P3.prototype,"searchTerm",void 0),T([B({type:String,json:{write:!0}})],P3.prototype,"searchType",void 0),P3=T([_t("esri.rest.support.FullTextSearch")],P3);const Rht=P3;var kG;const kie=new ro({upperLeft:"upper-left",lowerLeft:"lower-left"});let $3=kG=class extends qr{constructor(t){super(t),this.extent=null,this.mode="view",this.originPosition="upper-left",this.tolerance=1}clone(){return new kG(Qt({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}};T([B({type:Mu,json:{write:{overridePolicy(){return{enabled:this.mode==="view"}}}}})],$3.prototype,"extent",void 0),T([B({type:["view","edit"],json:{write:!0}})],$3.prototype,"mode",void 0),T([B({type:String,json:{read:kie.read,write:kie.write}})],$3.prototype,"originPosition",void 0),T([B({type:Number,json:{write:{overridePolicy(){return{enabled:this.mode==="view"}}}}})],$3.prototype,"tolerance",void 0),$3=kG=T([_t("esri.rest.support.QuantizationParameters")],$3);const Lht=$3,kht=new ro({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"});var AG;const Aie=new ro({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete",EnvelopeAggregate:"envelope-aggregate",CentroidAggregate:"centroid-aggregate",ConvexHullAggregate:"convex-hull-aggregate"});let I1=AG=class extends qr{constructor(t){super(t),this.maxPointCount=void 0,this.maxRecordCount=void 0,this.maxVertexCount=void 0,this.onStatisticField=null,this.outStatisticFieldName=null,this.statisticType=null,this.statisticParameters=null}writeStatisticParameters(t,e){this.statisticType!=="percentile-continuous"&&this.statisticType!=="percentile-discrete"||(e.statisticParameters=Qt(t))}clone(){return new AG({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:Qt(this.statisticParameters)})}};T([B({type:Number,json:{write:!0}})],I1.prototype,"maxPointCount",void 0),T([B({type:Number,json:{write:!0}})],I1.prototype,"maxRecordCount",void 0),T([B({type:Number,json:{write:!0}})],I1.prototype,"maxVertexCount",void 0),T([B({type:String,json:{write:!0}})],I1.prototype,"onStatisticField",void 0),T([B({type:String,json:{write:!0}})],I1.prototype,"outStatisticFieldName",void 0),T([B({type:String,json:{read:{source:"statisticType",reader:Aie.read},write:{target:"statisticType",writer:Aie.write}}})],I1.prototype,"statisticType",void 0),T([B({type:Object})],I1.prototype,"statisticParameters",void 0),T([On("statisticParameters")],I1.prototype,"writeStatisticParameters",null),I1=AG=T([_t("esri.rest.support.StatisticDefinition")],I1);const Aht=I1;var qL;const Pht=new ro({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let Wi=qL=class extends qr{static from(t){return qZ(qL,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(t){return typeof t=="number"||typeof t=="object"?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const n in t){const i=t[n];Array.isArray(i)?r[n]=i.map(s=>s instanceof Date?s.getTime():s):i instanceof Date?r[n]=i.getTime():r[n]=i}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new qL(Qt({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:this.historicMoment!=null?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}};Wi.MAX_MAX_RECORD_COUNT_FACTOR=5,T([B({json:{write:!0}})],Wi.prototype,"aggregateIds",void 0),T([B({type:Boolean,json:{write:!0}})],Wi.prototype,"cacheHint",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"compactGeometryEnabled",void 0),T([B({json:{write:!0}})],Wi.prototype,"datumTransformation",void 0),T([Pl("datumTransformation")],Wi.prototype,"castDatumTransformation",null),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"defaultSpatialReferenceEnabled",void 0),T([B({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],Wi.prototype,"distance",void 0),T([B({type:$1,json:{write:!0}})],Wi.prototype,"dynamicDataSource",void 0),T([B({type:String,json:{write:!0}})],Wi.prototype,"formatOf3DObjects",void 0),T([B({type:[Rht],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.fullText!=null&&this.fullText.length>0}}}}})],Wi.prototype,"fullText",void 0),T([B({type:String,json:{write:!0}})],Wi.prototype,"gdbVersion",void 0),T([B({types:a7,json:{read:oE,write:!0}})],Wi.prototype,"geometry",void 0),T([B({type:Number,json:{write:!0}})],Wi.prototype,"geometryPrecision",void 0),T([B({type:[String],json:{write:!0}})],Wi.prototype,"groupByFieldsForStatistics",void 0),T([B({type:String,json:{write:!0}})],Wi.prototype,"having",void 0),T([B({type:Date})],Wi.prototype,"historicMoment",void 0),T([On("historicMoment")],Wi.prototype,"writeHistoricMoment",null),T([B({type:Number,json:{write:!0}})],Wi.prototype,"maxAllowableOffset",void 0),T([B({type:Number,cast:t=>t<1?1:t>Wi.MAX_MAX_RECORD_COUNT_FACTOR?Wi.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],Wi.prototype,"maxRecordCountFactor",void 0),T([B({type:["xyFootprint"],json:{write:!0}})],Wi.prototype,"multipatchOption",void 0),T([B({type:Number,json:{read:{source:"resultRecordCount"}}})],Wi.prototype,"num",void 0),T([B({json:{write:!0}})],Wi.prototype,"objectIds",void 0),T([B({type:[String],json:{write:!0}})],Wi.prototype,"orderByFields",void 0),T([B({type:[String],json:{write:!0}})],Wi.prototype,"outFields",void 0),T([B({type:mo,json:{name:"outSR",write:!0}})],Wi.prototype,"outSpatialReference",void 0),T([B({type:[Aht],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.outStatistics!=null&&this.outStatistics.length>0}}}}})],Wi.prototype,"outStatistics",void 0),T([B({json:{write:!0}})],Wi.prototype,"parameterValues",void 0),T([On("parameterValues")],Wi.prototype,"writeParameterValues",null),T([B({type:iu,json:{write:!0}})],Wi.prototype,"pixelSize",void 0),T([B({type:Lht,json:{write:!0}})],Wi.prototype,"quantizationParameters",void 0),T([B({type:[Object],json:{write:!0}})],Wi.prototype,"rangeValues",void 0),T([B({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:this.spatialRelationship==="relation"}}}}})],Wi.prototype,"relationParameter",void 0),T([B({type:String,json:{write:!0}})],Wi.prototype,"resultType",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"returnCentroid",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"returnDistinctValues",void 0),T([B({type:Boolean,json:{default:!0,write:!0}})],Wi.prototype,"returnExceededLimitFeatures",void 0),T([B({type:Boolean,json:{write:!0}})],Wi.prototype,"returnGeometry",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"returnQueryGeometry",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"returnM",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],Wi.prototype,"returnZ",void 0),T([B({type:mo,json:{write:!0}})],Wi.prototype,"sourceSpatialReference",void 0),T([ji(kht,{ignoreUnknown:!1,name:"spatialRel"})],Wi.prototype,"spatialRelationship",void 0),T([B({type:Number,json:{read:{source:"resultOffset"}}})],Wi.prototype,"start",void 0),T([On("start"),On("num")],Wi.prototype,"writeStart",null),T([B({type:String,json:{write:!0}})],Wi.prototype,"sqlFormat",void 0),T([B({type:String,json:{write:!0}})],Wi.prototype,"text",void 0),T([B({type:ay,json:{write:!0}})],Wi.prototype,"timeExtent",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],Wi.prototype,"timeReferenceUnknownClient",void 0),T([ji(Pht,{ignoreUnknown:!1}),B({json:{write:{overridePolicy(t){return{enabled:!!t&&this.distance!=null&&this.distance>0}}}}})],Wi.prototype,"units",void 0),T([B({type:String,json:{write:{overridePolicy(t){return{enabled:t!=null||this.start!=null&&this.start>0}}}}})],Wi.prototype,"where",void 0),T([On("where")],Wi.prototype,"writeWhere",null),Wi=qL=T([_t("esri.rest.support.Query")],Wi);const c_=Wi;var PG;const uz=new ro({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),cz=new ro({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let z0=PG=class extends qr{constructor(t){super(t),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(t={}){const{where:e,geometry:r,spatialRelationship:n,timeExtent:i,objectIds:s,units:o,distance:a}=this;return new c_({geometry:Qt(r),objectIds:Qt(s),spatialRelationship:n,timeExtent:Qt(i),where:e,units:o,distance:a,...t})}clone(){const{where:t,geometry:e,spatialRelationship:r,timeExtent:n,objectIds:i,units:s,distance:o}=this;return new PG({geometry:Qt(e),objectIds:Qt(i),spatialRelationship:r,timeExtent:Qt(n),where:t,units:s,distance:o})}};T([B({type:String,json:{write:!0}})],z0.prototype,"where",void 0),T([B({types:a7,json:{write:!0}})],z0.prototype,"geometry",void 0),T([B({type:uz.apiValues,json:{name:"spatialRel",read:{reader:uz.read},write:{allowNull:!1,writer:uz.write,overridePolicy(){return{enabled:this.geometry!=null}}}}})],z0.prototype,"spatialRelationship",void 0),T([B({type:Number,json:{write:{overridePolicy(t){return{enabled:t!=null&&this.geometry!=null}}}}})],z0.prototype,"distance",void 0),T([B({type:[Number],json:{write:!0}})],z0.prototype,"objectIds",void 0),T([B({type:cz.apiValues,json:{read:cz.read,write:{writer:cz.write,overridePolicy(t){return{enabled:t!=null&&this.geometry!=null}}}}})],z0.prototype,"units",void 0),T([B({type:ay,json:{write:!0}})],z0.prototype,"timeExtent",void 0),z0=PG=T([_t("esri.layers.support.FeatureFilter")],z0);const $ht=z0;var $G;const Pie={read:{reader:XC},write:{writer:JC,overridePolicy(){return{allowNull:this.excludedEffect!=null,isRequired:this.excludedEffect==null}}}},$ie={read:{reader:XC},write:{writer:JC,overridePolicy(){return{allowNull:this.includedEffect!=null,isRequired:this.includedEffect==null}}}},Oie={name:"showExcludedLabels",default:!0};let O3=$G=class extends qr{constructor(t){super(t),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(t,e){var n,i;const r=super.write(t,e);if(e!=null&&e.origin){if(r.filter){const s=Object.keys(r.filter);if(s.length>1||s[0]!=="where")return(n=e.messages)==null||n.push(new Pr("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:e.layer,effect:this})),null}if("showExcludedLabels"in r)return(i=e.messages)==null||i.push(new Pr("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:e.layer,effect:this})),null}return r}clone(){return new $G({filter:this.filter!=null?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};T([B({type:$ht,json:{write:{allowNull:!0,writer(t,e,r,n){const i=t==null?void 0:t.write({},n);i&&Object.keys(i).length!==0?Ph(r,i,e):Ph(r,null,e)}}}})],O3.prototype,"filter",void 0),T([B({json:{read:XC,write:{writer:JC,allowNull:!0},origins:{"web-map":Pie,"portal-item":Pie}}})],O3.prototype,"includedEffect",void 0),T([B({json:{read:XC,write:{writer:JC,allowNull:!0},origins:{"web-map":$ie,"portal-item":$ie}}})],O3.prototype,"excludedEffect",void 0),T([B({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":Oie,"portal-item":Oie}}})],O3.prototype,"excludedLabelsVisible",void 0),O3=$G=T([_t("esri.layers.support.FeatureEffect")],O3);const Oht=O3,Nie={write:{allowNull:!0}},Nht={type:Oht,json:{origins:{"web-map":Nie,"portal-item":Nie}}},Dht=t=>{let e=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return T([B(Nht)],e.prototype,"featureEffect",void 0),e=T([_t("esri.layers.mixins.FeatureEffectLayer")],e),e};var e6;const QA=Dh()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),D3e=QA.jsonValues.slice();_Le(D3e,"orthometric");const V6=Dh()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let R1=e6=class extends qr{constructor(t){super(t),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(t,e,r){return QA.write(t,e,r)}readHeightModel(t,e,r){return QA.read(t)||(r!=null&&r.messages&&r.messages.push(Fht(t,{context:r})),null)}readHeightUnit(t,e,r){return V6.read(t)||(r!=null&&r.messages&&r.messages.push(Die(t,{context:r})),null)}readHeightUnitService(t,e,r){return pve(t)||V6.read(t)||(r!=null&&r.messages&&r.messages.push(Die(t,{context:r})),null)}readVertCRS(t,e){return e.vertCRS||e.ellipsoid||e.geoid}clone(){return new e6({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(t){return!!t&&(this===t||this.heightModel===t.heightModel&&this.heightUnit===t.heightUnit&&this.vertCRS===t.vertCRS)}static deriveUnitFromSR(t,e){const r=grt(e);return new e6({heightModel:t.heightModel,heightUnit:r??void 0,vertCRS:t.vertCRS})}write(t,e){return e={origin:"web-scene",...e},super.write(t,e)}static fromJSON(t){if(!t)return null;const e=new e6;return e.read(t,{origin:"web-scene"}),e}};function Die(t,e){return new cm("height-unit:unsupported",`Height unit of value '${t}' is not supported`,e)}function Fht(t,e){return new cm("height-model:unsupported",`Height model of value '${t}' is not supported`,e)}T([B({type:QA.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:D3e,default:"ellipsoidal"}}}})],R1.prototype,"heightModel",void 0),T([On("web-scene","heightModel")],R1.prototype,"writeHeightModel",null),T([un(["web-scene","service"],"heightModel")],R1.prototype,"readHeightModel",null),T([B({type:V6.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:V6.jsonValues,write:V6.write}}}})],R1.prototype,"heightUnit",void 0),T([un("web-scene","heightUnit")],R1.prototype,"readHeightUnit",null),T([un("service","heightUnit")],R1.prototype,"readHeightUnitService",null),T([B({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],R1.prototype,"vertCRS",void 0),T([un("service","vertCRS",["vertCRS","ellipsoid","geoid"])],R1.prototype,"readVertCRS",null),R1=e6=T([_t("esri.geometry.HeightModelInfo")],R1);const zht=R1;var OG;let t6=OG=class extends qr{constructor(t){super(t)}async collectRequiredFields(t,e){return o0(t,e,this.expression)}clone(){return new OG({expression:this.expression,title:this.title})}equals(t){return this.expression===t.expression&&this.title===t.title}};T([B({type:String,json:{write:!0}})],t6.prototype,"expression",void 0),T([B({type:String,json:{write:!0}})],t6.prototype,"title",void 0),t6=OG=T([_t("esri.symbols.support.FeatureExpressionInfo")],t6);const Fie=t6;function ULt(t){return 1/(UX[t]||1)}function Bht(){const t=Object.keys(UX);return t.sort(),t}const jht=Bht();var NG;const uI=Dh()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),zie=new ro({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let yg=NG=class extends qr{constructor(t){super(t),this.offset=null}readFeatureExpressionInfo(t,e){return t??(e.featureExpression&&e.featureExpression.value===0?{expression:"0"}:void 0)}writeFeatureExpressionInfo(t,e,r,n){e[r]=t.write({},n),t.expression==="0"&&(e.featureExpression={value:0})}get mode(){const{offset:t,featureExpressionInfo:e}=this;return this._isOverridden("mode")?this._get("mode"):t!=null||e?"relative-to-ground":"on-the-ground"}set mode(t){this._override("mode",t)}set unit(t){this._set("unit",t)}write(t,e){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(t,e):null}clone(){return new NG({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(t){return this.mode===t.mode&&this.offset===t.offset&&this.unit===t.unit&&OLe(this.featureExpressionInfo,t.featureExpressionInfo)}};T([B({type:Fie,json:{write:!0}})],yg.prototype,"featureExpressionInfo",void 0),T([un("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],yg.prototype,"readFeatureExpressionInfo",null),T([On("featureExpressionInfo",{featureExpressionInfo:{type:Fie},"featureExpression.value":{type:[0]}})],yg.prototype,"writeFeatureExpressionInfo",null),T([B({type:uI.apiValues,nonNullable:!0,json:{type:uI.jsonValues,read:uI.read,write:{writer:uI.write,isRequired:!0}}})],yg.prototype,"mode",null),T([B({type:Number,json:{write:!0}})],yg.prototype,"offset",void 0),T([B({type:jht,json:{type:String,read:zie.read,write:zie.write}})],yg.prototype,"unit",null),yg=NG=T([_t("esri.symbols.support.ElevationInfo")],yg);const Vht=yg,Uht={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:mc}}},lJ={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(t,e)=>!e.disablePopup},write:{enabled:!0,writer(t,e,r){e[r]=!t}}}},uJ={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:mc}}},Hht={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:T5}}},Ght={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:mc}}},qht={value:null,type:Vht,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:mc}}};function HLt(t){return{type:t,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const F3e={write:{enabled:!0,layerContainerTypes:mc},read:!0},DG={type:Number,json:{origins:{"web-document":F3e,"portal-item":{write:!0}}}},Wht={...DG,json:{...DG.json,origins:{"web-document":{...F3e,write:{enabled:!0,layerContainerTypes:mc,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(t,e,r)=>{var n;return r&&r.origin!=="service"||!e.drawingInfo||e.drawingInfo.transparency===void 0?(n=e.layerDefinition)!=null&&n.drawingInfo&&e.layerDefinition.drawingInfo.transparency!==void 0?XA(e.layerDefinition.drawingInfo.transparency):void 0:XA(e.drawingInfo.transparency)}}}},GLt={type:Mu,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(t,e)=>{const r=Mu.fromJSON(t);return e.spatialReference!=null&&typeof e.spatialReference=="object"&&(r.spatialReference=mo.fromJSON(e.spatialReference)),r}}}},read:!1}},Zht={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},Yht={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:mc}}},name:"layerDefinition.minScale",write:!0}},Xht={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:mc}}},name:"layerDefinition.maxScale",write:!0}},z3e={json:{write:{ignoreOrigin:!0,layerContainerTypes:mc},origins:{"web-map":{read:!1,write:!1}}}};let vg=class extends Fa(qr){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};T([B()],vg.prototype,"creatorField",void 0),T([B()],vg.prototype,"creationDateField",void 0),T([B()],vg.prototype,"editorField",void 0),T([B()],vg.prototype,"editDateField",void 0),T([B()],vg.prototype,"realm",void 0),T([B(mA("dateFieldsTimeReference",!0))],vg.prototype,"timeZone",void 0),vg=T([_t("esri.layers.support.EditFieldsInfo")],vg);const Jht=vg;let V0=class extends Fa(qr){constructor(e){super(e)}};T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"name",void 0),T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"fields",void 0),T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"isAscending",void 0),T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"indexType",void 0),T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"isUnique",void 0),T([B({constructOnly:!0,json:{write:!0}})],V0.prototype,"description",void 0),V0=T([_t("esri.layers.support.FeatureIndex")],V0);async function Kht(t,e,r){e=e.clone(),t.capabilities.query.supportsMaxRecordCountFactor&&(e.maxRecordCountFactor=B3e(t));const n=Qht(t),i=t.capabilities.query.supportsPagination;e.start=0,e.num=n;let s=null;for(;;){const o=await t.source.queryFeaturesJSON(e,r);if(s==null?s=o:s.features=s.features.concat(o.features),s.exceededTransferLimit=o.exceededTransferLimit,!i||!o.exceededTransferLimit)break;e.start+=n}return s}function Qht(t){return B3e(t)*edt(t)}function edt(t){return t.capabilities.query.maxRecordCount||2e3}function B3e(t){return t.capabilities.query.supportsMaxRecordCountFactor?c_.MAX_MAX_RECORD_COUNT_FACTOR:1}var FG;let cc=FG=class extends qr{constructor(t){super(t),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new FG(Qt({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};T([B({type:[String],json:{write:!0}})],cc.prototype,"attachmentTypes",void 0),T([B({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],cc.prototype,"attachmentsWhere",void 0),T([B({type:Boolean,json:{write:!0}})],cc.prototype,"cacheHint",void 0),T([B({type:[String],json:{write:!0}})],cc.prototype,"keywords",void 0),T([B({type:[Number],json:{write:!0}})],cc.prototype,"globalIds",void 0),T([B({json:{write:!0}})],cc.prototype,"name",void 0),T([B({type:Number,json:{read:{source:"resultRecordCount"}}})],cc.prototype,"num",void 0),T([B({type:[Number],json:{write:!0}})],cc.prototype,"objectIds",void 0),T([B({type:Boolean,json:{default:!1,write:!0}})],cc.prototype,"returnMetadata",void 0),T([B({type:[Number],json:{write:!0}})],cc.prototype,"size",void 0),T([B({type:Number,json:{read:{source:"resultOffset"}}})],cc.prototype,"start",void 0),T([On("start"),On("num")],cc.prototype,"writeStart",null),T([B({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],cc.prototype,"where",void 0),cc=FG=T([_t("esri.rest.support.AttachmentQuery")],cc),cc.from=gc(cc);const tdt=cc;var zG;let hl=zG=class extends qr{constructor(t){super(t),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,this.start>0&&this.where==null&&(e.definitionExpression="1=1")}clone(){return new zG(Qt({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};T([B({type:Boolean,json:{write:!0}})],hl.prototype,"cacheHint",void 0),T([B({type:$1,json:{write:!0}})],hl.prototype,"dynamicDataSource",void 0),T([B({type:String,json:{write:!0}})],hl.prototype,"gdbVersion",void 0),T([B({type:Number,json:{write:!0}})],hl.prototype,"geometryPrecision",void 0),T([B({type:Date})],hl.prototype,"historicMoment",void 0),T([On("historicMoment")],hl.prototype,"_writeHistoricMoment",null),T([B({type:Number,json:{write:!0}})],hl.prototype,"maxAllowableOffset",void 0),T([B({json:{write:!0}})],hl.prototype,"objectIds",void 0),T([B({type:[String],json:{write:!0}})],hl.prototype,"orderByFields",void 0),T([B({type:[String],json:{write:!0}})],hl.prototype,"outFields",void 0),T([B({type:mo,json:{read:{source:"outSR"},write:{target:"outSR"}}})],hl.prototype,"outSpatialReference",void 0),T([B({json:{write:!0}})],hl.prototype,"relationshipId",void 0),T([B({type:Number,json:{read:{source:"resultOffset"}}})],hl.prototype,"start",void 0),T([On("start"),On("num")],hl.prototype,"writeStart",null),T([B({type:Number,json:{read:{source:"resultRecordCount"}}})],hl.prototype,"num",void 0),T([B({json:{write:!0}})],hl.prototype,"returnGeometry",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],hl.prototype,"returnM",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],hl.prototype,"returnZ",void 0),T([B({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],hl.prototype,"where",void 0),hl=zG=T([_t("esri.rest.support.RelationshipQuery")],hl),hl.from=gc(hl);const cJ=hl,ZLt=Object.freeze(Object.defineProperty({__proto__:null,default:cJ},Symbol.toStringTag,{value:"Module"})),BG=new ro({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function rdt(t,e,r,n){const i=await h_(t);if(await hJ(t,e,n),!i.addAttachment)throw new Pr(n,"Layer source does not support addAttachment capability");return i.addAttachment(e,r)}function hJ(t,e,r){var s,o;const{attributes:n}=e,{objectIdField:i}=t;return(o=(s=t.capabilities)==null?void 0:s.data)!=null&&o.supportsAttachment?e?n?i&&n[i]?Promise.resolve():Promise.reject(new Pr(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new Pr(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new Pr(r,"A feature is required to add/delete/update attachments")):Promise.reject(new Pr(r,"this layer doesn't support attachments"))}async function ndt(t,e,r,n,i){const s=await h_(t);if(await hJ(t,e,i),!s.updateAttachment)throw new Pr(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(e,r,n)}async function idt(t,e,r){const{applyEdits:n}=await fs(()=>import("./editingSupport-BRaaDEoU.js"),__vite__mapDeps([126,49,50,51,52,127])),i=await t.load();let s=r;return i.type==="feature"&&i.infoFor3D&&e.deleteFeatures!=null&&i.globalIdField!=null&&(s={...s,globalIdToObjectId:await bdt(i,e.deleteFeatures,i.globalIdField)}),n(i,i.source,e,r)}async function sdt(t,e,r){const{uploadAssets:n}=await fs(()=>import("./editingSupport-BRaaDEoU.js"),__vite__mapDeps([126,49,50,51,52,127])),i=await t.load();return n(i,i.source,e,r)}async function odt(t,e,r,n){const i=await h_(t);if(await hJ(t,e,n),!i.deleteAttachments)throw new Pr(n,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(e,r)}async function adt(t,e,r){const n=(await t.load({signal:e==null?void 0:e.signal})).source;if(!n.fetchRecomputedExtents)throw new Pr(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(e)}async function ldt(t,e,r,n){var v,b;e=tdt.from(e),await t.load();const i=t.source,s=t.capabilities;if(!((v=s==null?void 0:s.data)!=null&&v.supportsAttachment))throw new Pr(n,"this layer doesn't support attachments");const{attachmentTypes:o,objectIds:a,globalIds:l,num:u,size:d,start:f,where:m}=e;if(!((b=s==null?void 0:s.operations)!=null&&b.supportsQueryAttachments)&&((o==null?void 0:o.length)>0||(l==null?void 0:l.length)>0||(d==null?void 0:d.length)>0||u||f||m))throw new Pr(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(a!=null&&a.length||l!=null&&l.length||m))throw new Pr(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);if(!i.queryAttachments)throw new Pr(n,"Layer source does not support queryAttachments capability",e);return i.queryAttachments(e)}async function udt(t,e,r,n){const i=await h_(t);if(!i.queryObjectIds)throw new Pr(n,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(c_.from(e)??t.createQuery(),r)}async function cdt(t,e,r,n){const i=await h_(t);if(!i.queryFeatureCount)throw new Pr(n,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(c_.from(e)??t.createQuery(),r)}async function hdt(t,e,r,n){const i=await h_(t);if(!i.queryExtent)throw new Pr(n,"Layer source does not support queryExtent capability");return i.queryExtent(c_.from(e)??t.createQuery(),r)}async function ddt(t,e,r,n){const i=await h_(t);if(!i.queryRelatedFeatures)throw new Pr(n,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(cJ.from(e),r)}async function fdt(t,e,r,n){const i=await h_(t);if(!i.queryRelatedFeaturesCount)throw new Pr(n,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(cJ.from(e),r)}async function pdt(t){const e=t.source;if(e!=null&&e.refresh)try{const{dataChanged:r,updates:n}=await e.refresh();if(n!=null&&(t.sourceJSON={...t.sourceJSON,...n},t.read(n,{origin:"service",url:t.parsedUrl})),r)return!0}catch{}if(t.definitionExpression)try{return(await zet(t.definitionExpression,t.fieldsIndex)).hasDateFunctions}catch{}return!1}function mdt(t){var o,a;const e=new c_,r=(o=t.capabilities)==null?void 0:o.data,n=(a=t.capabilities)==null?void 0:a.query;e.historicMoment=t.historicMoment,e.gdbVersion=t.gdbVersion,e.returnGeometry=!0,n&&(e.compactGeometryEnabled=n.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&t.returnZ!=null&&(e.returnZ=t.returnZ),r.supportsM&&t.returnM!=null&&(e.returnM=t.returnM)),e.outFields=["*"];const{timeOffset:i,timeExtent:s}=t;return e.timeExtent=i!=null&&s!=null?s.offset(-i.value,i.unit):s||null,e.multipatchOption=t.geometryType==="multipatch"?"xyFootprint":null,e}function j3e(t){const{globalIdField:e,fields:r}=t;if(e)return e;if(r){for(const n of r)if(n.type==="esriFieldTypeGlobalID")return n.name}}function V3e(t){const{objectIdField:e,fields:r}=t;if(e)return e;if(r){for(const n of r)if(n.type==="esriFieldTypeOID")return n.name}}function gdt(t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}function ydt(t,e){const{subtypes:r,subtypeField:n}=t;if(!e||!(r!=null&&r.length)||!n)return null;const i=e.attributes[n];return i==null?null:r.find(s=>s.code===i)}async function h_(t){return(await t.load()).source}async function vdt(t,e){if(!ws||ws.findCredential(t))return;let r;try{const n=await a_e(t,e);n&&(r=await ws.checkSignInStatus(`${n}/sharing`))}catch{}if(r)try{const n=e!=null?e.signal:null;await ws.getCredential(t,{signal:n})}catch{}}async function _dt(t,e,r){var i;const n=(i=t.parsedUrl)==null?void 0:i.path;n&&t.authenticationTriggerEvent===e&&await vdt(n,r)}function xdt(t){return!WL(t)&&(t.userHasUpdateItemPrivileges||t.editingEnabled)}const hz=Xw({types:q2e});function dJ(t,e){var r;if(t.defaultSymbol)return(r=t.types)!=null&&r.length?new QX({defaultSymbol:hz(t.defaultSymbol,t,e),field:t.typeIdField,uniqueValueInfos:t.types.map(n=>({id:n.id,symbol:hz(n.symbol,n,e)}))}):new m7({symbol:hz(t.defaultSymbol,t,e)})}function wdt(t){var n,i,s;let e=(n=t.sourceJSON)==null?void 0:n.cacheMaxAge;if(!e)return!1;const r=(s=(i=t.editingInfo)==null?void 0:i.lastEditDate)==null?void 0:s.getTime();return r==null||(e*=1e3,Date.now()-r{let d=null;if("attributes"in u){const{attributes:f}=u;d={globalId:f[r],objectId:f[i]!=null&&f[i]!==-1?f[i]:null}}else d={globalId:u.globalId,objectId:u.objectId!=null&&u.objectId!==-1?u.objectId:null};d.globalId!=null&&(d.objectId!=null&&d.objectId!==-1||n.push(d.globalId))}),n.length===0)return null;const s=t.createQuery();s.where=n.map(u=>`${r}='${u}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,r],s.cacheHint=!1;const o=await nNe(Kht(t,s));if(!o.ok)return null;const a=new Map,l=o.value.features;for(const u of l){const d=u.attributes[r],f=u.attributes[i];d!=null&&f!=null&&f!==-1&&a.set(d,f)}return a}function Cdt(t,e,r){if(!e||!r||!t)return null;const n=r.getAttribute(e);return n==null?null:t.find(i=>{const{id:s}=i;return s!=null&&s.toString()===n.toString()})??null}function WL(t){var e;return((e=t.sourceJSON)==null?void 0:e.isMultiServicesView)||Sdt(t)}function Sdt(t){var e,r;return!!((r=(e=t.sourceJSON)==null?void 0:e.capabilities)!=null&&r.toLowerCase().split(",").map(n=>n.trim()).includes("map"))}let Gx=class extends Fa(qr){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};T([B({type:String,json:{read:{source:"shapeAreaFieldName"}}})],Gx.prototype,"shapeAreaField",void 0),T([B({type:String,json:{read:{source:"shapeLengthFieldName"}}})],Gx.prototype,"shapeLengthField",void 0),T([B({type:String,json:{read:t=>Crt.read(t)||Srt.read(t)}})],Gx.prototype,"units",void 0),Gx=T([_t("esri.layers.support.GeometryFieldsInfo")],Gx);const Edt=Gx;var jG;let qx=jG=class extends qr{constructor(t){super(t),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new $o}clone(){return new jG({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};T([B({type:String,json:{write:!0}})],qx.prototype,"floorField",void 0),T([B({json:{read:!1,write:!1}})],qx.prototype,"viewAllMode",void 0),T([B({json:{read:!1,write:!1}})],qx.prototype,"viewAllLevelIds",void 0),qx=jG=T([_t("esri.layers.support.LayerFloorInfo")],qx);const Mdt=qx,Bie=new ro({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),jie=new ro({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let fp=class extends Fa(qr){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};T([B({json:{read:Bie.read,write:Bie.write}})],fp.prototype,"cardinality",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"composite",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"id",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"keyField",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"keyFieldInRelationshipTable",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"name",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"relatedTableId",void 0),T([B({json:{read:!0,write:!0}})],fp.prototype,"relationshipTableId",void 0),T([B({json:{read:jie.read,write:jie.write}})],fp.prototype,"role",void 0),fp=T([_t("esri.layers.support.Relationship")],fp);const Tdt=fp;function zi(t,e,r){return!!U3e(t,e,r)}function r6(t,e,r){return U3e(t,e,r)}function U3e(t,e,r){return t&&t.hasOwnProperty(e)?t[e]:r}const Idt={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function Rdt(t){var r;const e=(r=t==null?void 0:t.supportedSpatialAggregationStatistics)==null?void 0:r.map(n=>n.toLowerCase());return{envelope:!!(e!=null&&e.includes("envelopeaggregate")),centroid:!!(e!=null&&e.includes("centroidaggregate")),convexHull:!!(e!=null&&e.includes("convexhullaggregate"))}}function yE(t,e){var n;const r=(n=t==null?void 0:t.supportedOperationsWithCacheHint)==null?void 0:n.map(i=>i.toLowerCase());return!!(r!=null&&r.includes(e.toLowerCase()))}function H3e(t,e){return{analytics:Ldt(t),attachment:kdt(t),data:Adt(t),metadata:Pdt(t),operations:$dt(t.capabilities,t,e),query:Odt(t,e),queryRelated:Ndt(t),queryTopFeatures:Ddt(t),editing:Fdt(t)}}function Ldt(t){return{supportsCacheHint:yE(t.advancedQueryCapabilities,"queryAnalytics")}}function kdt(t){const e=t.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:yE(t.advancedQueryCapabilities,"queryAttachments"),supportsResize:zi(t,"supportsAttachmentsResizing",!1)};return e&&Array.isArray(e)&&e.forEach(n=>{const i=Idt[n.name];i&&(r[i]=!!n.isEnabled)}),r}function Adt(t){return{isVersioned:zi(t,"isDataVersioned",!1),supportsAttachment:zi(t,"hasAttachments",!1),supportsM:zi(t,"hasM",!1),supportsZ:zi(t,"hasZ",!1)}}function Pdt(t){return{supportsAdvancedFieldProperties:zi(t,"supportsFieldDescriptionProperty",!1)}}function $dt(t,e,r){const n=t?t.toLowerCase().split(",").map(m=>m.trim()):[],i=r?mE(r):null,s=n.includes(i!=null&&i.serverType==="MapServer"?"data":"query"),o=n.includes("editing")&&!e.datesInUnknownTimezone;let a=o&&n.includes("create"),l=o&&n.includes("delete"),u=o&&n.includes("update");const d=n.includes("changetracking"),f=e.advancedQueryCapabilities;return o&&!(a||l||u)&&(a=l=u=!0),{supportsCalculate:zi(e,"supportsCalculate",!1),supportsTruncate:zi(e,"supportsTruncate",!1),supportsValidateSql:zi(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:l,supportsEditing:o,supportsChangeTracking:d,supportsQuery:s,supportsQueryAnalytics:zi(f,"supportsQueryAnalytic",!1),supportsQueryAttachments:zi(f,"supportsQueryAttachments",!1),supportsQueryTopFeatures:zi(f,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:zi(e,"supportsAttachmentsResizing",!1),supportsSync:n.includes("sync"),supportsUpdate:u,supportsExceedsLimitStatistics:zi(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:zi(e,"supportsAsyncConvert3D",!1)}}function Odt(t,e){const r=t.advancedQueryCapabilities,n=t.ownershipBasedAccessControlForFeatures,i=t.archivingInfo,s=t.currentVersion,o=e==null?void 0:e.includes("MapServer"),a=!o||s>=Sr("mapserver-pbf-version-support"),l=m3e(e),u=new Set((t.supportedQueryFormats??"").split(",").map(d=>d.toLowerCase().trim()));return{maxRecordCount:r6(t,"maxRecordCount",void 0),maxRecordCountFactor:r6(t,"maxRecordCountFactor",void 0),standardMaxRecordCount:r6(t,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:Rdt(r),supportsCacheHint:zi(r,"supportsQueryWithCacheHint",!1)||yE(r,"query"),supportsCentroid:zi(r,"supportsReturningGeometryCentroid",!1),supportsCompactGeometry:l,supportsDefaultSpatialReference:zi(r,"supportsDefaultSR",!1),supportsDisjointSpatialRelationship:zi(r,"supportsDisjointSpatialRel",!1),supportsDistance:zi(r,"supportsQueryWithDistance",!1),supportsDistinct:zi(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:zi(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:a&&u.has("pbf"),supportsFullTextSearch:zi(r,"supportsFullTextSearch",!1),supportsGeometryProperties:zi(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:zi(r,"supportsHavingClause",!1),supportsHistoricMoment:zi(i,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:zi(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:zi(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:zi(r,"supportsPagination",!1),supportsPercentileStatistics:zi(r,"supportsPercentileStatistics",!1),supportsQuantization:zi(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:zi(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:zi(n,"allowAnonymousToQuery",!0),supportsQueryByOthers:zi(n,"allowOthersToQuery",!0),supportsQueryGeometry:zi(t,"supportsReturningQueryGeometry",!1),supportsResultType:zi(r,"supportsQueryWithResultType",!1),supportsSpatialAggregationStatistics:zi(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:zi(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:zi(t,"useStandardizedQueries",!1),supportsStatistics:zi(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:zi(r,"supportsTopFeaturesQuery",!1),tileMaxRecordCount:r6(t,"tileMaxRecordCount",void 0)}}function Ndt(t){const e=t.advancedQueryCapabilities,r=zi(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:zi(e,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:yE(e,"queryRelated")}}function Ddt(t){return{supportsCacheHint:yE(t.advancedQueryCapabilities,"queryTopFilter")}}function Fdt(t){const e=t.ownershipBasedAccessControlForFeatures,r=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:zi(t,"allowGeometryUpdates",!0),supportsGlobalId:zi(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:zi(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:zi(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:zi(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:zi(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:zi(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:zi(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:zi(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:zi(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:zi(r,"supportsAsyncApplyEdits",!1),zDefault:r6(t,"zDefault",void 0)}}function JLt(t){var e;return{operations:{supportsAppend:zi(t,"supportsAppend",!1),supportsExportClip:zi(t,"supportsExportClip",!1),supportsExportFrameset:zi(t,"supportsExportFrameset",!1),supportsMensuration:zi(t,"supportsMensuration",!1),supportsUpdate:zi(t,"supportsUpdate",!1)},query:{supportsCoverageQuery:((e=t==null?void 0:t.playbackInfo)==null?void 0:e.klv["0601"])??!1}}}let _g=class extends Fa(qr){constructor(e){super(e),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const r={};for(const n of Object.keys(e))r[n]=_O(e[n]);return r}writeDomains(e,r){var i;if(!e)return;const n={};for(const s of Object.keys(e))e[s]&&(n[s]=(i=e[s])==null?void 0:i.toJSON());r.domains=n}};T([B({type:Number,json:{write:!0}})],_g.prototype,"code",void 0),T([B({type:Object,json:{write:!0}})],_g.prototype,"defaultValues",void 0),T([B({json:{write:!0}})],_g.prototype,"domains",void 0),T([un("domains")],_g.prototype,"readDomains",null),T([On("domains")],_g.prototype,"writeDomains",null),T([B({type:String,json:{write:!0}})],_g.prototype,"name",void 0),_g=T([_t("esri.layers.support.Subtype")],_g);const zdt=_g,Bdt=t=>{let e=class extends t{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new($o.ofType(V0)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=mo.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:r}=this;if(r){const{query:i,operations:s,editing:o}=r;if(!i.supportsQueryByOthers||!i.supportsQueryByAnonymous||s.supportsEditing&&!(o.supportsUpdateByOthers&&o.supportsUpdateByAnonymous&&o.supportsDeleteByOthers&&o.supportsDeleteByAnonymous))return"load"}if(this.userHasUpdateItemPrivileges){if(wdt(this))return"load";if(this.hasUpdateItemRestrictions)return r.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const n=this.editFieldsInfo;return(n!=null&&n.creatorField||n!=null&&n.editorField)&&(r!=null&&r.operations.supportsEditing)?"editing":null}readCapabilitiesFromService(r,n){return H3e(n,this.url)}readEditingInfo(r,n){const{editingInfo:i}=n;return i?{lastEditDate:i.lastEditDate!=null?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const r=this.capabilities;if(!r)return null;const n=Qt(r),{operations:i,editing:s}=n;return WL(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),n):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=s.supportsDeleteByOthers=s.supportsGeometryUpdate=s.supportsUpdateByOthers=!0,n):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=s.supportsGeometryUpdate=!0),n)}readGlobalIdFieldFromService(r,n){return j3e(n)}get hasFullEditingRestrictions(){const r=this.capabilities;if(!r||WL(this))return!1;const{operations:n,editing:i}=r;return n.supportsEditing&&!(n.supportsAdd&&n.supportsDelete&&n.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const r=this.capabilities;if(!r)return!1;const{operations:n,editing:i}=r;return WL(this)?!n.supportsQuery:!(n.supportsAdd&&n.supportsDelete&&n.supportsEditing&&n.supportsQuery&&n.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(r,n){return n.type==="Table"}readMaxScale(r,n){return n.effectiveMaxScale||r||0}readMinScale(r,n){return n.effectiveMinScale||r||0}readObjectIdFieldFromService(r,n){return V3e(n)}readServiceDefinitionExpression(r,n){return n.definitionQuery||n.definitionExpression}set url(r){if(r==null)return void this._set("url",r);const n=Gut({layer:this,url:r,nonStandardUrlAllowed:!0,logger:li.getLogger(this)});this._set("url",n.url),n.layerId!=null&&this._set("layerId",n.layerId)}writeUrl(r,n,i,s){qut(this,r,null,n,s)}readVersion(r,n){return gdt(n)}};return T([B({readOnly:!0})],e.prototype,"authenticationTriggerEvent",null),T([B({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],e.prototype,"copyright",void 0),T([B({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],e.prototype,"capabilities",void 0),T([un("service","capabilities")],e.prototype,"readCapabilitiesFromService",null),T([B(mA("dateFieldsTimeReference"))],e.prototype,"dateFieldsTimeZone",void 0),T([B({type:Boolean})],e.prototype,"datesInUnknownTimezone",void 0),T([B({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],e.prototype,"definitionExpression",void 0),T([B({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],e.prototype,"displayField",void 0),T([B({readOnly:!0,type:Jht})],e.prototype,"editFieldsInfo",void 0),T([B({readOnly:!0})],e.prototype,"editingInfo",void 0),T([un("editingInfo")],e.prototype,"readEditingInfo",null),T([B({readOnly:!0})],e.prototype,"effectiveCapabilities",null),T([B((()=>{const r=Qt(qht),n=r.json.origins;return n["web-map"]={read:!1,write:!1},n["portal-item"]={read:!1,write:!1},r})())],e.prototype,"elevationInfo",void 0),T([B({type:Mdt,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:mc}}}}})],e.prototype,"floorInfo",void 0),T([B({type:Mu,json:{origins:{service:{read:{source:"extent"}}}}})],e.prototype,"fullExtent",void 0),T([B()],e.prototype,"gdbVersion",void 0),T([B({readOnly:!0,type:Edt,json:{read:{source:"geometryProperties"}}})],e.prototype,"geometryFieldsInfo",void 0),T([B({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:BG.read}}}})],e.prototype,"geometryType",void 0),T([B({type:String})],e.prototype,"globalIdField",void 0),T([un("service","globalIdField",["globalIdField","fields"])],e.prototype,"readGlobalIdFieldFromService",null),T([B({readOnly:!0})],e.prototype,"hasFullEditingRestrictions",null),T([B({type:Boolean,json:{origins:{service:{read:!0}}}})],e.prototype,"hasM",void 0),T([B({readOnly:!0})],e.prototype,"hasUpdateItemRestrictions",null),T([B({type:Boolean,json:{origins:{service:{read:!0}}}})],e.prototype,"hasZ",void 0),T([B({readOnly:!0,type:zht})],e.prototype,"heightModelInfo",void 0),T([B({type:Date})],e.prototype,"historicMoment",void 0),T([B({type:$o.ofType(V0),readOnly:!0})],e.prototype,"indexes",void 0),T([B({readOnly:!0})],e.prototype,"isTable",void 0),T([un("service","isTable",["type"])],e.prototype,"readIsTableFromService",null),T([B({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],e.prototype,"layerId",void 0),T([B(Xht)],e.prototype,"maxScale",void 0),T([un("service","maxScale",["maxScale","effectiveMaxScale"])],e.prototype,"readMaxScale",null),T([B(Yht)],e.prototype,"minScale",void 0),T([un("service","minScale",["minScale","effectiveMinScale"])],e.prototype,"readMinScale",null),T([B({type:String})],e.prototype,"objectIdField",void 0),T([un("service","objectIdField",["objectIdField","fields"])],e.prototype,"readObjectIdFieldFromService",null),T([B(mA("preferredTimeReference"))],e.prototype,"preferredTimeZone",void 0),T([B({type:[Tdt],readOnly:!0})],e.prototype,"relationships",void 0),T([B({type:Boolean})],e.prototype,"returnM",void 0),T([B({type:Boolean})],e.prototype,"returnZ",void 0),T([B({readOnly:!0,json:{write:!1}})],e.prototype,"serverGens",void 0),T([B({readOnly:!0})],e.prototype,"serviceDefinitionExpression",void 0),T([un("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],e.prototype,"readServiceDefinitionExpression",null),T([B({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],e.prototype,"serviceItemId",void 0),T([B()],e.prototype,"sourceJSON",void 0),T([B({type:mo,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],e.prototype,"spatialReference",void 0),T([B({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],e.prototype,"subtypeField",void 0),T([B({type:[zdt],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],e.prototype,"subtypes",void 0),T([B({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],e.prototype,"trackIdField",void 0),T([B(Hht)],e.prototype,"url",null),T([On("url")],e.prototype,"writeUrl",null),T([B({json:{origins:{service:{read:!0}},read:!1}})],e.prototype,"version",void 0),T([un("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],e.prototype,"readVersion",null),e=T([_t("esri.layers.mixins.FeatureLayerBase")],e),e};let Wx=class extends Fa(qr){constructor(e){super(e),this.expression=null,this.title=null,this.returnType=null}};T([B({type:String,json:{write:!0}})],Wx.prototype,"expression",void 0),T([B({type:String,json:{write:!0}})],Wx.prototype,"title",void 0),T([B({type:String,json:{write:!0}})],Wx.prototype,"returnType",void 0),Wx=T([_t("esri.layers.support.ExpressionInfo")],Wx);const fJ=Wx;var VG;let xg=VG=class extends qr{constructor(t){super(t),this.isAutoGenerated=!1,this.name=null,this.alias=null,this.onStatisticField=null,this.onStatisticExpression=null,this.statisticType=null}clone(){return new VG({name:this.name,alias:this.alias,isAutoGenerated:this.isAutoGenerated,onStatisticExpression:Qt(this.onStatisticExpression),onStatisticField:this.onStatisticField,statisticType:this.statisticType})}};T([B({type:Boolean,json:{write:!0}})],xg.prototype,"isAutoGenerated",void 0),T([B({type:String,json:{write:!0}})],xg.prototype,"name",void 0),T([B({type:String,json:{write:!0}})],xg.prototype,"alias",void 0),T([B({type:String,json:{write:!0}})],xg.prototype,"onStatisticField",void 0),T([B({type:fJ,json:{write:!0}})],xg.prototype,"onStatisticExpression",void 0),T([B({type:String,json:{write:!0}})],xg.prototype,"statisticType",void 0),xg=VG=T([_t("esri.layers.support.AggregateField")],xg);const R5=xg;let g2=class extends qr{constructor(){super(...arguments),this.type=null}};T([B({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],g2.prototype,"type",void 0),g2=T([_t("esri.layers.support.FeatureReduction")],g2);const pJ="__begin__",mJ="__end__",jdt=new RegExp(pJ,"ig"),Vdt=new RegExp(mJ,"ig"),Vie=new RegExp("^"+pJ,"i"),Uie=new RegExp(mJ+"$","i"),eP='"',Udt=eP+" + ",Hdt=" + "+eP;function Gdt(t){return t.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function qdt(t){return t.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function gJ(t){const e={expression:"",type:"none"};return t.labelExpressionInfo?t.labelExpressionInfo.value?(e.expression=t.labelExpressionInfo.value,e.type="conventional"):t.labelExpressionInfo.expression&&(e.expression=t.labelExpressionInfo.expression,e.type="arcade"):t.labelExpression!=null&&(e.expression=Gdt(t.labelExpression),e.type="conventional"),e}function Wdt(t){const e=gJ(t);if(!e)return null;switch(e.type){case"conventional":return UG(e.expression);case"arcade":return e.expression}return null}function Zdt(t){const e=gJ(t);if(!e)return null;switch(e.type){case"conventional":return Xdt(e.expression);case"arcade":return G3e(e.expression)}return null}function UG(t){let e;return t?(e=T$(t,r=>pJ+'$feature["'+r+'"]'+mJ),e=Vie.test(e)?e.replace(Vie,""):eP+e,e=Uie.test(e)?e.replace(Uie,""):e+eP,e=e.replaceAll(jdt,Udt).replaceAll(Vdt,Hdt)):e='""',e}const Ydt=/^\s*\{([^}]+)\}\s*$/i;function Xdt(t){const e=t==null?void 0:t.match(Ydt);return(e==null?void 0:e[1].trim())||null}const Jdt=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,Kdt=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,Qdt=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function G3e(t){if(!t)return null;let e=Jdt.exec(t)||Kdt.exec(t);return e?e[1]||e[3]:(e=Qdt.exec(t),e?e[2]:null)}var HG;let Sv=HG=class extends qr{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(t,e){return e.value?UG(e.value):t}writeExpression(t,e,r){this.value!=null&&(t=UG(this.value)),t!=null&&(e[r]=t)}clone(){return new HG({expression:this.expression,title:this.title,value:this.value})}};T([B({type:String,json:{write:{writerEnsuresNonNull:!0}}})],Sv.prototype,"expression",void 0),T([un("expression",["expression","value"])],Sv.prototype,"readExpression",null),T([On("expression")],Sv.prototype,"writeExpression",null),T([B({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Sv.prototype,"title",void 0),T([B({json:{read:!1,write:!1}})],Sv.prototype,"value",void 0),Sv=HG=T([_t("esri.layers.support.LabelExpressionInfo")],Sv);const q3e=Sv;var GG;const cI=new ro({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function hI(t,e,r){return{enabled:!o_e(r==null?void 0:r.layer)}}function W3e(t){var e;return!t||t.origin!=="service"&&((e=t.layer)==null?void 0:e.type)!=="map-image"}function eft(t){return(t==null?void 0:t.type)==="map-image"}function Z3e(t){var e,r;return!!eft(t)&&!!((r=(e=t.capabilities)==null?void 0:e.exportMap)!=null&&r.supportsArcadeExpressionForLabeling)}function tft(t){return W3e(t)||Z3e(t==null?void 0:t.layer)}let jl=GG=class extends qr{static evaluateWhere(t,e){const r=(n,i,s)=>{switch(i){case"=":return n==s;case"<>":return n!=s;case">":return n>s;case">=":return n>=s;case"<":return ntft(r)?{allowNull:!0}:{enabled:!1}}}})],jl.prototype,"labelExpressionInfo",void 0),T([On("labelExpressionInfo")],jl.prototype,"writeLabelExpressionInfo",null),T([B({type:cI.apiValues,json:{type:cI.jsonValues,read:cI.read,write:cI.write}})],jl.prototype,"labelPlacement",void 0),T([B({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],jl.prototype,"labelPosition",void 0),T([B({type:Number})],jl.prototype,"maxScale",void 0),T([On("maxScale")],jl.prototype,"writeMaxScale",null),T([B({type:Number})],jl.prototype,"minScale",void 0),T([On("minScale")],jl.prototype,"writeMinScale",null),T([B({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:hI}}}}})],jl.prototype,"repeatLabel",void 0),T([B({type:Number,cast:lo,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:hI}}}}})],jl.prototype,"repeatLabelDistance",void 0),T([B({types:bst,json:{origins:{"web-scene":{types:Cst,write:One,default:null}},write:One,default:null}})],jl.prototype,"symbol",void 0),T([B({type:Boolean,json:{write:!0}})],jl.prototype,"useCodedValues",void 0),T([B({type:String,json:{write:!0}})],jl.prototype,"where",void 0),jl=GG=T([_t("esri.layers.support.LabelClass")],jl);const CO=jl;var qG;let bh=qG=class extends g2{constructor(t){super(t),this.type="binning",this.binType="geohash",this.fixedBinLevel=null,this.labelingInfo=null,this.labelsVisible=!0,this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.size=lo("12px"),this.fields=[],this.renderer=null}writeFields(t,e,r){const n=t.filter(i=>i.statisticType!=="avg_angle").map(i=>i.toJSON());Ph(r,n,e)}readRenderer(t,e,r){var i;const n=(i=e.drawingInfo)==null?void 0:i.renderer;return n?WC(n,e,r)??void 0:dJ(e,r)}clone(){return new qG({fields:Qt(this.fields),fixedBinLevel:this.fixedBinLevel,labelingInfo:Qt(this.labelingInfo),labelsVisible:this.labelsVisible,maxScale:this.maxScale,popupEnabled:this.popupEnabled,popupTemplate:Qt(this.popupTemplate),renderer:Qt(this.renderer),binType:Qt(this.binType),size:this.size})}};T([ji({binning:"binning"})],bh.prototype,"type",void 0),T([ji({geohash:"geohash",square:"square"}),B({type:["geohash","square"]})],bh.prototype,"binType",void 0),T([B({type:Number,json:{write:!0}})],bh.prototype,"fixedBinLevel",void 0),T([B({type:[CO],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],bh.prototype,"labelingInfo",void 0),T([B(uJ)],bh.prototype,"labelsVisible",void 0),T([B({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],bh.prototype,"maxScale",void 0),T([B(lJ)],bh.prototype,"popupEnabled",void 0),T([B({type:aE,json:{name:"popupInfo",write:!0}})],bh.prototype,"popupTemplate",void 0),T([B({type:Number,cast:t=>t==="auto"?t:lo(t)})],bh.prototype,"size",void 0),T([B({type:[R5],json:{write:!0}})],bh.prototype,"fields",void 0),T([On("fields")],bh.prototype,"writeFields",null),T([B({types:yO,json:{write:{target:"drawingInfo.renderer"}}})],bh.prototype,"renderer",void 0),T([un("renderer",["drawingInfo.renderer"])],bh.prototype,"readRenderer",null),bh=qG=T([_t("esri.layers.support.FeatureReductionBinning")],bh);const Y3e=bh;var WG;function Hie(t){var e;return t.type==="simple"&&!((e=t.visualVariables)!=null&&e.length)}let wu=WG=class extends qr{constructor(t){super(t),this.type="cluster",this.clusterRadius=lo("80px"),this.clusterMinSize=lo("12px"),this.clusterMaxSize=lo("50px"),this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.renderer=null,this.symbol=null,this.labelingInfo=null,this.labelsVisible=!0,this.fields=[]}readRenderer(t,e,r){var i,s;const n=(i=e.drawingInfo)==null?void 0:i.renderer;return(s=n==null?void 0:n.authoringInfo)!=null&&s.isAutoGenerated?null:n?Hie(n)?null:WC(n,e,r)??void 0:dJ(e,r)}readSymbol(t,e,r){var i,s;const n=(i=e.drawingInfo)==null?void 0:i.renderer;if((s=n==null?void 0:n.authoringInfo)!=null&&s.isAutoGenerated)return null;if(n&&Hie(n)){const o=WC(n,e,r);return o==null?void 0:o.symbol}return null}writeSymbol(t,e,r,n){var s,o;const i=(o=(s=this.renderer)==null?void 0:s.authoringInfo)==null?void 0:o.isAutoGenerated;if(!this.renderer||i){const a=new m7({symbol:t});e.drawingInfo={renderer:a.write({},n)}}}writeFields(t,e,r){const n=t.filter(i=>i.statisticType!=="avg_angle").map(i=>i.toJSON());Ph(r,n,e)}readFields(t,e,r){return t.filter(n=>!n.isAutoGenerated).map(n=>R5.fromJSON(n))}clone(){return new WG({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:Qt(this.labelingInfo),labelsVisible:this.labelsVisible,fields:Qt(this.fields),maxScale:this.maxScale,renderer:Qt(this.renderer),symbol:Qt(this.symbol),popupEnabled:this.popupEnabled,popupTemplate:Qt(this.popupTemplate)})}};T([B({type:["cluster"],readOnly:!0,json:{write:!0}})],wu.prototype,"type",void 0),T([B({type:Number,cast:t=>t==="auto"?t:lo(t),json:{write:!0}})],wu.prototype,"clusterRadius",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],wu.prototype,"clusterMinSize",void 0),T([B({type:Number,cast:lo,json:{write:!0}})],wu.prototype,"clusterMaxSize",void 0),T([B({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],wu.prototype,"maxScale",void 0),T([B(lJ)],wu.prototype,"popupEnabled",void 0),T([B({type:aE,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],wu.prototype,"popupTemplate",void 0),T([B({types:yO,json:{write:{target:"drawingInfo.renderer"}}})],wu.prototype,"renderer",void 0),T([un("renderer",["drawingInfo.renderer"])],wu.prototype,"readRenderer",null),T([B({types:xst})],wu.prototype,"symbol",void 0),T([un("symbol",["drawingInfo.renderer"])],wu.prototype,"readSymbol",null),T([On("symbol")],wu.prototype,"writeSymbol",null),T([B({type:[CO],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],wu.prototype,"labelingInfo",void 0),T([B(uJ)],wu.prototype,"labelsVisible",void 0),T([B({type:[R5],json:{write:!0}})],wu.prototype,"fields",void 0),T([On("fields")],wu.prototype,"writeFields",null),T([un("fields")],wu.prototype,"readFields",null),wu=WG=T([_t("esri.layers.support.FeatureReductionCluster")],wu);const X3e=wu;var ZG;let ZL=ZG=class extends g2{constructor(t){super(t),this.type="selection"}clone(){return new ZG}};T([B({type:["selection"]})],ZL.prototype,"type",void 0),ZL=ZG=T([_t("esri.layers.support.FeatureReductionSelection")],ZL);const Gie=ZL,qie={key:"type",base:g2,typeMap:{cluster:X3e,binning:Y3e}},rft={types:{key:"type",base:g2,typeMap:{selection:Gie,cluster:X3e,binning:Y3e}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:qie},"portal-item":{types:qie},"web-scene":{types:{key:"type",base:g2,typeMap:{selection:Gie}},name:"layerDefinition.featureReduction",write:{layerContainerTypes:mc}}}}},X9={Base64:0,Hex:1,String:2,Raw:3},U4=8,J3e=(1<>16)+(e>>16)+(r>>16)<<16|65535&r}function nft(t){const e=[];for(let r=0,n=t.length*U4;r>5]|=(t.charCodeAt(r/U4)&J3e)<>5]>>>r%32&J3e));return e.join("")}function sft(t){const e="0123456789abcdef",r=[];for(let n=0,i=4*t.length;n>2]>>n%4*8+4&15)+e.charAt(t[n>>2]>>n%4*8&15));return r.join("")}function oft(t){const e="=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[];for(let i=0,s=4*t.length;i>2]>>i%4*8&255)<<16|(t[i+1>>2]>>(i+1)%4*8&255)<<8|t[i+2>>2]>>(i+2)%4*8&255;for(let a=0;a<4;a++)8*i+6*a>32*t.length?n.push(e):n.push(r.charAt(o>>6*(3-a)&63))}return n.join("")}function aft(t,e){return t<>>32-e}function SO(t,e,r,n,i,s){return Jv(aft(Jv(Jv(e,t),Jv(n,s)),i),r)}function ph(t,e,r,n,i,s,o){return SO(e&r|~e&n,t,e,i,s,o)}function mh(t,e,r,n,i,s,o){return SO(e&n|r&~n,t,e,i,s,o)}function gh(t,e,r,n,i,s,o){return SO(e^r^n,t,e,i,s,o)}function yh(t,e,r,n,i,s,o){return SO(r^(e|~n),t,e,i,s,o)}function lft(t,e){t[e>>5]|=128<>>9<<4)]=e;let r=1732584193,n=-271733879,i=-1732584194,s=271733878;for(let o=0;oli.getLogger("esri.views.2d.layers.support.clusterUtils");Sr.add("esri-cluster-arcade-enabled",!0);const cft=Sr("esri-cluster-arcade-enabled"),hft=new Set(["simple-line","simple-fill","picture-fill"]);function Wie(t,e){let r=e.clone();if(!dft(r))return r;if(e.getSymbols().some(n=>hft.has(n.type))&&(r=new m7({symbol:new Cm})),r.authoringInfo||(r.authoringInfo=new VX),r.authoringInfo.isAutoGenerated=!0,"visualVariables"in r){const n=(r.visualVariables||[]).filter(i=>i.valueExpression!=="$view.scale");n.forEach(i=>{i.type==="rotation"?i.field?i.field=t3(t,i.field,"avg_angle","number"):i.valueExpression&&(i.field=K8(t,i.valueExpression,"avg_angle","number"),i.valueExpression=null):i.normalizationField?(i.field=t3(t,i.field,"avg_norm","number",i.normalizationField),i.normalizationField=null):i.field?i.field=t3(t,i.field,"avg","number"):i.valueExpression&&(i.field=K8(t,i.valueExpression,"avg","number"),i.valueExpression=null)}),r.visualVariables=n}switch(r.type){case"simple":break;case"pie-chart":for(const n of r.attributes)n.field?n.field=t3(t,n.field,"sum","number"):n.valueExpression&&(n.field=K8(t,n.valueExpression,"sum","number"),n.valueExpression=null);break;case"unique-value":r.field?r.field=t3(t,r.field,"mode","string"):r.valueExpression&&(r.field=K8(t,r.valueExpression,"mode","string"),r.valueExpression=null);break;case"class-breaks":r.normalizationField?(r.field=t3(t,r.field,"avg_norm","number",r.normalizationField),r.normalizationField=null):r.field?r.field=t3(t,r.field,"avg","number"):r.valueExpression&&(r.field=K8(t,r.valueExpression,"avg","number"),r.valueExpression=null)}return r}const dft=t=>{const e=r=>uft().error(new Pr("Unsupported-renderer",r,{renderer:t}));if(!t)return!1;switch(t.type){case"unique-value":if(t.field2||t.field3)return e("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1;break;case"class-breaks":if(t.normalizationField){const r=t.normalizationType;if(r!=="field")return e(`FeatureReductionCluster does not support a normalizationType of ${r}`),!1}break;case"simple":case"pie-chart":break;default:return e(`FeatureReductionCluster does not support renderers of type ${t.type}`),!1}if(!cft){if("valueExpression"in t&&t.valueExpression)return e("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in t&&t.visualVariables||[]).some(r=>!(!("valueExpression"in r)||!r.valueExpression)))return e("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0};function fft(t,e,r){switch(t){case"sum":return`cluster_sum_${e}`;case"avg":case"avg_angle":return`cluster_avg_${e}`;case"mode":return`cluster_type_${e}`;case"avg_norm":{const n=r,i="field",s=e.toLowerCase()+",norm:"+i+","+n.toLowerCase();return"cluster_avg_"+K3e(s)}}}function K8(t,e,r,n){const i=K3e(e),s=r==="mode"?`cluster_type_${i}`:r==="sum"?`cluster_sum_${i}`:`cluster_avg_${i}`;return t.some(o=>o.name===s)||t.push(new R5({name:s,isAutoGenerated:!0,onStatisticExpression:new fJ({expression:e,returnType:n}),statisticType:r})),s}function t3(t,e,r,n,i){if(e==="cluster_count"||t.some(o=>o.name===e))return e;const s=fft(r,e,i);return t.some(o=>o.name===s)||(r==="avg_norm"?t.push(new R5({name:s,isAutoGenerated:!0,onStatisticExpression:new fJ({expression:`$feature.${e} / $feature.${i}`,returnType:n}),statisticType:"avg"})):t.push(new R5({name:s,isAutoGenerated:!0,onStatisticField:e,statisticType:r}))),s}const pft=t=>{let e=class extends t{constructor(...r){super(...r),this.addHandles(d2(()=>this.renderer,()=>{if(this.featureReduction){const n=this._normalizeFeatureReduction(this.featureReduction);this._set("featureReduction",n)}},Sme))}set featureReduction(r){const n=this._normalizeFeatureReduction(r);this._set("featureReduction",n)}set renderer(r){}_withClusterVariable(r,n,i){const s=r.clone();return"visualVariables"in s&&(s.visualVariables||(s.visualVariables=[]),s.visualVariables.some(o=>o.type==="size")||s.visualVariables.push(new HX({field:"cluster_count",stops:[new IL({value:1}),new IL({useMinValue:!0,size:n}),new IL({useMaxValue:!0,size:i})]}))),s}_normalizeFeatureReduction(r){var f;if((r==null?void 0:r.type)!=="cluster")return r;const n=r.clone(),i=[new R5({name:"cluster_count",isAutoGenerated:!0,statisticType:"count"})],s=(n.fields??[]).filter(m=>!m.isAutoGenerated),o=r.renderer&&!((f=r.renderer.authoringInfo)!=null&&f.isAutoGenerated),{clusterMinSize:a,clusterMaxSize:l}=n;if(o){n.fields=[...i,...s];const m=this._withClusterVariable(n.renderer,a,l);return n.effectiveFeatureRenderer=m,n.effectiveClusterRenderer=m,n}if(r.symbol){if(n.fields=[...i,...s],n.renderer=null,!this.renderer)return n.effectiveFeatureRenderer=null,n.effectiveClusterRenderer=null,n;const m=Wie(i,this.renderer),v=this._withClusterVariable(m,a,l),b="visualVariables"in v&&v.visualVariables?v.visualVariables:[],M=new m7({symbol:r.symbol,visualVariables:b});return n.fields=[...i,...s],n.effectiveFeatureRenderer=v,n.effectiveClusterRenderer=M,n}if(!this.renderer)return r;const u=Wie(i,this.renderer);n.fields=[...i,...s],n.renderer=u;const d=this._withClusterVariable(u,a,l);return n.effectiveFeatureRenderer=d,n.effectiveClusterRenderer=d,n}};return T([B(rft)],e.prototype,"featureReduction",null),e=T([_t("esri.layers.mixins.FeatureReductionLayer")],e),e},Zie={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},Yie={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},Xie={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},mft={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":Zie,"web-map/basemap":Yie,"web-map/tables":Xie,"link-chart/operational-layers":{...Zie,LinkChartLayer:!0},"link-chart/basemap":Yie,"link-chart/tables":Xie,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}},gft=t=>{let e=class extends t{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(r,n,i){var s;return((s=i==null?void 0:i.portalItem)==null?void 0:s.type)==="Group Layer"?void 0:r}writeListMode(r,n,i,s){(s&&s.layerContainerType==="ground"||r&&MAe(this,i,{},s))&&(n[i]=r)}writeOperationalLayerType(r,n,i,s){r&&(s==null?void 0:s.layerContainerType)!=="tables"&&(n.layerType=r)}writeTitle(r,n){n.title=r??"Layer"}readTimeExtent(r){return r?ay.fromArray(r):null}writeTimeExtent(r,n,i,s){r&&s.layerContainerType!=="tables"&&(r.isEmpty?s!=null&&s.messages&&s.messages.push(new Pr("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):n[i]=r.toArray())}read(r,n){n&&(n.layer=this),CAe(this,r,i=>super.read(r,i),n)}write(r,n){var o,a;if(!this.persistenceEnabled&&!(n!=null&&n.ignorePersistenceEnabled))return null;if(n!=null&&n.origin){const l=`${n.origin}/${n.layerContainerType||"operational-layers"}`,u=mft[l];let d=!!(u!=null&&u[this.operationalLayerType]);if(this.operationalLayerType==="ArcGISTiledElevationServiceLayer"&&l==="web-scene/operational-layers"&&(d=!1),this.operationalLayerType==="ArcGISDimensionLayer"&&l==="web-map/operational-layers"&&(d=!1),!d)return(o=n.messages)==null||o.push(new Pr("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${l}'`,{layer:this})),null}const i=super.write(r,{...n,layer:this}),s=!!n&&!!n.messages&&!!n.messages.filter(l=>l instanceof Pr&&l.name==="web-document-write:property-required").length;return O$(i==null?void 0:i.url)?((a=n==null?void 0:n.messages)==null||a.push(new Pr("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:i}beforeSave(){}};return T([B({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],e.prototype,"id",void 0),T([un("id",["id"])],e.prototype,"readId",null),T([B(z3e)],e.prototype,"listMode",void 0),T([On("listMode")],e.prototype,"writeListMode",null),T([B({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:mc}}}}})],e.prototype,"operationalLayerType",void 0),T([On("operationalLayerType")],e.prototype,"writeOperationalLayerType",null),T([B(DG)],e.prototype,"opacity",void 0),T([B({type:Boolean,readOnly:!1})],e.prototype,"persistenceEnabled",void 0),T([B({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],e.prototype,"title",void 0),T([On("title"),On(["web-scene"],"title")],e.prototype,"writeTitle",null),T([B({type:ay,json:{origins:{"web-scene":{write:{layerContainerTypes:mc}}}}})],e.prototype,"visibilityTimeExtent",void 0),T([un("visibilityTimeExtent")],e.prototype,"readTimeExtent",null),T([On(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[Qa,$$]]}})],e.prototype,"writeTimeExtent",null),T([B({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:mc}}},name:"visibility",write:!0}})],e.prototype,"visible",void 0),e=T([_t("esri.layers.mixins.OperationalLayer")],e),e};var YG;const dI=new ro({asc:"ascending",desc:"descending"});let Zx=YG=class extends qr{constructor(t){super(t),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new YG({field:this.field,valueExpression:this.valueExpression,order:this.order})}};T([B({type:String,json:{write:!0}})],Zx.prototype,"field",void 0),T([B({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Zx.prototype,"valueExpression",void 0),T([B({type:dI.apiValues,json:{type:dI.jsonValues,read:dI.read,write:dI.write}})],Zx.prototype,"order",void 0),Zx=YG=T([_t("esri.layers.support.OrderByInfo")],Zx);const Q3e=Zx;function yft(t,e,r){if(!t)return null;const n=t.find(s=>!!s.field);if(!n)return null;const i=new Q3e;return i.read(n,r),[i]}function vft(t,e,r,n){const i=t.find(s=>!!s.field);i&&Ph(r,[i.toJSON()],e)}const _ft={type:[Q3e],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:yft},write:{writer:vft}}},xft=t=>{let e=class extends t{constructor(){super(...arguments),this.orderBy=null}};return T([B(_ft)],e.prototype,"orderBy",void 0),e=T([_t("esri.layers.mixins.OrderedLayer")],e),e};let wg=class extends Iu{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e!=null&&e.portalItem&&e.path?{...e,path:Jie(e.path,e.portalItem)}:e}set path(e){e!=null&&Af(e)?li.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return Jie(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",r){const n=this.cdnUrl;if(n==null)throw new Pr("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(n,{responseType:e,query:{token:this.portalItem.apiKey},signal:r==null?void 0:r.signal})}async update(e,r){const{addOrUpdateResources:n}=await fs(()=>import("./resourceUtils-Cz4P0EKM.js"),[]);return await n(this.portalItem,[{resource:this,content:e,compress:r==null?void 0:r.compress,access:r==null?void 0:r.access}],"update",r),this}hasPath(){return this.path!=null}};function Jie(t,e){return t==null?t:(t=t.replace(/^\/+/,""),e!=null&&Af(t)&&(t=tY(t,e.itemUrl)),t==null?void 0:t.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}T([B()],wg.prototype,"portalItem",void 0),T([B({type:String,value:null})],wg.prototype,"path",null),T([Pl("path")],wg.prototype,"_castPath",null),T([B({type:String,readOnly:!0})],wg.prototype,"url",null),T([B({type:String,readOnly:!0})],wg.prototype,"cdnUrl",null),T([B({type:String,readOnly:!0})],wg.prototype,"itemRelativeUrl",null),wg=T([_t("esri.portal.PortalItemResource")],wg);const wft=wg;let n6=class extends Iu{constructor(e){super(e),this.created=null,this.rating=null}};T([B()],n6.prototype,"created",void 0),T([B()],n6.prototype,"rating",void 0),n6=T([_t("esri.portal.PortalRating")],n6);const dz=n6;var N3;const bft=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),Cft=new Set(["KML","GeoJson","CSV"]);let xs=N3=class extends XZ(fO){static from(t){return qZ(N3,t)}constructor(t){super(t),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const t=this.type,e=this.typeKeywords||[];let r=t;return t==="Feature Service"||t==="Feature Collection"?r=e.includes("Table")?"Table":e.includes("Route Layer")?"Route Layer":e.includes("Markup")?"Markup":"Feature Layer":t==="Image Service"?r=e.includes("Elevation 3D Layer")?"Elevation Layer":e.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":t==="Scene Service"?r="Scene Layer":t==="Video Service"?r="Video Layer":t==="Scene Package"?r="Scene Layer Package":t==="Stream Service"?r="Feature Layer":t==="Geoprocessing Service"?r=e.includes("Web Tool")?"Tool":"Geoprocessing Service":t==="Geoenrichment Service"?r="GeoEnrichment Service":t==="Geocoding Service"?r="Locator":t==="Microsoft Powerpoint"?r="Microsoft PowerPoint":t==="GeoJson"?r="GeoJSON":t==="Globe Service"?r="Globe Layer":t==="Vector Tile Service"?r="Tile Layer":t==="netCDF"?r="NetCDF":t==="Map Service"?r=e.includes("Spatiotemporal")||!e.includes("Hosted Service")&&!e.includes("Tiled")||e.includes("Relational")?"Map Image Layer":"Tile Layer":t!=null&&t.toLowerCase().includes("add in")?r=t.replaceAll(/(add in)/gi,"Add-In"):t==="datastore catalog service"?r="Big Data File Share":t==="Compact Tile Package"?r="Tile Package (tpkx)":t==="Raster function template"?r="Raster Function Template":t==="OGCFeatureServer"?r="OGC Feature Layer":t==="web mapping application"&&e.includes("configurableApp")?r="Instant App":t==="Insights Page"?r="Insights Report":t==="Excalibur Imagery Project"?r="Excalibur Project":t==="3DTiles Service"?r="3D tiles layer":t==="3DTiles Package"&&(r="3D tiles package"),r}readExtent(t){return t&&t.length?new Mu(t[0][0],t[0][1],t[1][0],t[1][1]):null}get iconUrl(){var v;const t=((v=this.type)==null?void 0:v.toLowerCase())||"",e=this.typeKeywords||[],r="esri/images/portal/",n="16";let i,s=!1,o=!1,a=!1,l=!1,u=!1,d=!1,f=!1,m=!1;return t.indexOf("service")>0||t==="feature collection"||t==="kml"||t==="wms"||t==="wmts"||t==="wfs"?(s=e.includes("Hosted Service"),t==="feature service"||t==="feature collection"||t==="kml"||t==="wfs"?(o=e.includes("Table"),a=e.includes("Route Layer"),l=e.includes("Markup"),u=e.includes("Spatiotemporal"),d=e.includes("UtilityNetwork"),i=u&&o?"spatiotemporaltable":o?"table":a?"routelayer":l?"markup":u?"spatiotemporal":d?"utilitynetwork":s?"featureshosted":"features"):t==="map service"||t==="wms"||t==="wmts"?(u=e.includes("Spatiotemporal"),f=e.includes("Relational"),i=u||f?"mapimages":s||e.includes("Tiled")||t==="wmts"?"maptiles":"mapimages"):i=t==="scene service"?e.includes("Line")?"sceneweblayerline":e.includes("3DObject")?"sceneweblayermultipatch":e.includes("Point")?"sceneweblayerpoint":e.includes("IntegratedMesh")?"sceneweblayermesh":e.includes("PointCloud")?"sceneweblayerpointcloud":e.includes("Polygon")?"sceneweblayerpolygon":e.includes("Building")?"sceneweblayerbuilding":e.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":t==="image service"?e.includes("Elevation 3D Layer")?"elevationlayer":e.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":t==="stream service"?"streamlayer":t==="vector tile service"?"vectortile":t==="datastore catalog service"?"datastorecollection":t==="geocoding service"?"geocodeservice":t==="video service"?e.includes("Live Stream")?"livestreamvideolayer":"videolayer":t==="geoprocessing service"?e.includes("Web Tool")?"tool":"layers":t==="geodata service"?"geodataservice":t==="3dtiles service"?e.includes("3DObject")?"3dobjecttileslayer":e.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):t==="web map"||t==="cityengine web scene"?i="maps":t==="web scene"?i=e.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":t==="web mapping application"&&e.includes("configurableApp")?i="instantapps":t==="web mapping application"||t==="mobile application"||t==="application"||t==="operation view"||t==="desktop application"?i="apps":t==="map document"||t==="map package"||t==="published map"||t==="scene document"||t==="globe document"||t==="basemap package"||t==="mobile basemap package"||t==="mobile map package"||t==="project package"||t==="project template"||t==="pro map"||t==="layout"||t==="layer"&&e.includes("ArcGIS Pro")||t==="explorer map"&&e.indexOf("Explorer Document")?i="mapsgray":t==="service definition"||t==="shapefile"||t==="cad drawing"||t==="geojson"||t==="netcdf"||t==="administrative report"?i="datafiles":t==="360 vr experience"?i="360vr":t==="explorer add in"||t==="desktop add in"||t==="windows viewer add in"||t==="windows viewer configuration"?i="appsgray":t==="arcgis pro add in"||t==="arcgis pro configuration"?i="addindesktop":t==="pdf"?i="pdf":t==="microsoft word"?i="word":t==="microsoft excel"?i="excel":t==="microsoft powerpoint"?i="ppt":t==="rule package"||t==="file geodatabase"||t==="sqlite geodatabase"||t==="csv collection"||t==="kml collection"||t==="windows mobile package"||t==="map template"||t==="desktop application template"||t==="gml"||t==="arcpad package"||t==="code sample"||t==="document link"||t==="earth configuration"||t==="operations dashboard add in"||t==="rules package"||t==="workflow manager package"||t==="explorer map"&&e.includes("Explorer Mapping Application")||e.includes("Document")?i="datafilesgray":t==="network analysis service"||t==="geoprocessing service"||t==="geodata service"||t==="geometry service"||t==="geoprocessing package"||t==="locator package"||t==="geoprocessing sample"||t==="workflow manager service"?i="toolsgray":t==="layer"||t==="layer package"||t==="explorer layer"?i="layersgray":t==="analysis model"?i="analysismodel":t==="scene package"?i="scenepackage":t==="3dtiles package"?i="3dtileslayerpackage":t==="3dtiles service"?i="3dtileslayer":t==="mobile scene package"?i="mobilescenepackage":t==="tile package"||t==="compact tile package"?i="tilepackage":t==="task file"?i="taskfile":t==="report template"?i="report-template":t==="statistical data collection"?i="statisticaldatacollection":t==="insights workbook"?i="workbook":t==="insights model"?i="insightsmodel":t==="insights page"?i="insightspage":t==="insights theme"?i="insightstheme":t==="hub initiative"?i="hubinitiative":t==="hub page"?i="hubpage":t==="hub site application"?i="hubsite":t==="hub event"?i="hubevent":t==="hub project"?i="hubproject":t==="relational database connection"?i="relationaldatabaseconnection":t==="big data file share"?i="datastorecollection":t==="image collection"?i="imagecollection":t==="desktop style"?i="desktopstyle":t==="style"?i=e.includes("Dictionary")?"dictionarystyle":"style":t==="dashboard"?i="dashboard":t==="raster function template"?i="rasterprocessingtemplate":t==="vector tile package"?i="vectortilepackage":t==="ortho mapping project"?i="orthomappingproject":t==="ortho mapping template"?i="orthomappingtemplate":t==="solution"?i="solutions":t==="geopackage"?i="geopackage":t==="deep learning package"?i="deeplearningpackage":t==="real time analytic"?i="realtimeanalytics":t==="big data analytic"?i="bigdataanalytics":t==="feed"?i="feed":t==="excalibur imagery project"?i="excaliburimageryproject":t==="notebook"?i="notebook":t==="storymap"?i="storymap":t==="survey123 add in"?i="survey123addin":t==="mission"?i="mission":t==="mission report"?i="missionreport":t==="mission template"?i="missiontemplate":t==="quickcapture project"?i="quickcaptureproject":t==="pro report"?i="proreport":t==="pro report template"?i="proreporttemplate":t==="urban model"?i="urbanmodel":t==="web experience"?i="experiencebuilder":t==="web experience template"?i="webexperiencetemplate":t==="experience builder widget"?i="experiencebuilderwidget":t==="experience builder widget package"?i="experiencebuilderwidgetpackage":t==="workflow"?i="workflow":t==="kernel gateway connection"?i="kernelgatewayconnection":t==="insights script"?i="insightsscript":t==="hub initiative template"?i="hubinitiativetemplate":t==="storymap theme"?i="storymaptheme":t==="knowledge graph"?i="knowledgegraph":t==="knowledge graph layer"?i="knowledgegraphlayer":t==="knowledge studio project"?i="knowledgestudio":t==="native application"?i="nativeapp":t==="native application installer"?i="nativeappinstaller":t==="web link chart"?i="linkchart":t==="knowledge graph web investigation"?i="investigation":t==="ogcfeatureserver"?i="features":t==="pro project"?i="proproject":t==="insights workbook package"?i="insightsworkbookpackage":t==="apache parquet"?i="apacheparquet":t==="notebook code snippet library"?i="notebookcodesnippets":t==="suitability model"?i="suitabilitymodel":t==="esri classifier definition"?i="classifierdefinition":t==="esri classification schema"?i="classificationschema":t==="insights data engineering workbook"?i="dataengineeringworkbook":t==="insights data engineering model"?i="dataengineeringmodel":t==="deep learning studio project"?i="deeplearningproject":t==="discussion"?i="discussion":t==="allsource project"?i="allsourceproject":t==="api key"?i="apikey":t==="data pipeline"?i="datapipelines":t==="group layer"?(m=e.includes("Map"),i=m?"layergroup2d":"layergroup"):i=t==="media layer"?"onlinemedialayer":t==="form"?e.includes("Survey123")?"survey":"datafilesgray":t==="csv"?"csv":t==="image"?"image":"maps",i?qS(r+i+n+".png"):null}get isLayer(){return this.type!=null&&bft.has(this.type)}get itemCdnUrl(){return PX(this.itemUrl)}get itemPageUrl(){var e;const t=(e=this.portal)==null?void 0:e.itemPageUrl;return t&&this.id?`${t}?id=${this.id}`:null}get itemUrl(){var e;const t=(e=this.portal)==null?void 0:e.restUrl;return t&&this.id?`${t}/content/items/${this.id}`:null}get thumbnailUrl(){var r;const t=this.itemUrl,e=this.thumbnail;return t&&e?((r=this.portal)==null?void 0:r.normalizeUrl(`${t}/info/${e}?f=json`))??null:null}get userItemUrl(){var r,n,i;const t=(r=this.portal)==null?void 0:r.restUrl;if(!t)return null;const e=this.owner||((i=(n=this.portal)==null?void 0:n.user)==null?void 0:i.username);return e?`${t}/content/users/${this.ownerFolder?`${e}/${this.ownerFolder}`:e}/items/${this.id}`:null}load(t){const e=this.portal??(this.portal=Fp.getDefault()),r=e.load(t).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?e.request(this.itemUrl,{signal:t!=null?t.signal:null,query:{token:this.apiKey}}):{}).then(n=>{this.sourceJSON=n,this.read(n)});return this.addResolvingPromise(r),Promise.resolve(this)}async addRating(t){const e={method:"post",query:{}};return t instanceof dz&&(t=t.rating),t==null||isNaN(t)||typeof t!="number"||(e.query.rating=t),this.portal?(await this.portal.request(this.itemUrl+"/addRating",e),new dz({rating:t,created:new Date})):null}clone(){const t={access:this.access,accessInformation:this.accessInformation,applicationProxies:Qt(this.applicationProxies),avgRating:this.avgRating,categories:Qt(this.categories),created:Qt(this.created),culture:this.culture,description:this.description,extent:Qt(this.extent),groupCategories:Qt(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:Qt(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:Qt(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:Qt(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:Qt(this.typeKeywords),url:this.url};this.loaded&&(t.loadStatus="loaded");const e=new N3({sourceJSON:this.sourceJSON}).set(t);return e._set("isOrgItem",this.isOrgItem),e}createPostQuery(){var r;const t=this.toJSON();for(const n of["tags","typeKeywords","categories"])t[n]=(r=t[n])==null?void 0:r.join(", ");const{extent:e}=t;return e&&(t.extent=JSON.stringify(e)),t}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(t="json",e){return this.portal.request(this.itemUrl+"/data",{responseType:t,...e,query:{token:this.apiKey}})}async fetchRating(t){const e=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...t});return e.rating!=null?(e.created=new Date(e.created),new dz(e)):null}fetchRelatedItems(t,e){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...t,token:this.apiKey},...e},N3)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(t=>(this.sourceJSON=t,this.read(t),this))}update(t){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const e=t==null?void 0:t.data,r={method:"post"};r.query=this.createPostQuery();for(const n in r.query)r.query[n]===null&&(r.query[n]="");return r.query.clearEmptyFields=!0,e!=null&&(typeof e=="string"?r.query.text=e:typeof e=="object"&&(r.query.text=JSON.stringify(e))),this.portal.request(`${this.userItemUrl}/update`,r).then(()=>this.reload())}):Promise.reject(new Pr("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(t){if(!this.id)throw new Pr("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:e,itemUrl:r}=this;await e.signIn();const{copyResources:n,folder:i,tags:s,title:o}=t||{},a={method:"post",query:{copyPrivateResources:n==="all",folder:typeof i=="string"?i:i==null?void 0:i.id,includeResources:!!n,tags:s==null?void 0:s.join(","),title:o}},{itemId:l}=await e.request(`${r}/copy`,a);return new N3({id:l,portal:e})}updateThumbnail(t){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const e=t.thumbnail,r=t.filename,n={method:"post"};if(typeof e=="string")j5(e)?n.query={data:e}:n.query={url:Bd(e)},r!=null&&(n.query.filename=r);else{const i=new FormData;r!=null?i.append("file",e,r):i.append("file",e),n.body=i}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,n).then(()=>this.reload())}):Promise.reject(new Pr("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(t={},e){const{fetchResources:r}=await fs(()=>import("./resourceUtils-Cz4P0EKM.js"),[]);return r(this,t,e)}async addResource(t,e,r){const{addOrUpdateResources:n}=await fs(()=>import("./resourceUtils-Cz4P0EKM.js"),[]);return t.portalItem=this,await n(this,[{resource:t,content:e,compress:r==null?void 0:r.compress,access:r==null?void 0:r.access}],"add",r),t}async removeResource(t,e){const{removeResource:r}=await fs(()=>import("./resourceUtils-Cz4P0EKM.js"),[]);if(t.portalItem&&t.portalItem.itemUrl!==this.itemUrl)throw new Pr("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,t,e)}async removeAllResources(t){const{removeAllResources:e}=await fs(()=>import("./resourceUtils-Cz4P0EKM.js"),[]);return e(this,t)}resourceFromPath(t){return new wft({portalItem:this,path:t})}toJSON(){var r,n;const t=this.extent,e={accessInformation:this.accessInformation,categories:Qt(this.categories),created:(r=this.created)==null?void 0:r.getTime(),description:this.description,extent:t&&[[t.xmin,t.ymin],[t.xmax,t.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:(n=this.modified)==null?void 0:n.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:Qt(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:Qt(this.typeKeywords),url:this.url};return FZ(e)}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new N3({sourceJSON:t})}_getPostQuery(){const t=this.toJSON();for(const e in t)e==="tags"&&t[e]!==null&&(t[e]=t[e].join(", ")),e==="typeKeywords"&&t[e]!==null&&(t[e]=t[e].join(", ")),e==="extent"&&t[e]&&(t[e]=JSON.stringify(t[e]));return t}};T([B({type:["private","shared","org","public"]})],xs.prototype,"access",void 0),T([B()],xs.prototype,"accessInformation",void 0),T([B({type:String})],xs.prototype,"apiKey",void 0),T([B({json:{read:{source:"appProxies"}}})],xs.prototype,"applicationProxies",void 0),T([B()],xs.prototype,"avgRating",void 0),T([B()],xs.prototype,"categories",void 0),T([B({type:Date})],xs.prototype,"created",void 0),T([B()],xs.prototype,"culture",void 0),T([B()],xs.prototype,"description",void 0),T([B({readOnly:!0})],xs.prototype,"displayName",null),T([B({type:Mu})],xs.prototype,"extent",void 0),T([un("extent")],xs.prototype,"readExtent",null),T([B()],xs.prototype,"groupCategories",void 0),T([B({readOnly:!0})],xs.prototype,"iconUrl",null),T([B()],xs.prototype,"id",void 0),T([B({readOnly:!0})],xs.prototype,"isLayer",null),T([B({type:Boolean,readOnly:!0})],xs.prototype,"isOrgItem",void 0),T([B()],xs.prototype,"itemControl",void 0),T([B({readOnly:!0})],xs.prototype,"itemPageUrl",null),T([B({readOnly:!0})],xs.prototype,"itemUrl",null),T([B()],xs.prototype,"licenseInfo",void 0),T([B({type:Date})],xs.prototype,"modified",void 0),T([B()],xs.prototype,"name",void 0),T([B()],xs.prototype,"numComments",void 0),T([B()],xs.prototype,"numRatings",void 0),T([B()],xs.prototype,"numViews",void 0),T([B()],xs.prototype,"owner",void 0),T([B()],xs.prototype,"ownerFolder",void 0),T([B({type:Fp})],xs.prototype,"portal",void 0),T([B()],xs.prototype,"screenshots",void 0),T([B()],xs.prototype,"size",void 0),T([B()],xs.prototype,"snippet",void 0),T([B()],xs.prototype,"sourceJSON",void 0),T([B({type:String})],xs.prototype,"sourceUrl",void 0),T([B({type:String})],xs.prototype,"spatialReference",void 0),T([B()],xs.prototype,"tags",void 0),T([B()],xs.prototype,"thumbnail",void 0),T([B({readOnly:!0})],xs.prototype,"thumbnailUrl",null),T([B()],xs.prototype,"title",void 0),T([B()],xs.prototype,"type",void 0),T([B()],xs.prototype,"typeKeywords",void 0),T([B({type:String,json:{read(t,e){var r;if(Cft.has(e.type)){const n=(r=this.portal)==null?void 0:r.restUrl;t||(t=n&&this.id?`${n}/content/items/${this.id}/data`:null)}return t}}})],xs.prototype,"url",void 0),T([B({readOnly:!0})],xs.prototype,"userItemUrl",null),xs=N3=T([_t("esri.portal.PortalItem")],xs);const YL=xs,e5e=Object.freeze(Object.defineProperty({__proto__:null,default:YL},Symbol.toStringTag,{value:"Module"})),Jy=$l.radius,g1=$l.eccentricitySquared,Sft={a1:Jy*g1,a2:Jy*g1*Jy*g1,a3:Jy*g1*g1/2,a4:Jy*g1*Jy*g1*2.5,a5:Jy*g1+Jy*g1*g1/2,a6:1-g1};1/294.9786982,1/298.257222101,$l.radius,$l.flattening,1/298.257222101,k2.radius,k2.flattening,1/192.0430107526882,sm.radius,sm.flattening,1/10.2079945799458,1/43.61604095563141,sm.radius;var ir;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",t[t.WGS84=2]="WGS84",t[t.WEB_MERCATOR=3]="WEB_MERCATOR",t[t.WGS84_ECEF=4]="WGS84_ECEF",t[t.CGCS2000=5]="CGCS2000",t[t.SPHERICAL_MARS_PCPF=6]="SPHERICAL_MARS_PCPF",t[t.GCSMARS2000=7]="GCSMARS2000",t[t.SPHERICAL_MOON_PCPF=8]="SPHERICAL_MOON_PCPF",t[t.GCSMOON2000=9]="GCSMOON2000",t[t.LON_LAT=10]="LON_LAT",t[t.PLATE_CARREE=11]="PLATE_CARREE"})(ir||(ir={}));const Eft={[ir.WGS84]:{[ir.CGCS2000]:Za,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:Za,[ir.SPHERICAL_ECEF]:H6,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:H4,[ir.PLATE_CARREE]:G4,[ir.WGS84]:Za,[ir.WGS84_ECEF]:Z4},[ir.CGCS2000]:{[ir.CGCS2000]:Za,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:Za,[ir.SPHERICAL_ECEF]:H6,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:H4,[ir.PLATE_CARREE]:G4,[ir.WGS84]:Za,[ir.WGS84_ECEF]:Z4},[ir.GCSMARS2000]:{[ir.CGCS2000]:null,[ir.GCSMARS2000]:Za,[ir.GCSMOON2000]:null,[ir.LON_LAT]:Za,[ir.SPHERICAL_ECEF]:null,[ir.SPHERICAL_MARS_PCPF]:ese,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:null,[ir.PLATE_CARREE]:null,[ir.WGS84]:null,[ir.WGS84_ECEF]:null},[ir.GCSMOON2000]:{[ir.CGCS2000]:null,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:Za,[ir.LON_LAT]:Za,[ir.SPHERICAL_ECEF]:null,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:Qie,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:null,[ir.PLATE_CARREE]:null,[ir.WGS84]:null,[ir.WGS84_ECEF]:null},[ir.WEB_MERCATOR]:{[ir.CGCS2000]:U6,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:U6,[ir.SPHERICAL_ECEF]:Mft,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:Za,[ir.PLATE_CARREE]:Rft,[ir.WGS84]:U6,[ir.WGS84_ECEF]:Tft},[ir.WGS84_ECEF]:{[ir.CGCS2000]:Y4,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:Y4,[ir.SPHERICAL_ECEF]:Fft,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:zft,[ir.PLATE_CARREE]:Lft,[ir.WGS84]:Y4,[ir.WGS84_ECEF]:Za},[ir.SPHERICAL_ECEF]:{[ir.CGCS2000]:W4,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:W4,[ir.SPHERICAL_ECEF]:Za,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:Oft,[ir.PLATE_CARREE]:kft,[ir.WGS84]:W4,[ir.WGS84_ECEF]:Nft},[ir.SPHERICAL_MARS_PCPF]:{[ir.CGCS2000]:null,[ir.GCSMARS2000]:rse,[ir.GCSMOON2000]:null,[ir.LON_LAT]:rse,[ir.SPHERICAL_ECEF]:null,[ir.SPHERICAL_MARS_PCPF]:Za,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:null,[ir.PLATE_CARREE]:null,[ir.WGS84]:null,[ir.WGS84_ECEF]:null},[ir.SPHERICAL_MOON_PCPF]:{[ir.CGCS2000]:null,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:tse,[ir.LON_LAT]:tse,[ir.SPHERICAL_ECEF]:null,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:Za,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:null,[ir.PLATE_CARREE]:null,[ir.WGS84]:null,[ir.WGS84_ECEF]:null},[ir.UNKNOWN]:{[ir.CGCS2000]:null,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:null,[ir.SPHERICAL_ECEF]:null,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:Za,[ir.WEB_MERCATOR]:null,[ir.PLATE_CARREE]:null,[ir.WGS84]:null,[ir.WGS84_ECEF]:null},[ir.LON_LAT]:{[ir.CGCS2000]:Za,[ir.GCSMARS2000]:Za,[ir.GCSMOON2000]:Za,[ir.LON_LAT]:Za,[ir.SPHERICAL_ECEF]:H6,[ir.SPHERICAL_MARS_PCPF]:ese,[ir.SPHERICAL_MOON_PCPF]:Qie,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:H4,[ir.PLATE_CARREE]:G4,[ir.WGS84]:Za,[ir.WGS84_ECEF]:Z4},[ir.PLATE_CARREE]:{[ir.CGCS2000]:q4,[ir.GCSMARS2000]:null,[ir.GCSMOON2000]:null,[ir.LON_LAT]:q4,[ir.SPHERICAL_ECEF]:Aft,[ir.SPHERICAL_MARS_PCPF]:null,[ir.SPHERICAL_MOON_PCPF]:null,[ir.UNKNOWN]:null,[ir.WEB_MERCATOR]:Pft,[ir.PLATE_CARREE]:Za,[ir.WGS84]:q4,[ir.WGS84_ECEF]:$ft}};function t5e(t,e,r=r5e()){return t==null||e==null?null:Bft(t,e,r).projector}function Kie(t,e){return t?e.spatialReference===t?e.spatialReferenceId:(e.spatialReference=t,"metersPerUnit"in e&&(e.metersPerUnit=nE(t,1)),BA(t)?e.spatialReferenceId=ir.SPHERICAL_ECEF:w5(t)?e.spatialReferenceId=ir.WGS84:dm(t)?e.spatialReferenceId=ir.WEB_MERCATOR:trt(t)?e.spatialReferenceId=ir.PLATE_CARREE:t.wkt===srt.wkt?e.spatialReferenceId=ir.WGS84_ECEF:t.wkid===x5.CGCS2000?e.spatialReferenceId=ir.CGCS2000:t.wkt===dX.wkt?e.spatialReferenceId=ir.SPHERICAL_MARS_PCPF:t.wkt===fX.wkt?e.spatialReferenceId=ir.SPHERICAL_MOON_PCPF:lve(t)?e.spatialReferenceId=ir.GCSMARS2000:uve(t)?e.spatialReferenceId=ir.GCSMOON2000:e.spatialReferenceId=ir.UNKNOWN):ir.UNKNOWN}function Za(t,e,r,n){t!==r&&(r[n++]=t[e++],r[n++]=t[e++],r[n]=t[e])}function U6(t,e,r,n){r[n]=Mw*(t[e]/a5),r[n+1]=Mw*(i5e-2*Math.atan(Math.exp(-t[e+1]/a5))),r[n+2]=t[e+2]}function Mft(t,e,r,n){const i=t[e]/a5,s=i5e-2*Math.atan(Math.exp(-t[e+1]/a5)),o=a5+t[e+2],a=Math.cos(s)*o;r[n]=Math.cos(i)*a,r[n+1]=Math.sin(i)*a,r[n+2]=Math.sin(s)*o}function Tft(t,e,r,n){U6(t,e,r,n),Z4(r,n,r,n)}function Ift(t,e,r,n,i){const s=.4999999*EO,o=rE(Ew*t[e+1],-s,s),a=Math.sin(o);r[n++]=Ew*t[e]*i.radius,r[n++]=i.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[n]=t[e+2]}function H4(t,e,r,n){Ift(t,e,r,n,$l)}function G4(t,e,r,n){r[n]=t[e]*nse,r[n+1]=t[e+1]*nse,r[n+2]=t[e+2]}function q4(t,e,r,n){r[n]=t[e]*ise,r[n+1]=t[e+1]*ise,r[n+2]=t[e+2]}function Rft(t,e,r,n){U6(t,e,r,n),G4(r,n,r,n)}function Lft(t,e,r,n){Y4(t,e,r,n),G4(r,n,r,n)}function kft(t,e,r,n){W4(t,e,r,n),G4(r,n,r,n)}function Aft(t,e,r,n){q4(t,e,r,n),H6(r,n,r,n)}function Pft(t,e,r,n){q4(t,e,r,n),H4(r,n,r,n)}function $ft(t,e,r,n){q4(t,e,r,n),Z4(r,n,r,n)}function yJ(t,e,r,n,i){const s=i+t[e+2],o=Ew*t[e+1],a=Ew*t[e],l=Math.cos(o)*s;r[n]=Math.cos(a)*l,r[n+1]=Math.sin(a)*l,r[n+2]=Math.sin(o)*s}function Qie(t,e,r,n){yJ(t,e,r,n,k2.radius)}function ese(t,e,r,n){yJ(t,e,r,n,sm.radius)}function H6(t,e,r,n){yJ(t,e,r,n,$l.radius)}function vJ(t,e,r,n,i){const s=t[e],o=t[e+1],a=t[e+2],l=Math.sqrt(s*s+o*o+a*a),u=Xye(a/(l===0?1:l)),d=Math.atan2(o,s);r[n++]=Mw*d,r[n++]=Mw*u,r[n]=l-i}function tse(t,e,r,n){vJ(t,e,r,n,k2.radius)}function rse(t,e,r,n){vJ(t,e,r,n,sm.radius)}function W4(t,e,r,n){vJ(t,e,r,n,$l.radius)}function Oft(t,e,r,n){W4(t,e,r,n),H4(r,n,r,n)}function Nft(t,e,r,n){W4(t,e,r,n),Z4(r,n,r,n)}function Dft(t,e,r,n,i){const s=Ew*t[e],o=Ew*t[e+1],a=t[e+2],l=Math.sin(o),u=Math.cos(o),d=i.radius/Math.sqrt(1-i.eccentricitySquared*l*l);r[n++]=(d+a)*u*Math.cos(s),r[n++]=(d+a)*u*Math.sin(s),r[n++]=(d*(1-i.eccentricitySquared)+a)*l}function Z4(t,e,r,n){Dft(t,e,r,n,$l)}function Y4(t,e,r,n){const i=Sft,s=t[e],o=t[e+1],a=t[e+2];let l,u,d,f,m,v,b,M,O,I,A,j,H,W,re,K,pe,ge,fe,ee,be;l=Math.abs(a),u=s*s+o*o,d=Math.sqrt(u),f=u+a*a,m=Math.sqrt(f),ee=Math.atan2(o,s),v=a*a/f,b=u/f,W=i.a2/m,re=i.a3-i.a4/m,b>.3?(M=l/m*(1+b*(i.a1+W+v*re)/m),fe=Math.asin(M),I=M*M,O=Math.sqrt(1-I)):(O=d/m*(1-v*(i.a5-W-b*re)/m),fe=Math.acos(O),I=1-O*O,M=Math.sqrt(I)),A=1-$l.eccentricitySquared*I,j=$l.radius/Math.sqrt(A),H=i.a6*j,W=d-j*O,re=l-H*M,pe=O*W+M*re,K=O*re-M*W,ge=K/(H/A+pe),fe+=ge,be=pe+K*ge/2,a<0&&(fe=-fe),r[n++]=Mw*ee,r[n++]=Mw*fe,r[n]=be}function Fft(t,e,r,n){Y4(t,e,r,n),H6(r,n,r,n)}function zft(t,e,r,n){Y4(t,e,r,n),H4(r,n,r,n)}function Bft(t,e,r){if(t==null||e==null||r.source.spatialReference===t&&r.dest.spatialReference===e)return r;const n=Kie(t,r.source),i=Kie(e,r.dest);return n===ir.UNKNOWN&&i===ir.UNKNOWN?Wd(t,e)?r.projector=Za:r.projector=null:r.projector=Eft[n][i],r}function r5e(){return{source:{spatialReference:null,spatialReferenceId:ir.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:ir.UNKNOWN,metersPerUnit:1},projector:Za}}const nkt={spatialReference:null,spatialReferenceId:ir.UNKNOWN},ikt={spatialReference:null,spatialReferenceId:ir.UNKNOWN},n5e=r5e(),Ew=Ftt(1),Mw=ztt(1),EO=Math.PI,i5e=.5*EO,a5=$l.radius,nse=a5*EO/180,ise=180/(a5*EO);function vE(t,e,r,n,i,s,o=1){const a=t5e(e,i,n5e);if(a==null)return!1;if(a===Za){if(t===n&&r===s)return!0;const u=r+3*o;for(let d=r,f=s;d=0;r--){const n=this.steps[r];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const r of this.steps)e+=r.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,r,n){this._cachedProjection[i6.cacheKey(e,r)]=n}getCachedGeTransformation(e,r){let n="";for(const s of this.steps)n+=s.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const i=this._cachedProjection[i6.cacheKey(e,r)];return i===void 0?null:i}},W1=null,$2=null,G6=null,XL={};const _J=new _Y;function _E(){return!!W1&&rve()}function s5e(){return!!_E()||(ds(_J),KC(),!1)}function jft(t,e){return!t||!e||L5(t,e)||s5e()}function Vft(t,e){return!L5(t,e)&&!_E()}function KC(t){return G6==null&&(G6=Promise.all([nve(),fs(()=>import("./geometryEngineBase-RmbNeFm7.js"),__vite__mapDeps([40,14])).then(e=>e.g),fs(()=>import("./hydrated-awHE-vOn.js"),[])])),G6.then(([,e,{hydratedAdapter:r}])=>{Q1(t),$2=r,W1=e.default,W1._enableProjection(Jtt),_J.notify()})}function xJ(t,e,r=null,n=null){return Array.isArray(t)?t.length===0?[]:JG($2,t,t[0].spatialReference,e,r,n):JG($2,[t],t.spatialReference,e,r,n)[0]}function JG(t,e,r,n,i=null,s=null){if(r==null||n==null)return e;if(L5(r,n,i))return e.map(o=>JL(o,r,n));if(i==null&&BA(r))return e.map(o=>JL(o,r,mo.WGS84)).map(o=>QC(o,n));if(i==null&&BA(n))return e.map(o=>QC(o,mo.WGS84)).map(o=>JL(o,mo.WGS84,n));if(i==null){const o=tP.cacheKey(r,n);XL[o]!==void 0?i=XL[o]:((i=a5e(r,n,void 0))==null&&(i=new tP),XL[o]=i)}if(W1==null||t==null)throw new MO;return s!=null?W1._project(t,e,r,n,i,s):W1._project(t,e,r,n,i)}function Uft(t,e){const r=o5e([t],e);return r.pending!=null?{pending:r.pending,geometry:null}:r.geometries!=null?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function o5e(t,e){if(!_E()){for(const r of t)if(r!=null&&!Wd(r.spatialReference,e)&&Q0(r.spatialReference)&&Q0(e)&&!L5(r.spatialReference,e))return ds(_J),{pending:KC(),geometries:null}}return{pending:null,geometries:t.map(r=>r==null?null:Wd(r.spatialReference,e)?r:Q0(r.spatialReference)&&Q0(e)?QC(r,e):null)}}function a5e(t,e,r=null){if(t==null||e==null)return null;if(W1==null||$2==null)throw new MO;const n=W1._getTransformation($2,t,e,r,r==null?void 0:r.spatialReference);return n!==null?tP.fromGE(n):null}function Hft(t,e,r=null){if(W1==null||$2==null)throw new MO;const n=W1._getTransformationBySuitability($2,t,e,r,r==null?void 0:r.spatialReference);if(n!==null){const i=[];for(const s of n)i.push(tP.fromGE(s));return i}return[]}class MO extends Pr{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function Gft(){W1=null,$2=null,G6=null,XL={}}const qft={get loadPromise(){return G6}};function QC(t,e){try{const r=xJ(t,e);if(r==null)return null;"xmin"in t&&"xmin"in r&&(r.zmin=t.zmin,r.zmax=t.zmax);const n=c3e(r.type,t.spatialReference,e);return n!=null&&n(r),r}catch(r){if(!(r instanceof MO))throw r;return null}}async function Wft(t,e,r){const n=t.spatialReference;return n!=null&&e!=null&&await wJ(n,e,null,r),QC(t,e)}function L5(t,e,r){return!r&&(!!Wd(t,e)||Q0(t)&&Q0(e)&&!!t5e(t,e,n5e))}function Zft(t,e){if(Wd(t,e))return!0;if(!Q0(t)||!Q0(e))return!1;const r=w5(t)||dm(t)||ene(t),n=w5(e)||dm(e)||ene(e);return r&&n}async function wJ(t,e,r,n){if(_E())return ste(n);if(Array.isArray(t)){for(const{source:i,dest:s,geographicTransformation:o}of t)if(i&&s&&!L5(i,s,o))return KC(n)}else if(t&&e&&!L5(t,e,r))return KC(n);return ste(n)}function JL(t,e,r){return t?"x"in t?l5e(t,e,new iu,r,0):"xmin"in t?d5e(t,e,new Mu,r,0):"rings"in t?h5e(t,e,new sE,r,0):"paths"in t?c5e(t,e,new aO,r,0):"points"in t?u5e(t,e,new oO,r,0):null:null}function Yft(t,e,r=e.spatialReference,n=0){return r!=null&&t.spatialReference!=null&&l5e(t,t.spatialReference,e,r,n)!=null}function l5e(t,e,r,n,i){Eh[0]=t.x,Eh[1]=t.y;const s=t.z;return Eh[2]=s!==void 0?s:i,vE(Eh,e,0,Eh,n,0,1)?(r.x=Eh[0],r.y=Eh[1],r.spatialReference=n,s!==void 0||A2(n)?(r.z=Eh[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),t.m===void 0?(r.m=void 0,r.hasM=!1):(r.m=t.m,r.hasM=!0),r):null}function Xft(t,e,r=e.spatialReference,n=0){return t.spatialReference!=null&&r!=null&&u5e(t,t.spatialReference,e,r,n)!=null}function u5e(t,e,r,n,i){const{points:s,hasZ:o,hasM:a}=t,l=[],u=s.length,d=[];for(const m of s)d.push(m[0],m[1],o?m[2]:i);if(!vE(d,e,0,d,n,0,u))return null;const f=o||A2(n);for(let m=0;m-1&&r.splice(n,1)}}function lkt(t,e,r){r?tpt(t,e):rpt(t,e)}async function ukt(t){const e=t.clone().normalize();let r;if(e.length>1)for(const n of e)r?n.width>r.width&&(r=n):r=n;else r=e[0];return ept(r)}const npt={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map"};function ose(t){var l;const{portal:e,isOrgItem:r,itemControl:n}=t,i=(l=e.user)==null?void 0:l.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!(i!=null&&i.includes("features:user:fullEdit"));const a=n==="update"||n==="admin";return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}const ipt=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=t5(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(r){r!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",r))}readPortalItem(r,n,i){if(n.itemId)return new YL({id:n.itemId,portal:i==null?void 0:i.portal})}writePortalItem(r,n){r!=null&&r.id&&(n.itemId=r.id)}async loadFromPortal(r,n){var i;if((i=this.portalItem)!=null&&i.id)try{const{load:s}=await fs(()=>import("./layersLoader-7Bk9G4Kh.js"),__vite__mapDeps([128,33,31,32,129,130]));return Q1(n),await s({instance:this,supportedTypes:r.supportedTypes,validateItem:r.validateItem,supportsData:r.supportsData,layerModuleTypeMap:r.layerModuleTypeMap},n)}catch(s){throw i0(s)||li.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id}) + ${s}`),s}}async finishLoadEditablePortalLayer(r){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(r).catch(n=>(q0(n),!0)))}async setUserPrivileges(r,n){if(!Ao.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(n);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:o}}=await this._fetchUserPrivileges(r,n);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",o)}catch(i){q0(i)}}async _fetchUserPrivileges(r,n){let i=this.portalItem;if(!r||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(n);const s=r===i.id;if(s&&i.portal.user)return ose(i);let o,a;if(s)o=i.portal.url;else try{o=await a_e(this.url,n)}catch(f){q0(f)}if(!o||!HAe(o,i.portal.url))return this._fetchFallbackUserPrivileges(n);try{const f=n!=null?n.signal:null;a=await(ws==null?void 0:ws.getCredential(`${o}/sharing`,{prompt:!1,signal:f}))}catch(f){q0(f)}const l=!0,u=!1,d=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:d}};try{if(s?await i.reload():(i=new YL({id:r,portal:{url:o}}),await i.load(n)),i.portal.user)return ose(i)}catch(f){q0(f)}return{features:{edit:l,fullEdit:u},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(r){let n=!0;try{n=await this._fetchUserHasEditingPrivileges(r)}catch(i){q0(i)}return{features:{edit:n,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(r){const n=this.url?ws==null?void 0:ws.findCredential(this.url):null;if(!n)return!0;const i=mI.credential===n?mI.user:await this._fetchEditingUser(r);return mI.credential=n,mI.user=i,(i==null?void 0:i.privileges)==null||i.privileges.includes("features:user:edit")}async _fetchEditingUser(r){var d,f;const n=(f=(d=this.portalItem)==null?void 0:d.portal)==null?void 0:f.user;if(n)return n;const i=ws==null?void 0:ws.findServerInfo(this.url??"");if(!(i!=null&&i.owningSystemUrl))return null;const s=`${i.owningSystemUrl}/sharing/rest`,o=Fp.getDefault();if(o&&o.loaded&&Lp(o.restUrl)===Lp(s))return o.user;const a=`${s}/community/self`,l=r!=null?r.signal:null,u=await _me(sa(a,{authMode:"no-prompt",query:{f:"json"},signal:l}));return u.ok?$X.fromJSON(u.value.data):null}read(r,n){n&&(n.layer=this),super.read(r,n)}write(r,n){var o;const i=n==null?void 0:n.portal,s=((o=this.portalItem)==null?void 0:o.id)&&(this.portalItem.portal||Fp.getDefault());return i&&s&&!r0e(s.restUrl,i.restUrl)?(n.messages&&n.messages.push(new Pr("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(r,{...n,layer:this})}};return T([B({type:YL})],e.prototype,"portalItem",null),T([un("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),T([On("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),T([B({clonable:!1})],e.prototype,"resourceReferences",void 0),T([B({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),T([B({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),T([B({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=T([_t("esri.layers.mixins.PortalLayer")],e),e},mI={credential:null,user:null};let s6=class extends Iu{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};T([B()],s6.prototype,"updating",void 0),T([B()],s6.prototype,"status",void 0),s6=T([_t("esri.layers.support.PublishingInfo")],s6);const spt=s6,opt=Symbol(),apt=t=>{var e;let r=class extends t{constructor(){super(...arguments),this[e]=!0}get publishingInfo(){if(this.destroyed)return null;const n=this._get("publishingInfo");if(n)return n;const i=new spt;return this._checkPublishingStatus(i),i}_checkPublishingStatus(n){let o=0;const a=async u=>{let d;n.updating=!0;try{d=await this.fetchPublishingStatus()}catch{d="unavailable"}d!=="published"&&d!=="unavailable"||(n.status==="publishing"&&this.refresh(),l.remove()),n.status=d,n.updating=!1,l.removed||(o=setTimeout(a,u,u+125))},l={removed:!1,remove(){this.removed=!0,clearTimeout(o)}};this.when().catch(()=>l.remove()),a(250),this.addHandles(l)}};return e=opt,T([B({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=T([_t("esri.layers.mixins.PublishableLayer")],r),r},Kv=new $o,q6=new WeakMap;function lpt(t){cpt(t)&&Kv.push(new WeakRef(t))}function upt(t){const e=Kv.find(r=>r.deref()===t);e&&Kv.remove(e)}function cpt(t){return t!=null&&typeof t=="object"&&"refreshInterval"in t&&"refresh"in t}function m5e(t,e){return Number.isFinite(t)&&Number.isFinite(e)?e<=0?t:m5e(e,t%e):0}let pz=0,gI=0;function hpt(){const t=Date.now();let e=!1;for(const r of Kv){const n=r.deref();n?n.refreshInterval&&t-(q6.get(n)??0)+5>=6e4*n.refreshInterval&&(q6.set(n,t),n.refresh(t)):e=!0}if(e)for(let r=Kv.length-1;r>=0;r--)Kv.at(r).deref()||Kv.removeAt(r)}Tke(()=>{const t=Date.now();let e=0;for(const r of Kv){const n=r.deref();n&&(e=m5e(Math.round(6e4*n.refreshInterval),e),n.refreshInterval?q6.get(n)||q6.set(n,t):q6.delete(n))}if(e!==gI){if(gI=e,clearInterval(pz),gI===0)return void(pz=0);pz=setInterval(hpt,gI)}});const ase=.1,dpt=t=>{let e=class extends t{constructor(...r){super(...r),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=UZ(()=>this.hasDataChanged()),this.when().then(()=>{this.destroyed||lpt(this)},()=>{})}destroy(){upt(this)}castRefreshInterval(r){return r>=ase?r:r<=0?0:ase}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(r=Date.now()){mke(this._debounceHasDataChanged()).then(n=>{n&&this._set("refreshTimestamp",r),this.emit("refresh",{dataChanged:n})},n=>{li.getLogger(this).error(n),this.emit("refresh",{dataChanged:!1,error:n})})}async hasDataChanged(){return!0}get test(){}};return T([B({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:mc}}}}})],e.prototype,"refreshInterval",void 0),T([Pl("refreshInterval")],e.prototype,"castRefreshInterval",null),T([B({readOnly:!0})],e.prototype,"refreshTimestamp",void 0),T([B({readOnly:!0})],e.prototype,"refreshParameters",null),e=T([_t("esri.layers.mixins.RefreshableLayer")],e),e},fpt=t=>{let e=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const r={minScale:this.minScale,maxScale:this.maxScale},n=this.parent;n&&"effectiveScaleRange"in n&&ppt(r,n.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===r.minScale&&i.maxScale===r.maxScale?i:r}};return T([B({type:Number,nonNullable:!0,json:{write:!0}})],e.prototype,"minScale",void 0),T([B({type:Number,nonNullable:!0,json:{write:!0}})],e.prototype,"maxScale",void 0),T([B({readOnly:!0})],e.prototype,"effectiveScaleRange",null),e=T([_t("esri.layers.mixins.ScaleRangeLayer")],e),e};function ppt(t,e){return t.minScale=t.minScale>0?e.minScale>0?Math.min(t.minScale,e.minScale):t.minScale:e.minScale,t.maxScale=t.maxScale>0?e.maxScale>0?Math.max(t.maxScale,e.maxScale):t.maxScale:e.maxScale,t}const g5e=Dh()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0});let o6=class extends Fa(qr){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return n3e(this.value,this.unit,"milliseconds")}};T([ji(g5e,{nonNullable:!0})],o6.prototype,"unit",void 0),T([B({type:Number,json:{write:!0},nonNullable:!0})],o6.prototype,"value",void 0),o6=T([_t("esri.TimeInterval")],o6);const rP=o6;function lse(t,e){return rP.fromJSON({value:t,unit:e})}let kc=class extends Fa(qr){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,r){return r.timeExtent&&Array.isArray(r.timeExtent)&&r.timeExtent.length===2?ay.fromArray(r.timeExtent):null}writeFullTimeExtent(e,r){(e==null?void 0:e.start)!=null&&e.end!=null?r.timeExtent=e.toArray():r.timeExtent=null}readInterval(e,r){return r.timeInterval&&r.timeIntervalUnits?lse(r.timeInterval,r.timeIntervalUnits):r.defaultTimeInterval&&r.defaultTimeIntervalUnits?lse(r.defaultTimeInterval,r.defaultTimeIntervalUnits):null}writeInterval(e,r){r.timeInterval=(e==null?void 0:e.toJSON().value)??null,r.timeIntervalUnits=(e==null?void 0:e.toJSON().unit)??null}};T([B({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],kc.prototype,"cumulative",void 0),T([B({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],kc.prototype,"endField",void 0),T([B({type:ay,json:{write:{enabled:!0,allowNull:!0}}})],kc.prototype,"fullTimeExtent",void 0),T([un("fullTimeExtent",["timeExtent"])],kc.prototype,"readFullTimeExtent",null),T([On("fullTimeExtent")],kc.prototype,"writeFullTimeExtent",null),T([B({type:Boolean,json:{write:!0}})],kc.prototype,"hasLiveData",void 0),T([B({type:rP,json:{write:{enabled:!0,allowNull:!0}}})],kc.prototype,"interval",void 0),T([un("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],kc.prototype,"readInterval",null),T([On("interval")],kc.prototype,"writeInterval",null),T([B({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],kc.prototype,"startField",void 0),T([B(mA("timeReference",!0))],kc.prototype,"timeZone",void 0),T([B({type:String,json:{write:{enabled:!0,allowNull:!0}}})],kc.prototype,"trackIdField",void 0),T([B({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],kc.prototype,"useTime",void 0),T([B({type:[Date],json:{read:!1}})],kc.prototype,"stops",void 0),kc=T([_t("esri.layers.support.TimeInfo")],kc);const y5e=kc,mpt={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:mc}}},gpt=t=>{let e=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(r,n){const i=n.timeInfo.exportOptions;if(!i)return null;const s=i.timeOffset,o=g5e.fromJSON(i.timeOffsetUnits);return s&&o?new rP({value:s,unit:o}):null}set timeInfo(r){Yve(r,this.fieldsIndex),this._set("timeInfo",r)}};return T([B({type:ay,json:{write:!1}})],e.prototype,"timeExtent",void 0),T([B({type:rP})],e.prototype,"timeOffset",void 0),T([un("service","timeOffset",["timeInfo.exportOptions"])],e.prototype,"readOffset",null),T([B({value:null,type:y5e,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],e.prototype,"timeInfo",null),T([B(mpt)],e.prototype,"useViewTime",void 0),e=T([_t("esri.layers.mixins.TemporalLayer")],e),e},use=new ro({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let Ev=class extends Fa(qr){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};T([B({json:{write:!0}})],Ev.prototype,"name",void 0),T([B({json:{write:!0}})],Ev.prototype,"description",void 0),T([B({json:{read:use.read,write:use.write}})],Ev.prototype,"drawingTool",void 0),T([B({json:{write:!0}})],Ev.prototype,"prototype",void 0),T([B({json:{write:!0}})],Ev.prototype,"thumbnail",void 0),Ev=T([_t("esri.layers.support.FeatureTemplate")],Ev);const bJ=Ev;let bg=class extends Fa(qr){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const r={};for(const n of Object.keys(e))r[n]=_O(e[n]);return r}writeDomains(e,r){var i;const n={};for(const s of Object.keys(e))e[s]&&(n[s]=(i=e[s])==null?void 0:i.toJSON());r.domains=n}};T([B({json:{write:!0}})],bg.prototype,"id",void 0),T([B({json:{write:!0}})],bg.prototype,"name",void 0),T([B({json:{write:!0}})],bg.prototype,"domains",void 0),T([un("domains")],bg.prototype,"readDomains",null),T([On("domains")],bg.prototype,"writeDomains",null),T([B({type:[bJ],json:{write:!0}})],bg.prototype,"templates",void 0),bg=T([_t("esri.layers.support.FeatureType")],bg);const v5e=bg;function ypt(){return{fields:{type:[rJ],value:null,set:function(t){if(t&&Sr("big-integer-warning-enabled")){const e=t.filter(r=>r.type==="big-integer"||r.type==="oid"&&(r.length||0)>=8);if(e.length){const r=e.map(n=>`'${n.name}'`).join(", ");li.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${r}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",t)}},fieldsIndex:{readOnly:!0,get(){return d_e.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(t){this._userOutFields=t,this.notifyChange("outFields")},get:function(){var e;const t=this._userOutFields;if(!(t!=null&&t.length))return null;if(t.includes("*"))return["*"];if(!this.fields)return t;for(const r of t)((e=this.fieldsIndex)==null?void 0:e.has(r))||li.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${r} found in outFields`,{layer:this,outFields:t});return vX(this.fieldsIndex,t)}}}}const mz=()=>li.getLogger("esri.layers.support.labelingInfo"),vpt=/\[([^[\]]+)\]/gi;function gz(t,e,r){return t?t.map(n=>{var s;const i=new CO;if(i.read(n,r),i.labelExpression){const o=e.fields||((s=e.layerDefinition)==null?void 0:s.fields)||this.fields;i.labelExpression=i.labelExpression.replaceAll(vpt,(a,l)=>`[${_pt(l,o)}]`)}return i}):null}function _pt(t,e){if(!e)return t;const r=t.toLowerCase();for(let n=0;n=n[0])return!0;if(typeof n[1]=="function"&&(n[1]=n[1]()),n[1].has(r))return!1}return!0}Yx.push([10.91,()=>{const t=new Set([9709,9716,9741,9761,9766]);for(let e=9712;e<=9713;e++)t.add(e);for(let e=9748;e<=9749;e++)t.add(e);for(let e=20904;e<=20932;e++)t.add(e);for(let e=21004;e<=21032;e++)t.add(e);for(let e=21207;e<=21264;e++)t.add(e);for(let e=21307;e<=21364;e++)t.add(e);for(let e=23301;e<=23333;e++)t.add(e);for(let e=102759;e<=102760;e++)t.add(e);for(let e=102934;e<=102955;e++)t.add(e);return t}]),Yx.push([10.9,()=>{const t=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let e=9356;e<=9360;e++)t.add(e);for(let e=9404;e<=9407;e++)t.add(e);for(let e=9476;e<=9482;e++)t.add(e);for(let e=9487;e<=9494;e++)t.add(e);for(let e=9697;e<=9699;e++)t.add(e);return t}]),Yx.push([10.81,()=>{const t=new Set([9265,9333,103598,103699]);for(let e=9248;e<=9254;e++)t.add(e);for(let e=9271;e<=9273;e++)t.add(e);for(let e=9284;e<=9285;e++)t.add(e);for(let e=21453;e<=21463;e++)t.add(e);return t}]),Yx.push([10.8,()=>{const t=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let e=8035;e<=8036;e++)t.add(e);for(let e=8455;e<=8456;e++)t.add(e);for(let e=8518;e<=8529;e++)t.add(e);for(let e=8533;e<=8536;e++)t.add(e);for(let e=8538;e<=8540;e++)t.add(e);for(let e=8677;e<=8679;e++)t.add(e);for(let e=8902;e<=8903;e++)t.add(e);for(let e=8907;e<=8910;e++)t.add(e);for(let e=8949;e<=8951;e++)t.add(e);for(let e=8972;e<=8987;e++)t.add(e);for(let e=9039;e<=9040;e++)t.add(e);for(let e=9068;e<=9069;e++)t.add(e);for(let e=9140;e<=9141;e++)t.add(e);for(let e=9148;e<=9150;e++)t.add(e);for(let e=9153;e<=9159;e++)t.add(e);for(let e=9205;e<=9218;e++)t.add(e);for(let e=9221;e<=9222;e++)t.add(e);for(let e=54098;e<=54101;e++)t.add(e);return t}]),Yx.push([10.71,()=>{const t=new Set([6316]);for(let e=8351;e<=8353;e++)t.add(e);for(let e=9294;e<=9297;e++)t.add(e);for(let e=22619;e<=22621;e++)t.add(e);for(let e=103586;e<=103594;e++)t.add(e);return t}]);async function bpt(t,e,r){const n=t&&t.getAtOrigin&&t.getAtOrigin("renderer",e.origin);if(n&&n.type==="unique-value"&&n.styleOrigin){const i=await _me(n.populateFromStyle());if(Q1(r),i.ok===!1){const s=i.error;e!=null&&e.messages&&e.messages.push(new cm("renderer:style-reference",`Failed to create unique value renderer from style reference: ${s.message}`,{error:s,context:e})),t.clear("renderer",e==null?void 0:e.origin)}}}var KG;let Xx=KG=class extends qr{constructor(t){super(t),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new KG({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};T([B({type:[String],json:{write:!0}})],Xx.prototype,"groupByFields",void 0),T([B({type:Number,json:{write:!0}})],Xx.prototype,"topCount",void 0),T([B({type:[String],json:{write:!0}})],Xx.prototype,"orderByFields",void 0),Xx=KG=T([_t("esri.rest.support.TopFilter")],Xx);const Cpt=Xx;var QG;const cse=new ro({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),hse=new ro({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let ka=QG=class extends qr{constructor(t){super(t),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new QG(Qt({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};T([B({type:Boolean,json:{write:!0}})],ka.prototype,"cacheHint",void 0),T([B({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],ka.prototype,"distance",void 0),T([B({types:a7,json:{read:oE,write:!0}})],ka.prototype,"geometry",void 0),T([B({type:Number,json:{write:!0}})],ka.prototype,"geometryPrecision",void 0),T([B({type:Number,json:{write:!0}})],ka.prototype,"maxAllowableOffset",void 0),T([B({type:Number,json:{read:{source:"resultRecordCount"}}})],ka.prototype,"num",void 0),T([B({json:{write:!0}})],ka.prototype,"objectIds",void 0),T([B({type:[String],json:{write:!0}})],ka.prototype,"orderByFields",void 0),T([B({type:[String],json:{write:!0}})],ka.prototype,"outFields",void 0),T([B({type:mo,json:{read:{source:"outSR"},write:{target:"outSR"}}})],ka.prototype,"outSpatialReference",void 0),T([B({type:String,json:{write:!0}})],ka.prototype,"resultType",void 0),T([B({json:{write:!0}})],ka.prototype,"returnGeometry",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],ka.prototype,"returnM",void 0),T([B({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],ka.prototype,"returnZ",void 0),T([B({type:Number,json:{read:{source:"resultOffset"}}})],ka.prototype,"start",void 0),T([On("start"),On("num")],ka.prototype,"writeStart",null),T([B({type:String,json:{read:{source:"spatialRel",reader:cse.read},write:{target:"spatialRel",writer:cse.write}}})],ka.prototype,"spatialRelationship",void 0),T([B({type:ay,json:{write:!0}})],ka.prototype,"timeExtent",void 0),T([B({type:Cpt,json:{write:!0}})],ka.prototype,"topFilter",void 0),T([B({type:String,json:{read:hse.read,write:{writer:hse.write,overridePolicy(t){return{enabled:t!=null&&this.distance!=null&&this.distance>0}}}}})],ka.prototype,"units",void 0),T([B({type:String,json:{write:!0}})],ka.prototype,"where",void 0),ka=QG=T([_t("esri.rest.support.TopFeaturesQuery")],ka),ka.from=gc(ka);const yI=ka;function Spt({displayField:t,editFieldsInfo:e,fields:r,objectIdField:n,title:i},s){if(!r)return null;const o=Ipt({editFieldsInfo:e,fields:r,objectIdField:n},s);if(!o.length)return null;const a=kpt({titleBase:i,fields:r,displayField:t}),l=Lpt();return new aE({title:a,content:l,fieldInfos:o})}const Ept=(t,e)=>e.visibleFieldNames?e.visibleFieldNames.has(t.name):Pnt(t,e);function Mpt(t,e){const r=t;return e&&(t=t.filter(n=>!e.includes(n.type))),t===r&&(t=t.slice()),t.sort(Tpt),t}function Tpt(t,e){return t.type==="oid"?-1:e.type==="oid"?1:dse(t)?-1:dse(e)?1:(t.alias||t.name).toLocaleLowerCase().localeCompare((e.alias||e.name).toLocaleLowerCase())}function Ipt(t,e){const r=e==null?void 0:e.visibleFieldNames;return Mpt(t.fields??[],(e==null?void 0:e.ignoreFieldTypes)||Apt).map(n=>new xX({fieldName:n.name,isEditable:Ant(n,t),label:n.alias,format:Rpt(n),visible:Ept(n,{...t,visibleFieldNames:r})}))}function Rpt(t){switch(t.type){case"small-integer":case"integer":case"single":return new lL({digitSeparator:!0,places:0});case"double":return new lL({digitSeparator:!0,places:2});case"string":return rit(t.name)?new lL({digitSeparator:!0,places:0}):void 0;default:return}}function Lpt(){return[new jC,new BC]}function kpt(t){const e=Ent(t),{titleBase:r}=t;return e?`${r}: {${e.trim()}}`:r??""}function dse(t){var r;return(t.name&&t.name.toLowerCase())==="name"?!0:((r=t.alias)==null?void 0:r.toLowerCase())==="name"}const Apt=["geometry","blob","raster","guid","xml"];var _4;(function(t){t[t.SAVE=0]="SAVE",t[t.SAVE_AS=1]="SAVE_AS"})(_4||(_4={}));const Jh="FeatureLayer";function vI(t,e){return new Pr("layer:unsupported",`Layer (${t.title}, ${t.id}) of type '${t.declaredClass}' ${e}`,{layer:t})}function fse(t){return t&&t instanceof $o}const yz=ypt();function vz(t,e,r){const n=!!(r!=null&&r.writeLayerSchema);return{enabled:n,ignoreOrigin:n}}let Ei=class extends Bdt(pft(Dht(apt(Mht(xht(xft(gpt(fpt(dpt(Wut(gft(ipt(q_e(wht(zut(Fa(tut))))))))))))))))){constructor(...t){super(...t),this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=mo.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=UZ(async(e,r,n)=>{const{save:i,saveAs:s}=await fs(()=>import("./featureLayerUtils-CRRc6-7r.js"),__vite__mapDeps([131,132,133,134,130,135,136,33]));switch(e){case _4.SAVE:return i(this,r);case _4.SAVE_AS:return s(this,n,r)}})}destroy(){var t;(t=this.source)==null||t.destroy()}normalizeCtorArgs(t,e){return typeof t=="string"?{url:t,...e}:t}load(t){var n;const e=t!=null?t.signal:null;if((n=this.portalItem)!=null&&n.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(e).then(i=>this.initLayerProperties(i))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},t).catch(q0).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){const i=await this._fetchFirstValidLayerId(e);i!=null&&(this.layerId=i)}if(!this.url&&!this._hasMemorySource())throw new Pr("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(e))}).then(()=>_dt(this,"load",t));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(t,e){return e=e.layerDefinition||e,H3e(e,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){var t;return!(this.loaded&&!((t=this.capabilities)!=null&&t.operations.supportsEditing))&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(t){this._overrideIfSome("editingEnabled",t)}readEditingEnabled(t,e){return this._readEditingEnabled(e,!1)}readEditingEnabledFromWebMap(t,e,r){return this._readEditingEnabled(e,!0,r)}writeEditingEnabled(t,e){this._writeEditingEnabled(t,e,!1)}writeEditingEnabledToWebMap(t,e,r,n){this._writeEditingEnabled(t,e,!0,n)}get effectiveEditingEnabled(){return xdt(this)}readIsTable(t,e){return(e=(e==null?void 0:e.layerDefinition)??e).type==="Table"||!e.geometryType}writeIsTable(t,e,r,n){n!=null&&n.writeLayerSchema&&Ph(r,t?"Table":"Feature Layer",e)}readGlobalIdField(t,e){return j3e(e.layerDefinition||e)}readObjectIdField(t,e){return V3e(e.layerDefinition||e)}get parsedUrl(){const t=fd(this.url);return t!=null&&(this.dynamicDataSource!=null?t.path=yw(t.path,"dynamicLayer"):this.layerId!=null&&(t.path=yw(t.path,this.layerId.toString()))),t}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(t){hne(t,this.fieldsIndex),this._set("renderer",t)}readRenderer(t,e,r){var i;e=e.layerDefinition||e;const n=(i=e.drawingInfo)==null?void 0:i.renderer;if(n){const s=WC(n,e,r)??void 0;return s||li.getLogger(this).error("Failed to create renderer",{rendererDefinition:e.drawingInfo.renderer,layer:this,context:r}),s}return dJ(e,r)}set source(t){const e=this._get("source");e!==t&&(fse(e)&&this._resetMemorySource(e),fse(t)&&this._initMemorySource(t),this._set("source",t))}castSource(t){return t?Array.isArray(t)||t instanceof $o?new Rg({layer:this,items:t}):t:null}readSource(t,e){const r=h3e.fromJSON(e.featureSet);return new Rg({layer:this,items:(r==null?void 0:r.features)??[]})}readTemplates(t,e){const r=e.editFieldsInfo,n=r==null?void 0:r.creatorField,i=r==null?void 0:r.editorField;return t=t==null?void 0:t.map(s=>bJ.fromJSON(s)),this._fixTemplates(t,n),this._fixTemplates(t,i),t}readTitle(t,e){var i,s,o;const r=((i=e.layerDefinition)==null?void 0:i.name)??e.name,n=e.title||((s=e.layerDefinition)==null?void 0:s.title);if(r){const a=(o=this.portalItem)==null?void 0:o.title;if(this.sublayerTitleMode==="item-title")return this.url?Uut(this.url,r):r;let l=r;if(!l&&this.url){const u=mE(this.url);u!=null&&(l=u.title)}return l?(this.sublayerTitleMode==="item-title-and-service-name"&&a&&a!==l&&(l=a+" - "+l),nJ(l)):void 0}if(this.sublayerTitleMode==="item-title"&&n)return n}readTitleFromWebMap(t,e){var r;return e.title||((r=e.layerDefinition)==null?void 0:r.name)}readTypeIdField(t,e){let r=(e=e.layerDefinition||e).typeIdField;if(r&&e.fields){r=r.toLowerCase();const n=e.fields.find(i=>i.name.toLowerCase()===r);n&&(r=n.name)}return r}readTypes(t,e){t=(e=e.layerDefinition||e).types;const r=e.editFieldsInfo,n=r==null?void 0:r.creatorField,i=r==null?void 0:r.editorField;return t==null?void 0:t.map(s=>(s=v5e.fromJSON(s),this._fixTemplates(s.templates,n),this._fixTemplates(s.templates,i),s))}readVisible(t,e){var r;return((r=e.layerDefinition)==null?void 0:r.defaultVisibility)!=null?!!e.layerDefinition.defaultVisibility:e.visibility!=null?!!e.visibility:void 0}async addAttachment(t,e){return rdt(this,t,e,Jh)}async updateAttachment(t,e,r){return ndt(this,t,e,r,Jh)}async applyEdits(t,e){return idt(this,t,e)}async uploadAssets(t,e){return sdt(this,t,e)}on(t,e){return super.on(t,e)}createPopupTemplate(t){return Spt(this,t)}async createGraphicsSource(t){if(this._hasMemorySource()&&this.source)return this.source.load({signal:t});const{default:e}=await pke(fs(()=>import("./FeatureLayerSource-DHybgE9g.js"),__vite__mapDeps([137,70,77,138,127,74,105,73,106,126,49,50,51,52,55,53,139,140,86,84,85,18,19,141,17])),t);return new e({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:t})}createQuery(){const t=mdt(this);t.dynamicDataSource=this.dynamicDataSource;const e=this.subtypeCode!=null?`${this.subtypeField} = ${this.subtypeCode}`:null,r=Bet(this.definitionExpression,e);return t.where=r||"1=1",t}async deleteAttachments(t,e){return odt(this,t,e,Jh)}async fetchRecomputedExtents(t){return adt(this,t,Jh)}getFeatureType(t){return Cdt(this.types,this.typeIdField,t)}getFieldDomain(t,e){var s;const r=e==null?void 0:e.feature,n=ydt(this,r);if(n){const o=(s=n.domains)==null?void 0:s[t];return(o==null?void 0:o.type)==="inherited"?this._getLayerDomain(t):o}const i=this.getFeatureType(r);if(i){const o=i.domains&&i.domains[t];if(o&&o.type!=="inherited")return o}return this._getLayerDomain(t)}getField(t){return this.fieldsIndex.get(t)}async queryAttachments(t,e){return ldt(this,t,e,Jh)}async queryFeatures(t,e){const r=await this.load(),n=await r.source.queryFeatures(c_.from(t)??r.createQuery(),e);if(n!=null&&n.features)for(const i of n.features)i.layer=i.sourceLayer=r;return n}async queryObjectIds(t,e){return udt(this,t,e,Jh)}async queryFeatureCount(t,e){return cdt(this,t,e,Jh)}async queryExtent(t,e){return hdt(this,t,e,Jh)}async queryRelatedFeatures(t,e){return ddt(this,t,e,Jh)}async queryRelatedFeaturesCount(t,e){return fdt(this,t,e,Jh)}async queryTopFeatures(t,e){var s;const{source:r,capabilities:n}=await this.load();if(!r.queryTopFeatures||!((s=n==null?void 0:n.query)!=null&&s.supportsTopFeaturesQuery))throw new Pr(Jh,"Layer source does not support queryTopFeatures capability");const i=await r.queryTopFeatures(yI.from(t),e);if(i!=null&&i.features)for(const o of i.features)o.layer=o.sourceLayer=this;return i}async queryTopObjectIds(t,e){const{source:r,capabilities:n}=await this.load();if(!r.queryTopObjectIds||!(n!=null&&n.query.supportsTopFeaturesQuery))throw new Pr(Jh,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(yI.from(t),e)}async queryTopFeaturesExtent(t,e){var i;const{source:r,capabilities:n}=await this.load();if(!r.queryTopExtents||!((i=n==null?void 0:n.query)!=null&&i.supportsTopFeaturesQuery))throw new Pr(Jh,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(yI.from(t),e)}async queryTopFeatureCount(t,e){var i;const{source:r,capabilities:n}=await this.load();if(!r.queryTopCount||!((i=n==null?void 0:n.query)!=null&&i.supportsTopFeaturesQuery))throw new Pr(Jh,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(yI.from(t),e)}read(t,e){const r=t.featureCollection;if((r||t.type==="Feature Collection")&&(this.resourceInfo=t),r){const n=r.layers;n&&n.length===1&&(super.read(n[0],e),r.showLegend!=null&&super.read({showLegend:r.showLegend},e))}super.read(t,e),e&&e.origin==="service"&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(t,e){e={...e,origin:(e==null?void 0:e.origin)??void 0,writeLayerSchema:(e==null?void 0:e.writeLayerSchema)??this._hasMemorySource()};const{origin:r,layerContainerType:n,messages:i}=e;if(this.dynamicDataSource)return i==null||i.push(vI(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if((r==="web-map"||r==="web-scene")&&n!=="tables")return i==null||i.push(vI(this,`a table source can only be written to tables, not ${n}`)),null;if(this._hasMemorySource())return i==null||i.push(vI(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&(r==="web-map"||r==="web-scene")&&n==="tables")return i==null||i.push(vI(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(t,e)}clone(){if(this._hasMemorySource())throw new Pr(Jh,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(t){var e;return!!this.loaded&&(((e=this.source)==null?void 0:e.type)==="memory"||wpt(this,t))}async save(t){return this._debouncedSaveOperations(_4.SAVE,t)}async saveAs(t,e){return this._debouncedSaveOperations(_4.SAVE_AS,e,t)}_readEditingEnabled(t,e,r){var i;let n=(i=t.layerDefinition)==null?void 0:i.capabilities;return n?this._hasEditingCapability(n):(n=t.capabilities,e&&(r==null?void 0:r.origin)==="web-map"&&!this._hasMemorySource()&&n?this._hasEditingCapability(n):void 0)}_hasEditingCapability(t){return t.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(t,e,r,n){var i,s;if(!t){const o=(s=(i=this.capabilities)==null?void 0:i.operations)!=null&&s.supportsSync?"Query,Sync":"Query";Ph("layerDefinition.capabilities",o,e),r&&!(n!=null&&n.writeLayerSchema)&&(e.capabilities=o)}}_getLayerDomain(t){const e=this.fieldsIndex.get(t);return e?e.domain:null}_fetchFirstValidLayerId(t){return sa(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{const r=e.data;if(r)return this.findFirstValidLayerId(r)})}async initLayerProperties(t){var e;return this._set("source",t),t.sourceJSON&&(this.sourceJSON=t.sourceJSON,this.read(t.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:(e=this.portalItem)==null?void 0:e.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),hne(this.renderer,this.fieldsIndex),Yve(this.timeInfo,this.fieldsIndex),bpt(this,{origin:"service"})}async hasDataChanged(){return pdt(this)}async fetchPublishingStatus(){const t=this.source;return t!=null&&t.fetchPublishingStatus?t.fetchPublishingStatus():"unavailable"}_verifyFields(){var e,r;const t=((e=this.parsedUrl)==null?void 0:e.path)??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+t+")"),this.isTable||this._hasMemorySource()||t.search(/\/FeatureServer\//i)!==-1||(r=this.fields)!=null&&r.some(n=>n.type==="geometry")||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+t+")")}_fixTemplates(t,e){t&&t.forEach(r=>{var i;const n=(i=r.prototype)==null?void 0:i.attributes;n&&e&&delete n[e]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new Pr("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new Pr("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(t){t.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([t.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),t.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(t){t.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(t){return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}};T([un("service","capabilities")],Ei.prototype,"readCapabilities",null),T([B({json:{origins:{"web-scene":{write:!1}},write:!0}})],Ei.prototype,"charts",void 0),T([B({readOnly:!0})],Ei.prototype,"createQueryVersion",null),T([B({json:{read:{source:"layerDefinition.copyrightText"}}})],Ei.prototype,"copyright",void 0),T([B({json:{read:{source:"layerDefinition.displayField"}}})],Ei.prototype,"displayField",void 0),T([B({types:o5,readOnly:!0})],Ei.prototype,"defaultSymbol",void 0),T([B({type:$1})],Ei.prototype,"dynamicDataSource",void 0),T([B({type:Boolean})],Ei.prototype,"editingEnabled",null),T([un(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ei.prototype,"readEditingEnabled",null),T([un("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ei.prototype,"readEditingEnabledFromWebMap",null),T([On(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ei.prototype,"writeEditingEnabled",null),T([On("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ei.prototype,"writeEditingEnabledToWebMap",null),T([B({readOnly:!0})],Ei.prototype,"effectiveEditingEnabled",null),T([B({...yz.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:vz}}}}})],Ei.prototype,"fields",void 0),T([B(yz.fieldsIndex)],Ei.prototype,"fieldsIndex",void 0),T([B({type:Jlt,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ei.prototype,"formTemplate",void 0),T([B({json:{read:{source:"layerDefinition.extent"}}})],Ei.prototype,"fullExtent",void 0),T([B({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:vz,writer(t,e,r){const n=t?BG.toJSON(t):null;n&&Ph(r,n,e)}}}},read:{source:"layerDefinition.geometryType",reader:BG.read}}})],Ei.prototype,"geometryType",void 0),T([B({json:{read:{source:"layerDefinition.hasM"}}})],Ei.prototype,"hasM",void 0),T([B({json:{read:{source:"layerDefinition.hasZ"}}})],Ei.prototype,"hasZ",void 0),T([B(Zht)],Ei.prototype,"id",void 0),T([B({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ei.prototype,"infoFor3D",void 0),T([B({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ei.prototype,"isTable",void 0),T([un("service","isTable",["type","geometryType"]),un("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ei.prototype,"readIsTable",null),T([On("web-map","isTable")],Ei.prototype,"writeIsTable",null),T([B(uJ)],Ei.prototype,"labelsVisible",void 0),T([B({type:[CO],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:gz,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:gz,write:{enabled:!0,layerContainerTypes:mc}}},name:"layerDefinition.drawingInfo.labelingInfo",read:gz,write:!0}})],Ei.prototype,"labelingInfo",void 0),T([B((()=>{const t=Qt(Wht);return t.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,r,n){Ph(n,MX(e),r)}}},t})())],Ei.prototype,"opacity",void 0),T([B(Ght)],Ei.prototype,"legendEnabled",void 0),T([B({type:["show","hide"],json:(()=>{const t=Qt(z3e.json);return t.origins["portal-item"]={read:!1,write:!1},t})()})],Ei.prototype,"listMode",void 0),T([un("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ei.prototype,"readGlobalIdField",null),T([B({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:vz}}}}})],Ei.prototype,"objectIdField",void 0),T([un("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ei.prototype,"readObjectIdField",null),T([B({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ei.prototype,"operationalLayerType",void 0),T([B(yz.outFields)],Ei.prototype,"outFields",void 0),T([B({readOnly:!0})],Ei.prototype,"parsedUrl",null),T([B({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ei.prototype,"path",void 0),T([B(lJ)],Ei.prototype,"popupEnabled",void 0),T([B({type:aE,json:{name:"popupInfo",write:!0}})],Ei.prototype,"popupTemplate",void 0),T([B({readOnly:!0})],Ei.prototype,"defaultPopupTemplate",null),T([B({types:yO,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Slt,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:mc,overridePolicy:(t,e,r)=>({ignoreOrigin:r==null?void 0:r.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(t,e,r)=>({ignoreOrigin:r==null?void 0:r.writeLayerSchema})}}})],Ei.prototype,"renderer",null),T([un("service","renderer",["drawingInfo.renderer","defaultSymbol"]),un("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ei.prototype,"readRenderer",null),T([B()],Ei.prototype,"resourceInfo",void 0),T([B((()=>{const t=Qt(Uht);return t.json.origins["portal-item"]={read:!1,write:!1},t})())],Ei.prototype,"screenSizePerspectiveEnabled",void 0),T([B({clonable:!1})],Ei.prototype,"source",null),T([Pl("source")],Ei.prototype,"castSource",null),T([un("portal-item","source",["featureSet"]),un("web-map","source",["featureSet"])],Ei.prototype,"readSource",null),T([B({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ei.prototype,"spatialReference",void 0),T([B({type:Number})],Ei.prototype,"subtypeCode",void 0),T([B({type:[bJ]})],Ei.prototype,"templates",void 0),T([un("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ei.prototype,"readTemplates",null),T([B({type:y5e})],Ei.prototype,"timeInfo",void 0),T([B()],Ei.prototype,"title",void 0),T([un("service","title",["name"]),un("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ei.prototype,"readTitle",null),T([un("web-map","title",["layerDefinition.name","title"])],Ei.prototype,"readTitleFromWebMap",null),T([B({type:String})],Ei.prototype,"sublayerTitleMode",void 0),T([B({json:{read:!1}})],Ei.prototype,"type",void 0),T([B({type:String})],Ei.prototype,"typeIdField",void 0),T([un("service","typeIdField"),un("typeIdField",["layerDefinition.typeIdField"])],Ei.prototype,"readTypeIdField",null),T([B({type:[v5e]})],Ei.prototype,"types",void 0),T([un("service","types",["types"]),un("types",["layerDefinition.types"])],Ei.prototype,"readTypes",null),T([B({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ei.prototype,"visible",void 0),T([un("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ei.prototype,"readVisible",null),Ei=T([_t("esri.layers.FeatureLayer")],Ei);const _5e=Ei,gkt=Object.freeze(Object.defineProperty({__proto__:null,default:_5e},Symbol.toStringTag,{value:"Module"}));/* @preserve +* @terraformer/arcgis - v2.1.1 - MIT +* Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc. +* Tue Aug 02 2022 14:23:48 GMT-0700 (Pacific Daylight Time) +*/var Ppt=function(e,r,n,i){var s=(i[0]-n[0])*(e[1]-n[1])-(i[1]-n[1])*(e[0]-n[0]),o=(r[0]-e[0])*(e[1]-n[1])-(r[1]-e[1])*(e[0]-n[0]),a=(i[1]-n[1])*(r[0]-e[0])-(i[0]-n[0])*(r[1]-e[1]);if(a!==0){var l=s/a,u=o/a;if(l>=0&&l<=1&&u>=0&&u<=1)return!0}return!1},$pt=function(e,r){for(var n=!1,i=-1,s=e.length,o=s-1;++i=0},w5e=function(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r},Npt=function(e,r){var n=x5e(e,r),i=$pt(e,r[0]);return!!(!n&&i)},Dpt=function(e){for(var r=[],n=[],i,s,o,a=0;a=0;i--)if(s=r[i][0],Npt(s,o)){r[i].push(o),f=!0;break}f||d.push(o)}for(;d.length;){o=d.pop();var m=!1;for(i=r.length-1;i>=0;i--)if(s=r[i][0],x5e(s,o)){r[i].push(o),m=!0;break}m||r.push([o.reverse()])}return r.length===1?{type:"Polygon",coordinates:r[0]}:{type:"MultiPolygon",coordinates:r}},Fpt=function(e,r){for(var n=["OBJECTID","FID"],i=0;i=4){tq(i)||i.reverse(),r.push(i);for(var s=0;s=4&&(tq(o)&&o.reverse(),r.push(o))}}return r},zpt=function(e){for(var r=[],n=0;n=0;s--){var o=i[s].slice(0);r.push(o)}return r},pse=function t(e,r){r=r||"OBJECTID";var n={wkid:4326},i={},s;switch(e.type){case"Point":i.x=e.coordinates[0],i.y=e.coordinates[1],e.coordinates[2]!=null&&(i.z=e.coordinates[2]),i.spatialReference=n;break;case"MultiPoint":i.points=e.coordinates.slice(0),e.coordinates[0][2]!=null&&(i.hasZ=!0),i.spatialReference=n;break;case"LineString":i.paths=[e.coordinates.slice(0)],e.coordinates[0][2]!=null&&(i.hasZ=!0),i.spatialReference=n;break;case"MultiLineString":i.paths=e.coordinates.slice(0),e.coordinates[0][0][2]!=null&&(i.hasZ=!0),i.spatialReference=n;break;case"Polygon":i.rings=b5e(e.coordinates.slice(0)),e.coordinates[0][0][2]!=null&&(i.hasZ=!0),i.spatialReference=n;break;case"MultiPolygon":i.rings=zpt(e.coordinates.slice(0)),e.coordinates[0][0][0][2]!=null&&(i.hasZ=!0),i.spatialReference=n;break;case"Feature":e.geometry&&(i.geometry=t(e.geometry,r)),i.attributes=e.properties?w5e(e.properties):{},e.id&&(i.attributes[r]=e.id);break;case"FeatureCollection":for(i=[],s=0;s{const[r,n]=E.useState(null),[i,s]=E.useState(!0),[o,a]=E.useState(null),[l,u]=E.useState(t),[d,f]=E.useState(e),m=E.useCallback(async(M,O)=>{s(!0),a(null);let I=Hi[O];try{const A=jpt(O),j=new _5e({url:A}),H=new c_;O==="parcel"?H.where=`parcel_id = '${M}'`:H.where=`${I.id_column} = ${M}`,H.outFields=["*"],H.returnGeometry=!0,H.f="geojson",H.outSpatialReference=4326;const W=await j.queryFeatures(H);let re=TO(W.toJSON());W.features.length>0?n(re.features[0]):n(null)}catch(A){a(A.message)}finally{s(!1)}},[]);E.useEffect(()=>{m(l,d)},[l,d,m]);const v=E.useCallback((M,O)=>{u(M),O&&f(O)},[]);return{data:r,loading:i,error:o,refetch:v,nullify:()=>{s(!0),n(null),s(!1)}}},jpt=t=>{switch(t){case"building":return Hi.building.endpoint;case"parcel":return Hi.parcel.endpoint;case"address":return Hi.address.endpoint;case"street":return Hi.street.endpoint;default:throw new Error("Invalid layer specified")}};function C5e(t){return Object.keys(t).some(e=>{let r=t[e];if(!r)return!1;switch(r&&r.toParam&&(r=r.toParam()),r.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function S5e(t){const e={};return Object.keys(t).forEach(r=>{var n,i;let s=t[r];if(s&&s.toParam&&(s=s.toParam()),!s&&s!==0&&typeof s!="boolean"&&typeof s!="string")return;const o=s.constructor.name;let a;switch(o){case"Array":const l=(i=(n=s[0])===null||n===void 0?void 0:n.constructor)===null||i===void 0?void 0:i.name;a=l==="Array"?s:l==="Object"?JSON.stringify(s):s.join(",");break;case"Object":a=JSON.stringify(s);break;case"Date":a=s.valueOf();break;case"Function":a=null;break;case"Boolean":a=s+"";break;default:a=s;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(e[r]=a)}),e}function E5e(t,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(r=>E5e(t,r)).join("&"):encodeURIComponent(t)+"="+encodeURIComponent(e)}function rq(t){const e=S5e(t);return Object.keys(e).map(r=>E5e(r,e[r])).join("&")}const Vpt=globalThis.FormData;function Upt(t,e){const r=C5e(t)||e,n=S5e(t);if(r){const i=new Vpt;return Object.keys(n).forEach(s=>{if(typeof Blob<"u"&&n[s]instanceof Blob){const o=n.fileName||n[s].name||s;i.append(s,n[s],o)}else i.append(s,n[s])}),i}else return rq(t)}class X4 extends Error{constructor(e,r,n,i,s){super(e);const o=new.target.prototype;Object.setPrototypeOf(this,o),e=e||"UNKNOWN_ERROR",r=r||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=r==="UNKNOWN_ERROR_CODE"?e:`${r}: ${e}`,this.originalMessage=e,this.code=r,this.response=n,this.url=i,this.options=s}}function M5e(t){console&&console.warn&&console.warn.apply(console,[t])}function Hpt(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}const Gpt="@esri/arcgis-rest-js";function qpt(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}class T5e extends X4{constructor(e="AUTHENTICATION_ERROR",r="AUTHENTICATION_ERROR_CODE",n,i,s){super(e,r,n,i,s),this.name="ArcGISAuthError",this.message=r==="AUTHENTICATION_ERROR_CODE"?e:`${r}: ${e}`;const o=new.target.prototype;Object.setPrototypeOf(this,o)}retry(e,r=1){let n=0;const i=(s,o)=>{n=n+1,e(this.url,this.options).then(a=>{const l=Object.assign(Object.assign({},this.options),{authentication:a});return I5e(this.url,l)}).then(a=>{s(a)}).catch(a=>{a.name==="ArcGISAuthError"&&n=r?o(this):o(a)})};return new Promise((s,o)=>{i(s,o)})}}function Wpt(t,e,r,n,i){if(t.code>=400){const{message:s,code:o}=t;throw new X4(s,o,t,e,n)}if(t.error){const{message:s,code:o,messageCode:a}=t.error,l=a||o||"UNKNOWN_ERROR_CODE";throw o===498||o===499?i||new T5e(s,l,t,e,n):new X4(s,l,t,e,n)}if(t.status==="failed"||t.status==="failure"){let s,o="UNKNOWN_ERROR_CODE";try{s=JSON.parse(t.statusMessage).message,o=JSON.parse(t.statusMessage).code}catch{s=t.statusMessage||t.message}throw new X4(s,o,t,e,n)}return t}function I5e(t,e){const r=qpt(),n=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},r),e),{params:Object.assign(Object.assign({},r.params),e.params),headers:Object.assign(Object.assign({},r.headers),e.headers)}),{httpMethod:i,rawResponse:s}=n,o=Object.assign({f:"json"},n.params);let a=null;const l={method:i,signal:n.signal,credentials:n.credentials||"same-origin"};n.headers&&n.headers["X-Esri-Auth-Client-Id"]&&t.indexOf("/oauth2/platformSelf")>-1&&(l.credentials="include");let u;if(typeof n.authentication=="string"){const f=n.authentication;u={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(f)},!n.authentication.startsWith("AAPK")&&!n.authentication.startsWith("AATK")&&!n.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(M5e("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else u=n.authentication;const d=t;return(u?u.getToken(t).catch(f=>(f.url=t,f.options=n,a=f,Promise.resolve(""))):Promise.resolve("")).then(f=>{f.length&&(o.token=f),u&&u.getDomainCredentials&&(l.credentials=u.getDomainCredentials(t));const m={};if(l.method==="GET"){o.token&&n.hideToken&&typeof window>"u"&&(m["X-Esri-Authorization"]=`Bearer ${o.token}`,delete o.token);const M=rq(o)===""?t:t+"?"+rq(o);n.maxUrlLength&&M.length>n.maxUrlLength||o.token&&n.hideToken?(l.method="POST",f.length&&n.hideToken&&(o.token=f,delete m["X-Esri-Authorization"])):t=M}const v=new RegExp("/items/.+/updateResources").test(t);return l.method==="POST"&&(l.body=Upt(o,v)),l.headers=Object.assign(Object.assign({},m),n.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!l.headers.referer&&(l.headers.referer=Gpt),!C5e(o)&&!v&&(l.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(t,l):Hpt().then(({fetch:b})=>b(t,l))}).then(f=>{if(!f.ok)return f.json().then(m=>{const{status:v,statusText:b}=f,{message:M,details:O}=m.error,I=`${M}. ${O?O.join(" "):""}`.trim();throw new X4(I,`HTTP ${v} ${b}`,m,t,n)}).catch(m=>{if(m.name==="ArcGISRequestError")throw m;const{status:v,statusText:b}=f;throw new X4(b,`HTTP ${v}`,f,t,n)});if(s)return f;switch(o.f){case"json":return f.json();case"geojson":return f.json();case"html":return f.text();case"text":return f.text();default:return f.blob()}}).then(f=>{if((o.f==="json"||o.f==="geojson")&&!s){const m=Wpt(f,d,o,n,a);if(a){const v=t.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];n.authentication.federatedServers[v]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return m}else return f})}function IO(t,e={params:{f:"json"}}){return I5e(t,e).catch(r=>r instanceof T5e&&e.authentication&&typeof e.authentication!="string"&&e.authentication.canRefresh&&e.authentication.refreshCredentials?r.retry(()=>e.authentication.refreshCredentials(),1):Promise.reject(r))}function R5e(t,e,r){const n=["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"],i=Object.assign(Object.assign({params:{}},r),t);return i.params=e.reduce((s,o)=>((t[o]||typeof t[o]=="boolean"||typeof t[o]=="number"&&t[o]===0)&&(s[o]=t[o]),s),i.params),n.reduce((s,o)=>(i[o]&&(s[o]=i[o]),s),{})}function RO(t){return typeof t!="string"||(t=t.trim(),t[t.length-1]==="/"&&(t=t.slice(0,-1))),t}const mse="https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/",gse="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/";function Zpt(t){let e={},r;return typeof t=="string"?(e.params={singleLine:t},r=mse):(r=t.endpoint||mse,e=R5e(t,["singleLine","address","address2","address3","neighborhood","city","subregion","region","postal","postalExt","countryCode","outFields","magicKey"],{params:Object.assign({},t.params)}),e.params.postal&&typeof e.params.postal=="number"&&M5e("The postal code should be a string. Issues can arise when using it as a number, especially if they start with zero.")),IO(`${RO(r)}/findAddressCandidates`,e).then(n=>{if(typeof t!="string"&&t.rawResponse)return n;const i=n.spatialReference;if(n.candidates.forEach(function(s){s.location.spatialReference=i,s.extent&&(s.extent.spatialReference=i)}),i.wkid===4326){const s=n.candidates.map(o=>({type:"Feature",geometry:TO(o.location),properties:Object.assign({address:o.address,score:o.score},o.attributes)}));n.geoJson={type:"FeatureCollection",features:s}}return n})}function Ypt(t){const e=Object.assign({endpoint:gse,params:{}},t);return e.params.addresses={records:t.addresses.map(r=>({attributes:r}))},!t.authentication&&e.endpoint===gse?Promise.reject("bulk geocoding using the ArcGIS service requires authentication"):IO(`${RO(e.endpoint)}/geocodeAddresses`,e).then(r=>{if(e.rawResponse)return r;const n=r.spatialReference;return r.locations.forEach(function(i){i.location&&(i.location.spatialReference=n)}),r})}const L5e={prod:"https://opengis.detroitmi.gov/opengis/rest/services/BaseUnits/BaseUnitGeocoder/GeocodeServer",dev:"https://opengis.detroitmi.gov/opengis/rest/services/BaseUnits/BaseUnitGeocoderDev/GeocodeServer"},k5e=L5e.prod,A5e=(t="")=>{const[e,r]=E.useState(t),[n,i]=E.useState(null),[s,o]=E.useState(!1),[a,l]=E.useState(null);return E.useEffect(()=>{e?(o(!0),l(null),Zpt({endpoint:k5e,singleLine:e,outFields:"*"}).then(d=>{d.candidates&&d.candidates.length>0?i(d.candidates[0]):(i(null),l("No results found...")),o(!1)}).catch(d=>{l(d),i(null),o(!1)})):i(null)},[e]),{address:e,feature:n,loading:s,error:a,changeAddress:d=>{r(d)}}};function Xpt(t,e=[]){let r=[];function n(s,o){const a=E.createContext(o),l=r.length;r=[...r,o];const u=f=>{var I;const{scope:m,children:v,...b}=f,M=((I=m==null?void 0:m[t])==null?void 0:I[l])||a,O=E.useMemo(()=>b,Object.values(b));return oe.jsx(M.Provider,{value:O,children:v})};u.displayName=s+"Provider";function d(f,m){var M;const v=((M=m==null?void 0:m[t])==null?void 0:M[l])||a,b=E.useContext(v);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,Jpt(i,...e)]}function Jpt(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Kpt(t,e){return E.useReducer((r,n)=>e[r][n]??r,t)}var P5e=t=>{const{present:e,children:r}=t,n=Qpt(e),i=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),s=So(n.ref,e1t(i));return typeof r=="function"||n.isPresent?E.cloneElement(i,{ref:s}):null};P5e.displayName="Presence";function Qpt(t){const[e,r]=E.useState(),n=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),o=t?"mounted":"unmounted",[a,l]=Kpt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=_I(n.current);s.current=a==="mounted"?u:"none"},[a]),Zu(()=>{const u=n.current,d=i.current;if(d!==t){const m=s.current,v=_I(u);t?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Zu(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,f=v=>{const M=_I(n.current).includes(v.animationName);if(v.target===e&&M&&(l("ANIMATION_END"),!i.current)){const O=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=O)})}},m=v=>{v.target===e&&(s.current=_I(n.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function _I(t){return(t==null?void 0:t.animationName)||"none"}function e1t(t){var n,i;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var CJ="Collapsible",[t1t,ykt]=Xpt(CJ),[r1t,SJ]=t1t(CJ),$5e=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,u]=ty({prop:n,defaultProp:i,onChange:o});return oe.jsx(r1t,{scope:r,disabled:s,contentId:kS(),open:l,onOpenToggle:E.useCallback(()=>u(d=>!d),[u]),children:oe.jsx(no.div,{"data-state":MJ(l),"data-disabled":s?"":void 0,...a,ref:e})})});$5e.displayName=CJ;var O5e="CollapsibleTrigger",N5e=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=SJ(O5e,r);return oe.jsx(no.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":MJ(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:e,onClick:Ls(t.onClick,i.onOpenToggle)})});N5e.displayName=O5e;var EJ="CollapsibleContent",D5e=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=SJ(EJ,t.__scopeCollapsible);return oe.jsx(P5e,{present:r||i.open,children:({present:s})=>oe.jsx(n1t,{...n,ref:e,present:s})})});D5e.displayName=EJ;var n1t=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=SJ(EJ,r),[a,l]=E.useState(n),u=E.useRef(null),d=So(e,u),f=E.useRef(0),m=f.current,v=E.useRef(0),b=v.current,M=o.open||a,O=E.useRef(M),I=E.useRef();return E.useEffect(()=>{const A=requestAnimationFrame(()=>O.current=!1);return()=>cancelAnimationFrame(A)},[]),Zu(()=>{const A=u.current;if(A){I.current=I.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const j=A.getBoundingClientRect();f.current=j.height,v.current=j.width,O.current||(A.style.transitionDuration=I.current.transitionDuration,A.style.animationName=I.current.animationName),l(n)}},[o.open,n]),oe.jsx(no.div,{"data-state":MJ(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!M,...s,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...t.style},children:M&&i})});function MJ(t){return t?"open":"closed"}var TJ=$5e,IJ=N5e,RJ=D5e;const Aa=({label:t,value:e,odd:r})=>oe.jsxs(kfe,{align:"center",children:[oe.jsx(Afe,{className:"font-normal w-12",children:t}),oe.jsx(Pfe,{children:oe.jsx(Ln,{size:"2",weight:"normal",className:"dark:text-slate-100 text-gray-700",children:e})})]}),F1=({label:t,startOpen:e=!0,children:r=[]})=>{let[n,i]=E.useState(e);return oe.jsx(TJ,{open:n,onOpenChange:i,className:"w-full",children:oe.jsxs(kn,{direction:"column",children:[oe.jsx(IJ,{as:Eu,children:oe.jsxs(kn,{className:"w-full",align:"center",justify:"between",children:[oe.jsx(Ln,{size:"3",weight:"bold",className:"dark:text-slate-300 text-gray-500",children:t}),n?oe.jsx(H$,{}):oe.jsx(G$,{})]})}),oe.jsx(gw,{size:"4",mb:"2"}),oe.jsx(RJ,{children:oe.jsx(Lfe,{size:"2",children:r})})]})})},i1t=({address:t})=>{if(!t)return;let{properties:e}=t;return oe.jsxs(oe.Fragment,{children:[oe.jsxs(F1,{label:"Primary address",children:[oe.jsx(Aa,{label:"Street number",value:e==null?void 0:e.street_number}),oe.jsx(Aa,{label:"Street prefix",value:e==null?void 0:e.street_prefix}),oe.jsx(Aa,{label:"Street name",value:e==null?void 0:e.street_name}),oe.jsx(Aa,{label:"Street type",value:e==null?void 0:e.street_type})]}),oe.jsxs(F1,{label:"Subaddress",children:[oe.jsx(Aa,{label:"Unit type",value:e==null?void 0:e.unit_type}),oe.jsx(Aa,{label:"Unit number",value:e==null?void 0:e.unit_number})]})]})},s1t=({building:t})=>{if(!t)return;let{properties:e}=t;return oe.jsx(oe.Fragment,{children:oe.jsx(F1,{label:"Building",children:oe.jsx(Aa,{label:"Status",value:e==null?void 0:e.status})})})},o1t=({parcel:t,loading:e})=>{var n,i;if(!t)return;let{properties:r}=t;return oe.jsxs(oe.Fragment,{children:[oe.jsxs(F1,{label:"Ownership",children:[oe.jsx(Aa,{label:"Taxpayer",value:r==null?void 0:r.taxpayer_1}),oe.jsx(Aa,{label:"Taxpayer (ext)",value:r==null?void 0:r.taxpayer_2}),oe.jsx(Aa,{label:"Taxpayer address",value:`${r.taxpayer_address}, ${r.taxpayer_city}, ${r.taxpayer_state} ${r.taxpayer_zip_code}`}),oe.jsx(Aa,{label:"PRE %",value:(n=r.pct_pre_claimed)==null?void 0:n.toLocaleString()}),oe.jsx(Aa,{label:"NEZ",value:r.nez}),oe.jsx(Aa,{label:"Sale date",value:r.sale_date?ri(r.sale_date).format("LL"):null}),oe.jsx(Aa,{label:"Sale price",value:`$${(i=parseInt(r.amt_sale_price))==null?void 0:i.toLocaleString()}`})]}),oe.jsx(F1,{label:"Usage & classification",startOpen:!1,children:Object.entries({"Property Class":`${r.property_class} - ${r.property_class_description}`,"Property Use":`${r.use_code} - ${r.use_code_description}`,Zoning:r.zoning_district,Style:r.building_style,"Historic Designation":r.local_historic_district}).map(([s,o],a)=>oe.jsx(Aa,{label:s,value:o,odd:a%2===0},s))}),oe.jsxs(F1,{label:"Taxation",startOpen:!1,children:[oe.jsx(Aa,{label:"Taxable status",value:r.tax_status_description}),oe.jsx(Aa,{label:"Taxable value",value:`$${parseInt(r.amt_taxable_value).toLocaleString()}`}),oe.jsx(Aa,{label:"Assessed value",value:`$${parseInt(r.amt_assessed_value).toLocaleString()}`})]}),oe.jsx(F1,{label:"Dimensions",startOpen:!1,children:Object.entries({"Total Acreage":r.total_acreage,"Total Square Footage":r.total_square_footage,"Depth x Frontage":`${r.depth} x ${r.frontage}`}).map(([s,o])=>oe.jsx(Aa,{label:s,value:o},s))}),oe.jsx(F1,{label:"Legal description",children:oe.jsx(Ln,{children:r.legal_description})})]})},a1t=({street:t})=>{if(!t)return;let{properties:e}=t;return oe.jsxs(oe.Fragment,{children:[oe.jsxs(F1,{label:"Name",children:[oe.jsx(Aa,{label:"Street prefix",value:e==null?void 0:e.street_prefix}),oe.jsx(Aa,{label:"Street name",value:e==null?void 0:e.street_name}),oe.jsx(Aa,{label:"Street type",value:e==null?void 0:e.street_type})]}),oe.jsxs(F1,{label:"Address ranges",children:[oe.jsx(Aa,{label:"MGF - Left range",value:`${e.from_address_left} - ${e.to_address_left}`}),oe.jsx(Aa,{label:"MGF - Right range",value:`${e.from_address_right} - ${e.to_address_right}`})]}),oe.jsxs(F1,{label:"Classification",children:[oe.jsx(Aa,{label:"Jurisdiction",value:e==null?void 0:e.legal_system}),oe.jsx(Aa,{label:"Functional class code",value:e==null?void 0:e.functional_class_code})]})]})},F5e=({text:t,url:e,icon:r})=>oe.jsx(kn,{align:"center",justify:"end",children:oe.jsx(Ln,{size:"1",weight:"light",className:"flex items-center justify-end gap-1",trim:"both",children:oe.jsx(ud,{to:e,children:oe.jsxs(kn,{align:"center",gap:"1",children:[r,t]})})})}),z5e=({url:t})=>oe.jsx(F5e,{text:"source",url:t,icon:oe.jsx(kY,{})}),l1t=({url:t})=>oe.jsx(F5e,{text:"permalink",url:t,icon:oe.jsx(Age,{})}),W6={parcel:oe.jsx(Ege,{style:{height:22,width:22}}),building:oe.jsx(AY,{style:{height:22,width:22}}),address:oe.jsx(Oge,{style:{height:22,width:22}}),street:oe.jsx(PY,{style:{height:22,width:22}})},u1t=({layer:t,loading:e,feature:r,refetch:n})=>{let i=Hi[t];if(!i)return;let s=(i==null?void 0:i.endpoint)+`/query?where=${i.id_column}='${r==null?void 0:r.properties[i.id_column]}'&outFields=*&f=html`,o=`${i.name==="parcels"?"":"#"}${r==null?void 0:r.properties[i.id_column]}`;return oe.jsxs(kn,{direction:"column",children:[oe.jsxs(kl,{className:"dark:text-gray-800",style:{backgroundColor:i==null?void 0:i.bg_color,color:i==null?void 0:i.text_color},children:[oe.jsxs(kn,{align:"center",justify:"start",children:[oe.jsx(lm,{className:"text-xl",mr:"3",children:W6[t]}),r&&oe.jsxs(kn,{className:"text-sm w-full",direction:"column",align:"start",children:[oe.jsxs(kn,{align:"center",justify:"between",className:"w-full",children:[oe.jsx(Ln,{size:"2",weight:"bold",children:i.label}),oe.jsx(lm,{className:"rounded-full py-1 px-2",style:{backgroundColor:i.bg_color},children:oe.jsx(Ln,{size:"2",className:"font-mono",weight:"bold",children:e?"loading ...":o})})]}),!e&&i.label_column&&oe.jsx(Ln,{size:"3",weight:"medium",children:r.properties[i.label_column]})]}),!r&&oe.jsx(Ln,{size:"2",children:t==="address"?"Search for an address.":`Select a ${t} on the map, or search for an address.`})]}),oe.jsx(vZ,{children:oe.jsxs(kn,{justify:"end",gap:"4",p:"1",mt:"3",children:[r&&oe.jsx(l1t,{url:`/map?id=${r==null?void 0:r.properties[i.id_column]}&layer=${t}`}),oe.jsx(z5e,{url:s})]})})]}),r&&oe.jsxs(kn,{align:"start",justify:"between",direction:"column",p:"3",mt:"3",gap:"4",className:"max-h-72 sm:max-h-[30vh] md:max-h-[45vh] lg:max-h-[60vh] xl:max-h-[70vh] overflow-y-auto",children:[t==="parcel"&&oe.jsx(o1t,{parcel:r,loading:e}),t==="street"&&oe.jsx(a1t,{street:r}),t==="building"&&oe.jsx(s1t,{building:r}),t==="address"&&oe.jsx(i1t,{address:r})]})]})},c1t=({layer:t,feature:e})=>(E.useState(!1),oe.jsxs(oe.Fragment,{children:[e.properties.building_id&&oe.jsx(kl,{style:{backgroundColor:Hi.building.bg_color},children:oe.jsxs(kn,{align:"center",justify:"between",className:"dark:text-slate-700",children:[oe.jsxs(kn,{align:"center",gap:"3",className:"dark:text-slate-100",children:[W6.building,oe.jsx(Ln,{size:"2",weight:"medium",children:"Linked to building:"})]}),oe.jsx(ud,{to:`/map?id=${e.properties.building_id}&layer=building`,children:oe.jsxs(kn,{className:"rounded-full text-gray-200",align:"center",px:"2",py:"1",gap:"1",style:{backgroundColor:Hi.building.bg_color},children:[oe.jsxs(Ln,{size:"2",weight:"bold",className:"font-mono",children:["# ",e.properties.building_id]}),oe.jsx(p2,{})]})})]})}),e.properties.parcel_id&&oe.jsx(kl,{style:{backgroundColor:Hi.parcel.bg_color},children:oe.jsxs(kn,{align:"center",justify:"between",className:"dark:text-slate-700",children:[oe.jsxs(kn,{align:"center",gap:"3",className:"dark:text-slate-100",children:[W6.parcel,oe.jsx(Ln,{size:"2",weight:"medium",children:"Linked to parcel:"})]}),oe.jsx(ud,{to:`/map?id=${e.properties.parcel_id}&layer=parcel`,children:oe.jsxs(kn,{className:"rounded-full text-gray-800",align:"center",px:"2",py:"1",gap:"1",style:{backgroundColor:Hi.parcel.bg_color},children:[oe.jsx(Ln,{size:"2",weight:"bold",className:"font-mono",children:e.properties.parcel_id}),oe.jsx(p2,{})]})})]})}),e.properties.street_id&&oe.jsx(kl,{style:{backgroundColor:Hi.street.bg_color},children:oe.jsxs(kn,{align:"center",justify:"between",className:"dark:text-slate-700",children:[oe.jsxs(kn,{align:"center",gap:"3",className:"dark:text-slate-100",children:[W6.street,oe.jsx(Ln,{size:"2",weight:"medium",children:"Linked to street:"})]}),oe.jsx(ud,{to:`/map?id=${e.properties.street_id}&layer=street`,children:oe.jsxs(kn,{className:"rounded-full text-gray-200",align:"center",px:"2",py:"1",gap:"1",style:{backgroundColor:Hi.street.bg_color},children:[oe.jsx(Ln,{size:"2",weight:"bold",className:"font-mono",children:e.properties.street_id}),oe.jsx(p2,{})]})})]})})]}));function h1t(t){return IO(RO(t.url),t)}function Tw(t){const e=R5e(t,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:Object.assign({where:"1=1",outFields:"*"},t.params)});return IO(`${RO(t.url)}/query`,e)}const d1t=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),B5e=t=>Array.isArray(t)&&t.every(e=>typeof e=="object"&&!(e instanceof Array)),f1t=t=>Array.isArray(t)&&t.every(e=>Array.isArray(e)),p1t=t=>Array.from(t.map(e=>Object.keys(e)).reduce((e,r)=>new Set([...e,...r]),[])),m1t=(t,e)=>{e=e||p1t(t);let r=e,n=e;B5e(e)&&(r=e.map(s=>s.label),n=e.map(s=>s.key));const i=t.map(s=>n.map(o=>g1t(o,s)));return[r,...i]},g1t=(t,e)=>{const r=t.replace(/\[([^\]]+)]/g,".$1").split(".").reduce(function(n,i,s,o){const a=n[i];if(a==null)o.splice(1);else return a},e);return r===void 0?t in e?e[t]:"":r},y1t=t=>typeof t>"u"||t===null?"":t,j5e=(t,e=",",r='"')=>t.filter(n=>n).map(n=>n.map(i=>y1t(i)).map(i=>`${r}${i}${r}`).join(e)).join(` +`),v1t=(t,e,r,n)=>j5e(e?[e,...t]:t,r,n),_1t=(t,e,r,n)=>j5e(m1t(t,e),r,n),x1t=(t,e,r,n)=>e?`${e.join(r)} +${t}`:t.replace(/"/g,'""'),V5e=(t,e,r,n)=>{if(B5e(t))return _1t(t,e,r,n);if(f1t(t))return v1t(t,e,r,n);if(typeof t=="string")return x1t(t,e,r);throw new TypeError('Data should be a "String", "Array of arrays" OR "Array of objects" ')},U5e=(t,e,r,n,i)=>{const s=V5e(t,r,n,i),o=d1t()?"application/csv":"text/csv",a=new Blob([e?"\uFEFF":"",s],{type:o}),l=`data:${o};charset=utf-8,${e?"\uFEFF":""}${s}`,u=window.URL||window.webkitURL;return typeof u.createObjectURL>"u"?l:u.createObjectURL(a)};var _z={exports:{}},xz,yse;function w1t(){if(yse)return xz;yse=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xz=t,xz}var wz,vse;function b1t(){if(vse)return wz;vse=1;var t=w1t();function e(){}function r(){}return r.resetWarningCache=e,wz=function(){function n(o,a,l,u,d,f){if(f!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},wz}var _se;function H5e(){return _se||(_se=1,_z.exports=b1t()()),_z.exports}var ip=H5e();const G5e={data:ip.oneOfType([ip.string,ip.array,ip.func]).isRequired,headers:ip.array,target:ip.string,separator:ip.string,filename:ip.string,uFEFF:ip.bool,onClick:ip.func,asyncOnClick:ip.bool,enclosingCharacter:ip.string},q5e={separator:",",filename:"generatedBy_react-csv.csv",uFEFF:!0,asyncOnClick:!1,enclosingCharacter:'"'},C1t={target:"_blank"};class xse extends El.Component{constructor(e){super(e),this.state={}}buildURI(){return U5e(...arguments)}componentDidMount(){const{data:e,headers:r,separator:n,enclosingCharacter:i,uFEFF:s,target:o,specs:a,replace:l}=this.props;this.state.page=window.open(this.buildURI(e,s,r,n,i),o,a,l)}getWindow(){return this.state.page}render(){return null}}S8(xse,"defaultProps",Object.assign(q5e,C1t)),S8(xse,"propTypes",G5e);var xR;let S1t=(xR=class extends El.Component{constructor(e){super(e),this.buildURI=this.buildURI.bind(this)}buildURI(){return U5e(...arguments)}handleLegacy(e,r=!1){if(window.navigator.msSaveOrOpenBlob){e.preventDefault();const{data:n,headers:i,separator:s,filename:o,enclosingCharacter:a,uFEFF:l}=this.props,u=r&&typeof n=="function"?n():n;let d=new Blob([l?"\uFEFF":"",V5e(u,i,s,a)]);return window.navigator.msSaveBlob(d,o),!1}}handleAsyncClick(e){const r=n=>{if(n===!1){e.preventDefault();return}this.handleLegacy(e,!0)};this.props.onClick(e,r)}handleSyncClick(e){if(this.props.onClick(e)===!1){e.preventDefault();return}this.handleLegacy(e)}handleClick(){return e=>{if(typeof this.props.onClick=="function")return this.props.asyncOnClick?this.handleAsyncClick(e):this.handleSyncClick(e);this.handleLegacy(e)}}render(){const{data:e,headers:r,separator:n,filename:i,uFEFF:s,children:o,onClick:a,asyncOnClick:l,enclosingCharacter:u,...d}=this.props,m=typeof window>"u"?"":this.buildURI(e,s,r,n,u);return oe.jsx("a",{download:i,...d,ref:v=>this.link=v,target:"_self",href:m,onClick:this.handleClick(),children:o})}},S8(xR,"defaultProps",q5e),S8(xR,"propTypes",G5e),xR);const nP=S1t,E1t=({layer:t,feature:e,refetch:r,linkedAddresses:n,setLinkedAddresses:i})=>{const[s,o]=E.useState(!0);let a=Hi[t],[l,u]=E.useState(!0),d=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});if(E.useEffect(()=>{t!=="address"&&(u(!0),Tw({url:Hi.address.endpoint,where:`${t==="parcel"?"parcel_id":a.id_column} = ${t==="parcel"?`'${e.properties.parcel_id}'`:e.properties[a.id_column]}`,outFields:"*",f:"geojson"}).then(m=>{let v=m.features.sort((b,M)=>b.properties.unit_number===null?-1:M.properties.unit_number===null?1:d.compare(b.properties.unit_number,M.properties.unit_number)).sort((b,M)=>M.properties.unit_type-b.properties.unit_type).sort((b,M)=>b.properties.street_number-M.properties.street_number).sort((b,M)=>d.compare(b.properties.street_name,M.properties.street_name));i(v),u(!1)}))},[e]),E.useEffect(()=>{t==="address"&&(i([e]),u(!1))},[t]),t==="address")return;const f=n.map(m=>{let{properties:v,geometry:b}=m;return{address_id:v.address_id,street_number:v.street_number,street_prefix:v.street_prefix,street_name:v.street_name,street_type:v.street_type,unit_type:v.unit_type,unit_number:v.unit_number,city:v.city,state:v.state,zip:v.zip,lng:b.coordinates[0].toFixed(6),lat:b.coordinates[1].toFixed(6)}});return oe.jsx(TJ,{open:s,onOpenChange:o,children:oe.jsxs(lm,{children:[oe.jsx(kl,{style:{backgroundColor:Hi.address.bg_color},children:oe.jsxs(kn,{align:"center",gap:"2",className:"dark:text-slate-700",children:[oe.jsx(Nge,{}),oe.jsx(Ln,{size:"2",weight:"medium",children:l?"loading ...":`${n.length===0?"No":n.length} addresses linked to this ${t}`}),n.length>0&&oe.jsx(IJ,{as:Eu,className:"ml-auto",children:s?oe.jsx(H$,{}):oe.jsx(G$,{})})]})}),!l&&n&&oe.jsxs(RJ,{children:[oe.jsx(kn,{direction:"column",p:"2",className:"max-h-48 lg:max-h-96 overflow-auto",children:n.map((m,v)=>{let{properties:b}=m;return oe.jsxs("div",{children:[oe.jsxs(kn,{direction:"row",justify:"start",align:"center",gap:"4",children:[oe.jsxs(Ln,{size:"2",weight:"bold",className:"w-full",children:[b.street_number," ",b.street_prefix," ",b.street_name," ",b.street_type," ",b.unit_type," ",b.unit_number]}),oe.jsx(ud,{to:`/map?id=${m.id}&layer=address`,children:oe.jsx(lm,{className:"rounded-full px-1",style:{backgroundColor:Hi.address.bg_color,opacity:.5},children:oe.jsxs(kn,{children:[oe.jsxs(Ln,{size:"1",weight:"bold",className:"text-black p-1 font-mono",children:["#",b.address_id]}),oe.jsx(p2,{height:"22",width:"22",className:"text-black p-1"})]})})})]},m.id),v+1{const[r,n]=E.useState(!0);let i=Hi[t],[s,o]=E.useState(!0),[a,l]=E.useState([]);return E.useEffect(()=>{t==="parcel"?(o(!0),Tw({url:Hi.building.endpoint,where:`${t==="parcel"?"parcel_id":i.id_column} = ${t==="parcel"?`'${e.properties.parcel_id}'`:e.properties[i.id_column]}`,outFields:"*",f:"geojson"}).then(u=>{l(u.features),o(!1)})):o(!1)},[e]),oe.jsx(TJ,{open:r,onOpenChange:n,children:oe.jsxs(lm,{children:[oe.jsx(kl,{style:{backgroundColor:Hi.building.bg_color},children:oe.jsxs(kn,{align:"center",gap:"2",className:"dark:text-slate-700",children:[oe.jsx(AY,{}),oe.jsx(Ln,{size:"2",weight:"medium",children:s?"loading ...":`${a.length===0?"No":a.length} buildings linked to this ${t}`}),a.length>0&&oe.jsx(IJ,{as:Eu,className:"ml-auto",children:r?oe.jsx(H$,{}):oe.jsx(G$,{})})]})}),!s&&a&&oe.jsx(RJ,{children:oe.jsx(kn,{direction:"column",p:"2",className:"max-h-48 lg:max-h-96 overflow-auto",children:a.map((u,d)=>{let{properties:f}=u;return oe.jsxs("div",{children:[oe.jsxs(kn,{direction:"row",justify:"start",align:"center",gap:"4",children:[oe.jsx(Ln,{size:"2",weight:"bold",className:"w-full",children:f.building_id}),oe.jsx(ud,{to:`/map?id=${u.id}&layer=building`,children:oe.jsx(lm,{className:"rounded-full px-1",style:{backgroundColor:Hi.building.bg_color,opacity:.5},children:oe.jsxs(kn,{children:[oe.jsxs(Ln,{size:"1",weight:"bold",className:"text-black p-1 font-mono",children:["#",f.building_id]}),oe.jsx(p2,{height:"22",width:"22",className:"text-black p-1"})]})})})]},u.id),d+1{const[n,i]=E.useState(""),s=o=>{o.key==="Enter"&&(/^([0,1,2][0-9])([0-9]{6,})([0-9L\.\-]{1,})$/.test(n)?r(n,"parcel"):t(n))};return oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsxs(kn,{align:"center",gap:"2",children:[oe.jsx(Pge,{height:"30",width:"30",color:"gray"}),oe.jsx(w$,{placeholder:"Search for an address or parcel ID",onChange:o=>i(o.target.value),onKeyDown:s,className:"flex items-center w-full w-lg pb-2 text-xs"})]}),oe.jsx(vZ,{children:oe.jsxs(kn,{align:"end",justify:"between",p:"1",pt:"2",children:[e?oe.jsx(Ln,{className:"text-red-800",size:"1",weight:"bold",children:e}):oe.jsx(Ln,{}),oe.jsx(z5e,{url:k5e+`/findAddressCandidates?SingleLine=${n}&outFields=*`})]})})]})};function iP(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function KL(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function I1t(t,e){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function W5e(t,e,r={}){if(r.final===!0)return R1t(t,e);const n=iP(t),i=iP(e),s=qv(n[0]),o=qv(i[0]),a=qv(n[1]),l=qv(i[1]),u=Math.sin(o-s)*Math.cos(l),d=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(o-s);return EXe(Math.atan2(u,d))}function R1t(t,e){let r=W5e(e,t);return r=(r+180)%360,r}var L1t=W5e;function k1t(t,e,r={}){var n=iP(t),i=iP(e),s=qv(i[1]-n[1]),o=qv(i[0]-n[0]),a=qv(n[1]),l=qv(i[1]),u=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(l);return Bge(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}var A1t=k1t;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var nq=function(t,e){return nq=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},nq(t,e)};function a0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nq(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function P1t(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,[])).next())})}function Z5e(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n0(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function pm(t,e){for(var r=0,n=e.length,i=t.length;r1||a(m,v)})})}function a(m,v){try{l(n[m](v))}catch(b){f(s[0][3],b)}}function l(m){m.value instanceof J4?Promise.resolve(m.value.v).then(u,d):f(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function f(m,v){m(v),s.shift(),s.length&&a(s[0][0],s[0][1])}}function O1t(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof om=="function"?om(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}function No(t){return typeof t=="function"}function LO(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var bz=LO(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription: +`+r.map(function(n,i){return i+1+") "+n.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=r}});function eS(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var ly=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}return t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=om(o),l=a.next();!l.done;l=a.next()){var u=l.value;u.remove(this)}}catch(M){e={error:M}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else o.remove(this);var d=this.initialTeardown;if(No(d))try{d()}catch(M){s=M instanceof bz?M.errors:[M]}var f=this._teardowns;if(f){this._teardowns=null;try{for(var m=om(f),v=m.next();!v.done;v=m.next()){var b=v.value;try{wse(b)}catch(M){s=s??[],M instanceof bz?s=pm(pm([],n0(s)),n0(M.errors)):s.push(M)}}}catch(M){n={error:M}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(s)throw new bz(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)wse(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=(r=this._teardowns)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&eS(r,e)},t.prototype.remove=function(e){var r=this._teardowns;r&&eS(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Y5e=ly.EMPTY;function X5e(t){return t instanceof ly||t&&"closed"in t&&No(t.remove)&&No(t.add)&&No(t.unsubscribe)}function wse(t){No(t)?t():t.unsubscribe()}var J5e={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},N1t={setTimeout:function(){for(var t=[],e=0;e0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=n.hasError,s=n.isStopped,o=n.observers;return i||s?Y5e:(o.push(r),new ly(function(){return eS(o,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,o=n.isStopped;i?r.error(s):o&&r.complete()},e.prototype.asObservable=function(){var r=new va;return r.source=this,r},e.create=function(r,n){return new Cse(r,n)},e}(va),Cse=function(t){a0(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Y5e},e}(dn),uy=function(t){a0(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(dn),AJ={now:function(){return(AJ.delegate||Date).now()},delegate:void 0},t9e=function(t){a0(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=AJ);var s=t.call(this)||this;return s._bufferSize=r,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,r),s._windowTime=Math.max(1,n),s}return e.prototype.next=function(r){var n=this,i=n.isStopped,s=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,l=n._windowTime;i||(s.push(r),!o&&s.push(a.now()+l)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,s=i._infiniteTimeWindow,o=i._buffer,a=o.slice(),l=0;l0&&I(i)},void 0,void 0,function(){b!=null&&b.closed||b==null||b.unsubscribe(),M=null})),I(n!=null?typeof n=="number"?n:+n-l.now():i)})}function o0t(t){throw new s0t(t)}function Ct(t,e){return Xo(function(r,n){var i=0;r.subscribe(new _o(n,function(s){n.next(t.call(e,s,i++))}))})}var a0t=Array.isArray;function l0t(t,e){return a0t(e)?t.apply(void 0,pm([],n0(e))):t(e)}function y9e(t){return Ct(function(e){return l0t(t,e)})}var u0t=Array.isArray,c0t=Object.getPrototypeOf,h0t=Object.prototype,d0t=Object.keys;function f0t(t){if(t.length===1){var e=t[0];if(u0t(e))return{args:e,keys:null};if(p0t(e)){var r=d0t(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}function p0t(t){return t&&typeof t=="object"&&c0t(t)===h0t}function m0t(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}function ei(){for(var t=[],e=0;e=2,!1,!0))}function Sz(t,e){return No(e)?Qi(t,e,1):Qi(t,1)}function I0t(t){return new va(function(e){return t.subscribe(e)})}var R0t={connector:function(){return new dn}};function w9e(t,e){e===void 0&&(e=R0t);var r=e.connector;return Xo(function(n,i){var s=r();Na(t(I0t(s))).subscribe(i),i.add(n.subscribe(s))})}function rS(t,e){return e===void 0&&(e=PJ),Xo(function(r,n){var i=null,s=null,o=null,a=function(){if(i){i.unsubscribe(),i=null;var u=s;s=null,n.next(u)}};function l(){var u=o+t,d=e.now();if(d=2;return function(n){return n.pipe(t?vn(function(i,s){return t(i,s,n)}):Sm,Pp(1),r?b9e(e):C9e(function(){return new FJ}))}}function oq(t){return t<=0?function(){return xE}:Xo(function(e,r){var n=[];e.subscribe(new _o(r,function(i){n.push(i),t=2;return function(n){return n.pipe(t?vn(function(i,s){return t(i,s,n)}):Sm,oq(1),r?b9e(e):C9e(function(){return new FJ}))}}function E9e(t,e){var r=No(t)?t:function(){return t};return No(e)?w9e(e,{connector:r}):function(n){return new j1t(n,r)}}function If(){return Xo(function(t,e){var r,n=!1;t.subscribe(new _o(e,function(i){var s=r;r=i,n&&e.next([s,i]),n=!0}))})}function A0t(){for(var t=[],e=0;e=2,!0))}function js(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new dn}:e,n=t.resetOnError,i=n===void 0?!0:n,s=t.resetOnComplete,o=s===void 0?!0:s,a=t.resetOnRefCountZero,l=a===void 0?!0:a;return function(u){var d=null,f=null,m=null,v=0,b=!1,M=!1,O=function(){f==null||f.unsubscribe(),f=null},I=function(){O(),d=m=null,b=M=!1},A=function(){var j=d;I(),j==null||j.unsubscribe()};return Xo(function(j,H){v++,!M&&!b&&O();var W=m=m??r();H.add(function(){v--,v===0&&!M&&!b&&(f=Ez(A,l))}),W.subscribe(H),d||(d=new kJ({next:function(re){return W.next(re)},error:function(re){M=!0,O(),f=Ez(I,i,re),W.error(re)},complete:function(){b=!0,O(),f=Ez(I,o),W.complete()}}),Na(j).subscribe(d))})(u)}}function Ez(t,e){for(var r=[],n=2;n"||r===">="||r==="<"||r==="<="?this._compileComparisonOp(r,e[1],e[2],!0):r==="in"?this._compileInOp(e[1],e.slice(2)):r==="!in"?this._compileNegation(this._compileInOp(e[1],e.slice(2))):r==="all"?this._compileLogicalOp(e.slice(1),"&&"):"true")+")"}_compare(e,r){return er?1:0}_compileComparisonOp(e,r,n,i){const s=this._compilePropertyReference(r),o=JSON.stringify(n);return(i?"typeof "+s+"===typeof "+o+"&&":"")+s+e+o}_compileInOp(e,r){const n=this._compare,i=JSON.stringify(r.sort(n)),s=this._compilePropertyReference(e);return i+".indexOf("+s+")!==-1"}_compileLogicalOp(e,r){const n=this._compile.bind(this);return e.map(n).join(r)}_compileNegation(e){return"!("+e+")"}_compilePropertyReference(e){return"node["+JSON.stringify(e)+"]"}}/** + * @license + * Copyright 2010-2021 Three.js Authors + * SPDX-License-Identifier: MIT + */const T9e="134",O0t=0,Ise=1,N0t=2,I9e=1,D0t=2,a6=3,Rw=0,Bu=1,sd=2,R9e=1,y2=0,Z6=1,Rse=2,Lse=3,kse=4,F0t=5,Jx=100,z0t=101,B0t=102,Ase=103,Pse=104,j0t=200,V0t=201,U0t=202,H0t=203,L9e=204,k9e=205,G0t=206,q0t=207,W0t=208,Z0t=209,Y0t=210,X0t=0,J0t=1,K0t=2,uq=3,Q0t=4,emt=5,tmt=6,rmt=7,PO=0,nmt=1,imt=2,u5=0,smt=1,omt=2,amt=3,lmt=4,umt=5,A9e=300,bE=301,CE=302,cq=303,hq=304,$O=306,BJ=307,dq=1e3,Mf=1001,fq=1002,Uu=1003,$se=1004,Ose=1005,Lh=1006,cmt=1007,OO=1008,N2=1009,hmt=1010,dmt=1011,oP=1012,fmt=1013,tk=1014,Fv=1015,K4=1016,pmt=1017,mmt=1018,gmt=1019,Y6=1020,ymt=1021,c5=1022,pd=1023,vmt=1024,_mt=1025,xmt=pd,Q4=1026,nS=1027,wmt=1028,bmt=1029,Cmt=1030,Smt=1031,Emt=1032,Mmt=1033,Nse=33776,Dse=33777,Fse=33778,zse=33779,Bse=35840,jse=35841,Vse=35842,Use=35843,Tmt=36196,Hse=37492,Gse=37496,Imt=37808,Rmt=37809,Lmt=37810,kmt=37811,Amt=37812,Pmt=37813,$mt=37814,Omt=37815,Nmt=37816,Dmt=37817,Fmt=37818,zmt=37819,Bmt=37820,jmt=37821,Vmt=36492,Umt=37840,Hmt=37841,Gmt=37842,qmt=37843,Wmt=37844,Zmt=37845,Ymt=37846,Xmt=37847,Jmt=37848,Kmt=37849,Qmt=37850,egt=37851,tgt=37852,rgt=37853,ngt=2200,igt=2201,sgt=2202,aP=2300,lP=2301,Mz=2302,x4=2400,w4=2401,uP=2402,jJ=2500,P9e=2501,ogt=0,$h=3e3,J5=3001,VJ=3007,UJ=3002,agt=3003,$9e=3004,O9e=3005,N9e=3006,lgt=3200,ugt=3201,y7=0,cgt=1,Tz=7680,hgt=519,iS=35044,cP=35048,qse="300 es";class K5{addEventListener(e,r){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(r)===-1&&n[e].push(r)}hasEventListener(e,r){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(r)!==-1}removeEventListener(e,r){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(r);s!==-1&&i.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let s=0,o=i.length;s>8&255]+Ac[t>>16&255]+Ac[t>>24&255]+"-"+Ac[e&255]+Ac[e>>8&255]+"-"+Ac[e>>16&15|64]+Ac[e>>24&255]+"-"+Ac[r&63|128]+Ac[r>>8&255]+"-"+Ac[r>>16&255]+Ac[r>>24&255]+Ac[n&255]+Ac[n>>8&255]+Ac[n>>16&255]+Ac[n>>24&255]).toUpperCase()}function zd(t,e,r){return Math.max(e,Math.min(r,t))}function HJ(t,e){return(t%e+e)%e}function fgt(t,e,r,n,i){return n+(t-e)*(i-n)/(r-e)}function pgt(t,e,r){return t!==e?(r-t)/(e-t):0}function J6(t,e,r){return(1-r)*t+r*e}function mgt(t,e,r,n){return J6(t,e,1-Math.exp(-r*n))}function ggt(t,e=1){return e-Math.abs(HJ(t,e*2)-e)}function ygt(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*(3-2*t))}function vgt(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*t*(t*(t*6-15)+10))}function _gt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function xgt(t,e){return t+Math.random()*(e-t)}function wgt(t){return t*(.5-Math.random())}function bgt(t){return t!==void 0&&(xI=t%2147483647),xI=xI*16807%2147483647,(xI-1)/2147483646}function Cgt(t){return t*X6}function Sgt(t){return t*sS}function pq(t){return(t&t-1)===0&&t!==0}function Egt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function D9e(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Mgt(t,e,r,n,i){const s=Math.cos,o=Math.sin,a=s(r/2),l=o(r/2),u=s((e+n)/2),d=o((e+n)/2),f=s((e-n)/2),m=o((e-n)/2),v=s((n-e)/2),b=o((n-e)/2);switch(i){case"XYX":t.set(a*d,l*f,l*m,a*u);break;case"YZY":t.set(l*m,a*d,l*f,a*u);break;case"ZXZ":t.set(l*f,l*m,a*d,a*u);break;case"XZX":t.set(a*d,l*b,l*v,a*u);break;case"YXY":t.set(l*v,a*d,l*b,a*u);break;case"ZYZ":t.set(l*b,l*v,a*d,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}var Lw=Object.freeze({__proto__:null,DEG2RAD:X6,RAD2DEG:sS,generateUUID:Z1,clamp:zd,euclideanModulo:HJ,mapLinear:fgt,inverseLerp:pgt,lerp:J6,damp:mgt,pingpong:ggt,smoothstep:ygt,smootherstep:vgt,randInt:_gt,randFloat:xgt,randFloatSpread:wgt,seededRandom:bgt,degToRad:Cgt,radToDeg:Sgt,isPowerOfTwo:pq,ceilPowerOfTwo:Egt,floorPowerOfTwo:D9e,setQuaternionFromProperEuler:Mgt});class bn{constructor(e=0,r=0){this.x=e,this.y=r}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,r){return this.x=e,this.y=r,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,r){return r!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,r)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this}sub(e,r){return r!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,r)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const r=this.x,n=this.y,i=e.elements;return this.x=i[0]*r+i[3]*n+i[6],this.y=i[1]*r+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,r){return this.x=Math.max(e.x,Math.min(r.x,this.x)),this.y=Math.max(e.y,Math.min(r.y,this.y)),this}clampScalar(e,r){return this.x=Math.max(e,Math.min(r,this.x)),this.y=Math.max(e,Math.min(r,this.y)),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,n=this.y-e.y;return r*r+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e}fromBufferAttribute(e,r,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(r),this.y=e.getY(r),this}rotateAround(e,r){const n=Math.cos(r),i=Math.sin(r),s=this.x-e.x,o=this.y-e.y;return this.x=s*n-o*i+e.x,this.y=s*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}bn.prototype.isVector2=!0;class Fc{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,r,n,i,s,o,a,l,u){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=r,d[4]=s,d[5]=l,d[6]=n,d[7]=o,d[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const r=this.elements,n=e.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this}extractBasis(e,r,n){return e.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const r=e.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const n=e.elements,i=r.elements,s=this.elements,o=n[0],a=n[3],l=n[6],u=n[1],d=n[4],f=n[7],m=n[2],v=n[5],b=n[8],M=i[0],O=i[3],I=i[6],A=i[1],j=i[4],H=i[7],W=i[2],re=i[5],K=i[8];return s[0]=o*M+a*A+l*W,s[3]=o*O+a*j+l*re,s[6]=o*I+a*H+l*K,s[1]=u*M+d*A+f*W,s[4]=u*O+d*j+f*re,s[7]=u*I+d*H+f*K,s[2]=m*M+v*A+b*W,s[5]=m*O+v*j+b*re,s[8]=m*I+v*H+b*K,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=e,r[4]*=e,r[7]*=e,r[2]*=e,r[5]*=e,r[8]*=e,this}determinant(){const e=this.elements,r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8];return r*o*d-r*a*u-n*s*d+n*a*l+i*s*u-i*o*l}invert(){const e=this.elements,r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],f=d*o-a*u,m=a*l-d*s,v=u*s-o*l,b=r*f+n*m+i*v;if(b===0)return this.set(0,0,0,0,0,0,0,0,0);const M=1/b;return e[0]=f*M,e[1]=(i*u-d*n)*M,e[2]=(a*n-i*o)*M,e[3]=m*M,e[4]=(d*r-i*l)*M,e[5]=(i*s-a*r)*M,e[6]=v*M,e[7]=(n*l-u*r)*M,e[8]=(o*r-n*s)*M,this}transpose(){let e;const r=this.elements;return e=r[1],r[1]=r[3],r[3]=e,e=r[2],r[2]=r[6],r[6]=e,e=r[5],r[5]=r[7],r[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const r=this.elements;return e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8],this}setUvTransform(e,r,n,i,s,o,a){const l=Math.cos(s),u=Math.sin(s);return this.set(n*l,n*u,-n*(l*o+u*a)+o+e,-i*u,i*l,-i*(-u*o+l*a)+a+r,0,0,1),this}scale(e,r){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=r,n[4]*=r,n[7]*=r,this}rotate(e){const r=Math.cos(e),n=Math.sin(e),i=this.elements,s=i[0],o=i[3],a=i[6],l=i[1],u=i[4],d=i[7];return i[0]=r*s+n*l,i[3]=r*o+n*u,i[6]=r*a+n*d,i[1]=-n*s+r*l,i[4]=-n*o+r*u,i[7]=-n*a+r*d,this}translate(e,r){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=r*n[2],n[4]+=r*n[5],n[7]+=r*n[8],this}equals(e){const r=this.elements,n=e.elements;for(let i=0;i<9;i++)if(r[i]!==n[i])return!1;return!0}fromArray(e,r=0){for(let n=0;n<9;n++)this.elements[n]=e[n+r];return this}toArray(e=[],r=0){const n=this.elements;return e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3],e[r+4]=n[4],e[r+5]=n[5],e[r+6]=n[6],e[r+7]=n[7],e[r+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}Fc.prototype.isMatrix3=!0;function F9e(t){if(t.length===0)return-1/0;let e=t[0];for(let r=1,n=t.length;re&&(e=t[r]);return e}function NO(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Wse(t,e=0){let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}let J9;class v7{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let r;if(e instanceof HTMLCanvasElement)r=e;else{J9===void 0&&(J9=NO("canvas")),J9.width=e.width,J9.height=e.height;const n=J9.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),r=J9}return r.width>2048||r.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),r.toDataURL("image/jpeg",.6)):r.toDataURL("image/png")}}let Tgt=0;class Tu extends K5{constructor(e=Tu.DEFAULT_IMAGE,r=Tu.DEFAULT_MAPPING,n=Mf,i=Mf,s=Lh,o=OO,a=pd,l=N2,u=1,d=$h){super(),Object.defineProperty(this,"id",{value:Tgt++}),this.uuid=Z1(),this.name="",this.image=e,this.mipmaps=[],this.mapping=r,this.wrapS=n,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=l,this.offset=new bn(0,0),this.repeat=new bn(1,1),this.center=new bn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Fc,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){const i=this.image;if(i.uuid===void 0&&(i.uuid=Z1()),!r&&e.images[i.uuid]===void 0){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o1)switch(this.wrapS){case dq:e.x=e.x-Math.floor(e.x);break;case Mf:e.x=e.x<0?0:1;break;case fq:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case dq:e.y=e.y-Math.floor(e.y);break;case Mf:e.y=e.y<0?0:1;break;case fq:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}}Tu.DEFAULT_IMAGE=void 0;Tu.DEFAULT_MAPPING=A9e;Tu.prototype.isTexture=!0;function Iz(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?v7.getDataURL(t):t.data?{data:Array.prototype.slice.call(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}class Yo{constructor(e=0,r=0,n=0,i=1){this.x=e,this.y=r,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,r,n,i){return this.x=e,this.y=r,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,r){return r!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,r)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this.w=e.w+r.w,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this.w+=e.w*r,this}sub(e,r){return r!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,r)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this.w=e.w-r.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const r=this.x,n=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*r+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*r+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*r+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*r+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const r=Math.sqrt(1-e.w*e.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/r,this.y=e.y/r,this.z=e.z/r),this}setAxisAngleFromRotationMatrix(e){let r,n,i,s;const l=e.elements,u=l[0],d=l[4],f=l[8],m=l[1],v=l[5],b=l[9],M=l[2],O=l[6],I=l[10];if(Math.abs(d-m)<.01&&Math.abs(f-M)<.01&&Math.abs(b-O)<.01){if(Math.abs(d+m)<.1&&Math.abs(f+M)<.1&&Math.abs(b+O)<.1&&Math.abs(u+v+I-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;const j=(u+1)/2,H=(v+1)/2,W=(I+1)/2,re=(d+m)/4,K=(f+M)/4,pe=(b+O)/4;return j>H&&j>W?j<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(j),i=re/n,s=K/n):H>W?H<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(H),n=re/i,s=pe/i):W<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(W),n=K/s,i=pe/s),this.set(n,i,s,r),this}let A=Math.sqrt((O-b)*(O-b)+(f-M)*(f-M)+(m-d)*(m-d));return Math.abs(A)<.001&&(A=1),this.x=(O-b)/A,this.y=(f-M)/A,this.z=(m-d)/A,this.w=Math.acos((u+v+I-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,r){return this.x=Math.max(e.x,Math.min(r.x,this.x)),this.y=Math.max(e.y,Math.min(r.y,this.y)),this.z=Math.max(e.z,Math.min(r.z,this.z)),this.w=Math.max(e.w,Math.min(r.w,this.w)),this}clampScalar(e,r){return this.x=Math.max(e,Math.min(r,this.x)),this.y=Math.max(e,Math.min(r,this.y)),this.z=Math.max(e,Math.min(r,this.z)),this.w=Math.max(e,Math.min(r,this.w)),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this.w+=(e.w-this.w)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this.z=e.z+(r.z-e.z)*n,this.w=e.w+(r.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this.w=e[r+3],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e[r+3]=this.w,e}fromBufferAttribute(e,r,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this.w=e.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}Yo.prototype.isVector4=!0;class Y1 extends K5{constructor(e,r,n={}){super(),this.width=e,this.height=r,this.depth=1,this.scissor=new Yo(0,0,e,r),this.scissorTest=!1,this.viewport=new Yo(0,0,e,r),this.texture=new Tu(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:r,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Lh,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,r,n=1){(this.width!==e||this.height!==r||this.depth!==n)&&(this.width=e,this.height=r,this.depth=n,this.texture.image.width=e,this.texture.image.height=r,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,r),this.scissor.set(0,0,e,r)}clone(){return new this.constructor().copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}Y1.prototype.isWebGLRenderTarget=!0;class Igt extends Y1{constructor(e,r,n){super(e,r);const i=this.texture;this.texture=[];for(let s=0;s=0?1:-1,j=1-I*I;if(j>Number.EPSILON){const W=Math.sqrt(j),re=Math.atan2(W,I*A);O=Math.sin(O*re)/W,a=Math.sin(a*re)/W}const H=a*A;if(l=l*O+m*H,u=u*O+v*H,d=d*O+b*H,f=f*O+M*H,O===1-a){const W=1/Math.sqrt(l*l+u*u+d*d+f*f);l*=W,u*=W,d*=W,f*=W}}e[r]=l,e[r+1]=u,e[r+2]=d,e[r+3]=f}static multiplyQuaternionsFlat(e,r,n,i,s,o){const a=n[i],l=n[i+1],u=n[i+2],d=n[i+3],f=s[o],m=s[o+1],v=s[o+2],b=s[o+3];return e[r]=a*b+d*f+l*v-u*m,e[r+1]=l*b+d*m+u*f-a*v,e[r+2]=u*b+d*v+a*m-l*f,e[r+3]=d*b-a*f-l*m-u*v,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,r,n,i){return this._x=e,this._y=r,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,r){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,u=a(n/2),d=a(i/2),f=a(s/2),m=l(n/2),v=l(i/2),b=l(s/2);switch(o){case"XYZ":this._x=m*d*f+u*v*b,this._y=u*v*f-m*d*b,this._z=u*d*b+m*v*f,this._w=u*d*f-m*v*b;break;case"YXZ":this._x=m*d*f+u*v*b,this._y=u*v*f-m*d*b,this._z=u*d*b-m*v*f,this._w=u*d*f+m*v*b;break;case"ZXY":this._x=m*d*f-u*v*b,this._y=u*v*f+m*d*b,this._z=u*d*b+m*v*f,this._w=u*d*f-m*v*b;break;case"ZYX":this._x=m*d*f-u*v*b,this._y=u*v*f+m*d*b,this._z=u*d*b-m*v*f,this._w=u*d*f+m*v*b;break;case"YZX":this._x=m*d*f+u*v*b,this._y=u*v*f+m*d*b,this._z=u*d*b-m*v*f,this._w=u*d*f-m*v*b;break;case"XZY":this._x=m*d*f-u*v*b,this._y=u*v*f-m*d*b,this._z=u*d*b+m*v*f,this._w=u*d*f+m*v*b;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return r!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,r){const n=r/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const r=e.elements,n=r[0],i=r[4],s=r[8],o=r[1],a=r[5],l=r[9],u=r[2],d=r[6],f=r[10],m=n+a+f;if(m>0){const v=.5/Math.sqrt(m+1);this._w=.25/v,this._x=(d-l)*v,this._y=(s-u)*v,this._z=(o-i)*v}else if(n>a&&n>f){const v=2*Math.sqrt(1+n-a-f);this._w=(d-l)/v,this._x=.25*v,this._y=(i+o)/v,this._z=(s+u)/v}else if(a>f){const v=2*Math.sqrt(1+a-n-f);this._w=(s-u)/v,this._x=(i+o)/v,this._y=.25*v,this._z=(l+d)/v}else{const v=2*Math.sqrt(1+f-n-a);this._w=(o-i)/v,this._x=(s+u)/v,this._y=(l+d)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,r){let n=e.dot(r)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*r.z-e.z*r.y,this._y=e.z*r.x-e.x*r.z,this._z=e.x*r.y-e.y*r.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(zd(this.dot(e),-1,1)))}rotateTowards(e,r){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,r/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,r){return r!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,r)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,r){const n=e._x,i=e._y,s=e._z,o=e._w,a=r._x,l=r._y,u=r._z,d=r._w;return this._x=n*d+o*a+i*u-s*l,this._y=i*d+o*l+s*a-n*u,this._z=s*d+o*u+n*l-i*a,this._w=o*d-n*a-i*l-s*u,this._onChangeCallback(),this}slerp(e,r){if(r===0)return this;if(r===1)return this.copy(e);const n=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+n*e._x+i*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const v=1-r;return this._w=v*o+r*this._w,this._x=v*n+r*this._x,this._y=v*i+r*this._y,this._z=v*s+r*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),d=Math.atan2(u,a),f=Math.sin((1-r)*d)/u,m=Math.sin(r*d)/u;return this._w=o*f+this._w*m,this._x=n*f+this._x*m,this._y=i*f+this._y*m,this._z=s*f+this._z*m,this._onChangeCallback(),this}slerpQuaternions(e,r,n){this.copy(e).slerp(r,n)}random(){const e=Math.random(),r=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(r*Math.cos(i),n*Math.sin(s),n*Math.cos(s),r*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,r=0){return this._x=e[r],this._y=e[r+1],this._z=e[r+2],this._w=e[r+3],this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._w,e}fromBufferAttribute(e,r){return this._x=e.getX(r),this._y=e.getY(r),this._z=e.getZ(r),this._w=e.getW(r),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}jc.prototype.isQuaternion=!0;class st{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.z=n}set(e,r,n){return n===void 0&&(n=this.z),this.x=e,this.y=r,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,r){return r!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,r)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this}sub(e,r){return r!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,r)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this}multiply(e,r){return r!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,r)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,r){return this.x=e.x*r.x,this.y=e.y*r.y,this.z=e.z*r.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Zse.setFromEuler(e))}applyAxisAngle(e,r){return this.applyQuaternion(Zse.setFromAxisAngle(e,r))}applyMatrix3(e){const r=this.x,n=this.y,i=this.z,s=e.elements;return this.x=s[0]*r+s[3]*n+s[6]*i,this.y=s[1]*r+s[4]*n+s[7]*i,this.z=s[2]*r+s[5]*n+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const r=this.x,n=this.y,i=this.z,s=e.elements,o=1/(s[3]*r+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(e){const r=this.x,n=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,u=l*r+o*i-a*n,d=l*n+a*r-s*i,f=l*i+s*n-o*r,m=-s*r-o*n-a*i;return this.x=u*l+m*-s+d*-a-f*-o,this.y=d*l+m*-o+f*-s-u*-a,this.z=f*l+m*-a+u*-o-d*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const r=this.x,n=this.y,i=this.z,s=e.elements;return this.x=s[0]*r+s[4]*n+s[8]*i,this.y=s[1]*r+s[5]*n+s[9]*i,this.z=s[2]*r+s[6]*n+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,r){return this.x=Math.max(e.x,Math.min(r.x,this.x)),this.y=Math.max(e.y,Math.min(r.y,this.y)),this.z=Math.max(e.z,Math.min(r.z,this.z)),this}clampScalar(e,r){return this.x=Math.max(e,Math.min(r,this.x)),this.y=Math.max(e,Math.min(r,this.y)),this.z=Math.max(e,Math.min(r,this.z)),this}clampLength(e,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this}lerpVectors(e,r,n){return this.x=e.x+(r.x-e.x)*n,this.y=e.y+(r.y-e.y)*n,this.z=e.z+(r.z-e.z)*n,this}cross(e,r){return r!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,r)):this.crossVectors(this,e)}crossVectors(e,r){const n=e.x,i=e.y,s=e.z,o=r.x,a=r.y,l=r.z;return this.x=i*l-s*a,this.y=s*o-n*l,this.z=n*a-i*o,this}projectOnVector(e){const r=e.lengthSq();if(r===0)return this.set(0,0,0);const n=e.dot(this)/r;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Rz.copy(this).projectOnVector(e),this.sub(Rz)}reflect(e){return this.sub(Rz.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(e)/r;return Math.acos(zd(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return r*r+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,r,n){const i=Math.sin(r)*e;return this.x=i*Math.sin(n),this.y=Math.cos(r)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,r,n){return this.x=e*Math.sin(r),this.y=n,this.z=e*Math.cos(r),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(e){const r=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=r,this.y=n,this.z=i,this}setFromMatrixColumn(e,r){return this.fromArray(e.elements,r*4)}setFromMatrix3Column(e,r){return this.fromArray(e.elements,r*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e}fromBufferAttribute(e,r,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,r=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(r),this.y=n*Math.sin(r),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}st.prototype.isVector3=!0;const Rz=new st,Zse=new jc;class Uf{constructor(e=new st(1/0,1/0,1/0),r=new st(-1/0,-1/0,-1/0)){this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromArray(e){let r=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let l=0,u=e.length;ls&&(s=d),f>o&&(o=f),m>a&&(a=m)}return this.min.set(r,n,i),this.max.set(s,o,a),this}setFromBufferAttribute(e){let r=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let l=0,u=e.count;ls&&(s=d),f>o&&(o=f),m>a&&(a=m)}return this.min.set(r,n,i),this.max.set(s,o,a),this}setFromPoints(e){this.makeEmpty();for(let r=0,n=e.length;rthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Q8),Q8.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let r,n;return e.normal.x>0?(r=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(r=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(r+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(r+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(r+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(r+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),r<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(eb),wI.subVectors(this.max,eb),K9.subVectors(e.a,eb),Q9.subVectors(e.b,eb),ex.subVectors(e.c,eb),Ky.subVectors(Q9,K9),Qy.subVectors(ex,Q9),r3.subVectors(K9,ex);let r=[0,-Ky.z,Ky.y,0,-Qy.z,Qy.y,0,-r3.z,r3.y,Ky.z,0,-Ky.x,Qy.z,0,-Qy.x,r3.z,0,-r3.x,-Ky.y,Ky.x,0,-Qy.y,Qy.x,0,-r3.y,r3.x,0];return!kz(r,K9,Q9,ex,wI)||(r=[1,0,0,0,1,0,0,0,1],!kz(r,K9,Q9,ex,wI))?!1:(bI.crossVectors(Ky,Qy),r=[bI.x,bI.y,bI.z],kz(r,K9,Q9,ex,wI))}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Q8.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(Q8).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(eg[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),eg[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),eg[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),eg[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),eg[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),eg[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),eg[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),eg[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(eg),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Uf.prototype.isBox3=!0;const eg=[new st,new st,new st,new st,new st,new st,new st,new st],Q8=new st,Lz=new Uf,K9=new st,Q9=new st,ex=new st,Ky=new st,Qy=new st,r3=new st,eb=new st,wI=new st,bI=new st,n3=new st;function kz(t,e,r,n,i){for(let s=0,o=t.length-3;s<=o;s+=3){n3.fromArray(t,s);const a=i.x*Math.abs(n3.x)+i.y*Math.abs(n3.y)+i.z*Math.abs(n3.z),l=e.dot(n3),u=r.dot(n3),d=n.dot(n3);if(Math.max(-Math.max(l,u,d),Math.min(l,u,d))>a)return!1}return!0}const Rgt=new Uf,Yse=new st,Az=new st,Pz=new st;class _7{constructor(e=new st,r=-1){this.center=e,this.radius=r}set(e,r){return this.center.copy(e),this.radius=r,this}setFromPoints(e,r){const n=this.center;r!==void 0?n.copy(r):Rgt.setFromPoints(e).getCenter(n);let i=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Pz.subVectors(e,this.center);const r=Pz.lengthSq();if(r>this.radius*this.radius){const n=Math.sqrt(r),i=(n-this.radius)*.5;this.center.add(Pz.multiplyScalar(i/n)),this.radius+=i}return this}union(e){return Az.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Yse.copy(e.center).add(Az)),this.expandByPoint(Yse.copy(e.center).sub(Az)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const tg=new st,$z=new st,CI=new st,ev=new st,Oz=new st,SI=new st,Nz=new st;class Q5{constructor(e=new st,r=new st(0,0,-1)){this.origin=e,this.direction=r}set(e,r){return this.origin.copy(e),this.direction.copy(r),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,r){return r.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,tg)),this}closestPointToPoint(e,r){r.subVectors(e,this.origin);const n=r.dot(this.direction);return n<0?r.copy(this.origin):r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const r=tg.subVectors(e,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(e):(tg.copy(this.direction).multiplyScalar(r).add(this.origin),tg.distanceToSquared(e))}distanceSqToSegment(e,r,n,i){$z.copy(e).add(r).multiplyScalar(.5),CI.copy(r).sub(e).normalize(),ev.copy(this.origin).sub($z);const s=e.distanceTo(r)*.5,o=-this.direction.dot(CI),a=ev.dot(this.direction),l=-ev.dot(CI),u=ev.lengthSq(),d=Math.abs(1-o*o);let f,m,v,b;if(d>0)if(f=o*l-a,m=o*a-l,b=s*d,f>=0)if(m>=-b)if(m<=b){const M=1/d;f*=M,m*=M,v=f*(f+o*m+2*a)+m*(o*f+m+2*l)+u}else m=s,f=Math.max(0,-(o*m+a)),v=-f*f+m*(m+2*l)+u;else m=-s,f=Math.max(0,-(o*m+a)),v=-f*f+m*(m+2*l)+u;else m<=-b?(f=Math.max(0,-(-o*s+a)),m=f>0?-s:Math.min(Math.max(-s,-l),s),v=-f*f+m*(m+2*l)+u):m<=b?(f=0,m=Math.min(Math.max(-s,-l),s),v=m*(m+2*l)+u):(f=Math.max(0,-(o*s+a)),m=f>0?s:Math.min(Math.max(-s,-l),s),v=-f*f+m*(m+2*l)+u);else m=o>0?-s:s,f=Math.max(0,-(o*m+a)),v=-f*f+m*(m+2*l)+u;return n&&n.copy(this.direction).multiplyScalar(f).add(this.origin),i&&i.copy(CI).multiplyScalar(m).add($z),v}intersectSphere(e,r){tg.subVectors(e.center,this.origin);const n=tg.dot(this.direction),i=tg.dot(tg)-n*n,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=n-o,l=n+o;return a<0&&l<0?null:a<0?this.at(l,r):this.at(a,r)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const r=e.normal.dot(this.direction);if(r===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/r;return n>=0?n:null}intersectPlane(e,r){const n=this.distanceToPlane(e);return n===null?null:this.at(n,r)}intersectsPlane(e){const r=e.distanceToPoint(this.origin);return r===0||e.normal.dot(this.direction)*r<0}intersectBox(e,r){let n,i,s,o,a,l;const u=1/this.direction.x,d=1/this.direction.y,f=1/this.direction.z,m=this.origin;return u>=0?(n=(e.min.x-m.x)*u,i=(e.max.x-m.x)*u):(n=(e.max.x-m.x)*u,i=(e.min.x-m.x)*u),d>=0?(s=(e.min.y-m.y)*d,o=(e.max.y-m.y)*d):(s=(e.max.y-m.y)*d,o=(e.min.y-m.y)*d),n>o||s>i||((s>n||n!==n)&&(n=s),(o=0?(a=(e.min.z-m.z)*f,l=(e.max.z-m.z)*f):(a=(e.max.z-m.z)*f,l=(e.min.z-m.z)*f),n>l||a>i)||((a>n||n!==n)&&(n=a),(l=0?n:i,r)}intersectsBox(e){return this.intersectBox(e,tg)!==null}intersectTriangle(e,r,n,i,s){Oz.subVectors(r,e),SI.subVectors(n,e),Nz.crossVectors(Oz,SI);let o=this.direction.dot(Nz),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;ev.subVectors(this.origin,e);const l=a*this.direction.dot(SI.crossVectors(ev,SI));if(l<0)return null;const u=a*this.direction.dot(Oz.cross(ev));if(u<0||l+u>o)return null;const d=-a*ev.dot(Nz);return d<0?null:this.at(d/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ri{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,r,n,i,s,o,a,l,u,d,f,m,v,b,M,O){const I=this.elements;return I[0]=e,I[4]=r,I[8]=n,I[12]=i,I[1]=s,I[5]=o,I[9]=a,I[13]=l,I[2]=u,I[6]=d,I[10]=f,I[14]=m,I[3]=v,I[7]=b,I[11]=M,I[15]=O,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Ri().fromArray(this.elements)}copy(e){const r=this.elements,n=e.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this}copyPosition(e){const r=this.elements,n=e.elements;return r[12]=n[12],r[13]=n[13],r[14]=n[14],this}setFromMatrix3(e){const r=e.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(e,r,n){return e.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,r,n){return this.set(e.x,r.x,n.x,0,e.y,r.y,n.y,0,e.z,r.z,n.z,0,0,0,0,1),this}extractRotation(e){const r=this.elements,n=e.elements,i=1/tx.setFromMatrixColumn(e,0).length(),s=1/tx.setFromMatrixColumn(e,1).length(),o=1/tx.setFromMatrixColumn(e,2).length();return r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=0,r[4]=n[4]*s,r[5]=n[5]*s,r[6]=n[6]*s,r[7]=0,r[8]=n[8]*o,r[9]=n[9]*o,r[10]=n[10]*o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const r=this.elements,n=e.x,i=e.y,s=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),u=Math.sin(i),d=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const m=o*d,v=o*f,b=a*d,M=a*f;r[0]=l*d,r[4]=-l*f,r[8]=u,r[1]=v+b*u,r[5]=m-M*u,r[9]=-a*l,r[2]=M-m*u,r[6]=b+v*u,r[10]=o*l}else if(e.order==="YXZ"){const m=l*d,v=l*f,b=u*d,M=u*f;r[0]=m+M*a,r[4]=b*a-v,r[8]=o*u,r[1]=o*f,r[5]=o*d,r[9]=-a,r[2]=v*a-b,r[6]=M+m*a,r[10]=o*l}else if(e.order==="ZXY"){const m=l*d,v=l*f,b=u*d,M=u*f;r[0]=m-M*a,r[4]=-o*f,r[8]=b+v*a,r[1]=v+b*a,r[5]=o*d,r[9]=M-m*a,r[2]=-o*u,r[6]=a,r[10]=o*l}else if(e.order==="ZYX"){const m=o*d,v=o*f,b=a*d,M=a*f;r[0]=l*d,r[4]=b*u-v,r[8]=m*u+M,r[1]=l*f,r[5]=M*u+m,r[9]=v*u-b,r[2]=-u,r[6]=a*l,r[10]=o*l}else if(e.order==="YZX"){const m=o*l,v=o*u,b=a*l,M=a*u;r[0]=l*d,r[4]=M-m*f,r[8]=b*f+v,r[1]=f,r[5]=o*d,r[9]=-a*d,r[2]=-u*d,r[6]=v*f+b,r[10]=m-M*f}else if(e.order==="XZY"){const m=o*l,v=o*u,b=a*l,M=a*u;r[0]=l*d,r[4]=-f,r[8]=u*d,r[1]=m*f+M,r[5]=o*d,r[9]=v*f-b,r[2]=b*f-v,r[6]=a*d,r[10]=M*f+m}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Lgt,e,kgt)}lookAt(e,r,n){const i=this.elements;return cf.subVectors(e,r),cf.lengthSq()===0&&(cf.z=1),cf.normalize(),tv.crossVectors(n,cf),tv.lengthSq()===0&&(Math.abs(n.z)===1?cf.x+=1e-4:cf.z+=1e-4,cf.normalize(),tv.crossVectors(n,cf)),tv.normalize(),EI.crossVectors(cf,tv),i[0]=tv.x,i[4]=EI.x,i[8]=cf.x,i[1]=tv.y,i[5]=EI.y,i[9]=cf.y,i[2]=tv.z,i[6]=EI.z,i[10]=cf.z,this}multiply(e,r){return r!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,r)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const n=e.elements,i=r.elements,s=this.elements,o=n[0],a=n[4],l=n[8],u=n[12],d=n[1],f=n[5],m=n[9],v=n[13],b=n[2],M=n[6],O=n[10],I=n[14],A=n[3],j=n[7],H=n[11],W=n[15],re=i[0],K=i[4],pe=i[8],ge=i[12],fe=i[1],ee=i[5],be=i[9],le=i[13],ve=i[2],Pe=i[6],Fe=i[10],We=i[14],He=i[3],Lt=i[7],lt=i[11],pt=i[15];return s[0]=o*re+a*fe+l*ve+u*He,s[4]=o*K+a*ee+l*Pe+u*Lt,s[8]=o*pe+a*be+l*Fe+u*lt,s[12]=o*ge+a*le+l*We+u*pt,s[1]=d*re+f*fe+m*ve+v*He,s[5]=d*K+f*ee+m*Pe+v*Lt,s[9]=d*pe+f*be+m*Fe+v*lt,s[13]=d*ge+f*le+m*We+v*pt,s[2]=b*re+M*fe+O*ve+I*He,s[6]=b*K+M*ee+O*Pe+I*Lt,s[10]=b*pe+M*be+O*Fe+I*lt,s[14]=b*ge+M*le+O*We+I*pt,s[3]=A*re+j*fe+H*ve+W*He,s[7]=A*K+j*ee+H*Pe+W*Lt,s[11]=A*pe+j*be+H*Fe+W*lt,s[15]=A*ge+j*le+H*We+W*pt,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[4]*=e,r[8]*=e,r[12]*=e,r[1]*=e,r[5]*=e,r[9]*=e,r[13]*=e,r[2]*=e,r[6]*=e,r[10]*=e,r[14]*=e,r[3]*=e,r[7]*=e,r[11]*=e,r[15]*=e,this}determinant(){const e=this.elements,r=e[0],n=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],u=e[13],d=e[2],f=e[6],m=e[10],v=e[14],b=e[3],M=e[7],O=e[11],I=e[15];return b*(+s*l*f-i*u*f-s*a*m+n*u*m+i*a*v-n*l*v)+M*(+r*l*v-r*u*m+s*o*m-i*o*v+i*u*d-s*l*d)+O*(+r*u*f-r*a*v-s*o*f+n*o*v+s*a*d-n*u*d)+I*(-i*a*d-r*l*f+r*a*m+i*o*f-n*o*m+n*l*d)}transpose(){const e=this.elements;let r;return r=e[1],e[1]=e[4],e[4]=r,r=e[2],e[2]=e[8],e[8]=r,r=e[6],e[6]=e[9],e[9]=r,r=e[3],e[3]=e[12],e[12]=r,r=e[7],e[7]=e[13],e[13]=r,r=e[11],e[11]=e[14],e[14]=r,this}setPosition(e,r,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=r,i[14]=n),this}invert(){const e=this.elements,r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],d=e[8],f=e[9],m=e[10],v=e[11],b=e[12],M=e[13],O=e[14],I=e[15],A=f*O*u-M*m*u+M*l*v-a*O*v-f*l*I+a*m*I,j=b*m*u-d*O*u-b*l*v+o*O*v+d*l*I-o*m*I,H=d*M*u-b*f*u+b*a*v-o*M*v-d*a*I+o*f*I,W=b*f*l-d*M*l-b*a*m+o*M*m+d*a*O-o*f*O,re=r*A+n*j+i*H+s*W;if(re===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const K=1/re;return e[0]=A*K,e[1]=(M*m*s-f*O*s-M*i*v+n*O*v+f*i*I-n*m*I)*K,e[2]=(a*O*s-M*l*s+M*i*u-n*O*u-a*i*I+n*l*I)*K,e[3]=(f*l*s-a*m*s-f*i*u+n*m*u+a*i*v-n*l*v)*K,e[4]=j*K,e[5]=(d*O*s-b*m*s+b*i*v-r*O*v-d*i*I+r*m*I)*K,e[6]=(b*l*s-o*O*s-b*i*u+r*O*u+o*i*I-r*l*I)*K,e[7]=(o*m*s-d*l*s+d*i*u-r*m*u-o*i*v+r*l*v)*K,e[8]=H*K,e[9]=(b*f*s-d*M*s-b*n*v+r*M*v+d*n*I-r*f*I)*K,e[10]=(o*M*s-b*a*s+b*n*u-r*M*u-o*n*I+r*a*I)*K,e[11]=(d*a*s-o*f*s-d*n*u+r*f*u+o*n*v-r*a*v)*K,e[12]=W*K,e[13]=(d*M*i-b*f*i+b*n*m-r*M*m-d*n*O+r*f*O)*K,e[14]=(b*a*i-o*M*i-b*n*l+r*M*l+o*n*O-r*a*O)*K,e[15]=(o*f*i-d*a*i+d*n*l-r*f*l-o*n*m+r*a*m)*K,this}scale(e){const r=this.elements,n=e.x,i=e.y,s=e.z;return r[0]*=n,r[4]*=i,r[8]*=s,r[1]*=n,r[5]*=i,r[9]*=s,r[2]*=n,r[6]*=i,r[10]*=s,r[3]*=n,r[7]*=i,r[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(r,n,i))}makeTranslation(e,r,n){return this.set(1,0,0,e,0,1,0,r,0,0,1,n,0,0,0,1),this}makeRotationX(e){const r=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,r,-n,0,0,n,r,0,0,0,0,1),this}makeRotationY(e){const r=Math.cos(e),n=Math.sin(e);return this.set(r,0,n,0,0,1,0,0,-n,0,r,0,0,0,0,1),this}makeRotationZ(e){const r=Math.cos(e),n=Math.sin(e);return this.set(r,-n,0,0,n,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,r){const n=Math.cos(r),i=Math.sin(r),s=1-n,o=e.x,a=e.y,l=e.z,u=s*o,d=s*a;return this.set(u*o+n,u*a-i*l,u*l+i*a,0,u*a+i*l,d*a+n,d*l-i*o,0,u*l-i*a,d*l+i*o,s*l*l+n,0,0,0,0,1),this}makeScale(e,r,n){return this.set(e,0,0,0,0,r,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,r,n,i,s,o){return this.set(1,n,s,0,e,1,o,0,r,i,1,0,0,0,0,1),this}compose(e,r,n){const i=this.elements,s=r._x,o=r._y,a=r._z,l=r._w,u=s+s,d=o+o,f=a+a,m=s*u,v=s*d,b=s*f,M=o*d,O=o*f,I=a*f,A=l*u,j=l*d,H=l*f,W=n.x,re=n.y,K=n.z;return i[0]=(1-(M+I))*W,i[1]=(v+H)*W,i[2]=(b-j)*W,i[3]=0,i[4]=(v-H)*re,i[5]=(1-(m+I))*re,i[6]=(O+A)*re,i[7]=0,i[8]=(b+j)*K,i[9]=(O-A)*K,i[10]=(1-(m+M))*K,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,r,n){const i=this.elements;let s=tx.set(i[0],i[1],i[2]).length();const o=tx.set(i[4],i[5],i[6]).length(),a=tx.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],y1.copy(this);const u=1/s,d=1/o,f=1/a;return y1.elements[0]*=u,y1.elements[1]*=u,y1.elements[2]*=u,y1.elements[4]*=d,y1.elements[5]*=d,y1.elements[6]*=d,y1.elements[8]*=f,y1.elements[9]*=f,y1.elements[10]*=f,r.setFromRotationMatrix(y1),n.x=s,n.y=o,n.z=a,this}makePerspective(e,r,n,i,s,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,l=2*s/(r-e),u=2*s/(n-i),d=(r+e)/(r-e),f=(n+i)/(n-i),m=-(o+s)/(o-s),v=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=u,a[9]=f,a[13]=0,a[2]=0,a[6]=0,a[10]=m,a[14]=v,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,r,n,i,s,o){const a=this.elements,l=1/(r-e),u=1/(n-i),d=1/(o-s),f=(r+e)*l,m=(n+i)*u,v=(o+s)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-f,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-m,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-v,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const r=this.elements,n=e.elements;for(let i=0;i<16;i++)if(r[i]!==n[i])return!1;return!0}fromArray(e,r=0){for(let n=0;n<16;n++)this.elements[n]=e[n+r];return this}toArray(e=[],r=0){const n=this.elements;return e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3],e[r+4]=n[4],e[r+5]=n[5],e[r+6]=n[6],e[r+7]=n[7],e[r+8]=n[8],e[r+9]=n[9],e[r+10]=n[10],e[r+11]=n[11],e[r+12]=n[12],e[r+13]=n[13],e[r+14]=n[14],e[r+15]=n[15],e}}Ri.prototype.isMatrix4=!0;const tx=new st,y1=new Ri,Lgt=new st(0,0,0),kgt=new st(1,1,1),tv=new st,EI=new st,cf=new st,Xse=new Ri,Jse=new jc;class e9{constructor(e=0,r=0,n=0,i=e9.DefaultOrder){this._x=e,this._y=r,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,r,n,i=this._order){return this._x=e,this._y=r,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,r=this._order,n=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],u=i[5],d=i[9],f=i[2],m=i[6],v=i[10];switch(r){case"XYZ":this._y=Math.asin(zd(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(m,u),this._z=0);break;case"YXZ":this._x=Math.asin(-zd(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(zd(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-f,v),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-zd(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(m,v),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(zd(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-zd(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(m,u),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-d,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,r,n){return Xse.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Xse,r,n)}setFromVector3(e,r=this._order){return this.set(e.x,e.y,e.z,r)}reorder(e){return Jse.setFromEuler(this),this.setFromQuaternion(Jse,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new st(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}e9.prototype.isEuler=!0;e9.DefaultOrder="XYZ";e9.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class B9e{constructor(){this.mask=1}set(e){this.mask=1<1){for(let r=0;r1){for(let n=0;n0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(n.geometries=a),l.length>0&&(n.materials=l),u.length>0&&(n.textures=u),d.length>0&&(n.images=d),f.length>0&&(n.shapes=f),m.length>0&&(n.skeletons=m),v.length>0&&(n.animations=v)}return n.object=i,n;function o(a){const l=[];for(const u in a){const d=a[u];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,r=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),r===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,r,n,i,s){v1.subVectors(i,r),ng.subVectors(n,r),Dz.subVectors(e,r);const o=v1.dot(v1),a=v1.dot(ng),l=v1.dot(Dz),u=ng.dot(ng),d=ng.dot(Dz),f=o*u-a*a;if(f===0)return s.set(-2,-1,-1);const m=1/f,v=(u*l-a*d)*m,b=(o*d-a*l)*m;return s.set(1-v-b,b,v)}static containsPoint(e,r,n,i){return this.getBarycoord(e,r,n,i,ig),ig.x>=0&&ig.y>=0&&ig.x+ig.y<=1}static getUV(e,r,n,i,s,o,a,l){return this.getBarycoord(e,r,n,i,ig),l.set(0,0),l.addScaledVector(s,ig.x),l.addScaledVector(o,ig.y),l.addScaledVector(a,ig.z),l}static isFrontFacing(e,r,n,i){return v1.subVectors(n,r),ng.subVectors(e,r),v1.cross(ng).dot(i)<0}set(e,r,n){return this.a.copy(e),this.b.copy(r),this.c.copy(n),this}setFromPointsAndIndices(e,r,n,i){return this.a.copy(e[r]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,r,n,i){return this.a.fromBufferAttribute(e,r),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return v1.subVectors(this.c,this.b),ng.subVectors(this.a,this.b),v1.cross(ng).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Hu.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,r){return Hu.getBarycoord(e,this.a,this.b,this.c,r)}getUV(e,r,n,i,s){return Hu.getUV(e,this.a,this.b,this.c,r,n,i,s)}containsPoint(e){return Hu.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Hu.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,r){const n=this.a,i=this.b,s=this.c;let o,a;nx.subVectors(i,n),ix.subVectors(s,n),Fz.subVectors(e,n);const l=nx.dot(Fz),u=ix.dot(Fz);if(l<=0&&u<=0)return r.copy(n);zz.subVectors(e,i);const d=nx.dot(zz),f=ix.dot(zz);if(d>=0&&f<=d)return r.copy(i);const m=l*f-d*u;if(m<=0&&l>=0&&d<=0)return o=l/(l-d),r.copy(n).addScaledVector(nx,o);Bz.subVectors(e,s);const v=nx.dot(Bz),b=ix.dot(Bz);if(b>=0&&v<=b)return r.copy(s);const M=v*u-l*b;if(M<=0&&u>=0&&b<=0)return a=u/(u-b),r.copy(n).addScaledVector(ix,a);const O=d*b-v*f;if(O<=0&&f-d>=0&&v-b>=0)return noe.subVectors(s,i),a=(f-d)/(f-d+(v-b)),r.copy(i).addScaledVector(noe,a);const I=1/(O+M+m);return o=M*I,a=m*I,r.copy(n).addScaledVector(nx,o).addScaledVector(ix,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Ngt=0;class Fh extends K5{constructor(){super(),Object.defineProperty(this,"id",{value:Ngt++}),this.uuid=Z1(),this.name="",this.type="Material",this.fog=!0,this.blending=Z6,this.side=Rw,this.vertexColors=!1,this.opacity=1,this.format=pd,this.transparent=!1,this.blendSrc=L9e,this.blendDst=k9e,this.blendEquation=Jx,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=uq,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=hgt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Tz,this.stencilZFail=Tz,this.stencilZPass=Tz,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const r in e){const n=e[r];if(n===void 0){console.warn("THREE.Material: '"+r+"' parameter is undefined.");continue}if(r==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===R9e;continue}const i=this[r];if(i===void 0){console.warn("THREE."+this.type+": '"+r+"' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[r]=n}}toJSON(e){const r=e===void 0||typeof e=="string";r&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Z6&&(n.blending=this.blending),this.side!==Rw&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==pd&&(n.format=this.format),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(r){const s=i(e.textures),o=i(e.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const r=e.clippingPlanes;let n=null;if(r!==null){const i=r.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=r[s].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}Fh.prototype.isMaterial=!0;const j9e={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},_1={h:0,s:0,l:0},TI={h:0,s:0,l:0};function jz(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*6*(2/3-r):t}function Vz(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Uz(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}class $i{constructor(e,r,n){return r===void 0&&n===void 0?this.set(e):this.setRGB(e,r,n)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,r,n){return this.r=e,this.g=r,this.b=n,this}setHSL(e,r,n){if(e=HJ(e,1),r=zd(r,0,1),n=zd(n,0,1),r===0)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+r):n+r-n*r,s=2*n-i;this.r=jz(s,i,e+1/3),this.g=jz(s,i,e),this.b=jz(s,i,e-1/3)}return this}setStyle(e){function r(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let i;const s=n[1],o=n[2];switch(s){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,r(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,r(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){const a=parseFloat(i[1])/360,l=parseInt(i[2],10)/100,u=parseInt(i[3],10)/100;return r(i[4]),this.setHSL(a,l,u)}break}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const i=n[1],s=i.length;if(s===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(s===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const r=j9e[e.toLowerCase()];return r!==void 0?this.setHex(r):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,r=2){return this.r=Math.pow(e.r,r),this.g=Math.pow(e.g,r),this.b=Math.pow(e.b,r),this}copyLinearToGamma(e,r=2){const n=r>0?1/r:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Vz(e.r),this.g=Vz(e.g),this.b=Vz(e.b),this}copyLinearToSRGB(e){return this.r=Uz(e.r),this.g=Uz(e.g),this.b=Uz(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const r=this.r,n=this.g,i=this.b,s=Math.max(r,n,i),o=Math.min(r,n,i);let a,l;const u=(o+s)/2;if(o===s)a=0,l=0;else{const d=s-o;switch(l=u<=.5?d/(s+o):d/(2-s-o),s){case r:a=(n-i)/d+(n65535?U9e:V9e)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,r){return this.attributes[e]=r,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,r,n=0){this.groups.push({start:e,count:r,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,r){this.drawRange.start=e,this.drawRange.count=r}applyMatrix4(e){const r=this.attributes.position;r!==void 0&&(r.applyMatrix4(e),r.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const s=new Fc().getNormalMatrix(e);n.applyNormalMatrix(s),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return sp.makeRotationFromQuaternion(e),this.applyMatrix4(sp),this}rotateX(e){return sp.makeRotationX(e),this.applyMatrix4(sp),this}rotateY(e){return sp.makeRotationY(e),this.applyMatrix4(sp),this}rotateZ(e){return sp.makeRotationZ(e),this.applyMatrix4(sp),this}translate(e,r,n){return sp.makeTranslation(e,r,n),this.applyMatrix4(sp),this}scale(e,r,n){return sp.makeScale(e,r,n),this.applyMatrix4(sp),this}lookAt(e){return Hz.lookAt(e),Hz.updateMatrix(),this.applyMatrix4(Hz.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(sx).negate(),this.translate(sx.x,sx.y,sx.z),this}setFromPoints(e){const r=[];for(let n=0,i=e.length;n0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const r=this.index;r!==null&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});const n=this.attributes;for(const l in n){const u=n[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],d=[];for(let f=0,m=u.length;f0&&(i[l]=d,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const r={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone(r));const i=e.attributes;for(const u in i){const d=i[u];this.setAttribute(u,d.clone(r))}const s=e.morphAttributes;for(const u in s){const d=[],f=s[u];for(let m=0,v=f.length;m0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,r){const n=this.geometry,i=this.material,s=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),Gz.copy(n.boundingSphere),Gz.applyMatrix4(s),e.ray.intersectsSphere(Gz)===!1)||(ioe.copy(s).invert(),ox.copy(e.ray).applyMatrix4(ioe),n.boundingBox!==null&&ox.intersectsBox(n.boundingBox)===!1))return;let o;if(n.isBufferGeometry){const a=n.index,l=n.attributes.position,u=n.morphAttributes.position,d=n.morphTargetsRelative,f=n.attributes.uv,m=n.attributes.uv2,v=n.groups,b=n.drawRange;if(a!==null)if(Array.isArray(i))for(let M=0,O=v.length;Mr.far?null:{distance:u,point:OI.clone(),object:t}}function NI(t,e,r,n,i,s,o,a,l,u,d,f){rv.fromBufferAttribute(i,u),nv.fromBufferAttribute(i,d),iv.fromBufferAttribute(i,f);const m=t.morphTargetInfluences;if(s&&m){RI.set(0,0,0),LI.set(0,0,0),kI.set(0,0,0);for(let b=0,M=s.length;b0?1:-1,d.push(Lt.x,Lt.y,Lt.z),f.push(rr/K),f.push(1-lt/pe),We+=1}}for(let lt=0;lt0&&(r.defines=this.defines),r.vertexShader=this.vertexShader,r.fragmentShader=this.fragmentShader;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(r.extensions=n),r}}od.prototype.isShaderMaterial=!0;class EE extends xo{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Ri,this.projectionMatrix=new Ri,this.projectionMatrixInverse=new Ri}copy(e,r){return super.copy(e,r),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const r=this.matrixWorld.elements;return e.set(-r[8],-r[9],-r[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,r){super.updateWorldMatrix(e,r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}EE.prototype.isCamera=!0;class ld extends EE{constructor(e=50,r=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=r,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const r=.5*this.getFilmHeight()/e;this.fov=sS*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(X6*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return sS*2*Math.atan(Math.tan(X6*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,r,n,i,s,o){this.aspect=e/r,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let r=e*Math.tan(X6*.5*this.fov)/this.zoom,n=2*r,i=this.aspect*n,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;s+=o.offsetX*i/l,r-=o.offsetY*n/u,i*=o.width/l,n*=o.height/u}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,r,r-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.fov=this.fov,r.object.zoom=this.zoom,r.object.near=this.near,r.object.far=this.far,r.object.focus=this.focus,r.object.aspect=this.aspect,this.view!==null&&(r.object.view=Object.assign({},this.view)),r.object.filmGauge=this.filmGauge,r.object.filmOffset=this.filmOffset,r}}ld.prototype.isPerspectiveCamera=!0;const ax=90,lx=1;class GJ extends xo{constructor(e,r,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;const i=new ld(ax,lx,e,r);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new st(1,0,0)),this.add(i);const s=new ld(ax,lx,e,r);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new st(-1,0,0)),this.add(s);const o=new ld(ax,lx,e,r);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new st(0,1,0)),this.add(o);const a=new ld(ax,lx,e,r);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new st(0,-1,0)),this.add(a);const l=new ld(ax,lx,e,r);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new st(0,0,1)),this.add(l);const u=new ld(ax,lx,e,r);u.layers=this.layers,u.up.set(0,-1,0),u.lookAt(new st(0,0,-1)),this.add(u)}update(e,r){this.parent===null&&this.updateMatrixWorld();const n=this.renderTarget,[i,s,o,a,l,u]=this.children,d=e.xr.enabled,f=e.getRenderTarget();e.xr.enabled=!1;const m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(r,i),e.setRenderTarget(n,1),e.render(r,s),e.setRenderTarget(n,2),e.render(r,o),e.setRenderTarget(n,3),e.render(r,a),e.setRenderTarget(n,4),e.render(r,l),n.texture.generateMipmaps=m,e.setRenderTarget(n,5),e.render(r,u),e.setRenderTarget(f),e.xr.enabled=d}}class DO extends Tu{constructor(e,r,n,i,s,o,a,l,u,d){e=e!==void 0?e:[],r=r!==void 0?r:bE,super(e,r,n,i,s,o,a,l,u,d),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}DO.prototype.isCubeTexture=!0;class H9e extends Y1{constructor(e,r,n){Number.isInteger(r)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),r=n),super(e,e,r),r=r||{},this.texture=new DO(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:Lh,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,r){this.texture.type=r.type,this.texture.format=pd,this.texture.encoding=r.encoding,this.texture.generateMipmaps=r.generateMipmaps,this.texture.minFilter=r.minFilter,this.texture.magFilter=r.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},i=new SE(5,5,5),s=new od({name:"CubemapFromEquirect",uniforms:kw(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Bu,blending:y2});s.uniforms.tEquirect.value=r;const o=new ya(i,s),a=r.minFilter;return r.minFilter===OO&&(r.minFilter=Lh),new GJ(1,10,this).update(e,o),r.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,r,n,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(r,n,i);e.setRenderTarget(s)}}H9e.prototype.isWebGLCubeRenderTarget=!0;const Xz=new st,Ugt=new st,Hgt=new Fc;class Pg{constructor(e=new st(1,0,0),r=0){this.normal=e,this.constant=r}set(e,r){return this.normal.copy(e),this.constant=r,this}setComponents(e,r,n,i){return this.normal.set(e,r,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,r){return this.normal.copy(e),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(e,r,n){const i=Xz.subVectors(n,r).cross(Ugt.subVectors(e,r)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,r){return r.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,r){const n=e.delta(Xz),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?r.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:r.copy(n).multiplyScalar(s).add(e.start)}intersectsLine(e){const r=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return r<0&&n>0||n<0&&r>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,r){const n=r||Hgt.getNormalMatrix(e),i=this.coplanarPoint(Xz).applyMatrix4(e),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}Pg.prototype.isPlane=!0;const ux=new _7,DI=new st;class FO{constructor(e=new Pg,r=new Pg,n=new Pg,i=new Pg,s=new Pg,o=new Pg){this.planes=[e,r,n,i,s,o]}set(e,r,n,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(r),a[2].copy(n),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const r=this.planes;for(let n=0;n<6;n++)r[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const r=this.planes,n=e.elements,i=n[0],s=n[1],o=n[2],a=n[3],l=n[4],u=n[5],d=n[6],f=n[7],m=n[8],v=n[9],b=n[10],M=n[11],O=n[12],I=n[13],A=n[14],j=n[15];return r[0].setComponents(a-i,f-l,M-m,j-O).normalize(),r[1].setComponents(a+i,f+l,M+m,j+O).normalize(),r[2].setComponents(a+s,f+u,M+v,j+I).normalize(),r[3].setComponents(a-s,f-u,M-v,j-I).normalize(),r[4].setComponents(a-o,f-d,M-b,j-A).normalize(),r[5].setComponents(a+o,f+d,M+b,j+A).normalize(),this}intersectsObject(e){const r=e.geometry;return r.boundingSphere===null&&r.computeBoundingSphere(),ux.copy(r.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(ux)}intersectsSprite(e){return ux.center.set(0,0,0),ux.radius=.7071067811865476,ux.applyMatrix4(e.matrixWorld),this.intersectsSphere(ux)}intersectsSphere(e){const r=this.planes,n=e.center,i=-e.radius;for(let s=0;s<6;s++)if(r[s].distanceToPoint(n)0?e.max.x:e.min.x,DI.y=i.normal.y>0?e.max.y:e.min.y,DI.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(DI)<0)return!1}return!0}containsPoint(e){const r=this.planes;for(let n=0;n<6;n++)if(r[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function G9e(){let t=null,e=!1,r=null,n=null;function i(s,o){r(s,o),n=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&r!==null&&(n=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){r=s},setContext:function(s){t=s}}}function Ggt(t,e){const r=e.isWebGL2,n=new WeakMap;function i(u,d){const f=u.array,m=u.usage,v=t.createBuffer();t.bindBuffer(d,v),t.bufferData(d,f,m),u.onUploadCallback();let b=5126;return f instanceof Float32Array?b=5126:f instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):f instanceof Uint16Array?u.isFloat16BufferAttribute?r?b=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):b=5123:f instanceof Int16Array?b=5122:f instanceof Uint32Array?b=5125:f instanceof Int32Array?b=5124:f instanceof Int8Array?b=5120:(f instanceof Uint8Array||f instanceof Uint8ClampedArray)&&(b=5121),{buffer:v,type:b,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version}}function s(u,d,f){const m=d.array,v=d.updateRange;t.bindBuffer(f,u),v.count===-1?t.bufferSubData(f,0,m):(r?t.bufferSubData(f,v.offset*m.BYTES_PER_ELEMENT,m,v.offset,v.count):t.bufferSubData(f,v.offset*m.BYTES_PER_ELEMENT,m.subarray(v.offset,v.offset+v.count)),v.count=-1)}function o(u){return u.isInterleavedBufferAttribute&&(u=u.data),n.get(u)}function a(u){u.isInterleavedBufferAttribute&&(u=u.data);const d=n.get(u);d&&(t.deleteBuffer(d.buffer),n.delete(u))}function l(u,d){if(u.isGLBufferAttribute){const m=n.get(u);(!m||m.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +float G_BlinnPhong_Implicit( ) { + return 0.25; +} +float D_BlinnPhong( const in float shininess, const in float dotNH ) { + return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); +} +vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( specularColor, 1.0, dotVH ); + float G = G_BlinnPhong_Implicit( ); + float D = D_BlinnPhong( shininess, dotNH ); + return F * ( G * D ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif`,tyt=`#ifdef USE_BUMPMAP + uniform sampler2D bumpMap; + uniform float bumpScale; + vec2 dHdxy_fwd() { + vec2 dSTdx = dFdx( vUv ); + vec2 dSTdy = dFdy( vUv ); + float Hll = bumpScale * texture2D( bumpMap, vUv ).x; + float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; + float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; + return vec2( dBx, dBy ); + } + vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { + vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); + vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); + vec3 vN = surf_norm; + vec3 R1 = cross( vSigmaY, vN ); + vec3 R2 = cross( vN, vSigmaX ); + float fDet = dot( vSigmaX, R1 ) * faceDirection; + vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); + return normalize( abs( fDet ) * surf_norm - vGrad ); + } +#endif`,ryt=`#if NUM_CLIPPING_PLANES > 0 + vec4 plane; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif +#endif`,nyt=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,iyt=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,syt=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,oyt=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,ayt=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,lyt=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,uyt=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,cyt=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +struct GeometricContext { + vec3 position; + vec3 normal; + vec3 viewDir; +#ifdef USE_CLEARCOAT + vec3 clearcoatNormal; +#endif +}; +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float linearToRelativeLuminance( const in vec3 color ) { + vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); + return dot( weights, color.rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +}`,hyt=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_maxMipLevel 8.0 + #define cubeUV_minMipLevel 4.0 + #define cubeUV_maxTileSize 256.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize ); + vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ); + vec2 f = fract( uv ); + uv += 0.5 - f; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + if ( mipInt < cubeUV_maxMipLevel ) { + uv.y += 2.0 * cubeUV_maxTileSize; + } + uv.y += filterInt * 2.0 * cubeUV_minTileSize; + uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize ); + uv *= texelSize; + vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.x += texelSize; + vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.y += texelSize; + vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.x -= texelSize; + vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + vec3 tm = mix( tl, tr, f.x ); + vec3 bm = mix( bl, br, f.x ); + return mix( tm, bm, f.y ); + } + #define r0 1.0 + #define v0 0.339 + #define m0 - 2.0 + #define r1 0.8 + #define v1 0.276 + #define m1 - 1.0 + #define r4 0.4 + #define v4 0.046 + #define m4 2.0 + #define r5 0.305 + #define v5 0.016 + #define m5 3.0 + #define r6 0.21 + #define v6 0.0038 + #define m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= r1 ) { + mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0; + } else if ( roughness >= r4 ) { + mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1; + } else if ( roughness >= r5 ) { + mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4; + } else if ( roughness >= r6 ) { + mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,dyt=`vec3 transformedNormal = objectNormal; +#ifdef USE_INSTANCING + mat3 m = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); + transformedNormal = m * transformedNormal; +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,fyt=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,pyt=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); +#endif`,myt=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vUv ); + emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,gyt=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,yyt="gl_FragColor = linearToOutputTexel( gl_FragColor );",vyt=` +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); +} +vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); +} +vec4 sRGBToLinear( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); +} +vec4 LinearTosRGB( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} +vec4 RGBEToLinear( in vec4 value ) { + return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); +} +vec4 LinearToRGBE( in vec4 value ) { + float maxComponent = max( max( value.r, value.g ), value.b ); + float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); + return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); +} +vec4 RGBMToLinear( in vec4 value, in float maxRange ) { + return vec4( value.rgb * value.a * maxRange, 1.0 ); +} +vec4 LinearToRGBM( in vec4 value, in float maxRange ) { + float maxRGB = max( value.r, max( value.g, value.b ) ); + float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); + M = ceil( M * 255.0 ) / 255.0; + return vec4( value.rgb / ( M * maxRange ), M ); +} +vec4 RGBDToLinear( in vec4 value, in float maxRange ) { + return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); +} +vec4 LinearToRGBD( in vec4 value, in float maxRange ) { + float maxRGB = max( value.r, max( value.g, value.b ) ); + float D = max( maxRange / maxRGB, 1.0 ); + D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); + return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); +} +const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); +vec4 LinearToLogLuv( in vec4 value ) { + vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; + Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); + vec4 vResult; + vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; + float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; + vResult.w = fract( Le ); + vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; + return vResult; +} +const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); +vec4 LogLuvToLinear( in vec4 value ) { + float Le = value.z * 255.0 + value.w; + vec3 Xp_Y_XYZp; + Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); + Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; + Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; + vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; + return vec4( max( vRGB, 0.0 ), 1.0 ); +}`,_yt=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + envColor = envMapTexelToLinear( envColor ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,xyt=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform int maxMipLevel; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,wyt=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,byt=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,Cyt=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,Syt=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,Eyt=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Myt=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,Tyt=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,Iyt=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return texture2D( gradientMap, coord ).rgb; + #else + return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); + #endif +}`,Ryt=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vUv2 ); + vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #ifndef PHYSICALLY_CORRECT_LIGHTS + lightMapIrradiance *= PI; + #endif + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,Lyt=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,kyt=`vec3 diffuse = vec3( 1.0 ); +GeometricContext geometry; +geometry.position = mvPosition.xyz; +geometry.normal = normalize( transformedNormal ); +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); +GeometricContext backGeometry; +backGeometry.position = geometry.position; +backGeometry.normal = -geometry.normal; +backGeometry.viewDir = geometry.viewDir; +vLightFront = vec3( 0.0 ); +vIndirectFront = vec3( 0.0 ); +#ifdef DOUBLE_SIDED + vLightBack = vec3( 0.0 ); + vIndirectBack = vec3( 0.0 ); +#endif +IncidentLight directLight; +float dotNL; +vec3 directLightColor_Diffuse; +vIndirectFront += getAmbientLightIrradiance( ambientLightColor ); +vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal ); +#ifdef DOUBLE_SIDED + vIndirectBack += getAmbientLightIrradiance( ambientLightColor ); + vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal ); +#endif +#if NUM_POINT_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + getPointLightInfo( pointLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_SPOT_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + getSpotLightInfo( spotLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_DIR_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + getDirectionalLightInfo( directionalLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_HEMI_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + #ifdef DOUBLE_SIDED + vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal ); + #endif + } + #pragma unroll_loop_end +#endif`,Ayt=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +uniform vec3 lightProbe[ 9 ]; +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( PHYSICALLY_CORRECT_LIGHTS ) + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #else + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometry.position; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometry.position; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,Pyt=`#if defined( USE_ENVMAP ) + #ifdef ENVMAP_MODE_REFRACTION + uniform float refractionRatio; + #endif + vec3 getIBLIrradiance( const in vec3 normal ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 reflectVec; + #ifdef ENVMAP_MODE_REFLECTION + reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + #else + reflectVec = refract( - viewDir, normal, refractionRatio ); + #endif + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } +#endif`,$yt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Oyt=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon +#define Material_LightProbeLOD( material ) (0)`,Nyt=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,Dyt=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong +#define Material_LightProbeLOD( material ) (0)`,Fyt=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + #ifdef SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULARINTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; + #endif + #ifdef USE_SPECULARCOLORMAP + specularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEENCOLORMAP + material.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEENROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; + #endif +#endif`,zyt=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif +}; +vec3 clearcoatSpecular = vec3( 0.0 ); +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + vec3 FssEss = specularColor * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometry.normal; + vec3 viewDir = geometry.viewDir; + vec3 position = geometry.position; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + reflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,Byt=` +GeometricContext geometry; +geometry.position = - vViewPosition; +geometry.normal = normal; +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +#ifdef USE_CLEARCOAT + geometry.clearcoatNormal = clearcoatNormal; +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,jyt=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vUv2 ); + vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #ifndef PHYSICALLY_CORRECT_LIGHTS + lightMapIrradiance *= PI; + #endif + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometry.normal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,Vyt=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); +#endif`,Uyt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,Hyt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,Gyt=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,qyt=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,Wyt=`#ifdef USE_MAP + vec4 texelColor = texture2D( map, vUv ); + texelColor = mapTexelToLinear( texelColor ); + diffuseColor *= texelColor; +#endif`,Zyt=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,Yyt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; +#endif +#ifdef USE_MAP + vec4 mapTexel = texture2D( map, uv ); + diffuseColor *= mapTexelToLinear( mapTexel ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,Xyt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,Jyt=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vUv ); + metalnessFactor *= texelMetalness.b; +#endif`,Kyt=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,Qyt=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] > 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,evt=`#ifdef USE_MORPHTARGETS + uniform float morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + uniform sampler2DArray morphTargetsTexture; + uniform vec2 morphTargetsTextureSize; + vec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) { + float texelIndex = float( vertexIndex * stride + offset ); + float y = floor( texelIndex / morphTargetsTextureSize.x ); + float x = texelIndex - y * morphTargetsTextureSize.x; + vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex ); + return texture( morphTargetsTexture, morphUV ).xyz; + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,tvt=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #ifndef USE_MORPHNORMALS + if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ]; + #else + if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ]; + #endif + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,rvt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); + vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + #ifdef USE_TANGENT + vec3 tangent = normalize( vTangent ); + vec3 bitangent = normalize( vBitangent ); + #ifdef DOUBLE_SIDED + tangent = tangent * faceDirection; + bitangent = bitangent * faceDirection; + #endif + #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) + mat3 vTBN = mat3( tangent, bitangent, normal ); + #endif + #endif +#endif +vec3 geometryNormal = normal;`,nvt=`#ifdef OBJECTSPACE_NORMALMAP + normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( TANGENTSPACE_NORMALMAP ) + vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + #ifdef USE_TANGENT + normal = normalize( vTBN * mapN ); + #else + normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); + #endif +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,ivt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,svt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,ovt=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,avt=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef OBJECTSPACE_NORMALMAP + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) + vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { + vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); + vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); + vec2 st0 = dFdx( vUv.st ); + vec2 st1 = dFdy( vUv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); + return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); + } +#endif`,lvt=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = geometryNormal; +#endif`,uvt=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + #ifdef USE_TANGENT + clearcoatNormal = normalize( vTBN * clearcoatMapN ); + #else + clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); + #endif +#endif`,cvt=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif`,hvt=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= transmissionAlpha + 0.1; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,dvt=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { + return linearClipZ * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * invClipZ - far ); +}`,fvt=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,pvt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,mvt=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,gvt=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,yvt=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vUv ); + roughnessFactor *= texelRoughness.g; +#endif`,vvt=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,_vt=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); + bool inFrustum = all( inFrustumVec ); + bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); + bool frustumTest = all( frustumTestVec ); + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,xvt=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,wvt=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 ); + vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif`,bvt=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,Cvt=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,Svt=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + #ifdef BONE_TEXTURE + uniform highp sampler2D boneTexture; + uniform int boneTextureSize; + mat4 getBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } + #else + uniform mat4 boneMatrices[ MAX_BONES ]; + mat4 getBoneMatrix( const in float i ) { + mat4 bone = boneMatrices[ int(i) ]; + return bone; + } + #endif +#endif`,Evt=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,Mvt=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,Tvt=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,Ivt=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,Rvt=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,Lvt=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return toneMappingExposure * color; +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,kvt=`#ifdef USE_TRANSMISSION + float transmissionAlpha = 1.0; + float transmissionFactor = transmission; + float thicknessFactor = thickness; + #ifdef USE_TRANSMISSIONMAP + transmissionFactor *= texture2D( transmissionMap, vUv ).r; + #endif + #ifdef USE_THICKNESSMAP + thicknessFactor *= texture2D( thicknessMap, vUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmission = getIBLVolumeRefraction( + n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor, + attenuationColor, attenuationDistance ); + totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor ); + transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor ); +#endif`,Avt=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + vec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( float roughness, float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) { + float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + #ifdef TEXTURE_LOD_EXT + return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); + #else + return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); + #endif + } + vec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) { + if ( attenuationDistance == 0.0 ) { + return radiance; + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; + } + } + vec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90, + vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness, + vec3 attenuationColor, float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); + } +#endif`,Pvt=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) + varying vec2 vUv; +#endif`,$vt=`#ifdef USE_UV + #ifdef UVS_VERTEX_ONLY + vec2 vUv; + #else + varying vec2 vUv; + #endif + uniform mat3 uvTransform; +#endif`,Ovt=`#ifdef USE_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; +#endif`,Nvt=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + varying vec2 vUv2; +#endif`,Dvt=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + attribute vec2 uv2; + varying vec2 vUv2; + uniform mat3 uv2Transform; +#endif`,Fvt=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; +#endif`,zvt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const Bvt=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,jvt=`uniform sampler2D t2D; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + gl_FragColor = mapTexelToLinear( texColor ); + #include + #include +}`,Vvt=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,Uvt=`#include +uniform float opacity; +varying vec3 vWorldDirection; +#include +void main() { + vec3 vReflect = vWorldDirection; + #include + gl_FragColor = envColor; + gl_FragColor.a *= opacity; + #include + #include +}`,Hvt=`#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,Gvt=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + vec4 diffuseColor = vec4( 1.0 ); + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,qvt=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,Wvt=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main () { + #include + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,Zvt=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,Yvt=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + vec4 texColor = texture2D( tEquirect, sampleUV ); + gl_FragColor = mapTexelToLinear( texColor ); + #include + #include +}`,Xvt=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include +}`,Jvt=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +void main() { + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,Kvt=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,Qvt=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel= texture2D( lightMap, vUv2 ); + reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,e2t=`#define LAMBERT +varying vec3 vLightFront; +varying vec3 vIndirectFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; + varying vec3 vIndirectBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,t2t=`uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +varying vec3 vLightFront; +varying vec3 vIndirectFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; + varying vec3 vIndirectBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #ifdef DOUBLE_SIDED + reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; + #else + reflectedLight.indirectDiffuse += vIndirectFront; + #endif + #include + reflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb ); + #ifdef DOUBLE_SIDED + reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; + #else + reflectedLight.directDiffuse = vLightFront; + #endif + reflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask(); + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,r2t=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,n2t=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + matcapColor = matcapTexelToLinear( matcapColor ); + #else + vec4 matcapColor = vec4( 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,i2t=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + vViewPosition = - mvPosition.xyz; +#endif +}`,s2t=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); +}`,o2t=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,a2t=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,l2t=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,u2t=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULARINTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif + #ifdef USE_SPECULARCOLORMAP + uniform sampler2D specularColorMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEENCOLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEENROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,c2t=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,h2t=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,d2t=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,f2t=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,p2t=`#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,m2t=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,g2t=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,y2t=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,ao={alphamap_fragment:qgt,alphamap_pars_fragment:Wgt,alphatest_fragment:Zgt,alphatest_pars_fragment:Ygt,aomap_fragment:Xgt,aomap_pars_fragment:Jgt,begin_vertex:Kgt,beginnormal_vertex:Qgt,bsdfs:eyt,bumpmap_pars_fragment:tyt,clipping_planes_fragment:ryt,clipping_planes_pars_fragment:nyt,clipping_planes_pars_vertex:iyt,clipping_planes_vertex:syt,color_fragment:oyt,color_pars_fragment:ayt,color_pars_vertex:lyt,color_vertex:uyt,common:cyt,cube_uv_reflection_fragment:hyt,defaultnormal_vertex:dyt,displacementmap_pars_vertex:fyt,displacementmap_vertex:pyt,emissivemap_fragment:myt,emissivemap_pars_fragment:gyt,encodings_fragment:yyt,encodings_pars_fragment:vyt,envmap_fragment:_yt,envmap_common_pars_fragment:xyt,envmap_pars_fragment:wyt,envmap_pars_vertex:byt,envmap_physical_pars_fragment:Pyt,envmap_vertex:Cyt,fog_vertex:Syt,fog_pars_vertex:Eyt,fog_fragment:Myt,fog_pars_fragment:Tyt,gradientmap_pars_fragment:Iyt,lightmap_fragment:Ryt,lightmap_pars_fragment:Lyt,lights_lambert_vertex:kyt,lights_pars_begin:Ayt,lights_toon_fragment:$yt,lights_toon_pars_fragment:Oyt,lights_phong_fragment:Nyt,lights_phong_pars_fragment:Dyt,lights_physical_fragment:Fyt,lights_physical_pars_fragment:zyt,lights_fragment_begin:Byt,lights_fragment_maps:jyt,lights_fragment_end:Vyt,logdepthbuf_fragment:Uyt,logdepthbuf_pars_fragment:Hyt,logdepthbuf_pars_vertex:Gyt,logdepthbuf_vertex:qyt,map_fragment:Wyt,map_pars_fragment:Zyt,map_particle_fragment:Yyt,map_particle_pars_fragment:Xyt,metalnessmap_fragment:Jyt,metalnessmap_pars_fragment:Kyt,morphnormal_vertex:Qyt,morphtarget_pars_vertex:evt,morphtarget_vertex:tvt,normal_fragment_begin:rvt,normal_fragment_maps:nvt,normal_pars_fragment:ivt,normal_pars_vertex:svt,normal_vertex:ovt,normalmap_pars_fragment:avt,clearcoat_normal_fragment_begin:lvt,clearcoat_normal_fragment_maps:uvt,clearcoat_pars_fragment:cvt,output_fragment:hvt,packing:dvt,premultiplied_alpha_fragment:fvt,project_vertex:pvt,dithering_fragment:mvt,dithering_pars_fragment:gvt,roughnessmap_fragment:yvt,roughnessmap_pars_fragment:vvt,shadowmap_pars_fragment:_vt,shadowmap_pars_vertex:xvt,shadowmap_vertex:wvt,shadowmask_pars_fragment:bvt,skinbase_vertex:Cvt,skinning_pars_vertex:Svt,skinning_vertex:Evt,skinnormal_vertex:Mvt,specularmap_fragment:Tvt,specularmap_pars_fragment:Ivt,tonemapping_fragment:Rvt,tonemapping_pars_fragment:Lvt,transmission_fragment:kvt,transmission_pars_fragment:Avt,uv_pars_fragment:Pvt,uv_pars_vertex:$vt,uv_vertex:Ovt,uv2_pars_fragment:Nvt,uv2_pars_vertex:Dvt,uv2_vertex:Fvt,worldpos_vertex:zvt,background_vert:Bvt,background_frag:jvt,cube_vert:Vvt,cube_frag:Uvt,depth_vert:Hvt,depth_frag:Gvt,distanceRGBA_vert:qvt,distanceRGBA_frag:Wvt,equirect_vert:Zvt,equirect_frag:Yvt,linedashed_vert:Xvt,linedashed_frag:Jvt,meshbasic_vert:Kvt,meshbasic_frag:Qvt,meshlambert_vert:e2t,meshlambert_frag:t2t,meshmatcap_vert:r2t,meshmatcap_frag:n2t,meshnormal_vert:i2t,meshnormal_frag:s2t,meshphong_vert:o2t,meshphong_frag:a2t,meshphysical_vert:l2t,meshphysical_frag:u2t,meshtoon_vert:c2t,meshtoon_frag:h2t,points_vert:d2t,points_frag:f2t,shadow_vert:p2t,shadow_frag:m2t,sprite_vert:g2t,sprite_frag:y2t},Kn={common:{diffuse:{value:new $i(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Fc},uv2Transform:{value:new Fc},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new bn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new $i(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new $i(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Fc}},sprite:{diffuse:{value:new $i(16777215)},opacity:{value:1},center:{value:new bn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Fc}}},W0={basic:{uniforms:Ch([Kn.common,Kn.specularmap,Kn.envmap,Kn.aomap,Kn.lightmap,Kn.fog]),vertexShader:ao.meshbasic_vert,fragmentShader:ao.meshbasic_frag},lambert:{uniforms:Ch([Kn.common,Kn.specularmap,Kn.envmap,Kn.aomap,Kn.lightmap,Kn.emissivemap,Kn.fog,Kn.lights,{emissive:{value:new $i(0)}}]),vertexShader:ao.meshlambert_vert,fragmentShader:ao.meshlambert_frag},phong:{uniforms:Ch([Kn.common,Kn.specularmap,Kn.envmap,Kn.aomap,Kn.lightmap,Kn.emissivemap,Kn.bumpmap,Kn.normalmap,Kn.displacementmap,Kn.fog,Kn.lights,{emissive:{value:new $i(0)},specular:{value:new $i(1118481)},shininess:{value:30}}]),vertexShader:ao.meshphong_vert,fragmentShader:ao.meshphong_frag},standard:{uniforms:Ch([Kn.common,Kn.envmap,Kn.aomap,Kn.lightmap,Kn.emissivemap,Kn.bumpmap,Kn.normalmap,Kn.displacementmap,Kn.roughnessmap,Kn.metalnessmap,Kn.fog,Kn.lights,{emissive:{value:new $i(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ao.meshphysical_vert,fragmentShader:ao.meshphysical_frag},toon:{uniforms:Ch([Kn.common,Kn.aomap,Kn.lightmap,Kn.emissivemap,Kn.bumpmap,Kn.normalmap,Kn.displacementmap,Kn.gradientmap,Kn.fog,Kn.lights,{emissive:{value:new $i(0)}}]),vertexShader:ao.meshtoon_vert,fragmentShader:ao.meshtoon_frag},matcap:{uniforms:Ch([Kn.common,Kn.bumpmap,Kn.normalmap,Kn.displacementmap,Kn.fog,{matcap:{value:null}}]),vertexShader:ao.meshmatcap_vert,fragmentShader:ao.meshmatcap_frag},points:{uniforms:Ch([Kn.points,Kn.fog]),vertexShader:ao.points_vert,fragmentShader:ao.points_frag},dashed:{uniforms:Ch([Kn.common,Kn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ao.linedashed_vert,fragmentShader:ao.linedashed_frag},depth:{uniforms:Ch([Kn.common,Kn.displacementmap]),vertexShader:ao.depth_vert,fragmentShader:ao.depth_frag},normal:{uniforms:Ch([Kn.common,Kn.bumpmap,Kn.normalmap,Kn.displacementmap,{opacity:{value:1}}]),vertexShader:ao.meshnormal_vert,fragmentShader:ao.meshnormal_frag},sprite:{uniforms:Ch([Kn.sprite,Kn.fog]),vertexShader:ao.sprite_vert,fragmentShader:ao.sprite_frag},background:{uniforms:{uvTransform:{value:new Fc},t2D:{value:null}},vertexShader:ao.background_vert,fragmentShader:ao.background_frag},cube:{uniforms:Ch([Kn.envmap,{opacity:{value:1}}]),vertexShader:ao.cube_vert,fragmentShader:ao.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ao.equirect_vert,fragmentShader:ao.equirect_frag},distanceRGBA:{uniforms:Ch([Kn.common,Kn.displacementmap,{referencePosition:{value:new st},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ao.distanceRGBA_vert,fragmentShader:ao.distanceRGBA_frag},shadow:{uniforms:Ch([Kn.lights,Kn.fog,{color:{value:new $i(0)},opacity:{value:1}}]),vertexShader:ao.shadow_vert,fragmentShader:ao.shadow_frag}};W0.physical={uniforms:Ch([W0.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new bn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new $i(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new bn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new $i(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new $i(1,1,1)},specularColorMap:{value:null}}]),vertexShader:ao.meshphysical_vert,fragmentShader:ao.meshphysical_frag};function v2t(t,e,r,n,i){const s=new $i(0);let o=0,a,l,u=null,d=0,f=null;function m(b,M){let O=!1,I=M.isScene===!0?M.background:null;I&&I.isTexture&&(I=e.get(I));const A=t.xr,j=A.getSession&&A.getSession();j&&j.environmentBlendMode==="additive"&&(I=null),I===null?v(s,o):I&&I.isColor&&(v(I,1),O=!0),(t.autoClear||O)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),I&&(I.isCubeTexture||I.mapping===$O)?(l===void 0&&(l=new ya(new SE(1,1,1),new od({name:"BackgroundCubeMaterial",uniforms:kw(W0.cube.uniforms),vertexShader:W0.cube.vertexShader,fragmentShader:W0.cube.fragmentShader,side:Bu,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(H,W,re){this.matrixWorld.copyPosition(re.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=I,l.material.uniforms.flipEnvMap.value=I.isCubeTexture&&I.isRenderTargetTexture===!1?-1:1,(u!==I||d!==I.version||f!==t.toneMapping)&&(l.material.needsUpdate=!0,u=I,d=I.version,f=t.toneMapping),b.unshift(l,l.geometry,l.material,0,0,null)):I&&I.isTexture&&(a===void 0&&(a=new ya(new zO(2,2),new od({name:"BackgroundMaterial",uniforms:kw(W0.background.uniforms),vertexShader:W0.background.vertexShader,fragmentShader:W0.background.fragmentShader,side:Rw,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=I,I.matrixAutoUpdate===!0&&I.updateMatrix(),a.material.uniforms.uvTransform.value.copy(I.matrix),(u!==I||d!==I.version||f!==t.toneMapping)&&(a.material.needsUpdate=!0,u=I,d=I.version,f=t.toneMapping),b.unshift(a,a.geometry,a.material,0,0,null))}function v(b,M){r.buffers.color.setClear(b.r,b.g,b.b,M,i)}return{getClearColor:function(){return s},setClearColor:function(b,M=1){s.set(b),o=M,v(s,o)},getClearAlpha:function(){return o},setClearAlpha:function(b){o=b,v(s,o)},render:m}}function _2t(t,e,r,n){const i=t.getParameter(34921),s=n.isWebGL2?null:e.get("OES_vertex_array_object"),o=n.isWebGL2||s!==null,a={},l=M(null);let u=l;function d(le,ve,Pe,Fe,We){let He=!1;if(o){const Lt=b(Fe,Pe,ve);u!==Lt&&(u=Lt,m(u.object)),He=O(Fe,We),He&&I(Fe,We)}else{const Lt=ve.wireframe===!0;(u.geometry!==Fe.id||u.program!==Pe.id||u.wireframe!==Lt)&&(u.geometry=Fe.id,u.program=Pe.id,u.wireframe=Lt,He=!0)}le.isInstancedMesh===!0&&(He=!0),We!==null&&r.update(We,34963),He&&(K(le,ve,Pe,Fe),We!==null&&t.bindBuffer(34963,r.get(We).buffer))}function f(){return n.isWebGL2?t.createVertexArray():s.createVertexArrayOES()}function m(le){return n.isWebGL2?t.bindVertexArray(le):s.bindVertexArrayOES(le)}function v(le){return n.isWebGL2?t.deleteVertexArray(le):s.deleteVertexArrayOES(le)}function b(le,ve,Pe){const Fe=Pe.wireframe===!0;let We=a[le.id];We===void 0&&(We={},a[le.id]=We);let He=We[ve.id];He===void 0&&(He={},We[ve.id]=He);let Lt=He[Fe];return Lt===void 0&&(Lt=M(f()),He[Fe]=Lt),Lt}function M(le){const ve=[],Pe=[],Fe=[];for(let We=0;We=0){let rr=We[lt];if(rr===void 0&&(lt==="instanceMatrix"&&le.instanceMatrix&&(rr=le.instanceMatrix),lt==="instanceColor"&&le.instanceColor&&(rr=le.instanceColor)),rr!==void 0){const Tt=rr.normalized,Je=rr.itemSize,pr=r.get(rr);if(pr===void 0)continue;const Ut=pr.buffer,tr=pr.type,Se=pr.bytesPerElement;if(rr.isInterleavedBufferAttribute){const je=rr.data,et=je.stride,yt=rr.offset;if(je&&je.isInstancedInterleavedBuffer){for(let we=0;we0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";K="mediump"}return K==="mediump"&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&t instanceof WebGL2ComputeRenderingContext;let a=r.precision!==void 0?r.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const u=o||e.has("WEBGL_draw_buffers"),d=r.logarithmicDepthBuffer===!0,f=t.getParameter(34930),m=t.getParameter(35660),v=t.getParameter(3379),b=t.getParameter(34076),M=t.getParameter(34921),O=t.getParameter(36347),I=t.getParameter(36348),A=t.getParameter(36349),j=m>0,H=o||e.has("OES_texture_float"),W=j&&H,re=o?t.getParameter(36183):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:d,maxTextures:f,maxVertexTextures:m,maxTextureSize:v,maxCubemapSize:b,maxAttributes:M,maxVertexUniforms:O,maxVaryings:I,maxFragmentUniforms:A,vertexTextures:j,floatFragmentTextures:H,floatVertexTextures:W,maxSamples:re}}function b2t(t){const e=this;let r=null,n=0,i=!1,s=!1;const o=new Pg,a=new Fc,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,m,v){const b=f.length!==0||m||n!==0||i;return i=m,r=d(f,v,0),n=f.length,b},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1,u()},this.setState=function(f,m,v){const b=f.clippingPlanes,M=f.clipIntersection,O=f.clipShadows,I=t.get(f);if(!i||b===null||b.length===0||s&&!O)s?d(null):u();else{const A=s?0:n,j=A*4;let H=I.clippingState||null;l.value=H,H=d(b,m,j,v);for(let W=0;W!==j;++W)H[W]=r[W];I.clippingState=H,this.numIntersection=M?this.numPlanes:0,this.numPlanes+=A}};function u(){l.value!==r&&(l.value=r,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(f,m,v,b){const M=f!==null?f.length:0;let O=null;if(M!==0){if(O=l.value,b!==!0||O===null){const I=v+M*4,A=m.matrixWorldInverse;a.getNormalMatrix(A),(O===null||O.length0){const u=t.getRenderTarget(),d=new H9e(l.height/2);return d.fromEquirectangularTexture(t,o),e.set(o,d),t.setRenderTarget(u),o.addEventListener("dispose",i),r(d.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}class BO extends EE{constructor(e=-1,r=1,n=1,i=-1,s=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=r,this.top=n,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,r,n,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let s=n-e,o=n+e,a=i+r,l=i-r;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}}BO.prototype.isOrthographicCamera=!0;class jO extends od{constructor(e){super(e),this.type="RawShaderMaterial"}}jO.prototype.isRawShaderMaterial=!0;const ew=4,v2=8,U0=Math.pow(2,v2),q9e=[.125,.215,.35,.446,.526,.582],W9e=v2-ew+1+q9e.length,cx=20,D2={[$h]:0,[J5]:1,[UJ]:2,[$9e]:3,[O9e]:4,[N9e]:5,[VJ]:6},Jz=new BO,{_lodPlanes:nb,_sizeLods:soe,_sigmas:FI}=M2t(),ooe=new $i;let Kz=null;const D3=(1+Math.sqrt(5))/2,hx=1/D3,aoe=[new st(1,1,1),new st(-1,1,1),new st(1,1,-1),new st(-1,1,-1),new st(0,D3,hx),new st(0,D3,-hx),new st(hx,0,D3),new st(-hx,0,D3),new st(D3,hx,0),new st(-D3,hx,0)];class S2t{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=T2t(cx),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,r=0,n=.1,i=100){Kz=this._renderer.getRenderTarget();const s=this._allocateTargets();return this._sceneToCubeUV(e,n,i,s),r>0&&this._blur(s,0,0,r),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=coe(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=uoe(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?U0:0,U0,U0),d.setRenderTarget(i),O&&d.render(M,a),d.render(e,a)}M.geometry.dispose(),M.material.dispose(),d.toneMapping=v,d.outputEncoding=m,d.autoClear=f,e.background=I}_setEncoding(e,r){this._renderer.capabilities.isWebGL2===!0&&r.format===pd&&r.type===N2&&r.encoding===J5?e.value=D2[$h]:e.value=D2[r.encoding]}_textureToCubeUV(e,r){const n=this._renderer,i=e.mapping===bE||e.mapping===CE;i?this._cubemapShader==null&&(this._cubemapShader=coe()):this._equirectShader==null&&(this._equirectShader=uoe());const s=i?this._cubemapShader:this._equirectShader,o=new ya(nb[0],s),a=s.uniforms;a.envMap.value=e,i||a.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(a.inputEncoding,e),this._setEncoding(a.outputEncoding,r.texture),zI(r,0,0,3*U0,2*U0),n.setRenderTarget(r),n.render(o,Jz)}_applyPMREM(e){const r=this._renderer,n=r.autoClear;r.autoClear=!1;for(let i=1;icx&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${O} samples when the maximum is set to ${cx}`);const I=[];let A=0;for(let re=0;rev2-ew?i-v2+ew:0);zI(r,H,W,3*j,2*j),l.setRenderTarget(r),l.render(f,Jz)}}function E2t(t){return t===void 0||t.type!==N2?!1:t.encoding===$h||t.encoding===J5||t.encoding===VJ}function M2t(){const t=[],e=[],r=[];let n=v2;for(let i=0;iv2-ew?o=q9e[i-v2+ew-1]:i==0&&(o=0),r.push(o);const a=1/(s-1),l=-a/2,u=1+a/2,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=6,m=6,v=3,b=2,M=1,O=new Float32Array(v*m*f),I=new Float32Array(b*m*f),A=new Float32Array(M*m*f);for(let H=0;H2?0:-1,K=[W,re,0,W+2/3,re,0,W+2/3,re+1,0,W,re,0,W+2/3,re+1,0,W,re+1,0];O.set(K,v*m*H),I.set(d,b*m*H);const pe=[H,H,H,H,H,H];A.set(pe,M*m*H)}const j=new Oo;j.setAttribute("position",new to(O,v)),j.setAttribute("uv",new to(I,b)),j.setAttribute("faceIndex",new to(A,M)),t.push(j),n>ew&&n--}return{_lodPlanes:t,_sizeLods:e,_sigmas:r}}function loe(t){const e=new Y1(3*U0,3*U0,t);return e.texture.mapping=$O,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function zI(t,e,r,n,i){t.viewport.set(e,r,n,i),t.scissor.set(e,r,n,i)}function T2t(t){const e=new Float32Array(t),r=new st(0,1,0);return new jO({name:"SphericalGaussianBlur",defines:{n:t},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r},inputEncoding:{value:D2[$h]},outputEncoding:{value:D2[$h]}},vertexShader:qJ(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + ${WJ()} + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:y2,depthTest:!1,depthWrite:!1})}function uoe(){const t=new bn(1,1);return new jO({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:t},inputEncoding:{value:D2[$h]},outputEncoding:{value:D2[$h]}},vertexShader:qJ(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform vec2 texelSize; + + ${WJ()} + + #include + + void main() { + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + vec2 f = fract( uv / texelSize - 0.5 ); + uv -= f * texelSize; + vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.x += texelSize.x; + vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.y += texelSize.y; + vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.x -= texelSize.x; + vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + + vec3 tm = mix( tl, tr, f.x ); + vec3 bm = mix( bl, br, f.x ); + gl_FragColor.rgb = mix( tm, bm, f.y ); + + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:y2,depthTest:!1,depthWrite:!1})}function coe(){return new jO({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:D2[$h]},outputEncoding:{value:D2[$h]}},vertexShader:qJ(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + ${WJ()} + + void main() { + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:y2,depthTest:!1,depthWrite:!1})}function qJ(){return` + + precision mediump float; + precision mediump int; + + attribute vec3 position; + attribute vec2 uv; + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function WJ(){return` + + uniform int inputEncoding; + uniform int outputEncoding; + + #include + + vec4 inputTexelToLinear( vec4 value ) { + + if ( inputEncoding == 0 ) { + + return value; + + } else if ( inputEncoding == 1 ) { + + return sRGBToLinear( value ); + + } else if ( inputEncoding == 2 ) { + + return RGBEToLinear( value ); + + } else if ( inputEncoding == 3 ) { + + return RGBMToLinear( value, 7.0 ); + + } else if ( inputEncoding == 4 ) { + + return RGBMToLinear( value, 16.0 ); + + } else if ( inputEncoding == 5 ) { + + return RGBDToLinear( value, 256.0 ); + + } else { + + return GammaToLinear( value, 2.2 ); + + } + + } + + vec4 linearToOutputTexel( vec4 value ) { + + if ( outputEncoding == 0 ) { + + return value; + + } else if ( outputEncoding == 1 ) { + + return LinearTosRGB( value ); + + } else if ( outputEncoding == 2 ) { + + return LinearToRGBE( value ); + + } else if ( outputEncoding == 3 ) { + + return LinearToRGBM( value, 7.0 ); + + } else if ( outputEncoding == 4 ) { + + return LinearToRGBM( value, 16.0 ); + + } else if ( outputEncoding == 5 ) { + + return LinearToRGBD( value, 256.0 ); + + } else { + + return LinearToGamma( value, 2.2 ); + + } + + } + + vec4 envMapTexelToLinear( vec4 color ) { + + return inputTexelToLinear( color ); + + } + `}function I2t(t){let e=new WeakMap,r=null;function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){const l=a.mapping,u=l===cq||l===hq,d=l===bE||l===CE;if(u||d){if(e.has(a))return e.get(a).texture;{const f=a.image;if(u&&f&&f.height>0||d&&f&&i(f)){const m=t.getRenderTarget();r===null&&(r=new S2t(t));const v=u?r.fromEquirectangular(a):r.fromCubemap(a);return e.set(a,v),t.setRenderTarget(m),a.addEventListener("dispose",s),v.texture}else return null}}}return a}function i(a){let l=0;const u=6;for(let d=0;d65535?U9e:V9e)(m,1);O.version=M;const I=s.get(f);I&&e.remove(I),s.set(f,O)}function d(f){const m=s.get(f);if(m){const v=f.index;v!==null&&m.versione.maxTextureSize&&(pe=Math.ceil(K/e.maxTextureSize),K=e.maxTextureSize);const ge=new Float32Array(K*pe*4*b),fe=new ZJ(ge,K,pe,b);fe.format=pd,fe.type=Fv;const ee=re*4;for(let be=0;be0)return t;const i=e*r;let s=doe[i];if(s===void 0&&(s=new Float32Array(i),doe[i]=s),e!==0){n.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=r,t[o].toArray(s,a)}return s}function gd(t,e){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r/gm;function mq(t){return t.replace(A_t,P_t)}function P_t(t,e){const r=ao[e];if(r===void 0)throw new Error("Can not resolve #include <"+e+">");return mq(r)}const $_t=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,O_t=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function boe(t){return t.replace(O_t,txe).replace($_t,N_t)}function N_t(t,e,r,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),txe(t,e,r,n)}function txe(t,e,r,n){let i="";for(let s=parseInt(e);s0?t.gammaFactor:1,v=r.isWebGL2?"":R_t(r),b=L_t(s),M=i.createProgram();let O,I,A=r.glslVersion?"#version "+r.glslVersion+` +`:"";r.isRawShaderMaterial?(O=[b].filter(l6).join(` +`),O.length>0&&(O+=` +`),I=[v,b].filter(l6).join(` +`),I.length>0&&(I+=` +`)):(O=[Coe(r),"#define SHADER_NAME "+r.shaderName,b,r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+m,"#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+d:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(l6).join(` +`),I=[v,Coe(r),"#define SHADER_NAME "+r.shaderName,b,"#define GAMMA_FACTOR "+m,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.envMap?"#define "+d:"",r.envMap?"#define "+f:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensionShaderTextureLOD||r.envMap)&&r.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==u5?"#define TONE_MAPPING":"",r.toneMapping!==u5?ao.tonemapping_pars_fragment:"",r.toneMapping!==u5?I_t("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.format===c5?"#define OPAQUE":"",ao.encodings_pars_fragment,r.map?i3("mapTexelToLinear",r.mapEncoding):"",r.matcap?i3("matcapTexelToLinear",r.matcapEncoding):"",r.envMap?i3("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMap?i3("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.specularColorMap?i3("specularColorMapTexelToLinear",r.specularColorMapEncoding):"",r.sheenColorMap?i3("sheenColorMapTexelToLinear",r.sheenColorMapEncoding):"",r.lightMap?i3("lightMapTexelToLinear",r.lightMapEncoding):"",T_t("linearToOutputTexel",r.outputEncoding),r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",` +`].filter(l6).join(` +`)),o=mq(o),o=xoe(o,r),o=woe(o,r),a=mq(a),a=xoe(a,r),a=woe(a,r),o=boe(o),a=boe(a),r.isWebGL2&&r.isRawShaderMaterial!==!0&&(A=`#version 300 es +`,O=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+O,I=["#define varying in",r.glslVersion===qse?"":"out highp vec4 pc_fragColor;",r.glslVersion===qse?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+I);const j=A+O+o,H=A+I+a,W=voe(i,35633,j),re=voe(i,35632,H);if(i.attachShader(M,W),i.attachShader(M,re),r.index0AttributeName!==void 0?i.bindAttribLocation(M,0,r.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(M,0,"position"),i.linkProgram(M),t.debug.checkShaderErrors){const ge=i.getProgramInfoLog(M).trim(),fe=i.getShaderInfoLog(W).trim(),ee=i.getShaderInfoLog(re).trim();let be=!0,le=!0;if(i.getProgramParameter(M,35714)===!1){be=!1;const ve=_oe(i,W,"vertex"),Pe=_oe(i,re,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(M,35715)+` + +Program Info Log: `+ge+` +`+ve+` +`+Pe)}else ge!==""?console.warn("THREE.WebGLProgram: Program Info Log:",ge):(fe===""||ee==="")&&(le=!1);le&&(this.diagnostics={runnable:be,programLog:ge,vertexShader:{log:fe,prefix:O},fragmentShader:{log:ee,prefix:I}})}i.deleteShader(W),i.deleteShader(re);let K;this.getUniforms=function(){return K===void 0&&(K=new _2(i,M)),K};let pe;return this.getAttributes=function(){return pe===void 0&&(pe=k_t(i,M)),pe},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(M),this.program=void 0},this.name=r.shaderName,this.id=E_t++,this.cacheKey=e,this.usedTimes=1,this.program=M,this.vertexShader=W,this.fragmentShader=re,this}function V_t(t,e,r,n,i,s,o){const a=[],l=i.isWebGL2,u=i.logarithmicDepthBuffer,d=i.floatVertexTextures,f=i.maxVertexUniforms,m=i.vertexTextures;let v=i.precision;const b={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},M=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function O(K){const ge=K.skeleton.bones;if(d)return 1024;{const ee=Math.floor((f-20)/4),be=Math.min(ee,ge.length);return be0,pt=K.clearcoat>0;return{isWebGL2:l,shaderID:Pe,shaderName:K.type,vertexShader:We,fragmentShader:He,defines:K.defines,isRawShaderMaterial:K.isRawShaderMaterial===!0,glslVersion:K.glslVersion,precision:v,instancing:ee.isInstancedMesh===!0,instancingColor:ee.isInstancedMesh===!0&&ee.instanceColor!==null,supportsVertexTextures:m,outputEncoding:Lt!==null?I(Lt.texture):t.outputEncoding,map:!!K.map,mapEncoding:I(K.map),matcap:!!K.matcap,matcapEncoding:I(K.matcap),envMap:!!ve,envMapMode:ve&&ve.mapping,envMapEncoding:I(ve),envMapCubeUV:!!ve&&(ve.mapping===$O||ve.mapping===BJ),lightMap:!!K.lightMap,lightMapEncoding:I(K.lightMap),aoMap:!!K.aoMap,emissiveMap:!!K.emissiveMap,emissiveMapEncoding:I(K.emissiveMap),bumpMap:!!K.bumpMap,normalMap:!!K.normalMap,objectSpaceNormalMap:K.normalMapType===cgt,tangentSpaceNormalMap:K.normalMapType===y7,clearcoat:pt,clearcoatMap:pt&&!!K.clearcoatMap,clearcoatRoughnessMap:pt&&!!K.clearcoatRoughnessMap,clearcoatNormalMap:pt&&!!K.clearcoatNormalMap,displacementMap:!!K.displacementMap,roughnessMap:!!K.roughnessMap,metalnessMap:!!K.metalnessMap,specularMap:!!K.specularMap,specularIntensityMap:!!K.specularIntensityMap,specularColorMap:!!K.specularColorMap,specularColorMapEncoding:I(K.specularColorMap),alphaMap:!!K.alphaMap,alphaTest:lt,gradientMap:!!K.gradientMap,sheen:K.sheen>0,sheenColorMap:!!K.sheenColorMap,sheenColorMapEncoding:I(K.sheenColorMap),sheenRoughnessMap:!!K.sheenRoughnessMap,transmission:K.transmission>0,transmissionMap:!!K.transmissionMap,thicknessMap:!!K.thicknessMap,combine:K.combine,vertexTangents:!!K.normalMap&&!!ee.geometry&&!!ee.geometry.attributes.tangent,vertexColors:K.vertexColors,vertexAlphas:K.vertexColors===!0&&!!ee.geometry&&!!ee.geometry.attributes.color&&ee.geometry.attributes.color.itemSize===4,vertexUvs:!!K.map||!!K.bumpMap||!!K.normalMap||!!K.specularMap||!!K.alphaMap||!!K.emissiveMap||!!K.roughnessMap||!!K.metalnessMap||!!K.clearcoatMap||!!K.clearcoatRoughnessMap||!!K.clearcoatNormalMap||!!K.displacementMap||!!K.transmissionMap||!!K.thicknessMap||!!K.specularIntensityMap||!!K.specularColorMap||!!K.sheenColorMap||K.sheenRoughnessMap,uvsVertexOnly:!(K.map||K.bumpMap||K.normalMap||K.specularMap||K.alphaMap||K.emissiveMap||K.roughnessMap||K.metalnessMap||K.clearcoatNormalMap||K.transmission>0||K.transmissionMap||K.thicknessMap||K.specularIntensityMap||K.specularColorMap||!!K.sheen>0||K.sheenColorMap||K.sheenRoughnessMap)&&!!K.displacementMap,fog:!!be,useFog:K.fog,fogExp2:be&&be.isFogExp2,flatShading:!!K.flatShading,sizeAttenuation:K.sizeAttenuation,logarithmicDepthBuffer:u,skinning:ee.isSkinnedMesh===!0&&Fe>0,maxBones:Fe,useVertexTexture:d,morphTargets:!!ee.geometry&&!!ee.geometry.morphAttributes.position,morphNormals:!!ee.geometry&&!!ee.geometry.morphAttributes.normal,morphTargetsCount:ee.geometry&&ee.geometry.morphAttributes.position?ee.geometry.morphAttributes.position.length:0,numDirLights:pe.directional.length,numPointLights:pe.point.length,numSpotLights:pe.spot.length,numRectAreaLights:pe.rectArea.length,numHemiLights:pe.hemi.length,numDirLightShadows:pe.directionalShadowMap.length,numPointLightShadows:pe.pointShadowMap.length,numSpotLightShadows:pe.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,format:K.format,dithering:K.dithering,shadowMapEnabled:t.shadowMap.enabled&&ge.length>0,shadowMapType:t.shadowMap.type,toneMapping:K.toneMapped?t.toneMapping:u5,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:K.premultipliedAlpha,doubleSided:K.side===sd,flipSided:K.side===Bu,depthPacking:K.depthPacking!==void 0?K.depthPacking:!1,index0AttributeName:K.index0AttributeName,extensionDerivatives:K.extensions&&K.extensions.derivatives,extensionFragDepth:K.extensions&&K.extensions.fragDepth,extensionDrawBuffers:K.extensions&&K.extensions.drawBuffers,extensionShaderTextureLOD:K.extensions&&K.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:K.customProgramCacheKey()}}function j(K){const pe=[];if(K.shaderID?pe.push(K.shaderID):(pe.push(Wse(K.fragmentShader)),pe.push(Wse(K.vertexShader))),K.defines!==void 0)for(const ge in K.defines)pe.push(ge),pe.push(K.defines[ge]);if(K.isRawShaderMaterial===!1){for(let ge=0;ge0?i.push(j):M.transparent===!0?s.push(j):n.push(j)}function d(v,b,M,O,I,A){const j=l(v,b,M,O,I,A);M.transmission>0?i.unshift(j):M.transparent===!0?s.unshift(j):n.unshift(j)}function f(v,b){n.length>1&&n.sort(v||H_t),i.length>1&&i.sort(b||Soe),s.length>1&&s.sort(b||Soe)}function m(){for(let v=r,b=e.length;v=e.get(i).length?(o=new Eoe(t),e.get(i).push(o)):o=e.get(i)[s],o}function n(){e=new WeakMap}return{get:r,dispose:n}}function q_t(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let r;switch(e.type){case"DirectionalLight":r={direction:new st,color:new $i};break;case"SpotLight":r={position:new st,direction:new st,color:new $i,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new st,color:new $i,distance:0,decay:0};break;case"HemisphereLight":r={direction:new st,skyColor:new $i,groundColor:new $i};break;case"RectAreaLight":r={color:new $i,position:new st,halfWidth:new st,halfHeight:new st};break}return t[e.id]=r,r}}}function W_t(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let r;switch(e.type){case"DirectionalLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new bn};break;case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new bn};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new bn,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=r,r}}}let Z_t=0;function Y_t(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function X_t(t,e){const r=new q_t,n=W_t(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)i.probe.push(new st);const s=new st,o=new Ri,a=new Ri;function l(d,f){let m=0,v=0,b=0;for(let ge=0;ge<9;ge++)i.probe[ge].set(0,0,0);let M=0,O=0,I=0,A=0,j=0,H=0,W=0,re=0;d.sort(Y_t);const K=f!==!0?Math.PI:1;for(let ge=0,fe=d.length;ge0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Kn.LTC_FLOAT_1,i.rectAreaLTC2=Kn.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=Kn.LTC_HALF_1,i.rectAreaLTC2=Kn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=m,i.ambient[1]=v,i.ambient[2]=b;const pe=i.hash;(pe.directionalLength!==M||pe.pointLength!==O||pe.spotLength!==I||pe.rectAreaLength!==A||pe.hemiLength!==j||pe.numDirectionalShadows!==H||pe.numPointShadows!==W||pe.numSpotShadows!==re)&&(i.directional.length=M,i.spot.length=I,i.rectArea.length=A,i.point.length=O,i.hemi.length=j,i.directionalShadow.length=H,i.directionalShadowMap.length=H,i.pointShadow.length=W,i.pointShadowMap.length=W,i.spotShadow.length=re,i.spotShadowMap.length=re,i.directionalShadowMatrix.length=H,i.pointShadowMatrix.length=W,i.spotShadowMatrix.length=re,pe.directionalLength=M,pe.pointLength=O,pe.spotLength=I,pe.rectAreaLength=A,pe.hemiLength=j,pe.numDirectionalShadows=H,pe.numPointShadows=W,pe.numSpotShadows=re,i.version=Z_t++)}function u(d,f){let m=0,v=0,b=0,M=0,O=0;const I=f.matrixWorldInverse;for(let A=0,j=d.length;A=r.get(s).length?(a=new Moe(t,e),r.get(s).push(a)):a=r.get(s)[o],a}function i(){r=new WeakMap}return{get:n,dispose:i}}class rxe extends Fh{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=lgt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}rxe.prototype.isMeshDepthMaterial=!0;class nxe extends Fh{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new st,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}nxe.prototype.isMeshDistanceMaterial=!0;const K_t=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,Q_t=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function ixe(t,e,r){let n=new FO;const i=new bn,s=new bn,o=new Yo,a=new rxe({depthPacking:ugt}),l=new nxe,u={},d=r.maxTextureSize,f={0:Bu,1:Rw,2:sd},m=new od({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new bn},radius:{value:4}},vertexShader:K_t,fragmentShader:Q_t}),v=m.clone();v.defines.HORIZONTAL_PASS=1;const b=new Oo;b.setAttribute("position",new to(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const M=new ya(b,m),O=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=I9e,this.render=function(H,W,re){if(O.enabled===!1||O.autoUpdate===!1&&O.needsUpdate===!1||H.length===0)return;const K=t.getRenderTarget(),pe=t.getActiveCubeFace(),ge=t.getActiveMipmapLevel(),fe=t.state;fe.setBlending(y2),fe.buffers.color.setClear(1,1,1,1),fe.buffers.depth.setTest(!0),fe.setScissorTest(!1);for(let ee=0,be=H.length;eed||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/Pe.x),i.x=s.x*Pe.x,ve.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/Pe.y),i.y=s.y*Pe.y,ve.mapSize.y=s.y)),ve.map===null&&!ve.isPointLightShadow&&this.type===a6){const We={minFilter:Lh,magFilter:Lh,format:pd};ve.map=new Y1(i.x,i.y,We),ve.map.texture.name=le.name+".shadowMap",ve.mapPass=new Y1(i.x,i.y,We),ve.camera.updateProjectionMatrix()}if(ve.map===null){const We={minFilter:Uu,magFilter:Uu,format:pd};ve.map=new Y1(i.x,i.y,We),ve.map.texture.name=le.name+".shadowMap",ve.camera.updateProjectionMatrix()}t.setRenderTarget(ve.map),t.clear();const Fe=ve.getViewportCount();for(let We=0;We0){const le=ee.uuid,ve=re.uuid;let Pe=u[le];Pe===void 0&&(Pe={},u[le]=Pe);let Fe=Pe[ve];Fe===void 0&&(Fe=ee.clone(),Pe[ve]=Fe),ee=Fe}return ee.visible=re.visible,ee.wireframe=re.wireframe,fe===a6?ee.side=re.shadowSide!==null?re.shadowSide:re.side:ee.side=re.shadowSide!==null?re.shadowSide:f[re.side],ee.alphaMap=re.alphaMap,ee.alphaTest=re.alphaTest,ee.clipShadows=re.clipShadows,ee.clippingPlanes=re.clippingPlanes,ee.clipIntersection=re.clipIntersection,ee.displacementMap=re.displacementMap,ee.displacementScale=re.displacementScale,ee.displacementBias=re.displacementBias,ee.wireframeLinewidth=re.wireframeLinewidth,ee.linewidth=re.linewidth,K.isPointLight===!0&&ee.isMeshDistanceMaterial===!0&&(ee.referencePosition.setFromMatrixPosition(K.matrixWorld),ee.nearDistance=pe,ee.farDistance=ge),ee}function j(H,W,re,K,pe){if(H.visible===!1)return;if(H.layers.test(W.layers)&&(H.isMesh||H.isLine||H.isPoints)&&(H.castShadow||H.receiveShadow&&pe===a6)&&(!H.frustumCulled||n.intersectsObject(H))){H.modelViewMatrix.multiplyMatrices(re.matrixWorldInverse,H.matrixWorld);const ee=e.update(H),be=H.material;if(Array.isArray(be)){const le=ee.groups;for(let ve=0,Pe=le.length;ve=1):Pe.indexOf("OpenGL ES")!==-1&&(ve=parseFloat(/^OpenGL ES (\d)/.exec(Pe)[1]),le=ve>=2);let Fe=null,We={};const He=t.getParameter(3088),Lt=t.getParameter(2978),lt=new Yo().fromArray(He),pt=new Yo().fromArray(Lt);function rr(Ft,xt,vr){const Mr=new Uint8Array(4),ar=t.createTexture();t.bindTexture(Ft,ar),t.texParameteri(Ft,10241,9728),t.texParameteri(Ft,10240,9728);for(let ni=0;niXt||Xe.height>Xt)&&(xr=Xt/Math.max(Xe.width,Xe.height)),xr<1||Ze===!0)if(typeof HTMLImageElement<"u"&&Xe instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Xe instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Xe instanceof ImageBitmap){const Ur=Ze?D9e:Math.floor,In=Ur(xr*Xe.width),Rr=Ur(xr*Xe.height);v===void 0&&(v=M(In,Rr));const mn=it?M(In,Rr):v;return mn.width=In,mn.height=Rr,mn.getContext("2d").drawImage(Xe,0,0,In,Rr),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Xe.width+"x"+Xe.height+") to ("+In+"x"+Rr+")."),mn}else return"data"in Xe&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Xe.width+"x"+Xe.height+")."),Xe;return Xe}function I(Xe){return pq(Xe.width)&&pq(Xe.height)}function A(Xe){return a?!1:Xe.wrapS!==Mf||Xe.wrapT!==Mf||Xe.minFilter!==Uu&&Xe.minFilter!==Lh}function j(Xe,Ze){return Xe.generateMipmaps&&Ze&&Xe.minFilter!==Uu&&Xe.minFilter!==Lh}function H(Xe,Ze,it,Xt,xr=1){t.generateMipmap(Xe);const Ur=n.get(Ze);Ur.__maxMipLevel=Math.log2(Math.max(it,Xt,xr))}function W(Xe,Ze,it,Xt){if(a===!1)return Ze;if(Xe!==null){if(t[Xe]!==void 0)return t[Xe];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Xe+"'")}let xr=Ze;return Ze===6403&&(it===5126&&(xr=33326),it===5131&&(xr=33325),it===5121&&(xr=33321)),Ze===6407&&(it===5126&&(xr=34837),it===5131&&(xr=34843),it===5121&&(xr=32849)),Ze===6408&&(it===5126&&(xr=34836),it===5131&&(xr=34842),it===5121&&(xr=Xt===J5?35907:32856)),(xr===33325||xr===33326||xr===34842||xr===34836)&&e.get("EXT_color_buffer_float"),xr}function re(Xe){return Xe===Uu||Xe===$se||Xe===Ose?9728:9729}function K(Xe){const Ze=Xe.target;Ze.removeEventListener("dispose",K),ge(Ze),Ze.isVideoTexture&&m.delete(Ze),o.memory.textures--}function pe(Xe){const Ze=Xe.target;Ze.removeEventListener("dispose",pe),fe(Ze)}function ge(Xe){const Ze=n.get(Xe);Ze.__webglInit!==void 0&&(t.deleteTexture(Ze.__webglTexture),n.remove(Xe))}function fe(Xe){const Ze=Xe.texture,it=n.get(Xe),Xt=n.get(Ze);if(Xe){if(Xt.__webglTexture!==void 0&&(t.deleteTexture(Xt.__webglTexture),o.memory.textures--),Xe.depthTexture&&Xe.depthTexture.dispose(),Xe.isWebGLCubeRenderTarget)for(let xr=0;xr<6;xr++)t.deleteFramebuffer(it.__webglFramebuffer[xr]),it.__webglDepthbuffer&&t.deleteRenderbuffer(it.__webglDepthbuffer[xr]);else t.deleteFramebuffer(it.__webglFramebuffer),it.__webglDepthbuffer&&t.deleteRenderbuffer(it.__webglDepthbuffer),it.__webglMultisampledFramebuffer&&t.deleteFramebuffer(it.__webglMultisampledFramebuffer),it.__webglColorRenderbuffer&&t.deleteRenderbuffer(it.__webglColorRenderbuffer),it.__webglDepthRenderbuffer&&t.deleteRenderbuffer(it.__webglDepthRenderbuffer);if(Xe.isWebGLMultipleRenderTargets)for(let xr=0,Ur=Ze.length;xr=l&&console.warn("THREE.WebGLTextures: Trying to use "+Xe+" texture units while this GPU supports only "+l),ee+=1,Xe}function ve(Xe,Ze){const it=n.get(Xe);if(Xe.isVideoTexture&&we(Xe),Xe.version>0&&it.__version!==Xe.version){const Xt=Xe.image;if(Xt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Xt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{rr(it,Xe,Ze);return}}r.activeTexture(33984+Ze),r.bindTexture(3553,it.__webglTexture)}function Pe(Xe,Ze){const it=n.get(Xe);if(Xe.version>0&&it.__version!==Xe.version){rr(it,Xe,Ze);return}r.activeTexture(33984+Ze),r.bindTexture(35866,it.__webglTexture)}function Fe(Xe,Ze){const it=n.get(Xe);if(Xe.version>0&&it.__version!==Xe.version){rr(it,Xe,Ze);return}r.activeTexture(33984+Ze),r.bindTexture(32879,it.__webglTexture)}function We(Xe,Ze){const it=n.get(Xe);if(Xe.version>0&&it.__version!==Xe.version){Tt(it,Xe,Ze);return}r.activeTexture(33984+Ze),r.bindTexture(34067,it.__webglTexture)}const He={[dq]:10497,[Mf]:33071,[fq]:33648},Lt={[Uu]:9728,[$se]:9984,[Ose]:9986,[Lh]:9729,[cmt]:9985,[OO]:9987};function lt(Xe,Ze,it){if(it?(t.texParameteri(Xe,10242,He[Ze.wrapS]),t.texParameteri(Xe,10243,He[Ze.wrapT]),(Xe===32879||Xe===35866)&&t.texParameteri(Xe,32882,He[Ze.wrapR]),t.texParameteri(Xe,10240,Lt[Ze.magFilter]),t.texParameteri(Xe,10241,Lt[Ze.minFilter])):(t.texParameteri(Xe,10242,33071),t.texParameteri(Xe,10243,33071),(Xe===32879||Xe===35866)&&t.texParameteri(Xe,32882,33071),(Ze.wrapS!==Mf||Ze.wrapT!==Mf)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(Xe,10240,re(Ze.magFilter)),t.texParameteri(Xe,10241,re(Ze.minFilter)),Ze.minFilter!==Uu&&Ze.minFilter!==Lh&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const Xt=e.get("EXT_texture_filter_anisotropic");if(Ze.type===Fv&&e.has("OES_texture_float_linear")===!1||a===!1&&Ze.type===K4&&e.has("OES_texture_half_float_linear")===!1)return;(Ze.anisotropy>1||n.get(Ze).__currentAnisotropy)&&(t.texParameterf(Xe,Xt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ze.anisotropy,i.getMaxAnisotropy())),n.get(Ze).__currentAnisotropy=Ze.anisotropy)}}function pt(Xe,Ze){Xe.__webglInit===void 0&&(Xe.__webglInit=!0,Ze.addEventListener("dispose",K),Xe.__webglTexture=t.createTexture(),o.memory.textures++)}function rr(Xe,Ze,it){let Xt=3553;Ze.isDataTexture2DArray&&(Xt=35866),Ze.isDataTexture3D&&(Xt=32879),pt(Xe,Ze),r.activeTexture(33984+it),r.bindTexture(Xt,Xe.__webglTexture),t.pixelStorei(37440,Ze.flipY),t.pixelStorei(37441,Ze.premultiplyAlpha),t.pixelStorei(3317,Ze.unpackAlignment),t.pixelStorei(37443,0);const xr=A(Ze)&&I(Ze.image)===!1,Ur=O(Ze.image,xr,!1,d),In=I(Ur)||a,Rr=s.convert(Ze.format);let mn=s.convert(Ze.type),Kr=W(Ze.internalFormat,Rr,mn,Ze.encoding);lt(Xt,Ze,In);let Ft;const xt=Ze.mipmaps;if(Ze.isDepthTexture)Kr=6402,a?Ze.type===Fv?Kr=36012:Ze.type===tk?Kr=33190:Ze.type===Y6?Kr=35056:Kr=33189:Ze.type===Fv&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Ze.format===Q4&&Kr===6402&&Ze.type!==oP&&Ze.type!==tk&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Ze.type=oP,mn=s.convert(Ze.type)),Ze.format===nS&&Kr===6402&&(Kr=34041,Ze.type!==Y6&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Ze.type=Y6,mn=s.convert(Ze.type))),r.texImage2D(3553,0,Kr,Ur.width,Ur.height,0,Rr,mn,null);else if(Ze.isDataTexture)if(xt.length>0&&In){for(let vr=0,Mr=xt.length;vr0&&In){for(let vr=0,Mr=xt.length;vrv+b?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&m<=v-b&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=r.getPose(e.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}}class i3t extends K5{constructor(e,r){super();const n=this,i=e.state;let s=null,o=1,a=null,l="local-floor",u=null,d=null,f=null,m=null,v=null,b=!1,M=null,O=null,I=null,A=null,j=null,H=null;const W=[],re=new Map,K=new ld;K.layers.enable(1),K.viewport=new Yo;const pe=new ld;pe.layers.enable(2),pe.viewport=new Yo;const ge=[K,pe],fe=new sxe;fe.layers.enable(1),fe.layers.enable(2);let ee=null,be=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Tt){let Je=W[Tt];return Je===void 0&&(Je=new eB,W[Tt]=Je),Je.getTargetRaySpace()},this.getControllerGrip=function(Tt){let Je=W[Tt];return Je===void 0&&(Je=new eB,W[Tt]=Je),Je.getGripSpace()},this.getHand=function(Tt){let Je=W[Tt];return Je===void 0&&(Je=new eB,W[Tt]=Je),Je.getHandSpace()};function le(Tt){const Je=re.get(Tt.inputSource);Je&&Je.dispatchEvent({type:Tt.type,data:Tt.inputSource})}function ve(){re.forEach(function(Tt,Je){Tt.disconnect(Je)}),re.clear(),ee=null,be=null,i.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),f&&r.deleteFramebuffer(f),M&&r.deleteFramebuffer(M),O&&r.deleteRenderbuffer(O),I&&r.deleteRenderbuffer(I),f=null,M=null,O=null,I=null,v=null,m=null,d=null,s=null,rr.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Tt){o=Tt,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Tt){l=Tt,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return m!==null?m:v},this.getBinding=function(){return d},this.getFrame=function(){return A},this.getSession=function(){return s},this.setSession=async function(Tt){if(s=Tt,s!==null){s.addEventListener("select",le),s.addEventListener("selectstart",le),s.addEventListener("selectend",le),s.addEventListener("squeeze",le),s.addEventListener("squeezestart",le),s.addEventListener("squeezeend",le),s.addEventListener("end",ve),s.addEventListener("inputsourceschange",Pe);const Je=r.getContextAttributes();if(Je.xrCompatible!==!0&&await r.makeXRCompatible(),s.renderState.layers===void 0){const pr={antialias:Je.antialias,alpha:Je.alpha,depth:Je.depth,stencil:Je.stencil,framebufferScaleFactor:o};v=new XRWebGLLayer(s,r,pr),s.updateRenderState({baseLayer:v})}else if(r instanceof WebGLRenderingContext){const pr={antialias:!0,alpha:Je.alpha,depth:Je.depth,stencil:Je.stencil,framebufferScaleFactor:o};v=new XRWebGLLayer(s,r,pr),s.updateRenderState({layers:[v]})}else{b=Je.antialias;let pr=null;Je.depth&&(H=256,Je.stencil&&(H|=1024),j=Je.stencil?33306:36096,pr=Je.stencil?35056:33190);const Ut={colorFormat:Je.alpha?32856:32849,depthFormat:pr,scaleFactor:o};d=new XRWebGLBinding(s,r),m=d.createProjectionLayer(Ut),f=r.createFramebuffer(),s.updateRenderState({layers:[m]}),b&&(M=r.createFramebuffer(),O=r.createRenderbuffer(),r.bindRenderbuffer(36161,O),r.renderbufferStorageMultisample(36161,4,32856,m.textureWidth,m.textureHeight),i.bindFramebuffer(36160,M),r.framebufferRenderbuffer(36160,36064,36161,O),r.bindRenderbuffer(36161,null),pr!==null&&(I=r.createRenderbuffer(),r.bindRenderbuffer(36161,I),r.renderbufferStorageMultisample(36161,4,pr,m.textureWidth,m.textureHeight),r.framebufferRenderbuffer(36160,j,36161,I),r.bindRenderbuffer(36161,null)),i.bindFramebuffer(36160,null))}a=await s.requestReferenceSpace(l),rr.setContext(s),rr.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};function Pe(Tt){const Je=s.inputSources;for(let pr=0;pr0&&(I.alphaTest.value=A.alphaTest);const j=t.get(A).envMap;if(j){I.envMap.value=j,I.flipEnvMap.value=j.isCubeTexture&&j.isRenderTargetTexture===!1?-1:1,I.reflectivity.value=A.reflectivity,I.ior.value=A.ior,I.refractionRatio.value=A.refractionRatio;const re=t.get(j).__maxMipLevel;re!==void 0&&(I.maxMipLevel.value=re)}A.lightMap&&(I.lightMap.value=A.lightMap,I.lightMapIntensity.value=A.lightMapIntensity),A.aoMap&&(I.aoMap.value=A.aoMap,I.aoMapIntensity.value=A.aoMapIntensity);let H;A.map?H=A.map:A.specularMap?H=A.specularMap:A.displacementMap?H=A.displacementMap:A.normalMap?H=A.normalMap:A.bumpMap?H=A.bumpMap:A.roughnessMap?H=A.roughnessMap:A.metalnessMap?H=A.metalnessMap:A.alphaMap?H=A.alphaMap:A.emissiveMap?H=A.emissiveMap:A.clearcoatMap?H=A.clearcoatMap:A.clearcoatNormalMap?H=A.clearcoatNormalMap:A.clearcoatRoughnessMap?H=A.clearcoatRoughnessMap:A.specularIntensityMap?H=A.specularIntensityMap:A.specularColorMap?H=A.specularColorMap:A.transmissionMap?H=A.transmissionMap:A.thicknessMap?H=A.thicknessMap:A.sheenColorMap?H=A.sheenColorMap:A.sheenRoughnessMap&&(H=A.sheenRoughnessMap),H!==void 0&&(H.isWebGLRenderTarget&&(H=H.texture),H.matrixAutoUpdate===!0&&H.updateMatrix(),I.uvTransform.value.copy(H.matrix));let W;A.aoMap?W=A.aoMap:A.lightMap&&(W=A.lightMap),W!==void 0&&(W.isWebGLRenderTarget&&(W=W.texture),W.matrixAutoUpdate===!0&&W.updateMatrix(),I.uv2Transform.value.copy(W.matrix))}function i(I,A){I.diffuse.value.copy(A.color),I.opacity.value=A.opacity}function s(I,A){I.dashSize.value=A.dashSize,I.totalSize.value=A.dashSize+A.gapSize,I.scale.value=A.scale}function o(I,A,j,H){I.diffuse.value.copy(A.color),I.opacity.value=A.opacity,I.size.value=A.size*j,I.scale.value=H*.5,A.map&&(I.map.value=A.map),A.alphaMap&&(I.alphaMap.value=A.alphaMap),A.alphaTest>0&&(I.alphaTest.value=A.alphaTest);let W;A.map?W=A.map:A.alphaMap&&(W=A.alphaMap),W!==void 0&&(W.matrixAutoUpdate===!0&&W.updateMatrix(),I.uvTransform.value.copy(W.matrix))}function a(I,A){I.diffuse.value.copy(A.color),I.opacity.value=A.opacity,I.rotation.value=A.rotation,A.map&&(I.map.value=A.map),A.alphaMap&&(I.alphaMap.value=A.alphaMap),A.alphaTest>0&&(I.alphaTest.value=A.alphaTest);let j;A.map?j=A.map:A.alphaMap&&(j=A.alphaMap),j!==void 0&&(j.matrixAutoUpdate===!0&&j.updateMatrix(),I.uvTransform.value.copy(j.matrix))}function l(I,A){A.emissiveMap&&(I.emissiveMap.value=A.emissiveMap)}function u(I,A){I.specular.value.copy(A.specular),I.shininess.value=Math.max(A.shininess,1e-4),A.emissiveMap&&(I.emissiveMap.value=A.emissiveMap),A.bumpMap&&(I.bumpMap.value=A.bumpMap,I.bumpScale.value=A.bumpScale,A.side===Bu&&(I.bumpScale.value*=-1)),A.normalMap&&(I.normalMap.value=A.normalMap,I.normalScale.value.copy(A.normalScale),A.side===Bu&&I.normalScale.value.negate()),A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias)}function d(I,A){A.gradientMap&&(I.gradientMap.value=A.gradientMap),A.emissiveMap&&(I.emissiveMap.value=A.emissiveMap),A.bumpMap&&(I.bumpMap.value=A.bumpMap,I.bumpScale.value=A.bumpScale,A.side===Bu&&(I.bumpScale.value*=-1)),A.normalMap&&(I.normalMap.value=A.normalMap,I.normalScale.value.copy(A.normalScale),A.side===Bu&&I.normalScale.value.negate()),A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias)}function f(I,A){I.roughness.value=A.roughness,I.metalness.value=A.metalness,A.roughnessMap&&(I.roughnessMap.value=A.roughnessMap),A.metalnessMap&&(I.metalnessMap.value=A.metalnessMap),A.emissiveMap&&(I.emissiveMap.value=A.emissiveMap),A.bumpMap&&(I.bumpMap.value=A.bumpMap,I.bumpScale.value=A.bumpScale,A.side===Bu&&(I.bumpScale.value*=-1)),A.normalMap&&(I.normalMap.value=A.normalMap,I.normalScale.value.copy(A.normalScale),A.side===Bu&&I.normalScale.value.negate()),A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias),t.get(A).envMap&&(I.envMapIntensity.value=A.envMapIntensity)}function m(I,A,j){f(I,A),I.ior.value=A.ior,A.sheen>0&&(I.sheenColor.value.copy(A.sheenColor).multiplyScalar(A.sheen),I.sheenRoughness.value=A.sheenRoughness,A.sheenColorMap&&(I.sheenColorMap.value=A.sheenColorMap),A.sheenRoughnessMap&&(I.sheenRoughnessMap.value=A.sheenRoughnessMap)),A.clearcoat>0&&(I.clearcoat.value=A.clearcoat,I.clearcoatRoughness.value=A.clearcoatRoughness,A.clearcoatMap&&(I.clearcoatMap.value=A.clearcoatMap),A.clearcoatRoughnessMap&&(I.clearcoatRoughnessMap.value=A.clearcoatRoughnessMap),A.clearcoatNormalMap&&(I.clearcoatNormalScale.value.copy(A.clearcoatNormalScale),I.clearcoatNormalMap.value=A.clearcoatNormalMap,A.side===Bu&&I.clearcoatNormalScale.value.negate())),A.transmission>0&&(I.transmission.value=A.transmission,I.transmissionSamplerMap.value=j.texture,I.transmissionSamplerSize.value.set(j.width,j.height),A.transmissionMap&&(I.transmissionMap.value=A.transmissionMap),I.thickness.value=A.thickness,A.thicknessMap&&(I.thicknessMap.value=A.thicknessMap),I.attenuationDistance.value=A.attenuationDistance,I.attenuationColor.value.copy(A.attenuationColor)),I.specularIntensity.value=A.specularIntensity,I.specularColor.value.copy(A.specularColor),A.specularIntensityMap&&(I.specularIntensityMap.value=A.specularIntensityMap),A.specularColorMap&&(I.specularColorMap.value=A.specularColorMap)}function v(I,A){A.matcap&&(I.matcap.value=A.matcap),A.bumpMap&&(I.bumpMap.value=A.bumpMap,I.bumpScale.value=A.bumpScale,A.side===Bu&&(I.bumpScale.value*=-1)),A.normalMap&&(I.normalMap.value=A.normalMap,I.normalScale.value.copy(A.normalScale),A.side===Bu&&I.normalScale.value.negate()),A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias)}function b(I,A){A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias)}function M(I,A){A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias),I.referencePosition.value.copy(A.referencePosition),I.nearDistance.value=A.nearDistance,I.farDistance.value=A.farDistance}function O(I,A){A.bumpMap&&(I.bumpMap.value=A.bumpMap,I.bumpScale.value=A.bumpScale,A.side===Bu&&(I.bumpScale.value*=-1)),A.normalMap&&(I.normalMap.value=A.normalMap,I.normalScale.value.copy(A.normalScale),A.side===Bu&&I.normalScale.value.negate()),A.displacementMap&&(I.displacementMap.value=A.displacementMap,I.displacementScale.value=A.displacementScale,I.displacementBias.value=A.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:r}}function o3t(){const t=NO("canvas");return t.style.display="block",t}function da(t={}){const e=t.canvas!==void 0?t.canvas:o3t(),r=t.context!==void 0?t.context:null,n=t.alpha!==void 0?t.alpha:!1,i=t.depth!==void 0?t.depth:!0,s=t.stencil!==void 0?t.stencil:!0,o=t.antialias!==void 0?t.antialias:!1,a=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,l=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,u=t.powerPreference!==void 0?t.powerPreference:"default",d=t.failIfMajorPerformanceCaveat!==void 0?t.failIfMajorPerformanceCaveat:!1;let f=null,m=null;const v=[],b=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=$h,this.physicallyCorrectLights=!1,this.toneMapping=u5,this.toneMappingExposure=1;const M=this;let O=!1,I=0,A=0,j=null,H=-1,W=null;const re=new Yo,K=new Yo;let pe=null,ge=e.width,fe=e.height,ee=1,be=null,le=null;const ve=new Yo(0,0,ge,fe),Pe=new Yo(0,0,ge,fe);let Fe=!1;const We=[],He=new FO;let Lt=!1,lt=!1,pt=null;const rr=new Ri,Tt=new st,Je={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function pr(){return j===null?ee:1}let Ut=r;function tr(me,Ye){for(let $t=0;$t0?m=b[b.length-1]:m=null,v.pop(),v.length>0?f=v[v.length-1]:f=null};function nt(me,Ye,$t,Nt){if(me.visible===!1)return;if(me.layers.test(Ye.layers)){if(me.isGroup)$t=me.renderOrder;else if(me.isLOD)me.autoUpdate===!0&&me.update(Ye);else if(me.isLight)m.pushLight(me),me.castShadow&&m.pushShadow(me);else if(me.isSprite){if(!me.frustumCulled||He.intersectsSprite(me)){Nt&&Tt.setFromMatrixPosition(me.matrixWorld).applyMatrix4(rr);const Br=Ze.update(me),Lr=me.material;Lr.visible&&f.push(me,Br,Lr,$t,Tt.z,null)}}else if((me.isMesh||me.isLine||me.isPoints)&&(me.isSkinnedMesh&&me.skeleton.frame!==yt.render.frame&&(me.skeleton.update(),me.skeleton.frame=yt.render.frame),!me.frustumCulled||He.intersectsObject(me))){Nt&&Tt.setFromMatrixPosition(me.matrixWorld).applyMatrix4(rr);const Br=Ze.update(me),Lr=me.material;if(Array.isArray(Lr)){const hn=Br.groups;for(let mi=0,sn=hn.length;mi0&&Ie(Jt,Ye,$t),Nt&&et.viewport(re.copy(Nt)),Jt.length>0&&Be(Jt,Ye,$t),cr.length>0&&Be(cr,Ye,$t),Br.length>0&&Be(Br,Ye,$t)}function Ie(me,Ye,$t){if(pt===null){const Br=o===!0&&je.isWebGL2===!0?z9e:Y1;pt=new Br(1024,1024,{generateMipmaps:!0,type:vr.convert(K4)!==null?K4:N2,minFilter:OO,magFilter:Uu,wrapS:Mf,wrapT:Mf})}const Nt=M.getRenderTarget();M.setRenderTarget(pt),M.clear();const Jt=M.toneMapping;M.toneMapping=u5,Be(me,Ye,$t),M.toneMapping=Jt,ft.updateMultisampleRenderTarget(pt),ft.updateRenderTargetMipmap(pt),M.setRenderTarget(Nt)}function Be(me,Ye,$t){const Nt=Ye.isScene===!0?Ye.overrideMaterial:null;for(let Jt=0,cr=me.length;Jt=0&&Ye<=me.width-Nt&&$t>=0&&$t<=me.height-Jt&&Ut.readPixels(Ye,$t,Nt,Jt,vr.convert(mi),vr.convert(sn),cr):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const hn=j!==null?we.get(j).__webglFramebuffer:null;et.bindFramebuffer(36160,hn)}}},this.copyFramebufferToTexture=function(me,Ye,$t=0){const Nt=Math.pow(2,-$t),Jt=Math.floor(Ye.image.width*Nt),cr=Math.floor(Ye.image.height*Nt);let Br=vr.convert(Ye.format);je.isWebGL2&&(Br===6407&&(Br=32849),Br===6408&&(Br=32856)),ft.setTexture2D(Ye,0),Ut.copyTexImage2D(3553,$t,Br,me.x,me.y,Jt,cr,0),et.unbindTexture()},this.copyTextureToTexture=function(me,Ye,$t,Nt=0){const Jt=Ye.image.width,cr=Ye.image.height,Br=vr.convert($t.format),Lr=vr.convert($t.type);ft.setTexture2D($t,0),Ut.pixelStorei(37440,$t.flipY),Ut.pixelStorei(37441,$t.premultiplyAlpha),Ut.pixelStorei(3317,$t.unpackAlignment),Ye.isDataTexture?Ut.texSubImage2D(3553,Nt,me.x,me.y,Jt,cr,Br,Lr,Ye.image.data):Ye.isCompressedTexture?Ut.compressedTexSubImage2D(3553,Nt,me.x,me.y,Ye.mipmaps[0].width,Ye.mipmaps[0].height,Br,Ye.mipmaps[0].data):Ut.texSubImage2D(3553,Nt,me.x,me.y,Br,Lr,Ye.image),Nt===0&&$t.generateMipmaps&&Ut.generateMipmap(3553),et.unbindTexture()},this.copyTextureToTexture3D=function(me,Ye,$t,Nt,Jt=0){if(M.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const cr=me.max.x-me.min.x+1,Br=me.max.y-me.min.y+1,Lr=me.max.z-me.min.z+1,hn=vr.convert(Nt.format),mi=vr.convert(Nt.type);let sn;if(Nt.isDataTexture3D)ft.setTexture3D(Nt,0),sn=32879;else if(Nt.isDataTexture2DArray)ft.setTexture2DArray(Nt,0),sn=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Ut.pixelStorei(37440,Nt.flipY),Ut.pixelStorei(37441,Nt.premultiplyAlpha),Ut.pixelStorei(3317,Nt.unpackAlignment);const cn=Ut.getParameter(3314),si=Ut.getParameter(32878),gn=Ut.getParameter(3316),_i=Ut.getParameter(3315),Xi=Ut.getParameter(32877),Vi=$t.isCompressedTexture?$t.mipmaps[0]:$t.image;Ut.pixelStorei(3314,Vi.width),Ut.pixelStorei(32878,Vi.height),Ut.pixelStorei(3316,me.min.x),Ut.pixelStorei(3315,me.min.y),Ut.pixelStorei(32877,me.min.z),$t.isDataTexture||$t.isDataTexture3D?Ut.texSubImage3D(sn,Jt,Ye.x,Ye.y,Ye.z,cr,Br,Lr,hn,mi,Vi.data):$t.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Ut.compressedTexSubImage3D(sn,Jt,Ye.x,Ye.y,Ye.z,cr,Br,Lr,hn,Vi.data)):Ut.texSubImage3D(sn,Jt,Ye.x,Ye.y,Ye.z,cr,Br,Lr,hn,mi,Vi),Ut.pixelStorei(3314,cn),Ut.pixelStorei(32878,si),Ut.pixelStorei(3316,gn),Ut.pixelStorei(3315,_i),Ut.pixelStorei(32877,Xi),Jt===0&&Nt.generateMipmaps&&Ut.generateMipmap(sn),et.unbindTexture()},this.initTexture=function(me){ft.setTexture2D(me,0),et.unbindTexture()},this.resetState=function(){I=0,A=0,j=null,et.reset(),Mr.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}da.prototype.isWebGLRenderer=!0;class a3t extends da{}a3t.prototype.isWebGL1Renderer=!0;class Gg extends xo{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,r){return super.copy(e,r),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const r=super.toJSON(e);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),r}}Gg.prototype.isScene=!0;class ME{constructor(e,r){this.array=e,this.stride=r,this.count=e!==void 0?e.length/r:0,this.usage=iS,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Z1()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,r,n){e*=this.stride,n*=r.stride;for(let i=0,s=this.stride;ie.far||r.push({distance:l,point:ib.clone(),uv:Hu.getUV(ib,BI,ob,jI,Toe,tB,Ioe,new bn),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}axe.prototype.isSprite=!0;function VI(t,e,r,n,i,s){mx.subVectors(t,r).addScalar(.5).multiply(n),i!==void 0?(sb.x=s*mx.x-i*mx.y,sb.y=i*mx.x+s*mx.y):sb.copy(mx),t.copy(e),t.x+=sb.x,t.y+=sb.y,t.applyMatrix4(oxe)}const Roe=new st,Loe=new Yo,koe=new Yo,l3t=new st,Aoe=new Ri;class lxe extends ya{constructor(e,r){super(e,r),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Ri,this.bindMatrixInverse=new Ri}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,r){this.skeleton=e,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Yo,r=this.geometry.attributes.skinWeight;for(let n=0,i=r.count;nl)continue;m.applyMatrix4(this.matrixWorld);const pe=e.ray.origin.distanceTo(m);pee.far||r.push({distance:pe,point:f.clone().applyMatrix4(this.matrixWorld),index:j,face:null,faceIndex:null,object:this})}}else{const I=Math.max(0,o.start),A=Math.min(O.count,o.start+o.count);for(let j=I,H=A-1;jl)continue;m.applyMatrix4(this.matrixWorld);const re=e.ray.origin.distanceTo(m);ree.far||r.push({distance:re,point:f.clone().applyMatrix4(this.matrixWorld),index:j,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const r=e.morphAttributes,n=Object.keys(r);if(n.length>0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}t9.prototype.isLine=!0;const Foe=new st,zoe=new st;class VO extends t9{constructor(e,r){super(e,r),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(e.index===null){const r=e.attributes.position,n=[];for(let i=0,s=r.count;i0){const i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}cxe.prototype.isPoints=!0;function joe(t,e,r,n,i,s,o){const a=yq.distanceSqToPoint(t);if(ai.far)return;s.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class f3t extends Tu{constructor(e,r,n,i,s,o,a,l,u){super(e,r,n,i,s,o,a,l,u),this.format=a!==void 0?a:c5,this.minFilter=o!==void 0?o:Lh,this.magFilter=s!==void 0?s:Lh,this.generateMipmaps=!1;const d=this;function f(){d.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}f3t.prototype.isVideoTexture=!0;class p3t extends Tu{constructor(e,r,n,i,s,o,a,l,u,d,f,m){super(null,o,a,l,u,d,i,s,f,m),this.image={width:r,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}p3t.prototype.isCompressedTexture=!0;class m3t extends Tu{constructor(e,r,n,i,s,o,a,l,u){super(e,r,n,i,s,o,a,l,u),this.needsUpdate=!0}}m3t.prototype.isCanvasTexture=!0;class g3t extends Tu{constructor(e,r,n,i,s,o,a,l,u,d){if(d=d!==void 0?d:Q4,d!==Q4&&d!==nS)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===Q4&&(n=oP),n===void 0&&d===nS&&(n=Y6),super(null,i,s,o,a,l,d,n,u),this.image={width:e,height:r},this.magFilter=a!==void 0?a:Uu,this.minFilter=l!==void 0?l:Uu,this.flipY=!1,this.generateMipmaps=!1}}g3t.prototype.isDepthTexture=!0;class Bp{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,r){const n=this.getUtoTmapping(e);return this.getPoint(n,r)}getPoints(e=5){const r=[];for(let n=0;n<=e;n++)r.push(this.getPoint(n/e));return r}getSpacedPoints(e=5){const r=[];for(let n=0;n<=e;n++)r.push(this.getPointAt(n/e));return r}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const r=[];let n,i=this.getPoint(0),s=0;r.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),s+=n.distanceTo(i),r.push(s),i=n;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,r){const n=this.getLengths();let i=0;const s=n.length;let o;r?o=r:o=e*n[s-1];let a=0,l=s-1,u;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),u=n[i]-o,u<0)a=i+1;else if(u>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(s-1);const d=n[i],m=n[i+1]-d,v=(o-d)/m;return(i+v)/(s-1)}getTangent(e,r){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=r||(o.isVector2?new bn:new st);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,r){const n=this.getUtoTmapping(e);return this.getTangent(n,r)}computeFrenetFrames(e,r){const n=new st,i=[],s=[],o=[],a=new st,l=new Ri;for(let v=0;v<=e;v++){const b=v/e;i[v]=this.getTangentAt(b,new st)}s[0]=new st,o[0]=new st;let u=Number.MAX_VALUE;const d=Math.abs(i[0].x),f=Math.abs(i[0].y),m=Math.abs(i[0].z);d<=u&&(u=d,n.set(1,0,0)),f<=u&&(u=f,n.set(0,1,0)),m<=u&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(i[v-1],i[v]),a.length()>Number.EPSILON){a.normalize();const b=Math.acos(zd(i[v-1].dot(i[v]),-1,1));s[v].applyMatrix4(l.makeRotationAxis(a,b))}o[v].crossVectors(i[v],s[v])}if(r===!0){let v=Math.acos(zd(s[0].dot(s[e]),-1,1));v/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let b=1;b<=e;b++)s[b].applyMatrix4(l.makeRotationAxis(i[b],v*b)),o[b].crossVectors(i[b],s[b])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class UO extends Bp{constructor(e=0,r=0,n=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=r,this.xRadius=n,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,r){const n=r||new bn,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let u,d;this.closed||a>0?u=i[(a-1)%s]:(WI.subVectors(i[0],i[1]).add(i[0]),u=WI);const f=i[a%s],m=i[(a+1)%s];if(this.closed||a+2i.length-2?i.length-1:o+1],f=i[o>i.length-3?i.length-1:o+2];return n.set(Voe(a,l.x,u.x,d.x,f.x),Voe(a,l.y,u.y,d.y,f.y)),n}copy(e){super.copy(e),this.points=[];for(let r=0,n=e.points.length;r=n){const o=i[s]-n,a=this.curves[s],l=a.getLength(),u=l===0?0:1-o/l;return a.getPointAt(u,r)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let r=0;for(let n=0,i=this.curves.length;n1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(e){super.copy(e),this.curves=[];for(let r=0,n=e.curves.length;r0){const f=u.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(u);const d=u.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class TE extends vq{constructor(e){super(e),this.uuid=Z1(),this.type="Shape",this.holes=[]}getPointsHoles(e){const r=[];for(let n=0,i=this.holes.length;n80*r){a=u=t[0],l=d=t[1];for(let b=r;bu&&(u=f),m>d&&(d=m);v=Math.max(u-a,d-l),v=v!==0?1/v:0}return aS(s,o,r,a,l,v),o}};function mxe(t,e,r,n,i){let s,o;if(i===V3t(t,e,r,n)>0)for(s=e;s=e;s-=n)o=Uoe(s,t[s],t[s+1],o);return o&&GO(o,o.next)&&(uS(o),o=o.next),o}function F2(t,e){if(!t)return t;e||(e=t);let r=t,n;do if(n=!1,!r.steiner&&(GO(r,r.next)||Il(r.prev,r,r.next)===0)){if(uS(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function aS(t,e,r,n,i,s,o){if(!t)return;!o&&s&&N3t(t,n,i,s);let a=t,l,u;for(;t.prev!==t.next;){if(l=t.prev,u=t.next,s?I3t(t,n,i,s):T3t(t)){e.push(l.i/r),e.push(t.i/r),e.push(u.i/r),uS(t),t=u.next,a=u.next;continue}if(t=u,t===a){o?o===1?(t=R3t(F2(t),e,r),aS(t,e,r,n,i,s,2)):o===2&&L3t(t,e,r,n,i,s):aS(F2(t),e,r,n,i,s,1);break}}}function T3t(t){const e=t.prev,r=t,n=t.next;if(Il(e,r,n)>=0)return!1;let i=t.next.next;for(;i!==t.prev;){if(b4(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Il(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function I3t(t,e,r,n){const i=t.prev,s=t,o=t.next;if(Il(i,s,o)>=0)return!1;const a=i.xs.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,d=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,f=_q(a,l,e,r,n),m=_q(u,d,e,r,n);let v=t.prevZ,b=t.nextZ;for(;v&&v.z>=f&&b&&b.z<=m;){if(v!==t.prev&&v!==t.next&&b4(i.x,i.y,s.x,s.y,o.x,o.y,v.x,v.y)&&Il(v.prev,v,v.next)>=0||(v=v.prevZ,b!==t.prev&&b!==t.next&&b4(i.x,i.y,s.x,s.y,o.x,o.y,b.x,b.y)&&Il(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;v&&v.z>=f;){if(v!==t.prev&&v!==t.next&&b4(i.x,i.y,s.x,s.y,o.x,o.y,v.x,v.y)&&Il(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=m;){if(b!==t.prev&&b!==t.next&&b4(i.x,i.y,s.x,s.y,o.x,o.y,b.x,b.y)&&Il(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function R3t(t,e,r){let n=t;do{const i=n.prev,s=n.next.next;!GO(i,s)&&gxe(i,n,n.next,s)&&lS(i,s)&&lS(s,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(s.i/r),uS(n),uS(n.next),n=t=s),n=n.next}while(n!==t);return F2(n)}function L3t(t,e,r,n,i,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&z3t(o,a)){let l=yxe(o,a);o=F2(o,o.next),l=F2(l,l.next),aS(o,e,r,n,i,s),aS(l,e,r,n,i,s);return}a=a.next}o=o.next}while(o!==t)}function k3t(t,e,r,n){const i=[];let s,o,a,l,u;for(s=0,o=e.length;s=r.next.y&&r.next.y!==r.y){const m=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(m<=n&&m>s){if(s=m,m===n){if(i===r.y)return r;if(i===r.next.y)return r.next}o=r.x=r.x&&r.x>=l&&n!==r.x&&b4(io.x||r.x===o.x&&O3t(o,r)))&&(o=r,d=f)),r=r.next;while(r!==a);return o}function O3t(t,e){return Il(t.prev,t,e.prev)<0&&Il(e.next,t,t.next)<0}function N3t(t,e,r,n){let i=t;do i.z===null&&(i.z=_q(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,D3t(i)}function D3t(t){let e,r,n,i,s,o,a,l,u=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,a=0,e=0;e0||l>0&&n;)a!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,u*=2}while(o>1);return t}function _q(t,e,r,n,i){return t=32767*(t-r)*i,e=32767*(e-n)*i,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function F3t(t){let e=t,r=t;do(e.x=0&&(t-o)*(n-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(i-o)*(n-a)>=0}function z3t(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!B3t(t,e)&&(lS(t,e)&&lS(e,t)&&j3t(t,e)&&(Il(t.prev,t,e.prev)||Il(t,e.prev,e))||GO(t,e)&&Il(t.prev,t,t.next)>0&&Il(e.prev,e,e.next)>0)}function Il(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function GO(t,e){return t.x===e.x&&t.y===e.y}function gxe(t,e,r,n){const i=YI(Il(t,e,r)),s=YI(Il(t,e,n)),o=YI(Il(r,n,t)),a=YI(Il(r,n,e));return!!(i!==s&&o!==a||i===0&&ZI(t,r,e)||s===0&&ZI(t,n,e)||o===0&&ZI(r,t,n)||a===0&&ZI(r,e,n))}function ZI(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function YI(t){return t>0?1:t<0?-1:0}function B3t(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&gxe(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function lS(t,e){return Il(t.prev,t,t.next)<0?Il(t,e,t.next)>=0&&Il(t,t.prev,e)>=0:Il(t,e,t.prev)<0||Il(t,t.next,e)<0}function j3t(t,e){let r=t,n=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function yxe(t,e){const r=new xq(t.i,t.x,t.y),n=new xq(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function Uoe(t,e,r,n){const i=new xq(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function uS(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function xq(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function V3t(t,e,r,n){let i=0;for(let s=e,o=r-n;s2&&t[e-1].equals(t[0])&&t.pop()}function Goe(t,e){for(let r=0;rNumber.EPSILON){const Rr=Math.sqrt(Ur),mn=Math.sqrt(Xt*Xt+xr*xr),Kr=ft.x-it/Rr,Ft=ft.y+Ze/Rr,xt=qt.x-xr/mn,vr=qt.y+Xt/mn,Mr=((xt-Kr)*xr-(vr-Ft)*Xt)/(Ze*xr-it*Xt);_r=Kr+Ze*Mr-we.x,rt=Ft+it*Mr-we.y;const ar=_r*_r+rt*rt;if(ar<=2)return new bn(_r,rt);Xe=Math.sqrt(ar/2)}else{let Rr=!1;Ze>Number.EPSILON?Xt>Number.EPSILON&&(Rr=!0):Ze<-Number.EPSILON?Xt<-Number.EPSILON&&(Rr=!0):Math.sign(it)===Math.sign(xr)&&(Rr=!0),Rr?(_r=-it,rt=Ze,Xe=Math.sqrt(Ur)):(_r=Ze,rt=it,Xe=Math.sqrt(Ur/2))}return new bn(_r/Xe,rt/Xe)}const Lt=[];for(let we=0,ft=ve.length,qt=ft-1,_r=we+1;we=0;we--){const ft=we/O,qt=v*Math.cos(ft*Math.PI/2),_r=b*Math.sin(ft*Math.PI/2)+M;for(let rt=0,Xe=ve.length;rt=0;){const _r=qt;let rt=qt-1;rt<0&&(rt=we.length-1);for(let Xe=0,Ze=d+O*2;Xe0)&&v.push(j,H,re),(I!==n-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}W3t.prototype.isMeshPhysicalMaterial=!0;class Z3t extends Fh{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new $i(16777215),this.specular=new $i(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=y7,this.normalScale=new bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=PO,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}Z3t.prototype.isMeshPhongMaterial=!0;class Y3t extends Fh{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new $i(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=y7,this.normalScale=new bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}Y3t.prototype.isMeshToonMaterial=!0;class X3t extends Fh{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=y7,this.normalScale=new bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}X3t.prototype.isMeshNormalMaterial=!0;class J3t extends Fh{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new $i(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new $i(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=PO,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}J3t.prototype.isMeshLambertMaterial=!0;class K3t extends Fh{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new $i(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=y7,this.normalScale=new bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}K3t.prototype.isMeshMatcapMaterial=!0;class Q3t extends cy{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Q3t.prototype.isLineDashedMaterial=!0;const ml={arraySlice:function(t,e,r){return ml.isTypedArray(t)?new t.constructor(t.subarray(e,r!==void 0?r:t.length)):t.slice(e,r)},convertArray:function(t,e,r){return!t||!r&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(i,s){return t[i]-t[s]}const r=t.length,n=new Array(r);for(let i=0;i!==r;++i)n[i]=i;return n.sort(e),n},sortedArray:function(t,e,r){const n=t.length,i=new t.constructor(n);for(let s=0,o=0;o!==n;++s){const a=r[s]*e;for(let l=0;l!==e;++l)i[o++]=t[a+l]}return i},flattenJSON:function(t,e,r,n){let i=1,s=t[0];for(;s!==void 0&&s[n]===void 0;)s=t[i++];if(s===void 0)return;let o=s[n];if(o!==void 0)if(Array.isArray(o))do o=s[n],o!==void 0&&(e.push(s.time),r.push.apply(r,o)),s=t[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[n],o!==void 0&&(e.push(s.time),o.toArray(r,r.length)),s=t[i++];while(s!==void 0);else do o=s[n],o!==void 0&&(e.push(s.time),r.push(o)),s=t[i++];while(s!==void 0)},subclip:function(t,e,r,n,i=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l=n)){f.push(u.times[v]);for(let M=0;Ms.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[b]){const I=b*f+d,A=I+f-d;M=ml.arraySlice(a.values,I,A)}else{const I=a.createInterpolant(),A=d,j=f-d;I.evaluate(s),M=ml.arraySlice(I.resultBuffer,A,j)}l==="quaternion"&&new jc().fromArray(M).normalize().conjugate().toArray(M);const O=u.times.length;for(let I=0;I=s)){const a=r[1];e=s)break t}o=n,n=0;break r}break e}for(;n>>1;er;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=ml.arraySlice(n,s,o),this.values=ml.arraySlice(this.values,s*a,o*a)}return this}validate(){let e=!0;const r=this.getValueSize();r-Math.floor(r)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&ml.isTypedArray(i))for(let a=0,l=i.length;a!==l;++a){const u=i[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=ml.arraySlice(this.times),r=ml.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===Mz,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*n,l=o*n,u=0;u!==n;++u)r[l+u]=r[a+u];++o}return o!==e.length?(this.times=ml.arraySlice(e,0,o),this.values=ml.arraySlice(r,0,o*n)):(this.times=e,this.values=r),this}clone(){const e=ml.arraySlice(this.times,0),r=ml.arraySlice(this.values,0),n=this.constructor,i=new n(this.name,e,r);return i.createInterpolant=this.createInterpolant,i}}Em.prototype.TimeBufferType=Float32Array;Em.prototype.ValueBufferType=Float32Array;Em.prototype.DefaultInterpolation=lP;class b7 extends Em{}b7.prototype.ValueTypeName="bool";b7.prototype.ValueBufferType=Array;b7.prototype.DefaultInterpolation=aP;b7.prototype.InterpolantFactoryMethodLinear=void 0;b7.prototype.InterpolantFactoryMethodSmooth=void 0;class xxe extends Em{}xxe.prototype.ValueTypeName="color";class hP extends Em{}hP.prototype.ValueTypeName="number";class r5t extends z2{constructor(e,r,n,i){super(e,r,n,i)}interpolate_(e,r,n,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-r)/(i-r);let u=e*a;for(let d=u+a;u!==d;u+=4)jc.slerpFlat(s,0,o,u-a,o,u,l);return s}}class IE extends Em{InterpolantFactoryMethodLinear(e){return new r5t(this.times,this.values,this.getValueSize(),e)}}IE.prototype.ValueTypeName="quaternion";IE.prototype.DefaultInterpolation=lP;IE.prototype.InterpolantFactoryMethodSmooth=void 0;class C7 extends Em{}C7.prototype.ValueTypeName="string";C7.prototype.ValueBufferType=Array;C7.prototype.DefaultInterpolation=aP;C7.prototype.InterpolantFactoryMethodLinear=void 0;C7.prototype.InterpolantFactoryMethodSmooth=void 0;class dP extends Em{}dP.prototype.ValueTypeName="vector";class qoe{constructor(e,r=-1,n,i=jJ){this.name=e,this.tracks=n,this.duration=r,this.blendMode=i,this.uuid=Z1(),this.duration<0&&this.resetDuration()}static parse(e){const r=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)r.push(i5t(n[o]).scale(i));const s=new this(e.name,e.duration,r,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const r=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:r,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=n.length;s!==o;++s)r.push(Em.toJSON(n[s]));return i}static CreateFromMorphTargetSequence(e,r,n,i){const s=r.length,o=[];for(let a=0;a1){const f=d[1];let m=i[f];m||(i[f]=m=[]),m.push(u)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],r,n));return o}static parseAnimation(e,r){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(f,m,v,b,M){if(v.length!==0){const O=[],I=[];ml.flattenJSON(v,O,I,b),O.length!==0&&M.push(new f(m,O,I))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let f=0;f{r&&r(s),this.manager.itemEnd(e)},0),s;if(sg[e]!==void 0){sg[e].push({onLoad:r,onProgress:n,onError:i});return}sg[e]=[],sg[e].push({onLoad:r,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(o).then(a=>{if(a.status===200||a.status===0){a.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");const l=sg[e],u=a.body.getReader(),d=a.headers.get("Content-Length"),f=d?parseInt(d):0,m=f!==0;let v=0;return new ReadableStream({start(b){M();function M(){u.read().then(({done:O,value:I})=>{if(O)b.close();else{v+=I.byteLength;const A=new ProgressEvent("progress",{lengthComputable:m,loaded:v,total:f});for(let j=0,H=l.length;j{const l=new Response(a);switch(this.responseType){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(u=>new DOMParser().parseFromString(u,this.mimeType));case"json":return l.json();default:return l.text()}}).then(a=>{Aw.add(e,a);const l=sg[e];delete sg[e];for(let u=0,d=l.length;u{const l=sg[e];delete sg[e];for(let u=0,d=l.length;u"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,r,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Aw.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){r&&r(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){Aw.add(e,l),r&&r(l),s.manager.itemEnd(e)}).catch(function(l){i&&i(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}v5t.prototype.isImageBitmapLoader=!0;let XI;const _5t={getContext:function(){return XI===void 0&&(XI=new(window.AudioContext||window.webkitAudioContext)),XI},setContext:function(t){XI=t}};class x5t extends d_{constructor(e){super(e)}load(e,r,n,i){const s=this,o=new a5t(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);_5t.getContext().decodeAudioData(l,function(d){r(d)})}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},n,i)}}class w5t extends rK{constructor(e,r,n=1){super(void 0,n);const i=new $i().set(e),s=new $i().set(r),o=new st(i.r,i.g,i.b),a=new st(s.r,s.g,s.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(u)}}w5t.prototype.isHemisphereLightProbe=!0;class b5t extends rK{constructor(e,r=1){super(void 0,r);const n=new $i().set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}b5t.prototype.isAmbientLightProbe=!0;class C5t{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Joe(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const r=Joe();e=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=e}return e}}function Joe(){return(typeof performance>"u"?Date:performance).now()}class S5t extends xo{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,r=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,r=this.filters.length;e0&&this._mixBufferRegionAdditive(n,i,this._addIndex*r,1,r);for(let l=r,u=r+r;l!==u;++l)if(n[l]!==n[l+r]){a.setValue(n,i);break}}saveOriginalState(){const e=this.binding,r=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(r,i);for(let s=n,o=i;s!==o;++s)r[s]=r[i+s%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,r=e+this.valueSize;for(let n=e;n=.5)for(let o=0;o!==s;++o)e[r+o]=e[n+o]}_slerp(e,r,n,i){jc.slerpFlat(e,r,e,r,e,n,i)}_slerpAdditive(e,r,n,i,s){const o=this._workIndex*s;jc.multiplyQuaternionsFlat(e,o,e,r,e,n),jc.slerpFlat(e,r,e,r,e,o,i)}_lerp(e,r,n,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=r+a;e[l]=e[l]*o+e[n+a]*i}}_lerpAdditive(e,r,n,i,s){for(let o=0;o!==s;++o){const a=r+o;e[a]=e[a]+e[n+o]*i}}}const nK="\\[\\]\\.:\\/",M5t=new RegExp("["+nK+"]","g"),iK="[^"+nK+"]",T5t="[^"+nK.replace("\\.","")+"]",I5t=/((?:WC+[\/:])*)/.source.replace("WC",iK),R5t=/(WCOD+)?/.source.replace("WCOD",T5t),L5t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",iK),k5t=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",iK),A5t=new RegExp("^"+I5t+R5t+L5t+k5t+"$"),P5t=["material","materials","bones"];class $5t{constructor(e,r,n){const i=n||ua.parseTrackName(r);this._targetGroup=e,this._bindings=e.subscribe_(r,i)}getValue(e,r){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,r)}setValue(e,r){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(e,r)}bind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=e.length;r!==n;++r)e[r].bind()}unbind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=e.length;r!==n;++r)e[r].unbind()}}class ua{constructor(e,r,n){this.path=r,this.parsedPath=n||ua.parseTrackName(r),this.node=ua.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,r,n){return e&&e.isAnimationObjectGroup?new ua.Composite(e,r,n):new ua(e,r,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(M5t,"")}static parseTrackName(e){const r=A5t.exec(e);if(!r)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=n.nodeName.substring(i+1);P5t.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,r){if(!r||r===""||r==="."||r===-1||r===e.name||r===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(r);if(n!==void 0)return n}if(e.children){const n=function(s){for(let o=0;o0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case P9e:for(let d=0,f=l.length;d!==f;++d)l[d].evaluate(o),u[d].accumulateAdditive(a);break;case jJ:default:for(let d=0,f=l.length;d!==f;++d)l[d].evaluate(o),u[d].accumulate(i,a)}}}_updateWeight(e){let r=0;if(this.enabled){r=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];r*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(e){let r=0;if(!this.paused){r=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(e)[0];r*=i,e>n.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(e){const r=this._clip.duration,n=this.loop;let i=this.time+e,s=this._loopCount;const o=n===sgt;if(e===0)return s===-1?i:o&&(s&1)===1?r-i:i;if(n===ngt){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=r)i=r;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=r||i<0){const a=Math.floor(i/r);i-=r*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?r:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return r-i}return i}_setEndings(e,r,n){const i=this._interpolantSettings;n?(i.endingStart=w4,i.endingEnd=w4):(e?i.endingStart=this.zeroSlopeAtStart?w4:x4:i.endingStart=uP,r?i.endingEnd=this.zeroSlopeAtEnd?w4:x4:i.endingEnd=uP)}_scheduleFading(e,r,n){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=r,a[1]=s+e,l[1]=n,this}}class N5t extends K5{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,r){const n=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=n.uuid,u=this._bindingsByRootAndName;let d=u[l];d===void 0&&(d={},u[l]=d);for(let f=0;f!==s;++f){const m=i[f],v=m.name;let b=d[v];if(b!==void 0)o[f]=b;else{if(b=o[f],b!==void 0){b._cacheIndex===null&&(++b.referenceCount,this._addInactiveBinding(b,l,v));continue}const M=r&&r._propertyBindings[f].binding.parsedPath;b=new E5t(ua.create(n,v,M),m.ValueTypeName,m.getValueSize()),++b.referenceCount,this._addInactiveBinding(b,l,v),o[f]=b}a[f].resultBuffer=b.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,n)}const r=e._propertyBindings;for(let n=0,i=r.length;n!==i;++n){const s=r[n];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const r=e._propertyBindings;for(let n=0,i=r.length;n!==i;++n){const s=r[n];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const r=e._cacheIndex;return r!==null&&r=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const r=this._actions,n=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let u=0;u!==n;++u)r[u]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].apply(o);return this}setTime(e){this.time=0;for(let r=0;rthis))}cacheImage$(){return this._cache.cacheImage$(this._spatial).pipe(Ct(()=>this))}cacheSequenceEdges(e){this._cache.cacheSequenceEdges(e)}cacheSpatialEdges(e){this._cache.cacheSpatialEdges(e)}dispose(){this._cache!=null&&(this._cache.dispose(),this._cache=null),this._core=null,this._spatial=null}initializeCache(e){if(this._cache!=null)throw new Error(`Image cache already initialized (${this.id}).`);this._cache=e}makeComplete(e){if(e==null)throw new Error("Fill can not be null.");this._spatial=e}resetSequenceEdges(){this._cache.resetSequenceEdges()}resetSpatialEdges(){this._cache.resetSpatialEdges()}uncache(){this._cache!=null&&(this._cache.dispose(),this._cache=null)}}class H5t{constructor(e){this._disposed=!1,this._provider=e,this._image=null,this._mesh=null,this._sequenceEdges={cached:!1,edges:[]},this._spatialEdges={cached:!1,edges:[]},this._imageChanged$=new dn,this._image$=this._imageChanged$.pipe(po(null),Ci(1),Bn()),this._iamgeSubscription=this._image$.subscribe(),this._sequenceEdgesChanged$=new dn,this._sequenceEdges$=this._sequenceEdgesChanged$.pipe(po(this._sequenceEdges),Ci(1),Bn()),this._sequenceEdgesSubscription=this._sequenceEdges$.subscribe(()=>{}),this._spatialEdgesChanged$=new dn,this._spatialEdges$=this._spatialEdgesChanged$.pipe(po(this._spatialEdges),Ci(1),Bn()),this._spatialEdgesSubscription=this._spatialEdges$.subscribe(()=>{}),this._cachingAssets$=null}get image(){return this._image}get image$(){return this._image$}get mesh(){return this._mesh}get sequenceEdges(){return this._sequenceEdges}get sequenceEdges$(){return this._sequenceEdges$}get spatialEdges(){return this._spatialEdges}get spatialEdges$(){return this._spatialEdges$}cacheAssets$(e,r){return this._cachingAssets$!=null?this._cachingAssets$:(this._cachingAssets$=ei(this._cacheImage$(e),this._cacheMesh$(e,r)).pipe(Ct(([n,i])=>(this._image=n,this._mesh=i,this)),Fd(()=>{this._cachingAssets$=null}),Ci(1),Bn()),this._cachingAssets$.pipe(Qn(n=>!!n._image)).subscribe(()=>{this._imageChanged$.next(this._image)},()=>{}),this._cachingAssets$)}cacheImage$(e){if(this._image!=null)return vi(this);const r=this._cacheImage$(e).pipe(Qn(n=>!!n),Pa(n=>{this._disposeImage(),this._image=n}),Ct(()=>this),Ci(1),Bn());return r.subscribe(()=>{this._imageChanged$.next(this._image)},()=>{}),r}cacheSequenceEdges(e){this._sequenceEdges={cached:!0,edges:e},this._sequenceEdgesChanged$.next(this._sequenceEdges)}cacheSpatialEdges(e){this._spatialEdges={cached:!0,edges:e},this._spatialEdgesChanged$.next(this._spatialEdges)}dispose(){this._iamgeSubscription.unsubscribe(),this._sequenceEdgesSubscription.unsubscribe(),this._spatialEdgesSubscription.unsubscribe(),this._disposeImage(),this._mesh=null,this._sequenceEdges={cached:!1,edges:[]},this._spatialEdges={cached:!1,edges:[]},this._imageChanged$.next(null),this._sequenceEdgesChanged$.next(this._sequenceEdges),this._spatialEdgesChanged$.next(this._spatialEdges),this._disposed=!0,this._imageAborter!=null&&(this._imageAborter(),this._imageAborter=null),this._meshAborter!=null&&(this._meshAborter(),this._meshAborter=null)}resetSequenceEdges(){this._sequenceEdges={cached:!1,edges:[]},this._sequenceEdgesChanged$.next(this._sequenceEdges)}resetSpatialEdges(){this._spatialEdges={cached:!1,edges:[]},this._spatialEdgesChanged$.next(this._spatialEdges)}_cacheImage$(e){return va.create(r=>{const n=new Promise((s,o)=>{this._imageAborter=o}),i=e.thumb.url;if(!i){const s=e.thumb.id,o=`Incorrect thumb URL for ${e.id} (${s}, ${i})`;r.error(new Error(o));return}this._provider.getImageBuffer(i,n).then(s=>{this._imageAborter=null;const o=new Image;o.crossOrigin="Anonymous",o.onload=()=>{if(this._disposed){window.URL.revokeObjectURL(o.src);const l=`Image load was aborted (${i})`;r.error(new Error(l));return}r.next(o),r.complete()},o.onerror=()=>{this._imageAborter=null,r.error(new Error(`Failed to load image (${i})`))};const a=new Blob([s]);o.src=window.URL.createObjectURL(a)},s=>{this._imageAborter=null,r.error(s)})})}_cacheMesh$(e,r){return va.create(n=>{if(!r){n.next(this._createEmptyMesh()),n.complete();return}const i=e.mesh.url;if(!i){const o=e.mesh.id,a=`Incorrect mesh URL for ${e.id} (${o}, ${i})`;console.warn(a),n.next(this._createEmptyMesh()),n.complete();return}const s=new Promise((o,a)=>{this._meshAborter=a});this._provider.getMesh(i,s).then(o=>{this._meshAborter=null,!this._disposed&&(n.next(o),n.complete())},o=>{this._meshAborter=null,console.error(o),n.next(this._createEmptyMesh()),n.complete()})})}_createEmptyMesh(){return{faces:[],vertices:[]}}_disposeImage(){this._image!=null&&window.URL.revokeObjectURL(this._image.src),this._image=null}}class G5t{constructor(e){this._id=e.id,this._imageIds=e.image_ids}get id(){return this._id}get imageIds(){return this._imageIds}dispose(){this._id=null,this._imageIds=null}findNext(e){let r=this._imageIds.indexOf(e);return r+1>=this._imageIds.length||r===-1?null:this._imageIds[r+1]}findPrev(e){let r=this._imageIds.indexOf(e);return r===0||r===-1?null:this._imageIds[r-1]}}class q5t{constructor(){this.sphericalPreferredDistance=2,this.sphericalMotion=2,this.sphericalSequencePenalty=1,this.sphericalMergeCCPenalty=4,this.stepPreferredDistance=4,this.stepMotion=3,this.stepRotation=4,this.stepSequencePenalty=2,this.stepMergeCCPenalty=6,this.similarDistance=2,this.similarRotation=3,this.turnDistance=4,this.turnMotion=2,this.turnSequencePenalty=1,this.turnMergeCCPenalty=4}}var Cr;(function(t){t[t.Next=0]="Next",t[t.Prev=1]="Prev",t[t.StepLeft=2]="StepLeft",t[t.StepRight=3]="StepRight",t[t.StepForward=4]="StepForward",t[t.StepBackward=5]="StepBackward",t[t.TurnLeft=6]="TurnLeft",t[t.TurnRight=7]="TurnRight",t[t.TurnU=8]="TurnU",t[t.Spherical=9]="Spherical",t[t.Similar=10]="Similar"})(Cr||(Cr={}));class W5t{constructor(){this.steps={},this.turns={},this.spherical={},this.steps[Cr.StepForward]={direction:Cr.StepForward,motionChange:0,useFallback:!0},this.steps[Cr.StepBackward]={direction:Cr.StepBackward,motionChange:Math.PI,useFallback:!0},this.steps[Cr.StepLeft]={direction:Cr.StepLeft,motionChange:Math.PI/2,useFallback:!1},this.steps[Cr.StepRight]={direction:Cr.StepRight,motionChange:-Math.PI/2,useFallback:!1},this.turns[Cr.TurnLeft]={direction:Cr.TurnLeft,directionChange:Math.PI/2,motionChange:Math.PI/4},this.turns[Cr.TurnRight]={direction:Cr.TurnRight,directionChange:-Math.PI/2,motionChange:-Math.PI/4},this.turns[Cr.TurnU]={direction:Cr.TurnU,directionChange:Math.PI,motionChange:null},this.spherical[Cr.StepForward]={direction:Cr.StepForward,directionChange:0,next:Cr.StepLeft,prev:Cr.StepRight},this.spherical[Cr.StepBackward]={direction:Cr.StepBackward,directionChange:Math.PI,next:Cr.StepRight,prev:Cr.StepLeft},this.spherical[Cr.StepLeft]={direction:Cr.StepLeft,directionChange:Math.PI/2,next:Cr.StepBackward,prev:Cr.StepForward},this.spherical[Cr.StepRight]={direction:Cr.StepRight,directionChange:-Math.PI/2,next:Cr.StepForward,prev:Cr.StepBackward}}}class Z5t{constructor(){this.sphericalMinDistance=.1,this.sphericalMaxDistance=20,this.sphericalPreferredDistance=5,this.sphericalMaxItems=4,this.sphericalMaxStepTurnChange=Math.PI/8,this.rotationMaxDistance=this.turnMaxRigDistance,this.rotationMaxDirectionChange=Math.PI/6,this.rotationMaxVerticalDirectionChange=Math.PI/8,this.similarMaxDirectionChange=Math.PI/8,this.similarMaxDistance=12,this.similarMinTimeDifference=12*3600*1e3,this.stepMaxDistance=20,this.stepMaxDirectionChange=Math.PI/6,this.stepMaxDrift=Math.PI/6,this.stepPreferredDistance=4,this.turnMaxDistance=15,this.turnMaxDirectionChange=2*Math.PI/9,this.turnMaxRigDistance=.65,this.turnMinRigDirectionChange=Math.PI/6}get maxDistance(){return Math.max(this.sphericalMaxDistance,this.similarMaxDistance,this.stepMaxDistance,this.turnMaxDistance)}}class ca extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ca.prototype),this.name="MapillaryError"}}class Pd extends ca{constructor(e){super(e??"The argument is not valid."),Object.setPrototypeOf(this,Pd.prototype),this.name="ArgumentMapillaryError"}}class Uc{constructor(){this._epsilon=1e-9}azimuthalToBearing(e){return-e+Math.PI/2}degToRad(e){return Math.PI*e/180}radToDeg(e){return 180*e/Math.PI}rotationMatrix(e){let r=new st(e[0],e[1],e[2]),n=r.length();return n>0&&r.normalize(),new Ri().makeRotationAxis(r,n)}rotate(e,r){let n=new st(e[0],e[1],e[2]),i=this.rotationMatrix(r);return n.applyMatrix4(i),n}opticalCenter(e,r){let n=[-e[0],-e[1],-e[2]],i=[-r[0],-r[1],-r[2]];return this.rotate(i,n)}viewingDirection(e){let r=[-e[0],-e[1],-e[2]];return this.rotate([0,0,1],r)}wrap(e,r,n){if(nn||en?e=e-i:en?n:e}angleBetweenVector2(e,r,n,i){let s=Math.atan2(i,n)-Math.atan2(r,e);return this.wrapAngle(s)}angleDifference(e,r){let n=r-e;return this.wrapAngle(n)}relativeRotationAngle(e,r){let n=this.rotationMatrix([-e[0],-e[1],-e[2]]),i=this.rotationMatrix(r),o=n.multiply(i).elements,a=o[0]+o[5]+o[10];return Math.acos(Math.max(Math.min((a-1)/2,1),-1))}angleToPlane(e,r){let n=new st().fromArray(e),i=n.length();if(i{const u=t.unprojectBasic(l,1e4),d=i.worldToCamera(u,o);return[Math.abs(d[0]/d[2]),Math.abs(d[1]/d[2])]})}class X5t{constructor(e,r,n){this._spatial=new Uc,this._settings=e??new Z5t,this._directions=r??new W5t,this._coefficients=n??new q5t}getPotentialEdges(e,r,n){if(!e.complete)throw new Pd("Image has to be full.");if(!e.merged)return[];let i=this._spatial.viewingDirection(e.rotation),s=this._spatial.angleToPlane(i.toArray(),[0,0,1]),o=[];for(let a of r){if(!a.merged||a.id===e.id)continue;let l=cd(a.lngLat.lng,a.lngLat.lat,a.computedAltitude,e.lngLat.lng,e.lngLat.lat,e.computedAltitude),u=new st(l[0],l[1],l[2]),d=u.length();if(d>this._settings.maxDistance&&n.indexOf(a.id)<0)continue;let f=this._spatial.angleBetweenVector2(i.x,i.y,u.x,u.y),m=this._spatial.angleToPlane(u.toArray(),[0,0,1]),v=this._spatial.viewingDirection(a.rotation),b=this._spatial.angleBetweenVector2(i.x,i.y,v.x,v.y),O=this._spatial.angleToPlane(v.toArray(),[0,0,1])-s,I=this._spatial.relativeRotationAngle(e.rotation,a.rotation),A=this._spatial.angleBetweenVector2(1,0,u.x,u.y),j=a.sequenceId!=null&&e.sequenceId!=null&&a.sequenceId===e.sequenceId,H=a.mergeId===e.mergeId,W=a.creatorId===e.creatorId,re={capturedAt:a.capturedAt,directionChange:b,distance:d,spherical:Li(a.cameraType),id:a.id,motionChange:f,rotation:I,sameMergeCC:H,sameSequence:j,sameUser:W,sequenceId:a.sequenceId,verticalDirectionChange:O,verticalMotion:m,worldMotionAzimuth:A};o.push(re)}return o}computeSequenceEdges(e,r){if(!e.complete)throw new Pd("Image has to be full.");if(e.sequenceId!==r.id)throw new Pd("Image and sequence does not correspond.");let n=[],i=r.findNext(e.id);i!=null&&n.push({data:{direction:Cr.Next,worldMotionAzimuth:Number.NaN},source:e.id,target:i});let s=r.findPrev(e.id);return s!=null&&n.push({data:{direction:Cr.Prev,worldMotionAzimuth:Number.NaN},source:e.id,target:s}),n}computeSimilarEdges(e,r){if(!e.complete)throw new Pd("Image has to be full.");let n=Li(e.cameraType),i={};for(let a of r)if(a.sequenceId!=null&&!a.sameSequence){if(n){if(!a.spherical)continue}else if(!a.spherical&&Math.abs(a.directionChange)>this._settings.similarMaxDirectionChange)continue;a.distance>this._settings.similarMaxDistance||a.sameUser&&Math.abs(a.capturedAt-e.capturedAt)a.distance:a=>this._coefficients.similarDistance*a.distance+this._coefficients.similarRotation*a.rotation;for(let a in i){if(!i.hasOwnProperty(a))continue;let l=Number.MAX_VALUE,u=null;for(let d of i[a]){let f=o(d);f({data:{direction:Cr.Similar,worldMotionAzimuth:a.worldMotionAzimuth},source:e.id,target:a.id}))}computeStepEdges(e,r,n,i){if(!e.complete)throw new Pd("Image has to be full.");let s=[];if(Li(e.cameraType))return s;for(let o in this._directions.steps){if(!this._directions.steps.hasOwnProperty(o))continue;let a=this._directions.steps[o],l=Number.MAX_VALUE,u=null,d=null;for(let f of r){if(f.spherical||Math.abs(f.directionChange)>this._settings.stepMaxDirectionChange)continue;let m=this._spatial.angleDifference(a.motionChange,f.motionChange),v=this._spatial.angleDifference(f.directionChange,m),b=Math.max(Math.abs(m),Math.abs(v));if(Math.abs(b)>this._settings.stepMaxDrift)continue;let M=f.id;if(a.useFallback&&(M===n||M===i)&&(d=f),f.distance>this._settings.stepMaxDistance)continue;m=Math.sqrt(m*m+f.verticalMotion*f.verticalMotion);let O=this._coefficients.stepPreferredDistance*Math.abs(f.distance-this._settings.stepPreferredDistance)/this._settings.stepMaxDistance+this._coefficients.stepMotion*m/this._settings.stepMaxDrift+this._coefficients.stepRotation*f.rotation/this._settings.stepMaxDirectionChange+this._coefficients.stepSequencePenalty*(f.sameSequence?0:1)+this._coefficients.stepMergeCCPenalty*(f.sameMergeCC?0:1);Othis._settings.turnMaxDistance)continue;let u=s.direction!==Cr.TurnU&&l.distancethis._settings.turnMinRigDirectionChange,d=this._spatial.angleDifference(s.directionChange,l.directionChange),f;if(u&&l.directionChange*s.directionChange>0&&Math.abs(l.directionChange)this._settings.turnMaxDirectionChange)continue;let m=s.motionChange?this._spatial.angleDifference(s.motionChange,l.motionChange):0;m=Math.sqrt(m*m+l.verticalMotion*l.verticalMotion),f=this._coefficients.turnDistance*l.distance/this._settings.turnMaxDistance+this._coefficients.turnMotion*m/Math.PI+this._coefficients.turnSequencePenalty*(l.sameSequence?0:1)+this._coefficients.turnMergeCCPenalty*(l.sameMergeCC?0:1)}fthis._settings.sphericalMaxDistance))if(d.spherical){if(d.distancethis._settings.sphericalMaxStepTurnChange)){s.push([m.direction,d]);break}}let o=Math.PI/this._settings.sphericalMaxItems,a=[],l=[];for(let d=0;do)continue;let O=Number.MAX_VALUE;for(let A of a){let j=Math.abs(this._spatial.angleDifference(A,b.motionChange));jo)continue;let j=Number.MAX_VALUE;for(let W of b){let re=Math.abs(this._spatial.angleDifference(W,I[1].motionChange));re{}),this._defaultAlt=2,this._edgeCalculator=i??new X5t,this._graphCalculator=n??new oK,this._configuration=o??{maxSequences:50,maxUnusedImages:100,maxUnusedPreStoredImages:30,maxUnusedTiles:20},this._nodes={},this._nodeIndex=r??new cS._spatialIndex(16),this._nodeIndexTiles={},this._nodeToTile={},this._preStored={},this._requiredNodeTiles={},this._requiredSpatialArea={},this._sequences={},this._tileThreshold=20}static register(e){cS._spatialIndex=e}get api(){return this._api}get changed$(){return this._changed$}get filter$(){return this._filter$}cacheBoundingBox$(e,r){const n=this._api.data.geometry.bboxToCellIds(e,r).filter(i=>!(i in this._cachedTiles)).map(i=>i in this._cachingTiles$?this._cachingTiles$[i]:this._cacheTile$(i));return n.length===0&&n.push(vi(this)),Na(n).pipe(l5(),Iw(),Qi(()=>{const i=this._nodeIndex.search({maxX:r.lng,maxY:r.lat,minX:e.lng,minY:e.lat}).map(f=>f.node),s=[],o=[];for(const f of i)f.complete?s.push(f):o.push(f.id);const a=[],l=200;for(;o.length>0;)a.push(o.splice(0,l));const u=vi(s),d=a.map(f=>this._api.getSpatialImages$(f).pipe(Ct(m=>{const v=[];for(const b of m){if(!this.hasNode(b.node_id))continue;const O=this.getNode(b.node_id);O.complete||this._makeFull(O,b.node),v.push(O)}return v})));return Vs(u,Na(d).pipe(l5()))}),Tse((i,s)=>i.concat(s)))}cacheCell$(e){return(e in this._cachedTiles?vi(this):e in this._cachingTiles$?this._cachingTiles$[e]:this._cacheTile$(e)).pipe(Qi(()=>{const n=this._cachedTiles[e];n.accessed=new Date().getTime();const i=n.nodes,s=[],o=[];for(const f of i)f.complete?s.push(f):o.push(f.id);const a=[],l=200;for(;o.length>0;)a.push(o.splice(0,l));const u=vi(s),d=a.map(f=>this._api.getSpatialImages$(f).pipe(Ct(m=>{const v=[];for(const b of m){if(!b.node){console.warn(`Image is empty (${b.node})`);continue}const M=b.node_id;if(!this.hasNode(M))continue;const O=this.getNode(M);O.complete||this._makeFull(O,b.node),v.push(O)}return v})));return Vs(u,Na(d).pipe(l5()))}),Tse((n,i)=>n.concat(i)))}cacheFill$(e){if(e in this._cachingFull$)throw new la(`Cannot fill node while caching full (${e}).`);if(!this.hasNode(e))throw new la(`Cannot fill node that does not exist in graph (${e}).`);if(e in this._cachingFill$)return this._cachingFill$[e];const r=this.getNode(e);if(r.complete)throw new la(`Cannot fill node that is already full (${e}).`);return this._cachingFill$[e]=this._api.getSpatialImages$([e]).pipe(Pa(n=>{for(const i of n)i.node||console.warn(`Image is empty ${i.node_id}`),r.complete||this._makeFull(r,i.node),delete this._cachingFill$[i.node_id]}),Ct(()=>this),Fd(()=>{e in this._cachingFill$&&delete this._cachingFill$[e],this._changed$.next(this)}),Cf(),Bn()),this._cachingFill$[e]}cacheFull$(e){if(e in this._cachingFull$)return this._cachingFull$[e];if(this.hasNode(e))throw new la(`Cannot cache full node that already exist in graph (${e}).`);return this._cachingFull$[e]=this._api.getImages$([e]).pipe(Pa(r=>{for(const n of r){if(!n.node)throw new la(`Image does not exist (${e}, ${n.node}).`);const i=n.node_id;if(this.hasNode(i)){const s=this.getNode(e);s.complete||this._makeFull(s,n.node)}else{if(n.node.sequence.id==null)throw new la(`Image has no sequence key (${e}).`);const s=new KI(n.node);this._makeFull(s,n.node);const o=this._api.data.geometry.lngLatToCellId(s.originalLngLat);this._preStore(o,s),this._setNode(s),delete this._cachingFull$[i]}}}),Ct(()=>this),Fd(()=>{e in this._cachingFull$&&delete this._cachingFull$[e],this._changed$.next(this)}),Cf(),Bn()),this._cachingFull$[e]}cacheNodeSequence$(e){if(!this.hasNode(e))throw new la(`Cannot cache sequence edges of node that does not exist in graph (${e}).`);let r=this.getNode(e);if(r.sequenceId in this._sequences)throw new la(`Sequence already cached (${e}), (${r.sequenceId}).`);return this._cacheSequence$(r.sequenceId)}cacheSequence$(e){if(e in this._sequences)throw new la(`Sequence already cached (${e})`);return this._cacheSequence$(e)}cacheSequenceEdges(e){let r=this.getNode(e);if(!(r.sequenceId in this._sequences))throw new la(`Sequence is not cached (${e}), (${r.sequenceId})`);let n=this._sequences[r.sequenceId].sequence,i=this._edgeCalculator.computeSequenceEdges(r,n);r.cacheSequenceEdges(i)}cacheSequenceNodes$(e,r){if(!this.hasSequence(e))throw new la(`Cannot cache sequence nodes of sequence that does not exist in graph (${e}).`);if(this.hasSequenceNodes(e))throw new la(`Sequence nodes already cached (${e}).`);const n=this.getSequence(e);if(n.id in this._cachingSequenceNodes$)return this._cachingSequenceNodes$[n.id];const i=[],s=n.imageIds.slice(),o=50;if(r&&s.length>o){const d=s.indexOf(r),f=Math.max(0,Math.min(d-o/2,s.length-o));i.push(s.splice(f,o))}const a=200;for(;s.length>0;)i.push(s.splice(0,a));let l=i.length;const u=Na(i).pipe(Qi(d=>this._api.getImages$(d).pipe(Pa(f=>{for(const m of f){if(!m.node){console.warn(`Image empty (${m.node_id})`);continue}const v=m.node_id;if(this.hasNode(v)){const b=this.getNode(v);b.complete||this._makeFull(b,m.node)}else{m.node.sequence.id==null&&console.warn(`Sequence missing, discarding node (${m.node_id})`);const b=new KI(m.node);this._makeFull(b,m.node);const M=this._api.data.geometry.lngLatToCellId(b.originalLngLat);this._preStore(M,b),this._setNode(b)}}l--}),Ct(()=>this)),6),Iw(),Fd(()=>{delete this._cachingSequenceNodes$[n.id],l===0&&(this._cachedSequenceNodes[n.id]=!0)}),Cf(),Bn());return this._cachingSequenceNodes$[n.id]=u,u}cacheSpatialArea$(e){if(!this.hasNode(e))throw new la(`Cannot cache spatial area of node that does not exist in graph (${e}).`);if(e in this._cachedSpatialEdges)throw new la(`Image already spatially cached (${e}).`);if(!(e in this._requiredSpatialArea))throw new la(`Spatial area not determined (${e}).`);let r=this._requiredSpatialArea[e];if(Object.keys(r.cacheNodes).length===0)throw new la(`Spatial nodes already cached (${e}).`);if(e in this._cachingSpatialArea$)return this._cachingSpatialArea$[e];let n=[];for(;r.cacheKeys.length>0;)n.push(r.cacheKeys.splice(0,200));let i=n.length,s=[];for(let o of n){let a=this._api.getSpatialImages$(o).pipe(Pa(l=>{for(const u of l){if(!u.node){console.warn(`Image is empty (${u.node_id})`);continue}const d=u.node_id,f=r.cacheNodes[d];if(f.complete){delete r.cacheNodes[d];continue}this._makeFull(f,u.node),delete r.cacheNodes[d]}--i===0&&delete this._cachingSpatialArea$[e]}),Ct(()=>this),Vo(l=>{for(let u of o)u in r.all&&delete r.all[u],u in r.cacheNodes&&delete r.cacheNodes[u];throw--i===0&&delete this._cachingSpatialArea$[e],l}),Fd(()=>{Object.keys(r.cacheNodes).length===0&&this._changed$.next(this)}),Cf(),Bn());s.push(a)}return this._cachingSpatialArea$[e]=s,s}cacheSpatialEdges(e){if(e in this._cachedSpatialEdges)throw new la(`Spatial edges already cached (${e}).`);let r=this.getNode(e),n=this._sequences[r.sequenceId].sequence,i=[],s=n.findPrev(r.id);s!=null&&i.push(s);let o=n.findNext(r.id);o!=null&&i.push(o);let a=this._requiredSpatialArea[e].all,l=[],u=this._filter;for(let m in a){if(!a.hasOwnProperty(m))continue;let v=a[m];u(v)&&l.push(v)}let d=this._edgeCalculator.getPotentialEdges(r,l,i),f=this._edgeCalculator.computeStepEdges(r,d,s,o);f=f.concat(this._edgeCalculator.computeTurnEdges(r,d)),f=f.concat(this._edgeCalculator.computeSphericalEdges(r,d)),f=f.concat(this._edgeCalculator.computePerspectiveToSphericalEdges(r,d)),f=f.concat(this._edgeCalculator.computeSimilarEdges(r,d)),r.cacheSpatialEdges(f),this._cachedSpatialEdges[e]=r,delete this._requiredSpatialArea[e],delete this._cachedNodeTiles[e]}cacheTiles$(e){if(e in this._cachedNodeTiles)throw new la(`Tiles already cached (${e}).`);if(e in this._cachedSpatialEdges)throw new la(`Spatial edges already cached so tiles considered cached (${e}).`);if(!(e in this._requiredNodeTiles))throw new la(`Tiles have not been determined (${e}).`);let r=this._requiredNodeTiles[e];if(r.cache.length===0&&r.caching.length===0)throw new la(`Tiles already cached (${e}).`);if(!this.hasNode(e))throw new la(`Cannot cache tiles of node that does not exist in graph (${e}).`);let n=r.cache.slice();r.caching=this._requiredNodeTiles[e].caching.concat(n),r.cache=[];let i=[];for(let s of r.caching){const o=s in this._cachingTiles$?this._cachingTiles$[s]:this._cacheTile$(s);i.push(o.pipe(Pa(a=>{let l=r.caching.indexOf(s);l>-1&&r.caching.splice(l,1),r.caching.length===0&&r.cache.length===0&&(delete this._requiredNodeTiles[e],this._cachedNodeTiles[e]=!0)}),Vo(a=>{let l=r.caching.indexOf(s);throw l>-1&&r.caching.splice(l,1),r.caching.length===0&&r.cache.length===0&&(delete this._requiredNodeTiles[e],this._cachedNodeTiles[e]=!0),a}),Fd(()=>{this._changed$.next(this)}),Cf(),Bn()))}return i}initializeCache(e){if(e in this._cachedNodes)throw new la(`Image already in cache (${e}).`);const r=this.getNode(e),n=this._api.data;r.initializeCache(new H5t(n));const i=new Date().getTime();this._cachedNodes[e]={accessed:i,node:r},this._updateCachedTileAccess(e,i)}isCachingFill(e){return e in this._cachingFill$}isCachingFull(e){return e in this._cachingFull$}isCachingNodeSequence(e){return this.getNode(e).sequenceId in this._cachingSequences$}isCachingSequence(e){return e in this._cachingSequences$}isCachingSequenceNodes(e){return e in this._cachingSequenceNodes$}isCachingTiles(e){return e in this._requiredNodeTiles&&this._requiredNodeTiles[e].cache.length===0&&this._requiredNodeTiles[e].caching.length>0}hasInitializedCache(e){return e in this._cachedNodes}hasNode(e){let r=new Date().getTime();return this._updateCachedNodeAccess(e,r),this._updateCachedTileAccess(e,r),e in this._nodes}hasNodeSequence(e){let n=this.getNode(e).sequenceId,i=n in this._sequences;return i&&(this._sequences[n].accessed=new Date().getTime()),i}hasSequence(e){let r=e in this._sequences;return r&&(this._sequences[e].accessed=new Date().getTime()),r}hasSequenceNodes(e){return e in this._cachedSequenceNodes}hasSpatialArea(e){if(!this.hasNode(e))throw new la(`Spatial area nodes cannot be determined if node not in graph (${e}).`);if(e in this._cachedSpatialEdges)return!0;if(e in this._requiredSpatialArea)return Object.keys(this._requiredSpatialArea[e].cacheNodes).length===0;let r=this.getNode(e),n=this._graphCalculator.boundingBoxCorners(r.lngLat,this._tileThreshold),i=this._nodeIndex.search({maxX:n[1].lng,maxY:n[1].lat,minX:n[0].lng,minY:n[0].lat}),s={all:{},cacheKeys:[],cacheNodes:{}};for(let o of i)s.all[o.node.id]=o.node,o.node.complete||(s.cacheKeys.push(o.node.id),s.cacheNodes[o.node.id]=o.node);return this._requiredSpatialArea[e]=s,s.cacheKeys.length===0}hasTiles(e){if(e in this._cachedNodeTiles||e in this._cachedSpatialEdges)return!0;if(!this.hasNode(e))throw new la(`Image does not exist in graph (${e}).`);let r={cache:[],caching:[]};if(e in this._requiredNodeTiles)r=this._requiredNodeTiles[e];else{const n=this.getNode(e),[i,s]=this._graphCalculator.boundingBoxCorners(n.lngLat,this._tileThreshold);r.cache=this._api.data.geometry.bboxToCellIds(i,s).filter(o=>!(o in this._cachedTiles)),r.cache.length>0&&(this._requiredNodeTiles[e]=r)}return r.cache.length===0&&r.caching.length===0}getNode(e){let r=new Date().getTime();return this._updateCachedNodeAccess(e,r),this._updateCachedTileAccess(e,r),this._nodes[e]}getSequence(e){let r=this._sequences[e];return r.accessed=new Date().getTime(),r.sequence}resetSpatialEdges(){let e=Object.keys(this._cachedSpatialEdges);for(let r of e)this._cachedSpatialEdges[r].resetSpatialEdges(),delete this._cachedSpatialEdges[r]}reset(e){const r=[];for(const n of e){if(!this.hasNode(n))throw new Error(`Image does not exist ${n}`);const i=this.getNode(n);i.resetSequenceEdges(),i.resetSpatialEdges(),r.push(i)}for(let n of Object.keys(this._cachedNodes))e.indexOf(n)===-1&&(this._cachedNodes[n].node.dispose(),delete this._cachedNodes[n]);this._cachedNodeTiles={},this._cachedSpatialEdges={},this._cachedTiles={},this._cachingFill$={},this._cachingFull$={},this._cachingSequences$={},this._cachingSpatialArea$={},this._cachingTiles$={},this._nodes={},this._nodeToTile={},this._preStored={};for(const n of r){this._nodes[n.id]=n;const i=this._api.data.geometry.lngLatToCellId(n.originalLngLat);this._preStore(i,n)}this._requiredNodeTiles={},this._requiredSpatialArea={},this._sequences={},this._nodeIndexTiles={},this._nodeIndex.clear()}setFilter(e){this._filter=this._filterCreator.createFilter(e),this._filterSubject$.next(this._filter)}uncache(e,r,n){const i={};this._addNewKeys(i,this._cachingFull$),this._addNewKeys(i,this._cachingFill$),this._addNewKeys(i,this._cachingSpatialArea$),this._addNewKeys(i,this._requiredNodeTiles),this._addNewKeys(i,this._requiredSpatialArea);for(const A of e)A in i||(i[A]=!0);const s=this._tileThreshold,o=this._graphCalculator,a=this._api.data.geometry,l=new Set(r);for(let A in i){if(!i.hasOwnProperty(A))continue;const j=this._nodes[A],[H,W]=o.boundingBoxCorners(j.lngLat,s),re=a.bboxToCellIds(H,W);for(const K of re)l.has(K)||l.add(K)}const u=[];for(let A in this._cachedTiles)!this._cachedTiles.hasOwnProperty(A)||l.has(A)||u.push([A,this._cachedTiles[A]]);const d=u.sort((A,j)=>j[1].accessed-A[1].accessed).slice(this._configuration.maxUnusedTiles).map(A=>A[0]);for(let A of d)this._uncacheTile(A,n);const f=[],m=[];for(let A in this._preStored){if(!this._preStored.hasOwnProperty(A)||A in this._cachingTiles$)continue;const j=this._preStored[A];for(let H in j)!j.hasOwnProperty(H)||H in i||j[H].sequenceId!==n&&(H in this._cachedNodes?f.push([this._cachedNodes[H],A]):m.push([H,A]))}const v=f.sort(([A],[j])=>j.accessed-A.accessed).slice(this._configuration.maxUnusedPreStoredImages).map(([A,j])=>[A.node.id,j]);this._uncachePreStored(m),this._uncachePreStored(v);const b=[];for(let A in this._cachedNodes)!this._cachedNodes.hasOwnProperty(A)||A in i||b.push(this._cachedNodes[A]);const M=b.sort((A,j)=>j.accessed-A.accessed).slice(this._configuration.maxUnusedImages);for(const A of M){A.node.uncache();const j=A.node.id;delete this._cachedNodes[j],j in this._cachedNodeTiles&&delete this._cachedNodeTiles[j],j in this._cachedSpatialEdges&&delete this._cachedSpatialEdges[j]}const O=[];for(let A in this._sequences)!this._sequences.hasOwnProperty(A)||A in this._cachingSequences$||A===n||O.push(this._sequences[A]);const I=O.sort((A,j)=>j.accessed-A.accessed).slice(this._configuration.maxSequences);for(const A of I){const j=A.sequence.id;delete this._sequences[j],j in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[j],A.sequence.dispose()}}updateCells$(e){const r=this._cachedTiles,n=this._cachingTiles$;return Na(e).pipe(Qi(i=>i in r?this._updateCell$(i):i in n?n[i].pipe(Vo(()=>vi(this)),Qi(()=>this._updateCell$(i))):Pi()))}unsubscribe(){this._filterSubscription.unsubscribe()}_addNewKeys(e,r){for(let n in r)!r.hasOwnProperty(n)||!this.hasNode(n)||n in e||(e[n]=!0)}_cacheSequence$(e){return e in this._cachingSequences$?this._cachingSequences$[e]:(this._cachingSequences$[e]=this._api.getSequence$(e).pipe(Pa(r=>{r?(r.id in this._sequences||(this._sequences[r.id]={accessed:new Date().getTime(),sequence:new G5t(r)}),delete this._cachingSequences$[e]):console.warn(`Sequence does not exist (${e})`)}),Ct(()=>this),Fd(()=>{e in this._cachingSequences$&&delete this._cachingSequences$[e],this._changed$.next(this)}),Cf(),Bn()),this._cachingSequences$[e])}_cacheTile$(e){return this._cachingTiles$[e]=this._api.getCoreImages$(e).pipe(Pa(r=>{if(e in this._cachedTiles)return;const n=r.images;this._nodeIndexTiles[e]=[],this._cachedTiles[e]={accessed:new Date().getTime(),nodes:[]};const i=this._cachedTiles[e].nodes,s=this._removeFromPreStore(e);for(const o of n){if(!o)break;if(o.sequence.id==null){console.warn(`Sequence missing, discarding node (${o.id})`);continue}if(s!=null&&o.id in s){const u=s[o.id];delete s[o.id],i.push(u);const d={lat:u.lngLat.lat,lng:u.lngLat.lng,node:u};this._nodeIndex.insert(d),this._nodeIndexTiles[e].push(d),this._nodeToTile[u.id]=e;continue}const a=new KI(o);i.push(a);const l={lat:a.lngLat.lat,lng:a.lngLat.lng,node:a};this._nodeIndex.insert(l),this._nodeIndexTiles[e].push(l),this._nodeToTile[a.id]=e,this._setNode(a)}delete this._cachingTiles$[e]}),Ct(()=>this),Vo(r=>{throw delete this._cachingTiles$[e],r}),Cf(),Bn()),this._cachingTiles$[e]}_makeFull(e,r){r.computed_altitude==null&&(r.computed_altitude=this._defaultAlt),r.computed_rotation==null&&(r.computed_rotation=this._graphCalculator.rotationFromCompass(r.compass_angle,r.exif_orientation)),e.makeComplete(r)}_preStore(e,r){e in this._preStored||(this._preStored[e]={}),this._preStored[e][r.id]=r}_removeFromPreStore(e){let r=null;return e in this._preStored&&(r=this._preStored[e],delete this._preStored[e]),r}_setNode(e){let r=e.id;if(this.hasNode(r))throw new la(`Image already exist (${r}).`);this._nodes[r]=e}_uncacheTile(e,r){for(let n of this._cachedTiles[e].nodes){let i=n.id;delete this._nodeToTile[i],i in this._cachedNodes&&delete this._cachedNodes[i],i in this._cachedNodeTiles&&delete this._cachedNodeTiles[i],i in this._cachedSpatialEdges&&delete this._cachedSpatialEdges[i],n.sequenceId===r?(this._preStore(e,n),n.uncache()):(delete this._nodes[i],n.sequenceId in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[n.sequenceId],n.dispose())}for(let n of this._nodeIndexTiles[e])this._nodeIndex.remove(n);delete this._nodeIndexTiles[e],delete this._cachedTiles[e]}_uncachePreStored(e){let r={};for(let[n,i]of e){n in this._nodes&&delete this._nodes[n],n in this._cachedNodes&&delete this._cachedNodes[n];let s=this._preStored[i][n];s.sequenceId in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[s.sequenceId],delete this._preStored[i][n],s.dispose(),r[i]=!0}for(let n in r)r.hasOwnProperty(n)&&Object.keys(this._preStored[n]).length===0&&delete this._preStored[n]}_updateCachedTileAccess(e,r){e in this._nodeToTile&&(this._cachedTiles[this._nodeToTile[e]].accessed=r)}_updateCachedNodeAccess(e,r){e in this._cachedNodes&&(this._cachedNodes[e].accessed=r)}_updateCell$(e){return this._api.getCoreImages$(e).pipe(Qi(r=>{if(!(e in this._cachedTiles))return Pi();const n=this._nodeIndex,i=this._nodeIndexTiles[e],s=this._nodeToTile,o=this._cachedTiles[e];o.accessed=new Date().getTime();const a=o.nodes,l=r.images;for(const u of l){if(u==null)break;if(this.hasNode(u.id))continue;if(u.sequence.id==null){console.warn(`Sequence missing, discarding node (${u.id})`);continue}const d=new KI(u);a.push(d);const f={lat:d.lngLat.lat,lng:d.lngLat.lng,node:d};n.insert(f),i.push(f),s[d.id]=e,this._setNode(d)}return vi(e)}),Vo(r=>(console.error(r),Pi())))}}class hS{constructor(){this._hash={},this._index=new hS._spatialIndex(16),this._indexChanged$=new dn,this._updated$=new dn}static register(e){hS._spatialIndex=e}get changed$(){return this._indexChanged$}get updated$(){return this._updated$}add(e){const r=[],n=this._hash,i=this._index;for(const s of e){const o=s.id;o in n&&(i.remove(n[o]),r.push(s));const a={lat:s.lngLat.lat,lng:s.lngLat.lng,marker:s};n[o]=a,i.insert(a)}r.length>0&&this._updated$.next(r),e.length>r.length&&this._indexChanged$.next(this)}has(e){return e in this._hash}get(e){return this.has(e)?this._hash[e].marker:void 0}getAll(){return this._index.all().map(e=>e.marker)}remove(e){const r=this._hash,n=this._index;let i=!1;for(const s of e){if(!(s in r))continue;const o=r[s];n.remove(o),delete r[s],i=!0}i&&this._indexChanged$.next(this)}removeAll(){this._hash={},this._index.clear(),this._indexChanged$.next(this)}search([e,r]){return this._index.search({maxX:r.lng,maxY:r.lat,minX:e.lng,minY:e.lat}).map(n=>n.marker)}update(e){const r=this._hash,n=this._index,i=e.id;if(!(i in r))return;n.remove(r[i]);const s={lat:e.lngLat.lat,lng:e.lngLat.lng,marker:e};r[i]=s,n.insert(s)}}function J5t(t,e,r,n,i){Rxe(t,e,r||0,n||t.length-1,i||K5t)}function Rxe(t,e,r,n,i){for(;n>r;){if(n-r>600){var s=n-r+1,o=e-r+1,a=Math.log(s),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(s-l)/s)*(o-s/2<0?-1:1),d=Math.max(r,Math.floor(e-o*l/s+u)),f=Math.min(n,Math.floor(e+(s-o)*l/s+u));Rxe(t,e,d,f,i)}var m=t[e],v=r,b=n;for(ub(t,r,e),i(t[n],m)>0&&ub(t,r,n);v0;)b--}i(t[r],m)===0?ub(t,r,b):(b++,ub(t,b,n)),b<=e&&(r=b+1),e<=b&&(n=b-1)}}function ub(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function K5t(t,e){return te?1:0}class Q5t{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let r=this.data;const n=[];if(!eR(e,r))return n;const i=this.toBBox,s=[];for(;r;){for(let o=0;o=0&&s[r].children.length>this._maxEntries;)this._split(s,r),r--;this._adjustParentBBoxes(i,s,r)}_split(e,r){const n=e[r],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const o=this._chooseSplitIndex(n,s,i),a=Kx(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,gx(n,this.toBBox),gx(a,this.toBBox),r?e[r-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,r){this.data=Kx([e,r]),this.data.height=e.height+1,this.data.leaf=!1,gx(this.data,this.toBBox)}_chooseSplitIndex(e,r,n){let i,s=1/0,o=1/0;for(let a=r;a<=n-r;a++){const l=c6(e,0,a,this.toBBox),u=c6(e,a,n,this.toBBox),d=i9t(l,u),f=lB(l)+lB(u);d=r;u--){const d=e.children[u];h6(a,e.leaf?s(d):d),l+=QI(a)}return l}_adjustParentBBoxes(e,r,n){for(let i=n;i>=0;i--)h6(r[i],e)}_condense(e){for(let r=e.length-1,n;r>=0;r--)e[r].children.length===0?r>0?(n=e[r-1].children,n.splice(n.indexOf(e[r]),1)):this.clear():gx(e[r],this.toBBox)}}function e9t(t,e,r){if(!r)return e.indexOf(t);for(let n=0;n=t.minX&&e.maxY>=t.minY}function Kx(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function eae(t,e,r,n,i){const s=[e,r];for(;s.length;){if(r=s.pop(),e=s.pop(),r-e<=n)continue;const o=e+Math.ceil((r-e)/n/2)*n;J5t(t,o,e,r,i),s.push(e,o,o,r)}}class Lxe extends Q5t{compareMinX(e,r){return e.lng-r.lng}compareMinY(e,r){return e.lat-r.lat}toBBox(e){return{minX:e.lng,minY:e.lat,maxX:e.lng,maxY:e.lat}}}class Ma{constructor(e,r){this._components={};for(const n in Ma.registeredComponents){if(!Ma.registeredComponents.hasOwnProperty(n))continue;const i=Ma.registeredComponents[n];this._components[n]={active:!1,component:new i(n,e,r)}}this._coverComponent=new Ma.registeredCoverComponent("cover",e,r),this._coverComponent.activate(),this._coverActivated=!0}static register(e){Ma.registeredComponents[e.componentName]===void 0&&(Ma.registeredComponents[e.componentName]=e)}static registerCover(e){Ma.registeredCoverComponent=e}get coverActivated(){return this._coverActivated}activateCover(){if(!this._coverActivated){this._coverActivated=!0;for(const e in this._components){if(!this._components.hasOwnProperty(e))continue;const r=this._components[e];r.active&&r.component.deactivate()}}}deactivateCover(){if(this._coverActivated){this._coverActivated=!1;for(const e in this._components){if(!this._components.hasOwnProperty(e))continue;const r=this._components[e];r.active&&r.component.activate()}}}activate(e){this._checkName(e),this._components[e].active=!0,this._coverActivated||this.get(e).activate()}configure(e,r){this._checkName(e),this.get(e).configure(r)}deactivate(e){this._checkName(e),this._components[e].active=!1,this._coverActivated||this.get(e).deactivate()}get(e){return this._components[e].component}getCover(){return this._coverComponent}remove(){this._coverComponent.deactivate();for(const e in this._components)this._components.hasOwnProperty(e)&&this._components[e].component.deactivate()}_checkName(e){if(!(e in this._components))throw new Pd(`Component does not exist: ${e}`)}}Ma.registeredComponents={};var dS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function s9t(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}),e}function o9t(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var a9t=Array.isArray,l9t=Object.prototype.toString,lK=a9t||u9t;function u9t(t){return l9t.call(t)==="[object Array]"}var RE="2",c9t=RE;Wp.NONE=0;Wp.VTEXT=1;Wp.VNODE=2;Wp.WIDGET=3;Wp.PROPS=4;Wp.ORDER=5;Wp.INSERT=6;Wp.REMOVE=7;Wp.THUNK=8;var kxe=Wp;function Wp(t,e,r){this.type=Number(t),this.vNode=e,this.patch=r}Wp.prototype.version=c9t;Wp.prototype.type="VirtualPatch";var h9t=RE,LE=d9t;function d9t(t){return t&&t.type==="VirtualNode"&&t.version===h9t}var f9t=RE,WO=p9t;function p9t(t){return t&&t.type==="VirtualText"&&t.version===f9t}var r9=m9t;function m9t(t){return t&&t.type==="Widget"}var ZO=g9t;function g9t(t){return t&&t.type==="Thunk"}var y9t=LE,v9t=WO,_9t=r9,tae=ZO,Axe=x9t;function x9t(t,e){var r=t,n=e;return tae(e)&&(n=rae(e,t)),tae(t)&&(r=rae(t,null)),{a:r,b:n}}function rae(t,e){var r=t.vnode;if(r||(r=t.vnode=t.render(e)),!(y9t(r)||v9t(r)||_9t(r)))throw new Error("thunk did not return a valid node");return r}var Pxe=function(e){return typeof e=="object"&&e!==null},YO=w9t;function w9t(t){return t&&(typeof t.hook=="function"&&!t.hasOwnProperty("hook")||typeof t.unhook=="function"&&!t.hasOwnProperty("unhook"))}var nae=Pxe,b9t=YO,C9t=$xe;function $xe(t,e){var r;for(var n in t){n in e||(r=r||{},r[n]=void 0);var i=t[n],s=e[n];if(i!==s)if(nae(i)&&nae(s))if(iae(s)!==iae(i))r=r||{},r[n]=s;else if(b9t(s))r=r||{},r[n]=s;else{var o=$xe(i,s);o&&(r=r||{},r[n]=o)}else r=r||{},r[n]=s}for(var a in e)a in t||(r=r||{},r[a]=e[a]);return r}function iae(t){if(Object.getPrototypeOf)return Object.getPrototypeOf(t);if(t.__proto__)return t.__proto__;if(t.constructor)return t.constructor.prototype}var S9t=lK,fl=kxe,P5=LE,sae=WO,rk=r9,gP=ZO,E9t=Axe,M9t=C9t,T9t=Oxe;function Oxe(t,e){var r={a:t};return Nxe(t,e,r,0),r}function Nxe(t,e,r,n){if(t!==e){var i=r[n],s=!1;if(gP(t)||gP(e))uK(t,e,r,n);else if(e==null)rk(t)||(oae(t,r,n),i=r[n]),i=O1(i,new fl(fl.REMOVE,t,e));else if(P5(e))if(P5(t))if(t.tagName===e.tagName&&t.namespace===e.namespace&&t.key===e.key){var o=M9t(t.properties,e.properties);o&&(i=O1(i,new fl(fl.PROPS,t,o))),i=I9t(t,e,r,i,n)}else i=O1(i,new fl(fl.VNODE,t,e)),s=!0;else i=O1(i,new fl(fl.VNODE,t,e)),s=!0;else sae(e)?sae(t)?t.text!==e.text&&(i=O1(i,new fl(fl.VTEXT,t,e))):(i=O1(i,new fl(fl.VTEXT,t,e)),s=!0):rk(e)&&(rk(t)||(s=!0),i=O1(i,new fl(fl.WIDGET,t,e)));i&&(r[n]=i),s&&oae(t,r,n)}}function I9t(t,e,r,n,i){for(var s=t.children,o=k9t(s,e.children),a=o.children,l=s.length,u=a.length,d=l>u?l:u,f=0;f=i.length?e.length:i[u],O=0;O=M&&l.push(I)}for(var A=l.slice(),j=0,H=[],W=[],re,K=0;K";default:return V9t(t)}}function V9t(t){var e=[],r=t.tagName;return t.namespaceURI==="http://www.w3.org/1999/xhtml"&&(r=r.toLowerCase()),e.push("<"+r+q9t(t)+G9t(t)),j9t.indexOf(r)>-1?e.push(" />"):(e.push(">"),t.childNodes.length?e.push.apply(e,t.childNodes.map(Uxe)):t.textContent||t.innerText?e.push(cK(t.textContent||t.innerText)):t.innerHTML&&e.push(t.innerHTML),e.push("")),e.join("")}function U9t(t,e){var r=typeof t[e];return e==="style"&&Object.keys(t.style).length>0?!0:t.hasOwnProperty(e)&&(r==="string"||r==="boolean"||r==="number")&&e!=="nodeName"&&e!=="className"&&e!=="tagName"&&e!=="textContent"&&e!=="innerText"&&e!=="namespaceURI"&&e!=="innerHTML"}function H9t(t){if(typeof t=="string")return t;var e="";return Object.keys(t).forEach(function(r){var n=t[r];r=r.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}),e+=r+":"+n+";"}),e}function G9t(t){var e=t.dataset,r=[];for(var n in e)r.push({name:"data-"+n,value:e[n]});return r.length?Hxe(r):""}function Hxe(t){var e=[];return t.forEach(function(r){var n=r.name,i=r.value;n==="style"&&(i=H9t(i)),e.push(n+'="'+W9t(i)+'"')}),e.length?" "+e.join(" "):""}function q9t(t){var e=[];for(var r in t)U9t(t,r)&&e.push({name:r,value:t[r]});for(var n in t._attributes)for(var i in t._attributes[n]){var s=t._attributes[n][i],o=(s.prefix?s.prefix+":":"")+i;e.push({name:o,value:s.value})}return t.className&&e.push({name:"class",value:t.className}),e.length?Hxe(e):""}function cK(t){var e="";return typeof t=="string"?e=t:t&&(e=t.toString()),e.replace(/&/g,"&").replace(//g,">")}function W9t(t){return cK(t).replace(/"/g,""")}var hK=zxe,Z9t=Bxe,Y9t=jxe,X9t=Vxe,J9t=B9t,uae="http://www.w3.org/1999/xhtml",Gxe=tl;function tl(t,e,r){if(!(this instanceof tl))return new tl(t);var n=r===void 0?uae:r||null;this.tagName=n===uae?String(t).toUpperCase():t,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=e||null,this.namespaceURI=n,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}tl.prototype.type="DOMElement";tl.prototype.nodeType=1;tl.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e};tl.prototype.replaceChild=function(e,r){e.parentNode&&e.parentNode.removeChild(e);var n=this.childNodes.indexOf(r);return r.parentNode=null,this.childNodes[n]=e,e.parentNode=this,r};tl.prototype.removeChild=function(e){var r=this.childNodes.indexOf(e);return this.childNodes.splice(r,1),e.parentNode=null,e};tl.prototype.insertBefore=function(e,r){e.parentNode&&e.parentNode.removeChild(e);var n=r==null?-1:this.childNodes.indexOf(r);return n>-1?this.childNodes.splice(n,0,e):this.childNodes.push(e),e.parentNode=this,e};tl.prototype.setAttributeNS=function(e,r,n){var i=null,s=r,o=r.indexOf(":");if(o>-1&&(i=r.substr(0,o),s=r.substr(o+1)),this.tagName==="INPUT"&&r==="type")this.type=n;else{var a=this._attributes[e]||(this._attributes[e]={});a[s]={value:n,prefix:i}}};tl.prototype.getAttributeNS=function(e,r){var n=this._attributes[e],i=n&&n[r]&&n[r].value;return this.tagName==="INPUT"&&r==="type"?this.type:typeof i!="string"?null:i};tl.prototype.removeAttributeNS=function(e,r){var n=this._attributes[e];n&&delete n[r]};tl.prototype.hasAttributeNS=function(e,r){var n=this._attributes[e];return!!n&&r in n};tl.prototype.setAttribute=function(e,r){return this.setAttributeNS(null,e,r)};tl.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)};tl.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)};tl.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)};tl.prototype.removeEventListener=X9t;tl.prototype.addEventListener=Y9t;tl.prototype.dispatchEvent=Z9t;tl.prototype.focus=function(){};tl.prototype.toString=function(){return J9t(this)};tl.prototype.getElementsByClassName=function(e){var r=e.split(" "),n=[];return hK(this,function(i){if(i.nodeType===1){var s=i.className||"",o=s.split(" ");r.every(function(a){return o.indexOf(a)!==-1})&&n.push(i)}}),n};tl.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var r=[];return hK(this.childNodes,function(n){n.nodeType===1&&(e==="*"||n.tagName.toLowerCase()===e)&&r.push(n)}),r};tl.prototype.contains=function(e){return hK(this,function(r){return e===r})||!1};var dK=Gxe,K9t=gm;function gm(t){if(!(this instanceof gm))return new gm;this.childNodes=[],this.parentNode=null,this.ownerDocument=t||null}gm.prototype.type="DocumentFragment";gm.prototype.nodeType=11;gm.prototype.nodeName="#document-fragment";gm.prototype.appendChild=dK.prototype.appendChild;gm.prototype.replaceChild=dK.prototype.replaceChild;gm.prototype.removeChild=dK.prototype.removeChild;gm.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")};var Q9t=fK;function fK(t){}fK.prototype.initEvent=function(e,r,n){this.type=e,this.bubbles=r,this.cancelable=n};fK.prototype.preventDefault=function(){};var ext=zxe,txt=O9t,rxt=N9t,kE=Gxe,nxt=K9t,ixt=Q9t,sxt=Bxe,oxt=jxe,axt=Vxe,lxt=yP;function yP(){if(!(this instanceof yP))return new yP;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var Hf=yP.prototype;Hf.createTextNode=function(e){return new rxt(e,this)};Hf.createElementNS=function(e,r){var n=e===null?null:String(e);return new kE(r,this,n)};Hf.createElement=function(e){return new kE(e,this)};Hf.createDocumentFragment=function(){return new nxt(this)};Hf.createEvent=function(e){return new ixt};Hf.createComment=function(e){return new txt(e,this)};Hf.getElementById=function(e){e=String(e);var r=ext(this.childNodes,function(n){if(String(n.id)===e)return n});return r||null};Hf.getElementsByClassName=kE.prototype.getElementsByClassName;Hf.getElementsByTagName=kE.prototype.getElementsByTagName;Hf.contains=kE.prototype.contains;Hf.removeEventListener=axt;Hf.addEventListener=oxt;Hf.dispatchEvent=sxt;var uxt=lxt,cxt=new uxt,cae=typeof dS<"u"?dS:typeof window<"u"?window:{},hxt=cxt,d6;typeof document<"u"?d6=document:(d6=cae["__GLOBAL_DOCUMENT_CACHE@4"],d6||(d6=cae["__GLOBAL_DOCUMENT_CACHE@4"]=hxt));var qxe=d6,bq=Pxe,Wxe=YO,Zxe=dxt;function dxt(t,e,r){for(var n in e){var i=e[n];i===void 0?hae(t,n,i,r):Wxe(i)?(hae(t,n,i,r),i.hook&&i.hook(t,n,r?r[n]:void 0)):bq(i)?fxt(t,e,r,n,i):t[n]=i}}function hae(t,e,r,n){if(n){var i=n[e];if(Wxe(i))i.unhook&&i.unhook(t,e,r);else if(e==="attributes")for(var s in i)t.removeAttribute(s);else if(e==="style")for(var o in i)t.style[o]="";else typeof i=="string"?t[e]="":t[e]=null}}function fxt(t,e,r,n,i){var s=r?r[n]:void 0;if(n==="attributes"){for(var o in i){var a=i[o];a===void 0?t.removeAttribute(o):t.setAttribute(o,a)}return}if(s&&bq(s)&&dae(s)!==dae(i)){t[n]=i;return}bq(t[n])||(t[n]={});var l=n==="style"?"":void 0;for(var u in i){var d=i[u];t[n][u]=d===void 0?l:d}}function dae(t){if(Object.getPrototypeOf)return Object.getPrototypeOf(t);if(t.__proto__)return t.__proto__;if(t.constructor)return t.constructor.prototype}var fae=qxe,pxt=Zxe,mxt=LE,gxt=WO,yxt=r9,vxt=Axe,Yxe=Xxe;function Xxe(t,e){var r=e&&e.document||fae,n=e?e.warn:null;if(t=vxt(t).a,yxt(t))return t.init();if(gxt(t))return r.createTextNode(t.text);if(!mxt(t))return n&&n("Item is not a valid virtual dom node",t),null;var i=t.namespace===null?r.createElement(t.tagName):r.createElementNS(t.namespace,t.tagName),s=t.properties;pxt(i,s);for(var o=t.children,a=0;a>0,o=t[s],n===i)return o>=e&&o<=r;if(or)i=s-1;else return!0}return!1}function bxt(t,e){return t>e?1:-1}var mae=r9,Cxt=Sxt;function Sxt(t,e){return mae(t)&&mae(e)?"name"in t&&"name"in e?t.id===e.id:t.init===e.init:!1}var Ext=Zxe,Mxt=r9,ov=kxe,Txt=Cxt,Ixt=Rxt;function Rxt(t,e,r){var n=t.type,i=t.vNode,s=t.patch;switch(n){case ov.REMOVE:return Lxt(e,i);case ov.INSERT:return kxt(e,s,r);case ov.VTEXT:return Axt(e,i,s,r);case ov.WIDGET:return Pxt(e,i,s,r);case ov.VNODE:return $xt(e,i,s,r);case ov.ORDER:return Oxt(e,s),e;case ov.PROPS:return Ext(e,s,i.properties),e;case ov.THUNK:return Nxt(e,r.patch(e,s,r));default:return e}}function Lxt(t,e){var r=t.parentNode;return r&&r.removeChild(t),Kxe(t,e),null}function kxt(t,e,r){var n=r.render(e,r);return t&&t.appendChild(n),t}function Axt(t,e,r,n){var i;if(t.nodeType===3)t.replaceData(0,t.length,r.text),i=t;else{var s=t.parentNode;i=n.render(r,n),s&&i!==t&&s.replaceChild(i,t)}return i}function Pxt(t,e,r,n){var i=Txt(e,r),s;i?s=r.update(e,t)||t:s=n.render(r,n);var o=t.parentNode;return o&&s!==t&&o.replaceChild(s,t),i||Kxe(t,e),s}function $xt(t,e,r,n){var i=t.parentNode,s=n.render(r,n);return i&&s!==t&&i.replaceChild(s,t),s}function Kxe(t,e){typeof e.destroy=="function"&&Mxt(e)&&e.destroy(t)}function Oxt(t,e){for(var r=t.childNodes,n={},i,s,o,a=0;a=l++?null:r[o.to])}function Nxt(t,e){return t&&e&&t!==e&&t.parentNode&&t.parentNode.replaceChild(e,t),e}var Dxt=qxe,Fxt=lK,zxt=Yxe,Bxt=xxt,gae=Ixt,jxt=Qxe;function Qxe(t,e,r){return r=r||{},r.patch=r.patch&&r.patch!==Qxe?r.patch:Vxt,r.render=r.render||zxt,r.patch(t,e,r)}function Vxt(t,e,r){var n=Hxt(e);if(n.length===0)return t;var i=Bxt(t,e.a,n),s=t.ownerDocument;!r.document&&s!==Dxt&&(r.document=s);for(var o=0;o + * Available under the MIT License + * ECMAScript compliant, uniform cross-browser split method + */var t4t=function(e){var r=String.prototype.split,n=/()??/.exec("")[1]===e,i;return i=function(s,f,a){if(Object.prototype.toString.call(f)!=="[object RegExp]")return r.call(s,f,a);var l=[],u=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.extended?"x":"")+(f.sticky?"y":""),d=0,f=new RegExp(f.source,u+"g"),m,v,b,M;for(s+="",n||(m=new RegExp("^"+f.source+"$(?!\\s)",u)),a=a===e?-1>>>0:a>>>0;(v=f.exec(s))&&(b=v.index+v[0].length,!(b>d&&(l.push(s.slice(d,v.index)),!n&&v.length>1&&v[0].replace(m,function(){for(var O=1;O1&&v.index=a)));)f.lastIndex===v.index&&f.lastIndex++;return d===s.length?(M||!f.test(""))&&l.push(""):l.push(s.slice(d)),l.length>a?l.slice(0,a):l},i}(),r4t=t4t,n4t=/([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/,i4t=/^\.|#/,s4t=o4t;function o4t(t,e){if(!t)return"DIV";var r=!e.hasOwnProperty("id"),n=r4t(t,n4t),i=null;i4t.test(n[1])&&(i="DIV");var s,o,a,l;for(l=0;l=0&&this._events[e].splice(n,1),this._events[e].length||delete this._events[e]}}on(e,r){this._events[e]=this._events[e]||[],this._events[e].push(r)}_listens(e){return e in this._events}}class Hc{constructor(){this._subscriptions=[]}push(e){this._subscriptions.push(e)}unsubscribe(){for(const e of this._subscriptions)e.unsubscribe();this._subscriptions=[]}}class qc extends XO{constructor(e,r,n){super(),this._activated$=new uy(!1),this._configurationSubject$=new dn,this._activated=!1,this._container=r,this._name=e,this._navigator=n,this._subscriptions=new Hc,this._configuration$=this._configurationSubject$.pipe(po(this.defaultConfiguration),Ja((i,s)=>{for(let o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);return i}),Ci(1),Bn()),this._configuration$.subscribe(()=>{})}get activated(){return this._activated}get activated$(){return this._activated$}get defaultConfiguration(){return this._getDefaultConfiguration()}get configuration$(){return this._configuration$}get name(){return this._name}activate(e){this._activated||(e!==void 0&&this._configurationSubject$.next(e),this._activated=!0,this._activate(),this._activated$.next(!0))}configure(e){this._configurationSubject$.next(e)}deactivate(){this._activated&&(this._activated=!1,this._deactivate(),this._container.domRenderer.clear(this._name),this._container.glRenderer.clear(this._name),this._activated$.next(!1))}fire(e,r){super.fire(e,r)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}resize(){}}var ad;(function(t){t[t.Hidden=0]="Hidden",t[t.Loading=1]="Loading",t[t.Visible=2]="Visible"})(ad||(ad={}));class l4e extends qc{constructor(e,r,n){super(e,r,n)}_activate(){const e=this.configuration$.pipe(Qn(n=>!!n.id),vn(n=>!n.src),Yr(n=>this._getImageSrc$(n.id).pipe(Vo(i=>(console.error(i),Pi())))),Ci(1),Bn()),r=this._subscriptions;r.push(e.pipe(Ct(n=>({src:n}))).subscribe(n=>{this._configurationSubject$.next(n)})),r.push(ei(this.configuration$,e).pipe(vn(([n,i])=>!!n.src&&n.src!==i),Qn()).subscribe(([,n])=>{window.URL.revokeObjectURL(n)})),r.push(this._configuration$.pipe(qn(void 0,n=>n.state),Yr(n=>ei(vi(n.state),this._navigator.stateService.currentImage$)),Yr(([n,i])=>{const s=ei(vi(i.id),i.image$.pipe(vn(o=>!!o),Ct(o=>o.src)));return n===ad.Visible?s.pipe(Qn()):s}),qn(([n,i],[s,o])=>n===s&&i===o),Ct(([n,i])=>({id:n,src:i}))).subscribe(this._configurationSubject$)),r.push(ei(this._configuration$,this._container.configurationService.exploreUrl$,this._container.renderService.size$).pipe(Ct(([n,i,s])=>{if(!n.src)return{name:this._name,vNode:Ar.h("div",[])};const o=s.width<=640||s.height<=480?".mapillary-cover-compact":"";if(n.state===ad.Hidden){const l=Ar.h("div.mapillary-cover-container.mapillary-cover-done"+o,[this._getCoverBackgroundVNode(n)]);return{name:this._name,vNode:l}}const a=Ar.h("div.mapillary-cover-container"+o,[this._getCoverButtonVNode(n,i)]);return{name:this._name,vNode:a}})).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{state:ad.Visible}}_getCoverButtonVNode(e,r){const n=e.state===ad.Loading?"div.mapillary-cover.mapillary-cover-loading":"div.mapillary-cover",i=Ar.h("div.mapillary-cover-button",[Ar.h("div.mapillary-cover-button-icon",[])]),s=Ar.h("a.mapillary-cover-logo",{href:r,target:"_blank"},[]),o=Ar.h("div.mapillary-cover-indicator",{onclick:()=>{this.configure({state:ad.Loading})}},[]);return Ar.h(n,[this._getCoverBackgroundVNode(e),o,i,s])}_getCoverBackgroundVNode(e){const r={style:{backgroundImage:`url(${e.src})`}},n=[];return e.state===ad.Loading&&n.push(Ar.h("div.mapillary-cover-spinner",{},[])),Ar.h("div.mapillary-cover-background",r,n)}_getImageSrc$(e){return va.create(r=>{this._navigator.api.getImages$([e]).subscribe(n=>{for(const i of n){const s=typeof e=="number"?e.toString():e;if(i.node_id===s){this._navigator.api.data.getImageBuffer(i.node.thumb.url).then(o=>{const a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{r.next(a.src),r.complete()},a.onerror=()=>{r.error(new Error(`Failed to load cover image (${e})`))};const l=new Blob([o]);a.src=window.URL.createObjectURL(l)},o=>{r.error(o)});return}}r.error(new ca(`Non existent cover key: ${e}`))},n=>{r.error(n)})})}}l4e.componentName="cover";class u4e extends qc{_activate(){this._subscriptions.push(ei(this._container.configurationService.exploreUrl$,this._navigator.stateService.currentImage$,this._container.renderService.size$).pipe(Ct(([e,r,n])=>{const i=this._makeAttribution(r.creatorUsername,e,r.id,r.capturedAt,n.width);return{name:this._name,vNode:i}})).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}makeImageUrl(e,r){return`${e}/app/?pKey=${r}&focus=photo`}_makeAttribution(e,r,n,i,s){const o=s<=640,a=this._makeDate(i,o),l=this._makeBy(e,r,n,o),u=o?".mapillary-attribution-compact":"";return Ar.h("div.mapillary-attribution-container"+u,{},[...l,a])}_makeBy(e,r,n,i){const s=Ar.h("div.mapillary-attribution-logo",[]);return e?this._makeCreatorBy(s,e,r,n,i):this._makeGeneralBy(s,r,n,i)}_makeCreatorBy(e,r,n,i,s){const o=Ar.h("a.mapillary-attribution-icon-container",{href:n,rel:"noreferrer",target:"_blank"},[e]),a=s?`${r}`:`image by ${r}`,l=Ar.h("div.mapillary-attribution-username",{textContent:a},[]),u=Ar.h("a.mapillary-attribution-image-container",{href:this.makeImageUrl(n,i),rel:"noreferrer",target:"_blank"},[l]);return[o,u]}_makeGeneralBy(e,r,n,i){const s=Ar.h("div.mapillary-attribution-username",{textContent:"images by"},[]),o=Ar.h("div.mapillary-attribution-icon-container",{},[e]),a=Ar.h("div.mapillary-attribution-username",{textContent:"contributors"},[]),l=[o,a];return i||l.unshift(s),[Ar.h("a.mapillary-attribution-image-container",{href:this.makeImageUrl(r,n),rel:"noreferrer",target:"_blank"},l)]}_makeDate(e,r){const n=new Date(e).toDateString().split(" "),i=(n.length>3?r?[n[3]]:[n[1],n[2]+",",n[3]]:n).join(" ");return Ar.h("div.mapillary-attribution-date",{textContent:i},[])}}u4e.componentName="attribution";class Nh{constructor(){this._unprojectDepth=200}basicToCanvas(e,r,n,i,s){const o=i.unprojectBasic([e,r],this._unprojectDepth);return this.projectToCanvas(o,n,s)}basicToCanvasSafe(e,r,n,i,s){const o=this.basicToViewportSafe(e,r,i,s);return o===null?null:this.viewportToCanvas(o[0],o[1],n)}basicToViewport(e,r,n,i){const s=n.unprojectBasic([e,r],this._unprojectDepth);return this.projectToViewport(s,i)}basicToViewportSafe(e,r,n,i){const s=n.unprojectBasic([e,r],this._unprojectDepth);return this.worldToCamera(s,i)[2]>0?null:this.projectToViewport(s,i)}cameraToViewport(e,r){const n=new st().fromArray(e).applyMatrix4(r.projectionMatrix);return[n.x,n.y]}canvasPosition(e,r){const n=r.getBoundingClientRect(),i=e.clientX-n.left-r.clientLeft,s=e.clientY-n.top-r.clientTop;return[i,s]}canvasToBasic(e,r,n,i,s){const o=this.unprojectFromCanvas(e,r,n,s).toArray();return i.projectBasic(o)}canvasToViewport(e,r,n){const[i,s]=this.containerToCanvas(n),o=2*e/i-1,a=1-2*r/s;return[o,a]}containerToCanvas(e){return[e.offsetWidth,e.offsetHeight]}getBasicDistances(e,r){const n=this.viewportToBasic(-1,1,e,r),i=this.viewportToBasic(1,1,e,r),s=this.viewportToBasic(1,-1,e,r),o=this.viewportToBasic(-1,-1,e,r);let a=0,l=0,u=0,d=0;return n[1]<0&&i[1]<0&&(a=n[1]>i[1]?-n[1]:-i[1]),i[0]>1&&s[0]>1&&(l=i[0]1&&o[1]>1&&(u=s[1]n[0]?-o[0]:-n[0]),[a,l,u,d]}getPixelDistances(e,r,n){const i=this.viewportToBasic(-1,1,r,n),s=this.viewportToBasic(1,1,r,n),o=this.viewportToBasic(1,-1,r,n),a=this.viewportToBasic(-1,-1,r,n);let l=0,u=0,d=0,f=0;const[m,v]=this.containerToCanvas(e);if(i[1]<0&&s[1]<0){const b=i[1]>s[1]?i[0]:s[0],M=this.basicToCanvas(b,0,e,r,n);l=M[1]>0?M[1]:0}if(s[0]>1&&o[0]>1){const b=s[0]1&&a[1]>1){const b=o[1]i[0]?a[1]:i[1],M=this.basicToCanvas(0,b,e,r,n);f=M[0]>0?M[0]:0}return[l,u,d,f]}insideElement(e,r){const n=r.getBoundingClientRect(),i=n.left+r.clientLeft,s=i+r.clientWidth,o=n.top+r.clientTop,a=o+r.clientHeight;return e.clientX>i&&e.clientXo&&e.clientY0)return null;const s=this.projectToViewport(e,n);return this.viewportToCanvas(s[0],s[1],r)}projectToViewport(e,r){const n=new st(e[0],e[1],e[2]).project(r);return[n.x,n.y]}unprojectFromCanvas(e,r,n,i){const s=this.canvasToViewport(e,r,n);return this.unprojectFromViewport(s[0],s[1],i)}unprojectFromViewport(e,r,n){return new st(e,r,1).unproject(n)}viewportToBasic(e,r,n,i){const s=new st(e,r,1).unproject(i).toArray();return n.projectBasic(s)}viewportToCanvas(e,r,n){const[i,s]=this.containerToCanvas(n),o=i*(e+1)/2,a=-s*(r-1)/2;return[o,a]}worldToCamera(e,r){return new st(e[0],e[1],e[2]).applyMatrix4(r.matrixWorldInverse).toArray()}}var w2;(function(t){t[t.Automatic=0]="Automatic",t[t.Large=1]="Large",t[t.Small=2]="Small"})(w2||(w2={}));class c4e extends qc{constructor(e,r,n){super(e,r,n),this._spatial=new Uc,this._viewportCoords=new Nh,this._svgNamespace="http://www.w3.org/2000/svg",this._distinctThreshold=Math.PI/360,this._animationSpeed=.075}_activate(){const e=this._subscriptions,r=this._container.renderService.renderCamera$.pipe(Ct(l=>{let u=this._spatial.degToRad(l.perspective.fov),d=l.perspective.aspect===Number.POSITIVE_INFINITY?Math.PI:Math.atan(l.perspective.aspect*Math.tan(.5*u))*2;return[this._spatial.azimuthalToBearing(l.rotation.phi),d]}),qn((l,u)=>Math.abs(u[0]-l[0])l.state.currentImage.id)),this._navigator.panService.panImages$).pipe(Ct(([l,u])=>{const d=l.state.currentImage,f=l.state.currentTransform;if(Li(d.cameraType))return[Math.PI,Math.PI];const m=this._computeProjectedPoints(f),v=this._spatial.degToRad(this._computeHorizontalFov(m));let b=v/2,M=v/2;for(const[O,,I]of u){const A=this._spatial.wrap(O.compassAngle-d.compassAngle,-180,180);A<0?b=this._spatial.degToRad(Math.abs(A))+I/2:M=this._spatial.degToRad(Math.abs(A))+I/2}return[b,M]}),qn(([l,u],[d,f])=>Math.abs(d-l)l.state.currentImage.id)),this._container.renderService.bearing$).pipe(Ct(([l,u])=>this._spatial.degToRad(l.state.currentImage.compassAngle-u))),s=new dn,o=s.pipe(Ja((l,u)=>u(l),{alpha:0,curr:[0,0,0],prev:[0,0,0]}),Ct(l=>{const u=Lw.smootherstep(l.alpha,0,1),d=l.curr,f=l.prev;return[this._interpolate(f[0],d[0],u),this._interpolate(f[1],d[1],u)]}));e.push(n.pipe(Ct(l=>u=>{const d=Lw.smootherstep(u.alpha,0,1),f=u.curr,m=u.prev,v=[this._interpolate(m[0],f[0],d),this._interpolate(m[1],f[1],d)];return{alpha:0,curr:l.slice(),prev:v}})).subscribe(s)),e.push(n.pipe(Yr(()=>this._container.renderService.renderCameraFrame$.pipe(Wu(1),Ja(l=>l+this._animationSpeed,0),M9e(l=>l<=1+this._animationSpeed),Ct(l=>Math.min(l,1)))),Ct(l=>u=>({alpha:l,curr:u.curr.slice(),prev:u.prev.slice()}))).subscribe(s));const a=ei(i,o).pipe(Ct(([l,u])=>[l,u[0],u[1]]));e.push(ei(r,a,this._configuration$,this._container.renderService.size$).pipe(Ct(([[l,u],[d,f,m],v,b])=>{const M=this._createBackground(l),O=this._createFovIndicator(f,m,d),I=this._createNorth(l),A=this._createCircleSectorCompass(this._createCircleSector(Math.max(Math.PI/20,u),"#FFF")),j=v.size===w2.Small||v.size===w2.Automatic&&b.width<640?".mapillary-bearing-compact":"";return{name:this._name,vNode:Ar.h("div.mapillary-bearing-indicator-container"+j,{oncontextmenu:H=>{H.preventDefault()}},[M,O,I,A])}})).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{size:w2.Automatic}}_createFovIndicator(e,r,n){const i=this._createFovArc(e,r),s=Ar.h("g",{attributes:{transform:"translate(18,18)"},namespace:this._svgNamespace},[i]);return Ar.h("svg",{attributes:{viewBox:"0 0 36 36"},namespace:this._svgNamespace,style:{height:"36px",left:"2px",position:"absolute",top:"2px",transform:`rotateZ(${this._spatial.radToDeg(n)}deg)`,width:"36px"}},[s])}_createFovArc(e,r){const s=e+r;if(s>2*Math.PI-Math.PI/90)return Ar.h("circle",{attributes:{cx:"0",cy:"0","fill-opacity":"0",r:`${16.75}`,stroke:"#FFF","stroke-width":`${2.5}`},namespace:this._svgNamespace},[]);let o=-Math.PI/2-e,a=o+s,l=16.75*Math.cos(o),u=16.75*Math.sin(o),d=16.75*Math.cos(a),f=16.75*Math.sin(a),m=s>=Math.PI?1:0,v=`M ${l} ${u} A ${16.75} ${16.75} 0 ${m} 1 ${d} ${f}`;return Ar.h("path",{attributes:{d:v,"fill-opacity":"0",stroke:"#FFF","stroke-width":`${2.5}`},namespace:this._svgNamespace},[])}_createCircleSectorCompass(e){let r=Ar.h("g",{attributes:{transform:"translate(1,1)"},namespace:this._svgNamespace},[e]);return Ar.h("svg",{attributes:{viewBox:"0 0 2 2"},namespace:this._svgNamespace,style:{height:"26px",left:"7px",position:"absolute",top:"7px",width:"26px"}},[r])}_createCircleSector(e,r){if(e>2*Math.PI-Math.PI/90)return Ar.h("circle",{attributes:{cx:"0",cy:"0",fill:r,r:"1"},namespace:this._svgNamespace},[]);let n=-Math.PI/2-e/2,i=n+e,s=Math.cos(n),o=Math.sin(n),a=Math.cos(i),l=Math.sin(i),u=e>=Math.PI?1:0,d=`M 0 0 ${s} ${o} A 1 1 0 ${u} 1 ${a} ${l}`;return Ar.h("path",{attributes:{d,fill:r},namespace:this._svgNamespace},[])}_createNorth(e){const r=Ar.h("div.mapillary-bearing-north",[]);return Ar.h("div.mapillary-bearing-north-container",{style:{transform:`rotateZ(${this._spatial.radToDeg(-e)}deg)`}},[r])}_createBackground(e){return Ar.h("div.mapillary-bearing-indicator-background",{style:{transform:`rotateZ(${this._spatial.radToDeg(-e)}deg)`}},[Ar.h("div.mapillary-bearing-indicator-background-circle",[]),Ar.h("div.mapillary-bearing-indicator-background-arrow-container",[Ar.h("div.mapillary-bearing-indicator-background-arrow",[])])])}_computeProjectedPoints(e){return aK(e,[[1,0]],[[0,.5]],12,this._viewportCoords)}_computeHorizontalFov(e){const r=e.map(i=>this._coordToFov(i[0]));return Math.min(...r)}_coordToFov(e){return this._spatial.radToDeg(2*Math.atan(e))}_interpolate(e,r,n){return(1-n)*e+n*r}}c4e.componentName="bearing";class h4e extends qc{constructor(e,r,n){super(e,r,n)}_activate(){const e=this._subscriptions;e.push(ei(this._navigator.stateService.currentImage$.pipe(Yr(r=>r.sequenceEdges$),vn(r=>r.cached)),this._configuration$).pipe(Yr(r=>{let n=r[0],i=r[1],s=Math.max(0,Math.min(4,i.depth.sequence)),o=this._cache$(n.edges,Cr.Next,s),a=this._cache$(n.edges,Cr.Prev,s);return Vs(o,a).pipe(Vo(l=>(console.error("Failed to cache sequence edges.",l),Pi())))})).subscribe(()=>{})),e.push(ei(this._navigator.stateService.currentImage$.pipe(Yr(r=>ei(vi(r),r.spatialEdges$.pipe(vn(n=>n.cached))))),this._configuration$).pipe(Yr(([[r,n],i])=>{let s=n.edges,o=i.depth,a=Math.max(0,Math.min(2,o.spherical)),l=Li(r.cameraType)?0:Math.max(0,Math.min(3,o.step)),u=Li(r.cameraType)?0:Math.max(0,Math.min(1,o.turn)),d=this._cache$(s,Cr.Spherical,a),f=this._cache$(s,Cr.StepForward,l),m=this._cache$(s,Cr.StepBackward,l),v=this._cache$(s,Cr.StepLeft,l),b=this._cache$(s,Cr.StepRight,l),M=this._cache$(s,Cr.TurnLeft,u),O=this._cache$(s,Cr.TurnRight,u),I=this._cache$(s,Cr.TurnU,u);return Vs(f,m,v,b,d,M,O,I).pipe(Vo(A=>(console.error("Failed to cache spatial edges.",A),Pi())))})).subscribe(()=>{}))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{depth:{spherical:1,sequence:2,step:1,turn:0}}}_cache$(e,r,n){return tS(vi(e),vi(n)).pipe(S9e(i=>{let s=i[0],o=i[1],a=[];if(o>0)for(let l of s)l.data.direction===r&&a.push(tS(this._navigator.graphService.cacheImage$(l.target).pipe(Qi(u=>this._imageToEdges$(u,r))),vi(o-1)));return Na(a).pipe(l5())}),Wu(1))}_imageToEdges$(e,r){return([Cr.Next,Cr.Prev].indexOf(r)>-1?e.sequenceEdges$:e.spatialEdges$).pipe(Qn(n=>n.cached),Ct(n=>n.edges))}}h4e.componentName="cache";class $p extends ca{constructor(e){super(e??"The request was cancelled."),Object.setPrototypeOf(this,$p.prototype),this.name="CancelMapillaryError"}}class z4t{constructor(e,r){this._spatial=new Uc,this._minThresholdWidth=320,this._maxThresholdWidth=1480,this._minThresholdHeight=240,this._maxThresholdHeight=820,this._configure(e),this._resize(r),this._reset()}get minWidth(){return this._minWidth}get maxWidth(){return this._maxWidth}get containerWidth(){return this._containerWidth}get containerWidthCss(){return this._containerWidthCss}get containerMarginCss(){return this._containerMarginCss}get containerLeftCss(){return this._containerLeftCss}get containerHeight(){return this._containerHeight}get containerHeightCss(){return this._containerHeightCss}get containerBottomCss(){return this._containerBottomCss}get stepCircleSize(){return this._stepCircleSize}get stepCircleSizeCss(){return this._stepCircleSizeCss}get stepCircleMarginCss(){return this._stepCircleMarginCss}get turnCircleSize(){return this._turnCircleSize}get turnCircleSizeCss(){return this._turnCircleSizeCss}get outerRadius(){return this._outerRadius}get innerRadius(){return this._innerRadius}get shadowOffset(){return this._shadowOffset}configure(e){this._configure(e),this._reset()}resize(e){this._resize(e),this._reset()}angleToCoordinates(e){return[Math.cos(e),Math.sin(e)]}relativeAngleToCoordiantes(e,r){let n=this._spatial.wrapAngle(e-r);return this.angleToCoordinates(n)}_configure(e){this._minWidth=e.minWidth,this._maxWidth=this._getMaxWidth(e.minWidth,e.maxWidth)}_resize(e){this._elementWidth=e.width,this._elementHeight=e.height}_reset(){this._containerWidth=this._getContainerWidth(this._elementWidth,this._elementHeight),this._containerHeight=this._getContainerHeight(this.containerWidth),this._stepCircleSize=this._getStepCircleDiameter(this._containerHeight),this._turnCircleSize=this._getTurnCircleDiameter(this.containerHeight),this._outerRadius=this._getOuterRadius(this._containerHeight),this._innerRadius=this._getInnerRadius(this._containerHeight),this._shadowOffset=3,this._containerWidthCss=this._numberToCssPixels(this._containerWidth),this._containerMarginCss=this._numberToCssPixels(-.5*this._containerWidth),this._containerLeftCss=this._numberToCssPixels(Math.floor(.5*this._elementWidth)),this._containerHeightCss=this._numberToCssPixels(this._containerHeight),this._containerBottomCss=this._numberToCssPixels(Math.floor(-.08*this._containerHeight)),this._stepCircleSizeCss=this._numberToCssPixels(this._stepCircleSize),this._stepCircleMarginCss=this._numberToCssPixels(-.5*this._stepCircleSize),this._turnCircleSizeCss=this._numberToCssPixels(this._turnCircleSize)}_getContainerWidth(e,r){let n=(e-this._minThresholdWidth)/(this._maxThresholdWidth-this._minThresholdWidth),i=(r-this._minThresholdHeight)/(this._maxThresholdHeight-this._minThresholdHeight),s=Math.max(0,Math.min(1,Math.min(n,i)));return s=.04*Math.round(25*s),this._minWidth+s*(this._maxWidth-this._minWidth)}_getContainerHeight(e){return .77*e}_getStepCircleDiameter(e){return .34*e}_getTurnCircleDiameter(e){return .3*e}_getOuterRadius(e){return .31*e}_getInnerRadius(e){return .125*e}_numberToCssPixels(e){return e+"px"}_getMaxWidth(e,r){return e>r?e:r}}class B4t{constructor(e,r){this._isEdge=!1,this._spatial=new Uc,this._calculator=new z4t(e,r),this._image=null,this._rotation={phi:0,theta:0},this._epsilon=.5*Math.PI/180,this._highlightKey=null,this._distinguishSequence=!1,this._needsRender=!1,this._stepEdges=[],this._turnEdges=[],this._sphericalEdges=[],this._sequenceEdgeKeys=[],this._stepDirections=[Cr.StepForward,Cr.StepBackward,Cr.StepLeft,Cr.StepRight],this._turnDirections=[Cr.TurnLeft,Cr.TurnRight,Cr.TurnU],this._turnNames={},this._turnNames[Cr.TurnLeft]="mapillary-direction-turn-left",this._turnNames[Cr.TurnRight]="mapillary-direction-turn-right",this._turnNames[Cr.TurnU]="mapillary-direction-turn-around";let n=!!document.documentMode;this._isEdge=!n&&!!window.StyleMedia}get needsRender(){return this._needsRender}render(e){this._needsRender=!1;let r=this._rotation,n=[],i=[];return Li(this._image.cameraType)?n=n.concat(this._createSphericalArrows(e,r)):(n=n.concat(this._createPerspectiveToSphericalArrows(e,r)),n=n.concat(this._createStepArrows(e,r)),i=i.concat(this._createTurnArrows(e))),this._getContainer(n,i,r)}setEdges(e,r){this._setEdges(e,r),this._setNeedsRender()}setImage(e){this._image=e,this._clearEdges(),this._setNeedsRender()}setRenderCamera(e){let r=e.rotation;Math.abs(r.phi-this._rotation.phi)-1){this._stepEdges.push(n);continue}if(this._turnDirections.indexOf(i)>-1){this._turnEdges.push(n);continue}n.data.direction===Cr.Spherical&&this._sphericalEdges.push(n)}if(this._distinguishSequence&&r!=null){let n=this._sphericalEdges.concat(this._stepEdges).concat(this._turnEdges);for(let i of n){let s=i.target;for(let o of r.imageIds)if(o===s){this._sequenceEdgeKeys.push(s);break}}}}_createSphericalArrows(e,r){let n=[];for(let i of this._sphericalEdges)n.push(this._createVNodeByKey(e,i.target,i.data.worldMotionAzimuth,r,this._calculator.outerRadius,"mapillary-direction-arrow-spherical"));for(let i of this._stepEdges)n.push(this._createSphericalToPerspectiveArrow(e,i.target,i.data.worldMotionAzimuth,r,i.data.direction));return n}_createSphericalToPerspectiveArrow(e,r,n,i,s){let o=Math.PI/8,a=i.phi;switch(s){case Cr.StepBackward:a=i.phi-Math.PI;break;case Cr.StepLeft:a=i.phi+Math.PI/2;break;case Cr.StepRight:a=i.phi-Math.PI/2;break}return Math.abs(this._spatial.wrapAngle(n-a)){e.moveTo$(r).subscribe(void 0,d=>{d instanceof $p||console.error(d)})};return this._createVNode(r,n,i,s,o,"mapillary-direction-circle",l,a)}_createVNodeByDirection(e,r,n,i,s){let o=a=>{e.moveDir$(s).subscribe(void 0,l=>{l instanceof $p||console.error(l)})};return this._createVNode(r,n,i,this._calculator.outerRadius,"mapillary-direction-arrow-step","mapillary-direction-circle",o)}_createVNodeByTurn(e,r,n,i){let s=d=>{e.moveDir$(i).subscribe(void 0,f=>{f instanceof $p||console.error(f)})},o={height:this._calculator.turnCircleSizeCss,transform:"rotate(0)",width:this._calculator.turnCircleSizeCss};switch(i){case Cr.TurnLeft:o.left="5px",o.top="5px";break;case Cr.TurnRight:o.right="5px",o.top="5px";break;case Cr.TurnU:o.left="5px",o.bottom="5px";break}let a={attributes:{"data-id":r},onclick:s,style:o},l="mapillary-direction-turn-circle";this._sequenceEdgeKeys.indexOf(r)>-1&&(l+="-sequence"),this._highlightKey===r&&(l+="-highlight");let u=Ar.h(`div.${n}`,{},[]);return Ar.h("div."+l,a,[u])}_createVNodeInactive(e,r,n){return this._createVNode(e,r,n,this._calculator.outerRadius,"mapillary-direction-arrow-inactive","mapillary-direction-circle-inactive")}_createVNode(e,r,n,i,s,o,a,l){let u=this._calculator.angleToCoordinates(r-n.phi),d=Math.round(-i*u[1]+.5*this._calculator.containerWidth),f=Math.round(-i*u[0]+.5*this._calculator.containerHeight),m=this._calculator.relativeAngleToCoordiantes(r,n.phi),v=this._calculator.shadowOffset,b=-v*m[1],M=v*m[0],O=`drop-shadow(${b}px ${M}px 1px rgba(0,0,0,0.8))`,I={style:{"-webkit-filter":O,filter:O}},A=Ar.h("div."+s,I,[]),j=-this._spatial.radToDeg(r-n.phi),H=l?`translate(${d}px, ${f}px) rotate(${j}deg) translateZ(-0.01px)`:`translate(${d}px, ${f}px) rotate(${j}deg)`,W={attributes:{"data-id":e},onclick:a,style:{height:this._calculator.stepCircleSizeCss,marginLeft:this._calculator.stepCircleMarginCss,marginTop:this._calculator.stepCircleMarginCss,transform:H,width:this._calculator.stepCircleSizeCss}};return this._sequenceEdgeKeys.indexOf(e)>-1&&(o+="-sequence"),this._highlightKey===e&&(o+="-highlight"),Ar.h("div."+o,W,[A])}_getContainer(e,r,n){let i=this._isEdge?"rotateX(60deg)":`perspective(${this._calculator.containerWidthCss}) rotateX(60deg)`,s={oncontextmenu:o=>{o.preventDefault()},style:{bottom:this._calculator.containerBottomCss,height:this._calculator.containerHeightCss,left:this._calculator.containerLeftCss,marginLeft:this._calculator.containerMarginCss,transform:i,width:this._calculator.containerWidthCss}};return Ar.h("div.mapillary-direction-perspective",s,r.concat(e))}}class d4e extends qc{constructor(e,r,n,i){super(e,r,n),this._renderer=i||new B4t(this.defaultConfiguration,{height:r.container.offsetHeight,width:r.container.offsetWidth}),this._hoveredIdSubject$=new dn,this._hoveredId$=this._hoveredIdSubject$.pipe(js())}fire(e,r){super.fire(e,r)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}_activate(){const e=this._subscriptions;e.push(this._configuration$.subscribe(r=>{this._renderer.setConfiguration(r)})),e.push(this._container.renderService.size$.subscribe(r=>{this._renderer.resize(r)})),e.push(this._navigator.stateService.currentImage$.pipe(Pa(r=>{this._container.domRenderer.render$.next({name:this._name,vNode:Ar.h("div",{},[])}),this._renderer.setImage(r)}),Bi(this._configuration$),Yr(([r,n])=>ei(r.spatialEdges$,n.distinguishSequence?this._navigator.graphService.cacheSequence$(r.sequenceId).pipe(Vo(i=>(console.error(`Failed to cache sequence (${r.sequenceId})`,i),vi(null)))):vi(null)))).subscribe(([r,n])=>{this._renderer.setEdges(r,n)})),e.push(this._container.renderService.renderCameraFrame$.pipe(Pa(r=>{this._renderer.setRenderCamera(r)}),Ct(()=>this._renderer),vn(r=>r.needsRender),Ct(r=>({name:this._name,vNode:r.render(this._navigator)}))).subscribe(this._container.domRenderer.render$)),e.push(ei(this._container.domRenderer.element$,this._container.renderService.renderCamera$,this._container.mouseService.mouseMove$.pipe(po(null)),this._container.mouseService.mouseUp$.pipe(po(null))).pipe(Ct(([r])=>{let n=r.getElementsByClassName("mapillary-direction-perspective");for(let i=0;i{const n="hover",i={id:r,target:this,type:n};this.fire(n,i)}))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{distinguishSequence:!1,maxWidth:460,minWidth:260}}}d4e.componentName="direction";const j4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +#define tau 6.28318530718 + +uniform sampler2D projectorTex; +uniform float opacity; + +varying vec4 vRstq; + +void main() +{ + vec3 b = normalize(vRstq.xyz); + float lat = -asin(b.y); + float lng = atan(b.x, b.z); + float x = lng / tau + 0.5; + float y = lat / tau * 2.0 + 0.5; + vec4 baseColor = texture2D(projectorTex, vec2(x, y)); + baseColor.a = opacity; + gl_FragColor = baseColor; +} +`,V4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,U4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +#define tau 6.28318530718 + +uniform sampler2D projectorTex; +uniform float curtain; +uniform float opacity; + +varying vec4 vRstq; + +void main() +{ + vec3 b = normalize(vRstq.xyz); + float lat = -asin(b.y); + float lng = atan(b.x, b.z); + float x = lng / tau + 0.5; + float y = lat / tau * 2.0 + 0.5; + + bool inverted = curtain < 0.5; + + float curtainMin = inverted ? curtain + 0.5 : curtain - 0.5; + float curtainMax = curtain; + + bool insideCurtain = inverted ? + x > curtainMin || x < curtainMax : + x > curtainMin && x < curtainMax; + + vec4 baseColor; + if (insideCurtain) { + baseColor = texture2D(projectorTex, vec2(x, y)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,H4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,G4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; +uniform float focal; +uniform float k1; +uniform float k2; +uniform float scale_x; +uniform float scale_y; +uniform float radial_peak; + +varying vec4 vRstq; + +void main() +{ + float x = vRstq.x; + float y = vRstq.y; + float z = vRstq.z; + + float r = sqrt(x * x + y * y); + float theta = atan(r, z); + + if (radial_peak > 0. && theta > radial_peak) { + theta = radial_peak; + } + + float theta2 = theta * theta; + float theta_d = theta * (1.0 + theta2 * (k1 + theta2 * k2)); + float s = focal * theta_d / r; + + float u = scale_x * s * x + 0.5; + float v = -scale_y * s * y + 0.5; + + vec4 baseColor; + if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,q4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,W4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; +uniform float focal; +uniform float k1; +uniform float k2; +uniform float scale_x; +uniform float scale_y; +uniform float radial_peak; +uniform float curtain; + +varying vec4 vRstq; + +void main() +{ + float x = vRstq.x; + float y = vRstq.y; + float z = vRstq.z; + + float r2 = sqrt(x * x + y * y); + float theta = atan(r2, z); + + if (radial_peak > 0. && theta > radial_peak) { + theta = radial_peak; + } + + float theta2 = theta * theta; + float theta_d = theta * (1.0 + theta2 * (k1 + theta2 * k2)); + float s = focal * theta_d / r2; + + float u = scale_x * s * x + 0.5; + float v = -scale_y * s * y + 0.5; + + vec4 baseColor; + if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,Z4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,Y4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; +uniform float focal; +uniform float k1; +uniform float k2; +uniform float scale_x; +uniform float scale_y; +uniform float radial_peak; + +varying vec4 vRstq; + +void main() +{ + float x = vRstq.x / vRstq.z; + float y = vRstq.y / vRstq.z; + float r2 = x * x + y * y; + + if (radial_peak > 0. && r2 > radial_peak * sqrt(r2)) { + r2 = radial_peak * radial_peak; + } + + float d = 1.0 + k1 * r2 + k2 * r2 * r2; + float u = scale_x * focal * d * x + 0.5; + float v = - scale_y * focal * d * y + 0.5; + + vec4 baseColor; + if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,X4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,J4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; +uniform float focal; +uniform float k1; +uniform float k2; +uniform float scale_x; +uniform float scale_y; +uniform float radial_peak; +uniform float curtain; + +varying vec4 vRstq; + +void main() +{ + float x = vRstq.x / vRstq.z; + float y = vRstq.y / vRstq.z; + float r2 = x * x + y * y; + + if (radial_peak > 0. && r2 > radial_peak * sqrt(r2)) { + r2 = radial_peak * radial_peak; + } + + float d = 1.0 + k1 * r2 + k2 * r2 * r2; + float u = scale_x * focal * d * x + 0.5; + float v = - scale_y * focal * d * y + 0.5; + + vec4 baseColor; + if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,K4t=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,Q4t=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; + +varying vec4 vRstq; + +void main() +{ + float u = vRstq.x / vRstq.w; + float v = vRstq.y / vRstq.w; + + vec4 baseColor; + if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,ewt=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,twt=` +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +uniform sampler2D projectorTex; +uniform float opacity; +uniform float curtain; + +varying vec4 vRstq; + +void main() +{ + float u = vRstq.x / vRstq.w; + float v = vRstq.y / vRstq.w; + + vec4 baseColor; + if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) { + baseColor = texture2D(projectorTex, vec2(u, v)); + baseColor.a = opacity; + } else { + baseColor = vec4(0.0, 0.0, 0.0, 0.0); + } + + gl_FragColor = baseColor; +} +`,rwt=` +#ifdef GL_ES +precision highp float; +#endif + +uniform mat4 projectorMat; + +varying vec4 vRstq; + +void main() +{ + vRstq = projectorMat * vec4(position, 1.0); + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`;class dl{}dl.fisheye={fragment:G4t,vertex:q4t};dl.fisheyeCurtain={fragment:W4t,vertex:Z4t};dl.perspective={fragment:Y4t,vertex:X4t};dl.perspectiveCurtain={fragment:J4t,vertex:K4t};dl.perspectiveDistorted={fragment:Q4t,vertex:ewt};dl.perspectiveDistortedCurtain={fragment:twt,vertex:rwt};dl.spherical={fragment:j4t,vertex:V4t};dl.sphericalCurtain={fragment:U4t,vertex:H4t};class f4e{constructor(e,r){this._imagePlaneDepth=e??200,this._imageSphereRadius=r??200}createMesh(e,r){return Li(r.cameraType)?this._createImageSphere(e,r):pP(r.cameraType)?this._createImagePlaneFisheye(e,r):this._createImagePlane(e,r)}createFlatMesh(e,r,n,i,s,o){let a=this._createTexture(e.image),l=this._createDistortedPlaneMaterialParameters(r,a),u=new od(l),d=this._getFlatImagePlaneGeoFromBasic(r,n,i,s,o);return new ya(d,u)}createCurtainMesh(e,r){return Li(r.cameraType)?this._createSphereCurtainMesh(e,r):pP(r.cameraType)?this._createCurtainMeshFisheye(e,r):this._createCurtainMesh(e,r)}createDistortedCurtainMesh(e,r){return this._createDistortedCurtainMesh(e,r)}_createCurtainMesh(e,r){let n=this._createTexture(e.image),i=this._createCurtainPlaneMaterialParameters(r,n),s=new od(i),o=this._useMesh(r,e)?this._getImagePlaneGeo(r,e):this._getRegularFlatImagePlaneGeo(r);return new ya(o,s)}_createCurtainMeshFisheye(e,r){let n=this._createTexture(e.image),i=this._createCurtainPlaneMaterialParametersFisheye(r,n),s=new od(i),o=this._useMesh(r,e)?this._getImagePlaneGeoFisheye(r,e):this._getRegularFlatImagePlaneGeo(r);return new ya(o,s)}_createDistortedCurtainMesh(e,r){let n=this._createTexture(e.image),i=this._createDistortedCurtainPlaneMaterialParameters(r,n),s=new od(i),o=this._getRegularFlatImagePlaneGeo(r);return new ya(o,s)}_createSphereCurtainMesh(e,r){let n=this._createTexture(e.image),i=this._createCurtainSphereMaterialParameters(r,n),s=new od(i);return this._useMesh(r,e)?new ya(this._getImageSphereGeo(r,e),s):new ya(this._getFlatImageSphereGeo(r),s)}_createImageSphere(e,r){let n=this._createTexture(e.image),i=this._createSphereMaterialParameters(r,n),s=new od(i);return this._useMesh(r,e)?new ya(this._getImageSphereGeo(r,e),s):new ya(this._getFlatImageSphereGeo(r),s)}_createImagePlane(e,r){let n=this._createTexture(e.image),i=this._createPlaneMaterialParameters(r,n),s=new od(i),o=this._useMesh(r,e)?this._getImagePlaneGeo(r,e):this._getRegularFlatImagePlaneGeo(r);return new ya(o,s)}_createImagePlaneFisheye(e,r){let n=this._createTexture(e.image),i=this._createPlaneMaterialParametersFisheye(r,n),s=new od(i),o=this._useMesh(r,e)?this._getImagePlaneGeoFisheye(r,e):this._getRegularFlatImagePlaneGeoFisheye(r);return new ya(o,s)}_createSphereMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.spherical.fragment,side:sd,transparent:!0,uniforms:{opacity:{value:1},projectorMat:{value:e.rt},projectorTex:{value:r}},vertexShader:dl.spherical.vertex}}_createCurtainSphereMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.sphericalCurtain.fragment,side:sd,transparent:!0,uniforms:{curtain:{value:1},opacity:{value:1},projectorMat:{value:e.rt},projectorTex:{value:r}},vertexShader:dl.sphericalCurtain.vertex}}_createPlaneMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.perspective.fragment,side:sd,transparent:!0,uniforms:{focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:r},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:dl.perspective.vertex}}_createPlaneMaterialParametersFisheye(e,r){return{depthWrite:!1,fragmentShader:dl.fisheye.fragment,side:sd,transparent:!0,uniforms:{focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:r},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:dl.fisheye.vertex}}_createCurtainPlaneMaterialParametersFisheye(e,r){return{depthWrite:!1,fragmentShader:dl.fisheyeCurtain.fragment,side:sd,transparent:!0,uniforms:{curtain:{value:1},focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:r},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:dl.fisheyeCurtain.vertex}}_createCurtainPlaneMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.perspectiveCurtain.fragment,side:sd,transparent:!0,uniforms:{curtain:{value:1},focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:r},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:dl.perspectiveCurtain.vertex}}_createDistortedCurtainPlaneMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.perspectiveDistortedCurtain.fragment,side:sd,transparent:!0,uniforms:{curtain:{value:1},opacity:{value:1},projectorMat:{value:e.projectorMatrix()},projectorTex:{value:r}},vertexShader:dl.perspectiveDistortedCurtain.vertex}}_createDistortedPlaneMaterialParameters(e,r){return{depthWrite:!1,fragmentShader:dl.perspectiveDistorted.fragment,side:sd,transparent:!0,uniforms:{opacity:{value:1},projectorMat:{value:e.projectorMatrix()},projectorTex:{value:r}},vertexShader:dl.perspectiveDistorted.vertex}}_createTexture(e){let r=new Tu(e);return r.minFilter=Lh,r.needsUpdate=!0,r}_useMesh(e,r){return r.mesh.vertices.length&&e.hasValidScale}_getImageSphereGeo(e,r){const n=e.srtInverse;let i=5*e.scale,s=this._imageSphereRadius*e.scale,o=r.mesh.vertices,a=o.length/3,l=new Float32Array(o.length);for(let m=0;m{this._updateTexture(o)}),i=r.textureUpdated$.subscribe(o=>{this._needsRender=!0}),s=()=>{n.unsubscribe(),i.unsubscribe(),r.dispose()};if(e in this._providerDisposers){let o=this._providerDisposers[e];o(),delete this._providerDisposers[e]}this._providerDisposers[e]=s}updateTextureImage(e,r){this._needsRender=!0;const n=this._extend({},this._scene.planes,this._scene.planesOld,this._scene.planesPeriphery);for(const i in n){if(!n.hasOwnProperty(i)||i!==r.id)continue;let a=n[i].material.uniforms.projectorTex.value;a.image=e,a.needsUpdate=!0}}render(e,r){const n=this._scene.planes,i=this._scene.planesOld,s=this._scene.planesPeriphery,o=Object.keys(i).length?1:this._alpha,a=Object.keys(i).length?1:Math.floor(this._alpha);for(const l in n){if(!n.hasOwnProperty(l))continue;const u=n[l];u.material.uniforms.opacity.value=o}for(const l in i){if(!i.hasOwnProperty(l))continue;const u=i[l];u.material.uniforms.opacity.value=this._alphaOld}for(const l in s){if(!s.hasOwnProperty(l))continue;const u=s[l];u.material.uniforms.opacity.value=a}r.render(this._scene.scenePeriphery,e),r.render(this._scene.scene,e),r.render(this._scene.sceneOld,e);for(const l in n){if(!n.hasOwnProperty(l))continue;const u=n[l];u.material.uniforms.opacity.value=this._alpha}r.render(this._scene.scene,e)}clearNeedsRender(){this._needsRender=!1}dispose(){this._scene.clear()}_updateFrameId(e){this._frameId=e}_updateAlpha(e){return e===this._alpha?!1:(this._alpha=e,!0)}_updateAlphaOld(e){return e<1||this._alphaOld===0?!1:(this._alphaOld=Math.max(0,this._alphaOld-this._fadeOutSpeed),!0)}_updateImagePlanes(e){if(e.currentImage==null||e.currentImage.id===this._currentKey)return!1;let r=e.previousImage!=null?e.previousImage.id:null,n=e.currentImage.id;if(this._previousKey!==r&&this._previousKey!==n&&this._previousKey in this._providerDisposers){let o=this._providerDisposers[this._previousKey];o(),delete this._providerDisposers[this._previousKey]}if(r!=null){if(r!==this._currentKey&&r!==this._previousKey){let o=this._factory.createMesh(e.previousImage,e.previousTransform);const a={};a[r]=o,this._scene.updateImagePlanes(a)}this._previousKey=r}this._currentKey=n;let i=this._factory.createMesh(e.currentImage,e.currentTransform);const s={};return s[n]=i,this._scene.updateImagePlanes(s),this._alphaOld=1,!0}_updateTexture(e){this._needsRender=!0;const r=this._scene.planes;for(const n in r){if(!r.hasOwnProperty(n))continue;let s=r[n].material,o=s.uniforms.projectorTex.value;s.uniforms.projectorTex.value=null,o.dispose(),s.uniforms.projectorTex.value=e}}_extend(e,...r){for(const n of r)for(const i in n)n.hasOwnProperty(i)&&(e[i]=n[i]);return e}}var hy;(function(t){t[t.Background=0]="Background",t[t.Opaque=1]="Opaque"})(hy||(hy={}));class m4e{constructor(e){this._api=e,this._urls$=new Map}getImage$(e){let r;const n=new Promise((i,s)=>{r=s});return[va.create(i=>{this._api.data.getImageBuffer(e,n).then(s=>{r=null;const o=new Image;o.crossOrigin="Anonymous",o.onload=()=>{window.URL.revokeObjectURL(o.src),i.next(o),i.complete()},o.onerror=()=>{r=null,window.URL.revokeObjectURL(o.src),i.error(new Error("Failed to load image tile"))};const a=new Blob([s]);o.src=window.URL.createObjectURL(a)},s=>{r=null,i.error(s)})}),()=>{r&&r()}]}getURLs$(e,r){const n=this._inventId(e,r);if(this._urls$.has(n))return this._urls$.get(n);const i={imageId:e,z:r},s=this._api.getImageTiles$(i).pipe(Ct(o=>o.node),Fd(()=>{this._urls$.delete(n)}),Cf(),Bn());return this._urls$.set(n,s),s}_inventId(e,r){return`${e}-${r}`}}class Cq{constructor(){this._tiles=new Map,this._urlLevels=new Set,this._urls=new Map}add(e,r){if(this._tiles.has(e))throw new Error(`Image tile already stored (${e})`);this._tiles.set(e,r)}addURLs(e,r){const n=this._urls;for(const i of r){const s=this.inventId(i);if(this._urls.has(s))throw new Error(`URL already stored (${s})`);n.set(s,i.url)}this._urlLevels.add(e)}dispose(){this._tiles.forEach(e=>window.URL.revokeObjectURL(e.src)),this._tiles.clear(),this._urls.clear(),this._urlLevels.clear()}get(e){return this._tiles.get(e)}getURL(e){return this._urls.get(e)}has(e){return this._tiles.has(e)}hasURL(e){return this._urls.has(e)}hasURLLevel(e){return this._urlLevels.has(e)}inventId(e){return`${e.z}-${e.x}-${e.y}`}}class g4e{constructor(){this._viewportCoords=new Nh}computeRegionOfInterest(e,r,n){const i=this._viewportBoundaryPoints(4),s=this._viewportPointsBoundingBox(i,e,n);this._clipBoundingBox(s);const o=2/r.width,a=2/r.height,l=[[-.5*o,.5*a],[.5*o,.5*a],[.5*o,-.5*a],[-.5*o,-.5*a]],u=this._viewportPointsBoundingBox(l,e,n),d=u.minXthis._viewportCoords.viewportToBasic(s[0],s[1],n,r.perspective));return Li(n.cameraType)?this._boundingBoxSpherical(i):this._boundingBox(i)}_boundingBox(e){const r={maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY};for(let n=0;nthis._sign(s-o)),n.sort((s,o)=>this._sign(s-o));const i=this._intervalSpherical(r);return{maxX:i[1],maxY:n[n.length-1],minX:i[0],minY:n[0]}}_intervalSpherical(e){let r=0,n=-1;for(let s=0;sr&&(r=o,n=s)}return e[0]+1-e[e.length-1]>r?[e[0],e[e.length-1]]:[e[n+1],e[n]]}_clipBoundingBox(e){e.minX=Math.max(0,Math.min(1,e.minX)),e.maxX=Math.max(0,Math.min(1,e.maxX)),e.minY=Math.max(0,Math.min(1,e.minY)),e.maxY=Math.max(0,Math.min(1,e.maxY))}_sign(e){return e>0?1:e<0?-1:0}}const iwt=11,y4e=1024;function wae(t,e,r){return Math.max(e,Math.min(r,t))}function v4e(t){return y4e/gK(t)}function gK(t){return Math.pow(2,t.z-t.max)}function swt(t){const e=Math.max(t.w,t.h);return Math.log(e)/Math.log(2)}function _4e(t){return Math.ceil(swt(t))}function owt(t,e,r){return Math.max(e,Math.min(r,_4e(t)))}function bae(t,e,r){const n=v4e(r),i=e.w,s=e.h,o=Math.ceil(i/n)-1,a=Math.ceil(s/n)-1,l=wae(Math.floor(i*t[0]/n),0,o),u=wae(Math.floor(s*t[1]/n),0,a);return{x:l,y:u}}function hB(t,e,r){const i=1/gK(r)*y4e,s=i*t.x,o=i*t.y,a=Math.min(i,e.w-s);return{h:Math.min(i,e.h-o),x:s,y:o,w:a}}function Cae(t,e,r){return r*t<=e&&ee.x){const o=v4e(n),a=Math.ceil(r.w/o)-1;for(let l=t.x;l<=a;l++)i.push(l);for(let l=0;l<=e.x;l++)i.push(l)}else for(let o=t.x;o<=e.x;o++)i.push(o);const s=[];for(const o of i)for(let a=t.y;a<=e.y;a++)s.push({x:o,y:a});return s}function Sae(t){return t.w>0&&t.h>0}class Sq{constructor(e,r,n,i,s,o,a){const l={h:n,w:r};Sae(l)||console.warn(`Original image size (${r}, ${n}) is invalid (${e}). Tiles will not be loaded.`),this._imageId=e,this._size=l,this._level={max:_4e(this._size),z:-1},this._holder=new Hc,this._updated$=new dn,this._createdSubject$=new dn,this._created$=this._createdSubject$.pipe(Ci(1),Bn()),this._holder.push(this._created$.subscribe(()=>{})),this._hasSubject$=new dn,this._has$=this._hasSubject$.pipe(po(!1),Ci(1),Bn()),this._holder.push(this._has$.subscribe(()=>{})),this._renderedLevel=new Set,this._rendered=new Map,this._subscriptions=new Map,this._urlSubscriptions=new Map,this._loader=s,this._store=o,this._background=i,this._renderer=a,this._aborts=[],this._render=null,this._disposed=!1}get disposed(){return this._disposed}get hasTexture$(){return this._has$}get id(){return this._imageId}get textureUpdated$(){return this._updated$}get textureCreated$(){return this._created$}abort(){this._subscriptions.forEach(e=>e.unsubscribe()),this._subscriptions.clear();for(const e of this._aborts)e();this._aborts=[]}dispose(){if(this._disposed){console.warn(`Texture already disposed (${this._imageId})`);return}this._urlSubscriptions.forEach(e=>e.unsubscribe()),this._urlSubscriptions.clear(),this.abort(),this._render!=null&&(this._render.target.dispose(),this._render.target=null,this._render.camera=null,this._render=null),this._store.dispose(),this._holder.unsubscribe(),this._renderedLevel.clear(),this._background=null,this._renderer=null,this._disposed=!0}setRegionOfInterest(e){if(!Sae(this._size))return;const r=1/e.pixelWidth,n=1/e.pixelHeight,i=owt({h:n,w:r},iwt,this._level.max);i!==this._level.z&&(this.abort(),this._level.z=i,this._renderedLevel.clear(),this._rendered.forEach((l,u)=>{l.z===i&&this._renderedLevel.add(u)})),this._render==null&&this._initRender();const s=bae([e.bbox.minX,e.bbox.minY],this._size,this._level),o=bae([e.bbox.maxX,e.bbox.maxY],this._size,this._level),a=lwt(s,o,this._size,this._level);this._fetchTiles(i,a)}_fetchTile(e){const r=this._loader.getImage$(e.url),n=r[0],i=r[1];this._aborts.push(i);const s=this._store.inventId(e),o=n.subscribe(a=>{const l=hB(e,this._size,this._level);this._renderToTarget(l,a),this._subscriptions.delete(s),this._removeFromArray(i,this._aborts),this._markRendered(e),this._store.add(s,a),this._updated$.next(!0)},a=>{this._subscriptions.delete(s),this._removeFromArray(i,this._aborts),console.error(a)});o.closed||this._subscriptions.set(s,o)}_fetchTiles(e,r){const i=(this._store.hasURLLevel(e)?vi(void 0):this._loader.getURLs$(this._imageId,e).pipe(Pa(s=>{this._store.hasURLLevel(e)||this._store.addURLs(e,s)}))).subscribe(()=>{if(e===this._level.z){for(const s of r){const o={x:s.x,y:s.y,z:e,url:null},a=this._store.inventId(o);if(!(this._renderedLevel.has(a)||this._subscriptions.has(a))){if(this._store.has(a)){const l=hB(s,this._size,this._level);this._renderToTarget(l,this._store.get(a)),this._markRendered(o),this._updated$.next(!0);continue}o.url=this._store.getURL(a),this._fetchTile(o)}}this._urlSubscriptions.delete(e)}},s=>{this._urlSubscriptions.delete(e),console.error(s)});i.closed||this._urlSubscriptions.set(e,i)}_initRender(){const e=this._size.w/2,r=this._size.h/2,n=-1,i=1,s=new BO(-e,e,r,-r,n,i);s.position.z=1;const o=this._renderer.getContext(),a=o.getParameter(o.MAX_TEXTURE_SIZE),l=Math.max(this._size.w,this._size.h),u=a>l?1:a/l,d=Math.floor(u*this._size.w),f=Math.floor(u*this._size.h),m=new Y1(d,f,{depthBuffer:!1,format:c5,magFilter:Lh,minFilter:Lh,stencilBuffer:!1});this._render={camera:s,target:m};const v=hB({x:0,y:0},this._size,{max:this._level.max,z:0});this._renderToTarget(v,this._background),this._createdSubject$.next(m.texture),this._hasSubject$.next(!0)}_markRendered(e){const r=Array.from(this._rendered.entries()).filter(([i,s])=>s.z!==e.z);for(const[i,s]of r)awt(e,s)&&this._rendered.delete(i);const n=this._store.inventId(e);this._rendered.set(n,e),this._renderedLevel.add(n)}_removeFromArray(e,r){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}_renderToTarget(e,r){const n=new Tu(r);n.minFilter=Lh,n.needsUpdate=!0;const i=new zO(e.w,e.h),s=new k5({map:n,side:Rw}),o=new ya(i,s);o.position.x=-this._size.w/2+e.x+e.w/2,o.position.y=this._size.h/2-e.y-e.h/2;const a=new Gg;a.add(o);const l=this._renderer.getRenderTarget();this._renderer.resetState(),this._renderer.setRenderTarget(this._render.target),this._renderer.render(a,this._render.camera),this._renderer.setRenderTarget(l),a.remove(o),i.dispose(),s.dispose(),n.dispose()}}var Ai;(function(t){t[t.Custom=0]="Custom",t[t.Earth=1]="Earth",t[t.Traversing=2]="Traversing",t[t.Waiting=3]="Waiting",t[t.WaitingInteractively=4]="WaitingInteractively"})(Ai||(Ai={}));class x4e extends qc{constructor(e,r,n){super(e,r,n),this._imageTileLoader=new m4e(n.api),this._roiCalculator=new g4e,this._rendererOperation$=new dn,this._rendererCreator$=new dn,this._rendererDisposer$=new dn,this._renderer$=this._rendererOperation$.pipe(Ja((i,s)=>s(i),null),vn(i=>i!=null),qn(void 0,i=>i.frameId)),this._rendererCreator$.pipe(Ct(()=>i=>{if(i!=null)throw new Error("Multiple image plane states can not be created at the same time");return new nwt})).subscribe(this._rendererOperation$),this._rendererDisposer$.pipe(Ct(()=>i=>(i.dispose(),null))).subscribe(this._rendererOperation$)}_activate(){const e=this._subscriptions;e.push(this._renderer$.pipe(Ct(l=>{const u={name:this._name,renderer:{frameId:l.frameId,needsRender:l.needsRender,render:l.render.bind(l),pass:hy.Background}};return l.clearNeedsRender(),u})).subscribe(this._container.glRenderer.render$)),this._rendererCreator$.next(null),e.push(this._navigator.stateService.currentState$.pipe(Ct(l=>u=>(u.updateFrame(l),u))).subscribe(this._rendererOperation$));const r=this._container.configurationService.imageTiling$.pipe(Yr(l=>l?this._navigator.stateService.currentState$:new dn),qn(void 0,l=>l.state.currentImage.id),Bi(this._container.glRenderer.webGLRenderer$),Ct(([l,u])=>{const d=l.state,f=d.currentImage,m=d.currentTransform;return new Sq(f.id,m.basicWidth,m.basicHeight,f.image,this._imageTileLoader,new Cq,u)}),Ci(1),Bn());e.push(r.subscribe(()=>{})),e.push(r.pipe(Ct(l=>u=>(u.setTextureProvider(l.id,l),u))).subscribe(this._rendererOperation$)),e.push(r.pipe(If()).subscribe(l=>{l[0].abort()}));const n=this._container.configurationService.imageTiling$.pipe(Yr(l=>l?ei(this._navigator.stateService.state$,this._navigator.stateService.inTranslation$):new dn),Yr(([l,u])=>(l===Ai.Traversing||l===Ai.Waiting||l===Ai.WaitingInteractively)&&!u?this._container.renderService.renderCameraFrame$:Pi()),Ct(l=>({camera:l,height:l.size.height.valueOf(),lookat:l.camera.lookat.clone(),width:l.size.width.valueOf(),zoom:l.zoom.valueOf()})),If(),Ct(([l,u])=>{const d=l.width===u.width&&l.height===u.height&&l.zoom===u.zoom&&l.lookat.equals(u.lookat);return{camera:u.camera,stalled:d}}),qn((l,u)=>l.stalled===u.stalled),vn(l=>l.stalled),Bi(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(r.pipe(Yr(l=>n.pipe(Ct(([u,d,f])=>{const m=u.camera,v=new Nh().viewportToBasic(0,0,f,m.perspective);if(!(v[0]<0||v[1]<0||v[0]>1||v[1]>1))return[this._roiCalculator.computeRegionOfInterest(m,d,f),l]}),vn(u=>!!u))),vn(l=>!l[1].disposed)).subscribe(([l,u])=>{u.setRegionOfInterest(l)}));const i=r.pipe(Yr(l=>l.hasTexture$),po(!1),Ci(1),Bn());e.push(i.subscribe(()=>{})),e.push(this._navigator.panService.panImages$.pipe(vn(l=>l.length===0),Ct(()=>l=>(l.clearPeripheryPlanes(),l))).subscribe(this._rendererOperation$));const s=this._navigator.panService.panImages$.pipe(Yr(l=>Na(l).pipe(Qi(([u,d])=>ei(this._navigator.graphService.cacheImage$(u.id).pipe(Vo(f=>(console.error(`Failed to cache periphery image (${u.id})`,f),Pi()))),vi(d))))),js());e.push(s.pipe(Ct(([l,u])=>d=>(d.addPeripheryPlane(l,u),d))).subscribe(this._rendererOperation$)),e.push(s.pipe(Qi(([l])=>l.cacheImage$().pipe(Vo(()=>Pi()))),Ct(l=>u=>(u.updateTextureImage(l.image,l),u))).subscribe(this._rendererOperation$));const o=this._navigator.stateService.currentState$.pipe(Ct(l=>l.state.alpha<1),qn()),a=ei(this._container.mouseService.active$,this._container.touchService.active$,this._navigator.stateService.inMotion$,o).pipe(Ct(([l,u,d,f])=>!(l||u||d||f)),vn(l=>l));e.push(this._navigator.stateService.state$.pipe(Yr(l=>l===Ai.Traversing?this._navigator.panService.panImages$:Pi()),Yr(l=>a.pipe(Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentImage$,this._navigator.stateService.currentTransform$),Qi(([,u,d,f])=>vi([u,d,f,l])))),Yr(([l,u,d,f])=>{const m=l.camera.lookat.clone().sub(l.camera.position),M=[new Uc().viewingDirection(u.rotation).angleTo(m),void 0],O=new Nh().viewportToBasic(0,0,d,l.perspective);O[0]>=0&&O[0]<=1&&O[1]>=0&&O[1]<=1&&(M[0]=Number.NEGATIVE_INFINITY);for(const[I]of f){const j=new Uc().viewingDirection(I.rotation).angleTo(m);jPi())):Pi()})).subscribe())}_deactivate(){this._rendererDisposer$.next(null),this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}}x4e.componentName="image";class Mm{constructor(e,r,n){this._component=e,this._container=r,this._navigator=n,this._enabled=!1}get isEnabled(){return this._enabled}enable(){this._enabled||!this._component.activated||(this._enable(),this._enabled=!0,this._component.configure(this._getConfiguration(!0)))}disable(){this._enabled&&(this._disable(),this._enabled=!1,this._component.activated&&this._component.configure(this._getConfiguration(!1)))}}class uwt extends Mm{_enable(){const e=this._navigator.stateService.currentImage$.pipe(Yr(r=>r.sequenceEdges$));this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Bi(e)).subscribe(([r,n])=>{let i=null;switch(r.keyCode){case 38:i=Cr.Next;break;case 40:i=Cr.Prev;break;default:return}if(r.preventDefault(),!(!r.altKey||r.shiftKey||!n.cached)){for(const s of n.edges)if(s.data.direction===i){this._navigator.moveTo$(s.target).subscribe(void 0,o=>{o instanceof $p||console.error(o)});return}}})}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keySequenceNavigation:e}}}class cwt extends Mm{constructor(e,r,n,i){super(e,r,n),this._spatial=i}_enable(){const e=this._navigator.stateService.currentImage$.pipe(Yr(r=>r.spatialEdges$));this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Bi(e,this._navigator.stateService.currentState$)).subscribe(([r,n,i])=>{let s=Li(i.state.currentImage.cameraType),o=null;switch(r.keyCode){case 37:o=r.shiftKey&&!s?Cr.TurnLeft:Cr.StepLeft;break;case 38:o=r.shiftKey&&!s?Cr.Spherical:Cr.StepForward;break;case 39:o=r.shiftKey&&!s?Cr.TurnRight:Cr.StepRight;break;case 40:o=r.shiftKey&&!s?Cr.TurnU:Cr.StepBackward;break;default:return}if(r.preventDefault(),!(r.altKey||!n.cached||r.shiftKey&&s))if(!s)this._moveDir(o,n);else{const a={};a[Cr.StepBackward]=Math.PI,a[Cr.StepForward]=0,a[Cr.StepLeft]=Math.PI/2,a[Cr.StepRight]=-Math.PI/2;const l=this._rotationFromCamera(i.state.camera).phi,u=this._spatial.wrapAngle(l+a[o]),d=Math.PI/4,f=n.edges.filter(b=>b.data.direction===Cr.Spherical||b.data.direction===o);let m=Number.MAX_VALUE,v=null;for(const b of f){const M=Math.abs(this._spatial.wrapAngle(b.data.worldMotionAzimuth-u));M{r instanceof $p||console.error(r)})}_rotationFromCamera(e){let r=e.lookat.clone().sub(e.position),n=r.clone().dot(e.up),i=r.clone().sub(e.up.clone().multiplyScalar(n)),s=Math.atan2(i.y,i.x),o=Math.PI/2-this._spatial.angleToPlane(r.toArray(),[0,0,1]);return{phi:s,theta:o}}}class hwt extends Mm{constructor(e,r,n,i){super(e,r,n),this._viewportCoords=i}_enable(){this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe(([e,r,n])=>{if(e.altKey||e.ctrlKey||e.metaKey)return;let i=0;switch(e.key){case"+":i=1;break;case"-":i=-1;break;default:return}e.preventDefault();const s=this._viewportCoords.unprojectFromViewport(0,0,r.perspective),o=n.projectBasic(s.toArray());this._navigator.stateService.zoomIn(i,o)})}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keyZoom:e}}}class dwt extends Mm{_enable(){this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Bi(this._navigator.playService.playing$,this._navigator.playService.direction$,this._navigator.playService.speed$,this._navigator.stateService.currentImage$.pipe(Yr(e=>e.sequenceEdges$)),this._navigator.stateService.state$.pipe(Ct(e=>e===Ai.Earth),qn()))).subscribe(([e,r,n,i,s,o])=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){switch(e.key){case"D":if(!e.shiftKey)return;const a=r?null:n===Cr.Next?Cr.Prev:n===Cr.Prev?Cr.Next:null;a!=null&&this._navigator.playService.setDirection(a);break;case" ":if(e.shiftKey)return;if(!o)if(r)this._navigator.playService.stop();else for(let l of s.edges)l.data.direction===n&&this._navigator.playService.play();break;case"<":this._navigator.playService.setSpeed(i-.05);break;case">":this._navigator.playService.setSpeed(i+.05);break;default:return}e.preventDefault()}})}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keyPlay:e}}}class w4e extends qc{constructor(e,r,n){super(e,r,n),this._keyPlayHandler=new dwt(this,r,n),this._keySequenceNavigationHandler=new uwt(this,r,n),this._keySpatialNavigationHandler=new cwt(this,r,n,new Uc),this._keyZoomHandler=new hwt(this,r,n,new Nh)}get keyPlay(){return this._keyPlayHandler}get keySequenceNavigation(){return this._keySequenceNavigationHandler}get keySpatialNavigation(){return this._keySpatialNavigationHandler}get keyZoom(){return this._keyZoomHandler}_activate(){this._subscriptions.push(this._configuration$.subscribe(e=>{e.keyPlay?this._keyPlayHandler.enable():this._keyPlayHandler.disable(),e.keySequenceNavigation?this._keySequenceNavigationHandler.enable():this._keySequenceNavigationHandler.disable(),e.keySpatialNavigation?this._keySpatialNavigationHandler.enable():this._keySpatialNavigationHandler.disable(),e.keyZoom?this._keyZoomHandler.enable():this._keyZoomHandler.disable()}))}_deactivate(){this._subscriptions.unsubscribe(),this._keyPlayHandler.disable(),this._keySequenceNavigationHandler.disable(),this._keySpatialNavigationHandler.disable(),this._keyZoomHandler.disable()}_getDefaultConfiguration(){return{keyPlay:!0,keySequenceNavigation:!0,keySpatialNavigation:!0,keyZoom:!0}}}w4e.componentName="keyboard";class fwt{constructor(e,r){this._needsRender=!1,this._interactiveObjects=[],this._markers={},this._objectMarkers={},this._raycaster=r||new fP,this._scene=e||new Gg}get markers(){return this._markers}get needsRender(){return this._needsRender}add(e,r){e.id in this._markers&&this._dispose(e.id),e.createGeometry(r),this._scene.add(e.geometry),this._markers[e.id]=e;for(let n of e.getInteractiveObjects())this._interactiveObjects.push(n),this._objectMarkers[n.uuid]=e.id;this._needsRender=!0}clear(){for(const e in this._markers)this._markers.hasOwnProperty&&this._dispose(e);this._needsRender=!0}get(e){return this._markers[e]}getAll(){return Object.keys(this._markers).map(e=>this._markers[e])}has(e){return e in this._markers}intersectObjects([e,r],n){this._raycaster.setFromCamera(new bn(e,r),n);const i=this._raycaster.intersectObjects(this._interactiveObjects);for(const s of i)if(s.object.uuid in this._objectMarkers)return this._objectMarkers[s.object.uuid];return null}lerpAltitude(e,r,n){e in this._markers&&(this._markers[e].lerpAltitude(r,n),this._needsRender=!0)}remove(e){e in this._markers&&(this._dispose(e),this._needsRender=!0)}render(e,r){r.render(this._scene,e),this._needsRender=!1}update(e,r,n){if(!(e in this._markers))return;this._markers[e].updatePosition(r,n),this._needsRender=!0}_dispose(e){const r=this._markers[e];this._scene.remove(r.geometry);for(let n of r.getInteractiveObjects()){const i=this._interactiveObjects.indexOf(n);i!==-1?this._interactiveObjects.splice(i,1):console.warn(`Object does not exist (${n.id}) for ${e}`),delete this._objectMarkers[n.uuid]}r.disposeGeometry(),delete this._markers[e]}}class b4e extends qc{constructor(e,r,n){super(e,r,n),this._graphCalculator=new oK,this._markerScene=new fwt,this._markerSet=new hS,this._viewportCoords=new Nh,this._relativeGroundAltitude=-2}add(e){this._markerSet.add(e)}fire(e,r){super.fire(e,r)}get(e){return this._markerSet.get(e)}getAll(){return this._markerSet.getAll()}getMarkerIdAt(e){return new Promise((r,n)=>{this._container.renderService.renderCamera$.pipe(Qn(),Ct(i=>{const s=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._markerScene.intersectObjects(s,i.perspective)})).subscribe(i=>{r(i)},i=>{n(i)})})}has(e){return this._markerSet.has(e)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}remove(e){this._markerSet.remove(e)}removeAll(){this._markerSet.removeAll()}_activate(){const e=this._navigator.stateService.currentState$.pipe(Ct(b=>b.state.camera.position.z+this._relativeGroundAltitude),qn((b,M)=>Math.abs(b-M)<.01),Ci(1),Bn()),r=ei(e,this._navigator.stateService.reference$).pipe(Qn(),Ct(()=>{}),Ci(1),Bn()),n=this._configuration$.pipe(Ct(b=>({visibleBBoxSize:Math.max(1,Math.min(200,b.visibleBBoxSize))}))),i=this._navigator.stateService.currentImage$.pipe(Ct(b=>b.lngLat),Ci(1),Bn()),s=ei(n,i).pipe(Ct(([b,M])=>this._graphCalculator.boundingBoxCorners(M,b.visibleBBoxSize/2)),Ci(1),Bn()),o=ei(zp(vi(this._markerSet),this._markerSet.changed$),s).pipe(Ct(([b,M])=>b.search(M))),a=this._subscriptions;a.push(r.pipe(Yr(()=>o.pipe(Bi(this._navigator.stateService.reference$,e)))).subscribe(([b,M,O])=>{const I=this._markerScene,A=I.markers,j=Object.assign({},A);for(const H of b)if(H.id in A)delete j[H.id];else{const W=cd(H.lngLat.lng,H.lngLat.lat,M.alt+O,M.lng,M.lat,M.alt);I.add(H,W)}for(const H in j)j.hasOwnProperty(H)&&I.remove(H)})),a.push(r.pipe(Yr(()=>this._markerSet.updated$.pipe(Bi(s,this._navigator.stateService.reference$,e)))).subscribe(([b,[M,O],I,A])=>{const j=this._markerScene;for(const H of b){const W=j.has(H.id),re=H.lngLat.lat>M.lat&&H.lngLat.latM.lng&&H.lngLat.lng{const O=this._markerScene;for(const I of O.getAll()){const A=cd(I.lngLat.lng,I.lngLat.lat,b.alt+M,b.lng,b.lat,b.alt);O.update(I.id,A)}})),a.push(e.pipe(Wu(1),Bi(this._navigator.stateService.reference$,i)).subscribe(([b,M,O])=>{const I=this._markerScene,A=cd(O.lng,O.lat,M.alt+b,M.lng,M.lat,M.alt);for(const j of I.getAll()){const H=cd(j.lngLat.lng,j.lngLat.lat,M.alt+b,M.lng,M.lat,M.alt),W=H[0]-A[0],re=H[1]-A[1],K=Math.sqrt(W*W+re*re);K>50||I.lerpAltitude(j.id,b,Math.min(1,Math.max(0,1.2-1.2*K/50)))}})),a.push(this._navigator.stateService.currentState$.pipe(Ct(b=>{const M=this._markerScene;return{name:this._name,renderer:{frameId:b.id,needsRender:M.needsRender,render:M.render.bind(M),pass:hy.Opaque}}})).subscribe(this._container.glRenderer.render$));const l=ei(this._container.renderService.renderCamera$,this._container.mouseService.mouseMove$).pipe(Ct(([b,M])=>{const O=this._container.container,[I,A]=this._viewportCoords.canvasPosition(M,O),j=this._viewportCoords.canvasToViewport(I,A,O);return this._markerScene.intersectObjects(j,b.perspective)}),Ci(1),Bn()),u=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$).pipe(Ct(()=>!0)),d=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragEnd$).pipe(Ct(()=>!1)),f=Vs(u,d).pipe(po(!1));a.push(Vs(u.pipe(Bi(l)),ei(d,vi(null))).pipe(po([!1,null]),If()).subscribe(([b,M])=>{const O=M[0],I=O?"markerdragstart":"markerdragend",A=O?M[1]:b[1],H={marker:this._markerScene.get(A),target:this,type:I};this.fire(I,H)}));const m=Vs(this._container.mouseService.mouseDown$.pipe(Ct(()=>!0)),this._container.mouseService.documentMouseUp$.pipe(Ct(()=>!1))).pipe(po(!1));a.push(ei(this._container.mouseService.active$,l.pipe(qn()),m,f).pipe(Ct(([b,M,O,I])=>!b&&M!=null&&O||I),qn()).subscribe(b=>{b?(this._container.mouseService.claimMouse(this._name,1),this._container.mouseService.claimWheel(this._name,1)):(this._container.mouseService.unclaimMouse(this._name),this._container.mouseService.unclaimWheel(this._name))}));const v=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$).pipe(Bi(l,this._container.renderService.renderCamera$),Ct(([b,M,O])=>{const I=this._markerScene.get(M),A=this._container.container,[j,H]=this._viewportCoords.projectToCanvas(I.geometry.position.toArray(),A,O.perspective),[W,re]=this._viewportCoords.canvasPosition(b,A),K=[W-j,re-H];return[I,K,O]}),Ci(1),Bn());a.push(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDrag$).pipe(Bi(v,this._navigator.stateService.reference$,n)).subscribe(([b,[M,O,I],A,j])=>{if(!this._markerScene.has(M.id))return;const H=this._container.container,[W,re]=this._viewportCoords.canvasPosition(b,H),K=W-O[0],pe=re-O[1],[ge,fe]=this._viewportCoords.canvasToViewport(K,pe,H),ee=new st(ge,fe,1).unproject(I.perspective).sub(I.perspective.position).normalize(),be=Math.min(this._relativeGroundAltitude/ee.z,j.visibleBBoxSize/2-.1);if(be<0)return;const le=ee.clone().multiplyScalar(be).add(I.perspective.position);le.z=I.perspective.position.z+this._relativeGroundAltitude;const[ve,Pe]=A5(le.x,le.y,le.z,A.lng,A.lat,A.alt);this._markerScene.update(M.id,le.toArray(),{lat:Pe,lng:ve}),this._markerSet.update(M);const Fe="markerposition",We={marker:M,target:this,type:Fe};this.fire(Fe,We)}))}_deactivate(){this._subscriptions.unsubscribe(),this._markerScene.clear()}_getDefaultConfiguration(){return{visibleBBoxSize:100}}}b4e.componentName="marker";function pwt(t){return t>0?1:t<0?-1:0}function rR(t,e){return t.x<=Math.max(e.p1.x,e.p2.x)&&t.x>=Math.min(e.p1.x,e.p2.x)&&t.y>=Math.max(e.p1.y,e.p2.y)&&t.y>=Math.min(e.p1.y,e.p2.y)}function C4e(t,e){const r=t.p2.x-t.p1.x,n=t.p2.y-t.p1.y,i=e.p2.x-e.p1.x,s=e.p2.y-e.p1.y,o=r*s-n*i,a=r*r+n*n,l=i*i+s*s;return o*o<1e-10*a*l}function nR(t,e,r){const n=(e.y-t.y)*(r.x-e.x)-(r.y-e.y)*(e.x-t.x);return pwt(n)}function mwt(t,e){if(C4e(t,e))return!1;const r=nR(t.p1,t.p2,e.p1),n=nR(t.p1,t.p2,e.p2),i=nR(e.p1,e.p2,t.p1),s=nR(e.p1,e.p2,t.p2);return!!(r!==n&&i!==s||r===0&&rR(e.p1,t)||n===0&&rR(e.p2,t)||i===0&&rR(t.p1,e)||s===0&&rR(t.p2,e))}function gwt(t,e){if(C4e(t,e))return;const r=t.p1.x,n=t.p2.x,i=t.p1.y,s=t.p2.y,o=e.p1.x,a=e.p2.x,l=e.p1.y,u=e.p2.y,d=(r-n)*(l-u)-(i-s)*(o-a),f=(r*s-i*n)*(o-a)-(r-n)*(o*u-l*a),m=(r*s-i*n)*(l-u)-(i-s)*(o*u-l*a);return{x:f/d,y:m/d}}function ywt(t){let e=[],r=[[0,0],[1,0],[1,1],[0,1]],n=[[1,0],[0,1],[-1,0],[0,-1]];for(let i=0;i<4;++i){let s=r[i],o=n[i];for(let a=0;a=-1&&t<=1&&e>=-1&&e<=1}function iR(t,e){return t>=0&&t<=1&&e>=0&&e<=1}function _P(t,e,r){const i=ywt(100).map(j=>r.basicToViewportSafe(j[0],j[1],t,e)),s=[],o=[{x:-1,y:1},{x:1,y:1},{x:1,y:-1},{x:-1,y:-1}],a=[!1,!1,!1,!1];for(let j=0;jO[1]&&(O[1]=H),HO[0]&&(O[0]=W),Wr.state.alpha<1),qn());this._bounceSubscription=ei(e,this._navigator.stateService.inTranslation$,this._container.mouseService.active$,this._container.touchService.active$).pipe(Ct(r=>r[0]||r[1]||r[2]||r[3]),qn(),Yr(r=>r?Pi():ei(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$.pipe(Qn()))),Bi(this._navigator.panService.panImages$)).subscribe(([[r,n],i])=>{if(!n.hasValidScale&&r.camera.focal<.1||r.perspective.aspect===0||r.perspective.aspect===Number.POSITIVE_INFINITY)return;const s=_P(n,r.perspective,this._viewportCoords),o=this._viewportCoords.viewportToBasic(0,0,n,r.perspective);(o[0]<0||o[0]>1)&&i.length>0&&(s[0]=s[2]=0);for(const[,O]of i){const I=_P(O,r.perspective,this._viewportCoords);for(let A=1;A0?1:-1)*d.angleTo(u),v=(l>0?1:-1)*f.angleTo(u);const b=Math.PI/60,M=.1;m=this._spatial.clamp(M*m,-b,b),v=this._spatial.clamp(M*v,-b,b),this._navigator.stateService.rotateUnbounded({phi:m,theta:v})})}_disable(){this._bounceSubscription.unsubscribe()}_getConfiguration(){return{}}}class nk{static filteredPairwiseMouseDrag$(e,r){return this._filteredPairwiseMouseDrag$(e,r,r.mouseDragStart$,r.mouseDrag$,r.mouseDragEnd$)}static filteredPairwiseMouseRightDrag$(e,r){return this._filteredPairwiseMouseDrag$(e,r,r.mouseRightDragStart$,r.mouseRightDrag$,r.mouseRightDragEnd$)}static _filteredPairwiseMouseDrag$(e,r,n,i,s){return r.filtered$(e,n).pipe(Yr(o=>{const a=zp(vi(o),r.filtered$(e,i)),l=r.filtered$(e,s).pipe(Ct(()=>null));return Vs(a,l).pipe(M9e(u=>!!u),po(null))}),If(),vn(o=>o[0]!=null&&o[1]!=null))}}class _wt extends Mm{constructor(e,r,n,i,s){super(e,r,n),this._spatial=s,this._viewportCoords=i}_enable(){let e=this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragStart$).pipe(Ct(()=>!0),js()),r=this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragEnd$).pipe(Ct(()=>!1),js());this._activeMouseSubscription=Vs(e,r).subscribe(this._container.mouseService.activate$);const n=Vs(e,r).pipe(Yr(a=>a?this._container.mouseService.documentMouseMove$:Pi()));this._preventDefaultSubscription=Vs(n,this._container.touchService.touchMove$).subscribe(a=>{a.preventDefault()});let i=this._container.touchService.singleTouchDragStart$.pipe(Ct(()=>!0)),s=this._container.touchService.singleTouchDragEnd$.pipe(Ct(()=>!1));this._activeTouchSubscription=Vs(i,s).subscribe(this._container.touchService.activate$);const o=this._navigator.stateService.currentState$.pipe(Ct(a=>Li(a.state.currentImage.cameraType)||a.state.imagesAhead<1),qn(),Yr(a=>{if(!a)return Pi();const l=nk.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService),u=Vs(this._container.touchService.singleTouchDragStart$,this._container.touchService.singleTouchDrag$,this._container.touchService.singleTouchDragEnd$.pipe(Ct(()=>null))).pipe(Ct(d=>d!=null&&d.touches.length>0?d.touches[0]:null),If(),vn(d=>d[0]!=null&&d[1]!=null));return Vs(l,u)}),Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$,this._navigator.panService.panImages$),Ct(([a,l,u,d])=>{let f=a[0],m=a[1],v=m.clientX-f.clientX,b=m.clientY-f.clientY,M=this._container.container,[O,I]=this._viewportCoords.canvasPosition(m,M),A=this._viewportCoords.unprojectFromCanvas(O,I,M,l.perspective).sub(l.perspective.position),j=this._viewportCoords.unprojectFromCanvas(O-v,I,M,l.perspective).sub(l.perspective.position),H=this._viewportCoords.unprojectFromCanvas(O,I-b,M,l.perspective).sub(l.perspective.position),W=(v>0?1:-1)*j.angleTo(A),re=(b>0?-1:1)*H.angleTo(A);const K=_P(u,l.perspective,this._viewportCoords);for(const[,pe]of d){const ge=_P(pe,l.perspective,this._viewportCoords);for(let fe=0;fe0&&re<0&&(re/=Math.max(1,200*K[0])),K[2]>0&&re>0&&(re/=Math.max(1,200*K[2])),K[1]>0&&W<0&&(W/=Math.max(1,200*K[1])),K[3]>0&&W>0&&(W/=Math.max(1,200*K[3])),{phi:W,theta:re}}),js());this._rotateWithoutInertiaSubscription=o.subscribe(a=>{this._navigator.stateService.rotateWithoutInertia(a)}),this._rotateSubscription=o.pipe(Ja((a,l)=>(this._drainBuffer(a),a.push([Date.now(),l]),a),[]),P0t(Vs(this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragEnd$),this._container.touchService.singleTouchDragEnd$)),Ct(a=>{const l=this._drainBuffer(a.slice()),u={phi:0,theta:0};for(const m of l)u.phi+=m[1].phi,u.theta+=m[1].theta;const d=l.length;d>0&&(u.phi/=d,u.theta/=d);const f=Math.PI/18;return u.phi=this._spatial.clamp(u.phi,-f,f),u.theta=this._spatial.clamp(u.theta,-f,f),u})).subscribe(a=>{this._navigator.stateService.rotate(a)})}_disable(){this._activeMouseSubscription.unsubscribe(),this._activeTouchSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._rotateSubscription.unsubscribe(),this._rotateWithoutInertiaSubscription.unsubscribe(),this._activeMouseSubscription=null,this._activeTouchSubscription=null,this._preventDefaultSubscription=null,this._rotateSubscription=null}_getConfiguration(e){return{dragPan:e}}_drainBuffer(e){const n=Date.now();for(;e.length>0&&n-e[0][0]>50;)e.shift();return e}}class xwt extends Mm{constructor(e,r,n,i,s){super(e,r,n),this._spatial=s,this._viewportCoords=i,this._subscriptions=new Hc}_enable(){const e=this._navigator.stateService.state$.pipe(Ct(n=>n===Ai.Earth),Ci(1),Bn()),r=this._subscriptions;r.push(e.pipe(Yr(n=>n?this._container.mouseService.mouseWheel$:Pi())).subscribe(n=>{n.preventDefault()})),r.push(e.pipe(Yr(n=>n?nk.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService).pipe(vn(([i,s])=>!(i.ctrlKey&&s.ctrlKey))):Pi()),Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$),Ct(([[n,i],s,o])=>{const a=[0,0,1],l=[0,0,-2],u=this._planeIntersection(i,a,l,s.perspective,this._container.container),d=this._planeIntersection(n,a,l,s.perspective,this._container.container);return!u||!d?null:new st().subVectors(u,d).multiplyScalar(-1).toArray()}),vn(n=>!!n)).subscribe(n=>{this._navigator.stateService.truck(n)})),r.push(e.pipe(Yr(n=>n?nk.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService).pipe(vn(([i,s])=>i.ctrlKey&&s.ctrlKey)):Pi()),Ct(([n,i])=>this._mousePairToRotation(n,i))).subscribe(n=>{this._navigator.stateService.orbit(n)})),r.push(e.pipe(Yr(n=>n?nk.filteredPairwiseMouseRightDrag$(this._component.name,this._container.mouseService).pipe(vn(([i,s])=>!i.ctrlKey&&!s.ctrlKey)):Pi()),Ct(([n,i])=>this._mousePairToRotation(n,i))).subscribe(n=>{this._navigator.stateService.orbit(n)})),r.push(e.pipe(Yr(n=>n?this._container.mouseService.filteredWheel$(this._component.name,this._container.mouseService.mouseWheel$):Pi()),Ct(n=>{let i=n.deltaY;n.deltaMode===1?i=40*i:n.deltaMode===2&&(i=800*i);const s=this._viewportCoords.containerToCanvas(this._container.container);return-i/s[1]})).subscribe(n=>{this._navigator.stateService.dolly(n)}))}_disable(){this._subscriptions.unsubscribe()}_getConfiguration(){return{}}_eventToViewport(e,r){const n=this._viewportCoords.canvasPosition(e,r);return this._viewportCoords.canvasToViewport(n[0],n[1],r)}_mousePairToRotation(e,r){const[n,i]=this._eventToViewport(r,this._container.container),[s,o]=this._eventToViewport(e,this._container.container),a=(s-n)*Math.PI,l=(i-o)*Math.PI/2;return{phi:a,theta:l}}_planeIntersection(e,r,n,i,s){const[o,a]=this._viewportCoords.canvasPosition(e,s),l=this._viewportCoords.unprojectFromCanvas(o,a,s,i).sub(i.position).normalize();if(Math.abs(this._spatial.angleToPlane(l.toArray(),r))0?null:v}}class wwt extends Mm{constructor(e,r,n,i){super(e,r,n),this._viewportCoords=i}_enable(){this._container.mouseService.claimWheel(this._component.name,0),this._preventDefaultSubscription=this._container.mouseService.mouseWheel$.subscribe(e=>{e.preventDefault()}),this._zoomSubscription=this._container.mouseService.filteredWheel$(this._component.name,this._container.mouseService.mouseWheel$).pipe(Bi(this._navigator.stateService.currentState$,(e,r)=>[e,r]),vn(e=>{let r=e[1].state;return Li(r.currentImage.cameraType)||r.imagesAhead<1}),Ct(e=>e[0]),Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$,(e,r,n)=>[e,r,n])).subscribe(e=>{let r=e[0],n=e[1],i=e[2],s=this._container.container,[o,a]=this._viewportCoords.canvasPosition(r,s),l=this._viewportCoords.unprojectFromCanvas(o,a,s,n.perspective),u=i.projectBasic(l.toArray()),d=r.deltaY;r.deltaMode===1?d=40*d:r.deltaMode===2&&(d=800*d);const f=this._viewportCoords.containerToCanvas(s);let m=-3*d/f[1];this._navigator.stateService.zoomIn(m,u)})}_disable(){this._container.mouseService.unclaimWheel(this._component.name),this._preventDefaultSubscription.unsubscribe(),this._zoomSubscription.unsubscribe(),this._preventDefaultSubscription=null,this._zoomSubscription=null}_getConfiguration(e){return{scrollZoom:e}}}class bwt extends Mm{constructor(e,r,n,i){super(e,r,n),this._viewportCoords=i}_enable(){this._preventDefaultSubscription=this._container.touchService.pinch$.subscribe(n=>{n.originalEvent.preventDefault()});let e=this._container.touchService.pinchStart$.pipe(Ct(n=>!0)),r=this._container.touchService.pinchEnd$.pipe(Ct(n=>!1));this._activeSubscription=Vs(e,r).subscribe(this._container.touchService.activate$),this._zoomSubscription=this._container.touchService.pinch$.pipe(Bi(this._navigator.stateService.currentState$),vn(n=>{let i=n[1].state;return Li(i.currentImage.cameraType)||i.imagesAhead<1}),Ct(n=>n[0]),Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe(([n,i,s])=>{let o=this._container.container,[a,l]=this._viewportCoords.canvasPosition(n,o),u=this._viewportCoords.unprojectFromCanvas(a,l,o,i.perspective),d=s.projectBasic(u.toArray());const[f,m]=this._viewportCoords.containerToCanvas(o);let v=3*n.distanceChange/Math.min(f,m);this._navigator.stateService.zoomIn(v,d)})}_disable(){this._activeSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._zoomSubscription.unsubscribe(),this._preventDefaultSubscription=null,this._zoomSubscription=null}_getConfiguration(e){return{touchZoom:e}}}class S4e extends qc{constructor(e,r,n){super(e,r,n);const i=new Uc,s=new Nh;this._bounceHandler=new vwt(this,r,n,s,i),this._dragPanHandler=new _wt(this,r,n,s,i),this._earthControlHandler=new xwt(this,r,n,s,i),this._scrollZoomHandler=new wwt(this,r,n,s),this._touchZoomHandler=new bwt(this,r,n,s)}get dragPan(){return this._dragPanHandler}get earthControl(){return this._earthControlHandler}get scrollZoom(){return this._scrollZoomHandler}get touchZoom(){return this._touchZoomHandler}_activate(){this._bounceHandler.enable(),this._subscriptions.push(this._configuration$.subscribe(e=>{e.dragPan?this._dragPanHandler.enable():this._dragPanHandler.disable(),e.earthControl?this._earthControlHandler.enable():this._earthControlHandler.disable(),e.scrollZoom?this._scrollZoomHandler.enable():this._scrollZoomHandler.disable(),e.touchZoom?this._touchZoomHandler.enable():this._touchZoomHandler.disable()})),this._container.mouseService.claimMouse(this._name,0)}_deactivate(){this._container.mouseService.unclaimMouse(this._name),this._subscriptions.unsubscribe(),this._bounceHandler.disable(),this._dragPanHandler.disable(),this._earthControlHandler.disable(),this._scrollZoomHandler.disable(),this._touchZoomHandler.disable()}_getDefaultConfiguration(){return{dragPan:!0,earthControl:!0,scrollZoom:!0,touchZoom:!0}}}S4e.componentName="pointer";class yK{constructor(e){this._document=e||document}get document(){return this._document}createElement(e,r,n){const i=this._document.createElement(e);return r&&(i.className=r),n&&n.appendChild(i),i}}class E4e extends qc{constructor(e,r,n,i){super(e,r,n),this._dom=i||new yK,this._popups=[],this._added$=new dn,this._popups$=new dn}add(e){for(const r of e)this._popups.indexOf(r)===-1&&(this._popups.push(r),this._activated&&r.setParentContainer(this._popupContainer));this._added$.next(e),this._popups$.next(this._popups)}getAll(){return this._popups.slice()}remove(e){for(const r of e)this._remove(r);this._popups$.next(this._popups)}removeAll(){for(const e of this._popups.slice())this._remove(e);this._popups$.next(this._popups)}_activate(){this._popupContainer=this._dom.createElement("div","mapillary-popup-container",this._container.container);for(const n of this._popups)n.setParentContainer(this._popupContainer);const e=this._subscriptions;e.push(ei(this._container.renderService.renderCamera$,this._container.renderService.size$,this._navigator.stateService.currentTransform$).subscribe(([n,i,s])=>{for(const o of this._popups)o.update(n,i,s)}));const r=this._popups$.pipe(po(this._popups),Yr(n=>Na(n).pipe(Qi(i=>i.changed$))),Ct(n=>[n]));e.push(Vs(this._added$,r).pipe(Bi(this._container.renderService.renderCamera$,this._container.renderService.size$,this._navigator.stateService.currentTransform$)).subscribe(([n,i,s,o])=>{for(const a of n)a.update(i,s,o)}))}_deactivate(){this._subscriptions.unsubscribe();for(const e of this._popups)e.remove();this._container.container.removeChild(this._popupContainer),delete this._popupContainer}_getDefaultConfiguration(){return{}}_remove(e){const r=this._popups.indexOf(e);if(r===-1)return;const n=this._popups.splice(r,1)[0];this._activated&&n.remove()}}E4e.componentName="popup";var hd;(function(t){t[t.Sequence=0]="Sequence",t[t.Spatial=1]="Spatial"})(hd||(hd={}));var Pc;(function(t){t[t.Default=0]="Default",t[t.Playback=1]="Playback",t[t.Timeline=2]="Timeline"})(Pc||(Pc={}));class Cwt{constructor(e){this._container=e,this._minThresholdWidth=320,this._maxThresholdWidth=1480,this._minThresholdHeight=240,this._maxThresholdHeight=820,this._stepperDefaultWidth=108,this._controlsDefaultWidth=88,this._defaultHeight=30,this._expandControls=!1,this._mode=Pc.Default,this._speed=.5,this._changingSpeed=!1,this._index=null,this._changingPosition=!1,this._mouseEnterDirection$=new dn,this._mouseLeaveDirection$=new dn,this._notifyChanged$=new dn,this._notifyChangingPositionChanged$=new dn,this._notifySpeedChanged$=new dn,this._notifyIndexChanged$=new dn}get changed$(){return this._notifyChanged$}get changingPositionChanged$(){return this._notifyChangingPositionChanged$}get speed$(){return this._notifySpeedChanged$}get index$(){return this._notifyIndexChanged$}get mouseEnterDirection$(){return this._mouseEnterDirection$}get mouseLeaveDirection$(){return this._mouseLeaveDirection$}activate(){this._changingSubscription||(this._changingSubscription=Vs(this._container.mouseService.documentMouseUp$,this._container.touchService.touchEnd$.pipe(vn(e=>e.touches.length===0))).subscribe(()=>{this._changingSpeed&&(this._changingSpeed=!1),this._changingPosition&&this._setChangingPosition(!1)}))}deactivate(){this._changingSubscription&&(this._changingSpeed=!1,this._changingPosition=!1,this._expandControls=!1,this._mode=Pc.Default,this._changingSubscription.unsubscribe(),this._changingSubscription=null)}render(e,r,n,i,s,o,a,l,u){if(r.visible===!1)return Ar.h("div.mapillary-sequence-container",{},[]);const d=this._createStepper(e,r,a,n,l,u),f=this._createSequenceControls(n),m=this._createPlaybackControls(n,i,l,r),v=this._createTimelineControls(n,s,o);return Ar.h("div.mapillary-sequence-container",[d,f,m,v])}getContainerWidth(e,r){let n=r.minWidth,i=r.maxWidth;i{this._index=Number(v.target.value),this._notifyIndexChanged$.next(this._index)},i=this._container.domContainer.getBoundingClientRect(),s=Math.max(276,Math.min(410,5+.8*i.width))-65,o=v=>{v.stopPropagation(),this._setChangingPosition(!0)},a=v=>{this._changingPosition===!0&&v.stopPropagation()},u={max:r??1,min:0,onchange:n,oninput:n,onkeydown:v=>{(v.key==="ArrowDown"||v.key==="ArrowLeft"||v.key==="ArrowRight"||v.key==="ArrowUp")&&v.preventDefault()},onpointerdown:o,onpointermove:a,ontouchmove:a,ontouchstart:o,style:{width:`${s}px`},type:"range",value:e??0},d=e==null||r==null||r<=1;d&&(u.disabled="true");const f=Ar.h("input.mapillary-sequence-position",u,[]),m=d?".mapillary-sequence-position-container-inactive":".mapillary-sequence-position-container";return Ar.h("div"+m,[f])}_createSpeedInput(e){this._speed=e;const r=u=>{this._speed=Number(u.target.value)/1e3,this._notifySpeedChanged$.next(this._speed)},n=this._container.domContainer.getBoundingClientRect(),i=Math.max(276,Math.min(410,5+.8*n.width))-160,s=u=>{this._changingSpeed=!0,u.stopPropagation()},o=u=>{this._changingSpeed===!0&&u.stopPropagation()},a=u=>{(u.key==="ArrowDown"||u.key==="ArrowLeft"||u.key==="ArrowRight"||u.key==="ArrowUp")&&u.preventDefault()},l=Ar.h("input.mapillary-sequence-speed",{max:1e3,min:0,onchange:r,oninput:r,onkeydown:a,onpointerdown:s,onpointermove:o,ontouchmove:o,ontouchstart:s,style:{width:`${i}px`},type:"range",value:1e3*e},[]);return Ar.h("div.mapillary-sequence-speed-container",[l])}_createPlaybackControls(e,r,n,i){if(this._mode!==Pc.Playback)return Ar.h("div.mapillary-sequence-playback",[]);const s=Ar.h("div.mapillary-sequence-switch-icon.mapillary-sequence-icon-visible",[]),o=i.direction===Cr.Next?Cr.Prev:Cr.Next,a=i.playing,l={onclick:()=>{a||n.configure({direction:o})}},u=i.playing?".mapillary-sequence-switch-button-inactive":".mapillary-sequence-switch-button",d=Ar.h("div"+u,l,[s]),f=Ar.h("div.mapillary-sequence-slow-icon.mapillary-sequence-icon-visible",[]),m=Ar.h("div.mapillary-sequence-slow-container",[f]),v=Ar.h("div.mapillary-sequence-fast-icon.mapillary-sequence-icon-visible",[]),b=Ar.h("div.mapillary-sequence-fast-container",[v]),M=Ar.h("div.mapillary-sequence-close-icon.mapillary-sequence-icon-visible",[]),O={onclick:()=>{this._mode=Pc.Default,this._notifyChanged$.next(this)}},I=Ar.h("div.mapillary-sequence-close-button",O,[M]),A=this._createSpeedInput(r),j=[d,m,A,b,I],W={style:{top:`${Math.round(e/this._stepperDefaultWidth*this._defaultHeight+10)}px`}};return Ar.h("div.mapillary-sequence-playback",W,j)}_createPlayingButton(e,r,n,i,s){let o=i.direction===Cr.Next&&e!=null||i.direction===Cr.Prev&&r!=null;o=o&&n;let l={onclick:i.playing?()=>{s.stop()}:o?()=>{s.play()}:null},u={};i.direction===Cr.Prev&&(u.style={transform:"rotate(180deg) translate(50%, 50%)"});let d=Ar.h("div.mapillary-sequence-icon",u,[]),f=i.playing?"mapillary-sequence-stop":o?"mapillary-sequence-play":"mapillary-sequence-play-inactive";return Ar.h("div."+f,l,[d])}_createSequenceControls(e){const r=Math.round(8/this._stepperDefaultWidth*e),n={onclick:()=>{this._expandControls=!this._expandControls,this._mode=Pc.Default,this._notifyChanged$.next(this)},style:{"border-bottom-right-radius":`${r}px`,"border-top-right-radius":`${r}px`}},i=Ar.h("div.mapillary-sequence-expander-bar",[]),s=Ar.h("div.mapillary-sequence-expander-button",n,[i]),o=this._mode===Pc.Playback?".mapillary-sequence-fast-icon-gray.mapillary-sequence-icon-visible":".mapillary-sequence-fast-icon",a=Ar.h("div"+o,[]),l={onclick:()=>{this._mode=this._mode===Pc.Playback?Pc.Default:Pc.Playback,this._notifyChanged$.next(this)}},u=Ar.h("div.mapillary-sequence-playback-button",l,[a]),d=this._mode===Pc.Timeline?".mapillary-sequence-timeline-icon-gray.mapillary-sequence-icon-visible":".mapillary-sequence-timeline-icon",f=Ar.h("div"+d,[]),m={onclick:()=>{this._mode=this._mode===Pc.Timeline?Pc.Default:Pc.Timeline,this._notifyChanged$.next(this)}},v=Ar.h("div.mapillary-sequence-timeline-button",m,[f]),b={style:{height:this._defaultHeight/this._stepperDefaultWidth*e+"px",transform:`translate(${e/2+2}px, 0)`,width:this._controlsDefaultWidth/this._stepperDefaultWidth*e+"px"}},M=".mapillary-sequence-controls"+(this._expandControls?".mapillary-sequence-controls-expanded":"");return Ar.h("div"+M,b,[u,v,s])}_createSequenceArrows(e,r,n,i,s){let o={onclick:e!=null?()=>{s.moveDir$(Cr.Next).subscribe(void 0,v=>{v instanceof $p||console.error(v)})}:null,onpointerenter:()=>{this._mouseEnterDirection$.next(Cr.Next)},onpointerleave:()=>{this._mouseLeaveDirection$.next(Cr.Next)}};const a=Math.round(8/this._stepperDefaultWidth*n);let l={onclick:r!=null?()=>{s.moveDir$(Cr.Prev).subscribe(void 0,v=>{v instanceof $p||console.error(v)})}:null,onpointerenter:()=>{this._mouseEnterDirection$.next(Cr.Prev)},onpointerleave:()=>{this._mouseLeaveDirection$.next(Cr.Prev)},style:{"border-bottom-left-radius":`${a}px`,"border-top-left-radius":`${a}px`}},u=this._getStepClassName(Cr.Next,e,i.highlightId),d=this._getStepClassName(Cr.Prev,r,i.highlightId),f=Ar.h("div.mapillary-sequence-icon",[]),m=Ar.h("div.mapillary-sequence-icon",[]);return[Ar.h("div."+d,l,[m]),Ar.h("div."+u,o,[f])]}_createStepper(e,r,n,i,s,o){let a=null,l=null;for(let m of e.edges)m.data.direction===Cr.Next&&(a=m.target),m.data.direction===Cr.Prev&&(l=m.target);const u=this._createPlayingButton(a,l,n,r,s),d=this._createSequenceArrows(a,l,i,r,o);d.splice(1,0,u);const f={oncontextmenu:m=>{m.preventDefault()},style:{height:this._defaultHeight/this._stepperDefaultWidth*i+"px",width:i+"px"}};return Ar.h("div.mapillary-sequence-stepper",f,d)}_createTimelineControls(e,r,n){if(this._mode!==Pc.Timeline)return Ar.h("div.mapillary-sequence-timeline",[]);const i=this._createPositionInput(r,n),s=Ar.h("div.mapillary-sequence-close-icon.mapillary-sequence-icon-visible",[]),o={onclick:()=>{this._mode=Pc.Default,this._notifyChanged$.next(this)}},a=Ar.h("div.mapillary-sequence-close-button",o,[s]),u={style:{top:`${Math.round(e/this._stepperDefaultWidth*this._defaultHeight+10)}px`}};return Ar.h("div.mapillary-sequence-timeline",u,[i,a])}_getStepClassName(e,r,n){let i=e===Cr.Next?"mapillary-sequence-step-next":"mapillary-sequence-step-prev";return r==null?i+="-inactive":n===r&&(i+="-highlight"),i}_setChangingPosition(e){this._changingPosition=e,this._notifyChangingPositionChanged$.next(e)}}class M4e extends qc{constructor(e,r,n,i,s){super(e,r,n),this._sequenceDOMRenderer=i||new Cwt(r),this._scheduler=s,this._containerWidth$=new dn,this._hoveredIdSubject$=new dn,this._hoveredId$=this._hoveredIdSubject$.pipe(js()),this._navigator.playService.playing$.pipe(Wu(1),Bi(this._configuration$)).subscribe(([o,a])=>{const l="playing",u={playing:o,target:this,type:l};this.fire(l,u),o!==a.playing&&(o?this.play():this.stop())}),this._navigator.playService.direction$.pipe(Wu(1),Bi(this._configuration$)).subscribe(([o,a])=>{o!==a.direction&&this.configure({direction:o})})}fire(e,r){super.fire(e,r)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}play(){this.configure({playing:!0})}stop(){this.configure({playing:!1})}_activate(){this._sequenceDOMRenderer.activate();const e=this._navigator.stateService.currentImage$.pipe(Yr(a=>a.sequenceEdges$),Ci(1),Bn()),r=this._navigator.stateService.currentImage$.pipe(qn(void 0,a=>a.sequenceId),Yr(a=>zp(vi(null),this._navigator.graphService.cacheSequence$(a.sequenceId).pipe(aq(3),Vo(l=>(console.error("Failed to cache sequence",l),vi(null)))))),po(null),Ci(1),Bn()),n=this._subscriptions;n.push(r.subscribe());const i=this._sequenceDOMRenderer.index$.pipe(Bi(r),Ct(([a,l])=>l!=null?l.imageIds[a]:null),vn(a=>!!a),qn(),Cf(),Bn());n.push(Vs(i.pipe(rS(100,this._scheduler)),i.pipe(_9e(400,this._scheduler))).pipe(qn(),Yr(a=>this._navigator.moveTo$(a).pipe(Vo(()=>Pi())))).subscribe()),n.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(vn(a=>a)).subscribe(()=>{this._navigator.graphService.setGraphMode(hd.Sequence)})),n.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(vn(a=>!a)).subscribe(()=>{this._navigator.graphService.setGraphMode(hd.Spatial)})),this._navigator.graphService.graphMode$.pipe(Yr(a=>a===hd.Spatial?this._navigator.stateService.currentImage$.pipe(Pp(2)):Pi()),vn(a=>!a.spatialEdges.cached),Yr(a=>this._navigator.graphService.cacheImage$(a.id).pipe(Vo(()=>Pi())))).subscribe(),n.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(vn(a=>a)).subscribe(()=>{this._navigator.playService.stop()})),n.push(ei(this._navigator.graphService.graphMode$,this._sequenceDOMRenderer.changingPositionChanged$.pipe(po(!1),qn())).pipe(Bi(this._navigator.stateService.currentImage$),Yr(([[a,l],u])=>l&&a===hd.Sequence?this._navigator.graphService.cacheSequenceImages$(u.sequenceId,u.id).pipe(aq(3),Vo(d=>(console.error("Failed to cache sequence images.",d),Pi()))):Pi())).subscribe());const s=r.pipe(Yr(a=>{if(!a)return vi({index:null,max:null});let l=!0;return this._sequenceDOMRenderer.changingPositionChanged$.pipe(po(!1),qn(),Yr(u=>{const d=!u&&l?0:1;return l=!1,u?i:this._navigator.stateService.currentImage$.pipe(Ct(f=>f.id),qn(),Wu(d))}),Ct(u=>{const d=a.imageIds.indexOf(u);return d===-1?{index:null,max:null}:{index:d,max:a.imageIds.length-1}}))})),o=this._navigator.stateService.state$.pipe(Ct(a=>a===Ai.Earth),qn());n.push(ei(e,this._configuration$,this._containerWidth$,this._sequenceDOMRenderer.changed$.pipe(po(this._sequenceDOMRenderer)),this._navigator.playService.speed$,s,o).pipe(Ct(([a,l,u,,d,f,m])=>{const v=this._sequenceDOMRenderer.render(a,l,u,d,f.index,f.max,!m,this,this._navigator);return{name:this._name,vNode:v}})).subscribe(this._container.domRenderer.render$)),n.push(this._sequenceDOMRenderer.speed$.subscribe(a=>{this._navigator.playService.setSpeed(a)})),n.push(this._configuration$.pipe(Ct(a=>a.direction),qn()).subscribe(a=>{this._navigator.playService.setDirection(a)})),n.push(ei(this._container.renderService.size$,this._configuration$.pipe(qn((a,l)=>a[0]===l[0]&&a[1]===l[1],a=>[a.minWidth,a.maxWidth]))).pipe(Ct(([a,l])=>this._sequenceDOMRenderer.getContainerWidth(a,l))).subscribe(this._containerWidth$)),n.push(this._configuration$.pipe(Ct(a=>a.playing),qn()).subscribe(a=>{a?this._navigator.playService.play():this._navigator.playService.stop()})),n.push(this._sequenceDOMRenderer.mouseEnterDirection$.pipe(Yr(a=>{const l=e.pipe(Ct(u=>{for(let d of u.edges)if(d.data.direction===a)return d.target;return null}),Qv(this._sequenceDOMRenderer.mouseLeaveDirection$));return zp(l,vi(null))}),qn()).subscribe(this._hoveredIdSubject$)),n.push(this._hoveredId$.subscribe(a=>{const l="hover",u={id:a,target:this,type:l};this.fire(l,u)}))}_deactivate(){this._subscriptions.unsubscribe(),this._sequenceDOMRenderer.deactivate()}_getDefaultConfiguration(){return{direction:Cr.Next,maxWidth:108,minWidth:70,playing:!1,visible:!0}}}M4e.componentName="sequence";var wp;(function(t){t[t.Motion=0]="Motion",t[t.Stationary=1]="Stationary"})(wp||(wp={}));const Swt=1e-8;class tw{constructor(e,r,n,i,s,o,a,l,u,d){this._orientation=this._getValue(e,1);let f=a!=null?a.width:4,m=a!=null?a.height:3,v=this._orientation<5;this._width=this._getValue(r,v?f:m),this._height=this._getValue(n,v?m:f),this._basicAspect=v?this._width/this._height:this._height/this._width,this._basicWidth=v?r:n,this._basicHeight=v?n:r;const b=this._getCameraParameters(u,d),M=b[0],O=b[1],I=b[2];this._focal=this._getValue(M,1),this._scale=this._getValue(i,0),this._worldToCamera=this.createWorldToCamera(s,o),this._worldToCameraInverse=new Ri().copy(this._worldToCamera).invert(),this._scaledWorldToCamera=this._createScaledWorldToCamera(this._worldToCamera,this._scale),this._scaledWorldToCameraInverse=new Ri().copy(this._scaledWorldToCamera).invert(),this._basicWorldToCamera=this._createBasicWorldToCamera(this._worldToCamera,e),this._textureScale=l||[1,1],this._ck1=O||0,this._ck2=I||0,this._cameraType=d||"perspective",this._radialPeak=this._getRadialPeak(this._ck1,this._ck2)}get ck1(){return this._ck1}get ck2(){return this._ck2}get cameraType(){return this._cameraType}get basicAspect(){return this._basicAspect}get basicHeight(){return this._basicHeight}get basicRt(){return this._basicWorldToCamera}get basicWidth(){return this._basicWidth}get focal(){return this._focal}get height(){return this._height}get orientation(){return this._orientation}get rt(){return this._worldToCamera}get srt(){return this._scaledWorldToCamera}get srtInverse(){return this._scaledWorldToCameraInverse}get scale(){return this._scale}get hasValidScale(){return this._scale>.01&&this._scale<50}get radialPeak(){return this._radialPeak}get width(){return this._width}upVector(){let e=this._worldToCamera.elements;switch(this._orientation){case 1:return new st(-e[1],-e[5],-e[9]);case 3:return new st(e[1],e[5],e[9]);case 6:return new st(-e[0],-e[4],-e[8]);case 8:return new st(e[0],e[4],e[8]);default:return new st(-e[1],-e[5],-e[9])}}projectorMatrix(){let e=this._normalizedToTextureMatrix(),r=this._focal,n=new Ri().set(r,0,0,0,0,r,0,0,0,0,0,0,0,0,1,0);return e.multiply(n),e.multiply(this._worldToCamera),e}projectBasic(e){let r=this.projectSfM(e);return this._sfmToBasic(r)}unprojectBasic(e,r,n){let i=this._basicToSfm(e);return this.unprojectSfM(i,r,n)}projectSfM(e){let r=new Yo(e[0],e[1],e[2],1);return r.applyMatrix4(this._worldToCamera),this._bearingToSfm([r.x,r.y,r.z])}unprojectSfM(e,r,n){const i=this._sfmToBearing(e),o=(n&&!Li(this._cameraType)?new Yo(r*i[0]/i[2],r*i[1]/i[2],r,1):new Yo(r*i[0],r*i[1],r*i[2],1)).applyMatrix4(this._worldToCameraInverse);return[o.x/o.w,o.y/o.w,o.z/o.w]}_sfmToBearing(e){if(Li(this._cameraType)){let r=e[0]*2*Math.PI,n=-e[1]*2*Math.PI,i=Math.cos(n)*Math.sin(r),s=-Math.sin(n),o=Math.cos(n)*Math.cos(r);return[i,s,o]}else if(pP(this._cameraType)){let[r,n]=[e[0]/this._focal,e[1]/this._focal];const i=Math.sqrt(r*r+n*n);let s=this._distortionFromDistortedRadius(i,this._ck1,this._ck2,this._radialPeak),o=i/s,a=Math.cos(o),l=Math.sin(o);const u=i>Swt?1/i:1;let d=l*r*u,f=l*n*u;return[d,f,a]}else{let[r,n]=[e[0]/this._focal,e[1]/this._focal];const i=Math.sqrt(r*r+n*n);let s=this._distortionFromDistortedRadius(i,this._ck1,this._ck2,this._radialPeak);const o=r/s,a=n/s;let l=new st(o,a,1);return l.normalize(),[l.x,l.y,l.z]}}_distortionFromDistortedRadius(e,r,n,i){let s=1;for(let o=0;o<10;o++){let a=e/s;a>i&&(a=i),s=1+r*Math.pow(a,2)+n*Math.pow(a,4)}return s}_bearingToSfm(e){if(Li(this._cameraType)){let r=e[0],n=e[1],i=e[2],s=Math.atan2(r,i),o=Math.atan2(-n,Math.sqrt(r*r+i*i));return[s/(2*Math.PI),-o/(2*Math.PI)]}else if(pP(this._cameraType))if(e[2]>0){const[r,n,i]=e,s=Math.sqrt(r*r+n*n);let o=Math.atan2(s,i);o>this._radialPeak&&(o=this._radialPeak);const a=1+Math.pow(o,2)*(this._ck1+Math.pow(o,2)*this._ck2),l=this._focal*a*o/s;return[l*r,l*n]}else return[e[0]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,e[1]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY];else if(e[2]>0){let[r,n]=[e[0]/e[2],e[1]/e[2]],i=r*r+n*n;const s=Math.pow(this._radialPeak,2);i>s&&(i=s);const o=1+this._ck1*i+this._ck2*Math.pow(i,2);return[this._focal*o*r,this._focal*o*n]}else return[e[0]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,e[1]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY]}_basicToSfm(e){let r,n;switch(this._orientation){case 1:r=e[0],n=e[1];break;case 3:r=1-e[0],n=1-e[1];break;case 6:r=e[1],n=1-e[0];break;case 8:r=1-e[1],n=e[0];break;default:r=e[0],n=e[1];break}let i=this._width,s=this._height,o=Math.max(i,s),a=r*i/o-i/o/2,l=n*s/o-s/o/2;return[a,l]}_sfmToBasic(e){let r=this._width,n=this._height,i=Math.max(r,n),s=(e[0]+r/i/2)/r*i,o=(e[1]+n/i/2)/n*i,a,l;switch(this._orientation){case 1:a=s,l=o;break;case 3:a=1-s,l=1-o;break;case 6:a=1-o,l=s;break;case 8:a=o,l=1-s;break;default:a=s,l=o;break}return[a,l]}_getValue(e,r){return e!=null&&e>0?e:r}_getCameraParameters(e,r){if(Li(r))return[];if(!e||e.length===0)return[1,0,0];const n=3-e.length;return n<=0?e:e.concat(new Array(n).fill(0))}createWorldToCamera(e,r){const n=new st(e[0],e[1],e[2]),i=n.length();i>0&&n.normalize();const s=new Ri;return s.makeRotationAxis(n,i),s.setPosition(new st(r[0],r[1],r[2])),s}_createScaledWorldToCamera(e,r){const n=e.clone(),i=n.elements;return i[12]=r*i[12],i[13]=r*i[13],i[14]=r*i[14],n.scale(new st(r,r,r)),n}_createBasicWorldToCamera(e,r){const n=new st(0,0,1);let i=0;switch(r){case 3:i=Math.PI;break;case 6:i=Math.PI/2;break;case 8:i=3*Math.PI/2;break}return new Ri().makeRotationAxis(n,i).multiply(e)}_getRadialPeak(e,r){const n=5*r,i=3*e,o=Math.pow(i,2)-4*n*1;if(o<0)return;const a=(-i-Math.sqrt(o))/2/n,l=(-i+Math.sqrt(o))/2/n,u=Math.min(a,l),d=Math.max(a,l);return u>0?Math.sqrt(u):d>0?Math.sqrt(d):void 0}_normalizedToTextureMatrix(){const e=Math.max(this._width,this._height),r=this._orientation<5?this._textureScale[0]:this._textureScale[1],n=this._orientation<5?this._textureScale[1]:this._textureScale[0],i=e/this._width*r,s=e/this._height*n;switch(this._orientation){case 1:return new Ri().set(i,0,0,.5,0,-s,0,.5,0,0,1,0,0,0,0,1);case 3:return new Ri().set(-i,0,0,.5,0,s,0,.5,0,0,1,0,0,0,0,1);case 6:return new Ri().set(0,-s,0,.5,-i,0,0,.5,0,0,1,0,0,0,0,1);case 8:return new Ri().set(0,s,0,.5,i,0,0,.5,0,0,1,0,0,0,0,1);default:return new Ri().set(i,0,0,.5,0,-s,0,.5,0,0,1,0,0,0,0,1)}}}class Ewt{constructor(){this._factory=new f4e,this._scene=new p4e,this._spatial=new Uc,this._currentKey=null,this._previousKey=null,this._disabled=!1,this._curtain=1,this._frameId=0,this._needsRender=!1,this._mode=null,this._currentProviderDisposers={},this._previousProviderDisposers={}}get disabled(){return this._disabled}get frameId(){return this._frameId}get needsRender(){return this._needsRender}setTextureProvider(e,r){this._setTextureProvider(e,this._currentKey,r,this._currentProviderDisposers,this._updateTexture.bind(this))}setTextureProviderPrev(e,r){this._setTextureProvider(e,this._previousKey,r,this._previousProviderDisposers,this._updateTexturePrev.bind(this))}update(e,r){this._updateFrameId(e.id),this._updateImagePlanes(e.state,r)}updateCurtain(e){this._curtain!==e&&(this._curtain=e,this._updateCurtain(),this._needsRender=!0)}updateTexture(e,r){const n=r.id===this._currentKey?this._scene.planes:r.id===this._previousKey?this._scene.planesOld:{};if(Object.keys(n).length!==0){this._needsRender=!0;for(const i in n){if(!n.hasOwnProperty(i))continue;let a=n[i].material.uniforms.projectorTex.value;a.image=e,a.needsUpdate=!0}}}updateTextureImage(e,r){if(this._currentKey!==r.id)return;this._needsRender=!0;const n=this._scene.planes;for(const i in n){if(!n.hasOwnProperty(i))continue;let a=n[i].material.uniforms.projectorTex.value;a.image=e,a.needsUpdate=!0}}render(e,r){this.disabled||r.render(this._scene.sceneOld,e),r.render(this._scene.scene,e),this._needsRender=!1}dispose(){this._scene.clear();for(const e in this._currentProviderDisposers)this._currentProviderDisposers.hasOwnProperty(e)&&this._currentProviderDisposers[e]();for(const e in this._previousProviderDisposers)this._previousProviderDisposers.hasOwnProperty(e)&&this._previousProviderDisposers[e]();this._currentProviderDisposers={},this._previousProviderDisposers={}}_getBasicCorners(e,r){let n,i;return e>r?(n=.5,i=.5*e/r):(n=.5*r/e,i=.5),[[.5-n,.5-i],[.5+n,.5+i]]}_setDisabled(e){this._disabled=e.currentImage==null||e.previousImage==null||Li(e.currentImage.cameraType)&&!Li(e.previousImage.cameraType)}_setTextureProvider(e,r,n,i,s){if(e!==r)return;let o=n.textureCreated$.subscribe(s),a=n.textureUpdated$.subscribe(u=>{this._needsRender=!0}),l=()=>{o.unsubscribe(),a.unsubscribe(),n.dispose()};if(e in i){let u=i[e];u(),delete i[e]}i[e]=l}_updateCurtain(){const e=this._scene.planes;for(const r in e){if(!e.hasOwnProperty(r))continue;let i=e[r].material;i.uniforms.curtain&&(i.uniforms.curtain.value=this._curtain)}}_updateFrameId(e){this._frameId=e}_updateImagePlanes(e,r){const n=e.currentImage!=null&&this._currentKey!==e.currentImage.id,i=e.previousImage!=null&&this._previousKey!==e.previousImage.id,s=this._mode!==r;if(!(n||i||s))return;this._setDisabled(e),this._needsRender=!0,this._mode=r;const o=e.motionless||r===wp.Stationary||Li(e.currentImage.cameraType);if((this.disabled||i)&&this._previousKey in this._previousProviderDisposers&&(this._previousProviderDisposers[this._previousKey](),delete this._previousProviderDisposers[this._previousKey]),this.disabled)this._scene.setImagePlanesOld({});else if(i||s){const a=e.previousImage;this._previousKey=a.id;const l=e.currentTransform.rt.elements;let u=[l[12],l[13],l[14]];const d=e.currentTransform.basicAspect,f=e.previousTransform.basicAspect,m=d>f?[1,f/d]:[d/f,1];let v=e.currentImage.rotation,b=e.currentImage.width,M=e.currentImage.height;Li(a.cameraType)&&(v=e.previousImage.rotation,u=this._spatial.rotate(this._spatial.opticalCenter(e.currentImage.rotation,u).toArray(),v).multiplyScalar(-1).toArray(),b=e.previousImage.width,M=e.previousImage.height);const O=new tw(e.currentImage.exifOrientation,b,M,e.currentImage.scale,v,u,a.image,m,e.currentImage.cameraParameters,e.currentImage.cameraType);let I;if(Li(a.cameraType))I=this._factory.createMesh(a,o||Li(e.currentImage.cameraType)?O:e.previousTransform);else if(o){const[[j,H],[W,re]]=this._getBasicCorners(d,f);I=this._factory.createFlatMesh(e.previousImage,O,j,W,H,re)}else I=this._factory.createMesh(e.previousImage,e.previousTransform);const A={};A[a.id]=I,this._scene.setImagePlanesOld(A)}if(n||s){this._currentKey in this._currentProviderDisposers&&(this._currentProviderDisposers[this._currentKey](),delete this._currentProviderDisposers[this._currentKey]),this._currentKey=e.currentImage.id;const a={};Li(e.currentImage.cameraType)?a[e.currentImage.id]=this._factory.createCurtainMesh(e.currentImage,e.currentTransform):o?a[e.currentImage.id]=this._factory.createDistortedCurtainMesh(e.currentImage,e.currentTransform):a[e.currentImage.id]=this._factory.createCurtainMesh(e.currentImage,e.currentTransform),this._scene.setImagePlanes(a),this._updateCurtain()}}_updateTexture(e){this._needsRender=!0;const r=this._scene.planes;for(const n in r){if(!r.hasOwnProperty(n))continue;let s=r[n].material,o=s.uniforms.projectorTex.value;s.uniforms.projectorTex.value=null,o.dispose(),s.uniforms.projectorTex.value=e}}_updateTexturePrev(e){this._needsRender=!0;const r=this._scene.planesOld;for(const n in r){if(!r.hasOwnProperty(n))continue;let s=r[n].material,o=s.uniforms.projectorTex.value;s.uniforms.projectorTex.value=null,o.dispose(),s.uniforms.projectorTex.value=e}}}class Mwt{constructor(e){this._container=e,this._interacting=!1,this._notifyModeChanged$=new dn,this._notifyPositionChanged$=new dn,this._stopInteractionSubscription=null}get mode$(){return this._notifyModeChanged$}get position$(){return this._notifyPositionChanged$}activate(){this._stopInteractionSubscription||(this._stopInteractionSubscription=Vs(this._container.mouseService.documentMouseUp$,this._container.touchService.touchEnd$.pipe(vn(e=>e.touches.length===0))).subscribe(e=>{this._interacting&&(this._interacting=!1)}))}deactivate(){this._stopInteractionSubscription&&(this._interacting=!1,this._stopInteractionSubscription.unsubscribe(),this._stopInteractionSubscription=null)}render(e,r,n,i,s){const o=[];if(s){o.push(Ar.h("div.mapillary-slider-border",[]));const u=!(n||i);u&&(o.push(this._createModeButton(r)),o.push(this._createModeButton2d(r))),o.push(this._createPositionInput(e,u))}const a=this._container.domContainer.getBoundingClientRect(),l=Math.max(215,Math.min(400,a.width-100));return Ar.h("div.mapillary-slider-container",{style:{width:`${l}px`}},o)}_createModeButton(e){const r={onclick:()=>{e!==wp.Motion&&this._notifyModeChanged$.next(wp.Motion)}},n=e===wp.Stationary?"mapillary-slider-mode-button-inactive":"mapillary-slider-mode-button";return Ar.h("div."+n,r,[Ar.h("div.mapillary-slider-mode-icon",[])])}_createModeButton2d(e){const r={onclick:()=>{e!==wp.Stationary&&this._notifyModeChanged$.next(wp.Stationary)}},n=e===wp.Motion?"mapillary-slider-mode-button-2d-inactive":"mapillary-slider-mode-button-2d";return Ar.h("div."+n,r,[Ar.h("div.mapillary-slider-mode-icon-2d",[])])}_createPositionInput(e,r){const n=d=>{this._notifyPositionChanged$.next(Number(d.target.value)/1e3)},i=d=>{this._interacting=!0,d.stopPropagation()},s=d=>{this._interacting&&d.stopPropagation()},o=d=>{(d.key==="ArrowDown"||d.key==="ArrowLeft"||d.key==="ArrowRight"||d.key==="ArrowUp")&&d.preventDefault()},a=this._container.domContainer.getBoundingClientRect(),l=Math.max(215,Math.min(400,a.width-105))-84+(r?0:52),u=Ar.h("input.mapillary-slider-position",{max:1e3,min:0,onchange:n,oninput:n,onkeydown:o,onpointerdown:i,onpointermove:s,ontouchmove:s,ontouchstart:i,style:{width:`${l}px`},type:"range",value:1e3*e},[]);return Ar.h("div.mapillary-slider-position-container",[u])}}class T4e extends qc{constructor(e,r,n,i){super(e,r,n),this._viewportCoords=i||new Nh,this._domRenderer=new Mwt(r),this._imageTileLoader=new m4e(n.api),this._roiCalculator=new g4e,this._spatial=new Uc,this._glRendererOperation$=new dn,this._glRendererCreator$=new dn,this._glRendererDisposer$=new dn,this._glRenderer$=this._glRendererOperation$.pipe(Ja((s,o)=>o(s),null),vn(s=>s!=null),qn(void 0,s=>s.frameId)),this._glRendererCreator$.pipe(Ct(()=>s=>{if(s!=null)throw new Error("Multiple slider states can not be created at the same time");return new Ewt})).subscribe(this._glRendererOperation$),this._glRendererDisposer$.pipe(Ct(()=>s=>(s.dispose(),null))).subscribe(this._glRendererOperation$)}_activate(){const e=this._subscriptions;e.push(this._domRenderer.mode$.subscribe(v=>{this.configure({mode:v})})),e.push(this._glRenderer$.pipe(Ct(v=>({name:this._name,renderer:{frameId:v.frameId,needsRender:v.needsRender,render:v.render.bind(v),pass:hy.Background}}))).subscribe(this._container.glRenderer.render$));const r=zp(this.configuration$.pipe(Ct(v=>v.initialPosition!=null?v.initialPosition:1),Qn()),this._domRenderer.position$),n=this.configuration$.pipe(Ct(v=>v.mode),qn()),i=this._navigator.stateService.currentState$.pipe(Ct(v=>v.state.motionless),qn()),s=this._navigator.stateService.currentState$.pipe(Ct(v=>Li(v.state.currentImage.cameraType)),qn()),o=ei(this._configuration$.pipe(Ct(v=>v.sliderVisible)),this._navigator.stateService.currentState$.pipe(Ct(v=>!(v.state.currentImage==null||v.state.previousImage==null||Li(v.state.currentImage.cameraType)&&!Li(v.state.previousImage.cameraType))),qn())).pipe(Ct(([v,b])=>v&&b),qn());this._waitSubscription=ei(n,i,s,o).pipe(Bi(this._navigator.stateService.state$)).subscribe(([[v,b,M,O],I])=>{const A=O&&(b||v===wp.Stationary||M);A&&I!==Ai.WaitingInteractively?this._navigator.stateService.waitInteractively():!A&&I!==Ai.Waiting&&this._navigator.stateService.wait()}),e.push(ei(r,n,i,s,o).subscribe(([v,b,M,O])=>{M||b===wp.Stationary||O?this._navigator.stateService.moveTo(1):this._navigator.stateService.moveTo(v)})),e.push(ei(r,n,i,s,o,this._container.renderService.size$).pipe(Ct(([v,b,M,O,I])=>({name:this._name,vNode:this._domRenderer.render(v,b,M,O,I)}))).subscribe(this._container.domRenderer.render$)),this._glRendererCreator$.next(null),e.push(ei(r,s,o,this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(Ct(([v,b,M,O,I])=>{if(!b)return M?v:1;const A=this._viewportCoords.viewportToBasic(-1.15,0,I,O.perspective),j=this._viewportCoords.viewportToBasic(1.15,0,I,O.perspective),H=j[0]1?W-1:W}),Ct(v=>b=>(b.updateCurtain(v),b))).subscribe(this._glRendererOperation$)),e.push(ei(this._navigator.stateService.currentState$,n).pipe(Ct(([v,b])=>M=>(M.update(v,b),M))).subscribe(this._glRendererOperation$)),e.push(this._configuration$.pipe(vn(v=>v.ids!=null),Yr(v=>tS(tS(this._catchCacheImage$(v.ids.background),this._catchCacheImage$(v.ids.foreground)).pipe(Ct(b=>({background:b[0],foreground:b[1]}))),this._navigator.stateService.currentState$.pipe(Qn())).pipe(Ct(b=>({images:b[0],state:b[1].state}))))).subscribe(v=>{if(!(v.state.currentImage!=null&&v.state.previousImage!=null&&v.state.currentImage.id===v.images.foreground.id&&v.state.previousImage.id===v.images.background.id)){if(v.state.currentImage.id===v.images.background.id){this._navigator.stateService.setImages([v.images.foreground]);return}if(v.state.currentImage.id===v.images.foreground.id&&v.state.trajectory.length===1){this._navigator.stateService.prependImages([v.images.background]);return}this._navigator.stateService.setImages([v.images.background]),this._navigator.stateService.setImages([v.images.foreground])}},v=>{console.error(v)}));const a=this._container.configurationService.imageTiling$.pipe(Yr(v=>v?this._navigator.stateService.currentState$:new dn),qn(void 0,v=>v.state.currentImage.id),Bi(this._container.glRenderer.webGLRenderer$,this._container.renderService.size$),Ct(([v,b,M])=>{const O=v.state;Math.max(M.width,M.height);const I=O.currentImage,A=O.currentTransform;return new Sq(I.id,A.basicWidth,A.basicHeight,I.image,this._imageTileLoader,new Cq,b)}),Ci(1),Bn());e.push(a.subscribe(()=>{})),e.push(a.pipe(Ct(v=>b=>(b.setTextureProvider(v.id,v),b))).subscribe(this._glRendererOperation$)),e.push(a.pipe(If()).subscribe(v=>{v[0].abort()}));const l=this._container.configurationService.imageTiling$.pipe(Yr(v=>v?ei(this._container.renderService.renderCameraFrame$,this._container.renderService.size$.pipe(rS(250))):new dn),Ct(([v,b])=>[v.camera.position.clone(),v.camera.lookat.clone(),v.zoom.valueOf(),b.height.valueOf(),b.width.valueOf()]),If(),lq(v=>v[1][2]-v[0][2]<0||v[1][2]===0),Ct(v=>{let b=v[0][0].equals(v[1][0]),M=v[0][1].equals(v[1][1]),O=v[0][2]===v[1][2],I=v[0][3]===v[1][3],A=v[0][4]===v[1][4];return b&&M&&O&&I&&A}),qn(),vn(v=>v),Yr(()=>this._container.renderService.renderCameraFrame$.pipe(Qn())),Bi(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(a.pipe(Yr(v=>l.pipe(Ct(([b,M,O])=>[this._roiCalculator.computeRegionOfInterest(b,M,O),v]))),vn(v=>!v[1].disposed)).subscribe(v=>{let b=v[0];v[1].setRegionOfInterest(b)}));const u=a.pipe(Yr(v=>v.hasTexture$),po(!1),Ci(1),Bn());e.push(u.subscribe(()=>{}));const d=this._container.configurationService.imageTiling$.pipe(Yr(v=>v?this._navigator.stateService.currentState$:new dn),vn(v=>!!v.state.previousImage),qn(void 0,v=>v.state.previousImage.id),Bi(this._container.glRenderer.webGLRenderer$,this._container.renderService.size$),Ct(([v,b,M])=>{const O=v.state,I=O.previousImage,A=O.previousTransform;return new Sq(I.id,A.basicWidth,A.basicHeight,I.image,this._imageTileLoader,new Cq,b)}),Ci(1),Bn());e.push(d.subscribe(()=>{})),e.push(d.pipe(Ct(v=>b=>(b.setTextureProviderPrev(v.id,v),b))).subscribe(this._glRendererOperation$)),e.push(d.pipe(If()).subscribe(v=>{v[0].abort()}));const f=this._container.configurationService.imageTiling$.pipe(Yr(v=>v?ei(this._container.renderService.renderCameraFrame$,this._container.renderService.size$.pipe(rS(250))):new dn),Ct(([v,b])=>[v.camera.position.clone(),v.camera.lookat.clone(),v.zoom.valueOf(),b.height.valueOf(),b.width.valueOf()]),If(),lq(v=>v[1][2]-v[0][2]<0||v[1][2]===0),Ct(v=>{let b=v[0][0].equals(v[1][0]),M=v[0][1].equals(v[1][1]),O=v[0][2]===v[1][2],I=v[0][3]===v[1][3],A=v[0][4]===v[1][4];return b&&M&&O&&I&&A}),qn(),vn(v=>v),Yr(()=>this._container.renderService.renderCameraFrame$.pipe(Qn())),Bi(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(d.pipe(Yr(v=>f.pipe(Ct(([b,M,O])=>[this._roiCalculator.computeRegionOfInterest(b,M,O),v]))),vn(v=>!v[1].disposed),Bi(this._navigator.stateService.currentState$)).subscribe(([[v,b],M])=>{let O=null;if(Li(M.state.previousImage.cameraType))if(Li(M.state.currentImage.cameraType)){const I=this._spatial.viewingDirection(M.state.currentImage.rotation),A=this._spatial.viewingDirection(M.state.previousImage.rotation),H=this._spatial.angleBetweenVector2(I.x,I.y,A.x,A.y)/(2*Math.PI);O={bbox:{maxX:this._spatial.wrap(v.bbox.maxX+H,0,1),maxY:v.bbox.maxY,minX:this._spatial.wrap(v.bbox.minX+H,0,1),minY:v.bbox.minY},pixelHeight:v.pixelHeight,pixelWidth:v.pixelWidth}}else{const I=this._spatial.viewingDirection(M.state.currentImage.rotation),A=this._spatial.viewingDirection(M.state.previousImage.rotation),H=this._spatial.angleBetweenVector2(I.x,I.y,A.x,A.y)/(2*Math.PI),W=this._spatial.angleToPlane(I.toArray(),[0,0,1]),K=(this._spatial.angleToPlane(A.toArray(),[0,0,1])-W)/(2*Math.PI),pe=M.state.currentTransform,ge=Math.max(pe.basicWidth,pe.basicHeight),fe=ge>0?2*Math.atan(.5*pe.basicWidth/(ge*pe.focal)):Math.PI/3,ee=ge>0?2*Math.atan(.5*pe.basicHeight/(ge*pe.focal)):Math.PI/3,be=fe/(2*Math.PI),le=ee/Math.PI,ve=(v.bbox.maxX-v.bbox.minX)*be,Pe=(v.bbox.maxY-v.bbox.minY)*le,Fe=v.pixelWidth*be,We=v.pixelHeight*le,He=(v.bbox.minX+v.bbox.maxX)/2-.5,Lt=(v.bbox.minY+v.bbox.maxY)/2-.5,lt=.5+H+be*He-ve/2,pt=.5+H+be*He+ve/2,rr=.5+K+le*Lt-Pe/2,Tt=.5+K+le*Lt+Pe/2;O={bbox:{maxX:this._spatial.wrap(pt,0,1),maxY:Tt,minX:this._spatial.wrap(lt,0,1),minY:rr},pixelHeight:We,pixelWidth:Fe}}else{const I=M.state.currentTransform.basicAspect,A=M.state.previousTransform.basicAspect,[[j,H],[W,re]]=this._getBasicCorners(I,A),K=W-j,pe=re-H,ge=v.pixelWidth/K,fe=v.pixelHeight/pe,ee=(K-1)/(2*K)+v.bbox.minX/K,be=(K-1)/(2*K)+v.bbox.maxX/K,le=(pe-1)/(2*pe)+v.bbox.minY/pe,ve=(pe-1)/(2*pe)+v.bbox.maxY/pe,Pe={maxX:be,maxY:ve,minX:ee,minY:le};this._clipBoundingBox(Pe),O={bbox:Pe,pixelHeight:fe,pixelWidth:ge}}b.setRegionOfInterest(O)}));const m=d.pipe(Yr(v=>v.hasTexture$),po(!1),Ci(1),Bn());e.push(m.subscribe(()=>{}))}_deactivate(){this._waitSubscription.unsubscribe(),this._navigator.stateService.state$.pipe(Qn()).subscribe(e=>{e!==Ai.Traversing&&this._navigator.stateService.traverse()}),this._glRendererDisposer$.next(null),this._domRenderer.deactivate(),this._subscriptions.unsubscribe(),this.configure({ids:null})}_getDefaultConfiguration(){return{initialPosition:1,mode:wp.Motion,sliderVisible:!0}}_catchCacheImage$(e){return this._navigator.graphService.cacheImage$(e).pipe(Vo(r=>(console.error(`Failed to cache slider image (${e})`,r),Pi())))}_getBasicCorners(e,r){let n,i;return e>r?(n=.5,i=.5*e/r):(n=.5*r/e,i=.5),[[.5-n,.5-i],[.5+n,.5+i]]}_clipBoundingBox(e){e.minX=Math.max(0,Math.min(1,e.minX)),e.maxX=Math.max(0,Math.min(1,e.maxX)),e.minY=Math.max(0,Math.min(1,e.minY)),e.maxY=Math.max(0,Math.min(1,e.maxY))}}T4e.componentName="slider";class AE{constructor(e,r){this._subscriptions=new Hc,this._graphService=e,this._stateService=r;const n=this._subscriptions;this._directionSubject$=new dn,this._direction$=this._directionSubject$.pipe(po(Cr.Next),Ci(1),Bn()),n.push(this._direction$.subscribe()),this._playing=!1,this._playingSubject$=new dn,this._playing$=this._playingSubject$.pipe(po(this._playing),Ci(1),Bn()),n.push(this._playing$.subscribe()),this._speed=.5,this._speedSubject$=new dn,this._speed$=this._speedSubject$.pipe(po(this._speed),Ci(1),Bn()),n.push(this._speed$.subscribe()),this._imagesAhead=this._mapImagesAhead(this._mapSpeed(this._speed)),this._bridging$=null}get playing(){return this._playing}get direction$(){return this._direction$}get playing$(){return this._playing$}get speed$(){return this._speed$}play(){if(this._playing)return;this._stateService.cutImages();const e=this._setSpeed(this._speed);this._stateService.setSpeed(e),this._graphModeSubscription=this._speed$.pipe(Ct(n=>n>AE.sequenceSpeed?hd.Sequence:hd.Spatial),qn()).subscribe(n=>{this._graphService.setGraphMode(n)}),this._cacheSubscription=ei(this._stateService.currentImage$.pipe(Ct(n=>[n.sequenceId,n.id]),qn(void 0,([n])=>n)),this._graphService.graphMode$,this._direction$).pipe(Yr(([[n,i],s,o])=>{if(o!==Cr.Next&&o!==Cr.Prev)return vi([void 0,o]);const a=(s===hd.Sequence?this._graphService.cacheSequenceImages$(n,i):this._graphService.cacheSequence$(n)).pipe(aq(3),Vo(l=>(console.error(l),vi(void 0))));return ei(a,vi(o))}),Yr(([n,i])=>{if(n===void 0)return Pi();const s=n.imageIds.slice();return i===Cr.Prev&&s.reverse(),this._stateService.currentState$.pipe(Ct(o=>[o.state.trajectory[o.state.trajectory.length-1].id,o.state.imagesAhead]),Ja(([o,a],[l,u])=>{o===void 0&&(o=l);const d=s.length-1;if(u>=this._imagesAhead||s[d]===o)return[o,[]];const f=s.indexOf(l),m=s.indexOf(o)+1,v=Math.min(d,f+this._imagesAhead-u)+1;return v<=m?[o,[]]:[s[v-1],s.slice(m,v)]},[void 0,[]]),Qi(([o,a])=>Na(a)))}),Qi(n=>this._graphService.cacheImage$(n).pipe(Vo(()=>Pi())),6)).subscribe(),this._playingSubscription=this._stateService.currentState$.pipe(vn(n=>n.state.imagesAheadn.state.lastImage.id),Ct(n=>{const i=n.state.lastImage,s=n.state.trajectory;let o;for(let a=s.length-2;a>=0;a--){const l=s[a];if(l.sequenceId!==i.sequenceId)break;if(l.capturedAt!==i.capturedAt){o=l.capturedAttS(([Cr.Next,Cr.Prev].indexOf(s)>-1?n.sequenceEdges$:n.spatialEdges$).pipe(Qn(o=>o.cached),sq(15e3)),vi(s)).pipe(Ct(([o,a])=>{for(let l of o.edges)if(l.data.direction===a)return l.target;return null}),Yr(o=>o!=null?this._graphService.cacheImage$(o):Pi())))).subscribe(n=>{this._stateService.appendImagess([n])},n=>{console.error(n),this.stop()}),this._clearSubscription=this._stateService.currentImage$.pipe(sP(1,10)).subscribe(n=>{this._stateService.clearPriorImages()}),this._setPlaying(!0);const r=this._stateService.currentState$.pipe(Ct(n=>n.state),qn(([n,i],[s,o])=>n===s&&i===o,n=>[n.currentImage.id,n.lastImage.id]),vn(n=>n.currentImage.id===n.lastImage.id&&n.currentIndex===n.trajectory.length-1),Ct(n=>n.currentImage));this._stopSubscription=ei(r,this._direction$).pipe(Yr(([n,i])=>{const s=([Cr.Next,Cr.Prev].indexOf(i)>-1?n.sequenceEdges$:n.spatialEdges$).pipe(Qn(o=>o.cached),sq(15e3),Vo(o=>(console.error(o),vi({cached:!1,edges:[]}))));return ei(vi(i),s).pipe(Ct(([o,a])=>{for(const l of a.edges)if(l.data.direction===o)return!0;return!1}))}),Qi(n=>n||!this._bridging$?vi(n):this._bridging$.pipe(Ct(i=>i!=null),Vo(i=>(console.error(i),vi(!1))))),Qn(n=>!n)).subscribe(void 0,void 0,()=>{this.stop()}),this._stopSubscription.closed&&(this._stopSubscription=null),this._earthSubscription=this._stateService.state$.pipe(Ct(n=>n===Ai.Earth),qn(),Qn(n=>n)).subscribe(void 0,void 0,()=>{this.stop()}),this._earthSubscription.closed&&(this._earthSubscription=null)}dispose(){this.stop(),this._subscriptions.unsubscribe()}setDirection(e){this._directionSubject$.next(e)}setSpeed(e){if(e=Math.max(0,Math.min(1,e)),e===this._speed)return;const r=this._setSpeed(e);this._playing&&this._stateService.setSpeed(r),this._speedSubject$.next(this._speed)}stop(){this._playing&&(this._stopSubscription&&(this._stopSubscription.closed||this._stopSubscription.unsubscribe(),this._stopSubscription=null),this._earthSubscription&&(this._earthSubscription.closed||this._earthSubscription.unsubscribe(),this._earthSubscription=null),this._graphModeSubscription.unsubscribe(),this._graphModeSubscription=null,this._cacheSubscription.unsubscribe(),this._cacheSubscription=null,this._playingSubscription.unsubscribe(),this._playingSubscription=null,this._clearSubscription.unsubscribe(),this._clearSubscription=null,this._stateService.setSpeed(1),this._stateService.cutImages(),this._graphService.setGraphMode(hd.Spatial),this._setPlaying(!1))}_mapSpeed(e){const r=2*e-1;return Math.pow(10,r)-.2*r}_mapImagesAhead(e){return Math.round(Math.max(10,Math.min(50,8+6*e)))}_setPlaying(e){this._playing=e,this._playingSubject$.next(e)}_setSpeed(e){this._speed=e;const r=this._mapSpeed(this._speed);return this._imagesAhead=this._mapImagesAhead(r),r}}AE.sequenceSpeed=.54;var Sp;(function(t){t[t.Hidden=0]="Hidden",t[t.Homogeneous=1]="Homogeneous",t[t.Cluster=2]="Cluster",t[t.ConnectedComponent=3]="ConnectedComponent",t[t.Sequence=4]="Sequence"})(Sp||(Sp={}));var pS;(function(t){t[t.Hidden=0]="Hidden",t[t.Altitude=1]="Altitude",t[t.Flat=2]="Flat"})(pS||(pS={}));class Twt extends cxe{constructor(e){super(),this._originalSize=e.originalSize;const{cluster:r,color:n,scale:i,translation:s}=e;this._makeAttributes(r),this.material.size=i*this._originalSize,this.setColor(n),this.matrixAutoUpdate=!1,this.position.fromArray(s),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setColor(e){this.material.vertexColors=e==null,this.material.color=new $i(e),this.material.needsUpdate=!0}resize(e){this.material.size=e*this._originalSize,this.material.needsUpdate=!0}_makeAttributes(e){const r=[],n=[],i=e.points;for(const o in i){if(!i.hasOwnProperty(o))continue;const a=i[o];r.push(...a.coordinates);const l=a.color;n.push(l[0]),n.push(l[1]),n.push(l[2])}const s=this.geometry;s.setAttribute("position",new to(new Float32Array(r),3)),s.setAttribute("color",new to(new Float32Array(n),3))}}class Iwt extends t9{constructor(e){super(),this._makeAttributes(e),this.matrixAutoUpdate=!1,this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}_makeAttributes(e){const r=e.slice();r.push(e[0]);let n=0;const i=new Float32Array(3*(e.length+1));for(const s of r)i[n++]=s[0],i[n++]=s[1],i[n++]=s[2];this.geometry.setAttribute("position",new to(i,3))}}const Rwt=14,Lwt=6;function Eae(t,e){return t===e}function kwt(t){return Math.pow(2,t)}function Awt(t){const r=kwt(t)/2;return{min:[-r,-r,-r],max:[r,r,r]}}class vK{constructor(e,r,n,i){this.level=e,this.leafLevel=r,this.boundingBox=n,this.parent=i,this.children=[],this.items=[],i&&i.children.push(this)}get isEmpty(){return!(this.children.length||this.items.length)}add(e){const r=this;if(!r.boundingBox.containsPoint(e.position))throw new Error("Item not contained in node");if(Eae(r.level,r.leafLevel))return r.items.push(e),this;for(const n of r.children)if(n.boundingBox.containsPoint(e.position))return n.add(e);for(const n of r._generateBoundingBoxes())if(n.containsPoint(e.position))return new vK(r.level-1,r.leafLevel,n,r).add(e);throw new Error("Item not contained in children")}intersect(e,r,n){if(e.intersectBox(this.boundingBox,r)){if(Eae(this.level,this.leafLevel)){n.push(this);return}for(const i of this.children)i.intersect(e,r,n)}}remove(e){const r=this.items.indexOf(e);if(r<0)throw new Error(`Item does not exist ${e.uuid}`);this.items.splice(r,1)}traverse(){const e=this;if(!e.isEmpty)return;const r=e.parent;if(!r)return;const n=r.children.indexOf(e);if(n<0)throw new Error("Corrupt octree");r.children.splice(n,1),this.parent=null,r.traverse()}_generateBoundingBoxes(){const e=this,r=e.boundingBox.min,i=(e.boundingBox.max.x-r.x)/2,s=[[r.x,r.y+i,r.z+i],[r.x+i,r.y+i,r.z+i],[r.x,r.y,r.z+i],[r.x+i,r.y,r.z+i],[r.x,r.y+i,r.z],[r.x+i,r.y+i,r.z],[r.x,r.y,r.z],[r.x+i,r.y,r.z]],o=[];for(const[a,l,u]of s)o.push(new Uf(new st(a,l,u),new st(a+i,l+i,u+i)));return o}}class Pwt{constructor(e,r){if(this.rootLevel=e,this.leafLevel=r,r>e)throw new Error;this._index=new Map,this._root=this._makeRoot()}get root(){return this._root}add(e){if(!this.root.boundingBox.containsPoint(e.position)){console.warn(`Object outside bounding box ${e.uuid}`);return}const r=this._root.add(e);this._index.set(e.uuid,r)}has(e){return this._index.has(e.uuid)}intersect(e){const r=[],n=new st;return this._root.intersect(e,n,r),r.map(i=>i.items).reduce((i,s)=>(i.push(...s),i),[])}reset(){this._root=this._makeRoot(),this._index.clear()}remove(e){if(!this.has(e))throw new Error(`Frame does not exist ${e.uuid}`);const r=this._index.get(e.uuid);r.remove(e),r.traverse(),this._index.delete(e.uuid)}_makeRoot(){const e=this.rootLevel,r=Awt(e),n=new Uf(new st().fromArray(r.min),new st().fromArray(r.max));return new vK(e,this.leafLevel,n)}}class $wt{constructor(e,r){this._objects=[],this._objectImageMap=new Map,this._octree=e??new Pwt(Rwt,Lwt),this._raycaster=r??new fP,this._interactiveLayer=1,this._raycaster=r||new fP(void 0,void 0,1,1e4),this._lineThreshold=.2,this._largeLineThreshold=.4,this._raycaster.params.Line.threshold=this._lineThreshold,this._raycaster.layers.set(this._interactiveLayer)}get interactiveLayer(){return this._interactiveLayer}get octree(){return this._octree}get raycaster(){return this._raycaster}add(e,r){const n=e.uuid;this._objectImageMap.set(n,r),this._objects.push(e),this._octree.add(e)}intersectObjects(e,r){this._raycaster.setFromCamera(new bn().fromArray(e),r);const n=this._octree.intersect(this.raycaster.ray),i=this._raycaster.intersectObjects(n),s=this._objectImageMap;for(const o of i){const a=o.object.uuid;if(s.has(a))return s.get(a)}return null}remove(e){const r=this._objects,n=r.indexOf(e);if(n!==-1){const i=r.splice(n,1);for(const s of i)this._objectImageMap.delete(s.uuid);this._octree.remove(e)}else console.warn("Object does not exist")}resetIntersectionThreshold(e){this._raycaster.params.Line.threshold=e?this._largeLineThreshold:this._lineThreshold}}class Owt extends t9{constructor(e){super(e.geometry,e.material);const r=e.mode,n=e.originalOrigin,s=e.transform.unprojectBasic([0,0],0);this._relativeAltitude=n[2]-s[2],this._makeAttributes(s,n,r),this.matrixAutoUpdate=!1,this.position.fromArray(s),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setMode(e){const r=this.geometry.attributes.position,n=r.array;n[5]=this._modeToAltitude(e),r.needsUpdate=!0,this.geometry.computeBoundingSphere()}_makeAttributes(e,r,n){const i=new Float32Array(6);i[0]=0,i[1]=0,i[2]=0,i[3]=r[0]-e[0],i[4]=r[1]-e[1],i[5]=this._modeToAltitude(n);const s=new to(i,3);this.geometry.setAttribute("position",s),s.needsUpdate=!0,this.geometry.computeBoundingSphere()}_modeToAltitude(e){return e===pS.Altitude?this._relativeAltitude:0}}class I4e extends VO{constructor(e){super(e.geometry,e.material);const r=e.color,n=e.size,i=e.scale,s=e.transform,o=s.unprojectBasic([0,0],0),a=this._makePositions(n,s,o);this._makeAttributes(a,r),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),this.matrixAutoUpdate=!1,this.position.fromArray(o),this.scale.set(i,i,i),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setColor(e){return this._updateColorAttribute(e),this}resize(e){return this.scale.set(e,e,e),this.updateMatrix(),this.updateMatrixWorld(!1),this}_makeAttributes(e,r){const n=this.geometry,i=new to(new Float32Array(e),3);n.setAttribute("position",i),i.needsUpdate=!0;const s=new to(new Float32Array(e.length),3);n.setAttribute("color",s),this._updateColorAttribute(r)}_updateColorAttribute(e){const[r,n,i]=new $i(e).toArray(),s=this.geometry.attributes.color,o=s.array,a=o.length;let l=0;for(let u=0;u!0}get needsRender(){return this._needsRender}get intersection(){return this._intersection}addCluster(e,r,n){if(this.hasCluster(e.id,n))return;const i=e.id;if(!(i in this._clusters)){this._clusters[i]={points:new xo,cellIds:[]};const s=this._getClusterVisible(i),o=this._clusters[i],a=this._pointVisualizationMode===K0.Cluster?this._assets.getColor(i):null,l=new Twt({cluster:e,color:a,originalSize:this._originalPointSize,scale:this._pointSize,translation:r});o.points.visible=s,o.points.add(l),this._scene.add(o.points)}this._clusters[i].cellIds.indexOf(n)===-1&&this._clusters[i].cellIds.push(n),n in this._cellClusters||(this._cellClusters[n]={keys:[]}),this._cellClusters[n].keys.indexOf(i)===-1&&this._cellClusters[n].keys.push(i),this._needsRender=!0}addImage(e,r,n,i){var s,o,a;const l=e.id,u={clusterId:(s=e.clusterId)!==null&&s!==void 0?s:jwt,sequenceId:(o=e.sequenceId)!==null&&o!==void 0?o:Uwt,ccId:(a=e.mergeId)!==null&&a!==void 0?a:Vwt};if(!(i in this._images)){const b=new Fwt(i,this._scene,this._intersection);b.cameras.visible=Eq(this._cameraVisualizationMode),b.applyPositionMode(this._positionMode),this._images[i]=b}const d=this._images[i];if(d.hasImage(l))return;d.addImage({idMap:u,image:e});const f=d.getColorId(l,this._cameraVisualizationMode),m=this._assets.getColor(f),v=this._filter(e);if(d.visualize({id:l,color:m,positionMode:this._positionMode,scale:this._cameraSize,transform:r,visible:v,maxSize:this._originalCameraSize,originalPosition:n}),this._imageCellMap.set(l,i),l===this._selectedId&&this._highlight(l,this._colors.select,this._cameraVisualizationMode),u.clusterId in this._clusters){const b=this._getClusterVisible(u.clusterId);this._clusters[u.clusterId].points.visible=b}this._needsRender=!0}addCell(e,r){if(this.hasCell(r))return;const n=new Iwt(e);this._cells[r]=new xo,this._cells[r].visible=this._cellsVisible,this._cells[r].add(n),this._scene.add(this._cells[r]),this._needsRender=!0}deactivate(){this._filter=()=>!0,this._selectedId=null,this._hoveredId=null,this.uncache()}hasCluster(e,r){return e in this._clusters&&this._clusters[e].cellIds.indexOf(r)!==-1}hasCell(e){return e in this._cells}hasImage(e,r){return r in this._images&&this._images[r].hasImage(e)}render(e,r){r.render(this._scene,e),this._needsRender=!1}resetReference(e,r){const n=this._clusters;for(const o in n){if(!n.hasOwnProperty(o))continue;const a=n[o];a.points.position.fromArray(xP(e,a.points.position.toArray(),r))}const i=this._cells;for(const o in i){if(!i.hasOwnProperty(o))continue;const a=i[o];a.position.fromArray(xP(e,a.position.toArray(),r))}const s=this._images;for(const o in s){if(!s.hasOwnProperty(o))continue;s[o].resetReference(e,r)}}setCameraSize(e){if(Math.abs(e-this._cameraSize)<.001)return;const r=this._images;for(const n of Object.keys(r))r[n].applyCameraSize(e);this._intersection.raycaster.near=this._getNear(e),this._cameraSize=e,this._needsRender=!0}setFilter(e){this._filter=e;const r={};for(const i of Object.values(this._images)){i.applyFilter(e);const s=i.clusterVisibles;for(const o in s)s.hasOwnProperty(o)&&(o in r||(r[o]=!1),r[o]||(r[o]=s[o]))}const n=this._pointVisualizationMode!==K0.Hidden;for(const i in r){if(!r.hasOwnProperty(i))continue;r[i]&&(r[i]=n);const s=r[i];i in this._clusters&&(this._clusters[i].points.visible=s)}this._needsRender=!0}setHoveredImage(e){if(e!=null&&!this._imageCellMap.has(e))throw new ca(`Image does not exist: ${e}`);this._hoveredId!==e&&(this._needsRender=!0,this._hoveredId!=null&&(this._hoveredId===this._selectedId?this._highlight(this._hoveredId,this._colors.select,this._cameraVisualizationMode):this._resetCameraColor(this._hoveredId)),this._highlight(e,this._colors.hover,this._cameraVisualizationMode),this._hoveredId=e)}setNavigationState(e){this._intersection.resetIntersectionThreshold(e)}setPointSize(e){if(Math.abs(e-this._pointSize)<.001)return;const r=this._clusters;for(const n in r)if(r.hasOwnProperty(n))for(const i of r[n].points.children)i.resize(e);this._pointSize=e,this._needsRender=!0}setPointVisualizationMode(e){if(e!==this._pointVisualizationMode){this._pointVisualizationMode=e;for(const r in this._clusters){if(!this._clusters.hasOwnProperty(r))continue;const n=this._clusters[r];n.points.visible=this._getClusterVisible(r);for(const i of n.points.children){const s=e===K0.Cluster?this._assets.getColor(r):null;i.setColor(s)}}this._needsRender=!0}}setPositionMode(e){if(e!==this._positionMode){for(const r of Object.values(this._images))r.applyPositionMode(e);this._positionMode=e,this._needsRender=!0}}setSelectedImage(e){this._selectedId!==e&&(this._needsRender=!0,this._selectedId!=null&&this._resetCameraColor(this._selectedId),this._highlight(e,this._colors.select,this._cameraVisualizationMode),this._selectedId=e)}setCellVisibility(e){if(e!==this._cellsVisible){for(const r in this._cells)this._cells.hasOwnProperty(r)&&(this._cells[r].visible=e);this._cellsVisible=e,this._needsRender=!0}}setCameraVisualizationMode(e){if(e===this._cameraVisualizationMode)return;const r=Eq(e),n=this._assets;for(const i of Object.values(this._images))i.cameras.visible=r,i.getCamerasByMode(e).forEach((o,a)=>{const l=n.getColor(a);for(const u of o)u.setColor(l)});this._highlight(this._hoveredId,this._colors.hover,e),this._highlight(this._selectedId,this._colors.select,e),this._cameraVisualizationMode=e,this._needsRender=!0}uncache(e){for(const r of Object.keys(this._cellClusters))e&&e.indexOf(r)!==-1||this._disposeReconstruction(r);for(const r of Object.keys(this._images)){if(e&&e.indexOf(r)!==-1)continue;const n=this._imageCellMap,i=this._images[r].keys;for(const s of i)n.delete(s);this._images[r].dispose(),delete this._images[r]}for(const r of Object.keys(this._cells))e&&e.indexOf(r)!==-1||this._disposeCell(r);this._needsRender=!0}_getClusterVisible(e){if(this._pointVisualizationMode===K0.Hidden)return!1;let r=!1;for(const n of Object.values(this._images)){const i=n.clusterVisibles;e in i&&(r||(r=i[e]))}return r}_disposePoints(e){for(const r of this._cellClusters[e].keys){if(!(r in this._clusters))continue;const n=this._clusters[r].cellIds.indexOf(e);if(n!==-1&&(this._clusters[r].cellIds.splice(n,1),!(this._clusters[r].cellIds.length>0))){for(const i of this._clusters[r].points.children.slice())i.dispose();this._scene.remove(this._clusters[r].points),delete this._clusters[r]}}}_disposeReconstruction(e){this._disposePoints(e),delete this._cellClusters[e]}_disposeCell(e){const r=this._cells[e];for(const n of r.children.slice())n.dispose(),r.remove(n);this._scene.remove(r),delete this._cells[e]}_getNear(e){const r=this._rayNearScale*this._originalCameraSize*e;return Math.max(1,r)}_resetCameraColor(e){const r=this._imageCellMap;if(e==null||!r.has(e))return;const n=r.get(e),i=this._images[n],s=i.getColorId(e,this._cameraVisualizationMode),o=this._assets.getColor(s);i.applyCameraColor(e,o)}_highlight(e,r,n){const i=this._imageCellMap;if(e==null||!i.has(e))return;const s=i.get(e);r=n===Sp.Homogeneous?r:"#FFFFFF",this._images[s].applyCameraColor(e,r)}}class Gwt{constructor(e,r){this._graphService=e,this._data=r,this._cells={},this._cacheRequests={},this._clusters={},this._clusterCells={},this._cellClusters={},this._cachingCells$={},this._cachingClusters$={}}cacheClusters$(e){if(!this.hasCell(e))throw new Error("Cannot cache reconstructions of a non-existing cell.");if(this.hasClusters(e))throw new Error("Cannot cache reconstructions that already exists.");if(this.isCachingClusters(e))return this._cachingClusters$[e];const r=this.getCell(e).filter(o=>!!o.clusterId&&!!o.clusterUrl).map(o=>({key:o.clusterId,url:o.clusterUrl})),n=Array.from(new Map(r.map(o=>[o.key,o])).values());this._cellClusters[e]=n,this._cacheRequests[e]=[];let i;const s=new Promise((o,a)=>{i=a});return this._cacheRequests[e].push(i),this._cachingClusters$[e]=this._cacheClusters$(n,e,s).pipe(Fd(()=>{e in this._cachingClusters$&&delete this._cachingClusters$[e],e in this._cacheRequests&&delete this._cacheRequests[e]}),Cf(),Bn()),this._cachingClusters$[e]}cacheCell$(e){if(this.hasCell(e))throw new Error("Cannot cache cell that already exists.");return this.isCachingCell(e)?this._cachingCells$[e]:(this._cachingCells$[e]=this._graphService.cacheCell$(e).pipe(Vo(r=>(console.error(r),Pi())),vn(()=>!(e in this._cells)),Pa(r=>{this._cells[e]=[],this._cells[e].push(...r),delete this._cachingCells$[e]}),Fd(()=>{e in this._cachingCells$&&delete this._cachingCells$[e]}),Cf(),Bn()),this._cachingCells$[e])}isCachingClusters(e){return e in this._cachingClusters$}isCachingCell(e){return e in this._cachingCells$}hasClusters(e){if(e in this._cachingClusters$||!(e in this._cellClusters))return!1;for(const r of this._cellClusters[e])if(!(r.key in this._clusters))return!1;return!0}hasCell(e){return!(e in this._cachingCells$)&&e in this._cells}getClusters(e){return e in this._cellClusters?this._cellClusters[e].map(r=>this._clusters[r.key]).filter(r=>!!r):[]}getCell(e){return e in this._cells?this._cells[e]:[]}uncache(e){for(let r of Object.keys(this._cacheRequests))if(!(e&&e.indexOf(r)!==-1)){for(const n of this._cacheRequests[r])n();delete this._cacheRequests[r]}for(let r of Object.keys(this._cellClusters))if(!(e&&e.indexOf(r)!==-1)){for(const n of this._cellClusters[r]){if(!(n.key in this._clusterCells))continue;const i=this._clusterCells[n.key].indexOf(r);i!==-1&&(this._clusterCells[n.key].splice(i,1),!(this._clusterCells[n.key].length>0)&&(delete this._clusterCells[n.key],delete this._clusters[n.key]))}delete this._cellClusters[r]}for(let r of Object.keys(this._cells))e&&e.indexOf(r)!==-1||delete this._cells[r]}updateCell$(e){if(!this.hasCell(e))throw new Error("Cannot update cell that does not exists.");return this._graphService.cacheCell$(e).pipe(Vo(r=>(console.error(r),Pi())),vn(()=>e in this._cells),Pa(r=>{this._cells[e]=[],this._cells[e].push(...r)}),Cf(),Bn())}updateClusters$(e){if(!this.hasCell(e))throw new Error("Cannot update reconstructions of a non-existing cell.");if(!this.hasClusters(e))throw new Error("Cannot update reconstructions for cell that is not cached.");const r=this.getCell(e).filter(i=>!!i.clusterId&&!!i.clusterUrl).map(i=>({key:i.clusterId,url:i.clusterUrl})),n=Array.from(new Map(r.map(i=>[i.key,i])).values()).filter(i=>!(i.key in this._clusters));return this._cellClusters[e].push(...n),this._cacheClusters$(n,e,null)}_cacheClusters$(e,r,n){return Na(e).pipe(Qi(i=>this._hasCluster(i.key)?vi(this._getCluster(i.key)):this._getCluster$(i.url,i.key,n).pipe(Vo(s=>(s instanceof $p||console.error(s),Pi()))),6),vn(()=>r in this._cellClusters),Pa(i=>{this._hasCluster(i.id)||(this._clusters[i.id]=i),i.id in this._clusterCells||(this._clusterCells[i.id]=[]),this._clusterCells[i.id].indexOf(r)===-1&&this._clusterCells[i.id].push(r)}))}_getCluster(e){return this._clusters[e]}_getCluster$(e,r,n){return va.create(i=>{this._data.getCluster(e,n).then(s=>{s.id=r,i.next(s),i.complete()},s=>{i.error(s)})})}_hasCluster(e){return e in this._clusters}}function Mq(t,e,r){const n=new Set;return n.add(t),R4e(n,[t],0,e,r),Array.from(n)}function R4e(t,e,r,n,i){if(r>=n)return;const s=[];for(const a of e){const l=i.getAdjacent(a);s.push(...l)}const o=[];for(const a of s)t.has(a)||(t.add(a),o.push(a));R4e(t,o,r+1,n,i)}class L4e extends qc{constructor(e,r,n){super(e,r,n),this._cache=new Gwt(n.graphService,n.api.data),this._scene=new Hwt(this._getDefaultConfiguration()),this._viewportCoords=new Nh,this._spatial=new Uc}getFrameIdAt(e){return new Promise((r,n)=>{this._container.renderService.renderCamera$.pipe(Qn(),Ct(i=>{const s=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._scene.intersection.intersectObjects(s,i.perspective)})).subscribe(i=>{r(i)},i=>{n(i)})})}_activate(){this._navigator.cacheService.configure({cellDepth:3});const e=this._subscriptions;e.push(this._navigator.stateService.reference$.pipe(If()).subscribe(([m,v])=>{this._scene.resetReference(v,m)})),e.push(this._navigator.graphService.filter$.subscribe(m=>{this._scene.setFilter(m)}));const r=this._container.renderService.bearing$.pipe(Ct(m=>6*Math.floor(m/6)),qn(),Ci(1),Bn()),n=this._navigator.stateService.currentImage$.pipe(Ct(m=>this._navigator.api.data.geometry.lngLatToCellId(m.originalLngLat)),qn(),Ci(1),Bn()),i=this._configuration$.pipe(Ct(m=>this._spatial.clamp(m.cellGridDepth,1,3)),qn(),Ci(1),Bn()),s=ei(this._navigator.playService.playing$,this._navigator.playService.speed$).pipe(Ct(([m,v])=>m&&v>AE.sequenceSpeed),qn(),Ci(1),Bn()),o=this._navigator.stateService.state$.pipe(Ct(m=>Bwt(m)),qn(),Ci(1),Bn());e.push(o.subscribe(m=>{this._scene.setNavigationState(m)}));const a=ei(o,s,r,i,this._navigator.stateService.currentImage$).pipe(qn(([m,v,b,M,O],[I,A,j,H,W])=>{if(m!==I)return!1;const re=O.id===W.id&&v===A&&M===H;return m?re:re&&b===j}),Sz(([m,v,b,M,O])=>{if(m){const A=this._navigator.api.data.geometry,j=A.lngLatToCellId(O.originalLngLat),H=v?[j]:Mq(j,M,A);return vi(H)}const I=v?30:90;return vi(this._cellsInFov(O,b,I))}),Yr(m=>Na(m).pipe(Qi(v=>(this._cache.hasCell(v)?vi(this._cache.getCell(v)):this._cache.cacheCell$(v)).pipe(Ct(M=>({id:v,images:M}))),6))));e.push(a.pipe(Bi(this._navigator.stateService.reference$)).subscribe(([m,v])=>{this._scene.hasCell(m.id)||this._scene.addCell(this._cellToTopocentric(m.id,v),m.id)})),e.push(a.pipe(Bi(this._navigator.stateService.reference$)).subscribe(([m,v])=>{this._addSceneImages(m,v)})),e.push(a.pipe(Sz(m=>{const v=m.id;let b;return this._cache.hasClusters(v)?b=Na(this._cache.getClusters(v)):this._cache.isCachingClusters(v)?b=this._cache.cacheClusters$(v).pipe(Iw(null,{}),Yr(()=>Na(this._cache.getClusters(v)))):this._cache.hasCell(v)?b=this._cache.cacheClusters$(v):b=Pi(),ei(vi(v),b)}),Bi(this._navigator.stateService.reference$)).subscribe(([[m,v],b])=>{this._scene.hasCluster(v.id,m)||this._scene.addCluster(v,this._computeTranslation(v,b),m)})),e.push(this._configuration$.pipe(Ct(m=>{var v;m.cameraSize=this._spatial.clamp(m.cameraSize,.01,1),m.pointSize=this._spatial.clamp(m.pointSize,.01,1);const b=m.pointsVisible?(v=m.pointVisualizationMode)!==null&&v!==void 0?v:K0.Original:K0.Hidden;return{cameraSize:m.cameraSize,cameraVisualizationMode:m.cameraVisualizationMode,cellsVisible:m.cellsVisible,originalPositionMode:m.originalPositionMode,pointSize:m.pointSize,pointVisualizationMode:b}}),qn((m,v)=>m.cameraSize===v.cameraSize&&m.cameraVisualizationMode===v.cameraVisualizationMode&&m.cellsVisible===v.cellsVisible&&m.originalPositionMode===v.originalPositionMode&&m.pointSize===v.pointSize&&m.pointVisualizationMode===v.pointVisualizationMode)).subscribe(m=>{this._scene.setCameraSize(m.cameraSize);const v=m.cameraVisualizationMode;this._scene.setCameraVisualizationMode(v),this._scene.setCellVisibility(m.cellsVisible),this._scene.setPointSize(m.pointSize);const b=m.pointVisualizationMode;this._scene.setPointVisualizationMode(b);const M=m.originalPositionMode;this._scene.setPositionMode(M)})),e.push(ei(n,i).subscribe(([m,v])=>{const b=Mq(m,v,this._navigator.api.data.geometry);this._scene.uncache(b),this._cache.uncache(b)})),e.push(this._navigator.playService.playing$.pipe(Yr(m=>m?Pi():this._container.mouseService.dblClick$),Bi(this._container.renderService.renderCamera$),Yr(([m,v])=>{const b=this._container.container,[M,O]=this._viewportCoords.canvasPosition(m,b),I=this._viewportCoords.canvasToViewport(M,O,b),A=this._scene.intersection.intersectObjects(I,v.perspective);return A?this._navigator.moveTo$(A).pipe(Vo(()=>Pi())):Pi()})).subscribe());const l=ei(this._configuration$,this._navigator.stateService.state$).pipe(Ct(([m,v])=>(m.cameraSize=this._spatial.clamp(m.cameraSize,.01,1),{size:m.cameraSize,visible:Eq(m.cameraVisualizationMode),state:v})),qn((m,v)=>m.size===v.size&&m.visible===v.visible&&m.state===v.state)),u=this._container.mouseService.mouseMove$.pipe(Ci(1),Bn());e.push(u.subscribe());const d=Vs(this._container.mouseService.mouseEnter$,this._container.mouseService.mouseLeave$,this._container.mouseService.windowBlur$);e.push(ei(this._navigator.playService.playing$,d,o,this._navigator.graphService.filter$).pipe(Yr(([m,v])=>!m&&v.type==="pointerenter"?ei(zp(u.pipe(Pp(1)),this._container.mouseService.mouseMove$),this._container.renderService.renderCamera$,l):ei(vi(v),vi(null),vi(null)))).subscribe(([m,v])=>{if(m.type!=="pointermove"){this._scene.setHoveredImage(null);return}const b=this._container.container,[M,O]=this._viewportCoords.canvasPosition(m,b),I=this._viewportCoords.canvasToViewport(M,O,b),A=this._scene.intersection.intersectObjects(I,v.perspective);this._scene.setHoveredImage(A)})),e.push(this._navigator.stateService.currentId$.subscribe(m=>{this._scene.setSelectedImage(m)})),e.push(this._navigator.stateService.currentState$.pipe(Ct(m=>{const v=this._scene;return{name:this._name,renderer:{frameId:m.id,needsRender:v.needsRender,render:v.render.bind(v),pass:hy.Opaque}}})).subscribe(this._container.glRenderer.render$));const f=this._navigator.graphService.dataAdded$.pipe(vn(m=>this._cache.hasCell(m)),Qi(m=>this._cache.updateCell$(m).pipe(Ct(v=>({id:m,images:v})),Bi(this._navigator.stateService.reference$))),Cf(),Bn());e.push(f.subscribe(([m,v])=>{this._addSceneImages(m,v)})),e.push(f.pipe(Sz(([m])=>{const v=m.id,b=this._cache;let M;return b.hasClusters(v)?M=b.updateClusters$(v):b.isCachingClusters(v)?M=this._cache.cacheClusters$(v).pipe(Iw(null,{}),Yr(()=>Na(b.updateClusters$(v)))):M=Pi(),ei(vi(v),M)}),Bi(this._navigator.stateService.reference$)).subscribe(([[m,v],b])=>{this._scene.hasCluster(v.id,m)||this._scene.addCluster(v,this._computeTranslation(v,b),m)}))}_deactivate(){this._subscriptions.unsubscribe(),this._cache.uncache(),this._scene.deactivate(),this._navigator.cacheService.configure()}_getDefaultConfiguration(){return{cameraSize:.1,cameraVisualizationMode:Sp.Homogeneous,cellGridDepth:1,originalPositionMode:pS.Hidden,pointSize:.1,pointsVisible:!0,pointVisualizationMode:K0.Original,cellsVisible:!1}}_addSceneImages(e,r){const n=e.id,i=e.images;for(const s of i)this._scene.hasImage(s.id,n)||this._scene.addImage(s,this._createTransform(s,r),this._computeOriginalPosition(s,r),n)}_cellsInFov(e,r,n){const i=this._spatial,s=this._navigator.api.data.geometry,o=s.lngLatToCellId(e.originalLngLat),a=[o],l=n/2,u=s.getAdjacent(o);for(const d of u){const f=s.getVertices(d);for(const m of f){const[v,b]=cd(m.lng,m.lat,0,e.lngLat.lng,e.lngLat.lat,0),M=Math.atan2(b,v),O=i.radToDeg(i.azimuthalToBearing(M));Math.abs(O-r)cd(i.lng,i.lat,-2,r.lng,r.lat,r.alt))}_computeTranslation(e,r){return cd(e.reference.lng,e.reference.lat,e.reference.alt,r.lng,r.lat,r.alt)}_createTransform(e,r){const n=mP({alt:e.computedAltitude,lat:e.lngLat.lat,lng:e.lngLat.lng},e.rotation,r);return new tw(e.exifOrientation,e.width,e.height,e.scale,e.rotation,n,void 0,void 0,e.cameraParameters,e.cameraType)}}L4e.componentName="spatial";class _K{constructor(){this._notifyChanged$=new dn}get changed$(){return this._notifyChanged$}}class Cu extends ca{constructor(e){super(e??"The provided geometry value is incorrect"),Object.setPrototypeOf(this,Cu.prototype),this.name="GeometryTagError"}}class qwt extends _K{constructor(e){if(super(),e.length<2)throw new Cu("A points geometry must have two or more positions.");this._points=[];for(const n of e){if(n[0]<0||n[0]>1||n[1]<0||n[1]>1)throw new Cu("Basic coordinates of points must be on the interval [0, 1].");this._points.push(n.slice())}}get points(){return this._points}addPoint2d(e){const r=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._points.push(r),this._notifyChanged$.next(this)}getPoint2d(e){return this._points[e].slice()}removePoint2d(e){if(e<0||e>=this._points.length||this._points.length<3)throw new Cu("Index for removed point must be valid.");this._points.splice(e,1),this._notifyChanged$.next(this)}setVertex2d(e,r,n){this.setPoint2d(e,r,n)}setPoint2d(e,r,n){const i=[Math.max(0,Math.min(1,r[0])),Math.max(0,Math.min(1,r[1]))];this._points[e]=i,this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints3d(this._points,e)}getPoint3d(e,r){return r.unprojectBasic(this._points[e],200)}getPoints2d(){return this._points.slice()}getCentroid2d(e){if(!e)throw new Cu("Get centroid must be called with a transform for points geometries.");const[r,n,i,s]=this.getRect2d(e),o=rn&&(n=a[0]),a[1]s&&(s=a[1]);if(Li(e.cameraType)){const a=[];for(let d=0;do[d][0]o[f][0]?1:dl&&(l=v,u=d+1)}u>0&&(r=o[a[u]][0],n=o[a[u-1]][0])}return[r,i,n,s]}setCentroid2d(e,r){throw new Error("Not implemented")}_getPoints3d(e,r){return e.map(n=>r.unprojectBasic(n,200))}}class k4e{constructor(e,r,n){this._geometry=e,this._transform=r,this._viewportCoords=n||new Nh,this._aborted$=new dn,this._created$=new dn,this._glObjectsChanged$=new dn,this._geometryChangedSubscription=this._geometry.changed$.subscribe(()=>{this._onGeometryChanged(),this._glObjectsChanged$.next(this)})}get geometry(){return this._geometry}get glObjects(){return this._glObjects}get aborted$(){return this._aborted$}get created$(){return this._created$}get glObjectsChanged$(){return this._glObjectsChanged$}get geometryChanged$(){return this._geometry.changed$.pipe(Ct(()=>this))}dispose(){this._geometryChangedSubscription.unsubscribe()}_canvasToTransform(e){const r=Math.round(e[0]),n=Math.round(e[1]);return`translate(-50%,-50%) translate(${r}px,${n}px)`}_colorToBackground(e){return"#"+("000000"+e.toString(16)).substr(-6)}_createOutine(e,r){const n=this._getLinePositions(e),i=new Oo;i.setAttribute("position",new to(n,3));const s=new cy({color:r,linewidth:1});return new t9(i,s)}_disposeLine(e){e!=null&&(e.geometry.dispose(),e.material.dispose())}_getLinePositions(e){const r=e.length,n=new Float32Array(r*3);for(let i=0;i80*r){a=u=t[0],l=d=t[1];for(var b=r;bu&&(u=f),m>d&&(d=m);v=Math.max(u-a,d-l),v=v!==0?1/v:0}return mS(s,o,r,a,l,v),o}function A4e(t,e,r,n,i){var s,o;if(i===Rq(t,e,r,n)>0)for(s=e;s=e;s-=n)o=Mae(s,t[s],t[s+1],o);return o&&KO(o,o.next)&&(yS(o),o=o.next),o}function j2(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(KO(r,r.next)||Rl(r.prev,r,r.next)===0)){if(yS(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function mS(t,e,r,n,i,s,o){if(t){!o&&s&&r7t(t,n,i,s);for(var a=t,l,u;t.prev!==t.next;){if(l=t.prev,u=t.next,s?Zwt(t,n,i,s):Wwt(t)){e.push(l.i/r),e.push(t.i/r),e.push(u.i/r),yS(t),t=u.next,a=u.next;continue}if(t=u,t===a){o?o===1?(t=Ywt(j2(t),e,r),mS(t,e,r,n,i,s,2)):o===2&&Xwt(t,e,r,n,i,s):mS(j2(t),e,r,n,i,s,1);break}}}}function Wwt(t){var e=t.prev,r=t,n=t.next;if(Rl(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(C4(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Rl(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Zwt(t,e,r,n){var i=t.prev,s=t,o=t.next;if(Rl(i,s,o)>=0)return!1;for(var a=i.xs.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,d=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,f=Tq(a,l,e,r,n),m=Tq(u,d,e,r,n),v=t.prevZ,b=t.nextZ;v&&v.z>=f&&b&&b.z<=m;){if(v!==t.prev&&v!==t.next&&C4(i.x,i.y,s.x,s.y,o.x,o.y,v.x,v.y)&&Rl(v.prev,v,v.next)>=0||(v=v.prevZ,b!==t.prev&&b!==t.next&&C4(i.x,i.y,s.x,s.y,o.x,o.y,b.x,b.y)&&Rl(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;v&&v.z>=f;){if(v!==t.prev&&v!==t.next&&C4(i.x,i.y,s.x,s.y,o.x,o.y,v.x,v.y)&&Rl(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=m;){if(b!==t.prev&&b!==t.next&&C4(i.x,i.y,s.x,s.y,o.x,o.y,b.x,b.y)&&Rl(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Ywt(t,e,r){var n=t;do{var i=n.prev,s=n.next.next;!KO(i,s)&&P4e(i,n,n.next,s)&&gS(i,s)&&gS(s,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(s.i/r),yS(n),yS(n.next),n=t=s),n=n.next}while(n!==t);return j2(n)}function Xwt(t,e,r,n,i,s){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&s7t(o,a)){var l=$4e(o,a);o=j2(o,o.next),l=j2(l,l.next),mS(o,e,r,n,i,s),mS(l,e,r,n,i,s);return}a=a.next}o=o.next}while(o!==t)}function Jwt(t,e,r,n){var i=[],s,o,a,l,u;for(s=0,o=e.length;s=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=n&&a>s){if(s=a,a===n){if(i===r.y)return r;if(i===r.next.y)return r.next}o=r.x=r.x&&r.x>=u&&n!==r.x&&C4(io.x||r.x===o.x&&t7t(o,r)))&&(o=r,f=m)),r=r.next;while(r!==l);return o}function t7t(t,e){return Rl(t.prev,t,e.prev)<0&&Rl(e.next,t,t.next)<0}function r7t(t,e,r,n){var i=t;do i.z===null&&(i.z=Tq(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,n7t(i)}function n7t(t){var e,r,n,i,s,o,a,l,u=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,a=0,e=0;e0||l>0&&n;)a!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,u*=2}while(o>1);return t}function Tq(t,e,r,n,i){return t=32767*(t-r)*i,e=32767*(e-n)*i,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function i7t(t){var e=t,r=t;do(e.x=0&&(t-o)*(n-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(i-o)*(n-a)>=0}function s7t(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!o7t(t,e)&&(gS(t,e)&&gS(e,t)&&a7t(t,e)&&(Rl(t.prev,t,e.prev)||Rl(t,e.prev,e))||KO(t,e)&&Rl(t.prev,t,t.next)>0&&Rl(e.prev,e,e.next)>0)}function Rl(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function KO(t,e){return t.x===e.x&&t.y===e.y}function P4e(t,e,r,n){var i=oR(Rl(t,e,r)),s=oR(Rl(t,e,n)),o=oR(Rl(r,n,t)),a=oR(Rl(r,n,e));return!!(i!==s&&o!==a||i===0&&sR(t,r,e)||s===0&&sR(t,n,e)||o===0&&sR(r,t,n)||a===0&&sR(r,e,n))}function sR(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function oR(t){return t>0?1:t<0?-1:0}function o7t(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&P4e(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function gS(t,e){return Rl(t.prev,t,t.next)<0?Rl(t,e,t.next)>=0&&Rl(t,t.prev,e)>=0:Rl(t,e,t.prev)<0||Rl(t,t.next,e)<0}function a7t(t,e){var r=t,n=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function $4e(t,e){var r=new Iq(t.i,t.x,t.y),n=new Iq(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function Mae(t,e,r,n){var i=new Iq(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function yS(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Iq(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}JO.deviation=function(t,e,r,n){var i=e&&e.length,s=i?e[0]*r:t.length,o=Math.abs(Rq(t,0,s,r));if(i)for(var a=0,l=e.length;a0&&(n+=t[i-1].length,r.holes.push(n))}return r};var Tae=xK.exports,wK={exports:{}};class l7t{constructor(e=[],r=u7t){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:r,compare:n}=this,i=r[e];for(;e>0;){const s=e-1>>1,o=r[s];if(n(i,o)>=0)break;r[e]=o,e=s}r[e]=i}_down(e){const{data:r,compare:n}=this,i=this.length>>1,s=r[e];for(;e=0)break;r[e]=a,e=o}r[e]=s}}function u7t(t,e){return te?1:0}var c7t=Object.freeze({__proto__:null,default:l7t}),h7t=s9t(c7t),ik=h7t;ik.default&&(ik=ik.default);wK.exports=O4e;wK.exports.default=O4e;function O4e(t,e,r){e=e||1;for(var n,i,s,o,a=0;as)&&(s=l[0]),(!a||l[1]>o)&&(o=l[1])}var u=s-n,d=o-i,f=Math.min(u,d),m=f/2;if(f===0){var v=[n,i];return v.distance=0,v}for(var b=new ik(void 0,d7t),M=n;MI.d&&(I=A);for(var j=b.length;b.length;){var H=b.pop();H.d>I.d&&(I=H,r&&console.log("found best %d after %d probes",Math.round(1e4*H.d)/1e4,j)),!(H.max-I.d<=e)&&(m=H.h/2,b.push(new Pv(H.x-m,H.y-m,m,t)),b.push(new Pv(H.x+m,H.y-m,m,t)),b.push(new Pv(H.x-m,H.y+m,m,t)),b.push(new Pv(H.x+m,H.y+m,m,t)),j+=4)}r&&(console.log("num probes: "+j),console.log("best distance: "+I.d));var W=[I.x,I.y];return W.distance=I.d,W}function d7t(t,e){return e.max-t.max}function Pv(t,e,r,n){this.x=t,this.y=e,this.h=r,this.d=f7t(t,e,n),this.max=this.d+this.h*Math.SQRT2}function f7t(t,e,r){for(var n=!1,i=1/0,s=0;se!=f[1]>e&&t<(f[0]-d[0])*(e-d[1])/(f[1]-d[1])+d[0]&&(n=!n),i=Math.min(i,m7t(t,e,d,f))}return i===0?0:(n?1:-1)*Math.sqrt(i)}function p7t(t){for(var e=0,r=0,n=0,i=t[0],s=0,o=i.length,a=o-1;s1?(i=n[0],s=n[1]):l>0&&(i+=o*l,s+=a*l)}return o=t-i,a=e-s,o*o+a*a}var g7t=wK.exports;function y7t(t,e){return t>e?1:t0)r=r.left;else return r}return null}contains(e){for(var r=this._root,n=this._compare;r;){var i=n(e,r.key);if(i===0)return!0;i<0?r=r.left:r=r.right}return!1}remove(e){var r=this.find(e);if(!r)return!1;if(this.splay(r),!r.left)this.replace(r,r.right);else if(!r.right)this.replace(r,r.left);else{var n=this.minNode(r.right);n.parent!==r&&(this.replace(n,n.right),n.right=r.right,n.right.parent=n),this.replace(r,n),n.left=r.left,n.left.parent=n}return this._size--,!0}removeNode(e){if(!e)return!1;if(this.splay(e),!e.left)this.replace(e,e.right);else if(!e.right)this.replace(e,e.left);else{var r=this.minNode(e.right);r.parent!==e&&(this.replace(r,r.right),r.right=e.right,r.right.parent=r),this.replace(e,r),r.left=e.left,r.left.parent=r}return this._size--,!0}erase(e){var r=this.find(e);if(r){this.splay(r);var n=r.left,i=r.right,s=null;n&&(n.parent=null,s=this.maxNode(n),this.splay(s),this._root=s),i&&(n?s.right=i:this._root=i,i.parent=s),this._size--}}pop(){var e=this._root,r=null;if(e){for(;e.left;)e=e.left;r={key:e.key,data:e.data},this.remove(e.key)}return r}next(e){var r=e;if(r)if(r.right)for(r=r.right;r&&r.left;)r=r.left;else for(r=e.parent;r&&r.right===e;)e=r,r=r.parent;return r}prev(e){var r=e;if(r)if(r.left)for(r=r.left;r&&r.right;)r=r.right;else for(r=e.parent;r&&r.left===e;)e=r,r=r.parent;return r}forEach(e){for(var r=this._root,n=[],i=!1,s=0;!i;)r?(n.push(r),r=r.left):n.length>0?(r=n.pop(),e(r,s++),r=r.right):i=!0;return this}range(e,r,n,i){const s=[],o=this._compare;let a=this._root,l;for(;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),l=o(a.key,r),l>0)break;if(o(a.key,e)>=0&&n.call(i,a))return this;a=a.right}return this}keys(){for(var e=this._root,r=[],n=[],i=!1;!i;)e?(r.push(e),e=e.left):r.length>0?(e=r.pop(),n.push(e.key),e=e.right):i=!0;return n}values(){for(var e=this._root,r=[],n=[],i=!1;!i;)e?(r.push(e),e=e.left):r.length>0?(e=r.pop(),n.push(e.data),e=e.right):i=!0;return n}at(e){for(var r=this._root,n=[],i=!1,s=0;!i;)if(r)n.push(r),r=r.left;else if(n.length>0){if(r=n.pop(),s===e)return r;s++,r=r.right}else i=!0;return null}load(e=[],r=[],n=!1){if(this._size!==0)throw new Error("bulk-load: tree is not empty");const i=e.length;return n&&kq(e,r,0,i-1,this._compare),this._root=Lq(null,e,r,0,i),this._size=i,this}min(){var e=this.minNode(this._root);return e?e.key:null}max(){var e=this.maxNode(this._root);return e?e.key:null}isEmpty(){return this._root===null}get size(){return this._size}static createTree(e,r,n,i,s){return new bK(n,s).load(e,r,i)}}function Lq(t,e,r,n,i){const s=i-n;if(s>0){const o=n+Math.floor(s/2),a=e[o],l=r[o],u={key:a,data:l,parent:t};return u.left=Lq(u,e,r,n,o),u.right=Lq(u,e,r,o+1,i),u}return null}function kq(t,e,r,n,i){if(r>=n)return;const s=t[r+n>>1];let o=r-1,a=n+1;for(;;){do o++;while(i(t[o],s)<0);do a--;while(i(t[a],s)>0);if(o>=a)break;let l=t[o];t[o]=t[a],t[a]=l,l=e[o],e[o]=e[a],e[a]=l}kq(t,e,r,a,i),kq(t,e,a+1,n,i)}const N4e=0,D4e=1,F4e=2,z4e=3,wP=0,Aq=1,bP=2,B4e=3;function cb(t,e,r){e===null?(t.inOut=!1,t.otherInOut=!0):(t.isSubject===e.isSubject?(t.inOut=!e.inOut,t.otherInOut=e.otherInOut):(t.inOut=!e.otherInOut,t.otherInOut=e.isVertical()?!e.inOut:e.inOut),e&&(t.prevInResult=!Iae(e,r)||e.isVertical()?e.prevInResult:e)),Iae(t,r)?t.resultTransition=v7t(t,r):t.resultTransition=0}function Iae(t,e){switch(t.type){case N4e:switch(e){case wP:return!t.otherInOut;case Aq:return t.otherInOut;case bP:return t.isSubject&&t.otherInOut||!t.isSubject&&!t.otherInOut;case B4e:return!0}break;case F4e:return e===wP||e===Aq;case z4e:return e===bP;case D4e:return!1}return!1}function v7t(t,e){let r=!t.inOut,n=!t.otherInOut,i;switch(e){case wP:i=r&&n;break;case Aq:i=r||n;break;case B4e:i=r^n;break;case bP:t.isSubject?i=r&&!n:i=n&&!r;break}return i?1:-1}let CP=class j4e{constructor(e,r,n,i,s){this.left=r,this.point=e,this.otherEvent=n,this.isSubject=i,this.type=s||N4e,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.resultTransition=0,this.otherPos=-1,this.outputContourId=-1,this.isExteriorRing=!0}isBelow(e){const r=this.point,n=this.otherEvent.point;return this.left?(r[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(r[1]-e[1])>0:(n[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(n[1]-e[1])>0}isAbove(e){return!this.isBelow(e)}isVertical(){return this.point[0]===this.otherEvent.point[0]}get inResult(){return this.resultTransition!==0}clone(){const e=new j4e(this.point,this.left,this.otherEvent,this.isSubject,this.type);return e.contourId=this.contourId,e.resultTransition=this.resultTransition,e.prevInResult=this.prevInResult,e.isExteriorRing=this.isExteriorRing,e.inOut=this.inOut,e.otherInOut=this.otherInOut,e}};function H0(t,e){return t[0]===e[0]?t[1]===e[1]:!1}const qg=11102230246251565e-32,vh=134217729,_7t=(3+8*qg)*qg;function fB(t,e,r,n,i){let s,o,a,l,u=e[0],d=n[0],f=0,m=0;d>u==d>-u?(s=u,u=e[++f]):(s=d,d=n[++m]);let v=0;if(fu==d>-u?(o=u+s,a=s-(o-u),u=e[++f]):(o=d+s,a=s-(o-d),d=n[++m]),s=o,a!==0&&(i[v++]=a);fu==d>-u?(o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++f]):(o=s+d,l=o-s,a=s-(o-l)+(d-l),d=n[++m]),s=o,a!==0&&(i[v++]=a);for(;f=ve||-le>=ve||(f=t-ge,a=t-(ge+f)+(f-i),f=r-fe,u=r-(fe+f)+(f-i),f=e-ee,l=e-(ee+f)+(f-s),f=n-be,d=n-(be+f)+(f-s),a===0&&l===0&&u===0&&d===0)||(ve=C7t*o+_7t*Math.abs(le),le+=ge*d+be*a-(ee*u+fe*l),le>=ve||-le>=ve))return le;H=a*be,m=vh*a,v=m-(m-a),b=a-v,m=vh*be,M=m-(m-be),O=be-M,W=b*O-(H-v*M-b*M-v*O),re=l*fe,m=vh*l,v=m-(m-l),b=l-v,m=vh*fe,M=m-(m-fe),O=fe-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Kh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Kh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Kh[2]=A-(pe-f)+(I-f),Kh[3]=pe;const Pe=fB(4,yx,4,Kh,Rae);H=ge*d,m=vh*ge,v=m-(m-ge),b=ge-v,m=vh*d,M=m-(m-d),O=d-M,W=b*O-(H-v*M-b*M-v*O),re=ee*u,m=vh*ee,v=m-(m-ee),b=ee-v,m=vh*u,M=m-(m-u),O=u-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Kh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Kh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Kh[2]=A-(pe-f)+(I-f),Kh[3]=pe;const Fe=fB(Pe,Rae,4,Kh,Lae);H=a*d,m=vh*a,v=m-(m-a),b=a-v,m=vh*d,M=m-(m-d),O=d-M,W=b*O-(H-v*M-b*M-v*O),re=l*u,m=vh*l,v=m-(m-l),b=l-v,m=vh*u,M=m-(m-u),O=u-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Kh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Kh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Kh[2]=A-(pe-f)+(I-f),Kh[3]=pe;const We=fB(Fe,Lae,4,Kh,kae);return kae[We-1]}function E7t(t,e,r,n,i,s){const o=(e-s)*(r-i),a=(t-i)*(n-s),l=o-a;if(o===0||a===0||o>0!=a>0)return l;const u=Math.abs(o+a);return Math.abs(l)>=w7t*u?l:-S7t(t,e,r,n,i,s,u)}function Pq(t,e,r){const n=E7t(t[0],t[1],e[0],e[1],r[0],r[1]);return n>0?-1:n<0?1:0}function V2(t,e){const r=t.point,n=e.point;return r[0]>n[0]?1:r[0]n[1]?1:-1:M7t(t,e,r)}function M7t(t,e,r,n){return t.left!==e.left?t.left?1:-1:Pq(r,t.otherEvent.point,e.otherEvent.point)!==0?t.isBelow(e.otherEvent.point)?-1:1:!t.isSubject&&e.isSubject?1:-1}function av(t,e,r){const n=new CP(e,!1,t,t.isSubject),i=new CP(e,!0,t.otherEvent,t.isSubject);return H0(t.point,t.otherEvent.point)&&console.warn("what is that, a collapsed segment?",t),n.contourId=i.contourId=t.contourId,V2(i,t.otherEvent)>0&&(t.otherEvent.left=!0,i.left=!1),t.otherEvent.otherEvent=i,t.otherEvent=n,r.push(i),r.push(n),r}function aR(t,e){return t[0]*e[1]-t[1]*e[0]}function pB(t,e){return t[0]*e[0]+t[1]*e[1]}function T7t(t,e,r,n,i){const s=[e[0]-t[0],e[1]-t[1]],o=[n[0]-r[0],n[1]-r[1]];function a(O,I,A){return[O[0]+I*A[0],O[1]+I*A[1]]}const l=[r[0]-t[0],r[1]-t[1]];let u=aR(s,o),d=u*u;const f=pB(s,s);if(d>0){const O=aR(l,o)/u;if(O<0||O>1)return null;const I=aR(l,s)/u;return I<0||I>1?null:O===0||O===1?[a(t,O,s)]:I===0||I===1?[a(r,I,o)]:[a(t,O,s)]}if(u=aR(l,s),d=u*u,d>0)return null;const m=pB(s,l)/f,v=m+pB(s,o)/f,b=Math.min(m,v),M=Math.max(m,v);return b<=1&&M>=0?b===1?[a(t,b>0?b:0,s)]:M===0?[a(t,M<1?M:1,s)]:[a(t,b>0?b:0,s),a(t,M<1?M:1,s)]:null}function mB(t,e,r){const n=T7t(t.point,t.otherEvent.point,e.point,e.otherEvent.point),i=n?n.length:0;if(i===0||i===1&&(H0(t.point,e.point)||H0(t.otherEvent.point,e.otherEvent.point))||i===2&&t.isSubject===e.isSubject)return 0;if(i===1)return!H0(t.point,n[0])&&!H0(t.otherEvent.point,n[0])&&av(t,n[0],r),!H0(e.point,n[0])&&!H0(e.otherEvent.point,n[0])&&av(e,n[0],r),1;const s=[];let o=!1,a=!1;return H0(t.point,e.point)?o=!0:V2(t,e)===1?s.push(e,t):s.push(t,e),H0(t.otherEvent.point,e.otherEvent.point)?a=!0:V2(t.otherEvent,e.otherEvent)===1?s.push(e.otherEvent,t.otherEvent):s.push(t.otherEvent,e.otherEvent),o&&a||o?(e.type=D4e,t.type=e.inOut===t.inOut?F4e:z4e,o&&!a&&av(s[1].otherEvent,s[0].point,r),2):a?(av(s[0],s[1].point,r),3):s[0]!==s[3].otherEvent?(av(s[0],s[1].point,r),av(s[1],s[2].point,r),3):(av(s[0],s[1].point,r),av(s[3].otherEvent,s[2].point,r),3)}function I7t(t,e){if(t===e)return 0;if(Pq(t.point,t.otherEvent.point,e.point)!==0||Pq(t.point,t.otherEvent.point,e.otherEvent.point)!==0)return H0(t.point,e.point)?t.isBelow(e.otherEvent.point)?-1:1:t.point[0]===e.point[0]?t.point[1]e.contourId?1:-1}else return t.isSubject?-1:1;return V2(t,e)===1?1:-1}function R7t(t,e,r,n,i,s){const o=new bK(I7t),a=[],l=Math.min(n[2],i[2]);let u,d,f;for(;t.length!==0;){let m=t.pop();if(a.push(m),m.point[0]>l||s===bP)break;if(m.left){d=u=o.insert(m),f=o.minNode(),u!==f?u=o.prev(u):u=null,d=o.next(d);const v=u?u.key:null;let b;if(cb(m,v,s),d&&mB(m,d.key,t)===2&&(cb(m,v,s),cb(m,d.key,s)),u&&mB(u.key,m,t)===2){let M=u;M!==f?M=o.prev(M):M=null,b=M?M.key:null,cb(v,b,s),cb(m,v,s)}}else m=m.otherEvent,d=u=o.find(m),u&&d&&(u!==f?u=o.prev(u):u=null,d=o.next(d),o.remove(m),d&&u&&mB(u.key,d.key,t))}return a}class L7t{constructor(){this.points=[],this.holeIds=[],this.holeOf=null,this.depth=null}isExterior(){return this.holeOf==null}}function k7t(t){let e,r,n,i;const s=[];for(r=0,n=t.length;rn;)i--;return i}function P7t(t,e,r){const n=new L7t;if(t.prevInResult!=null){const i=t.prevInResult,s=i.outputContourId;if(i.resultTransition>0){const a=e[s];if(a.holeOf!=null){const l=a.holeOf;e[l].holeIds.push(r),n.holeOf=l,n.depth=e[s].depth}else e[s].holeIds.push(r),n.holeOf=s,n.depth=e[s].depth+1}else n.holeOf=null,n.depth=e[s].depth}else n.holeOf=null,n.depth=0;return n}function $7t(t){let e,r;const n=k7t(t),i={},s=[];for(e=0,r=n.length;e{i[m]=!0,n[m].outputContourId=o};let u=e,d=e;const f=n[e].point;for(a.points.push(f);l(u),u=n[u].otherPos,l(u),a.points.push(n[u].point),u=A7t(u,n,i,d),u!=d;);s.push(a)}return s}var CK={exports:{}};CK.exports=vS;CK.exports.default=vS;function vS(t,e){if(!(this instanceof vS))return new vS(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||O7t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function O7t(t,e){return te?1:0}vS.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,s=e[i];if(r(n,s)>=0)break;e[t]=s,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=a,t=s}e[t]=i}};var N7t=CK.exports;const Aae=Math.max,Pae=Math.min;let lR=0;function $ae(t,e,r,n,i,s){let o,a,l,u,d,f;for(o=0,a=t.length-1;o0?f.left=!0:d.left=!0;const m=l[0],v=l[1];i[0]=Pae(i[0],m),i[1]=Pae(i[1],v),i[2]=Aae(i[2],m),i[3]=Aae(i[3],v),n.push(d),n.push(f)}}function D7t(t,e,r,n,i){const s=new N7t(null,V2);let o,a,l,u,d,f;for(l=0,u=t.length;ln[2]||n[0]>r[2]||r[1]>n[3]||n[1]>r[3])&&(s=SP),s}function B7t(t,e,r){typeof t[0][0][0]=="number"&&(t=[t]),typeof e[0][0][0]=="number"&&(e=[e]);let n=F7t(t,e);if(n)return n===SP?null:n;const i=[1/0,1/0,-1/0,-1/0],s=[1/0,1/0,-1/0,-1/0],o=D7t(t,e,i,s);if(n=z7t(t,e,i,s),n)return n===SP?null:n;const a=R7t(o,t,e,i,s,r),l=$7t(a),u=[];for(let d=0;dr.unprojectBasic(i,n))}_createCamera(e,r,n){const i=new EE;return i.up.copy(new st().fromArray(e)),i.position.copy(new st().fromArray(r)),i.lookAt(new st().fromArray(n)),i.updateMatrix(),i.updateMatrixWorld(!0),i}_deunproject(e,r,n){return e.map(i=>{const s=r.unprojectBasic(i,1e4),o=new st(s[0],s[1],s[2]).applyMatrix4(n.matrixWorldInverse);return[o.x/o.z,o.y/o.z]})}_triangulateSubarea(e,r,n,i,s){const o=j7t([e,...r],[n]);if(!o)return[];const a=[],l=this._subsampleThreshold,u=this._createCamera(s.upVector().toArray(),s.unprojectSfM([0,0],0),s.unprojectBasic(i,10));for(const d of o){const f=this._subsample(d[0],l),m=this._deunproject(f,s,u),v=this._unproject(f,s),b=[],M=[];for(let O=1;Oe[3])throw new Cu("Basic Y coordinates values can not be inverted.");for(let r of e)if(r<0||r>1)throw new Cu("Basic coordinates must be on the interval [0, 1].");this._anchorIndex=void 0,this._rect=e.slice(0,4),this._inverted=this._rect[0]>this._rect[2]}get anchorIndex(){return this._anchorIndex}get inverted(){return this._inverted}get rect(){return this._rect}initializeAnchorIndexing(e){if(this._anchorIndex!==void 0)throw new Cu("Anchor indexing is already initialized.");if(e<0||e>3)throw new Cu(`Invalid anchor index: ${e}.`);this._anchorIndex=e===void 0?0:e}terminateAnchorIndexing(){this._anchorIndex=void 0}setOppositeVertex2d(e,r){if(this._anchorIndex===void 0)throw new Cu("Anchor indexing needs to be initialized.");const n=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))],i=this._rect.slice(),s=this._anchorIndex===0?[i[0],i[3]]:this._anchorIndex===1?[i[0],i[1]]:this._anchorIndex===2?[i[2],i[1]]:[i[2],i[3]];if(Li(r.cameraType)){const o=this._anchorIndex<2?n[0]-i[2]:n[0]-i[0];!this._inverted&&this._anchorIndex<2&&n[0]<.25&&i[2]>.75&&o<-.5?(this._inverted=!0,this._anchorIndex=s[1]>n[1]?0:1):!this._inverted&&this._anchorIndex>=2&&n[0]<.25&&i[2]>.75&&o<-.5?(this._inverted=!0,this._anchorIndex=s[1]>n[1]?0:1):this._inverted&&this._anchorIndex>=2&&n[0]<.25&&i[0]>.75&&o<-.5?(this._inverted=!1,s[0]>n[0]?this._anchorIndex=s[1]>n[1]?3:2:this._anchorIndex=s[1]>n[1]?0:1):!this._inverted&&this._anchorIndex>=2&&n[0]>.75&&i[0]<.25&&o>.5?(this._inverted=!0,this._anchorIndex=s[1]>n[1]?3:2):!this._inverted&&this._anchorIndex<2&&n[0]>.75&&i[0]<.25&&o>.5?(this._inverted=!0,this._anchorIndex=s[1]>n[1]?3:2):this._inverted&&this._anchorIndex<2&&n[0]>.75&&i[2]<.25&&o>.5?(this._inverted=!1,s[0]>n[0]?this._anchorIndex=s[1]>n[1]?3:2:this._anchorIndex=s[1]>n[1]?0:1):this._inverted&&this._anchorIndex<2&&n[0]>i[0]?(this._inverted=!1,this._anchorIndex=s[1]>n[1]?0:1):this._inverted&&this._anchorIndex>=2&&n[0]n[1]?3:2):this._inverted?this._anchorIndex<2?this._anchorIndex=s[1]>n[1]?0:1:this._anchorIndex=s[1]>n[1]?3:2:s[0]<=n[0]&&s[1]>n[1]?this._anchorIndex=0:s[0]<=n[0]&&s[1]<=n[1]?this._anchorIndex=1:s[0]>n[0]&&s[1]<=n[1]?this._anchorIndex=2:this._anchorIndex=3;const a=[];this._anchorIndex===0?(a[0]=s[0],a[1]=n[1],a[2]=n[0],a[3]=s[1]):this._anchorIndex===1?(a[0]=s[0],a[1]=s[1],a[2]=n[0],a[3]=n[1]):this._anchorIndex===2?(a[0]=n[0],a[1]=s[1],a[2]=s[0],a[3]=n[1]):(a[0]=n[0],a[1]=n[1],a[2]=s[0],a[3]=s[1]),(!this._inverted&&a[0]>a[2]||this._inverted&&a[0]a[3]&&(a[1]=i[1],a[3]=i[3]),this._rect[0]=a[0],this._rect[1]=a[1],this._rect[2]=a[2],this._rect[3]=a[3]}else{s[0]<=n[0]&&s[1]>n[1]?this._anchorIndex=0:s[0]<=n[0]&&s[1]<=n[1]?this._anchorIndex=1:s[0]>n[0]&&s[1]<=n[1]?this._anchorIndex=2:this._anchorIndex=3;const o=[];this._anchorIndex===0?(o[0]=s[0],o[1]=n[1],o[2]=n[0],o[3]=s[1]):this._anchorIndex===1?(o[0]=s[0],o[1]=s[1],o[2]=n[0],o[3]=n[1]):this._anchorIndex===2?(o[0]=n[0],o[1]=s[1],o[2]=s[0],o[3]=n[1]):(o[0]=n[0],o[1]=n[1],o[2]=s[0],o[3]=s[1]),o[0]>o[2]&&(o[0]=i[0],o[2]=i[2]),o[1]>o[3]&&(o[1]=i[1],o[3]=i[3]),this._rect[0]=o[0],this._rect[1]=o[1],this._rect[2]=o[2],this._rect[3]=o[3]}this._notifyChanged$.next(this)}setVertex2d(e,r,n){let i=this._rect.slice(),s=[Math.max(0,Math.min(1,r[0])),Math.max(0,Math.min(1,r[1]))],o=[];if(e===0?(o[0]=s[0],o[1]=i[1],o[2]=i[2],o[3]=s[1]):e===1?(o[0]=s[0],o[1]=s[1],o[2]=i[2],o[3]=i[3]):e===2?(o[0]=i[0],o[1]=s[1],o[2]=s[0],o[3]=i[3]):e===3&&(o[0]=i[0],o[1]=i[1],o[2]=s[0],o[3]=s[1]),Li(n.cameraType)){let a=e<2&&s[0]>.75&&i[0]<.25||e>=2&&this._inverted&&s[0]>.75&&i[2]<.25,l=e<2&&this._inverted&&s[0]<.25&&i[0]>.75||e>=2&&s[0]<.25&&i[2]>.75;a||l?this._inverted=!this._inverted:(o[0]-i[0]<-.25&&(o[0]=i[0]),o[2]-i[2]>.25&&(o[2]=i[2])),(!this._inverted&&o[0]>o[2]||this._inverted&&o[0]o[2]&&(o[0]=i[0],o[2]=i[2]);o[1]>o[3]&&(o[1]=i[1],o[3]=i[3]),this._rect[0]=o[0],this._rect[1]=o[1],this._rect[2]=o[2],this._rect[3]=o[3],this._notifyChanged$.next(this)}setCentroid2d(e,r){let n=this._rect.slice(),i=n[0],s=this._inverted?n[2]+1:n[2],o=n[1],a=n[3],l=i+(s-i)/2,u=o+(a-o)/2,d=0;if(Li(r.cameraType))d=this._inverted?e[0]+1-l:e[0]-l;else{let b=-i,M=1-s;d=Math.max(b,Math.min(M,e[0]-l))}let f=-o,m=1-a,v=Math.max(f,Math.min(m,e[1]-u));this._rect[0]=n[0]+d,this._rect[1]=n[1]+v,this._rect[2]=n[2]+d,this._rect[3]=n[3]+v,this._rect[0]<0?(this._rect[0]+=1,this._inverted=!this._inverted):this._rect[0]>1&&(this._rect[0]-=1,this._inverted=!this._inverted),this._rect[2]<0?(this._rect[2]+=1,this._inverted=!this._inverted):this._rect[2]>1&&(this._rect[2]-=1,this._inverted=!this._inverted),this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints2d().map(r=>e.unprojectBasic(r,200))}getVertex2d(e){return this._rectToVertices2d(this._rect)[e]}getNonAdjustedVertex2d(e){return this._rectToNonAdjustedVertices2d(this._rect)[e]}getVertex3d(e,r){return r.unprojectBasic(this._rectToVertices2d(this._rect)[e],200)}getVertices2d(){return this._rectToVertices2d(this._rect)}getVertices3d(e){return this._rectToVertices2d(this._rect).map(r=>e.unprojectBasic(r,200))}getCentroid2d(){const e=this._rect,r=e[0],n=this._inverted?e[2]+1:e[2],i=e[1],s=e[3],o=(r+n)/2,a=(i+s)/2;return[o,a]}getCentroid3d(e){const r=this.getCentroid2d();return e.unprojectBasic(r,200)}getPoleOfInaccessibility2d(){return this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect))}getPoleOfInaccessibility3d(e){let r=this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));return e.unprojectBasic(r,200)}getTriangles3d(e){return Li(e.cameraType)?[]:this._triangulate(this._project(this._getPoints2d(),e),this.getPoints3d(e))}validate(e){let r=this._rect;return!(!this._inverted&&e[0].25||e[1]{A.stopPropagation(),this._aborted$.next(this)},v=A=>{A.stopPropagation(),this._geometry.removePoint2d(l)},b=this._canvasToTransform(f),M={onclick:a===0&&o<3?m:v,style:{transform:b}};i.push(Ar.h("div.mapillary-tag-interactor",M,[]));const I={style:{background:this._colorToBackground(this._options.color),transform:b}};i.push(Ar.h("div.mapillary-tag-vertex",I,[]))}if(o>2&&this._options.indicateCompleter===!0){const[a,l]=this._geometry.getCentroid2d(this._transform),u=this._viewportCoords.basicToCanvasSafe(a,l,n,this._transform,e);if(u){const d=M=>{M.stopPropagation(),this._geometry.removePoint2d(this._geometry.points.length-1),this._created$.next(this)},f=this._canvasToTransform(u),m={onclick:d,style:{transform:f}};i.push(Ar.h("div.mapillary-tag-completer.mapillary-tag-larger",m,[]));const v={style:{background:this._colorToBackground(this._options.color),transform:f}};i.push(Ar.h("div.mapillary-tag-vertex.mapillary-tag-larger",v,[]));const b={style:{transform:f}};i.push(Ar.h("div.mapillary-tag-dot",b,[]))}}return i}_onGeometryChanged(){this._disposeObjects(),this._rectGeometry=new jd(this._geometry.getRect2d(this._transform)),this._createGlObjects()}_createGlObjects(){this._glObjects=[];const e=this._rectGeometry.getPoints3d(this._transform);this._outline=this._createOutine(e,this._options.color),this._glObjects.push(this._outline)}_disposeObjects(){this._disposeLine(this._outline),this._outline=null,this._glObjects=null}}class Wg extends V4e{constructor(e,r){super();let n=e.length;if(n<3)throw new Cu("A polygon must have three or more positions.");if(e[0][0]!==e[n-1][0]||e[0][1]!==e[n-1][1])throw new Cu("First and last positions must be equivalent.");this._polygon=[];for(let i of e){if(i[0]<0||i[0]>1||i[1]<0||i[1]>1)throw new Cu("Basic coordinates of polygon must be on the interval [0, 1].");this._polygon.push(i.slice())}if(this._holes=[],r!=null)for(let i=0;i1||a[1]<0||a[1]>1)throw new Cu("Basic coordinates of hole must be on the interval [0, 1].");this._holes[i].push(a.slice())}}}get polygon(){return this._polygon}get holes(){return this._holes}addVertex2d(e){let r=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._polygon.splice(this._polygon.length-1,0,r),this._notifyChanged$.next(this)}getVertex2d(e){return this._polygon[e].slice()}removeVertex2d(e){if(e<0||e>=this._polygon.length||this._polygon.length<4)throw new Cu("Index for removed vertex must be valid.");if(e>0&&eO[0]),i=this._polygon.map(O=>O[1]),s=Math.min.apply(Math,n),o=Math.max.apply(Math,n),a=Math.min.apply(Math,i),l=Math.max.apply(Math,i),u=this.getCentroid2d(),d=-s,f=1-o,m=-a,v=1-l,b=Math.max(d,Math.min(f,e[0]-u[0])),M=Math.max(m,Math.min(v,e[1]-u[1]));for(let O of this._polygon)O[0]+=b,O[1]+=M;this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints3d(this._subsample(this._polygon),e)}getVertex3d(e,r){return r.unprojectBasic(this._polygon[e],200)}getVertices2d(){return this._polygon.slice()}getVertices3d(e){return this._getPoints3d(this._polygon,e)}getHolePoints3d(e){return this._holes.map(r=>this._getPoints3d(this._subsample(r),e))}getHoleVertices3d(e){return this._holes.map(r=>this._getPoints3d(r,e))}getCentroid2d(){let e=this._polygon,r=0,n=0,i=0;for(let s=0;sthis._project(r,e)),this.getHoleVertices3d(e))}getTriangles3d(e){if(Li(e.cameraType))return this._triangulateSpherical(this._polygon.slice(),this.holes.slice(),e);const r=this._project(this._subsample(this._polygon),e),n=this.getPoints3d(e),i=this._holes.map(o=>this._project(this._subsample(o),e)),s=this.getHolePoints3d(e);return this._triangulate(r,n,i,s)}getPoleOfInaccessibility2d(){return this._getPoleOfInaccessibility2d(this._polygon.slice())}getPoleOfInaccessibility3d(e){let r=this._getPoleOfInaccessibility2d(this._polygon.slice());return e.unprojectBasic(r,200)}_getPoints3d(e,r){return e.map(n=>r.unprojectBasic(n,200))}}class Oae extends k4e{constructor(e,r,n,i){super(e,n,i),this._options={color:r.color==null?16777215:r.color},this._createGlObjects()}create(){if(this._geometry instanceof jd)this._created$.next(this);else if(this._geometry instanceof Wg){const e=this._geometry;e.removeVertex2d(e.polygon.length-2),this._created$.next(this)}}dispose(){super.dispose(),this._disposeLine(this._outline),this._disposeObjects()}getDOMObjects(e,r){const n=[],i={offsetHeight:r.height,offsetWidth:r.width},s=o=>{o.stopPropagation(),this._aborted$.next(this)};if(this._geometry instanceof jd){const o=this._geometry.anchorIndex,a=o===void 0?1:o,[l,u]=this._geometry.getVertex2d(a),d=this._viewportCoords.basicToCanvasSafe(l,u,i,this._transform,e);if(d!=null){const f=this._colorToBackground(this._options.color),m=this._canvasToTransform(d),v={style:{background:f,transform:m}},b={onclick:s,style:{transform:m}};n.push(Ar.h("div.mapillary-tag-interactor",b,[])),n.push(Ar.h("div.mapillary-tag-vertex",v,[]))}}else if(this._geometry instanceof Wg){const o=this._geometry,[a,l]=o.getVertex2d(0),u=this._viewportCoords.basicToCanvasSafe(a,l,i,this._transform,e);if(u!=null){const f=o.polygon.length>4?M=>{M.stopPropagation(),o.removeVertex2d(o.polygon.length-2),this._created$.next(this)}:s,m=this._canvasToTransform(u),v={onclick:f,style:{transform:m}},b=o.polygon.length>4?"mapillary-tag-completer":"mapillary-tag-interactor";n.push(Ar.h("div."+b,v,[]))}if(o.polygon.length>3){const[f,m]=o.getVertex2d(o.polygon.length-3),v=this._viewportCoords.basicToCanvasSafe(f,m,i,this._transform,e);if(v!=null){const b=I=>{I.stopPropagation(),o.removeVertex2d(o.polygon.length-3)},M=this._canvasToTransform(v),O={onclick:b,style:{transform:M}};n.push(Ar.h("div.mapillary-tag-interactor",O,[]))}}const d=o.polygon.slice();d.splice(-2,2);for(const f of d){const m=this._viewportCoords.basicToCanvasSafe(f[0],f[1],i,this._transform,e);if(m!=null){const v=this._colorToBackground(this._options.color),b=this._canvasToTransform(m),M={style:{background:v,transform:b}};n.push(Ar.h("div.mapillary-tag-vertex",M,[]))}}}return n}addPoint(e){if(this._geometry instanceof jd){if(!this._geometry.validate(e))return;this._created$.next(this)}else this._geometry instanceof Wg&&this._geometry.addVertex2d(e)}_onGeometryChanged(){this._disposeLine(this._outline),this._disposeObjects(),this._createGlObjects()}_disposeObjects(){this._outline=null,this._glObjects=[]}_createGlObjects(){const e=this._geometry instanceof jd?this._geometry.getPoints3d(this._transform):this._geometry.getVertices3d(this._transform);this._outline=this._createOutine(e,this._options.color),this._glObjects=[this._outline]}}class U7t{constructor(e,r){this._component=e,this._navigator=r,this._tagOperation$=new dn,this._createPoints$=new dn,this._createPolygon$=new dn,this._createRect$=new dn,this._delete$=new dn,this._tag$=this._tagOperation$.pipe(Ja((n,i)=>i(n),null),js()),this._replayedTag$=this._tag$.pipe(Ci(1),Bn()),this._replayedTag$.subscribe(),this._createPoints$.pipe(Bi(this._component.configuration$,this._navigator.stateService.currentTransform$),Ct(([n,i,s])=>()=>{const o=new qwt([[n[0],n[1]],[n[0],n[1]]]);return new V7t(o,{color:i.createColor,indicateCompleter:i.indicatePointsCompleter},s)})).subscribe(this._tagOperation$),this._createRect$.pipe(Bi(this._component.configuration$,this._navigator.stateService.currentTransform$),Ct(([n,i,s])=>()=>{const o=new jd([n[0],n[1],n[0],n[1]]);return new Oae(o,{color:i.createColor},s)})).subscribe(this._tagOperation$),this._createPolygon$.pipe(Bi(this._component.configuration$,this._navigator.stateService.currentTransform$),Ct(([n,i,s])=>()=>{const o=new Wg([[n[0],n[1]],[n[0],n[1]],[n[0],n[1]]]);return new Oae(o,{color:i.createColor},s)})).subscribe(this._tagOperation$),this._delete$.pipe(Ct(()=>()=>null)).subscribe(this._tagOperation$)}get createRect$(){return this._createRect$}get createPolygon$(){return this._createPolygon$}get createPoints$(){return this._createPoints$}get delete$(){return this._delete$}get tag$(){return this._tag$}get replayedTag$(){return this._replayedTag$}}class H7t{render(e,r,n,i,s){let o=[];for(const a of e)o=o.concat(a.getDOMObjects(n,i,s));return r!=null&&(o=o.concat(r.getDOMObjects(i,s))),Ar.h("div.mapillary-tag-container",{},o)}clear(){return Ar.h("div",{},[])}}class G7t{constructor(e,r){this._createTag=null,this._needsRender=!1,this._raycaster=r||new fP,this._scene=e||new Gg,this._objectTags={},this._retrievableObjects=[],this._tags={}}get needsRender(){return this._needsRender}add(e){for(let r of e)r.tag.id in this._tags&&this._remove(r.tag.id),this._add(r);this._needsRender=!0}addCreateTag(e){for(const r of e.glObjects)this._scene.add(r);this._createTag={tag:e,objects:e.glObjects},this._needsRender=!0}clear(){for(const e of Object.keys(this._tags))this._remove(e);this._needsRender=!1}get(e){return this.has(e)?this._tags[e].tag:void 0}has(e){return e in this._tags}hasCreateTag(){return this._createTag!=null}intersectObjects([e,r],n){this._raycaster.setFromCamera(new bn(e,r),n);const i=this._raycaster.intersectObjects(this._retrievableObjects),s=[];for(const o of i)o.object.uuid in this._objectTags&&s.push(this._objectTags[o.object.uuid]);return s}remove(e){for(const r of e)this._remove(r);this._needsRender=!0}removeAll(){for(const e of Object.keys(this._tags))this._remove(e);this._needsRender=!0}removeCreateTag(){if(this._createTag!=null){for(const e of this._createTag.objects)this._scene.remove(e);this._createTag.tag.dispose(),this._createTag=null,this._needsRender=!0}}render(e,r){r.render(this._scene,e),this._needsRender=!1}update(){this._needsRender=!0}updateCreateTagObjects(e){if(this._createTag.tag!==e)throw new Error("Create tags do not have the same reference.");for(let r of this._createTag.objects)this._scene.remove(r);for(const r of e.glObjects)this._scene.add(r);this._createTag.objects=e.glObjects,this._needsRender=!0}updateObjects(e){const r=e.tag.id;if(this._tags[r].tag!==e)throw new Error("Tags do not have the same reference.");const n=this._tags[r];this._removeObjects(n),delete this._tags[r],this._add(e),this._needsRender=!0}_add(e){const r=e.tag.id,n={tag:e,objects:[],retrievableObjects:[]};this._tags[r]=n;for(const i of e.getGLObjects())n.objects.push(i),this._scene.add(i);for(const i of e.getRetrievableObjects())n.retrievableObjects.push(i),this._retrievableObjects.push(i),this._objectTags[i.uuid]=e.tag.id}_remove(e){const r=this._tags[e];this._removeObjects(r),r.tag.dispose(),delete this._tags[e]}_removeObjects(e){for(const r of e.objects)this._scene.remove(r);for(const r of e.retrievableObjects){const n=this._retrievableObjects.indexOf(r);n!==-1&&this._retrievableObjects.splice(n,1)}}}var S4;(function(t){t[t.Default=0]="Default",t[t.CreatePoint=1]="CreatePoint",t[t.CreatePoints=2]="CreatePoints",t[t.CreatePolygon=3]="CreatePolygon",t[t.CreateRect=4]="CreateRect",t[t.CreateRectDrag=5]="CreateRectDrag"})(S4||(S4={}));var Rf;(function(t){t[t.None=0]="None",t[t.Centroid=1]="Centroid",t[t.Vertex=2]="Vertex"})(Rf||(Rf={}));class U4e{constructor(e,r,n){this._tag=e,this._transform=r,this._viewportCoords=n||new Nh,this._glObjectsChanged$=new dn,this._interact$=new dn}get glObjectsChanged$(){return this._glObjectsChanged$}get interact$(){return this._interact$}get tag(){return this._tag}}class H4e extends U4e{constructor(e,r){super(e,r),this._geometryChangedSubscription=this._tag.geometry.changed$.subscribe(()=>{this._onGeometryChanged()}),this._changedSubscription=this._tag.changed$.subscribe(()=>{this._onTagChanged()&&this._glObjectsChanged$.next(this)})}dispose(){this._changedSubscription.unsubscribe(),this._geometryChangedSubscription.unsubscribe()}_colorToCss(e){return"#"+("000000"+e.toString(16)).substr(-6)}_createFill(){let e=this._getTriangles(),r=new Float32Array(e),n=new Oo;n.setAttribute("position",new to(r,3)),n.computeBoundingSphere();let i=new k5({side:sd,transparent:!0});return this._updateFillMaterial(i),new ya(n,i)}_createLine(e){let r=this._getLinePositions(e),n=new Oo;n.setAttribute("position",new to(r,3)),n.computeBoundingSphere();let i=new cy;this._updateLineBasicMaterial(i);const s=new t9(n,i);return s.renderOrder=1,s}_createOutline(){return this._createLine(this._getPoints3d())}_disposeFill(){this._fill!=null&&(this._fill.geometry.dispose(),this._fill.material.dispose(),this._fill=null)}_disposeOutline(){this._outline!=null&&(this._outline.geometry.dispose(),this._outline.material.dispose(),this._outline=null)}_getLinePositions(e){let r=e.length,n=new Float32Array(r*3);for(let i=0;i{let s=i.offsetX-i.target.offsetWidth/2,o=i.offsetY-i.target.offsetHeight/2;this._interact$.next({cursor:r,offsetX:s,offsetY:o,operation:e,tag:this._tag,vertexIndex:n})}}_updateFillGeometry(){let e=this._getTriangles(),r=new Float32Array(e),n=this._fill.geometry,i=n.getAttribute("position");i.array.length===r.length?(i.set(r),i.needsUpdate=!0):(n.deleteAttribute("position"),n.setAttribute("position",new to(r,3))),n.computeBoundingSphere()}_updateLine(e,r){let n=this._getLinePositions(r),i=e.geometry,s=i.getAttribute("position");s.set(n),s.needsUpdate=!0,i.computeBoundingSphere()}_updateOulineGeometry(){this._updateLine(this._outline,this._getPoints3d())}}class q7t extends H4e{constructor(e,r){super(e,r),this._rectGeometry=new jd(this._tag.geometry.getRect2d(r)),this._fill=Li(r.cameraType)?null:this._createFill(),this._outline=this._tag.lineWidth>=1?this._createOutline():null}dispose(){super.dispose(),this._disposeFill(),this._disposeOutline()}getDOMObjects(e,r,n){const i=[],s={offsetHeight:n.height,offsetWidth:n.width};if(!this._tag.editable)return i;const o=this._colorToCss(this._tag.lineColor),a=this._tag.geometry.getPoints2d();for(let l=0;l=1&&(this._outline=this._createOutline(),e=!0):this._updateOutlineMaterial(),e}_getPoints3d(){return this._rectGeometry.getPoints3d(this._transform)}_getTriangles(){return this._rectGeometry.getTriangles3d(this._transform)}_updateFillMaterial(e){e.color=new $i(this._tag.fillColor),e.opacity=this._tag.fillOpacity,e.needsUpdate=!0}_updateLineBasicMaterial(e){e.color=new $i(this._tag.lineColor),e.linewidth=Math.max(this._tag.lineWidth,1),e.visible=this._tag.lineWidth>=1&&this._tag.lineOpacity>0,e.opacity=this._tag.lineOpacity,e.transparent=this._tag.lineOpacity<1,e.needsUpdate=!0}_updateOutlineMaterial(){let e=this._outline.material;this._updateLineBasicMaterial(e)}}class SK extends XO{constructor(e,r){super(),this._id=e,this._geometry=r,this._notifyChanged$=new dn,this._notifyChanged$.subscribe(n=>{const i="tag",s={target:this,type:i};this.fire(i,s)}),this._geometry.changed$.subscribe(n=>{const i="geometry",s={target:this,type:i};this.fire(i,s)})}get id(){return this._id}get geometry(){return this._geometry}get changed$(){return this._notifyChanged$}get geometryChanged$(){return this._geometry.changed$.pipe(Ct(()=>this),js())}fire(e,r){super.fire(e,r)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}}class Nae extends SK{constructor(e,r,n){super(e,r),n=n||{},this._editable=n.editable==null?!1:n.editable,this._fillColor=n.fillColor==null?16777215:n.fillColor,this._fillOpacity=n.fillOpacity==null?0:n.fillOpacity,this._indicateVertices=n.indicateVertices==null?!0:n.indicateVertices,this._lineColor=n.lineColor==null?16777215:n.lineColor,this._lineOpacity=n.lineOpacity==null?1:n.lineOpacity,this._lineWidth=n.lineWidth==null?1:n.lineWidth}get editable(){return this._editable}set editable(e){this._editable=e,this._notifyChanged$.next(this)}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this._notifyChanged$.next(this)}get fillOpacity(){return this._fillOpacity}set fillOpacity(e){this._fillOpacity=e,this._notifyChanged$.next(this)}get geometry(){return this._geometry}get indicateVertices(){return this._indicateVertices}set indicateVertices(e){this._indicateVertices=e,this._notifyChanged$.next(this)}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this._notifyChanged$.next(this)}get lineOpacity(){return this._lineOpacity}set lineOpacity(e){this._lineOpacity=e,this._notifyChanged$.next(this)}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this._notifyChanged$.next(this)}setOptions(e){this._editable=e.editable==null?this._editable:e.editable,this._indicateVertices=e.indicateVertices==null?this._indicateVertices:e.indicateVertices,this._lineColor=e.lineColor==null?this._lineColor:e.lineColor,this._lineWidth=e.lineWidth==null?this._lineWidth:e.lineWidth,this._fillColor=e.fillColor==null?this._fillColor:e.fillColor,this._fillOpacity=e.fillOpacity==null?this._fillOpacity:e.fillOpacity,this._notifyChanged$.next(this)}}var Ow;(function(t){t[t.TwoDimensional=0]="TwoDimensional",t[t.ThreeDimensional=1]="ThreeDimensional"})(Ow||(Ow={}));class W7t extends H4e{constructor(e,r){super(e,r),this._fill=Li(r.cameraType)?e.domain===Ow.TwoDimensional&&e.geometry instanceof Wg?this._createFill():null:this._createFill(),this._holes=this._tag.lineWidth>=1?this._createHoles():[],this._outline=this._tag.lineWidth>=1?this._createOutline():null}dispose(){super.dispose(),this._disposeFill(),this._disposeHoles(),this._disposeOutline()}getDOMObjects(e,r,n){const i=[],s=this._tag.geometry instanceof jd,o=!Li(this._transform.cameraType),a={offsetHeight:n.height,offsetWidth:n.width};if(this._tag.icon!=null&&(s||o)){const[d,f]=this._tag.geometry instanceof jd?this._tag.geometry.getVertex2d(this._tag.iconIndex):this._tag.geometry.getPoleOfInaccessibility2d(),m=this._viewportCoords.basicToCanvasSafe(d,f,a,this._transform,r);if(m!=null){const v=()=>{this._interact$.next({offsetX:0,offsetY:0,operation:Rf.None,tag:this._tag})};if(e.loaded){const b=e.getDOMSprite(this._tag.icon,this._tag.iconFloat),M=Math.round(m[0]),O=Math.round(m[1]),I=`translate(${M}px,${O}px)`,j={onclick:H=>{H.stopPropagation(),this._tag.click$.next(this._tag)},onpointerdown:v,style:{transform:I}};i.push(Ar.h("div.mapillary-tag-symbol",j,[b]))}}}else if(this._tag.text!=null&&(s||o)){const[d,f]=this._tag.geometry instanceof jd?this._tag.geometry.getVertex2d(3):this._tag.geometry.getPoleOfInaccessibility2d(),m=this._viewportCoords.basicToCanvasSafe(d,f,a,this._transform,r);if(m!=null){const v=Math.round(m[0]),b=Math.round(m[1]),M=this._tag.geometry instanceof jd?`translate(${v}px,${b}px)`:`translate(-50%, -50%) translate(${v}px,${b}px)`,I={onpointerdown:()=>{this._interact$.next({offsetX:0,offsetY:0,operation:Rf.None,tag:this._tag})},style:{color:this._colorToCss(this._tag.textColor),transform:M},textContent:this._tag.text};i.push(Ar.h("span.mapillary-tag-symbol",I,[]))}}if(!this._tag.editable)return i;const l=this._colorToCss(this._tag.lineColor);if(this._tag.geometry instanceof jd){const[d,f]=this._tag.geometry.getCentroid2d(),m=this._viewportCoords.basicToCanvasSafe(d,f,a,this._transform,r);if(m!=null){const v=this._interact(Rf.Centroid,"move"),b=Math.round(m[0]),M=Math.round(m[1]),O=`translate(-50%, -50%) translate(${b}px,${M}px)`,I={onpointerdown:v,style:{background:l,transform:O}};i.push(Ar.h("div.mapillary-tag-mover",I,[]))}}const u=this._tag.geometry.getVertices2d();for(let d=0;d0&&this._updateHoleGeometries(),this._outline!=null&&this._updateOulineGeometry()}_onTagChanged(){let e=!1;return this._fill!=null&&this._updateFillMaterial(this._fill.material),this._outline==null?this._tag.lineWidth>=1&&(this._holes=this._createHoles(),this._outline=this._createOutline(),e=!0):(this._updateHoleMaterials(),this._updateOutlineMaterial()),e}_getPoints3d(){return this._in3dDomain()?this._tag.geometry.getVertices3d(this._transform):this._tag.geometry.getPoints3d(this._transform)}_getTriangles(){return this._in3dDomain()?this._tag.geometry.get3dDomainTriangles3d(this._transform):this._tag.geometry.getTriangles3d(this._transform)}_updateFillMaterial(e){e.color=new $i(this._tag.fillColor),e.opacity=this._tag.fillOpacity,e.needsUpdate=!0}_updateLineBasicMaterial(e){e.color=new $i(this._tag.lineColor),e.linewidth=Math.max(this._tag.lineWidth,1),e.visible=this._tag.lineWidth>=1&&this._tag.lineOpacity>0,e.opacity=this._tag.lineOpacity,e.transparent=this._tag.lineOpacity<1,e.needsUpdate=!0}_createHoles(){let e=[];if(this._tag.geometry instanceof Wg){let r=this._getHoles3d();for(let n of r){let i=this._createLine(n);e.push(i)}}return e}_disposeHoles(){for(let e of this._holes)e.geometry.dispose(),e.material.dispose();this._holes=[]}_getHoles3d(){const e=this._tag.geometry;return this._in3dDomain()?e.getHoleVertices3d(this._transform):e.getHolePoints3d(this._transform)}_in3dDomain(){return this._tag.geometry instanceof Wg&&this._tag.domain===Ow.ThreeDimensional}_updateHoleGeometries(){let e=this._getHoles3d();if(e.length!==this._holes.length)throw new Error("Changing the number of holes is not supported.");for(let r=0;r{const o="click",a={target:this,type:o};this.fire(o,a)})}get click$(){return this._click$}get domain(){return this._domain}get editable(){return this._editable}set editable(e){this._twoDimensionalPolygon(this._domain,this._geometry)||(this._editable=e,this._notifyChanged$.next(this))}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this._notifyChanged$.next(this)}get fillOpacity(){return this._fillOpacity}set fillOpacity(e){this._fillOpacity=e,this._notifyChanged$.next(this)}get geometry(){return this._geometry}get icon(){return this._icon}set icon(e){this._icon=e,this._notifyChanged$.next(this)}get iconFloat(){return this._iconFloat}set iconFloat(e){this._iconFloat=e,this._notifyChanged$.next(this)}get iconIndex(){return this._iconIndex}set iconIndex(e){this._iconIndex=e,this._notifyChanged$.next(this)}get indicateVertices(){return this._indicateVertices}set indicateVertices(e){this._indicateVertices=e,this._notifyChanged$.next(this)}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this._notifyChanged$.next(this)}get lineOpacity(){return this._lineOpacity}set lineOpacity(e){this._lineOpacity=e,this._notifyChanged$.next(this)}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this._notifyChanged$.next(this)}get text(){return this._text}set text(e){this._text=e,this._notifyChanged$.next(this)}get textColor(){return this._textColor}set textColor(e){this._textColor=e,this._notifyChanged$.next(this)}fire(e,r){super.fire(e,r)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}setOptions(e){const r=this._twoDimensionalPolygon(this._domain,this._geometry);this._editable=r||e.editable==null?this._editable:e.editable,this._icon=e.icon===void 0?this._icon:e.icon,this._iconFloat=e.iconFloat==null?this._iconFloat:e.iconFloat,this._iconIndex=e.iconIndex==null?this._iconIndex:e.iconIndex,this._indicateVertices=e.indicateVertices==null?this._indicateVertices:e.indicateVertices,this._lineColor=e.lineColor==null?this._lineColor:e.lineColor,this._lineWidth=e.lineWidth==null?this._lineWidth:e.lineWidth,this._fillColor=e.fillColor==null?this._fillColor:e.fillColor,this._fillOpacity=e.fillOpacity==null?this._fillOpacity:e.fillOpacity,this._text=e.text===void 0?this._text:e.text,this._textColor=e.textColor==null?this._textColor:e.textColor,this._notifyChanged$.next(this)}_twoDimensionalPolygon(e,r){return e!==Ow.ThreeDimensional&&r instanceof Wg}}class Z7t extends U4e{dispose(){}getDOMObjects(e,r,n){const i=this._tag,s={offsetHeight:n.height,offsetWidth:n.width},o=[],[a,l]=i.geometry.getCentroid2d(),u=this._viewportCoords.basicToCanvasSafe(a,l,s,this._transform,r);if(u!=null){const d=I=>{this._interact$.next({offsetX:0,offsetY:0,operation:Rf.None,tag:i})},f=Math.round(u[0]),m=Math.round(u[1]);if(i.icon!=null){if(e.loaded){const I=e.getDOMSprite(i.icon,bl.Bottom),A=`translate(${f}px,${m+8}px)`,j={onpointerdown:d,style:{pointerEvents:"all",transform:A}};o.push(Ar.h("div",j,[I]))}}else if(i.text!=null){const I=`translate(-50%,0%) translate(${f}px,${m+8}px)`,A={onpointerdown:d,style:{color:this._colorToCss(i.textColor),transform:I},textContent:i.text};o.push(Ar.h("span.mapillary-tag-symbol",A,[]))}const v=this._interact(Rf.Centroid,i,"move"),b=this._colorToCss(i.color),M=`translate(-50%,-50%) translate(${f}px,${m}px)`;if(i.editable){let I={onpointerdown:v,style:{background:b,transform:M}};o.push(Ar.h("div.mapillary-tag-spot-interactor",I,[]))}const O={style:{background:b,transform:M}};o.push(Ar.h("div.mapillary-tag-vertex",O,[]))}return o}getGLObjects(){return[]}getRetrievableObjects(){return[]}_colorToCss(e){return"#"+("000000"+e.toString(16)).substr(-6)}_interact(e,r,n,i){return s=>{const o=s.offsetX-s.target.offsetWidth/2,a=s.offsetY-s.target.offsetHeight/2;this._interact$.next({cursor:n,offsetX:o,offsetY:a,operation:e,tag:r,vertexIndex:i})}}}class Fae extends SK{constructor(e,r,n){super(e,r),n=n||{},this._color=n.color==null?16777215:n.color,this._editable=n.editable==null?!1:n.editable,this._icon=n.icon===void 0?null:n.icon,this._text=n.text===void 0?null:n.text,this._textColor=n.textColor==null?16777215:n.textColor}get color(){return this._color}set color(e){this._color=e,this._notifyChanged$.next(this)}get editable(){return this._editable}set editable(e){this._editable=e,this._notifyChanged$.next(this)}get icon(){return this._icon}set icon(e){this._icon=e,this._notifyChanged$.next(this)}get text(){return this._text}set text(e){this._text=e,this._notifyChanged$.next(this)}get textColor(){return this._textColor}set textColor(e){this._textColor=e,this._notifyChanged$.next(this)}setOptions(e){this._color=e.color==null?this._color:e.color,this._editable=e.editable==null?this._editable:e.editable,this._icon=e.icon===void 0?this._icon:e.icon,this._text=e.text===void 0?this._text:e.text,this._textColor=e.textColor==null?this._textColor:e.textColor,this._notifyChanged$.next(this)}}class Y7t{constructor(){this._active=!1,this._hash={},this._hashDeactivated={},this._notifyChanged$=new dn}get active(){return this._active}get changed$(){return this._notifyChanged$}activate(e){if(!this._active){for(const r in this._hashDeactivated){if(!this._hashDeactivated.hasOwnProperty(r))continue;const n=this._hashDeactivated[r];this._add(n,e)}this._hashDeactivated={},this._active=!0,this._notifyChanged$.next(this)}}deactivate(){if(this._active){for(const e in this._hash)this._hash.hasOwnProperty(e)&&(this._hashDeactivated[e]=this._hash[e].tag);this._hash={},this._active=!1}}add(e,r){this._assertActivationState(!0);for(const n of e)this._add(n,r);this._notifyChanged$.next(this)}addDeactivated(e){this._assertActivationState(!1);for(const r of e){if(!(r instanceof Dae||r instanceof Fae||r instanceof Nae))throw new Error("Tag type not supported");this._hashDeactivated[r.id]=r}}get(e){return this.has(e)?this._hash[e]:void 0}getAll(){const e=this._hash;return Object.keys(e).map(r=>e[r])}getAllDeactivated(){const e=this._hashDeactivated;return Object.keys(e).map(r=>e[r])}getDeactivated(e){return this.hasDeactivated(e)?this._hashDeactivated[e]:void 0}has(e){return e in this._hash}hasDeactivated(e){return e in this._hashDeactivated}remove(e){this._assertActivationState(!0);const r=this._hash;for(const n of e)n in r&&delete r[n];this._notifyChanged$.next(this)}removeAll(){this._assertActivationState(!0),this._hash={},this._notifyChanged$.next(this)}removeAllDeactivated(){this._assertActivationState(!1),this._hashDeactivated={}}removeDeactivated(e){this._assertActivationState(!1);const r=this._hashDeactivated;for(const n of e)n in r&&delete r[n]}_add(e,r){if(e instanceof Dae)this._hash[e.id]=new W7t(e,r);else if(e instanceof Fae)this._hash[e.id]=new Z7t(e,r);else if(e instanceof Nae)this._hash[e.id]=new q7t(e,r);else throw new Error("Tag type not supported")}_assertActivationState(e){if(e!==this._active)throw new Error("Tag set not in correct state for operation.")}}class X7t extends _K{constructor(e){super();let r=e[0],n=e[1];if(r<0||r>1||n<0||n>1)throw new Cu("Basic coordinates must be on the interval [0, 1].");this._point=e.slice()}get point(){return this._point}getCentroid2d(){return this._point.slice()}getCentroid3d(e){return e.unprojectBasic(this._point,200)}setCentroid2d(e,r){let n=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._point[0]=n[0],this._point[1]=n[1],this._notifyChanged$.next(this)}}class G4e extends Mm{constructor(e,r,n,i){super(e,r,n),this._name=`${this._component.name}-${this._getNameExtension()}`,this._viewportCoords=i}_getConfiguration(e){return{}}_mouseEventToBasic(e,r,n,i,s,o){s=s??0,o=o??0;const[a,l]=this._viewportCoords.canvasPosition(e,r);return this._viewportCoords.canvasToBasic(a-s,l-o,r,i,n.perspective)}}class EK extends G4e{constructor(e,r,n,i,s){super(e,r,n,i),this._tagCreator=s,this._geometryCreated$=new dn}get geometryCreated$(){return this._geometryCreated$}_enable(){this._enableCreate(),this._container.container.classList.add("component-tag-create")}_disable(){this._container.container.classList.remove("component-tag-create"),this._disableCreate()}_validateBasic(e){const r=e[0],n=e[1];return 0<=r&&r<=1&&0<=n&&n<=1}_mouseEventToBasic$(e){return e.pipe(Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$),Ct(([r,n,i])=>this._mouseEventToBasic(r,this._container.container,n,i)))}}class J7t extends EK{_enableCreate(){this._container.mouseService.deferPixels(this._name,4),this._geometryCreatedSubscription=this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(vn(this._validateBasic),Ct(e=>new X7t(e))).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.undeferPixels(this._name),this._geometryCreatedSubscription.unsubscribe()}_getNameExtension(){return"create-point"}}class MK extends EK{_enableCreate(){this._container.mouseService.deferPixels(this._name,4);const e=this._navigator.stateService.currentTransform$.pipe(Ct(()=>{}),Ci(1),Bn());this._deleteSubscription=e.pipe(Wu(1)).subscribe(this._tagCreator.delete$);const r=this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(js());this._createSubscription=e.pipe(Yr(()=>r.pipe(vn(this._validateBasic),Pp(1)))).subscribe(this._create$),this._setVertexSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?ei(vi(n),Vs(this._container.mouseService.mouseMove$,this._container.mouseService.domMouseMove$),this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$):Pi())).subscribe(([n,i,s,o])=>{const a=this._mouseEventToBasic(i,this._container.container,s,o);this._setVertex2d(n,a,o)}),this._addPointSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?ei(vi(n),r):Pi())).subscribe(([n,i])=>{this._addPoint(n,i)}),this._geometryCreateSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?n.created$.pipe(Ct(i=>i.geometry)):Pi())).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.undeferPixels(this._name),this._tagCreator.delete$.next(null),this._addPointSubscription.unsubscribe(),this._createSubscription.unsubscribe(),this._deleteSubscription.unsubscribe(),this._geometryCreateSubscription.unsubscribe(),this._setVertexSubscription.unsubscribe()}}class K7t extends MK{get _create$(){return this._tagCreator.createPoints$}_addPoint(e,r){e.geometry.addPoint2d(r)}_getNameExtension(){return"create-points"}_setVertex2d(e,r,n){e.geometry.setPoint2d(e.geometry.points.length-1,r,n)}}class Q7t extends MK{get _create$(){return this._tagCreator.createPolygon$}_addPoint(e,r){e.addPoint(r)}_getNameExtension(){return"create-polygon"}_setVertex2d(e,r,n){e.geometry.setVertex2d(e.geometry.polygon.length-2,r,n)}}class e8t extends MK{get _create$(){return this._tagCreator.createRect$}_addPoint(e,r){const n=e.geometry;n.validate(r)||(r=n.getNonAdjustedVertex2d(3)),e.addPoint(r)}_enable(){super._enable(),this._initializeAnchorIndexingSubscription=this._tagCreator.tag$.pipe(vn(e=>!!e)).subscribe(e=>{e.geometry.initializeAnchorIndexing()})}_disable(){super._disable(),this._initializeAnchorIndexingSubscription.unsubscribe()}_getNameExtension(){return"create-rect"}_setVertex2d(e,r,n){e.geometry.setOppositeVertex2d(r,n)}}class t8t extends EK{_enableCreate(){this._container.mouseService.claimMouse(this._name,2),this._deleteSubscription=this._navigator.stateService.currentTransform$.pipe(Ct(n=>null),Wu(1)).subscribe(this._tagCreator.delete$),this._createSubscription=this._mouseEventToBasic$(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$)).pipe(vn(this._validateBasic)).subscribe(this._tagCreator.createRect$),this._initializeAnchorIndexingSubscription=this._tagCreator.tag$.pipe(vn(n=>!!n)).subscribe(n=>{n.geometry.initializeAnchorIndexing()});const e=ei(Vs(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseMove$),this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseMove$)),this._container.renderService.renderCamera$).pipe(Bi(this._navigator.stateService.currentTransform$),Ct(([[n,i],s])=>this._mouseEventToBasic(n,this._container.container,i,s)));this._setVertexSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?ei(vi(n),e,this._navigator.stateService.currentTransform$):Pi())).subscribe(([n,i,s])=>{n.geometry.setOppositeVertex2d(i,s)});const r=this._container.mouseService.mouseDragEnd$.pipe(Bi(this._mouseEventToBasic$(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDrag$)).pipe(vn(this._validateBasic)),(n,i)=>i),js());this._addPointSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?ei(vi(n),r):Pi())).subscribe(([n,i])=>{const s=n.geometry;s.validate(i)||(i=s.getNonAdjustedVertex2d(3)),n.addPoint(i)}),this._geometryCreatedSubscription=this._tagCreator.tag$.pipe(Yr(n=>n?n.created$.pipe(Ct(i=>i.geometry)):Pi())).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.unclaimMouse(this._name),this._tagCreator.delete$.next(null),this._addPointSubscription.unsubscribe(),this._createSubscription.unsubscribe(),this._deleteSubscription.unsubscribe(),this._geometryCreatedSubscription.unsubscribe(),this._initializeAnchorIndexingSubscription.unsubscribe(),this._setVertexSubscription.unsubscribe()}_getNameExtension(){return"create-rect-drag"}}class r8t extends G4e{constructor(e,r,n,i,s){super(e,r,n,i),this._tagSet=s}_enable(){const e=this._tagSet.changed$.pipe(Ct(r=>r.getAll()),Yr(r=>Na(r).pipe(Qi(n=>n.interact$))),Yr(r=>zp(vi(r),this._container.mouseService.documentMouseUp$.pipe(Ct(()=>({offsetX:0,offsetY:0,operation:Rf.None,tag:null})),Qn()))),js());Vs(this._container.mouseService.mouseMove$,this._container.mouseService.domMouseMove$).pipe(js()),this._claimMouseSubscription=e.pipe(Yr(r=>r.tag?this._container.mouseService.domMouseDragStart$:Pi())).subscribe(()=>{this._container.mouseService.claimMouse(this._name,3)}),this._cursorSubscription=e.pipe(Ct(r=>r.cursor),qn()).subscribe(r=>{const n=["crosshair","move","nesw-resize","nwse-resize"];for(const i of n)this._container.container.classList.remove(`component-tag-edit-${i}`);r&&this._container.container.classList.add(`component-tag-edit-${r}`)}),this._unclaimMouseSubscription=this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseDragEnd$).subscribe(r=>{this._container.mouseService.unclaimMouse(this._name)}),this._preventDefaultSubscription=e.pipe(Yr(r=>r.tag?this._container.mouseService.documentMouseMove$:Pi())).subscribe(r=>{r.preventDefault()}),this._updateGeometrySubscription=e.pipe(Yr(r=>{if(r.operation===Rf.None||!r.tag)return Pi();const n=this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseDrag$).pipe(vn(i=>this._viewportCoords.insideElement(i,this._container.container)));return ei(n,this._container.renderService.renderCamera$).pipe(Bi(vi(r),this._navigator.stateService.currentTransform$,([i,s],o,a)=>[i,s,o,a]))})).subscribe(([r,n,i,s])=>{const o=this._mouseEventToBasic(r,this._container.container,n,s,i.offsetX,i.offsetY),a=i.tag.geometry;i.operation===Rf.Centroid?a.setCentroid2d(o,s):i.operation===Rf.Vertex&&a.setVertex2d(i.vertexIndex,o,s)})}_disable(){this._claimMouseSubscription.unsubscribe(),this._cursorSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._unclaimMouseSubscription.unsubscribe(),this._updateGeometrySubscription.unsubscribe()}_getNameExtension(){return"edit-vertex"}}class q4e extends qc{constructor(e,r,n){super(e,r,n),this._tagDomRenderer=new H7t,this._tagScene=new G7t,this._tagSet=new Y7t,this._tagCreator=new U7t(this,n),this._viewportCoords=new Nh,this._createHandlers={CreatePoint:new J7t(this,r,n,this._viewportCoords,this._tagCreator),CreatePoints:new K7t(this,r,n,this._viewportCoords,this._tagCreator),CreatePolygon:new Q7t(this,r,n,this._viewportCoords,this._tagCreator),CreateRect:new e8t(this,r,n,this._viewportCoords,this._tagCreator),CreateRectDrag:new t8t(this,r,n,this._viewportCoords,this._tagCreator),Default:void 0},this._editVertexHandler=new r8t(this,r,n,this._viewportCoords,this._tagSet),this._renderTags$=this._tagSet.changed$.pipe(Ct(i=>{const s=i.getAll();return s.sort((o,a)=>{const l=o.tag.id,u=a.tag.id;return lu?1:0}),s}),js()),this._tagChanged$=this._renderTags$.pipe(Yr(i=>Na(i).pipe(Qi(s=>Vs(s.tag.changed$,s.tag.geometryChanged$)))),js()),this._renderTagGLChanged$=this._renderTags$.pipe(Yr(i=>Na(i).pipe(Qi(s=>s.glObjectsChanged$))),js()),this._createGeometryChanged$=this._tagCreator.tag$.pipe(Yr(i=>i!=null?i.geometryChanged$:Pi()),js()),this._createGLObjectsChanged$=this._tagCreator.tag$.pipe(Yr(i=>i!=null?i.glObjectsChanged$:Pi()),js()),this._creatingConfiguration$=this._configuration$.pipe(qn((i,s)=>i.mode===s.mode,i=>({createColor:i.createColor,mode:i.mode})),Ci(1),Bn()),this._creatingConfiguration$.subscribe(i=>{const s="tagmode",o={mode:i.mode,target:this,type:s};this.fire(s,o)})}add(e){this._activated?this._navigator.stateService.currentTransform$.pipe(Qn()).subscribe(r=>{this._tagSet.add(e,r);const n=e.map(i=>this._tagSet.get(i.id));this._tagScene.add(n)}):this._tagSet.addDeactivated(e)}calculateRect(e){return new Promise((r,n)=>{this._navigator.stateService.currentTransform$.pipe(Qn(),Ct(i=>e.getRect2d(i))).subscribe(i=>{r(i)},i=>{n(i)})})}create(){this._tagCreator.replayedTag$.pipe(Qn(),vn(e=>!!e)).subscribe(e=>{e.create()})}changeMode(e){this.configure({mode:e})}fire(e,r){super.fire(e,r)}get(e){if(this._activated){const r=this._tagSet.get(e);return r!==void 0?r.tag:void 0}else return this._tagSet.getDeactivated(e)}getAll(){return this.activated?this._tagSet.getAll().map(e=>e.tag):this._tagSet.getAllDeactivated()}getTagIdsAt(e){return new Promise((r,n)=>{this._container.renderService.renderCamera$.pipe(Qn(),Ct(i=>{const s=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._tagScene.intersectObjects(s,i.perspective)})).subscribe(i=>{r(i)},i=>{n(i)})})}has(e){return this._activated?this._tagSet.has(e):this._tagSet.hasDeactivated(e)}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}remove(e){this._activated?(this._tagSet.remove(e),this._tagScene.remove(e)):this._tagSet.removeDeactivated(e)}removeAll(){this._activated?(this._tagSet.removeAll(),this._tagScene.removeAll()):this._tagSet.removeAllDeactivated()}_activate(){this._editVertexHandler.enable();const e=Na(Object.keys(this._createHandlers)).pipe(Ct(n=>this._createHandlers[n]),vn(n=>!!n),Qi(n=>n.geometryCreated$),js()),r=this._subscriptions;r.push(e.subscribe(n=>{const i="geometrycreate",s={geometry:n,target:this,type:i};this.fire(i,s)})),r.push(this._tagCreator.tag$.pipe(lq(n=>n==null),qn()).subscribe(n=>{const i=n!=null?"tagcreatestart":"tagcreateend",s={target:this,type:i};this.fire(i,s)})),r.push(e.subscribe(()=>{this.changeMode(S4.Default)})),r.push(this._creatingConfiguration$.subscribe(n=>{this._disableCreateHandlers();const i=S4[n.mode],s=this._createHandlers[i];s&&s.enable()})),r.push(this._renderTags$.subscribe(()=>{const n="tags",i={target:this,type:n};this.fire(n,i)})),r.push(this._tagCreator.tag$.pipe(Yr(n=>n!=null?n.aborted$.pipe(Ct(()=>null)):Pi())).subscribe(()=>{this.changeMode(S4.Default)})),r.push(this._tagCreator.tag$.subscribe(n=>{this._tagScene.hasCreateTag()&&this._tagScene.removeCreateTag(),n!=null&&this._tagScene.addCreateTag(n)})),r.push(this._createGLObjectsChanged$.subscribe(n=>{this._tagScene.updateCreateTagObjects(n)})),r.push(this._renderTagGLChanged$.subscribe(n=>{this._tagScene.updateObjects(n)})),r.push(this._tagChanged$.subscribe(()=>{this._tagScene.update()})),r.push(ei(this._renderTags$.pipe(po([]),Pa(()=>{this._container.domRenderer.render$.next({name:this._name,vNode:this._tagDomRenderer.clear()})})),this._container.renderService.renderCamera$,this._container.spriteService.spriteAtlas$,this._container.renderService.size$,this._tagChanged$.pipe(po(null)),Vs(this._tagCreator.tag$,this._createGeometryChanged$).pipe(po(null))).pipe(Ct(([n,i,s,o,,a])=>({name:this._name,vNode:this._tagDomRenderer.render(n,a,s,i.perspective,o)}))).subscribe(this._container.domRenderer.render$)),r.push(this._navigator.stateService.currentState$.pipe(Ct(n=>{const i=this._tagScene;return{name:this._name,renderer:{frameId:n.id,needsRender:i.needsRender,render:i.render.bind(i),pass:hy.Opaque}}})).subscribe(this._container.glRenderer.render$)),this._navigator.stateService.currentTransform$.pipe(Qn()).subscribe(n=>{this._tagSet.activate(n),this._tagScene.add(this._tagSet.getAll())})}_deactivate(){this._editVertexHandler.disable(),this._disableCreateHandlers(),this._tagScene.clear(),this._tagSet.deactivate(),this._tagCreator.delete$.next(null),this._subscriptions.unsubscribe(),this._container.container.classList.remove("component-tag-create")}_getDefaultConfiguration(){return{createColor:16777215,indicatePointsCompleter:!0,mode:S4.Default}}_disableCreateHandlers(){const e=this._createHandlers;for(const r in e){if(!e.hasOwnProperty(r))continue;const n=e[r];n&&n.disable()}}}q4e.componentName="tag";class W4e extends qc{constructor(e,r,n){super(e,r,n),this._viewportCoords=new Nh,this._zoomDelta$=new dn}_activate(){const e=this._subscriptions;e.push(ei(this._navigator.stateService.currentState$,this._navigator.stateService.state$,this._configuration$,this._container.renderService.size$).pipe(Ct(([r,n,i,s])=>{const o=r.state.zoom,a=Ar.h("div.mapillary-zoom-in-icon",[]),l=o>=3||n===Ai.Waiting?Ar.h("div.mapillary-zoom-in-button-inactive",[a]):Ar.h("div.mapillary-zoom-in-button",{onclick:()=>{this._zoomDelta$.next(1)}},[a]),u=Ar.h("div.mapillary-zoom-out-icon",[]),d=o<=0||n===Ai.Waiting?Ar.h("div.mapillary-zoom-out-button-inactive",[u]):Ar.h("div.mapillary-zoom-out-button",{onclick:()=>{this._zoomDelta$.next(-1)}},[u]),f=i.size===w2.Small||i.size===w2.Automatic&&s.width<640?".mapillary-zoom-compact":"";return{name:this._name,vNode:Ar.h("div.mapillary-zoom-container"+f,{oncontextmenu:m=>{m.preventDefault()}},[l,d])}})).subscribe(this._container.domRenderer.render$)),e.push(this._zoomDelta$.pipe(Bi(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe(([r,n,i])=>{const s=this._viewportCoords.unprojectFromViewport(0,0,n.perspective),o=i.projectBasic(s.toArray());this._navigator.stateService.zoomIn(r,o)}))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{size:w2.Automatic}}}W4e.componentName="zoom";class Z4e extends qc{constructor(e,r,n,i){super(e,r,n),this._canvasId=`${r.id}-${this._name}`,this._dom=i||new yK}_activate(){const e=this._container.domRenderer.element$.pipe(Ct(()=>this._dom.document.getElementById(this._canvasId)),vn(r=>!!r),Ct(r=>{const n=r.parentElement,i=n.offsetWidth,s=n.offsetHeight;return[r,{height:s,width:i}]}),qn((r,n)=>r.height===n.height&&r.width===n.width,([,r])=>r));this._subscriptions.push(ei(e,this._navigator.stateService.currentImage$).subscribe(([[r,n],i])=>{r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(i.image,0,0,n.width,n.height)})),this._container.domRenderer.renderAdaptive$.next({name:this._name,vNode:Ar.h(`canvas#${this._canvasId}`,[])})}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}}Z4e.componentName="imagefallback";class Y4e extends qc{constructor(e,r,n){super(e,r,n),this._seqNames={},this._seqNames[Cr[Cr.Prev]]="-prev",this._seqNames[Cr[Cr.Next]]="-next",this._spaTopNames={},this._spaTopNames[Cr[Cr.TurnLeft]]="-turn-left",this._spaTopNames[Cr[Cr.StepLeft]]="-left",this._spaTopNames[Cr[Cr.StepForward]]="-forward",this._spaTopNames[Cr[Cr.StepRight]]="-right",this._spaTopNames[Cr[Cr.TurnRight]]="-turn-right",this._spaBottomNames={},this._spaBottomNames[Cr[Cr.TurnU]]="-turn-around",this._spaBottomNames[Cr[Cr.StepBackward]]="-backward"}_activate(){this._subscriptions.push(ei(this._navigator.stateService.currentImage$,this._configuration$).pipe(Yr(([e,r])=>{const n=r.sequence?e.sequenceEdges$.pipe(Ct(s=>s.edges.map(o=>o.data.direction))):vi([]),i=!Li(e.cameraType)&&r.spatial?e.spatialEdges$.pipe(Ct(s=>s.edges.map(o=>o.data.direction))):vi([]);return ei(n,i).pipe(Ct(([s,o])=>s.concat(o)))}),Ct(e=>{const r=this._createArrowRow(this._seqNames,e),n=this._createArrowRow(this._spaTopNames,e),i=this._createArrowRow(this._spaBottomNames,e),s=Ar.h("div.mapillary-navigation-sequence",r),o=Ar.h("div.NavigationSpatialTop",n),a=Ar.h("div.mapillary-navigation-spatial-bottom",i),l=Ar.h("div.mapillary-navigation-spatial",[o,a]);return{name:this._name,vNode:Ar.h("div.NavigationContainer",[s,l])}})).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{sequence:!0,spatial:!0}}_createArrowRow(e,r){const n=[];for(const i in e){if(!e.hasOwnProperty(i))continue;const s=Cr[i];r.indexOf(s)!==-1?n.push(this._createVNode(s,e[i],"visible")):n.push(this._createVNode(s,e[i],"hidden"))}return n}_createVNode(e,r,n){return Ar.h(`span.mapillary-navigation-button.mapillary-navigation${r}`,{onclick:()=>{this._navigator.moveDir$(e).subscribe(void 0,i=>{i instanceof $p||console.error(i)})},style:{visibility:n}},[])}}Y4e.componentName="navigationfallback";function S7(t){let e=t.length;for(;--e>=0;)t[e]=0}const n8t=3,i8t=258,X4e=29,s8t=256,o8t=s8t+1+X4e,J4e=30,a8t=512,l8t=new Array((o8t+2)*2);S7(l8t);const u8t=new Array(J4e*2);S7(u8t);const c8t=new Array(a8t);S7(c8t);const h8t=new Array(i8t-n8t+1);S7(h8t);const d8t=new Array(X4e);S7(d8t);const f8t=new Array(J4e);S7(f8t);const p8t=(t,e,r,n)=>{let i=t&65535|0,s=t>>>16&65535|0,o=0;for(;r!==0;){o=r>2e3?2e3:r,r-=o;do i=i+e[n++]|0,s=s+i|0;while(--o);i%=65521,s%=65521}return i|s<<16|0};var $q=p8t;const m8t=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e},g8t=new Uint32Array(m8t()),y8t=(t,e,r,n)=>{const i=g8t,s=n+r;t^=-1;for(let o=n;o>>8^i[(t^e[o])&255];return t^-1};var T0=y8t,Oq={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},TK={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const v8t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var _8t=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const n in r)v8t(r,n)&&(t[n]=r[n])}}return t},x8t=t=>{let e=0;for(let n=0,i=t.length;n=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;_S[254]=_S[254]=1;var w8t=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,r,n,i,s,o=t.length,a=0;for(i=0;i>>6,e[s++]=128|r&63):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|r&63):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|r&63);return e};const b8t=(t,e)=>{if(e<65534&&t.subarray&&Q4e)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n{const r=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let n,i;const s=new Array(r*2);for(i=0,n=0;n4){s[i++]=65533,n+=a-1;continue}for(o&=a===2?31:a===3?15:7;a>1&&n1){s[i++]=65533;continue}o<65536?s[i++]=o:(o-=65536,s[i++]=55296|o>>10&1023,s[i++]=56320|o&1023)}return b8t(s,i)},S8t=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let r=e-1;for(;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+_S[t[r]]>e?r:e},Nq={string2buf:w8t,buf2string:C8t,utf8border:S8t};function E8t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var M8t=E8t;const uR=30,T8t=12;var I8t=function(e,r){let n,i,s,o,a,l,u,d,f,m,v,b,M,O,I,A,j,H,W,re,K,pe,ge,fe;const ee=e.state;n=e.next_in,ge=e.input,i=n+(e.avail_in-5),s=e.next_out,fe=e.output,o=s-(r-e.avail_out),a=s+(e.avail_out-257),l=ee.dmax,u=ee.wsize,d=ee.whave,f=ee.wnext,m=ee.window,v=ee.hold,b=ee.bits,M=ee.lencode,O=ee.distcode,I=(1<>>24,v>>>=H,b-=H,H=j>>>16&255,H===0)fe[s++]=j&65535;else if(H&16){W=j&65535,H&=15,H&&(b>>=H,b-=H),b<15&&(v+=ge[n++]<>>24,v>>>=H,b-=H,H=j>>>16&255,H&16){if(re=j&65535,H&=15,bl){e.msg="invalid distance too far back",ee.mode=uR;break e}if(v>>>=H,b-=H,H=s-o,re>H){if(H=re-H,H>d&&ee.sane){e.msg="invalid distance too far back",ee.mode=uR;break e}if(K=0,pe=m,f===0){if(K+=u-H,H2;)fe[s++]=pe[K++],fe[s++]=pe[K++],fe[s++]=pe[K++],W-=3;W&&(fe[s++]=pe[K++],W>1&&(fe[s++]=pe[K++]))}else{K=s-re;do fe[s++]=fe[K++],fe[s++]=fe[K++],fe[s++]=fe[K++],W-=3;while(W>2);W&&(fe[s++]=fe[K++],W>1&&(fe[s++]=fe[K++]))}}else if(H&64){e.msg="invalid distance code",ee.mode=uR;break e}else{j=O[(j&65535)+(v&(1<>3,n-=W,b-=W<<3,v&=(1<{const l=a.bits;let u=0,d=0,f=0,m=0,v=0,b=0,M=0,O=0,I=0,A=0,j,H,W,re,K,pe=null,ge=0,fe;const ee=new Uint16Array(vx+1),be=new Uint16Array(vx+1);let le=null,ve=0,Pe,Fe,We;for(u=0;u<=vx;u++)ee[u]=0;for(d=0;d=1&&ee[m]===0;m--);if(v>m&&(v=m),m===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f0&&(t===jae||m!==1))return-1;for(be[1]=0,u=1;uzae||t===Vae&&I>Bae)return 1;for(;;){Pe=u-M,o[d]fe?(Fe=le[ve+o[d]],We=pe[ge+o[d]]):(Fe=96,We=0),j=1<>M)+H]=Pe<<24|Fe<<16|We|0;while(H!==0);for(j=1<>=1;if(j!==0?(A&=j-1,A+=j):A=0,d++,--ee[u]===0){if(u===m)break;u=e[r+o[d]]}if(u>v&&(A&re)!==W){for(M===0&&(M=v),K+=f,b=u-M,O=1<zae||t===Vae&&I>Bae)return 1;W=A&re,i[W]=v<<24|b<<16|K-s|0}}return A!==0&&(i[K+A]=u-M<<24|64<<16|0),a.bits=v,0};var tC=P8t;const $8t=0,ewe=1,twe=2,{Z_FINISH:Uae,Z_BLOCK:O8t,Z_TREES:cR,Z_OK:$5,Z_STREAM_END:N8t,Z_NEED_DICT:D8t,Z_STREAM_ERROR:jp,Z_DATA_ERROR:rwe,Z_MEM_ERROR:nwe,Z_BUF_ERROR:F8t,Z_DEFLATED:Hae}=TK,iwe=1,Gae=2,qae=3,Wae=4,Zae=5,Yae=6,Xae=7,Jae=8,Kae=9,Qae=10,EP=11,og=12,yB=13,ele=14,vB=15,tle=16,rle=17,nle=18,ile=19,hR=20,dR=21,sle=22,ole=23,ale=24,lle=25,ule=26,_B=27,cle=28,hle=29,ul=30,swe=31,z8t=32,B8t=852,j8t=592,V8t=15,U8t=V8t,dle=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function H8t(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const owe=t=>{if(!t||!t.state)return jp;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=iwe,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(B8t),e.distcode=e.distdyn=new Int32Array(j8t),e.sane=1,e.back=-1,$5},awe=t=>{if(!t||!t.state)return jp;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,owe(t)},lwe=(t,e)=>{let r;if(!t||!t.state)return jp;const n=t.state;return e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15)?jp:(n.window!==null&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,awe(t))},uwe=(t,e)=>{if(!t)return jp;const r=new H8t;t.state=r,r.window=null;const n=lwe(t,e);return n!==$5&&(t.state=null),n},G8t=t=>uwe(t,U8t);let fle=!0,xB,wB;const q8t=t=>{if(fle){xB=new Int32Array(512),wB=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(tC(ewe,t.lens,0,288,xB,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;tC(twe,t.lens,0,32,wB,0,t.work,{bits:5}),fle=!1}t.lencode=xB,t.lenbits=9,t.distcode=wB,t.distbits=5},cwe=(t,e,r,n)=>{let i;const s=t.state;return s.window===null&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(r-s.wsize,r),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>n&&(i=n),s.window.set(e.subarray(r-n,r-n+i),s.wnext),n-=i,n?(s.window.set(e.subarray(r-n,r),0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave{let r,n,i,s,o,a,l,u,d,f,m,v,b,M,O=0,I,A,j,H,W,re,K,pe;const ge=new Uint8Array(4);let fe,ee;const be=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return jp;r=t.state,r.mode===og&&(r.mode=yB),o=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,n=t.input,a=t.avail_in,u=r.hold,d=r.bits,f=a,m=l,pe=$5;e:for(;;)switch(r.mode){case iwe:if(r.wrap===0){r.mode=yB;break}for(;d<16;){if(a===0)break e;a--,u+=n[s++]<>>8&255,r.check=T0(r.check,ge,2,0),u=0,d=0,r.mode=Gae;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=ul;break}if((u&15)!==Hae){t.msg="unknown compression method",r.mode=ul;break}if(u>>>=4,d-=4,K=(u&15)+8,r.wbits===0)r.wbits=K;else if(K>r.wbits){t.msg="invalid window size",r.mode=ul;break}r.dmax=1<>8&1),r.flags&512&&(ge[0]=u&255,ge[1]=u>>>8&255,r.check=T0(r.check,ge,2,0)),u=0,d=0,r.mode=qae;case qae:for(;d<32;){if(a===0)break e;a--,u+=n[s++]<>>8&255,ge[2]=u>>>16&255,ge[3]=u>>>24&255,r.check=T0(r.check,ge,4,0)),u=0,d=0,r.mode=Wae;case Wae:for(;d<16;){if(a===0)break e;a--,u+=n[s++]<>8),r.flags&512&&(ge[0]=u&255,ge[1]=u>>>8&255,r.check=T0(r.check,ge,2,0)),u=0,d=0,r.mode=Zae;case Zae:if(r.flags&1024){for(;d<16;){if(a===0)break e;a--,u+=n[s++]<>>8&255,r.check=T0(r.check,ge,2,0)),u=0,d=0}else r.head&&(r.head.extra=null);r.mode=Yae;case Yae:if(r.flags&1024&&(v=r.length,v>a&&(v=a),v&&(r.head&&(K=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(s,s+v),K)),r.flags&512&&(r.check=T0(r.check,n,v,s)),a-=v,s+=v,r.length-=v),r.length))break e;r.length=0,r.mode=Xae;case Xae:if(r.flags&2048){if(a===0)break e;v=0;do K=n[s+v++],r.head&&K&&r.length<65536&&(r.head.name+=String.fromCharCode(K));while(K&&v>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=og;break;case Qae:for(;d<32;){if(a===0)break e;a--,u+=n[s++]<>>=d&7,d-=d&7,r.mode=_B;break}for(;d<3;){if(a===0)break e;a--,u+=n[s++]<>>=1,d-=1,u&3){case 0:r.mode=ele;break;case 1:if(q8t(r),r.mode=hR,e===cR){u>>>=2,d-=2;break e}break;case 2:r.mode=rle;break;case 3:t.msg="invalid block type",r.mode=ul}u>>>=2,d-=2;break;case ele:for(u>>>=d&7,d-=d&7;d<32;){if(a===0)break e;a--,u+=n[s++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=ul;break}if(r.length=u&65535,u=0,d=0,r.mode=vB,e===cR)break e;case vB:r.mode=tle;case tle:if(v=r.length,v){if(v>a&&(v=a),v>l&&(v=l),v===0)break e;i.set(n.subarray(s,s+v),o),a-=v,s+=v,l-=v,o+=v,r.length-=v;break}r.mode=og;break;case rle:for(;d<14;){if(a===0)break e;a--,u+=n[s++]<>>=5,d-=5,r.ndist=(u&31)+1,u>>>=5,d-=5,r.ncode=(u&15)+4,u>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ul;break}r.have=0,r.mode=nle;case nle:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[be[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,fe={bits:r.lenbits},pe=tC($8t,r.lens,0,19,r.lencode,0,r.work,fe),r.lenbits=fe.bits,pe){t.msg="invalid code lengths set",r.mode=ul;break}r.have=0,r.mode=ile;case ile:for(;r.have>>24,A=O>>>16&255,j=O&65535,!(I<=d);){if(a===0)break e;a--,u+=n[s++]<>>=I,d-=I,r.lens[r.have++]=j;else{if(j===16){for(ee=I+2;d>>=I,d-=I,r.have===0){t.msg="invalid bit length repeat",r.mode=ul;break}K=r.lens[r.have-1],v=3+(u&3),u>>>=2,d-=2}else if(j===17){for(ee=I+3;d>>=I,d-=I,K=0,v=3+(u&7),u>>>=3,d-=3}else{for(ee=I+7;d>>=I,d-=I,K=0,v=11+(u&127),u>>>=7,d-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ul;break}for(;v--;)r.lens[r.have++]=K}}if(r.mode===ul)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=ul;break}if(r.lenbits=9,fe={bits:r.lenbits},pe=tC(ewe,r.lens,0,r.nlen,r.lencode,0,r.work,fe),r.lenbits=fe.bits,pe){t.msg="invalid literal/lengths set",r.mode=ul;break}if(r.distbits=6,r.distcode=r.distdyn,fe={bits:r.distbits},pe=tC(twe,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,fe),r.distbits=fe.bits,pe){t.msg="invalid distances set",r.mode=ul;break}if(r.mode=hR,e===cR)break e;case hR:r.mode=dR;case dR:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,r.hold=u,r.bits=d,I8t(t,m),o=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,n=t.input,a=t.avail_in,u=r.hold,d=r.bits,r.mode===og&&(r.back=-1);break}for(r.back=0;O=r.lencode[u&(1<>>24,A=O>>>16&255,j=O&65535,!(I<=d);){if(a===0)break e;a--,u+=n[s++]<>H)],I=O>>>24,A=O>>>16&255,j=O&65535,!(H+I<=d);){if(a===0)break e;a--,u+=n[s++]<>>=H,d-=H,r.back+=H}if(u>>>=I,d-=I,r.back+=I,r.length=j,A===0){r.mode=ule;break}if(A&32){r.back=-1,r.mode=og;break}if(A&64){t.msg="invalid literal/length code",r.mode=ul;break}r.extra=A&15,r.mode=sle;case sle:if(r.extra){for(ee=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ole;case ole:for(;O=r.distcode[u&(1<>>24,A=O>>>16&255,j=O&65535,!(I<=d);){if(a===0)break e;a--,u+=n[s++]<>H)],I=O>>>24,A=O>>>16&255,j=O&65535,!(H+I<=d);){if(a===0)break e;a--,u+=n[s++]<>>=H,d-=H,r.back+=H}if(u>>>=I,d-=I,r.back+=I,A&64){t.msg="invalid distance code",r.mode=ul;break}r.offset=j,r.extra=A&15,r.mode=ale;case ale:if(r.extra){for(ee=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ul;break}r.mode=lle;case lle:if(l===0)break e;if(v=m-l,r.offset>v){if(v=r.offset-v,v>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ul;break}v>r.wnext?(v-=r.wnext,b=r.wsize-v):b=r.wnext-v,v>r.length&&(v=r.length),M=r.window}else M=i,b=o-r.offset,v=r.length;v>l&&(v=l),l-=v,r.length-=v;do i[o++]=M[b++];while(--v);r.length===0&&(r.mode=dR);break;case ule:if(l===0)break e;i[o++]=r.length,l--,r.mode=dR;break;case _B:if(r.wrap){for(;d<32;){if(a===0)break e;a--,u|=n[s++]<{if(!t||!t.state)return jp;let e=t.state;return e.window&&(e.window=null),t.state=null,$5},Y8t=(t,e)=>{if(!t||!t.state)return jp;const r=t.state;return r.wrap&2?(r.head=e,e.done=!1,$5):jp},X8t=(t,e)=>{const r=e.length;let n,i,s;return!t||!t.state||(n=t.state,n.wrap!==0&&n.mode!==EP)?jp:n.mode===EP&&(i=1,i=$q(i,e,r,0),i!==n.check)?rwe:(s=cwe(t,e,r,r),s?(n.mode=swe,nwe):(n.havedict=1,$5))};var J8t=awe,K8t=lwe,Q8t=owe,ebt=G8t,tbt=uwe,rbt=W8t,nbt=Z8t,ibt=Y8t,sbt=X8t,obt="pako inflate (from Nodeca project)",$g={inflateReset:J8t,inflateReset2:K8t,inflateResetKeep:Q8t,inflateInit:ebt,inflateInit2:tbt,inflate:rbt,inflateEnd:nbt,inflateGetHeader:ibt,inflateSetDictionary:sbt,inflateInfo:obt};function abt(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var lbt=abt;const hwe=Object.prototype.toString,{Z_NO_FLUSH:ubt,Z_FINISH:cbt,Z_OK:xS,Z_STREAM_END:bB,Z_NEED_DICT:CB,Z_STREAM_ERROR:hbt,Z_DATA_ERROR:ple,Z_MEM_ERROR:dbt}=TK;function $E(t){this.options=K4e.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new M8t,this.strm.avail_out=0;let r=$g.inflateInit2(this.strm,e.windowBits);if(r!==xS)throw new Error(Oq[r]);if(this.header=new lbt,$g.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Nq.string2buf(e.dictionary):hwe.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=$g.inflateSetDictionary(this.strm,e.dictionary),r!==xS)))throw new Error(Oq[r])}$E.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(e===~~e?o=e:o=e===!0?cbt:ubt,hwe.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),s=$g.inflate(r,o),s===CB&&i&&(s=$g.inflateSetDictionary(r,i),s===xS?s=$g.inflate(r,o):s===ple&&(s=CB));r.avail_in>0&&s===bB&&r.state.wrap>0&&t[r.next_in]!==0;)$g.inflateReset(r),s=$g.inflate(r,o);switch(s){case hbt:case ple:case CB:case dbt:return this.onEnd(s),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(r.avail_out===0||s===bB))if(this.options.to==="string"){let l=Nq.utf8border(r.output,r.next_out),u=r.next_out-l,d=Nq.buf2string(r.output,l);r.next_out=u,r.avail_out=n-u,u&&r.output.set(r.output.subarray(l,l+u),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(s===xS&&a===0)){if(s===bB)return s=$g.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};$E.prototype.onData=function(t){this.chunks.push(t)};$E.prototype.onEnd=function(t){t===xS&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=K4e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function IK(t,e){const r=new $E(e);if(r.push(t),r.err)throw r.msg||Oq[r.err];return r.result}function fbt(t,e){return e=e||{},e.raw=!0,IK(t,e)}var pbt=$E,mbt=IK,gbt=fbt,ybt=IK,vbt=TK,_bt={Inflate:pbt,inflate:mbt,inflateRaw:gbt,ungzip:ybt,constants:vbt};const{Inflate:_kt,inflate:xbt,inflateRaw:xkt,ungzip:wkt}=_bt;var wbt=xbt,RK={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */RK.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,l=(1<>1,d=-7,f=r?i-1:0,m=r?-1:1,v=t[e+f];for(f+=m,s=v&(1<<-d)-1,v>>=-d,d+=a;d>0;s=s*256+t[e+f],f+=m,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+f],f+=m,d-=8);if(s===0)s=1-u;else{if(s===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(v?-1:1)*o*Math.pow(2,s-n)};RK.write=function(t,e,r,n,i,s){var o,a,l,u=s*8-i-1,d=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:s-1,b=n?1:-1,M=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?e+=m/l:e+=m*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=d?(a=0,o=d):o+f>=1?(a=(e*l-1)*Math.pow(2,i),o=o+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+v]=a&255,v+=b,a/=256,i-=8);for(o=o<0;t[r+v]=o&255,v+=b,o/=256,u-=8);t[r+v-b]|=M*128};var bbt=Zo,fR=RK;function Zo(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Zo.Varint=0;Zo.Fixed64=1;Zo.Bytes=2;Zo.Fixed32=5;var Dq=65536*65536,mle=1/Dq,Cbt=12,dwe=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Zo.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,s=this.pos;this.type=n&7,t(i,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=pR(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=yle(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=pR(this.buf,this.pos)+pR(this.buf,this.pos+4)*Dq;return this.pos+=8,t},readSFixed64:function(){var t=pR(this.buf,this.pos)+yle(this.buf,this.pos+4)*Dq;return this.pos+=8,t},readFloat:function(){var t=fR.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=fR.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e=this.buf,r,n;return n=e[this.pos++],r=n&127,n<128||(n=e[this.pos++],r|=(n&127)<<7,n<128)||(n=e[this.pos++],r|=(n&127)<<14,n<128)||(n=e[this.pos++],r|=(n&127)<<21,n<128)?r:(n=e[this.pos],r|=(n&15)<<28,Sbt(r,t,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=Cbt&&dwe?Fbt(this.buf,e,t):Dbt(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Zo.Bytes)return t.push(this.readVarint(e));var r=ag(this);for(t=t||[];this.pos127;);else if(e===Zo.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Zo.Fixed32)this.pos+=4;else if(e===Zo.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0){Ebt(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?-t*2-1:t*2)},writeBoolean:function(t){this.writeVarint(!!t)},writeString:function(t){t=String(t),this.realloc(t.length*4),this.pos++;var e=this.pos;this.pos=zbt(this.buf,t,this.pos);var r=this.pos-e;r>=128&&gle(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),fR.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),fR.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&gle(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Zo.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ibt,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Rbt,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Abt,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Lbt,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,kbt,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Pbt,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,$bt,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Obt,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Nbt,e)},writeBytesField:function(t,e){this.writeTag(t,Zo.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Zo.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Zo.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Zo.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Zo.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Zo.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Zo.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Zo.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Zo.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Zo.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,!!e)}};function Sbt(t,e,r){var n=r.buf,i,s;if(s=n[r.pos++],i=(s&112)>>4,s<128||(s=n[r.pos++],i|=(s&127)<<3,s<128)||(s=n[r.pos++],i|=(s&127)<<10,s<128)||(s=n[r.pos++],i|=(s&127)<<17,s<128)||(s=n[r.pos++],i|=(s&127)<<24,s<128)||(s=n[r.pos++],i|=(s&1)<<31,s<128))return _x(t,i,e);throw new Error("Expected varint not more than 10 bytes")}function ag(t){return t.type===Zo.Bytes?t.readVarint()+t.pos:t.pos+1}function _x(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Ebt(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Mbt(r,n,e),Tbt(n,e)}function Mbt(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function Tbt(t,e){var r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function gle(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Ibt(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function yle(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Dbt(t,e,r){for(var n="",i=e;i239?4:s>223?3:s>191?2:1;if(i+a>r)break;var l,u,d;a===1?s<128&&(o=s):a===2?(l=t[i+1],(l&192)===128&&(o=(s&31)<<6|l&63,o<=127&&(o=null))):a===3?(l=t[i+1],u=t[i+2],(l&192)===128&&(u&192)===128&&(o=(s&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):a===4&&(l=t[i+1],u=t[i+2],d=t[i+3],(l&192)===128&&(u&192)===128&&(d&192)===128&&(o=(s&15)<<18|(l&63)<<12|(u&63)<<6|d&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,a=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),i+=a}return n}function Fbt(t,e,r){return dwe.decode(t.subarray(e,r))}function zbt(t,e,r){for(var n=0,i,s;n55295&&i<57344)if(s)if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,s=i;continue}else i=s-55296<<10|i-56320|65536,s=null;else{i>56319||n+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):s=i;continue}else s&&(t[r++]=239,t[r++]=191,t[r++]=189,s=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=i&63|128)}return r}function Bbt(t){const e=wbt(t,{to:"string"});return JSON.parse(e)}function SB(t,e){return fwe(t,"GET","arraybuffer",[],null,e)}function fwe(t,e,r,n,i,s){const o=new XMLHttpRequest,a=new Promise((l,u)=>{o.open(e,t,!0);for(const d of n)o.setRequestHeader(d.name,d.value);o.responseType=r,o.timeout=15e3,o.onload=()=>{var d;if(o.status!==200){const f=(d=o.response)!==null&&d!==void 0?d:new ca(`Response status error: ${t}`);u(f)}o.response||u(new ca(`Response empty: ${t}`)),l(o.response)},o.onerror=()=>{u(new ca(`Request error: ${t}`))},o.ontimeout=()=>{u(new ca(`Request timeout: ${t}`))},o.onabort=()=>{u(new ca(`Request aborted: ${t}`))},o.send(e==="POST"?i:null)});return s&&s.catch(()=>{o.abort()}),a}function jbt(t){const e=new bbt(t),r={faces:[],vertices:[]};return e.readFields(Vbt,r)}function Vbt(t,e,r){t===1?e.vertices.push(r.readFloat()):t===2?e.faces.push(r.readVarint()):console.warn(`Unsupported pbf tag (${t})`)}class Ubt extends XO{constructor(e){super(),this._geometry=e}get geometry(){return this._geometry}fire(e,r){super.fire(e,r)}getCoreImages(e){return Promise.reject(new ca("Not implemented"))}getCluster(e,r){return Promise.reject(new ca("Not implemented"))}getSpatialImages(e){return Promise.reject(new ca("Not implemented"))}getImages(e){return Promise.reject(new ca("Not implemented"))}getImageBuffer(e,r){return Promise.reject(new ca("Not implemented"))}getImageTiles(e){return Promise.reject(new ca("Not implemented"))}getMesh(e,r){return Promise.reject(new ca("Not implemented"))}getSequence(e){return Promise.reject(new ca("Not implemented"))}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}setAccessToken(e){throw new ca("Not implemented")}}class Hbt{constructor(){}bboxToCellIds(e,r){throw new ca("Not implemented")}getAdjacent(e){throw new ca("Not implemented")}getVertices(e){throw new ca("Not implemented")}lngLatToCellId(e){throw new ca("Not implemented")}_approxBboxToCellIds(e,r){if(r.lat<=e.lat||r.lng<=e.lng)throw new ca("North east needs to be top right of south west");const n=(e.lat+r.lat)/2,i=(e.lng+r.lng)/2,s=cd(r.lng,r.lat,0,i,n,0),o=Math.max(s[0],s[1]);return this._lngLatToCellIds({lat:n,lng:i},o)}_enuToGeodetic(e,r){const[n,i]=A5(e[0],e[1],e[2],r.lng,r.lat,0);return{lat:i,lng:n}}_getLngLatBoundingBoxCorners(e,r){return[[-r,r,0],[r,r,0],[r,-r,0],[-r,-r,0]].map(n=>this._enuToGeodetic(n,e))}_lngLatToCellIds(e,r){const n=this.lngLatToCellId(e),i=this._getLngLatBoundingBoxCorners(e,r);for(const s of i)if(this.lngLatToCellId(s)!==n)return[n,...this.getAdjacent(n)];return[n]}}var Cg={exports:{}},sk={exports:{}};(function(t){/** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */(function(e,r){typeof o9t=="function"&&t&&t.exports?t.exports=r():(e.dcodeIO=e.dcodeIO||{}).Long=r()})(dS,function(){function e(fe,ee,be){this.low=fe|0,this.high=ee|0,this.unsigned=!!be}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1});function r(fe){return(fe&&fe.__isLong__)===!0}e.isLong=r;var n={},i={};function s(fe,ee){var be,le,ve;return ee?(fe>>>=0,(ve=0<=fe&&fe<256)&&(le=i[fe],le)?le:(be=a(fe,(fe|0)<0?-1:0,!0),ve&&(i[fe]=be),be)):(fe|=0,(ve=-128<=fe&&fe<128)&&(le=n[fe],le)?le:(be=a(fe,fe<0?-1:0,!1),ve&&(n[fe]=be),be))}e.fromInt=s;function o(fe,ee){if(isNaN(fe)||!isFinite(fe))return ee?A:I;if(ee){if(fe<0)return A;if(fe>=b)return K}else{if(fe<=-M)return pe;if(fe+1>=M)return re}return fe<0?o(-fe,ee).neg():a(fe%v|0,fe/v|0,ee)}e.fromNumber=o;function a(fe,ee,be){return new e(fe,ee,be)}e.fromBits=a;var l=Math.pow;function u(fe,ee,be){if(fe.length===0)throw Error("empty string");if(fe==="NaN"||fe==="Infinity"||fe==="+Infinity"||fe==="-Infinity")return I;if(typeof ee=="number"?(be=ee,ee=!1):ee=!!ee,be=be||10,be<2||360)throw Error("interior hyphen");if(le===0)return u(fe.substring(1),ee,be).neg();for(var ve=o(l(be,8)),Pe=I,Fe=0;Fe>>0:this.low},ge.toNumber=function(){return this.unsigned?(this.high>>>0)*v+(this.low>>>0):this.high*v+(this.low>>>0)},ge.toString=function(ee){if(ee=ee||10,ee<2||36>>0,lt=Lt.toString(ee);if(Fe=He,Fe.isZero())return lt+We;for(;lt.length<6;)lt="0"+lt;We=""+lt+We}},ge.getHighBits=function(){return this.high},ge.getHighBitsUnsigned=function(){return this.high>>>0},ge.getLowBits=function(){return this.low},ge.getLowBitsUnsigned=function(){return this.low>>>0},ge.getNumBitsAbs=function(){if(this.isNegative())return this.eq(pe)?64:this.neg().getNumBitsAbs();for(var ee=this.high!=0?this.high:this.low,be=31;be>0&&!(ee&1<=0},ge.isOdd=function(){return(this.low&1)===1},ge.isEven=function(){return(this.low&1)===0},ge.equals=function(ee){return r(ee)||(ee=d(ee)),this.unsigned!==ee.unsigned&&this.high>>>31===1&&ee.high>>>31===1?!1:this.high===ee.high&&this.low===ee.low},ge.eq=ge.equals,ge.notEquals=function(ee){return!this.eq(ee)},ge.neq=ge.notEquals,ge.lessThan=function(ee){return this.comp(ee)<0},ge.lt=ge.lessThan,ge.lessThanOrEqual=function(ee){return this.comp(ee)<=0},ge.lte=ge.lessThanOrEqual,ge.greaterThan=function(ee){return this.comp(ee)>0},ge.gt=ge.greaterThan,ge.greaterThanOrEqual=function(ee){return this.comp(ee)>=0},ge.gte=ge.greaterThanOrEqual,ge.compare=function(ee){if(r(ee)||(ee=d(ee)),this.eq(ee))return 0;var be=this.isNegative(),le=ee.isNegative();return be&&!le?-1:!be&&le?1:this.unsigned?ee.high>>>0>this.high>>>0||ee.high===this.high&&ee.low>>>0>this.low>>>0?-1:1:this.sub(ee).isNegative()?-1:1},ge.comp=ge.compare,ge.negate=function(){return!this.unsigned&&this.eq(pe)?pe:this.not().add(j)},ge.neg=ge.negate,ge.add=function(ee){r(ee)||(ee=d(ee));var be=this.high>>>16,le=this.high&65535,ve=this.low>>>16,Pe=this.low&65535,Fe=ee.high>>>16,We=ee.high&65535,He=ee.low>>>16,Lt=ee.low&65535,lt=0,pt=0,rr=0,Tt=0;return Tt+=Pe+Lt,rr+=Tt>>>16,Tt&=65535,rr+=ve+He,pt+=rr>>>16,rr&=65535,pt+=le+We,lt+=pt>>>16,pt&=65535,lt+=be+Fe,lt&=65535,a(rr<<16|Tt,lt<<16|pt,this.unsigned)},ge.subtract=function(ee){return r(ee)||(ee=d(ee)),this.add(ee.neg())},ge.sub=ge.subtract,ge.multiply=function(ee){if(this.isZero()||(r(ee)||(ee=d(ee)),ee.isZero()))return I;if(this.eq(pe))return ee.isOdd()?pe:I;if(ee.eq(pe))return this.isOdd()?pe:I;if(this.isNegative())return ee.isNegative()?this.neg().mul(ee.neg()):this.neg().mul(ee).neg();if(ee.isNegative())return this.mul(ee.neg()).neg();if(this.lt(O)&&ee.lt(O))return o(this.toNumber()*ee.toNumber(),this.unsigned);var be=this.high>>>16,le=this.high&65535,ve=this.low>>>16,Pe=this.low&65535,Fe=ee.high>>>16,We=ee.high&65535,He=ee.low>>>16,Lt=ee.low&65535,lt=0,pt=0,rr=0,Tt=0;return Tt+=Pe*Lt,rr+=Tt>>>16,Tt&=65535,rr+=ve*Lt,pt+=rr>>>16,rr&=65535,rr+=Pe*He,pt+=rr>>>16,rr&=65535,pt+=le*Lt,lt+=pt>>>16,pt&=65535,pt+=ve*He,lt+=pt>>>16,pt&=65535,pt+=Pe*We,lt+=pt>>>16,pt&=65535,lt+=be*Lt+le*He+ve*We+Pe*Fe,lt&=65535,a(rr<<16|Tt,lt<<16|pt,this.unsigned)},ge.mul=ge.multiply,ge.divide=function(ee){if(r(ee)||(ee=d(ee)),ee.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?A:I;var be,le,ve;if(this.unsigned){if(ee.unsigned||(ee=ee.toUnsigned()),ee.gt(this))return A;if(ee.gt(this.shru(1)))return H;ve=A}else{if(this.eq(pe)){if(ee.eq(j)||ee.eq(W))return pe;if(ee.eq(pe))return j;var Pe=this.shr(1);return be=Pe.div(ee).shl(1),be.eq(I)?ee.isNegative()?j:W:(le=this.sub(ee.mul(be)),ve=be.add(le.div(ee)),ve)}else if(ee.eq(pe))return this.unsigned?A:I;if(this.isNegative())return ee.isNegative()?this.neg().div(ee.neg()):this.neg().div(ee).neg();if(ee.isNegative())return this.div(ee.neg()).neg();ve=I}for(le=this;le.gte(ee);){be=Math.max(1,Math.floor(le.toNumber()/ee.toNumber()));for(var Fe=Math.ceil(Math.log(be)/Math.LN2),We=Fe<=48?1:l(2,Fe-48),He=o(be),Lt=He.mul(ee);Lt.isNegative()||Lt.gt(le);)be-=We,He=o(be,this.unsigned),Lt=He.mul(ee);He.isZero()&&(He=j),ve=ve.add(He),le=le.sub(Lt)}return ve},ge.div=ge.divide,ge.modulo=function(ee){return r(ee)||(ee=d(ee)),this.sub(this.div(ee).mul(ee))},ge.mod=ge.modulo,ge.not=function(){return a(~this.low,~this.high,this.unsigned)},ge.and=function(ee){return r(ee)||(ee=d(ee)),a(this.low&ee.low,this.high&ee.high,this.unsigned)},ge.or=function(ee){return r(ee)||(ee=d(ee)),a(this.low|ee.low,this.high|ee.high,this.unsigned)},ge.xor=function(ee){return r(ee)||(ee=d(ee)),a(this.low^ee.low,this.high^ee.high,this.unsigned)},ge.shiftLeft=function(ee){return r(ee)&&(ee=ee.toInt()),(ee&=63)===0?this:ee<32?a(this.low<>>32-ee,this.unsigned):a(0,this.low<>>ee|this.high<<32-ee,this.high>>ee,this.unsigned):a(this.high>>ee-32,this.high>=0?0:-1,this.unsigned)},ge.shr=ge.shiftRight,ge.shiftRightUnsigned=function(ee){if(r(ee)&&(ee=ee.toInt()),ee&=63,ee===0)return this;var be=this.high;if(ee<32){var le=this.low;return a(le>>>ee|be<<32-ee,be>>>ee,this.unsigned)}else return ee===32?a(be,0,this.unsigned):a(be>>>ee-32,0,this.unsigned)},ge.shru=ge.shiftRightUnsigned,ge.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},ge.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},ge.toBytes=function(fe){return fe?this.toBytesLE():this.toBytesBE()},ge.toBytesLE=function(){var fe=this.high,ee=this.low;return[ee&255,ee>>>8&255,ee>>>16&255,ee>>>24&255,fe&255,fe>>>8&255,fe>>>16&255,fe>>>24&255]},ge.toBytesBE=function(){var fe=this.high,ee=this.low;return[fe>>>24&255,fe>>>16&255,fe>>>8&255,fe&255,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee&255]},e})})(sk);(function(t){(function(e){var r=e.S2={L:{}};r.L.LatLng=function(u,d,f){var m=parseFloat(u,10),v=parseFloat(d,10);if(isNaN(m)||isNaN(v))throw new Error("Invalid LatLng object: ("+u+", "+d+")");return f!==!0&&(m=Math.max(Math.min(m,90),-90),v=(v+180)%360+(v<-180||v===180?180:-180)),{lat:m,lng:v}},r.L.LatLng.DEG_TO_RAD=Math.PI/180,r.L.LatLng.RAD_TO_DEG=180/Math.PI,r.LatLngToXYZ=function(u){var d=r.L.LatLng.DEG_TO_RAD,f=u.lat*d,m=u.lng*d,v=Math.cos(f);return[Math.cos(m)*v,Math.sin(m)*v,Math.sin(f)]},r.XYZToLatLng=function(u){var d=r.L.LatLng.RAD_TO_DEG,f=Math.atan2(u[2],Math.sqrt(u[0]*u[0]+u[1]*u[1])),m=Math.atan2(u[1],u[0]);return r.L.LatLng(f*d,m*d)};var n=function(u){var d=[Math.abs(u[0]),Math.abs(u[1]),Math.abs(u[2])];return d[0]>d[1]?d[0]>d[2]?0:2:d[1]>d[2]?1:2},i=function(u,d){var f,m;switch(u){case 0:f=d[1]/d[0],m=d[2]/d[0];break;case 1:f=-d[0]/d[1],m=d[2]/d[1];break;case 2:f=-d[0]/d[2],m=-d[1]/d[2];break;case 3:f=d[2]/d[0],m=d[1]/d[0];break;case 4:f=d[2]/d[1],m=-d[0]/d[1];break;case 5:f=-d[1]/d[2],m=-d[0]/d[2];break;default:throw{error:"Invalid face"}}return[f,m]};r.XYZToFaceUV=function(u){var d=n(u);u[d]<0&&(d+=3);var f=i(d,u);return[d,f]},r.FaceUVToXYZ=function(u,d){var f=d[0],m=d[1];switch(u){case 0:return[1,f,m];case 1:return[-f,1,m];case 2:return[-f,-m,1];case 3:return[-1,-m,-f];case 4:return[m,-1,-f];case 5:return[m,f,-1];default:throw{error:"Invalid face"}}};var s=function(u){return u>=.5?1/3*(4*u*u-1):1/3*(1-4*(1-u)*(1-u))};r.STToUV=function(u){return[s(u[0]),s(u[1])]};var o=function(u){return u>=0?.5*Math.sqrt(1+3*u):1-.5*Math.sqrt(1-3*u)};r.UVToST=function(u){return[o(u[0]),o(u[1])]},r.STToIJ=function(u,d){var f=1<=0;O--){var I=1<=0;M--)O=v-M,I=m[M],A=0,j=0,I==="1"?j=1:I==="2"?(A=1,j=1):I==="3"&&(A=1),H=Math.pow(2,O-1),a(H,b,A,j),b.x+=H*A,b.y+=H*j;if(f%2===1){var W=b.x;b.x=b.y,b.y=W}return r.S2Cell.FromFaceIJ(parseInt(f),[b.x,b.y],O)},r.S2Cell.FromLatLng=function(u,d){if(!u.lat&&u.lat!==0||!u.lng&&u.lng!==0)throw new Error("Pass { lat: lat, lng: lng } to S2.S2Cell.FromLatLng");var f=r.LatLngToXYZ(u),m=r.XYZToFaceUV(f),v=r.UVToST(m[1]),b=r.STToIJ(v,d);return r.S2Cell.FromFaceIJ(m[0],b,d)},r.S2Cell.FromFaceIJ=function(u,d,f){var m=new r.S2Cell;return m.face=u,m.ij=d,m.level=f,m},r.S2Cell.prototype.toString=function(){return"F"+this.face+"ij["+this.ij[0]+","+this.ij[1]+"]@"+this.level},r.S2Cell.prototype.getLatLng=function(){var u=r.IJToST(this.ij,this.level,[.5,.5]),d=r.STToUV(u),f=r.FaceUVToXYZ(this.face,d);return r.XYZToLatLng(f)},r.S2Cell.prototype.getCornerLatLngs=function(){for(var u=[],d=[[0,0],[0,1],[1,1],[1,0]],f=0;f<4;f++){var m=r.IJToST(this.ij,this.level,d[f]),v=r.STToUV(m),b=r.FaceUVToXYZ(this.face,v);u.push(r.XYZToLatLng(b))}return u},r.S2Cell.prototype.getFaceAndQuads=function(){var u=l(this.ij[0],this.ij[1],this.level,this.face);return[this.face,u]},r.S2Cell.prototype.toHilbertQuadkey=function(){var u=l(this.ij[0],this.ij[1],this.level,this.face);return this.face.toString(10)+"/"+u.join("")},r.latLngToNeighborKeys=r.S2Cell.latLngToNeighborKeys=function(u,d,f){return r.S2Cell.FromLatLng({lat:u,lng:d},f).getNeighbors().map(function(m){return m.toHilbertQuadkey()})},r.S2Cell.prototype.getNeighbors=function(){var u=function(b,M,O){var I=1<=0&&M[1]>=0&&M[0]f&&(d=d.substr(0,f)),v=m.fromString(u.toString(10),!0,10).toString(2);v.length30)throw new Error("'level' is not a number between 1 and 30 (but it should be)");return r.S2Cell.FromLatLng({lat:u,lng:d},f).toHilbertQuadkey()},r.stepKey=function(u,d){var f=e.dcodeIO&&e.dcodeIO.Long||sk.exports,m=u.split("/"),v=m[0],b=m[1],M=m[1].length,O=f.fromString(b,!0,4),I;d>0?I=O.add(Math.abs(d)):d<0&&(I=O.subtract(Math.abs(d)));var A=I.toString(4);for(A==="0"&&console.warning(new Error("face/position wrapping is not yet supported"));A.length!u.includes(m)))),f=[s,o,a,l];for(const m of d){let v=0;for(const b of this._getNeighbors(m,i))u.includes(b)&&v++;v===2&&f.push(m)}return f.map(m=>Cg.exports.S2.keyToId(m))}getVertices(e){const r=Cg.exports.S2.idToKey(e);return Cg.exports.S2.S2Cell.FromHilbertQuadKey(r).getCornerLatLngs().map(i=>({lat:i.lat,lng:i.lng}))}lngLatToCellId(e){return this._lngLatToId(e,this._level)}_getNeighbors(e,r){const n=Cg.exports.S2.keyToLatLng(e);return Cg.exports.S2.latLngToNeighborKeys(n.lat,n.lng,r)}_lngLatToId(e,r){const n=Cg.exports.S2.latLngToKey(e.lat,e.lng,r);return Cg.exports.S2.keyToId(n)}}function qbt(t){switch(t){case"equirectangular":case"spherical":return"spherical";case"fisheye":return"fisheye";default:return"perspective"}}class Wbt{clusterReconstruction(e){const n=e.points,i=1/255;for(const a in n){if(!n.hasOwnProperty(a))continue;const l=n[a].color;l[0]*=i,l[1]*=i,l[2]*=i}const s=e.reference_lla,o={alt:s.altitude,lat:s.latitude,lng:s.longitude};return{id:null,points:n,reference:o}}coreImage(e){const r=this._geometry(e.geometry),n=this._geometry(e.computed_geometry),i={id:e.sequence},s=e.id;return{computed_geometry:n,geometry:r,id:s,sequence:i}}spatialImage(e){var r,n,i,s,o;e.camera_type=qbt(e.camera_type),e.merge_id=e.merge_cc?e.merge_cc.toString():null,e.private=null;const a=e.camera_type==="spherical"?e.thumb_2048_url:e.thumb_1024_url;return e.thumb=(r=e.thumb)!==null&&r!==void 0?r:{id:null,url:a},e.cluster=(n=e.sfm_cluster)!==null&&n!==void 0?n:{id:null,url:null},e.creator=(i=e.creator)!==null&&i!==void 0?i:{id:null,username:null},e.owner=(s=e.organization)!==null&&s!==void 0?s:{id:null},e.mesh=(o=e.mesh)!==null&&o!==void 0?o:{id:null,url:null},e}_geometry(e){const r=e==null?void 0:e.coordinates;return r?{lat:r[1],lng:r[0]}:null}}class Zbt{constructor(){this.imagesPath="images",this.sequencePath="image_ids",this._imageTilesPath="tiles",this.coreFields=["computed_geometry","geometry","sequence"],this.idFields=["id"],this.spatialFields=["altitude","atomic_scale","camera_parameters","camera_type","captured_at","compass_angle","computed_altitude","computed_compass_angle","computed_rotation","creator","exif_orientation","height","merge_cc","mesh","organization","quality_score","sfm_cluster","thumb_1024_url","thumb_2048_url","width"],this.imageTileFields=["url","z","x","y"]}images(e,r){return`image_ids=${e.join(",")}&fields=${r.join(",")}`}imagesS2(e,r){return`s2=${e}&fields=${r.join(",")}`}imageTiles(e,r){return`z=${e}&fields=${r.join(",")}`}imageTilesPath(e){return`${e}/${this._imageTilesPath}`}sequence(e){return`sequence_id=${e}`}}class Ybt extends Ubt{constructor(e,r,n,i){var s;super(r??new Gbt),this._convert=n??new Wbt,this._query=i??new Zbt,this._method="GET";const o=e??{};this._endpoint=(s=o.endpoint)!==null&&s!==void 0?s:"https://graph.mapillary.com",this._accessToken=o.accessToken}getCluster(e,r){return SB(e,r).then(n=>{const i=Bbt(n);if(i.length<1)throw new Error("Cluster reconstruction empty");return this._convert.clusterReconstruction(i[0])})}getCoreImages(e){const r=[...this._query.idFields,...this._query.coreFields],n=this._query.imagesS2(e,r),i=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(n,i).then(s=>{const o={cell_id:e,images:[]},a=s.data;for(const l of a){const u=this._convert.coreImage(l);o.images.push(u)}return o})}getImageBuffer(e,r){return SB(e,r)}getImages(e){const r=[...this._query.idFields,...this._query.coreFields,...this._query.spatialFields],n=this._query.images(e,r),i=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(n,i).then(s=>{const o=[],a=s.data;for(const l of a){const u=this._convert.coreImage(l),d=this._convert.spatialImage(l),m={node:Object.assign({},d,u),node_id:l.id};o.push(m)}return o})}getImageTiles(e){const r=[...this._query.imageTileFields],n=this._query.imageTiles(e.z,r),i=new URL(this._query.imageTilesPath(e.imageId),this._endpoint).href;return this._fetchGraphContract(n,i).then(s=>({node:s.data,node_id:e.imageId}))}getMesh(e,r){return SB(e,r).then(n=>jbt(n))}getSequence(e){const r=this._query.sequence(e),n=new URL(this._query.sequencePath,this._endpoint).href;return this._fetchGraphContract(r,n).then(i=>({id:e,image_ids:i.data.map(o=>o.id)}))}getSpatialImages(e){const r=[...this._query.idFields,...this._query.coreFields,...this._query.spatialFields],n=this._query.images(e,r),i=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(n,i).then(s=>{const o=[],a=s.data;for(const l of a){const d={node:this._convert.spatialImage(l),node_id:l.id};o.push(d)}return o})}setAccessToken(e){this._accessToken=e}_createHeaders(){const e=[{name:"Accept",value:"application/json"},{name:"Content-Type",value:"application/x-www-form-urlencoded"}];return this._accessToken&&e.push({name:"Authorization",value:`OAuth ${this._accessToken}`}),e}_fetchGraphContract(e,r){const n=this._method,i=this._createHeaders(),s=`${r}?${e}`;return fwe(s,n,"json",i,null,null).catch(o=>{const a=this._makeErrorMessage(o);throw new ca(a)})}_makeErrorMessage(e){const r=e.error;return r?`${r.code} (${r.type}, ${r.fbtrace_id}): ${r.message}`:"Failed to fetch data"}}class Xbt{constructor(e,r){this._id=e,this._lngLat=r}get id(){return this._id}get geometry(){return this._geometry}get lngLat(){return this._lngLat}createGeometry(e){this._geometry||(this._createGeometry(e),this._geometry.updateMatrixWorld(!0))}disposeGeometry(){this._geometry&&(this._disposeGeometry(),this._geometry=void 0)}getInteractiveObjects(){return this._geometry?this._getInteractiveObjects():[]}lerpAltitude(e,r){this._geometry&&(this._geometry.position.z=(1-r)*this._geometry.position.z+r*e)}updatePosition(e,r){r&&(this._lngLat.lat=r.lat,this._lngLat.lng=r.lng),this._geometry&&(this._geometry.position.fromArray(e),this._geometry.updateMatrixWorld(!0))}}class Jbt extends Xbt{constructor(e,r,n){super(e,r),n=n||{},this._ballColor=n.ballColor!=null?n.ballColor:16711680,this._ballOpacity=n.ballOpacity!=null?n.ballOpacity:.8,this._circleToRayAngle=2,this._color=n.color!=null?n.color:16711680,this._interactive=!!n.interactive,this._opacity=n.opacity!=null?n.opacity:.4,this._radius=n.radius!=null?n.radius:1}_createGeometry(e){const r=this._radius,n=this._markerHeight(r),i=new k5({color:this._color,opacity:this._opacity,transparent:!0,depthWrite:!1}),s=new ya(this._createMarkerGeometry(r,8,8),i),o=new ya(new qO(r/2,8,8),new k5({color:this._ballColor,opacity:this._ballOpacity,transparent:!0}));o.position.z=n,o.renderOrder=1;const a=new xo;a.add(o),a.add(s),a.position.fromArray(e),this._geometry=a}_disposeGeometry(){for(const e of this._geometry.children)e.geometry.dispose(),e.material.dispose()}_getInteractiveObjects(){return this._interactive?[this._geometry.children[0]]:[]}_markerHeight(e){const r=Math.tan(Math.PI-this._circleToRayAngle);return e*Math.sqrt(1+r*r)}_createMarkerGeometry(e,r,n){const i=this._markerHeight(e),s=this._circleToRayAngle,o=[],a=new Float32Array(3*(r+1)*(n+1));let l=0;for(let v=0;v<=n;++v){const b=[];for(let M=0;M<=r;++M){const O=M/r*Math.PI*2,I=v/n*Math.PI;let A=e;if(I>s){const W=Math.tan(I-s);A=e*Math.sqrt(1+W*W)}const j=3*l,H=Math.sin(I);a[j+0]=A*Math.cos(O)*H,a[j+1]=A*Math.sin(O)*H,a[j+2]=A*Math.cos(I)+i,b.push(l++)}o.push(b)}const u=new Uint16Array(6*r*n);let d=0;for(let v=0;va!=null)).subscribe(a=>{this._key=a,this._componentService.deactivateCover(),this._coverComponent.configure({id:this._key,state:ad.Hidden}),this._subscribeCoverComponent(),this._navigator.stateService.start(),this._navigator.cacheService.start(),this._navigator.panService.start(),this._observer.startEmit()})}get navigable(){return this._navigable}get(e){return this._componentService.get(e)}activate(e){this._componentService.activate(e)}activateCover(){this._coverComponent.configure({state:ad.Visible})}deactivate(e){this._componentService.deactivate(e)}deactivateCover(){this._coverComponent.configure({state:ad.Loading})}remove(){this._componentService.remove(),this._configurationSubscription!=null&&this._configurationSubscription.unsubscribe()}_initializeComponents(){var e,r;const n=this._options;this._uFalse((e=n.fallback)===null||e===void 0?void 0:e.image,"imagefallback"),this._uFalse((r=n.fallback)===null||r===void 0?void 0:r.navigation,"navigationfallback"),this._uFalse(n.marker,"marker"),this._uFalse(n.popup,"popup"),this._uFalse(n.slider,"slider"),this._uFalse(n.spatial,"spatial"),this._uFalse(n.tag,"tag"),this._uTrue(n.attribution,"attribution"),this._uTrue(n.bearing,"bearing"),this._uTrue(n.cache,"cache"),this._uTrue(n.direction,"direction"),this._uTrue(n.image,"image"),this._uTrue(n.keyboard,"keyboard"),this._uTrue(n.pointer,"pointer"),this._uTrue(n.sequence,"sequence"),this._uTrue(n.zoom,"zoom")}_initilizeCoverComponent(){let e=this._options;this._coverComponent.configure({id:this._key}),e.cover===void 0||e.cover?this.activateCover():this.deactivateCover()}_setNavigable(e){this._navigable!==e&&(this._navigable=e,this._observer.navigable$.next(e))}_subscribeCoverComponent(){this._configurationSubscription=this._coverComponent.configuration$.pipe(qn(void 0,e=>e.state)).subscribe(e=>{e.state===ad.Loading?this._navigator.stateService.currentId$.pipe(Qn(),Yr(r=>{const n=r==null||r!==e.id;return n&&this._setNavigable(!1),n?this._navigator.moveTo$(e.id):this._navigator.stateService.currentImage$.pipe(Qn())})).subscribe(()=>{this._navigator.stateService.start(),this._navigator.cacheService.start(),this._navigator.panService.start(),this._observer.startEmit(),this._coverComponent.configure({state:ad.Hidden}),this._componentService.deactivateCover(),this._setNavigable(!0)},r=>{console.error("Failed to deactivate cover.",r),this._coverComponent.configure({state:ad.Visible})}):e.state===ad.Visible&&(this._observer.stopEmit(),this._navigator.stateService.stop(),this._navigator.cacheService.stop(),this._navigator.playService.stop(),this._navigator.panService.stop(),this._componentService.activateCover(),this._setNavigable(e.id==null))})}_uFalse(e,r){if(e===void 0){this._componentService.deactivate(r);return}if(typeof e=="boolean"){e?this._componentService.activate(r):this._componentService.deactivate(r);return}this._componentService.configure(r,e),this._componentService.activate(r)}_uTrue(e,r){if(e===void 0){this._componentService.activate(r);return}if(typeof e=="boolean"){e?this._componentService.activate(r):this._componentService.deactivate(r);return}this._componentService.configure(r,e),this._componentService.activate(r)}}class Qbt{constructor(e,r,n){this._adaptiveOperation$=new dn,this._render$=new dn,this._renderAdaptive$=new dn,this._subscriptions=new Hc,this._renderService=r,this._currentFrame$=n;const i=this._subscriptions,s=Ar.create(Ar.h("div.mapillary-dom-renderer",[]));e.appendChild(s),this._offset$=this._adaptiveOperation$.pipe(Ja((l,u)=>u(l),{elementHeight:e.offsetHeight,elementWidth:e.offsetWidth,imageAspect:0,renderMode:Nw.Fill}),vn(l=>l.imageAspect>0&&l.elementWidth>0&&l.elementHeight>0),Ct(l=>{const u=l.elementWidth/l.elementHeight,d=l.imageAspect/u;let f=0,m=0;return l.renderMode===Nw.Letterbox?l.imageAspect>u?f=l.elementHeight*(1-1/d)/2:m=l.elementWidth*(1-d)/2:l.imageAspect>u?m=-l.elementWidth*(d-1)/2:f=-l.elementHeight*(1/d-1)/2,{bottom:f,left:m,right:m,top:f}}));const o=this._currentFrame$.pipe(vn(l=>l.state.currentImage!=null),qn((l,u)=>l===u,l=>l.state.currentImage.id),Ct(l=>l.state.currentTransform.basicAspect),Ct(l=>u=>(u.imageAspect=l,u))).subscribe(this._adaptiveOperation$),a=ei(this._renderAdaptive$.pipe(Ja((l,u)=>(u.vNode==null?delete l[u.name]:l[u.name]=u.vNode,l),{})),this._offset$).pipe(Ct(l=>{const u=[],d=l[0];for(const v in d)d.hasOwnProperty(v)&&u.push(d[v]);const f=l[1],m={style:{bottom:f.bottom+"px",left:f.left+"px","pointer-events":"none",position:"absolute",right:f.right+"px",top:f.top+"px"}};return{name:"mapillary-dom-adaptive-renderer",vNode:Ar.h("div.mapillary-dom-adaptive-renderer",m,u)}})).subscribe(this._render$);this._vNode$=this._render$.pipe(Ja((l,u)=>(u.vNode==null?delete l[u.name]:l[u.name]=u.vNode,l),{}),Ct(l=>{const u=[];for(const d in l)l.hasOwnProperty(d)&&u.push(l[d]);return Ar.h("div.mapillary-dom-renderer",u)})),this._vPatch$=this._vNode$.pipe(Ja((l,u)=>(l.vpatch=Ar.diff(l.vNode,u),l.vNode=u,l),{vNode:Ar.h("div.mapillary-dom-renderer",[]),vpatch:null}),A0t("vpatch")),this._element$=this._vPatch$.pipe(Ja((l,u)=>Ar.patch(l,u),s),Ci(1),Bn()),i.push(o),i.push(a),i.push(this._element$.subscribe(()=>{})),i.push(this._renderService.size$.pipe(Ct(l=>u=>(u.elementWidth=l.width,u.elementHeight=l.height,u))).subscribe(this._adaptiveOperation$)),i.push(this._renderService.renderMode$.pipe(Ct(l=>u=>(u.renderMode=l,u))).subscribe(this._adaptiveOperation$))}get element$(){return this._element$}get render$(){return this._render$}get renderAdaptive$(){return this._renderAdaptive$}clear(e){this._renderAdaptive$.next({name:e,vNode:null}),this._render$.next({name:e,vNode:null})}remove(){this._subscriptions.unsubscribe()}}class e6t{constructor(e,r,n){this._renderFrame$=new dn,this._renderCameraOperation$=new dn,this._render$=new dn,this._clear$=new dn,this._renderOperation$=new dn,this._rendererOperation$=new dn,this._eraserOperation$=new dn,this._triggerOperation$=new dn,this._subscriptions=new Hc,this._opaqueRender$=new dn,this._renderService=n;const i=this._subscriptions;this._renderer$=this._rendererOperation$.pipe(Ja((b,M)=>M(b),{needsRender:!1,renderer:null}),vn(b=>!!b.renderer)),this._renderCollection$=this._renderOperation$.pipe(Ja((b,M)=>M(b),{}),js()),this._renderCamera$=this._renderCameraOperation$.pipe(Ja((b,M)=>M(b),{frameId:-1,needsRender:!1,perspective:null})),this._eraser$=this._eraserOperation$.pipe(po(b=>b),Ja((b,M)=>M(b),{needsRender:!1}));const s=this._triggerOperation$.pipe(po(b=>b),Ja((b,M)=>M(b),{needsRender:!1})),o=new $i(986895),a=ei(this._renderer$,this._renderCollection$,this._renderCamera$,this._eraser$,s).pipe(Ct(([b,M,O,I,A])=>{const j=Object.keys(M).map(H=>M[H]);return{camera:O,eraser:I,trigger:A,renderer:b,renders:j}}),vn(b=>{let M=b.renderer.needsRender||b.camera.needsRender||b.eraser.needsRender||b.trigger.needsRender;const O=b.camera.frameId;for(const I of b.renders){if(I.frameId!==O)return!1;M=M||I.needsRender}return M}),qn((b,M)=>b===M,b=>b.eraser.needsRender||b.trigger.needsRender?-b.camera.frameId:b.camera.frameId)).subscribe(b=>{b.renderer.needsRender=!1,b.camera.needsRender=!1,b.eraser.needsRender=!1,b.trigger.needsRender=!1;const M=b.camera.perspective,O=[],I=[];for(const j of b.renders)j.pass===hy.Background?O.push(j.render):j.pass===hy.Opaque&&I.push(j.render);const A=b.renderer.renderer;A.resetState(),A.setClearColor(o,1),A.clear();for(const j of O)j(M,A);A.clearDepth();for(const j of I)j(M,A);A.resetState(),this._opaqueRender$.next()});i.push(a),i.push(this._renderFrame$.pipe(Ct(b=>M=>(M.frameId=b.frameId,M.perspective=b.perspective,b.changed===!0&&(M.needsRender=!0),M))).subscribe(this._renderCameraOperation$)),this._renderFrameSubscribe();const l=this._render$.pipe(Ct(b=>M=>(M[b.name]=b.renderer,M))),u=this._clear$.pipe(Ct(b=>M=>(delete M[b],M)));i.push(Vs(l,u).subscribe(this._renderOperation$)),this._webGLRenderer$=this._render$.pipe(Qn(),Ct(()=>{r.appendChild(e);const b=n.element,M=new da({canvas:e});return M.setPixelRatio(window.devicePixelRatio),M.setSize(b.offsetWidth,b.offsetHeight),M.autoClear=!1,M}),Ci(1),Bn()),i.push(this._webGLRenderer$.subscribe(()=>{}));const d=this._webGLRenderer$.pipe(Qn(),Ct(b=>M=>(M.needsRender=!0,M.renderer=b,M))),f=this._renderService.size$.pipe(Ct(b=>M=>(M.renderer==null||(M.renderer.setSize(b.width,b.height),M.needsRender=!0),M))),m=this._clear$.pipe(Ct(()=>b=>(b.renderer==null||(b.needsRender=!0),b)));i.push(Vs(d,f,m).subscribe(this._rendererOperation$));const v=this._renderCollection$.pipe(vn(b=>Object.keys(b).length===0),js());i.push(v.subscribe(()=>{this._renderFrameSubscription!=null&&(this._renderFrameSubscription.unsubscribe(),this._renderFrameSubscription=null,this._renderFrameSubscribe())})),i.push(v.pipe(Ct(()=>b=>(b.needsRender=!0,b))).subscribe(this._eraserOperation$))}get render$(){return this._render$}get opaqueRender$(){return this._opaqueRender$}get webGLRenderer$(){return this._webGLRenderer$}clear(e){this._clear$.next(e)}remove(){this._rendererOperation$.next(e=>{if(e.renderer!=null){const r=e.renderer.getContext().getExtension("WEBGL_lose_context");r&&r.loseContext(),e.renderer=null}return e}),this._renderFrameSubscription!=null&&this._renderFrameSubscription.unsubscribe(),this._subscriptions.unsubscribe()}triggerRerender(){this._renderService.renderCameraFrame$.pipe(Wu(1),Qn()).subscribe(()=>{this._triggerOperation$.next(e=>(e.needsRender=!0,e))})}_renderFrameSubscribe(){this._render$.pipe(Qn(),Ct(()=>e=>(e.needsRender=!0,e))).subscribe(e=>{this._renderCameraOperation$.next(e)}),this._renderFrameSubscription=this._render$.pipe(Qn(),Qi(()=>this._renderService.renderCameraFrame$)).subscribe(this._renderFrame$)}}class e2{constructor(e){e!=null?(this._position=new st().fromArray(e.unprojectSfM([0,0],0)),this._lookat=new st().fromArray(e.unprojectSfM([0,0],10)),this._up=e.upVector(),this._focal=this._getFocal(e)):(this._position=new st(0,0,0),this._lookat=new st(1,0,0),this._up=new st(0,0,1),this._focal=1)}get position(){return this._position}get lookat(){return this._lookat}get up(){return this._up}get focal(){return this._focal}set focal(e){this._focal=e}lerpCameras(e,r,n){this._position.subVectors(r.position,e.position).multiplyScalar(n).add(e.position),this._lookat.subVectors(r.lookat,e.lookat).multiplyScalar(n).add(e.lookat),this._up.subVectors(r.up,e.up).multiplyScalar(n).add(e.up),this._focal=(1-n)*e.focal+n*r.focal}copy(e){this._position.copy(e.position),this._lookat.copy(e.lookat),this._up.copy(e.up),this._focal=e.focal}clone(){let e=new e2;return e.position.copy(this._position),e.lookat.copy(this._lookat),e.up.copy(this._up),e.focal=this._focal,e}diff(e){let r=this._position.distanceToSquared(e.position),n=this._lookat.distanceToSquared(e.lookat),i=this._up.distanceToSquared(e.up),s=100*Math.abs(this._focal-e.focal);return Math.max(r,n,i,s)}_getFocal(e){return Li(e.cameraType)?.5/Math.tan(Math.PI/2):e.focal}}class t6t{constructor(e,r,n){this._spatial=new Uc,this._viewportCoords=new Nh,this._size={width:e,height:r},this._initialFov=60,this._alpha=-1,this._stateTransitionAlpha=-1,this._stateTransitionFov=-1,this._renderMode=n,this._zoom=0,this._frameId=-1,this._changed=!1,this._changedForFrame=-1,this._currentImageId=null,this._previousImageId=null,this._currentSpherical=!1,this._previousSpherical=!1,this._state=null,this._currentProjectedPoints=[],this._previousProjectedPoints=[],this._currentFov=this._initialFov,this._previousFov=this._initialFov,this._camera=new e2,this._perspective=new ld(this._initialFov,this._computeAspect(e,r),.1,1e4),this._perspective.position.copy(this._camera.position),this._perspective.up.copy(this._camera.up),this._perspective.lookAt(this._camera.lookat),this._perspective.updateMatrixWorld(!0),this._perspective.matrixAutoUpdate=!1,this._rotation={phi:0,theta:0}}get alpha(){return this._alpha}get camera(){return this._camera}get changed(){return this._frameId===this._changedForFrame}get frameId(){return this._frameId}get perspective(){return this._perspective}get renderMode(){return this._renderMode}get rotation(){return this._rotation}get zoom(){return this._zoom}get size(){return this._size}getTilt(){return 90-this._spatial.radToDeg(this._rotation.theta)}fovToZoom(e){e=Math.min(90,Math.max(0,e));const r=this._computeCurrentFov(0),n=this._alpha===1?r:this._interpolateFov(r,this._computePreviousFov(0),this._alpha),i=Math.tan(n/2*Math.PI/180),s=Math.tan(e/2*Math.PI/180);return Math.log(i/s)/Math.log(2)}setFrame(e){const r=e.state;if(r.state!==this._state){if(this._state=r.state,this._state!==Ai.Custom&&(this.setRenderMode(this._renderMode),this.setSize(this._size)),this._state===Ai.Earth){const u=this._fovToY(this._perspective.fov,this._zoom);this._stateTransitionFov=this._yToFov(u,0)}this._changed=!0}const n=r.currentImage.id,i=r.previousImage?r.previousImage.id:null;n!==this._currentImageId&&(this._currentImageId=n,this._currentSpherical=Li(r.currentTransform.cameraType),this._currentProjectedPoints=this._computeProjectedPoints(r.currentTransform),this._changed=!0),i!==this._previousImageId&&(this._previousImageId=i,this._previousSpherical=Li(r.previousTransform.cameraType),this._previousProjectedPoints=this._computeProjectedPoints(r.previousTransform),this._changed=!0);const s=r.zoom;s!==this._zoom&&(this._changed=!0),this._changed&&(this._currentFov=this._computeCurrentFov(s),this._previousFov=this._computePreviousFov(s));const o=r.alpha,a=r.stateTransitionAlpha;if(this._changed||o!==this._alpha||a!==this._stateTransitionAlpha){switch(this._alpha=o,this._stateTransitionAlpha=a,this._state){case Ai.Earth:{const u=this._stateTransitionFov,d=this._focalToFov(r.camera.focal),f=Lw.lerp(u,d,a),m=this._fovToY(f,0);this._perspective.fov=this._yToFov(m,s);break}case Ai.Custom:break;default:this._perspective.fov=this._interpolateFov(this._currentFov,this._previousFov,this._alpha),this._changed=!0;break}this._zoom=s,this._state!==Ai.Custom&&this._perspective.updateProjectionMatrix()}const l=r.camera;this._camera.diff(l)>1e-9&&(this._camera.copy(l),this._rotation=this._computeRotation(l),this._perspective.up.copy(l.up),this._perspective.position.copy(l.position),this._perspective.matrixAutoUpdate=!0,this._perspective.lookAt(l.lookat),this._perspective.matrixAutoUpdate=!1,this._perspective.updateMatrix(),this._perspective.updateMatrixWorld(!1),this._changed=!0),this._setFrameId(e.id)}setProjectionMatrix(e){this._perspective.fov=this._focalToFov(e[5]/2),this._perspective.projectionMatrix.fromArray(e),this._perspective.projectionMatrixInverse.copy(this._perspective.projectionMatrix).invert(),this._changed=!0}setRenderMode(e){this._renderMode=e,this._state!==Ai.Custom&&(this._perspective.fov=this._computeFov(),this._perspective.updateProjectionMatrix(),this._changed=!0)}setSize(e){this._size=e,this._state!==Ai.Custom&&(this._perspective.aspect=this._computeAspect(e.width,e.height),this._perspective.fov=this._computeFov(),this._perspective.updateProjectionMatrix(),this._changed=!0)}_computeAspect(e,r){return e===0?0:e/r}_computeCurrentFov(e){return this._perspective.aspect===0?0:this._currentImageId?this._currentSpherical?this._yToFov(1,e):this._computeVerticalFov(this._currentProjectedPoints,this._renderMode,e,this.perspective.aspect):this._initialFov}_computeFov(){return this._currentFov=this._computeCurrentFov(this._zoom),this._previousFov=this._computePreviousFov(this._zoom),this._interpolateFov(this._currentFov,this._previousFov,this._alpha)}_computePreviousFov(e){return this._perspective.aspect===0?0:this._currentImageId?this._previousImageId?this._previousSpherical?this._yToFov(1,e):this._computeVerticalFov(this._previousProjectedPoints,this._renderMode,e,this.perspective.aspect):this._currentFov:this._initialFov}_computeProjectedPoints(e){return aK(e,[[.5,0],[1,0]],[[.5,0],[0,.5]],100,this._viewportCoords)}_computeRequiredVerticalFov(e,r,n){const i=Math.max(e[0]/n,e[1]);return this._yToFov(i,r)}_computeRotation(e){let r=e.lookat.clone().sub(e.position),n=e.up.clone(),i=this._spatial.azimuthal(r.toArray(),n.toArray()),s=Math.PI/2-this._spatial.angleToPlane(r.toArray(),[0,0,1]);return{phi:i,theta:s}}_computeVerticalFov(e,r,n,i){const s=e.map(a=>this._computeRequiredVerticalFov(a,n,i));return r===Nw.Fill?Math.min(...s)*.995:Math.max(...s)}_yToFov(e,r){return 2*Math.atan(e/Math.pow(2,r))*180/Math.PI}_focalToFov(e){return 2*Math.atan2(1,2*e)*180/Math.PI}_fovToY(e,r){return Math.pow(2,r)*Math.tan(Math.PI*e/360)}_interpolateFov(e,r,n){return n*e+(1-n)*r}_setFrameId(e){this._frameId=e,this._changed&&(this._changed=!1,this._changedForFrame=e)}}class r6t{constructor(e,r,n,i){this._subscriptions=new Hc,this._element=e,this._currentFrame$=r,this._spatial=new Uc,n=n??Nw.Fill,this._resize$=new dn,this._projectionMatrix$=new dn,this._renderCameraOperation$=new dn,this._size$=new uy({height:this._element.offsetHeight,width:this._element.offsetWidth});const s=this._subscriptions;s.push(this._resize$.pipe(Ct(()=>({height:this._element.offsetHeight,width:this._element.offsetWidth}))).subscribe(this._size$)),this._renderMode$=new uy(n),this._renderCameraHolder$=this._renderCameraOperation$.pipe(po(o=>o),Ja((o,a)=>a(o),i??new t6t(this._element.offsetWidth,this._element.offsetHeight,n)),Ci(1),Bn()),this._renderCameraFrame$=this._currentFrame$.pipe(Bi(this._renderCameraHolder$),Pa(([o,a])=>{a.setFrame(o)}),Ct(o=>o[1]),Ci(1),Bn()),this._renderCamera$=this._renderCameraFrame$.pipe(vn(o=>o.changed),Ci(1),Bn()),this._bearing$=this._renderCamera$.pipe(Ct(o=>{let a=this._spatial.radToDeg(this._spatial.azimuthalToBearing(o.rotation.phi));return this._spatial.wrap(a,0,360)}),Ci(1),Bn()),s.push(this._size$.pipe(Wu(1),Ct(o=>a=>(a.setSize(o),a))).subscribe(this._renderCameraOperation$)),s.push(this._renderMode$.pipe(Wu(1),Ct(o=>a=>(a.setRenderMode(o),a))).subscribe(this._renderCameraOperation$)),s.push(this._projectionMatrix$.pipe(Ct(o=>a=>(a.setProjectionMatrix(o),a))).subscribe(this._renderCameraOperation$)),s.push(this._bearing$.subscribe(()=>{})),s.push(this._renderCameraHolder$.subscribe(()=>{})),s.push(this._size$.subscribe(()=>{})),s.push(this._renderMode$.subscribe(()=>{})),s.push(this._renderCamera$.subscribe(()=>{})),s.push(this._renderCameraFrame$.subscribe(()=>{}))}get bearing$(){return this._bearing$}get element(){return this._element}get projectionMatrix$(){return this._projectionMatrix$}get renderCamera$(){return this._renderCamera$}get renderCameraFrame$(){return this._renderCameraFrame$}get renderMode$(){return this._renderMode$}get resize$(){return this._resize$}get size$(){return this._size$}dispose(){this._subscriptions.unsubscribe()}}class n6t{constructor(e){this._keyDown$=Ea(e,"keydown"),this._keyUp$=Ea(e,"keyup")}get keyDown$(){return this._keyDown$}get keyUp$(){return this._keyUp$}}const Qx=0,f6=2,i6t={[Qx]:1,[f6]:2};class s6t{constructor(e,r,n,i){this._subscriptions=new Hc;const s=this._subscriptions;this._activeSubject$=new uy(!1),this._active$=this._activeSubject$.pipe(qn(),Ci(1),Bn()),this._claimMouse$=new dn,this._claimWheel$=new dn,this._deferPixelClaims$=new dn,this._deferPixels$=this._deferPixelClaims$.pipe(Ja((f,m)=>(m.deferPixels==null?delete f[m.name]:f[m.name]=m.deferPixels,f),{}),Ct(f=>{let m=-1;for(const v in f){if(!f.hasOwnProperty(v))continue;const b=f[v];b>m&&(m=b)}return m}),po(-1),Ci(1),Bn()),s.push(this._deferPixels$.subscribe(()=>{})),this._documentMouseMove$=Ea(i,"pointermove").pipe(vn(this._isMousePen)),this._documentMouseUp$=Ea(i,"pointerup").pipe(vn(this._isMousePen)),this._mouseDown$=Ea(r,"pointerdown").pipe(vn(this._isMousePen)),this._mouseEnter$=Ea(r,"pointerenter").pipe(vn(this._isMousePen)),this._mouseLeave$=Ea(r,"pointerleave").pipe(vn(this._isMousePen)),this._mouseMove$=Ea(r,"pointermove").pipe(vn(this._isMousePen)),this._mouseUp$=Ea(r,"pointerup").pipe(vn(this._isMousePen)),this._mouseOut$=Ea(r,"pointerout").pipe(vn(this._isMousePen)),this._mouseOver$=Ea(r,"pointerover").pipe(vn(this._isMousePen)),this._domMouseDown$=Ea(n,"pointerdown").pipe(vn(this._isMousePen)),this._domMouseMove$=Ea(n,"pointermove").pipe(vn(this._isMousePen)),this._click$=Ea(r,"click"),this._contextMenu$=Ea(r,"contextmenu"),this._windowBlur$=Ea(window,"blur"),this._dblClick$=Vs(Ea(e,"click"),Ea(r,"dblclick")).pipe(sP(3,1),vn(f=>{const m=f[0],v=f[1],b=f[2];return m.type==="click"&&v.type==="click"&&b.type==="dblclick"&&m.target.parentNode===r&&v.target.parentNode===r}),Ct(f=>f[2]),js()),s.push(Vs(this._domMouseDown$,this._domMouseMove$,this._dblClick$,this._contextMenu$).subscribe(f=>{f.preventDefault()})),this._mouseWheel$=Vs(Ea(r,"wheel"),Ea(n,"wheel")).pipe(js()),this._consistentContextMenu$=Vs(this._mouseDown$,this._mouseMove$,this._mouseOut$,this._mouseUp$,this._contextMenu$).pipe(sP(3,1),vn(f=>f[0].type==="pointerdown"&&f[1].type==="contextmenu"&&f[2].type==="pointerup"),Ct(f=>f[1]),js());const o=Vs(this._windowBlur$,this._documentMouseMove$.pipe(vn(f=>this._buttonReleased(f,Qx))),this._documentMouseUp$.pipe(vn(f=>this._mouseButton(f)===Qx))).pipe(js()),a=this._createMouseDragInitiate$(Qx,this._mouseDown$,o,!0).pipe(js());this._mouseDragStart$=this._createMouseDragStart$(a).pipe(js()),this._mouseDrag$=this._createMouseDrag$(a,o).pipe(js()),this._mouseDragEnd$=this._createMouseDragEnd$(this._mouseDragStart$,o).pipe(js());const l=this._createMouseDragInitiate$(Qx,this._domMouseDown$,o,!1).pipe(js());this._domMouseDragStart$=this._createMouseDragStart$(l).pipe(js()),this._domMouseDrag$=this._createMouseDrag$(l,o).pipe(js()),this._domMouseDragEnd$=this._createMouseDragEnd$(this._domMouseDragStart$,o).pipe(js());const u=Vs(this._windowBlur$,this._documentMouseMove$.pipe(vn(f=>this._buttonReleased(f,f6))),this._documentMouseUp$.pipe(vn(f=>this._mouseButton(f)===f6))).pipe(js()),d=this._createMouseDragInitiate$(f6,this._mouseDown$,u,!0).pipe(js());this._mouseRightDragStart$=this._createMouseDragStart$(d).pipe(js()),this._mouseRightDrag$=this._createMouseDrag$(d,u).pipe(js()),this._mouseRightDragEnd$=this._createMouseDragEnd$(this._mouseRightDragStart$,u).pipe(js()),this._proximateClick$=this._mouseDown$.pipe(Yr(f=>this._click$.pipe(Qv(this._createDeferredMouseMove$(f,this._documentMouseMove$)),Pp(1))),js()),this._staticClick$=this._mouseDown$.pipe(Yr(()=>this._click$.pipe(Qv(this._documentMouseMove$),Pp(1))),js()),s.push(this._mouseDragStart$.subscribe()),s.push(this._mouseDrag$.subscribe()),s.push(this._mouseDragEnd$.subscribe()),s.push(this._domMouseDragStart$.subscribe()),s.push(this._domMouseDrag$.subscribe()),s.push(this._domMouseDragEnd$.subscribe()),s.push(this._mouseRightDragStart$.subscribe()),s.push(this._mouseRightDrag$.subscribe()),s.push(this._mouseRightDragEnd$.subscribe()),s.push(this._staticClick$.subscribe()),this._mouseOwner$=this._createOwner$(this._claimMouse$).pipe(Ci(1),Bn()),this._wheelOwner$=this._createOwner$(this._claimWheel$).pipe(Ci(1),Bn()),s.push(this._mouseOwner$.subscribe(()=>{})),s.push(this._wheelOwner$.subscribe(()=>{}))}get active$(){return this._active$}get activate$(){return this._activeSubject$}get documentMouseMove$(){return this._documentMouseMove$}get documentMouseUp$(){return this._documentMouseUp$}get domMouseDragStart$(){return this._domMouseDragStart$}get domMouseDrag$(){return this._domMouseDrag$}get domMouseDragEnd$(){return this._domMouseDragEnd$}get domMouseDown$(){return this._domMouseDown$}get domMouseMove$(){return this._domMouseMove$}get mouseOwner$(){return this._mouseOwner$}get mouseDown$(){return this._mouseDown$}get mouseEnter$(){return this._mouseEnter$}get mouseMove$(){return this._mouseMove$}get mouseLeave$(){return this._mouseLeave$}get mouseOut$(){return this._mouseOut$}get mouseOver$(){return this._mouseOver$}get mouseUp$(){return this._mouseUp$}get click$(){return this._click$}get dblClick$(){return this._dblClick$}get contextMenu$(){return this._consistentContextMenu$}get mouseWheel$(){return this._mouseWheel$}get mouseDragStart$(){return this._mouseDragStart$}get mouseDrag$(){return this._mouseDrag$}get mouseDragEnd$(){return this._mouseDragEnd$}get mouseRightDragStart$(){return this._mouseRightDragStart$}get mouseRightDrag$(){return this._mouseRightDrag$}get mouseRightDragEnd$(){return this._mouseRightDragEnd$}get proximateClick$(){return this._proximateClick$}get staticClick$(){return this._staticClick$}get windowBlur$(){return this._windowBlur$}dispose(){this._subscriptions.unsubscribe()}claimMouse(e,r){this._claimMouse$.next({name:e,zindex:r})}unclaimMouse(e){this._claimMouse$.next({name:e,zindex:null})}deferPixels(e,r){this._deferPixelClaims$.next({name:e,deferPixels:r})}undeferPixels(e){this._deferPixelClaims$.next({name:e,deferPixels:null})}claimWheel(e,r){this._claimWheel$.next({name:e,zindex:r})}unclaimWheel(e){this._claimWheel$.next({name:e,zindex:null})}filtered$(e,r){return this._filtered(e,r,this._mouseOwner$)}filteredWheel$(e,r){return this._filtered(e,r,this._wheelOwner$)}_createDeferredMouseMove$(e,r){return r.pipe(Ct(n=>{const i=n.clientX-e.clientX,s=n.clientY-e.clientY;return[n,Math.sqrt(i*i+s*s)]}),Bi(this._deferPixels$),vn(([[,n],i])=>n>i),Ct(([[n]])=>n))}_createMouseDrag$(e,r){return e.pipe(Ct(([,n])=>n),Yr(n=>zp(vi(n),this._documentMouseMove$).pipe(Qv(r))))}_createMouseDragEnd$(e,r){return e.pipe(Yr(()=>r.pipe(Qn())))}_createMouseDragStart$(e){return e.pipe(Ct(([r])=>r))}_createMouseDragInitiate$(e,r,n,i){return r.pipe(vn(s=>this._mouseButton(s)===e),Yr(s=>ei(vi(s),i?this._createDeferredMouseMove$(s,this._documentMouseMove$):this._documentMouseMove$).pipe(Qv(n),Pp(1))))}_createOwner$(e){return e.pipe(Ja((r,n)=>(n.zindex==null?delete r[n.name]:r[n.name]=n.zindex,r),{}),Ct(r=>{let n=null,i=-1;for(const s in r)r.hasOwnProperty(s)&&r[s]>i&&(i=r[s],n=s);return n}),po(null))}_filtered(e,r,n){return r.pipe(Bi(n),vn(([,i])=>i===e),Ct(([i])=>i))}_mouseButton(e){const r=e.type==="pointerdown"||e.type==="pointerup",n=window.InstallTrigger;return r&&typeof n<"u"&&e.button===f6&&e.ctrlKey&&window.navigator.platform.toUpperCase().indexOf("MAC")>=0?Qx:e.button}_buttonReleased(e,r){const n=i6t[r];return e.buttons===void 0||(e.buttons&n)!==n}_isMousePen(e){const r=e.pointerType;return r==="mouse"||r==="pen"}}class o6t{set json(e){this._json=e}set image(e){this._image=e,this._texture=new Tu(this._image),this._texture.minFilter=Uu}get loaded(){return!!(this._image&&this._json)}getGLSprite(e){if(!this.loaded)throw new Error("Sprites cannot be retrieved before the atlas is loaded.");let r=this._json[e];if(!r)return console.warn("Sprite with key"+e+"does not exist in sprite definition."),new xo;let n=this._texture.clone();n.needsUpdate=!0;let i=this._image.width,s=this._image.height;n.offset.x=r.x/i,n.offset.y=(s-r.y-r.height)/s,n.repeat.x=r.width/i,n.repeat.y=r.height/s;let o=new YJ({map:n});return new axe(o)}getDOMSprite(e,r){if(!this.loaded)throw new Error("Sprites cannot be retrieved before the atlas is loaded.");r==null&&(r=bl.Center);let n=this._json[e];if(!n)return console.warn("Sprite with key"+e+"does not exist in sprite definition."),Ar.h("div",{},[]);let i=n.y,s=n.x+n.width,o=n.y+n.height,a=n.x,l=-n.x,u=-n.y,d=this._image.height,f=this._image.width;switch(r){case bl.Bottom:case bl.Center:case bl.Top:l-=n.width/2;break;case bl.BottomLeft:case bl.Left:case bl.TopLeft:l-=n.width;break;case bl.BottomRight:case bl.Right:case bl.TopRight:}switch(r){case bl.Center:case bl.Left:case bl.Right:u-=n.height/2;break;case bl.Top:case bl.TopLeft:case bl.TopRight:u-=n.height;break;case bl.Bottom:case bl.BottomLeft:case bl.BottomRight:}let m=1/n.pixelRatio;i*=m,s*=m,o*=m,a*=m,l*=m,u*=m,d*=m,f*=m;let v={src:this._image.src,style:{clip:`rect(${i}px, ${s}px, ${o}px, ${a}px)`,height:`${d}px`,left:`${l}px`,position:"absolute",top:`${u}px`,width:`${f}px`}};return Ar.h("img",v,[])}}class a6t{constructor(e){if(this._retina=window.devicePixelRatio>1,this._spriteAtlasOperation$=new dn,this._spriteAtlas$=this._spriteAtlasOperation$.pipe(po(s=>s),Ja((s,o)=>o(s),new o6t),Ci(1),Bn()),this._atlasSubscription=this._spriteAtlas$.subscribe(()=>{}),e==null)return;let r=this._retina?"@2x":"",n=new XMLHttpRequest;n.open("GET",e+r+".png",!0),n.responseType="arraybuffer",n.onload=()=>{let s=new Image;s.onload=()=>{this._spriteAtlasOperation$.next(a=>(a.image=s,a))};let o=new Blob([n.response]);s.src=window.URL.createObjectURL(o)},n.onerror=s=>{console.error(new Error(`Failed to fetch sprite sheet (${e}${r}.png)`))},n.send();let i=new XMLHttpRequest;i.open("GET",e+r+".json",!0),i.responseType="text",i.onload=()=>{let s=JSON.parse(i.response);this._spriteAtlasOperation$.next(o=>(o.json=s,o))},i.onerror=s=>{console.error(new Error(`Failed to fetch sheet (${e}${r}.json)`))},i.send()}get spriteAtlas$(){return this._spriteAtlas$}dispose(){this._atlasSubscription.unsubscribe()}}class l6t{constructor(e,r){this._subscriptions=new Hc;const n=this._subscriptions;this._activeSubject$=new uy(!1),this._active$=this._activeSubject$.pipe(qn(),Ci(1),Bn()),n.push(Ea(r,"touchmove").subscribe(d=>{d.preventDefault()})),this._touchStart$=Ea(e,"touchstart"),this._touchMove$=Ea(e,"touchmove"),this._touchEnd$=Ea(e,"touchend"),this._touchCancel$=Ea(e,"touchcancel");const i=this._touchStart$.pipe(vn(d=>d.touches.length===1&&d.targetTouches.length===1),js());this._doubleTap$=i.pipe(T0t(()=>i.pipe(Qn(),Yr(()=>Vs(zJ(300),i).pipe(Pp(1))))),vn(d=>d.length===2),Ct(d=>d[d.length-1]),js()),n.push(this._doubleTap$.subscribe(d=>{d.preventDefault()})),this._singleTouchMove$=this._touchMove$.pipe(vn(d=>d.touches.length===1&&d.targetTouches.length===1),js());let s=Vs(this._touchStart$,this._touchEnd$,this._touchCancel$).pipe(vn(d=>d.touches.length===1&&d.targetTouches.length===1)),o=Vs(this._touchStart$,this._touchEnd$,this._touchCancel$).pipe(vn(d=>d.touches.length>=1)),a=Vs(this._touchEnd$,this._touchCancel$).pipe(vn(d=>d.touches.length===0));this._singleTouchDragStart$=s.pipe(Qi(()=>this._singleTouchMove$.pipe(Qv(Vs(a,o)),Pp(1)))),this._singleTouchDragEnd$=s.pipe(Qi(()=>Vs(a,o).pipe(Qn()))),this._singleTouchDrag$=s.pipe(Yr(()=>this._singleTouchMove$.pipe(Wu(1),Qv(Vs(o,a)))));let l=Vs(this._touchStart$,this._touchEnd$,this._touchCancel$);this._pinchStart$=l.pipe(vn(d=>d.touches.length===2&&d.targetTouches.length===2)),this._pinchEnd$=l.pipe(vn(d=>d.touches.length!==2||d.targetTouches.length!==2)),this._pinchOperation$=new dn,this._pinch$=this._pinchOperation$.pipe(Ja((d,f)=>f(d),{changeX:0,changeY:0,clientX:0,clientY:0,distance:0,distanceChange:0,distanceX:0,distanceY:0,originalEvent:null,pageX:0,pageY:0,screenX:0,screenY:0,touch1:null,touch2:null}));const u=this._touchMove$.pipe(vn(d=>d.touches.length===2&&d.targetTouches.length===2),Ct(d=>f=>{let m=d.touches[0],v=d.touches[1],b=Math.min(m.clientX,v.clientX),M=Math.max(m.clientX,v.clientX),O=Math.min(m.clientY,v.clientY),I=Math.max(m.clientY,v.clientY),A=b+(M-b)/2,j=O+(I-O)/2,H=A+m.pageX-m.clientX,W=j+m.pageY-m.clientY,re=A+m.screenX-m.clientX,K=j+m.screenY-m.clientY,pe=Math.abs(m.clientX-v.clientX),ge=Math.abs(m.clientY-v.clientY),fe=Math.sqrt(pe*pe+ge*ge),ee=fe-f.distance,be=pe-f.distanceX,le=ge-f.distanceY;return{changeX:be,changeY:le,clientX:A,clientY:j,distance:fe,distanceChange:ee,distanceX:pe,distanceY:ge,originalEvent:d,pageX:H,pageY:W,screenX:re,screenY:K,touch1:m,touch2:v}})).subscribe(this._pinchOperation$);n.push(u),this._pinchChange$=this._pinchStart$.pipe(Yr(()=>this._pinch$.pipe(Wu(1),Qv(this._pinchEnd$))))}get active$(){return this._active$}get activate$(){return this._activeSubject$}get doubleTap$(){return this._doubleTap$}get touchStart$(){return this._touchStart$}get touchMove$(){return this._touchMove$}get touchEnd$(){return this._touchEnd$}get touchCancel$(){return this._touchCancel$}get singleTouchDragStart$(){return this._singleTouchDragStart$}get singleTouchDrag$(){return this._singleTouchDrag$}get singleTouchDragEnd$(){return this._singleTouchDragEnd$}get pinch$(){return this._pinchChange$}get pinchStart$(){return this._pinchStart$}get pinchEnd$(){return this._pinchEnd$}dispose(){this._subscriptions.unsubscribe()}}class u6t{constructor(e){var r,n,i,s;const o=(n=(r=e==null?void 0:e.url)===null||r===void 0?void 0:r.exploreHost)!==null&&n!==void 0?n:"www.mapillary.com",l=`${(s=(i=e==null?void 0:e.url)===null||i===void 0?void 0:i.scheme)!==null&&s!==void 0?s:"https"}://${o}`;this._exploreUrl$=vi(l);const u=(e==null?void 0:e.imageTiling)!==!1;this._imageTiling$=vi(u)}get exploreUrl$(){return this._exploreUrl$}get imageTiling$(){return this._imageTiling$}}class c6t{constructor(e,r,n){var i;if(this._onWindowResize=()=>{this._trackResize&&this.renderService.resize$.next()},this._dom=n??new yK,typeof e.container=="string"){if(this._container=this._dom.document.getElementById(e.container),!this._container)throw new Error(`Container "${e.container}" not found.`)}else if(e.container instanceof HTMLElement)this._container=e.container;else throw new Error('Invalid type: "container" must be a String or HTMLElement.');this._trackResize=e.trackResize!==!1,this.id=(i=this._container.id)!==null&&i!==void 0?i:"mapillary-fallback-container-id",this._container.classList.add("mapillary-viewer"),this._canvasContainer=this._dom.createElement("div","mapillary-interactive",this._container),this._canvas=this._dom.createElement("canvas","mapillary-canvas"),this._canvas.style.position="absolute",this._canvas.setAttribute("tabindex","0"),this._domContainer=this._dom.createElement("div","mapillary-dom",this._container),this.configurationService=new u6t(e),this.renderService=new r6t(this._container,r.currentState$,e.renderMode),this.glRenderer=new e6t(this._canvas,this._canvasContainer,this.renderService),this.domRenderer=new Qbt(this._domContainer,this.renderService,r.currentState$),this.keyboardService=new n6t(this._canvasContainer),this.mouseService=new s6t(this._container,this._canvasContainer,this._domContainer,document),this.touchService=new l6t(this._canvasContainer,this._domContainer),this.spriteService=new a6t(e.sprite),window.addEventListener("resize",this._onWindowResize,!1)}get canvas(){return this._canvas.parentNode?this._canvas:null}get canvasContainer(){return this._canvasContainer}get container(){return this._container}get domContainer(){return this._domContainer}remove(){window.removeEventListener("resize",this._onWindowResize,!1),this.spriteService.dispose(),this.touchService.dispose(),this.mouseService.dispose(),this.glRenderer.remove(),this.domRenderer.remove(),this.renderService.dispose(),this._removeNode(this._canvasContainer),this._removeNode(this._domContainer),this._container.classList.remove("mapillary-viewer")}_removeNode(e){e.parentNode&&e.parentNode.removeChild(e)}}class h6t{constructor(e,r,n){this._graphService=e,this._stateService=r,this._api=n,this._subscriptions=new Hc,this._started=!1,this._cellDepth=1}get started(){return this._started}configure(e){if(!e){this._cellDepth=1;return}this._cellDepth=Math.max(1,Math.min(3,e.cellDepth))}start(){if(this._started)return;const e=this._subscriptions;e.push(this._stateService.currentState$.pipe(qn(void 0,r=>r.state.currentImage.id),Ct(r=>{const n=r.state,i=n.trajectory,s=i.map(a=>a.id),o=i[i.length-1].sequenceId;return[s,n.currentImage.originalLngLat,o]}),sP(1,5),Bi(this._graphService.graphMode$),Yr(([r,n])=>{const i=r[0][0],s=r[0][1],o=this._api.data.geometry,a=o.lngLatToCellId(s),l=Mq(a,this._cellDepth,o),u=n===hd.Sequence?r[0][2]:void 0;return this._graphService.uncache$(i,l,u)})).subscribe(()=>{})),e.push(this._graphService.graphMode$.pipe(Wu(1),Bi(this._stateService.currentState$),Yr(([r,n])=>r===hd.Sequence?this._keyToEdges(n.state.currentImage.id,i=>i.sequenceEdges$):Na(n.state.trajectory.map(i=>i.id).slice(n.state.currentIndex)).pipe(Qi(i=>this._keyToEdges(i,s=>s.spatialEdges$),6)))).subscribe(()=>{})),e.push(this._graphService.dataAdded$.pipe(Bi(this._stateService.currentId$),Yr(([r,n])=>this._graphService.cacheImage$(n))).subscribe(()=>{})),this._started=!0}stop(){this._started&&(this._subscriptions.unsubscribe(),this._started=!1)}_keyToEdges(e,r){return this._graphService.cacheImage$(e).pipe(Yr(r),Qn(n=>n.cached),sq(15e3),Vo(n=>(console.error(`Failed to cache edges (${e}).`,n),Pi())))}}class d6t{constructor(){this._loadersSubject$=new dn,this._loaders$=this._loadersSubject$.pipe(Ja((e,r)=>(r.task!==void 0&&(e[r.task]=r.loading),e),{}),po({}),Ci(1),Bn())}get loading$(){return this._loaders$.pipe(Ct(e=>{for(const r in e)if(e.hasOwnProperty(r)&&e[r])return!0;return!1}),rS(100),qn())}taskLoading$(e){return this._loaders$.pipe(Ct(r=>!!r[e]),rS(100),qn())}startLoading(e){this._loadersSubject$.next({loading:!0,task:e})}stopLoading(e){this._loadersSubject$.next({loading:!1,task:e})}}var pp;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled",t[t.Started=2]="Started"})(pp||(pp={}));class f6t{constructor(e,r,n,i,s,o){this._subscriptions=new Hc,this._graphService=e,this._stateService=r,this._graphCalculator=i??new oK,this._spatial=s??new Uc,this._viewportCoords=o??new Nh,this._mode=n!==!1?pp.Enabled:pp.Disabled,this._panImagesSubject$=new dn,this._panImages$=this._panImagesSubject$.pipe(po([]),Ci(1),Bn()),this._subscriptions.push(this._panImages$.subscribe())}get panImages$(){return this._panImages$}dispose(){this.stop(),this._panImagesSubscription!=null&&this._panImagesSubscription.unsubscribe(),this._subscriptions.unsubscribe()}enable(){this._mode===pp.Disabled&&(this._mode=pp.Enabled,this.start())}disable(){this._mode!==pp.Disabled&&(this.stop(),this._mode=pp.Disabled)}start(){if(this._mode!==pp.Enabled)return;const e=this._stateService.currentImage$.pipe(Yr(r=>{if(!r.merged||Li(r.cameraType))return vi([]);const n=vi(r),i=this._graphCalculator.boundingBoxCorners(r.lngLat,20),s=this._graphService.cacheBoundingBox$(i[0],i[1]).pipe(Vo(o=>(console.error(`Failed to cache periphery bounding box (${r.id})`,o),Pi())),Ct(o=>{if(Li(r.cameraType))return[];const a=[];for(const l of o)l.id!==r.id&&l.mergeId===r.mergeId&&(Li(l.cameraType)||this._distance(l,r)>4||a.push(l));return a}));return ei(n,s).pipe(Bi(this._stateService.reference$),Ct(([[o,a],l])=>{const u=this._spatial.viewingDirection(o.rotation),d=mP({lat:o.lngLat.lat,lng:o.lngLat.lng,alt:o.computedAltitude},o.rotation,l),f=this._createTransform(o,d),m=this._spatial.wrap(this._spatial.azimuthal(u.toArray(),f.upVector().toArray()),0,2*Math.PI),v=this._computeProjectedPoints(f),b=this._computeHorizontalFov(v)/180*Math.PI,M=Math.PI/8;let O,I;for(const j of a){const H=mP({lat:j.lngLat.lat,lng:j.lngLat.lng,alt:j.computedAltitude},j.rotation,l),W=this._createTransform(j,H),re=this._computeProjectedPoints(W),K=this._computeHorizontalFov(re)/180*Math.PI,pe=this._spatial.viewingDirection(j.rotation),ge=this._spatial.wrap(this._spatial.azimuthal(pe.toArray(),W.upVector().toArray()),0,2*Math.PI),fe=this._spatial.angleBetweenVector2(u.x,u.y,pe.x,pe.y);let ee=Number.NEGATIVE_INFINITY;fe>0?m>ge?ee=m-2*Math.PI+b/2-(ge-K/2):ee=m+b/2-(ge-K/2):m0?-2*be:0,He=le+ve+Pe+Fe+We;ee>0&&ee<.5*b&&ee<.5*K&&be>.5*b&&(fe>0?O?Her.state.imagesAhead>0),qn(),Yr(r=>r?vi([]):e)).subscribe(r=>{this._panImagesSubject$.next(r)}),this._mode=pp.Started}stop(){this._mode===pp.Started&&(this._panImagesSubscription.unsubscribe(),this._panImagesSubject$.next([]),this._mode=pp.Enabled)}_distance(e,r){const[n,i,s]=cd(e.lngLat.lng,e.lngLat.lat,e.computedAltitude,r.lngLat.lng,r.lngLat.lat,r.computedAltitude);return Math.sqrt(n*n+i*i+s*s)}_timeDifference(e,r){return Math.abs(e.capturedAt-r.capturedAt)/2592e6}_createTransform(e,r){return new tw(e.exifOrientation,e.width,e.height,e.scale,e.rotation,r,e.assetsCached?e.image:void 0,void 0,e.cameraParameters,e.cameraType)}_computeProjectedPoints(e){return aK(e,[[1,0]],[[0,.5]],20,this._viewportCoords)}_computeHorizontalFov(e){const r=e.map(i=>this._coordToFov(i[0]));return Math.min(...r)}_coordToFov(e){return 2*Math.atan(e)*180/Math.PI}}class _le{constructor(e){this._data=e}get data(){return this._data}getCoreImages$(e){return this._wrap$(this._data.getCoreImages(e))}getImages$(e){return this._wrap$(this._data.getImages(e))}getImageTiles$(e){return this._wrap$(this._data.getImageTiles(e))}getSequence$(e){return this._wrap$(this._data.getSequence(e))}getSpatialImages$(e){return this._wrap$(this._data.getSpatialImages(e))}setAccessToken(e){this._data.setAccessToken(e)}_wrap$(e){return va.create(r=>{e.then(n=>{r.next(n),r.complete()},n=>{r.error(n)})})}}class p6t{constructor(e){this._dataAdded$=new dn,this._subscriptions=new Hc,this._onDataAdded=n=>{this._graph$.pipe(Qn(),Qi(i=>i.updateCells$(n.cellIds).pipe(Pa(()=>{i.resetSpatialEdges()})))).subscribe(i=>{this._dataAdded$.next(i)})};const r=this._subscriptions;this._graph$=zp(vi(e),e.changed$).pipe(Ci(1),Bn()),r.push(this._graph$.subscribe(()=>{})),this._graphMode=hd.Spatial,this._graphModeSubject$=new dn,this._graphMode$=this._graphModeSubject$.pipe(po(this._graphMode),Ci(1),Bn()),r.push(this._graphMode$.subscribe(()=>{})),this._firstGraphSubjects$=[],this._initializeCacheSubscriptions=[],this._sequenceSubscriptions=[],this._spatialSubscriptions=[],e.api.data.on("datacreate",this._onDataAdded)}get dataAdded$(){return this._dataAdded$}get filter$(){return this._graph$.pipe(Qn(),Qi(e=>e.filter$))}get graphMode$(){return this._graphMode$}cacheBoundingBox$(e,r){return this._graph$.pipe(Qn(),Qi(n=>n.cacheBoundingBox$(e,r)))}cacheCell$(e){return this._graph$.pipe(Qn(),Qi(r=>r.cacheCell$(e)))}cacheImage$(e){const r=new dn;this._firstGraphSubjects$.push(r);const n=r.pipe(Ci(1),Bn()),i=n.pipe(Ct(l=>l.getNode(e)),Qi(l=>l.assetsCached?vi(l):l.cacheAssets$()),Ci(1),Bn());i.subscribe(void 0,l=>{console.error(`Failed to cache image (${e}).`,l)});let s;s=this._graph$.pipe(Qn(),Qi(l=>l.isCachingFull(e)||!l.hasNode(e)?l.cacheFull$(e):l.isCachingFill(e)||!l.getNode(e).complete?l.cacheFill$(e):vi(l)),Pa(l=>{if(!l.hasNode(e))throw new la(`Failed to cache image (${e})`);l.hasInitializedCache(e)||l.initializeCache(e)}),Fd(()=>{s!=null&&(this._removeFromArray(s,this._initializeCacheSubscriptions),this._removeFromArray(r,this._firstGraphSubjects$))})).subscribe(l=>{r.next(l),r.complete()},l=>{r.error(l)}),s.closed||this._initializeCacheSubscriptions.push(s);const o=n.pipe(Vo(()=>Pi()),Qi(l=>l.isCachingNodeSequence(e)||!l.hasNodeSequence(e)?l.cacheNodeSequence$(e):vi(l)),Ci(1),Bn());let a;if(a=o.pipe(Pa(l=>{l.getNode(e).sequenceEdges.cached||l.cacheSequenceEdges(e)}),Fd(()=>{a!=null&&this._removeFromArray(a,this._sequenceSubscriptions)})).subscribe(()=>{},l=>{console.error(`Failed to cache sequence edges (${e}).`,l)}),a.closed||this._sequenceSubscriptions.push(a),this._graphMode===hd.Spatial){let l;l=n.pipe(Vo(()=>Pi()),S9e(u=>u.hasTiles(e)?Pi():Na(u.cacheTiles$(e)).pipe(Qi(d=>d.pipe(Qi(f=>f.isCachingTiles(e)?Pi():vi(f)),Vo(f=>(console.error(`Failed to cache tile data (${e}).`,f),Pi())))))),oq(1),Qi(u=>u.hasSpatialArea(e)?vi(u):Na(u.cacheSpatialArea$(e)).pipe(Qi(d=>d.pipe(Vo(f=>(console.error(`Failed to cache spatial images (${e}).`,f),Pi())))))),oq(1),Qi(u=>u.hasNodeSequence(e)?vi(u):u.cacheNodeSequence$(e)),Pa(u=>{u.getNode(e).spatialEdges.cached||u.cacheSpatialEdges(e)}),Fd(()=>{l!=null&&this._removeFromArray(l,this._spatialSubscriptions)})).subscribe(()=>{},u=>{const d=`Failed to cache spatial edges (${e}).`;console.error(d,u)}),l.closed||this._spatialSubscriptions.push(l)}return i.pipe(Qn(l=>l.assetsCached))}cacheSequence$(e){return this._graph$.pipe(Qn(),Qi(r=>r.isCachingSequence(e)||!r.hasSequence(e)?r.cacheSequence$(e):vi(r)),Ct(r=>r.getSequence(e)))}cacheSequenceImages$(e,r){return this._graph$.pipe(Qn(),Qi(n=>n.isCachingSequence(e)||!n.hasSequence(e)?n.cacheSequence$(e):vi(n)),Qi(n=>n.isCachingSequenceNodes(e)||!n.hasSequenceNodes(e)?n.cacheSequenceNodes$(e,r):vi(n)),Ct(n=>n.getSequence(e)))}dispose(){this._graph$.pipe(Qn()).subscribe(e=>{e.unsubscribe()}),this._subscriptions.unsubscribe()}setFilter$(e){return this._resetSubscriptions(this._spatialSubscriptions),this._graph$.pipe(Qn(),Pa(r=>{r.resetSpatialEdges(),r.setFilter(e)}),Ct(()=>{}))}setGraphMode(e){this._graphMode!==e&&(e===hd.Sequence&&this._resetSubscriptions(this._spatialSubscriptions),this._graphMode=e,this._graphModeSubject$.next(this._graphMode))}reset$(e){return this._abortSubjects(this._firstGraphSubjects$),this._resetSubscriptions(this._initializeCacheSubscriptions),this._resetSubscriptions(this._sequenceSubscriptions),this._resetSubscriptions(this._spatialSubscriptions),this._graph$.pipe(Qn(),Pa(r=>{r.reset(e)}),Ct(()=>{}))}uncache$(e,r,n){return this._graph$.pipe(Qn(),Pa(i=>{i.uncache(e,r,n)}),Ct(()=>{}))}_abortSubjects(e){for(const r of e.slice())this._removeFromArray(r,e),r.error(new Error("Cache image request was aborted."))}_removeFromArray(e,r){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}_resetSubscriptions(e){for(const r of e.slice())this._removeFromArray(r,e),r.closed||r.unsubscribe()}}class m6t{constructor(e){e.requestAnimationFrame?(this._cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this._requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this._cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this._cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this._cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this._cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this._cancelAnimationFrame=e.clearTimeout.bind(e),this._requestAnimationFrame=r=>e.setTimeout(r,1e3/60))}get cancelAnimationFrame(){return this._cancelAnimationFrame}get requestAnimationFrame(){return this._requestAnimationFrame}}class QO{constructor(e){this._spatial=new Uc,this._referenceThreshold=.01,this._transitionMode=e.transitionMode,this._reference=e.reference,this._alpha=e.alpha,this._stateTransitionAlpha=0,this._camera=e.camera.clone(),this._zoom=e.zoom,this._currentIndex=e.currentIndex,this._trajectory=e.trajectory.slice(),this._trajectoryTransforms=[],this._trajectoryCameras=[];for(let r of this._trajectory){let n=this._imageToTranslation(r,this._reference),i=new tw(r.exifOrientation,r.width,r.height,r.scale,r.rotation,n,r.image,void 0,r.cameraParameters,r.cameraType);this._trajectoryTransforms.push(i),this._trajectoryCameras.push(new e2(i))}this._currentImage=this._trajectory.length>0?this._trajectory[this._currentIndex]:null,this._previousImage=this._trajectory.length>1&&this.currentIndex>0?this._trajectory[this._currentIndex-1]:null,this._currentCamera=this._trajectoryCameras.length>0?this._trajectoryCameras[this._currentIndex].clone():new e2,this._previousCamera=this._trajectoryCameras.length>1&&this.currentIndex>0?this._trajectoryCameras[this._currentIndex-1].clone():this._currentCamera.clone()}get reference(){return this._reference}get alpha(){return this._getAlpha()}get stateTransitionAlpha(){return this._getStateTransitionAlpha()}get camera(){return this._camera}get zoom(){return this._zoom}get trajectory(){return this._trajectory}get currentIndex(){return this._currentIndex}get currentImage(){return this._currentImage}get previousImage(){return this._previousImage}get currentCamera(){return this._currentCamera}get currentTransform(){return this._trajectoryTransforms.length>0?this._trajectoryTransforms[this.currentIndex]:null}get previousTransform(){return this._trajectoryTransforms.length>1&&this.currentIndex>0?this._trajectoryTransforms[this.currentIndex-1]:null}get motionless(){return this._motionless}get transitionMode(){return this._transitionMode}move(e){}moveTo(e){}rotate(e){}rotateUnbounded(e){}rotateWithoutInertia(e){}rotateBasic(e){}rotateBasicUnbounded(e){}rotateBasicWithoutInertia(e){}rotateToBasic(e){}setSpeed(e){}zoomIn(e,r){}update(e){}setCenter(e){}setZoom(e){}dolly(e){}orbit(e){}setViewMatrix(e){}truck(e){}append(e){if(e.length<1)throw Error("Trajectory can not be empty");this._currentIndex<0?this.set(e):(this._trajectory=this._trajectory.concat(e),this._appendToTrajectories(e))}prepend(e){if(e.length<1)throw Error("Trajectory can not be empty");this._trajectory=e.slice().concat(this._trajectory),this._currentIndex+=e.length,this._setCurrentImage(),this._setReference(this._currentImage)?this._setTrajectories():this._prependToTrajectories(e),this._setCurrentCamera()}remove(e){if(e<0)throw Error("n must be a positive integer");if(this._currentIndex-10&&this.remove(this._currentIndex-1)}clear(){this.cut(),this._currentIndex>0&&this.remove(this._currentIndex-1)}cut(){for(;this._trajectory.length-1>this._currentIndex;)this._trajectory.pop(),this._trajectoryTransforms.pop(),this._trajectoryCameras.pop()}set(e){this._setTrajectory(e),this._setCurrentImage(),this._setReference(this._currentImage),this._setTrajectories(),this._setCurrentCamera()}getCenter(){return this._currentImage!=null?this.currentTransform.projectBasic(this._camera.lookat.toArray()):[.5,.5]}setTransitionMode(e){this._transitionMode=e}_getAlpha(){return 1}_getStateTransitionAlpha(){return 1}_setCurrent(){this._setCurrentImage(),this._setReference(this._currentImage)&&this._setTrajectories(),this._setCurrentCamera()}_setCurrentCamera(){this._currentCamera=this._trajectoryCameras[this._currentIndex].clone(),this._previousCamera=this._currentIndex>0?this._trajectoryCameras[this._currentIndex-1].clone():this._currentCamera.clone()}_motionlessTransition(){return this._currentImage!=null&&this._previousImage!=null&&(this._transitionMode===MP.Instantaneous||!(this._currentImage.merged&&this._previousImage.merged&&this._withinOriginalDistance()&&this._sameConnectedComponent()))}_setReference(e){return Math.abs(e.lngLat.lat-this.reference.lat)0?this._trajectory[this._currentIndex]:null,this._previousImage=this._currentIndex>0?this._trajectory[this._currentIndex-1]:null}_setTrajectory(e){if(e.length<1)throw new Pd("Trajectory can not be empty");this._currentImage!=null?(this._trajectory=[this._currentImage].concat(e),this._currentIndex=1):(this._trajectory=e.slice(),this._currentIndex=0)}_setTrajectories(){this._trajectoryTransforms.length=0,this._trajectoryCameras.length=0,this._appendToTrajectories(this._trajectory)}_appendToTrajectories(e){for(let r of e){if(!r.assetsCached)throw new Pd("Assets must be cached when image is added to trajectory");let n=this._imageToTranslation(r,this.reference),i=new tw(r.exifOrientation,r.width,r.height,r.scale,r.rotation,n,r.image,void 0,r.cameraParameters,r.cameraType);this._trajectoryTransforms.push(i),this._trajectoryCameras.push(new e2(i))}}_prependToTrajectories(e){for(let r of e.reverse()){if(!r.assetsCached)throw new Pd("Assets must be cached when added to trajectory");let n=this._imageToTranslation(r,this.reference),i=new tw(r.exifOrientation,r.width,r.height,r.scale,r.rotation,n,r.image,void 0,r.cameraParameters,r.cameraType);this._trajectoryTransforms.unshift(i),this._trajectoryCameras.unshift(new e2(i))}}_imageToTranslation(e,r){return mP({alt:e.computedAltitude,lat:e.lngLat.lat,lng:e.lngLat.lng},e.rotation,r)}_sameConnectedComponent(){let e=this._currentImage,r=this._previousImage;return!!e&&!!r&&e.mergeId===r.mergeId}_withinOriginalDistance(){let e=this._currentImage,r=this._previousImage;return!e||!r?!0:this._spatial.distanceFromLngLat(e.originalLngLat.lng,e.originalLngLat.lat,r.originalLngLat.lng,r.originalLngLat.lat)<25}}class xle extends QO{constructor(e){super(e)}setViewMatrix(e){const n=new Ri().fromArray(e).invert().elements,i=new st(n[12],n[13],n[14]),s=new st(-n[8],-n[9],-n[10]),o=new st(n[4],n[5],n[6]),a=this._camera;a.position.copy(i),a.lookat.copy(i.clone().add(s)),a.up.copy(o);const l=.5/Math.tan(Math.PI/3);a.focal=l}}class wle extends QO{constructor(e){super(e),this._transition=0;const r=this._camera.position.clone(),n=this._camera.lookat.clone().sub(r).normalize(),i=Math.sqrt(n.x*n.x+n.y*n.y),s=Math.atan2(n.z,i),o=new st;if(s>-Math.PI/45)o.copy(r),r.add(new st(n.x,n.y,0).multiplyScalar(-50)),r.z=30;else{const j=r.clone(),H=new st(0,0,1),W=new st(0,0,-2),re=new st().subVectors(W,j).dot(H)/n.dot(H),pe=j.clone().add(n.clone().multiplyScalar(Math.min(1e4,re)));o.copy(pe);const ge=r.clone().sub(pe).normalize();r.copy(pe.add(ge.multiplyScalar(Math.max(50,ge.length()))))}const a=this._camera.position.clone(),l=a.clone().add(n.clone().normalize().multiplyScalar(10)),u=this._camera.up.clone(),d=l.clone(),f=d.clone().add(n.clone().normalize().multiplyScalar(10)),m=u.clone(),v=r.clone(),b=o.clone(),M=new st(0,0,1),O=r.clone().add(b.clone().sub(v).normalize().multiplyScalar(-10)),I=b.clone(),A=M.clone();this._curveE=new K6([d,a,v,O]),this._curveL=new K6([f,l,b,I]),this._curveU=new K6([m,u,M,A]),this._zoom0=this._zoom,this._zoom1=0,this._camera.focal=.5/Math.tan(Math.PI/4)}get _isTransitioning(){return this._transition<1}dolly(e){if(this._isTransitioning)return;const r=this._camera,n=r.position.clone().sub(r.lookat),s=n.length()*Math.pow(2,-e),o=Math.max(1,Math.min(s,4e3));n.normalize(),n.multiplyScalar(o),r.position.copy(r.lookat).add(n)}orbit(e){if(this._isTransitioning)return;const r=this._camera,n=new jc().setFromUnitVectors(r.up,new st(0,0,1)),i=n.clone().invert(),s=r.position.clone().sub(r.lookat);s.applyQuaternion(n);const o=s.length();let a=Math.atan2(s.y,s.x);a+=e.phi;let l=Math.atan2(Math.sqrt(s.x*s.x+s.y*s.y),s.z);l+=e.theta;const u=Math.PI/36;l=Math.max(u,Math.min(Math.PI/2-u,l)),s.x=Math.sin(l)*Math.cos(a),s.y=Math.sin(l)*Math.sin(a),s.z=Math.cos(l),s.applyQuaternion(i),r.position.copy(r.lookat).add(s.multiplyScalar(o))}truck(e){if(this._isTransitioning)return;const r=this._camera;r.position.add(new st().fromArray(e)),r.lookat.add(new st().fromArray(e))}update(e){if(!this._isTransitioning)return;this._transition=Math.min(this._transition+2*e/3,1);const r=Lw.smootherstep(this._transition,0,1),n=(r+1)/3,i=this._curveE.getPoint(n),s=this._curveL.getPoint(n),o=this._curveU.getPoint(n);this._camera.position.copy(i),this._camera.lookat.copy(s),this._camera.up.copy(o),this._zoom=Lw.lerp(this._zoom0,this._zoom1,r),this._stateTransitionAlpha=r}_getStateTransitionAlpha(){return this._stateTransitionAlpha}}class ble{constructor(e,r){this._phi=e,this._theta=r}get phi(){return this._phi}set phi(e){this._phi=e}get theta(){return this._theta}set theta(e){this._theta=e}get isZero(){return this._phi===0&&this._theta===0}copy(e){this._phi=e.phi,this._theta=e.theta}lerp(e,r){this._phi=(1-r)*this._phi+r*e.phi,this._theta=(1-r)*this._theta+r*e.theta}multiply(e){this._phi*=e,this._theta*=e}threshold(e){this._phi=Math.abs(this._phi)>e?this._phi:0,this._theta=Math.abs(this._theta)>e?this._theta:0}lengthSquared(){return this._phi*this._phi+this._theta*this._theta}reset(){this._phi=0,this._theta=0}}class pwe extends QO{constructor(e){super(e),this._animationSpeed=1/40,this._rotationDelta=new ble(0,0),this._requestedRotationDelta=null,this._basicRotation=[0,0],this._requestedBasicRotation=null,this._requestedBasicRotationUnbounded=null,this._rotationAcceleration=.86,this._rotationIncreaseAlpha=.97,this._rotationDecreaseAlpha=.9,this._rotationThreshold=.001,this._unboundedRotationAlpha=.8,this._desiredZoom=e.zoom,this._minZoom=0,this._maxZoom=3,this._lookatDepth=10,this._desiredLookat=null,this._desiredCenter=null}rotate(e){this._currentImage!=null&&(e.phi===0&&e.theta===0||(this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedBasicRotation=null,this._requestedRotationDelta!=null?(this._requestedRotationDelta.phi=this._requestedRotationDelta.phi+e.phi,this._requestedRotationDelta.theta=this._requestedRotationDelta.theta+e.theta):this._requestedRotationDelta=new ble(e.phi,e.theta)))}rotateUnbounded(e){if(this._currentImage==null||(this._requestedBasicRotation=null,this._requestedRotationDelta=null,this._applyRotation(e,this._currentCamera),this._applyRotation(e,this._previousCamera),!this._desiredLookat))return;const r=new jc().setFromUnitVectors(this._currentCamera.up,new st(0,0,1)),n=r.clone().invert(),i=new st().copy(this._desiredLookat).sub(this._camera.position).applyQuaternion(r),s=i.length();let o=Math.atan2(i.y,i.x);o+=e.phi;let a=Math.atan2(Math.sqrt(i.x*i.x+i.y*i.y),i.z);a+=e.theta,a=Math.max(.1,Math.min(Math.PI-.1,a)),i.x=Math.sin(a)*Math.cos(o),i.y=Math.sin(a)*Math.sin(o),i.z=Math.cos(a),i.applyQuaternion(n),this._desiredLookat.copy(this._camera.position).add(i.multiplyScalar(s))}rotateWithoutInertia(e){if(this._currentImage==null)return;this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedBasicRotation=null,this._requestedRotationDelta=null;const r=Math.PI/(10*Math.pow(2,this._zoom)),n={phi:this._spatial.clamp(e.phi,-r,r),theta:this._spatial.clamp(e.theta,-r,r)};this._applyRotation(n,this._currentCamera),this._applyRotation(n,this._previousCamera)}rotateBasic(e){if(this._currentImage!=null)if(this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation!=null){this._requestedBasicRotation[0]+=e[0],this._requestedBasicRotation[1]+=e[1];let r=.05/Math.pow(2,this._zoom);this._requestedBasicRotation[0]=this._spatial.clamp(this._requestedBasicRotation[0],-r,r),this._requestedBasicRotation[1]=this._spatial.clamp(this._requestedBasicRotation[1],-r,r)}else this._requestedBasicRotation=e.slice()}rotateBasicUnbounded(e){this._currentImage!=null&&(this._requestedBasicRotationUnbounded!=null?(this._requestedBasicRotationUnbounded[0]+=e[0],this._requestedBasicRotationUnbounded[1]+=e[1]):this._requestedBasicRotationUnbounded=e.slice())}rotateBasicWithoutInertia(e){if(this._currentImage==null)return;this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null;const r=.05/Math.pow(2,this._zoom),n=e.slice();n[0]=this._spatial.clamp(n[0],-r,r),n[1]=this._spatial.clamp(n[1],-r,r),this._applyRotationBasic(n)}rotateToBasic(e){if(this._currentImage==null)return;this._desiredZoom=this._zoom,this._desiredLookat=null,e[0]=this._spatial.clamp(e[0],0,1),e[1]=this._spatial.clamp(e[1],0,1);let r=this.currentTransform.unprojectBasic(e,this._lookatDepth);this._currentCamera.lookat.fromArray(r)}zoomIn(e,r){if(this._currentImage==null)return;this._desiredZoom=Math.max(this._minZoom,Math.min(this._maxZoom,this._desiredZoom+e));let n=this.currentTransform.projectBasic(this._currentCamera.lookat.toArray()),i=n[0],s=n[1],o=Math.pow(2,this._zoom),a=Math.pow(2,this._desiredZoom),l=r[0],u=r[1];Li(this.currentTransform.cameraType)&&(l-i>.5?l=l-1:i-l>.5&&(l=1+l));let d=l-o/a*(l-i),f=u-o/a*(u-s);Li(this._currentImage.cameraType)?(d=this._spatial.wrap(d+this._basicRotation[0],0,1),f=this._spatial.clamp(f+this._basicRotation[1],.05,.95)):(d=this._spatial.clamp(d,0,1),f=this._spatial.clamp(f,0,1)),this._desiredLookat=new st().fromArray(this.currentTransform.unprojectBasic([d,f],this._lookatDepth))}setCenter(e){this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null,this._desiredZoom=this._zoom;let r=[this._spatial.clamp(e[0],0,1),this._spatial.clamp(e[1],0,1)];if(this._currentImage==null){this._desiredCenter=r;return}this._desiredCenter=null;let n=new st().fromArray(this.currentTransform.unprojectBasic(r,this._lookatDepth)),i=this.previousTransform!=null?this.previousTransform:this.currentTransform,s=new st().fromArray(i.unprojectBasic(r,this._lookatDepth));this._currentCamera.lookat.copy(n),this._previousCamera.lookat.copy(s)}setZoom(e){this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null,this._zoom=this._spatial.clamp(e,this._minZoom,this._maxZoom),this._desiredZoom=this._zoom}_applyRotation(e,r){if(r==null)return;let n=new jc().setFromUnitVectors(r.up,new st(0,0,1)),i=n.clone().invert(),s=new st;s.copy(r.lookat).sub(r.position),s.applyQuaternion(n);let o=s.length(),a=Math.atan2(s.y,s.x);a+=e.phi;let l=Math.atan2(Math.sqrt(s.x*s.x+s.y*s.y),s.z);l+=e.theta,l=Math.max(.1,Math.min(Math.PI-.1,l)),s.x=Math.sin(l)*Math.cos(a),s.y=Math.sin(l)*Math.sin(a),s.z=Math.cos(l),s.applyQuaternion(i),r.lookat.copy(r.position).add(s.multiplyScalar(o))}_applyRotationBasic(e){let r=this._currentImage,n=this._previousImage!=null?this.previousImage:this.currentImage,i=this._currentCamera,s=this._previousCamera,o=this.currentTransform,a=this.previousTransform!=null?this.previousTransform:this.currentTransform,l=o.projectBasic(i.lookat.toArray()),u=a.projectBasic(s.lookat.toArray());Li(r.cameraType)?(l[0]=this._spatial.wrap(l[0]+e[0],0,1),l[1]=this._spatial.clamp(l[1]+e[1],.05,.95)):(l[0]=this._spatial.clamp(l[0]+e[0],0,1),l[1]=this._spatial.clamp(l[1]+e[1],0,1)),Li(n.cameraType)?(u[0]=this._spatial.wrap(u[0]+e[0],0,1),u[1]=this._spatial.clamp(u[1]+e[1],.05,.95)):(u[0]=this._spatial.clamp(u[0]+e[0],0,1),u[1]=this._spatial.clamp(l[1]+e[1],0,1));let d=o.unprojectBasic(l,this._lookatDepth);i.lookat.fromArray(d);let f=a.unprojectBasic(u,this._lookatDepth);s.lookat.fromArray(f)}_updateZoom(e){let r=this._desiredZoom-this._zoom,n=r>0?1:r<0?-1:0;r!==0&&(Math.abs(r)<.002?(this._zoom=this._desiredZoom,this._desiredLookat!=null&&(this._desiredLookat=null)):this._zoom+=n*Math.max(Math.abs(5*e*r),.002))}_updateLookat(e){if(this._desiredLookat===null)return;let r=this._desiredLookat.distanceToSquared(this._currentCamera.lookat);Math.abs(r)<1e-6?(this._currentCamera.lookat.copy(this._desiredLookat),this._desiredLookat=null):this._currentCamera.lookat.lerp(this._desiredLookat,5*e)}_updateRotation(){if(this._requestedRotationDelta!=null){let r=this._rotationDelta.lengthSquared();this._requestedRotationDelta.lengthSquared()>r?this._rotationDelta.lerp(this._requestedRotationDelta,this._rotationIncreaseAlpha):this._rotationDelta.lerp(this._requestedRotationDelta,this._rotationDecreaseAlpha),this._requestedRotationDelta=null;return}if(this._rotationDelta.isZero)return;const e=Li(this.currentImage.cameraType)?1:this._alpha;this._rotationDelta.multiply(this._rotationAcceleration*e),this._rotationDelta.threshold(this._rotationThreshold)}_updateRotationBasic(){if(this._requestedBasicRotation!=null){let e=this._basicRotation[0],r=this._basicRotation[1],n=this._requestedBasicRotation[0],i=this._requestedBasicRotation[1];Math.abs(n)>Math.abs(e)?this._basicRotation[0]=(1-this._rotationIncreaseAlpha)*e+this._rotationIncreaseAlpha*n:this._basicRotation[0]=(1-this._rotationDecreaseAlpha)*e+this._rotationDecreaseAlpha*n,Math.abs(i)>Math.abs(r)?this._basicRotation[1]=(1-this._rotationIncreaseAlpha)*r+this._rotationIncreaseAlpha*i:this._basicRotation[1]=(1-this._rotationDecreaseAlpha)*r+this._rotationDecreaseAlpha*i,this._requestedBasicRotation=null;return}if(this._requestedBasicRotationUnbounded!=null){let e=this._requestedBasicRotationUnbounded[0],r=this._requestedBasicRotationUnbounded[1];if(Math.abs(e)>0&&(this._basicRotation[0]=(1-this._unboundedRotationAlpha)*this._basicRotation[0]+this._unboundedRotationAlpha*e),Math.abs(r)>0&&(this._basicRotation[1]=(1-this._unboundedRotationAlpha)*this._basicRotation[1]+this._unboundedRotationAlpha*r),this._desiredLookat!=null){let n=this.currentTransform.projectBasic(this._desiredLookat.toArray());n[0]+=e,n[1]+=r,this._desiredLookat=new st().fromArray(this.currentTransform.unprojectBasic(n,this._lookatDepth))}this._requestedBasicRotationUnbounded=null}this._basicRotation[0]===0&&this._basicRotation[1]===0||(this._basicRotation[0]=this._rotationAcceleration*this._basicRotation[0],this._basicRotation[1]=this._rotationAcceleration*this._basicRotation[1],Math.abs(this._basicRotation[0])0||this._basicRotation[1]>0)&&(this._basicRotation=[0,0]))}_setDesiredCenter(){if(this._desiredCenter==null)return;let e=new st().fromArray(this.currentTransform.unprojectBasic(this._desiredCenter,this._lookatDepth)).sub(this._currentCamera.position);this._currentCamera.lookat.copy(this._currentCamera.position.clone().add(e)),this._previousCamera.lookat.copy(this._previousCamera.position.clone().add(e)),this._desiredCenter=null}_setDesiredZoom(){this._desiredZoom=Li(this._currentImage.cameraType)||this._previousImage==null?this._zoom:0}}class Cle extends pwe{constructor(e){super(e),this._adjustCameras(),this._motionless=this._motionlessTransition()}prepend(e){super.prepend(e),this._motionless=this._motionlessTransition()}set(e){super.set(e),this._motionless=this._motionlessTransition()}move(e){this._alpha=Math.max(0,Math.min(1,this._alpha+e))}moveTo(e){this._alpha=Math.max(0,Math.min(1,e))}update(e){this._updateRotation(),this._rotationDelta.isZero||(this._applyRotation(this._rotationDelta,this._previousCamera),this._applyRotation(this._rotationDelta,this._currentCamera)),this._updateRotationBasic(),(this._basicRotation[0]!==0||this._basicRotation[1]!==0)&&this._applyRotationBasic(this._basicRotation);let r=this._animationSpeed*e/.1*6;this._updateZoom(r),this._updateLookat(r),this._camera.lerpCameras(this._previousCamera,this._currentCamera,this.alpha)}_getAlpha(){return this._motionless?Math.round(this._alpha):this._alpha}_setCurrentCamera(){super._setCurrentCamera(),this._adjustCameras()}_adjustCameras(){if(this._previousImage!=null){if(Li(this._currentImage.cameraType)){let e=this._camera.lookat.clone().sub(this._camera.position);this._currentCamera.lookat.copy(e.clone().add(this._currentCamera.position))}if(Li(this._previousImage.cameraType)){let e=this._currentCamera.lookat.clone().sub(this._currentCamera.position);this._previousCamera.lookat.copy(e.clone().add(this._previousCamera.position))}}}}class Sle extends pwe{constructor(e){super(e),this._adjustCameras(),this._motionless=this._motionlessTransition(),this._baseAlpha=this._alpha,this._speedCoefficient=1,this._smoothing=!1}append(e){let r=this._trajectory.length===0;r&&this._resetTransition(),super.append(e),r&&(this._setDesiredCenter(),this._setDesiredZoom())}prepend(e){let r=this._trajectory.length===0;r&&this._resetTransition(),super.prepend(e),r&&(this._setDesiredCenter(),this._setDesiredZoom())}set(e){super.set(e),this._desiredLookat=null,this._resetTransition(),this._clearRotation(),this._setDesiredCenter(),this._setDesiredZoom(),this._trajectory.length<3&&(this._smoothing=!0)}setSpeed(e){this._speedCoefficient=this._spatial.clamp(e,0,10)}update(e){this._alpha===1&&this._currentIndex+this._alphao),this._context$=this._contextOperation$.pipe(Ja((o,a)=>a(o),new y6t(e,r)),Ci(1),Bn()),this._state$=this._context$.pipe(Ct(o=>o.state),qn(),Ci(1),Bn()),this._currentState$=this._frame$.pipe(Bi(this._context$,(o,a)=>[o,a]),vn(o=>o[1].currentImage!=null),Pa(o=>{o[1].update(this._clock.getDelta())}),Ct(o=>({fps:60,id:o[0],state:o[1]})),js()),this._lastState$=this._currentState$.pipe(Ci(1),Bn());let i=this._currentState$.pipe(qn(void 0,o=>o.state.currentImage.id),Ci(1),Bn()),s=new dn;n.push(i.subscribe(s)),this._currentId$=new uy(null),n.push(s.pipe(Ct(o=>o.state.currentImage.id)).subscribe(this._currentId$)),this._currentImage$=s.pipe(Ct(o=>o.state.currentImage),Ci(1),Bn()),this._currentCamera$=s.pipe(Ct(o=>o.state.currentCamera),Ci(1),Bn()),this._currentTransform$=s.pipe(Ct(o=>o.state.currentTransform),Ci(1),Bn()),this._reference$=s.pipe(Ct(o=>o.state.reference),qn((o,a)=>o.lat===a.lat&&o.lng===a.lng,o=>({lat:o.lat,lng:o.lng})),Ci(1),Bn()),this._currentImageExternal$=i.pipe(Ct(o=>o.state.currentImage),Ci(1),Bn()),n.push(this._appendImage$.pipe(Ct(o=>a=>(a.append([o]),a))).subscribe(this._contextOperation$)),this._inMotionOperation$=new dn,n.push(i.pipe(Ct(()=>!0)).subscribe(this._inMotionOperation$)),n.push(this._inMotionOperation$.pipe(qn(),vn(o=>o),Yr(()=>this._currentState$.pipe(vn(o=>o.state.imagesAhead===0),Ct(o=>[o.state.camera.clone(),o.state.zoom]),If(),Ct(o=>{let a=o[0][0],l=o[1][0],u=o[0][1],d=o[1][1];return a.diff(l)>1e-5||Math.abs(u-d)>1e-5}),Qn(o=>!o)))).subscribe(this._inMotionOperation$)),this._inMotion$=this._inMotionOperation$.pipe(qn(),Ci(1),Bn()),this._inTranslationOperation$=new dn,n.push(i.pipe(Ct(()=>!0)).subscribe(this._inTranslationOperation$)),n.push(this._inTranslationOperation$.pipe(qn(),vn(o=>o),Yr(()=>this._currentState$.pipe(vn(o=>o.state.imagesAhead===0),Ct(o=>o.state.camera.position.clone()),If(),Ct(o=>o[0].distanceToSquared(o[1])!==0),Qn(o=>!o)))).subscribe(this._inTranslationOperation$)),this._inTranslation$=this._inTranslationOperation$.pipe(qn(),Ci(1),Bn()),n.push(this._state$.subscribe(()=>{})),n.push(this._currentImage$.subscribe(()=>{})),n.push(this._currentCamera$.subscribe(()=>{})),n.push(this._currentTransform$.subscribe(()=>{})),n.push(this._reference$.subscribe(()=>{})),n.push(this._currentImageExternal$.subscribe(()=>{})),n.push(this._lastState$.subscribe(()=>{})),n.push(this._inMotion$.subscribe(()=>{})),n.push(this._inTranslation$.subscribe(()=>{})),this._frameId=null,this._frameGenerator=new m6t(window)}get currentState$(){return this._currentState$}get currentImage$(){return this._currentImage$}get currentId$(){return this._currentId$}get currentImageExternal$(){return this._currentImageExternal$}get currentCamera$(){return this._currentCamera$}get currentTransform$(){return this._currentTransform$}get state$(){return this._state$}get reference$(){return this._reference$}get inMotion$(){return this._inMotion$}get inTranslation$(){return this._inTranslation$}get appendImage$(){return this._appendImage$}dispose(){this.stop(),this._subscriptions.unsubscribe()}custom(){this._inMotionOperation$.next(!0),this._invokeContextOperation(e=>{e.custom()})}earth(){this._inMotionOperation$.next(!0),this._invokeContextOperation(e=>{e.earth()})}traverse(){this._inMotionOperation$.next(!0),this._invokeContextOperation(e=>{e.traverse()})}wait(){this._invokeContextOperation(e=>{e.wait()})}waitInteractively(){this._invokeContextOperation(e=>{e.waitInteractively()})}appendImagess(e){this._invokeContextOperation(r=>{r.append(e)})}prependImages(e){this._invokeContextOperation(r=>{r.prepend(e)})}removeImages(e){this._invokeContextOperation(r=>{r.remove(e)})}clearImages(){this._invokeContextOperation(e=>{e.clear()})}clearPriorImages(){this._invokeContextOperation(e=>{e.clearPrior()})}cutImages(){this._invokeContextOperation(e=>{e.cut()})}setImages(e){this._invokeContextOperation(r=>{r.set(e)})}setViewMatrix(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.setViewMatrix(e)})}rotate(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotate(e)})}rotateUnbounded(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateUnbounded(e)})}rotateWithoutInertia(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateWithoutInertia(e)})}rotateBasic(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateBasic(e)})}rotateBasicUnbounded(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateBasicUnbounded(e)})}rotateBasicWithoutInertia(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateBasicWithoutInertia(e)})}rotateToBasic(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.rotateToBasic(e)})}move(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.move(e)})}moveTo(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.moveTo(e)})}dolly(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.dolly(e)})}orbit(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.orbit(e)})}truck(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.truck(e)})}zoomIn(e,r){this._inMotionOperation$.next(!0),this._invokeContextOperation(n=>{n.zoomIn(e,r)})}getCenter(){return this._lastState$.pipe(Qn(),Ct(e=>e.state.getCenter()))}getZoom(){return this._lastState$.pipe(Qn(),Ct(e=>e.state.zoom))}setCenter(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.setCenter(e)})}setSpeed(e){this._invokeContextOperation(r=>{r.setSpeed(e)})}setTransitionMode(e){this._invokeContextOperation(r=>{r.setTransitionMode(e)})}setZoom(e){this._inMotionOperation$.next(!0),this._invokeContextOperation(r=>{r.setZoom(e)})}start(){this._clock.start(),this._frameId==null&&(this._start$.next(null),this._frameId=this._frameGenerator.requestAnimationFrame(this._frame.bind(this)),this._frame$.next(this._frameId))}stop(){this._clock.stop(),this._frameId!=null&&(this._frameGenerator.cancelAnimationFrame(this._frameId),this._frameId=null)}_invokeContextOperation(e){this._contextOperation$.next(r=>(e(r),r))}_frame(){this._frameId=this._frameGenerator.requestAnimationFrame(this._frame.bind(this)),this._frame$.next(this._frameId)}}function mwe(t){switch(t){case Zg.Custom:return Ai.Custom;case Zg.Earth:return Ai.Earth;case Zg.Street:return Ai.Traversing;default:return null}}class _6t{constructor(e,r,n,i,s,o,a,l){var u;r?this._api=r:e.dataProvider?this._api=new _le(e.dataProvider):this._api=new _le(new Ybt({accessToken:e.accessToken})),this._graphService=n??new p6t(new cS(this.api)),this._loadingName="navigator",this._loadingService=i??new d6t;const d=(u=e.cameraControls)!==null&&u!==void 0?u:Zg.Street;this._stateService=s??new v6t(mwe(d),e.transitionMode),this._cacheService=o??new h6t(this._graphService,this._stateService,this._api),this._playService=a??new AE(this._graphService,this._stateService),this._panService=l??new f6t(this._graphService,this._stateService,e.combinedPanning),this._idRequested$=new uy(null),this._movedToId$=new uy(null),this._request$=null,this._requestSubscription=null,this._imageRequestSubscription=null}get api(){return this._api}get cacheService(){return this._cacheService}get graphService(){return this._graphService}get loadingService(){return this._loadingService}get movedToId$(){return this._movedToId$}get panService(){return this._panService}get playService(){return this._playService}get stateService(){return this._stateService}dispose(){this._abortRequest("viewer removed"),this._cacheService.stop(),this._graphService.dispose(),this._panService.dispose(),this._playService.dispose(),this._stateService.dispose()}moveTo$(e){this._abortRequest(`to id ${e}`),this._loadingService.startLoading(this._loadingName);const r=this._moveTo$(e);return this._makeRequest$(r)}moveDir$(e){this._abortRequest(`in dir ${Cr[e]}`),this._loadingService.startLoading(this._loadingName);const r=this.stateService.currentImage$.pipe(Qn(),Qi(n=>([Cr.Next,Cr.Prev].indexOf(e)>-1?n.sequenceEdges$:n.spatialEdges$).pipe(Qn(),Ct(i=>{for(let s of i.edges)if(s.data.direction===e)return s.target;return null}))),Qi(n=>n==null?(this._loadingService.stopLoading(this._loadingName),ek(new Error(`Direction (${e}) does not exist for current image.`))):this._moveTo$(n)));return this._makeRequest$(r)}setFilter$(e){return this._stateService.clearImages(),this._movedToId$.pipe(Qn(),Qi(r=>r!=null?this._trajectoryIds$().pipe(Qi(n=>this._graphService.setFilter$(e).pipe(Qi(()=>this._cacheIds$(n)))),Iw()):this._idRequested$.pipe(Qn(),Qi(n=>n!=null?this._graphService.setFilter$(e).pipe(Qi(()=>this._graphService.cacheImage$(n))):this._graphService.setFilter$(e).pipe(Ct(()=>{}))))),Ct(()=>{}))}setAccessToken$(e){return this._abortRequest("to set user token"),this._stateService.clearImages(),this._movedToId$.pipe(Qn(),Pa(()=>{this._api.setAccessToken(e)}),Qi(r=>r==null?this._graphService.reset$([]):this._trajectoryIds$().pipe(Qi(n=>this._graphService.reset$(n).pipe(Qi(()=>this._cacheIds$(n)))),Iw(),Ct(()=>{}))))}_cacheIds$(e){const r=e.map(n=>this._graphService.cacheImage$(n));return Na(r).pipe(l5())}_abortRequest(e){this._requestSubscription!=null&&(this._requestSubscription.unsubscribe(),this._requestSubscription=null),this._imageRequestSubscription!=null&&(this._imageRequestSubscription.unsubscribe(),this._imageRequestSubscription=null),this._request$!=null&&(this._request$.isStopped||this._request$.hasError||this._request$.error(new $p(`Request aborted by a subsequent request ${e}.`)),this._request$=null)}_makeRequest$(e){const r=new t9e(1);return this._requestSubscription=r.subscribe(void 0,()=>{}),this._request$=r,this._imageRequestSubscription=e.subscribe(n=>{this._request$=null,r.next(n),r.complete()},n=>{this._request$=null,r.error(n)}),r}_moveTo$(e){return this._idRequested$.next(e),this._graphService.cacheImage$(e).pipe(Pa(r=>{this._stateService.setImages([r]),this._movedToId$.next(r.id)}),Fd(()=>{this._loadingService.stopLoading(this._loadingName)}))}_trajectoryIds$(){return this._stateService.currentState$.pipe(Qn(),Ct(e=>e.state.trajectory.map(r=>r.id)))}}class x6t{constructor(e,r){this._spatial=r??new Uc,this._viewportCoords=e??new Nh}basicToCanvas(e,r,n,i){return this._viewportCoords.basicToCanvasSafe(e[0],e[1],r,i,n.perspective)}canvasToBasic(e,r,n,i){let s=this._viewportCoords.canvasToBasic(e[0],e[1],r,i,n.perspective);return(s[0]<0||s[0]>1||s[1]<0||s[1]>1)&&(s=null),s}eventToUnprojection(e,r,n,i,s){const o=this._viewportCoords.canvasPosition(e,r);return this.canvasToUnprojection(o,r,n,i,s)}canvasToUnprojection(e,r,n,i,s){const o=e[0],a=e[1],[l,u]=this._viewportCoords.canvasToViewport(o,a,r),d=new st(l,u,1).unproject(n.perspective);let f=s.projectBasic(d.toArray());(f[0]<0||f[0]>1||f[1]<0||f[1]>1)&&(f=null);const m=d.clone().sub(n.camera.position).normalize(),v=-2/m.z;let b=null;if(v>0&&v<100&&f){const O=m.clone().multiplyScalar(v).add(n.camera.position),[I,A]=A5(O.x,O.y,O.z,i.lng,i.lat,i.alt);b={lat:A,lng:I}}return{basicPoint:f,lngLat:b,pixelPoint:[o,a]}}cameraToLngLat(e,r){const n=e.camera.position,[i,s]=A5(n.x,n.y,n.z,r.lng,r.lat,r.alt);return{lat:s,lng:i}}lngLatToCanvas(e,r,n,i){const s=cd(e.lng,e.lat,0,i.lng,i.lat,i.alt);return this._viewportCoords.projectToCanvasSafe(s,r,n.perspective)}distanceBetweenLngLats(e,r){return this._spatial.distanceFromLngLat(e.lng,e.lat,r.lng,r.lat)}}class w6t{constructor(e,r,n){this._subscriptions=new Hc,this._emitSubscriptions=new Hc,this._container=n,this._viewer=e,this._navigator=r,this._projection=new x6t,this._started=!1,this._navigable$=new dn;const i=this._subscriptions;i.push(this._navigable$.subscribe(s=>{const o="navigable",a={navigable:s,target:this._viewer,type:o};this._viewer.fire(o,a)})),i.push(this._navigator.loadingService.loading$.subscribe(s=>{const o="dataloading",a={loading:s,target:this._viewer,type:o};this._viewer.fire(o,a)})),i.push(this._container.glRenderer.opaqueRender$.pipe(Qn()).subscribe(()=>{const s="load",o={target:this._viewer,type:s};this._viewer.fire(s,o)}))}get started(){return this._started}get navigable$(){return this._navigable$}get projection(){return this._projection}dispose(){this.stopEmit(),this._subscriptions.unsubscribe()}project$(e){return ei(this._container.renderService.renderCamera$,this._navigator.stateService.currentImage$,this._navigator.stateService.reference$).pipe(Qn(),Ct(([r,n,i])=>{if(this._projection.distanceBetweenLngLats(e,n.lngLat)>1e3)return null;const s=this._projection.lngLatToCanvas(e,this._container.container,r,i);return s?[Math.round(s[0]),Math.round(s[1])]:null}))}projectBasic$(e){return ei(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(Qn(),Ct(([r,n])=>{const i=this._projection.basicToCanvas(e,this._container.container,r,n);return i?[Math.round(i[0]),Math.round(i[1])]:null}))}startEmit(){if(this._started)return;this._started=!0;const e=this._emitSubscriptions;e.push(this._navigator.stateService.currentImageExternal$.subscribe(n=>{const i="image",s={image:n,target:this._viewer,type:i};this._viewer.fire(i,s)})),e.push(this._navigator.stateService.currentImageExternal$.pipe(Yr(n=>n.sequenceEdges$)).subscribe(n=>{const i="sequenceedges",s={status:n,target:this._viewer,type:i};this._viewer.fire(i,s)})),e.push(this._navigator.stateService.currentImageExternal$.pipe(Yr(n=>n.spatialEdges$)).subscribe(n=>{const i="spatialedges",s={status:n,target:this._viewer,type:i};this._viewer.fire(i,s)})),e.push(this._navigator.stateService.reference$.subscribe(n=>{const i="reference",s={reference:n,target:this._viewer,type:i};this._viewer.fire(i,s)})),e.push(ei(this._navigator.stateService.inMotion$,this._container.mouseService.active$,this._container.touchService.active$).pipe(Ct(n=>n[0]||n[1]||n[2]),qn()).subscribe(n=>{const i=n?"movestart":"moveend",s={target:this._viewer,type:i};this._viewer.fire(i,s)})),e.push(this._container.renderService.bearing$.pipe(_9e(100),qn((n,i)=>Math.abs(i-n)<1)).subscribe(n=>{const i="bearing",s={bearing:n,target:this._viewer,type:i};this._viewer.fire(i,s)}));const r=this._container.mouseService.active$.pipe(Yr(n=>n?Pi():this._container.mouseService.mouseMove$));e.push(Vs(this._mapMouseEvent$("click",this._container.mouseService.staticClick$),this._mapMouseEvent$("contextmenu",this._container.mouseService.contextMenu$),this._mapMouseEvent$("dblclick",this._container.mouseService.dblClick$),this._mapMouseEvent$("mousedown",this._container.mouseService.mouseDown$),this._mapMouseEvent$("mousemove",r),this._mapMouseEvent$("mouseout",this._container.mouseService.mouseOut$),this._mapMouseEvent$("mouseover",this._container.mouseService.mouseOver$),this._mapMouseEvent$("mouseup",this._container.mouseService.mouseUp$)).pipe(Bi(this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.currentTransform$,this._navigator.stateService.state$),Ct(([[n,i],s,o,a,l])=>{const u=this._projection.eventToUnprojection(i,this._container.container,s,o,a);return{basicPoint:l===Ai.Traversing?u.basicPoint:null,lngLat:u.lngLat,originalEvent:i,pixelPoint:u.pixelPoint,target:this._viewer,type:n}})).subscribe(n=>{this._viewer.fire(n.type,n)})),e.push(this._container.renderService.renderCamera$.pipe(qn(([n,i],[s,o])=>this._closeTo(n,s,.01)&&this._closeTo(i,o,.01),n=>n.camera.position.toArray())).subscribe(()=>{const n="position",i={target:this._viewer,type:n};this._viewer.fire(n,i)})),e.push(this._container.renderService.renderCamera$.pipe(qn(([n,i],[s,o])=>this._closeTo(n,s,.001)&&this._closeTo(i,o,.001),n=>[n.rotation.phi,n.rotation.theta])).subscribe(()=>{const n="pov",i={target:this._viewer,type:n};this._viewer.fire(n,i)})),e.push(this._container.renderService.renderCamera$.pipe(qn((n,i)=>this._closeTo(n,i,.01),n=>n.perspective.fov)).subscribe(()=>{const n="fov",i={target:this._viewer,type:n};this._viewer.fire(n,i)}))}stopEmit(){this.started&&(this._emitSubscriptions.unsubscribe(),this._started=!1)}unproject$(e){return ei(this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.currentTransform$).pipe(Qn(),Ct(([r,n,i])=>this._projection.canvasToUnprojection(e,this._container.container,r,n,i).lngLat))}unprojectBasic$(e){return ei(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(Qn(),Ct(([r,n])=>this._projection.canvasToBasic(e,this._container.container,r,n)))}_closeTo(e,r,n){return Math.abs(e-r)<=n}_mapMouseEvent$(e,r){return r.pipe(Ct(n=>[e,n]))}}class b6t{constructor(e,r){this._container=e,this._navigator=r,this._renderers={}}add(e,r){const n=new Hc;this._renderers[e.id]={subs:n,renderer:e},n.push(ei([this._container.glRenderer.webGLRenderer$,this._navigator.stateService.reference$]).pipe(Pp(1)).subscribe(([i,s])=>{e.onAdd(r,s,i.getContext())})),n.push(this._container.glRenderer.opaqueRender$.pipe(Bi(this._container.renderService.renderCamera$,this._container.glRenderer.webGLRenderer$)).subscribe(([,i,s])=>{const o=s.getContext(),a=i.perspective.matrixWorldInverse,l=i.perspective.projectionMatrix;e.render(o,a.toArray(),l.toArray())})),n.push(this._navigator.stateService.reference$.pipe(Wu(1)).subscribe(i=>{e.onReference(r,i)}))}dispose(e){for(const r of Object.keys(this._renderers))this.remove(r,e)}has(e){return e in this._renderers}remove(e,r){this._renderers[e].subs.unsubscribe();const n=this._renderers[e].renderer;delete this._renderers[e],this._container.glRenderer.webGLRenderer$.subscribe(i=>{n.onRemove(r,i.getContext())})}}class C6t{constructor(e,r){this._container=e,this._navigator=r,this._controls=null,this._subscriptions=new Hc}attach(e,r){if(this._controls)throw new ca("Custom camera controls already attached");this._controls=e;const n=new dn,i=n.pipe(Yr(()=>this._navigator.stateService.state$),Ct(o=>o===Ai.Custom),qn()),s=this._subscriptions;s.push(i.pipe(po(!1),If(),Bi(this._navigator.stateService.reference$,this._container.renderService.renderCamera$)).subscribe(([[o,a],l,u])=>{a?e.onActivate(r,u.perspective.matrixWorldInverse.toArray(),u.perspective.projectionMatrix.toArray(),l):o&&e.onDeactivate(r)})),s.push(i.pipe(Yr(o=>o?this._navigator.stateService.currentState$.pipe(Wu(1)):Pi())).subscribe(o=>{e.onAnimationFrame(r,o.id)})),s.push(i.pipe(Yr(o=>o?this._navigator.stateService.reference$.pipe(Wu(1)):Pi())).subscribe(o=>e.onReference(r,o))),s.push(i.pipe(Yr(o=>o?this._container.renderService.size$.pipe(Wu(1)):Pi())).subscribe(()=>e.onResize(r))),s.push(ei([this._container.glRenderer.webGLRenderer$,this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.state$]).pipe(Qn()).subscribe(()=>{const o=l=>{!this._controls||e!==this._controls||this._updateProjectionMatrix(l)},a=l=>{!this._controls||e!==this._controls||this._updateViewMatrix(l)};e.onAttach(r,a,o),n.next(),n.complete()}))}detach(e){const r=this._controls;return this._controls=null,this._subscriptions.unsubscribe(),new Promise(n=>{this._navigator.stateService.state$.pipe(Pp(1)).subscribe(i=>{if(!r){n(null);return}i===Ai.Custom&&r.onDeactivate(e),r.onDetach(e),n(r)})})}dispose(e){this.detach(e)}has(e){return!!this._controls&&e===this._controls}_updateProjectionMatrix(e){this._navigator.stateService.state$.pipe(Qn()).subscribe(r=>{if(r!==Ai.Custom){console.warn("Incorrect camera control mode for projection matrix update");return}this._container.renderService.projectionMatrix$.next(e)})}_updateViewMatrix(e){this._navigator.stateService.state$.pipe(Qn()).subscribe(r=>{if(r!==Ai.Custom){console.warn("Incorrect camera control mode for view matrix update");return}this._navigator.stateService.setViewMatrix(e)})}}class S6t extends XO{constructor(e){super(),this._navigator=new _6t(e),this._container=new c6t(e,this._navigator.stateService),this._observer=new w6t(this,this._navigator,this._container),this._componentController=new Kbt(this._container,this._navigator,this._observer,e.imageId,e.component),this._customRenderer=new b6t(this._container,this._navigator),this._customCameraControls=new C6t(this._container,this._navigator)}get dataProvider(){return this._navigator.api.data}get isNavigable(){return this._componentController.navigable}activateCombinedPanning(){this._navigator.panService.enable()}activateComponent(e){this._componentController.activate(e)}activateCover(){this._componentController.activateCover()}addCustomRenderer(e){this._customRenderer.add(e,this)}attachCustomCameraControls(e){this._customCameraControls.attach(e,this)}deactivateCombinedPanning(){this._navigator.panService.disable()}deactivateComponent(e){this._componentController.deactivate(e)}deactivateCover(){this._componentController.deactivateCover()}detachCustomCameraControls(){return this._customCameraControls.detach(this)}fire(e,r){super.fire(e,r)}getBearing(){return new Promise((e,r)=>{this._container.renderService.bearing$.pipe(Qn()).subscribe(n=>{e(n)},n=>{r(n)})})}getCameraControls(){return new Promise((e,r)=>{this._navigator.stateService.state$.pipe(Qn()).subscribe(n=>{switch(n){case Ai.Custom:e(Zg.Custom);break;case Ai.Earth:e(Zg.Earth);break;default:e(Zg.Street);break}},n=>{r(n)})})}getCanvas(){return this._container.canvas}getCanvasContainer(){return this._container.canvasContainer}getCenter(){return new Promise((e,r)=>{this._navigator.stateService.getCenter().subscribe(n=>{e(n)},n=>{r(n)})})}getComponent(e){return this._componentController.get(e)}getContainer(){return this._container.container}getFieldOfView(){return new Promise((e,r)=>{this._container.renderService.renderCamera$.pipe(Qn()).subscribe(n=>{e(n.perspective.fov)},n=>{r(n)})})}getImage(){return new Promise((e,r)=>{this._navigator.stateService.currentImage$.pipe(Qn()).subscribe(n=>{e(n)},n=>{r(n)})})}getPointOfView(){return new Promise((e,r)=>{ei(this._container.renderService.renderCamera$,this._container.renderService.bearing$).pipe(Qn()).subscribe(([n,i])=>{e({bearing:i,tilt:n.getTilt()})},n=>{r(n)})})}getPosition(){return new Promise((e,r)=>{ei(this._container.renderService.renderCamera$,this._navigator.stateService.reference$).pipe(Qn()).subscribe(([n,i])=>{e(this._observer.projection.cameraToLngLat(n,i))},n=>{r(n)})})}getReference(){return new Promise((e,r)=>{this._navigator.stateService.reference$.pipe(Qn()).subscribe(n=>{e(n)},n=>{r(n)})})}getZoom(){return new Promise((e,r)=>{this._navigator.stateService.getZoom().subscribe(n=>{e(n)},n=>{r(n)})})}hasCustomCameraControls(e){return this._customCameraControls.has(e)}hasCustomRenderer(e){return this._customRenderer.has(e)}moveDir(e){const r=this.isNavigable?this._navigator.moveDir$(e):ek(new Error("Calling moveDir is not supported when viewer is not navigable."));return new Promise((n,i)=>{r.subscribe(s=>{n(s)},s=>{i(s)})})}moveTo(e){const r=this.isNavigable?this._navigator.moveTo$(e):ek(new Error("Calling moveTo is not supported when viewer is not navigable."));return new Promise((n,i)=>{r.subscribe(s=>{n(s)},s=>{i(s)})})}off(e,r){super.off(e,r)}on(e,r){super.on(e,r)}project(e){return new Promise((r,n)=>{this._observer.project$(e).subscribe(i=>{r(i)},i=>{n(i)})})}projectFromBasic(e){return new Promise((r,n)=>{this._observer.projectBasic$(e).subscribe(i=>{r(i)},i=>{n(i)})})}remove(){this._customRenderer.dispose(this),this._customCameraControls.dispose(this),this._observer.dispose(),this._componentController.remove(),this._navigator.dispose(),this._container.remove();const e="remove",r={target:this,type:e};this.fire(e,r)}removeCustomRenderer(e){this._customRenderer.remove(e,this)}resize(){this._container.renderService.resize$.next()}setCameraControls(e){const r=mwe(e);r===Ai.Traversing?this._navigator.stateService.traverse():r===Ai.Earth?this._navigator.stateService.earth():r===Ai.Custom?this._navigator.stateService.custom():console.warn(`Unsupported camera control transition (${e})`)}setCenter(e){this._navigator.stateService.setCenter(e)}setFieldOfView(e){this._container.renderService.renderCamera$.pipe(Qn()).subscribe(r=>{const n=r.fovToZoom(e);this._navigator.stateService.setZoom(n)})}setFilter(e){return new Promise((r,n)=>{this._navigator.setFilter$(e).subscribe(()=>{r(void 0)},i=>{n(i)})})}setRenderMode(e){this._container.renderService.renderMode$.next(e)}setTransitionMode(e){this._navigator.stateService.setTransitionMode(e)}setAccessToken(e){const r=this.isNavigable?this._navigator.setAccessToken$(e):ek(new Error("Calling setAccessToken is not supported when viewer is not navigable."));return new Promise((n,i)=>{r.subscribe(()=>{n(void 0)},s=>{i(s)})})}setZoom(e){this._navigator.stateService.setZoom(e)}triggerRerender(){this._container.glRenderer.triggerRerender()}unproject(e){return new Promise((r,n)=>{this._observer.unproject$(e).subscribe(i=>{r(i)},i=>{n(i)})})}unprojectToBasic(e){return new Promise((r,n)=>{this._observer.unprojectBasic$(e).subscribe(i=>{r(i)},i=>{n(i)})})}}cS.register(Lxe);hS.register(Lxe);Ma.registerCover(l4e);Ma.register(u4e);Ma.register(c4e);Ma.register(h4e);Ma.register(d4e);Ma.register(x4e);Ma.register(w4e);Ma.register(b4e);Ma.register(S4e);Ma.register(E4e);Ma.register(M4e);Ma.register(T4e);Ma.register(L4e);Ma.register(q4e);Ma.register(W4e);Ma.register(Z4e);Ma.register(Y4e);var gwe="1.13.7",Mle=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},eN=Array.prototype,LK=Object.prototype,Tle=typeof Symbol<"u"?Symbol.prototype:null,E6t=eN.push,OE=eN.slice,wS=LK.toString,M6t=LK.hasOwnProperty,ywe=typeof ArrayBuffer<"u",T6t=typeof DataView<"u",I6t=Array.isArray,Ile=Object.keys,Rle=Object.create,Lle=ywe&&ArrayBuffer.isView,R6t=isNaN,L6t=isFinite,vwe=!{toString:null}.propertyIsEnumerable("toString"),kle=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k6t=Math.pow(2,53)-1;function Zd(t,e){return e=e==null?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=Array(r),i=0;i=0&&r<=k6t}}function Lwe(t){return function(e){return e==null?void 0:e[t]}}const IP=Lwe("byteLength"),j6t=Rwe(IP);var V6t=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function U6t(t){return Lle?Lle(t)&&!TP(t):j6t(t)&&V6t.test(wS.call(t))}const kwe=ywe?U6t:Iwe(!1),Yd=Lwe("length");function H6t(t){for(var e={},r=t.length,n=0;n":">",'"':""","'":"'","`":"`"},lCt=qwe(Wwe),uCt=Fwe(Wwe),cCt=qwe(uCt),hCt=oa.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var EB=/(.)^/,dCt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},fCt=/\\|'|\r|\n|\u2028|\u2029/g;function pCt(t){return"\\"+dCt[t]}var mCt=/^\s*(\w|\$)+\s*$/;function gCt(t,e,r){!e&&r&&(e=r),e=Bwe({},e,oa.templateSettings);var n=RegExp([(e.escape||EB).source,(e.interpolate||EB).source,(e.evaluate||EB).source].join("|")+"|$","g"),i=0,s="__p+='";t.replace(n,function(u,d,f,m,v){return s+=t.slice(i,v).replace(fCt,pCt),i=v+u.length,d?s+=`'+ +((__t=(`+d+`))==null?'':_.escape(__t))+ +'`:f?s+=`'+ +((__t=(`+f+`))==null?'':__t)+ +'`:m&&(s+=`'; +`+m+` +__p+='`),u}),s+=`'; +`;var o=e.variable;if(o){if(!mCt.test(o))throw new Error("variable is not a bare identifier: "+o)}else s=`with(obj||{}){ +`+s+`} +`,o="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; +`+s+`return __p; +`;var a;try{a=new Function(o,"_",s)}catch(u){throw u.source=s,u}var l=function(u){return a.call(this,u,oa)};return l.source="function("+o+`){ +`+s+"}",l}function yCt(t,e,r){e=DE(e);var n=e.length;if(!n)return yd(r)?r.call(t):r;for(var i=0;i1)s9(a,e-1,r,n),i=n.length;else for(var l=0,u=a.length;le?(n&&(clearTimeout(n),n=null),a=d,o=t.apply(i,s),n||(i=s=null)):!n&&r.trailing!==!1&&(n=setTimeout(l,f)),o};return u.cancel=function(){clearTimeout(n),a=0,n=i=s=null},u}function ECt(t,e,r){var n,i,s,o,a,l=function(){var d=CS()-i;e>d?n=setTimeout(l,e-d):(n=null,r||(o=t.apply(a,s)),n||(s=a=null))},u=Zd(function(d){return a=this,s=d,i=CS(),n||(n=setTimeout(l,e),r&&(o=t.apply(a,s))),o});return u.cancel=function(){clearTimeout(n),n=s=a=null},u}function MCt(t,e){return M7(e,t)}function VK(t){return function(){return!t.apply(this,arguments)}}function TCt(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function ICt(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Jwe(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}}const RCt=M7(Jwe,2);function Kwe(t,e,r){e=Xd(e,r);for(var n=vc(t),i,s=0,o=n.length;s0?0:i-1;s>=0&&s0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(r&&s&&a)return s=r(n,i),n[s]===i?s:-1;if(i!==i)return s=e(OE.call(n,o,a),Twe),s>=0?s+o:-1;for(s=t>0?o:a-1;s>=0&&s0?0:a-1;for(s||(i=r[o?o[l]:l],l+=t);l>=0&&l=3;return e(r,FE(n,s,4),i,o)}}const MB=i7e(1),$le=i7e(-1);function Dw(t,e,r){var n=[];return e=Xd(e,r),dy(t,function(i,s,o){e(i,s,o)&&n.push(i)}),n}function ACt(t,e,r){return Dw(t,VK(Xd(e)),r)}function Ole(t,e,r){e=Xd(e,r);for(var n=!Gf(t)&&vc(t),i=(n||t).length,s=0;s=0}const PCt=Zd(function(t,e,r){var n,i;return yd(e)?i=e:(e=DE(e),n=e.slice(0,-1),e=e[e.length-1]),O5(t,function(s){var o=i;if(!o){if(n&&n.length&&(s=FK(s,n)),s==null)return;o=s[e]}return o==null?o:o.apply(s,r)})});function HK(t,e){return O5(t,BK(e))}function $Ct(t,e){return Dw(t,bS(e))}function s7e(t,e,r){var n=-1/0,i=-1/0,s,o;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=Gf(t)?t:E7(t);for(var a=0,l=t.length;an&&(n=s)}else e=Xd(e,r),dy(t,function(u,d,f){o=e(u,d,f),(o>i||o===-1/0&&n===-1/0)&&(n=u,i=o)});return n}function OCt(t,e,r){var n=1/0,i=1/0,s,o;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=Gf(t)?t:E7(t);for(var a=0,l=t.length;aa||o===void 0)return 1;if(o1&&(n=FE(n,e[1])),e=NE(t)):(n=HCt,e=s9(e,!1,!1),t=Object(t));for(var i=0,s=e.length;i1&&(n=e[1])):(e=O5(s9(e,!1,!1),String),r=function(i,s){return!Yg(e,s)}),l7e(t,r,n)});function u7e(t,e,r){return OE.call(t,0,Math.max(0,t.length-(e==null||r?1:e)))}function TB(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[0]:u7e(t,t.length-e)}function ok(t,e,r){return OE.call(t,e==null||r?1:e)}function qCt(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[t.length-1]:ok(t,Math.max(0,t.length-e))}function WCt(t){return Dw(t,Boolean)}function ZCt(t,e){return s9(t,e,!1)}const c7e=Zd(function(t,e){return e=s9(e,!0,!0),Dw(t,function(r){return!Yg(e,r)})}),YCt=Zd(function(t,e){return c7e(t,e)});function Uq(t,e,r,n){xwe(e)||(n=r,r=e,e=!1),r!=null&&(r=Xd(r,n));for(var i=[],s=[],o=0,a=Yd(t);or||tr?t=t-n:t{var v,b;let[s,o]=E.useState([]),[a,l]=E.useState(null),[u,d]=E.useState(null),[f,m]=E.useState(!1);return E.useEffect(()=>{const M=new S6t({accessToken:"MLY|4690399437648324|de87555bb6015affa20c3df794ebab15",container:"mly-viewer",component:{marker:!0,bearing:!1,cover:!0,attribution:!1,sequence:!1,cache:!0,direction:!0},imageId:null});M.deactivateCover(),M.on("nodechanged",O=>{let I=Dle(O,e.geometry.coordinates,a.geometry.coordinates);M.setCenter(I)}),M.on("image",O=>{n(O),O.target.getBearing().then(I=>i(I))}),M.on("imageclick",O=>{l(O)}),M.on("dblclick",O=>{M.moveTo(O.key,{transition:.1})}),M.on("pov",function(O){O.target.getBearing().then(I=>i(I))}),d(M)},[]),E.useEffect(()=>{if(u&&a){let M=TF(e).geometry.coordinates,O=new Jbt("default-id",{lat:M[1],lng:M[0]},{ballColor:"#feb70d",ballOpacity:.45,color:"#feb70d",opacity:.25,interactive:!1,radius:2.5});u.getComponent("marker").add([O]),u.moveTo(a.properties.id,{transition:.1}).then(A=>{let j=A._core.geometry.coordinates?A._core.geometry.coordinates:[A._core.geometry.lng,A._core.geometry.lat],H=TF(e).geometry.coordinates,W=Dle(A,j,H);u.setCenter(W)})}},[a,u]),E.useEffect(()=>{if(e){m(!0);let M=t;M.forEach(A=>{A.properties.distance=A1t(TF(e),A.geometry)});let O=M.filter(A=>A.properties.distance<.08),I=M.filter(A=>A.properties.distance<.04);I.length>0?M=I:M=O,M=J3.sortBy(M,A=>A.properties.distance),M=J3.uniq(M,A=>A.properties.sequence_id),M=J3.sortBy(M,A=>A.properties.captured_at).reverse(),M=J3.uniq(M,A=>ri(A.properties.captured_at).format("YYYY-MM-DD")),o(M),l(M[0]),m(!1)}},[t,e]),oe.jsxs(kn,{className:"h-auto sm:h-96",p:"2",gap:"4",gridArea:"streetview",direction:{initial:"column",sm:"row"},children:[oe.jsx("div",{className:"w-full sm:w-2/3 lg:w-3/4 rounded-md min-h-72",id:"mly-viewer"}),oe.jsx(kl,{size:"1",className:"w-full sm:w-1/3 lg:w-1/4",children:oe.jsxs(kn,{direction:{initial:"row",sm:"column"},justify:{initial:"between",sm:"start"},align:{initial:"start",sm:"start"},children:[r&&oe.jsxs(kn,{direction:"column",children:[oe.jsx(Ln,{size:"1",children:"Image taken on:"}),oe.jsx(Ln,{size:"3",weight:"bold",children:ri(r.image._spatial.captured_at).format("MMM DD, YYYY")})]}),oe.jsxs(kn,{direction:{initial:"column"},align:"start",className:"w-full",children:[f&&oe.jsx(Ln,{size:"1",children:"Loading..."}),t.length===0&&oe.jsx(Ln,{size:"1",children:"No nearby images found; Zoom in on the map to load imagery."}),s.length>0&&oe.jsx(Ln,{size:"1",weight:"medium",mb:"1",children:"Select another date:"}),(s==null?void 0:s.length)>0&&!f&&r&&oe.jsx(Xfe,{onValueChange:M=>l(s.find(O=>O.properties.sequence_id===M)),value:(b=(v=r==null?void 0:r.image._core)==null?void 0:v.sequence)==null?void 0:b.id,className:"max-h-72 overflow-y-auto w-full",children:s.map((M,O)=>oe.jsx(Jfe,{value:M.properties.sequence_id,color:"gray",size:"1",children:oe.jsx(Ln,{size:1,children:ri(M.properties.captured_at).format("MM-DD-YY")})},M.properties.sequence_id))})]})]})})]})},oSt=({streetview:t,setStreetview:e})=>oe.jsx(kn,{direction:"column",gap:"2",className:"",children:oe.jsxs(kn,{align:"center",gap:"2",justify:"between",pb:"1",children:[oe.jsxs(kn,{align:"center",gap:"2",children:[oe.jsx(Mge,{height:"20",width:"20",color:"gray"}),oe.jsx(Ln,{color:"gray",size:"2",children:"Street view"})]}),oe.jsx(MZ,{size:1,checked:t,radius:"large",onCheckedChange:e})]})}),aSt=({layer:t,feature:e})=>(E.useState(!1),oe.jsx(oe.Fragment,{children:e.properties.parcel_id&&oe.jsx(kl,{style:{backgroundColor:Hi.parcel.bg_color},children:oe.jsxs(kn,{align:"center",justify:"between",className:"dark:text-slate-700",children:[oe.jsxs(kn,{align:"center",gap:"3",className:"dark:text-slate-100",children:[W6.parcel,oe.jsx(Ln,{size:"2",weight:"medium",children:"Linked to parcel:"})]}),oe.jsx(ud,{to:`/map?id=${e.properties.parcel_id}&layer=parcel`,children:oe.jsxs(kn,{className:"rounded-full text-gray-800",align:"center",px:"2",py:"1",gap:"1",style:{backgroundColor:Hi.parcel.bg_color},children:[oe.jsx(Ln,{size:"2",weight:"bold",className:"font-mono",children:e.properties.parcel_id}),oe.jsx(p2,{})]})})]})})})),lSt=({style:t,setStyle:e})=>{let r=["streets","satellite","linen"];return oe.jsxs(kn,{direction:"row",gap:"4",align:"center",justify:"around",children:[oe.jsx(Ln,{size:"2",color:"gray",children:"Select basemap"}),oe.jsxs(dw,{value:t,onValueChange:n=>e(n),size:"1",children:[oe.jsx(fw,{}),oe.jsx(pw,{children:r.map(n=>oe.jsx(mw,{value:n,children:n},n))})]})]})},uSt=()=>{const[t,e]=zpe(),[r,n]=E.useState((t==null?void 0:t.get("layer"))||(t==null?void 0:t.get("type"))||"parcel");let[i,s]=E.useState(!1),[o,a]=E.useState([]),[l,u]=E.useState(null),[d,f]=E.useState(0),[m,v]=E.useState("streets");const{data:b,loading:M,error:O,refetch:I,nullify:A}=Bpt(t==null?void 0:t.get("id"),r),{feature:j,loading:H,error:W,changeAddress:re}=A5e(),[K,pe]=E.useState([]);return E.useEffect(()=>{pe([]),t!=null&&t.get("layer")&&(I(t==null?void 0:t.get("id"),t==null?void 0:t.get("layer")),n(t==null?void 0:t.get("layer")))},[t]),E.useEffect(()=>{j&&(s(!1),e({id:r==="parcel"?j.attributes.parcel_id:j.attributes[Hi[r].id_column],layer:r}))},[j]),E.useEffect(()=>{pe([]),b&&e({id:b!=null&&b.properties?b.properties[Hi[r].id_column]:null,layer:r})},[b]),E.useEffect(()=>{pe([])},[r]),oe.jsxs(B5,{areas:{initial:"'streetview' 'geocoder' 'map' 'info'",sm:"'info geocoder' 'info streetview' 'info map' 'info map'"},columns:{initial:"1fr",sm:"1fr 1fr",md:"2fr 3fr"},rows:{initial:"auto auto auto auto",sm:"min-content 0fr 1fr 1fr"},gap:{initial:"0",sm:"0"},p:{initial:"0",sm:"2",lg:"4"},children:[oe.jsxs(kn,{gap:"4",gridArea:"geocoder",justify:"start",align:"center",pt:{initial:"2",sm:"2"},pb:{initial:"2",sm:"2"},p:"2",direction:{initial:"column",sm:"row"},children:[oe.jsx(kl,{size:"1",className:"",children:oe.jsx(oSt,{streetview:i,setStreetview:s})}),oe.jsx(kl,{children:oe.jsx(lSt,{style:m,setStyle:v})})]}),oe.jsxs(kn,{gap:"2",gridArea:"info",justify:"start",p:"2",direction:"column",className:"",overflowX:"auto",children:[oe.jsx(kl,{size:"1",className:"",children:oe.jsx(T1t,{geocodeRefetch:re,geocodeError:W,refetch:I})}),oe.jsx(u1t,{feature:b,loading:M,layer:r,refetch:I}),b&&r==="parcel"&&oe.jsx(M1t,{feature:b,layer:r,refetch:I}),b&&r==="address"&&oe.jsx(c1t,{feature:b,layer:r,refetch:I}),b&&r==="building"&&oe.jsx(aSt,{layer:r,feature:b,loading:M,refetch:I,linkedAddresses:K,setLinkedAddresses:pe}),b&&oe.jsx(E1t,{layer:r,feature:b,loading:M,refetch:I,linkedAddresses:K,setLinkedAddresses:pe})]}),i?oe.jsx(sSt,{svImages:o,feature:b,viewerImage:l,setViewerImage:u,setViewerBearing:f}):oe.jsx("div",{style:{gridArea:"streetview",height:"0 auto"}}),oe.jsx("div",{style:{gridArea:"map"},children:oe.jsx(Net,{layer:r,setLayer:n,style:m,feature:b,linkedAddresses:K,refetch:I,streetview:i,svImages:o,setSvImages:a,viewerImage:l,viewerBearing:d})})]})};var d7e={exports:{}};(function(t,e){var r={};/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Petka Antonov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */(function(n){t.exports=n()})(function(){return function n(i,s,o){function a(d,f){if(!s[d]){if(!i[d]){var m=typeof _dereq_=="function"&&_dereq_;if(!f&&m)return m(d,!0);if(l)return l(d,!0);var v=new Error("Cannot find module '"+d+"'");throw v.code="MODULE_NOT_FOUND",v}var b=s[d]={exports:{}};i[d][0].call(b.exports,function(M){var O=i[d][1][M];return a(O||M)},b,b.exports,n,i,s,o)}return s[d].exports}for(var l=typeof _dereq_=="function"&&_dereq_,u=0;u0;)b(M)}function b(M){var O=M.shift();if(typeof O!="function")O._settlePromises();else{var I=M.shift(),A=M.shift();O.call(I,A)}}u.prototype._drainQueues=function(){v(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,v(this._lateQueue)},u.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},u.prototype._reset=function(){this._isTickUsed=!1},i.exports=u,i.exports.firstLineError=o},{"./queue":26,"./schedule":29}],3:[function(n,i,s){i.exports=function(o,a,l,u){var d=!1,f=function(M,O){this._reject(O)},m=function(M,O){O.promiseRejectionQueued=!0,O.bindingPromise._then(f,f,null,this,M)},v=function(M,O){this._bitField&50397184||this._resolveCallback(O.target)},b=function(M,O){O.promiseRejectionQueued||this._reject(M)};o.prototype.bind=function(M){d||(d=!0,o.prototype._propagateFrom=u.propagateFromFunction(),o.prototype._boundValue=u.boundValueFunction());var O=l(M),I=new o(a);I._propagateFrom(this,1);var A=this._target();if(I._setBoundTo(O),O instanceof o){var j={promiseRejectionQueued:!1,promise:I,target:A,bindingPromise:O};A._then(a,m,void 0,I,j),O._then(v,b,void 0,I,j),I._setOnCancel(O)}else I._resolveCallback(A);return I},o.prototype._setBoundTo=function(M){M!==void 0?(this._bitField=this._bitField|2097152,this._boundTo=M):this._bitField=this._bitField&-2097153},o.prototype._isBound=function(){return(this._bitField&2097152)===2097152},o.bind=function(M,O){return o.resolve(O).bind(M)}}},{}],4:[function(n,i,s){var o;typeof Promise<"u"&&(o=Promise);function a(){try{Promise===l&&(Promise=o)}catch{}return l}var l=n("./promise")();l.noConflict=a,i.exports=l},{"./promise":22}],5:[function(n,i,s){var o=Object.create;if(o){var a=o(null),l=o(null);a[" size"]=l[" size"]=0}i.exports=function(u){var d=n("./util"),f=d.canEvaluate;d.isIdentifier;var m;function v(I,A){var j;if(I!=null&&(j=I[A]),typeof j!="function"){var H="Object "+d.classString(I)+" has no method '"+d.toString(A)+"'";throw new u.TypeError(H)}return j}function b(I){var A=this.pop(),j=v(I,A);return j.apply(I,this)}u.prototype.call=function(I){var A=[].slice.call(arguments,1);return A.push(I),this._then(b,void 0,void 0,A,void 0)};function M(I){return I[this]}function O(I){var A=+this;return A<0&&(A=Math.max(0,A+I.length)),I[A]}u.prototype.get=function(I){var A=typeof I=="number",j;if(A)j=O;else if(f){var H=m(I);j=H!==null?H:M}else j=M;return this._then(j,void 0,void 0,I,void 0)}}},{"./util":36}],6:[function(n,i,s){i.exports=function(o,a,l,u){var d=n("./util"),f=d.tryCatch,m=d.errorObj,v=o._async;o.prototype.break=o.prototype.cancel=function(){if(!u.cancellation())return this._warn("cancellation is disabled");for(var b=this,M=b;b._isCancellable();){if(!b._cancelBy(M)){M._isFollowing()?M._followee().cancel():M._cancelBranched();break}var O=b._cancellationParent;if(O==null||!O._isCancellable()){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}else b._isFollowing()&&b._followee().cancel(),b._setWillBeCancelled(),M=b,b=O}},o.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},o.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},o.prototype._cancelBy=function(b){return b===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},o.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},o.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),v.invoke(this._cancelPromises,this,void 0))},o.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},o.prototype._unsetOnCancel=function(){this._onCancelField=void 0},o.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},o.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},o.prototype._doInvokeOnCancel=function(b,M){if(d.isArray(b))for(var O=0;O=0)return l[m]}return u.CapturedTrace=null,u.create=d,u.deactivateLongStackTraces=function(){},u.activateLongStackTraces=function(){var m=o.prototype._pushContext,v=o.prototype._popContext,b=o._peekContext,M=o.prototype._peekContext,O=o.prototype._promiseCreated;u.deactivateLongStackTraces=function(){o.prototype._pushContext=m,o.prototype._popContext=v,o._peekContext=b,o.prototype._peekContext=M,o.prototype._promiseCreated=O,a=!1},a=!0,o.prototype._pushContext=u.prototype._pushContext,o.prototype._popContext=u.prototype._popContext,o._peekContext=o.prototype._peekContext=f,o.prototype._promiseCreated=function(){var I=this._peekContext();I&&I._promiseCreated==null&&(I._promiseCreated=this)}},u}},{}],9:[function(n,i,s){i.exports=function(o,a,l,u){var d=o._async,f=n("./errors").Warning,m=n("./util"),v=n("./es5"),b=m.canAttachTrace,M,O,I=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,A=/\((?:timers\.js):\d+:\d+\)/,j=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,W=null,re=!1,K,pe=m.env("BLUEBIRD_DEBUG")!=0,ge=!!(m.env("BLUEBIRD_WARNINGS")!=0&&(pe||m.env("BLUEBIRD_WARNINGS"))),fe=!!(m.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(pe||m.env("BLUEBIRD_LONG_STACK_TRACES"))),ee=m.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(ge||!!m.env("BLUEBIRD_W_FORGOTTEN_RETURN")),be;(function(){var vt=[];function ot(){for(var br=0;br0},o.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},o.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},o.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},o.prototype._warn=function(vt,ot,lr){return _r(vt,ot,lr||this)},o.onPossiblyUnhandledRejection=function(vt){var ot=o._getContext();O=m.contextBind(ot,vt)},o.onUnhandledRejectionHandled=function(vt){var ot=o._getContext();M=m.contextBind(ot,vt)};var le=function(){};o.longStackTraces=function(){if(d.haveItemsQueued()&&!or.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created + + See http://goo.gl/MqrFmX +`);if(!or.longStackTraces&&Kr()){var vt=o.prototype._captureStackTrace,ot=o.prototype._attachExtraTrace,lr=o.prototype._dereferenceTrace;or.longStackTraces=!0,le=function(){if(d.haveItemsQueued()&&!or.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created + + See http://goo.gl/MqrFmX +`);o.prototype._captureStackTrace=vt,o.prototype._attachExtraTrace=ot,o.prototype._dereferenceTrace=lr,a.deactivateLongStackTraces(),or.longStackTraces=!1},o.prototype._captureStackTrace=et,o.prototype._attachExtraTrace=yt,o.prototype._dereferenceTrace=we,a.activateLongStackTraces()}},o.hasLongStackTraces=function(){return or.longStackTraces&&Kr()};var ve={unhandledrejection:{before:function(){var vt=m.global.onunhandledrejection;return m.global.onunhandledrejection=null,vt},after:function(vt){m.global.onunhandledrejection=vt}},rejectionhandled:{before:function(){var vt=m.global.onrejectionhandled;return m.global.onrejectionhandled=null,vt},after:function(vt){m.global.onrejectionhandled=vt}}},Pe=function(){var vt=function(lr,br){if(lr){var Tr;try{return Tr=lr.before(),!m.global.dispatchEvent(br)}finally{lr.after(Tr)}}else return!m.global.dispatchEvent(br)};try{if(typeof CustomEvent=="function"){var ot=new CustomEvent("CustomEvent");return m.global.dispatchEvent(ot),function(lr,br){lr=lr.toLowerCase();var Tr={detail:br,cancelable:!0},Zn=new CustomEvent(lr,Tr);return v.defineProperty(Zn,"promise",{value:br.promise}),v.defineProperty(Zn,"reason",{value:br.reason}),vt(ve[lr],Zn)}}else if(typeof Event=="function"){var ot=new Event("CustomEvent");return m.global.dispatchEvent(ot),function(br,Tr){br=br.toLowerCase();var Zn=new Event(br,{cancelable:!0});return Zn.detail=Tr,v.defineProperty(Zn,"promise",{value:Tr.promise}),v.defineProperty(Zn,"reason",{value:Tr.reason}),vt(ve[br],Zn)}}else{var ot=document.createEvent("CustomEvent");return ot.initCustomEvent("testingtheevent",!1,!0,{}),m.global.dispatchEvent(ot),function(br,Tr){br=br.toLowerCase();var Zn=document.createEvent("CustomEvent");return Zn.initCustomEvent(br,!1,!0,Tr),vt(ve[br],Zn)}}}catch{}return function(){return!1}}(),Fe=function(){return m.isNode?function(){return process.emit.apply(process,arguments)}:m.global?function(vt){var ot="on"+vt.toLowerCase(),lr=m.global[ot];return lr?(lr.apply(m.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}();function We(vt,ot){return{promise:ot}}var He={promiseCreated:We,promiseFulfilled:We,promiseRejected:We,promiseResolved:We,promiseCancelled:We,promiseChained:function(vt,ot,lr){return{promise:ot,child:lr}},warning:function(vt,ot){return{warning:ot}},unhandledRejection:function(vt,ot,lr){return{reason:ot,promise:lr}},rejectionHandled:We},Lt=function(vt){var ot=!1;try{ot=Fe.apply(null,arguments)}catch(br){d.throwLater(br),ot=!0}var lr=!1;try{lr=Pe(vt,He[vt].apply(null,arguments))}catch(br){d.throwLater(br),lr=!0}return lr||ot};o.config=function(vt){if(vt=Object(vt),"longStackTraces"in vt&&(vt.longStackTraces?o.longStackTraces():!vt.longStackTraces&&o.hasLongStackTraces()&&le()),"warnings"in vt){var ot=vt.warnings;or.warnings=!!ot,ee=or.warnings,m.isObject(ot)&&"wForgottenReturn"in ot&&(ee=!!ot.wForgottenReturn)}if("cancellation"in vt&&vt.cancellation&&!or.cancellation){if(d.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");o.prototype._clearCancellationData=pr,o.prototype._propagateFrom=Ut,o.prototype._onCancel=Tt,o.prototype._setOnCancel=Je,o.prototype._attachCancellationCallback=rr,o.prototype._execute=pt,Se=Ut,or.cancellation=!0}if("monitoring"in vt&&(vt.monitoring&&!or.monitoring?(or.monitoring=!0,o.prototype._fireEvent=Lt):!vt.monitoring&&or.monitoring&&(or.monitoring=!1,o.prototype._fireEvent=lt)),"asyncHooks"in vt&&m.nodeSupportsAsyncResource){var lr=or.asyncHooks,br=!!vt.asyncHooks;lr!==br&&(or.asyncHooks=br,br?l():u())}return o};function lt(){return!1}o.prototype._fireEvent=lt,o.prototype._execute=function(vt,ot,lr){try{vt(ot,lr)}catch(br){return br}},o.prototype._onCancel=function(){},o.prototype._setOnCancel=function(vt){},o.prototype._attachCancellationCallback=function(vt){},o.prototype._captureStackTrace=function(){},o.prototype._attachExtraTrace=function(){},o.prototype._dereferenceTrace=function(){},o.prototype._clearCancellationData=function(){},o.prototype._propagateFrom=function(vt,ot){};function pt(vt,ot,lr){var br=this;try{vt(ot,lr,function(Tr){if(typeof Tr!="function")throw new TypeError("onCancel must be a function, got: "+m.toString(Tr));br._attachCancellationCallback(Tr)})}catch(Tr){return Tr}}function rr(vt){if(!this._isCancellable())return this;var ot=this._onCancel();ot!==void 0?m.isArray(ot)?ot.push(vt):this._setOnCancel([ot,vt]):this._setOnCancel(vt)}function Tt(){return this._onCancelField}function Je(vt){this._onCancelField=vt}function pr(){this._cancellationParent=void 0,this._onCancelField=void 0}function Ut(vt,ot){if(ot&1){this._cancellationParent=vt;var lr=vt._branchesRemainingToCancel;lr===void 0&&(lr=0),vt._branchesRemainingToCancel=lr+1}ot&2&&vt._isBound()&&this._setBoundTo(vt._boundTo)}function tr(vt,ot){ot&2&&vt._isBound()&&this._setBoundTo(vt._boundTo)}var Se=tr;function je(){var vt=this._boundTo;return vt!==void 0&&vt instanceof o?vt.isFulfilled()?vt.value():void 0:vt}function et(){this._trace=new ar(this._peekContext())}function yt(vt,ot){if(b(vt)){var lr=this._trace;if(lr!==void 0&&ot&&(lr=lr._parent),lr!==void 0)lr.attachExtraTrace(vt);else if(!vt.__stackCleaned__){var br=xr(vt);m.notEnumerableProp(vt,"stack",br.message+` +`+br.stack.join(` +`)),m.notEnumerableProp(vt,"__stackCleaned__",!0)}}}function we(){this._trace=void 0}function ft(vt,ot,lr,br,Tr){if(vt===void 0&&ot!==null&&ee){if(Tr!==void 0&&Tr._returnedNonUndefined()||!(br._bitField&65535))return;lr&&(lr=lr+" ");var Zn="",Gi="";if(ot._trace){for(var zn=ot._trace.stack.split(` +`),pi=it(zn),nt=pi.length-1;nt>=0;--nt){var Me=pi[nt];if(!A.test(Me)){var Ie=Me.match(j);Ie&&(Zn="at "+Ie[1]+":"+Ie[2]+":"+Ie[3]+" ");break}}if(pi.length>0){for(var Be=pi[0],nt=0;nt0&&(Gi=` +`+zn[nt-1]);break}}}var ze="a promise was created in a "+lr+"handler "+Zn+"but was not returned from it, see http://goo.gl/rRqMUw"+Gi;br._warn(ze,!0,ot)}}function qt(vt,ot){var lr=vt+" is deprecated and will be removed in a future version.";return ot&&(lr+=" Use "+ot+" instead."),_r(lr)}function _r(vt,ot,lr){if(or.warnings){var br=new f(vt),Tr;if(ot)lr._attachExtraTrace(br);else if(or.longStackTraces&&(Tr=o._peekContext()))Tr.attachExtraTrace(br);else{var Zn=xr(br);br.stack=Zn.message+` +`+Zn.stack.join(` +`)}Lt("warning",br)||Ur(br,"",!0)}}function rt(vt,ot){for(var lr=0;lr=0;--zn)if(br[zn]===Zn){Gi=zn;break}for(var zn=Gi;zn>=0;--zn){var pi=br[zn];if(ot[Tr]===pi)ot.pop(),Tr--;else break}ot=br}}function it(vt){for(var ot=[],lr=0;lr0&&vt.name!="SyntaxError"&&(ot=ot.slice(lr)),ot}function xr(vt){var ot=vt.stack,lr=vt.toString();return ot=typeof ot=="string"&&ot.length>0?Xt(vt):[" (No stack trace)"],{message:lr,stack:vt.name=="SyntaxError"?ot:it(ot)}}function Ur(vt,ot,lr){if(typeof console<"u"){var br;if(m.isObject(vt)){var Tr=vt.stack;br=ot+W(Tr,vt)}else br=ot+String(vt);typeof K=="function"?K(br,lr):(typeof console.log=="function"||typeof console.log=="object")&&console.log(br)}}function In(vt,ot,lr,br){var Tr=!1;try{typeof ot=="function"&&(Tr=!0,vt==="rejectionHandled"?ot(br):ot(lr,br))}catch(Zn){d.throwLater(Zn)}vt==="unhandledRejection"?!Lt(vt,lr,br)&&!Tr&&Ur(lr,"Unhandled rejection "):Lt(vt,br)}function Rr(vt){var ot;if(typeof vt=="function")ot="[function "+(vt.name||"anonymous")+"]";else{ot=vt&&typeof vt.toString=="function"?vt.toString():m.toString(vt);var lr=/\[object [a-zA-Z0-9$_]+\]/;if(lr.test(ot))try{var br=JSON.stringify(vt);ot=br}catch{}ot.length===0&&(ot="(empty array)")}return"(<"+mn(ot)+">, no stack trace)"}function mn(vt){var ot=41;return vt.length=Zn||(Ft=function(Me){if(I.test(Me))return!0;var Ie=vr(Me);return!!(Ie&&Ie.fileName===Gi&&Tr<=Ie.line&&Ie.line<=Zn)})}}function ar(vt){this._parent=vt,this._promisesCreated=0;var ot=this._length=1+(vt===void 0?0:vt._length);ni(this,ar),ot>32&&this.uncycle()}m.inherits(ar,Error),a.CapturedTrace=ar,ar.prototype.uncycle=function(){var vt=this._length;if(!(vt<2)){for(var ot=[],lr={},br=0,Tr=this;Tr!==void 0;++br)ot.push(Tr),Tr=Tr._parent;vt=this._length=br;for(var br=vt-1;br>=0;--br){var Zn=ot[br].stack;lr[Zn]===void 0&&(lr[Zn]=br)}for(var br=0;br0&&(ot[zn-1]._parent=void 0,ot[zn-1]._length=1),ot[br]._parent=void 0,ot[br]._length=1;var pi=br>0?ot[br-1]:this;zn=0;--Me)ot[Me]._length=nt,nt++;return}}}},ar.prototype.attachExtraTrace=function(vt){if(!vt.__stackCleaned__){this.uncycle();for(var ot=xr(vt),lr=ot.message,br=[ot.stack],Tr=this;Tr!==void 0;)br.push(it(Tr.stack.split(` +`))),Tr=Tr._parent;Ze(br),Xe(br),m.notEnumerableProp(vt,"stack",rt(lr,br)),m.notEnumerableProp(vt,"__stackCleaned__",!0)}};var ni=function(){var ot=/^\s*at\s*/,lr=function(Gi,zn){return typeof Gi=="string"?Gi:zn.name!==void 0&&zn.message!==void 0?zn.toString():Rr(zn)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,H=ot,W=lr;var br=Error.captureStackTrace;return Ft=function(Gi){return I.test(Gi)},function(Gi,zn){Error.stackTraceLimit+=6,br(Gi,zn),Error.stackTraceLimit-=6}}var Tr=new Error;if(typeof Tr.stack=="string"&&Tr.stack.split(` +`)[0].indexOf("stackDetection@")>=0)return H=/@/,W=lr,re=!0,function(zn){zn.stack=new Error().stack};var Zn;try{throw new Error}catch(Gi){Zn="stack"in Gi}return!("stack"in Tr)&&Zn&&typeof Error.stackTraceLimit=="number"?(H=ot,W=lr,function(zn){Error.stackTraceLimit+=6;try{throw new Error}catch(pi){zn.stack=pi.stack}Error.stackTraceLimit-=6}):(W=function(Gi,zn){return typeof Gi=="string"?Gi:(typeof zn=="object"||typeof zn=="function")&&zn.name!==void 0&&zn.message!==void 0?zn.toString():Rr(zn)},null)}();typeof console<"u"&&typeof console.warn<"u"&&(K=function(vt){console.warn(vt)},m.isNode&&process.stderr.isTTY?K=function(vt,ot){var lr=ot?"\x1B[33m":"\x1B[31m";console.warn(lr+vt+`\x1B[0m +`)}:!m.isNode&&typeof new Error().stack=="string"&&(K=function(vt,ot){console.warn("%c"+vt,ot?"color: darkorange":"color: red")}));var or={warnings:ge,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return fe&&o.longStackTraces(),{asyncHooks:function(){return or.asyncHooks},longStackTraces:function(){return or.longStackTraces},warnings:function(){return or.warnings},cancellation:function(){return or.cancellation},monitoring:function(){return or.monitoring},propagateFromFunction:function(){return Se},boundValueFunction:function(){return je},checkForgottenReturns:ft,setBounds:Mr,warn:_r,deprecated:qt,CapturedTrace:ar,fireDomEvent:Pe,fireGlobalEvent:Fe}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(n,i,s){i.exports=function(o){function a(){return this.value}function l(){throw this.reason}o.prototype.return=o.prototype.thenReturn=function(u){return u instanceof o&&u.suppressUnhandledRejections(),this._then(a,void 0,void 0,{value:u},void 0)},o.prototype.throw=o.prototype.thenThrow=function(u){return this._then(l,void 0,void 0,{reason:u},void 0)},o.prototype.catchThrow=function(u){if(arguments.length<=1)return this._then(void 0,l,void 0,{reason:u},void 0);var d=arguments[1],f=function(){throw d};return this.caught(u,f)},o.prototype.catchReturn=function(u){if(arguments.length<=1)return u instanceof o&&u.suppressUnhandledRejections(),this._then(void 0,a,void 0,{value:u},void 0);var d=arguments[1];d instanceof o&&d.suppressUnhandledRejections();var f=function(){return d};return this.caught(u,f)}}},{}],11:[function(n,i,s){i.exports=function(o,a){var l=o.reduce,u=o.all;function d(){return u(this)}function f(m,v){return l(m,v,a,a)}o.prototype.each=function(m){return l(this,m,a,0)._then(d,void 0,void 0,this,void 0)},o.prototype.mapSeries=function(m){return l(this,m,a,a)},o.each=function(m,v){return l(m,v,a,0)._then(d,void 0,void 0,m,void 0)},o.mapSeries=f}},{}],12:[function(n,i,s){var o=n("./es5"),a=o.freeze,l=n("./util"),u=l.inherits,d=l.notEnumerableProp;function f(K,pe){function ge(fe){if(!(this instanceof ge))return new ge(fe);d(this,"message",typeof fe=="string"?fe:pe),d(this,"name",K),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(ge,Error),ge}var m,v,b=f("Warning","warning"),M=f("CancellationError","cancellation error"),O=f("TimeoutError","timeout error"),I=f("AggregateError","aggregate error");try{m=TypeError,v=RangeError}catch{m=f("TypeError","type error"),v=f("RangeError","range error")}for(var A="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),j=0;j1?j.cancelPromise._reject(H):j.cancelPromise._cancel(),j.cancelPromise=null,!0):!1}function O(){return A.call(this,this.promise._target()._settledValue())}function I(j){if(!M(this,j))return f.e=j,f}function A(j){var H=this.promise,W=this.handler;if(!this.called){this.called=!0;var re=this.isFinallyHandler()?W.call(H._boundValue()):W.call(H._boundValue(),j);if(re===l)return re;if(re!==void 0){H._setReturnedNonUndefined();var K=a(re,H);if(K instanceof o){if(this.cancelPromise!=null)if(K._isCancelled()){var pe=new d("late cancellation observer");return H._attachExtraTrace(pe),f.e=pe,f}else K.isPending()&&K._attachCancellationCallback(new b(this));return K._then(O,I,void 0,this,void 0)}}}return H.isRejected()?(M(this),f.e=j,f):(M(this),j)}return o.prototype._passThrough=function(j,H,W,re){return typeof j!="function"?this.then():this._then(W,re,void 0,new v(this,H,j),void 0)},o.prototype.lastly=o.prototype.finally=function(j){return this._passThrough(j,0,A,A)},o.prototype.tap=function(j){return this._passThrough(j,1,A)},o.prototype.tapCatch=function(j){var H=arguments.length;if(H===1)return this._passThrough(j,1,void 0,A);var W=new Array(H-1),re=0,K;for(K=0;K0&&typeof arguments[m]=="function"){v=arguments[m];var M}var b=[].slice.call(arguments);v&&b.pop();var M=new a(b).promise();return v!==void 0?M.spread(v):M}}},{"./util":36}],18:[function(n,i,s){i.exports=function(o,a,l,u,d,f){var m=n("./util"),v=m.tryCatch,b=m.errorObj,M=o._async;function O(A,j,H,W){this.constructor$(A),this._promise._captureStackTrace();var re=o._getContext();if(this._callback=m.contextBind(re,j),this._preservedValues=W===d?new Array(this.length()):null,this._limit=H,this._inFlight=0,this._queue=[],M.invoke(this._asyncInit,this,void 0),m.isArray(A))for(var K=0;K=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(K>=1&&this._inFlight>=K)return H[j]=A,this._queue.push(j),!1;re!==null&&(re[j]=A);var pe=this._promise,ge=this._callback,fe=pe._boundValue();pe._pushContext();var ee=v(ge).call(fe,A,j,W),be=pe._popContext();if(f.checkForgottenReturns(ee,be,re!==null?"Promise.filter":"Promise.map",pe),ee===b)return this._reject(ee.e),!0;var le=u(ee,this._promise);if(le instanceof o){le=le._target();var ve=le._bitField;if(ve&50397184)if(ve&33554432)ee=le._value();else return ve&16777216?(this._reject(le._reason()),!0):(this._cancel(),!0);else return K>=1&&this._inFlight++,H[j]=le,le._proxy(this,(j+1)*-1),!1}H[j]=ee}var Pe=++this._totalResolved;return Pe>=W?(re!==null?this._filter(H,re):this._resolve(H),!0):!1},O.prototype._drainQueue=function(){for(var A=this._queue,j=this._limit,H=this._values;A.length>0&&this._inFlight=1?re:0,new O(A,j,re,W).promise()}o.prototype.map=function(A,j){return I(this,A,j,null)},o.map=function(A,j,H,W){return I(A,j,H,W)}}},{"./util":36}],19:[function(n,i,s){i.exports=function(o,a,l,u,d){var f=n("./util"),m=f.tryCatch;o.method=function(v){if(typeof v!="function")throw new o.TypeError("expecting a function but got "+f.classString(v));return function(){var b=new o(a);b._captureStackTrace(),b._pushContext();var M=m(v).apply(this,arguments),O=b._popContext();return d.checkForgottenReturns(M,O,"Promise.method",b),b._resolveFromSyncValue(M),b}},o.attempt=o.try=function(v){if(typeof v!="function")return u("expecting a function but got "+f.classString(v));var b=new o(a);b._captureStackTrace(),b._pushContext();var M;if(arguments.length>1){d.deprecated("calling Promise.try with more than 1 argument");var O=arguments[1],I=arguments[2];M=f.isArray(O)?m(v).apply(I,O):m(v).call(I,O)}else M=m(v)();var A=b._popContext();return d.checkForgottenReturns(M,A,"Promise.try",b),b._resolveFromSyncValue(M),b},o.prototype._resolveFromSyncValue=function(v){v===f.errorObj?this._rejectCallback(v.e,!1):this._resolveCallback(v,!0)}}},{"./util":36}],20:[function(n,i,s){var o=n("./util"),a=o.maybeWrapAsError,l=n("./errors"),u=l.OperationalError,d=n("./es5");function f(M){return M instanceof Error&&d.getPrototypeOf(M)===Error.prototype}var m=/^(?:name|message|stack|cause)$/;function v(M){var O;if(f(M)){O=new u(M),O.name=M.name,O.message=M.message,O.stack=M.stack;for(var I=d.keys(M),A=0;A1){var et=new Array(je-1),yt=0,we;for(we=0;we0&&typeof Se!="function"&&typeof je!="function"){var et=".then() only accepts functions but was passed: "+f.classString(Se);arguments.length>1&&(et+=", "+f.classString(je)),this._warn(et)}return this._then(Se,je,void 0,void 0,void 0)},Je.prototype.done=function(Se,je){var et=this._then(Se,je,void 0,void 0,void 0);et._setIsFinal()},Je.prototype.spread=function(Se){return typeof Se!="function"?l("expecting a function but got "+f.classString(Se)):this.all()._then(Se,void 0,void 0,ee,void 0)},Je.prototype.toJSON=function(){var Se={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(Se.fulfillmentValue=this.value(),Se.isFulfilled=!0):this.isRejected()&&(Se.rejectionReason=this.reason(),Se.isRejected=!0),Se},Je.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new ve(this).promise()},Je.prototype.error=function(Se){return this.caught(f.originatesFromRejection,Se)},Je.getNewLibraryCopy=i.exports,Je.is=function(Se){return Se instanceof Je},Je.fromNode=Je.fromCallback=function(Se){var je=new Je(fe);je._captureStackTrace();var et=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,yt=rr(Se)(lt(je,et));return yt===pt&&je._rejectCallback(yt.e,!0),je._isFateSealed()||je._setAsyncGuaranteed(),je},Je.all=function(Se){return new ve(Se).promise()},Je.cast=function(Se){var je=le(Se);return je instanceof Je||(je=new Je(fe),je._captureStackTrace(),je._setFulfilled(),je._rejectionHandler0=Se),je},Je.resolve=Je.fulfilled=Je.cast,Je.reject=Je.rejected=function(Se){var je=new Je(fe);return je._captureStackTrace(),je._rejectCallback(Se,!0),je},Je.setScheduler=function(Se){if(typeof Se!="function")throw new pe("expecting a function but got "+f.classString(Se));return re.setScheduler(Se)},Je.prototype._then=function(Se,je,et,yt,we){var ft=we!==void 0,qt=ft?we:new Je(fe),_r=this._target(),rt=_r._bitField;ft||(qt._propagateFrom(this,3),qt._captureStackTrace(),yt===void 0&&this._bitField&2097152&&(rt&50397184?yt=this._boundValue():yt=_r===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,qt));var Xe=I();if(rt&50397184){var Ze,it,Xt=_r._settlePromiseCtx;rt&33554432?(it=_r._rejectionHandler0,Ze=Se):rt&16777216?(it=_r._fulfillmentHandler0,Ze=je,_r._unsetRejectionIsUnhandled()):(Xt=_r._settlePromiseLateCancellationObserver,it=new ge("late cancellation observer"),_r._attachExtraTrace(it),Ze=je),re.invoke(Xt,_r,{handler:f.contextBind(Xe,Ze),promise:qt,receiver:yt,value:it})}else _r._addCallbacks(Se,je,qt,yt,Xe);return qt},Je.prototype._length=function(){return this._bitField&65535},Je.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},Je.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},Je.prototype._setLength=function(Se){this._bitField=this._bitField&-65536|Se&65535},Je.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},Je.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},Je.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},Je.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},Je.prototype._isFinal=function(){return(this._bitField&4194304)>0},Je.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},Je.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},Je.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},Je.prototype._setAsyncGuaranteed=function(){if(!re.hasCustomScheduler()){var Se=this._bitField;this._bitField=Se|(Se&536870912)>>2^134217728}},Je.prototype._setNoAsyncGuarantee=function(){this._bitField=(this._bitField|536870912)&-134217729},Je.prototype._receiverAt=function(Se){var je=Se===0?this._receiver0:this[Se*4-4+3];if(je!==d)return je===void 0&&this._isBound()?this._boundValue():je},Je.prototype._promiseAt=function(Se){return this[Se*4-4+2]},Je.prototype._fulfillmentHandlerAt=function(Se){return this[Se*4-4+0]},Je.prototype._rejectionHandlerAt=function(Se){return this[Se*4-4+1]},Je.prototype._boundValue=function(){},Je.prototype._migrateCallback0=function(Se){Se._bitField;var je=Se._fulfillmentHandler0,et=Se._rejectionHandler0,yt=Se._promise0,we=Se._receiverAt(0);we===void 0&&(we=d),this._addCallbacks(je,et,yt,we,null)},Je.prototype._migrateCallbackAt=function(Se,je){var et=Se._fulfillmentHandlerAt(je),yt=Se._rejectionHandlerAt(je),we=Se._promiseAt(je),ft=Se._receiverAt(je);ft===void 0&&(ft=d),this._addCallbacks(et,yt,we,ft,null)},Je.prototype._addCallbacks=function(Se,je,et,yt,we){var ft=this._length();if(ft>=65531&&(ft=0,this._setLength(0)),ft===0)this._promise0=et,this._receiver0=yt,typeof Se=="function"&&(this._fulfillmentHandler0=f.contextBind(we,Se)),typeof je=="function"&&(this._rejectionHandler0=f.contextBind(we,je));else{var qt=ft*4-4;this[qt+2]=et,this[qt+3]=yt,typeof Se=="function"&&(this[qt+0]=f.contextBind(we,Se)),typeof je=="function"&&(this[qt+1]=f.contextBind(we,je))}return this._setLength(ft+1),ft},Je.prototype._proxy=function(Se,je){this._addCallbacks(void 0,void 0,je,Se,null)},Je.prototype._resolveCallback=function(Se,je){if(!(this._bitField&117506048)){if(Se===this)return this._rejectCallback(o(),!1);var et=le(Se,this);if(!(et instanceof Je))return this._fulfill(Se);je&&this._propagateFrom(et,2);var yt=et._target();if(yt===this){this._reject(o());return}var we=yt._bitField;if(we&50397184)if(we&33554432)this._fulfill(yt._value());else if(we&16777216)this._reject(yt._reason());else{var _r=new ge("late cancellation observer");yt._attachExtraTrace(_r),this._reject(_r)}else{var ft=this._length();ft>0&&yt._migrateCallback0(this);for(var qt=1;qt>>16)){if(Se===this){var et=o();return this._attachExtraTrace(et),this._reject(et)}this._setFulfilled(),this._rejectionHandler0=Se,(je&65535)>0&&(je&134217728?this._settlePromises():re.settlePromises(this),this._dereferenceTrace())}},Je.prototype._reject=function(Se){var je=this._bitField;if(!((je&117506048)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=Se,this._isFinal())return re.fatalError(Se,f.isNode);(je&65535)>0?re.settlePromises(this):this._ensurePossibleRejectionHandled()}},Je.prototype._fulfillPromises=function(Se,je){for(var et=1;et0){if(Se&16842752){var et=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,et,Se),this._rejectPromises(je,et)}else{var yt=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,yt,Se),this._fulfillPromises(je,yt)}this._setLength(0)}this._clearCancellationData()},Je.prototype._settledValue=function(){var Se=this._bitField;if(Se&33554432)return this._rejectionHandler0;if(Se&16777216)return this._fulfillmentHandler0},typeof Symbol<"u"&&Symbol.toStringTag&&H.defineProperty(Je.prototype,Symbol.toStringTag,{get:function(){return"Object"}});function pr(Se){this.promise._resolveCallback(Se)}function Ut(Se){this.promise._rejectCallback(Se,!1)}Je.defer=Je.pending=function(){We.deprecated("Promise.defer","new Promise");var Se=new Je(fe);return{promise:Se,resolve:pr,reject:Ut}},f.notEnumerableProp(Je,"_makeSelfResolutionError",o),n("./method")(Je,fe,le,l,We),n("./bind")(Je,fe,le,We),n("./cancel")(Je,ve,l,We),n("./direct_resolve")(Je),n("./synchronous_inspection")(Je),n("./join")(Je,ve,le,fe,re),Je.Promise=Je,Je.version="3.7.2",n("./call_get.js")(Je),n("./generators.js")(Je,l,fe,le,u,We),n("./map.js")(Je,ve,l,le,fe,We),n("./nodeify.js")(Je),n("./promisify.js")(Je,fe),n("./props.js")(Je,ve,le,l),n("./race.js")(Je,fe,le,l),n("./reduce.js")(Je,ve,l,le,fe,We),n("./settle.js")(Je,ve,We),n("./some.js")(Je,ve,l),n("./timers.js")(Je,fe,We),n("./using.js")(Je,l,le,Fe,fe,We),n("./any.js")(Je),n("./each.js")(Je,fe),n("./filter.js")(Je,fe),f.toFastProperties(Je),f.toFastProperties(Je.prototype);function tr(Se){var je=new Je(fe);je._fulfillmentHandler0=Se,je._rejectionHandler0=Se,je._promise0=Se,je._receiver0=Se}return tr({a:1}),tr({b:2}),tr({c:3}),tr(1),tr(function(){}),tr(void 0),tr(!1),tr(new Je(fe)),We.setBounds(W.firstLineError,f.lastLineError),Je}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(n,i,s){i.exports=function(o,a,l,u,d){var f=n("./util");f.isArray;function m(b){switch(b){case-2:return[];case-3:return{};case-6:return new Map}}function v(b){var M=this._promise=new o(a);b instanceof o&&(M._propagateFrom(b,3),b.suppressUnhandledRejections()),M._setOnCancel(this),this._values=b,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return f.inherits(v,d),v.prototype.length=function(){return this._length},v.prototype.promise=function(){return this._promise},v.prototype._init=function b(M,O){var I=l(this._values,this._promise);if(I instanceof o){I=I._target();var A=I._bitField;if(this._values=I,A&50397184)if(A&33554432)I=I._value();else return A&16777216?this._reject(I._reason()):this._cancel();else return this._promise._setAsyncGuaranteed(),I._then(b,this._reject,void 0,this,O)}if(I=f.asArray(I),I===null){var j=u("expecting an array or an iterable object but got "+f.classString(I)).reason();this._promise._rejectCallback(j,!1);return}if(I.length===0){O===-5?this._resolveEmptyArray():this._resolve(m(O));return}this._iterate(I)},v.prototype._iterate=function(b){var M=this.getActualLength(b.length);this._length=M,this._values=this.shouldCopyValues()?new Array(M):this._values;for(var O=this._promise,I=!1,A=null,j=0;j=this._length?(this._resolve(this._values),!0):!1},v.prototype._promiseCancelled=function(){return this._cancel(),!0},v.prototype._promiseRejected=function(b){return this._totalResolved++,this._reject(b),!0},v.prototype._resultCancelled=function(){if(!this._isResolved()){var b=this._values;if(this._cancel(),b instanceof o)b.cancel();else for(var M=0;M=this._length){var W;if(this._isMap)W=M(this._values);else{W={};for(var re=this.length(),K=0,pe=this.length();K>1};function I(A){var j,H=l(A);if(f(H))H instanceof o?j=H._then(o.props,void 0,void 0,void 0,void 0):j=new O(H).promise();else return u(`cannot await properties of a non-object + + See http://goo.gl/MqrFmX +`);return H instanceof o&&j._propagateFrom(H,2),j}o.prototype.props=function(){return I(this)},o.props=function(A){return I(A)}}},{"./es5":13,"./util":36}],26:[function(n,i,s){function o(l,u,d,f,m){for(var v=0;v"u"){var d=Oc.setImmediate,f=process.nextTick;a=o.isRecentNode?function(v){d.call(Oc,v)}:function(v){f.call(process,v)}}else if(typeof u=="function"&&typeof u.resolve=="function"){var m=u.resolve();a=function(v){m.then(v)}}else typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova))&&"classList"in document.documentElement?a=function(){var v=document.createElement("div"),b={attributes:!0},M=!1,O=document.createElement("div"),I=new MutationObserver(function(){v.classList.toggle("foo"),M=!1});I.observe(O,b);var A=function(){M||(M=!0,O.classList.toggle("foo"))};return function(H){var W=new MutationObserver(function(){W.disconnect(),H()});W.observe(v,b),A()}}():typeof setImmediate<"u"?a=function(v){setImmediate(v)}:typeof setTimeout<"u"?a=function(v){setTimeout(v,0)}:a=l;i.exports=a},{"./util":36}],30:[function(n,i,s){i.exports=function(o,a,l){var u=o.PromiseInspection,d=n("./util");function f(m){this.constructor$(m)}d.inherits(f,a),f.prototype._promiseResolved=function(m,v){this._values[m]=v;var b=++this._totalResolved;return b>=this._length?(this._resolve(this._values),!0):!1},f.prototype._promiseFulfilled=function(m,v){var b=new u;return b._bitField=33554432,b._settledValueField=m,this._promiseResolved(v,b)},f.prototype._promiseRejected=function(m,v){var b=new u;return b._bitField=16777216,b._settledValueField=m,this._promiseResolved(v,b)},o.settle=function(m){return l.deprecated(".settle()",".reflect()"),new f(m).promise()},o.allSettled=function(m){return new f(m).promise()},o.prototype.settle=function(){return o.settle(this)}}},{"./util":36}],31:[function(n,i,s){i.exports=function(o,a,l){var u=n("./util"),d=n("./errors").RangeError,f=n("./errors").AggregateError,m=u.isArray,v={};function b(O){this.constructor$(O),this._howMany=0,this._unwrap=!1,this._initialized=!1}u.inherits(b,a),b.prototype._init=function(){if(this._initialized){if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var O=m(this._values);!this._isResolved()&&O&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},b.prototype.init=function(){this._initialized=!0,this._init()},b.prototype.setUnwrap=function(){this._unwrap=!0},b.prototype.howMany=function(){return this._howMany},b.prototype.setHowMany=function(O){this._howMany=O},b.prototype._promiseFulfilled=function(O){return this._addFulfilled(O),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},b.prototype._promiseRejected=function(O){return this._addRejected(O),this._checkOutcome()},b.prototype._promiseCancelled=function(){return this._values instanceof o||this._values==null?this._cancel():(this._addRejected(v),this._checkOutcome())},b.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var O=new f,I=this.length();I0?this._reject(O):this._cancel(),!0}return!1},b.prototype._fulfilled=function(){return this._totalResolved},b.prototype._rejected=function(){return this._values.length-this.length()},b.prototype._addRejected=function(O){this._values.push(O)},b.prototype._addFulfilled=function(O){this._values[this._totalResolved++]=O},b.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},b.prototype._getRangeError=function(O){var I="Input array must contain at least "+this._howMany+" items but contains only "+O+" items";return new d(I)},b.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function M(O,I){if((I|0)!==I||I<0)return l(`expecting a positive integer + + See http://goo.gl/MqrFmX +`);var A=new b(O),j=A.promise();return A.setHowMany(I),A.init(),j}o.some=function(O,I){return M(O,I)},o.prototype.some=function(O){return M(this,O)},o._SomePromiseArray=b}},{"./errors":12,"./util":36}],32:[function(n,i,s){i.exports=function(o){function a(b){b!==void 0?(b=b._target(),this._bitField=b._bitField,this._settledValueField=b._isFateSealed()?b._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}a.prototype._settledValue=function(){return this._settledValueField};var l=a.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise + + See http://goo.gl/MqrFmX +`);return this._settledValue()},u=a.prototype.error=a.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise + + See http://goo.gl/MqrFmX +`);return this._settledValue()},d=a.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},f=a.prototype.isRejected=function(){return(this._bitField&16777216)!==0},m=a.prototype.isPending=function(){return(this._bitField&50397184)===0},v=a.prototype.isResolved=function(){return(this._bitField&50331648)!==0};a.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},o.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},o.prototype._isCancelled=function(){return this._target().__isCancelled()},o.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},o.prototype.isPending=function(){return m.call(this._target())},o.prototype.isRejected=function(){return f.call(this._target())},o.prototype.isFulfilled=function(){return d.call(this._target())},o.prototype.isResolved=function(){return v.call(this._target())},o.prototype.value=function(){return l.call(this._target())},o.prototype.reason=function(){var b=this._target();return b._unsetRejectionIsUnhandled(),u.call(b)},o.prototype._value=function(){return this._settledValue()},o.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},o.PromiseInspection=a}},{}],33:[function(n,i,s){i.exports=function(o,a){var l=n("./util"),u=l.errorObj,d=l.isObject;function f(I,A){if(d(I)){if(I instanceof o)return I;var j=v(I);if(j===u){A&&A._pushContext();var H=o.reject(j.e);return A&&A._popContext(),H}else if(typeof j=="function"){if(M(I)){var H=new o(a);return I._then(H._fulfill,H._reject,void 0,H,null),H}return O(I,j,A)}}return I}function m(I){return I.then}function v(I){try{return m(I)}catch(A){return u.e=A,u}}var b={}.hasOwnProperty;function M(I){try{return b.call(I,"_promise0")}catch{return!1}}function O(I,A,j){var H=new o(a),W=H;j&&j._pushContext(),H._captureStackTrace(),j&&j._popContext();var re=!0,K=l.tryCatch(A).call(I,pe,ge);re=!1,H&&K===u&&(H._rejectCallback(K.e,!0,!0),H=null);function pe(fe){H&&(H._resolveCallback(fe),H=null)}function ge(fe){H&&(H._rejectCallback(fe,re,!0),H=null)}return W}return f}},{"./util":36}],34:[function(n,i,s){i.exports=function(o,a,l){var u=n("./util"),d=o.TimeoutError;function f(I){this.handle=I}f.prototype._resultCancelled=function(){clearTimeout(this.handle)};var m=function(I){return v(+this).thenReturn(I)},v=o.delay=function(I,A){var j,H;return A!==void 0?(j=o.resolve(A)._then(m,null,null,I,void 0),l.cancellation()&&A instanceof o&&j._setOnCancel(A)):(j=new o(a),H=setTimeout(function(){j._fulfill()},+I),l.cancellation()&&j._setOnCancel(new f(H)),j._captureStackTrace()),j._setAsyncGuaranteed(),j};o.prototype.delay=function(I){return v(I,this)};var b=function(I,A,j){var H;typeof A!="string"?A instanceof Error?H=A:H=new d("operation timed out"):H=new d(A),u.markAsOriginatingFromRejection(H),I._attachExtraTrace(H),I._reject(H),j!=null&&j.cancel()};function M(I){return clearTimeout(this.handle),I}function O(I){throw clearTimeout(this.handle),I}o.prototype.timeout=function(I,A){I=+I;var j,H,W=new f(setTimeout(function(){j.isPending()&&b(j,A,H)},I));return l.cancellation()?(H=this.then(),j=H._then(M,O,void 0,W,void 0),j._setOnCancel(W)):j=this._then(M,O,void 0,W,void 0),j}}},{"./util":36}],35:[function(n,i,s){i.exports=function(o,a,l,u,d,f){var m=n("./util"),v=n("./errors").TypeError,b=n("./util").inherits,M=m.errorObj,O=m.tryCatch,I={};function A(ge){setTimeout(function(){throw ge},0)}function j(ge){var fe=l(ge);return fe!==ge&&typeof ge._isDisposable=="function"&&typeof ge._getDisposer=="function"&&ge._isDisposable()&&fe._setDisposable(ge._getDisposer()),fe}function H(ge,fe){var ee=0,be=ge.length,le=new o(d);function ve(){if(ee>=be)return le._fulfill();var Pe=j(ge[ee++]);if(Pe instanceof o&&Pe._isDisposable()){try{Pe=l(Pe._getDisposer().tryDispose(fe),ge.promise)}catch(Fe){return A(Fe)}if(Pe instanceof o)return Pe._then(ve,A,null,null,null)}ve()}return ve(),le}function W(ge,fe,ee){this._data=ge,this._promise=fe,this._context=ee}W.prototype.data=function(){return this._data},W.prototype.promise=function(){return this._promise},W.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():I},W.prototype.tryDispose=function(ge){var fe=this.resource(),ee=this._context;ee!==void 0&&ee._pushContext();var be=fe!==I?this.doDispose(fe,ge):null;return ee!==void 0&&ee._popContext(),this._promise._unsetDisposable(),this._data=null,be},W.isDisposer=function(ge){return ge!=null&&typeof ge.resource=="function"&&typeof ge.tryDispose=="function"};function re(ge,fe,ee){this.constructor$(ge,fe,ee)}b(re,W),re.prototype.doDispose=function(ge,fe){var ee=this.data();return ee.call(ge,ge,fe)};function K(ge){return W.isDisposer(ge)?(this.resources[this.index]._setDisposable(ge),ge.promise()):ge}function pe(ge){this.length=ge,this.promise=null,this[ge-1]=null}pe.prototype._resultCancelled=function(){for(var ge=this.length,fe=0;fe0},o.prototype._getDisposer=function(){return this._disposer},o.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},o.prototype.disposer=function(ge){if(typeof ge=="function")return new re(ge,this,u());throw new v}}},{"./errors":12,"./util":36}],36:[function(n,i,s){var o=n("./es5"),a=typeof navigator>"u",l={e:{}},u,d=typeof self<"u"?self:typeof window<"u"?window:typeof Oc<"u"?Oc:this!==void 0?this:null;function f(){try{var je=u;return u=null,je.apply(this,arguments)}catch(et){return l.e=et,l}}function m(je){return u=je,f}var v=function(je,et){var yt={}.hasOwnProperty;function we(){this.constructor=je,this.constructor$=et;for(var ft in et.prototype)yt.call(et.prototype,ft)&&ft.charAt(ft.length-1)!=="$"&&(this[ft+"$"]=et.prototype[ft])}return we.prototype=et.prototype,je.prototype=new we,je.prototype};function b(je){return je==null||je===!0||je===!1||typeof je=="string"||typeof je=="number"}function M(je){return typeof je=="function"||typeof je=="object"&&je!==null}function O(je){return b(je)?new Error(be(je)):je}function I(je,et){var yt=je.length,we=new Array(yt+1),ft;for(ft=0;ft1,we=et.length>0&&!(et.length===1&&et[0]==="constructor"),ft=re.test(je+"")&&o.names(je).length>0;if(yt||we||ft)return!0}return!1}catch{return!1}}function pe(je){function et(){}et.prototype=je;var yt=new et;function we(){return typeof yt.foo}return we(),we(),je}var ge=/^[a-z$_][a-z$_0-9]*$/i;function fe(je){return ge.test(je)}function ee(je,et,yt){for(var we=new Array(je),ft=0;ft10||je[0]>0}(),Se.nodeSupportsAsyncResource=Se.isNode&&function(){var je=!1;try{var et=n("async_hooks").AsyncResource;je=typeof et.prototype.runInAsyncScope=="function"}catch{je=!1}return je}(),Se.isNode&&Se.toFastProperties(process);try{throw new Error}catch(je){Se.lastLineError=je}i.exports=Se},{"./es5":13,async_hooks:void 0}]},{},[4])(4)}),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)})(d7e);var f7e=d7e.exports;const rC=[{name:"council",display:"Council District",geocoderColumn:"council_district",description:"The city council district number this address belongs to.",default:!1},{name:"neighborhood",display:"Neighborhood",geocoderColumn:"neighborhood_name",description:"The neighborhood name this address belongs to.",default:!1},{name:"master_plan_nhood",display:"Master Plan Neighborhood",geocoderColumn:"master_plan_nhood_name",description:"The master plan neighborhood this address belongs to.",default:!1},{name:"congressional_district",display:"Congressional District",geocoderColumn:"congressional_district",description:"The congressional district this address belongs to.",default:!1},{name:"county_commission_district",display:"County Commission District",geocoderColumn:"county_commission_district",description:"The county commission district this address belongs to.",default:!1},{name:"qct",display:"ARPA Qualified Census Tract",geocoderColumn:"is_qualified_census_tract",description:"These census tracts are qualified for...",default:!1},{name:"scout_car_area",display:"Police Scout Car Area",geocoderColumn:"scout_car_area",description:"The scout car area this address belongs to.",default:!1},{name:"related_parcel",display:"Related Parcel",geocoderColumn:"relatedparcel",description:"Any parcels related to this address via NEZ.",default:!1}];var cSt=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(n,i,s){r.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:s})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,i){if(1&i&&(n=r(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var o in n)r.d(s,o,(function(a){return n[a]}).bind(null,o));return s},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}([function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(1),i=r(2),s=r(3),o=n.forwardRef(({accept:a=".csv, text/csv",cssClass:l="csv-reader-input",cssInputClass:u="csv-input",cssLabelClass:d="csv-label",fileEncoding:f="UTF-8",inputId:m="react-csv-reader-input",inputName:v="react-csv-reader-input",inputStyle:b={},label:M,onError:O=()=>{},onFileLoaded:I,parserOptions:A={},disabled:j=!1,strict:H=!1},W)=>n.createElement("div",{className:l},M&&n.createElement("label",{className:d,htmlFor:m},M),n.createElement("input",{className:u,type:"file",id:m,name:v,style:b,accept:a,onChange:re=>{let K=new FileReader;const pe=re.target.files;if(pe.length>0){const ge={name:pe[0].name,size:pe[0].size,type:pe[0].type};if(H&&a.indexOf(ge.type)<=0)return void O(new Error(`[strict mode] Accept type not respected: got '${ge.type}' but not in '${a}'`));K.onload=fe=>{var ee;const be=s.parse(K.result,Object.assign(A,{error:O,encoding:f}));I((ee=be==null?void 0:be.data)!==null&&ee!==void 0?ee:[],ge,pe[0])},K.readAsText(pe[0],f)}},disabled:j,ref:W})));o.propTypes={accept:i.string,cssClass:i.string,cssInputClass:i.string,cssLabelClass:i.string,fileEncoding:i.string,inputId:i.string,inputName:i.string,inputStyle:i.object,label:i.oneOfType([i.string,i.element]),onError:i.func,onFileLoaded:i.func.isRequired,parserOptions:i.object,disabled:i.bool,strict:i.bool},e.default=o},function(t,e){t.exports=E},function(t,e){t.exports=H5e()},function(t,e,r){var n,i,s;/* @license +Papa Parse +v5.3.0 +https://github.com/mholt/PapaParse +License: MIT +*/i=[],(s=typeof(n=function o(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},l=!a.document&&!!a.postMessage,u=l&&/blob:/i.test((a.location||{}).protocol),d={},f=0,m={parse:function(be,le){var ve=(le=le||{}).dynamicTyping||!1;if(ee(ve)&&(le.dynamicTypingFunction=ve,ve={}),le.dynamicTyping=ve,le.transform=!!ee(le.transform)&&le.transform,le.worker&&m.WORKERS_SUPPORTED){var Pe=function(){if(!m.WORKERS_SUPPORTED)return!1;var We,He,Lt=(We=a.URL||a.webkitURL||null,He=o.toString(),m.BLOB_URL||(m.BLOB_URL=We.createObjectURL(new Blob(["(",He,")();"],{type:"text/javascript"})))),lt=new a.Worker(Lt);return lt.onmessage=re,lt.id=f++,d[lt.id]=lt}();return Pe.userStep=le.step,Pe.userChunk=le.chunk,Pe.userComplete=le.complete,Pe.userError=le.error,le.step=ee(le.step),le.chunk=ee(le.chunk),le.complete=ee(le.complete),le.error=ee(le.error),delete le.worker,void Pe.postMessage({input:be,config:le,workerId:Pe.id})}var Fe=null;return m.NODE_STREAM_INPUT,typeof be=="string"?Fe=le.download?new M(le):new I(le):be.readable===!0&&ee(be.read)&&ee(be.on)?Fe=new A(le):(a.File&&be instanceof File||be instanceof Object)&&(Fe=new O(le)),Fe.stream(be)},unparse:function(be,le){var ve=!1,Pe=!0,Fe=",",We=`\r +`,He='"',Lt=He+He,lt=!1,pt=null,rr=!1;(function(){if(typeof le=="object"){if(typeof le.delimiter!="string"||m.BAD_DELIMITERS.filter(function(tr){return le.delimiter.indexOf(tr)!==-1}).length||(Fe=le.delimiter),(typeof le.quotes=="boolean"||typeof le.quotes=="function"||Array.isArray(le.quotes))&&(ve=le.quotes),typeof le.skipEmptyLines!="boolean"&&typeof le.skipEmptyLines!="string"||(lt=le.skipEmptyLines),typeof le.newline=="string"&&(We=le.newline),typeof le.quoteChar=="string"&&(He=le.quoteChar),typeof le.header=="boolean"&&(Pe=le.header),Array.isArray(le.columns)){if(le.columns.length===0)throw new Error("Option columns is empty");pt=le.columns}le.escapeChar!==void 0&&(Lt=le.escapeChar+He),typeof le.escapeFormulae=="boolean"&&(rr=le.escapeFormulae)}})();var Tt=new RegExp(H(He),"g");if(typeof be=="string"&&(be=JSON.parse(be)),Array.isArray(be)){if(!be.length||Array.isArray(be[0]))return pr(null,be,lt);if(typeof be[0]=="object")return pr(pt||Je(be[0]),be,lt)}else if(typeof be=="object")return typeof be.data=="string"&&(be.data=JSON.parse(be.data)),Array.isArray(be.data)&&(be.fields||(be.fields=be.meta&&be.meta.fields),be.fields||(be.fields=Array.isArray(be.data[0])?be.fields:Je(be.data[0])),Array.isArray(be.data[0])||typeof be.data[0]=="object"||(be.data=[be.data])),pr(be.fields||[],be.data||[],lt);throw new Error("Unable to serialize unrecognized input");function Je(tr){if(typeof tr!="object")return[];var Se=[];for(var je in tr)Se.push(je);return Se}function pr(tr,Se,je){var et="";typeof tr=="string"&&(tr=JSON.parse(tr)),typeof Se=="string"&&(Se=JSON.parse(Se));var yt=Array.isArray(tr)&&0=this._config.preview;if(u)a.postMessage({results:We,workerId:m.WORKER_ID,finished:Lt});else if(ee(this._config.chunk)&&!ve){if(this._config.chunk(We,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);We=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(We.data),this._completeResults.errors=this._completeResults.errors.concat(We.errors),this._completeResults.meta=We.meta),this._completed||!Lt||!ee(this._config.complete)||We&&We.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Lt||We&&We.meta.paused||this._nextChunk(),We}this._halted=!0},this._sendError=function(le){ee(this._config.error)?this._config.error(le):u&&this._config.error&&a.postMessage({workerId:m.WORKER_ID,error:le,finished:!1})}}function M(be){var le;(be=be||{}).chunkSize||(be.chunkSize=m.RemoteChunkSize),b.call(this,be),this._nextChunk=l?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(ve){this._input=ve,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(le=new XMLHttpRequest,this._config.withCredentials&&(le.withCredentials=this._config.withCredentials),l||(le.onload=fe(this._chunkLoaded,this),le.onerror=fe(this._chunkError,this)),le.open(this._config.downloadRequestBody?"POST":"GET",this._input,!l),this._config.downloadRequestHeaders){var ve=this._config.downloadRequestHeaders;for(var Pe in ve)le.setRequestHeader(Pe,ve[Pe])}if(this._config.chunkSize){var Fe=this._start+this._config.chunkSize-1;le.setRequestHeader("Range","bytes="+this._start+"-"+Fe)}try{le.send(this._config.downloadRequestBody)}catch(We){this._chunkError(We.message)}l&&le.status===0&&this._chunkError()}},this._chunkLoaded=function(){le.readyState===4&&(le.status<200||400<=le.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:le.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(ve){var Pe=ve.getResponseHeader("Content-Range");return Pe===null?-1:parseInt(Pe.substring(Pe.lastIndexOf("/")+1))}(le),this.parseChunk(le.responseText)))},this._chunkError=function(ve){var Pe=le.statusText||ve;this._sendError(new Error(Pe))}}function O(be){var le,ve;(be=be||{}).chunkSize||(be.chunkSize=m.LocalChunkSize),b.call(this,be);var Pe=typeof FileReader<"u";this.stream=function(Fe){this._input=Fe,ve=Fe.slice||Fe.webkitSlice||Fe.mozSlice,Pe?((le=new FileReader).onload=fe(this._chunkLoaded,this),le.onerror=fe(this._chunkError,this)):le=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(Fe.target.result)},this._chunkError=function(){this._sendError(le.error)}}function I(be){var le;b.call(this,be=be||{}),this.stream=function(ve){return le=ve,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var ve,Pe=this._config.chunkSize;return Pe?(ve=le.substring(0,Pe),le=le.substring(Pe)):(ve=le,le=""),this._finished=!le,this.parseChunk(ve)}}}function A(be){b.call(this,be=be||{});var le=[],ve=!0,Pe=!1;this.pause=function(){b.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){b.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Fe){this._input=Fe,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Pe&&le.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),le.length?this.parseChunk(le.shift()):ve=!0},this._streamData=fe(function(Fe){try{le.push(typeof Fe=="string"?Fe:Fe.toString(this._config.encoding)),ve&&(ve=!1,this._checkIsFinished(),this.parseChunk(le.shift()))}catch(We){this._streamError(We)}},this),this._streamError=fe(function(Fe){this._streamCleanUp(),this._sendError(Fe)},this),this._streamEnd=fe(function(){this._streamCleanUp(),Pe=!0,this._streamData("")},this),this._streamCleanUp=fe(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function j(be){var le,ve,Pe,Fe=Math.pow(2,53),We=-Fe,He=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,Lt=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,lt=this,pt=0,rr=0,Tt=!1,Je=!1,pr=[],Ut={data:[],errors:[],meta:{}};if(ee(be.step)){var tr=be.step;be.step=function(ft){if(Ut=ft,et())je();else{if(je(),Ut.data.length===0)return;pt+=ft.data.length,be.preview&&pt>be.preview?ve.abort():(Ut.data=Ut.data[0],tr(Ut,lt))}}}function Se(ft){return be.skipEmptyLines==="greedy"?ft.join("").trim()==="":ft.length===1&&ft[0].length===0}function je(){if(Ut&&Pe&&(we("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+m.DefaultDelimiter+"'"),Pe=!1),be.skipEmptyLines)for(var ft=0;ft=pr.length?"__parsed_extra":pr[Ze]),be.transform&&(xr=be.transform(xr,Xt)),xr=yt(Xt,xr),Xt==="__parsed_extra"?(it[Xt]=it[Xt]||[],it[Xt].push(xr)):it[Xt]=xr}return be.header&&(Ze>pr.length?we("FieldMismatch","TooManyFields","Too many fields: expected "+pr.length+" fields but parsed "+Ze,rr+Xe):Ze=Ur.length/2?`\r +`:"\r"}(ft,rt)),Pe=!1,be.delimiter)ee(be.delimiter)&&(be.delimiter=be.delimiter(ft),Ut.meta.delimiter=be.delimiter);else{var Xe=function(it,Xt,xr,Ur,In){var Rr,mn,Kr,Ft;In=In||[","," ","|",";",m.RECORD_SEP,m.UNIT_SEP];for(var xt=0;xt=He)return xt(!0)}else for(Xt=pt,pt++;;){if((Xt=Tt.indexOf(le,Xt+1))===-1)return pr||we.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:yt.length,index:pt}),Kr();if(Xt===Ut-1)return Kr(Tt.substring(pt,Xt).replace(it,le));if(le!==lt||Tt[Xt+1]!==lt){if(le===lt||Xt===0||Tt[Xt-1]!==lt){Xe!==-1&&Xe=He)return xt(!0);break}we.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:yt.length,index:pt}),Xt++}}else Xt++}return Kr();function Rr(ar){yt.push(ar),qt=pt}function mn(ar){var ni=0;if(ar!==-1){var or=Tt.substring(Xt+1,ar);or&&or.trim()===""&&(ni=or.length)}return ni}function Kr(ar){return pr||(ar===void 0&&(ar=Tt.substring(pt)),ft.push(ar),pt=Ut,Rr(ft),et&&vr()),xt()}function Ft(ar){pt=ar,Rr(ft),ft=[],Ze=Tt.indexOf(Pe,pt)}function xt(ar){return{data:yt,errors:we,meta:{delimiter:ve,linebreak:Pe,aborted:rr,truncated:!!ar,cursor:qt+(Je||0)}}}function vr(){We(xt()),yt=[],we=[]}function Mr(ar,ni,or){var vt={nextDelim:void 0,quoteSearch:void 0},ot=Tt.indexOf(le,ni+1);if(nioe.jsxs(kn,{direction:"column",gap:"4",children:[oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsx(Ln,{weight:"medium",children:"Upload .csv"}),oe.jsx(hSt,{cssClass:"text-xs",parserOptions:{header:!0},onFileLoaded:(i,s)=>e(i)})]}),t&&oe.jsxs(kn,{direction:"column",children:[oe.jsx(Ln,{weight:"medium",children:".csv address column:"}),oe.jsxs(dw,{onValueChange:i=>{n(t.map(s=>s[i]))},children:[oe.jsx(fw,{}),oe.jsx(pw,{children:Object.keys(t[0]).map((i,s)=>oe.jsx(mw,{value:i,children:i},i))})]})]}),r.length>0&&oe.jsxs(kn,{direction:"column",children:[oe.jsx(Ln,{weight:"medium",children:"Sample values"}),oe.jsx("ul",{className:"list-disc list-inside",children:r.length>0&&J3.sample(r,3).map(i=>oe.jsx("li",{className:"p-0 m-0",children:oe.jsx(Ln,{size:"1",children:i})}))})]})]}),fSt=({setOptions:t,options:e})=>oe.jsxs(wZ,{value:e.mode==="manual"?"manual":"upload",onValueChange:r=>{t(n=>({...n,mode:r}))},gap:"1",size:"1",children:[oe.jsx(bC,{value:"manual",children:"manual"}),oe.jsx(bC,{value:"upload",children:"upload .csv"})]}),pSt=({options:t,setOptions:e})=>oe.jsxs(oe.Fragment,{children:[oe.jsxs(kl,{children:[oe.jsx(Ln,{weight:"bold",children:"Attach fields"}),oe.jsxs(kn,{gap:"4",pt:"1",children:[oe.jsx(Ln,{as:"label",size:"2",children:oe.jsxs(kn,{as:"span",gap:"2",children:[oe.jsx(Nj,{size:"1",defaultChecked:!0,onCheckedChange:()=>e({...t,coords:!t.coords})})," ","Coordinates (Lat/Lng)"]})}),oe.jsx(Ln,{as:"label",size:"2",children:oe.jsxs(kn,{as:"span",gap:"2",children:[oe.jsx(Nj,{size:"1",defaultChecked:!0,onCheckedChange:()=>e({...t,ids:!t.ids})})," ","Base Unit IDs"]})})]})]}),oe.jsxs(kl,{children:[oe.jsxs(kn,{items:"center",justify:"between",pb:"2",children:[oe.jsx(Ln,{weight:"bold",children:"Attach boundaries"}),oe.jsx("div",{className:"flex items-center gap-1",children:[!0,!1].map(r=>oe.jsx(Eu,{size:"1",onClick:()=>{let n={};rC.forEach(s=>{n[s.name]=r});let i={...t,...n}(i)},children:oe.jsx(Ln,{children:r?"All":"None"})},r))})]}),oe.jsx(gfe,{onValueChange:r=>{let n={};rC.forEach(i=>{n[i.name]=!1,r.includes(i.name)&&(n[i.name]=!0)}),e({...t,...n})},children:rC.map(r=>oe.jsx(yfe,{className:"checkbox-option flex items-center gap-1",value:r.name,checked:t[r.name],children:r.display},r.name))})]})]});var p7e={exports:{}},Gq={exports:{}};(function(t,e){(function(r,n){n(e,E)})(Oc,function(r,n){function i(ne,Te,ke,Ve,Et,at,Mt){try{var mr=ne[at](Mt),yr=mr.value}catch(wr){return void ke(wr)}mr.done?Te(yr):Promise.resolve(yr).then(Ve,Et)}function s(ne){return function(){var Te=this,ke=arguments;return new Promise(function(Ve,Et){var at=ne.apply(Te,ke);function Mt(yr){i(at,Ve,Et,Mt,mr,"next",yr)}function mr(yr){i(at,Ve,Et,Mt,mr,"throw",yr)}Mt(void 0)})}}function o(){return(o=Object.assign||function(ne){for(var Te=1;Te=0||(Et[ke]=ne[ke]);return Et}function l(ne){var Te=function(ke,Ve){if(typeof ke!="object"||ke===null)return ke;var Et=ke[Symbol.toPrimitive];if(Et!==void 0){var at=Et.call(ke,Ve);if(typeof at!="object")return at;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ke)}(ne,"string");return typeof Te=="symbol"?Te:String(Te)}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var u={init:"init"},d=function(ne){var Te=ne.value;return Te===void 0?"":Te},f=function(){return n.createElement(n.Fragment,null," ")},m={Cell:d,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function v(){for(var ne=arguments.length,Te=new Array(ne),ke=0;ke(at=typeof at=="number"?at:1/0)){var Mt=Et;Et=at,at=Mt}return ne.filter(function(mr){return Te.some(function(yr){var wr=mr.values[yr];return wr>=Et&&wr<=at})})};nt.autoRemove=function(ne){return!ne||typeof ne[0]!="number"&&typeof ne[1]!="number"};var Me=Object.freeze({__proto__:null,text:vt,exactText:ot,exactTextCase:lr,includes:br,includesAll:Tr,includesSome:Zn,includesValue:Gi,exact:zn,equals:pi,between:nt});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Ie=function(ne){ne.stateReducers.push(Be),ne.useInstance.push(ze)};function Be(ne,Te,ke,Ve){if(Te.type===u.init)return o({filters:[]},ne);if(Te.type===u.resetFilters)return o({},ne,{filters:Ve.initialState.filters||[]});if(Te.type===u.setFilter){var Et=Te.columnId,at=Te.filterValue,Mt=Ve.allColumns,mr=Ve.filterTypes,yr=Mt.find(function(Jr){return Jr.id===Et});if(!yr)throw new Error("React-Table: Could not find a column with id: "+Et);var wr=He(yr.filter,mr||{},Me),Gr=ne.filters.find(function(Jr){return Jr.id===Et}),Xr=A(at,Gr&&Gr.value);return Lt(wr.autoRemove,Xr,yr)?o({},ne,{filters:ne.filters.filter(function(Jr){return Jr.id!==Et})}):o({},ne,Gr?{filters:ne.filters.map(function(Jr){return Jr.id===Et?{id:Et,value:Xr}:Jr})}:{filters:[].concat(ne.filters,[{id:Et,value:Xr}])})}if(Te.type===u.setAllFilters){var on=Te.filters,Er=Ve.allColumns,tn=Ve.filterTypes;return o({},ne,{filters:A(on,ne.filters).filter(function(Jr){var Nn=Er.find(function(ui){return ui.id===Jr.id});return!Lt(He(Nn.filter,tn||{},Me).autoRemove,Jr.value,Nn)})})}}function ze(ne){var Te=ne.data,ke=ne.rows,Ve=ne.flatRows,Et=ne.rowsById,at=ne.allColumns,Mt=ne.filterTypes,mr=ne.manualFilters,yr=ne.defaultCanFilter,wr=yr!==void 0&&yr,Gr=ne.disableFilters,Xr=ne.state.filters,on=ne.dispatch,Er=ne.autoResetFilters,tn=Er===void 0||Er,Jr=n.useCallback(function(An,Ti){on({type:u.setFilter,columnId:An,filterValue:Ti})},[on]),Nn=n.useCallback(function(An){on({type:u.setAllFilters,filters:An})},[on]);at.forEach(function(An){var Ti=An.id,rs=An.accessor,gi=An.defaultCanFilter,Ii=An.disableFilters;An.canFilter=rs?ve(Ii!==!0&&void 0,Gr!==!0&&void 0,!0):ve(gi,wr,!1),An.setFilter=function(hi){return Jr(An.id,hi)};var ss=Xr.find(function(hi){return hi.id===Ti});An.filterValue=ss&&ss.value});var ui=n.useMemo(function(){if(mr||!Xr.length)return[ke,Ve,Et];var An=[],Ti={};return[function rs(gi,Ii){Ii===void 0&&(Ii=0);var ss=gi;return(ss=Xr.reduce(function(hi,us){var di=us.id,cs=us.value,ci=at.find(function(Qs){return Qs.id===di});if(!ci)return hi;Ii===0&&(ci.preFilteredRows=hi);var ns=He(ci.filter,Mt||{},Me);return ns?(ci.filteredRows=ns(hi,[di],cs),ci.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+ci.id+"."),hi)},gi)).forEach(function(hi){An.push(hi),Ti[hi.id]=hi,hi.subRows&&(hi.subRows=hi.subRows&&hi.subRows.length>0?rs(hi.subRows,Ii+1):hi.subRows)}),ss}(ke),An,Ti]},[mr,Xr,ke,Ve,Et,at,Mt]),wi=ui[0],Dn=ui[1],Wr=ui[2];n.useMemo(function(){at.filter(function(An){return!Xr.find(function(Ti){return Ti.id===An.id})}).forEach(function(An){An.preFilteredRows=wi,An.filteredRows=wi})},[wi,Xr,at]);var Fn=j(tn);W(function(){Fn()&&on({type:u.resetFilters})},[on,mr?null:Te]),Object.assign(ne,{preFilteredRows:ke,preFilteredFlatRows:Ve,preFilteredRowsById:Et,filteredRows:wi,filteredFlatRows:Dn,filteredRowsById:Wr,rows:wi,flatRows:Dn,rowsById:Wr,setFilter:Jr,setAllFilters:Nn})}Ie.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var At=function(ne){ne.stateReducers.push(zt),ne.useInstance.push(Yt)};function zt(ne,Te,ke,Ve){if(Te.type===u.resetGlobalFilter)return o({},ne,{globalFilter:Ve.initialState.globalFilter||void 0});if(Te.type===u.setGlobalFilter){var Et=Te.filterValue,at=Ve.userFilterTypes,Mt=He(Ve.globalFilter,at||{},Me),mr=A(Et,ne.globalFilter);return Lt(Mt.autoRemove,mr)?(ne.globalFilter,a(ne,["globalFilter"])):o({},ne,{globalFilter:mr})}}function Yt(ne){var Te=ne.data,ke=ne.rows,Ve=ne.flatRows,Et=ne.rowsById,at=ne.allColumns,Mt=ne.filterTypes,mr=ne.globalFilter,yr=ne.manualGlobalFilter,wr=ne.state.globalFilter,Gr=ne.dispatch,Xr=ne.autoResetGlobalFilter,on=Xr===void 0||Xr,Er=ne.disableGlobalFilter,tn=n.useCallback(function(Wr){Gr({type:u.setGlobalFilter,filterValue:Wr})},[Gr]),Jr=n.useMemo(function(){if(yr||wr===void 0)return[ke,Ve,Et];var Wr=[],Fn={},An=He(mr,Mt||{},Me);if(!An)return console.warn("Could not find a valid 'globalFilter' option."),ke;at.forEach(function(rs){var gi=rs.disableGlobalFilter;rs.canFilter=ve(gi!==!0&&void 0,Er!==!0&&void 0,!0)});var Ti=at.filter(function(rs){return rs.canFilter===!0});return[function rs(gi){return(gi=An(gi,Ti.map(function(Ii){return Ii.id}),wr)).forEach(function(Ii){Wr.push(Ii),Fn[Ii.id]=Ii,Ii.subRows=Ii.subRows&&Ii.subRows.length?rs(Ii.subRows):Ii.subRows}),gi}(ke),Wr,Fn]},[yr,wr,mr,Mt,at,ke,Ve,Et,Er]),Nn=Jr[0],ui=Jr[1],wi=Jr[2],Dn=j(on);W(function(){Dn()&&Gr({type:u.resetGlobalFilter})},[Gr,yr?null:Te]),Object.assign(ne,{preGlobalFilteredRows:ke,preGlobalFilteredFlatRows:Ve,preGlobalFilteredRowsById:Et,globalFilteredRows:Nn,globalFilteredFlatRows:ui,globalFilteredRowsById:wi,rows:Nn,flatRows:ui,rowsById:wi,setGlobalFilter:tn,disableGlobalFilter:Er})}function wt(ne,Te){return Te.reduce(function(ke,Ve){return ke+(typeof Ve=="number"?Ve:0)},0)}At.pluginName="useGlobalFilter";var ur=Object.freeze({__proto__:null,sum:wt,min:function(ne){var Te=ne[0]||0;return ne.forEach(function(ke){typeof ke=="number"&&(Te=Math.min(Te,ke))}),Te},max:function(ne){var Te=ne[0]||0;return ne.forEach(function(ke){typeof ke=="number"&&(Te=Math.max(Te,ke))}),Te},minMax:function(ne){var Te=ne[0]||0,ke=ne[0]||0;return ne.forEach(function(Ve){typeof Ve=="number"&&(Te=Math.min(Te,Ve),ke=Math.max(ke,Ve))}),Te+".."+ke},average:function(ne){return wt(0,ne)/ne.length},median:function(ne){if(!ne.length)return null;var Te=Math.floor(ne.length/2),ke=[].concat(ne).sort(function(Ve,Et){return Ve-Et});return ne.length%2!=0?ke[Te]:(ke[Te-1]+ke[Te])/2},unique:function(ne){return Array.from(new Set(ne).values())},uniqueCount:function(ne){return new Set(ne).size},count:function(ne){return ne.length}}),me=[],Ye={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var $t=function(ne){ne.getGroupByToggleProps=[Nt],ne.stateReducers.push(Jt),ne.visibleColumnsDeps.push(function(Te,ke){var Ve=ke.instance;return[].concat(Te,[Ve.state.groupBy])}),ne.visibleColumns.push(cr),ne.useInstance.push(Lr),ne.prepareRow.push(hn)};$t.pluginName="useGroupBy";var Nt=function(ne,Te){var ke=Te.header;return[ne,{onClick:ke.canGroupBy?function(Ve){Ve.persist(),ke.toggleGroupBy()}:void 0,style:{cursor:ke.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Jt(ne,Te,ke,Ve){if(Te.type===u.init)return o({groupBy:[]},ne);if(Te.type===u.resetGroupBy)return o({},ne,{groupBy:Ve.initialState.groupBy||[]});if(Te.type===u.setGroupBy)return o({},ne,{groupBy:Te.value});if(Te.type===u.toggleGroupBy){var Et=Te.columnId,at=Te.value,Mt=at!==void 0?at:!ne.groupBy.includes(Et);return o({},ne,Mt?{groupBy:[].concat(ne.groupBy,[Et])}:{groupBy:ne.groupBy.filter(function(mr){return mr!==Et})})}}function cr(ne,Te){var ke=Te.instance.state.groupBy,Ve=ke.map(function(at){return ne.find(function(Mt){return Mt.id===at})}).filter(Boolean),Et=ne.filter(function(at){return!ke.includes(at.id)});return(ne=[].concat(Ve,Et)).forEach(function(at){at.isGrouped=ke.includes(at.id),at.groupedIndex=ke.indexOf(at.id)}),ne}var Br={};function Lr(ne){var Te=ne.data,ke=ne.rows,Ve=ne.flatRows,Et=ne.rowsById,at=ne.allColumns,Mt=ne.flatHeaders,mr=ne.groupByFn,yr=mr===void 0?mi:mr,wr=ne.manualGroupBy,Gr=ne.aggregations,Xr=Gr===void 0?Br:Gr,on=ne.plugins,Er=ne.state.groupBy,tn=ne.dispatch,Jr=ne.autoResetGroupBy,Nn=Jr===void 0||Jr,ui=ne.disableGroupBy,wi=ne.defaultCanGroupBy,Dn=ne.getHooks;I(on,["useColumnOrder","useFilters"],"useGroupBy");var Wr=j(ne);at.forEach(function(ci){var ns=ci.accessor,Qs=ci.defaultGroupBy,ho=ci.disableGroupBy;ci.canGroupBy=ns?ve(ci.canGroupBy,ho!==!0&&void 0,ui!==!0&&void 0,!0):ve(ci.canGroupBy,Qs,wi,!1),ci.canGroupBy&&(ci.toggleGroupBy=function(){return ne.toggleGroupBy(ci.id)}),ci.Aggregated=ci.Aggregated||ci.Cell});var Fn=n.useCallback(function(ci,ns){tn({type:u.toggleGroupBy,columnId:ci,value:ns})},[tn]),An=n.useCallback(function(ci){tn({type:u.setGroupBy,value:ci})},[tn]);Mt.forEach(function(ci){ci.getGroupByToggleProps=b(Dn().getGroupByToggleProps,{instance:Wr(),header:ci})});var Ti=n.useMemo(function(){if(wr||!Er.length)return[ke,Ve,Et,me,Ye,Ve,Et];var ci=Er.filter(function(ea){return at.find(function(Ni){return Ni.id===ea})}),ns=[],Qs={},ho=[],jn={},$s=[],Mo={},Ji=function ea(Ni,xa,is){if(xa===void 0&&(xa=0),xa===ci.length)return Ni.map(function(Ru){return o({},Ru,{depth:xa})});var Es=ci[xa],Dl=yr(Ni,Es);return Object.entries(Dl).map(function(Ru,Yu){var jh=Ru[0],vl=Ru[1],sl=Es+":"+jh,_l=ea(vl,xa+1,sl=is?is+">"+sl:sl),Gl=xa?Fe(vl,"leafRows"):vl,Xu=function(ta,uu,cu){var pa={};return at.forEach(function(eo){if(ci.includes(eo.id))pa[eo.id]=uu[0]?uu[0].values[eo.id]:null;else{var Ju=typeof eo.aggregate=="function"?eo.aggregate:Xr[eo.aggregate]||ur[eo.aggregate];if(Ju){var bc=uu.map(function(Fl){return Fl.values[eo.id]}),ql=ta.map(function(Fl){var za=Fl.values[eo.id];if(!cu&&eo.aggregateValue){var Ot=typeof eo.aggregateValue=="function"?eo.aggregateValue:Xr[eo.aggregateValue]||ur[eo.aggregateValue];if(!Ot)throw console.info({column:eo}),new Error("React Table: Invalid column.aggregateValue option for column listed above");za=Ot(za,Fl,eo)}return za});pa[eo.id]=Ju(ql,bc)}else{if(eo.aggregate)throw console.info({column:eo}),new Error("React Table: Invalid column.aggregate option for column listed above");pa[eo.id]=null}}}),pa}(Gl,vl,xa),Lu={id:sl,isGrouped:!0,groupByID:Es,groupByVal:jh,values:Xu,subRows:_l,leafRows:Gl,depth:xa,index:Yu};return _l.forEach(function(ta){ns.push(ta),Qs[ta.id]=ta,ta.isGrouped?(ho.push(ta),jn[ta.id]=ta):($s.push(ta),Mo[ta.id]=ta)}),Lu})}(ke);return Ji.forEach(function(ea){ns.push(ea),Qs[ea.id]=ea,ea.isGrouped?(ho.push(ea),jn[ea.id]=ea):($s.push(ea),Mo[ea.id]=ea)}),[Ji,ns,Qs,ho,jn,$s,Mo]},[wr,Er,ke,Ve,Et,at,Xr,yr]),rs=Ti[0],gi=Ti[1],Ii=Ti[2],ss=Ti[3],hi=Ti[4],us=Ti[5],di=Ti[6],cs=j(Nn);W(function(){cs()&&tn({type:u.resetGroupBy})},[tn,wr?null:Te]),Object.assign(ne,{preGroupedRows:ke,preGroupedFlatRow:Ve,preGroupedRowsById:Et,groupedRows:rs,groupedFlatRows:gi,groupedRowsById:Ii,onlyGroupedFlatRows:ss,onlyGroupedRowsById:hi,nonGroupedFlatRows:us,nonGroupedRowsById:di,rows:rs,flatRows:gi,rowsById:Ii,toggleGroupBy:Fn,setGroupBy:An})}function hn(ne){ne.allCells.forEach(function(Te){var ke;Te.isGrouped=Te.column.isGrouped&&Te.column.id===ne.groupByID,Te.isPlaceholder=!Te.isGrouped&&Te.column.isGrouped,Te.isAggregated=!Te.isGrouped&&!Te.isPlaceholder&&((ke=ne.subRows)==null?void 0:ke.length)})}function mi(ne,Te){return ne.reduce(function(ke,Ve,Et){var at=""+Ve.values[Te];return ke[at]=Array.isArray(ke[at])?ke[at]:[],ke[at].push(Ve),ke},{})}var sn=/([0-9]+)/gm;function cn(ne,Te){return ne===Te?0:ne>Te?1:-1}function si(ne,Te,ke){return[ne.values[ke],Te.values[ke]]}function gn(ne){return typeof ne=="number"?isNaN(ne)||ne===1/0||ne===-1/0?"":String(ne):typeof ne=="string"?ne:""}var _i=Object.freeze({__proto__:null,alphanumeric:function(ne,Te,ke){var Ve=si(ne,Te,ke),Et=Ve[0],at=Ve[1];for(Et=gn(Et),at=gn(at),Et=Et.split(sn).filter(Boolean),at=at.split(sn).filter(Boolean);Et.length&&at.length;){var Mt=Et.shift(),mr=at.shift(),yr=parseInt(Mt,10),wr=parseInt(mr,10),Gr=[yr,wr].sort();if(isNaN(Gr[0])){if(Mt>mr)return 1;if(mr>Mt)return-1}else{if(isNaN(Gr[1]))return isNaN(yr)?-1:1;if(yr>wr)return 1;if(wr>yr)return-1}}return Et.length-at.length},datetime:function(ne,Te,ke){var Ve=si(ne,Te,ke),Et=Ve[0],at=Ve[1];return cn(Et=Et.getTime(),at=at.getTime())},basic:function(ne,Te,ke){var Ve=si(ne,Te,ke);return cn(Ve[0],Ve[1])},string:function(ne,Te,ke){var Ve=si(ne,Te,ke),Et=Ve[0],at=Ve[1];for(Et=Et.split("").filter(Boolean),at=at.split("").filter(Boolean);Et.length&&at.length;){var Mt=Et.shift(),mr=at.shift(),yr=Mt.toLowerCase(),wr=mr.toLowerCase();if(yr>wr)return 1;if(wr>yr)return-1;if(Mt>mr)return 1;if(mr>Mt)return-1}return Et.length-at.length},number:function(ne,Te,ke){var Ve=si(ne,Te,ke),Et=Ve[0],at=Ve[1],Mt=/[^0-9.]/gi;return cn(Et=Number(String(Et).replace(Mt,"")),at=Number(String(at).replace(Mt,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",m.sortType="alphanumeric",m.sortDescFirst=!1;var Xi=function(ne){ne.getSortByToggleProps=[Vi],ne.stateReducers.push(Ta),ne.useInstance.push(Oi)};Xi.pluginName="useSortBy";var Vi=function(ne,Te){var ke=Te.instance,Ve=Te.column,Et=ke.isMultiSortEvent,at=Et===void 0?function(Mt){return Mt.shiftKey}:Et;return[ne,{onClick:Ve.canSort?function(Mt){Mt.persist(),Ve.toggleSortBy(void 0,!ke.disableMultiSort&&at(Mt))}:void 0,style:{cursor:Ve.canSort?"pointer":void 0},title:Ve.canSort?"Toggle SortBy":void 0}]};function Ta(ne,Te,ke,Ve){if(Te.type===u.init)return o({sortBy:[]},ne);if(Te.type===u.resetSortBy)return o({},ne,{sortBy:Ve.initialState.sortBy||[]});if(Te.type===u.clearSortBy)return o({},ne,{sortBy:ne.sortBy.filter(function(Wr){return Wr.id!==Te.columnId})});if(Te.type===u.setSortBy)return o({},ne,{sortBy:Te.sortBy});if(Te.type===u.toggleSortBy){var Et,at=Te.columnId,Mt=Te.desc,mr=Te.multi,yr=Ve.allColumns,wr=Ve.disableMultiSort,Gr=Ve.disableSortRemove,Xr=Ve.disableMultiRemove,on=Ve.maxMultiSortColCount,Er=on===void 0?Number.MAX_SAFE_INTEGER:on,tn=ne.sortBy,Jr=yr.find(function(Wr){return Wr.id===at}).sortDescFirst,Nn=tn.find(function(Wr){return Wr.id===at}),ui=tn.findIndex(function(Wr){return Wr.id===at}),wi=Mt!=null,Dn=[];return(Et=!wr&&mr?Nn?"toggle":"add":ui!==tn.length-1||tn.length!==1?"replace":Nn?"toggle":"replace")!="toggle"||Gr||wi||mr&&Xr||!(Nn&&Nn.desc&&!Jr||!Nn.desc&&Jr)||(Et="remove"),Et==="replace"?Dn=[{id:at,desc:wi?Mt:Jr}]:Et==="add"?(Dn=[].concat(tn,[{id:at,desc:wi?Mt:Jr}])).splice(0,Dn.length-Er):Et==="toggle"?Dn=tn.map(function(Wr){return Wr.id===at?o({},Wr,{desc:wi?Mt:!Nn.desc}):Wr}):Et==="remove"&&(Dn=tn.filter(function(Wr){return Wr.id!==at})),o({},ne,{sortBy:Dn})}}function Oi(ne){var Te=ne.data,ke=ne.rows,Ve=ne.flatRows,Et=ne.allColumns,at=ne.orderByFn,Mt=at===void 0?Jo:at,mr=ne.sortTypes,yr=ne.manualSortBy,wr=ne.defaultCanSort,Gr=ne.disableSortBy,Xr=ne.flatHeaders,on=ne.state.sortBy,Er=ne.dispatch,tn=ne.plugins,Jr=ne.getHooks,Nn=ne.autoResetSortBy,ui=Nn===void 0||Nn;I(tn,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var wi=n.useCallback(function(gi){Er({type:u.setSortBy,sortBy:gi})},[Er]),Dn=n.useCallback(function(gi,Ii,ss){Er({type:u.toggleSortBy,columnId:gi,desc:Ii,multi:ss})},[Er]),Wr=j(ne);Xr.forEach(function(gi){var Ii=gi.accessor,ss=gi.canSort,hi=gi.disableSortBy,us=gi.id,di=Ii?ve(hi!==!0&&void 0,Gr!==!0&&void 0,!0):ve(wr,ss,!1);gi.canSort=di,gi.canSort&&(gi.toggleSortBy=function(ci,ns){return Dn(gi.id,ci,ns)},gi.clearSortBy=function(){Er({type:u.clearSortBy,columnId:gi.id})}),gi.getSortByToggleProps=b(Jr().getSortByToggleProps,{instance:Wr(),column:gi});var cs=on.find(function(ci){return ci.id===us});gi.isSorted=!!cs,gi.sortedIndex=on.findIndex(function(ci){return ci.id===us}),gi.isSortedDesc=gi.isSorted?cs.desc:void 0});var Fn=n.useMemo(function(){if(yr||!on.length)return[ke,Ve];var gi=[],Ii=on.filter(function(ss){return Et.find(function(hi){return hi.id===ss.id})});return[function ss(hi){var us=Mt(hi,Ii.map(function(di){var cs=Et.find(function(Qs){return Qs.id===di.id});if(!cs)throw new Error("React-Table: Could not find a column with id: "+di.id+" while sorting");var ci=cs.sortType,ns=Pe(ci)||(mr||{})[ci]||_i[ci];if(!ns)throw new Error("React-Table: Could not find a valid sortType of '"+ci+"' for column '"+di.id+"'.");return function(Qs,ho){return ns(Qs,ho,di.id,di.desc)}}),Ii.map(function(di){var cs=Et.find(function(ci){return ci.id===di.id});return cs&&cs.sortInverted?di.desc:!di.desc}));return us.forEach(function(di){gi.push(di),di.subRows&&di.subRows.length!==0&&(di.subRows=ss(di.subRows))}),us}(ke),gi]},[yr,on,ke,Ve,Et,Mt,mr]),An=Fn[0],Ti=Fn[1],rs=j(ui);W(function(){rs()&&Er({type:u.resetSortBy})},[yr?null:Te]),Object.assign(ne,{preSortedRows:ke,preSortedFlatRows:Ve,sortedRows:An,sortedFlatRows:Ti,rows:An,flatRows:Ti,setSortBy:wi,toggleSortBy:Dn})}function Jo(ne,Te,ke){return[].concat(ne).sort(function(Ve,Et){for(var at=0;atne.pageIndex?mr=Et===-1?at.length>=ne.pageSize:Mt-1),mr?o({},ne,{pageIndex:Mt}):ne}if(Te.type===u.setPageSize){var yr=Te.pageSize,wr=ne.pageSize*ne.pageIndex;return o({},ne,{pageIndex:Math.floor(wr/yr),pageSize:yr})}}function wo(ne){var Te=ne.rows,ke=ne.autoResetPage,Ve=ke===void 0||ke,Et=ne.manualExpandedKey,at=Et===void 0?"expanded":Et,Mt=ne.plugins,mr=ne.pageCount,yr=ne.paginateExpandedRows,wr=yr===void 0||yr,Gr=ne.expandSubRows,Xr=Gr===void 0||Gr,on=ne.state,Er=on.pageSize,tn=on.pageIndex,Jr=on.expanded,Nn=on.globalFilter,ui=on.filters,wi=on.groupBy,Dn=on.sortBy,Wr=ne.dispatch,Fn=ne.data,An=ne.manualPagination;I(Mt,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var Ti=j(Ve);W(function(){Ti()&&Wr({type:u.resetPage})},[Wr,An?null:Fn,Nn,ui,wi,Dn]);var rs=An?mr:Math.ceil(Te.length/Er),gi=n.useMemo(function(){return rs>0?[].concat(new Array(rs)).fill(null).map(function(ns,Qs){return Qs}):[]},[rs]),Ii=n.useMemo(function(){var ns;if(An)ns=Te;else{var Qs=Er*tn,ho=Qs+Er;ns=Te.slice(Qs,ho)}return wr?ns:We(ns,{manualExpandedKey:at,expanded:Jr,expandSubRows:Xr})},[Xr,Jr,at,An,tn,Er,wr,Te]),ss=tn>0,hi=rs===-1?Ii.length>=Er:tn-1&&at.push(Et.splice(yr,1)[0])};Et.length&&Ve.length;)Mt();return[].concat(at,Et)}function ln(ne){var Te=ne.dispatch;ne.setColumnOrder=n.useCallback(function(ke){return Te({type:u.setColumnOrder,columnOrder:ke})},[Te])}Hr.pluginName="useColumnOrder",m.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var xi=function(ne){ne.getResizerProps=[ms],ne.getHeaderProps.push({style:{position:"relative"}}),ne.stateReducers.push(Gn),ne.useInstance.push(kr),ne.useInstanceBeforeDimensions.push(ys)},ms=function(ne,Te){var ke=Te.instance,Ve=Te.header,Et=ke.dispatch,at=function(Mt,mr){var yr=!1;if(Mt.type==="touchstart"){if(Mt.touches&&Mt.touches.length>1)return;yr=!0}var wr,Gr,Xr=function(Dn){var Wr=[];return function Fn(An){An.columns&&An.columns.length&&An.columns.map(Fn),Wr.push(An)}(Dn),Wr}(mr).map(function(Dn){return[Dn.id,Dn.totalWidth]}),on=yr?Math.round(Mt.touches[0].clientX):Mt.clientX,Er=function(){window.cancelAnimationFrame(wr),wr=null,Et({type:u.columnDoneResizing})},tn=function(){window.cancelAnimationFrame(wr),wr=null,Et({type:u.columnResizing,clientX:Gr})},Jr=function(Dn){Gr=Dn,wr||(wr=window.requestAnimationFrame(tn))},Nn={mouse:{moveEvent:"mousemove",moveHandler:function(Dn){return Jr(Dn.clientX)},upEvent:"mouseup",upHandler:function(Dn){document.removeEventListener("mousemove",Nn.mouse.moveHandler),document.removeEventListener("mouseup",Nn.mouse.upHandler),Er()}},touch:{moveEvent:"touchmove",moveHandler:function(Dn){return Dn.cancelable&&(Dn.preventDefault(),Dn.stopPropagation()),Jr(Dn.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(Dn){document.removeEventListener(Nn.touch.moveEvent,Nn.touch.moveHandler),document.removeEventListener(Nn.touch.upEvent,Nn.touch.moveHandler),Er()}}},ui=yr?Nn.touch:Nn.mouse,wi=!!function(){if(typeof pt=="boolean")return pt;var Dn=!1;try{var Wr={get passive(){return Dn=!0,!1}};window.addEventListener("test",null,Wr),window.removeEventListener("test",null,Wr)}catch{Dn=!1}return pt=Dn}()&&{passive:!1};document.addEventListener(ui.moveEvent,ui.moveHandler,wi),document.addEventListener(ui.upEvent,ui.upHandler,wi),Et({type:u.columnStartResizing,columnId:mr.id,columnWidth:mr.totalWidth,headerIdWidths:Xr,clientX:on})};return[ne,{onMouseDown:function(Mt){return Mt.persist()||at(Mt,Ve)},onTouchStart:function(Mt){return Mt.persist()||at(Mt,Ve)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Gn(ne,Te){if(Te.type===u.init)return o({columnResizing:{columnWidths:{}}},ne);if(Te.type===u.resetResize)return o({},ne,{columnResizing:{columnWidths:{}}});if(Te.type===u.columnStartResizing){var ke=Te.clientX,Ve=Te.columnId,Et=Te.columnWidth,at=Te.headerIdWidths;return o({},ne,{columnResizing:o({},ne.columnResizing,{startX:ke,headerIdWidths:at,columnWidth:Et,isResizingColumn:Ve})})}if(Te.type===u.columnResizing){var Mt=Te.clientX,mr=ne.columnResizing,yr=mr.startX,wr=mr.columnWidth,Gr=mr.headerIdWidths,Xr=(Mt-yr)/wr,on={};return(Gr===void 0?[]:Gr).forEach(function(Er){var tn=Er[0],Jr=Er[1];on[tn]=Math.max(Jr+Jr*Xr,0)}),o({},ne,{columnResizing:o({},ne.columnResizing,{columnWidths:o({},ne.columnResizing.columnWidths,{},on)})})}return Te.type===u.columnDoneResizing?o({},ne,{columnResizing:o({},ne.columnResizing,{startX:null,isResizingColumn:null})}):void 0}xi.pluginName="useResizeColumns";var ys=function(ne){var Te=ne.flatHeaders,ke=ne.disableResizing,Ve=ne.getHooks,Et=ne.state.columnResizing,at=j(ne);Te.forEach(function(Mt){var mr=ve(Mt.disableResizing!==!0&&void 0,ke!==!0&&void 0,!0);Mt.canResize=mr,Mt.width=Et.columnWidths[Mt.id]||Mt.originalWidth||Mt.width,Mt.isResizing=Et.isResizingColumn===Mt.id,mr&&(Mt.getResizerProps=b(Ve().getResizerProps,{instance:at(),header:Mt}))})};function kr(ne){var Te=ne.plugins,ke=ne.dispatch,Ve=ne.autoResetResize,Et=Ve===void 0||Ve,at=ne.columns;I(Te,["useAbsoluteLayout"],"useResizeColumns");var Mt=j(Et);W(function(){Mt()&&ke({type:u.resetResize})},[at]);var mr=n.useCallback(function(){return ke({type:u.resetResize})},[ke]);Object.assign(ne,{resetResizing:mr})}var Un={position:"absolute",top:0},Ss=function(ne){ne.getTableBodyProps.push(go),ne.getRowProps.push(go),ne.getHeaderGroupProps.push(go),ne.getFooterGroupProps.push(go),ne.getHeaderProps.push(function(Te,ke){var Ve=ke.column;return[Te,{style:o({},Un,{left:Ve.totalLeft+"px",width:Ve.totalWidth+"px"})}]}),ne.getCellProps.push(function(Te,ke){var Ve=ke.cell;return[Te,{style:o({},Un,{left:Ve.column.totalLeft+"px",width:Ve.column.totalWidth+"px"})}]}),ne.getFooterProps.push(function(Te,ke){var Ve=ke.column;return[Te,{style:o({},Un,{left:Ve.totalLeft+"px",width:Ve.totalWidth+"px"})}]})};Ss.pluginName="useAbsoluteLayout";var go=function(ne,Te){return[ne,{style:{position:"relative",width:Te.instance.totalColumnsWidth+"px"}}]},Ks={display:"inline-block",boxSizing:"border-box"},Wc=function(ne,Te){return[ne,{style:{display:"flex",width:Te.instance.totalColumnsWidth+"px"}}]},Ps=function(ne){ne.getRowProps.push(Wc),ne.getHeaderGroupProps.push(Wc),ne.getFooterGroupProps.push(Wc),ne.getHeaderProps.push(function(Te,ke){var Ve=ke.column;return[Te,{style:o({},Ks,{width:Ve.totalWidth+"px"})}]}),ne.getCellProps.push(function(Te,ke){var Ve=ke.cell;return[Te,{style:o({},Ks,{width:Ve.column.totalWidth+"px"})}]}),ne.getFooterProps.push(function(Te,ke){var Ve=ke.column;return[Te,{style:o({},Ks,{width:Ve.totalWidth+"px"})}]})};function _s(ne){ne.getTableProps.push(xd),ne.getRowProps.push(wd),ne.getHeaderGroupProps.push(wd),ne.getFooterGroupProps.push(wd),ne.getHeaderProps.push(gs),ne.getCellProps.push(Hs),ne.getFooterProps.push(fa)}Ps.pluginName="useBlockLayout",_s.pluginName="useFlexLayout";var xd=function(ne,Te){return[ne,{style:{minWidth:Te.instance.totalColumnsMinWidth+"px"}}]},wd=function(ne,Te){return[ne,{style:{display:"flex",flex:"1 0 auto",minWidth:Te.instance.totalColumnsMinWidth+"px"}}]},gs=function(ne,Te){var ke=Te.column;return[ne,{style:{boxSizing:"border-box",flex:ke.totalFlexWidth?ke.totalFlexWidth+" 0 auto":void 0,minWidth:ke.totalMinWidth+"px",width:ke.totalWidth+"px"}}]},Hs=function(ne,Te){var ke=Te.cell;return[ne,{style:{boxSizing:"border-box",flex:ke.column.totalFlexWidth+" 0 auto",minWidth:ke.column.totalMinWidth+"px",width:ke.column.totalWidth+"px"}}]},fa=function(ne,Te){var ke=Te.column;return[ne,{style:{boxSizing:"border-box",flex:ke.totalFlexWidth?ke.totalFlexWidth+" 0 auto":void 0,minWidth:ke.totalMinWidth+"px",width:ke.totalWidth+"px"}}]};function _c(ne){ne.stateReducers.push(Zp),ne.getTableProps.push(xc),ne.getHeaderProps.push(Bh),ne.getRowProps.push(Nl)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",_c.pluginName="useGridLayout";var xc=function(ne,Te){var ke=Te.instance;return[ne,{style:{display:"grid",gridTemplateColumns:ke.visibleColumns.map(function(Ve){var Et;return ke.state.gridLayout.columnWidths[Ve.id]?ke.state.gridLayout.columnWidths[Ve.id]+"px":(Et=ke.state.columnResizing)!=null&&Et.isResizingColumn?ke.state.gridLayout.startWidths[Ve.id]+"px":typeof Ve.width=="number"?Ve.width+"px":Ve.width}).join(" ")}}]},Bh=function(ne,Te){var ke=Te.column;return[ne,{id:"header-cell-"+ke.id,style:{position:"sticky",gridColumn:"span "+ke.totalVisibleHeaderCount}}]},Nl=function(ne,Te){var ke=Te.row;return ke.isExpanded?[ne,{style:{gridColumn:"1 / "+(ke.cells.length+1)}}]:[ne,{}]};function Zp(ne,Te,ke,Ve){if(Te.type===u.init)return o({gridLayout:{columnWidths:{}}},ne);if(Te.type===u.resetResize)return o({},ne,{gridLayout:{columnWidths:{}}});if(Te.type===u.columnStartResizing){var Et=Te.columnId,at=Te.headerIdWidths,Mt=wc(Et);if(Mt!==void 0){var mr=Ve.visibleColumns.reduce(function(Wr,Fn){var An;return o({},Wr,((An={})[Fn.id]=wc(Fn.id),An))},{}),yr=Ve.visibleColumns.reduce(function(Wr,Fn){var An;return o({},Wr,((An={})[Fn.id]=Fn.minWidth,An))},{}),wr=Ve.visibleColumns.reduce(function(Wr,Fn){var An;return o({},Wr,((An={})[Fn.id]=Fn.maxWidth,An))},{}),Gr=at.map(function(Wr){var Fn=Wr[0];return[Fn,wc(Fn)]});return o({},ne,{gridLayout:o({},ne.gridLayout,{startWidths:mr,minWidths:yr,maxWidths:wr,headerIdGridWidths:Gr,columnWidth:Mt})})}return ne}if(Te.type===u.columnResizing){var Xr=Te.clientX,on=ne.columnResizing.startX,Er=ne.gridLayout,tn=Er.columnWidth,Jr=Er.minWidths,Nn=Er.maxWidths,ui=Er.headerIdGridWidths,wi=(Xr-on)/tn,Dn={};return(ui===void 0?[]:ui).forEach(function(Wr){var Fn=Wr[0],An=Wr[1];Dn[Fn]=Math.min(Math.max(Jr[Fn],An+An*wi),Nn[Fn])}),o({},ne,{gridLayout:o({},ne.gridLayout,{columnWidths:o({},ne.gridLayout.columnWidths,{},Dn)})})}return Te.type===u.columnDoneResizing?o({},ne,{gridLayout:o({},ne.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function wc(ne){var Te,ke=(Te=document.getElementById("header-cell-"+ne))==null?void 0:Te.offsetWidth;if(ke!==void 0)return ke}r._UNSTABLE_usePivotColumns=aa,r.actions=u,r.defaultColumn=m,r.defaultGroupByFn=mi,r.defaultOrderByFn=Jo,r.defaultRenderer=d,r.emptyRenderer=f,r.ensurePluginOrder=I,r.flexRender=K,r.functionalUpdate=A,r.loopHooks=O,r.makePropGetter=b,r.makeRenderer=re,r.reduceHooks=M,r.safeUseLayoutEffect=H,r.useAbsoluteLayout=Ss,r.useAsyncDebounce=function(ne,Te){Te===void 0&&(Te=0);var ke=n.useRef({}),Ve=j(ne),Et=j(Te);return n.useCallback(function(){var at=s(regeneratorRuntime.mark(function Mt(){var mr,yr,wr,Gr=arguments;return regeneratorRuntime.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:for(mr=Gr.length,yr=new Array(mr),wr=0;wr1?Te-1:0),Ve=1;Ve{let o=[{accessor:"input",Header:"Input",Cell:ee=>oe.jsx("div",{className:"w-32",children:ee.value})},{accessor:"StAddr",Header:"Match",Cell:ee=>ee.value!==""?oe.jsx("div",{className:"w-32",children:oe.jsx("span",{className:"",children:ee.value})}):oe.jsx("div",{className:"w-32",children:oe.jsx($Y,{className:"ml-1 text-gray-500 hover:text-gray-700",onClick:()=>{i(ee.row.values.input)}})})},{accessor:"AddNum",Header:"Street #",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"StPreDir",Header:"Street Prefix",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"StName",Header:"Street Name",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"StType",Header:"Street Type",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"UnitType",Header:"Unit Type",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"UnitName",Header:"Unit Name",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})},{accessor:"Postal",Header:"Zip Code",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value})}];r.ids&&(o=o.concat([{accessor:"address_id",Header:"Address ID",Cell:ee=>oe.jsx("a",{target:"_blank",href:`/map?id=${ee.value}&layer=address`,children:ee.value})},{accessor:"building_id",Header:"Building ID",Cell:ee=>oe.jsx("a",{target:"_blank",href:`/map?id=${ee.value}&layer=building`,children:ee.value})},{accessor:"parcel_id",maxWidth:15,Header:"Parcel ID",Cell:ee=>oe.jsx("a",{target:"_blank",href:`/map?id=${ee.value}&layer=parcel`,children:ee.value})},{accessor:"street_id",Header:"Street ID",Cell:ee=>oe.jsx("a",{target:"_blank",href:`/map?id=${ee.value}&layer=street`,children:ee.value})}])),r.coords&&(o=o.concat([{accessor:ee=>ee.Y.toFixed(5),Header:"Lat",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value>0?ee.value:null})},{accessor:ee=>ee.X.toFixed(5),Header:"Lon",Cell:ee=>oe.jsx("span",{className:"tracking-tight",children:ee.value<0?ee.value:null})}])),n.forEach(ee=>{r[ee.name]&&o.push({accessor:ee.geocoderColumn,Header:ee.display})}),t.forEach((ee,be)=>{ee.attributes.input=e[be],ee.attributes.address_id===0&&(ee.attributes.address_id=null)});let a=E.useMemo(()=>o,[t,r]),l=E.useMemo(()=>t.map(ee=>ee.attributes),[t]);const{getTableProps:u,getTableBodyProps:d,headerGroups:f,rows:m,prepareRow:v,page:b,canPreviousPage:M,canNextPage:O,pageOptions:I,pageCount:A,gotoPage:j,nextPage:H,previousPage:W,setPageSize:re,state:{pageIndex:K,pageSize:pe}}=LP.useTable({columns:a,data:l,initialState:{pageIndex:0,pageSize:10}},LP.usePagination);let ge=m.map((ee,be)=>{let le={...ee.values};return le.Address=le.StAddr,delete le.StAddr,le["Street Number"]=le.AddNum,delete le.AddNum,le["Street Prefix"]=le.StPreDir,delete le.StPreDir,le["Street Name"]=le.StName,delete le.StName,le["Street Type"]=le.StType,delete le.StType,le["Unit Type"]=le.UnitType,delete le.UnitType,le["Unit Number"]=le.UnitName,delete le.UnitName,le["Zip Code"]=le.Postal,delete le.Postal,le.parcel_id&&(le.parcel_id=`=""${le.parcel_id}""`),s&&(le={...s[be],...le}),le}),fe=m.map((ee,be)=>{let le={...ee.values};return le.Address=le.StAddr,delete le.StAddr,le["Street Number"]=le.AddNum,delete le.AddNum,le["Street Prefix"]=le.StPreDir,delete le.StPreDir,le["Street Name"]=le.StName,delete le.StName,le["Street Type"]=le.StType,delete le.StType,le["Unit Type"]=le.UnitType,delete le.UnitType,le["Unit Number"]=le.UnitName,delete le.UnitName,le["Zip Code"]=le.Postal,delete le.Postal,le.parcel_id&&(le.parcel_id=`${le.parcel_id}`),s&&(le={...s[be],...le}),le});return oe.jsxs(kn,{direction:"column",p:"2",gap:"2",className:"overflow-auto",children:[oe.jsx(Ln,{size:"4",children:"Results"}),oe.jsxs(kn,{direction:{initial:"column",sm:"row"},gap:"3",align:{initial:"start",sm:"center"},justify:"start",children:[oe.jsxs(Ln,{size:"1",weight:"bold",children:[t.filter(ee=>ee.attributes.StAddr!=="").length,"/",e.length," matches"]}),oe.jsxs(Ln,{size:"1",weight:"medium",children:[(t.filter(ee=>ee.attributes.StAddr!=="").length*100/e.length).toFixed(1),"% rate"]}),oe.jsx(nP,{data:ge,filename:`geocode_results_${new Date().getTime()}.csv`,children:oe.jsxs(Eu,{active:t.length>0,disabled:t.length===0,size:"1",children:[oe.jsx(IA,{}),oe.jsx(Ln,{children:"Download .csv for Excel"})]})}),oe.jsx(nP,{data:fe,filename:`geocode_results_${new Date().getTime()}.csv`,children:oe.jsxs(Eu,{active:t.length>0,disabled:t.length===0,size:"1",children:[oe.jsx(IA,{}),oe.jsx(Ln,{children:"Download .csv"})]})})]}),oe.jsx("div",{className:"overflow-auto",children:oe.jsxs("table",{...u(),className:"text-xs overflow-auto",children:[oe.jsx("thead",{children:f.map(ee=>oe.jsxs("tr",{...ee.getHeaderGroupProps(),children:[ee.headers.map(be=>oe.jsx("th",{...be.getHeaderProps(),className:"bg-gray-300 p-2 text-gray-600 tracking-tight leading-3 text-left border-r-2 border-gray-100",children:be.render("Header")})),oe.jsx("th",{})]}))}),oe.jsx("tbody",{...d(),children:b.map((ee,be)=>(v(ee),oe.jsx("tr",{...ee.getRowProps(),className:ee.values.StAddr===""?"bg-red-50 h-12":"h-12",children:ee.cells.map(le=>oe.jsx("td",{...le.getCellProps(),className:"px-2 border border-bottom-1",children:le.render("Cell")}))})))})]})}),oe.jsxs(kn,{align:"center",justify:"between",children:[oe.jsxs("div",{children:[oe.jsx("button",{className:"bg-gray-300 hover:bg-gray-200 p-3",onClick:()=>j(0),disabled:!M,children:oe.jsx(Tge,{})}),oe.jsx("button",{className:"bg-gray-300 hover:bg-gray-200 p-3",onClick:()=>W(),disabled:!M,children:oe.jsx(Sge,{})})]}),oe.jsxs("div",{children:[oe.jsxs("strong",{children:[K+1," of ",I.length]})," ",oe.jsxs("span",{children:["| Go to page:",oe.jsx("input",{type:"number",defaultValue:K+1,onChange:ee=>{const be=ee.target.value?Number(ee.target.value)-1:0;j(be)},className:"p-2 w-24"})]})]}),oe.jsxs("div",{className:"flex items-center",children:[oe.jsx("button",{onClick:()=>H(),disabled:!O,className:"bg-gray-300 hover:bg-gray-200 p-3",children:oe.jsx(p2,{})}),oe.jsx("button",{onClick:()=>j(A-1),disabled:!O,className:"bg-gray-300 hover:bg-gray-200 p-3",children:oe.jsx(PY,{})})]})]})]})},ySt=({setAddresses:t})=>{let[e,r]=E.useState("");const n=E.useMemo(()=>e.split(` +`).filter(i=>i!==""));return E.useEffect(()=>{t(n)},[e]),oe.jsxs(oe.Fragment,{children:[oe.jsx(Ln,{weight:"medium",children:"Type one address per line"}),oe.jsx(Rpe,{value:e,rows:8,type:"text",onChange:i=>r(i.target.value)})]})},vSt=(t,e,r)=>{let n=[],i=[],s=t.map((l,u)=>({OBJECTID:u+1,SingleLine:l}));const o=1e3;let a=[];for(let l=0;lYpt(l),{concurrency:3}).each(l=>{n=n.concat(l.locations);for(let u in n)if(n[u].score==0){let d=n[u].attributes.ResultID-1,m={attributes:{failed_address:t[d]}};i=i.concat(m)}}).then(()=>e(n.sort((l,u)=>l.attributes.ResultID-u.attributes.ResultID))).then(()=>r(i))},_St=({session:t,setSession:e,login:r,setLogin:n})=>{let[i,s]=E.useState(null),[o,a]=E.useState([]),l={mode:"upload",matched:!0,coords:!0,ids:!0};rC.forEach(j=>{l[j.name]=j.default});let[u,d]=E.useState(l),[f,m]=E.useState([]),[v,b]=E.useState([]),[M,O]=E.useState([]),[I,A]=E.useState(!1);return E.useEffect(()=>{s(null),a([]),m([]),b([]),O([])},[u.mode]),E.useEffect(()=>{b([]),m([]),O([])},[i]),E.useEffect(()=>{f.length>0&&(vSt(o,b,O),A(!0))},[f]),E.useEffect(()=>{I&&M.length>0&&(console.log(M),O([]))},[M]),E.useEffect(()=>{A(!1)},[o]),oe.jsx(oe.Fragment,{children:oe.jsxs(B5,{columns:{initial:"1fr",sm:"1fr 3fr"},gap:{initial:"0",sm:"4"},p:{initial:"0",sm:"2",lg:"4"},children:[oe.jsxs(kn,{direction:"column",className:"min-w-96",gap:"2",children:[oe.jsx(Ln,{size:"5",children:"Geocoder"}),oe.jsx(kl,{children:oe.jsxs(kn,{gap:"2",direction:"column",children:[oe.jsx(Ln,{weight:"bold",children:"Address input"}),oe.jsx(fSt,{setOptions:d,options:u}),u.mode==="upload"&&oe.jsx(dSt,{setCsv:s,csv:i,addresses:o,setAddresses:a}),u.mode==="manual"&&oe.jsx(ySt,{setAddresses:a})]})}),oe.jsx(pSt,{options:u,setOptions:d}),o.length>0&&!I&&oe.jsxs(Eu,{size:"1",active:o.length>0,onClick:()=>{o.length>0&&m(o)},children:[oe.jsx(Ln,{children:o.length>0?f.length>0&&v.length===0?"Geocoding...":`Geocode ${o.length} addresses`:"Input addresses to geocode"}),oe.jsx(kY,{})]})]}),v.length>0&&oe.jsx(gSt,{results:v,addresses:f,options:u,geocoderFields:rC,setUnmatchedAddr:O,csv:i})]})})},xSt=({geom:t,setGeom:e})=>{const[r,n]=E.useState(""),{address:i,feature:s,loading:o,error:a,changeAddress:l}=A5e();E.useEffect(()=>{s&&!o&&Tw({url:Hi.parcel.endpoint,where:`${Hi.parcel.id_column} = '${s.attributes.parcel_id}'`,outFields:"*",resultRecordCount:1,outSR:4326,f:"json"}).then(d=>{if(d.features.length>0)e(TO(d));else if(s!=null&&s.score){let f={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[s.location.x,s.location.y]}}]};e(f)}else console.log("No features found.")})},[s]);const u=d=>{d.key==="Enter"&&l(r)};return oe.jsxs(kl,{children:[oe.jsx(Ln,{weight:"medium",children:"Search for an address:"}),oe.jsxs(kn,{align:"center",gap:"2",children:[oe.jsx(w$,{className:"p-3 w-full bg-",type:"text",onChange:d=>n(d.target.value),onKeyDown:u,children:oe.jsx(TZ,{})}),oe.jsx(Eu,{size:"1",onClick:()=>l(r),children:"Search"})]})]})};function m7e(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const r=[1/0,1/0,-1/0,-1/0];return OY(t,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(F,g,_){return u=l()?Reflect.construct:function(w,k,G){var te=[null];te.push.apply(te,k);var ue=new(Function.bind.apply(w,te));return G&&a(ue,G.prototype),ue},u.apply(null,arguments)}function d(F){var g=typeof Map=="function"?new Map:void 0;return d=function(_){if(_===null||(w=_,Function.toString.call(w).indexOf("[native code]")===-1))return _;var w;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(g!==void 0){if(g.has(_))return g.get(_);g.set(_,k)}function k(){return u(_,arguments,o(this).constructor)}return k.prototype=Object.create(_.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),a(k,_)},d(F)}function f(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function m(F,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(F)}function v(F){var g=l();return function(){var _,w=o(F);if(g){var k=o(this).constructor;_=Reflect.construct(w,arguments,k)}else _=w.apply(this,arguments);return m(this,_)}}function b(F,g,_){return b=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(w,k,G){var te=function(Ce,Ue){for(;!Object.prototype.hasOwnProperty.call(Ce,Ue)&&(Ce=o(Ce))!==null;);return Ce}(w,k);if(te){var ue=Object.getOwnPropertyDescriptor(te,k);return ue.get?ue.get.call(G):ue.value}},b(F,g,_||F)}function M(F){return function(g){if(Array.isArray(g))return I(g)}(F)||function(g){if(typeof Symbol<"u"&&g[Symbol.iterator]!=null||g["@@iterator"]!=null)return Array.from(g)}(F)||O(F)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function O(F,g){if(F){if(typeof F=="string")return I(F,g);var _=Object.prototype.toString.call(F).slice(8,-1);return _==="Object"&&F.constructor&&(_=F.constructor.name),_==="Map"||_==="Set"?Array.from(F):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?I(F,g):void 0}}function I(F,g){(g==null||g>F.length)&&(g=F.length);for(var _=0,w=new Array(g);_=F.length?{done:!0}:{done:!1,value:F[w++]}},e:function(Ce){throw Ce},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G,te=!0,ue=!1;return{s:function(){_=_.call(F)},n:function(){var Ce=_.next();return te=Ce.done,Ce},e:function(Ce){ue=!0,G=Ce},f:function(){try{te||_.return==null||_.return()}finally{if(ue)throw G}}}}var j=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getEndCapStyle",value:function(){return this._endCapStyle}},{key:"isSingleSided",value:function(){return this._isSingleSided}},{key:"setQuadrantSegments",value:function(g){this._quadrantSegments=g,this._quadrantSegments===0&&(this._joinStyle=F.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=F.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),g<=0&&(this._quadrantSegments=1),this._joinStyle!==F.JOIN_ROUND&&(this._quadrantSegments=F.DEFAULT_QUADRANT_SEGMENTS)}},{key:"getJoinStyle",value:function(){return this._joinStyle}},{key:"setJoinStyle",value:function(g){this._joinStyle=g}},{key:"setSimplifyFactor",value:function(g){this._simplifyFactor=g<0?0:g}},{key:"getSimplifyFactor",value:function(){return this._simplifyFactor}},{key:"getQuadrantSegments",value:function(){return this._quadrantSegments}},{key:"setEndCapStyle",value:function(g){this._endCapStyle=g}},{key:"getMitreLimit",value:function(){return this._mitreLimit}},{key:"setMitreLimit",value:function(g){this._mitreLimit=g}},{key:"setSingleSided",value:function(g){this._isSingleSided=g}}],[{key:"constructor_",value:function(){if(this._quadrantSegments=F.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=F.CAP_ROUND,this._joinStyle=F.JOIN_ROUND,this._mitreLimit=F.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=F.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var g=arguments[0];this.setQuadrantSegments(g)}else if(arguments.length===2){var _=arguments[0],w=arguments[1];this.setQuadrantSegments(_),this.setEndCapStyle(w)}else if(arguments.length===4){var k=arguments[0],G=arguments[1],te=arguments[2],ue=arguments[3];this.setQuadrantSegments(k),this.setEndCapStyle(G),this.setJoinStyle(te),this.setMitreLimit(ue)}}}},{key:"bufferDistanceError",value:function(g){var _=Math.PI/2/g;return 1-Math.cos(_/2)}}]),F}();j.CAP_ROUND=1,j.CAP_FLAT=2,j.CAP_SQUARE=3,j.JOIN_ROUND=1,j.JOIN_MITRE=2,j.JOIN_BEVEL=3,j.DEFAULT_QUADRANT_SEGMENTS=8,j.DEFAULT_MITRE_LIMIT=5,j.DEFAULT_SIMPLIFY_FACTOR=.01;var H=function(F){s(_,F);var g=v(_);function _(w){var k;return r(this,_),(k=g.call(this,w)).name=Object.keys({Exception:_})[0],k}return i(_,[{key:"toString",value:function(){return this.message}}]),_}(d(Error)),W=function(F){s(_,F);var g=v(_);function _(w){var k;return r(this,_),(k=g.call(this,w)).name=Object.keys({IllegalArgumentException:_})[0],k}return _}(H),re=function(){function F(){r(this,F)}return i(F,[{key:"filter",value:function(g){}}]),F}();function K(){}function pe(){}function ge(){}var fe,ee,be,le,ve,Pe,Fe,We,He=function(){function F(){r(this,F)}return i(F,null,[{key:"equalsWithTolerance",value:function(g,_,w){return Math.abs(g-_)<=w}}]),F}(),Lt=function(){function F(g,_){r(this,F),this.low=_||0,this.high=g||0}return i(F,null,[{key:"toBinaryString",value:function(g){var _,w="";for(_=2147483648;_>0;_>>>=1)w+=(g.high&_)===_?"1":"0";for(_=2147483648;_>0;_>>>=1)w+=(g.low&_)===_?"1":"0";return w}}]),F}();function lt(){}function pt(){}lt.NaN=NaN,lt.isNaN=function(F){return Number.isNaN(F)},lt.isInfinite=function(F){return!Number.isFinite(F)},lt.MAX_VALUE=Number.MAX_VALUE,lt.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,lt.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,typeof Float64Array=="function"&&typeof Int32Array=="function"?(Pe=2146435072,Fe=new Float64Array(1),We=new Int32Array(Fe.buffer),lt.doubleToLongBits=function(F){Fe[0]=F;var g=0|We[0],_=0|We[1];return(_&Pe)===Pe&&1048575&_&&g!==0&&(g=0,_=2146959360),new Lt(_,g)},lt.longBitsToDouble=function(F){return We[0]=F.low,We[1]=F.high,Fe[0]}):(fe=1023,ee=Math.log2,be=Math.floor,le=Math.pow,ve=function(){for(var F=53;F>0;F--){var g=le(2,F)-1;if(be(ee(g))+1===F)return g}return 0}(),lt.doubleToLongBits=function(F){var g,_,w,k,G,te,ue,Ce,Ue;if(F<0||1/F===Number.NEGATIVE_INFINITY?(te=1<<31,F=-F):te=0,F===0)return new Lt(Ce=te,Ue=0);if(F===1/0)return new Lt(Ce=2146435072|te,Ue=0);if(F!=F)return new Lt(Ce=2146959360,Ue=0);if(k=0,Ue=0,(g=be(F))>1)if(g<=ve)(k=be(ee(g)))<=20?(Ue=0,Ce=g<<20-k&1048575):(Ue=g%(_=le(2,w=k-20))<<32-w,Ce=g/_&1048575);else for(w=g,Ue=0;(w=be(_=w/2))!==0;)k++,Ue>>>=1,Ue|=(1&Ce)<<31,Ce>>>=1,_!==w&&(Ce|=524288);if(ue=k+fe,G=g===0,g=F-g,k<52&&g!==0)for(w=0;;){if((_=2*g)>=1?(g=_-1,G?(ue--,G=!1):(w<<=1,w|=1,k++)):(g=_,G?--ue==0&&(k++,G=!1):(w<<=1,k++)),k===20)Ce|=w,w=0;else if(k===52){Ue|=w;break}if(_===1){k<20?Ce|=w<<20-k:k<52&&(Ue|=w<<52-k);break}}return Ce|=ue<<20,new Lt(Ce|=te,Ue)},lt.longBitsToDouble=function(F){var g,_,w,k,G=F.high,te=F.low,ue=G&1<<31?-1:1;for(w=((2146435072&G)>>20)-fe,k=0,_=1<<19,g=1;g<=20;g++)G&_&&(k+=le(2,-g)),_>>>=1;for(_=1<<31,g=21;g<=52;g++)te&_&&(k+=le(2,-g)),_>>>=1;if(w===-1023){if(k===0)return 0*ue;w=-1022}else{if(w===1024)return k===0?ue/0:NaN;k+=1}return ue*k*le(2,w)});var rr=function(F){s(_,F);var g=v(_);function _(w){var k;return r(this,_),(k=g.call(this,w)).name=Object.keys({RuntimeException:_})[0],k}return _}(H),Tt=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,null,[{key:"constructor_",value:function(){if(arguments.length===0)rr.constructor_.call(this);else if(arguments.length===1){var w=arguments[0];rr.constructor_.call(this,w)}}}]),_}(rr),Je=function(){function F(){r(this,F)}return i(F,null,[{key:"shouldNeverReachHere",value:function(){if(arguments.length===0)F.shouldNeverReachHere(null);else if(arguments.length===1){var g=arguments[0];throw new Tt("Should never reach here"+(g!==null?": "+g:""))}}},{key:"isTrue",value:function(){if(arguments.length===1){var g=arguments[0];F.isTrue(g,null)}else if(arguments.length===2){var _=arguments[0],w=arguments[1];if(!_)throw w===null?new Tt:new Tt(w)}}},{key:"equals",value:function(){if(arguments.length===2){var g=arguments[0],_=arguments[1];F.equals(g,_,null)}else if(arguments.length===3){var w=arguments[0],k=arguments[1],G=arguments[2];if(!k.equals(w))throw new Tt("Expected "+w+" but encountered "+k+(G!==null?": "+G:""))}}}]),F}(),pr=new ArrayBuffer(8),Ut=new Float64Array(pr),tr=new Int32Array(pr),Se=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getM",value:function(){return lt.NaN}},{key:"setOrdinate",value:function(g,_){switch(g){case F.X:this.x=_;break;case F.Y:this.y=_;break;case F.Z:this.setZ(_);break;default:throw new W("Invalid ordinate index: "+g)}}},{key:"equals2D",value:function(){if(arguments.length===1){var g=arguments[0];return this.x===g.x&&this.y===g.y}if(arguments.length===2){var _=arguments[0],w=arguments[1];return!!He.equalsWithTolerance(this.x,_.x,w)&&!!He.equalsWithTolerance(this.y,_.y,w)}}},{key:"setM",value:function(g){throw new W("Invalid ordinate index: "+F.M)}},{key:"getZ",value:function(){return this.z}},{key:"getOrdinate",value:function(g){switch(g){case F.X:return this.x;case F.Y:return this.y;case F.Z:return this.getZ()}throw new W("Invalid ordinate index: "+g)}},{key:"equals3D",value:function(g){return this.x===g.x&&this.y===g.y&&(this.getZ()===g.getZ()||lt.isNaN(this.getZ())&<.isNaN(g.getZ()))}},{key:"equals",value:function(g){return g instanceof F&&this.equals2D(g)}},{key:"equalInZ",value:function(g,_){return He.equalsWithTolerance(this.getZ(),g.getZ(),_)}},{key:"setX",value:function(g){this.x=g}},{key:"compareTo",value:function(g){var _=g;return this.x<_.x?-1:this.x>_.x?1:this.y<_.y?-1:this.y>_.y?1:0}},{key:"getX",value:function(){return this.x}},{key:"setZ",value:function(g){this.z=g}},{key:"clone",value:function(){try{return null}catch(g){if(g instanceof CloneNotSupportedException)return Je.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw g}}},{key:"copy",value:function(){return new F(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}},{key:"distance3D",value:function(g){var _=this.x-g.x,w=this.y-g.y,k=this.getZ()-g.getZ();return Math.sqrt(_*_+w*w+k*k)}},{key:"getY",value:function(){return this.y}},{key:"setY",value:function(g){this.y=g}},{key:"distance",value:function(g){var _=this.x-g.x,w=this.y-g.y;return Math.sqrt(_*_+w*w)}},{key:"hashCode",value:function(){var g=17;return g=37*(g=37*g+F.hashCode(this.x))+F.hashCode(this.y)}},{key:"setCoordinate",value:function(g){this.x=g.x,this.y=g.y,this.z=g.getZ()}},{key:"interfaces_",get:function(){return[K,pe,ge]}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)F.constructor_.call(this,0,0);else if(arguments.length===1){var g=arguments[0];F.constructor_.call(this,g.x,g.y,g.getZ())}else if(arguments.length===2){var _=arguments[0],w=arguments[1];F.constructor_.call(this,_,w,F.NULL_ORDINATE)}else if(arguments.length===3){var k=arguments[0],G=arguments[1],te=arguments[2];this.x=k,this.y=G,this.z=te}}},{key:"hashCode",value:function(g){return Ut[0]=g,tr[0]^tr[1]}}]),F}(),je=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"compare",value:function(g,_){var w=F.compare(g.x,_.x);if(w!==0)return w;var k=F.compare(g.y,_.y);return k!==0?k:this._dimensionsToTest<=2?0:F.compare(g.getZ(),_.getZ())}},{key:"interfaces_",get:function(){return[pt]}}],[{key:"constructor_",value:function(){if(this._dimensionsToTest=2,arguments.length===0)F.constructor_.call(this,2);else if(arguments.length===1){var g=arguments[0];if(g!==2&&g!==3)throw new W("only 2 or 3 dimensions may be specified");this._dimensionsToTest=g}}},{key:"compare",value:function(g,_){return g<_?-1:g>_?1:lt.isNaN(g)?lt.isNaN(_)?0:-1:lt.isNaN(_)?1:0}}]),F}();Se.DimensionalComparator=je,Se.NULL_ORDINATE=lt.NaN,Se.X=0,Se.Y=1,Se.Z=2,Se.M=3;var et=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getArea",value:function(){return this.getWidth()*this.getHeight()}},{key:"equals",value:function(g){if(!(g instanceof F))return!1;var _=g;return this.isNull()?_.isNull():this._maxx===_.getMaxX()&&this._maxy===_.getMaxY()&&this._minx===_.getMinX()&&this._miny===_.getMinY()}},{key:"intersection",value:function(g){if(this.isNull()||g.isNull()||!this.intersects(g))return new F;var _=this._minx>g._minx?this._minx:g._minx,w=this._miny>g._miny?this._miny:g._miny;return new F(_,this._maxx=this._minx&&_.getMaxX()<=this._maxx&&_.getMinY()>=this._miny&&_.getMaxY()<=this._maxy}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];return!this.isNull()&&w>=this._minx&&w<=this._maxx&&k>=this._miny&&k<=this._maxy}}},{key:"intersects",value:function(){if(arguments.length===1){if(arguments[0]instanceof F){var g=arguments[0];return!this.isNull()&&!g.isNull()&&!(g._minx>this._maxx||g._maxxthis._maxy||g._maxythis._maxx)return!1;var te=w.x>k.x?w.x:k.x;if(tethis._maxy)return!1;var Ce=w.y>k.y?w.y:k.y;return!(Cethis._maxx||Uethis._maxy||Itthis._maxx&&(this._maxx=_._maxx),_._minythis._maxy&&(this._maxy=_._maxy))}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];this.isNull()?(this._minx=w,this._maxx=w,this._miny=k,this._maxy=k):(wthis._maxx&&(this._maxx=w),kthis._maxy&&(this._maxy=k))}}},{key:"minExtent",value:function(){if(this.isNull())return 0;var g=this.getWidth(),_=this.getHeight();return g<_?g:_}},{key:"getWidth",value:function(){return this.isNull()?0:this._maxx-this._minx}},{key:"compareTo",value:function(g){var _=g;return this.isNull()?_.isNull()?0:-1:_.isNull()?1:this._minx<_._minx?-1:this._minx>_._minx?1:this._miny<_._miny?-1:this._miny>_._miny?1:this._maxx<_._maxx?-1:this._maxx>_._maxx?1:this._maxy<_._maxy?-1:this._maxy>_._maxy?1:0}},{key:"translate",value:function(g,_){if(this.isNull())return null;this.init(this.getMinX()+g,this.getMaxX()+g,this.getMinY()+_,this.getMaxY()+_)}},{key:"copy",value:function(){return new F(this)}},{key:"toString",value:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}},{key:"setToNull",value:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}},{key:"disjoint",value:function(g){return!(!this.isNull()&&!g.isNull())||g._minx>this._maxx||g._maxxthis._maxy||g._maxy_?g:_}},{key:"expandBy",value:function(){if(arguments.length===1){var g=arguments[0];this.expandBy(g,g)}else if(arguments.length===2){var _=arguments[0],w=arguments[1];if(this.isNull())return null;this._minx-=_,this._maxx+=_,this._miny-=w,this._maxy+=w,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}},{key:"contains",value:function(){if(arguments.length===1){if(arguments[0]instanceof F){var g=arguments[0];return this.covers(g)}if(arguments[0]instanceof Se){var _=arguments[0];return this.covers(_)}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];return this.covers(w,k)}}},{key:"centre",value:function(){return this.isNull()?null:new Se((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}},{key:"init",value:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof Se){var g=arguments[0];this.init(g.x,g.x,g.y,g.y)}else if(arguments[0]instanceof F){var _=arguments[0];this._minx=_._minx,this._maxx=_._maxx,this._miny=_._miny,this._maxy=_._maxy}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];this.init(w.x,k.x,w.y,k.y)}else if(arguments.length===4){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=arguments[3];Gg._maxx&&(_=this._minx-g._maxx);var w=0;return this._maxyg._maxy&&(w=this._miny-g._maxy),_===0?w:w===0?_:Math.sqrt(_*_+w*w)}},{key:"hashCode",value:function(){var g=17;return g=37*(g=37*(g=37*(g=37*g+Se.hashCode(this._minx))+Se.hashCode(this._maxx))+Se.hashCode(this._miny))+Se.hashCode(this._maxy)}},{key:"interfaces_",get:function(){return[K,ge]}}],[{key:"constructor_",value:function(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof Se){var g=arguments[0];this.init(g.x,g.x,g.y,g.y)}else if(arguments[0]instanceof F){var _=arguments[0];this.init(_)}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];this.init(w.x,k.x,w.y,k.y)}else if(arguments.length===4){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=arguments[3];this.init(G,te,ue,Ce)}}},{key:"intersects",value:function(){if(arguments.length===3){var g=arguments[0],_=arguments[1],w=arguments[2];return w.x>=(g.x<_.x?g.x:_.x)&&w.x<=(g.x>_.x?g.x:_.x)&&w.y>=(g.y<_.y?g.y:_.y)&&w.y<=(g.y>_.y?g.y:_.y)}if(arguments.length===4){var k=arguments[0],G=arguments[1],te=arguments[2],ue=arguments[3],Ce=Math.min(te.x,ue.x),Ue=Math.max(te.x,ue.x),It=Math.min(k.x,G.x),Vt=Math.max(k.x,G.x);return!(It>Ue)&&!(VtUe)&&!(Vt=this.size())throw new xr;return this.array[w]}},{key:"push",value:function(w){return this.array.push(w),w}},{key:"pop",value:function(){if(this.array.length===0)throw new Xt;return this.array.pop()}},{key:"peek",value:function(){if(this.array.length===0)throw new Xt;return this.array[this.array.length-1]}},{key:"empty",value:function(){return this.array.length===0}},{key:"isEmpty",value:function(){return this.empty()}},{key:"search",value:function(w){return this.array.indexOf(w)}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}}]),_}(Ur);function Rr(F,g){return F.interfaces_&&F.interfaces_.indexOf(g)>-1}var mn=function(){function F(g){r(this,F),this.str=g}return i(F,[{key:"append",value:function(g){this.str+=g}},{key:"setCharAt",value:function(g,_){this.str=this.str.substr(0,g)+_+this.str.substr(g+1)}},{key:"toString",value:function(){return this.str}}]),F}(),Kr=function(){function F(g){r(this,F),this.value=g}return i(F,[{key:"intValue",value:function(){return this.value}},{key:"compareTo",value:function(g){return this.valueg?1:0}}],[{key:"compare",value:function(g,_){return g<_?-1:g>_?1:0}},{key:"isNan",value:function(g){return Number.isNaN(g)}},{key:"valueOf",value:function(g){return new F(g)}}]),F}(),Ft=function(){function F(){r(this,F)}return i(F,null,[{key:"isWhitespace",value:function(g){return g<=32&&g>=0||g===127}},{key:"toUpperCase",value:function(g){return g.toUpperCase()}}]),F}(),xt=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"le",value:function(g){return this._hi9?(Vt=!0,gr="9"):gr="0"+It,ue.append(gr),w=w.subtract(F.valueOf(It)).multiply(F.TEN),Vt&&w.selfAdd(F.TEN);var rn=!0,Zr=F.magnitude(w._hi);if(Zr<0&&Math.abs(Zr)>=Ce-Ue&&(rn=!1),!rn)break}return _[0]=k,ue.toString()}},{key:"sqr",value:function(){return this.multiply(this)}},{key:"doubleValue",value:function(){return this._hi+this._lo}},{key:"subtract",value:function(){if(arguments[0]instanceof F){var g=arguments[0];return this.add(g.negate())}if(typeof arguments[0]=="number"){var _=arguments[0];return this.add(-_)}}},{key:"equals",value:function(){if(arguments.length===1&&arguments[0]instanceof F){var g=arguments[0];return this._hi===g._hi&&this._lo===g._lo}}},{key:"isZero",value:function(){return this._hi===0&&this._lo===0}},{key:"selfSubtract",value:function(){if(arguments[0]instanceof F){var g=arguments[0];return this.isNaN()?this:this.selfAdd(-g._hi,-g._lo)}if(typeof arguments[0]=="number"){var _=arguments[0];return this.isNaN()?this:this.selfAdd(-_,0)}}},{key:"getSpecialNumberString",value:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}},{key:"min",value:function(g){return this.le(g)?this:g}},{key:"selfDivide",value:function(){if(arguments.length===1){if(arguments[0]instanceof F){var g=arguments[0];return this.selfDivide(g._hi,g._lo)}if(typeof arguments[0]=="number"){var _=arguments[0];return this.selfDivide(_,0)}}else if(arguments.length===2){var w=arguments[0],k=arguments[1],G=null,te=null,ue=null,Ce=null,Ue=null,It=null,Vt=null,gr=null;return Ue=this._hi/w,gr=(G=(It=F.SPLIT*Ue)-(G=It-Ue))*(ue=(gr=F.SPLIT*w)-(ue=gr-w))-(Vt=Ue*w)+G*(Ce=w-ue)+(te=Ue-G)*ue+te*Ce,gr=Ue+(It=(this._hi-Vt-gr+this._lo-Ue*k)/w),this._hi=gr,this._lo=Ue-gr+It,this}}},{key:"dump",value:function(){return"DD<"+this._hi+", "+this._lo+">"}},{key:"divide",value:function(){if(arguments[0]instanceof F){var g=arguments[0],_=null,w=null,k=null,G=null,te=null,ue=null,Ce=null,Ue=null;w=(te=this._hi/g._hi)-(_=(ue=F.SPLIT*te)-(_=ue-te)),Ue=_*(k=(Ue=F.SPLIT*g._hi)-(k=Ue-g._hi))-(Ce=te*g._hi)+_*(G=g._hi-k)+w*k+w*G;var It=Ue=te+(ue=(this._hi-Ce-Ue+this._lo-te*g._lo)/g._hi),Vt=te-Ue+ue;return new F(It,Vt)}if(typeof arguments[0]=="number"){var gr=arguments[0];return lt.isNaN(gr)?F.createNaN():F.copy(this).selfDivide(gr,0)}}},{key:"ge",value:function(g){return this._hi>g._hi||this._hi===g._hi&&this._lo>=g._lo}},{key:"pow",value:function(g){if(g===0)return F.valueOf(1);var _=new F(this),w=F.valueOf(1),k=Math.abs(g);if(k>1)for(;k>0;)k%2==1&&w.selfMultiply(_),(k/=2)>0&&(_=_.sqr());else w=_;return g<0?w.reciprocal():w}},{key:"ceil",value:function(){if(this.isNaN())return F.NaN;var g=Math.ceil(this._hi),_=0;return g===this._hi&&(_=Math.ceil(this._lo)),new F(g,_)}},{key:"compareTo",value:function(g){var _=g;return this._hi<_._hi?-1:this._hi>_._hi?1:this._lo<_._lo?-1:this._lo>_._lo?1:0}},{key:"rint",value:function(){return this.isNaN()?this:this.add(.5).floor()}},{key:"setValue",value:function(){if(arguments[0]instanceof F){var g=arguments[0];return this.init(g),this}if(typeof arguments[0]=="number"){var _=arguments[0];return this.init(_),this}}},{key:"max",value:function(g){return this.ge(g)?this:g}},{key:"sqrt",value:function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var g=1/Math.sqrt(this._hi),_=this._hi*g,w=F.valueOf(_),k=this.subtract(w.sqr())._hi*(.5*g);return w.add(k)}},{key:"selfAdd",value:function(){if(arguments.length===1){if(arguments[0]instanceof F){var g=arguments[0];return this.selfAdd(g._hi,g._lo)}if(typeof arguments[0]=="number"){var _=arguments[0],w=null,k=null,G=null,te=null,ue=null,Ce=null;return te=(G=this._hi+_)-(ue=G-this._hi),k=(Ce=(te=_-ue+(this._hi-te))+this._lo)+(G-(w=G+Ce)),this._hi=w+k,this._lo=k+(w-this._hi),this}}else if(arguments.length===2){var Ue=arguments[0],It=arguments[1],Vt=null,gr=null,rn=null,Zr=null,yi=null,Sn=null,jr=null;Zr=this._hi+Ue,gr=this._lo+It,yi=Zr-(Sn=Zr-this._hi),rn=gr-(jr=gr-this._lo);var Ms=(Vt=Zr+(Sn=(yi=Ue-Sn+(this._hi-yi))+gr))+(Sn=(rn=It-jr+(this._lo-rn))+(Sn+(Zr-Vt))),Os=Sn+(Vt-Ms);return this._hi=Ms,this._lo=Os,this}}},{key:"selfMultiply",value:function(){if(arguments.length===1){if(arguments[0]instanceof F){var g=arguments[0];return this.selfMultiply(g._hi,g._lo)}if(typeof arguments[0]=="number"){var _=arguments[0];return this.selfMultiply(_,0)}}else if(arguments.length===2){var w=arguments[0],k=arguments[1],G=null,te=null,ue=null,Ce=null,Ue=null,It=null;G=(Ue=F.SPLIT*this._hi)-this._hi,It=F.SPLIT*w,G=Ue-G,te=this._hi-G,ue=It-w;var Vt=(Ue=this._hi*w)+(It=G*(ue=It-ue)-Ue+G*(Ce=w-ue)+te*ue+te*Ce+(this._hi*k+this._lo*w)),gr=It+(G=Ue-Vt);return this._hi=Vt,this._lo=gr,this}}},{key:"selfSqr",value:function(){return this.selfMultiply(this)}},{key:"floor",value:function(){if(this.isNaN())return F.NaN;var g=Math.floor(this._hi),_=0;return g===this._hi&&(_=Math.floor(this._lo)),new F(g,_)}},{key:"negate",value:function(){return this.isNaN()?this:new F(-this._hi,-this._lo)}},{key:"clone",value:function(){try{return null}catch(g){if(g instanceof CloneNotSupportedException)return null;throw g}}},{key:"multiply",value:function(){if(arguments[0]instanceof F){var g=arguments[0];return g.isNaN()?F.createNaN():F.copy(this).selfMultiply(g)}if(typeof arguments[0]=="number"){var _=arguments[0];return lt.isNaN(_)?F.createNaN():F.copy(this).selfMultiply(_,0)}}},{key:"isNaN",value:function(){return lt.isNaN(this._hi)}},{key:"intValue",value:function(){return Math.trunc(this._hi)}},{key:"toString",value:function(){var g=F.magnitude(this._hi);return g>=-3&&g<=20?this.toStandardNotation():this.toSciNotation()}},{key:"toStandardNotation",value:function(){var g=this.getSpecialNumberString();if(g!==null)return g;var _=new Array(1).fill(null),w=this.extractSignificantDigits(!0,_),k=_[0]+1,G=w;if(w.charAt(0)===".")G="0"+w;else if(k<0)G="0."+F.stringOfChar("0",-k)+w;else if(w.indexOf(".")===-1){var te=k-w.length;G=w+F.stringOfChar("0",te)+".0"}return this.isNegative()?"-"+G:G}},{key:"reciprocal",value:function(){var g,_,w,k,G=null,te=null,ue=null,Ce=null;g=(w=1/this._hi)-(G=(ue=F.SPLIT*w)-(G=ue-w)),te=(Ce=F.SPLIT*this._hi)-this._hi;var Ue=w+(ue=(1-(k=w*this._hi)-(Ce=G*(te=Ce-te)-k+G*(_=this._hi-te)+g*te+g*_)-w*this._lo)/this._hi);return new F(Ue,w-Ue+ue)}},{key:"toSciNotation",value:function(){if(this.isZero())return F.SCI_NOT_ZERO;var g=this.getSpecialNumberString();if(g!==null)return g;var _=new Array(1).fill(null),w=this.extractSignificantDigits(!1,_),k=F.SCI_NOT_EXPONENT_CHAR+_[0];if(w.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+w);var G="";w.length>1&&(G=w.substring(1));var te=w.charAt(0)+"."+G;return this.isNegative()?"-"+te+k:te+k}},{key:"abs",value:function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)}},{key:"isPositive",value:function(){return this._hi>0||this._hi===0&&this._lo>0}},{key:"lt",value:function(g){return this._hig._hi||this._hi===g._hi&&this._lo>g._lo}},{key:"isNegative",value:function(){return this._hi<0||this._hi===0&&this._lo<0}},{key:"trunc",value:function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()}},{key:"signum",value:function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}},{key:"interfaces_",get:function(){return[ge,K,pe]}}],[{key:"constructor_",value:function(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var g=arguments[0];this.init(g)}else if(arguments[0]instanceof F){var _=arguments[0];this.init(_)}else if(typeof arguments[0]=="string"){var w=arguments[0];F.constructor_.call(this,F.parse(w))}}else if(arguments.length===2){var k=arguments[0],G=arguments[1];this.init(k,G)}}},{key:"determinant",value:function(){if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var g=arguments[0],_=arguments[1],w=arguments[2],k=arguments[3];return F.determinant(F.valueOf(g),F.valueOf(_),F.valueOf(w),F.valueOf(k))}if(arguments[3]instanceof F&&arguments[2]instanceof F&&arguments[0]instanceof F&&arguments[1]instanceof F){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=arguments[3],Ue=G.multiply(Ce).selfSubtract(te.multiply(ue));return Ue}}},{key:"sqr",value:function(g){return F.valueOf(g).selfMultiply(g)}},{key:"valueOf",value:function(){if(typeof arguments[0]=="string"){var g=arguments[0];return F.parse(g)}if(typeof arguments[0]=="number"){var _=arguments[0];return new F(_)}}},{key:"sqrt",value:function(g){return F.valueOf(g).sqrt()}},{key:"parse",value:function(g){for(var _=0,w=g.length;Ft.isWhitespace(g.charAt(_));)_++;var k=!1;if(_=w);){var Vt=g.charAt(_);if(_++,Ft.isDigit(Vt)){var gr=Vt-"0";te.selfMultiply(F.TEN),te.selfAdd(gr),ue++}else{if(Vt!=="."){if(Vt==="e"||Vt==="E"){var rn=g.substring(_);try{Ue=Kr.parseInt(rn)}catch(Ms){throw Ms instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+rn+" in string "+g):Ms}break}throw new NumberFormatException("Unexpected character '"+Vt+"' at position "+_+" in string "+g)}Ce=ue,It=!0}}var Zr=te;It||(Ce=ue);var yi=ue-Ce-Ue;if(yi===0)Zr=te;else if(yi>0){var Sn=F.TEN.pow(yi);Zr=te.divide(Sn)}else if(yi<0){var jr=F.TEN.pow(-yi);Zr=te.multiply(jr)}return k?Zr.negate():Zr}},{key:"createNaN",value:function(){return new F(lt.NaN,lt.NaN)}},{key:"copy",value:function(g){return new F(g)}},{key:"magnitude",value:function(g){var _=Math.abs(g),w=Math.log(_)/Math.log(10),k=Math.trunc(Math.floor(w));return 10*Math.pow(10,k)<=_&&(k+=1),k}},{key:"stringOfChar",value:function(g,_){for(var w=new mn,k=0;k<_;k++)w.append(g);return w.toString()}}]),F}();xt.PI=new xt(3.141592653589793,12246467991473532e-32),xt.TWO_PI=new xt(6.283185307179586,24492935982947064e-32),xt.PI_2=new xt(1.5707963267948966,6123233995736766e-32),xt.E=new xt(2.718281828459045,14456468917292502e-32),xt.NaN=new xt(lt.NaN,lt.NaN),xt.EPS=123259516440783e-46,xt.SPLIT=134217729,xt.MAX_PRINT_DIGITS=32,xt.TEN=xt.valueOf(10),xt.ONE=xt.valueOf(1),xt.SCI_NOT_EXPONENT_CHAR="E",xt.SCI_NOT_ZERO="0.0E0";var vr=function(){function F(){r(this,F)}return i(F,null,[{key:"orientationIndex",value:function(g,_,w){var k=F.orientationIndexFilter(g,_,w);if(k<=1)return k;var G=xt.valueOf(_.x).selfAdd(-g.x),te=xt.valueOf(_.y).selfAdd(-g.y),ue=xt.valueOf(w.x).selfAdd(-_.x),Ce=xt.valueOf(w.y).selfAdd(-_.y);return G.selfMultiply(Ce).selfSubtract(te.selfMultiply(ue)).signum()}},{key:"signOfDet2x2",value:function(){if(arguments[3]instanceof xt&&arguments[2]instanceof xt&&arguments[0]instanceof xt&&arguments[1]instanceof xt){var g=arguments[0],_=arguments[1],w=arguments[2],k=arguments[3],G=g.multiply(k).selfSubtract(_.multiply(w));return G.signum()}if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var te=arguments[0],ue=arguments[1],Ce=arguments[2],Ue=arguments[3],It=xt.valueOf(te),Vt=xt.valueOf(ue),gr=xt.valueOf(Ce),rn=xt.valueOf(Ue),Zr=It.multiply(rn).selfSubtract(Vt.multiply(gr));return Zr.signum()}}},{key:"intersection",value:function(g,_,w,k){var G=new xt(g.y).selfSubtract(_.y),te=new xt(_.x).selfSubtract(g.x),ue=new xt(g.x).selfMultiply(_.y).selfSubtract(new xt(_.x).selfMultiply(g.y)),Ce=new xt(w.y).selfSubtract(k.y),Ue=new xt(k.x).selfSubtract(w.x),It=new xt(w.x).selfMultiply(k.y).selfSubtract(new xt(k.x).selfMultiply(w.y)),Vt=te.multiply(It).selfSubtract(Ue.multiply(ue)),gr=Ce.multiply(ue).selfSubtract(G.multiply(It)),rn=G.multiply(Ue).selfSubtract(Ce.multiply(te)),Zr=Vt.selfDivide(rn).doubleValue(),yi=gr.selfDivide(rn).doubleValue();return lt.isNaN(Zr)||lt.isInfinite(Zr)||lt.isNaN(yi)||lt.isInfinite(yi)?null:new Se(Zr,yi)}},{key:"orientationIndexFilter",value:function(g,_,w){var k=null,G=(g.x-w.x)*(_.y-w.y),te=(g.y-w.y)*(_.x-w.x),ue=G-te;if(G>0){if(te<=0)return F.signum(ue);k=G+te}else{if(!(G<0)||te>=0)return F.signum(ue);k=-G-te}var Ce=F.DP_SAFE_EPSILON*k;return ue>=Ce||-ue>=Ce?F.signum(ue):2}},{key:"signum",value:function(g){return g>0?1:g<0?-1:0}}]),F}();vr.DP_SAFE_EPSILON=1e-15;var Mr=function(){function F(){r(this,F)}return i(F,[{key:"getM",value:function(g){if(this.hasM()){var _=this.getDimension()-this.getMeasures();return this.getOrdinate(g,_)}return lt.NaN}},{key:"setOrdinate",value:function(g,_,w){}},{key:"getZ",value:function(g){return this.hasZ()?this.getOrdinate(g,2):lt.NaN}},{key:"size",value:function(){}},{key:"getOrdinate",value:function(g,_){}},{key:"getCoordinate",value:function(){}},{key:"getCoordinateCopy",value:function(g){}},{key:"createCoordinate",value:function(){}},{key:"getDimension",value:function(){}},{key:"hasM",value:function(){return this.getMeasures()>0}},{key:"getX",value:function(g){}},{key:"hasZ",value:function(){return this.getDimension()-this.getMeasures()>2}},{key:"getMeasures",value:function(){return 0}},{key:"expandEnvelope",value:function(g){}},{key:"copy",value:function(){}},{key:"getY",value:function(g){}},{key:"toCoordinateArray",value:function(){}},{key:"interfaces_",get:function(){return[pe]}}]),F}();Mr.X=0,Mr.Y=1,Mr.Z=2,Mr.M=3;var ar=function(){function F(){r(this,F)}return i(F,null,[{key:"index",value:function(g,_,w){return vr.orientationIndex(g,_,w)}},{key:"isCCW",value:function(){if(arguments[0]instanceof Array){var g=arguments[0],_=g.length-1;if(_<3)throw new W("Ring has fewer than 4 points, so orientation cannot be determined");for(var w=g[0],k=0,G=1;G<=_;G++){var te=g[G];te.y>w.y&&(w=te,k=G)}var ue=k;do(ue-=1)<0&&(ue=_);while(g[ue].equals2D(w)&&ue!==k);var Ce=k;do Ce=(Ce+1)%_;while(g[Ce].equals2D(w)&&Ce!==k);var Ue=g[ue],It=g[Ce];if(Ue.equals2D(w)||It.equals2D(w)||Ue.equals2D(It))return!1;var Vt=F.index(Ue,w,It),gr=null;return gr=Vt===0?Ue.x>It.x:Vt>0,gr}if(Rr(arguments[0],Mr)){var rn=arguments[0],Zr=rn.size()-1;if(Zr<3)throw new W("Ring has fewer than 4 points, so orientation cannot be determined");for(var yi=rn.getCoordinate(0),Sn=0,jr=1;jr<=Zr;jr++){var Ms=rn.getCoordinate(jr);Ms.y>yi.y&&(yi=Ms,Sn=jr)}var Os=null,Ts=Sn;do(Ts-=1)<0&&(Ts=Zr),Os=rn.getCoordinate(Ts);while(Os.equals2D(yi)&&Ts!==Sn);var io=null,ma=Sn;do ma=(ma+1)%Zr,io=rn.getCoordinate(ma);while(io.equals2D(yi)&&ma!==Sn);if(Os.equals2D(yi)||io.equals2D(yi)||Os.equals2D(io))return!1;var Ba=F.index(Os,yi,io);return Ba===0?Os.x>io.x:Ba>0}}}]),F}();ar.CLOCKWISE=-1,ar.RIGHT=ar.CLOCKWISE,ar.COUNTERCLOCKWISE=1,ar.LEFT=ar.COUNTERCLOCKWISE,ar.COLLINEAR=0,ar.STRAIGHT=ar.COLLINEAR;var ni=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getCoordinate",value:function(){return this._minCoord}},{key:"getRightmostSide",value:function(g,_){var w=this.getRightmostSideOfSegment(g,_);return w<0&&(w=this.getRightmostSideOfSegment(g,_-1)),w<0&&(this._minCoord=null,this.checkForRightmostCoordinate(g)),w}},{key:"findRightmostEdgeAtVertex",value:function(){var g=this._minDe.getEdge().getCoordinates();Je.isTrue(this._minIndex>0&&this._minIndexthis._minCoord.y&&w.y>this._minCoord.y&&k===ar.CLOCKWISE)&&(G=!0),G&&(this._minIndex=this._minIndex-1)}},{key:"getRightmostSideOfSegment",value:function(g,_){var w=g.getEdge().getCoordinates();if(_<0||_+1>=w.length||w[_].y===w[_+1].y)return-1;var k=it.LEFT;return w[_].ythis._minCoord.x)&&(this._minDe=g,this._minIndex=w,this._minCoord=_[w])}},{key:"findRightmostEdgeAtNode",value:function(){var g=this._minDe.getNode().getEdges();this._minDe=g.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}},{key:"findEdge",value:function(g){for(var _=g.iterator();_.hasNext();){var w=_.next();w.isForward()&&this.checkForRightmostCoordinate(w)}Je.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===it.LEFT&&(this._orientedDe=this._minDe.getSym())}}],[{key:"constructor_",value:function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}}]),F}(),or=function(F){s(_,F);var g=v(_);function _(w,k){var G;return r(this,_),(G=g.call(this,k?w+" [ "+k+" ]":w)).pt=k?new Se(k):void 0,G.name=Object.keys({TopologyException:_})[0],G}return i(_,[{key:"getCoordinate",value:function(){return this.pt}}]),_}(rr),vt=function(){function F(){r(this,F),this.array=[]}return i(F,[{key:"addLast",value:function(g){this.array.push(g)}},{key:"removeFirst",value:function(){return this.array.shift()}},{key:"isEmpty",value:function(){return this.array.length===0}}]),F}(),ot=function(F,g){s(w,F);var _=v(w);function w(k){var G;return r(this,w),(G=_.call(this)).array=[],k instanceof ft&&G.addAll(k),G}return i(w,[{key:"interfaces_",get:function(){return[Ur,ft]}},{key:"ensureCapacity",value:function(){}},{key:"add",value:function(k){return arguments.length===1?this.array.push(k):this.array.splice(arguments[0],0,arguments[1]),!0}},{key:"clear",value:function(){this.array=[]}},{key:"addAll",value:function(k){var G,te=A(k);try{for(te.s();!(G=te.n()).done;){var ue=G.value;this.array.push(ue)}}catch(Ce){te.e(Ce)}finally{te.f()}}},{key:"set",value:function(k,G){var te=this.array[k];return this.array[k]=G,te}},{key:"iterator",value:function(){return new lr(this)}},{key:"get",value:function(k){if(k<0||k>=this.size())throw new xr;return this.array[k]}},{key:"isEmpty",value:function(){return this.array.length===0}},{key:"sort",value:function(k){k?this.array.sort(function(G,te){return k.compare(G,te)}):this.array.sort()}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}},{key:"remove",value:function(k){for(var G=0,te=this.array.length;G=1&&_.getDepth(it.LEFT)<=0&&!_.isInteriorAreaEdge()&&_.setInResult(!0)}}},{key:"computeDepths",value:function(g){var _=new Xe,w=new vt,k=g.getNode();for(w.addLast(k),_.add(k),g.setVisited(!0);!w.isEmpty();){var G=w.removeFirst();_.add(G),this.computeNodeDepth(G);for(var te=G.getEdges().iterator();te.hasNext();){var ue=te.next().getSym();if(!ue.isVisited()){var Ce=ue.getNode();_.contains(Ce)||(w.addLast(Ce),_.add(Ce))}}}}},{key:"compareTo",value:function(g){var _=g;return this._rightMostCoord.x<_._rightMostCoord.x?-1:this._rightMostCoord.x>_._rightMostCoord.x?1:0}},{key:"getEnvelope",value:function(){if(this._env===null){for(var g=new et,_=this._dirEdgeList.iterator();_.hasNext();)for(var w=_.next().getEdge().getCoordinates(),k=0;k_.x?g.x:_.x,Ce=g.y>_.y?g.y:_.y,Ue=w.xk.x?w.x:k.x,gr=w.y>k.y?w.y:k.y,rn=((G>Ue?G:Ue)+(ueIt?te:It)+(Cew?w:g}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var k=arguments[0],G=arguments[1],te=arguments[2];return kte?te:k}}},{key:"wrap",value:function(g,_){return g<0?_- -g%_:g%_}},{key:"max",value:function(){if(arguments.length===3){var g=arguments[0],_=arguments[1],w=arguments[2],k=g;return _>k&&(k=_),w>k&&(k=w),k}if(arguments.length===4){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=arguments[3],Ue=G;return te>Ue&&(Ue=te),ue>Ue&&(Ue=ue),Ce>Ue&&(Ue=Ce),Ue}}},{key:"average",value:function(g,_){return(g+_)/2}}]),F}();Gi.LOG_10=Math.log(10);var zn=function(){function F(){r(this,F)}return i(F,null,[{key:"segmentToSegment",value:function(g,_,w,k){if(g.equals(_))return F.pointToSegment(g,w,k);if(w.equals(k))return F.pointToSegment(k,g,_);var G=!1;if(et.intersects(g,_,w,k)){var te=(_.x-g.x)*(k.y-w.y)-(_.y-g.y)*(k.x-w.x);if(te===0)G=!0;else{var ue=(g.y-w.y)*(k.x-w.x)-(g.x-w.x)*(k.y-w.y),Ce=((g.y-w.y)*(_.x-g.x)-(g.x-w.x)*(_.y-g.y))/te,Ue=ue/te;(Ue<0||Ue>1||Ce<0||Ce>1)&&(G=!0)}}else G=!0;return G?Gi.min(F.pointToSegment(g,w,k),F.pointToSegment(_,w,k),F.pointToSegment(w,g,_),F.pointToSegment(k,g,_)):0}},{key:"pointToSegment",value:function(g,_,w){if(_.x===w.x&&_.y===w.y)return g.distance(_);var k=(w.x-_.x)*(w.x-_.x)+(w.y-_.y)*(w.y-_.y),G=((g.x-_.x)*(w.x-_.x)+(g.y-_.y)*(w.y-_.y))/k;if(G<=0)return g.distance(_);if(G>=1)return g.distance(w);var te=((_.y-g.y)*(w.x-_.x)-(_.x-g.x)*(w.y-_.y))/k;return Math.abs(te)*Math.sqrt(k)}},{key:"pointToLinePerpendicular",value:function(g,_,w){var k=(w.x-_.x)*(w.x-_.x)+(w.y-_.y)*(w.y-_.y),G=((_.y-g.y)*(w.x-_.x)-(_.x-g.x)*(w.y-_.y))/k;return Math.abs(G)*Math.sqrt(k)}},{key:"pointToSegmentString",value:function(g,_){if(_.length===0)throw new W("Line array must contain at least one vertex");for(var w=g.distance(_[0]),k=0;k<_.length-1;k++){var G=F.pointToSegment(g,_[k],_[k+1]);G0)&&(te=Ce,G=ue)}return G}}},{key:"extend",value:function(g,_,w){var k=g.create(w,_.getDimension()),G=_.size();if(F.copy(_,0,k,0,G),G>0)for(var te=G;te0)&&(_=k)}return _}}]),F}(),ze=function(){function F(){r(this,F)}return i(F,null,[{key:"toDimensionSymbol",value:function(g){switch(g){case F.FALSE:return F.SYM_FALSE;case F.TRUE:return F.SYM_TRUE;case F.DONTCARE:return F.SYM_DONTCARE;case F.P:return F.SYM_P;case F.L:return F.SYM_L;case F.A:return F.SYM_A}throw new W("Unknown dimension value: "+g)}},{key:"toDimensionValue",value:function(g){switch(Ft.toUpperCase(g)){case F.SYM_FALSE:return F.FALSE;case F.SYM_TRUE:return F.TRUE;case F.SYM_DONTCARE:return F.DONTCARE;case F.SYM_P:return F.P;case F.SYM_L:return F.L;case F.SYM_A:return F.A}throw new W("Unknown dimension symbol: "+g)}}]),F}();ze.P=0,ze.L=1,ze.A=2,ze.FALSE=-1,ze.TRUE=-2,ze.DONTCARE=-3,ze.SYM_FALSE="F",ze.SYM_TRUE="T",ze.SYM_DONTCARE="*",ze.SYM_P="0",ze.SYM_L="1",ze.SYM_A="2";var At=function(){function F(){r(this,F)}return i(F,[{key:"filter",value:function(g){}}]),F}(),zt=function(){function F(){r(this,F)}return i(F,[{key:"filter",value:function(g,_){}},{key:"isDone",value:function(){}},{key:"isGeometryChanged",value:function(){}}]),F}(),Yt=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"computeEnvelopeInternal",value:function(){return this.isEmpty()?new et:this._points.expandEnvelope(new et)}},{key:"isRing",value:function(){return this.isClosed()&&this.isSimple()}},{key:"getCoordinates",value:function(){return this._points.toCoordinateArray()}},{key:"copyInternal",value:function(){return new _(this._points.copy(),this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof yt){var w=arguments[0],k=arguments[1];if(!this.isEquivalentClass(w))return!1;var G=w;if(this._points.size()!==G._points.size())return!1;for(var te=0;te0){var G=this._points.copy();Be.reverse(G),this._points=G}return null}}}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._points.getCoordinate(0)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?ze.FALSE:0}},{key:"isClosed",value:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}},{key:"reverseInternal",value:function(){var w=this._points.copy();return Be.reverse(w),this.getFactory().createLineString(w)}},{key:"getEndPoint",value:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}},{key:"getTypeCode",value:function(){return yt.TYPECODE_LINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getLength",value:function(){return Me.ofLine(this._points)}},{key:"getNumPoints",value:function(){return this._points.size()}},{key:"compareToSameClass",value:function(){if(arguments.length===1){for(var w=arguments[0],k=w,G=0,te=0;G= 2)");this._points=w}},{key:"isCoordinate",value:function(w){for(var k=0;k=1&&this.getCoordinateSequence().size()<_.MINIMUM_VALID_SIZE)throw new W("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")}},{key:"getGeometryType",value:function(){return yt.TYPENAME_LINEARRING}}],[{key:"constructor_",value:function(){var w=arguments[0],k=arguments[1];Yt.constructor_.call(this,w,k),this.validateConstruction()}}]),_}(Yt);mi.MINIMUM_VALID_SIZE=4;var sn=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"setOrdinate",value:function(w,k){switch(w){case _.X:this.x=k;break;case _.Y:this.y=k;break;default:throw new W("Invalid ordinate index: "+w)}}},{key:"getZ",value:function(){return Se.NULL_ORDINATE}},{key:"getOrdinate",value:function(w){switch(w){case _.X:return this.x;case _.Y:return this.y}throw new W("Invalid ordinate index: "+w)}},{key:"setZ",value:function(w){throw new W("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new _(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+")"}},{key:"setCoordinate",value:function(w){this.x=w.x,this.y=w.y,this.z=w.getZ()}}],[{key:"constructor_",value:function(){if(arguments.length===0)Se.constructor_.call(this);else if(arguments.length===1){if(arguments[0]instanceof _){var w=arguments[0];Se.constructor_.call(this,w.x,w.y)}else if(arguments[0]instanceof Se){var k=arguments[0];Se.constructor_.call(this,k.x,k.y)}}else if(arguments.length===2){var G=arguments[0],te=arguments[1];Se.constructor_.call(this,G,te,Se.NULL_ORDINATE)}}}]),_}(Se);sn.X=0,sn.Y=1,sn.Z=-1,sn.M=-1;var cn=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(w,k){switch(w){case _.X:this.x=k;break;case _.Y:this.y=k;break;case _.M:this._m=k;break;default:throw new W("Invalid ordinate index: "+w)}}},{key:"setM",value:function(w){this._m=w}},{key:"getZ",value:function(){return Se.NULL_ORDINATE}},{key:"getOrdinate",value:function(w){switch(w){case _.X:return this.x;case _.Y:return this.y;case _.M:return this._m}throw new W("Invalid ordinate index: "+w)}},{key:"setZ",value:function(w){throw new W("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new _(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(w){this.x=w.x,this.y=w.y,this.z=w.getZ(),this._m=w.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)Se.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof _){var w=arguments[0];Se.constructor_.call(this,w.x,w.y),this._m=w._m}else if(arguments[0]instanceof Se){var k=arguments[0];Se.constructor_.call(this,k.x,k.y),this._m=this.getM()}}else if(arguments.length===3){var G=arguments[0],te=arguments[1],ue=arguments[2];Se.constructor_.call(this,G,te,Se.NULL_ORDINATE),this._m=ue}}}]),_}(Se);cn.X=0,cn.Y=1,cn.Z=-1,cn.M=2;var si=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(w,k){switch(w){case Se.X:this.x=k;break;case Se.Y:this.y=k;break;case Se.Z:this.z=k;break;case Se.M:this._m=k;break;default:throw new W("Invalid ordinate index: "+w)}}},{key:"setM",value:function(w){this._m=w}},{key:"getOrdinate",value:function(w){switch(w){case Se.X:return this.x;case Se.Y:return this.y;case Se.Z:return this.getZ();case Se.M:return this.getM()}throw new W("Invalid ordinate index: "+w)}},{key:"copy",value:function(){return new _(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(w){this.x=w.x,this.y=w.y,this.z=w.getZ(),this._m=w.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)Se.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof _){var w=arguments[0];Se.constructor_.call(this,w),this._m=w._m}else if(arguments[0]instanceof Se){var k=arguments[0];Se.constructor_.call(this,k),this._m=this.getM()}}else if(arguments.length===4){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=arguments[3];Se.constructor_.call(this,G,te,ue),this._m=Ce}}}]),_}(Se),gn=function(){function F(){r(this,F)}return i(F,null,[{key:"measures",value:function(g){return g instanceof sn?0:g instanceof cn||g instanceof si?1:0}},{key:"dimension",value:function(g){return g instanceof sn?2:g instanceof cn?3:g instanceof si?4:3}},{key:"create",value:function(){if(arguments.length===1){var g=arguments[0];return F.create(g,0)}if(arguments.length===2){var _=arguments[0],w=arguments[1];return _===2?new sn:_===3&&w===0?new Se:_===3&&w===1?new cn:_===4&&w===1?new si:new Se}}}]),F}(),_i=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"getCoordinate",value:function(w){return this.get(w)}},{key:"addAll",value:function(){if(arguments.length===2&&typeof arguments[1]=="boolean"&&Rr(arguments[0],ft)){for(var w=arguments[0],k=arguments[1],G=!1,te=w.iterator();te.hasNext();)this.add(te.next(),k),G=!0;return G}return b(o(_.prototype),"addAll",this).apply(this,arguments)}},{key:"clone",value:function(){for(var w=b(o(_.prototype),"clone",this).call(this),k=0;k=1){var Ce=this.get(this.size()-1);if(Ce.equals2D(te))return null}b(o(_.prototype),"add",this).call(this,te)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var Ue=arguments[0],It=arguments[1];return this.add(Ue,It),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var Vt=arguments[0],gr=arguments[1],rn=arguments[2];if(rn)for(var Zr=0;Zr=0;yi--)this.add(Vt[yi],gr);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof Se){var Sn=arguments[0],jr=arguments[1],Ms=arguments[2];if(!Ms){var Os=this.size();if(Os>0){if(Sn>0){var Ts=this.get(Sn-1);if(Ts.equals2D(jr))return null}if(SnTo&&(Io=-1);for(var ja=Ns;ja!==To;ja+=Io)this.add(ma[ja],Ba);return!0}}},{key:"closeRing",value:function(){if(this.size()>0){var w=this.get(0).copy();this.add(w,!1)}}}],[{key:"constructor_",value:function(){if(arguments.length!==0){if(arguments.length===1){var w=arguments[0];this.ensureCapacity(w.length),this.add(w,!0)}else if(arguments.length===2){var k=arguments[0],G=arguments[1];this.ensureCapacity(k.length),this.add(k,G)}}}}]),_}(ot);_i.coordArrayType=new Array(0).fill(null);var Xi=function(){function F(){r(this,F)}return i(F,null,[{key:"isRing",value:function(g){return!(g.length<4)&&!!g[0].equals2D(g[g.length-1])}},{key:"ptNotInList",value:function(g,_){for(var w=0;w=g?_:[]}},{key:"indexOf",value:function(g,_){for(var w=0;w<_.length;w++)if(g.equals(_[w]))return w;return-1}},{key:"increasingDirection",value:function(g){for(var _=0;_0)&&(_=g[w]);return _}},{key:"extract",value:function(g,_,w){_=Gi.clamp(_,0,g.length);var k=(w=Gi.clamp(w,-1,g.length))-_+1;w<0&&(k=0),_>=g.length&&(k=0),w<_&&(k=0);var G=new Array(k).fill(null);if(k===0)return G;for(var te=0,ue=_;ue<=w;ue++)G[te++]=g[ue];return G}}]),F}(),Vi=function(){function F(){r(this,F)}return i(F,[{key:"compare",value:function(g,_){var w=g,k=_;return Xi.compare(w,k)}},{key:"interfaces_",get:function(){return[pt]}}]),F}(),Ta=function(){function F(){r(this,F)}return i(F,[{key:"compare",value:function(g,_){var w=g,k=_;if(w.lengthk.length)return 1;if(w.length===0)return 0;var G=Xi.compare(w,k);return Xi.isEqualReversed(w,k)?0:G}},{key:"OLDcompare",value:function(g,_){var w=g,k=_;if(w.lengthk.length)return 1;if(w.length===0)return 0;for(var G=Xi.increasingDirection(w),te=Xi.increasingDirection(k),ue=G>0?0:w.length-1,Ce=te>0?0:w.length-1,Ue=0;Ue0){var g=new Oi(17*this._coordinates.length);g.append("("),g.append(this._coordinates[0]);for(var _=1;_3&&(k=3),k<2&&(k=2),new Jo(w,k)}if(arguments.length===3){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=te-ue;return ue>1&&(ue=1),Ce>3&&(Ce=3),Ce<2&&(Ce=2),new Jo(G,Ce+ue,ue)}}}},{key:"interfaces_",get:function(){return[pi,ge]}}],[{key:"instance",value:function(){return F.instanceObject}}]),F}();Go.instanceObject=new Go;var $n=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"copyInternal",value:function(){for(var w=new Array(this._geometries.length).fill(null),k=0;k=0?g:_}}]),F}(),Xs=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"readResolve",value:function(){return F.nameToTypeMap.get(this._name)}},{key:"toString",value:function(){return this._name}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){this._name=null;var g=arguments[0];this._name=g,F.nameToTypeMap.put(g,this)}}]),F}();Xs.nameToTypeMap=new aa,As.Type=Xs,As.FIXED=new Xs("FIXED"),As.FLOATING=new Xs("FLOATING"),As.FLOATING_SINGLE=new Xs("FLOATING SINGLE"),As.maximumPreciseValue=9007199254740992;var yl=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"copyInternal",value:function(){for(var w=new Array(this._geometries.length).fill(null),k=0;k1){if(Ce instanceof Nt)return this.createMultiPolygon(F.toPolygonArray(g));if(Ce instanceof Yt)return this.createMultiLineString(F.toLineStringArray(g));if(Ce instanceof ur)return this.createMultiPoint(F.toPointArray(g));Je.shouldNeverReachHere("Unhandled geometry type: "+Ce.getGeometryType())}return Ce}},{key:"createMultiPointFromCoords",value:function(g){return this.createMultiPoint(g!==null?this.getCoordinateSequenceFactory().create(g):null)}},{key:"createPoint",value:function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Se){var g=arguments[0];return this.createPoint(g!==null?this.getCoordinateSequenceFactory().create([g]):null)}if(Rr(arguments[0],Mr)){var _=arguments[0];return new ur(_,this)}}}},{key:"getCoordinateSequenceFactory",value:function(){return this._coordinateSequenceFactory}},{key:"createPolygon",value:function(){if(arguments.length===0)return this.createPolygon(null,null);if(arguments.length===1){if(Rr(arguments[0],Mr)){var g=arguments[0];return this.createPolygon(this.createLinearRing(g))}if(arguments[0]instanceof Array){var _=arguments[0];return this.createPolygon(this.createLinearRing(_))}if(arguments[0]instanceof mi){var w=arguments[0];return this.createPolygon(w,null)}}else if(arguments.length===2){var k=arguments[0],G=arguments[1];return new Nt(k,G,this)}}},{key:"getSRID",value:function(){return this._SRID}},{key:"createGeometryCollection",value:function(){if(arguments.length===0)return new Lr(null,this);if(arguments.length===1){var g=arguments[0];return new Lr(g,this)}}},{key:"getPrecisionModel",value:function(){return this._precisionModel}},{key:"createLinearRing",value:function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var g=arguments[0];return this.createLinearRing(g!==null?this.getCoordinateSequenceFactory().create(g):null)}if(Rr(arguments[0],Mr)){var _=arguments[0];return new mi(_,this)}}}},{key:"createMultiPolygon",value:function(){if(arguments.length===0)return new $n(null,this);if(arguments.length===1){var g=arguments[0];return new $n(g,this)}}},{key:"createMultiPoint",value:function(){if(arguments.length===0)return new hn(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var g=arguments[0];return new hn(g,this)}if(Rr(arguments[0],Mr)){var _=arguments[0];if(_===null)return this.createMultiPoint(new Array(0).fill(null));for(var w=new Array(_.size()).fill(null),k=0;k<_.size();k++){var G=this.getCoordinateSequenceFactory().create(1,_.getDimension(),_.getMeasures());Be.copy(_,k,G,0,1),w[k]=this.createPoint(G)}return this.createMultiPoint(w)}}}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){if(this._precisionModel=null,this._coordinateSequenceFactory=null,this._SRID=null,arguments.length===0)F.constructor_.call(this,new As,0);else if(arguments.length===1){if(Rr(arguments[0],pi)){var g=arguments[0];F.constructor_.call(this,new As,0,g)}else if(arguments[0]instanceof As){var _=arguments[0];F.constructor_.call(this,_,0,F.getDefaultCoordinateSequenceFactory())}}else if(arguments.length===2){var w=arguments[0],k=arguments[1];F.constructor_.call(this,w,k,F.getDefaultCoordinateSequenceFactory())}else if(arguments.length===3){var G=arguments[0],te=arguments[1],ue=arguments[2];this._precisionModel=G,this._coordinateSequenceFactory=ue,this._SRID=te}}},{key:"toMultiPolygonArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toGeometryArray",value:function(g){if(g===null)return null;var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"getDefaultCoordinateSequenceFactory",value:function(){return Go.instance()}},{key:"toMultiLineStringArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toLineStringArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toMultiPointArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toLinearRingArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toPointArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"toPolygonArray",value:function(g){var _=new Array(g.size()).fill(null);return g.toArray(_)}},{key:"createPointFromInternalCoord",value:function(g,_){return _.getPrecisionModel().makePrecise(g),_.getFactory().createPoint(g)}}]),F}(),Zs="XY",Qo="XYZ",nl="XYM",bo="XYZM",mt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},dr="EMPTY",Or=1,Xn=2,Us=3,Js=4,co=5,il=6;for(var ps in mt)mt[ps].toUpperCase();var Y=function(){function F(g){r(this,F),this.wkt=g,this.index_=-1}return i(F,[{key:"isAlpha_",value:function(g){return g>="a"&&g<="z"||g>="A"&&g<="Z"}},{key:"isNumeric_",value:function(g,_){return g>="0"&&g<="9"||g=="."&&!(_!==void 0&&_)}},{key:"isWhiteSpace_",value:function(g){return g==" "||g==" "||g=="\r"||g==` +`}},{key:"nextChar_",value:function(){return this.wkt.charAt(++this.index_)}},{key:"nextToken",value:function(){var g,_=this.nextChar_(),w=this.index_,k=_;if(_=="(")g=Xn;else if(_==",")g=co;else if(_==")")g=Us;else if(this.isNumeric_(_)||_=="-")g=Js,k=this.readNumber_();else if(this.isAlpha_(_))g=Or,k=this.readText_();else{if(this.isWhiteSpace_(_))return this.nextToken();if(_!=="")throw new Error("Unexpected character: "+_);g=il}return{position:w,value:k,type:g}}},{key:"readNumber_",value:function(){var g,_=this.index_,w=!1,k=!1;do g=="."?w=!0:g!="e"&&g!="E"||(k=!0),g=this.nextChar_();while(this.isNumeric_(g,w)||!k&&(g=="e"||g=="E")||k&&(g=="-"||g=="+"));return parseFloat(this.wkt.substring(_,this.index_--))}},{key:"readText_",value:function(){var g,_=this.index_;do g=this.nextChar_();while(this.isAlpha_(g));return this.wkt.substring(_,this.index_--).toUpperCase()}}]),F}(),ae=function(){function F(g,_){r(this,F),this.lexer_=g,this.token_,this.layout_=Zs,this.factory=_}return i(F,[{key:"consume_",value:function(){this.token_=this.lexer_.nextToken()}},{key:"isTokenType",value:function(g){return this.token_.type==g}},{key:"match",value:function(g){var _=this.isTokenType(g);return _&&this.consume_(),_}},{key:"parse",value:function(){return this.consume_(),this.parseGeometry_()}},{key:"parseGeometryLayout_",value:function(){var g=Zs,_=this.token_;if(this.isTokenType(Or)){var w=_.value;w==="Z"?g=Qo:w==="M"?g=nl:w==="ZM"&&(g=bo),g!==Zs&&this.consume_()}return g}},{key:"parseGeometryCollectionText_",value:function(){if(this.match(Xn)){var g=[];do g.push(this.parseGeometry_());while(this.match(co));if(this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePointText_",value:function(){if(this.match(Xn)){var g=this.parsePoint_();if(this.match(Us))return g}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}},{key:"parseLineStringText_",value:function(){if(this.match(Xn)){var g=this.parsePointList_();if(this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePolygonText_",value:function(){if(this.match(Xn)){var g=this.parseLineStringTextList_();if(this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPointText_",value:function(){var g;if(this.match(Xn)){if(g=this.token_.type==Xn?this.parsePointTextList_():this.parsePointList_(),this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiLineStringText_",value:function(){if(this.match(Xn)){var g=this.parseLineStringTextList_();if(this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPolygonText_",value:function(){if(this.match(Xn)){var g=this.parsePolygonTextList_();if(this.match(Us))return g}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePoint_",value:function(){for(var g=[],_=this.layout_.length,w=0;w<_;++w){var k=this.token_;if(!this.match(Js))break;g.push(k.value)}if(g.length==_)return g;throw new Error(this.formatErrorMessage_())}},{key:"parsePointList_",value:function(){for(var g=[this.parsePoint_()];this.match(co);)g.push(this.parsePoint_());return g}},{key:"parsePointTextList_",value:function(){for(var g=[this.parsePointText_()];this.match(co);)g.push(this.parsePointText_());return g}},{key:"parseLineStringTextList_",value:function(){for(var g=[this.parseLineStringText_()];this.match(co);)g.push(this.parseLineStringText_());return g}},{key:"parsePolygonTextList_",value:function(){for(var g=[this.parsePolygonText_()];this.match(co);)g.push(this.parsePolygonText_());return g}},{key:"isEmptyGeometry_",value:function(){var g=this.isTokenType(Or)&&this.token_.value==dr;return g&&this.consume_(),g}},{key:"formatErrorMessage_",value:function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}},{key:"parseGeometry_",value:function(){var g=this.factory,_=function(Sn){return u(Se,M(Sn))},w=function(Sn){var jr=Sn.map(function(Ms){return g.createLinearRing(Ms.map(_))});return jr.length>1?g.createPolygon(jr[0],jr.slice(1)):g.createPolygon(jr[0])},k=this.token_;if(this.match(Or)){var G=k.value;if(this.layout_=this.parseGeometryLayout_(),G=="GEOMETRYCOLLECTION"){var te=this.parseGeometryCollectionText_();return g.createGeometryCollection(te)}switch(G){case"POINT":var ue=this.parsePointText_();return ue?g.createPoint(u(Se,M(ue))):g.createPoint();case"LINESTRING":var Ce=this.parseLineStringText_().map(_);return g.createLineString(Ce);case"LINEARRING":var Ue=this.parseLineStringText_().map(_);return g.createLinearRing(Ue);case"POLYGON":var It=this.parsePolygonText_();return It&&It.length!==0?w(It):g.createPolygon();case"MULTIPOINT":var Vt=this.parseMultiPointText_();if(!Vt||Vt.length===0)return g.createMultiPoint();var gr=Vt.map(_).map(function(Sn){return g.createPoint(Sn)});return g.createMultiPoint(gr);case"MULTILINESTRING":var rn=this.parseMultiLineStringText_().map(function(Sn){return g.createLineString(Sn.map(_))});return g.createMultiLineString(rn);case"MULTIPOLYGON":var Zr=this.parseMultiPolygonText_();if(!Zr||Zr.length===0)return g.createMultiPolygon();var yi=Zr.map(w);return g.createMultiPolygon(yi);default:throw new Error("Invalid geometry type: "+G)}}throw new Error(this.formatErrorMessage_())}}]),F}();function $e(F){if(F.isEmpty())return"";var g=F.getCoordinate(),_=[g.x,g.y];return g.z===void 0||Number.isNaN(g.z)||_.push(g.z),g.m===void 0||Number.isNaN(g.m)||_.push(g.m),_.join(" ")}function ut(F){for(var g=F.getCoordinates().map(function(G){var te=[G.x,G.y];return G.z===void 0||Number.isNaN(G.z)||te.push(G.z),G.m===void 0||Number.isNaN(G.m)||te.push(G.m),te}),_=[],w=0,k=g.length;w0&&(g+=" "+w),F.isEmpty()?g+" "+dr:g+" ("+_(F)+")"}var Nr=function(){function F(g){r(this,F),this.geometryFactory=g||new Ko,this.precisionModel=this.geometryFactory.getPrecisionModel()}return i(F,[{key:"read",value:function(g){var _=new Y(g);return new ae(_,this.geometryFactory).parse()}},{key:"write",value:function(g){return Zt(g)}}]),F}(),Hr=function(){function F(g){r(this,F),this.parser=new Nr(g)}return i(F,[{key:"write",value:function(g){return this.parser.write(g)}}],[{key:"toLineString",value:function(g,_){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+g.x+" "+g.y+", "+_.x+" "+_.y+" )"}}]),F}(),Fr=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getIndexAlongSegment",value:function(g,_){return this.computeIntLineIndex(),this._intLineIndex[g][_]}},{key:"getTopologySummary",value:function(){var g=new Oi;return this.isEndPoint()&&g.append(" endpoint"),this._isProper&&g.append(" proper"),this.isCollinear()&&g.append(" collinear"),g.toString()}},{key:"computeIntersection",value:function(g,_,w,k){this._inputLines[0][0]=g,this._inputLines[0][1]=_,this._inputLines[1][0]=w,this._inputLines[1][1]=k,this._result=this.computeIntersect(g,_,w,k)}},{key:"getIntersectionNum",value:function(){return this._result}},{key:"computeIntLineIndex",value:function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var g=arguments[0],_=this.getEdgeDistance(g,0),w=this.getEdgeDistance(g,1);_>w?(this._intLineIndex[g][0]=0,this._intLineIndex[g][1]=1):(this._intLineIndex[g][0]=1,this._intLineIndex[g][1]=0)}}},{key:"isProper",value:function(){return this.hasIntersection()&&this._isProper}},{key:"setPrecisionModel",value:function(g){this._precisionModel=g}},{key:"isInteriorIntersection",value:function(){if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var g=arguments[0],_=0;_G?k:G;else{var ue=Math.abs(g.x-_.x),Ce=Math.abs(g.y-_.y);(te=k>G?ue:Ce)!==0||g.equals(_)||(te=Math.max(ue,Ce))}return Je.isTrue(!(te===0&&!g.equals(_)),"Bad distance calculation"),te}},{key:"nonRobustComputeEdgeDistance",value:function(g,_,w){var k=g.x-_.x,G=g.y-_.y,te=Math.sqrt(k*k+G*G);return Je.isTrue(!(te===0&&!g.equals(_)),"Invalid distance calculation"),te}}]),F}();Fr.DONT_INTERSECT=0,Fr.DO_INTERSECT=1,Fr.COLLINEAR=2,Fr.NO_INTERSECTION=0,Fr.POINT_INTERSECTION=1,Fr.COLLINEAR_INTERSECTION=2;var an=function(F){s(_,F);var g=v(_);function _(){return r(this,_),g.call(this)}return i(_,[{key:"isInSegmentEnvelopes",value:function(w){var k=new et(this._inputLines[0][0],this._inputLines[0][1]),G=new et(this._inputLines[1][0],this._inputLines[1][1]);return k.contains(w)&&G.contains(w)}},{key:"computeIntersection",value:function(){if(arguments.length!==3)return b(o(_.prototype),"computeIntersection",this).apply(this,arguments);var w=arguments[0],k=arguments[1],G=arguments[2];if(this._isProper=!1,et.intersects(k,G,w)&&ar.index(k,G,w)===0&&ar.index(G,k,w)===0)return this._isProper=!0,(w.equals(k)||w.equals(G))&&(this._isProper=!1),this._result=Fr.POINT_INTERSECTION,null;this._result=Fr.NO_INTERSECTION}},{key:"intersection",value:function(w,k,G,te){var ue=this.intersectionSafe(w,k,G,te);return this.isInSegmentEnvelopes(ue)||(ue=new Se(_.nearestEndpoint(w,k,G,te))),this._precisionModel!==null&&this._precisionModel.makePrecise(ue),ue}},{key:"checkDD",value:function(w,k,G,te,ue){var Ce=vr.intersection(w,k,G,te),Ue=this.isInSegmentEnvelopes(Ce);Zn.out.println("DD in env = "+Ue+" --------------------- "+Ce),ue.distance(Ce)>1e-4&&Zn.out.println("Distance = "+ue.distance(Ce))}},{key:"intersectionSafe",value:function(w,k,G,te){var ue=Tr.intersection(w,k,G,te);return ue===null&&(ue=_.nearestEndpoint(w,k,G,te)),ue}},{key:"computeCollinearIntersection",value:function(w,k,G,te){var ue=et.intersects(w,k,G),Ce=et.intersects(w,k,te),Ue=et.intersects(G,te,w),It=et.intersects(G,te,k);return ue&&Ce?(this._intPt[0]=G,this._intPt[1]=te,Fr.COLLINEAR_INTERSECTION):Ue&&It?(this._intPt[0]=w,this._intPt[1]=k,Fr.COLLINEAR_INTERSECTION):ue&&Ue?(this._intPt[0]=G,this._intPt[1]=w,!G.equals(w)||Ce||It?Fr.COLLINEAR_INTERSECTION:Fr.POINT_INTERSECTION):ue&&It?(this._intPt[0]=G,this._intPt[1]=k,!G.equals(k)||Ce||Ue?Fr.COLLINEAR_INTERSECTION:Fr.POINT_INTERSECTION):Ce&&Ue?(this._intPt[0]=te,this._intPt[1]=w,!te.equals(w)||ue||It?Fr.COLLINEAR_INTERSECTION:Fr.POINT_INTERSECTION):Ce&&It?(this._intPt[0]=te,this._intPt[1]=k,!te.equals(k)||ue||Ue?Fr.COLLINEAR_INTERSECTION:Fr.POINT_INTERSECTION):Fr.NO_INTERSECTION}},{key:"computeIntersect",value:function(w,k,G,te){if(this._isProper=!1,!et.intersects(w,k,G,te))return Fr.NO_INTERSECTION;var ue=ar.index(w,k,G),Ce=ar.index(w,k,te);if(ue>0&&Ce>0||ue<0&&Ce<0)return Fr.NO_INTERSECTION;var Ue=ar.index(G,te,w),It=ar.index(G,te,k);return Ue>0&&It>0||Ue<0&&It<0?Fr.NO_INTERSECTION:ue===0&&Ce===0&&Ue===0&&It===0?this.computeCollinearIntersection(w,k,G,te):(ue===0||Ce===0||Ue===0||It===0?(this._isProper=!1,w.equals2D(G)||w.equals2D(te)?this._intPt[0]=w:k.equals2D(G)||k.equals2D(te)?this._intPt[0]=k:ue===0?this._intPt[0]=new Se(G):Ce===0?this._intPt[0]=new Se(te):Ue===0?this._intPt[0]=new Se(w):It===0&&(this._intPt[0]=new Se(k))):(this._isProper=!0,this._intPt[0]=this.intersection(w,k,G,te)),Fr.POINT_INTERSECTION)}}],[{key:"nearestEndpoint",value:function(w,k,G,te){var ue=w,Ce=zn.pointToSegment(w,G,te),Ue=zn.pointToSegment(k,G,te);return Uek&&(w=_.x,k=g.x),this._p.x>=w&&this._p.x<=k&&(this._isPointOnSegment=!0),null}if(g.y>this._p.y&&_.y<=this._p.y||_.y>this._p.y&&g.y<=this._p.y){var G=ar.index(g,_,this._p);if(G===ar.COLLINEAR)return this._isPointOnSegment=!0,null;_.ythis.location.length){var _=new Array(3).fill(null);_[it.ON]=this.location[it.ON],_[it.LEFT]=we.NONE,_[it.RIGHT]=we.NONE,this.location=_}for(var w=0;w1&&g.append(we.toLocationSymbol(this.location[it.LEFT])),g.append(we.toLocationSymbol(this.location[it.ON])),this.location.length>1&&g.append(we.toLocationSymbol(this.location[it.RIGHT])),g.toString()}},{key:"setLocations",value:function(g,_,w){this.location[it.ON]=g,this.location[it.LEFT]=_,this.location[it.RIGHT]=w}},{key:"get",value:function(g){return g1}},{key:"isAnyNull",value:function(){for(var g=0;gthis._maxNodeDegree&&(this._maxNodeDegree=_),g=this.getNext(g)}while(g!==this._startDe);this._maxNodeDegree*=2}},{key:"addPoints",value:function(g,_,w){var k=g.getCoordinates();if(_){var G=1;w&&(G=0);for(var te=G;te=0;Ce--)this._pts.add(k[Ce])}}},{key:"isHole",value:function(){return this._isHole}},{key:"setInResult",value:function(){var g=this._startDe;do g.getEdge().setInResult(!0),g=g.getNext();while(g!==this._startDe)}},{key:"containsPoint",value:function(g){var _=this.getLinearRing();if(!_.getEnvelopeInternal().contains(g)||!xi.isInRing(g,_.getCoordinates()))return!1;for(var w=this._holes.iterator();w.hasNext();)if(w.next().containsPoint(g))return!1;return!0}},{key:"addHole",value:function(g){this._holes.add(g)}},{key:"isShell",value:function(){return this._shell===null}},{key:"getLabel",value:function(){return this._label}},{key:"getEdges",value:function(){return this._edges}},{key:"getMaxNodeDegree",value:function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}},{key:"getShell",value:function(){return this._shell}},{key:"mergeLabel",value:function(){if(arguments.length===1){var g=arguments[0];this.mergeLabel(g,0),this.mergeLabel(g,1)}else if(arguments.length===2){var _=arguments[0],w=arguments[1],k=_.getLocation(w,it.RIGHT);if(k===we.NONE)return null;if(this._label.getLocation(w)===we.NONE)return this._label.setLocation(w,k),null}}},{key:"setShell",value:function(g){this._shell=g,g!==null&&g.addHole(this)}},{key:"toPolygon",value:function(g){for(var _=new Array(this._holes.size()).fill(null),w=0;w=2,"found partial label"),this.computeIM(g)}},{key:"isInResult",value:function(){return this._isInResult}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var g=arguments[0];this._label=g}}}}]),F}(),go=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"isIncidentEdgeInResult",value:function(){for(var w=this.getEdges().getEdges().iterator();w.hasNext();)if(w.next().getEdge().isInResult())return!0;return!1}},{key:"isIsolated",value:function(){return this._label.getGeometryCount()===1}},{key:"getCoordinate",value:function(){return this._coord}},{key:"print",value:function(w){w.println("node "+this._coord+" lbl: "+this._label)}},{key:"computeIM",value:function(w){}},{key:"computeMergedLocation",value:function(w,k){var G=we.NONE;if(G=this._label.getLocation(k),!w.isNull(k)){var te=w.getLocation(k);G!==we.BOUNDARY&&(G=te)}return G}},{key:"setLabel",value:function(){if(arguments.length!==2||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return b(o(_.prototype),"setLabel",this).apply(this,arguments);var w=arguments[0],k=arguments[1];this._label===null?this._label=new Gn(w,k):this._label.setLocation(w,k)}},{key:"getEdges",value:function(){return this._edges}},{key:"mergeLabel",value:function(){if(arguments[0]instanceof _){var w=arguments[0];this.mergeLabel(w._label)}else if(arguments[0]instanceof Gn)for(var k=arguments[0],G=0;G<2;G++){var te=this.computeMergedLocation(k,G),ue=this._label.getLocation(G);ue===we.NONE&&this._label.setLocation(G,te)}}},{key:"add",value:function(w){this._edges.insert(w),w.setNode(this)}},{key:"setLabelBoundary",value:function(w){if(this._label===null)return null;var k=we.NONE;this._label!==null&&(k=this._label.getLocation(w));var G=null;switch(k){case we.BOUNDARY:G=we.INTERIOR;break;case we.INTERIOR:default:G=we.BOUNDARY}this._label.setLocation(w,G)}}],[{key:"constructor_",value:function(){this._coord=null,this._edges=null;var w=arguments[0],k=arguments[1];this._coord=w,this._edges=k,this._label=new Gn(0,we.NONE)}}]),_}(Ss),Ks=function(F){s(_,F);var g=v(_);function _(){return r(this,_),g.apply(this,arguments)}return _}(wo);function Wc(F){return F==null?0:F.color}function Ps(F){return F==null?null:F.parent}function _s(F,g){F!==null&&(F.color=g)}function xd(F){return F==null?null:F.left}function wd(F){return F==null?null:F.right}var gs=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),(w=g.call(this)).root_=null,w.size_=0,w}return i(_,[{key:"get",value:function(w){for(var k=this.root_;k!==null;){var G=w.compareTo(k.key);if(G<0)k=k.left;else{if(!(G>0))return k.value;k=k.right}}return null}},{key:"put",value:function(w,k){if(this.root_===null)return this.root_={key:w,value:k,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var G,te,ue=this.root_;do if(G=ue,(te=w.compareTo(ue.key))<0)ue=ue.left;else{if(!(te>0)){var Ce=ue.value;return ue.value=k,Ce}ue=ue.right}while(ue!==null);var Ue={key:w,left:null,right:null,value:k,parent:G,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return te<0?G.left=Ue:G.right=Ue,this.fixAfterInsertion(Ue),this.size_++,null}},{key:"fixAfterInsertion",value:function(w){var k;for(w.color=1;w!=null&&w!==this.root_&&w.parent.color===1;)Ps(w)===xd(Ps(Ps(w)))?Wc(k=wd(Ps(Ps(w))))===1?(_s(Ps(w),0),_s(k,0),_s(Ps(Ps(w)),1),w=Ps(Ps(w))):(w===wd(Ps(w))&&(w=Ps(w),this.rotateLeft(w)),_s(Ps(w),0),_s(Ps(Ps(w)),1),this.rotateRight(Ps(Ps(w)))):Wc(k=xd(Ps(Ps(w))))===1?(_s(Ps(w),0),_s(k,0),_s(Ps(Ps(w)),1),w=Ps(Ps(w))):(w===xd(Ps(w))&&(w=Ps(w),this.rotateRight(w)),_s(Ps(w),0),_s(Ps(Ps(w)),1),this.rotateLeft(Ps(Ps(w))));this.root_.color=0}},{key:"values",value:function(){var w=new ot,k=this.getFirstEntry();if(k!==null)for(w.add(k.value);(k=_.successor(k))!==null;)w.add(k.value);return w}},{key:"entrySet",value:function(){var w=new Xe,k=this.getFirstEntry();if(k!==null)for(w.add(k);(k=_.successor(k))!==null;)w.add(k);return w}},{key:"rotateLeft",value:function(w){if(w!=null){var k=w.right;w.right=k.left,k.left!=null&&(k.left.parent=w),k.parent=w.parent,w.parent==null?this.root_=k:w.parent.left===w?w.parent.left=k:w.parent.right=k,k.left=w,w.parent=k}}},{key:"rotateRight",value:function(w){if(w!=null){var k=w.left;w.left=k.right,k.right!=null&&(k.right.parent=w),k.parent=w.parent,w.parent==null?this.root_=k:w.parent.right===w?w.parent.right=k:w.parent.left=k,k.right=w,w.parent=k}}},{key:"getFirstEntry",value:function(){var w=this.root_;if(w!=null)for(;w.left!=null;)w=w.left;return w}},{key:"size",value:function(){return this.size_}},{key:"containsKey",value:function(w){for(var k=this.root_;k!==null;){var G=w.compareTo(k.key);if(G<0)k=k.left;else{if(!(G>0))return!0;k=k.right}}return!1}}],[{key:"successor",value:function(w){var k;if(w===null)return null;if(w.right!==null){for(k=w.right;k.left!==null;)k=k.left;return k}k=w.parent;for(var G=w;k!==null&&G===k.right;)G=k,k=k.parent;return k}}]),_}(Ks),Hs=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"find",value:function(g){return this.nodeMap.get(g)}},{key:"addNode",value:function(){if(arguments[0]instanceof Se){var g=arguments[0],_=this.nodeMap.get(g);return _===null&&(_=this.nodeFact.createNode(g),this.nodeMap.put(g,_)),_}if(arguments[0]instanceof go){var w=arguments[0],k=this.nodeMap.get(w.getCoordinate());return k===null?(this.nodeMap.put(w.getCoordinate(),w),w):(k.mergeLabel(w),k)}}},{key:"print",value:function(g){for(var _=this.iterator();_.hasNext();)_.next().print(g)}},{key:"iterator",value:function(){return this.nodeMap.values().iterator()}},{key:"values",value:function(){return this.nodeMap.values()}},{key:"getBoundaryNodes",value:function(g){for(var _=new ot,w=this.iterator();w.hasNext();){var k=w.next();k.getLabel().getLocation(g)===we.BOUNDARY&&_.add(k)}return _}},{key:"add",value:function(g){var _=g.getCoordinate();this.addNode(_).add(g)}}],[{key:"constructor_",value:function(){this.nodeMap=new gs,this.nodeFact=null;var g=arguments[0];this.nodeFact=g}}]),F}(),fa=function(){function F(){r(this,F)}return i(F,null,[{key:"isNorthern",value:function(g){return g===F.NE||g===F.NW}},{key:"isOpposite",value:function(g,_){return g!==_&&(g-_+4)%4===2}},{key:"commonHalfPlane",value:function(g,_){if(g===_)return g;if((g-_+4)%4===2)return-1;var w=g<_?g:_;return w===0&&(g>_?g:_)===3?3:w}},{key:"isInHalfPlane",value:function(g,_){return _===F.SE?g===F.SE||g===F.SW:g===_||g===_+1}},{key:"quadrant",value:function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var g=arguments[0],_=arguments[1];if(g===0&&_===0)throw new W("Cannot compute the quadrant for point ( "+g+", "+_+" )");return g>=0?_>=0?F.NE:F.SE:_>=0?F.NW:F.SW}if(arguments[0]instanceof Se&&arguments[1]instanceof Se){var w=arguments[0],k=arguments[1];if(k.x===w.x&&k.y===w.y)throw new W("Cannot compute the quadrant for two identical points "+w);return k.x>=w.x?k.y>=w.y?F.NE:F.SE:k.y>=w.y?F.NW:F.SW}}}]),F}();fa.NE=0,fa.NW=1,fa.SW=2,fa.SE=3;var _c=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"compareDirection",value:function(g){return this._dx===g._dx&&this._dy===g._dy?0:this._quadrant>g._quadrant?1:this._quadrant2){te.linkDirectedEdgesForMinimalEdgeRings();var ue=te.buildMinimalRings(),Ce=this.findShell(ue);Ce!==null?(this.placePolygonHoles(Ce,ue),_.add(Ce)):w.addAll(ue)}else k.add(te)}return k}},{key:"buildMaximalEdgeRings",value:function(g){for(var _=new ot,w=g.iterator();w.hasNext();){var k=w.next();if(k.isInResult()&&k.getLabel().isArea()&&k.getEdgeRing()===null){var G=new Un(k,this._geometryFactory);_.add(G),G.setInResult()}}return _}},{key:"placePolygonHoles",value:function(g,_){for(var w=_.iterator();w.hasNext();){var k=w.next();k.isHole()&&k.setShell(g)}}},{key:"getPolygons",value:function(){return this.computePolygons(this._shellList)}},{key:"findShell",value:function(g){for(var _=0,w=null,k=g.iterator();k.hasNext();){var G=k.next();G.isHole()||(w=G,_++)}return Je.isTrue(_<=1,"found two shells in MinimalEdgeRing list"),w}},{key:"add",value:function(){if(arguments.length===1){var g=arguments[0];this.add(g.getEdgeEnds(),g.getNodes())}else if(arguments.length===2){var _=arguments[0],w=arguments[1];Nl.linkResultDirectedEdges(w);var k=this.buildMaximalEdgeRings(_),G=new ot,te=this.buildMinimalEdgeRings(k,this._shellList,G);this.sortShellsAndHoles(te,this._shellList,G),this.placeFreeHoles(this._shellList,G)}}}],[{key:"constructor_",value:function(){this._geometryFactory=null,this._shellList=new ot;var g=arguments[0];this._geometryFactory=g}},{key:"findEdgeRingContaining",value:function(g,_){for(var w=g.getLinearRing(),k=w.getEnvelopeInternal(),G=w.getCoordinateN(0),te=null,ue=null,Ce=_.iterator();Ce.hasNext();){var Ue=Ce.next(),It=Ue.getLinearRing(),Vt=It.getEnvelopeInternal();if(!Vt.equals(k)&&Vt.contains(k)){G=Xi.ptNotInList(w.getCoordinates(),It.getCoordinates());var gr=!1;xi.isInRing(G,It.getCoordinates())&&(gr=!0),gr&&(te===null||ue.contains(Vt))&&(ue=(te=Ue).getLinearRing().getEnvelopeInternal())}}return te}}]),F}(),wc=function(){function F(){r(this,F)}return i(F,[{key:"getBounds",value:function(){}}]),F}(),ne=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getItem",value:function(){return this._item}},{key:"getBounds",value:function(){return this._bounds}},{key:"interfaces_",get:function(){return[wc,ge]}}],[{key:"constructor_",value:function(){this._bounds=null,this._item=null;var g=arguments[0],_=arguments[1];this._bounds=g,this._item=_}}]),F}(),Te=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"poll",value:function(){if(this.isEmpty())return null;var g=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),g}},{key:"size",value:function(){return this._size}},{key:"reorder",value:function(g){for(var _=null,w=this._items.get(g);2*g<=this._size&&((_=2*g)!==this._size&&this._items.get(_+1).compareTo(this._items.get(_))<0&&_++,this._items.get(_).compareTo(w)<0);g=_)this._items.set(g,this._items.get(_));this._items.set(g,w)}},{key:"clear",value:function(){this._size=0,this._items.clear()}},{key:"peek",value:function(){return this.isEmpty()?null:this._items.get(1)}},{key:"isEmpty",value:function(){return this._size===0}},{key:"add",value:function(g){this._items.add(null),this._size+=1;var _=this._size;for(this._items.set(0,g);g.compareTo(this._items.get(Math.trunc(_/2)))<0;_/=2)this._items.set(_,this._items.get(Math.trunc(_/2)));this._items.set(_,g)}}],[{key:"constructor_",value:function(){this._size=null,this._items=null,this._size=0,this._items=new ot,this._items.add(null)}}]),F}(),ke=function(){function F(){r(this,F)}return i(F,[{key:"insert",value:function(g,_){}},{key:"remove",value:function(g,_){}},{key:"query",value:function(){}}]),F}(),Ve=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getLevel",value:function(){return this._level}},{key:"size",value:function(){return this._childBoundables.size()}},{key:"getChildBoundables",value:function(){return this._childBoundables}},{key:"addChildBoundable",value:function(g){Je.isTrue(this._bounds===null),this._childBoundables.add(g)}},{key:"isEmpty",value:function(){return this._childBoundables.isEmpty()}},{key:"getBounds",value:function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds}},{key:"interfaces_",get:function(){return[wc,ge]}}],[{key:"constructor_",value:function(){if(this._childBoundables=new ot,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var g=arguments[0];this._level=g}}}}]),F}(),Et={reverseOrder:function(){return{compare:function(F,g){return g.compareTo(F)}}},min:function(F){return Et.sort(F),F.get(0)},sort:function(F,g){var _=F.toArray();g?Ye.sort(_,g):Ye.sort(_);for(var w=F.iterator(),k=0,G=_.length;kF.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,g,_),null):(this.expand(this._boundable2,this._boundable1,!0,g,_),null);if(w)return this.expand(this._boundable1,this._boundable2,!1,g,_),null;if(k)return this.expand(this._boundable2,this._boundable1,!0,g,_),null;throw new W("neither boundable is composite")}},{key:"isLeaves",value:function(){return!(F.isComposite(this._boundable1)||F.isComposite(this._boundable2))}},{key:"compareTo",value:function(g){var _=g;return this._distance<_._distance?-1:this._distance>_._distance?1:0}},{key:"expand",value:function(g,_,w,k,G){for(var te=g.getChildBoundables().iterator();te.hasNext();){var ue=te.next(),Ce=null;(Ce=w?new F(_,ue,this._itemDistance):new F(ue,_,this._itemDistance)).getDistance()-2),k.getLevel()===w)return G.add(k),null;for(var te=k.getChildBoundables().iterator();te.hasNext();){var ue=te.next();ue instanceof Ve?this.boundablesAtLevel(w,ue,G):(Je.isTrue(ue instanceof ne),w===-1&&G.add(ue))}return null}}},{key:"query",value:function(){if(arguments.length===1){var g=arguments[0];this.build();var _=new ot;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),g)&&this.queryInternal(g,this._root,_),_}if(arguments.length===2){var w=arguments[0],k=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),w)&&this.queryInternal(w,this._root,k)}}},{key:"build",value:function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}},{key:"getRoot",value:function(){return this.build(),this._root}},{key:"remove",value:function(){if(arguments.length===2){var g=arguments[0],_=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),g)&&this.remove(g,this._root,_)}if(arguments.length===3){var w=arguments[0],k=arguments[1],G=arguments[2],te=this.removeItem(k,G);if(te)return!0;for(var ue=null,Ce=k.getChildBoundables().iterator();Ce.hasNext();){var Ue=Ce.next();if(this.getIntersectsOp().intersects(Ue.getBounds(),w)&&Ue instanceof Ve&&(te=this.remove(w,Ue,G))){ue=Ue;break}}return ue!==null&&ue.getChildBoundables().isEmpty()&&k.getChildBoundables().remove(ue),te}}},{key:"createHigherLevels",value:function(g,_){Je.isTrue(!g.isEmpty());var w=this.createParentBoundables(g,_+1);return w.size()===1?w.get(0):this.createHigherLevels(w,_+1)}},{key:"depth",value:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var g=arguments[0],_=0,w=g.getChildBoundables().iterator();w.hasNext();){var k=w.next();if(k instanceof Ve){var G=this.depth(k);G>_&&(_=G)}}return _+1}}},{key:"createParentBoundables",value:function(g,_){Je.isTrue(!g.isEmpty());var w=new ot;w.add(this.createNode(_));var k=new ot(g);Et.sort(k,this.getComparator());for(var G=k.iterator();G.hasNext();){var te=G.next();this.lastNode(w).getChildBoundables().size()===this.getNodeCapacity()&&w.add(this.createNode(_)),this.lastNode(w).addChildBoundable(te)}return w}},{key:"isEmpty",value:function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){if(this._root=null,this._built=!1,this._itemBoundables=new ot,this._nodeCapacity=null,arguments.length===0)F.constructor_.call(this,F.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var g=arguments[0];Je.isTrue(g>1,"Node capacity must be greater than 1"),this._nodeCapacity=g}}},{key:"compareDoubles",value:function(g,_){return g>_?1:g<_?-1:0}}]),F}();yr.IntersectsOp=function(){},yr.DEFAULT_NODE_CAPACITY=10;var wr=function(){function F(){r(this,F)}return i(F,[{key:"distance",value:function(g,_){}}]),F}(),Gr=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"createParentBoundablesFromVerticalSlices",value:function(w,k){Je.isTrue(w.length>0);for(var G=new ot,te=0;te=0;){var Vt=Ue.poll(),gr=Vt.getDistance();if(gr>=Ce)break;if(Vt.isLeaves())if(It.size()gr&&(It.poll(),It.add(Vt));var Zr=It.peek();Ce=Zr.getDistance()}else Vt.expandToQueue(Ue,Ce)}return _.getItems(It)}}},{key:"createNode",value:function(w){return new Xr(w)}},{key:"size",value:function(){return arguments.length===0?b(o(_.prototype),"size",this).call(this):b(o(_.prototype),"size",this).apply(this,arguments)}},{key:"insert",value:function(){if(!(arguments.length===2&&arguments[1]instanceof Object&&arguments[0]instanceof et))return b(o(_.prototype),"insert",this).apply(this,arguments);var w=arguments[0],k=arguments[1];if(w.isNull())return null;b(o(_.prototype),"insert",this).call(this,w,k)}},{key:"getIntersectsOp",value:function(){return _.intersectsOp}},{key:"verticalSlices",value:function(w,k){for(var G=Math.trunc(Math.ceil(w.size()/k)),te=new Array(k).fill(null),ue=w.iterator(),Ce=0;Ce0;){var Ue=Ce.poll(),It=Ue.getDistance();if(It>=te)break;Ue.isLeaves()?(te=It,ue=Ue):Ue.expandToQueue(Ce,te)}return ue===null?null:[ue.getBoundable(0).getItem(),ue.getBoundable(1).getItem()]}}else{if(arguments.length===2){var Vt=arguments[0],gr=arguments[1];if(this.isEmpty()||Vt.isEmpty())return null;var rn=new Mt(this.getRoot(),Vt.getRoot(),gr);return this.nearestNeighbour(rn)}if(arguments.length===3){var Zr=arguments[0],yi=arguments[1],Sn=arguments[2],jr=new ne(Zr,yi),Ms=new Mt(this.getRoot(),jr,Sn);return this.nearestNeighbour(Ms)[0]}if(arguments.length===4){var Os=arguments[0],Ts=arguments[1],io=arguments[2],ma=arguments[3],Ba=new ne(Os,Ts),Ns=new Mt(this.getRoot(),Ba,io);return this.nearestNeighbourK(Ns,ma)}}}},{key:"isWithinDistance",value:function(){if(arguments.length===2){var w=arguments[0],k=arguments[1],G=lt.POSITIVE_INFINITY,te=new Te;for(te.add(w);!te.isEmpty();){var ue=te.poll(),Ce=ue.getDistance();if(Ce>k)return!1;if(ue.maximumDistance()<=k)return!0;if(ue.isLeaves()){if((G=Ce)<=k)return!0}else ue.expandToQueue(te,G)}return!1}if(arguments.length===3){var Ue=arguments[0],It=arguments[1],Vt=arguments[2],gr=new Mt(this.getRoot(),Ue.getRoot(),It);return this.isWithinDistance(gr,Vt)}}},{key:"interfaces_",get:function(){return[ke,ge]}}],[{key:"constructor_",value:function(){if(arguments.length===0)_.constructor_.call(this,_.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var w=arguments[0];yr.constructor_.call(this,w)}}},{key:"centreX",value:function(w){return _.avg(w.getMinX(),w.getMaxX())}},{key:"avg",value:function(w,k){return(w+k)/2}},{key:"getItems",value:function(w){for(var k=new Array(w.size()).fill(null),G=0;!w.isEmpty();){var te=w.poll();k[G]=te.getBoundable(0).getItem(),G++}return k}},{key:"centreY",value:function(w){return _.avg(w.getMinY(),w.getMaxY())}}]),_}(yr),Xr=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"computeBounds",value:function(){for(var w=null,k=this.getChildBoundables().iterator();k.hasNext();){var G=k.next();w===null?w=new et(G.getBounds()):w.expandToInclude(G.getBounds())}return w}}],[{key:"constructor_",value:function(){var w=arguments[0];Ve.constructor_.call(this,w)}}]),_}(Ve);Gr.STRtreeNode=Xr,Gr.xComparator=new(function(){function F(){r(this,F)}return i(F,[{key:"interfaces_",get:function(){return[pt]}},{key:"compare",value:function(g,_){return yr.compareDoubles(Gr.centreX(g.getBounds()),Gr.centreX(_.getBounds()))}}]),F}()),Gr.yComparator=new(function(){function F(){r(this,F)}return i(F,[{key:"interfaces_",get:function(){return[pt]}},{key:"compare",value:function(g,_){return yr.compareDoubles(Gr.centreY(g.getBounds()),Gr.centreY(_.getBounds()))}}]),F}()),Gr.intersectsOp=new(function(){function F(){r(this,F)}return i(F,[{key:"interfaces_",get:function(){return[IntersectsOp]}},{key:"intersects",value:function(g,_){return g.intersects(_)}}]),F}()),Gr.DEFAULT_NODE_CAPACITY=10;var on=function(){function F(){r(this,F)}return i(F,null,[{key:"relativeSign",value:function(g,_){return g<_?-1:g>_?1:0}},{key:"compare",value:function(g,_,w){if(_.equals2D(w))return 0;var k=F.relativeSign(_.x,w.x),G=F.relativeSign(_.y,w.y);switch(g){case 0:return F.compareValue(k,G);case 1:return F.compareValue(G,k);case 2:return F.compareValue(G,-k);case 3:return F.compareValue(-k,G);case 4:return F.compareValue(-k,-G);case 5:return F.compareValue(-G,-k);case 6:return F.compareValue(-G,k);case 7:return F.compareValue(k,-G)}return Je.shouldNeverReachHere("invalid octant value"),0}},{key:"compareValue",value:function(g,_){return g<0?-1:g>0?1:_<0?-1:_>0?1:0}}]),F}(),Er=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(g){g.print(this.coord),g.print(" seg # = "+this.segmentIndex)}},{key:"compareTo",value:function(g){var _=g;return this.segmentIndex<_.segmentIndex?-1:this.segmentIndex>_.segmentIndex?1:this.coord.equals2D(_.coord)?0:this._isInterior?_._isInterior?on.compare(this._segmentOctant,this.coord,_.coord):1:-1}},{key:"isEndPoint",value:function(g){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===g}},{key:"toString",value:function(){return this.segmentIndex+":"+this.coord.toString()}},{key:"isInterior",value:function(){return this._isInterior}},{key:"interfaces_",get:function(){return[K]}}],[{key:"constructor_",value:function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var g=arguments[0],_=arguments[1],w=arguments[2],k=arguments[3];this._segString=g,this.coord=new Se(_),this.segmentIndex=w,this._segmentOctant=k,this._isInterior=!_.equals2D(g.getCoordinate(w))}}]),F}(),tn=function(){function F(){r(this,F)}return i(F,[{key:"hasNext",value:function(){}},{key:"next",value:function(){}},{key:"remove",value:function(){}}]),F}(),Jr=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getSplitCoordinates",value:function(){var g=new _i;this.addEndpoints();for(var _=this.iterator(),w=_.next();_.hasNext();){var k=_.next();this.addEdgeCoordinates(w,k,g),w=k}return g.toCoordinateArray()}},{key:"addCollapsedNodes",value:function(){var g=new ot;this.findCollapsesFromInsertedNodes(g),this.findCollapsesFromExistingVertices(g);for(var _=g.iterator();_.hasNext();){var w=_.next().intValue();this.add(this._edge.getCoordinate(w),w)}}},{key:"createSplitEdgePts",value:function(g,_){var w=_.segmentIndex-g.segmentIndex+2;if(w===2)return[new Se(g.coord),new Se(_.coord)];var k=this._edge.getCoordinate(_.segmentIndex),G=_.isInterior()||!_.coord.equals2D(k);G||w--;var te=new Array(w).fill(null),ue=0;te[ue++]=new Se(g.coord);for(var Ce=g.segmentIndex+1;Ce<=_.segmentIndex;Ce++)te[ue++]=this._edge.getCoordinate(Ce);return G&&(te[ue]=new Se(_.coord)),te}},{key:"print",value:function(g){g.println("Intersections:");for(var _=this.iterator();_.hasNext();)_.next().print(g)}},{key:"findCollapsesFromExistingVertices",value:function(g){for(var _=0;_=0?_>=0?w>=k?0:1:w>=k?7:6:_>=0?w>=k?3:2:w>=k?4:5}if(arguments[0]instanceof Se&&arguments[1]instanceof Se){var G=arguments[0],te=arguments[1],ue=te.x-G.x,Ce=te.y-G.y;if(ue===0&&Ce===0)throw new W("Cannot compute the octant for two identical points "+G);return F.octant(ue,Ce)}}}]),F}(),ui=function(){function F(){r(this,F)}return i(F,[{key:"getCoordinates",value:function(){}},{key:"size",value:function(){}},{key:"getCoordinate",value:function(g){}},{key:"isClosed",value:function(){}},{key:"setData",value:function(g){}},{key:"getData",value:function(){}}]),F}(),wi=function(){function F(){r(this,F)}return i(F,[{key:"addIntersection",value:function(g,_){}},{key:"interfaces_",get:function(){return[ui]}}]),F}(),Dn=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getCoordinates",value:function(){return this._pts}},{key:"size",value:function(){return this._pts.length}},{key:"getCoordinate",value:function(g){return this._pts[g]}},{key:"isClosed",value:function(){return this._pts[0].equals(this._pts[this._pts.length-1])}},{key:"getSegmentOctant",value:function(g){return g===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(g),this.getCoordinate(g+1))}},{key:"setData",value:function(g){this._data=g}},{key:"safeOctant",value:function(g,_){return g.equals2D(_)?0:Nn.octant(g,_)}},{key:"getData",value:function(){return this._data}},{key:"addIntersection",value:function(){if(arguments.length===2){var g=arguments[0],_=arguments[1];this.addIntersectionNode(g,_)}else if(arguments.length===4){var w=arguments[0],k=arguments[1],G=arguments[3],te=new Se(w.getIntersection(G));this.addIntersection(te,k)}}},{key:"toString",value:function(){return Hr.toLineString(new Jo(this._pts))}},{key:"getNodeList",value:function(){return this._nodeList}},{key:"addIntersectionNode",value:function(g,_){var w=_,k=w+1;if(k=0&&w>=0||_<=0&&w<=0?Math.max(_,w):0}if(arguments[0]instanceof Se){var k=arguments[0];return ar.index(this.p0,this.p1,k)}}},{key:"toGeometry",value:function(g){return g.createLineString([this.p0,this.p1])}},{key:"isVertical",value:function(){return this.p0.x===this.p1.x}},{key:"equals",value:function(g){if(!(g instanceof F))return!1;var _=g;return this.p0.equals(_.p0)&&this.p1.equals(_.p1)}},{key:"intersection",value:function(g){var _=new an;return _.computeIntersection(this.p0,this.p1,g.p0,g.p1),_.hasIntersection()?_.getIntersection(0):null}},{key:"project",value:function(){if(arguments[0]instanceof Se){var g=arguments[0];if(g.equals(this.p0)||g.equals(this.p1))return new Se(g);var _=this.projectionFactor(g),w=new Se;return w.x=this.p0.x+_*(this.p1.x-this.p0.x),w.y=this.p0.y+_*(this.p1.y-this.p0.y),w}if(arguments[0]instanceof F){var k=arguments[0],G=this.projectionFactor(k.p0),te=this.projectionFactor(k.p1);if(G>=1&&te>=1||G<=0&&te<=0)return null;var ue=this.project(k.p0);G<0&&(ue=this.p0),G>1&&(ue=this.p1);var Ce=this.project(k.p1);return te<0&&(Ce=this.p0),te>1&&(Ce=this.p1),new F(ue,Ce)}}},{key:"normalize",value:function(){this.p1.compareTo(this.p0)<0&&this.reverse()}},{key:"angle",value:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}},{key:"getCoordinate",value:function(g){return g===0?this.p0:this.p1}},{key:"distancePerpendicular",value:function(g){return zn.pointToLinePerpendicular(g,this.p0,this.p1)}},{key:"minY",value:function(){return Math.min(this.p0.y,this.p1.y)}},{key:"midPoint",value:function(){return F.midPoint(this.p0,this.p1)}},{key:"projectionFactor",value:function(g){if(g.equals(this.p0))return 0;if(g.equals(this.p1))return 1;var _=this.p1.x-this.p0.x,w=this.p1.y-this.p0.y,k=_*_+w*w;return k<=0?lt.NaN:((g.x-this.p0.x)*_+(g.y-this.p0.y)*w)/k}},{key:"closestPoints",value:function(g){var _=this.intersection(g);if(_!==null)return[_,_];var w=new Array(2).fill(null),k=lt.MAX_VALUE,G=null,te=this.closestPoint(g.p0);k=te.distance(g.p0),w[0]=te,w[1]=g.p0;var ue=this.closestPoint(g.p1);(G=ue.distance(g.p1))0&&_<1?this.project(g):this.p0.distance(g)1||lt.isNaN(_))&&(_=1),_}},{key:"toString",value:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}},{key:"isHorizontal",value:function(){return this.p0.y===this.p1.y}},{key:"reflect",value:function(g){var _=this.p1.getY()-this.p0.getY(),w=this.p0.getX()-this.p1.getX(),k=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),G=_*_+w*w,te=_*_-w*w,ue=g.getX(),Ce=g.getY();return new Se((-te*ue-2*_*w*Ce-2*_*k)/G,(te*Ce-2*_*w*ue-2*w*k)/G)}},{key:"distance",value:function(){if(arguments[0]instanceof F){var g=arguments[0];return zn.segmentToSegment(this.p0,this.p1,g.p0,g.p1)}if(arguments[0]instanceof Se){var _=arguments[0];return zn.pointToSegment(_,this.p0,this.p1)}}},{key:"pointAlong",value:function(g){var _=new Se;return _.x=this.p0.x+g*(this.p1.x-this.p0.x),_.y=this.p0.y+g*(this.p1.y-this.p0.y),_}},{key:"hashCode",value:function(){var g=lt.doubleToLongBits(this.p0.x);g^=31*lt.doubleToLongBits(this.p0.y);var _=Math.trunc(g)^Math.trunc(g>>32),w=lt.doubleToLongBits(this.p1.x);return w^=31*lt.doubleToLongBits(this.p1.y),_^(Math.trunc(w)^Math.trunc(w>>32))}},{key:"interfaces_",get:function(){return[K,ge]}}],[{key:"constructor_",value:function(){if(this.p0=null,this.p1=null,arguments.length===0)F.constructor_.call(this,new Se,new Se);else if(arguments.length===1){var g=arguments[0];F.constructor_.call(this,g.p0,g.p1)}else if(arguments.length===2){var _=arguments[0],w=arguments[1];this.p0=_,this.p1=w}else if(arguments.length===4){var k=arguments[0],G=arguments[1],te=arguments[2],ue=arguments[3];F.constructor_.call(this,new Se(k,G),new Se(te,ue))}}},{key:"midPoint",value:function(g,_){return new Se((g.x+_.x)/2,(g.y+_.y)/2)}}]),F}(),Fn=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"overlap",value:function(){if(arguments.length!==2){if(arguments.length===4){var g=arguments[0],_=arguments[1],w=arguments[2],k=arguments[3];g.getLineSegment(_,this._overlapSeg1),w.getLineSegment(k,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}}}],[{key:"constructor_",value:function(){this._overlapSeg1=new Wr,this._overlapSeg2=new Wr}}]),F}(),An=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getLineSegment",value:function(g,_){_.p0=this._pts[g],_.p1=this._pts[g+1]}},{key:"computeSelect",value:function(g,_,w,k){var G=this._pts[_],te=this._pts[w];if(w-_==1)return k.select(this,_),null;if(!g.intersects(G,te))return null;var ue=Math.trunc((_+w)/2);_=g.length-1)return g.length-1;for(var k=fa.quadrant(g[w],g[w+1]),G=_+1;GG.getId()&&(G.computeOverlaps(ue,w),this._nOverlaps++),this._segInt.isDone())return null}}}],[{key:"constructor_",value:function(){if(this._monoChains=new ot,this._index=new Gr,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0,arguments.length!==0){if(arguments.length===1){var w=arguments[0];gi.constructor_.call(this,w)}}}}]),_}(gi),ss=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"overlap",value:function(){if(arguments.length!==4)return b(o(_.prototype),"overlap",this).apply(this,arguments);var w=arguments[0],k=arguments[1],G=arguments[2],te=arguments[3],ue=w.getContext(),Ce=G.getContext();this._si.processIntersections(ue,k,Ce,te)}}],[{key:"constructor_",value:function(){this._si=null;var w=arguments[0];this._si=w}}]),_}(Fn);Ii.SegmentOverlapAction=ss;var hi=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"isDeletable",value:function(g,_,w,k){var G=this._inputLine[g],te=this._inputLine[_],ue=this._inputLine[w];return!!this.isConcave(G,te,ue)&&!!this.isShallow(G,te,ue,k)&&this.isShallowSampled(G,te,g,w,k)}},{key:"deleteShallowConcavities",value:function(){for(var g=1,_=this.findNextNonDeletedIndex(g),w=this.findNextNonDeletedIndex(_),k=!1;w=0;k--)this.addPt(g[k])}},{key:"isRedundant",value:function(g){if(this._ptList.size()<1)return!1;var _=this._ptList.get(this._ptList.size()-1);return g.distance(_)Math.PI;)g-=F.PI_TIMES_2;for(;g<=-Math.PI;)g+=F.PI_TIMES_2;return g}},{key:"angle",value:function(){if(arguments.length===1){var g=arguments[0];return Math.atan2(g.y,g.x)}if(arguments.length===2){var _=arguments[0],w=arguments[1],k=w.x-_.x,G=w.y-_.y;return Math.atan2(G,k)}}},{key:"isAcute",value:function(g,_,w){var k=g.x-_.x,G=g.y-_.y;return k*(w.x-_.x)+G*(w.y-_.y)>0}},{key:"isObtuse",value:function(g,_,w){var k=g.x-_.x,G=g.y-_.y;return k*(w.x-_.x)+G*(w.y-_.y)<0}},{key:"interiorAngle",value:function(g,_,w){var k=F.angle(_,g),G=F.angle(_,w);return Math.abs(G-k)}},{key:"normalizePositive",value:function(g){if(g<0){for(;g<0;)g+=F.PI_TIMES_2;g>=F.PI_TIMES_2&&(g=0)}else{for(;g>=F.PI_TIMES_2;)g-=F.PI_TIMES_2;g<0&&(g=0)}return g}},{key:"angleBetween",value:function(g,_,w){var k=F.angle(_,g),G=F.angle(_,w);return F.diff(k,G)}},{key:"diff",value:function(g,_){var w=null;return(w=g<_?_-g:g-_)>Math.PI&&(w=2*Math.PI-w),w}},{key:"toRadians",value:function(g){return g*Math.PI/180}},{key:"getTurn",value:function(g,_){var w=Math.sin(_-g);return w>0?F.COUNTERCLOCKWISE:w<0?F.CLOCKWISE:F.NONE}},{key:"angleBetweenOriented",value:function(g,_,w){var k=F.angle(_,g),G=F.angle(_,w)-k;return G<=-Math.PI?G+F.PI_TIMES_2:G>Math.PI?G-F.PI_TIMES_2:G}}]),F}();di.PI_TIMES_2=2*Math.PI,di.PI_OVER_2=Math.PI/2,di.PI_OVER_4=Math.PI/4,di.COUNTERCLOCKWISE=ar.COUNTERCLOCKWISE,di.CLOCKWISE=ar.CLOCKWISE,di.NONE=ar.COLLINEAR;var cs=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"addNextSegment",value:function(g,_){if(this._s0=this._s1,this._s1=this._s2,this._s2=g,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var w=ar.index(this._s0,this._s1,this._s2),k=w===ar.CLOCKWISE&&this._side===it.LEFT||w===ar.COUNTERCLOCKWISE&&this._side===it.RIGHT;w===0?this.addCollinear(_):k?this.addOutsideTurn(w,_):this.addInsideTurn(w,_)}},{key:"addLineEndCap",value:function(g,_){var w=new Wr(g,_),k=new Wr;this.computeOffsetSegment(w,it.LEFT,this._distance,k);var G=new Wr;this.computeOffsetSegment(w,it.RIGHT,this._distance,G);var te=_.x-g.x,ue=_.y-g.y,Ce=Math.atan2(ue,te);switch(this._bufParams.getEndCapStyle()){case j.CAP_ROUND:this._segList.addPt(k.p1),this.addDirectedFillet(_,Ce+Math.PI/2,Ce-Math.PI/2,ar.CLOCKWISE,this._distance),this._segList.addPt(G.p1);break;case j.CAP_FLAT:this._segList.addPt(k.p1),this._segList.addPt(G.p1);break;case j.CAP_SQUARE:var Ue=new Se;Ue.x=Math.abs(this._distance)*Math.cos(Ce),Ue.y=Math.abs(this._distance)*Math.sin(Ce);var It=new Se(k.p1.x+Ue.x,k.p1.y+Ue.y),Vt=new Se(G.p1.x+Ue.x,G.p1.y+Ue.y);this._segList.addPt(It),this._segList.addPt(Vt)}}},{key:"getCoordinates",value:function(){return this._segList.getCoordinates()}},{key:"addMitreJoin",value:function(g,_,w,k){var G=Tr.intersection(_.p0,_.p1,w.p0,w.p1);if(G!==null&&(k<=0?1:G.distance(g)/Math.abs(k))<=this._bufParams.getMitreLimit())return this._segList.addPt(G),null;this.addLimitedMitreJoin(_,w,k,this._bufParams.getMitreLimit())}},{key:"addOutsideTurn",value:function(g,_){if(this._offset0.p1.distance(this._offset1.p0)=Vt&&(Ce-=2*Math.PI),this._segList.addPt(_),this.addDirectedFillet(g,Ce,Vt,k,G),this._segList.addPt(w)}},{key:"addLastSegment",value:function(){this._segList.addPt(this._offset1.p1)}},{key:"initSideSegments",value:function(g,_,w){this._s1=g,this._s2=_,this._side=w,this._seg1.setCoordinates(g,_),this.computeOffsetSegment(this._seg1,w,this._distance,this._offset1)}},{key:"addLimitedMitreJoin",value:function(g,_,w,k){var G=this._seg0.p1,te=di.angle(G,this._seg0.p0),ue=di.angleBetweenOriented(this._seg0.p0,G,this._seg1.p1)/2,Ce=di.normalize(te+ue),Ue=di.normalize(Ce+Math.PI),It=k*w,Vt=w-It*Math.abs(Math.sin(ue)),gr=G.x+It*Math.cos(Ue),rn=G.y+It*Math.sin(Ue),Zr=new Se(gr,rn),yi=new Wr(G,Zr),Sn=yi.pointAlongOffset(1,Vt),jr=yi.pointAlongOffset(1,-Vt);this._side===it.LEFT?(this._segList.addPt(Sn),this._segList.addPt(jr)):(this._segList.addPt(jr),this._segList.addPt(Sn))}},{key:"addDirectedFillet",value:function(g,_,w,k,G){var te=k===ar.CLOCKWISE?-1:1,ue=Math.abs(_-w),Ce=Math.trunc(ue/this._filletAngleQuantum+.5);if(Ce<1)return null;for(var Ue=ue/Ce,It=new Se,Vt=0;Vt0){var w=new Se((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(w);var k=new Se((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(k)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}},{key:"createCircle",value:function(g){var _=new Se(g.x+this._distance,g.y);this._segList.addPt(_),this.addDirectedFillet(g,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}},{key:"addBevelJoin",value:function(g,_){this._segList.addPt(g.p1),this._segList.addPt(_.p0)}},{key:"init",value:function(g){this._distance=g,this._maxCurveSegmentError=g*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new us,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(g*F.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}},{key:"addCollinear",value:function(g){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===j.JOIN_BEVEL||this._bufParams.getJoinStyle()===j.JOIN_MITRE?(g&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ar.CLOCKWISE,this._distance))}},{key:"closeRing",value:function(){this._segList.closeRing()}},{key:"hasNarrowConcaveAngle",value:function(){return this._hasNarrowConcaveAngle}}],[{key:"constructor_",value:function(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Wr,this._seg1=new Wr,this._offset0=new Wr,this._offset1=new Wr,this._side=0,this._hasNarrowConcaveAngle=!1;var g=arguments[0],_=arguments[1],w=arguments[2];this._precisionModel=g,this._bufParams=_,this._li=new an,this._filletAngleQuantum=Math.PI/2/_.getQuadrantSegments(),_.getQuadrantSegments()>=8&&_.getJoinStyle()===j.JOIN_ROUND&&(this._closingSegLengthFactor=F.MAX_CLOSING_SEG_LEN_FACTOR),this.init(w)}}]),F}();cs.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,cs.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,cs.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,cs.MAX_CLOSING_SEG_LEN_FACTOR=80;var ci=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getOffsetCurve",value:function(g,_){if(this._distance=_,_===0)return null;var w=_<0,k=Math.abs(_),G=this.getSegGen(k);g.length<=1?this.computePointCurve(g[0],G):this.computeOffsetCurve(g,w,G);var te=G.getCoordinates();return w&&Xi.reverse(te),te}},{key:"computeSingleSidedBufferCurve",value:function(g,_,w){var k=this.simplifyTolerance(this._distance);if(_){w.addSegments(g,!0);var G=hi.simplify(g,-k),te=G.length-1;w.initSideSegments(G[te],G[te-1],it.LEFT),w.addFirstSegment();for(var ue=te-2;ue>=0;ue--)w.addNextSegment(G[ue],!0)}else{w.addSegments(g,!1);var Ce=hi.simplify(g,k),Ue=Ce.length-1;w.initSideSegments(Ce[0],Ce[1],it.LEFT),w.addFirstSegment();for(var It=2;It<=Ue;It++)w.addNextSegment(Ce[It],!0)}w.addLastSegment(),w.closeRing()}},{key:"computeRingBufferCurve",value:function(g,_,w){var k=this.simplifyTolerance(this._distance);_===it.RIGHT&&(k=-k);var G=hi.simplify(g,k),te=G.length-1;w.initSideSegments(G[te-1],G[0],_);for(var ue=1;ue<=te;ue++){var Ce=ue!==1;w.addNextSegment(G[ue],Ce)}w.closeRing()}},{key:"computeLineBufferCurve",value:function(g,_){var w=this.simplifyTolerance(this._distance),k=hi.simplify(g,w),G=k.length-1;_.initSideSegments(k[0],k[1],it.LEFT);for(var te=2;te<=G;te++)_.addNextSegment(k[te],!0);_.addLastSegment(),_.addLineEndCap(k[G-1],k[G]);var ue=hi.simplify(g,-w),Ce=ue.length-1;_.initSideSegments(ue[Ce],ue[Ce-1],it.LEFT);for(var Ue=Ce-2;Ue>=0;Ue--)_.addNextSegment(ue[Ue],!0);_.addLastSegment(),_.addLineEndCap(ue[1],ue[0]),_.closeRing()}},{key:"computePointCurve",value:function(g,_){switch(this._bufParams.getEndCapStyle()){case j.CAP_ROUND:_.createCircle(g);break;case j.CAP_SQUARE:_.createSquare(g)}}},{key:"getLineCurve",value:function(g,_){if(this._distance=_,this.isLineOffsetEmpty(_))return null;var w=Math.abs(_),k=this.getSegGen(w);if(g.length<=1)this.computePointCurve(g[0],k);else if(this._bufParams.isSingleSided()){var G=_<0;this.computeSingleSidedBufferCurve(g,G,k)}else this.computeLineBufferCurve(g,k);return k.getCoordinates()}},{key:"getBufferParameters",value:function(){return this._bufParams}},{key:"simplifyTolerance",value:function(g){return g*this._bufParams.getSimplifyFactor()}},{key:"getRingCurve",value:function(g,_,w){if(this._distance=w,g.length<=2)return this.getLineCurve(g,w);if(w===0)return F.copyCoordinates(g);var k=this.getSegGen(w);return this.computeRingBufferCurve(g,_,k),k.getCoordinates()}},{key:"computeOffsetCurve",value:function(g,_,w){var k=this.simplifyTolerance(this._distance);if(_){var G=hi.simplify(g,-k),te=G.length-1;w.initSideSegments(G[te],G[te-1],it.LEFT),w.addFirstSegment();for(var ue=te-2;ue>=0;ue--)w.addNextSegment(G[ue],!0)}else{var Ce=hi.simplify(g,k),Ue=Ce.length-1;w.initSideSegments(Ce[0],Ce[1],it.LEFT),w.addFirstSegment();for(var It=2;It<=Ue;It++)w.addNextSegment(Ce[It],!0)}w.addLastSegment()}},{key:"isLineOffsetEmpty",value:function(g){return g===0||g<0&&!this._bufParams.isSingleSided()}},{key:"getSegGen",value:function(g){return new cs(this._precisionModel,this._bufParams,g)}}],[{key:"constructor_",value:function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var g=arguments[0],_=arguments[1];this._precisionModel=g,this._bufParams=_}},{key:"copyCoordinates",value:function(g){for(var _=new Array(g.length).fill(null),w=0;w<_.length;w++)_[w]=new Se(g[w]);return _}}]),F}(),ns=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"findStabbedSegments",value:function(){if(arguments.length===1){for(var g=arguments[0],_=new ot,w=this._subgraphs.iterator();w.hasNext();){var k=w.next(),G=k.getEnvelope();g.yG.getMaxY()||this.findStabbedSegments(g,k.getDirectedEdges(),_)}return _}if(arguments.length===3){if(Rr(arguments[2],Ur)&&arguments[0]instanceof Se&&arguments[1]instanceof xc)for(var te=arguments[0],ue=arguments[1],Ce=arguments[2],Ue=ue.getEdge().getCoordinates(),It=0;Itthis._seg.p1.y&&this._seg.reverse();var Vt=Math.max(this._seg.p0.x,this._seg.p1.x);if(!(Vtthis._seg.p1.y||ar.index(this._seg.p0,this._seg.p1,te)===ar.RIGHT)){var gr=ue.getDepth(it.LEFT);this._seg.p0.equals(Ue[It])||(gr=ue.getDepth(it.RIGHT));var rn=new Qs(this._seg,gr);Ce.add(rn)}}else if(Rr(arguments[2],Ur)&&arguments[0]instanceof Se&&Rr(arguments[1],Ur))for(var Zr=arguments[0],yi=arguments[1],Sn=arguments[2],jr=yi.iterator();jr.hasNext();){var Ms=jr.next();Ms.isForward()&&this.findStabbedSegments(Zr,Ms,Sn)}}}},{key:"getDepth",value:function(g){var _=this.findStabbedSegments(g);return _.size()===0?0:Et.min(_)._leftDepth}}],[{key:"constructor_",value:function(){this._subgraphs=null,this._seg=new Wr;var g=arguments[0];this._subgraphs=g}}]),F}(),Qs=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"compareTo",value:function(g){var _=g;if(this._upwardSeg.minX()>=_._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=_._upwardSeg.minX())return-1;var w=this._upwardSeg.orientationIndex(_._upwardSeg);return w!==0||(w=-1*_._upwardSeg.orientationIndex(this._upwardSeg))!==0?w:this._upwardSeg.compareTo(_._upwardSeg)}},{key:"compareX",value:function(g,_){var w=g.p0.compareTo(_.p0);return w!==0?w:g.p1.compareTo(_.p1)}},{key:"toString",value:function(){return this._upwardSeg.toString()}},{key:"interfaces_",get:function(){return[K]}}],[{key:"constructor_",value:function(){this._upwardSeg=null,this._leftDepth=null;var g=arguments[0],_=arguments[1];this._upwardSeg=new Wr(g),this._leftDepth=_}}]),F}();ns.DepthSegment=Qs;var ho=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,null,[{key:"constructor_",value:function(){H.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}]),_}(H),jn=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getY",value:function(){var g=this.y/this.w;if(lt.isNaN(g)||lt.isInfinite(g))throw new ho;return g}},{key:"getX",value:function(){var g=this.x/this.w;if(lt.isNaN(g)||lt.isInfinite(g))throw new ho;return g}},{key:"getCoordinate",value:function(){var g=new Se;return g.x=this.getX(),g.y=this.getY(),g}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var g=arguments[0];this.x=g.x,this.y=g.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var _=arguments[0],w=arguments[1];this.x=_,this.y=w,this.w=1}else if(arguments[0]instanceof F&&arguments[1]instanceof F){var k=arguments[0],G=arguments[1];this.x=k.y*G.w-G.y*k.w,this.y=G.x*k.w-k.x*G.w,this.w=k.x*G.y-G.x*k.y}else if(arguments[0]instanceof Se&&arguments[1]instanceof Se){var te=arguments[0],ue=arguments[1];this.x=te.y-ue.y,this.y=ue.x-te.x,this.w=te.x*ue.y-ue.x*te.y}}else if(arguments.length===3){var Ce=arguments[0],Ue=arguments[1],It=arguments[2];this.x=Ce,this.y=Ue,this.w=It}else if(arguments.length===4){var Vt=arguments[0],gr=arguments[1],rn=arguments[2],Zr=arguments[3],yi=Vt.y-gr.y,Sn=gr.x-Vt.x,jr=Vt.x*gr.y-gr.x*Vt.y,Ms=rn.y-Zr.y,Os=Zr.x-rn.x,Ts=rn.x*Zr.y-Zr.x*rn.y;this.x=Sn*Ts-Os*jr,this.y=Ms*jr-yi*Ts,this.w=yi*Os-Ms*Sn}}}]),F}(),$s=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"area",value:function(){return F.area(this.p0,this.p1,this.p2)}},{key:"signedArea",value:function(){return F.signedArea(this.p0,this.p1,this.p2)}},{key:"interpolateZ",value:function(g){if(g===null)throw new W("Supplied point is null.");return F.interpolateZ(g,this.p0,this.p1,this.p2)}},{key:"longestSideLength",value:function(){return F.longestSideLength(this.p0,this.p1,this.p2)}},{key:"isAcute",value:function(){return F.isAcute(this.p0,this.p1,this.p2)}},{key:"circumcentre",value:function(){return F.circumcentre(this.p0,this.p1,this.p2)}},{key:"area3D",value:function(){return F.area3D(this.p0,this.p1,this.p2)}},{key:"centroid",value:function(){return F.centroid(this.p0,this.p1,this.p2)}},{key:"inCentre",value:function(){return F.inCentre(this.p0,this.p1,this.p2)}}],[{key:"constructor_",value:function(){this.p0=null,this.p1=null,this.p2=null;var g=arguments[0],_=arguments[1],w=arguments[2];this.p0=g,this.p1=_,this.p2=w}},{key:"area",value:function(g,_,w){return Math.abs(((w.x-g.x)*(_.y-g.y)-(_.x-g.x)*(w.y-g.y))/2)}},{key:"signedArea",value:function(g,_,w){return((w.x-g.x)*(_.y-g.y)-(_.x-g.x)*(w.y-g.y))/2}},{key:"det",value:function(g,_,w,k){return g*k-_*w}},{key:"interpolateZ",value:function(g,_,w,k){var G=_.x,te=_.y,ue=w.x-G,Ce=k.x-G,Ue=w.y-te,It=k.y-te,Vt=ue*It-Ce*Ue,gr=g.x-G,rn=g.y-te,Zr=(It*gr-Ce*rn)/Vt,yi=(-Ue*gr+ue*rn)/Vt;return _.getZ()+Zr*(w.getZ()-_.getZ())+yi*(k.getZ()-_.getZ())}},{key:"longestSideLength",value:function(g,_,w){var k=g.distance(_),G=_.distance(w),te=w.distance(g),ue=k;return G>ue&&(ue=G),te>ue&&(ue=te),ue}},{key:"circumcentreDD",value:function(g,_,w){var k=xt.valueOf(g.x).subtract(w.x),G=xt.valueOf(g.y).subtract(w.y),te=xt.valueOf(_.x).subtract(w.x),ue=xt.valueOf(_.y).subtract(w.y),Ce=xt.determinant(k,G,te,ue).multiply(2),Ue=k.sqr().add(G.sqr()),It=te.sqr().add(ue.sqr()),Vt=xt.determinant(G,Ue,ue,It),gr=xt.determinant(k,Ue,te,It),rn=xt.valueOf(w.x).subtract(Vt.divide(Ce)).doubleValue(),Zr=xt.valueOf(w.y).add(gr.divide(Ce)).doubleValue();return new Se(rn,Zr)}},{key:"isAcute",value:function(g,_,w){return!!di.isAcute(g,_,w)&&!!di.isAcute(_,w,g)&&!!di.isAcute(w,g,_)}},{key:"circumcentre",value:function(g,_,w){var k=w.x,G=w.y,te=g.x-k,ue=g.y-G,Ce=_.x-k,Ue=_.y-G,It=2*F.det(te,ue,Ce,Ue),Vt=F.det(ue,te*te+ue*ue,Ue,Ce*Ce+Ue*Ue),gr=F.det(te,te*te+ue*ue,Ce,Ce*Ce+Ue*Ue);return new Se(k-Vt/It,G+gr/It)}},{key:"perpendicularBisector",value:function(g,_){var w=_.x-g.x,k=_.y-g.y,G=new jn(g.x+w/2,g.y+k/2,1),te=new jn(g.x-k+w/2,g.y+w+k/2,1);return new jn(G,te)}},{key:"angleBisector",value:function(g,_,w){var k=_.distance(g),G=k/(k+_.distance(w)),te=w.x-g.x,ue=w.y-g.y;return new Se(g.x+G*te,g.y+G*ue)}},{key:"area3D",value:function(g,_,w){var k=_.x-g.x,G=_.y-g.y,te=_.getZ()-g.getZ(),ue=w.x-g.x,Ce=w.y-g.y,Ue=w.getZ()-g.getZ(),It=G*Ue-te*Ce,Vt=te*ue-k*Ue,gr=k*Ce-G*ue,rn=It*It+Vt*Vt+gr*gr,Zr=Math.sqrt(rn)/2;return Zr}},{key:"centroid",value:function(g,_,w){var k=(g.x+_.x+w.x)/3,G=(g.y+_.y+w.y)/3;return new Se(k,G)}},{key:"inCentre",value:function(g,_,w){var k=_.distance(w),G=g.distance(w),te=g.distance(_),ue=k+G+te,Ce=(k*g.x+G*_.x+te*w.x)/ue,Ue=(k*g.y+G*_.y+te*w.y)/ue;return new Se(Ce,Ue)}}]),F}(),Mo=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"addRingSide",value:function(g,_,w,k,G){if(_===0&&g.length=mi.MINIMUM_VALID_SIZE&&ar.isCCW(g)&&(te=G,ue=k,w=it.opposite(w));var Ce=this._curveBuilder.getRingCurve(g,w,_);this.addCurve(Ce,te,ue)}},{key:"addRingBothSides",value:function(g,_){this.addRingSide(g,_,it.LEFT,we.EXTERIOR,we.INTERIOR),this.addRingSide(g,_,it.RIGHT,we.INTERIOR,we.EXTERIOR)}},{key:"addPoint",value:function(g){if(this._distance<=0)return null;var _=g.getCoordinates(),w=this._curveBuilder.getLineCurve(_,this._distance);this.addCurve(w,we.EXTERIOR,we.INTERIOR)}},{key:"addPolygon",value:function(g){var _=this._distance,w=it.LEFT;this._distance<0&&(_=-this._distance,w=it.RIGHT);var k=g.getExteriorRing(),G=Xi.removeRepeatedPoints(k.getCoordinates());if(this._distance<0&&this.isErodedCompletely(k,this._distance)||this._distance<=0&&G.length<3)return null;this.addRingSide(G,_,w,we.EXTERIOR,we.INTERIOR);for(var te=0;te0&&this.isErodedCompletely(ue,-this._distance)||this.addRingSide(Ce,_,it.opposite(w),we.INTERIOR,we.EXTERIOR)}}},{key:"isTriangleErodedCompletely",value:function(g,_){var w=new $s(g[0],g[1],g[2]),k=w.inCentre();return zn.pointToSegment(k,w.p0,w.p1)G}},{key:"addCollection",value:function(g){for(var _=0;_=this._max)throw new qt;var g=this._parent.getGeometryN(this._index++);return g instanceof Lr?(this._subcollectionIterator=new F(g),this._subcollectionIterator.next()):g}},{key:"remove",value:function(){throw new _r(this.getClass().getName())}},{key:"hasNext",value:function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}},{key:"interfaces_",get:function(){return[tn]}}],[{key:"constructor_",value:function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var g=arguments[0];this._parent=g,this._atStart=!0,this._index=0,this._max=g.getNumGeometries()}},{key:"isAtomic",value:function(g){return!(g instanceof Lr)}}]),F}(),Ni=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"locate",value:function(g){return F.locate(g,this._geom)}},{key:"interfaces_",get:function(){return[Ji]}}],[{key:"constructor_",value:function(){this._geom=null;var g=arguments[0];this._geom=g}},{key:"locatePointInPolygon",value:function(g,_){if(_.isEmpty())return we.EXTERIOR;var w=_.getExteriorRing(),k=F.locatePointInRing(g,w);if(k!==we.INTERIOR)return k;for(var G=0;G<_.getNumInteriorRing();G++){var te=_.getInteriorRingN(G),ue=F.locatePointInRing(g,te);if(ue===we.BOUNDARY)return we.BOUNDARY;if(ue===we.INTERIOR)return we.EXTERIOR}return we.INTERIOR}},{key:"locatePointInRing",value:function(g,_){return _.getEnvelopeInternal().intersects(g)?xi.locateInRing(g,_.getCoordinates()):we.EXTERIOR}},{key:"containsPointInPolygon",value:function(g,_){return we.EXTERIOR!==F.locatePointInPolygon(g,_)}},{key:"locateInGeometry",value:function(g,_){if(_ instanceof Nt)return F.locatePointInPolygon(g,_);if(_ instanceof Lr)for(var w=new ea(_);w.hasNext();){var k=w.next();if(k!==_){var G=F.locateInGeometry(g,k);if(G!==we.EXTERIOR)return G}}return we.EXTERIOR}},{key:"isContained",value:function(g,_){return we.EXTERIOR!==F.locate(g,_)}},{key:"locate",value:function(g,_){return _.isEmpty()?we.EXTERIOR:_.getEnvelopeInternal().intersects(g)?F.locateInGeometry(g,_):we.EXTERIOR}}]),F}(),xa=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"getNextCW",value:function(g){this.getEdges();var _=this._edgeList.indexOf(g),w=_-1;return _===0&&(w=this._edgeList.size()-1),this._edgeList.get(w)}},{key:"propagateSideLabels",value:function(g){for(var _=we.NONE,w=this.iterator();w.hasNext();){var k=w.next().getLabel();k.isArea(g)&&k.getLocation(g,it.LEFT)!==we.NONE&&(_=k.getLocation(g,it.LEFT))}if(_===we.NONE)return null;for(var G=_,te=this.iterator();te.hasNext();){var ue=te.next(),Ce=ue.getLabel();if(Ce.getLocation(g,it.ON)===we.NONE&&Ce.setLocation(g,it.ON,G),Ce.isArea(g)){var Ue=Ce.getLocation(g,it.LEFT),It=Ce.getLocation(g,it.RIGHT);if(It!==we.NONE){if(It!==G)throw new or("side location conflict",ue.getCoordinate());Ue===we.NONE&&Je.shouldNeverReachHere("found single null side (at "+ue.getCoordinate()+")"),G=Ue}else Je.isTrue(Ce.getLocation(g,it.LEFT)===we.NONE,"found single null side"),Ce.setLocation(g,it.RIGHT,G),Ce.setLocation(g,it.LEFT,G)}}}},{key:"getCoordinate",value:function(){var g=this.iterator();return g.hasNext()?g.next().getCoordinate():null}},{key:"print",value:function(g){Zn.out.println("EdgeEndStar: "+this.getCoordinate());for(var _=this.iterator();_.hasNext();)_.next().print(g)}},{key:"isAreaLabelsConsistent",value:function(g){return this.computeEdgeEndLabels(g.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)}},{key:"checkAreaLabelsConsistent",value:function(g){var _=this.getEdges();if(_.size()<=0)return!0;var w=_.size()-1,k=_.get(w).getLabel().getLocation(g,it.LEFT);Je.isTrue(k!==we.NONE,"Found unlabelled area edge");for(var G=k,te=this.iterator();te.hasNext();){var ue=te.next().getLabel();Je.isTrue(ue.isArea(g),"Found non-area edge");var Ce=ue.getLocation(g,it.LEFT),Ue=ue.getLocation(g,it.RIGHT);if(Ce===Ue||Ue!==G)return!1;G=Ce}return!0}},{key:"findIndex",value:function(g){this.iterator();for(var _=0;_=0;G--){var te=this._edgeList.get(G),ue=te.getSym();k===null&&(k=ue),w!==null&&ue.setNext(w),w=te}k.setNext(w)}},{key:"computeDepths",value:function(){if(arguments.length===1){var w=arguments[0],k=this.findIndex(w),G=w.getDepth(it.LEFT),te=w.getDepth(it.RIGHT),ue=this.computeDepths(k+1,this._edgeList.size(),G),Ce=this.computeDepths(0,k,ue);if(Ce!==te)throw new or("depth mismatch at "+w.getCoordinate())}else if(arguments.length===3){for(var Ue=arguments[0],It=arguments[1],Vt=arguments[2],gr=Vt,rn=Ue;rn=0;ue--){var Ce=this._resultAreaEdgeList.get(ue),Ue=Ce.getSym();switch(k===null&&Ce.getEdgeRing()===w&&(k=Ce),te){case this._SCANNING_FOR_INCOMING:if(Ue.getEdgeRing()!==w)continue;G=Ue,te=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(Ce.getEdgeRing()!==w)continue;G.setNextMin(Ce),te=this._SCANNING_FOR_INCOMING}}te===this._LINKING_TO_OUTGOING&&(Je.isTrue(k!==null,"found null for first outgoing dirEdge"),Je.isTrue(k.getEdgeRing()===w,"unable to link last incoming dirEdge"),G.setNextMin(k))}},{key:"getOutgoingDegree",value:function(){if(arguments.length===0){for(var w=0,k=this.iterator();k.hasNext();){var G=k.next();G.isInResult()&&w++}return w}if(arguments.length===1){for(var te=arguments[0],ue=0,Ce=this.iterator();Ce.hasNext();){var Ue=Ce.next();Ue.getEdgeRing()===te&&ue++}return ue}}},{key:"getLabel",value:function(){return this._label}},{key:"findCoveredLineEdges",value:function(){for(var w=we.NONE,k=this.iterator();k.hasNext();){var G=k.next(),te=G.getSym();if(!G.isLineEdge()){if(G.isInResult()){w=we.INTERIOR;break}if(te.isInResult()){w=we.EXTERIOR;break}}}if(w===we.NONE)return null;for(var ue=w,Ce=this.iterator();Ce.hasNext();){var Ue=Ce.next(),It=Ue.getSym();Ue.isLineEdge()?Ue.getEdge().setCovered(ue===we.INTERIOR):(Ue.isInResult()&&(ue=we.EXTERIOR),It.isInResult()&&(ue=we.INTERIOR))}}},{key:"computeLabelling",value:function(w){b(o(_.prototype),"computeLabelling",this).call(this,w),this._label=new Gn(we.NONE);for(var k=this.iterator();k.hasNext();)for(var G=k.next().getEdge().getLabel(),te=0;te<2;te++){var ue=G.getLocation(te);ue!==we.INTERIOR&&ue!==we.BOUNDARY||this._label.setLocation(te,we.INTERIOR)}}}],[{key:"constructor_",value:function(){this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}}]),_}(xa),Es=function(F){s(_,F);var g=v(_);function _(){return r(this,_),g.call(this)}return i(_,[{key:"createNode",value:function(w){return new go(w,new is)}}]),_}(Bh),Dl=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"compareTo",value:function(g){var _=g;return F.compareOriented(this._pts,this._orientation,_._pts,_._orientation)}},{key:"interfaces_",get:function(){return[K]}}],[{key:"constructor_",value:function(){this._pts=null,this._orientation=null;var g=arguments[0];this._pts=g,this._orientation=F.orientation(g)}},{key:"orientation",value:function(g){return Xi.increasingDirection(g)===1}},{key:"compareOriented",value:function(g,_,w,k){for(var G=_?1:-1,te=k?1:-1,ue=_?g.length:-1,Ce=k?w.length:-1,Ue=_?0:g.length-1,It=k?0:w.length-1;;){var Vt=g[Ue].compareTo(w[It]);if(Vt!==0)return Vt;var gr=(Ue+=G)===ue,rn=(It+=te)===Ce;if(gr&&!rn)return-1;if(!gr&&rn)return 1;if(gr&&rn)return 0}}}]),F}(),Ru=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"print",value:function(g){g.print("MULTILINESTRING ( ");for(var _=0;_0&&g.print(","),g.print("(");for(var k=w.getCoordinates(),G=0;G0&&g.print(","),g.print(k[G].x+" "+k[G].y);g.println(")")}g.print(") ")}},{key:"addAll",value:function(g){for(var _=g.iterator();_.hasNext();)this.add(_.next())}},{key:"findEdgeIndex",value:function(g){for(var _=0;_g?1:this.dist<_?-1:this.dist>_?1:0}},{key:"interfaces_",get:function(){return[K]}}],[{key:"constructor_",value:function(){this.coord=null,this.segmentIndex=null,this.dist=null;var g=arguments[0],_=arguments[1],w=arguments[2];this.coord=new Se(g),this.segmentIndex=_,this.dist=w}}]),F}(),sl=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"print",value:function(g){g.println("Intersections:");for(var _=this.iterator();_.hasNext();)_.next().print(g)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(g){this.addEndpoints();for(var _=this.iterator(),w=_.next();_.hasNext();){var k=_.next(),G=this.createSplitEdge(w,k);g.add(G),w=k}}},{key:"addEndpoints",value:function(){var g=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[g],g,0)}},{key:"createSplitEdge",value:function(g,_){var w=_.segmentIndex-g.segmentIndex+2,k=this.edge.pts[_.segmentIndex],G=_.dist>0||!_.coord.equals2D(k);G||w--;var te=new Array(w).fill(null),ue=0;te[ue++]=new Se(g.coord);for(var Ce=g.segmentIndex+1;Ce<=_.segmentIndex;Ce++)te[ue++]=this.edge.pts[Ce];return G&&(te[ue]=_.coord),new uu(te,new Gn(this.edge._label))}},{key:"add",value:function(g,_,w){var k=new vl(g,_,w),G=this._nodeMap.get(k);return G!==null?G:(this._nodeMap.put(k,k),k)}},{key:"isIntersection",value:function(g){for(var _=this.iterator();_.hasNext();)if(_.next().coord.equals(g))return!0;return!1}}],[{key:"constructor_",value:function(){this._nodeMap=new gs,this.edge=null;var g=arguments[0];this.edge=g}}]),F}(),_l=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"isIntersects",value:function(){return!this.isDisjoint()}},{key:"isCovers",value:function(){return(F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])||F.isTrue(this._matrix[we.INTERIOR][we.BOUNDARY])||F.isTrue(this._matrix[we.BOUNDARY][we.INTERIOR])||F.isTrue(this._matrix[we.BOUNDARY][we.BOUNDARY]))&&this._matrix[we.EXTERIOR][we.INTERIOR]===ze.FALSE&&this._matrix[we.EXTERIOR][we.BOUNDARY]===ze.FALSE}},{key:"isCoveredBy",value:function(){return(F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])||F.isTrue(this._matrix[we.INTERIOR][we.BOUNDARY])||F.isTrue(this._matrix[we.BOUNDARY][we.INTERIOR])||F.isTrue(this._matrix[we.BOUNDARY][we.BOUNDARY]))&&this._matrix[we.INTERIOR][we.EXTERIOR]===ze.FALSE&&this._matrix[we.BOUNDARY][we.EXTERIOR]===ze.FALSE}},{key:"set",value:function(){if(arguments.length===1)for(var g=arguments[0],_=0;_=0&&_>=0&&this.setAtLeast(g,_,w)}},{key:"isWithin",value:function(){return F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])&&this._matrix[we.INTERIOR][we.EXTERIOR]===ze.FALSE&&this._matrix[we.BOUNDARY][we.EXTERIOR]===ze.FALSE}},{key:"isTouches",value:function(g,_){return g>_?this.isTouches(_,g):(g===ze.A&&_===ze.A||g===ze.L&&_===ze.L||g===ze.L&&_===ze.A||g===ze.P&&_===ze.A||g===ze.P&&_===ze.L)&&this._matrix[we.INTERIOR][we.INTERIOR]===ze.FALSE&&(F.isTrue(this._matrix[we.INTERIOR][we.BOUNDARY])||F.isTrue(this._matrix[we.BOUNDARY][we.INTERIOR])||F.isTrue(this._matrix[we.BOUNDARY][we.BOUNDARY]))}},{key:"isOverlaps",value:function(g,_){return g===ze.P&&_===ze.P||g===ze.A&&_===ze.A?F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])&&F.isTrue(this._matrix[we.INTERIOR][we.EXTERIOR])&&F.isTrue(this._matrix[we.EXTERIOR][we.INTERIOR]):g===ze.L&&_===ze.L&&this._matrix[we.INTERIOR][we.INTERIOR]===1&&F.isTrue(this._matrix[we.INTERIOR][we.EXTERIOR])&&F.isTrue(this._matrix[we.EXTERIOR][we.INTERIOR])}},{key:"isEquals",value:function(g,_){return g===_&&F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])&&this._matrix[we.INTERIOR][we.EXTERIOR]===ze.FALSE&&this._matrix[we.BOUNDARY][we.EXTERIOR]===ze.FALSE&&this._matrix[we.EXTERIOR][we.INTERIOR]===ze.FALSE&&this._matrix[we.EXTERIOR][we.BOUNDARY]===ze.FALSE}},{key:"toString",value:function(){for(var g=new Oi("123456789"),_=0;_<3;_++)for(var w=0;w<3;w++)g.setCharAt(3*_+w,ze.toDimensionSymbol(this._matrix[_][w]));return g.toString()}},{key:"setAll",value:function(g){for(var _=0;_<3;_++)for(var w=0;w<3;w++)this._matrix[_][w]=g}},{key:"get",value:function(g,_){return this._matrix[g][_]}},{key:"transpose",value:function(){var g=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=g,g=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=g,g=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=g,this}},{key:"matches",value:function(g){if(g.length!==9)throw new W("Should be length 9: "+g);for(var _=0;_<3;_++)for(var w=0;w<3;w++)if(!F.matches(this._matrix[_][w],g.charAt(3*_+w)))return!1;return!0}},{key:"add",value:function(g){for(var _=0;_<3;_++)for(var w=0;w<3;w++)this.setAtLeast(_,w,g.get(_,w))}},{key:"isDisjoint",value:function(){return this._matrix[we.INTERIOR][we.INTERIOR]===ze.FALSE&&this._matrix[we.INTERIOR][we.BOUNDARY]===ze.FALSE&&this._matrix[we.BOUNDARY][we.INTERIOR]===ze.FALSE&&this._matrix[we.BOUNDARY][we.BOUNDARY]===ze.FALSE}},{key:"isCrosses",value:function(g,_){return g===ze.P&&_===ze.L||g===ze.P&&_===ze.A||g===ze.L&&_===ze.A?F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])&&F.isTrue(this._matrix[we.INTERIOR][we.EXTERIOR]):g===ze.L&&_===ze.P||g===ze.A&&_===ze.P||g===ze.A&&_===ze.L?F.isTrue(this._matrix[we.INTERIOR][we.INTERIOR])&&F.isTrue(this._matrix[we.EXTERIOR][we.INTERIOR]):g===ze.L&&_===ze.L&&this._matrix[we.INTERIOR][we.INTERIOR]===0}},{key:"interfaces_",get:function(){return[pe]}}],[{key:"constructor_",value:function(){if(this._matrix=null,arguments.length===0)this._matrix=Array(3).fill().map(function(){return Array(3)}),this.setAll(ze.FALSE);else if(arguments.length===1){if(typeof arguments[0]=="string"){var g=arguments[0];F.constructor_.call(this),this.set(g)}else if(arguments[0]instanceof F){var _=arguments[0];F.constructor_.call(this),this._matrix[we.INTERIOR][we.INTERIOR]=_._matrix[we.INTERIOR][we.INTERIOR],this._matrix[we.INTERIOR][we.BOUNDARY]=_._matrix[we.INTERIOR][we.BOUNDARY],this._matrix[we.INTERIOR][we.EXTERIOR]=_._matrix[we.INTERIOR][we.EXTERIOR],this._matrix[we.BOUNDARY][we.INTERIOR]=_._matrix[we.BOUNDARY][we.INTERIOR],this._matrix[we.BOUNDARY][we.BOUNDARY]=_._matrix[we.BOUNDARY][we.BOUNDARY],this._matrix[we.BOUNDARY][we.EXTERIOR]=_._matrix[we.BOUNDARY][we.EXTERIOR],this._matrix[we.EXTERIOR][we.INTERIOR]=_._matrix[we.EXTERIOR][we.INTERIOR],this._matrix[we.EXTERIOR][we.BOUNDARY]=_._matrix[we.EXTERIOR][we.BOUNDARY],this._matrix[we.EXTERIOR][we.EXTERIOR]=_._matrix[we.EXTERIOR][we.EXTERIOR]}}}},{key:"matches",value:function(){if(Number.isInteger(arguments[0])&&typeof arguments[1]=="string"){var g=arguments[0],_=arguments[1];return _===ze.SYM_DONTCARE||_===ze.SYM_TRUE&&(g>=0||g===ze.TRUE)||_===ze.SYM_FALSE&&g===ze.FALSE||_===ze.SYM_P&&g===ze.P||_===ze.SYM_L&&g===ze.L||_===ze.SYM_A&&g===ze.A}if(typeof arguments[0]=="string"&&typeof arguments[1]=="string"){var w=arguments[0],k=arguments[1],G=new F(w);return G.matches(k)}}},{key:"isTrue",value:function(g){return g>=0||g===ze.TRUE}}]),F}(),Gl=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"size",value:function(){return this._size}},{key:"addAll",value:function(g){return g===null||g.length===0?null:(this.ensureCapacity(this._size+g.length),Zn.arraycopy(g,0,this._data,this._size,g.length),void(this._size+=g.length))}},{key:"ensureCapacity",value:function(g){if(g<=this._data.length)return null;var _=Math.max(g,2*this._data.length);this._data=Ye.copyOf(this._data,_)}},{key:"toArray",value:function(){var g=new Array(this._size).fill(null);return Zn.arraycopy(this._data,0,g,0,this._size),g}},{key:"add",value:function(g){this.ensureCapacity(this._size+1),this._data[this._size]=g,++this._size}}],[{key:"constructor_",value:function(){if(this._data=null,this._size=0,arguments.length===0)F.constructor_.call(this,10);else if(arguments.length===1){var g=arguments[0];this._data=new Array(g).fill(null)}}}]),F}(),Xu=function(){function F(){r(this,F)}return i(F,[{key:"getChainStartIndices",value:function(g){var _=0,w=new Gl(Math.trunc(g.length/2));w.add(_);do{var k=this.findChainEnd(g,_);w.add(k),_=k}while(_w?_:w}},{key:"getMinX",value:function(g){var _=this.pts[this.startIndex[g]].x,w=this.pts[this.startIndex[g+1]].x;return __&&(k=1),this._depth[g][w]=k}}}},{key:"getDelta",value:function(g){return this._depth[g][it.RIGHT]-this._depth[g][it.LEFT]}},{key:"getLocation",value:function(g,_){return this._depth[g][_]<=0?we.EXTERIOR:we.INTERIOR}},{key:"toString",value:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}},{key:"add",value:function(){if(arguments.length===1)for(var g=arguments[0],_=0;_<2;_++)for(var w=1;w<3;w++){var k=g.getLocation(_,w);k!==we.EXTERIOR&&k!==we.INTERIOR||(this.isNull(_,w)?this._depth[_][w]=F.depthAtLocation(k):this._depth[_][w]+=F.depthAtLocation(k))}else if(arguments.length===3){var G=arguments[0],te=arguments[1],ue=arguments[2];ue===we.INTERIOR&&this._depth[G][te]++}}}],[{key:"constructor_",value:function(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var g=0;g<2;g++)for(var _=0;_<3;_++)this._depth[g][_]=F.NULL_VALUE}},{key:"depthAtLocation",value:function(g){return g===we.EXTERIOR?0:g===we.INTERIOR?1:F.NULL_VALUE}}]),F}();ta.NULL_VALUE=-1;var uu=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"getDepth",value:function(){return this._depth}},{key:"getCollapsedEdge",value:function(){var w=new Array(2).fill(null);return w[0]=this.pts[0],w[1]=this.pts[1],new _(w,Gn.toLineLabel(this._label))}},{key:"isIsolated",value:function(){return this._isIsolated}},{key:"getCoordinates",value:function(){return this.pts}},{key:"setIsolated",value:function(w){this._isIsolated=w}},{key:"setName",value:function(w){this._name=w}},{key:"equals",value:function(w){if(!(w instanceof _))return!1;var k=w;if(this.pts.length!==k.pts.length)return!1;for(var G=!0,te=!0,ue=this.pts.length,Ce=0;Ce0?this.pts[0]:null;if(arguments.length===1){var w=arguments[0];return this.pts[w]}}},{key:"print",value:function(w){w.print("edge "+this._name+": "),w.print("LINESTRING (");for(var k=0;k0&&w.print(","),w.print(this.pts[k].x+" "+this.pts[k].y);w.print(") "+this._label+" "+this._depthDelta)}},{key:"computeIM",value:function(w){_.updateIM(this._label,w)}},{key:"isCollapsed",value:function(){return!!this._label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])}},{key:"isClosed",value:function(){return this.pts[0].equals(this.pts[this.pts.length-1])}},{key:"getMaximumSegmentIndex",value:function(){return this.pts.length-1}},{key:"getDepthDelta",value:function(){return this._depthDelta}},{key:"getNumPoints",value:function(){return this.pts.length}},{key:"printReverse",value:function(w){w.print("edge "+this._name+": ");for(var k=this.pts.length-1;k>=0;k--)w.print(this.pts[k]+" ");w.println("")}},{key:"getMonotoneChainEdge",value:function(){return this._mce===null&&(this._mce=new Lu(this)),this._mce}},{key:"getEnvelope",value:function(){if(this._env===null){this._env=new et;for(var w=0;w0&&w.append(","),w.append(this.pts[k].x+" "+this.pts[k].y);return w.append(") "+this._label+" "+this._depthDelta),w.toString()}},{key:"isPointwiseEqual",value:function(w){if(this.pts.length!==w.pts.length)return!1;for(var k=0;kk||this._maxyte;if(ue)return!1;var Ce=this.intersectsToleranceSquare(g,_);return Je.isTrue(!(ue&&Ce),"Found bad envelope test"),Ce}},{key:"initCorners",value:function(g){var _=.5;this._minx=g.x-_,this._maxx=g.x+_,this._miny=g.y-_,this._maxy=g.y+_,this._corner[0]=new Se(this._maxx,this._maxy),this._corner[1]=new Se(this._minx,this._maxy),this._corner[2]=new Se(this._minx,this._miny),this._corner[3]=new Se(this._maxx,this._miny)}},{key:"intersects",value:function(g,_){return this._scaleFactor===1?this.intersectsScaled(g,_):(this.copyScaled(g,this._p0Scaled),this.copyScaled(_,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}},{key:"scale",value:function(g){return Math.round(g*this._scaleFactor)}},{key:"getCoordinate",value:function(){return this._originalPt}},{key:"copyScaled",value:function(g,_){_.x=this.scale(g.x),_.y=this.scale(g.y)}},{key:"getSafeEnvelope",value:function(){if(this._safeEnv===null){var g=F.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new et(this._originalPt.x-g,this._originalPt.x+g,this._originalPt.y-g,this._originalPt.y+g)}return this._safeEnv}},{key:"intersectsPixelClosure",value:function(g,_){return this._li.computeIntersection(g,_,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(g,_,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(g,_,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(g,_,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))}},{key:"intersectsToleranceSquare",value:function(g,_){var w=!1,k=!1;return this._li.computeIntersection(g,_,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(g,_,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(w=!0),this._li.computeIntersection(g,_,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(k=!0),this._li.computeIntersection(g,_,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!w||!k)||!!g.equals(this._pt)||!!_.equals(this._pt))))}},{key:"addSnappedNode",value:function(g,_){var w=g.getCoordinate(_),k=g.getCoordinate(_+1);return!!this.intersects(w,k)&&(g.addIntersection(this.getCoordinate(),_),!0)}}],[{key:"constructor_",value:function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var g=arguments[0],_=arguments[1],w=arguments[2];if(this._originalPt=g,this._pt=g,this._scaleFactor=_,this._li=w,_<=0)throw new W("Scale factor must be non-zero");_!==1&&(this._pt=new Se(this.scale(g.x),this.scale(g.y)),this._p0Scaled=new Se,this._p1Scaled=new Se),this.initCorners(this._pt)}}]),F}();Ju.SAFE_ENV_EXPANSION_FACTOR=.75;var bc=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"select",value:function(){if(arguments.length!==1){if(arguments.length===2){var g=arguments[0],_=arguments[1];g.getLineSegment(_,this.selectedSegment),this.select(this.selectedSegment)}}}}],[{key:"constructor_",value:function(){this.selectedSegment=new Wr}}]),F}(),ql=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"snap",value:function(){if(arguments.length===1){var g=arguments[0];return this.snap(g,null,-1)}if(arguments.length===3){var _=arguments[0],w=arguments[1],k=arguments[2],G=_.getSafeEnvelope(),te=new Fl(_,w,k);return this._index.query(G,new(function(){function ue(){r(this,ue)}return i(ue,[{key:"interfaces_",get:function(){return[mr]}},{key:"visitItem",value:function(Ce){Ce.select(G,te)}}]),ue}())),te.isNodeAdded()}}}],[{key:"constructor_",value:function(){this._index=null;var g=arguments[0];this._index=g}}]),F}(),Fl=function(F){s(_,F);var g=v(_);function _(){var w;return r(this,_),w=g.call(this),_.constructor_.apply(f(w),arguments),w}return i(_,[{key:"isNodeAdded",value:function(){return this._isNodeAdded}},{key:"select",value:function(){if(!(arguments.length===2&&Number.isInteger(arguments[1])&&arguments[0]instanceof An))return b(o(_.prototype),"select",this).apply(this,arguments);var w=arguments[0],k=arguments[1],G=w.getContext();if(this._parentEdge===G&&(k===this._hotPixelVertexIndex||k+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(G,k)}}],[{key:"constructor_",value:function(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var w=arguments[0],k=arguments[1],G=arguments[2];this._hotPixel=w,this._parentEdge=k,this._hotPixelVertexIndex=G}}]),_}(bc);ql.HotPixelSnapAction=Fl;var za=function(){function F(){r(this,F),F.constructor_.apply(this,arguments)}return i(F,[{key:"processIntersections",value:function(g,_,w,k){if(g===w&&_===k)return null;var G=g.getCoordinates()[_],te=g.getCoordinates()[_+1],ue=w.getCoordinates()[k],Ce=w.getCoordinates()[k+1];if(this._li.computeIntersection(G,te,ue,Ce),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var Ue=0;Ue=0;g--){try{this.bufferReducedPrecision(g)}catch(G){if(!(G instanceof or))throw G;this._saveException=G}if(this._resultGeometry!==null)return null}throw this._saveException}if(arguments.length===1){var _=arguments[0],w=F.precisionScaleFactor(this._argGeom,this._distance,_),k=new As(w);this.bufferFixedPrecision(k)}}},{key:"computeGeometry",value:function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var g=this._argGeom.getFactory().getPrecisionModel();g.getType()===As.FIXED?this.bufferFixedPrecision(g):this.bufferReducedPrecision()}},{key:"setQuadrantSegments",value:function(g){this._bufParams.setQuadrantSegments(g)}},{key:"bufferOriginalPrecision",value:function(){try{var g=new cu(this._bufParams);this._resultGeometry=g.buffer(this._argGeom,this._distance)}catch(_){if(!(_ instanceof rr))throw _;this._saveException=_}}},{key:"getResultGeometry",value:function(g){return this._distance=g,this.computeGeometry(),this._resultGeometry}},{key:"setEndCapStyle",value:function(g){this._bufParams.setEndCapStyle(g)}}],[{key:"constructor_",value:function(){if(this._argGeom=null,this._distance=null,this._bufParams=new j,this._resultGeometry=null,this._saveException=null,arguments.length===1){var g=arguments[0];this._argGeom=g}else if(arguments.length===2){var _=arguments[0],w=arguments[1];this._argGeom=_,this._bufParams=w}}},{key:"bufferOp",value:function(){if(arguments.length===2){var g=arguments[0],_=arguments[1],w=new F(g),k=w.getResultGeometry(_);return k}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var G=arguments[0],te=arguments[1],ue=arguments[2],Ce=new F(G);Ce.setQuadrantSegments(ue);var Ue=Ce.getResultGeometry(te);return Ue}if(arguments[2]instanceof j&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var It=arguments[0],Vt=arguments[1],gr=arguments[2],rn=new F(It,gr),Zr=rn.getResultGeometry(Vt);return Zr}}else if(arguments.length===4){var yi=arguments[0],Sn=arguments[1],jr=arguments[2],Ms=arguments[3],Os=new F(yi);Os.setQuadrantSegments(jr),Os.setEndCapStyle(Ms);var Ts=Os.getResultGeometry(Sn);return Ts}}},{key:"precisionScaleFactor",value:function(g,_,w){var k=g.getEnvelopeInternal(),G=Gi.max(Math.abs(k.getMaxX()),Math.abs(k.getMaxY()),Math.abs(k.getMinX()),Math.abs(k.getMinY()))+2*(_>0?_:0),te=w-Math.trunc(Math.log(G)/Math.log(10)+1);return Math.pow(10,te)}}]),F}();hr.CAP_ROUND=j.CAP_ROUND,hr.CAP_BUTT=j.CAP_FLAT,hr.CAP_FLAT=j.CAP_FLAT,hr.CAP_SQUARE=j.CAP_SQUARE,hr.MAX_PRECISION_DIGITS=12;var En=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],bi=function(){function F(g){r(this,F),this.geometryFactory=g||new Ko}return i(F,[{key:"read",value:function(g){var _,w=(_=typeof g=="string"?JSON.parse(g):g).type;if(!hs[w])throw new Error("Unknown GeoJSON type: "+_.type);return En.indexOf(w)!==-1?hs[w].call(this,_.coordinates):w==="GeometryCollection"?hs[w].call(this,_.geometries):hs[w].call(this,_)}},{key:"write",value:function(g){var _=g.getGeometryType();if(!ts[_])throw new Error("Geometry is not supported");return ts[_].call(this,g)}}]),F}(),hs={Feature:function(F){var g={};for(var _ in F)g[_]=F[_];if(F.geometry){var w=F.geometry.type;if(!hs[w])throw new Error("Unknown GeoJSON type: "+F.type);g.geometry=this.read(F.geometry)}return F.bbox&&(g.bbox=hs.bbox.call(this,F.bbox)),g},FeatureCollection:function(F){var g={};if(F.features){g.features=[];for(var _=0;_1?0:t<-1?jo:Math.acos(t)}function N5(t){return t>1?em:t<-1?-em:Math.asin(t)}function p6(){}function AP(t,e){t&&Vle.hasOwnProperty(t.type)&&Vle[t.type](t,e)}var jle={Feature:function(t,e){AP(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++njo?t-ym:t<-jo?t+ym:t,e]}Yq.invert=Yq;function MSt(t,e,r){return(t%=ym)?e||r?v7e(Gle(t),qle(e,r)):Gle(t):e||r?qle(e,r):Yq}function Hle(t){return function(e,r){return e+=t,[e>jo?e-ym:e<-jo?e+ym:e,r]}}function Gle(t){var e=Hle(t);return e.invert=Hle(-t),e}function qle(t,e){var r=Ml(t),n=Tl(t),i=Ml(e),s=Tl(e);function o(a,l){var u=Ml(l),d=Ml(a)*u,f=Tl(a)*u,m=Tl(l),v=m*r+d*n;return[Fw(f*i-v*s,d*r-m*n),N5(v*i+f*s)]}return o.invert=function(a,l){var u=Ml(l),d=Ml(a)*u,f=Tl(a)*u,m=Tl(l),v=m*i-f*s;return[Fw(f*i+m*s,d*r+v*n),N5(v*r-d*n)]},o}function TSt(t,e,r,n,i,s){if(r){var o=Ml(e),a=Tl(e),l=n*r;i==null?(i=e+n*ym,s=e-l/2):(i=Wle(o,i),s=Wle(o,s),(n>0?is)&&(i+=n*ym));for(var u,d=i;n>0?d>s:d1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function ISt(t,e,r,n,i,s){var o=t[0],a=t[1],l=e[0],u=e[1],d=0,f=1,m=l-o,v=u-a,b;if(b=r-o,!(!m&&b>0)){if(b/=m,m<0){if(b0){if(b>f)return;b>d&&(d=b)}if(b=i-o,!(!m&&b<0)){if(b/=m,m<0){if(b>f)return;b>d&&(d=b)}else if(m>0){if(b0)){if(b/=v,v<0){if(b0){if(b>f)return;b>d&&(d=b)}if(b=s-a,!(!v&&b<0)){if(b/=v,v<0){if(b>f)return;b>d&&(d=b)}else if(v>0){if(b0&&(t[0]=o+d*m,t[1]=a+d*v),f<1&&(e[0]=o+f*m,e[1]=a+f*v),!0}}}}}function ak(t,e){return fc(t[0]-e[0])<$a&&fc(t[1]-e[1])<$a}function vR(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function x7e(t,e,r,n,i){var s=[],o=[],a,l;if(t.forEach(function(b){if(!((M=b.length-1)<=0)){var M,O=b[0],I=b[M],A;if(ak(O,I)){for(i.lineStart(),a=0;a=0;--a)i.point((f=d[a])[0],f[1]);else n(m.x,m.p.x,-1,i);m=m.p}m=m.o,d=m.z,v=!v}while(!m.v);i.lineEnd()}}}function Zle(t){if(e=t.length){for(var e,r=0,n=t[0],i;++re?1:t>=e?0:NaN}function RSt(t){return t.length===1&&(t=LSt(t)),{left:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n>>1;t(e[s],r)<0?n=s+1:i=s}return n},right:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n>>1;t(e[s],r)>0?i=s:n=s+1}return n}}}function LSt(t){return function(e,r){return w7e(t(e),r)}}RSt(w7e);function b7e(t){for(var e=t.length,r,n=-1,i=0,s,o;++n=0;)for(o=t[e],r=o.length;--r>=0;)s[--i]=o[r];return s}var m6=1e9,_R=-m6;function kSt(t,e,r,n){function i(u,d){return t<=u&&u<=r&&e<=d&&d<=n}function s(u,d,f,m){var v=0,b=0;if(u==null||(v=o(u,f))!==(b=o(d,f))||l(u,d)<0^f>0)do m.point(v===0||v===3?t:r,v>1?n:e);while((v=(v+f+4)%4)!==b);else m.point(d[0],d[1])}function o(u,d){return fc(u[0]-t)<$a?d>0?0:3:fc(u[0]-r)<$a?d>0?2:1:fc(u[1]-e)<$a?d>0?1:0:d>0?3:2}function a(u,d){return l(u.x,d.x)}function l(u,d){var f=o(u,1),m=o(d,1);return f!==m?f-m:f===0?d[1]-u[1]:f===1?u[0]-d[0]:f===2?u[1]-d[1]:d[0]-u[0]}return function(u){var d=u,f=_7e(),m,v,b,M,O,I,A,j,H,W,re,K={point:pe,lineStart:be,lineEnd:le,polygonStart:fe,polygonEnd:ee};function pe(Pe,Fe){i(Pe,Fe)&&d.point(Pe,Fe)}function ge(){for(var Pe=0,Fe=0,We=v.length;Fen&&(Je-rr)*(n-Tt)>(pr-Tt)*(t-rr)&&++Pe:pr<=n&&(Je-rr)*(n-Tt)<(pr-Tt)*(t-rr)&&--Pe;return Pe}function fe(){d=f,m=[],v=[],re=!0}function ee(){var Pe=ge(),Fe=re&&Pe,We=(m=b7e(m)).length;(Fe||We)&&(u.polygonStart(),Fe&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),We&&x7e(m,a,Pe,s,u),u.polygonEnd()),d=u,m=v=b=null}function be(){K.point=ve,v&&v.push(b=[]),W=!0,H=!1,A=j=NaN}function le(){m&&(ve(M,O),I&&H&&f.rejoin(),m.push(f.result())),K.point=pe,H&&d.lineEnd()}function ve(Pe,Fe){var We=i(Pe,Fe);if(v&&b.push([Pe,Fe]),W)M=Pe,O=Fe,I=We,W=!1,We&&(d.lineStart(),d.point(Pe,Fe));else if(We&&H)d.point(Pe,Fe);else{var He=[A=Math.max(_R,Math.min(m6,A)),j=Math.max(_R,Math.min(m6,j))],Lt=[Pe=Math.max(_R,Math.min(m6,Pe)),Fe=Math.max(_R,Math.min(m6,Fe))];ISt(He,Lt,t,e,r,n)?(H||(d.lineStart(),d.point(He[0],He[1])),d.point(Lt[0],Lt[1]),We||d.lineEnd(),re=!1):We&&(d.lineStart(),d.point(Pe,Fe),re=!1)}A=Pe,j=Fe,H=We}return K}}var RB=p_();function ASt(t,e){var r=e[0],n=e[1],i=[Tl(r),-Ml(r),0],s=0,o=0;RB.reset();for(var a=0,l=t.length;a=0?1:-1,pe=K*re,ge=pe>jo,fe=b*H;if(RB.add(Fw(fe*K*Tl(pe),M*W+fe*Ml(pe))),s+=ge?re+K*ym:re,ge^m>=r^A>=r){var ee=PP(zw(f),zw(I));Zq(ee);var be=PP(i,ee);Zq(be);var le=(ge^re>=0?-1:1)*N5(be[2]);(n>le||n===le&&(ee[0]||ee[1]))&&(o+=ge^re>=0?1:-1)}}return(s<-$a||s<$a&&RB<-$a)^o&1}p_();function Yle(t){return t}p_();p_();var Bw=1/0,$P=Bw,SS=-Bw,OP=SS,Xle={point:PSt,lineStart:p6,lineEnd:p6,polygonStart:p6,polygonEnd:p6,result:function(){var t=[[Bw,$P],[SS,OP]];return SS=OP=-($P=Bw=1/0),t}};function PSt(t,e){tSS&&(SS=t),e<$P&&($P=e),e>OP&&(OP=e)}p_();function C7e(t,e,r,n){return function(i,s){var o=e(s),a=i.invert(n[0],n[1]),l=_7e(),u=e(l),d=!1,f,m,v,b={point:M,lineStart:I,lineEnd:A,polygonStart:function(){b.point=j,b.lineStart=H,b.lineEnd=W,m=[],f=[]},polygonEnd:function(){b.point=M,b.lineStart=I,b.lineEnd=A,m=b7e(m);var re=ASt(f,a);m.length?(d||(s.polygonStart(),d=!0),x7e(m,OSt,re,r,s)):re&&(d||(s.polygonStart(),d=!0),s.lineStart(),r(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),m=f=null},sphere:function(){s.polygonStart(),s.lineStart(),r(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function M(re,K){var pe=i(re,K);t(re=pe[0],K=pe[1])&&s.point(re,K)}function O(re,K){var pe=i(re,K);o.point(pe[0],pe[1])}function I(){b.point=O,o.lineStart()}function A(){b.point=M,o.lineEnd()}function j(re,K){v.push([re,K]);var pe=i(re,K);u.point(pe[0],pe[1])}function H(){u.lineStart(),v=[]}function W(){j(v[0][0],v[0][1]),u.lineEnd();var re=u.clean(),K=l.result(),pe,ge=K.length,fe,ee,be;if(v.pop(),f.push(v),v=null,!!ge){if(re&1){if(ee=K[0],(fe=ee.length-1)>0){for(d||(s.polygonStart(),d=!0),s.lineStart(),pe=0;pe1&&re&2&&K.push(K.pop().concat(K.shift())),m.push(K.filter($St))}}return b}}function $St(t){return t.length>1}function OSt(t,e){return((t=t.x)[0]<0?t[1]-em-$a:em-t[1])-((e=e.x)[0]<0?e[1]-em-$a:em-e[1])}const Jle=C7e(function(){return!0},NSt,FSt,[-jo,-em]);function NSt(t){var e=NaN,r=NaN,n=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(s,o){var a=s>0?jo:-jo,l=fc(s-e);fc(l-jo)<$a?(t.point(e,r=(r+o)/2>0?em:-em),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(s,r),i=0):n!==a&&l>=jo&&(fc(e-n)<$a&&(e-=n*$a),fc(s-a)<$a&&(s-=a*$a),r=DSt(e,r,s,o),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(a,r),i=0),t.point(e=s,r=o),n=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-i}}}function DSt(t,e,r,n){var i,s,o=Tl(t-r);return fc(o)>$a?SSt((Tl(e)*(s=Ml(n))*Tl(r)-Tl(n)*(i=Ml(e))*Tl(t))/(i*s*o)):(e+n)/2}function FSt(t,e,r,n){var i;if(t==null)i=r*em,n.point(-jo,i),n.point(0,i),n.point(jo,i),n.point(jo,0),n.point(jo,-i),n.point(0,-i),n.point(-jo,-i),n.point(-jo,0),n.point(-jo,i);else if(fc(t[0]-e[0])>$a){var s=t[0]0,i=fc(r)>$a;function s(d,f,m,v){TSt(v,t,e,m,d,f)}function o(d,f){return Ml(d)*Ml(f)>r}function a(d){var f,m,v,b,M;return{lineStart:function(){b=v=!1,M=1},point:function(O,I){var A=[O,I],j,H=o(O,I),W=n?H?0:u(O,I):H?u(O+(O<0?jo:-jo),I):0;if(!f&&(b=v=H)&&d.lineStart(),H!==v&&(j=l(f,A),(!j||ak(f,j)||ak(A,j))&&(A[0]+=$a,A[1]+=$a,H=o(A[0],A[1]))),H!==v)M=0,H?(d.lineStart(),j=l(A,f),d.point(j[0],j[1])):(j=l(f,A),d.point(j[0],j[1]),d.lineEnd()),f=j;else if(i&&f&&n^H){var re;!(W&m)&&(re=l(A,f,!0))&&(M=0,n?(d.lineStart(),d.point(re[0][0],re[0][1]),d.point(re[1][0],re[1][1]),d.lineEnd()):(d.point(re[1][0],re[1][1]),d.lineEnd(),d.lineStart(),d.point(re[0][0],re[0][1])))}H&&(!f||!ak(f,A))&&d.point(A[0],A[1]),f=A,v=H,m=W},lineEnd:function(){v&&d.lineEnd(),f=null},clean:function(){return M|(b&&v)<<1}}}function l(d,f,m){var v=zw(d),b=zw(f),M=[1,0,0],O=PP(v,b),I=gR(O,O),A=O[0],j=I-A*A;if(!j)return!m&&d;var H=r*I/j,W=-r*A/j,re=PP(M,O),K=yR(M,H),pe=yR(O,W);IB(K,pe);var ge=re,fe=gR(K,ge),ee=gR(ge,ge),be=fe*fe-ee*(gR(K,K)-1);if(!(be<0)){var le=T7(be),ve=yR(ge,(-fe-le)/ee);if(IB(ve,K),ve=Wq(ve),!m)return ve;var Pe=d[0],Fe=f[0],We=d[1],He=f[1],Lt;Fe0^ve[1]<(fc(ve[0]-Pe)<$a?We:He):We<=ve[1]&&ve[1]<=He:lt>jo^(Pe<=ve[0]&&ve[0]<=Fe)){var Tt=yR(ge,(-fe+le)/ee);return IB(Tt,K),[ve,Wq(Tt)]}}}function u(d,f){var m=n?t:jo-t,v=0;return d<-m?v|=1:d>m&&(v|=2),f<-m?v|=4:f>m&&(v|=8),v}return C7e(o,a,s,n?[0,-t]:[-jo,t-jo])}function S7e(t){return function(e){var r=new Xq;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Xq(){}Xq.prototype={constructor:Xq,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function E7e(t,e,r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),s!=null&&t.clipExtent(null),ESt(r,t.stream(Xle));var o=Xle.result(),a=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+e[0][0]+(n-a*(o[1][0]+o[0][0]))/2,u=+e[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&t.clipExtent(s),t.scale(a*150).translate([l,u])}function BSt(t,e,r){return E7e(t,[[0,0],e],r)}var Kle=16,jSt=Ml(30*mp);function Qle(t,e){return+e?USt(t,e):VSt(t)}function VSt(t){return S7e({point:function(e,r){e=t(e,r),this.stream.point(e[0],e[1])}})}function USt(t,e){function r(n,i,s,o,a,l,u,d,f,m,v,b,M,O){var I=u-n,A=d-i,j=I*I+A*A;if(j>4*e&&M--){var H=o+m,W=a+v,re=l+b,K=T7(H*H+W*W+re*re),pe=N5(re/=K),ge=fc(fc(re)-1)<$a||fc(s-f)<$a?(s+f)/2:Fw(W,H),fe=t(ge,pe),ee=fe[0],be=fe[1],le=ee-n,ve=be-i,Pe=A*le-I*ve;(Pe*Pe/j>e||fc((I*le+A*ve)/j-.5)>.3||o*m+a*v+l*b2?ve[2]%360*mp:0,be()):[u*lv,d*lv,f*lv]},ge.precision=function(ve){return arguments.length?(re=Qle(ee,W=ve*ve),le()):T7(W)},ge.fitExtent=function(ve,Pe){return E7e(ge,ve,Pe)},ge.fitSize=function(ve,Pe){return BSt(ge,ve,Pe)};function be(){v=v7e(m=MSt(u,d,f),e);var ve=e(a,l);return s=n-ve[0]*r,o=i+ve[1]*r,le()}function le(){return K=pe=null,ge}return function(){return e=t.apply(this,arguments),ge.invert=e.invert&&fe,be()}}function M7e(t){return function(e,r){var n=Ml(e),i=Ml(r),s=t(n*i);return[s*i*Tl(e),s*Tl(r)]}}function T7e(t){return function(e,r){var n=T7(e*e+r*r),i=t(n),s=Tl(i),o=Ml(i);return[Fw(e*s,n*o),N5(n&&r*s/n)]}}var WSt=M7e(function(t){return T7(2/(1+t))});WSt.invert=T7e(function(t){return 2*N5(t/2)});var I7e=M7e(function(t){return(t=y7e(t))&&t/Tl(t)});I7e.invert=T7e(function(t){return t});function ZSt(){return GSt(I7e).scale(79.4188).clipAngle(180-.001)}function eue(t,e){return[t,e]}eue.invert=eue;var{BufferOp:YSt,GeoJSONReader:XSt,GeoJSONWriter:JSt}=CSt;function KSt(t,e,r){r=r||{};var n=r.units||"kilometers",i=r.steps||8;if(!t)throw new Error("geojson is required");if(typeof r!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return XS(t,function(o){var a=lk(o,e,n,i);a&&s.push(a)}),zV(s);case"FeatureCollection":return Fre(t,function(o){var a=lk(o,e,n,i);a&&Fre(a,function(l){l&&s.push(l)})}),zV(s)}return lk(t,e,n,i)}function lk(t,e,r,n){var i=t.properties||{},s=t.type==="Feature"?t.geometry:t;if(s.type==="GeometryCollection"){var o=[];return XS(t,function(M){var O=lk(M,e,r,n);O&&o.push(O)}),zV(o)}var a=QSt(s),l={type:s.type,coordinates:L7e(s.coordinates,a)},u=new XSt,d=u.read(l),f=Bge(SXe(e,r),"meters"),m=YSt.bufferOp(d,f,n),v=new JSt;if(m=v.write(m),!R7e(m.coordinates)){var b={type:m.type,coordinates:k7e(m.coordinates,a)};return YS(b,i)}}function R7e(t){return Array.isArray(t[0])?R7e(t[0]):isNaN(t[0])}function L7e(t,e){return typeof t[0]!="object"?e(t):t.map(function(r){return L7e(r,e)})}function k7e(t,e){return typeof t[0]!="object"?e.invert(t):t.map(function(r){return k7e(r,e)})}function QSt(t){var e=wSt(t).geometry.coordinates,r=[-e[0],-e[1]];return ZSt().rotate(r).scale(Sh)}var tue=KSt;/** + * splaytree v3.1.2 + * Fast Splay tree for Node and browser + * + * @author Alexander Milevski + * @license MIT + * @preserve + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */function eEt(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]e?1:t0){if(e.right===null)break;if(r(t,e.right.key)>0){var a=e.right;if(e.right=a.left,a.left=e,e=a,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=n.right,e.right=n.left,e}function LB(t,e,r,n){var i=new U2(t,e);if(r===null)return i.left=i.right=null,i;r=zv(t,r,n);var s=n(t,r.key);return s<0?(i.left=r.left,i.right=r,r.left=null):s>=0&&(i.right=r.right,i.left=r,r.right=null),i}function rue(t,e,r){var n=null,i=null;if(e){e=zv(t,e,r);var s=r(e.key,t);s===0?(n=e.left,i=e.right):s<0?(i=e.right,e.right=null,n=e):(n=e.left,e.left=null,i=e)}return{left:n,right:i}}function rEt(t,e,r){return e===null?t:(t===null||(e=zv(t.key,e,r),e.left=t),e)}function Jq(t,e,r,n,i){if(t){n(""+e+(r?"└── ":"├── ")+i(t)+` +`);var s=e+(r?" ":"│ ");t.left&&Jq(t.left,s,!1,n,i),t.right&&Jq(t.right,s,!0,n,i)}}var qK=function(){function t(e){e===void 0&&(e=tEt),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,r){return this._size++,this._root=LB(e,r,this._root,this._comparator)},t.prototype.add=function(e,r){var n=new U2(e,r);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=zv(e,this._root,i),o=i(e,s.key);return o===0?this._root=s:(o<0?(n.left=s.left,n.right=s,s.left=null):o>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,r,n){var i;if(r===null)return null;r=zv(e,r,n);var s=n(e,r.key);return s===0?(r.left===null?i=r.right:(i=zv(e,r.left,n),i.right=r.right),this._size--,i):r},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=zv(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var r=this._root,n=this._comparator;r;){var i=n(e,r.key);if(i===0)return r;i<0?r=r.left:r=r.right}return null},t.prototype.find=function(e){return this._root&&(this._root=zv(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var r=this._root,n=this._comparator;r;){var i=n(e,r.key);if(i===0)return!0;i<0?r=r.left:r=r.right}return!1},t.prototype.forEach=function(e,r){for(var n=this._root,i=[],s=!1;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),e.call(r,n),n=n.right):s=!0;return this},t.prototype.range=function(e,r,n,i){for(var s=[],o=this._comparator,a=this._root,l;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),l=o(a.key,r),l>0)break;if(o(a.key,e)>=0&&n.call(i,a))return this;a=a.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(r){var n=r.key;return e.push(n)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(r){var n=r.data;return e.push(n)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var r=this._root,n=!1,i=0,s=[];!n;)if(r)s.push(r),r=r.left;else if(s.length>0){if(r=s.pop(),i===e)return r;i++,r=r.right}else n=!0;return null},t.prototype.next=function(e){var r=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var i=this._comparator;r;){var s=i(e.key,r.key);if(s===0)break;s<0?(n=r,r=r.left):r=r.right}return n},t.prototype.prev=function(e){var r=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var i=this._comparator;r;){var s=i(e.key,r.key);if(s===0)break;s<0?r=r.left:(n=r,r=r.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return iEt(this._root)},t.prototype.load=function(e,r,n){r===void 0&&(r=[]),n===void 0&&(n=!1);var i=e.length,s=this._comparator;if(n&&eW(e,r,0,i-1,s),this._root===null)this._root=Kq(e,r,0,i),this._size=i;else{var o=sEt(this.toList(),nEt(e,r),s);i=this._size+i,this._root=Qq({head:o},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var r=[];return Jq(this._root,"",!0,function(n){return r.push(n)},e),r.join("")},t.prototype.update=function(e,r,n){var i=this._comparator,s=rue(e,this._root,i),o=s.left,a=s.right;i(e,r)<0?a=LB(r,n,a,i):o=LB(r,n,o,i),this._root=rEt(o,a,i)},t.prototype.split=function(e){return rue(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,r,n;return eEt(this,function(i){switch(i.label){case 0:e=this._root,r=[],n=!1,i.label=1;case 1:return n?[3,6]:e===null?[3,2]:(r.push(e),e=e.left,[3,5]);case 2:return r.length===0?[3,4]:(e=r.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function Kq(t,e,r,n){var i=n-r;if(i>0){var s=r+Math.floor(i/2),o=t[s],a=e[s],l=new U2(o,a);return l.left=Kq(t,e,r,s),l.right=Kq(t,e,s+1,n),l}return null}function nEt(t,e){for(var r=new U2(null,null),n=r,i=0;i0?(e=s=s.next=r.pop(),e=e.right):n=!0;return s.next=null,i.next}function Qq(t,e,r){var n=r-e;if(n>0){var i=e+Math.floor(n/2),s=Qq(t,e,i),o=t.head;return o.left=s,t.head=t.head.next,o.right=Qq(t,i+1,r),o}return null}function sEt(t,e,r){for(var n=new U2(null,null),i=n,s=t,o=e;s!==null&&o!==null;)r(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),n.next}function eW(t,e,r,n,i){if(!(r>=n)){for(var s=t[r+n>>1],o=r-1,a=n+1;;){do o++;while(i(t[o],s)<0);do a--;while(i(t[a],s)>0);if(o>=a)break;var l=t[o];t[o]=t[a],t[a]=l,l=e[o],e[o]=e[a],e[a]=l}eW(t,e,r,a,i),eW(t,e,a+1,n,i)}}const Xg=11102230246251565e-32,_h=134217729,oEt=(3+8*Xg)*Xg;function kB(t,e,r,n,i){let s,o,a,l,u=e[0],d=n[0],f=0,m=0;d>u==d>-u?(s=u,u=e[++f]):(s=d,d=n[++m]);let v=0;if(fu==d>-u?(o=u+s,a=s-(o-u),u=e[++f]):(o=d+s,a=s-(o-d),d=n[++m]),s=o,a!==0&&(i[v++]=a);fu==d>-u?(o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++f]):(o=s+d,l=o-s,a=s-(o-l)+(d-l),d=n[++m]),s=o,a!==0&&(i[v++]=a);for(;f=ve||-le>=ve||(f=t-ge,a=t-(ge+f)+(f-i),f=r-fe,u=r-(fe+f)+(f-i),f=e-ee,l=e-(ee+f)+(f-s),f=n-be,d=n-(be+f)+(f-s),a===0&&l===0&&u===0&&d===0)||(ve=cEt*o+oEt*Math.abs(le),le+=ge*d+be*a-(ee*u+fe*l),le>=ve||-le>=ve))return le;H=a*be,m=_h*a,v=m-(m-a),b=a-v,m=_h*be,M=m-(m-be),O=be-M,W=b*O-(H-v*M-b*M-v*O),re=l*fe,m=_h*l,v=m-(m-l),b=l-v,m=_h*fe,M=m-(m-fe),O=fe-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Qh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Qh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Qh[2]=A-(pe-f)+(I-f),Qh[3]=pe;const Pe=kB(4,wx,4,Qh,nue);H=ge*d,m=_h*ge,v=m-(m-ge),b=ge-v,m=_h*d,M=m-(m-d),O=d-M,W=b*O-(H-v*M-b*M-v*O),re=ee*u,m=_h*ee,v=m-(m-ee),b=ee-v,m=_h*u,M=m-(m-u),O=u-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Qh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Qh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Qh[2]=A-(pe-f)+(I-f),Qh[3]=pe;const Fe=kB(Pe,nue,4,Qh,iue);H=a*d,m=_h*a,v=m-(m-a),b=a-v,m=_h*d,M=m-(m-d),O=d-M,W=b*O-(H-v*M-b*M-v*O),re=l*u,m=_h*l,v=m-(m-l),b=l-v,m=_h*u,M=m-(m-u),O=u-M,K=b*O-(re-v*M-b*M-v*O),I=W-K,f=W-I,Qh[0]=W-(I+f)+(f-K),A=H+I,f=A-H,j=H-(A-f)+(I-f),I=j-re,f=j-I,Qh[1]=j-(I+f)+(f-re),pe=A+I,f=pe-A,Qh[2]=A-(pe-f)+(I-f),Qh[3]=pe;const We=kB(Fe,iue,4,Qh,sue);return sue[We-1]}function dEt(t,e,r,n,i,s){const o=(e-s)*(r-i),a=(t-i)*(n-s),l=o-a,u=Math.abs(o+a);return Math.abs(l)>=lEt*u?l:-hEt(t,e,r,n,i,s,u)}var A7e={};const hb=(t,e)=>t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y,tW=(t,e)=>{if(e.ur.x{if(-t2t.x*e.y-t.y*e.x,P7e=(t,e)=>t.x*e.x+t.y*e.y,lue=(t,e,r)=>{const n=dEt(t.x,t.y,e.x,e.y,r.x,r.y);return n>0?-1:n<0?1:0},NP=t=>Math.sqrt(P7e(t,t)),mEt=(t,e,r)=>{const n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return uk(i,n)/NP(i)/NP(n)},gEt=(t,e,r)=>{const n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return P7e(i,n)/NP(i)/NP(n)},uue=(t,e,r)=>e.y===0?null:{x:t.x+e.x/e.y*(r-t.y),y:r},cue=(t,e,r)=>e.x===0?null:{x:r,y:t.y+e.y/e.x*(r-t.x)},yEt=(t,e,r,n)=>{if(e.x===0)return cue(r,n,t.x);if(n.x===0)return cue(t,e,r.x);if(e.y===0)return uue(r,n,t.y);if(n.y===0)return uue(t,e,r.y);const i=uk(e,n);if(i==0)return null;const s={x:r.x-t.x,y:r.y-t.y},o=uk(s,e)/i,a=uk(s,n)/i,l=t.x+a*e.x,u=r.x+o*n.x,d=t.y+a*e.y,f=r.y+o*n.y,m=(l+u)/2,v=(d+f)/2;return{x:m,y:v}};class yp{static compare(e,r){const n=yp.comparePoints(e.point,r.point);return n!==0?n:(e.point!==r.point&&e.link(r),e.isLeft!==r.isLeft?e.isLeft?1:-1:b2.compare(e.segment,r.segment))}static comparePoints(e,r){return e.xr.x?1:e.yr.y?1:0}constructor(e,r){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=r}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const r=e.point.events;for(let n=0,i=r.length;n{const s=i.otherSE;r.set(i,{sine:mEt(this.point,e.point,s.point),cosine:gEt(this.point,e.point,s.point)})};return(i,s)=>{r.has(i)||n(i),r.has(s)||n(s);const{sine:o,cosine:a}=r.get(i),{sine:l,cosine:u}=r.get(s);return o>=0&&l>=0?au?-1:0:o<0&&l<0?au?1:0:lo?1:0}}}let vEt=0;class b2{static compare(e,r){const n=e.leftSE.point.x,i=r.leftSE.point.x,s=e.rightSE.point.x,o=r.rightSE.point.x;if(oa&&l>u)return-1;const f=e.comparePoint(r.leftSE.point);if(f<0)return 1;if(f>0)return-1;const m=r.comparePoint(e.rightSE.point);return m!==0?m:-1}if(n>i){if(al&&a>d)return 1;const f=r.comparePoint(e.leftSE.point);if(f!==0)return f;const m=e.comparePoint(r.rightSE.point);return m<0?1:m>0?-1:1}if(al)return 1;if(so){const f=e.comparePoint(r.rightSE.point);if(f<0)return 1;if(f>0)return-1}if(s!==o){const f=u-a,m=s-n,v=d-l,b=o-i;if(f>m&&vb)return-1}return s>o?1:sd?1:e.idr.id?1:0}constructor(e,r,n,i){this.id=++vEt,this.leftSE=e,e.segment=this,e.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=e,this.rings=n,this.windings=i}static fromRing(e,r,n){let i,s,o;const a=yp.comparePoints(e,r);if(a<0)i=e,s=r,o=1;else if(a>0)i=r,s=e,o=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const l=new yp(i,!0),u=new yp(s,!1);return new b2(l,u,[n],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:er?e:r}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const r=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(r.x===n.x)return e.x===r.x?0:e.x0&&a.swapEvents(),yp.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),r}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,n=this.windings.length;r0){const s=r;r=n,n=s}if(r.prev===n){const s=r;r=n,n=s}for(let s=0,o=n.rings.length;si.length===1&&i[0].isSubject;this._isInResult=n(e)!==n(r);break}default:throw new Error(`Unrecognized operation type found ${j1.type}`)}return this._isInResult}}class hue{constructor(e,r,n){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=n,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=ES.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=e.length;othis.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(b2.fromRing(s,i,this))}getSweepEvents(){const e=[];for(let r=0,n=this.segments.length;rthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=r}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let r=0,n=this.interiorRings.length;rthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=r}getSweepEvents(){const e=[];for(let r=0,n=this.polys.length;r0&&(e=o)}let r=e.segment.prevInResult(),n=r?r.prevInResult():null;for(;;){if(!r)return null;if(!n)return r.ringOut;if(n.ringOut!==r.ringOut)return n.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=n.prevInResult(),n=r?r.prevInResult():null}}}class fue{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let r=0,n=this.interiorRings.length;r1&&arguments[1]!==void 0?arguments[1]:b2.compare;this.queue=e,this.tree=new qK(r),this.segments=[]}process(e){const r=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(r),n;const i=e.isLeft?this.tree.add(r):this.tree.find(r);if(!i)throw new Error(`Unable to find segment #${r.id} [${r.leftSE.point.x}, ${r.leftSE.point.y}] -> [${r.rightSE.point.x}, ${r.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,l;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;l===void 0;)o=this.tree.next(o),o===null?l=null:o.key.consumedBy===void 0&&(l=o.key);if(e.isLeft){let u=null;if(a){const f=a.getIntersection(r);if(f!==null&&(r.isAnEndpoint(f)||(u=f),!a.isAnEndpoint(f))){const m=this._splitSafely(a,f);for(let v=0,b=m.length;v0?(this.tree.remove(r),n.push(e)):(this.segments.push(r),r.prev=a)}else{if(a&&l){const u=a.getIntersection(l);if(u!==null){if(!a.isAnEndpoint(u)){const d=this._splitSafely(a,u);for(let f=0,m=d.length;fpue)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new wEt(s);let a=s.size,l=s.pop();for(;l;){const f=l.key;if(s.size===a){const v=f.segment;throw new Error(`Unable to pop() ${f.isLeft?"left":"right"} SweepEvent [${f.point.x}, ${f.point.y}] from segment #${v.id} [${v.leftSE.point.x}, ${v.leftSE.point.y}] -> [${v.rightSE.point.x}, ${v.rightSE.point.y}] from queue.`)}if(s.size>pue)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>bEt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const m=o.process(f);for(let v=0,b=m.length;v1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n{e.push(i.coordinates)}),e.length<2)throw new Error("Must have at least two features");const r=t.features[0].properties||{},n=IEt.difference(e[0],...e.slice(1));return n.length===0?null:n.length===1?bXe(n[0],r):CXe(n,r)}var LEt=REt;const kEt=({geom:t,setGeom:e})=>{let[r,n]=E.useState(300),i={feet:189394e-9,meters:621371e-9,yards:568182e-9},[s,o]=E.useState(Object.keys(i)[0]),a=r*i[s];return oe.jsx(kl,{children:oe.jsxs(kn,{gap:"2",direction:"column",children:[oe.jsx(Ln,{size:"2",weight:"medium",children:"Buffer current selection"}),oe.jsxs(kn,{children:[oe.jsx(w$,{type:"number",value:r,onChange:l=>n(l.target.value),children:oe.jsx(TZ,{})}),oe.jsxs(dw,{value:s,onValueChange:l=>o(l),children:[oe.jsx(fw,{}),oe.jsx(pw,{children:Object.keys(i).map(l=>oe.jsx(mw,{value:l,children:l},l))})]})]}),oe.jsxs(kn,{gap:"2",children:[oe.jsxs(Eu,{onClick:()=>e(tue(t,a,{units:"miles"})),text:`${r} ${s}`,size:"1",children:[`${r} ${s}`,oe.jsx(Cge,{})]}),oe.jsx(Eu,{onClick:()=>{let l=t,u=tue(t,a,{units:"miles"}),f={type:"FeatureCollection",features:[LEt({type:"FeatureCollection",features:[u.features[0],l.features[0]]})]};e(f)},size:"1",children:`${r} ${s} (buffer only)`})]})]})})};function AEt(t,e={}){var r=typeof e=="object"?e.mutate:e;if(!t)throw new Error("geojson is required");var n=I1t(t),i=[];switch(n){case"LineString":i=AB(t,n);break;case"MultiLineString":case"Polygon":KL(t).forEach(function(o){i.push(AB(o,n))});break;case"MultiPolygon":KL(t).forEach(function(o){var a=[];o.forEach(function(l){a.push(AB(l,n))}),i.push(a)});break;case"Point":return t;case"MultiPoint":var s={};KL(t).forEach(function(o){var a=o.join("-");Object.prototype.hasOwnProperty.call(s,a)||(i.push(o),s[a]=!0)});break;default:throw new Error(n+" geometry not supported")}return t.coordinates?r===!0?(t.coordinates=i,t):{type:n,coordinates:i}:r===!0?(t.geometry.coordinates=i,t):YS({type:n,coordinates:i},t.properties,{bbox:t.bbox,id:t.id})}function AB(t,e){var r=KL(t);if(r.length===2&&!mue(r[0],r[1]))return r;var n=[],i=r.length-1,s=n.length;n.push(r[0]);for(var o=1;o2&&gue(n[s-3],n[s-1],n[s-2])&&n.splice(n.length-2,1))}if(n.push(r[r.length-1]),s=n.length,(e==="Polygon"||e==="MultiPolygon")&&mue(r[0],r[r.length-1])&&s<4)throw new Error("invalid polygon");return e==="LineString"&&s<3||gue(n[s-3],n[s-1],n[s-2])&&n.splice(n.length-2,1),n}function mue(t,e){return t[0]===e[0]&&t[1]===e[1]}function gue(t,e,r){var n=r[0],i=r[1],s=t[0],o=t[1],a=e[0],l=e[1],u=n-s,d=i-o,f=a-s,m=l-o,v=u*m-d*f;return v!==0?!1:Math.abs(f)>=Math.abs(m)?f>0?s<=n&&n<=a:a<=n&&n<=s:m>0?o<=i&&i<=l:l<=i&&i<=o}function PEt(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return $7e(t);case"FeatureCollection":return $Et(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return WK(t);default:throw new Error("unknown GeoJSON type")}}function $7e(t){const e={type:"Feature"};return Object.keys(t).forEach(r=>{switch(r){case"type":case"properties":case"geometry":return;default:e[r]=t[r]}}),e.properties=O7e(t.properties),t.geometry==null?e.geometry=null:e.geometry=WK(t.geometry),e}function O7e(t){const e={};return t&&Object.keys(t).forEach(r=>{const n=t[r];typeof n=="object"?n===null?e[r]=null:Array.isArray(n)?e[r]=n.map(i=>i):e[r]=O7e(n):e[r]=n}),e}function $Et(t){const e={type:"FeatureCollection"};return Object.keys(t).forEach(r=>{switch(r){case"type":case"features":return;default:e[r]=t[r]}}),e.features=t.features.map(r=>$7e(r)),e}function WK(t){const e={type:t.type};return t.bbox&&(e.bbox=t.bbox),t.type==="GeometryCollection"?(e.geometries=t.geometries.map(r=>WK(r)),e):(e.coordinates=N7e(t.coordinates),e)}function N7e(t){const e=t;return typeof e[0]!="object"?e.slice():e.map(r=>N7e(r))}function OEt(t,e){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function NEt(t,e,r){var n=e[0],i=e[1],s=r[0]-n,o=r[1]-i;if(s!==0||o!==0){var a=((t[0]-n)*s+(t[1]-i)*o)/(s*s+o*o);a>1?(n=r[0],i=r[1]):a>0&&(n+=s*a,i+=o*a)}return s=t[0]-n,o=t[1]-i,s*s+o*o}function DEt(t,e){for(var r=t[0],n=[r],i,s=1,o=t.length;se&&(n.push(i),r=i);return r!==i&&n.push(i),n}function rW(t,e,r,n,i){for(var s=n,o,a=e+1;as&&(o=a,s=l)}s>n&&(o-e>1&&rW(t,e,o,n,i),i.push(t[o]),r-o>1&&rW(t,o,r,n,i))}function FEt(t,e){var r=t.length-1,n=[t[0]];return rW(t,0,r,e,n),n.push(t[r]),n}function FP(t,e,r){if(t.length<=2)return t;var n=e!==void 0?e*e:1;return t=r?t:DEt(t,n),t=FEt(t,n),t}function zEt(t,e={}){var r,n,i;if(e=e??{},!MXe(e))throw new Error("options is invalid");const s=(r=e.tolerance)!=null?r:1,o=(n=e.highQuality)!=null?n:!1,a=(i=e.mutate)!=null?i:!1;if(!t)throw new Error("geojson is required");if(s&&s<0)throw new Error("invalid tolerance");return a!==!0&&(t=PEt(t)),XS(t,function(l){BEt(l,s,o)}),t}function BEt(t,e,r){const n=t.type;if(n==="Point"||n==="MultiPoint")return t;if(AEt(t,{mutate:!0}),n!=="GeometryCollection")switch(n){case"LineString":t.coordinates=FP(t.coordinates,e,r);break;case"MultiLineString":t.coordinates=t.coordinates.map(i=>FP(i,e,r));break;case"Polygon":t.coordinates=yue(t.coordinates,e,r);break;case"MultiPolygon":t.coordinates=t.coordinates.map(i=>yue(i,e,r))}return t}function yue(t,e,r){return t.map(function(n){if(n.length<4)throw new Error("invalid polygon");let i=e,s=FP(n,i,r);for(;!jEt(s);)i-=i*.01,s=FP(n,i,r);return(s[s.length-1][0]!==s[0][0]||s[s.length-1][1]!==s[0][1])&&s.push(s[0]),s})}function jEt(t){return t.length<3?!1:!(t.length===3&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var VEt=zEt;const bx={census_tracts:{name:"Census Tracts",singular:"Census tract",pickColumn:"NAMELSAD10",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/2010_Census_Tracts/FeatureServer/0/"},neighborhoods:{name:"Neighborhoods",singular:"neighborhood",pickColumn:"nhood_name",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/Current_City_of_Detroit_Neighborhoods/FeatureServer/0/"},historic_districts:{name:"Historic Districts",singular:"historic district",pickColumn:"Name",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/Detroit_Local_Historic_Districts/FeatureServer/0/"},master_planning_neighborhoods:{name:"Master Plan Neighborhoods",singular:"master plan neighborhood",pickColumn:"NHOOD",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/MasterPlanNeighborhood/FeatureServer/0/"},zip_codes:{name:"ZIP codes",singular:"zip code",pickColumn:"zipcode",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/ZipCodes/FeatureServer/0/"},council_districts:{name:"Council Districts",singular:"Council district",pickColumn:"Name",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/CouncilDistricts/FeatureServer/0/"},cbo:{name:"CBOs",singular:"CBO area",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/CBO_Impact_Areas/FeatureServer/0/",pickColumn:"Name"},pdd_planning_areas:{name:"PDD Planning Projects",singular:"Planning project",url:"https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/PDD_Planning_Projects/FeatureServer/1/",pickColumn:"Proj_NAME"}},UEt=({geom:t,setGeom:e})=>{const[r,n]=E.useState(""),[i,s]=E.useState([]),[o,a]=E.useState(null);return E.useEffect(()=>{r!==""&&Tw({url:bx[r].url,geometryPrecision:5,f:"geojson"}).then(l=>{let u=l.features.sort((d,f)=>d.properties[bx[r].pickColumn]>f.properties[bx[r].pickColumn]);s(u)})},[r]),E.useEffect(()=>{a(null)},[t]),E.useEffect(()=>{if(o){let l=i.filter(d=>d.id===parseInt(o)),u=VEt(l[0],{tolerance:1e-4});e({type:"FeatureCollection",features:[u]})}},[o]),oe.jsx(kl,{children:oe.jsxs(kn,{direction:"column",gap:"1",children:[oe.jsx(Ln,{weight:"medium",children:"Choose from existing boundaries"}),oe.jsx(Ln,{size:"1",children:"Choose your layer, then choose a feature within that layer."}),oe.jsxs(dw,{onValueChange:l=>{n(l),s([])},value:r,children:[oe.jsx(fw,{}),oe.jsx(pw,{children:Object.keys(bx).map(l=>oe.jsx(mw,{value:l,children:bx[l].name},l))})]}),i.length>0&&oe.jsxs(dw,{onValueChange:l=>{a(l)},children:[oe.jsx(fw,{}),oe.jsx(pw,{children:i.map(l=>oe.jsx(mw,{value:l.id,children:l.properties[bx[r].pickColumn].slice(0,40)},l.id))})]})]})})};var D7e={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Oc,function(){var r=function(Y,ae){var $e={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},ut={on:function(Dt,Zt,Nr){if($e[Dt]===void 0)throw new Error("Invalid event type: "+Dt);$e[Dt].push({selector:Zt,fn:Nr})},render:function(Dt){ae.store.featureChanged(Dt)}},kt=function(Dt,Zt){for(var Nr=$e[Dt],Hr=Nr.length;Hr--;){var Fr=Nr[Hr];if(Fr.selector(Zt)){Fr.fn.call(ut,Zt)||ae.store.render(),ae.ui.updateMapClasses();break}}};return Y.start.call(ut),{render:Y.render,stop:function(){Y.stop&&Y.stop()},trash:function(){Y.trash&&(Y.trash(),ae.store.render())},combineFeatures:function(){Y.combineFeatures&&Y.combineFeatures()},uncombineFeatures:function(){Y.uncombineFeatures&&Y.uncombineFeatures()},drag:function(Dt){kt("drag",Dt)},click:function(Dt){kt("click",Dt)},mousemove:function(Dt){kt("mousemove",Dt)},mousedown:function(Dt){kt("mousedown",Dt)},mouseup:function(Dt){kt("mouseup",Dt)},mouseout:function(Dt){kt("mouseout",Dt)},keydown:function(Dt){kt("keydown",Dt)},keyup:function(Dt){kt("keyup",Dt)},touchstart:function(Dt){kt("touchstart",Dt)},touchmove:function(Dt){kt("touchmove",Dt)},touchend:function(Dt){kt("touchend",Dt)},tap:function(Dt){kt("tap",Dt)}}};function n(Y){return Y&&Y.__esModule&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y}function i(Y){if(Y.__esModule)return Y;var ae=Y.default;if(typeof ae=="function"){var $e=function ut(){if(this instanceof ut){var kt=[null];kt.push.apply(kt,arguments);var Dt=Function.bind.apply(ae,kt);return new Dt}return ae.apply(this,arguments)};$e.prototype=ae.prototype}else $e={};return Object.defineProperty($e,"__esModule",{value:!0}),Object.keys(Y).forEach(function(ut){var kt=Object.getOwnPropertyDescriptor(Y,ut);Object.defineProperty($e,ut,kt.get?kt:{enumerable:!0,get:function(){return Y[ut]}})}),$e}var s={},o={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:63567523142e-4},a=o;function l(Y){var ae=0;if(Y&&Y.length>0){ae+=Math.abs(u(Y[0]));for(var $e=1;$e2){for(Zt=0;Zt=Math.pow(2,Y)?pt(Y,ae):Dt};pt.rack=function(Y,ae,$e){var ut=function(Dt){var Zt=0;do{if(Zt++>10){if(!$e)throw new Error("too many ID collisions, use more bits");Y+=$e}var Nr=pt(Y,ae)}while(Object.hasOwnProperty.call(kt,Nr));return kt[Nr]=Dt,Nr},kt=ut.hats={};return ut.get=function(Dt){return ut.hats[Dt]},ut.set=function(Dt,Zt){return ut.hats[Dt]=Zt,ut},ut.bits=Y||128,ut.base=ae||16,ut};var rr=n(lt.exports),Tt=function(Y,ae){this.ctx=Y,this.properties=ae.properties||{},this.coordinates=ae.geometry.coordinates,this.id=ae.id||rr(),this.type=ae.geometry.type};Tt.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},Tt.prototype.incomingCoords=function(Y){this.setCoordinates(Y)},Tt.prototype.setCoordinates=function(Y){this.coordinates=Y,this.changed()},Tt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},Tt.prototype.setProperty=function(Y,ae){this.properties[Y]=ae},Tt.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:M.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},Tt.prototype.internal=function(Y){var ae={id:this.id,meta:j.FEATURE,"meta:type":this.type,active:H.INACTIVE,mode:Y};if(this.ctx.options.userProperties)for(var $e in this.properties)ae["user_"+$e]=this.properties[$e];return{type:M.FEATURE,properties:ae,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var Je=function(Y,ae){Tt.call(this,Y,ae)};(Je.prototype=Object.create(Tt.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},Je.prototype.updateCoordinate=function(Y,ae,$e){this.coordinates=arguments.length===3?[ae,$e]:[Y,ae],this.changed()},Je.prototype.getCoordinate=function(){return this.getCoordinates()};var pr=function(Y,ae){Tt.call(this,Y,ae)};(pr.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length>1},pr.prototype.addCoordinate=function(Y,ae,$e){this.changed();var ut=parseInt(Y,10);this.coordinates.splice(ut,0,[ae,$e])},pr.prototype.getCoordinate=function(Y){var ae=parseInt(Y,10);return JSON.parse(JSON.stringify(this.coordinates[ae]))},pr.prototype.removeCoordinate=function(Y){this.changed(),this.coordinates.splice(parseInt(Y,10),1)},pr.prototype.updateCoordinate=function(Y,ae,$e){var ut=parseInt(Y,10);this.coordinates[ut]=[ae,$e],this.changed()};var Ut=function(Y,ae){Tt.call(this,Y,ae),this.coordinates=this.coordinates.map(function($e){return $e.slice(0,-1)})};(Ut.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(Y){return Y.length>2})},Ut.prototype.incomingCoords=function(Y){this.coordinates=Y.map(function(ae){return ae.slice(0,-1)}),this.changed()},Ut.prototype.setCoordinates=function(Y){this.coordinates=Y,this.changed()},Ut.prototype.addCoordinate=function(Y,ae,$e){this.changed();var ut=Y.split(".").map(function(kt){return parseInt(kt,10)});this.coordinates[ut[0]].splice(ut[1],0,[ae,$e])},Ut.prototype.removeCoordinate=function(Y){this.changed();var ae=Y.split(".").map(function(ut){return parseInt(ut,10)}),$e=this.coordinates[ae[0]];$e&&($e.splice(ae[1],1),$e.length<3&&this.coordinates.splice(ae[0],1))},Ut.prototype.getCoordinate=function(Y){var ae=Y.split(".").map(function(ut){return parseInt(ut,10)}),$e=this.coordinates[ae[0]];return JSON.parse(JSON.stringify($e[ae[1]]))},Ut.prototype.getCoordinates=function(){return this.coordinates.map(function(Y){return Y.concat([Y[0]])})},Ut.prototype.updateCoordinate=function(Y,ae,$e){this.changed();var ut=Y.split("."),kt=parseInt(ut[0],10),Dt=parseInt(ut[1],10);this.coordinates[kt]===void 0&&(this.coordinates[kt]=[]),this.coordinates[kt][Dt]=[ae,$e]};var tr={MultiPoint:Je,MultiLineString:pr,MultiPolygon:Ut},Se=function(Y,ae,$e,ut,kt){var Dt=$e.split("."),Zt=parseInt(Dt[0],10),Nr=Dt[1]?Dt.slice(1).join("."):null;return Y[Zt][ae](Nr,ut,kt)},je=function(Y,ae){if(Tt.call(this,Y,ae),delete this.coordinates,this.model=tr[ae.geometry.type],this.model===void 0)throw new TypeError(ae.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(ae.geometry.coordinates)};function et(Y){this.map=Y.map,this.drawConfig=JSON.parse(JSON.stringify(Y.options||{})),this._ctx=Y}(je.prototype=Object.create(Tt.prototype))._coordinatesToFeatures=function(Y){var ae=this,$e=this.model.bind(this);return Y.map(function(ut){return new $e(ae.ctx,{id:rr(),type:M.FEATURE,properties:{},geometry:{coordinates:ut,type:ae.type.replace("Multi","")}})})},je.prototype.isValid=function(){return this.features.every(function(Y){return Y.isValid()})},je.prototype.setCoordinates=function(Y){this.features=this._coordinatesToFeatures(Y),this.changed()},je.prototype.getCoordinate=function(Y){return Se(this.features,"getCoordinate",Y)},je.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(Y){return Y.type===M.POLYGON?Y.getCoordinates():Y.coordinates})))},je.prototype.updateCoordinate=function(Y,ae,$e){Se(this.features,"updateCoordinate",Y,ae,$e),this.changed()},je.prototype.addCoordinate=function(Y,ae,$e){Se(this.features,"addCoordinate",Y,ae,$e),this.changed()},je.prototype.removeCoordinate=function(Y){Se(this.features,"removeCoordinate",Y),this.changed()},je.prototype.getFeatures=function(){return this.features},et.prototype.setSelected=function(Y){return this._ctx.store.setSelected(Y)},et.prototype.setSelectedCoordinates=function(Y){var ae=this;this._ctx.store.setSelectedCoordinates(Y),Y.reduce(function($e,ut){return $e[ut.feature_id]===void 0&&($e[ut.feature_id]=!0,ae._ctx.store.get(ut.feature_id).changed()),$e},{})},et.prototype.getSelected=function(){return this._ctx.store.getSelected()},et.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},et.prototype.isSelected=function(Y){return this._ctx.store.isSelected(Y)},et.prototype.getFeature=function(Y){return this._ctx.store.get(Y)},et.prototype.select=function(Y){return this._ctx.store.select(Y)},et.prototype.deselect=function(Y){return this._ctx.store.deselect(Y)},et.prototype.deleteFeature=function(Y,ae){return ae===void 0&&(ae={}),this._ctx.store.delete(Y,ae)},et.prototype.addFeature=function(Y){return this._ctx.store.add(Y)},et.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},et.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},et.prototype.setActionableState=function(Y){Y===void 0&&(Y={});var ae={trash:Y.trash||!1,combineFeatures:Y.combineFeatures||!1,uncombineFeatures:Y.uncombineFeatures||!1};return this._ctx.events.actionable(ae)},et.prototype.changeMode=function(Y,ae,$e){return ae===void 0&&(ae={}),$e===void 0&&($e={}),this._ctx.events.changeMode(Y,ae,$e)},et.prototype.updateUIClasses=function(Y){return this._ctx.ui.queueMapClasses(Y)},et.prototype.activateUIButton=function(Y){return this._ctx.ui.setActiveButton(Y)},et.prototype.featuresAt=function(Y,ae,$e){if($e===void 0&&($e="click"),$e!=="click"&&$e!=="touch")throw new Error("invalid buffer type");return ve[$e](Y,ae,this._ctx)},et.prototype.newFeature=function(Y){var ae=Y.geometry.type;return ae===M.POINT?new Je(this._ctx,Y):ae===M.LINE_STRING?new pr(this._ctx,Y):ae===M.POLYGON?new Ut(this._ctx,Y):new je(this._ctx,Y)},et.prototype.isInstanceOf=function(Y,ae){if(Y===M.POINT)return ae instanceof Je;if(Y===M.LINE_STRING)return ae instanceof pr;if(Y===M.POLYGON)return ae instanceof Ut;if(Y==="MultiFeature")return ae instanceof je;throw new Error("Unknown feature class: "+Y)},et.prototype.doRender=function(Y){return this._ctx.store.featureChanged(Y)},et.prototype.onSetup=function(){},et.prototype.onDrag=function(){},et.prototype.onClick=function(){},et.prototype.onMouseMove=function(){},et.prototype.onMouseDown=function(){},et.prototype.onMouseUp=function(){},et.prototype.onMouseOut=function(){},et.prototype.onKeyUp=function(){},et.prototype.onKeyDown=function(){},et.prototype.onTouchStart=function(){},et.prototype.onTouchMove=function(){},et.prototype.onTouchEnd=function(){},et.prototype.onTap=function(){},et.prototype.onStop=function(){},et.prototype.onTrash=function(){},et.prototype.onCombineFeature=function(){},et.prototype.onUncombineFeature=function(){},et.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var yt={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},we=Object.keys(yt);function ft(Y){var ae=Object.keys(Y);return function($e,ut){ut===void 0&&(ut={});var kt={},Dt=ae.reduce(function(Zt,Nr){return Zt[Nr]=Y[Nr],Zt},new et($e));return{start:function(){var Zt=this;kt=Dt.onSetup(ut),we.forEach(function(Nr){var Hr,Fr=yt[Nr],an=function(){return!1};Y[Fr]&&(an=function(){return!0}),Zt.on(Nr,an,(Hr=Fr,function(ln){return Dt[Hr](kt,ln)}))})},stop:function(){Dt.onStop(kt)},trash:function(){Dt.onTrash(kt)},combineFeatures:function(){Dt.onCombineFeatures(kt)},uncombineFeatures:function(){Dt.onUncombineFeatures(kt)},render:function(Zt,Nr){Dt.toDisplayFeatures(kt,Zt,Nr)}}}}function qt(Y){return[].concat(Y).filter(function(ae){return ae!==void 0})}function _r(){var Y=this;if(!(Y.ctx.map&&Y.ctx.map.getSource(m.HOT)!==void 0))return Hr();var ae=Y.ctx.events.currentModeName();Y.ctx.ui.queueMapClasses({mode:ae});var $e=[],ut=[];Y.isDirty?ut=Y.getAllIds():($e=Y.getChangedIds().filter(function(Fr){return Y.get(Fr)!==void 0}),ut=Y.sources.hot.filter(function(Fr){return Fr.properties.id&&$e.indexOf(Fr.properties.id)===-1&&Y.get(Fr.properties.id)!==void 0}).map(function(Fr){return Fr.properties.id})),Y.sources.hot=[];var kt=Y.sources.cold.length;Y.sources.cold=Y.isDirty?[]:Y.sources.cold.filter(function(Fr){var an=Fr.properties.id||Fr.properties.parent;return $e.indexOf(an)===-1});var Dt=kt!==Y.sources.cold.length||ut.length>0;function Zt(Fr,an){var ln=Y.get(Fr).internal(ae);Y.ctx.events.currentModeRender(ln,function(xi){Y.sources[an].push(xi)})}if($e.forEach(function(Fr){return Zt(Fr,"hot")}),ut.forEach(function(Fr){return Zt(Fr,"cold")}),Dt&&Y.ctx.map.getSource(m.COLD).setData({type:M.FEATURE_COLLECTION,features:Y.sources.cold}),Y.ctx.map.getSource(m.HOT).setData({type:M.FEATURE_COLLECTION,features:Y.sources.hot}),Y._emitSelectionChange&&(Y.ctx.map.fire(I.SELECTION_CHANGE,{features:Y.getSelected().map(function(Fr){return Fr.toGeoJSON()}),points:Y.getSelectedCoordinates().map(function(Fr){return{type:M.FEATURE,properties:{},geometry:{type:M.POINT,coordinates:Fr.coordinates}}})}),Y._emitSelectionChange=!1),Y._deletedFeaturesToEmit.length){var Nr=Y._deletedFeaturesToEmit.map(function(Fr){return Fr.toGeoJSON()});Y._deletedFeaturesToEmit=[],Y.ctx.map.fire(I.DELETE,{features:Nr})}function Hr(){Y.isDirty=!1,Y.clearChangedIds()}Hr(),Y.ctx.map.fire(I.RENDER,{})}function rt(Y){var ae,$e=this;this._features={},this._featureIds=new be,this._selectedFeatureIds=new be,this._selectedCoordinates=[],this._changedFeatureIds=new be,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=Y,this.sources={hot:[],cold:[]},this.render=function(){ae||(ae=requestAnimationFrame(function(){ae=null,_r.call($e)}))},this.isDirty=!1}function Xe(Y,ae){var $e=Y._selectedCoordinates.filter(function(ut){return Y._selectedFeatureIds.has(ut.feature_id)});Y._selectedCoordinates.length===$e.length||ae.silent||(Y._emitSelectionChange=!0),Y._selectedCoordinates=$e}rt.prototype.createRenderBatch=function(){var Y=this,ae=this.render,$e=0;return this.render=function(){$e++},function(){Y.render=ae,$e>0&&Y.render()}},rt.prototype.setDirty=function(){return this.isDirty=!0,this},rt.prototype.featureChanged=function(Y){return this._changedFeatureIds.add(Y),this},rt.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},rt.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},rt.prototype.getAllIds=function(){return this._featureIds.values()},rt.prototype.add=function(Y){return this.featureChanged(Y.id),this._features[Y.id]=Y,this._featureIds.add(Y.id),this},rt.prototype.delete=function(Y,ae){var $e=this;return ae===void 0&&(ae={}),qt(Y).forEach(function(ut){$e._featureIds.has(ut)&&($e._featureIds.delete(ut),$e._selectedFeatureIds.delete(ut),ae.silent||$e._deletedFeaturesToEmit.indexOf($e._features[ut])===-1&&$e._deletedFeaturesToEmit.push($e._features[ut]),delete $e._features[ut],$e.isDirty=!0)}),Xe(this,ae),this},rt.prototype.get=function(Y){return this._features[Y]},rt.prototype.getAll=function(){var Y=this;return Object.keys(this._features).map(function(ae){return Y._features[ae]})},rt.prototype.select=function(Y,ae){var $e=this;return ae===void 0&&(ae={}),qt(Y).forEach(function(ut){$e._selectedFeatureIds.has(ut)||($e._selectedFeatureIds.add(ut),$e._changedFeatureIds.add(ut),ae.silent||($e._emitSelectionChange=!0))}),this},rt.prototype.deselect=function(Y,ae){var $e=this;return ae===void 0&&(ae={}),qt(Y).forEach(function(ut){$e._selectedFeatureIds.has(ut)&&($e._selectedFeatureIds.delete(ut),$e._changedFeatureIds.add(ut),ae.silent||($e._emitSelectionChange=!0))}),Xe(this,ae),this},rt.prototype.clearSelected=function(Y){return Y===void 0&&(Y={}),this.deselect(this._selectedFeatureIds.values(),{silent:Y.silent}),this},rt.prototype.setSelected=function(Y,ae){var $e=this;return ae===void 0&&(ae={}),Y=qt(Y),this.deselect(this._selectedFeatureIds.values().filter(function(ut){return Y.indexOf(ut)===-1}),{silent:ae.silent}),this.select(Y.filter(function(ut){return!$e._selectedFeatureIds.has(ut)}),{silent:ae.silent}),this},rt.prototype.setSelectedCoordinates=function(Y){return this._selectedCoordinates=Y,this._emitSelectionChange=!0,this},rt.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},rt.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},rt.prototype.getSelected=function(){var Y=this;return this._selectedFeatureIds.values().map(function(ae){return Y.get(ae)})},rt.prototype.getSelectedCoordinates=function(){var Y=this;return this._selectedCoordinates.map(function(ae){return{coordinates:Y.get(ae.feature_id).getCoordinate(ae.coord_path)}})},rt.prototype.isSelected=function(Y){return this._selectedFeatureIds.has(Y)},rt.prototype.setFeatureProperty=function(Y,ae,$e){this.get(Y).setProperty(ae,$e),this.featureChanged(Y)},rt.prototype.storeMapConfig=function(){var Y=this;W.forEach(function(ae){Y.ctx.map[ae]&&(Y._mapInitialConfig[ae]=Y.ctx.map[ae].isEnabled())})},rt.prototype.restoreMapConfig=function(){var Y=this;Object.keys(this._mapInitialConfig).forEach(function(ae){Y._mapInitialConfig[ae]?Y.ctx.map[ae].enable():Y.ctx.map[ae].disable()})},rt.prototype.getInitialConfigValue=function(Y){return this._mapInitialConfig[Y]===void 0||this._mapInitialConfig[Y]};var Ze=function(){for(var Y=arguments,ae={},$e=0;$e=48&&kr<=57)};function Gn(kr,Un,Ss){Ss===void 0&&(Ss={}),xi.stop();var go=Nr[kr];if(go===void 0)throw new Error(kr+" is not valid");ln=kr;var Ks=go(Zt,Un);xi=r(Ks,Zt),Ss.silent||Zt.map.fire(I.MODE_CHANGE,{mode:kr}),Zt.store.setDirty(),Zt.store.render()}an.keydown=function(kr){(kr.srcElement||kr.target).classList.contains("mapboxgl-canvas")&&(kr.keyCode!==8&&kr.keyCode!==46||!Zt.options.controls.trash?ms(kr.keyCode)?xi.keydown(kr):kr.keyCode===49&&Zt.options.controls.point?Gn(O.DRAW_POINT):kr.keyCode===50&&Zt.options.controls.line_string?Gn(O.DRAW_LINE_STRING):kr.keyCode===51&&Zt.options.controls.polygon&&Gn(O.DRAW_POLYGON):(kr.preventDefault(),xi.trash()))},an.keyup=function(kr){ms(kr.keyCode)&&xi.keyup(kr)},an.zoomend=function(){Zt.store.changeZoom()},an.data=function(kr){if(kr.dataType==="style"){var Un=Zt.setup,Ss=Zt.map,go=Zt.options,Ks=Zt.store;go.styles.some(function(Wc){return Ss.getLayer(Wc.id)})||(Un.addLayers(),Ks.setDirty(),Ks.render())}};var ys={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){ln=Zt.options.defaultMode,xi=r(Nr[ln](Zt),Zt)},changeMode:Gn,actionable:function(kr){var Un=!1;Object.keys(kr).forEach(function(Ss){if(ys[Ss]===void 0)throw new Error("Invalid action type");ys[Ss]!==kr[Ss]&&(Un=!0),ys[Ss]=kr[Ss]}),Un&&Zt.map.fire(I.ACTIONABLE,{actions:ys})},currentModeName:function(){return ln},currentModeRender:function(kr,Un){return xi.render(kr,Un)},fire:function(kr,Un){an[kr]&&an[kr](Un)},addEventListeners:function(){Zt.map.on("mousemove",an.mousemove),Zt.map.on("mousedown",an.mousedown),Zt.map.on("mouseup",an.mouseup),Zt.map.on("data",an.data),Zt.map.on("touchmove",an.touchmove),Zt.map.on("touchstart",an.touchstart),Zt.map.on("touchend",an.touchend),Zt.container.addEventListener("mouseout",an.mouseout),Zt.options.keybindings&&(Zt.container.addEventListener("keydown",an.keydown),Zt.container.addEventListener("keyup",an.keyup))},removeEventListeners:function(){Zt.map.off("mousemove",an.mousemove),Zt.map.off("mousedown",an.mousedown),Zt.map.off("mouseup",an.mouseup),Zt.map.off("data",an.data),Zt.map.off("touchmove",an.touchmove),Zt.map.off("touchstart",an.touchstart),Zt.map.off("touchend",an.touchend),Zt.container.removeEventListener("mouseout",an.mouseout),Zt.options.keybindings&&(Zt.container.removeEventListener("keydown",an.keydown),Zt.container.removeEventListener("keyup",an.keyup))},trash:function(kr){xi.trash(kr)},combineFeatures:function(){xi.combineFeatures()},uncombineFeatures:function(){xi.uncombineFeatures()},getMode:function(){return ln}}}(Y),Y.ui=function(Zt){var Nr={},Hr=null,Fr={mode:null,feature:null,mouse:null},an={mode:null,feature:null,mouse:null};function ln(kr){an=Xt(an,kr)}function xi(){var kr,Un;if(Zt.container){var Ss=[],go=[];xr.forEach(function(Ks){an[Ks]!==Fr[Ks]&&(Ss.push(Ks+"-"+Fr[Ks]),an[Ks]!==null&&go.push(Ks+"-"+an[Ks]))}),Ss.length>0&&(kr=Zt.container.classList).remove.apply(kr,Ss),go.length>0&&(Un=Zt.container.classList).add.apply(Un,go),Fr=Xt(Fr,an)}}function ms(kr,Un){Un===void 0&&(Un={});var Ss=document.createElement("button");return Ss.className=f.CONTROL_BUTTON+" "+Un.className,Ss.setAttribute("title",Un.title),Un.container.appendChild(Ss),Ss.addEventListener("click",function(go){if(go.preventDefault(),go.stopPropagation(),go.target===Hr)return Gn(),void Un.onDeactivate();ys(kr),Un.onActivate()},!0),Ss}function Gn(){Hr&&(Hr.classList.remove(f.ACTIVE_BUTTON),Hr=null)}function ys(kr){Gn();var Un=Nr[kr];Un&&Un&&kr!=="trash"&&(Un.classList.add(f.ACTIVE_BUTTON),Hr=Un)}return{setActiveButton:ys,queueMapClasses:ln,updateMapClasses:xi,clearMapClasses:function(){ln({mode:null,feature:null,mouse:null}),xi()},addButtons:function(){var kr=Zt.options.controls,Un=document.createElement("div");return Un.className=f.CONTROL_GROUP+" "+f.CONTROL_BASE,kr&&(kr[b.LINE]&&(Nr[b.LINE]=ms(b.LINE,{container:Un,className:f.CONTROL_BUTTON_LINE,title:"LineString tool "+(Zt.options.keybindings?"(l)":""),onActivate:function(){return Zt.events.changeMode(O.DRAW_LINE_STRING)},onDeactivate:function(){return Zt.events.trash()}})),kr[b.POLYGON]&&(Nr[b.POLYGON]=ms(b.POLYGON,{container:Un,className:f.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(Zt.options.keybindings?"(p)":""),onActivate:function(){return Zt.events.changeMode(O.DRAW_POLYGON)},onDeactivate:function(){return Zt.events.trash()}})),kr[b.POINT]&&(Nr[b.POINT]=ms(b.POINT,{container:Un,className:f.CONTROL_BUTTON_POINT,title:"Marker tool "+(Zt.options.keybindings?"(m)":""),onActivate:function(){return Zt.events.changeMode(O.DRAW_POINT)},onDeactivate:function(){return Zt.events.trash()}})),kr.trash&&(Nr.trash=ms("trash",{container:Un,className:f.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:function(){Zt.events.trash()}})),kr.combine_features&&(Nr.combine_features=ms("combineFeatures",{container:Un,className:f.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:function(){Zt.events.combineFeatures()}})),kr.uncombine_features&&(Nr.uncombine_features=ms("uncombineFeatures",{container:Un,className:f.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:function(){Zt.events.uncombineFeatures()}}))),Un},removeButtons:function(){Object.keys(Nr).forEach(function(kr){var Un=Nr[kr];Un.parentNode&&Un.parentNode.removeChild(Un),delete Nr[kr]})}}}(Y),Y.container=kt.getContainer(),Y.store=new rt(Y),ae=Y.ui.addButtons(),Y.options.boxSelect&&(Y.boxZoomInitial=kt.boxZoom.isEnabled(),kt.boxZoom.disable(),kt.dragPan.disable(),kt.dragPan.enable()),kt.loaded()?ut.connect():(kt.on("load",ut.connect),$e=setInterval(function(){kt.loaded()&&ut.connect()},16)),Y.events.start(),ae},addLayers:function(){Y.map.addSource(m.COLD,{data:{type:M.FEATURE_COLLECTION,features:[]},type:"geojson"}),Y.map.addSource(m.HOT,{data:{type:M.FEATURE_COLLECTION,features:[]},type:"geojson"}),Y.options.styles.forEach(function(kt){Y.map.addLayer(kt)}),Y.store.setDirty(!0),Y.store.render()},removeLayers:function(){Y.options.styles.forEach(function(kt){Y.map.getLayer(kt.id)&&Y.map.removeLayer(kt.id)}),Y.map.getSource(m.COLD)&&Y.map.removeSource(m.COLD),Y.map.getSource(m.HOT)&&Y.map.removeSource(m.HOT)}};return Y.setup=ut,ut}var In=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}];function Rr(Y){return function(ae){var $e=ae.featureTarget;return!!$e&&!!$e.properties&&$e.properties.meta===Y}}function mn(Y){return!!Y.originalEvent&&!!Y.originalEvent.shiftKey&&Y.originalEvent.button===0}function Kr(Y){return!!Y.featureTarget&&!!Y.featureTarget.properties&&Y.featureTarget.properties.active===H.ACTIVE&&Y.featureTarget.properties.meta===j.FEATURE}function Ft(Y){return!!Y.featureTarget&&!!Y.featureTarget.properties&&Y.featureTarget.properties.active===H.INACTIVE&&Y.featureTarget.properties.meta===j.FEATURE}function xt(Y){return Y.featureTarget===void 0}function vr(Y){return!!Y.featureTarget&&!!Y.featureTarget.properties&&Y.featureTarget.properties.meta===j.FEATURE}function Mr(Y){var ae=Y.featureTarget;return!!ae&&!!ae.properties&&ae.properties.meta===j.VERTEX}function ar(Y){return!!Y.originalEvent&&Y.originalEvent.shiftKey===!0}function ni(Y){return Y.keyCode===27}function or(Y){return Y.keyCode===13}var vt=Object.freeze({__proto__:null,isOfMetaType:Rr,isShiftMousedown:mn,isActiveFeature:Kr,isInactiveFeature:Ft,noTarget:xt,isFeature:vr,isVertex:Mr,isShiftDown:ar,isEscapeKey:ni,isEnterKey:or,isTrue:function(){return!0}}),ot=lr;function lr(Y,ae){this.x=Y,this.y=ae}lr.prototype={clone:function(){return new lr(this.x,this.y)},add:function(Y){return this.clone()._add(Y)},sub:function(Y){return this.clone()._sub(Y)},multByPoint:function(Y){return this.clone()._multByPoint(Y)},divByPoint:function(Y){return this.clone()._divByPoint(Y)},mult:function(Y){return this.clone()._mult(Y)},div:function(Y){return this.clone()._div(Y)},rotate:function(Y){return this.clone()._rotate(Y)},rotateAround:function(Y,ae){return this.clone()._rotateAround(Y,ae)},matMult:function(Y){return this.clone()._matMult(Y)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(Y){return this.x===Y.x&&this.y===Y.y},dist:function(Y){return Math.sqrt(this.distSqr(Y))},distSqr:function(Y){var ae=Y.x-this.x,$e=Y.y-this.y;return ae*ae+$e*$e},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(Y){return Math.atan2(this.y-Y.y,this.x-Y.x)},angleWith:function(Y){return this.angleWithSep(Y.x,Y.y)},angleWithSep:function(Y,ae){return Math.atan2(this.x*ae-this.y*Y,this.x*Y+this.y*ae)},_matMult:function(Y){var ae=Y[0]*this.x+Y[1]*this.y,$e=Y[2]*this.x+Y[3]*this.y;return this.x=ae,this.y=$e,this},_add:function(Y){return this.x+=Y.x,this.y+=Y.y,this},_sub:function(Y){return this.x-=Y.x,this.y-=Y.y,this},_mult:function(Y){return this.x*=Y,this.y*=Y,this},_div:function(Y){return this.x/=Y,this.y/=Y,this},_multByPoint:function(Y){return this.x*=Y.x,this.y*=Y.y,this},_divByPoint:function(Y){return this.x/=Y.x,this.y/=Y.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var Y=this.y;return this.y=this.x,this.x=-Y,this},_rotate:function(Y){var ae=Math.cos(Y),$e=Math.sin(Y),ut=ae*this.x-$e*this.y,kt=$e*this.x+ae*this.y;return this.x=ut,this.y=kt,this},_rotateAround:function(Y,ae){var $e=Math.cos(Y),ut=Math.sin(Y),kt=ae.x+$e*(this.x-ae.x)-ut*(this.y-ae.y),Dt=ae.y+ut*(this.x-ae.x)+$e*(this.y-ae.y);return this.x=kt,this.y=Dt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},lr.convert=function(Y){return Y instanceof lr?Y:Array.isArray(Y)?new lr(Y[0],Y[1]):Y};var br=n(ot);function Tr(Y,ae){var $e=ae.getBoundingClientRect();return new br(Y.clientX-$e.left-(ae.clientLeft||0),Y.clientY-$e.top-(ae.clientTop||0))}function Zn(Y,ae,$e,ut){return{type:M.FEATURE,properties:{meta:j.VERTEX,parent:Y,coord_path:$e,active:ut?H.ACTIVE:H.INACTIVE},geometry:{type:M.POINT,coordinates:ae}}}function Gi(Y,ae,$e){var ut=ae.geometry.coordinates,kt=$e.geometry.coordinates;if(ut[1]>85||ut[1]85||kt[1]=ae&&this._bbox[3]>=$e},sn.prototype.intersect=function(Y){return this._valid?(ae=Y instanceof sn?Y.bbox():Y,!(this._bbox[0]>ae[2]||this._bbox[2]ae[3])):null;var ae},sn.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var Y="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",Y)},sn.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var cn=function(Y){if(!Y)return[];var ae=zt(At(Y)),$e=[];return ae.features.forEach(function(ut){ut.geometry&&($e=$e.concat(Yt(ut.geometry.coordinates)))}),$e},si=hn,gn=mi,_i={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Xi=Object.keys(_i);function Vi(Y){for(var ae=gn(),$e=cn(Y),ut=0;ut<$e.length;ut++)ae.include($e[ut]);return ae}nt.exports=function(Y){return Vi(Y).bbox()},nt.exports.polygon=function(Y){return Vi(Y).polygon()},nt.exports.bboxify=function(Y){return si(Y).map(function(ae){ae&&Xi.some(function($e){return!!ae[$e]&&_i[$e].indexOf(ae.type)!==-1})&&(ae.bbox=Vi(ae).bbox(),this.update(ae))})};var Ta=n(nt.exports),Oi=-90;function Jo(Y,ae){var $e=Oi,ut=90,kt=Oi,Dt=90,Zt=270,Nr=-270;Y.forEach(function(Fr){var an=Ta(Fr),ln=an[1],xi=an[3],ms=an[0],Gn=an[2];ln>$e&&($e=ln),xikt&&(kt=xi),lnNr&&(Nr=Gn)});var Hr=ae;return $e+Hr.lat>85&&(Hr.lat=85-$e),kt+Hr.lat>90&&(Hr.lat=90-kt),ut+Hr.lat<-85&&(Hr.lat=-85-ut),Dt+Hr.lat=270&&(Hr.lng-=360*Math.ceil(Math.abs(Hr.lng)/360)),Hr}function Go(Y,ae){var $e=Jo(Y.map(function(ut){return ut.toGeoJSON()}),ae);Y.forEach(function(ut){var kt,Dt=ut.getCoordinates(),Zt=function(Hr){var Fr={lng:Hr[0]+$e.lng,lat:Hr[1]+$e.lat};return[Fr.lng,Fr.lat]},Nr=function(Hr){return Hr.map(function(Fr){return Zt(Fr)})};ut.type===M.POINT?kt=Zt(Dt):ut.type===M.LINE_STRING||ut.type===M.MULTI_POINT?kt=Dt.map(Zt):ut.type===M.POLYGON||ut.type===M.MULTI_LINE_STRING?kt=Dt.map(Nr):ut.type===M.MULTI_POLYGON&&(kt=Dt.map(function(Hr){return Hr.map(function(Fr){return Nr(Fr)})})),ut.incomingCoords(kt)})}var $n={onSetup:function(Y){var ae=this,$e={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:Y.featureIds||[]};return this.setSelected($e.initiallySelectedFeatureIds.filter(function(ut){return ae.getFeature(ut)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),$e},fireUpdate:function(){this.map.fire(I.UPDATE,{action:A.MOVE,features:this.getSelected().map(function(Y){return Y.toGeoJSON()})})},fireActionable:function(){var Y=this,ae=this.getSelected(),$e=ae.filter(function(Nr){return Y.isInstanceOf("MultiFeature",Nr)}),ut=!1;if(ae.length>1){ut=!0;var kt=ae[0].type.replace("Multi","");ae.forEach(function(Nr){Nr.type.replace("Multi","")!==kt&&(ut=!1)})}var Dt=$e.length>0,Zt=ae.length>0;this.setActionableState({combineFeatures:ut,uncombineFeatures:Dt,trash:Zt})},getUniqueIds:function(Y){return Y.length?Y.map(function(ae){return ae.properties.id}).filter(function(ae){return ae!==void 0}).reduce(function(ae,$e){return ae.add($e),ae},new be).values():[]},stopExtendedInteractions:function(Y){Y.boxSelectElement&&(Y.boxSelectElement.parentNode&&Y.boxSelectElement.parentNode.removeChild(Y.boxSelectElement),Y.boxSelectElement=null),this.map.dragPan.enable(),Y.boxSelecting=!1,Y.canBoxSelect=!1,Y.dragMoving=!1,Y.canDragMove=!1},onStop:function(){pi.enable(this)},onMouseMove:function(Y,ae){return vr(ae)&&Y.dragMoving&&this.fireUpdate(),this.stopExtendedInteractions(Y),!0},onMouseOut:function(Y){return!Y.dragMoving||this.fireUpdate()}};$n.onTap=$n.onClick=function(Y,ae){return xt(ae)?this.clickAnywhere(Y,ae):Rr(j.VERTEX)(ae)?this.clickOnVertex(Y,ae):vr(ae)?this.clickOnFeature(Y,ae):void 0},$n.clickAnywhere=function(Y){var ae=this,$e=this.getSelectedIds();$e.length&&(this.clearSelectedFeatures(),$e.forEach(function(ut){return ae.doRender(ut)})),pi.enable(this),this.stopExtendedInteractions(Y)},$n.clickOnVertex=function(Y,ae){this.changeMode(O.DIRECT_SELECT,{featureId:ae.featureTarget.properties.parent,coordPath:ae.featureTarget.properties.coord_path,startPos:ae.lngLat}),this.updateUIClasses({mouse:v.MOVE})},$n.startOnActiveFeature=function(Y,ae){this.stopExtendedInteractions(Y),this.map.dragPan.disable(),this.doRender(ae.featureTarget.properties.id),Y.canDragMove=!0,Y.dragMoveLocation=ae.lngLat},$n.clickOnFeature=function(Y,ae){var $e=this;pi.disable(this),this.stopExtendedInteractions(Y);var ut=ar(ae),kt=this.getSelectedIds(),Dt=ae.featureTarget.properties.id,Zt=this.isSelected(Dt);if(!ut&&Zt&&this.getFeature(Dt).type!==M.POINT)return this.changeMode(O.DIRECT_SELECT,{featureId:Dt});Zt&&ut?(this.deselect(Dt),this.updateUIClasses({mouse:v.POINTER}),kt.length===1&&pi.enable(this)):!Zt&&ut?(this.select(Dt),this.updateUIClasses({mouse:v.MOVE})):Zt||ut||(kt.forEach(function(Nr){return $e.doRender(Nr)}),this.setSelected(Dt),this.updateUIClasses({mouse:v.MOVE})),this.doRender(Dt)},$n.onMouseDown=function(Y,ae){return Kr(ae)?this.startOnActiveFeature(Y,ae):this.drawConfig.boxSelect&&mn(ae)?this.startBoxSelect(Y,ae):void 0},$n.startBoxSelect=function(Y,ae){this.stopExtendedInteractions(Y),this.map.dragPan.disable(),Y.boxSelectStartLocation=Tr(ae.originalEvent,this.map.getContainer()),Y.canBoxSelect=!0},$n.onTouchStart=function(Y,ae){if(Kr(ae))return this.startOnActiveFeature(Y,ae)},$n.onDrag=function(Y,ae){return Y.canDragMove?this.dragMove(Y,ae):this.drawConfig.boxSelect&&Y.canBoxSelect?this.whileBoxSelect(Y,ae):void 0},$n.whileBoxSelect=function(Y,ae){Y.boxSelecting=!0,this.updateUIClasses({mouse:v.ADD}),Y.boxSelectElement||(Y.boxSelectElement=document.createElement("div"),Y.boxSelectElement.classList.add(f.BOX_SELECT),this.map.getContainer().appendChild(Y.boxSelectElement));var $e=Tr(ae.originalEvent,this.map.getContainer()),ut=Math.min(Y.boxSelectStartLocation.x,$e.x),kt=Math.max(Y.boxSelectStartLocation.x,$e.x),Dt=Math.min(Y.boxSelectStartLocation.y,$e.y),Zt=Math.max(Y.boxSelectStartLocation.y,$e.y),Nr="translate("+ut+"px, "+Dt+"px)";Y.boxSelectElement.style.transform=Nr,Y.boxSelectElement.style.WebkitTransform=Nr,Y.boxSelectElement.style.width=kt-ut+"px",Y.boxSelectElement.style.height=Zt-Dt+"px"},$n.dragMove=function(Y,ae){Y.dragMoving=!0,ae.originalEvent.stopPropagation();var $e={lng:ae.lngLat.lng-Y.dragMoveLocation.lng,lat:ae.lngLat.lat-Y.dragMoveLocation.lat};Go(this.getSelected(),$e),Y.dragMoveLocation=ae.lngLat},$n.onTouchEnd=$n.onMouseUp=function(Y,ae){var $e=this;if(Y.dragMoving)this.fireUpdate();else if(Y.boxSelecting){var ut=[Y.boxSelectStartLocation,Tr(ae.originalEvent,this.map.getContainer())],kt=this.featuresAt(null,ut,"click"),Dt=this.getUniqueIds(kt).filter(function(Zt){return!$e.isSelected(Zt)});Dt.length&&(this.select(Dt),Dt.forEach(function(Zt){return $e.doRender(Zt)}),this.updateUIClasses({mouse:v.MOVE}))}this.stopExtendedInteractions(Y)},$n.toDisplayFeatures=function(Y,ae,$e){ae.properties.active=this.isSelected(ae.properties.id)?H.ACTIVE:H.INACTIVE,$e(ae),this.fireActionable(),ae.properties.active===H.ACTIVE&&ae.geometry.type!==M.POINT&&zn(ae).forEach($e)},$n.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},$n.onCombineFeatures=function(){var Y=this.getSelected();if(!(Y.length===0||Y.length<2)){for(var ae=[],$e=[],ut=Y[0].type.replace("Multi",""),kt=0;kt1){var Zt=this.newFeature({type:M.FEATURE,properties:$e[0].properties,geometry:{type:"Multi"+ut,coordinates:ae}});this.addFeature(Zt),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([Zt.id]),this.map.fire(I.COMBINE_FEATURES,{createdFeatures:[Zt.toGeoJSON()],deletedFeatures:$e})}this.fireActionable()}},$n.onUncombineFeatures=function(){var Y=this,ae=this.getSelected();if(ae.length!==0){for(var $e=[],ut=[],kt=function(Zt){var Nr=ae[Zt];Y.isInstanceOf("MultiFeature",Nr)&&(Nr.getFeatures().forEach(function(Hr){Y.addFeature(Hr),Hr.properties=Nr.properties,$e.push(Hr.toGeoJSON()),Y.select([Hr.id])}),Y.deleteFeature(Nr.id,{silent:!0}),ut.push(Nr.toGeoJSON()))},Dt=0;Dt1&&this.map.fire(I.UNCOMBINE_FEATURES,{createdFeatures:$e,deletedFeatures:ut}),this.fireActionable()}};var wo=Rr(j.VERTEX),aa=Rr(j.MIDPOINT),As={fireUpdate:function(){this.map.fire(I.UPDATE,{action:A.CHANGE_COORDINATES,features:this.getSelected().map(function(Y){return Y.toGeoJSON()})})},fireActionable:function(Y){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:Y.selectedCoordPaths.length>0})},startDragging:function(Y,ae){this.map.dragPan.disable(),Y.canDragMove=!0,Y.dragMoveLocation=ae.lngLat},stopDragging:function(Y){this.map.dragPan.enable(),Y.dragMoving=!1,Y.canDragMove=!1,Y.dragMoveLocation=null},onVertex:function(Y,ae){this.startDragging(Y,ae);var $e=ae.featureTarget.properties,ut=Y.selectedCoordPaths.indexOf($e.coord_path);ar(ae)||ut!==-1?ar(ae)&&ut===-1&&Y.selectedCoordPaths.push($e.coord_path):Y.selectedCoordPaths=[$e.coord_path];var kt=this.pathsToCoordinates(Y.featureId,Y.selectedCoordPaths);this.setSelectedCoordinates(kt)},onMidpoint:function(Y,ae){this.startDragging(Y,ae);var $e=ae.featureTarget.properties;Y.feature.addCoordinate($e.coord_path,$e.lng,$e.lat),this.fireUpdate(),Y.selectedCoordPaths=[$e.coord_path]},pathsToCoordinates:function(Y,ae){return ae.map(function($e){return{feature_id:Y,coord_path:$e}})},onFeature:function(Y,ae){Y.selectedCoordPaths.length===0?this.startDragging(Y,ae):this.stopDragging(Y)},dragFeature:function(Y,ae,$e){Go(this.getSelected(),$e),Y.dragMoveLocation=ae.lngLat},dragVertex:function(Y,ae,$e){for(var ut=Y.selectedCoordPaths.map(function(Nr){return Y.feature.getCoordinate(Nr)}),kt=Jo(ut.map(function(Nr){return{type:M.FEATURE,properties:{},geometry:{type:M.POINT,coordinates:Nr}}}),$e),Dt=0;Dt0?this.dragVertex(Y,ae,$e):this.dragFeature(Y,ae,$e),Y.dragMoveLocation=ae.lngLat}},As.onClick=function(Y,ae){return xt(ae)?this.clickNoTarget(Y,ae):Kr(ae)?this.clickActiveFeature(Y,ae):Ft(ae)?this.clickInactive(Y,ae):void this.stopDragging(Y)},As.onTap=function(Y,ae){return xt(ae)?this.clickNoTarget(Y,ae):Kr(ae)?this.clickActiveFeature(Y,ae):Ft(ae)?this.clickInactive(Y,ae):void 0},As.onTouchEnd=As.onMouseUp=function(Y){Y.dragMoving&&this.fireUpdate(),this.stopDragging(Y)};var Xs={};function yl(Y,ae){return!!Y.lngLat&&Y.lngLat.lng===ae[0]&&Y.lngLat.lat===ae[1]}Xs.onSetup=function(){var Y=this.newFeature({type:M.FEATURE,properties:{},geometry:{type:M.POINT,coordinates:[]}});return this.addFeature(Y),this.clearSelectedFeatures(),this.updateUIClasses({mouse:v.ADD}),this.activateUIButton(b.POINT),this.setActionableState({trash:!0}),{point:Y}},Xs.stopDrawingAndRemove=function(Y){this.deleteFeature([Y.point.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT)},Xs.onTap=Xs.onClick=function(Y,ae){this.updateUIClasses({mouse:v.MOVE}),Y.point.updateCoordinate("",ae.lngLat.lng,ae.lngLat.lat),this.map.fire(I.CREATE,{features:[Y.point.toGeoJSON()]}),this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.point.id]})},Xs.onStop=function(Y){this.activateUIButton(),Y.point.getCoordinate().length||this.deleteFeature([Y.point.id],{silent:!0})},Xs.toDisplayFeatures=function(Y,ae,$e){var ut=ae.properties.id===Y.point.id;if(ae.properties.active=ut?H.ACTIVE:H.INACTIVE,!ut)return $e(ae)},Xs.onTrash=Xs.stopDrawingAndRemove,Xs.onKeyUp=function(Y,ae){if(ni(ae)||or(ae))return this.stopDrawingAndRemove(Y,ae)};var Ko={onSetup:function(){var Y=this.newFeature({type:M.FEATURE,properties:{},geometry:{type:M.POLYGON,coordinates:[[]]}});return this.addFeature(Y),this.clearSelectedFeatures(),pi.disable(this),this.updateUIClasses({mouse:v.ADD}),this.activateUIButton(b.POLYGON),this.setActionableState({trash:!0}),{polygon:Y,currentVertexPosition:0}},clickAnywhere:function(Y,ae){if(Y.currentVertexPosition>0&&yl(ae,Y.polygon.coordinates[0][Y.currentVertexPosition-1]))return this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.polygon.id]});this.updateUIClasses({mouse:v.ADD}),Y.polygon.updateCoordinate("0."+Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat),Y.currentVertexPosition++,Y.polygon.updateCoordinate("0."+Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat)},clickOnVertex:function(Y){return this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.polygon.id]})},onMouseMove:function(Y,ae){Y.polygon.updateCoordinate("0."+Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat),Mr(ae)&&this.updateUIClasses({mouse:v.POINTER})}};Ko.onTap=Ko.onClick=function(Y,ae){return Mr(ae)?this.clickOnVertex(Y,ae):this.clickAnywhere(Y,ae)},Ko.onKeyUp=function(Y,ae){ni(ae)?(this.deleteFeature([Y.polygon.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT)):or(ae)&&this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.polygon.id]})},Ko.onStop=function(Y){this.updateUIClasses({mouse:v.NONE}),pi.enable(this),this.activateUIButton(),this.getFeature(Y.polygon.id)!==void 0&&(Y.polygon.removeCoordinate("0."+Y.currentVertexPosition),Y.polygon.isValid()?this.map.fire(I.CREATE,{features:[Y.polygon.toGeoJSON()]}):(this.deleteFeature([Y.polygon.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT,{},{silent:!0})))},Ko.toDisplayFeatures=function(Y,ae,$e){var ut=ae.properties.id===Y.polygon.id;if(ae.properties.active=ut?H.ACTIVE:H.INACTIVE,!ut)return $e(ae);if(ae.geometry.coordinates.length!==0){var kt=ae.geometry.coordinates[0].length;if(!(kt<3)){if(ae.properties.meta=j.FEATURE,$e(Zn(Y.polygon.id,ae.geometry.coordinates[0][0],"0.0",!1)),kt>3){var Dt=ae.geometry.coordinates[0].length-3;$e(Zn(Y.polygon.id,ae.geometry.coordinates[0][Dt],"0."+Dt,!1))}if(kt<=4){var Zt=[[ae.geometry.coordinates[0][0][0],ae.geometry.coordinates[0][0][1]],[ae.geometry.coordinates[0][1][0],ae.geometry.coordinates[0][1][1]]];if($e({type:M.FEATURE,properties:ae.properties,geometry:{coordinates:Zt,type:M.LINE_STRING}}),kt===3)return}return $e(ae)}}},Ko.onTrash=function(Y){this.deleteFeature([Y.polygon.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT)};var Zs={onSetup:function(Y){var ae,$e,ut=(Y=Y||{}).featureId,kt="forward";if(ut){if(!(ae=this.getFeature(ut)))throw new Error("Could not find a feature with the provided featureId");var Dt=Y.from;if(Dt&&Dt.type==="Feature"&&Dt.geometry&&Dt.geometry.type==="Point"&&(Dt=Dt.geometry),Dt&&Dt.type==="Point"&&Dt.coordinates&&Dt.coordinates.length===2&&(Dt=Dt.coordinates),!Dt||!Array.isArray(Dt))throw new Error("Please use the `from` property to indicate which point to continue the line from");var Zt=ae.coordinates.length-1;if(ae.coordinates[Zt][0]===Dt[0]&&ae.coordinates[Zt][1]===Dt[1])$e=Zt+1,ae.addCoordinate.apply(ae,[$e].concat(ae.coordinates[Zt]));else{if(ae.coordinates[0][0]!==Dt[0]||ae.coordinates[0][1]!==Dt[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");kt="backwards",$e=0,ae.addCoordinate.apply(ae,[$e].concat(ae.coordinates[0]))}}else ae=this.newFeature({type:M.FEATURE,properties:{},geometry:{type:M.LINE_STRING,coordinates:[]}}),$e=0,this.addFeature(ae);return this.clearSelectedFeatures(),pi.disable(this),this.updateUIClasses({mouse:v.ADD}),this.activateUIButton(b.LINE),this.setActionableState({trash:!0}),{line:ae,currentVertexPosition:$e,direction:kt}},clickAnywhere:function(Y,ae){if(Y.currentVertexPosition>0&&yl(ae,Y.line.coordinates[Y.currentVertexPosition-1])||Y.direction==="backwards"&&yl(ae,Y.line.coordinates[Y.currentVertexPosition+1]))return this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.line.id]});this.updateUIClasses({mouse:v.ADD}),Y.line.updateCoordinate(Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat),Y.direction==="forward"?(Y.currentVertexPosition++,Y.line.updateCoordinate(Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat)):Y.line.addCoordinate(0,ae.lngLat.lng,ae.lngLat.lat)},clickOnVertex:function(Y){return this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.line.id]})},onMouseMove:function(Y,ae){Y.line.updateCoordinate(Y.currentVertexPosition,ae.lngLat.lng,ae.lngLat.lat),Mr(ae)&&this.updateUIClasses({mouse:v.POINTER})}};Zs.onTap=Zs.onClick=function(Y,ae){if(Mr(ae))return this.clickOnVertex(Y,ae);this.clickAnywhere(Y,ae)},Zs.onKeyUp=function(Y,ae){or(ae)?this.changeMode(O.SIMPLE_SELECT,{featureIds:[Y.line.id]}):ni(ae)&&(this.deleteFeature([Y.line.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT))},Zs.onStop=function(Y){pi.enable(this),this.activateUIButton(),this.getFeature(Y.line.id)!==void 0&&(Y.line.removeCoordinate(""+Y.currentVertexPosition),Y.line.isValid()?this.map.fire(I.CREATE,{features:[Y.line.toGeoJSON()]}):(this.deleteFeature([Y.line.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT,{},{silent:!0})))},Zs.onTrash=function(Y){this.deleteFeature([Y.line.id],{silent:!0}),this.changeMode(O.SIMPLE_SELECT)},Zs.toDisplayFeatures=function(Y,ae,$e){var ut=ae.properties.id===Y.line.id;if(ae.properties.active=ut?H.ACTIVE:H.INACTIVE,!ut)return $e(ae);ae.geometry.coordinates.length<2||(ae.properties.meta=j.FEATURE,$e(Zn(Y.line.id,ae.geometry.coordinates[Y.direction==="forward"?ae.geometry.coordinates.length-2:1],""+(Y.direction==="forward"?ae.geometry.coordinates.length-2:1),!1)),$e(ae))};var Qo={simple_select:$n,direct_select:As,draw_point:Xs,draw_polygon:Ko,draw_line_string:Zs},nl={defaultMode:O.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:In,modes:Qo,controls:{},userProperties:!1},bo={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},mt={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function dr(Y,ae){return Y.map(function($e){return $e.source?$e:Xt($e,{id:$e.id+"."+ae,source:ae==="hot"?m.HOT:m.COLD})})}var Or={exports:{}};(function(Y,ae){var $e="__lodash_hash_undefined__",ut=9007199254740991,kt="[object Arguments]",Dt="[object Array]",Zt="[object Boolean]",Nr="[object Date]",Hr="[object Error]",Fr="[object Function]",an="[object Map]",ln="[object Number]",xi="[object Object]",ms="[object Promise]",Gn="[object RegExp]",ys="[object Set]",kr="[object String]",Un="[object Symbol]",Ss="[object WeakMap]",go="[object ArrayBuffer]",Ks="[object DataView]",Wc=/^\[object .+?Constructor\]$/,Ps=/^(?:0|[1-9]\d*)$/,_s={};_s["[object Float32Array]"]=_s["[object Float64Array]"]=_s["[object Int8Array]"]=_s["[object Int16Array]"]=_s["[object Int32Array]"]=_s["[object Uint8Array]"]=_s["[object Uint8ClampedArray]"]=_s["[object Uint16Array]"]=_s["[object Uint32Array]"]=!0,_s[kt]=_s[Dt]=_s[go]=_s[Zt]=_s[Ks]=_s[Nr]=_s[Hr]=_s[Fr]=_s[an]=_s[ln]=_s[xi]=_s[Gn]=_s[ys]=_s[kr]=_s[Ss]=!1;var xd=typeof Oc=="object"&&Oc&&Oc.Object===Object&&Oc,wd=typeof self=="object"&&self&&self.Object===Object&&self,gs=xd||wd||Function("return this")(),Hs=ae&&!ae.nodeType&&ae,fa=Hs&&Y&&!Y.nodeType&&Y,_c=fa&&fa.exports===Hs,xc=_c&&xd.process,Bh=function(){try{return xc&&xc.binding&&xc.binding("util")}catch{}}(),Nl=Bh&&Bh.isTypedArray;function Zp(Ot,hr){for(var En=-1,bi=Ot==null?0:Ot.length;++Eng))return!1;var w=ts.get(Ot);if(w&&ts.get(hr))return w==hr;var k=-1,G=!0,te=2&En?new Mo:void 0;for(ts.set(Ot,hr),ts.set(hr,Ot);++k-1},jn.prototype.set=function(Ot,hr){var En=this.__data__,bi=Ni(En,Ot);return bi<0?(++this.size,En.push([Ot,hr])):En[bi][1]=hr,this},$s.prototype.clear=function(){this.size=0,this.__data__={hash:new ho,map:new(Ti||jn),string:new ho}},$s.prototype.delete=function(Ot){var hr=vl(this,Ot).delete(Ot);return this.size-=hr?1:0,hr},$s.prototype.get=function(Ot){return vl(this,Ot).get(Ot)},$s.prototype.has=function(Ot){return vl(this,Ot).has(Ot)},$s.prototype.set=function(Ot,hr){var En=vl(this,Ot),bi=En.size;return En.set(Ot,hr),this.size+=En.size==bi?0:1,this},Mo.prototype.add=Mo.prototype.push=function(Ot){return this.__data__.set(Ot,$e),this},Mo.prototype.has=function(Ot){return this.__data__.has(Ot)},Ji.prototype.clear=function(){this.__data__=new jn,this.size=0},Ji.prototype.delete=function(Ot){var hr=this.__data__,En=hr.delete(Ot);return this.size=hr.size,En},Ji.prototype.get=function(Ot){return this.__data__.get(Ot)},Ji.prototype.has=function(Ot){return this.__data__.has(Ot)},Ji.prototype.set=function(Ot,hr){var En=this.__data__;if(En instanceof jn){var bi=En.__data__;if(!Ti||bi.length<199)return bi.push([Ot,hr]),this.size=++En.size,this;En=this.__data__=new $s(bi)}return En.set(Ot,hr),this.size=En.size,this};var _l=Dn?function(Ot){return Ot==null?[]:(Ot=Object(Ot),function(hr,En){for(var bi=-1,hs=hr==null?0:hr.length,ts=0,F=[];++bi-1&&Ot%1==0&&Ot-1&&Ot%1==0&&Ot<=ut}function bc(Ot){var hr=typeof Ot;return Ot!=null&&(hr=="object"||hr=="function")}function ql(Ot){return Ot!=null&&typeof Ot=="object"}var Fl=Nl?function(Ot){return function(hr){return Ot(hr)}}(Nl):function(Ot){return ql(Ot)&&Ju(Ot.length)&&!!_s[xa(Ot)]};function za(Ot){return(hr=Ot)!=null&&Ju(hr.length)&&!eo(hr)?ea(Ot):Ru(Ot);var hr}Y.exports=function(Ot,hr){return Es(Ot,hr)}})(Or,Or.exports);var Xn=n(Or.exports);function Us(Y,ae){return Y.length===ae.length&&JSON.stringify(Y.map(function($e){return $e}).sort())===JSON.stringify(ae.map(function($e){return $e}).sort())}var Js={Polygon:Ut,LineString:pr,Point:Je,MultiPolygon:je,MultiLineString:je,MultiPoint:je},co=Object.freeze({__proto__:null,CommonSelectors:vt,constrainFeatureMovement:Jo,createMidPoint:Gi,createSupplementaryPoints:zn,createVertex:Zn,doubleClickZoom:pi,euclideanDistance:We,featuresAt:ve,getFeatureAtAndSetCursors:Fe,isClick:He,isEventAtCoordinates:yl,isTap:Lt,mapEventToBoundingBox:ee,ModeHandler:r,moveFeatures:Go,sortFeatures:fe,stringSetsAreEqual:Us,StringSet:be,theme:In,toDenseArray:qt}),il=function(Y,ae){var $e={options:Y=function(kt){kt===void 0&&(kt={});var Dt=Xt(kt);return kt.controls||(Dt.controls={}),kt.displayControlsDefault===!1?Dt.controls=Xt(mt,kt.controls):Dt.controls=Xt(bo,kt.controls),(Dt=Xt(nl,Dt)).styles=dr(Dt.styles,"cold").concat(dr(Dt.styles,"hot")),Dt}(Y)};ae=function(kt,Dt){return Dt.modes=O,Dt.getFeatureIdsAt=function(Zt){return ve.click({point:Zt},null,kt).map(function(Nr){return Nr.properties.id})},Dt.getSelectedIds=function(){return kt.store.getSelectedIds()},Dt.getSelected=function(){return{type:M.FEATURE_COLLECTION,features:kt.store.getSelectedIds().map(function(Zt){return kt.store.get(Zt)}).map(function(Zt){return Zt.toGeoJSON()})}},Dt.getSelectedPoints=function(){return{type:M.FEATURE_COLLECTION,features:kt.store.getSelectedCoordinates().map(function(Zt){return{type:M.FEATURE,properties:{},geometry:{type:M.POINT,coordinates:Zt.coordinates}}})}},Dt.set=function(Zt){if(Zt.type===void 0||Zt.type!==M.FEATURE_COLLECTION||!Array.isArray(Zt.features))throw new Error("Invalid FeatureCollection");var Nr=kt.store.createRenderBatch(),Hr=kt.store.getAllIds().slice(),Fr=Dt.add(Zt),an=new be(Fr);return(Hr=Hr.filter(function(ln){return!an.has(ln)})).length&&Dt.delete(Hr),Nr(),Fr},Dt.add=function(Zt){var Nr=JSON.parse(JSON.stringify(Be(Zt))).features.map(function(Hr){if(Hr.id=Hr.id||rr(),Hr.geometry===null)throw new Error("Invalid geometry: null");if(kt.store.get(Hr.id)===void 0||kt.store.get(Hr.id).type!==Hr.geometry.type){var Fr=Js[Hr.geometry.type];if(Fr===void 0)throw new Error("Invalid geometry type: "+Hr.geometry.type+".");var an=new Fr(kt,Hr);kt.store.add(an)}else{var ln=kt.store.get(Hr.id);ln.properties=Hr.properties,Xn(ln.properties,Hr.properties)||kt.store.featureChanged(ln.id),Xn(ln.getCoordinates(),Hr.geometry.coordinates)||ln.incomingCoords(Hr.geometry.coordinates)}return Hr.id});return kt.store.render(),Nr},Dt.get=function(Zt){var Nr=kt.store.get(Zt);if(Nr)return Nr.toGeoJSON()},Dt.getAll=function(){return{type:M.FEATURE_COLLECTION,features:kt.store.getAll().map(function(Zt){return Zt.toGeoJSON()})}},Dt.delete=function(Zt){return kt.store.delete(Zt,{silent:!0}),Dt.getMode()!==O.DIRECT_SELECT||kt.store.getSelectedIds().length?kt.store.render():kt.events.changeMode(O.SIMPLE_SELECT,void 0,{silent:!0}),Dt},Dt.deleteAll=function(){return kt.store.delete(kt.store.getAllIds(),{silent:!0}),Dt.getMode()===O.DIRECT_SELECT?kt.events.changeMode(O.SIMPLE_SELECT,void 0,{silent:!0}):kt.store.render(),Dt},Dt.changeMode=function(Zt,Nr){return Nr===void 0&&(Nr={}),Zt===O.SIMPLE_SELECT&&Dt.getMode()===O.SIMPLE_SELECT?(Us(Nr.featureIds||[],kt.store.getSelectedIds())||(kt.store.setSelected(Nr.featureIds,{silent:!0}),kt.store.render()),Dt):(Zt===O.DIRECT_SELECT&&Dt.getMode()===O.DIRECT_SELECT&&Nr.featureId===kt.store.getSelectedIds()[0]||kt.events.changeMode(Zt,Nr,{silent:!0}),Dt)},Dt.getMode=function(){return kt.events.getMode()},Dt.trash=function(){return kt.events.trash({silent:!0}),Dt},Dt.combineFeatures=function(){return kt.events.combineFeatures({silent:!0}),Dt},Dt.uncombineFeatures=function(){return kt.events.uncombineFeatures({silent:!0}),Dt},Dt.setFeatureProperty=function(Zt,Nr,Hr){return kt.store.setFeatureProperty(Zt,Nr,Hr),Dt},Dt}($e,ae),$e.api=ae;var ut=Ur($e);return ae.onAdd=ut.onAdd,ae.onRemove=ut.onRemove,ae.types=b,ae.options=Y,ae};function ps(Y){il(Y,this)}return ps.modes=Qo,ps.constants=K,ps.lib=co,ps})})(D7e);var HEt=D7e.exports;const GEt=H2(HEt),qEt=({geom:t,setGeom:e,mode:r,setMode:n,features:i,filtered:s})=>{let[o,a]=E.useState(null),[l,u]=E.useState(null);return E.useEffect(()=>{const d=[-83.287803,42.255192,-82.910451,42.45023];var f=new Hge.Map({container:"map",style:FC,bounds:d});let m=new GEt({displayControlsDefault:!1});u(m),f.addControl(m,"top-left"),f.on("load",v=>{a(f),f.resize(),f.setPaintProperty("parcel-line","line-opacity",{base:1,stops:[[14,0],[14.1,.15]]}),f.addSource("filtered",{type:"geojson",data:{type:"FeatureCollection",features:[]},cluster:!0,clusterMaxZoom:22,clusterRadius:1,clusterMinPoints:5}),f.addSource("filtered-parcels",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),f.addLayer({id:"filtered-parcels",source:"filtered-parcels",type:"line"}),f.addLayer({id:"filtered-addresses-single",source:"filtered",type:"circle",filter:["!",["has","point_count"]],paint:{"circle-radius":{base:1,stops:[[10.5,.2],[13.5,1],[16.5,3],[19,12]]},"circle-color":"yellow","circle-stroke-color":"#333","circle-stroke-width":{base:1,stops:[[10.5,.2],[13.5,.5],[16.5,1],[19,3]]}}}),f.addLayer({id:"filtered-addresses-cluster",source:"filtered",type:"circle",filter:["has","point_count"],paint:{"circle-radius":{base:1,stops:[[10.5,.2],[13.5,8],[16.5,10],[19,18]]},"circle-color":"yellow","circle-stroke-color":"#333","circle-stroke-width":{base:1,stops:[[10.5,.2],[13.5,.5],[16.5,1],[19,3]]}}}),f.addLayer({id:"clustered-address-labels",source:"filtered",type:"symbol",filter:["has","point_count"],layout:{"text-field":"{point_count_abbreviated}","text-font":["Avenir Next LT Pro Bold"],"text-size":11}})}),f.on("draw.create",v=>{let b=m.getAll();e(b),b.features[0].geometry.type==="Polygon"&&f.fitBounds(Fle(b),{padding:20,maxZoom:17})}),f.on("draw.update",v=>{e(m.getAll())}),f.on("draw.modechange",v=>{m.getAll().features.length>1&&v.mode.slice(0,4)==="draw"&&m.delete(m.getAll().features[0].id)})},[e]),E.useEffect(()=>{if(o&&l&&t){if(t.features[0].geometry.type!=="Point")o.fitBounds(Fle(t),{padding:40,maxZoom:17});else{let d=t.features[0].geometry.coordinates;o.easeTo({center:d,zoom:17})}l.set(t),l.changeMode("simple_select")}o&&l&&!t&&l.getAll().features.length>0&&l.delete(l.getAll().features[0].id)},[t,l,o]),E.useEffect(()=>{o&&l&&r&&l.changeMode(r)},[r]),E.useEffect(()=>{o&&i&&o.getSource("filtered").setData(i)},[i]),E.useEffect(()=>{o&&s&&o.getSource("filtered-parcels").setData({type:"FeatureCollection",features:s.map(d=>TO(d))})},[s]),oe.jsx("div",{id:"map",style:{height:"50vh"}})};function WEt(t){return TXe(t,(e,r)=>e+ZEt(r),0)}function ZEt(t){let e=0,r;switch(t.type){case"Polygon":return vue(t.coordinates);case"MultiPolygon":for(r=0;r0){e+=Math.abs(_ue(t[0]));for(let r=1;r=e?(n+2)%e:n+2],a=i[0]*PB,l=s[1]*PB,u=o[0]*PB;r+=(u-a)*Math.sin(l),n++}return r*YEt}var XEt=WEt;const JEt=({geom:t,setGeom:e,resultIds:r})=>oe.jsx(kl,{children:oe.jsxs(kn,{direction:"column",children:[oe.jsx(Ln,{weight:"medium",children:"Current selection:"}),oe.jsxs(Ln,{size:"1",children:[(XEt(t)*386102e-12).toFixed(3)," square miles"]}),r&&oe.jsxs(Ln,{size:"1",children:[r.objectIds.length.toLocaleString()," total addresses in the selection area"]}),oe.jsx(Eu,{size:"1",mt:"3",onClick:()=>e(null),color:"tomato",children:oe.jsx(Ln,{children:"Delete current selection"})})]})}),KEt=({filtered:t})=>{let e=[{accessor:"fnl_priadr",Header:"Address"},{accessor:"fnl_secadr",Header:"Unit"},{accessor:"usps_status",Header:"USPS Status"}],r=E.useMemo(()=>e,[t]),n=E.useMemo(()=>t.map(H=>H.attributes),[t]);const{getTableProps:i,getTableBodyProps:s,headerGroups:o,rows:a,prepareRow:l,page:u,canPreviousPage:d,canNextPage:f,pageOptions:m,pageCount:v,gotoPage:b,nextPage:M,previousPage:O,setPageSize:I,state:{pageIndex:A,pageSize:j}}=LP.useTable({columns:r,data:n,initialState:{pageIndex:0,pageSize:15}},LP.usePagination);return oe.jsxs(kn,{gridColumn:"span 2",direction:"column",children:[oe.jsxs("table",{...i(),className:"w-full",children:[oe.jsx("thead",{children:o.map(H=>oe.jsx("tr",{...H.getHeaderGroupProps(),children:H.headers.map(W=>oe.jsx("th",{...W.getHeaderProps(),className:"bg-gray-300 m-0 py-2 pl-2",children:W.render("Header")}))}))}),oe.jsx("tbody",{...s(),children:u.map((H,W)=>(l(H),oe.jsx("tr",{...H.getRowProps(),children:H.cells.map(re=>oe.jsx("td",{...re.getCellProps(),className:"pl-2 border border-bottom-1",children:re.render("Cell")}))},H.id)))})]}),oe.jsxs("div",{className:"p-2",children:[oe.jsx("button",{className:"p-1 bg-gray-100 border border-black w-12",onClick:()=>b(0),disabled:!d,children:"<<"})," ",oe.jsx("button",{className:"p-1 bg-gray-100 border border-black w-12",onClick:()=>O(),disabled:!d,children:"<"})," ",oe.jsx("button",{className:"p-1 bg-gray-100 border border-black w-12",onClick:()=>M(),disabled:!f,children:">"})," ",oe.jsx("button",{className:"p-1 bg-gray-100 border border-black w-12",onClick:()=>b(v-1),disabled:!f,children:">>"})," ",oe.jsxs("span",{children:["Page"," ",oe.jsxs("strong",{children:[A+1," of ",m.length]})," "]}),oe.jsxs("span",{children:["| Go to page:"," ",oe.jsx("input",{type:"number",defaultValue:A+1,onChange:H=>{const W=H.target.value?Number(H.target.value)-1:0;b(W)},style:{width:"100px"}})]})," "]})]})},QEt=()=>{const t={"usps-deliverable":{activeText:"Deliverable addresses only",inactiveText:"All addresses, even undeliverable",default:!0,filterFunction:ge=>ge.attributes.usps_status==="Deliverable"||ge.attributes.USPS_Status==="Deliverable"}},[e,r]=E.useState(null),[n,i]=E.useState(!1);let s=["https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/MailerLayers/FeatureServer/0","https://services2.arcgis.com/qvkbeam7Wirps6zC/arcgis/rest/services/MailerLayers/FeatureServer/1"];const[o,a]=E.useState("centroid");let l={};Object.keys(t).forEach(ge=>{l[ge]=t[ge].default});const[u,d]=E.useState(l),[f,m]=E.useState(null),[v,b]=E.useState([]),[M,O]=E.useState([]),[I,A]=E.useState("simple_select"),[j,H]=E.useState(null),[W,re]=E.useState(null);let{token:K,session:pe}=G5();return E.useEffect(()=>{h1t({url:s[0],authentication:K}).then(()=>{i(!0)},()=>{i(!1)})},[]),E.useEffect(()=>{m(null),b([]),O([]),e&&n&&Tw({url:o==="parcel"?s[0]:s[1],returnIdsOnly:!0,orderByFields:"objectid",geometry:pse(e)[0].geometry,geometryType:"esriGeometryPolygon",spatialRel:"esriSpatialRelIntersects",inSR:4326,outSR:4326,httpMethod:"POST",returnCentroid:o==="parcel",authentication:K}).then(ge=>{m(ge)})},[e,n,K,o]),E.useEffect(()=>{const ge=()=>{let fe=[],be=f.objectIds.filter((ve,Pe)=>Pe===0||Pe%500===0);be.push(f.objectIds.slice(-1)[0]+1);let le=be.slice(1).map((ve,Pe)=>({url:o==="parcel"?s[0]:s[1],orderByFields:"objectid",where:`objectid between ${Pe===0?be[0]-1:be[Pe]} and ${ve-1}`,geometry:pse(e)[0].geometry,geometryType:"esriGeometryPolygon",spatialRel:"esriSpatialRelIntersects",httpMethod:"POST",returnCentroid:o==="parcel",inSR:4326,outSR:4326,resultRecordCount:500,authentication:K}));f7e.Promise.map(le,ve=>Tw(ve),{concurrency:2}).each(ve=>{fe=fe.concat(ve.features)}).then(()=>b(fe))};f&&f.objectIds.length>0&&ge()},[f]),E.useEffect(()=>{let ge=v;Object.keys(u).forEach(le=>{u[le]&&(ge=ge.filter(t[le].filterFunction))}),O(ge);let fe=ge.map((le,ve)=>le.attributes);H(fe);let be={type:"FeatureCollection",features:ge.map(le=>{let ve=o==="parcel"?"centroid":"geometry";return{type:"Feature",properties:{...le.attributes},geometry:{type:"Point",coordinates:[parseFloat(le[ve].x.toFixed(6)),parseFloat(le[ve].y.toFixed(6))]}}})};re(be)},[u,v]),oe.jsxs(B5,{columns:{initial:"1fr",sm:"2fr 3fr"},rows:{initial:"auto",sm:"auto auto"},gap:{initial:"0",sm:"4"},p:{initial:"0",sm:"2",lg:"4"},children:[!n&&oe.jsxs(kl,{className:"bg-red-100",children:[oe.jsxs(kn,{align:"center",justify:"start",gap:"2",children:[oe.jsx($Y,{}),oe.jsx(Ln,{children:"No access!"})]}),oe.jsxs(Ln,{size:"1",children:["Please log in, or if you are logged in,"," ",oe.jsx(ud,{to:"https://app.smartsheet.com/b/form/6919c51a844448e2a6811f04a6267292",children:"contact the team"})," ","for access."]})]}),!e&&oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsxs(kl,{children:[oe.jsx(Ln,{weight:"medium",children:"Draw your own shape"}),oe.jsxs(kn,{align:"center",gap:"2",pt:"2",children:[oe.jsx(Eu,{size:"1",onClick:()=>A("draw_polygon"),children:oe.jsx(Ln,{children:"Draw a polygon"})}),oe.jsx(Eu,{text:"Draw a line",size:"1",onClick:()=>A("draw_line_string"),children:oe.jsx(Ln,{children:"Draw a line"})}),oe.jsx(Eu,{size:"1",onClick:()=>A("draw_point"),children:oe.jsx(Ln,{children:"Create a point"})})]})]}),oe.jsx(xSt,{geom:e,setGeom:r}),oe.jsx(UEt,{geom:e,setGeom:r})]}),e&&oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsx(Ln,{size:"2",weight:"medium",children:"Selection mode"}),oe.jsxs(wZ,{value:o,defaultValue:"parcel",onValueChange:ge=>a(ge),gap:"2",children:[oe.jsx(bC,{value:"centroid",children:oe.jsx(Ln,{size:"1",children:"Address points within buffer"})}),oe.jsx(bC,{value:"parcel",children:oe.jsx(Ln,{size:"1",children:"Addresses on parcels within buffer"})})]}),oe.jsx(kEt,{geom:e,setGeom:r}),oe.jsxs(oe.Fragment,{children:[!f&&e&&e.features[0].geometry.type==="Polygon"&&oe.jsx("h1",{children:"Loading..."}),!f&&e&&(e.features[0].geometry.type==="Point"||e.features[0].geometry.type==="LineString")&&oe.jsx("h1",{children:"Apply a buffer to this geometry to generate a mailing list area."}),f&&oe.jsx(kl,{children:oe.jsxs(kn,{direction:"column",gap:"2",children:[oe.jsx(Ln,{weight:"medium",children:"Options"}),Object.keys(u).map(ge=>oe.jsxs(kn,{gap:"2",children:[oe.jsx(MZ,{checked:u[ge],onCheckedChange:fe=>{let ee=iX.cloneDeep(u);ee[ge]=fe,d(ee)}}),oe.jsx(Ln,{children:"USPS-deliverable addresses only"})]})),oe.jsxs(Ln,{size:"2",children:["Showing ",M.length.toLocaleString()," addresses out of ",v.length.toLocaleString()," total"]}),oe.jsxs(kn,{children:[oe.jsx(nP,{data:j,filename:`mailing_list_${new Date().getTime()}.csv`,className:"mr-2",children:oe.jsxs(Eu,{text:`Download .csv with ${M.length.toLocaleString()} rows`,size:"1",children:["Download .csv with ",M.length.toLocaleString()," ","rows"]})}),oe.jsx(Eu,{size:"1",children:oe.jsx("a",{href:"https://detroitmi.maps.arcgis.com/sharing/rest/content/items/da107e7b0d0e48c3b210db20fa3c30e7/data",children:oe.jsx(Ln,{children:"Output data dictionary"})})})]})]})})]}),f&&oe.jsx(JEt,{geom:e,setGeom:r,resultIds:f})]}),oe.jsx(qEt,{geom:e,setGeom:r,filtered:M,mode:I,setMode:A,features:W}),M.length>0&&oe.jsx(KEt,{filtered:M})]})},eMt=({path:t,children:e})=>{const{isAuthenticated:r}=G5();return r?e:oe.jsx(rLe,{to:`/login?app=${t.replace("/","")}`})};function tMt(){return oe.jsx(RXe,{children:oe.jsx(XFe,{children:oe.jsx(dLe,{children:oe.jsx(wXe,{children:oe.jsxs(iLe,{children:[oe.jsx(Cx,{path:"/",element:oe.jsx(Det,{})}),oe.jsx(Cx,{path:"/login",element:oe.jsx(Fet,{})}),oe.jsx(Cx,{path:"/map",element:oe.jsx(uSt,{})}),oe.jsx(Cx,{path:"/geocoder",element:oe.jsx(_St,{})}),oe.jsx(Cx,{path:"/mailer",element:oe.jsx(eMt,{path:"/mailer",children:oe.jsx(QEt,{})})})]})})})})})}const rMt=jhe(document.getElementById("root"));rMt.render(oe.jsx(El.StrictMode,{children:oe.jsx("html",{children:oe.jsx("body",{children:oe.jsx(hZ,{accentColor:"green",grayColor:"sand",radius:"small",scaling:"100%",children:oe.jsx(tMt,{})})})})}));export{Qt as $,vLt as A,T as B,Fp as C,B as D,_t as E,qr as F,qZ as G,PTt as H,fd as I,im as J,SMt as K,BRt as L,Sr as M,Ao as N,PZ as O,u0e as P,iu as Q,QAe as R,YL as S,EC as T,sa as U,li as V,Ttt as W,aot as X,lot as Y,uot as Z,fs as _,rpt as a,ji as a$,jLt as a0,BLt as a1,Mp as a2,VRt as a3,jRt as a4,LC as a5,kTt as a6,$o as a7,HC as a8,jIt as a9,Gve as aA,qve as aB,Hve as aC,vne as aD,mRt as aE,xIt as aF,$Le as aG,$It as aH,OIt as aI,zS as aJ,q0 as aK,ws as aL,CTt as aM,fO as aN,_me as aO,zRt as aP,oAe as aQ,Hv as aR,un as aS,ste as aT,i0 as aU,yw as aV,dTt as aW,sE as aX,oO as aY,Mu as aZ,ro as a_,cX as aa,Wd as ab,w5 as ac,dm as ad,r_ as ae,Pot as af,Oot as ag,Not as ah,Vot as ai,Wot as aj,Zot as ak,__e as al,x_e as am,qot as an,Qot as ao,eat as ap,Yye as aq,ptt as ar,Ott as as,WV as at,t_ as au,tE as av,oX as aw,aO as ax,mo as ay,P6 as az,Qme as b,_ve as b$,RX as b0,Kw as b1,pRt as b2,iE as b3,IIt as b4,Xk as b5,Zj as b6,jpe as b7,TLe as b8,_Y as b9,Sme as bA,Hl as bB,HZ as bC,cve as bD,d_e as bE,Out as bF,$nt as bG,FIt as bH,pA as bI,STt as bJ,bnt as bK,t2e as bL,Ynt as bM,UIt as bN,qnt as bO,Wnt as bP,VIt as bQ,Q0 as bR,KTt as bS,rut as bT,H1 as bU,bp as bV,w1e as bW,Bc as bX,BS as bY,Bd as bZ,jR as b_,ds as ba,ZTt as bb,ELe as bc,xMt as bd,irt as be,dX as bf,fX as bg,srt as bh,nO as bi,iO as bj,vE as bk,eIt as bl,xtt as bm,cIt as bn,Het as bo,L5 as bp,y3e as bq,$ct as br,ene as bs,lve as bt,uve as bu,g3e as bv,Iu as bw,d2 as bx,EV as by,lNe as bz,ZDe as c,qs as c$,jet as c0,ttt as c1,Uye as c2,Zye as c3,ctt as c4,rE as c5,rtt as c6,Q1 as c7,cm as c8,hMt as c9,jf as cA,cE as cB,Cm as cC,a_ as cD,tut as cE,Wut as cF,wht as cG,zut as cH,ztt as cI,_tt as cJ,att as cK,ltt as cL,Ltt as cM,qht as cN,$1e as cO,I$ as cP,AX as cQ,lE as cR,VC as cS,Gv as cT,Af as cU,Xit as cV,O$ as cW,Jit as cX,K3e as cY,uTt as cZ,vRt as c_,ZAe as ca,Ad as cb,nY as cc,dMt as cd,wJ as ce,xJ as cf,rJ as cg,mnt as ch,NLt as ci,Tke as cj,wY as ck,zMt as cl,VZ as cm,XZ as cn,Fa as co,SX as cp,xht as cq,dpt as cr,gft as cs,ipt as ct,fpt as cu,q_e as cv,Zht as cw,Ght as cx,Hht as cy,Gc as cz,mE as d,JTt as d$,qk as d0,I1e as d1,On as d2,nE as d3,oIt as d4,PF as d5,LAe as d6,Pl as d7,v5 as d8,m3e as d9,_dt as dA,Iut as dB,zLt as dC,Cht as dD,FLt as dE,bht as dF,ay as dG,wLe as dH,gke as dI,Ph as dJ,c_ as dK,$1 as dL,pke as dM,c3e as dN,zIt as dO,BIt as dP,rrt as dQ,nL as dR,nLt as dS,oLt as dT,lie as dU,Znt as dV,M5 as dW,bit as dX,aLt as dY,QC as dZ,Pct as d_,h3e as da,lTt as db,pTt as dc,yI as dd,Sie as de,nIt as df,W5 as dg,oE as dh,Mut as di,_5e as dj,Mot as dk,cRt as dl,yRt as dm,BMt as dn,NTt as dp,IFe as dq,OTt as dr,$Tt as ds,m4 as dt,JG as du,Zft as dv,JL as dw,aIt as dx,fTt as dy,UZ as dz,Vut as e,Uut as e$,dtt as e0,nct as e1,op as e2,u_ as e3,Kie as e4,nkt as e5,ikt as e6,ir as e7,lct as e8,Eft as e9,v5e as eA,Ef as eB,ePe as eC,e_ as eD,Lp as eE,T$ as eF,WC as eG,dJ as eH,NS as eI,_4 as eJ,Vht as eK,Xht as eL,Yht as eM,Xw as eN,m7 as eO,mdt as eP,Bet as eQ,Jlt as eR,gy as eS,QX as eT,h_e as eU,got as eV,mot as eW,pot as eX,Bdt as eY,Mht as eZ,xdt as e_,wO as ea,Ftt as eb,DIt as ec,vX as ed,T5 as ee,xft as ef,pft as eg,Dht as eh,gpt as ei,hne as ej,Yve as ek,Spt as el,mA as em,uJ as en,CO as eo,gz as ep,DG as eq,lJ as er,aE as es,yO as et,Slt as eu,Uht as ev,bJ as ew,ypt as ex,Qa as ey,cne as ez,npt as f,zTt as f$,rdt as f0,ndt as f1,idt as f2,odt as f3,adt as f4,ldt as f5,udt as f6,cdt as f7,hdt as f8,ddt as f9,$Rt as fA,T6 as fB,vMt as fC,wtt as fD,Yk as fE,WX as fF,tP as fG,zht as fH,nJ as fI,Gut as fJ,qut as fK,Q3e as fL,KMt as fM,Cdt as fN,sA as fO,r0e as fP,Kft as fQ,_ne as fR,AIt as fS,aRt as fT,gRt as fU,RTt as fV,gc as fW,EMt as fX,_E as fY,KC as fZ,FTt as f_,fdt as fa,wpt as fb,pdt as fc,y5e as fd,Wht as fe,cJ as ff,sPe as fg,qet as fh,Wet as fi,Zet as fj,vct as fk,Vet as fl,_ct as fm,NF as fn,Cb as fo,jA as fp,qOe as fq,qS as fr,yTt as fs,t5 as ft,tst as fu,Jpe as fv,_Mt as fw,LTt as fx,HMt as fy,sy as fz,mMt as g,oRt as g$,TMt as g0,vs as g1,gO as g2,Qw as g3,Dc as g4,Nf as g5,pIt as g6,Vye as g7,stt as g8,$tt as g9,Tdt as gA,rst as gB,xme as gC,d7 as gD,CIt as gE,Uft as gF,RIt as gG,bIt as gH,lne as gI,Qne as gJ,DLt as gK,MAe as gL,jMt as gM,VMt as gN,EIt as gO,wIt as gP,TIt as gQ,ks as gR,lo as gS,Dp as gT,Gre as gU,A$ as gV,Eme as gW,o5e as gX,OLe as gY,LX as gZ,lRt as g_,Ntt as ga,Xot as gb,trt as gc,t5e as gd,lrt as ge,aX as gf,htt as gg,ott as gh,Hye as gi,XTt as gj,p7 as gk,qye as gl,cct as gm,UA as gn,QTt as go,Wye as gp,mtt as gq,Tot as gr,akt as gs,H3e as gt,GZ as gu,Ux as gv,md as gw,tdt as gx,mkt as gy,Mdt as gz,S$ as h,x1e as h$,Ae as h0,sIt as h1,ATt as h2,FDe as h3,zet as h4,P2 as h5,xLt as h6,vht as h7,_ht as h8,Nht as h9,SIt as hA,XRt as hB,Iot as hC,tIt as hD,mTt as hE,$l as hF,JLt as hG,Dh as hH,j4 as hI,$st as hJ,Zpe as hK,i0e as hL,aTt as hM,hve as hN,yte as hO,T2e as hP,j5 as hQ,Get as hR,eRt as hS,YTt as hT,Ket as hU,YIt as hV,cTt as hW,iA as hX,Uve as hY,LIt as hZ,gIt as h_,rft as ha,_ft as hb,mpt as hc,Rtt as hd,nF as he,NZ as hf,DZ as hg,hit as hh,rP as hi,gLt as hj,NIt as hk,bdt as hl,g2 as hm,Gie as hn,XA as ho,ULt as hp,n1e as hq,nNe as hr,MIt as hs,Cke as ht,WMt as hu,qMt as hv,ZMt as hw,GMt as hx,yMt as hy,SLe as hz,tpt as i,bTt as i$,gY as i0,zrt as i1,X9 as i2,Aht as i3,bMt as i4,CMt as i5,wMt as i6,qAe as i7,hct as i8,rct as i9,rLt as iA,jve as iB,PIt as iC,Yrt as iD,yIt as iE,gve as iF,Nrt as iG,Urt as iH,bve as iI,hIt as iJ,v1e as iK,AZ as iL,ite as iM,Cot as iN,HRt as iO,L$ as iP,Fit as iQ,a5e as iR,Qet as iS,Dtt as iT,TLt as iU,Gye as iV,f7 as iW,VX as iX,Tst as iY,Ist as iZ,TRt as i_,ict as ia,FMt as ib,Wpe as ic,HLt as id,m2e as ie,GLt as ig,QRt as ih,YX as ii,KRt as ij,Zrt as ik,zit as il,uRt as im,tY as io,xct as ip,yct as iq,ftt as ir,gct as is,Bpe as it,Hut as iu,yLe as iv,iIt as iw,G0 as ix,sO as iy,iL as iz,hTt as j,dRt as j$,HX as j0,K2e as j1,NRt as j2,ORt as j3,KA as j4,rTt as j5,Z2e as j6,z6 as j7,a7 as j8,JRt as j9,_It as jA,eLt as jB,cMt as jC,tLt as jD,QMt as jE,vnt as jF,Ztt as jG,gA as jH,vTt as jI,yA as jJ,Gdt as jK,L2 as jL,AC as jM,ult as jN,Gee as jO,nte as jP,fut as jQ,mke as jR,dLt as jS,hLt as jT,Lht as jU,Ype as jV,Ptt as jW,cPe as jX,MMt as jY,pMt as jZ,hRt as j_,IRt as ja,RRt as jb,LRt as jc,R2 as jd,o5 as je,iU as jf,Srt as jg,Crt as jh,lIt as ji,kht as jj,Xke as jk,Yre as jl,XV as jm,Xa as jn,YV as jo,KV as jp,zA as jq,LLt as jr,dIt as js,qrt as jt,Pat as ju,mIt as jv,kIt as jw,ont as jx,vIt as jy,fIt as jz,FRt as k,Nct as k0,Oct as k1,bLe as k2,fRt as k3,ZLt as k4,skt as k5,okt as k6,gkt as k7,ukt as l,p5e as m,l7 as n,xlt as o,DTt as p,yLt as q,URt as r,Pr as s,bpt as t,lkt as u,D6 as v,oH as w,Ene as x,_lt as y,_Lt as z}; diff --git a/build/assets/infoFor3D-DsOdlPuA.js b/build/assets/infoFor3D-DsOdlPuA.js new file mode 100644 index 0000000..0dffbce --- /dev/null +++ b/build/assets/infoFor3D-DsOdlPuA.js @@ -0,0 +1 @@ +const f=[["binary","application/octet-stream","bin",""]];function C(t,r){return i(r.name,(t==null?void 0:t.supportedFormats)??[])!=null}function F(t,r){if(!t)return!1;const n=d(r,t.supportedFormats??[]);return n!=null&&t.editFormats.includes(n)}function a(t,r){return u(m(t,r))}function p(t,r){return u(i(t,r))}function L(t,r){return s(l(t,r))}function d(t,r){return p(t.name,r)??a(t.type,r)}function o(t){return[...f,...t]}function l(t,r){return o(r).find(n=>u(n)===t)}function m(t,r){const n=t.toLowerCase();return o(r).find(e=>s(e)===n)}function i(t,r){const n=t.toLowerCase();return o(r).find(e=>w(e).some(c=>n.endsWith(c)))}function u(t){return t==null?void 0:t[0]}function s(t){return t==null?void 0:t[1].toLowerCase()}function w(t){return(t==null?void 0:t[2].split(",").map(r=>r.toLowerCase()))??[]}function b(t){var r;return(r=t.tables)==null?void 0:r.find(n=>n.role==="assetMaps")}export{b as F,d as c,p as i,F as r,L as s,C as t,a as u}; diff --git a/build/assets/interactive-DaeLV7oq.js b/build/assets/interactive-DaeLV7oq.js new file mode 100644 index 0000000..b5b42a5 --- /dev/null +++ b/build/assets/interactive-DaeLV7oq.js @@ -0,0 +1,9 @@ +import{b as y}from"./index-DKOmzAMm.js";import{q as A,a as h}from"./component-BUnDTGFH.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const H=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function R(e){return`${e.split("-").map((i,a)=>a===0?i:`${i[0].toUpperCase()}${i.slice(1)}`).join("")}${H.includes(e)?"Input":"Change"}`}const m="hidden-form-input";function b(e){return"checked"in e}const E=new WeakMap,g=new WeakSet;function V(e,t){if(h(t.parentElement,"[form]"))return!0;const i="calciteInternalFormComponentRegister";let a=!1;return e.addEventListener(i,r=>{a=r.composedPath().some(l=>g.has(l)),r.stopPropagation()},{once:!0}),t.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0})),a}function D(e,{status:t,message:n,icon:i}){"status"in e&&(e.status=t),"validationIcon"in e&&typeof e.validationIcon!="string"&&(e.validationIcon=i),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=n)}function k(e){return e.nodeName==="CALCITE-RADIO-BUTTON"?h(e,"calcite-radio-button-group"):e}const P=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function I(e){var c;const t=e==null?void 0:e.target,n=t==null?void 0:t.validationMessage,i=k(t==null?void 0:t.parentElement);if(!i)return;const a=(c=i==null?void 0:i.nodeName)==null?void 0:c.toLowerCase(),r=a==null?void 0:a.split("-");if(r.length<2||r[0]!=="calcite")return;e==null||e.preventDefault(),"validity"in i&&(i.validity=t==null?void 0:t.validity),i.dispatchEvent(P),D(i,{message:n,icon:!0,status:"invalid"});const l=R(a);i.addEventListener(l,()=>{"status"in i&&(i.status="idle"),"validationIcon"in i&&!i.validationIcon&&(i.validationIcon=!1),"validationMessage"in i&&i.validationMessage===n&&(i.validationMessage=""),"validity"in i&&(i.validity=t==null?void 0:t.validity)},{once:!0})}function J(e){const{formEl:t}=e;return t?(t.addEventListener("invalid",I,!0),t.requestSubmit(),t.removeEventListener("invalid",I,!0),requestAnimationFrame(()=>{const n=t.querySelectorAll("[status=invalid]");for(const i of n)if(i!=null&&i.validationMessage){i==null||i.setFocus();break}}),!0):!1}function K(e){var t;(t=e.formEl)==null||t.reset()}function Q(e){const{el:t,value:n}=e,i=q(e);if(!i||V(i,t))return;e.formEl=i,e.defaultValue=n,b(e)&&(e.defaultChecked=e.checked);const a=(e.onFormReset||N).bind(e);i.addEventListener("reset",a),E.set(e.el,a),g.add(t)}function q(e){const{el:t,form:n}=e;return n?A(t,{id:n}):h(t,"form")}function N(){if("status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),b(this)){this.checked=this.defaultChecked;return}this.value=this.defaultValue}function X(e){const{el:t,formEl:n}=e;if(!n)return;const i=E.get(t);n.removeEventListener("reset",i),E.delete(t),e.formEl=null,g.delete(t)}const W="calciteInternalHiddenInputInput",L=e=>{e.target.dispatchEvent(new CustomEvent(W,{bubbles:!0}))},C=e=>e.removeEventListener("input",L);function O(e){const{el:t,formEl:n,name:i,value:a}=e,{ownerDocument:r}=t,l=t.querySelectorAll(`input[slot="${m}"]`);if(!n||!i){l.forEach(s=>{C(s),s.remove()});return}const c=Array.isArray(a)?a:[a],u=[],f=new Set;l.forEach(s=>{const o=c.find(w=>w==s.value);o!=null?(f.add(o),F(e,s,o)):u.push(s)});let d;c.forEach(s=>{if(f.has(s))return;let o=u.pop();o||(o=r.createElement("input"),o.slot=m),d||(d=r.createDocumentFragment()),d.append(o),o.addEventListener("input",L),F(e,o,s)}),d&&t.append(d),u.forEach(s=>{C(s),s.remove()})}function F(e,t,n){var f;const{defaultValue:i,disabled:a,form:r,name:l,required:c}=e;t.defaultValue=i,t.disabled=a,t.name=l,t.required=c,t.tabIndex=-1,r?t.setAttribute("form",r):t.removeAttribute("form"),b(e)?(t.checked=e.checked,t.defaultChecked=e.defaultChecked,t.value=e.checked?n||"on":""):t.value=n||"",(f=e.syncHiddenFormInput)==null||f.call(e,t);const u=k(e.el);if(u&&"validity"in u)for(const d in{...t==null?void 0:t.validity})u.validity[d]=t.validity[d]}const Y=({component:e})=>(O(e),y("slot",{name:m}));/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */function x(){const{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function M(e){e.target.disabled&&e.preventDefault()}const S=["mousedown","mouseup","click"];function p(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}const v={capture:!0};function Z(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),T(e);return}B(e),e.el.removeAttribute("aria-disabled")}function T(e){e.el.click=x,$(e.el)}function $(e){e.addEventListener("pointerdown",M,v),S.forEach(t=>e.addEventListener(t,p,v))}function B(e){delete e.el.click,U(e.el)}function U(e){e.removeEventListener("pointerdown",M,v),S.forEach(t=>e.removeEventListener(t,p,v))}const j={container:"interaction-container"},_=({disabled:e},t)=>y("div",{class:j.container,inert:e},...t);export{Y as H,_ as I,Q as c,X as d,q as f,W as i,K as r,J as s,Z as u}; diff --git a/build/assets/json-Wa8cmqdu.js b/build/assets/json-Wa8cmqdu.js new file mode 100644 index 0000000..14ab849 --- /dev/null +++ b/build/assets/json-Wa8cmqdu.js @@ -0,0 +1 @@ +const Z={convertToGEGeometry:a,exportPoint:c,exportPolygon:m,exportPolyline:l,exportMultipoint:M,exportExtent:f};function a(i,t){return t==null?null:i.convertJSONToGeometry(t)}class r{constructor(t,s,n){this.x=t,this.y=s,this.spatialReference=n,this.z=void 0,this.m=void 0}}function c(i,t,s){const n=new r(i.getPointX(t),i.getPointY(t),s),e=i.hasZ(t),o=i.hasM(t);return e&&(n.z=i.getPointZ(t)),o&&(n.m=i.getPointM(t)),n}class x{constructor(t,s,n,e){this.rings=t,this.spatialReference=s,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),e&&(this.hasM=e)}}function m(i,t,s){return new x(i.exportPaths(t),s,i.hasZ(t),i.hasM(t))}class u{constructor(t,s,n,e){this.paths=t,this.spatialReference=s,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),e&&(this.hasM=e)}}function l(i,t,s){return new u(i.exportPaths(t),s,i.hasZ(t),i.hasM(t))}class v{constructor(t,s,n,e){this.points=t,this.spatialReference=s,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),e&&(this.hasM=e)}}function M(i,t,s){return new v(i.exportPoints(t),s,i.hasZ(t),i.hasM(t))}class p{constructor(t,s,n,e,o){this.xmin=t,this.ymin=s,this.xmax=n,this.ymax=e,this.spatialReference=o,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}function f(i,t,s){const n=i.hasZ(t),e=i.hasM(t),o=new p(i.getXMin(t),i.getYMin(t),i.getXMax(t),i.getYMax(t),s);if(n){const h=i.getZExtent(t);o.zmin=h.vmin,o.zmax=h.vmax}if(e){const h=i.getMExtent(t);o.mmin=h.vmin,o.mmax=h.vmax}return o}export{Z as t}; diff --git a/build/assets/jsonContext-SE-5k22x.js b/build/assets/jsonContext-SE-5k22x.js new file mode 100644 index 0000000..ba1d64e --- /dev/null +++ b/build/assets/jsonContext-SE-5k22x.js @@ -0,0 +1 @@ +import{I as o,C as i}from"./index-DKOmzAMm.js";function s(t,e){return{...l(t,e),readResourcePaths:[]}}function u(t,e,n){const r=o(t.itemUrl);return{...l(t,e),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,resources:n?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function l(t,e){return{origin:e,url:o(t.itemUrl),portal:t.portal||i.getDefault(),portalItem:t}}export{s as e,u as o}; diff --git a/build/assets/knowledgeGraphService-BFNZ__DV.js b/build/assets/knowledgeGraphService-BFNZ__DV.js new file mode 100644 index 0000000..6aadd2c --- /dev/null +++ b/build/assets/knowledgeGraphService-BFNZ__DV.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/arcgis-knowledge-client-core-simd-iXkxQjQw.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/arcgis-knowledge-client-core-DBXFIJfG.js"])))=>i.map(i=>d[i]); +import{B as a,D as s,E as G,bw as C,F,ay as U,M as He,_ as we,fr as ve,s as d,dg as ue,aY as be,Q as xe,ax as ce,aX as ye,V as re,U as z,aL as Be}from"./index-DKOmzAMm.js";import{m as Me,p as Oe,t as Ve,c as We}from"./Relationship-DeeaK30J.js";let k=class extends C{constructor(r){super(r),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};a([s()],k.prototype,"headerKeys",void 0),a([s()],k.prototype,"outSpatialReference",void 0),a([s()],k.prototype,"exceededTransferLimit",void 0),k=a([G("esri.rest.knowledgeGraph.GraphQueryResultHeader")],k);const Z=k;let L=class extends C{constructor(r){super(r),this.resultRows=[],this.resultHeader=new Z}};a([s()],L.prototype,"resultRows",void 0),a([s()],L.prototype,"resultHeader",void 0),L=a([G("esri.rest.knowledgeGraph.GraphQueryResult")],L);const Te=L;let A=class extends C{constructor(r){super(r),this.resultRowsStream=new ReadableStream,this.resultHeader=new Z}};a([s()],A.prototype,"resultRowsStream",void 0),a([s()],A.prototype,"resultHeader",void 0),A=a([G("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],A);const Ee=A;let b=class extends F{constructor(r){super(r),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};a([s({type:String,json:{write:!0}})],b.prototype,"name",void 0),a([s({type:Boolean,json:{write:!0}})],b.prototype,"unique",void 0),a([s({type:Boolean,json:{write:!0}})],b.prototype,"ascending",void 0),a([s({type:String,json:{write:!0}})],b.prototype,"description",void 0),a([s({type:[String],json:{write:!0}})],b.prototype,"fieldNames",void 0),b=a([G("esri.rest.knowledgeGraph.FieldIndex")],b);const ke=b;let v=class extends F{constructor(r){super(r),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};a([s({type:String,json:{write:!0}})],v.prototype,"name",void 0),a([s({type:String,json:{write:!0}})],v.prototype,"alias",void 0),a([s({type:String,json:{write:!0}})],v.prototype,"fieldType",void 0),a([s({type:String,json:{write:!0}})],v.prototype,"geometryType",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"hasM",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"hasZ",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"nullable",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"editable",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"required",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"defaultVisibility",void 0),a([s({type:Boolean,json:{write:!0}})],v.prototype,"systemMaintained",void 0),a([s()],v.prototype,"role",void 0),a([s({json:{write:!0}})],v.prototype,"defaultValue",void 0),v=a([G("esri.rest.knowledgeGraph.GraphProperty")],v);const je=v;let P=class extends F{constructor(r){super(r),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null,this.type=null}};a([s({type:String,json:{write:!0}})],P.prototype,"name",void 0),a([s({type:String,json:{write:!0}})],P.prototype,"alias",void 0),a([s({type:String,json:{write:!0}})],P.prototype,"role",void 0),a([s({type:Boolean,json:{write:!0}})],P.prototype,"strict",void 0),a([s({type:[je],json:{write:!0}})],P.prototype,"properties",void 0),a([s({type:[ke],json:{write:!0}})],P.prototype,"fieldIndexes",void 0),P=a([G("esri.rest.knowledgeGraph.GraphObjectType")],P);const $e=P;let ne=class extends $e{constructor(r){super(r),this.type="entity"}};ne=a([G("esri.rest.knowledgeGraph.EntityType")],ne);const oe=ne;let H=class extends $e{constructor(r){super(r),this.endPoints=[],this.type="relationship"}};a([s()],H.prototype,"endPoints",void 0),H=a([G("esri.rest.knowledgeGraph.RelationshipType")],H);const Fe=H;let T=class extends F{constructor(r){super(r),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null,this.metaEntityTypes=null}};a([s({type:Date,json:{type:Number,write:{writer:(e,r)=>{r.timestamp=e==null?void 0:e.getTime()}}}})],T.prototype,"timestamp",void 0),a([s({type:U,json:{write:!0}})],T.prototype,"spatialReference",void 0),a([s({type:Boolean,json:{write:!0}})],T.prototype,"strict",void 0),a([s({type:String,json:{write:!0}})],T.prototype,"objectIdField",void 0),a([s({type:String,json:{write:!0}})],T.prototype,"globalIdField",void 0),a([s()],T.prototype,"arcgisManaged",void 0),a([s()],T.prototype,"identifierInfo",void 0),a([s()],T.prototype,"searchIndexes",void 0),a([s({type:[oe],json:{write:!0}})],T.prototype,"entityTypes",void 0),a([s({type:[Fe],json:{write:!0}})],T.prototype,"relationshipTypes",void 0),a([s({type:[oe],json:{write:!0}})],T.prototype,"metaEntityTypes",void 0),T=a([G("esri.rest.knowledgeGraph.DataModel")],T);const De=T;let f=class extends F{constructor(r){super(r),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};a([s({type:[String],json:{write:!0}})],f.prototype,"capabilities",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"supportsSearch",void 0),a([s({type:[String],json:{write:!0}})],f.prototype,"supportedQueryFormats",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"allowGeometryUpdates",void 0),a([s({type:Number,json:{write:!0}})],f.prototype,"searchMaxRecordCount",void 0),a([s({type:Object,json:{write:!0}})],f.prototype,"serviceCapabilities",void 0),a([s({type:Number,json:{write:!0}})],f.prototype,"maxRecordCount",void 0),a([s({type:String,json:{write:!0}})],f.prototype,"description",void 0),a([s({type:String,json:{write:!0}})],f.prototype,"copyrightText",void 0),a([s({type:String,json:{write:!0}})],f.prototype,"units",void 0),a([s({type:U,json:{write:!0}})],f.prototype,"spatialReference",void 0),a([s({type:Number,json:{write:!0}})],f.prototype,"currentVersion",void 0),a([s({type:Object,json:{write:!0}})],f.prototype,"dateFieldsTimeReference",void 0),a([s({type:String,json:{write:!0}})],f.prototype,"serviceItemId",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"supportsDocuments",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"dataEditingNotSupported",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"schemaEditingNotSupported",void 0),a([s({type:Boolean,json:{write:!0}})],f.prototype,"supportsProvenance",void 0),f=a([G("esri.rest.knowledgeGraph.ServiceDefinition")],f);const Ne=f;let j=class extends F{constructor(r){super(r),this.dataModel=null,this.serviceDefinition=null}};a([s({type:String,json:{write:!0}})],j.prototype,"url",void 0),a([s({type:De,json:{write:!0}})],j.prototype,"dataModel",void 0),a([s({type:Ne,json:{write:!0}})],j.prototype,"serviceDefinition",void 0),j=a([G("esri.rest.knowledgeGraph.KnowledgeGraph")],j);const Ke=j,Ge="esri/rest/knowledgeGraph/wasmInterface/";let X;async function x(){const e=X;if(e)return e;const r=He("wasm-simd");return X=Ze(r),X}async function Ze(e){if(e){const{default:t}=await we(()=>import("./arcgis-knowledge-client-core-simd-iXkxQjQw.js"),__vite__mapDeps([0,1])).then(n=>n.a);return t({locateFile:n=>ve(Ge+n)})}const{default:r}=await we(()=>import("./arcgis-knowledge-client-core-DBXFIJfG.js"),__vite__mapDeps([2,1])).then(t=>t.a);return r({locateFile:t=>ve(Ge+t)})}var O,Ie,ie;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"})(O||(O={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Ie||(Ie={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(ie||(ie={}));function Le(e,r){const t=new r.ArrayValue;return t.deleteLater(),e.forEach(n=>{t.add_value(fe(n,r))}),t}function Ae(e,r){const t=new r.ObjectValue;t.deleteLater();for(const[n,o]of Object.entries(e))t.set_key_value(n,fe(o,r));return t}function he(e,r){if(e instanceof be)return rt(e,r);if(e instanceof xe)return nt(e,r);if(e instanceof ce||e instanceof ye)return tt(e,r);throw new d("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function Je(e,r){r.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function Xe(e,r,t){if(!e.extent)throw new d("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new d("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new d("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);r.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:t.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}function et(e,r){r.provenance_behavior={value:ie[e]}}function fe(e,r){if(e==null)return"";if(typeof e!="object"||e instanceof Date)return e;if(e instanceof ue)return he(e,r);if(Array.isArray(e)){const t=new r.ArrayValue;return t.deleteLater(),e.forEach(n=>{t.add_value(fe(n,r))}),t}return Ae(e,r)}function tt(e,r){const t=new r.GeometryValue;t.deleteLater(),t.has_z=e.hasZ,t.has_m=e.hasM;const n=[],o=[];let i=[];e instanceof ce?(t.geometry_type=r.esriGeometryType.esriGeometryPolyline,i=e.paths):e instanceof ye&&(t.geometry_type=r.esriGeometryType.esriGeometryPolygon,i=e.rings);let p=0,l=0;return i.forEach(u=>{let c=0;u.forEach(y=>{c++,y.forEach(g=>{n[l]=g,l++})}),o[p]=c,p++}),t.coords=new Float64Array(n),t.lengths=new Uint32Array(o),t}function rt(e,r){const t=new r.GeometryValue;t.deleteLater(),t.geometry_type=t.geometry_type=r.esriGeometryType.esriGeometryMultipoint,t.has_z=e.hasZ,t.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let i=0;return e.points.forEach(p=>{p.forEach(l=>{n[i]=l,i++})}),t.coords=new Float64Array(n),t.lengths=new Uint32Array(o),t}function nt(e,r){const t=new r.GeometryValue;t.deleteLater(),t.geometry_type=r.esriGeometryType.esriGeometryPoint,t.has_z=e.hasZ,t.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let i=2;return e.hasZ&&(n[i]=e.z,i++),e.hasM&&(n[i]=e.m,i++),t.coords=new Float64Array(n),t.lengths=new Uint32Array(o),t}function Y(e,r){if(!e.typeName)throw new d("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof Me){const t=new r.EntityValue;t.deleteLater(),t.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))t.set_key_value(n,Re(o,r));return e.id&&t.set_id(e.id),t}if(e instanceof Oe){const t=new r.RelationshipValue;t.deleteLater(),t.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))t.set_key_value(n,Re(o,r));return e.id&&t.set_id(e.id),e.originId&&e.destinationId&&t.set_related_entity_ids(e.originId,e.destinationId),t}throw new d("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function ot(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function Re(e,r){return e==null?null:typeof e!="object"||e instanceof Date?e:e instanceof ue?he(e,r):null}let M=class extends C{constructor(r){super(r),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};a([s()],M.prototype,"name",void 0),a([s()],M.prototype,"supportedCategory",void 0),a([s()],M.prototype,"analyzers",void 0),a([s()],M.prototype,"searchProperties",void 0),M=a([G("esri.rest.knowledgeGraph.SearchIndex")],M);const it=M;var V,W,K,ae,se,pe,le;(function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"})(V||(V={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(W||(W={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(K||(K={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(ae||(ae={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(se||(se={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(pe||(pe={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(le||(le={}));function at(e){var r,t,n,o,i,p,l,u,c,y,g;return e.deleteLater(),new De({timestamp:e.timestamp,spatialReference:new U(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:le[(n=(t=(r=e.identifier_info)==null?void 0:r.identifier_mapping_info)==null?void 0:t.identifier_info_type)==null?void 0:n.value],databaseNativeIdentifier:(i=(o=e.identifier_info)==null?void 0:o.identifier_mapping_info)==null?void 0:i.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:(u=(l=(p=e.identifier_info)==null?void 0:p.identifier_mapping_info)==null?void 0:l.uniform_property_identifier)==null?void 0:u.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:ae[(g=(y=(c=e.identifier_info)==null?void 0:c.identifier_generation_info)==null?void 0:y.uuid_method_hint)==null?void 0:g.value]}},searchIndexes:ft(e.search_indexes),entityTypes:Se(e.entity_types),relationshipTypes:ht(e.relationship_types),metaEntityTypes:Se(e.meta_entity_types)})}function st(e){return e.deleteLater(),new oe(ze(e))}function pt(e){return e.deleteLater(),new ke({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:ut(e.fields)})}function ze(e){return{name:e.name,alias:e.alias,role:V[e.role.value]?V[e.role.value]:null,strict:e.strict,properties:ct(e.properties),fieldIndexes:yt(e.field_indexes)}}function lt(e){return e.deleteLater(),new je({alias:e.alias,name:e.name,fieldType:W[e.field_type.value]?W[e.field_type.value]:null,geometryType:K[e.geometry_type.value]?K[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:pe[e.role.value],defaultValue:e.default_value})}function dt(e){e.deleteLater();const r=ze(e),t=[];for(let n=0;n{const c=[];for(let y=0;yre.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),vt={decodedWasmObjToQueryResponseObj:(e,r,t)=>{if(e==null)return null;if(typeof e!="object"||"getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case I.ESRI_GEOMETRY_POINT:return _t(e,t);case I.ESRI_GEOMETRY_MULTIPOINT:return gt(e,t);case I.ESRI_GEOMETRY_POLYLINE:return mt(e,t);case I.ESRI_GEOMETRY_POLYGON:return wt(e,t);case I.ESRI_GEOMETRY_ENVELOPE:case I.ESRI_GEOMETRY_MULTI_PATCH:return Q().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case I.ESRI_GEOMETRY_NULL:case I.ESRI_GEOMETRY_ANY:default:return Q().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Q().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case O.OBJECT:return Et(e,r,t);case O.ENTITY:return Ue(e,r,t);case O.RELATIONSHIP:return qe(e,r,t);case O.PATH:return Gt(e,r,t);case O.ARRAY:return Tt(e,r,t);default:return Q().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}}};function Tt(e,r,t){const n=[],o=e.count();for(let i=0;i{const r=new Ke({url:e}),t=[];return t.push(q(r)),t.push(Ye(r)),await Promise.all(t),r},refreshDataModel:async e=>{e.dataModel=await Qe(e)},refreshServiceDefinition:async e=>{var t,n;const r=(await z(e.url,{query:{f:"json"}})).data;return r.capabilities=(t=r==null?void 0:r.capabilities)==null?void 0:t.split(","),r.supportedQueryFormats=(n=r==null?void 0:r.supportedQueryFormats)==null?void 0:n.split(","),e.serviceDefinition=new Ne(r),e.serviceDefinition},executeQueryStreaming:async(e,r,t)=>{var l;const n="include",o=`${e.url}/graph/query`;await ee(e);const i=await te(o,t);if(!((l=e.serviceDefinition)!=null&&l.supportsProvenance)&&r.provenanceBehavior===n)throw new d("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");i.data.body=await Ft(r,e);const p=await B(i.data.url,i.data);if(e.dataModel){const u=await Pe(p,e.dataModel);return new Ee({resultRowsStream:u.readableStream,resultHeader:u.resultHeader})}throw new d("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,r,t)=>{var i;if((i=e.serviceDefinition)!=null&&i.dataEditingNotSupported)throw new d("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await ee(e);const o=await te(n,t);return o.data.body=await $t(r,e),Nt(await B(o.data.url,o.data))},executeQuery:async(e,r,t)=>{var l;const n=`${e.url}/graph/query`,o=await z(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:r.openCypherQuery,...t==null?void 0:t.query},signal:t==null?void 0:t.signal,timeout:t==null?void 0:t.timeout}),i=(l=o.getHeader)==null?void 0:l.call(o,"content-type"),p=o.data;if(i!=null&&i.includes("application/x-protobuf")){const u=new(await x()).GraphQueryDecoder;if(u.deleteLater(),e.dataModel){const c=de(u,p,e.dataModel);return new Te({resultRows:c.resultRows,resultHeader:c.resultHeader})}throw new d("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new d("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:o.data})},executeSearch:async(e,r,t)=>{var u;const n=r.typeCategoryFilter,o=`${e.url}/graph/search`,i=await z(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${r.searchQuery}"`,typeCategoryFilter:n,...t==null?void 0:t.query},signal:t==null?void 0:t.signal,timeout:t==null?void 0:t.timeout}),p=(u=i.getHeader)==null?void 0:u.call(i,"content-type"),l=i.data;if(p!=null&&p.includes("application/x-protobuf")){const c=new(await x()).GraphQueryDecoder;if(c.deleteLater(),e.dataModel){const y=de(c,l,e.dataModel);return new Te({resultRows:y.resultRows,resultHeader:y.resultHeader})}throw new d("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new d("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:p,data:i.data})},executeSearchStreaming:async(e,r,t)=>{const n=`${e.url}/graph/search`;await ee(e);const o=await te(n,t);o.data.body=await Dt(r);const i=await B(o.data.url,o.data);if(e.dataModel){const p=await Pe(i,e.dataModel);return new Ee({resultRowsStream:p.readableStream,resultHeader:p.resultHeader})}throw new d("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,r)=>fetch(e,r)};async function Pt(e,r,t){return S.executeApplyEdits(e,r,t)}async function bt(e,r,t){return S.executeQuery(e,r,t)}async function xt(e,r,t){return S.executeQueryStreaming(e,r,t)}async function Mt(e,r,t){return S.executeSearch(e,r,t)}async function Ot(e,r,t){return S.executeSearchStreaming(e,r,t)}async function kt(e){return S.fetchKnowledgeGraph(e)}async function q(e){return S.refreshDataModel(e)}async function Ye(e){return S.refreshServiceDefinition(e)}async function B(e,r){return S._fetchWrapper(e,r)}async function ee(e){var t;((t=Be)==null?void 0:t.findCredential(e.url))||(e.dataModel?await Qe(e):await q(e))}function N(e,r,t){if(e.error_code!==0)throw new d(r,t,{errorCode:e.error_code,errorMessage:e.error_message})}function jt(e,r,t,n){r==null?t.set_param_key_value(e,""):typeof r!="object"||r instanceof Date?t.set_param_key_value(e,r):r instanceof ue?t.set_param_key_value(e,he(r,n)):Array.isArray(r)?t.set_param_key_value(e,Le(r,n)):t.set_param_key_value(e,Ae(r,n))}async function $t(e,r){var p,l,u,c,y,g,E,m,w;if(r.dataModel||await q(r),!r.dataModel)throw new d("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const t=await x(),n=!!((p=e.options)!=null&&p.cascadeDelete),o=new t.GraphApplyEditsEncoder(t.SpatialReferenceUtil.WGS84(),(l=e.options)!=null&&l.inputQuantizationParameters?ot((u=e.options)==null?void 0:u.inputQuantizationParameters):t.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let _;(c=e.entityAdds)==null||c.forEach(h=>{_=o.add_entity(Y(h,t)),N(_,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),(y=e.relationshipAdds)==null||y.forEach(h=>{if(!h.originId||!h.destinationId)throw new d("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");_=o.add_relationship(Y(h,t)),N(_,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),(g=e.entityUpdates)==null||g.forEach(h=>{if(!h.id)throw new d("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");_=o.update_entity(Y(h,t)),N(_,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),(E=e.relationshipUpdates)==null||E.forEach(h=>{if(!h.id)throw new d("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");_=o.update_relationship(Y(h,t)),N(_,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),(m=e.entityDeletes)==null||m.forEach(h=>{var D;if(!h.typeName)throw new d("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const R=o.make_delete_helper(h.typeName,!0);R.deleteLater(),(D=h.ids)==null||D.forEach(J=>{R.delete_by_id(J)})}),(w=e.relationshipDeletes)==null||w.forEach(h=>{var D;if(!h.typeName)throw new d("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const R=o.make_delete_helper(h.typeName,!1);(D=h.ids)==null||D.forEach(J=>{R.delete_by_id(J)})}),o.encode()}catch(_){throw new d("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:_})}const i=o.get_encoding_result();return N(i.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(i.get_byte_buffer())}async function Ft(e,r){var i,p;const t=await x(),n=new t.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=t.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[l,u]of Object.entries(e.bindParameters))jt(l,u,n,t);if(e.bindGeometryQuantizationParameters)Je(e.bindGeometryQuantizationParameters,n);else{if(r.dataModel||await q(r),((p=(i=r.dataModel)==null?void 0:i.spatialReference)==null?void 0:p.wkid)!==4326)throw new d("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=t.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&Xe(e.outputQuantizationParameters,n,t),e.provenanceBehavior&&et(e.provenanceBehavior,n);try{n.encode()}catch(l){throw new d("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:l})}const o=n.get_encoding_result();if(o.error.error_code!==0)throw new d("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}async function Dt(e){var o;const r=await x(),t=new r.GraphSearchRequestEncoder;if(t.deleteLater(),t.search_query=e.searchQuery,t.type_category_filter=r.esriNamedTypeCategory[e.typeCategoryFilter],e.returnSearchContext===!0&&(t.return_search_context=e.returnSearchContext),e.start!=null&&e.start>0&&(t.start_index=e.start),e.num!=null&&(t.max_num_results=e.num),e.idsFilter!=null&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{t.set_ids_filter(Le(e.idsFilter,r))}catch(i){throw new d("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:i})}(o=e.namedTypesFilter)==null||o.forEach(i=>{t.add_named_type_filter(i)});try{t.encode()}catch(i){throw new d("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:i})}const n=t.get_encoding_result();if(n.error.error_code!==0)throw new d("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}async function te(e,r){return z(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...r==null?void 0:r.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:r==null?void 0:r.signal,timeout:r==null?void 0:r.timeout})}async function Nt(e){const r=e.headers.get("content-type");if(r!=null&&r.includes("application/x-protobuf")){const t=await e.arrayBuffer(),n=new(await x()).GraphApplyEditsDecoder;return n.deleteLater(),n.decode(new Uint8Array(t)),St(n)}throw new d("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}function de(e,r,t,n){e.push_buffer(new Uint8Array(r));const o=[];let i,p,l=0;for(;e.next_row();){i&&p||(i=n??It(e),p=i.outSpatialReference??new U({wkid:4326})),l||(l=e.get_header_keys().size());const u=new Array(l);for(let c=0;c{l=g,u=E});let y=!1;return{readableStream:new ReadableStream({async start(g){try{return E()}catch(m){o==null||o.releaseLock(),g.error(new d("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:m})),g.close()}function E(){return o==null?void 0:o.read().then(({done:m,value:w})=>{try{if(m){let R;if(i.has_error()?R=new d("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:i.error.error_code,errorMessage:i.error.error_message}):y||l(new Z),o.releaseLock(),R)throw g.error(R),u(R),R;return void g.close()}const _=de(i,w,r,p),h=_.resultRows;return h.length>0&&g.enqueue(h),!p&&_.resultHeader&&(p=_.resultHeader,l(_.resultHeader),y=!0),E()}catch(_){throw re.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(_),u(_),new d("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:_})}})}}}),resultHeader:await c}}throw new d("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}async function Qe(e){var i;const r=`${e.url}/dataModel/queryDataModel`,t=await z(r,{responseType:"array-buffer",query:{f:"pbf"}}),n=(i=t.getHeader)==null?void 0:i.call(t,"content-type"),o=t.data;if(n!=null&&n.includes("application/x-protobuf")){const p=(await x()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!p)throw new d("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return at(p)}throw new d("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:t.data})}const Xt=Object.freeze(Object.defineProperty({__proto__:null,_fetchWrapper:B,executeApplyEdits:Pt,executeQuery:bt,executeQueryStreaming:xt,executeSearch:Mt,executeSearchStreaming:Ot,fetchKnowledgeGraph:kt,kgRestServices:S,refreshDataModel:q,refreshServiceDefinition:Ye},Symbol.toStringTag,{value:"Module"}));export{kt as R,xt as T,Xt as k,x as r}; diff --git a/build/assets/knowledgegraph-ptgt6-e4.js b/build/assets/knowledgegraph-ptgt6-e4.js new file mode 100644 index 0000000..ecdee4e --- /dev/null +++ b/build/assets/knowledgegraph-ptgt6-e4.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/knowledgeGraphService-BFNZ__DV.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/Relationship-DeeaK30J.js"])))=>i.map(i=>d[i]); +import{B as y,D as R,E as V,F as M,df as N,aH as G,fW as Q,U as $,C as T,_ as O,N as H,fY as L,fZ as B,cf as X,ay as W,S as Y,dg as b,fo as Z,fn as z}from"./index-DKOmzAMm.js";import{a as J,b as m,r as d,I as tt,m as D,G as v,am as et,P as rt,N as E,U as F,A as nt,E as q,X as j,w as at,v as ot,an as it,ao as A,ap as st}from"./arcadeUtils-BvZmzJL_.js";import{l as ft}from"./portalUtils-DDekVd1c.js";import{f as pt,i as ut}from"./utils-CF4bGKhW.js";import{o as lt}from"./utils-BCmi3vQB.js";import{s as ct,m as mt,t as dt,p as ht,c as gt}from"./Relationship-DeeaK30J.js";import"./TimeOnly-C2MfFEIr.js";import"./number-NXsKqxkQ.js";import"./featureConversionUtils-CCATessr.js";import"./OptimizedFeature-DDMKj8Vq.js";import"./OptimizedFeatureSet-Blu9Ckm7.js";let l=class extends M{constructor(t){super(t),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const t=this.geometries.map(o=>o.toJSON()),e=this.geometries[0],n={};return n.outSR=N(this.outSpatialReference),n.inSR=N(e.spatialReference),n.geometries=JSON.stringify({geometryType:G(e),geometries:t}),this.transformation&&(n.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),this.transformForward!=null&&(n.transformForward=this.transformForward),n}};y([R()],l.prototype,"geometries",void 0),y([R({json:{read:{source:"outSR"}}})],l.prototype,"outSpatialReference",void 0),y([R()],l.prototype,"transformation",void 0),y([R()],l.prototype,"transformForward",void 0),l=y([V("esri.rest.support.ProjectParameters")],l);const C=l,yt=Q(C);async function wt(t,e,n){e=yt(e);const o=pt(t),i={...o.query,f:"json",...e.toJSON()},r=e.outSpatialReference,a=G(e.geometries[0]),f=ut(i,n);return $(o.path+"/project",f).then(({data:{geometries:p}})=>lt(p,a,r))}let h=null;async function St(t){const e=H.geometryServiceUrl??"";if(!e){L()||await B();for(const r of t)r.container[r.indexer]=X(r.container[r.indexer],W.WGS84);return}const n=t.map(r=>r.container[r.indexer]),o=new C({geometries:n,outSpatialReference:W.WGS84}),i=await wt(e,o);for(let r=0;rimport("./knowledgeGraphService-BFNZ__DV.js").then(o=>o.k),__vite__mapDeps([0,1,2,3]))),await h.fetchKnowledgeGraph(n.url)}function P(t,e,n,o,i){if(t===null)return null;if(v(t)||q(t))return t;if(j(t)||j(t))return t.toJSDate();if(at(t))return t.toStorageFormat();if(ot(t))return t.toStorageString();if(it(t)){const r={};for(const a of t.keys())r[a]=P(t.field(a),e,n,o,i),r[a]instanceof b&&i.push({container:r,indexer:a});return r}if(F(t)){const r=t.map(a=>P(a,e,n,o,i));for(let a=0;aw(n,e)):t instanceof mt?{graphTypeName:t.typeName,id:t.id,graphType:"entity",properties:x(t.properties,e)}:t instanceof dt?{graphType:"object",properties:x(t.properties,e)}:t instanceof ht?{graphTypeName:t.typeName,id:t.id,graphType:"relationship",originId:t.originId??null,destinationId:t.destinationId??null,properties:x(t.properties,e)}:t instanceof gt?{graphType:"path",path:t.path?t.path.map(n=>w(n,e)):null}:A(t)?Rt(t,e):v(t)||q(t)||st(t)?t:null}function Dt(t){t.mode==="async"&&(t.functions.knowledgegraphbyportalitem=function(e,n){return t.standardFunctionAsync(e,n,(o,i,r)=>{var f,p;if(J(r,2,2,e,n),r[0]===null)throw new m(e,d.PortalRequired,n);if(r[0]instanceof tt){const c=D(r[1]);let g;return g=(f=e.services)!=null&&f.portal?e.services.portal:T.getDefault(),k(ft(r[0],g),c)}if(v(r[0])===!1)throw new m(e,d.InvalidParameter,n);const a=D(r[0]);return k(((p=e.services)==null?void 0:p.portal)??T.getDefault(),a)})},t.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),t.functions.querygraph=function(e,n){return t.standardFunctionAsync(e,n,async(o,i,r)=>{var I;J(r,2,4,e,n);const a=r[0];if(!et(a))throw new m(e,d.InvalidParameter,n);const f=r[1];if(!v(f))throw new m(e,d.InvalidParameter,n);h===null&&(h=await O(()=>import("./knowledgeGraphService-BFNZ__DV.js").then(s=>s.k),__vite__mapDeps([0,1,2,3])));let p=null;const c=rt(r[2],null);if(!(c instanceof E||c===null))throw new m(e,d.InvalidParameter,n);if(c){let s=[];p=P(c,!0,!1,e,s),s=s.filter(u=>!u.container[u.indexer].spatialReference.isWGS84),s.length>0&&await St(s)}const g=new ct({openCypherQuery:f,bindParameters:p});(((I=a==null?void 0:a.serviceDefinition)==null?void 0:I.currentVersion)??11.3)>11.2&&(g.outputSpatialReference=e.spatialReference);const K=(await h.executeQueryStreaming(a,g)).resultRowsStream.getReader(),_=[];try{for(;;){const{done:s,value:u}=await K.read();if(s)break;if(F(u))for(const S of u)_.push(w(S,e));else{const S=[];for(const U of u)S.push(w(u[U],e));_.push(S)}}}catch(s){throw s}return E.convertJsonToArcade(_,nt(e),!1,!0)})},t.signatures.push({name:"querygraph",min:2,max:4}))}export{Dt as registerFunctions}; diff --git a/build/assets/label-CXw43uCP.js b/build/assets/label-CXw43uCP.js new file mode 100644 index 0000000..cd29787 --- /dev/null +++ b/build/assets/label-CXw43uCP.js @@ -0,0 +1,5 @@ +import{i as k,c as m,q as w,a as y}from"./component-BUnDTGFH.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const h="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",L="calcite-label",c=new WeakMap,d=new WeakMap,b=new WeakMap,o=new WeakMap,s=new Set,M=e=>{const{id:t}=e,l=t&&w(e,{selector:`${L}[for="${t}"]`});if(l)return l;const a=y(e,L);return!a||D(a,e)?null:a};function D(e,t){let l;const a="custom-element-ancestor-check",i=n=>{n.stopImmediatePropagation();const r=n.composedPath();l=r.slice(r.indexOf(t),r.indexOf(e))};return e.addEventListener(a,i,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,i),l.filter(n=>n!==t&&n!==e).filter(n=>{var r;return(r=n.tagName)==null?void 0:r.includes("-")}).length>0}function v(e){if(!e)return;const t=M(e.el);if(d.has(t)&&t===e.labelEl||!t&&s.has(e))return;const l=x.bind(e);if(t){e.labelEl=t;const a=c.get(t)||[];a.push(e),c.set(t,a.sort(g)),d.has(e.labelEl)||(d.set(e.labelEl,C),e.labelEl.addEventListener(h,C)),s.delete(e),document.removeEventListener(E,b.get(e)),o.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,o.get(e)))}function I(e){if(!e||(s.delete(e),document.removeEventListener(E,b.get(e)),document.removeEventListener(f,o.get(e)),b.delete(e),o.delete(e),!e.labelEl))return;const t=c.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(h,d.get(e.labelEl)),d.delete(e.labelEl)),c.set(e.labelEl,t.filter(l=>l!==e).sort(g)),e.labelEl=null}function g(e,t){return k(e.el,t.el)?-1:1}function B(e){var t,l;return e.label||((l=(t=e.labelEl)==null?void 0:t.textContent)==null?void 0:l.trim())||""}function C(e){const t=e.detail.sourceEvent.target,l=c.get(this),a=l.find(n=>n.el===t);if(l.includes(a))return;const u=l[0];u.disabled||u.onLabelClick(e)}function O(){s.has(this)&&v(this)}function x(){s.add(this);const e=b.get(this)||O.bind(this);b.set(this,e),document.addEventListener(E,e)}async function W(e){var a;if(await m(e),c.has(e))return;const l=(a=e.ownerDocument)==null?void 0:a.getElementById(e.for);l&&requestAnimationFrame(()=>{for(const i of s)if(i.el===l){v(i);break}})}export{W as a,f as b,v as c,I as d,B as g,E as l}; diff --git a/build/assets/layersCreator-B7QnC6RR.js b/build/assets/layersCreator-B7QnC6RR.js new file mode 100644 index 0000000..f63260b --- /dev/null +++ b/build/assets/layersCreator-B7QnC6RR.js @@ -0,0 +1 @@ +import{t as M,S as I,a7 as A}from"./index-DKOmzAMm.js";import{d as b,e as v}from"./portalLayers-CSGJfvg_.js";import{a as n}from"./lazyLayerLoader-BkbwrjyD.js";import"./associatedFeatureServiceUtils-D9v5WjkL.js";function w(e){return u(e,"notes")}function h(e){return u(e,"markup")}function C(e){return u(e,"route")}function u(e,a){return!(!e.layerType||e.layerType!=="ArcGISFeatureLayer")&&e.featureCollectionType===a}async function F(e,a,r){if(!a)return;const t=a.map(y=>x(y,r)),i=await Promise.allSettled(t);for(const y of i)y.status==="rejected"||y.value&&e.add(y.value)}const W={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",Voxel:"VoxelLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},O={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},V={ArcGISFeatureLayer:"FeatureLayer"},k={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},g={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},T={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"UnsupportedLayer"},G={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},B={...g,LinkChartLayer:"LinkChartLayer"},D={...T},U={...G};async function x(e,a){return E(await R(e,a),e,a)}async function E(e,a,r){const t=new e;return t.read(a,r.context),t.type==="group"&&(a.layerType==="GroupLayer"?await N(t,a,r):S(a)?J(t,a,r.context):f(a)&&await P(t,a,r.context)),await M(t,r.context),t}async function R(e,a){var c,o;const r=a.context,t=K(r);let i=e.layerType||e.type;!i&&(a!=null&&a.defaultLayerType)&&(i=a.defaultLayerType);const y=t[i];let L=y?n[y]:n.UnknownLayer;if(S(e)){const s=r==null?void 0:r.portal;if(e.itemId){const l=new I({id:e.itemId,portal:s});await l.load();const p=(await b(l,new v)).className||"UnknownLayer";L=n[p]}}else i==="ArcGISFeatureLayer"?w(e)||h(e)?L=n.MapNotesLayer:C(e)?L=n.RouteLayer:f(e)&&(L=n.GroupLayer):(c=e.wmtsInfo)!=null&&c.url&&e.wmtsInfo.layerIdentifier?L=n.WMTSLayer:i==="WFS"&&((o=e.wfsInfo)==null?void 0:o.version)!=="2.0.0"&&(L=n.UnsupportedLayer);return L()}function f(e){var a,r;return e.layerType!=="ArcGISFeatureLayer"||S(e)?!1:(((r=(a=e.featureCollection)==null?void 0:a.layers)==null?void 0:r.length)??0)>1}function S(e){return e.type==="Feature Collection"}function K(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=k;break;case"ground":a=O;break;case"tables":a=V;break;default:a=W}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=U;break;case"tables":a=D;break;default:a=B}break;default:switch(e.layerContainerType){case"basemap":a=G;break;case"tables":a=T;break;default:a=g}}return a}async function N(e,a,r){const t=new A,i=F(t,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,e.type==="group")return e.layers.addMany(t),e}catch(y){e.destroy();for(const L of t)L.destroy();throw y}}catch(y){throw y}}function J(e,a,r){a.itemId&&(e.portalItem=new I({id:a.itemId,portal:r==null?void 0:r.portal}),e.when(()=>{var i,y;const t=L=>{var s,l;const c=L.layerId;m(L,e,a,c,r);const o=(l=(s=a.featureCollection)==null?void 0:s.layers)==null?void 0:l[c];o&&L.read(o,r)};(i=e.layers)==null||i.forEach(t),(y=e.tables)==null||y.forEach(t)}))}async function P(e,a,r){var o;const t=n.FeatureLayer,i=await t(),y=a.featureCollection,L=y==null?void 0:y.showLegend,c=(o=y==null?void 0:y.layers)==null?void 0:o.map((s,l)=>{const p=new i;p.read(s,r);const d={...r,ignoreDefaults:!0};return m(p,e,a,l,d),L!=null&&p.read({showLegend:L},d),p});e.layers.addMany(c??[])}function m(e,a,r,t,i){var y;e.read({id:`${a.id}-sublayer-${t}`,visibility:((y=r.visibleLayers)==null?void 0:y.includes(t))??!0},i)}export{N as populateGroupLayer,F as populateOperationalLayers}; diff --git a/build/assets/layersLoader-7Bk9G4Kh.js b/build/assets/layersLoader-7Bk9G4Kh.js new file mode 100644 index 0000000..60c0ea9 --- /dev/null +++ b/build/assets/layersLoader-7Bk9G4Kh.js @@ -0,0 +1 @@ +import{s as y,t as T,m as L,C as v,d as F}from"./index-DKOmzAMm.js";import{b as M,a as P,t as G}from"./lazyLayerLoader-BkbwrjyD.js";import{s as d,a as x,o as C,u as w,t as f,c as D,n as $,i as k,e as h}from"./portalLayers-CSGJfvg_.js";import{populateGroupLayer as E}from"./layersCreator-B7QnC6RR.js";import{e as I}from"./jsonContext-SE-5k22x.js";import"./associatedFeatureServiceUtils-D9v5WjkL.js";async function _(a,r){const t=a.instance.portalItem;if(t!=null&&t.id)return await t.load(r),j(a),a.validateItem&&a.validateItem(t),A(a,r)}function j(a){const r=a.instance.portalItem;if(!(r!=null&&r.type)||!a.supportedTypes.includes(r.type))throw new y("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r==null?void 0:r.type,expectedType:a.supportedTypes.join(", ")})}async function A(a,r){const t=a.instance,e=t.portalItem;if(!e)return;const{url:i,title:n}=e,l=I(e,"portal-item");if(t.type==="group")return O(t,l,a);i&&t.type!=="media"&&t.read({url:i},l);const o=new h,s=await b(a,o,r);return s&&t.read(s,l),t.resourceReferences={portalItem:e,paths:l.readResourcePaths??[]},t.type!=="subtype-group"&&t.read({title:n},l),T(t,l)}async function O(a,r,t){const e=a.portalItem;if(!a.sourceIsPortalItem)return;const{title:i,type:n}=e;if(n==="Group Layer"){if(!L(e,"Map"))throw new y("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return R(a)}return a.read({title:i},r),J(a,t)}async function R(a){const r=a.portalItem,t=await r.fetchData("json");if(!t)return;const e=I(r,"web-map");a.read(t,e),await E(a,t,{context:e}),a.resourceReferences={portalItem:r,paths:e.readResourcePaths??[]}}async function J(a,r){var u;let t;const{portalItem:e}=a;if(!e)return;const i=e.type,n=r.layerModuleTypeMap;switch(i){case"Feature Service":case"Feature Collection":t=n.FeatureLayer;break;case"Stream Service":t=n.StreamLayer;break;case"Scene Service":t=n.SceneLayer;break;default:throw new y("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}const l=new h;let[o,s]=await Promise.all([t(),b(r,l)]),c=()=>o;if(i==="Feature Service"){const g=(u=d(s))==null?void 0:u.customParameters;s=e.url?await x(s,e.url,l):{},c=await Q(s,n)||c;const S=await K(e.url,{customParameters:g,loadContext:l});return await p(a,c,s,S)}return i==="Scene Service"&&e.url&&(s=await C(e,s,l)),w(s)>0?await p(a,c,s):await N(a,c)}async function N(a,r){var i,n;const{portalItem:t}=a;if(!(t!=null&&t.url))return;const e=await M(t.url);e&&p(a,r,{layers:(i=e.layers)==null?void 0:i.map(f),tables:(n=e.tables)==null?void 0:n.map(f)})}async function p(a,r,t,e){var l;let i=t.layers||[];const n=t.tables||[];if(((l=a.portalItem)==null?void 0:l.type)==="Feature Collection"?(i.forEach((o,s)=>{var c;o.id=s,((c=o==null?void 0:o.layerDefinition)==null?void 0:c.type)==="Table"&&n.push(o)}),i=i.filter(o=>{var s;return((s=o==null?void 0:o.layerDefinition)==null?void 0:s.type)!=="Table"})):(i.reverse(),n.reverse()),i.forEach(o=>{const s=e==null?void 0:e(o);if(s||!e){const c=m(a,r(o),t,o,s);a.add(c)}}),n.length){const o=await P.FeatureLayer();n.forEach(s=>{const c=e==null?void 0:e(s);if(c||!e){const u=m(a,o,t,s,c);a.tables.add(u)}})}}function m(a,r,t,e,i){const n=a.portalItem,l={portalItem:n.clone(),layerId:e.id};e.url!=null&&(l.url=e.url);const o=new r(l);if("sourceJSON"in o&&(o.sourceJSON=i),o.type!=="subtype-group"&&o.type!=="catalog"&&(o.sublayerTitleMode="service-name"),n.type==="Feature Collection"){const s={origin:"portal-item",portal:n.portal||v.getDefault()};o.read(e,s);const c=t.showLegend;c!=null&&o.read({showLegend:c},s)}return o}async function b(a,r,t){if(a.supportsData===!1)return;const e=a.instance,i=e.portalItem;if(!i)return;let n=null;try{n=await i.fetchData("json",t)}catch{}if(B(e)){let l=null;const o=await q(i,n,r);if((n!=null&&n.layers||n!=null&&n.tables)&&o>0){if(e.layerId==null){const s=D(e.type),c=s?$(n,s)[0]:d(n);c&&(e.layerId=c.id)}l=z(n,e),(l==null?void 0:l.layerType)==="OrientedImageryLayer"&&e.type==="oriented-imagery"&&e.supportedSourceTypes.add("Feature Layer"),l&&n.showLegend!=null&&(l.showLegend=n.showLegend)}return o>1&&"sublayerTitleMode"in e&&e.sublayerTitleMode!=="service-name"&&(e.sublayerTitleMode="item-title-and-service-name"),l}return n}async function q(a,r,t){var n,l,o,s,c;if(r!=null&&r.layers&&(r!=null&&r.tables))return w(r);const e=F(a.url);if(!e)return 1;const i=await t.fetchServiceMetadata(e.url.path,{customParameters:(n=d(r))==null?void 0:n.customParameters}).catch(()=>null);return(((l=r==null?void 0:r.layers)==null?void 0:l.length)??((o=i==null?void 0:i.layers)==null?void 0:o.length)??0)+(((s=r==null?void 0:r.tables)==null?void 0:s.length)??((c=i==null?void 0:i.tables)==null?void 0:c.length)??0)}function z(a,r){var i,n;const{layerId:t}=r,e=((i=a.layers)==null?void 0:i.find(l=>l.id===t))||((n=a.tables)==null?void 0:n.find(l=>l.id===t));return e&&H(e,r)?e:null}function B(a){return a.type!=="stream"&&"layerId"in a}function H(a,r){const t="layerType"in a&&a.layerType,{type:e}=r;return!(e==="feature"&&t&&a.layerType!=="ArcGISFeatureLayer"||e==="catalog"&&!t||e==="oriented-imagery"&&!t||e==="subtype-group"&&!t)}async function K(a,r){const{layersJSON:t}=await G(a,r);if(!t)return null;const e=[...t.layers,...t.tables];return i=>e.find(n=>n.id===i.id)}async function Q(a,r){const{layers:t}=a;if(!(t!=null&&t.length))return;const e=new Set,i=[];for(const{layerType:o}of t){const s=o??"ArcGISFeatureLayer";if(e.has(s))continue;e.add(s);const c=r[k(s)];i.push(c())}const n=await Promise.all(i),l=new Map;return Array.from(e).forEach((o,s)=>{l.set(o,n[s])}),({layerType:o})=>{const s=o??"ArcGISFeatureLayer";return l.get(s)}}export{_ as load}; diff --git a/build/assets/lazyLayerLoader-BkbwrjyD.js b/build/assets/lazyLayerLoader-BkbwrjyD.js new file mode 100644 index 0000000..1a63e5a --- /dev/null +++ b/build/assets/lazyLayerLoader-BkbwrjyD.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BingMapsLayer-BKYZg17f.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css","assets/imageBitmapUtils-kF4U_Pyx.js","assets/TileInfo-Bx6eEWV4.js","assets/BuildingSceneLayer-BBmWR18K.js","assets/CollectionFlattener-BmCRFqHz.js","assets/loadAll-Cm5pWAv4.js","assets/popupUtils-CqjLs0mf.js","assets/SceneService-7YqMMGL5.js","assets/originUtils-D69mHv66.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/jsonContext-SE-5k22x.js","assets/resourceUtils-CwAv7wd8.js","assets/resourceUtils-Cz4P0EKM.js","assets/saveAPIKeyUtils-CqAN5-r5.js","assets/saveUtils-oCA1ZjYH.js","assets/I3SLayerDefinitions-CR4J5n7u.js","assets/I3SUtil-7z-2YOel.js","assets/mat4f64-CSKppSlJ.js","assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js","assets/sphere-DoGSV0K5.js","assets/plane-aHrUkISy.js","assets/mat3f64-q3fE-ZOt.js","assets/quatf64-Bdb9ZJJK.js","assets/vec2f64-DA6GkJuH.js","assets/I3SBinaryReader-BNZLVsC-.js","assets/VertexAttribute-BlT9lbVY.js","assets/NormalAttribute.glsl-DMc-kXcx.js","assets/BindType-BmZEZMMh.js","assets/orientedBoundingBox-RPlI7sU4.js","assets/mat3-BNGRf_pC.js","assets/quat-BYKy26Om.js","assets/computeTranslationToOriginAndRotation-BxPeFPaY.js","assets/associatedFeatureServiceUtils-D9v5WjkL.js","assets/elevationInfoUtils-CU9w6KS3.js","assets/CSVLayer-BfiE75hl.js","assets/clientSideDefaults-B7fGShzo.js","assets/QueryEngineCapabilities-CTDe3LlQ.js","assets/CatalogLayer-DXuB0ilj.js","assets/ReactiveMap-C7QHrros.js","assets/signal-swyOrDkM.js","assets/utils-C0Bk6fkM.js","assets/ClassBreaksDefinition-yZL3mlhg.js","assets/FeatureLayerSource-DHybgE9g.js","assets/MeshLocalVertexSpace-CZ-FLKyC.js","assets/meshVertexSpaceUtils-CMKdridq.js","assets/MeshTransform-CnKLNqg-.js","assets/infoFor3D-DsOdlPuA.js","assets/editingSupport-BRaaDEoU.js","assets/normalizeUtils-DIcj7CYy.js","assets/normalizeUtilsCommon-BatUY1sD.js","assets/utils-CF4bGKhW.js","assets/utils-BCmi3vQB.js","assets/QueryTask-CH4nGmOK.js","assets/executeQueryJSON-CCbDrFwh.js","assets/query-CQvaiR4K.js","assets/pbfQueryUtils-D2YxxSfN.js","assets/pbf-DwSF5Y_G.js","assets/OptimizedFeature-DDMKj8Vq.js","assets/OptimizedFeatureSet-Blu9Ckm7.js","assets/executeQueryPBF-B-eLVWOv.js","assets/featureConversionUtils-CCATessr.js","assets/DimensionLayer-BzXgFFMi.js","assets/Analysis-Bm3a7MSr.js","assets/Cyclical-CyXrdUt3.js","assets/ElevationLayer-CJdvBfQg.js","assets/ArcGISCachedService-B90n8xUT.js","assets/TileInfoTilemapCache-jg1X3Y95.js","assets/TilemapCache-6mrSWCBj.js","assets/ByteSizeUnit-BsxeN7wM.js","assets/GeoJSONLayer-R05rpObK.js","assets/GeoRSSLayer-BIhNdXpJ.js","assets/GroupLayer-zAHBnafB.js","assets/writeUtils-VdcK5efY.js","assets/ImageryLayer-DADgS6XG.js","assets/fetchRasterInfo-DWSe3scC.js","assets/dataUtils-DYQC_Kql.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/AttachmentInfo-CQ7iJxR0.js","assets/ImageryTileLayer-CuBqAg13.js","assets/PolynomialTransform-BIabQn8W.js","assets/QueueProcessor-DTdXzd4o.js","assets/IntegratedMesh3DTilesLayer-BSaTkEOZ.js","assets/IntegratedMeshLayer-BnVFVJDl.js","assets/persistable-DLZFVdWR.js","assets/resourceExtension-D3awQbhZ.js","assets/KMLLayer-BeRWcV6T.js","assets/KnowledgeGraphLayer-Ddel9E7F.js","assets/KnowledgeGraphSublayer-vp2dcEj_.js","assets/FeatureStore-C3siChbH.js","assets/BoundsStore-BShGRkMU.js","assets/PooledRBush-CdrRkOdh.js","assets/quickselect-D0_cvEX6.js","assets/QueryEngine-CI3mggax.js","assets/WhereClause-CILeHwR9.js","assets/TimeOnly-C2MfFEIr.js","assets/json-Wa8cmqdu.js","assets/utils-CqM6vUbj.js","assets/Basemap-drllXW5h.js","assets/knowledgeGraphService-BFNZ__DV.js","assets/Relationship-DeeaK30J.js","assets/LineOfSightLayer-Cn-2S3uI.js","assets/LinkChartLayer-BBNWdA8U.js","assets/MapImageLayer-BK7gkoyE.js","assets/scaleUtils-BN5HVCVS.js","assets/SublayersOwner-Ez_yHYvH.js","assets/MapNotesLayer-2ZcBqOZC.js","assets/objectIdUtils-4dd1rf9p.js","assets/MediaLayer-B4vgm461.js","assets/vec2-CurFBDJu.js","assets/imageUtils-D81CeaJ0.js","assets/OGCFeatureLayer-DI9u24Dw.js","assets/ogcFeatureUtils-CuyMjEno.js","assets/geojson-BRJeQduY.js","assets/date-M6n_RqpC.js","assets/sourceUtils-DYgU-2mb.js","assets/OpenStreetMapLayer-C6iOFUlM.js","assets/WebTileLayer-DDbix1qe.js","assets/OrientedImageryLayer-DsKvJ25C.js","assets/PointCloudLayer-Dz6tFPWc.js","assets/PointCloudUniqueValueRenderer-D8kmwCRw.js","assets/RouteLayer-BKU_ddZR.js","assets/SceneLayer-D_5ycsDz.js","assets/Mesh-DkA8R2dF.js","assets/MeshVertexAttributes-CfiMg9vN.js","assets/earcut-BqgeR2O3.js","assets/DoubleArray-D2IDWC15.js","assets/Indices-BhOjxL0t.js","assets/deduplicate-B_YKqNj1.js","assets/projection-Ch_noS-l.js","assets/BufferView-DOhKdt-N.js","assets/vec3-C6eb5QY9.js","assets/vec4-n1PBj5SL.js","assets/vertexSpaceConversion-DdxiyRap.js","assets/uploadAssetErrors-Bg66aMSE.js","assets/StreamLayer-BnhoAY1J.js","assets/SubtypeGroupLayer-BasPes06.js","assets/TileLayer-BehC5UCA.js","assets/UnknownLayer-CpgQZHrw.js","assets/UnsupportedLayer-rrpNacvj.js","assets/VectorTileLayer-DyRSiboc.js","assets/TileKey-D9UF-PsB.js","assets/StyleRepository-B96C0kSY.js","assets/GeometryUtils-6Cd4d7Hy.js","assets/enums-CxXC-vJk.js","assets/VertexElementDescriptor-BOD-G50G.js","assets/VideoLayer-BjkoUYhL.js","assets/VoxelLayer-UbXb4Bne.js","assets/WFSLayer-DRIJxC7T.js","assets/wfsUtils-tW6kf0DT.js","assets/xmlUtils-CtUoQO7q.js","assets/WMSLayer-PlT1pQfO.js","assets/crsUtils-DAndLU68.js","assets/WMTSLayer-QqTxuCKI.js"])))=>i.map(i=>d[i]); +import{U as o,_ as a}from"./index-DKOmzAMm.js";async function l(t,e){const{data:_}=await o(t,{responseType:"json",query:{f:"json",...e==null?void 0:e.customParameters,token:e==null?void 0:e.apiKey}});return _}const c=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function p(t,e){const{loadContext:_,...r}=e||{},u=_?await _.fetchServiceMetadata(t,r):await l(t,r);s(u),f(u);const n={serviceJSON:u};if((u.currentVersion??0)<10.5)return n;const d=`${t}/layers`,i=_?await _.fetchServiceMetadata(d,r):await l(d,r);return s(i),f(i),n.layersJSON={layers:i.layers,tables:i.tables},n}function y(t){const{type:e}=t;return!!e&&c.has(e)}function L(t){return t.type==="Table"}function f(t){var e,_;t.layers=(e=t.layers)==null?void 0:e.filter(y),t.tables=(_=t.tables)==null?void 0:_.filter(L)}function w(t){t.type||(t.type="Feature Layer")}function v(t){t.type||(t.type="Table")}function s(t){var e,_;(e=t.layers)==null||e.forEach(w),(_=t.tables)==null||_.forEach(v)}function m(t){switch(t){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}const O={BingMapsLayer:async()=>(await a(async()=>{const{default:t}=await import("./BingMapsLayer-BKYZg17f.js");return{default:t}},__vite__mapDeps([0,1,2,3,4]))).default,BuildingSceneLayer:async()=>(await a(async()=>{const{default:t}=await import("./BuildingSceneLayer-BBmWR18K.js");return{default:t}},__vite__mapDeps([5,1,2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]))).default,CSVLayer:async()=>(await a(async()=>{const{default:t}=await import("./CSVLayer-BfiE75hl.js");return{default:t}},__vite__mapDeps([36,1,2,37,38]))).default,CatalogLayer:async()=>(await a(async()=>{const{default:t}=await import("./CatalogLayer-DXuB0ilj.js");return{default:t}},__vite__mapDeps([39,1,2,40,41,42,43,44,45,46,47,48,19,32,23,24,49,50,51,52,53,37,38,54,55,56,57,58,59,60,61,62]))).default,DimensionLayer:async()=>(await a(async()=>{const{default:t}=await import("./DimensionLayer-BzXgFFMi.js");return{default:t}},__vite__mapDeps([63,1,2,64,65]))).default,ElevationLayer:async()=>(await a(async()=>{const{default:t}=await import("./ElevationLayer-CJdvBfQg.js");return{default:t}},__vite__mapDeps([66,1,2,67,4,68,69,70]))).default,FeatureLayer:async()=>(await a(async()=>{const{default:t}=await import("./index-DKOmzAMm.js").then(e=>e.k7);return{default:t}},__vite__mapDeps([1,2]))).default,GeoJSONLayer:async()=>(await a(async()=>{const{default:t}=await import("./GeoJSONLayer-R05rpObK.js");return{default:t}},__vite__mapDeps([71,1,2,37,38]))).default,GeoRSSLayer:async()=>(await a(async()=>{const{default:t}=await import("./GeoRSSLayer-BIhNdXpJ.js");return{default:t}},__vite__mapDeps([72,1,2]))).default,GroupLayer:async()=>(await a(async()=>{const{default:t}=await import("./GroupLayer-zAHBnafB.js");return{default:t}},__vite__mapDeps([73,1,2,6,7,16,74]))).default,ImageryLayer:async()=>(await a(async()=>{const{default:t}=await import("./ImageryLayer-DADgS6XG.js");return{default:t}},__vite__mapDeps([75,1,2,76,77,78,50,51,52,53,43,3,55,56,57,58,59,60,79]))).default,ImageryTileLayer:async()=>(await a(async()=>{const{default:t}=await import("./ImageryTileLayer-CuBqAg13.js");return{default:t}},__vite__mapDeps([80,1,2,76,77,78,50,51,52,53,43,4,81,82,40,41,69,70]))).default,IntegratedMesh3DTilesLayer:async()=>(await a(async()=>{const{default:t}=await import("./IntegratedMesh3DTilesLayer-BSaTkEOZ.js");return{default:t}},__vite__mapDeps([83,1,2,35]))).default,IntegratedMeshLayer:async()=>(await a(async()=>{const{default:t}=await import("./IntegratedMeshLayer-BnVFVJDl.js");return{default:t}},__vite__mapDeps([84,1,2,85,11,86,9,10,12,13,14,15,16,17,35]))).default,KMLLayer:async()=>(await a(async()=>{const{default:t}=await import("./KMLLayer-BeRWcV6T.js");return{default:t}},__vite__mapDeps([87,1,2,6]))).default,KnowledgeGraphLayer:async()=>(await a(async()=>{const{default:t}=await import("./KnowledgeGraphLayer-Ddel9E7F.js");return{default:t}},__vite__mapDeps([88,1,2,89,90,62,59,60,91,92,93,78,94,50,51,52,53,95,96,97,38,98,99,7,74,42,43,41,37,100,101]))).default,LineOfSightLayer:async()=>(await a(async()=>{const{default:t}=await import("./LineOfSightLayer-Cn-2S3uI.js");return{default:t}},__vite__mapDeps([102,1,2,64,85,11,86,35]))).default,LinkChartLayer:async()=>(await a(async()=>{const{default:t}=await import("./LinkChartLayer-BBNWdA8U.js");return{default:t}},__vite__mapDeps([103,1,2,62,59,60,89,90,91,92,93,78,94,50,51,52,53,95,96,97,38,98,99,7,74,42,43,41,37,100,101]))).default,MapImageLayer:async()=>(await a(async()=>{const{default:t}=await import("./MapImageLayer-BK7gkoyE.js");return{default:t}},__vite__mapDeps([104,1,2,7,105,106,6,54,48,52,55,56,50,51,53,57,58,59,60,61,62,3]))).default,MapNotesLayer:async()=>(await a(async()=>{const{default:t}=await import("./MapNotesLayer-2ZcBqOZC.js");return{default:t}},__vite__mapDeps([107,1,2,50,51,52,53,108]))).default,MediaLayer:async()=>(await a(async()=>{const{default:t}=await import("./MediaLayer-B4vgm461.js");return{default:t}},__vite__mapDeps([109,1,2,31,23,110,25,111,86,91,92,93,78,51]))).default,OGCFeatureLayer:async()=>(await a(async()=>{const{default:t}=await import("./OGCFeatureLayer-DI9u24Dw.js");return{default:t}},__vite__mapDeps([112,1,2,113,62,59,60,114,115,37,38,116]))).default,OpenStreetMapLayer:async()=>(await a(async()=>{const{default:t}=await import("./OpenStreetMapLayer-C6iOFUlM.js");return{default:t}},__vite__mapDeps([117,1,2,118,3,4]))).default,OrientedImageryLayer:async()=>(await a(async()=>{const{default:t}=await import("./OrientedImageryLayer-DsKvJ25C.js");return{default:t}},__vite__mapDeps([119,1,2]))).default,PointCloudLayer:async()=>(await a(async()=>{const{default:t}=await import("./PointCloudLayer-Dz6tFPWc.js");return{default:t}},__vite__mapDeps([120,1,2,9,10,11,12,13,14,15,16,121,35]))).default,RouteLayer:async()=>(await a(async()=>{const{default:t}=await import("./RouteLayer-BKU_ddZR.js");return{default:t}},__vite__mapDeps([122,1,2,10,11,52,50,51,53]))).default,SceneLayer:async()=>(await a(async()=>{const{default:t}=await import("./SceneLayer-D_5ycsDz.js");return{default:t}},__vite__mapDeps([123,1,2,124,47,48,19,32,23,24,111,125,45,46,126,78,127,128,22,25,129,130,31,20,33,131,110,132,133,134,135,9,10,11,12,13,14,15,16,34,8,17,85,86,35,18,21,26,27,28,29,30]))).default,StreamLayer:async()=>(await a(async()=>{const{default:t}=await import("./StreamLayer-BnhoAY1J.js");return{default:t}},__vite__mapDeps([136,1,2]))).default,SubtypeGroupLayer:async()=>(await a(async()=>{const{default:t}=await import("./SubtypeGroupLayer-BasPes06.js");return{default:t}},__vite__mapDeps([137,1,2,7]))).default,TileLayer:async()=>(await a(async()=>{const{default:t}=await import("./TileLayer-BehC5UCA.js");return{default:t}},__vite__mapDeps([138,1,2,7,67,4,68,69,70,106,6,54,48,52,55,56,50,51,53,57,58,59,60,61,62,3]))).default,UnknownLayer:async()=>(await a(async()=>{const{default:t}=await import("./UnknownLayer-CpgQZHrw.js");return{default:t}},__vite__mapDeps([139,1,2]))).default,UnsupportedLayer:async()=>(await a(async()=>{const{default:t}=await import("./UnsupportedLayer-rrpNacvj.js");return{default:t}},__vite__mapDeps([140,1,2]))).default,VectorTileLayer:async()=>(await a(async()=>{const{default:t}=await import("./VectorTileLayer-DyRSiboc.js");return{default:t}},__vite__mapDeps([141,1,2,67,4,68,69,70,142,12,143,144,145,146]))).default,VideoLayer:async()=>(await a(async()=>{const{default:t}=await import("./VideoLayer-BjkoUYhL.js");return{default:t}},__vite__mapDeps([147,1,2,23,31,20,78]))).default,VoxelLayer:async()=>(await a(async()=>{const{default:t}=await import("./VoxelLayer-UbXb4Bne.js");return{default:t}},__vite__mapDeps([148,1,2,9,10,11,12,13,14,15,16,65,85,86,32,23,24]))).default,WFSLayer:async()=>(await a(async()=>{const{default:t}=await import("./WFSLayer-DRIJxC7T.js");return{default:t}},__vite__mapDeps([149,1,2,37,38,150,114,115,59,151]))).default,WMSLayer:async()=>(await a(async()=>{const{default:t}=await import("./WMSLayer-PlT1pQfO.js");return{default:t}},__vite__mapDeps([152,1,2,6,105,153,3]))).default,WMTSLayer:async()=>(await a(async()=>{const{default:t}=await import("./WMTSLayer-QqTxuCKI.js");return{default:t}},__vite__mapDeps([154,1,2,118,3,4,68,153,151]))).default,WebTileLayer:async()=>(await a(async()=>{const{default:t}=await import("./WebTileLayer-DDbix1qe.js").then(e=>e.W);return{default:t}},__vite__mapDeps([118,1,2,3,4]))).default};export{O as a,l as b,m as i,p as t}; diff --git a/build/assets/lclayout-CDvAJV0i.js b/build/assets/lclayout-CDvAJV0i.js new file mode 100644 index 0000000..80ec29e --- /dev/null +++ b/build/assets/lclayout-CDvAJV0i.js @@ -0,0 +1,3 @@ +import{o as Yt}from"./_commonjsHelpers-DCkdB7M8.js";var Ke,he,Qe,er={exports:{}},Ze;Ke=er,he=typeof document<"u"?(Ze=document.currentScript)==null?void 0:Ze.src:void 0,Qe=function(rr={}){var me,G,i=Object.assign({},rr),tr=new Promise((e,r)=>{me=e,G=r}),nr=!0,ve=Object.assign({},i),pe="./this.program",D="";function ar(e){return i.locateFile?i.locateFile(e,D):D+e}typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),he&&(D=he),D=D.startsWith("blob:")?"":D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1),i.print||console.log.bind(console);var V,J,U=i.printErr||console.error.bind(console);Object.assign(i,ve),ve=null,i.arguments&&i.arguments,i.thisProgram&&(pe=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(V=i.wasmBinary);var P,_,H,Y,g,v,ye,ge,we=!1;function _e(){var e=J.buffer;i.HEAP8=P=new Int8Array(e),i.HEAP16=H=new Int16Array(e),i.HEAPU8=_=new Uint8Array(e),i.HEAPU16=Y=new Uint16Array(e),i.HEAP32=g=new Int32Array(e),i.HEAPU32=v=new Uint32Array(e),i.HEAPF32=ye=new Float32Array(e),i.HEAPF64=ge=new Float64Array(e)}var be=[],Ae=[],Te=[];function or(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)sr(i.preRun.shift());ae(be)}function ir(){ae(Ae)}function ur(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)cr(i.postRun.shift());ae(Te)}function sr(e){be.unshift(e)}function lr(e){Ae.unshift(e)}function cr(e){Te.unshift(e)}var x=0,B=null;function fr(e){var r;x++,(r=i.monitorRunDependencies)==null||r.call(i,x)}function dr(e){var t;if(x--,(t=i.monitorRunDependencies)==null||t.call(i,x),x==0&&B){var r=B;B=null,r()}}function Ce(e){var t;(t=i.onAbort)==null||t.call(i,e),U(e="Aborted("+e+")"),we=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw G(r),r}var z,hr="data:application/octet-stream;base64,",Fe=e=>e.startsWith(hr);function Pe(e){if(e==z&&V)return new Uint8Array(V);throw"both async and sync fetching of the wasm failed"}function mr(e){return!V&&nr&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(r=>{if(!r.ok)throw`failed to load wasm binary file at '${e}'`;return r.arrayBuffer()}).catch(()=>Pe(e)):Promise.resolve().then(()=>Pe(e))}function We(e,r,t){return mr(e).then(n=>WebAssembly.instantiate(n,r)).then(t,n=>{U(`failed to asynchronously prepare wasm: ${n}`),Ce(n)})}function vr(e,r,t,n){return e||typeof WebAssembly.instantiateStreaming!="function"||Fe(r)||typeof fetch!="function"?We(r,t,n):fetch(r,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,t).then(n,function(o){return U(`wasm streaming compile failed: ${o}`),U("falling back to ArrayBuffer instantiation"),We(r,t,n)}))}function pr(){return{a:Vt}}function yr(){var e=pr();function r(n,a){return F=n.exports,J=F.M,_e(),Re=F.P,lr(F.N),dr(),F}function t(n){r(n.instance)}if(fr(),i.instantiateWasm)try{return i.instantiateWasm(e,r)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),G(n)}return vr(V,z,e,t).catch(G),{}}Fe(z="lclayout.wasm")||(z=ar(z));var ae=e=>{for(;e.length>0;)e.shift()(i)};i.noExitRuntime;class gr{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){v[this.ptr+4>>2]=r}get_type(){return v[this.ptr+4>>2]}set_destructor(r){v[this.ptr+8>>2]=r}get_destructor(){return v[this.ptr+8>>2]}set_caught(r){r=r?1:0,P[this.ptr+12]=r}get_caught(){return P[this.ptr+12]!=0}set_rethrown(r){r=r?1:0,P[this.ptr+13]=r}get_rethrown(){return P[this.ptr+13]!=0}init(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t)}set_adjusted_ptr(r){v[this.ptr+16>>2]=r}get_adjusted_ptr(){return v[this.ptr+16>>2]}get_exception_ptr(){if(Le(this.get_type()))return v[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var wr=(e,r,t)=>{throw new gr(e).init(r,t),e},L={},oe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function X(e){return this.fromWireType(v[e>>2])}var Ee,Se,$e,I={},k={},K={},Oe=e=>{throw new Ee(e)},ie=(e,r,t)=>{function n(u){var c=t(u);c.length!==e.length&&Oe("Mismatched type converter count");for(var f=0;f{k.hasOwnProperty(u)?a[c]=k[u]:(o.push(u),I.hasOwnProperty(u)||(I[u]=[]),I[u].push(()=>{a[c]=k[u],++l===o.length&&n(a)}))}),o.length===0&&n(a)},_r=e=>{var r=L[e];delete L[e];var t=r.rawConstructor,n=r.rawDestructor,a=r.fields,o=a.map(l=>l.getterReturnType).concat(a.map(l=>l.setterArgumentType));ie([e],o,l=>{var u={};return a.forEach((c,f)=>{var h=c.fieldName,p=l[f],m=c.getter,y=c.getterContext,S=l[f+a.length],R=c.setter,W=c.setterContext;u[h]={read:M=>p.fromWireType(m(y,M)),write:(M,s)=>{var d=[];R(W,M,S.toWireType(d,s)),oe(d)}}}),[{name:r.name,fromWireType:c=>{var f={};for(var h in u)f[h]=u[h].read(c);return n(c),f},toWireType:(c,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var p=t();for(h in u)u[h].write(p,f[h]);return c!==null&&c.push(n,p),p},argPackAdvance:$,readValueFromPointer:X,destructorFunction:n}]})},br=(e,r,t,n,a)=>{},Ar=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Se=e},w=e=>{for(var r="",t=e;_[t];)r+=Se[_[t++]];return r},C=e=>{throw new $e(e)};function Tr(e,r,t={}){var n=r.name;if(e||C(`type "${n}" must have a positive integer typeid pointer`),k.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(k[e]=r,delete K[e],I.hasOwnProperty(e)){var a=I[e];delete I[e],a.forEach(o=>o())}}function E(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Tr(e,r,t)}var $=8,Cr=(e,r,t,n)=>{E(e,{name:r=w(r),fromWireType:function(a){return!!a},toWireType:function(a,o){return o?t:n},argPackAdvance:$,readValueFromPointer:function(a){return this.fromWireType(_[a])},destructorFunction:null})},Fr=(e,r,t)=>{e=w(e),ie([],[r],n=>(n=n[0],i[e]=n.fromWireType(t),[]))},ue=[],j=[],se=e=>{e>9&&--j[e+1]==0&&(j[e]=void 0,ue.push(e))},Pr=()=>j.length/2-5-ue.length,Wr=()=>{j.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=Pr},b={toValue:e=>(e||C("Cannot use deleted val. handle = "+e),j[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=ue.pop()||j.length;return j[r]=e,j[r+1]=1,r}}}},Er={name:"emscripten::val",fromWireType:e=>{var r=b.toValue(e);return se(e),r},toWireType:(e,r)=>b.toHandle(r),argPackAdvance:$,readValueFromPointer:X,destructorFunction:null},Me=e=>E(e,Er),Sr=(e,r,t)=>{if(e[r].overloadTable===void 0){var n=e[r];e[r]=function(...a){return e[r].overloadTable.hasOwnProperty(a.length)||C(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[a.length].apply(this,a)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},De=(e,r,t)=>{i.hasOwnProperty(e)?((t===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[t]!==void 0)&&C(`Cannot register public name '${e}' twice`),Sr(i,e,e),i.hasOwnProperty(t)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),i[e].overloadTable[t]=r):(i[e]=r,t!==void 0&&(i[e].numArguments=t))},$r=(e,r,t)=>{switch(r){case 1:return t?function(n){return this.fromWireType(P[n])}:function(n){return this.fromWireType(_[n])};case 2:return t?function(n){return this.fromWireType(H[n>>1])}:function(n){return this.fromWireType(Y[n>>1])};case 4:return t?function(n){return this.fromWireType(g[n>>2])}:function(n){return this.fromWireType(v[n>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Or=(e,r,t,n)=>{function a(){}r=w(r),a.values={},E(e,{name:r,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,l)=>l.value,argPackAdvance:$,readValueFromPointer:$r(r,t,n),destructorFunction:null}),De(r,a)},Q=(e,r)=>Object.defineProperty(r,"name",{value:e}),je=e=>{var r=Je(e),t=w(r);return O(r),t},Z=(e,r)=>{var t=k[e];return t===void 0&&C(`${r} has unknown type ${je(e)}`),t},Mr=(e,r,t)=>{var n=Z(e,"enum");r=w(r);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Q(`${n.name}_${r}`,function(){})}});a.values[t]=o,a[r]=o},Dr=(e,r)=>{switch(r){case 4:return function(t){return this.fromWireType(ye[t>>2])};case 8:return function(t){return this.fromWireType(ge[t>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},jr=(e,r,t)=>{E(e,{name:r=w(r),fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:$,readValueFromPointer:Dr(r,t),destructorFunction:null})};function Rr(e){for(var r=1;r{for(var t=[],n=0;n>2]);return t},Hr=(e,r,t)=>{i.hasOwnProperty(e)||Oe("Replacing nonexistent public symbol"),i[e].overloadTable!==void 0&&t!==void 0?i[e].overloadTable[t]=r:(i[e]=r,i[e].argCount=t)},Ir=(e,r,t)=>(e=e.replace(/p/g,"i"),(0,i["dynCall_"+e])(r,...t)),ee=[],He=e=>{var r=ee[e];return r||(e>=ee.length&&(ee.length=e+1),ee[e]=r=Re.get(e)),r},Vr=(e,r,t=[])=>e.includes("j")?Ir(e,r,t):He(r)(...t),Ur=(e,r)=>(...t)=>Vr(e,r,t),N=(e,r)=>{function t(){return e.includes("j")?Ur(e,r):He(r)}e=w(e);var n=t();return typeof n!="function"&&C(`unknown function pointer with signature ${e}: ${r}`),n},Yr=(e,r)=>{var t=Q(r,function(n){this.name=r,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` +`+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},Br=(e,r)=>{var t=[],n={};function a(o){n[o]||k[o]||(K[o]?K[o].forEach(a):(t.push(o),n[o]=!0))}throw r.forEach(a),new xe(`${e}: `+t.map(je).join([", "]))},zr=e=>{const r=(e=e.trim()).indexOf("(");return r!==-1?e.substr(0,r):e},Nr=(e,r,t,n,a,o,l)=>{var u=kr(r,t);e=w(e),e=zr(e),a=N(n,a),De(e,function(){Br(`Cannot call ${e} due to unbound types`,u)},r-1),ie([],u,c=>{var f=[c[0],null].concat(c.slice(1));return Hr(e,xr(e,f,null,a,o),r-1),[]})},qr=(e,r,t)=>{switch(r){case 1:return t?n=>P[n]:n=>_[n];case 2:return t?n=>H[n>>1]:n=>Y[n>>1];case 4:return t?n=>g[n>>2]:n=>v[n>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Gr=(e,r,t,n,a)=>{r=w(r);var o=f=>f;if(n===0){var l=32-8*t;o=f=>f<>>l}var u=r.includes("unsigned"),c=(f,h)=>{};E(e,{name:r,fromWireType:o,toWireType:u?function(f,h){return c(h,this.name),h>>>0}:function(f,h){return c(h,this.name),h},argPackAdvance:$,readValueFromPointer:qr(r,t,n!==0),destructorFunction:null})},Jr=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(o){var l=v[o>>2],u=v[o+4>>2];return new n(P.buffer,u,l)}E(e,{name:t=w(t),fromWireType:a,argPackAdvance:$,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Lr=(e,r)=>{Me(e)},Ie=(e,r,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,l=0;l=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&e.charCodeAt(++l)),u<=127){if(t>=o)break;r[t++]=u}else if(u<=2047){if(t+1>=o)break;r[t++]=192|u>>6,r[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;r[t++]=224|u>>12,r[t++]=128|u>>6&63,r[t++]=128|63&u}else{if(t+3>=o)break;r[t++]=240|u>>18,r[t++]=128|u>>12&63,r[t++]=128|u>>6&63,r[t++]=128|63&u}}return r[t]=0,t-a},Xr=(e,r,t)=>Ie(e,_,r,t),Ve=e=>{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},Ue=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Kr=(e,r,t)=>{for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;if(a-r>16&&e.buffer&&Ue)return Ue.decode(e.subarray(r,a));for(var o="";r>10,56320|1023&f)}}else o+=String.fromCharCode((31&l)<<6|u)}else o+=String.fromCharCode(l)}return o},le=(e,r)=>e?Kr(_,e,r):"",Qr=(e,r)=>{var t=(r=w(r))==="std::string";E(e,{name:r,fromWireType(n){var a,o=v[n>>2],l=n+4;if(t)for(var u=l,c=0;c<=o;++c){var f=l+c;if(c==o||_[f]==0){var h=le(u,f-u);a===void 0?a=h:(a+="\0",a+=h),u=f+1}}else{var p=new Array(o);for(c=0;c>2]=o,t&&l)Xr(a,c,o+1);else if(l)for(var f=0;f255&&(O(c),C("String has UTF-16 code units that do not fit in 8 bits")),_[c+f]=h}else for(f=0;f{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&Y[n];)++n;if((t=n<<1)-e>32&&Ye)return Ye.decode(_.subarray(e,t));for(var o="",l=0;!(l>=r/2);++l){var u=H[e+2*l>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},et=(e,r,t)=>{if(t??(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,o=0;o>1]=l,r+=2}return H[r>>1]=0,r-n},rt=e=>2*e.length,tt=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=g[e+4*t>>2];if(a==0)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},nt=(e,r,t)=>{if(t??(t=2147483647),t<4)return 0;for(var n=r,a=n+t-4,o=0;o=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++o)),g[r>>2]=l,(r+=4)+4>a)break}return g[r>>2]=0,r-n},at=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},ot=(e,r,t)=>{var n,a,o,l;t=w(t),r===2?(n=Zr,a=et,l=rt,o=u=>Y[u>>1]):r===4&&(n=tt,a=nt,l=at,o=u=>v[u>>2]),E(e,{name:t,fromWireType:u=>{for(var c,f=v[u>>2],h=u+4,p=0;p<=f;++p){var m=u+4+p*r;if(p==f||o(m)==0){var y=n(h,m-h);c===void 0?c=y:(c+="\0",c+=y),h=m+r}}return O(u),c},toWireType:(u,c)=>{typeof c!="string"&&C(`Cannot pass non-string to C++ string type ${t}`);var f=l(c),h=de(4+f+r);return v[h>>2]=f/r,a(c,h+4,f+r),u!==null&&u.push(O,h),h},argPackAdvance:$,readValueFromPointer:X,destructorFunction(u){O(u)}})},it=(e,r,t,n,a,o)=>{L[e]={name:w(r),rawConstructor:N(t,n),rawDestructor:N(a,o),fields:[]}},ut=(e,r,t,n,a,o,l,u,c,f)=>{L[e].fields.push({fieldName:w(r),getterReturnType:t,getter:N(n,a),getterContext:o,setterArgumentType:l,setter:N(u,c),setterContext:f})},st=(e,r)=>{E(e,{isVoid:!0,name:r=w(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})},lt=1,ct=()=>lt,ft=(e,r,t)=>_.copyWithin(e,r,r+t),Be=(e,r,t)=>{var n=[],a=e.toWireType(n,t);return n.length&&(v[r>>2]=b.toHandle(n)),a},dt=(e,r,t)=>(e=b.toValue(e),r=Z(r,"emval::as"),Be(r,t,e)),ht={},ze=e=>{var r=ht[e];return r===void 0?w(e):r},ce=[],mt=(e,r,t,n,a)=>(e=ce[e])(r=b.toValue(r),r[t=ze(t)],n,a),vt=e=>{var r=ce.length;return ce.push(e),r},pt=(e,r)=>{for(var t=new Array(e),n=0;n>2],"parameter "+n);return t},yt=Reflect.construct,gt=(e,r,t)=>{var n=pt(e,r),a=n.shift();e--;var o=new Array(e),l=(c,f,h,p)=>{for(var m=0,y=0;yc.name).join(", ")}) => ${a.name}>`;return vt(Q(u,l))},wt=(e,r)=>(e=b.toValue(e),r=b.toValue(r),b.toHandle(e[r])),_t=()=>b.toHandle([]),bt=e=>{e=b.toValue(e);for(var r=new Array(e.length),t=0;tb.toHandle(ze(e)),Tt=e=>{var r=b.toValue(e);oe(r),se(e)},Ct=(e,r)=>{var t=(e=Z(e,"_emval_take_value")).readValueFromPointer(r);return b.toHandle(t)},Ft=()=>{Ce("")},Pt=()=>Date.now(),Ne=()=>2147483648,Wt=()=>Ne();ke=()=>performance.now();var Et=e=>{var r=(e-J.buffer.byteLength+65535)/65536;try{return J.grow(r),_e(),1}catch{}},St=e=>{var r=_.length;e>>>=0;var t=Ne();if(e>t)return!1;for(var n=(u,c)=>u+(c-u%c)%c,a=1;a<=4;a*=2){var o=r*(1+.2/a);o=Math.min(o,e+100663296);var l=Math.min(t,n(Math.max(e,o),65536));if(Et(l))return!0}return!1},fe={},$t=()=>pe||"./this.program",q=()=>{if(!q.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:$t()};for(var r in fe)fe[r]===void 0?delete e[r]:e[r]=fe[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);q.strings=t}return q.strings},Ot=(e,r)=>{for(var t=0;t{var t=0;return q().forEach((n,a)=>{var o=r+t;v[e+4*a>>2]=o,Ot(n,o),t+=n.length+1}),0},Dt=(e,r)=>{var t=q();v[e>>2]=t.length;var n=0;return t.forEach(a=>n+=a.length+1),v[r>>2]=n,0},re=e=>e%4==0&&(e%100!=0||e%400==0),jt=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ge=[31,28,31,30,31,30,31,31,30,31,30,31],Rt=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=re(t.getFullYear()),a=t.getMonth(),o=(n?qe:Ge)[a];if(!(r>o-t.getDate()))return t.setDate(t.getDate()+r),t;r-=o-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t};function xt(e,r,t){var n=Ve(e)+1,a=new Array(n);return Ie(e,a,0,a.length),a}var kt=(e,r)=>{P.set(e,r)},Ht=(e,r,t,n)=>{var a=v[n+40>>2],o={tm_sec:g[n>>2],tm_min:g[n+4>>2],tm_hour:g[n+8>>2],tm_mday:g[n+12>>2],tm_mon:g[n+16>>2],tm_year:g[n+20>>2],tm_wday:g[n+24>>2],tm_yday:g[n+28>>2],tm_isdst:g[n+32>>2],tm_gmtoff:g[n+36>>2],tm_zone:a?le(a):""},l=le(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in u)l=l.replace(new RegExp(c,"g"),u[c]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(s,d,A){for(var T=typeof s=="number"?s.toString():s||"";T.length0?1:0}var T;return(T=A(s.getFullYear()-d.getFullYear()))===0&&(T=A(s.getMonth()-d.getMonth()))===0&&(T=A(s.getDate()-d.getDate())),T}function S(s){switch(s.getDay()){case 0:return new Date(s.getFullYear()-1,11,29);case 1:return s;case 2:return new Date(s.getFullYear(),0,3);case 3:return new Date(s.getFullYear(),0,2);case 4:return new Date(s.getFullYear(),0,1);case 5:return new Date(s.getFullYear()-1,11,31);case 6:return new Date(s.getFullYear()-1,11,30)}}function R(s){var d=Rt(new Date(s.tm_year+1900,0,1),s.tm_yday),A=new Date(d.getFullYear(),0,4),T=new Date(d.getFullYear()+1,0,4),ne=S(A),Ut=S(T);return y(ne,d)<=0?y(Ut,d)<=0?d.getFullYear()+1:d.getFullYear():d.getFullYear()-1}var W={"%a":s=>f[s.tm_wday].substring(0,3),"%A":s=>f[s.tm_wday],"%b":s=>h[s.tm_mon].substring(0,3),"%B":s=>h[s.tm_mon],"%C":s=>m((s.tm_year+1900)/100|0,2),"%d":s=>m(s.tm_mday,2),"%e":s=>p(s.tm_mday,2," "),"%g":s=>R(s).toString().substring(2),"%G":R,"%H":s=>m(s.tm_hour,2),"%I":s=>{var d=s.tm_hour;return d==0?d=12:d>12&&(d-=12),m(d,2)},"%j":s=>m(s.tm_mday+jt(re(s.tm_year+1900)?qe:Ge,s.tm_mon-1),3),"%m":s=>m(s.tm_mon+1,2),"%M":s=>m(s.tm_min,2),"%n":()=>` +`,"%p":s=>s.tm_hour>=0&&s.tm_hour<12?"AM":"PM","%S":s=>m(s.tm_sec,2),"%t":()=>" ","%u":s=>s.tm_wday||7,"%U":s=>{var d=s.tm_yday+7-s.tm_wday;return m(Math.floor(d/7),2)},"%V":s=>{var d=Math.floor((s.tm_yday+7-(s.tm_wday+6)%7)/7);if((s.tm_wday+371-s.tm_yday-2)%7<=2&&d++,d){if(d==53){var A=(s.tm_wday+371-s.tm_yday)%7;A==4||A==3&&re(s.tm_year)||(d=1)}}else{d=52;var T=(s.tm_wday+7-s.tm_yday-1)%7;(T==4||T==5&&re(s.tm_year%400-1))&&d++}return m(d,2)},"%w":s=>s.tm_wday,"%W":s=>{var d=s.tm_yday+7-(s.tm_wday+6)%7;return m(Math.floor(d/7),2)},"%y":s=>(s.tm_year+1900).toString().substring(2),"%Y":s=>s.tm_year+1900,"%z":s=>{var d=s.tm_gmtoff,A=d>=0;return d=(d=Math.abs(d)/60)/60*100+d%60,(A?"+":"-")+("0000"+d).slice(-4)},"%Z":s=>s.tm_zone,"%%":()=>"%"};for(var c in l=l.replace(/%%/g,"\0\0"),W)l.includes(c)&&(l=l.replace(new RegExp(c,"g"),W[c](o)));var M=xt(l=l.replace(/\0\0/g,"%"));return M.length>r?0:(kt(M,e),M.length-1)},It=(e,r,t,n,a)=>Ht(e,r,t,n);Ee=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Ar(),$e=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Wr(),xe=i.UnboundTypeError=Yr(Error,"UnboundTypeError");var te,Vt={a:wr,k:_r,w:br,E:Cr,u:Fr,v:Me,K:Or,q:Mr,t:jr,d:Nr,j:Gr,f:Jr,L:Lr,s:Qr,r:ot,l:it,e:ut,J:st,C:ct,H:ft,g:dt,n:mt,b:se,o:gt,h:wt,p:_t,I:bt,m:At,c:Tt,i:Ct,B:Ft,D:Pt,x:Wt,G:ke,F:St,z:Mt,A:Dt,y:It},F=yr(),Je=e=>(Je=F.O)(e),de=i._malloc=e=>(de=i._malloc=F.Q)(e),O=i._free=e=>(O=i._free=F.R)(e),Le=e=>(Le=F.S)(e);function Xe(){function e(){te||(te=!0,i.calledRun=!0,we||(ir(),me(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),ur()))}x>0||(or(),x>0||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()))}if(i.dynCall_viijii=(e,r,t,n,a,o,l)=>(i.dynCall_viijii=F.T)(e,r,t,n,a,o,l),i.dynCall_iiiiij=(e,r,t,n,a,o,l)=>(i.dynCall_iiiiij=F.U)(e,r,t,n,a,o,l),i.dynCall_iiiiijj=(e,r,t,n,a,o,l,u,c)=>(i.dynCall_iiiiijj=F.V)(e,r,t,n,a,o,l,u,c),i.dynCall_iiiiiijj=(e,r,t,n,a,o,l,u,c,f)=>(i.dynCall_iiiiiijj=F.W)(e,r,t,n,a,o,l,u,c,f),B=function e(){te||Xe(),te||(B=e)},i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Xe(),tr},Ke.exports=Qe;const Bt=Yt(er.exports),Nt=Object.freeze(Object.defineProperty({__proto__:null,default:Bt},Symbol.toStringTag,{value:"Module"}));export{Nt as l}; diff --git a/build/assets/lerc-wasm-1FN8mB-S.js b/build/assets/lerc-wasm-1FN8mB-S.js new file mode 100644 index 0000000..23c67e6 --- /dev/null +++ b/build/assets/lerc-wasm-1FN8mB-S.js @@ -0,0 +1 @@ +import{o as wn}from"./_commonjsHelpers-DCkdB7M8.js";var $,j,J,K={exports:{}};$=K,j=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,J=function(n){var D,R;(n=(n=n||{})!==void 0?n:{}).ready=new Promise(function(e,t){D=e,R=t});var W=Object.assign({},n),H=typeof window=="object",v=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S,s="";function Q(e){return n.locateFile?n.locateFile(e,s):s+e}(H||v)&&(v?s=self.location.href:typeof document<"u"&&document.currentScript&&(s=document.currentScript.src),j&&(s=j),s=s.indexOf("blob:")!==0?s.substr(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1):"",v&&(S=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),n.print||console.log.bind(console);var m,I,d=n.printErr||console.warn.bind(console);Object.assign(n,W),W=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(m=n.wasmBinary),n.noExitRuntime,typeof WebAssembly!="object"&&g("no native wasm support detected");var T,_,b,h,p,C,M=!1,O=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function V(e,t,i){for(var c=t+i,u=t;e[u]&&!(u>=c);)++u;if(u-t>16&&e.buffer&&O)return O.decode(e.subarray(t,u));for(var o="";t>10,56320|1023&Y)}}else o+=String.fromCharCode((31&r)<<6|f)}else o+=String.fromCharCode(r)}return o}function x(e,t){return e?V(b,e,t):""}function U(e){T=e,n.HEAP8=_=new Int8Array(e),n.HEAP16=new Int16Array(e),n.HEAP32=h=new Int32Array(e),n.HEAPU8=b=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=p=new Uint32Array(e),n.HEAPF32=new Float32Array(e),n.HEAPF64=new Float64Array(e)}n.INITIAL_MEMORY;var B=[],k=[],F=[];function Z(){if(n.preRun)for(typeof n.preRun=="function"&&(n.preRun=[n.preRun]);n.preRun.length;)tn(n.preRun.shift());P(B)}function nn(){P(k)}function en(){if(n.postRun)for(typeof n.postRun=="function"&&(n.postRun=[n.postRun]);n.postRun.length;)on(n.postRun.shift());P(F)}function tn(e){B.unshift(e)}function rn(e){k.unshift(e)}function on(e){F.unshift(e)}var l=0,y=null;function un(e){l++,n.monitorRunDependencies&&n.monitorRunDependencies(l)}function an(e){if(l--,n.monitorRunDependencies&&n.monitorRunDependencies(l),l==0&&y){var t=y;y=null,t()}}function g(e){n.onAbort&&n.onAbort(e),d(e="Aborted("+e+")"),M=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw R(t),t}var a,sn="data:application/octet-stream;base64,";function q(e){return e.startsWith(sn)}function z(e){try{if(e==a&&m)return new Uint8Array(m);if(S)return S(e);throw"both async and sync fetching of the wasm failed"}catch(t){g(t)}}function cn(){return m||!H&&!v||typeof fetch!="function"?Promise.resolve().then(function(){return z(a)}):fetch(a,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+a+"'";return e.arrayBuffer()}).catch(function(){return z(a)})}function fn(){var e={a:bn};function t(o,r){var f=o.exports;n.asm=f,U((I=n.asm.g).buffer),C=n.asm.m,rn(n.asm.h),an()}function i(o){t(o.instance)}function c(o){return cn().then(function(r){return WebAssembly.instantiate(r,e)}).then(function(r){return r}).then(o,function(r){d("failed to asynchronously prepare wasm: "+r),g(r)})}function u(){return m||typeof WebAssembly.instantiateStreaming!="function"||q(a)||typeof fetch!="function"?c(i):fetch(a,{credentials:"same-origin"}).then(function(o){return WebAssembly.instantiateStreaming(o,e).then(i,function(r){return d("wasm streaming compile failed: "+r),d("falling back to ArrayBuffer instantiation"),c(i)})})}if(un(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(o){return d("Module.instantiateWasm callback failed with error: "+o),!1}return u().catch(R),{}}function P(e){for(;e.length>0;){var t=e.shift();if(typeof t!="function"){var i=t.func;typeof i=="number"?t.arg===void 0?L(i)():L(i)(t.arg):i(t.arg===void 0?null:t.arg)}else t(n)}}q(a="lerc-wasm.wasm")||(a=Q(a));var w=[];function L(e){var t=w[e];return t||(e>=w.length&&(w.length=e+1),w[e]=t=C.get(e)),t}function pn(e,t,i,c){g("Assertion failed: "+x(e)+", at: "+[t?x(t):"unknown filename",i,c?x(c):"unknown function"])}function ln(e){return N(e+24)+24}function hn(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){p[this.ptr+4>>2]=t},this.get_type=function(){return p[this.ptr+4>>2]},this.set_destructor=function(t){p[this.ptr+8>>2]=t},this.get_destructor=function(){return p[this.ptr+8>>2]},this.set_refcount=function(t){h[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return _[this.ptr+12|0]!=0},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return _[this.ptr+13|0]!=0},this.init=function(t,i){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(i),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=h[this.ptr>>2];h[this.ptr>>2]=t+1},this.release_ref=function(){var t=h[this.ptr>>2];return h[this.ptr>>2]=t-1,t===1},this.set_adjusted_ptr=function(t){p[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return p[this.ptr+16>>2]},this.get_exception_ptr=function(){if(G(this.get_type()))return p[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}function mn(e,t,i){throw new hn(e).init(t,i),e}function dn(){g("")}function _n(e,t,i){b.copyWithin(e,t,t+i)}function yn(){return 2147483648}function gn(e){try{return I.grow(e-T.byteLength+65535>>>16),U(I.buffer),1}catch{}}function vn(e){var t=b.length;e>>>=0;var i=yn();if(e>i)return!1;let c=(r,f)=>r+(f-r%f)%f;for(var u=1;u<=4;u*=2){var o=t*(1+.2/u);if(o=Math.min(o,e+100663296),gn(Math.min(i,c(Math.max(e,o),65536))))return!0}return!1}var bn={a:pn,c:ln,b:mn,d:dn,f:_n,e:vn};fn(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.h).apply(null,arguments)},n._lerc_getBlobInfo=function(){return(n._lerc_getBlobInfo=n.asm.i).apply(null,arguments)},n._lerc_getDataRanges=function(){return(n._lerc_getDataRanges=n.asm.j).apply(null,arguments)},n._lerc_decode=function(){return(n._lerc_decode=n.asm.k).apply(null,arguments)},n._lerc_decode_4D=function(){return(n._lerc_decode_4D=n.asm.l).apply(null,arguments)};var N=n._malloc=function(){return(N=n._malloc=n.asm.n).apply(null,arguments)};n._free=function(){return(n._free=n.asm.o).apply(null,arguments)};var A,G=n.___cxa_is_pointer_type=function(){return(G=n.___cxa_is_pointer_type=n.asm.p).apply(null,arguments)};function E(e){function t(){A||(A=!0,n.calledRun=!0,M||(nn(),D(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),en()))}l>0||(Z(),l>0||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),t()},1)):t()))}if(y=function e(){A||E(),A||(y=e)},n.run=E,n.preInit)for(typeof n.preInit=="function"&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return E(),n.ready},$.exports=J;const An=wn(K.exports),Sn=Object.freeze(Object.defineProperty({__proto__:null,default:An},Symbol.toStringTag,{value:"Module"}));export{Sn as l}; diff --git a/build/assets/libtess-CoED-ECQ.js b/build/assets/libtess-CoED-ECQ.js new file mode 100644 index 0000000..d7f69e2 --- /dev/null +++ b/build/assets/libtess-CoED-ECQ.js @@ -0,0 +1 @@ +import{o as Mt}from"./_commonjsHelpers-DCkdB7M8.js";function Ut(v,w){for(var p=0;pe[h]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var et,k,nt,ot={exports:{}};et=ot,k=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,nt=function(v={}){var w,p,e=v;e.ready=new Promise((t,n)=>{w=t,p=n});var h=Object.assign({},e),g=typeof window=="object",I=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var M,l="";function it(t){return e.locateFile?e.locateFile(t,l):l+t}(g||I)&&(I?l=self.location.href:typeof document<"u"&&document.currentScript&&(l=document.currentScript.src),k&&(l=k),l=l.indexOf("blob:")!==0?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",I&&(M=t=>{var n=new XMLHttpRequest;return n.open("GET",t,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}));var A,x,at=e.print||console.log.bind(console),b=e.printErr||console.error.bind(console);Object.assign(e,h),h=null,e.arguments&&e.arguments,e.thisProgram&&e.thisProgram,e.quit&&e.quit,e.wasmBinary&&(A=e.wasmBinary),typeof WebAssembly!="object"&&Y("no native wasm support detected");var T,j,q=!1;function L(){var t=x.buffer;e.HEAP8=new Int8Array(t),e.HEAP16=new Int16Array(t),e.HEAPU8=T=new Uint8Array(t),e.HEAPU16=new Uint16Array(t),e.HEAP32=new Int32Array(t),e.HEAPU32=j=new Uint32Array(t),e.HEAPF32=new Float32Array(t),e.HEAPF64=new Float64Array(t)}var $=[],z=[],N=[];function ut(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)st(e.preRun.shift());U($)}function ft(){U(z)}function ct(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)pt(e.postRun.shift());U(N)}function st(t){$.unshift(t)}function lt(t){z.unshift(t)}function pt(t){N.unshift(t)}var y=0,E=null;function ht(t){var n;y++,(n=e.monitorRunDependencies)==null||n.call(e,y)}function mt(t){var o;if(y--,(o=e.monitorRunDependencies)==null||o.call(e,y),y==0&&E){var n=E;E=null,n()}}function Y(t){var o;(o=e.onAbort)==null||o.call(e,t),b(t="Aborted("+t+")"),q=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw p(n),n}var R,yt="data:application/octet-stream;base64,",G=t=>t.startsWith(yt);function X(t){if(t==R&&A)return new Uint8Array(A);if(M)return M(t);throw"both async and sync fetching of the wasm failed"}function dt(t){return A||!g&&!I||typeof fetch!="function"?Promise.resolve().then(()=>X(t)):fetch(t,{credentials:"same-origin"}).then(n=>{if(!n.ok)throw"failed to load wasm binary file at '"+t+"'";return n.arrayBuffer()}).catch(()=>X(t))}function J(t,n,o){return dt(t).then(r=>WebAssembly.instantiate(r,n)).then(r=>r).then(o,r=>{b(`failed to asynchronously prepare wasm: ${r}`),Y(r)})}function vt(t,n,o,r){return t||typeof WebAssembly.instantiateStreaming!="function"||G(n)||typeof fetch!="function"?J(n,o,r):fetch(n,{credentials:"same-origin"}).then(i=>WebAssembly.instantiateStreaming(i,o).then(r,function(a){return b(`wasm streaming compile failed: ${a}`),b("falling back to ArrayBuffer instantiation"),J(n,o,r)}))}function gt(){var t={a:Ht};function n(r,i){return s=r.exports,x=s.i,L(),K=s.m,lt(s.j),mt(),s}function o(r){n(r.instance)}if(ht(),e.instantiateWasm)try{return e.instantiateWasm(t,n)}catch(r){b(`Module.instantiateWasm callback failed with error: ${r}`),p(r)}return vt(A,R,t,o).catch(p),{}}G(R="libtess.wasm")||(R=it(R));var U=t=>{for(;t.length>0;)t.shift()(e)};e.noExitRuntime;var K,bt=()=>{throw 1/0},wt=(t,n,o)=>T.copyWithin(t,n,n+o),At=()=>2147483648,Et=t=>{var n=(t-x.buffer.byteLength+65535)/65536;try{return x.grow(n),L(),1}catch{}},Rt=t=>{var n=T.length;t>>>=0;var o=At();if(t>o)return!1;for(var r=(f,c)=>f+(c-f%c)%c,i=1;i<=4;i*=2){var a=n*(1+.2/i);a=Math.min(a,t+100663296);var u=Math.min(o,r(Math.max(t,a),65536));if(Et(u))return!0}return!1},Pt=[null,[],[]],Q=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,St=(t,n,o)=>{for(var r=n+o,i=n;t[i]&&!(i>=r);)++i;if(i-n>16&&t.buffer&&Q)return Q.decode(t.subarray(n,i));for(var a="";n>10,56320|1023&H)}}else a+=String.fromCharCode((31&u)<<6|f)}else a+=String.fromCharCode(u)}return a},_t=(t,n)=>{var o=Pt[t];n===0||n===10?((t===1?at:b)(St(o,0)),o.length=0):o.push(n)},O=[],W=t=>{var n=O[t];return n||(t>=O.length&&(O.length=t+1),O[t]=n=K.get(t)),n},Ht={e:bt,g:wt,f:Rt,c:(t,n,o,r)=>{for(var i=0,a=0;a>2],f=j[n+4>>2];n+=8;for(var c=0;c>2]=i,0},b:Tt,h:jt,d:xt,a:It},s=gt();e._malloc=t=>(e._malloc=s.k)(t),e._free=t=>(e._free=s.l)(t),e._triangulate=(t,n,o,r,i,a)=>(e._triangulate=s.n)(t,n,o,r,i,a);var C,P=(t,n)=>(P=s.o)(t,n),S=()=>(S=s.p)(),_=t=>(_=s.q)(t);function It(t,n,o){var r=S();try{W(t)(n,o)}catch(i){if(_(r),i!==i+0)throw i;P(1,0)}}function xt(t,n){var o=S();try{W(t)(n)}catch(r){if(_(o),r!==r+0)throw r;P(1,0)}}function Tt(t,n){var o=S();try{return W(t)(n)}catch(r){if(_(o),r!==r+0)throw r;P(1,0)}}function jt(t,n,o,r){var i=S();try{return W(t)(n,o,r)}catch(a){if(_(i),a!==a+0)throw a;P(1,0)}}function V(){function t(){C||(C=!0,e.calledRun=!0,q||(ft(),w(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),ct()))}y>0||(ut(),y>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),t()},1)):t()))}if(E=function t(){C||V(),C||(E=t)},e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();V();let B=null,m=null,d=null,F=null;const Ot=2,Z=4e3;let tt=0;const Wt=(t,n,o)=>{B||(B=e._triangulate);let r=e.HEAPF32;const i=e.HEAP32.BYTES_PER_ELEMENT,a=2,u=r.BYTES_PER_ELEMENT;o>tt&&(tt=o,d&&(e._free(d),d=0),m&&(e._free(m),m=0)),d||(d=e._malloc(o*u)),F||(F=e._malloc(Z*i));const f=o*Ot;m||(m=e._malloc(f*u)),r=e.HEAPF32,r.set(t,d/u),e.HEAP32.set(n,F/i);const c=f/a,H=B(d,F,Math.min(n.length,Z),a,m,c),Ct=H*a;r=e.HEAPF32;const Ft=r.slice(m/u,m/u+Ct),D={};return D.buffer=Ft,D.vertexCount=H,D};return e.triangulate=Wt,v.ready},et.exports=nt;var rt=ot.exports;const Dt=Ut({__proto__:null,default:Mt(rt)},[rt]);export{Dt as l}; diff --git a/build/assets/libtess-asm-CthFaaan.js b/build/assets/libtess-asm-CthFaaan.js new file mode 100644 index 0000000..95fab5f --- /dev/null +++ b/build/assets/libtess-asm-CthFaaan.js @@ -0,0 +1 @@ +import{o as P4}from"./_commonjsHelpers-DCkdB7M8.js";function U4(M2,W2){for(var v2=0;v2E[d2]})}}}return Object.freeze(Object.defineProperty(M2,Symbol.toStringTag,{value:"Module"}))}var d1,S0,h1,y1={exports:{}};d1=y1,S0=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,h1=function(M2={}){var W2,v2,E=M2;E.ready=new Promise((p,C)=>{W2=p,v2=C});var d2=Object.assign({},E),P2=typeof window=="object",Y2=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var o0,l2="";function p1(p){return E.locateFile?E.locateFile(p,l2):l2+p}(P2||Y2)&&(Y2?l2=self.location.href:typeof document<"u"&&document.currentScript&&(l2=document.currentScript.src),S0&&(l2=S0),l2=l2.indexOf("blob:")!==0?l2.substr(0,l2.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Y2&&(o0=p=>{var C=new XMLHttpRequest;return C.open("GET",p,!1),C.responseType="arraybuffer",C.send(null),new Uint8Array(C.response)}));var U2,m1=E.print||console.log.bind(console),_2=E.printErr||console.error.bind(console);Object.assign(E,d2),d2=null,E.arguments&&E.arguments,E.thisProgram&&E.thisProgram,E.quit&&E.quit,E.wasmBinary&&(U2=E.wasmBinary);var F2,h2={Memory:function(p){this.buffer=new ArrayBuffer(65536*p.initial)},Module:function(p){},Instance:function(p,C){this.exports=function(B){function U(K){return K.set=function(V,t2){this[V]=t2},K.get=function(V){return this[V]},K}for(var F,H=new Uint8Array(123),D=25;D>=0;--D)H[48+D]=52+D,H[65+D]=D,H[97+D]=26+D;function x(K,V,t2){for(var a2,d,n2=0,i=V,w=t2.length,G2=V+(3*w>>2)-(t2[w-2]=="=")-(t2[w-1]=="=");n2>4,i>2),i>>0<=244){if(3&(f=(o=i[854])>>>(a=(k=n>>>0<11?16:n+11&504)>>>3|0)|0)){f=3456+(n=(a=a+(1&~f)|0)<<3)|0,e=i[n+3464>>2],(0|f)!=(0|(n=i[e+8>>2]))?(i[n+12>>2]=f,i[f+8>>2]=n):(v=3416,h=i2(a)&o,i[v>>2]=h),n=e+8|0,f=a<<3,i[e+4>>2]=3|f,i[4+(f=f+e|0)>>2]=1|i[f+4>>2];break i}if((A=i[856])>>>0>=k>>>0)break b;if(f){f=3456+(n=(e=e0((0-(n=2<>2],(0|f)!=(0|(n=i[t+8>>2]))?(i[n+12>>2]=f,i[f+8>>2]=n):(o=i2(e)&o,i[854]=o),i[t+4>>2]=3|k,e=(n=e<<3)-k|0,i[4+(a=t+k|0)>>2]=1|e,i[n+t>>2]=e,A&&(f=3456+(-8&A)|0,b=i[859],(n=1<<(A>>>3))&o?n=i[f+8>>2]:(i[854]=n|o,n=f),i[f+8>>2]=b,i[n+12>>2]=b,i[b+12>>2]=f,i[b+8>>2]=n),n=t+8|0,i[859]=a,i[856]=e;break i}if(!(r=i[855]))break b;for(a=i[3720+(e0(r)<<2)>>2],t=(-8&i[a+4>>2])-k|0,f=a;(n=i[f+16>>2])||(n=i[f+20>>2]);)t=(e=(f=(-8&i[n+4>>2])-k|0)>>>0>>0)?f:t,a=e?n:a,f=n;if(s=i[a+24>>2],(0|(e=i[a+12>>2]))!=(0|a)){n=i[a+8>>2],i[n+12>>2]=e,i[e+8>>2]=n;break f}if(!(n=i[(f=a+20|0)>>2])){if(!(n=i[a+16>>2]))break o;f=a+16|0}for(;b=f,e=n,(n=i[(f=n+20|0)>>2])||(f=e+16|0,n=i[e+16>>2]););i[b>>2]=0;break f}if(k=-1,!(n>>>0>4294967231)&&(k=-8&(n=n+11|0),r=i[855])){t=0-k|0,o=0,k>>>0<256||(o=31,k>>>0>16777215||(o=62+((k>>>38-(n=s2(n>>>8|0))&1)-(n<<1)|0)|0));k:{c:{if(f=i[3720+(o<<2)>>2])for(n=0,a=k<<((0|o)!=31?25-(o>>>1|0):0);;){if(!((b=(-8&i[f+4>>2])-k|0)>>>0>=t>>>0||(e=f,t=b))){t=0,n=f;break c}if(b=i[f+20>>2],f=i[16+((a>>>29&4)+f|0)>>2],n=b?(0|b)==(0|f)?n:b:n,a<<=1,!f)break}else n=0;if(!(n|e)){if(e=0,!(n=(0-(n=2<>2]}if(!n)break k}for(;t=(a=(f=(-8&i[n+4>>2])-k|0)>>>0>>0)?f:t,e=a?n:e,n=(f=i[n+16>>2])||i[n+20>>2];);}if(!(!e|i[856]-k>>>0<=t>>>0)){if(o=i[e+24>>2],(0|e)!=(0|(a=i[e+12>>2]))){n=i[e+8>>2],i[n+12>>2]=a,i[a+8>>2]=n;break a}if(!(n=i[(f=e+20|0)>>2])){if(!(n=i[e+16>>2]))break u;f=e+16|0}for(;b=f,a=n,(n=i[(f=n+20|0)>>2])||(f=a+16|0,n=i[a+16>>2]););i[b>>2]=0;break a}}}if((n=i[856])>>>0>=k>>>0){e=i[859],(f=n-k|0)>>>0>=16?(i[4+(a=e+k|0)>>2]=1|f,i[n+e>>2]=f,i[e+4>>2]=3|k):(i[e+4>>2]=3|n,i[4+(n=n+e|0)>>2]=1|i[n+4>>2],a=0,f=0),i[856]=f,i[859]=a,n=e+8|0;break i}if((s=i[857])>>>0>k>>>0){f=s-k|0,i[857]=f,n=(a=i[860])+k|0,i[860]=n,i[n+4>>2]=1|f,i[a+4>>2]=3|k,n=a+8|0;break i}if(n=0,t=k+47|0,i[972]?a=i[974]:(i[975]=-1,i[976]=-1,i[973]=4096,i[974]=4096,i[972]=l+12&-16^1431655768,i[977]=0,i[965]=0,a=4096),(f=(o=t+a|0)&(b=0-a|0))>>>0<=k>>>0||(e=i[964])&&e>>>0<(r=(a=i[962])+f|0)>>>0|a>>>0>=r>>>0)break i;b:{if(!(4&w[3860])){k:{c:{A:{r:{if(e=i[860])for(n=3864;;){if((a=i[n>>2])>>>0<=e>>>0&e>>>0>2]>>>0)break r;if(!(n=i[n+8>>2]))break}if((0|(a=T2(0)))==-1||(o=f,(n=(e=i[973])-1|0)&a&&(o=(f-a|0)+(n+a&0-e)|0),o>>>0<=k>>>0)||(e=i[964])&&e>>>0<(b=(n=i[962])+o|0)>>>0|n>>>0>=b>>>0)break k;if((0|a)!=(0|(n=T2(o))))break A;break b}if((0|(a=T2(o=b&o-s)))==(i[n>>2]+i[n+4>>2]|0))break c;n=a}if((0|n)==-1)break k;if(k+48>>>0<=o>>>0){a=n;break b}if((0|T2(a=(a=i[974])+(t-o|0)&0-a))==-1)break k;o=a+o|0,a=n;break b}if((0|a)!=-1)break b}i[965]=4|i[965]}if((0|(a=T2(f)))==-1|(0|(n=T2(0)))==-1|n>>>0<=a>>>0||(o=n-a|0)>>>0<=k+40>>>0)break n}n=i[962]+o|0,i[962]=n,n>>>0>i0[963]&&(i[963]=n);b:{if(t=i[860]){for(n=3864;;){if(((e=i[n>>2])+(f=i[n+4>>2])|0)==(0|a))break b;if(!(n=i[n+8>>2]))break}break t}for((n=i[858])>>>0<=a>>>0&&n||(i[858]=a),n=0,i[967]=o,i[966]=a,i[862]=-1,i[863]=i[972],i[969]=0;f=3456+(e=n<<3)|0,i[e+3464>>2]=f,i[e+3468>>2]=f,(0|(n=n+1|0))!=32;);f=(e=o-40|0)-(n=-8-a&7)|0,i[857]=f,n=n+a|0,i[860]=n,i[n+4>>2]=1|f,i[4+(a+e|0)>>2]=40,i[861]=i[976];break e}if(8&i[n+12>>2]|a>>>0<=t>>>0|e>>>0>t>>>0)break t;i[n+4>>2]=f+o,a=(n=-8-t&7)+t|0,i[860]=a,n=(f=i[857]+o|0)-n|0,i[857]=n,i[a+4>>2]=1|n,i[4+(f+t|0)>>2]=40,i[861]=i[976];break e}e=0;break f}a=0;break a}i0[858]>a>>>0&&(i[858]=a),f=a+o|0,n=3864;t:{u:{o:{for(;;){if((0|f)!=i[n>>2]){if(n=i[n+8>>2])continue;break o}break}if(!(8&w[n+12|0]))break u}for(n=3864;!((f=i[n>>2])>>>0<=t>>>0&&(b=f+i[n+4>>2]|0)>>>0>t>>>0);)n=i[n+8>>2];for(f=(e=o-40|0)-(n=-8-a&7)|0,i[857]=f,n=n+a|0,i[860]=n,i[n+4>>2]=1|f,i[4+(a+e|0)>>2]=40,i[861]=i[976],i[(e=(n=(b+(39-b&7)|0)-47|0)>>>0>>0?t:n)+4>>2]=27,n=i[969],i[e+16>>2]=i[968],i[e+20>>2]=n,n=i[967],i[e+8>>2]=i[966],i[e+12>>2]=n,i[968]=e+8,i[967]=o,i[966]=a,i[969]=0,n=e+24|0;i[n+4>>2]=7,f=n+8|0,n=n+4|0,f>>>0>>0;);if((0|e)==(0|t))break e;if(i[e+4>>2]=-2&i[e+4>>2],b=e-t|0,i[t+4>>2]=1|b,i[e>>2]=b,b>>>0<=255){f=3456+(-8&b)|0,(a=i[854])&(n=1<<(b>>>3))?n=i[f+8>>2]:(i[854]=n|a,n=f),i[f+8>>2]=t,i[n+12>>2]=t,i[t+12>>2]=f,i[t+8>>2]=n;break e}if(n=31,b>>>0<=16777215&&(n=62+((b>>>38-(n=s2(b>>>8|0))&1)-(n<<1)|0)|0),i[t+28>>2]=n,i[t+16>>2]=0,i[t+20>>2]=0,f=3720+(n<<2)|0,(e=i[855])&(a=1<>>1|0):0),e=i[f>>2];;){if((0|b)==(-8&i[(f=e)+4>>2]))break t;if(a=n>>>29|0,n<<=1,!(e=i[16+(a=(4&a)+f|0)>>2]))break}i[a+16>>2]=t}else i[855]=a|e,i[f>>2]=t;i[t+24>>2]=f,i[t+12>>2]=t,i[t+8>>2]=t;break e}i[n>>2]=a,i[n+4>>2]=i[n+4>>2]+o,i[4+(r=(-8-a&7)+a|0)>>2]=3|k,o=(t=f+(-8-f&7)|0)-(s=k+r|0)|0;u:if(i[860]!=(0|t))if(i[859]!=(0|t)){if((3&(a=i[t+4>>2]))==1){b=-8&a;o:if(a>>>0<=255){if((0|(f=i[t+12>>2]))==(0|(n=i[t+8>>2]))){v=3416,h=i[854]&i2(a>>>3|0),i[v>>2]=h;break o}i[n+12>>2]=f,i[f+8>>2]=n}else{k=i[t+24>>2];b:if((0|t)==(0|(n=i[t+12>>2]))){k:{if(!(a=i[(f=t+20|0)>>2])){if(!(a=i[t+16>>2]))break k;f=t+16|0}for(;e=f,(a=i[(f=(n=a)+20|0)>>2])||(f=n+16|0,a=i[n+16>>2]););i[e>>2]=0;break b}n=0}else f=i[t+8>>2],i[f+12>>2]=n,i[n+8>>2]=f;if(k){a=i[t+28>>2];b:{if(i[(f=3720+(a<<2)|0)>>2]==(0|t)){if(i[f>>2]=n,n)break b;v=3420,h=i[855]&i2(a),i[v>>2]=h;break o}if(i[k+(i[k+16>>2]==(0|t)?16:20)>>2]=n,!n)break o}i[n+24>>2]=k,(f=i[t+16>>2])&&(i[n+16>>2]=f,i[f+24>>2]=n),(f=i[t+20>>2])&&(i[n+20>>2]=f,i[f+24>>2]=n)}}o=b+o|0,a=i[4+(t=t+b|0)>>2]}if(i[t+4>>2]=-2&a,i[s+4>>2]=1|o,i[o+s>>2]=o,o>>>0<=255)f=3456+(-8&o)|0,(a=i[854])&(n=1<<(o>>>3))?n=i[f+8>>2]:(i[854]=n|a,n=f),i[f+8>>2]=s,i[n+12>>2]=s,i[s+12>>2]=f,i[s+8>>2]=n;else{a=31,o>>>0<=16777215&&(a=62+((o>>>38-(n=s2(o>>>8|0))&1)-(n<<1)|0)|0),i[s+28>>2]=a,i[s+16>>2]=0,i[s+20>>2]=0,f=3720+(a<<2)|0;o:{if((e=i[855])&(n=1<>>1|0):0),n=i[f>>2];;){if(f=n,(-8&i[n+4>>2])==(0|o))break o;if(e=a>>>29|0,a<<=1,!(n=i[16+(e=(4&e)+n|0)>>2]))break}i[e+16>>2]=s}else i[855]=n|e,i[f>>2]=s;i[s+24>>2]=f,i[s+12>>2]=s,i[s+8>>2]=s;break u}n=i[f+8>>2],i[n+12>>2]=s,i[f+8>>2]=s,i[s+24>>2]=0,i[s+12>>2]=f,i[s+8>>2]=n}}else i[859]=s,n=i[856]+o|0,i[856]=n,i[s+4>>2]=1|n,i[n+s>>2]=n;else i[860]=s,n=i[857]+o|0,i[857]=n,i[s+4>>2]=1|n;n=r+8|0;break i}n=i[f+8>>2],i[n+12>>2]=t,i[f+8>>2]=t,i[t+24>>2]=0,i[t+12>>2]=f,i[t+8>>2]=n}if(!((n=i[857])>>>0<=k>>>0)){f=n-k|0,i[857]=f,n=(a=i[860])+k|0,i[860]=n,i[n+4>>2]=1|f,i[a+4>>2]=3|k,n=a+8|0;break i}}i[806]=48,n=0;break i}a:if(o){f=i[e+28>>2];n:{if(i[(n=3720+(f<<2)|0)>>2]==(0|e)){if(i[n>>2]=a,a)break n;r=i2(f)&r,i[855]=r;break a}if(i[o+(i[o+16>>2]==(0|e)?16:20)>>2]=a,!a)break a}i[a+24>>2]=o,(n=i[e+16>>2])&&(i[a+16>>2]=n,i[n+24>>2]=a),(n=i[e+20>>2])&&(i[a+20>>2]=n,i[n+24>>2]=a)}a:if(t>>>0<=15)n=t+k|0,i[e+4>>2]=3|n,i[4+(n=n+e|0)>>2]=1|i[n+4>>2];else if(i[e+4>>2]=3|k,i[4+(b=e+k|0)>>2]=1|t,i[t+b>>2]=t,t>>>0<=255)f=3456+(-8&t)|0,(a=i[854])&(n=1<<(t>>>3))?n=i[f+8>>2]:(i[854]=n|a,n=f),i[f+8>>2]=b,i[n+12>>2]=b,i[b+12>>2]=f,i[b+8>>2]=n;else{n=31,t>>>0<=16777215&&(n=62+((t>>>38-(n=s2(t>>>8|0))&1)-(n<<1)|0)|0),i[b+28>>2]=n,i[b+16>>2]=0,i[b+20>>2]=0,f=3720+(n<<2)|0;n:{if((a=1<>>1|0):0),k=i[f>>2];;){if((-8&i[(f=k)+4>>2])==(0|t))break n;if(a=n>>>29|0,n<<=1,!(k=i[16+(a=(4&a)+f|0)>>2]))break}i[a+16>>2]=b}else i[855]=a|r,i[f>>2]=b;i[b+24>>2]=f,i[b+12>>2]=b,i[b+8>>2]=b;break a}n=i[f+8>>2],i[n+12>>2]=b,i[f+8>>2]=b,i[b+24>>2]=0,i[b+12>>2]=f,i[b+8>>2]=n}n=e+8|0;break i}f:if(s){f=i[a+28>>2];a:{if(i[(n=3720+(f<<2)|0)>>2]==(0|a)){if(i[n>>2]=e,e)break a;v=3420,h=i2(f)&r,i[v>>2]=h;break f}if(i[s+(i[s+16>>2]==(0|a)?16:20)>>2]=e,!e)break f}i[e+24>>2]=s,(n=i[a+16>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(n=i[a+20>>2])&&(i[e+20>>2]=n,i[n+24>>2]=e)}t>>>0<=15?(n=t+k|0,i[a+4>>2]=3|n,i[4+(n=n+a|0)>>2]=1|i[n+4>>2]):(i[a+4>>2]=3|k,i[4+(e=a+k|0)>>2]=1|t,i[e+t>>2]=t,A&&(f=3456+(-8&A)|0,b=i[859],(n=1<<(A>>>3))&o?n=i[f+8>>2]:(i[854]=n|o,n=f),i[f+8>>2]=b,i[n+12>>2]=b,i[b+12>>2]=f,i[b+8>>2]=n),i[859]=e,i[856]=t),n=a+8|0}return _=l+16|0,0|n}function J0(n,f){var a=u(0),e=0,t=u(0),b=u(0),o=0,k=u(0),s=0,r=u(0),A=u(0),l=0,v=0,h=u(0),y=0,m=0,g=0,I=0,S=0,M=0,P=0,T=0,O=u(0),G=0,Y=0,f2=0;_=s=_-144|0,Y=i[i[i[f+4>>2]+8>>2]>>2],T=i[Y>>2],I=i[T+16>>2],S=i[i[T+4>>2]+16>>2],P=i[f>>2],g=i[i[P+4>>2]+16>>2],y=i[P+16>>2],J(g,i[n+72>>2],y)>u(0)&&(a=c[g+28>>2],b=c[g+32>>2],e=i[n+72>>2],t=c[e+28>>2],k=c[e+32>>2],A=c[y+28>>2],q[s+40>>3]=c[y+32>>2],q[s+32>>3]=A,q[s+24>>3]=k,q[s+16>>3]=t,q[s+8>>3]=b,q[s>>3]=a,A1(1098,s));i:{f:{a:if((0|y)!=(0|I)&&(k=(a=c[y+32>>2])<=(b=c[g+32>>2])?a:b,b=c[I+32>>2],!(k>((t=c[S+32>>2])<=b?b:t)))){n:{if(!(!((t=c[y+28>>2])<(k=c[I+28>>2]))&(!(a<=b)|t!=k))){if(!(J(S,y,I)>u(0)))break n;break a}if(J(g,I,y)>2])<(b=c[y+28>>2])|a==b&c[l+32>>2]<=c[y+32>>2]?(o=M,M=l):o=l,(a=c[e+28>>2])>(b=c[v+28>>2])|a==b&c[v+32>>2]<=c[e+32>>2]?(a=b,l=e,e=v):l=v,(b=c[M+28>>2])>2]<=c[e+32>>2]?(b=a,v=l,m=e,l=o,e=M):(v=o,m=M);n:if((t=c[l+28>>2])>b|t==b&c[m+32>>2]<=c[l+32>>2])if(!((A=c[v+28>>2])>t)&(!(c[l+32>>2]<=c[v+32>>2])|t!=A))if(a=J(e,m,l),t=J(e,v,l),b=c[m+28>>2],(k=(a=(o=u(a-t)>2],a=u(u(b+r)*u(.5)),t==u(0))break n;a=u(u(u(r-b)*u(k/u(k+t)))+b)}else a=c[v+28>>2],a=u(u(u(b-a)*u(t/u(k+t)))+a);else{if(a=u(0),k=u(t-b),h=u(b-c[e+28>>2]),(O=u(k+h))>u(0)&&(a=c[((o=k>h)?e:l)+32>>2],a=u(u(u(a-c[(o?l:e)+32>>2])*u((o?h:k)/O))+u(c[m+32>>2]-a))),A=u(A-t),(h=u(k+A))>u(0)&&(r=c[((o=k>2],r=u(u(u(r-c[(o?v:m)+32>>2])*u((o?k:A)/h))+u(c[l+32>>2]-r))),(A=(a=(o=u(a+r)>2]=a,(a=c[e+32>>2])<(b=c[l+32>>2])|a==b&c[e+28>>2]<=c[l+28>>2]?(o=l,l=e):o=e,(a=c[v+32>>2])>(b=c[m+32>>2])|a==b&c[m+28>>2]<=c[v+28>>2]?(a=b,e=v,v=m):e=m,(b=c[l+32>>2])>2]<=c[v+28>>2]?(b=a,M=e,m=v,e=o,v=l):(M=o,m=l);n:{e:if((t=c[e+32>>2])>b|t==b&c[m+28>>2]<=c[e+28>>2]){if(!(!((r=c[M+32>>2])>t)&(!(c[e+28>>2]<=c[M+28>>2])|t!=r))){if(a=u(0),k=u(0),A=u(t-b),h=u(b-c[v+32>>2]),(O=u(A+h))>u(0)&&(k=c[((o=A>h)?v:e)+28>>2],k=u(u(u(k-c[(o?e:v)+28>>2])*u((o?h:A)/O))+u(c[m+28>>2]-k))),r=u(r-t),(h=u(A+r))>u(0)&&(a=c[((o=r>A)?m:M)+28>>2],a=u(u(u(a-c[(o?M:m)+28>>2])*u((o?A:r)/h))+u(c[e+28>>2]-a))),(k=(k=(e=u(k+a)>2]=u(A*u(k/u(k+a)))+b;break n}c[s+88>>2]=u(u(b-t)*u(a/u(k+a)))+t;break n}if(a=u(0),k=u(0),A=u(t-b),h=c[v+32>>2],O=u(b-h),u(A+O)>u(0)&&(k=c[m+28>>2],k=u(u(u(k-c[e+28>>2])*O)+u(A*u(k-c[v+28>>2])))),t=u(t-r),A=u(r-h),u(t+A)>u(0)&&(a=c[M+28>>2],a=u(u(u(a-c[e+28>>2])*A)+u(t*u(a-c[v+28>>2])))),(t=(t=(e=u(k-a)>2]=u(b+r)*u(.5);break n}c[s+88>>2]=u(u(r-b)*u(t/u(t+a)))+b;break n}c[s+88>>2]=u(u(b-r)*u(a/u(t+a)))+r;break n}c[s+88>>2]=u(b+t)*u(.5)}b=c[s+84>>2],o=i[n+72>>2];n:{if(b<(a=c[o+28>>2]))t=c[o+32>>2];else if(a!=b||!((t=c[o+32>>2])>=c[s+88>>2]))break n;c[s+88>>2]=t,c[s+84>>2]=a,b=a}(a=r=c[(e=y)+28>>2])<(t=c[I+28>>2])||a==t&&c[e+32>>2]<=c[I+32>>2]||(a=t,e=I);n:{if(a>2];else if(a!=b||!((k=c[e+32>>2])<=c[s+88>>2]))break n;c[s+88>>2]=k,c[s+84>>2]=a,b=a}if(!(b==r&c[s+88>>2]==c[y+32>>2])&(t!=b|c[s+88>>2]!=c[I+32>>2])){n:{e:{if(!((b=c[o+28>>2])==c[g+28>>2]&c[g+32>>2]==c[o+32>>2])){if(J(g,o,s+56|0)>=u(0))break e;o=i[n+72>>2],b=c[o+28>>2]}if(b==c[S+28>>2]&c[S+32>>2]==c[o+32>>2]||!(J(S,o,s+56|0)<=u(0)))break n}if((0|(e=i[n+72>>2]))==(0|S)){if(!o2(i[P+4>>2])||!Z(i[T+4>>2],P))break i;for(e=i[i[f>>2]+16>>2];f=i[i[i[f+4>>2]+4>>2]>>2],l=i[f>>2],(0|e)==i[l+16>>2];);if(w[f+15|0]&&(o=0,(e=A2(i[i[i[i[i[f+4>>2]+8>>2]>>2]>>2]+4>>2],i[l+12>>2]))&&$(i[f>>2])&&(i[f>>2]=e,d[f+15|0]=0,i[e+24>>2]=f,o=i[i[i[f+4>>2]+4>>2]>>2]),f=o),!f)break i;o=i[i[i[f+4>>2]+8>>2]>>2],e=i[o>>2],L2(n,o,Y),f2=1,S2(n,f,i[i[e+4>>2]+12>>2],e,e,1);break a}if((0|e)==(0|g)){if(!o2(i[T+4>>2])||!Z(i[P+12>>2],i[i[T+4>>2]+12>>2]))break i;for(o=i[i[i[f>>2]+4>>2]+16>>2],e=f;e=i[i[i[e+4>>2]+4>>2]>>2],(0|o)==i[i[i[e>>2]+4>>2]+16>>2];);o=i[i[i[i[i[i[e+4>>2]+8>>2]>>2]>>2]+4>>2]+8>>2],i[f>>2]=i[i[T+4>>2]+12>>2],f2=1,S2(n,e,i[L2(n,f,0)+8>>2],i[i[P+4>>2]+8>>2],o,1);break a}if(J(g,e,s+56|0)>=u(0)){if(d[f+14|0]=1,d[i[i[i[f+4>>2]+4>>2]>>2]+14|0]=1,!o2(i[P+4>>2]))break i;o=i[P+16>>2],e=i[n+72>>2],c[o+28>>2]=c[e+28>>2],c[o+32>>2]=c[e+32>>2]}else e=i[n+72>>2];if(!(J(S,e,s+56|0)<=u(0)))break a;if(d[Y+14|0]=1,d[f+14|0]=1,!o2(i[T+4>>2]))break i;f=i[T+16>>2],n=i[n+72>>2],c[f+28>>2]=c[n+28>>2],c[f+32>>2]=c[n+32>>2];break a}if(!o2(i[P+4>>2])||!o2(i[T+4>>2])||!Z(i[i[T+4>>2]+12>>2],P))break i;if(e=i[P+16>>2],c[e+28>>2]=c[s+84>>2],c[e+32>>2]=c[s+88>>2],o=X0(i[n+68>>2],e),e=i[P+16>>2],i[e+36>>2]=o,(0|o)==2147483647)break f;i[s+112>>2]=i[y+12>>2],i[s+116>>2]=i[g+12>>2],i[s+120>>2]=i[I+12>>2],i[s+124>>2]=i[S+12>>2],i[e+24>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,a=c[e+28>>2],r=(b=u(c[g+28>>2]-a))>2],t=u(c[g+32>>2]-b),k=u(r+(t>2]-a))>2]-b),r=u(r+(t>2]=t,k=u(.5*+r/G),c[s+100>>2]=k,r=u(u(u(t*c[y+16>>2])+u(c[g+16>>2]*k))+u(0)),c[e+16>>2]=r,A=u(u(u(t*c[y+20>>2])+u(c[g+20>>2]*k))+u(0)),c[e+20>>2]=A,k=u(u(u(t*c[y+24>>2])+u(c[g+24>>2]*k))+u(0)),c[e+24>>2]=k,h=(t=u(c[I+28>>2]-a))>2]-b),t=u(h+(t>2]-a))>2]-b),a=u(h+(a>2]=a,b=u(.5*+t/G),c[s+108>>2]=b,t=u(r+u(u(a*c[I+16>>2])+u(c[S+16>>2]*b))),c[e+16>>2]=t,r=u(A+u(u(a*c[I+20>>2])+u(c[S+20>>2]*b))),c[e+20>>2]=r,a=u(k+u(u(a*c[I+24>>2])+u(c[S+24>>2]*b))),c[e+24>>2]=a,c[s+140>>2]=a,c[s+136>>2]=r,c[s+132>>2]=t,i[e+12>>2]=0,e=e+12|0,(0|(o=i[n+1736>>2]))==10?R[i[n+76>>2]](s+132|0,s+112|0,s+96|0,e):R[0|o](s+132|0,s+112|0,s+96|0,e,i[n+1896>>2]),i[e>>2]|w[n+60|0]||((0|(e=i[n+1732>>2]))==11?R[i[n+12>>2]](100156):R[0|e](100156,i[n+1896>>2]),d[n+60|0]=1),d[Y+14|0]=1,d[f+14|0]=1,d[i[i[i[f+4>>2]+4>>2]>>2]+14|0]=1}else c0(n,f)}return _=s+144|0,f2}y0(i[n+68>>2]),i[n+68>>2]=0}k2(n+1740|0,1),b2()}function n4(n,f,a,e,t,b){n|=0,f|=0,a|=0,e|=0,t|=0,b|=0;for(var o=0,k=0,s=0,r=0,A=0,l=u(0),v=0,h=u(0),y=u(0),m=0,g=0,I=0,S=0,M=0,P=0;(o=i[1776+(k=r<<2)>>2])&&(i[o>>2]=0),(o=i[1776+(4|k)>>2])&&(i[o>>2]=0),(o=i[1776+(8|k)>>2])&&(i[o>>2]=0),(o=i[1776+(12|k)>>2])&&(i[o>>2]=0),(0|(r=r+4|0))!=100;);if((r=i[544])||(r=j(16),i[544]=r),i[r+8>>2]=b,i[r+4>>2]=0,i[r+12>>2]=e,i[r>>2]=t,(r=i[545])||((t=j(1900))?(i[t+100>>2]=12,i[t+96>>2]=13,i[t+92>>2]=14,i[t+88>>2]=15,n2[t+80>>1]=0,i[t+52>>2]=0,i[t+56>>2]=100130,i[t+16>>2]=0,i[t+20>>2]=0,i[t>>2]=0,i[t+1896>>2]=0,i[t+1736>>2]=10,i[t+1732>>2]=11,i[t+1728>>2]=6,i[t+1724>>2]=5,i[t+1720>>2]=4,i[t+1716>>2]=3,i[t+104>>2]=16,i[t+76>>2]=17,i[t+12>>2]=18,i[t+24>>2]=0):t=0,i[545]=t,B2(t,100107,31),B2(i[545],100100,32),B2(i[545],100102,33),B2(i[545],100105,34),B2(i[545],100103,35),B2(i[545],100104,36),i[i[545]+56>>2]=100130,t=i[545],c[t+16>>2]=0,c[t+24>>2]=1,c[t+20>>2]=0,r=i[545]),t=0,b=i[544],i[r>>2]&&p2(r,0),i[r+112>>2]=0,i[r>>2]=1,d[r+108|0]=0,i[r+1896>>2]=b,i[r+8>>2]=0,(0|a)>0)for(b=0;;){if(I=i[(b<<2)+f>>2],o=i[545],i[o>>2]!=1&&p2(o,1),i[o>>2]=2,i[o+4>>2]=0,i[o+112>>2]>0&&(d[o+108|0]=1),r=0,(0|I)>0)for(;;){A=i[545],i[A>>2]!=2&&p2(A,2),v=(L(t+r|0,e)<<2)+n|0;i:{f:{if(w[A+108|0]){if(!r0(A)){if((0|(k=i[A+1732>>2]))!=11)break f;R[i[A+12>>2]](100902);break i}i[A+4>>2]=0}if(P=(m=+(h=(S=(m=+(l=c[v+4>>2]))<-1e37)?u(-9999999933815813e21):l))>1e37,s=(g=+(y=(M=(g=+(l=c[v>>2]))<-1e37)?u(-9999999933815813e21):l))>1e37,((o=+(l=c[v+8>>2])<-1e37)|(k=+(l=o?u(-9999999933815813e21):l)>1e37)|S|m>1e37||g>1e37||M)&&((0|(o=i[A+1732>>2]))==11?R[i[A+12>>2]](100155):R[0|o](100155,i[A+1896>>2])),h=P?u(9999999933815813e21):h,y=s?u(9999999933815813e21):y,!i[A+8>>2]){if((0|(o=i[A+112>>2]))<=99){c[124+(s=A+(o<<4)|0)>>2]=k?u(9999999933815813e21):l,c[s+120>>2]=h,c[s+116>>2]=y,i[s+128>>2]=v,i[A+112>>2]=o+1;break i}if(!r0(A)){if((0|(k=i[A+1732>>2]))!=11)break f;R[i[A+12>>2]](100902);break i}}a:{n:{if(!(o=i[A+4>>2])){if(!(k=s0(i[A+8>>2])))break a;if(Z(k,i[k+4>>2]))break n;break a}if(!o2(o))break a;k=i[o+12>>2]}o=i[k+16>>2],c[o+16>>2]=y,i[o+12>>2]=v,i[o+24>>2]=0,c[o+20>>2]=h,i[k+28>>2]=1,i[i[k+4>>2]+28>>2]=-1,i[A+4>>2]=k;break i}if((0|(k=i[A+1732>>2]))==11){R[i[A+12>>2]](100902);break i}}R[0|k](100902,i[A+1896>>2])}if((0|I)==(0|(r=r+1|0)))break}if(o=i[545],i[o>>2]!=2&&p2(o,2),i[o>>2]=1,t=t+I|0,(0|(b=b+1|0))==(0|a))break}s=i[545],n=j(40),i[n>>2]=0,k=k1(t=s+1740|0,1,n,4),o=W,n=0;i:{f:{for(;;){if(n){if((0|(f=i[s+1732>>2]))!=11){if(n=i[s+1896>>2],i[978]=0,I2(0|f,100902,0|n),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;break i}if(n=i[s+12>>2],i[978]=0,Z0(0|n,100902),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;break i}if(i[s>>2]!=1){if(i[978]=0,I2(19,0|s,1),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue}if(i[s>>2]=0,!i[s+8>>2]){if(!(w[s+80|0]|i[s+104>>2]!=16)){if(i[978]=0,a=0|f0(20,0|s),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;if(a){i[s+1896>>2]=0;break i}}if(i[978]=0,a=0|f0(21,0|s),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;if(!a){if(i[978]=0,I2(22,0|t,1),n=i[978],i[978]=0,n&&(e=i[979])){if(!X(i[n>>2],k,o))break f;W=e}n=W;continue}}if(i[978]=0,V0(s),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)!=1){if(i[978]=0,a=0|f0(24,0|s),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)!=1)if(a){b=i[s+8>>2];a:{n:{if(!w[s+60|0]){if(w[s+81|0]?(i[978]=0,a=0|a4(25,0|b,1,1)):(i[978]=0,a=0|f0(26,0|b)),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;if(!a){if(i[978]=0,I2(22,0|t,1),n=i[978],i[978]=0,n&&(e=i[979])){if(!X(i[n>>2],k,o))break f;W=e}n=W;continue}if(i[s+88>>2]!=15|i[s+100>>2]!=12|i[s+96>>2]!=13|i[s+92>>2]!=14||i[s+1716>>2]!=3|i[s+1728>>2]!=6|i[s+1724>>2]!=5||i[s+1720>>2]!=4)if(w[s+81|0]){if(i[978]=0,I2(27,0|s,0|b),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue}else{if(i[978]=0,I2(28,0|s,0|b),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue}if(i[s+104>>2]!=16){if(i[978]=0,$0(b),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;if(n=i[s+104>>2],i[978]=0,Z0(0|n,0|b),n=i[978],i[978]=0,f=-1,!n||!(e=i[979]))break a;if(f=X(i[n>>2],k,o))break n;break f}}if(i[978]=0,d0(b),n=i[978],i[978]=0,f=-1,n&&(e=i[979])){if(!(f=X(i[n>>2],k,o)))break f;W=e}if(n=W,(0|f)==1)continue;i[s+8>>2]=0,i[s+1896>>2]=0;break i}W=e}if(n=W,(0|f)!=1)break}else{if(i[978]=0,I2(22,0|t,1),n=i[978],i[978]=0,n&&(e=i[979])){if(!X(i[n>>2],k,o))break f;W=e}n=W}}}i[s+1896>>2]=0,i[s+8>>2]=0;break i}Q(k),k2(n,e),b2()}return Q(k),i[i[544]+4>>2]}function e4(n,f,a,e,t,b){n|=0,f=+f,a|=0,e|=0,t|=0,b|=0;var o=0,k=0,s=0,r=0,A=0,l=0,v=0,h=0,y=0,m=0,g=0,I=0,S=0,M=0,P=0,T=0,O=0,G=0,Y=0,f2=0,E2=0;_=h=_-560|0,i[h+44>>2]=0,u0(+f),o=0|c2(1),c2(0),(0|o)<0?(M=1,O=1034,u0(+(f=-f)),o=0|c2(1),c2(0)):2048&t?(M=1,O=1037):(O=(M=1&t)?1040:1035,Y=!M);i:if(2146435072&~o){P=h+16|0;f:{a:{n:{if(f=u1(f,h+44|0),(f+=f)!=0){if(o=i[h+44>>2],i[h+44>>2]=o-1,(0|(T=32|b))!=97)break n;break f}if((0|(T=32|b))==97)break f;A=i[h+44>>2],l=(0|e)<0?6:e;break a}A=o-29|0,i[h+44>>2]=A,f*=268435456,l=(0|e)<0?6:e}for(k=m=(h+48|0)+((0|A)>=0?288:0)|0;e=f<4294967296&f>=0?~~f>>>0:0,i[k>>2]=e,k=k+4|0,(f=1e9*(f-+(e>>>0)))!=0;);if((0|A)<=0)e=A,o=k,s=m;else for(s=m,e=A;;){if(r=(0|e)>=29?29:e,!(s>>>0>(o=k-4|0)>>>0)){for(y=0;e=i[o>>2],v=31&r,G=y,(63&r)>>>0>=32?(y=e<>>32-v,e<<=v),y=y+g|0,f2=o,E2=(v=G+e|0)-h0(y=i1(v,e>>>0>v>>>0?y+1|0:y,1e9),r2,1e9,0)|0,i[f2>>2]=E2,s>>>0<=(o=o-4|0)>>>0;);y&&(i[(s=s-4|0)>>2]=y)}for(;s>>>0<(o=k)>>>0&&!i[(k=o-4|0)>>2];);if(e=i[h+44>>2]-r|0,i[h+44>>2]=e,k=o,!((0|e)>0))break}if((0|e)<0)for(S=1+((l+25>>>0)/9|0)|0,g=(0|T)==102;;){if(v=(0|(e=0-e|0))>=9?9:e,o>>>0<=s>>>0)k=i[s>>2];else{for(y=1e9>>>v|0,r=~(-1<>2],i[k>>2]=G+(e>>>v|0),e=L(y,e&r),(k=k+4|0)>>>0>>0;);k=i[s>>2],e&&(i[o>>2]=e,o=o+4|0)}if(e=v+i[h+44>>2]|0,i[h+44>>2]=e,s=(!k<<2)+s|0,o=o-(k=g?m:s)>>2>(0|S)?k+(S<<2)|0:o,!((0|e)<0))break}if(e=0,!(o>>>0<=s>>>0||(e=L(m-s>>2,9),k=10,(r=i[s>>2])>>>0<10)))for(;e=e+1|0,r>>>0>=(k=L(k,10))>>>0;);if((0|(k=(l-((0|T)!=102?e:0)|0)-((0|T)==103&!!(0|l))|0))<(L(o-m>>2,9)-9|0)){if(A=(S=((h+48|0)+((0|A)<0?4:292)|0)+((r=(0|(y=k+9216|0))/9|0)<<2)|0)-4096|0,k=10,(0|(v=y-L(r,9)|0))<=7)for(;k=L(k,10),(0|(v=v+1|0))!=8;);if(!(!(v=(g=i[A>>2])-L(k,y=(g>>>0)/(k>>>0)|0)|0)&(0|(r=S-4092|0))==(0|o))&&(!(1&y)&&(f=9007199254740992,!(1&d[S-4100|0])|(0|k)!=1e9|s>>>0>=A>>>0)||(f=9007199254740994),I=(0|o)==(0|r)?1:1.5,I=(r=k>>>1|0)>>>0>v>>>0?.5:(0|r)==(0|v)?I:1.5,w[0|O]!=45|Y||(I=-I,f=-f),r=g-v|0,i[A>>2]=r,f+I!=f)){if(e=k+r|0,i[A>>2]=e,e>>>0>=1e9)for(;i[A>>2]=0,(A=A-4|0)>>>0>>0&&(i[(s=s-4|0)>>2]=0),e=i[A>>2]+1|0,i[A>>2]=e,e>>>0>999999999;);if(e=L(m-s>>2,9),k=10,!((r=i[s>>2])>>>0<10))for(;e=e+1|0,r>>>0>=(k=L(k,10))>>>0;);}o=o>>>0>(k=A+4|0)>>>0?k:o}for(;r=o,!(y=o>>>0<=s>>>0)&&!i[(o=o-4|0)>>2];);if((0|T)==103){if(l=((o=(0|(k=l||1))>(0|e)&(0|e)>-5)?~e:-1)+k|0,b=(o?-1:-2)+b|0,!(A=8&t)){if(o=-9,!y&&(A=i[r-4>>2])&&(v=10,o=0,!((A>>>0)%10|0))){for(;k=o,o=o+1|0,!((A>>>0)%((v=L(v,10))>>>0)|0););o=~k}k=L(r-m>>2,9),(-33&b)!=70?(A=0,l=(0|(o=(0|(o=((e+k|0)+o|0)-9|0))>0?o:0))>(0|l)?l:o):(A=0,l=(0|(o=(0|(o=(o+k|0)-9|0))>0?o:0))>(0|l)?l:o)}}else A=8&t;if(v=-1,(0|((y=A|l)?2147483645:2147483646))<(0|l))break i;if(g=1+(!!(0|y)+l|0)|0,(0|(k=-33&b))!=70){if((P-(o=Q2(((o=e>>31)^e)-o|0,0,P))|0)<=1)for(;d[0|(o=o-1|0)]=48,(P-o|0)<2;);if(d[0|(S=o-2|0)]=b,d[o-1|0]=(0|e)<0?45:43,(0|(o=P-S|0))>(2147483647^g))break i}else{if((2147483647^g)<(0|e))break i;o=(0|e)>0?e:0}if((0|(e=o+g|0))>(2147483647^M))break i;z(n,32,a,g=e+M|0,t),N(n,O,M),z(n,48,a,g,65536^t);a:{n:{e:{if((0|k)==70){for(e=8|(b=h+16|0),A=9|b,s=k=s>>>0>m>>>0?m:s;;){o=Q2(i[s>>2],0,A);t:if((0|k)==(0|s))(0|o)==(0|A)&&(d[h+24|0]=48,o=e);else{if(h+16>>>0>=o>>>0)break t;for(;d[0|(o=o-1|0)]=48,h+16>>>0>>0;);}if(N(n,o,A-o|0),!(m>>>0>=(s=s+4|0)>>>0))break}if(y&&N(n,1069,1),(0|l)<=0|s>>>0>=r>>>0)break e;for(;;){if((o=Q2(i[s>>2],0,A))>>>0>h+16>>>0)for(;d[0|(o=o-1|0)]=48,h+16>>>0>>0;);if(N(n,o,(0|l)>=9?9:l),o=l-9|0,r>>>0<=(s=s+4|0)>>>0)break n;if(e=(0|l)>9,l=o,!e)break}break n}t:if(!((0|l)<0))for(m=s>>>0>>0?r:s+4|0,e=8|(b=h+16|0),r=9|b,k=s;;){(0|r)==(0|(o=Q2(i[k>>2],0,r)))&&(d[h+24|0]=48,o=e);u:if((0|k)==(0|s))N(n,o,1),o=o+1|0,A|l&&N(n,1069,1);else{if(h+16>>>0>=o>>>0)break u;for(;d[0|(o=o-1|0)]=48,h+16>>>0>>0;);}if(N(n,o,(0|(b=r-o|0))<(0|l)?b:l),l=l-b|0,m>>>0<=(k=k+4|0)>>>0)break t;if(!((0|l)>=0))break}z(n,48,l+18|0,18,0),N(n,S,P-S|0);break a}o=l}z(n,48,o+9|0,9,0)}z(n,32,a,g,8192^t),v=(0|a)<(0|g)?g:a;break i}if(A=(b<<26>>31&9)+O|0,!(e>>>0>11)){for(o=12-e|0,I=16;I*=16,o=o-1|0;);f=w[0|A]!=45?f+I-I:-(I+(-f-I))}for((0|P)==(0|(o=Q2(((o=i[h+44>>2])^(k=o>>31))-k|0,0,P)))&&(d[h+15|0]=48,o=h+15|0),m=2|M,s=32&b,k=i[h+44>>2],d[0|(l=o-2|0)]=b+15,d[o-1|0]=(0|k)<0?45:43,o=8&t,k=h+16|0;b=k,r=$1(f)<2147483648?~~f:-2147483648,d[0|k]=s|w[r+1600|0],!((0|e)>0|o)&(f=16*(f-+(0|r)))==0|((k=b+1|0)-(h+16|0)|0)!=1||(d[b+1|0]=46,k=b+2|0),f!=0;);v=-1,(2147483645-(b=(o=P-l|0)+m|0)|0)<(0|e)||(r=b,s=k-(b=h+16|0)|0,z(n,32,a,k=r+(e=e&&(s-2|0)<(0|e)?e+2|0:s)|0,t),N(n,A,m),z(n,48,a,k,65536^t),N(n,b,s),z(n,48,e-s|0,0,0),N(n,l,o),z(n,32,a,k,8192^t),v=(0|a)<(0|k)?k:a)}else z(n,32,a,o=M+3|0,-65537&t),N(n,O,M),e=32&b,N(n,f!=f?e?1053:1061:e?1057:1065,3),z(n,32,a,o,8192^t),v=(0|a)<(0|o)?o:a;return _=h+560|0,0|v}function N0(n,f,a,e,t,b){var o=0,k=0,s=0,r=0,A=0,l=0,v=0,h=0,y=0,m=0,g=0,I=0,S=0,M=0,P=0,T=0,O=0,G=0,Y=0,f2=0,E2=0;_=s=_-80|0,i[s+76>>2]=f,O=t-192|0,G=e-384|0,f2=s+55|0,I=s+56|0;i:{f:{a:{n:{e:for(;;){o=0;t:for(;;){if(r=f,(2147483647^y)<(0|o))break n;y=o+y|0;u:{o:{b:{if(k=w[0|(o=f)])for(;;){k:{c:if(f=255&k){if((0|f)!=37)break k;for(k=o;;){if(w[k+1|0]!=37){f=k;break c}if(o=o+1|0,l=w[k+2|0],k=f=k+2|0,(0|l)!=37)break}}else f=o;if((0|(o=o-r|0))>(0|(Y=2147483647^y)))break n;if(n&&N(n,r,o),o)continue t;i[s+76>>2]=f,o=f+1|0,m=-1,k=d[f+1|0]-48|0,w[f+2|0]!=36|k>>>0>=10||(m=k,S=1,o=f+3|0),i[s+76>>2]=o,v=0;c:if((f=(k=d[0|o])-32|0)>>>0>31)l=o;else if(l=o,75913&(f=1<>2]=l,v|=f,(f=(k=d[o+1|0])-32|0)>>>0>=32)break c;if(o=l,!(75913&(f=1<>2]}else{if(k=l+1|0,w[l+2|0]!=36|d[l+1|0]-48>>>0>=10){if(S)break b;if(!n){i[s+76>>2]=k,S=0,g=0;break c}f=i[a>>2],i[a>>2]=f+4,S=0,f=i[f>>2]}else f=d[0|k],k=l+3|0,S=1,n?f=i[(f<<3)+G>>2]:(i[(f<<2)+O>>2]=10,f=0);if(i[s+76>>2]=k,g=f,(0|f)>=0)break c;g=0-f|0,v|=8192}if(o=0,A=-1,w[0|k]==46)if(w[k+1|0]!=42)i[s+76>>2]=k+1,A=c1(s+76|0),f=i[s+76>>2],P=1;else{if(f=k+2|0,w[k+3|0]!=36|d[k+2|0]-48>>>0>=10){if(S)break b;n?(k=i[a>>2],i[a>>2]=k+4,A=i[k>>2]):A=0}else f=d[0|f],n?A=i[(f<<3)+G>>2]:(i[(f<<2)+O>>2]=10,A=0),f=k+4|0;i[s+76>>2]=f,P=(0|A)>=0}else f=k,P=0;for(;;){if(T=o,l=28,h=f,(k=d[0|f])-123>>>0<4294967238)break a;if(f=f+1|0,!((o=w[1071+(k+L(o,58)|0)|0])-1>>>0<8))break}i[s+76>>2]=f;c:if((0|o)==27){if((0|m)>=0)break a;if(o=0,!n)continue t}else{if(!o)break a;if((0|m)>=0){if(!n){i[(m<<2)+t>>2]=o;continue e}o=i[4+(k=(m<<3)+e|0)>>2],i[s+64>>2]=i[k>>2],i[s+68>>2]=o;break c}if(!n)break u;a1(s- -64|0,o,a)}if(32&w[0|n])break f;k=-65537&v,v=8192&v?k:v,m=0,M=1024,l=I;c:{A:{r:{w:{y:{p:{v:{s:{l:{d:{m:{g:{E:{h:{C:{switch(o=d[0|h],(o=T&&(15&o)==3?-45&o:o)-88|0){case 11:break c;case 9:case 13:case 14:case 15:break A;case 27:break v;case 12:case 17:break d;case 23:break m;case 0:case 32:break g;case 24:break E;case 22:break h;case 29:break C;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 10:case 16:case 18:case 19:case 20:case 21:case 25:case 26:case 28:case 30:case 31:break o}switch(o-65|0){case 0:case 4:case 5:case 6:break A;case 2:break y;case 1:case 3:break o}if((0|o)==83)break p;break o}r=i[s+64>>2],k=i[s+68>>2],M=1024;break l}o=0;h:switch(255&T){case 0:case 1:case 6:i[i[s+64>>2]>>2]=y;continue t;case 2:r=i[s+64>>2],i[r>>2]=y,i[r+4>>2]=y>>31;continue t;case 3:n2[i[s+64>>2]>>1]=y;continue t;case 4:d[i[s+64>>2]]=y;continue t;case 7:break h;default:continue t}r=i[s+64>>2],i[r>>2]=y,i[r+4>>2]=y>>31;continue t}A=A>>>0<=8?8:A,v|=8,o=120}if(f=I,(r=i[s+64>>2])|(k=i[s+68>>2]))for(E2=32&o;d[0|(f=f-1|0)]=E2|w[1600+(15&r)|0],T=!k&r>>>0>15|!!(0|k),h=k,k=k>>>4|0,r=(15&h)<<28|r>>>4,T;);if(r=f,!(i[s+64>>2]|i[s+68>>2])|!(8&v))break s;M=1024+(o>>>4|0)|0,m=2;break s}if(f=I,k=o=i[s+68>>2],o|(r=i[s+64>>2]))for(;d[0|(f=f-1|0)]=7&r|48,h=!k&r>>>0>7|!!(0|k),k=(o=k)>>>3|0,r=(7&o)<<29|r>>>3,h;);if(r=f,!(8&v))break s;A=(0|(f=I-f|0))<(0|A)?A:f+1|0;break s}r=i[s+64>>2],k=f=i[s+68>>2],(0|f)<0?(k=o=0-(f+!!(0|r)|0)|0,r=0-r|0,i[s+64>>2]=r,i[s+68>>2]=o,m=1,M=1024):2048&v?(m=1,M=1025):M=(m=1&v)?1026:1024}r=Q2(r,k,I)}if((0|A)<0&P)break n;if(v=P?-65537&v:v,!(A|!!((f=i[s+64>>2])|(o=i[s+68>>2])))){r=I,A=0;break o}A=(0|(f=!(f|o)+(I-r|0)|0))<(0|A)?A:f;break o}h=l=A>>>0>=2147483647?2147483647:A,v=!!(0|l);v:{s:{l:{d:if(!(!(3&(f=r=(f=i[s+64>>2])||1071))|!l))for(;;){if(!w[0|f])break l;if(v=!!(0|(h=h-1|0)),!(3&(f=f+1|0)))break d;if(!h)break}if(!v)break s;if(!(!w[0|f]|h>>>0<4))for(;;){if(~(o=i[f>>2])&o-16843009&-2139062144)break l;if(f=f+4|0,!((h=h-4|0)>>>0>3))break}if(!h)break s}for(;;){if(!w[0|f])break v;if(f=f+1|0,!(h=h-1|0))break}}f=0}if(l=(f=f?f-r|0:l)+r|0,(0|A)>=0){v=k,A=f;break o}if(v=k,A=f,w[0|l])break n;break o}if(A){k=i[s+64>>2];break w}o=0,z(n,32,g,0,v);break r}i[s+12>>2]=0,i[s+8>>2]=i[s+64>>2],k=s+8|0,i[s+64>>2]=k,A=-1}for(o=0;;){if(r=i[k>>2]){if((0|(r=t1(s+4|0,r)))<0)break f;if(!(r>>>0>A-o>>>0)&&(k=k+4|0,A>>>0>(o=o+r|0)>>>0))continue}break}if(l=61,(0|o)<0)break a;if(z(n,32,g,o,v),o)for(l=0,k=i[s+64>>2];;){if(!(r=i[k>>2])||(l=(r=t1(A=s+4|0,r))+l|0)>>>0>o>>>0)break r;if(N(n,A,r),k=k+4|0,!(o>>>0>l>>>0))break}else o=0}z(n,32,g,o,8192^v),o=(0|o)<(0|g)?g:o;continue t}if((0|A)<0&P)break n;if(l=61,(0|(o=0|R[0|b](n,q[s+64>>3],g,A,v,o)))>=0)continue t;break a}d[s+55|0]=i[s+64>>2],A=1,r=f2,v=k;break o}k=w[o+1|0],o=o+1|0}if(n)break i;if(!S)break u;for(o=1;;){if(n=i[(o<<2)+t>>2]){if(a1((o<<3)+e|0,n,a),y=1,(0|(o=o+1|0))!=10)continue;break i}break}if(y=1,o>>>0>=10)break i;for(;;){if(i[(o<<2)+t>>2])break b;if((0|(o=o+1|0))==10)break}break i}l=28;break a}if((0|(f=(0|(k=l-r|0))<(0|A)?A:k))>(2147483647^m))break n;if(l=61,(0|Y)<(0|(o=(0|(A=f+m|0))<(0|g)?g:A)))break a;z(n,32,o,A,v),N(n,M,m),z(n,48,o,A,65536^v),z(n,48,f,k,0),N(n,r,k),z(n,32,o,A,8192^v),f=i[s+76>>2];continue}break}break}y=0;break i}l=61}i[806]=l}y=-1}return _=s+80|0,y}function t4(n){n|=0;var f=0,a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=u(0),A=0,l=u(0),v=0,h=0,y=0,m=0,g=0,I=0,S=0,M=0,P=0;_=o=_-48|0,d[n+60|0]=0;i:{if(f=i[n+8>>2],(0|(a=i[f+64>>2]))!=(0|(s=f- -64|0)))for(;;){f=i[a+12>>2],e=i[a>>2],b=i[a+16>>2],t=i[i[a+4>>2]+16>>2];f:{if(!(c[b+28>>2]!=c[t+28>>2]|c[b+32>>2]!=c[t+32>>2]|i[f+12>>2]==(0|a))){if(l0(n,f,a),$(a)){t=i[f+12>>2];break f}break i}t=f,f=a}if(i[t+12>>2]==(0|f)){if((0|f)!=(0|t)&&(e=(0|e)!=(0|t)&i[e+4>>2]!=(0|t)?e:i[e>>2],!$(t))||(a=(0|f)==(0|e)|i[e+4>>2]==(0|f)?i[e>>2]:e,!$(f)))break i}else a=e;if((0|a)==(0|s))break}(a=j(28))?((f=j(28))?(i[f+8>>2]=0,i[f+12>>2]=32,t=j(132),i[f>>2]=t,t?(e=j(264),i[f+4>>2]=e,e?(i[f+24>>2]=8,i[f+16>>2]=0,i[f+20>>2]=0,i[t+4>>2]=1,i[e+8>>2]=0):(Q(t),Q(f),f=0)):(Q(f),f=0)):f=0,i[a>>2]=f,f?(e=j(128),i[a+4>>2]=e,e?(i[a+24>>2]=8,i[a+20>>2]=0,i[a+12>>2]=0,i[a+16>>2]=32):(Q(i[f+4>>2]),Q(i[f>>2]),Q(f),Q(a),a=0)):(Q(a),a=0)):a=0,h=a,i[n+68>>2]=h;f:if(h){a=e=i[n+8>>2];a:{n:{for(;;){if((0|e)!=(0|(a=i[a>>2]))){if(f=X0(h,a),i[a+36>>2]=f,(0|f)!=2147483647)continue;break n}break}if(_=I=_-400|0,e=j(4+(f=(S=i[h+12>>2])<<2)|0),i[h+8>>2]=e,_=I+400|0,e){if((t=(f+e|0)-4|0)>>>0>=e>>>0)for(f=i[h+4>>2],a=e;i[a>>2]=f,f=f+4|0,t>>>0>=(a=a+4|0)>>>0;);for(i[I+4>>2]=t,i[I>>2]=e,v=8|I,M=2016473283,b=I;;){if((s=i[v-4>>2])>>>0>(k=i[b>>2])+40>>>0)for(;;){for(M=L(M,1539415821)+1|0,m=i[(f=((M>>>0)%(1+(s-k>>2)>>>0)<<2)+k|0)>>2],i[f>>2]=i[k>>2],i[k>>2]=m,f=s+4|0,a=k-4|0;;){e=f,t=a,a=a+4|0,A=i[t+4>>2],g=i[A>>2],r=c[g+28>>2],y=i[m>>2];e:if(!(r<(l=c[y+28>>2])))for(;;){if(f=a,!(!(c[g+32>>2]<=c[y+32>>2])|r!=l))break e;if(a=f+4|0,t=f,A=i[f+4>>2],g=i[A>>2],l>(r=c[g+28>>2]))break}v=i[(f=e-4|0)>>2],g=i[v>>2];e:if(!(l<(r=c[g+28>>2])))for(;;){if(!(!(c[y+32>>2]<=c[g+32>>2])|r!=l))break e;if(e=f,v=i[(f=f-4|0)>>2],g=i[v>>2],l<(r=c[g+28>>2]))break}if(i[a>>2]=v,i[f>>2]=A,!(f>>>0>a>>>0))break}if(v=i[a>>2],i[a>>2]=A,i[f>>2]=v,(a-k|0)<(s-f|0)?(f=e,a=s,s=t):(f=k,a=t,k=e),i[b+4>>2]=a,i[b>>2]=f,b=b+8|0,!(k+40>>>0>>0))break}if(v=b,(A=k+4|0)>>>0<=s>>>0)for(;;){y=i[A>>2];e:if(!(k>>>0>=(f=a=A)>>>0))for(;;){if(b=i[y>>2],r=c[b+28>>2],t=i[(f=a-4|0)>>2],e=i[t>>2],r<(l=c[e+28>>2])){f=a;break e}if(!(!(c[b+32>>2]<=c[e+32>>2])|r!=l)){f=a;break e}if(i[a>>2]=t,a=f,!(k>>>0>>0))break}if(i[f>>2]=y,!((A=A+4|0)>>>0<=s>>>0))break}if(!(I>>>0<=(b=v-8|0)>>>0))break}if(i[h+20>>2]=1,i[h+16>>2]=S,S=i[h>>2],(0|(b=i[S+8>>2]))>0)for(y=i[S+4>>2],m=i[S>>2],f=b;;){for(t=f,h=y+((A=i[m+(f<<2)>>2])<<3)|0,a=f;(0|b)<=(0|(f=a<<1))||(k=i[y+(i[m+((e=1|f)<<2)>>2]<<3)>>2],r=c[k+28>>2],s=i[y+(i[m+(f<<2)>>2]<<3)>>2],!(r<(l=c[s+28>>2]))&(!(c[k+32>>2]<=c[s+32>>2])|r!=l)||(f=e)),!((0|f)>(0|b)||(v=i[h>>2],r=c[v+28>>2],k=i[m+(f<<2)>>2],e=i[(s=y+(k<<3)|0)>>2],r<(l=c[e+28>>2])|r==l&c[v+32>>2]<=c[e+32>>2]));)i[m+(a<<2)>>2]=k,i[s+4>>2]=a,a=f;if(i[m+(a<<2)>>2]=A,i[h+4>>2]=a,f=t-1|0,!((0|t)>1))break}i[S+20>>2]=1,a=1}else a=0;if(a)break a}y0(i[n+68>>2]),i[n+68>>2]=0;break f}if((f=j(20))&&(i[f+16>>2]=9,i[f+12>>2]=n,i[f>>2]=0,i[f+8>>2]=f,i[f+4>>2]=f),i[n+64>>2]=f,!f)break i;if(o1(n,u(-3999999973526325e22)),o1(n,u(3999999973526325e22)),f=v0(i[n+68>>2]))for(;;){a:if(a=b1(i[n+68>>2]))for(;;){if(c[a+28>>2]!=c[f+28>>2]|c[a+32>>2]!=c[f+32>>2])break a;if(t=i[v0(i[n+68>>2])+8>>2],e=i[f+8>>2],i[o+24>>2]=0,i[o+28>>2]=0,i[o+16>>2]=0,i[o+20>>2]=0,i[o+8>>2]=0,i[o+12>>2]=0,i[o>>2]=1056964608,i[o+4>>2]=1056964608,a=i[e+16>>2],i[o+16>>2]=i[a+12>>2],i[o+20>>2]=i[i[t+16>>2]+12>>2],c[o+36>>2]=c[a+16>>2],c[o+40>>2]=c[a+20>>2],c[o+44>>2]=c[a+24>>2],i[a+12>>2]=0,b=a+12|0,(0|(a=i[n+1736>>2]))==10?R[i[n+76>>2]](o+36|0,o+16|0,o,b):R[0|a](o+36|0,o+16|0,o,b,i[n+1896>>2]),i[b>>2]||(i[b>>2]=i[o+16>>2]),!Z(e,t))break i;if(!(a=b1(i[n+68>>2])))break}if(a0(n,f),!(f=v0(i[n+68>>2])))break}for(a=i[i[i[n+64>>2]+4>>2]>>2],i[n+72>>2]=i[i[a>>2]+16>>2];i[i[a>>2]+24>>2]=0,m2(i[a+4>>2]),Q(a),f=i[n+64>>2],a=i[i[f+4>>2]>>2];);if((0|f)!=(0|(a=i[f+4>>2])))for(;Q(a),(0|f)!=(0|(a=i[a+4>>2])););if(Q(f),y0(i[n+68>>2]),P=1,f=i[n+8>>2],(0|(n=i[f+40>>2]))!=(0|(a=f+40|0)))for(;;){if(e=i[n+8>>2],n=i[n>>2],(0|e)==i[i[e+12>>2]+12>>2]&&(f=i[e+8>>2],i[f+28>>2]=i[f+28>>2]+i[e+28>>2],f=i[f+4>>2],i[f+28>>2]=i[f+28>>2]+i[i[e+4>>2]+28>>2],!$(e))){P=0;break f}if((0|n)==(0|a))break}}return _=o+48|0,0|P}k2(n+1740|0,1),b2()}function a0(n,f){var a=0,e=0,t=0,b=0,o=u(0),k=0,s=0,r=u(0),A=0,l=0,v=0;_=v=_-16|0,i[n+72>>2]=f,a=t=i[f+8>>2];i:{f:{a:{for(;;){if(e=i[a+24>>2])break a;if((0|t)==(0|(a=i[a+8>>2])))break}for(i[v>>2]=i[t+4>>2],t=a=i[n+64>>2];t=i[t+4>>2],(e=i[t>>2])&&!(0|R[i[a+16>>2]](i[a+12>>2],v,e)););if(e=i[t>>2],t=i[i[i[e+4>>2]+8>>2]>>2],k=i[t>>2],b=i[e>>2],J(i[i[b+4>>2]+16>>2],f,i[b+16>>2])==u(0)){if(o=c[f+28>>2],a=i[e>>2],t=i[a+16>>2],!(o!=c[t+28>>2]|c[t+32>>2]!=c[f+32>>2])){l0(n,a,i[f+8>>2]);break f}if(b=i[a+4>>2],t=i[b+16>>2],!(o==c[t+28>>2]&c[t+32>>2]==c[f+32>>2])){if(!o2(b))break i;if(w[e+15|0]){if(!$(i[a+8>>2]))break i;d[e+15|0]=0}if(!Z(i[f+8>>2],a))break i;a0(n,f);break f}for(;e=i[i[i[e+4>>2]+4>>2]>>2],(0|t)==i[i[i[e>>2]+4>>2]+16>>2];);if(t=i[i[i[e+4>>2]+8>>2]>>2],k=i[t>>2],b=i[k+4>>2],a=i[b+8>>2],w[t+15|0]){if(i[k+24>>2]=0,m2(i[t+4>>2]),Q(t),!$(b))break i;b=i[i[a+4>>2]+12>>2]}if(!Z(i[f+8>>2],b))break i;s=i[b+8>>2],t=i[i[a+4>>2]+16>>2],o=c[t+28>>2],k=i[a+16>>2],S2(n,e,s,a,f=o<(r=c[k+28>>2])|o==r&c[t+32>>2]<=c[k+32>>2]?a:0,1);break f}if(s=w[e+12|0],k=i[k+4>>2],A=i[k+16>>2],o=c[A+28>>2],l=i[i[b+4>>2]+16>>2],a=e,o<(r=c[l+28>>2])||o==r&&(a=e,c[A+32>>2]<=c[l+32>>2])||(a=t),s|w[a+15|0]){n:{if((0|e)==(0|a)){if(t=A2(i[i[f+8>>2]+4>>2],i[b+12>>2]))break n;break i}if(!(t=A2(i[i[k+8>>2]+4>>2],i[f+8>>2])))break i;t=i[t+4>>2]}if(w[a+15|0]){if($(i[a>>2])){i[a>>2]=t,d[a+15|0]=0,i[t+24>>2]=a,a0(n,f);break f}break i}if(!(a=j(16))||(i[a>>2]=t,e=w0(i[n+64>>2],i[e+4>>2],a),i[a+4>>2]=e,!e))break i;d[a+13|0]=0,d[a+14|0]=0,d[a+15|0]=0,i[t+24>>2]=a,b=i[n+56>>2],t=i[i[a>>2]+28>>2]+i[i[i[e+4>>2]>>2]+8>>2]|0,i[a+8>>2]=t;n:{e:switch(b-100130|0){case 0:e=1&t;break n;case 1:e=!!(0|t);break n;case 2:e=(0|t)>0;break n;case 3:e=t>>>31|0;break n;case 4:break e;default:break n}e=t-2>>>0<4294967293}d[a+12|0]=e,a0(n,f);break f}S2(a=n,e,n=i[f+8>>2],n,0,1);break f}for(f=i[i[e>>2]+16>>2];e=i[i[i[e+4>>2]+4>>2]>>2],a=i[e>>2],(0|f)==i[a+16>>2];);if(w[e+15|0]&&(!(f=A2(i[i[i[i[i[e+4>>2]+8>>2]>>2]>>2]+4>>2],i[a+12>>2]))||!$(i[e>>2])||(i[e>>2]=f,d[e+15|0]=0,i[f+24>>2]=e,!(e=i[i[i[e+4>>2]+4>>2]>>2]))))break i;if(f=i[i[i[e+4>>2]+8>>2]>>2],a=i[f>>2],f=L2(n,f,0),(0|a)!=(0|(t=i[f+8>>2])))S2(n,e,t,a,a,1);else{if(t=i[e>>2],A=i[i[i[e+4>>2]+8>>2]>>2],k=i[A>>2],i[i[t+4>>2]+16>>2]!=i[i[k+4>>2]+16>>2]&&J0(n,e),l=1,b=i[n+72>>2],o=c[b+28>>2],s=i[t+16>>2],!(o!=c[s+28>>2]|c[s+32>>2]!=c[b+32>>2])){if(!Z(i[i[a+4>>2]+12>>2],t))break i;for(a=i[i[e>>2]+16>>2];e=i[i[i[e+4>>2]+4>>2]>>2],b=i[e>>2],(0|a)==i[b+16>>2];);if(w[e+15|0]&&(!(a=A2(i[i[i[i[i[e+4>>2]+8>>2]>>2]>>2]+4>>2],i[b+12>>2]))||!$(i[e>>2])||(i[e>>2]=a,d[e+15|0]=0,i[a+24>>2]=e,!(e=i[i[i[e+4>>2]+4>>2]>>2]))))break i;b=i[i[i[e+4>>2]+8>>2]>>2],a=i[b>>2],L2(n,b,A),b=i[n+72>>2],o=c[b+28>>2],l=0}a:{if(r=o,s=i[k+16>>2],r!=(o=c[s+28>>2])|c[s+32>>2]!=c[b+32>>2]){if(l)break a}else{if(!Z(f,i[i[k+4>>2]+12>>2]))break i;f=L2(n,A,0)}S2(n,e,i[f+8>>2],a,a,1);break f}if(a=i[t+16>>2],!((r=c[a+28>>2])>o)&(!(c[s+32>>2]<=c[a+32>>2])|o!=r)||(t=i[i[k+4>>2]+12>>2]),!(f=A2(i[i[f+8>>2]+4>>2],t)))break i;S2(n,e,f,a=i[f+8>>2],a,0),d[i[i[f+4>>2]+24>>2]+15|0]=1,K0(n,e)}}return void(_=v+16|0)}k2(n+1740|0,1),b2()}function V0(n){n|=0;var f=0,a=0,e=0,t=u(0),b=u(0),o=0,k=0,s=u(0),r=0,A=u(0),l=u(0),v=0,h=0,y=u(0),m=u(0),g=u(0),I=u(0),S=u(0),M=u(0),P=u(0),T=u(0),O=u(0),G=u(0),Y=u(0),f2=0,E2=0,p0=0,m0=0,g0=0,E0=0,C0=0,R0=0,I0=u(0);h=i[n+8>>2],f=_-80|0,I=c[n+16>>2],c[f+8>>2]=I,S=c[n+20>>2],c[f+12>>2]=S,M=c[n+24>>2],c[f+16>>2]=M,r=i[h>>2];i:if(E2=I==u(0)&S==u(0)&M==u(0)){if(i[f+76>>2]=-42943038,i[f+68>>2]=-42943038,i[f+72>>2]=-42943038,i[f+64>>2]=2104540610,i[f+56>>2]=2104540610,i[f+60>>2]=2104540610,(0|h)!=(0|r)){for(g=u(19999999867631625e21),O=u(-19999999867631625e21),P=u(-19999999867631625e21),T=u(19999999867631625e21),G=u(-19999999867631625e21),Y=u(19999999867631625e21),A=u(-19999999867631625e21),s=u(19999999867631625e21),y=u(-19999999867631625e21),b=u(19999999867631625e21),l=u(-19999999867631625e21),m=u(19999999867631625e21),a=r;A=(e=(t=c[a+24>>2])>A)?t:A,O=e?t:O,s=(v=t>2])>y)?t:y,P=k?t:P,b=(f2=b>t)?t:b,T=f2?t:T,l=(o=(t=c[a+16>>2])>l)?t:l,G=o?t:G,p0=o?a:p0,m=(o=t>2])););i[f+20>>2]=m0,c[f+56>>2]=Y,c[f+68>>2]=G,i[f+32>>2]=p0,c[f+60>>2]=T,i[f+24>>2]=R0,c[f+72>>2]=P,i[f+36>>2]=C0,c[f+64>>2]=g,i[f+28>>2]=E0,c[f+76>>2]=O,i[f+40>>2]=g0,s=u(A-s),A=u(l-m),b=u(y-b)}else A=u(-3999999973526325e22),s=u(-3999999973526325e22),b=u(-3999999973526325e22);if(a=2,e=(k=b>A)<<2,v=k,o=f+56|0,v=u(c[(k=f+68|0)+e>>2]-c[o+e>>2])>2]>=c[e+k>>2])i[f+8>>2]=0,i[f+12>>2]=0;else{if(a=i[(e=v<<2)+(f+20|0)>>2],e=i[e+(f+32|0)>>2],G=c[e+16>>2],g=u(c[a+16>>2]-G),c[f+44>>2]=g,Y=c[e+20>>2],l=u(c[a+20>>2]-Y),c[f+48>>2]=l,I0=c[e+24>>2],m=u(c[a+24>>2]-I0),O=u(-g),(0|h)!=(0|r)){for(T=u(-l),P=u(-m),b=u(0),a=r;s=u(c[a+20>>2]-Y),t=u(c[a+16>>2]-G),A=u(u(g*s)+u(t*T)),y=u(c[a+24>>2]-I0),s=u(u(l*y)+u(s*P)),t=u(u(m*t)+u(y*O)),(y=u(u(A*A)+u(u(s*s)+u(t*t))))>b&&(M=A,S=t,I=s,b=y),(0|h)!=(0|(a=i[a>>2])););if(c[f+16>>2]=M,c[f+12>>2]=S,c[f+8>>2]=I,!(b<=u(0)))break i}else P=u(-m),T=u(-l);i[f+16>>2]=0,i[f+8>>2]=0,i[f+12>>2]=0,a=(l(g>2],a=(m(b>2]=1065353216,M=c[f+16>>2],I=c[f+8>>2],S=c[f+12>>2]}if(k=f+8|0,e=(S(I>2],a=n+28|0,f=(M(b>2]=0,i[(o=((0|(o=f+1|0))!=3?o:0)<<2)+a>>2]=1065353216,i[(f=(f+2>>>0)%3<<2)+a>>2]=0,i[(a=n+40|0)+e>>2]=0,e=c[e+k>>2]>u(0),c[a+o>>2]=u(e?-0:0),c[f+a>>2]=u(e?1:-1),!(e=(0|h)==(0|r)))for(a=r;f=i[a+20>>2],i[a+28>>2]=i[a+16>>2],i[a+32>>2]=f,(0|h)!=(0|(a=i[a>>2])););if(E2&&(0|(f=i[h+40>>2]))!=(0|(k=h+40|0))){for(b=u(0);;){if(o=i[f+8>>2],i[(a=o)+28>>2]>0)for(;v=i[a+16>>2],f2=i[i[a+4>>2]+16>>2],b=u(u(u(c[v+28>>2]-c[f2+28>>2])*u(c[v+32>>2]+c[f2+32>>2]))+b),(0|o)!=(0|(a=i[a+12>>2])););if((0|k)==(0|(f=i[f>>2])))break}if(b>2]=-c[r+32>>2],(0|(r=i[r>>2]))!=(0|h););c[n+40>>2]=-c[n+40>>2],c[n+44>>2]=-c[n+44>>2],c[n+48>>2]=-c[n+48>>2]}}}function o4(n,f){f|=0;var a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0,A=0,l=0,v=0,h=0,y=0,m=0,g=0,I=0,S=0,M=0,P=0;if(_=k=_-16|0,i[84+(n|=0)>>2]=0,!(a=(0|(r=i[f+40>>2]))==(0|(h=f+40|0)))){for(f=r;d[f+20|0]=0,(0|h)!=(0|(f=i[f>>2])););if(!a){for(;;){if(!(w[r+20|0]|!w[r+21|0])){if(o=i[r+8>>2],w[n+80|0])f=1,a=1;else{b=0,t=0,f=0,e=i[(a=o)+20>>2];i:if(w[e+21|0])for(;;){if(w[(f=e)+20|0]){f=t;break i}if(d[f+20|0]=1,i[f+16>>2]=t,b=b+1|0,t=f,a=i[a+8>>2],e=i[a+20>>2],!w[e+21|0])break}e=i[o+4>>2],t=i[e+20>>2];i:{f:if(!w[t+21|0]|w[t+20|0]){if(y=o,!f)break i}else for(a=f;;){if(d[(f=t)+20|0]=1,i[f+16>>2]=a,b=b+1|0,y=i[e+12>>2],e=i[y+4>>2],t=i[e+20>>2],!w[t+21|0])break f;if(a=f,w[t+20|0])break}for(;d[f+20|0]=0,f=i[f+16>>2];);}m=(0|b)>1,t=0,e=0,f=0,A=i[o+12>>2],a=i[(s=A)+20>>2];i:if(w[a+21|0])for(;;){if(w[(f=a)+20|0]){f=e;break i}if(d[f+20|0]=1,i[f+16>>2]=e,t=t+1|0,e=f,s=i[s+8>>2],a=i[s+20>>2],!w[a+21|0])break}l=m?b:1,e=i[A+4>>2],b=i[e+20>>2];i:{f:if(!w[b+21|0]|w[b+20|0]){if(!f)break i}else for(a=f;;){if(d[(f=b)+20|0]=1,i[f+16>>2]=a,t=t+1|0,A=i[e+12>>2],e=i[A+4>>2],b=i[e+20>>2],!w[b+21|0])break f;if(a=f,w[b+20|0])break}for(;d[f+20|0]=0,f=i[f+16>>2];);}g=(0|t)>(0|l),b=0,e=0,f=0,v=i[i[o+8>>2]+4>>2],a=i[(s=v)+20>>2];i:if(w[a+21|0])for(;;){if(w[(f=a)+20|0]){f=e;break i}if(d[f+20|0]=1,i[f+16>>2]=e,b=b+1|0,e=f,s=i[s+8>>2],a=i[s+20>>2],!w[a+21|0])break}s=g?t:l,e=i[v+4>>2],t=i[e+20>>2];i:{f:if(!w[t+21|0]|w[t+20|0]){if(!f)break i}else for(a=f;;){if(d[(f=t)+20|0]=1,i[f+16>>2]=a,b=b+1|0,v=i[e+12>>2],e=i[v+4>>2],t=i[e+20>>2],!w[t+21|0])break f;if(a=f,w[t+20|0])break}for(;d[f+20|0]=0,f=i[f+16>>2];);}A0(f=k+4|0,o),I=i[k+12>>2],S=i[k+8>>2],a=i[k+4>>2],A0(f,i[o+12>>2]),M=i[k+12>>2],P=i[k+8>>2],l=i[k+4>>2],A0(f,i[i[o+8>>2]+4>>2]),f=b,(0|(f=(t=(0|(f=(e=(0|(f=(b=(0|b)>(0|s))?f:s))<(0|a))?a:f))<(0|l))?l:f))>=(0|(a=i[k+4>>2]))?(o=t?P:e?S:b?v:g?A:m?y:o,a=t?M:e?I:b||g||m?2:1):(o=i[k+8>>2],f=a,a=i[k+12>>2])}R[0|a](n,o,f)}if((0|h)==(0|(r=i[r>>2])))break}if(o=i[n+84>>2]){for((0|(f=i[n+1716>>2]))==3?R[i[n+88>>2]](4):R[0|f](4,i[n+1896>>2]),b=-1;;){for(f=i[o+8>>2];w[n+80|0]&&(0|(a=!(e=w[i[i[f+4>>2]+20>>2]+21|0])))!=(0|b)&&((0|(t=i[n+1720>>2]))==4?R[i[n+92>>2]](!e):R[0|t](!e,i[n+1896>>2]),b=a),(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[f+16>>2]+12>>2]):R[0|a](i[i[f+16>>2]+12>>2],i[n+1896>>2]),(0|(f=i[f+12>>2]))!=i[o+8>>2];);if(!(o=i[o+16>>2]))break}(0|(f=i[n+1728>>2]))==6?R[i[n+100>>2]]():R[0|f](i[n+1896>>2]),i[n+84>>2]=0}}}_=k+16|0}function Q(n){var f=0,a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0;i:if(n|=0){b=(e=n-8|0)+(n=-8&(f=i[n-4>>2]))|0;f:if(!(1&f)){if(!(2&f)||(e=e-(f=i[e>>2])|0)>>>0>>0<=255){if(t=f>>>3|0,(0|(f=i[e+12>>2]))==(0|(a=i[e+8>>2]))){s=3416,r=i[854]&i2(t),i[s>>2]=r;break f}i[a+12>>2]=f,i[f+8>>2]=a;break f}if(k=i[e+24>>2],(0|e)!=(0|(f=i[e+12>>2]))){a=i[e+8>>2],i[a+12>>2]=f,i[f+8>>2]=a;break a}if(!(a=i[(t=e+20|0)>>2])){if(!(a=i[e+16>>2]))break n;t=e+16|0}for(;o=t,(a=i[(t=(f=a)+20|0)>>2])||(t=f+16|0,a=i[f+16>>2]););i[o>>2]=0;break a}if(3&~(f=i[b+4>>2]))break f;return i[856]=n,i[b+4>>2]=-2&f,i[e+4>>2]=1|n,void(i[b>>2]=n)}f=0}if(k){a=i[e+28>>2];a:{if(i[(t=3720+(a<<2)|0)>>2]==(0|e)){if(i[t>>2]=f,f)break a;s=3420,r=i[855]&i2(a),i[s>>2]=r;break f}if(i[k+(i[k+16>>2]==(0|e)?16:20)>>2]=f,!f)break f}i[f+24>>2]=k,(a=i[e+16>>2])&&(i[f+16>>2]=a,i[a+24>>2]=f),(a=i[e+20>>2])&&(i[f+20>>2]=a,i[a+24>>2]=f)}}if(!(e>>>0>=b>>>0)&&1&(f=i[b+4>>2])){f:{a:{n:{e:{if(!(2&f)){if(i[860]==(0|b)){if(i[860]=e,n=i[857]+n|0,i[857]=n,i[e+4>>2]=1|n,i[859]!=(0|e))break i;return i[856]=0,void(i[859]=0)}if(i[859]==(0|b))return i[859]=e,n=i[856]+n|0,i[856]=n,i[e+4>>2]=1|n,void(i[n+e>>2]=n);if(n=(-8&f)+n|0,f>>>0<=255){if(t=f>>>3|0,(0|(f=i[b+12>>2]))==(0|(a=i[b+8>>2]))){s=3416,r=i[854]&i2(t),i[s>>2]=r;break a}i[a+12>>2]=f,i[f+8>>2]=a;break a}if(k=i[b+24>>2],(0|b)!=(0|(f=i[b+12>>2]))){a=i[b+8>>2],i[a+12>>2]=f,i[f+8>>2]=a;break n}if(!(a=i[(t=b+20|0)>>2])){if(!(a=i[b+16>>2]))break e;t=b+16|0}for(;o=t,(a=i[(t=(f=a)+20|0)>>2])||(t=f+16|0,a=i[f+16>>2]););i[o>>2]=0;break n}i[b+4>>2]=-2&f,i[e+4>>2]=1|n,i[n+e>>2]=n;break f}f=0}if(k){a=i[b+28>>2];n:{if(i[(t=3720+(a<<2)|0)>>2]==(0|b)){if(i[t>>2]=f,f)break n;s=3420,r=i[855]&i2(a),i[s>>2]=r;break a}if(i[k+(i[k+16>>2]==(0|b)?16:20)>>2]=f,!f)break a}i[f+24>>2]=k,(a=i[b+16>>2])&&(i[f+16>>2]=a,i[a+24>>2]=f),(a=i[b+20>>2])&&(i[f+20>>2]=a,i[a+24>>2]=f)}}if(i[e+4>>2]=1|n,i[n+e>>2]=n,i[859]==(0|e))return void(i[856]=n)}if(n>>>0<=255)return f=3456+(-8&n)|0,(a=i[854])&(n=1<<(n>>>3))?n=i[f+8>>2]:(i[854]=n|a,n=f),i[f+8>>2]=e,i[n+12>>2]=e,i[e+12>>2]=f,void(i[e+8>>2]=n);a=31,n>>>0<=16777215&&(a=62+((n>>>38-(f=s2(n>>>8|0))&1)-(f<<1)|0)|0),i[e+28>>2]=a,i[e+16>>2]=0,i[e+20>>2]=0,f=3720+(a<<2)|0;f:{a:{if((t=i[855])&(o=1<>>1|0):0),f=i[f>>2];;){if(t=f,(-8&i[f+4>>2])==(0|n))break a;if(o=a>>>29|0,a<<=1,!(f=i[16+(o=f+(4&o)|0)>>2]))break}i[o+16>>2]=e,i[e+24>>2]=t}else i[855]=t|o,i[f>>2]=e,i[e+24>>2]=f;i[e+12>>2]=e,i[e+8>>2]=e;break f}n=i[t+8>>2],i[n+12>>2]=e,i[t+8>>2]=e,i[e+24>>2]=0,i[e+12>>2]=t,i[e+8>>2]=n}n=i[862]-1|0,i[862]=n||-1}}}function z0(n,f){var a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0;b=n+f|0;i:{f:if(!(1&(a=i[n+4>>2]))){if(!(2&a))break i;f=(a=i[n>>2])+f|0;a:{n:{e:{if((0|(n=n-a|0))!=i[859]){if(a>>>0<=255){if((0|(e=i[n+8>>2]))!=(0|(t=i[n+12>>2])))break e;s=3416,r=i[854]&i2(a>>>3|0),i[s>>2]=r;break f}if(k=i[n+24>>2],(0|(a=i[n+12>>2]))!=(0|n)){e=i[n+8>>2],i[e+12>>2]=a,i[a+8>>2]=e;break a}if(!(e=i[(t=n+20|0)>>2])){if(!(e=i[n+16>>2]))break n;t=n+16|0}for(;o=t,(e=i[(t=(a=e)+20|0)>>2])||(t=a+16|0,e=i[a+16>>2]););i[o>>2]=0;break a}if(3&~(a=i[b+4>>2]))break f;return i[856]=f,i[b+4>>2]=-2&a,i[n+4>>2]=1|f,void(i[b>>2]=f)}i[e+12>>2]=t,i[t+8>>2]=e;break f}a=0}if(k){e=i[n+28>>2];a:{if(i[(t=3720+(e<<2)|0)>>2]==(0|n)){if(i[t>>2]=a,a)break a;s=3420,r=i[855]&i2(e),i[s>>2]=r;break f}if(i[k+(i[k+16>>2]==(0|n)?16:20)>>2]=a,!a)break f}i[a+24>>2]=k,(e=i[n+16>>2])&&(i[a+16>>2]=e,i[e+24>>2]=a),(e=i[n+20>>2])&&(i[a+20>>2]=e,i[e+24>>2]=a)}}f:{a:{n:{e:{if(!(2&(a=i[b+4>>2]))){if(i[860]==(0|b)){if(i[860]=n,f=i[857]+f|0,i[857]=f,i[n+4>>2]=1|f,i[859]!=(0|n))break i;return i[856]=0,void(i[859]=0)}if(i[859]==(0|b))return i[859]=n,f=i[856]+f|0,i[856]=f,i[n+4>>2]=1|f,void(i[n+f>>2]=f);if(f=(-8&a)+f|0,a>>>0<=255){if(t=a>>>3|0,(0|(a=i[b+12>>2]))==(0|(e=i[b+8>>2]))){s=3416,r=i[854]&i2(t),i[s>>2]=r;break a}i[e+12>>2]=a,i[a+8>>2]=e;break a}if(k=i[b+24>>2],(0|b)!=(0|(a=i[b+12>>2]))){e=i[b+8>>2],i[e+12>>2]=a,i[a+8>>2]=e;break n}if(!(e=i[(t=b+20|0)>>2])){if(!(e=i[b+16>>2]))break e;t=b+16|0}for(;o=t,(e=i[(t=(a=e)+20|0)>>2])||(t=a+16|0,e=i[a+16>>2]););i[o>>2]=0;break n}i[b+4>>2]=-2&a,i[n+4>>2]=1|f,i[n+f>>2]=f;break f}a=0}if(k){e=i[b+28>>2];n:{if(i[(t=3720+(e<<2)|0)>>2]==(0|b)){if(i[t>>2]=a,a)break n;s=3420,r=i[855]&i2(e),i[s>>2]=r;break a}if(i[k+(i[k+16>>2]==(0|b)?16:20)>>2]=a,!a)break a}i[a+24>>2]=k,(e=i[b+16>>2])&&(i[a+16>>2]=e,i[e+24>>2]=a),(e=i[b+20>>2])&&(i[a+20>>2]=e,i[e+24>>2]=a)}}if(i[n+4>>2]=1|f,i[n+f>>2]=f,i[859]==(0|n))return void(i[856]=f)}if(f>>>0<=255)return a=3456+(-8&f)|0,(e=i[854])&(f=1<<(f>>>3))?f=i[a+8>>2]:(i[854]=f|e,f=a),i[a+8>>2]=n,i[f+12>>2]=n,i[n+12>>2]=a,void(i[n+8>>2]=f);e=31,f>>>0<=16777215&&(e=62+((f>>>38-(a=s2(f>>>8|0))&1)-(a<<1)|0)|0),i[n+28>>2]=e,i[n+16>>2]=0,i[n+20>>2]=0,a=3720+(e<<2)|0;f:{if((t=i[855])&(o=1<>>1|0):0),a=i[a>>2];;){if(t=a,(-8&i[a+4>>2])==(0|f))break f;if(o=e>>>29|0,e<<=1,!(a=i[16+(o=a+(4&o)|0)>>2]))break}i[o+16>>2]=n,i[n+24>>2]=t}else i[855]=t|o,i[a>>2]=n,i[n+24>>2]=a;return i[n+12>>2]=n,void(i[n+8>>2]=n)}f=i[t+8>>2],i[f+12>>2]=n,i[t+8>>2]=n,i[n+24>>2]=0,i[n+12>>2]=t,i[n+8>>2]=f}}function b4(n){n|=0;var f=0,a=0,e=u(0),t=u(0),b=u(0),o=u(0),k=u(0),s=0,r=u(0),A=0,l=0,v=u(0),h=u(0),y=0,m=u(0),g=u(0),I=0,S=u(0),M=u(0),P=u(0),T=u(0),O=u(0),G=u(0),Y=0;i:{f:if(!((0|(y=i[n+112>>2]))<3)){if(I=116+((Y=y<<4)+n|0)|0,S=c[n+124>>2],M=c[n+120>>2],o=c[n+24>>2],P=c[n+116>>2],r=c[n+16>>2],k=c[n+20>>2],!(r!=u(0)|k!=u(0))&o==u(0))for(a=n+148|0,o=u(0),k=u(0),r=u(0),e=v=u(c[(f=n+132|0)>>2]-P),t=h=u(c[n+136>>2]-M),m=b=u(c[n+140>>2]-S);T=u(c[f+20>>2]-M),O=u(c[a>>2]-P),G=u(u(e*T)-u(O*t)),g=u(c[f+24>>2]-S),t=u(u(t*g)-u(T*m)),e=u(u(m*O)-u(g*e)),u(u(G*o)+u(u(t*r)+u(k*e)))>=u(0)?(o=u(o+G),k=u(k+e),t=u(r+t)):(o=u(o-G),k=u(k-e),t=u(r-t)),r=t,e=O,t=T,m=g,I>>>0>(a=(f=a)+16|0)>>>0;);else v=u(c[n+132>>2]-P),h=u(c[n+136>>2]-M),b=u(c[n+140>>2]-S);for(a=n+148|0,f=A=n+132|0;;){e=b,b=h,s=f,t=v,h=u(c[f+20>>2]-M),v=u(c[(f=a)>>2]-P),g=u(u(u(t*h)-u(b*v))*o),m=b,b=u(c[s+24>>2]-S);a:if((e=u(g+u(u(u(u(m*b)-u(h*e))*r)+u(k*u(u(e*v)-u(b*t))))))!=u(0)){if(e>u(0)){if(a=0,s=(0|l)<0,l=1,!s)break a;break i}if(a=0,s=(0|l)>0,l=-1,s)break i}if(!(I>>>0>(a=f+16|0)>>>0))break}if(l){a=1;a:{n:switch(i[n+56>>2]-100132|0){case 0:if((0|l)>=0)break a;break f;case 2:break i;case 1:break n;default:break a}if((0|l)>0)break f}(0|(f=i[n+1716>>2]))==3?R[i[n+88>>2]](w[n+81|0]?2:(0|y)<4?4:6):R[0|f](w[n+81|0]?2:(0|y)<4?4:6,i[n+1896>>2]),(0|(f=i[n+1724>>2]))==5?R[i[n+96>>2]](i[n+128>>2]):R[0|f](i[n+128>>2],i[n+1896>>2]);a:if((0|l)<=0){if((0|y)<2)break a;for(f=Y+100|0;a=n+f|0,(0|(s=i[n+1724>>2]))==5?R[i[n+96>>2]](i[a+12>>2]):R[0|s](i[a+12>>2],i[n+1896>>2]),a=(0|f)>132,f=f-16|0,a;);}else if(!(A>>>0>=I>>>0))for(;(0|(f=i[n+1724>>2]))==5?R[i[n+96>>2]](i[A+12>>2]):R[0|f](i[A+12>>2],i[n+1896>>2]),I>>>0>(A=A+16|0)>>>0;);(0|(f=i[n+1728>>2]))==6?R[i[n+100>>2]]():R[0|f](i[n+1896>>2])}}a=1}return 0|a}function c0(n,f){var a=0,e=0,t=0,b=0,o=u(0),k=0,s=u(0),r=0,A=0,l=0,v=0,h=0,y=0,m=0,g=0,I=0,S=0,M=0,P=0;i:{l=i[f>>2],t=i[l+16>>2],s=c[t+28>>2],a=i[i[i[f+4>>2]+8>>2]>>2],v=i[a>>2],b=i[v+16>>2];f:{if(!(!(s<(o=c[b+28>>2]))&(!(c[t+32>>2]<=c[b+32>>2])|s!=o))){if(J(i[i[v+4>>2]+16>>2],t,b)>u(0))break f;if(t=i[l+16>>2],b=i[v+16>>2],!(c[t+28>>2]==c[b+28>>2]&c[t+32>>2]==c[b+32>>2])){if(!o2(i[v+4>>2])||!Z(l,i[i[v+4>>2]+12>>2]))break i;return d[a+14|0]=1,d[f+14|0]=1,1}if(e=1,(0|t)==(0|b))break f;if(k=i[n+68>>2],(0|(b=i[t+36>>2]))>=0){if(h=i[k>>2],r=i[h>>2],A=i[h+4>>2],f=i[4+(I=A+(b<<3)|0)>>2],m=i[h+8>>2],g=i[r+(m<<2)>>2],i[r+(f<<2)>>2]=g,M=e=(g<<3)+A|0,i[e+4>>2]=f,S=m-1|0,i[h+8>>2]=S,(0|f)<(0|m)){a:{if((0|f)<2||(a=i[(i[r+(f<<1&-4)>>2]<<3)+A>>2],o=c[a+28>>2],y=i[e>>2],o<(s=c[y+28>>2])||!(!(c[a+32>>2]<=c[y+32>>2])|s!=o)))for(P=(g<<3)+A|0;;){if((0|S)<=(0|(a=f<<1))||(k=i[(i[r+((e=1|a)<<2)>>2]<<3)+A>>2],s=c[k+28>>2],t=i[(i[r+(a<<2)>>2]<<3)+A>>2],!(s<(o=c[t+28>>2]))&(!(c[k+32>>2]<=c[t+32>>2])|s!=o)||(a=e)),(0|a)>=(0|m)){a=f;break a}if(y=i[P>>2],s=c[y+28>>2],k=i[r+(a<<2)>>2],e=i[(t=(k<<3)+A|0)>>2],s<(o=c[e+28>>2])){a=f;break a}if(!(!(c[y+32>>2]<=c[e+32>>2])|s!=o)){a=f;break a}i[r+(f<<2)>>2]=k,i[t+4>>2]=f,f=a}for(;;){if(k=i[r+((a=f>>>1|0)<<2)>>2],e=i[(t=(k<<3)+A|0)>>2],(o=c[e+28>>2])>2]<=c[y+32>>2])|s!=o)){a=f;break a}if(i[r+(f<<2)>>2]=k,i[t+4>>2]=f,e=f>>>0>3,f=a,!e)break}}i[r+(a<<2)>>2]=g,i[M+4>>2]=a}i[I>>2]=0,i[I+4>>2]=i[h+16>>2],i[h+16>>2]=b}else{i[i[k+4>>2]+(~b<<2)>>2]=0;a:if(!((0|(f=i[k+12>>2]))<=0))for(b=i[k+8>>2]-4|0;;){if(i[i[b+(f<<2)>>2]>>2])break a;if(a=f-1|0,i[k+12>>2]=a,e=(0|f)>1,f=a,!e)break}}return l0(n,i[i[v+4>>2]+12>>2],l),1}if(!(J(i[i[l+4>>2]+16>>2],b,t)>2]+4>>2]>>2]+14|0]=1,!o2(i[l+4>>2])||!Z(i[i[v+4>>2]+12>>2],l)))break i}return e}k2(n+1740|0,1),b2()}function n0(n,f){var a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0,A=0,l=0,v=0,h=0,y=0;if(!n)return j(f);if(f>>>0>=4294967232)return i[806]=48,0;b=f>>>0<11?16:f+11&-8,e=-8&(s=i[4+(t=n-8|0)>>2]);i:if(3&s){o=e+t|0;f:if(e>>>0>=b>>>0){if((a=e-b|0)>>>0<16)break f;i[t+4>>2]=1&s|b|2,i[4+(e=t+b|0)>>2]=3|a,i[o+4>>2]=1|i[o+4>>2],z0(e,a)}else if(i[860]!=(0|o))if(i[859]!=(0|o)){if(2&(k=i[o+4>>2])||(r=e+(-8&k)|0)>>>0>>0)break i;l=r-b|0;a:if(k>>>0<=255){if((0|(a=i[o+12>>2]))==(0|(e=i[o+8>>2]))){h=3416,y=i[854]&i2(k>>>3|0),i[h>>2]=y;break a}i[e+12>>2]=a,i[a+8>>2]=e}else{A=i[o+24>>2];n:if((0|o)==(0|(e=i[o+12>>2]))){e:{if(!(k=i[(a=o+20|0)>>2])){if(!(k=i[o+16>>2]))break e;a=o+16|0}for(;v=a,(k=i[(a=(e=k)+20|0)>>2])||(a=e+16|0,k=i[e+16>>2]););i[v>>2]=0;break n}e=0}else a=i[o+8>>2],i[a+12>>2]=e,i[e+8>>2]=a;if(A){a=i[o+28>>2];n:{if(i[(k=3720+(a<<2)|0)>>2]==(0|o)){if(i[k>>2]=e,e)break n;h=3420,y=i[855]&i2(a),i[h>>2]=y;break a}if(i[(i[A+16>>2]==(0|o)?16:20)+A>>2]=e,!e)break a}i[e+24>>2]=A,(a=i[o+16>>2])&&(i[e+16>>2]=a,i[a+24>>2]=e),(a=i[o+20>>2])&&(i[e+20>>2]=a,i[a+24>>2]=e)}}l>>>0<=15?(i[t+4>>2]=1&s|r|2,i[4+(a=t+r|0)>>2]=1|i[a+4>>2]):(i[t+4>>2]=1&s|b|2,i[4+(a=t+b|0)>>2]=3|l,i[4+(e=t+r|0)>>2]=1|i[e+4>>2],z0(a,l))}else{if((e=e+i[856]|0)>>>0>>0)break i;(a=e-b|0)>>>0>=16?(i[t+4>>2]=1&s|b|2,i[4+(k=t+b|0)>>2]=1|a,i[(e=e+t|0)>>2]=a,i[e+4>>2]=-2&i[e+4>>2]):(i[t+4>>2]=e|1&s|2,i[4+(a=e+t|0)>>2]=1|i[a+4>>2],a=0),i[859]=k,i[856]=a}else{if((e=e+i[857]|0)>>>0<=b>>>0)break i;i[t+4>>2]=1&s|b|2,e=e-b|0,i[4+(a=t+b|0)>>2]=1|e,i[857]=e,i[860]=a}a=t}else{if(b>>>0<256||e>>>0>=b+4>>>0&&(a=t,e-b>>>0<=i[974]<<1>>>0))break i;a=0}return a?a+8|0:(a=j(f))?(q0(a,n,f>>>0>(t=(3&(t=i[n-4>>2])?-4:-8)+(-8&t)|0)>>>0?t:f),Q(n),a):0}function K0(n,f){var a=0,e=0,t=0,b=0,o=0,k=0,s=u(0),r=0,A=u(0);for(e=i[i[i[f+4>>2]+8>>2]>>2];;){i:{if(w[e+14|0])for(;e=i[i[i[(f=e)+4>>2]+8>>2]>>2],w[e+14|0];);f:{a:{n:{e:{if(w[f+14|0])a=f;else if(!(a=i[i[i[f+4>>2]+4>>2]>>2])||(e=f,!w[a+14|0]))break e;d[a+14|0]=0,t=i[a>>2],f=i[i[t+4>>2]+16>>2],o=i[e>>2];t:if((0|f)!=i[i[o+4>>2]+16>>2]){s=c[f+28>>2],r=i[i[i[a+4>>2]+8>>2]>>2],b=i[r>>2],k=i[i[b+4>>2]+16>>2];u:{if(!(!(s<(A=c[k+28>>2]))&(!(c[f+32>>2]<=c[k+32>>2])|s!=A))){if(J(f,k,i[t+16>>2])>2]+4>>2]>>2]+14|0]=1,!(f=o2(t)))break f;if(Z(i[b+4>>2],f))break u;break i}if(J(k,f,i[b+16>>2])>u(0)){f=a;break t}if(d[r+14|0]=1,d[a+14|0]=1,!(f=o2(b))||!Z(i[t+12>>2],i[b+4>>2]))break i;f=i[f+4>>2]}if(d[i[f+20>>2]+21|0]=w[a+12|0],w[e+15|0]){if(i[i[e>>2]+24>>2]=0,m2(i[e+4>>2]),Q(e),!$(o))break i;e=i[i[i[a+4>>2]+8>>2]>>2],o=i[e>>2],f=a}else if(w[a+15|0]){if(i[i[a>>2]+24>>2]=0,m2(i[a+4>>2]),Q(a),!$(t))break i;f=i[i[i[e+4>>2]+4>>2]>>2],t=i[f>>2]}else f=a}else f=a;if(i[t+16>>2]==i[o+16>>2])break a;if(a=i[i[t+4>>2]+16>>2],b=i[i[o+4>>2]+16>>2],w[e+15|0]|w[f+15|0]|(0|a)==(0|b)||(0|(k=a))!=(0|(a=i[n+72>>2]))&(0|a)!=(0|b))break n;if(!J0(n,f))break a}return}c0(n,f)}if(i[t+16>>2]!=i[o+16>>2]||(b=i[t+4>>2],a=i[o+4>>2],i[b+16>>2]!=i[a+16>>2]))continue;if(i[o+28>>2]=i[o+28>>2]+i[t+28>>2],i[a+28>>2]=i[a+28>>2]+i[b+28>>2],i[i[f>>2]+24>>2]=0,m2(i[f+4>>2]),Q(f),!$(t))break i;f=i[i[i[e+4>>2]+4>>2]>>2];continue}}break}k2(n+1740|0,1),b2()}function k4(n){n|=0;var f=0,a=0,e=0,t=u(0),b=u(0),o=0,k=0,s=0,r=0;if((0|(f=i[n+40>>2]))!=(0|(s=n+40|0)))for(;;){if(n=i[f>>2],w[f+21|0]){for(f=f+8|0;f=i[f>>2],e=i[i[f+4>>2]+16>>2],t=c[e+28>>2],a=i[f+16>>2],!(!(t<(b=c[a+28>>2]))&(!(c[e+32>>2]<=c[a+32>>2])|t!=b));)f=i[f+8>>2]+4|0;for(;!(!(t>b)&(!(c[a+32>>2]<=c[e+32>>2])|t!=b));)f=i[f+12>>2],a=i[f+16>>2],b=c[a+28>>2],e=i[i[f+4>>2]+16>>2],t=c[e+28>>2];i:{if((0|(e=i[i[f+8>>2]+4>>2]))!=i[f+12>>2])for(;;){if(a=i[i[f+4>>2]+16>>2],t=c[a+28>>2],o=i[e+16>>2],!(t<(b=c[o+28>>2]))&(!(c[a+32>>2]<=c[o+32>>2])|t!=b)){f:if(i[e+12>>2]!=(0|f))for(;;){if(a=i[i[f+8>>2]+4>>2],o=i[a+16>>2],t=c[o+28>>2],k=i[i[a+4>>2]+16>>2],!(t<(b=c[k+28>>2])|t==b&c[o+32>>2]<=c[k+32>>2])){if(!(J(i[i[f+4>>2]+16>>2],i[f+16>>2],o)>=u(0)))break f;a=i[i[f+8>>2]+4>>2]}if(f=A2(f,a),a=0,!f)break i;if((0|(f=i[f+4>>2]))==i[e+12>>2])break}f=i[f+12>>2]}else{f:if((0|(a=i[e+12>>2]))!=(0|f))for(o=e+12|0;;){if(k=i[i[a+4>>2]+16>>2],t=c[k+28>>2],r=i[a+16>>2],!(t<(b=c[r+28>>2])|t==b&c[k+32>>2]<=c[r+32>>2])){if(!(J(i[e+16>>2],i[i[e+4>>2]+16>>2],k)<=u(0)))break f;a=i[o>>2]}if(e=A2(a,e),a=0,!e)break i;if(o=(e=i[e+4>>2])+12|0,(0|(a=i[e+12>>2]))==(0|f))break}e=i[i[e+8>>2]+4>>2]}if(i[f+12>>2]==(0|e))break}if(a=i[e+12>>2],i[a+12>>2]!=(0|f))for(;;){if(e=A2(a,e),a=0,!e)break i;if(e=i[e+4>>2],a=i[e+12>>2],i[a+12>>2]==(0|f))break}a=1}if(!a)return 0}if((0|s)==(0|(f=n)))break}return 1}function S2(n,f,a,e,t,b){var o=0,k=0,s=0,r=0,A=0;i:{for(;;){if(k=i[a+4>>2],!(o=j(16))||(i[o>>2]=k,s=w0(i[n+64>>2],i[f+4>>2],o),i[o+4>>2]=s,!s))break i;if(d[o+13|0]=0,d[o+14|0]=0,d[o+15|0]=0,i[k+24>>2]=o,(0|e)==(0|(a=i[a+8>>2])))break}if(a=i[i[i[f+4>>2]+8>>2]>>2],k=i[i[a>>2]+4>>2],t=t||i[k+8>>2],i[k+16>>2]==i[t+16>>2]){if(i[k+8>>2]!=(0|t)&&(!Z(i[i[k+4>>2]+12>>2],k)||!Z(i[i[t+4>>2]+12>>2],k)))break i;e=(t=i[f+8>>2])-(s=i[k+28>>2])|0,i[a+8>>2]=e;f:{a:switch(i[n+56>>2]-100130|0){case 4:o=e-2>>>0<4294967293;break f;case 3:o=e>>>31|0;break f;case 2:o=(0|e)>0;break f;case 1:o=(0|t)!=(0|s);break f;case 0:break a;default:break f}o=1&e}if(d[a+12|0]=o,d[f+14|0]=1,s=i[i[i[a+4>>2]+8>>2]>>2],e=i[i[s>>2]+4>>2],i[e+16>>2]==i[k+16>>2])for(t=a+4|0;;){if(f=s,i[(o=e)+8>>2]!=(0|k)&&(!Z(i[i[o+4>>2]+12>>2],o)||!Z(i[i[k+4>>2]+12>>2],o)))break i;e=(r=i[a+8>>2])-(A=i[o+28>>2])|0,i[f+8>>2]=e;f:{a:switch(i[n+56>>2]-100130|0){case 0:s=1&e;break f;case 1:s=(0|r)!=(0|A);break f;case 2:s=(0|e)>0;break f;case 3:s=e>>>31|0;break f;case 4:break a;default:break f}s=e-2>>>0<4294967293}if(d[f+12|0]=s,d[a+14|0]=1,c0(n,a)&&(i[o+28>>2]=i[o+28>>2]+i[k+28>>2],e=i[o+4>>2],i[e+28>>2]=i[e+28>>2]+i[i[k+4>>2]+28>>2],i[i[a>>2]+24>>2]=0,m2(i[t>>2]),Q(a),!$(k)))break i;if(t=f+4|0,s=i[i[i[(a=f)+4>>2]+8>>2]>>2],e=i[i[s>>2]+4>>2],k=o,i[e+16>>2]!=i[o+16>>2])break}else f=a}return d[f+14|0]=1,void(b&&K0(n,f))}k2(n+1740|0,1),b2()}function $(n){var f=0,a=0,e=0,t=0,b=0,o=0;if(t=i[n+4>>2],(0|(o=i[t+20>>2]))!=(0|(a=i[n+20>>2]))){for(f=e=i[a+8>>2];i[f+20>>2]=o,(0|e)!=(0|(f=i[f+12>>2])););f=i[a>>2],e=i[a+4>>2],i[f+4>>2]=e,i[e>>2]=f,Q(a)}if((0|(e=i[n+8>>2]))!=(0|n)){if(b=i[n+4>>2],f=i[b+12>>2],i[i[b+20>>2]+8>>2]=f,i[i[n+16>>2]+8>>2]=e,b=i[f+8>>2],i[i[e+4>>2]+12>>2]=f,i[i[b+4>>2]+12>>2]=n,i[n+8>>2]=b,i[f+8>>2]=e,(0|a)==(0|o)){if(!(a=j(24)))return 0;for(f=i[n+20>>2],e=i[f+4>>2],i[a+4>>2]=e,i[e>>2]=a,i[a>>2]=f,i[f+4>>2]=a,i[a+12>>2]=0,i[a+16>>2]=0,i[a+8>>2]=n,d[a+20|0]=0,d[a+21|0]=w[f+21|0],f=n;i[f+20>>2]=a,(0|(f=i[f+12>>2]))!=(0|n););}}else{for(a=i[n+16>>2],f=e=i[a+8>>2];i[f+16>>2]=0,(0|e)!=(0|(f=i[f+8>>2])););f=i[a>>2],e=i[a+4>>2],i[f+4>>2]=e,i[e>>2]=f,Q(a)}if((0|(f=i[t+8>>2]))!=(0|t))a=i[i[t+4>>2]+12>>2],i[i[n+20>>2]+8>>2]=a,i[i[t+16>>2]+8>>2]=f,e=i[a+8>>2],i[i[f+4>>2]+12>>2]=a,i[i[e+4>>2]+12>>2]=t,i[t+8>>2]=e,i[a+8>>2]=f;else{for(a=i[t+16>>2],f=e=i[a+8>>2];i[f+16>>2]=0,(0|e)!=(0|(f=i[f+8>>2])););for(f=i[a>>2],e=i[a+4>>2],i[f+4>>2]=e,i[e>>2]=f,Q(a),a=i[t+20>>2],f=t=i[a+8>>2];i[f+20>>2]=0,(0|t)!=(0|(f=i[f+12>>2])););f=i[a>>2],t=i[a+4>>2],i[f+4>>2]=t,i[t>>2]=f,Q(a)}return f=i[n+4>>2],f=i[(n=n>>>0>f>>>0?f:n)>>2],a=i[i[n+4>>2]>>2],i[i[f+4>>2]>>2]=a,i[i[a+4>>2]>>2]=f,Q(n),1}function A2(n,f){var a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0,A=0,l=0;i:if(a=j(64)){if(k=i[n+4>>2],b=i[(e=n>>>0>k>>>0?k:n)+4>>2],t=i[b>>2],i[a+32>>2]=t,i[i[t+4>>2]>>2]=a,i[a>>2]=e,e=b,b=a+32|0,i[e>>2]=b,i[a+16>>2]=0,i[a+20>>2]=0,i[a+12>>2]=b,i[a+4>>2]=b,i[a+24>>2]=0,i[a+28>>2]=0,i[a+48>>2]=0,i[a+52>>2]=0,i[a+44>>2]=a,i[a+40>>2]=b,i[a+36>>2]=a,i[a+56>>2]=0,i[a+60>>2]=0,i[a+8>>2]=a,t=b,s=a,(0|(e=o=i[f+20>>2]))!=(0|(r=i[n+20>>2]))){for(e=t=i[e+8>>2];i[e+20>>2]=r,(0|t)!=(0|(e=i[e+12>>2])););e=i[o>>2],t=i[o+4>>2],i[e+4>>2]=t,i[t>>2]=e,Q(o),k=i[n+4>>2],s=i[a+8>>2],t=i[s+4>>2],e=i[n+20>>2]}if(n=i[n+12>>2],A=i[n+8>>2],i[t+12>>2]=n,i[i[A+4>>2]+12>>2]=a,i[a+8>>2]=A,i[n+8>>2]=s,n=i[f+8>>2],t=i[a+40>>2],i[i[t+4>>2]+12>>2]=f,i[i[n+4>>2]+12>>2]=b,i[a+40>>2]=n,i[f+8>>2]=t,i[a+16>>2]=i[k+16>>2],n=i[f+16>>2],i[a+52>>2]=e,i[a+48>>2]=n,i[a+20>>2]=e,i[e+8>>2]=b,(0|o)==(0|r)){if(!(n=j(24)))break i;for(f=i[e+4>>2],i[n+4>>2]=f,i[f>>2]=n,i[n>>2]=e,i[e+4>>2]=n,i[n+12>>2]=0,i[n+16>>2]=0,i[n+8>>2]=a,d[n+20|0]=0,d[n+21|0]=w[e+21|0],e=a;i[e+20>>2]=n,(0|(e=i[e+12>>2]))!=(0|a););}l=a}return l}function q0(n,f,a){var e=0,t=0;if(a>>>0>=512)f4(0|n,0|f,0|a);else{e=n+a|0;i:if(3&(n^f))if(e>>>0<4)a=n;else if((t=e-4|0)>>>0>>0)a=n;else for(a=n;d[0|a]=w[0|f],d[a+1|0]=w[f+1|0],d[a+2|0]=w[f+2|0],d[a+3|0]=w[f+3|0],f=f+4|0,t>>>0>=(a=a+4|0)>>>0;);else{f:if(3&n)if(a)for(a=n;;){if(d[0|a]=w[0|f],f=f+1|0,!(3&(a=a+1|0)))break f;if(!(a>>>0>>0))break}else a=n;else a=n;if(!((n=-4&e)>>>0<64||(t=n+-64|0)>>>0>>0))for(;i[a>>2]=i[f>>2],i[a+4>>2]=i[f+4>>2],i[a+8>>2]=i[f+8>>2],i[a+12>>2]=i[f+12>>2],i[a+16>>2]=i[f+16>>2],i[a+20>>2]=i[f+20>>2],i[a+24>>2]=i[f+24>>2],i[a+28>>2]=i[f+28>>2],i[a+32>>2]=i[f+32>>2],i[a+36>>2]=i[f+36>>2],i[a+40>>2]=i[f+40>>2],i[a+44>>2]=i[f+44>>2],i[a+48>>2]=i[f+48>>2],i[a+52>>2]=i[f+52>>2],i[a+56>>2]=i[f+56>>2],i[a+60>>2]=i[f+60>>2],f=f- -64|0,t>>>0>=(a=a- -64|0)>>>0;);if(n>>>0<=a>>>0)break i;for(;i[a>>2]=i[f>>2],f=f+4|0,n>>>0>(a=a+4|0)>>>0;);}if(a>>>0>>0)for(;d[0|a]=w[0|f],f=f+1|0,(0|e)!=(0|(a=a+1|0)););}}function o2(n){var f=0,a=0,e=0,t=0,b=0,o=0;if(b=n,n=0,(f=j(64))&&(e=i[b+4>>2],t=i[(a=e>>>0>>0?e:b)+4>>2],o=i[t>>2],i[f+32>>2]=o,i[i[o+4>>2]>>2]=f,i[f>>2]=a,a=f+32|0,i[t>>2]=a,i[f+16>>2]=0,i[f+20>>2]=0,i[f+12>>2]=a,i[f+4>>2]=a,i[f+24>>2]=0,i[f+28>>2]=0,i[f+48>>2]=0,i[f+52>>2]=0,i[f+40>>2]=a,i[f+36>>2]=f,i[f+56>>2]=0,i[f+60>>2]=0,i[f+8>>2]=f,t=i[b+12>>2],o=i[t+8>>2],i[f+44>>2]=t,i[i[o+4>>2]+12>>2]=f,i[f+8>>2]=o,i[t+8>>2]=f,t=i[e+16>>2],i[f+16>>2]=t,e=j(40))){for(n=i[t+4>>2],i[e+4>>2]=n,i[n>>2]=e,i[e>>2]=t,i[t+4>>2]=e,i[e+12>>2]=0,i[e+8>>2]=a,n=a;i[n+16>>2]=e,(0|a)!=(0|(n=i[n+8>>2])););n=i[b+20>>2],i[f+20>>2]=n,i[f+52>>2]=n,n=f}return n?(f=i[n+4>>2],n=i[b+4>>2],a=i[i[n+4>>2]+12>>2],e=i[a+8>>2],t=i[n+8>>2],i[i[t+4>>2]+12>>2]=a,i[i[e+4>>2]+12>>2]=n,i[n+8>>2]=e,i[a+8>>2]=t,a=i[f+8>>2],e=i[n+8>>2],i[i[e+4>>2]+12>>2]=f,i[i[a+4>>2]+12>>2]=n,i[n+8>>2]=a,i[f+8>>2]=e,i[n+16>>2]=i[f+16>>2],a=i[f+4>>2],i[i[a+16>>2]+8>>2]=a,i[a+20>>2]=i[n+20>>2],i[f+28>>2]=i[b+28>>2],i[a+28>>2]=i[n+28>>2],f):0}function $0(n){var f=0,a=0,e=0,t=0,b=0,o=0,k=0,s=0,r=0;if((0|(t=i[40+(n|=0)>>2]))!=(0|(k=n+40|0)))for(;;){if(r=i[t>>2],!w[t+21|0]){for(s=i[t+8>>2],n=i[s+12>>2];;){if(i[n+20>>2]=0,o=i[n+12>>2],f=i[n+4>>2],!i[f+20>>2]){if(e=i[n+16>>2],(0|(a=i[n+8>>2]))!=(0|n))i[e+8>>2]=a,e=i[f+12>>2],b=i[e+8>>2],i[i[a+4>>2]+12>>2]=e,i[i[b+4>>2]+12>>2]=n,i[n+8>>2]=b,i[e+8>>2]=a;else{for(f=a=i[e+8>>2];i[f+16>>2]=0,(0|a)!=(0|(f=i[f+8>>2])););f=i[e>>2],a=i[e+4>>2],i[f+4>>2]=a,i[a>>2]=f,Q(e),f=i[n+4>>2]}if(e=i[f+16>>2],(0|(a=i[f+8>>2]))!=(0|f))i[e+8>>2]=a,e=i[i[f+4>>2]+12>>2],b=i[e+8>>2],i[i[a+4>>2]+12>>2]=e,i[i[b+4>>2]+12>>2]=f,i[f+8>>2]=b,i[e+8>>2]=a;else{for(f=a=i[e+8>>2];i[f+16>>2]=0,(0|a)!=(0|(f=i[f+8>>2])););f=i[e>>2],a=i[e+4>>2],i[f+4>>2]=a,i[a>>2]=f,Q(e),f=i[n+4>>2]}e=i[(f=n>>>0>f>>>0?f:n)>>2],a=i[i[f+4>>2]>>2],i[i[e+4>>2]>>2]=a,i[i[a+4>>2]>>2]=e,Q(f)}if(f=(0|n)!=(0|s),n=o,!f)break}n=i[t>>2],o=i[t+4>>2],i[n+4>>2]=o,i[o>>2]=n,Q(t)}if((0|k)==(0|(t=r)))break}}function Z(n,f){var a=0,e=0,t=0,b=0,o=0,k=0;if((0|n)!=(0|f)){if((0|(e=i[f+16>>2]))!=(0|(o=i[n+16>>2]))){for(a=t=i[e+8>>2];i[a+16>>2]=o,(0|t)!=(0|(a=i[a+8>>2])););a=i[e>>2],t=i[e+4>>2],i[a+4>>2]=t,i[t>>2]=a,Q(e)}if((0|(k=i[n+20>>2]))!=(0|(t=i[f+20>>2]))){for(a=b=i[t+8>>2];i[a+20>>2]=k,(0|b)!=(0|(a=i[a+12>>2])););a=i[t>>2],b=i[t+4>>2],i[a+4>>2]=b,i[b>>2]=a,Q(t)}if(a=i[n+8>>2],b=i[f+8>>2],i[i[b+4>>2]+12>>2]=n,i[i[a+4>>2]+12>>2]=f,i[f+8>>2]=a,i[n+8>>2]=b,(0|e)==(0|o)){if(!(e=j(40)))return 0;for(a=i[n+16>>2],o=i[a+4>>2],i[e+4>>2]=o,i[o>>2]=e,i[e>>2]=a,i[a+4>>2]=e,i[e+12>>2]=0,i[e+8>>2]=f,a=f;i[a+16>>2]=e,(0|(a=i[a+8>>2]))!=(0|f););i[i[n+16>>2]+8>>2]=n}if((0|t)==(0|k)){if(!(e=j(24)))return 0;for(a=i[n+20>>2],t=i[a+4>>2],i[e+4>>2]=t,i[t>>2]=e,i[e>>2]=a,i[a+4>>2]=e,i[e+12>>2]=0,i[e+16>>2]=0,i[e+8>>2]=f,d[e+20|0]=0,d[e+21|0]=w[a+21|0],a=f;i[a+20>>2]=e,(0|(a=i[a+12>>2]))!=(0|f););i[i[n+20>>2]+8>>2]=n}}return 1}function X0(n,f){var a=0,e=0,t=0,b=0,o=0,k=0,s=u(0),r=0,A=0,l=u(0);if(i[n+20>>2]){e=f,a=i[n>>2],n=i[a+8>>2]+1|0,i[a+8>>2]=n;i:{if(!((0|(f=i[a+12>>2]))>=n<<1)){if(i[a+12>>2]=f<<1,t=i[a+4>>2],f=n0(b=i[a>>2],f<<3|4),i[a>>2]=f,!f){i[a>>2]=b,t=2147483647;break i}if(f=n0(i[a+4>>2],8+(i[a+12>>2]<<3)|0),i[a+4>>2]=f,!f){i[a+4>>2]=t,t=2147483647;break i}}if(b=i[a+4>>2],t=n,(f=i[a+16>>2])&&(i[a+16>>2]=i[4+(b+(f<<3)|0)>>2],t=f),o=i[a>>2],i[o+(n<<2)>>2]=t,i[(k=b+(t<<3)|0)>>2]=e,i[k+4>>2]=n,i[a+20>>2]){f:if(n>>>0<2)f=n;else for(s=c[e+28>>2];;){if(a=i[((f=n>>1)<<2)+o>>2],A=i[(r=b+(a<<3)|0)>>2],(l=c[A+28>>2])>2]<=c[e+32>>2])|s!=l)){f=n;break f}if(i[(n<<2)+o>>2]=a,i[r+4>>2]=n,!((n=f)>>>0>1))break}i[(f<<2)+o>>2]=t,i[k+4>>2]=f}}return t}if(e=(a=i[n+12>>2])+1|0,i[n+12>>2]=e,t=i[n+4>>2],(0|(b=e))<(0|(e=i[n+16>>2])))e=t;else if(i[n+16>>2]=e<<1,e=n0(t,e<<3),i[n+4>>2]=e,!e)return i[n+4>>2]=t,2147483647;return i[(a<<2)+e>>2]=f,~a}function s0(n){var f=0,a=0,e=0,t=0,b=0,o=0,k=0;b=j(40),o=j(40);i:{if(!(e=j(24))||!b|!o){if(b&&Q(b),o&&Q(o),!e)break i;return Q(e),0}if(!(f=j(64)))return 0;for(a=i[n+68>>2],t=i[(a=a>>>0<(t=n- -64|0)>>>0?a:t)+4>>2],k=i[t>>2],i[f+32>>2]=k,i[i[k+4>>2]>>2]=f,i[f>>2]=a,a=t,t=f+32|0,i[a>>2]=t,i[f+16>>2]=0,i[f+20>>2]=0,i[f+12>>2]=t,i[f+4>>2]=t,i[f+24>>2]=0,i[f+28>>2]=0,i[f+48>>2]=0,i[f+52>>2]=0,i[f+44>>2]=f,i[f+40>>2]=t,i[f+36>>2]=f,i[f+56>>2]=0,i[f+60>>2]=0,i[f+8>>2]=f,a=i[n+4>>2],i[b+4>>2]=a,i[a>>2]=b,i[b+12>>2]=0,i[b+8>>2]=f,a=f;i[a+16>>2]=b,(0|(a=i[a+8>>2]))!=(0|f););for(i[o+4>>2]=b,i[b>>2]=o,i[o>>2]=n,i[n+4>>2]=o,i[o+12>>2]=0,i[o+8>>2]=t,a=t;i[a+16>>2]=o,(0|t)!=(0|(a=i[a+8>>2])););for(a=i[n+44>>2],i[e+4>>2]=a,i[a>>2]=e,i[e>>2]=n+40,i[n+44>>2]=e,i[e+12>>2]=0,i[e+16>>2]=0,i[e+8>>2]=f,d[e+20|0]=0,d[e+21|0]=w[n+61|0],a=f;i[a+20>>2]=e,(0|(a=i[a+12>>2]))!=(0|f););}return f}function r0(n){n|=0;var f=0,a=0,e=0,t=0,b=0,o=u(0);if((f=j(128))&&(i[f+8>>2]=0,i[f+12>>2]=0,a=f+40|0,i[f+44>>2]=a,i[f+48>>2]=0,i[f+52>>2]=0,i[f+40>>2]=a,n2[f+54>>1]=0,n2[f+56>>1]=0,n2[f+58>>1]=0,n2[f+60>>1]=0,i[f+72>>2]=0,i[f+76>>2]=0,a=f+96|0,i[f+68>>2]=a,e=f- -64|0,i[f+64>>2]=e,i[f+80>>2]=0,i[f+84>>2]=0,i[f+88>>2]=0,i[f+92>>2]=0,i[f+104>>2]=0,i[f+108>>2]=0,i[f+100>>2]=e,i[f+96>>2]=a,i[f+112>>2]=0,i[f+116>>2]=0,i[f+120>>2]=0,i[f+124>>2]=0,i[f>>2]=f,i[f+4>>2]=f),i[n+8>>2]=f,!f)return 0;i:{if((0|(f=i[n+112>>2]))>0)for(t=116+((f<<4)+n|0)|0,a=n+116|0,f=i[n+4>>2];;){b=i[a+12>>2];f:{if(!f){if(e=0,!(f=s0(i[n+8>>2])))break i;if(Z(f,i[f+4>>2]))break f;break i}if(!o2(f))return 0;f=i[f+12>>2]}if(e=i[f+16>>2],i[e+12>>2]=b,c[e+16>>2]=c[a>>2],o=c[a+4>>2],i[e+24>>2]=0,c[e+20>>2]=o,i[f+28>>2]=1,i[i[f+4>>2]+28>>2]=-1,i[n+4>>2]=f,!(t>>>0>(a=a+16|0)>>>0))break}d[n+108|0]=0,i[n+112>>2]=0,e=1}return 0|e}function u4(n,f,a){f|=0,a|=0,(0|(a=i[1716+(n|=0)>>2]))==3?R[i[n+88>>2]](5):R[0|a](5,i[n+1896>>2]),(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[f+16>>2]+12>>2]):R[0|a](i[i[f+16>>2]+12>>2],i[n+1896>>2]),(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[i[f+4>>2]+16>>2]+12>>2]):R[0|a](i[i[i[f+4>>2]+16>>2]+12>>2],i[n+1896>>2]),a=i[f+20>>2];i:if(w[a+21|0])for(;;){if(w[a+20|0]||(d[a+20|0]=1,f=i[i[f+12>>2]+4>>2],(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[f+16>>2]+12>>2]):R[0|a](i[i[f+16>>2]+12>>2],i[n+1896>>2]),a=i[f+20>>2],!w[a+21|0]|w[a+20|0]))break i;if(d[a+20|0]=1,f=i[f+8>>2],(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[i[f+4>>2]+16>>2]+12>>2]):R[0|a](i[i[i[f+4>>2]+16>>2]+12>>2],i[n+1896>>2]),a=i[f+20>>2],!w[a+21|0])break}(0|(f=i[n+1728>>2]))==6?R[i[n+100>>2]]():R[0|f](i[n+1896>>2])}function p2(n,f){f|=0;var a=0;if((0|(a=i[(n|=0)>>2]))!=(0|f))for(;;){i:if(f>>>0>a>>>0){f:switch(0|a){case 0:(0|(a=i[n+1732>>2]))==11?R[i[n+12>>2]](100151):R[0|a](100151,i[n+1896>>2]),i[n>>2]&&p2(n,0),i[n+112>>2]=0,a=1,i[n>>2]=1,d[n+108|0]=0,i[n+1896>>2]=0,i[n+8>>2]=0;break i;case 1:break f;default:break i}if((0|(a=i[n+1732>>2]))==11?R[i[n+12>>2]](100152):R[0|a](100152,i[n+1896>>2]),i[n>>2]!=1&&p2(n,1),i[n>>2]=2,i[n+4>>2]=0,a=2,i[n+112>>2]<=0)break i;d[n+108|0]=1}else{f:switch(a-1|0){case 1:(0|(a=i[n+1732>>2]))==11?R[i[n+12>>2]](100154):R[0|a](100154,i[n+1896>>2]),i[n>>2]!=2&&p2(n,2),a=1,i[n>>2]=1;break i;case 0:break f;default:break i}(0|(a=i[n+1732>>2]))==11?R[i[n+12>>2]](100153):R[0|a](100153,i[n+1896>>2]),(a=i[n+8>>2])&&d0(a),a=0,i[n+8>>2]=0,i[n>>2]=0,i[n+4>>2]=0}if((0|f)==(0|a))break}}function A0(n,f){var a=0,e=0,t=0,b=0,o=0,k=0;i[n+8>>2]=7,i[n+4>>2]=0,a=i[f+20>>2];i:if(w[a+21|0]){t=f;f:{a:{for(;;){if(w[a+20|0])break i;if(d[a+20|0]=1,i[a+16>>2]=e,t=i[i[t+12>>2]+4>>2],e=i[t+20>>2],w[e+21|0]){if(w[e+20|0])break a;if(d[e+20|0]=1,i[e+16>>2]=a,b=b+2|0,t=i[t+8>>2],a=i[t+20>>2],w[a+21|0])continue;break i}break}b|=1;break f}b|=1}e=a}else t=f;o=i[f+4>>2],a=i[o+20>>2];i:if(!(!w[a+21|0]|w[a+20|0])){f:{a:{for(;;){if(d[a+20|0]=1,i[a+16>>2]=e,f=i[o+12>>2],o=i[f+4>>2],e=i[o+20>>2],w[e+21|0]){if(w[e+20|0])break a;if(d[e+20|0]=1,i[e+16>>2]=a,k=k+2|0,f=i[i[o+8>>2]+4>>2],o=i[f+4>>2],a=i[o+20>>2],!w[a+21|0])break i;if(!w[a+20|0])continue;break i}break}k|=1;break f}k|=1}e=a}a=b+k|0,i[n>>2]=a;i:{if(1&b){if(!(1&k))break i;i[n>>2]=a-1,f=f+8|0}else f=t+4|0;f=i[f>>2]}if(i[n+4>>2]=f,e)for(;d[e+20|0]=0,e=i[e+16>>2];);}function i1(n,f,a){var e=0,t=0,b=0,o=0,k=0,s=0,r=0,A=0,l=0;i:{f:{a:{n:{e:{t:{u:{o:{b:{k:{if(f){if(!a)break k;break b}r2=0,n=(n>>>0)/(a>>>0)|0;break i}if(!n)break o;break u}if(!(a-1&a))break t;o=0-(b=(s2(a)+33|0)-s2(f)|0)|0;break n}r2=0,n=(f>>>0)/0|0;break i}if((e=32-s2(f)|0)>>>0<31)break e;break a}if((0|a)==1)break f;a=31&(b=e0(a)),(63&b)>>>0>=32?n=f>>>a|0:(e=f>>>a|0,n=((1<>>a),r2=e;break i}b=e+1|0,o=63-e|0}if(t=31&(e=63&b),e>>>0>=32?(e=0,k=f>>>t|0):(e=f>>>t|0,k=((1<>>t),t=31&(o&=63),o>>>0>=32?(f=n<>>32-t|f<>>31,k=(e=k<<1|f>>>31)-(r=a&(t=l-(s+(e>>>0>o>>>0)|0)>>31))|0,e=s-(e>>>0>>0)|0,f=f<<1|n>>>31,n=A|n<<1,A=1&t,b=b-1|0;);r2=f<<1|n>>>31,n=A|n<<1;break i}n=0,f=0}r2=f}return n}function c4(n,f,a){f|=0,a|=0;var e=0,t=0,b=0,o=0,k=0,s=0,r=0;_=b=_-32|0,e=i[28+(n|=0)>>2],i[b+16>>2]=e,o=i[n+20>>2],i[b+28>>2]=a,i[b+24>>2]=f,f=o-e|0,i[b+20>>2]=f,o=f+a|0,s=2;i:{f:{f=b+16|0,(e=0|Y0(i[n+60>>2],0|f,2,b+12|0))?(i[806]=e,e=-1):e=0;a:{if(e)e=f;else for(;;){if((0|(t=i[b+12>>2]))==(0|o))break a;if((0|t)<0){e=f;break f}if(k=t-((r=(k=i[f+4>>2])>>>0>>0)?k:0)|0,i[(e=(r<<3)+f|0)>>2]=k+i[e>>2],i[(f=(r?12:4)+f|0)>>2]=i[f>>2]-k,o=o-t|0,f=e,s=s-r|0,(t=0|Y0(i[n+60>>2],0|f,0|s,b+12|0))?(i[806]=t,t=-1):t=0,t)break}if((0|o)!=-1)break f}f=i[n+44>>2],i[n+28>>2]=f,i[n+20>>2]=f,i[n+16>>2]=f+i[n+48>>2],n=a;break i}i[n+28>>2]=0,i[n+16>>2]=0,i[n+20>>2]=0,i[n>>2]=32|i[n>>2],n=0,(0|s)!=2&&(n=a-i[e+4>>2]|0)}return _=b+32|0,0|n}function f1(n){var f=0,a=0,e=0,t=0,b=0,o=0,k=u(0),s=0,r=u(0),A=0,l=0,v=0,h=0,y=0;if(t=i[n+4>>2],a=i[n>>2],e=i[a+4>>2],y=i[(f=t+(e<<3)|0)>>2],!((0|(b=i[n+8>>2]))<=0)&&(A=i[(b<<2)+a>>2],i[a+4>>2]=A,i[4+(l=(A<<3)+t|0)>>2]=1,i[f>>2]=0,i[f+4>>2]=i[n+16>>2],v=b-1|0,i[n+8>>2]=v,i[n+16>>2]=e,(0|b)!=1)){for(f=1;(0|v)<=(0|(n=f<<1))||(o=i[(i[((e=1|n)<<2)+a>>2]<<3)+t>>2],k=c[o+28>>2],s=i[(i[(n<<2)+a>>2]<<3)+t>>2],!(k<(r=c[s+28>>2]))&(!(c[o+32>>2]<=c[s+32>>2])|k!=r)||(n=e)),!((0|n)>=(0|b)||(e=i[l>>2],k=c[e+28>>2],o=i[(n<<2)+a>>2],h=i[(s=(o<<3)+t|0)>>2],k<(r=c[h+28>>2])|k==r&c[e+32>>2]<=c[h+32>>2]));)i[(f<<2)+a>>2]=o,i[s+4>>2]=f,f=n;i[(f<<2)+a>>2]=A,i[l+4>>2]=f}return y}function a1(n,f,a){switch(f-9|0){case 0:return f=i[a>>2],i[a>>2]=f+4,void(i[n>>2]=i[f>>2]);case 6:return f=i[a>>2],i[a>>2]=f+4,f=n2[f>>1],i[n>>2]=f,void(i[n+4>>2]=f>>31);case 7:return f=i[a>>2],i[a>>2]=f+4,i[n>>2]=G2[f>>1],void(i[n+4>>2]=0);case 8:return f=i[a>>2],i[a>>2]=f+4,f=d[0|f],i[n>>2]=f,void(i[n+4>>2]=f>>31);case 9:return f=i[a>>2],i[a>>2]=f+4,i[n>>2]=w[0|f],void(i[n+4>>2]=0);case 16:return f=i[a>>2]+7&-8,i[a>>2]=f+8,void(q[n>>3]=q[f>>3]);case 17:b2();default:return;case 1:case 4:case 14:return f=i[a>>2],i[a>>2]=f+4,f=i[f>>2],i[n>>2]=f,void(i[n+4>>2]=f>>31);case 2:case 5:case 11:case 15:return f=i[a>>2],i[a>>2]=f+4,i[n>>2]=i[f>>2],void(i[n+4>>2]=0);case 3:case 10:case 12:case 13:}f=i[a>>2]+7&-8,i[a>>2]=f+8,a=i[f+4>>2],i[n>>2]=i[f>>2],i[n+4>>2]=a}function s4(n,f,a){f|=0,a|=0,(0|(a=i[1716+(n|=0)>>2]))==3?R[i[n+88>>2]](6):R[0|a](6,i[n+1896>>2]),(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[f+16>>2]+12>>2]):R[0|a](i[i[f+16>>2]+12>>2],i[n+1896>>2]),(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[i[f+4>>2]+16>>2]+12>>2]):R[0|a](i[i[i[f+4>>2]+16>>2]+12>>2],i[n+1896>>2]),a=i[f+20>>2];i:if(w[a+21|0])for(;;){if(w[a+20|0])break i;if(d[a+20|0]=1,f=i[f+8>>2],(0|(a=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[i[f+4>>2]+16>>2]+12>>2]):R[0|a](i[i[i[f+4>>2]+16>>2]+12>>2],i[n+1896>>2]),a=i[f+20>>2],!w[a+21|0])break}(0|(f=i[n+1728>>2]))==6?R[i[n+100>>2]]():R[0|f](i[n+1896>>2])}function n1(n,f,a){var e=0,t=0;if(a&&(d[0|n]=f,d[(e=n+a|0)-1|0]=f,!(a>>>0<3||(d[n+2|0]=f,d[n+1|0]=f,d[e-3|0]=f,d[e-2|0]=f,a>>>0<7||(d[n+3|0]=f,d[e-4|0]=f,a>>>0<9||(t=(e=0-n&3)+n|0,n=L(255&f,16843009),i[t>>2]=n,i[(f=(a=a-e&-4)+t|0)-4>>2]=n,a>>>0<9||(i[t+8>>2]=n,i[t+4>>2]=n,i[f-8>>2]=n,i[f-12>>2]=n,a>>>0<25||(i[t+24>>2]=n,i[t+20>>2]=n,i[t+16>>2]=n,i[t+12>>2]=n,i[f-16>>2]=n,i[f-20>>2]=n,i[f-24>>2]=n,i[f-28>>2]=n,(a=a-(f=4&t|24)|0)>>>0<32))))))))for(n=h0(n,0,1,1),e=r2,f=f+t|0;i[f+24>>2]=n,i[f+28>>2]=e,i[f+16>>2]=n,i[f+20>>2]=e,i[f+8>>2]=n,i[f+12>>2]=e,i[f>>2]=n,i[f+4>>2]=e,f=f+32|0,(a=a-32|0)>>>0>31;);}function J(n,f,a){var e=u(0),t=0,b=0,o=u(0),k=u(0),s=0,r=u(0),A=u(0),l=u(0);_=b=_+-64|0;i:{f:{if(!(!(s=(e=c[f+28>>2])>(k=c[n+28>>2]))&(!(c[n+32>>2]<=c[f+32>>2])|e!=k))){if((o=c[a+28>>2])>e|e==o&c[f+32>>2]<=c[a+32>>2])break i;if(t=1,s)break f}t=0,e==k&&(t=c[n+32>>2]<=c[f+32>>2])}s=t,t=1,(o=c[a+28>>2])>e||(t=0,e==o&&(t=c[f+32>>2]<=c[a+32>>2])),r=c[n+32>>2],A=c[f+32>>2],l=c[a+32>>2],q[b+40>>3]=o,q[b+24>>3]=e,q[b+48>>3]=l,q[b+32>>3]=A,q[b+16>>3]=r,q[b+8>>3]=k,i[b+4>>2]=t,i[b>>2]=s,A1(1092,b),o=c[a+28>>2],k=c[n+28>>2],e=c[f+28>>2]}return r=u(0),_=b- -64|0,k=u(e-k),e=u(o-e),u(k+e)>u(0)&&(o=c[f+32>>2],r=u(u(u(o-c[a+32>>2])*k)+u(e*u(o-c[n+32>>2])))),r}function B2(n,f,a){switch(f-100100|0){case 0:return void(i[n+88>>2]=a||15);case 6:return void(i[n+1716>>2]=a||3);case 4:return d[n+80|0]=!!(0|a),void(i[n+92>>2]=a||14);case 10:return d[n+80|0]=!!(0|a),void(i[n+1720>>2]=a||4);case 1:return void(i[n+96>>2]=a||13);case 7:return void(i[n+1724>>2]=a||5);case 2:return void(i[n+100>>2]=a||12);case 8:return void(i[n+1728>>2]=a||6);case 3:return void(i[n+12>>2]=a||18);case 9:return void(i[n+1732>>2]=a||11);case 5:return void(i[n+76>>2]=a||17);case 11:return void(i[n+1736>>2]=a||10);case 12:return void(i[n+104>>2]=a||16)}(0|(f=i[n+1732>>2]))==11?R[i[n+12>>2]](100900):R[0|f](100900,i[n+1896>>2])}function L2(n,f,a){var e=0,t=0,b=0,o=0;e=i[f>>2];i:{if((0|f)!=(0|a))for(;;){if(d[f+15|0]=0,o=i[f+4>>2],b=i[i[o+8>>2]>>2],t=i[b>>2],i[t+16>>2]!=i[e+16>>2]){if(!w[b+15|0])return n=w[f+12|0],a=i[e+20>>2],i[a+8>>2]=e,d[a+21|0]=n,i[e+24>>2]=0,m2(o),Q(f),e;if(!(t=A2(i[i[e+8>>2]+4>>2],i[t+4>>2]))||!$(i[b>>2]))break i;i[b>>2]=t,d[b+15|0]=0,i[t+24>>2]=b}if(i[e+8>>2]!=(0|t)&&(!Z(i[i[t+4>>2]+12>>2],t)||!Z(e,t)))break i;if(t=w[f+12|0],e=i[f>>2],o=i[e+20>>2],i[o+8>>2]=e,d[o+21|0]=t,i[e+24>>2]=0,m2(i[f+4>>2]),Q(f),e=i[b>>2],(0|a)==(0|(f=b)))break}return e}k2(n+1740|0,1),b2()}function l0(n,f,a){var e=0,t=0,b=0;_=e=_-48|0,i[e+24>>2]=0,i[e+28>>2]=0,i[e+16>>2]=0,i[e+20>>2]=0,i[e+8>>2]=0,i[e+12>>2]=0,i[e>>2]=1056964608,i[e+4>>2]=1056964608,t=i[f+16>>2],i[e+16>>2]=i[t+12>>2],i[e+20>>2]=i[i[a+16>>2]+12>>2],c[e+36>>2]=c[t+16>>2],c[e+40>>2]=c[t+20>>2],c[e+44>>2]=c[t+24>>2],i[t+12>>2]=0,t=t+12|0,(0|(b=i[n+1736>>2]))==10?R[i[n+76>>2]](e+36|0,e+16|0,e,t):R[0|b](e+36|0,e+16|0,e,t,i[n+1896>>2]),i[t>>2]||(i[t>>2]=i[e+16>>2]),Z(f,a)||(k2(n+1740|0,1),b2()),_=e+48|0}function r4(n,f){n|=0;var a=0,e=0,t=0;if((0|(a=i[40+(f|=0)>>2]))!=(0|(e=f+40|0)))for(;;){if(w[a+21|0]){for((0|(f=i[n+1716>>2]))==3?R[i[n+88>>2]](2):R[0|f](2,i[n+1896>>2]),f=i[a+8>>2];(0|(t=i[n+1724>>2]))==5?R[i[n+96>>2]](i[i[f+16>>2]+12>>2]):R[0|t](i[i[f+16>>2]+12>>2],i[n+1896>>2]),(0|(f=i[f+12>>2]))!=i[a+8>>2];);(0|(f=i[n+1728>>2]))==6?R[i[n+100>>2]]():R[0|f](i[n+1896>>2])}if((0|e)==(0|(a=i[a>>2])))break}}function e1(n,f,a){var e=0,t=0,b=0;if(_=e=_-208|0,i[e+204>>2]=f,n1(f=e+160|0,0,40),i[e+200>>2]=i[e+204>>2],!((0|N0(0,n,e+200|0,e+80|0,f,a))<0)){f=i[423]<0,t=i[404],i[404]=-33&t;i:{f:{if(i[416]){if(i[408])break f}else i[416]=80,i[411]=0,i[408]=0,i[409]=0,b=i[415],i[415]=e;if(r1(1616))break i}N0(1616,n,e+200|0,e+80|0,e+160|0,a)}b&&(R[i[413]](1616,0,0),i[416]=0,i[415]=b,i[411]=0,i[408]=0,i[409]=0),i[404]=i[404]|32&t}_=e+208|0}function t1(n,f){if(!n)return 0;i:{f:{if(n){if(f>>>0<=127)break f;if(i[i[845]>>2]){if(f>>>0<=2047){d[n+1|0]=63&f|128,d[0|n]=f>>>6|192,n=2;break i}if(!((-8192&f)!=57344&f>>>0>=55296)){d[n+2|0]=63&f|128,d[0|n]=f>>>12|224,d[n+1|0]=f>>>6&63|128,n=3;break i}if(f-65536>>>0<=1048575){d[n+3|0]=63&f|128,d[0|n]=f>>>18|240,d[n+2|0]=f>>>6&63|128,d[n+1|0]=f>>>12&63|128,n=4;break i}}else if((-128&f)==57216)break f;i[806]=25,n=-1}else n=1;break i}d[0|n]=f,n=1}return n}function A4(n,f,a){n|=0,f|=0,a|=0;var e=0,t=0,b=u(0),o=u(0);return a=i[a>>2],e=i[i[a+4>>2]+16>>2],f=i[f>>2],(0|(t=i[i[f+4>>2]+16>>2]))==(0|(n=i[n+72>>2]))?(0|n)==(0|e)?(f=i[f+16>>2],b=c[f+28>>2],a=i[a+16>>2],!(b<(o=c[a+28>>2]))&(!(c[f+32>>2]<=c[a+32>>2])|b!=o)?J(n,a,f)>=u(0)|0:J(n,f,a)<=u(0)|0):J(e,n,i[a+16>>2])<=u(0)|0:(f=i[f+16>>2],(0|n)==(0|e)?J(t,n,f)>=u(0)|0:s1(t,n,f)>=s1(i[i[a+4>>2]+16>>2],n,i[a+16>>2])|0)}function v0(n){var f=0,a=0,e=0,t=0,b=0,o=u(0),k=u(0);if(!(f=i[n+12>>2]))return f1(i[n>>2]);if(e=i[n+8>>2],t=i[i[(e+(f<<2)|0)-4>>2]>>2],a=i[n>>2],i[a+8>>2]&&(b=i[i[a+4>>2]+(i[i[a>>2]+4>>2]<<3)>>2],!(!((o=c[b+28>>2])<(k=c[t+28>>2]))&(!(c[b+32>>2]<=c[t+32>>2])|o!=k))))return f1(a);for(a=e-8|0,e=((0|f)>0?1:f)-1|0;;){if((0|f)<2)return i[n+12>>2]=e,t;if(b=f<<2,f=f-1|0,i[i[a+b>>2]>>2])break}return i[n+12>>2]=f,t}function l4(n,f,a){f|=0,a|=0;var e=0,t=0,b=0,o=0;b=1;i:if((0|(e=i[64+(n|=0)>>2]))!=(0|(t=n- -64|0))){if(o=0-f|0,!a){for(;;)if(n=w[i[e+20>>2]+21|0],i[e+28>>2]=(0|n)!=w[i[i[e+4>>2]+20>>2]+21|0]?n?f:o:0,(0|t)==(0|(e=i[e>>2])))break i}for(;;){if(n=i[e>>2],(0|(a=w[i[e+20>>2]+21|0]))==w[i[i[e+4>>2]+20>>2]+21|0]){if(!$(e)){b=0;break i}}else i[e+28>>2]=a?f:o;if((0|t)==(0|(e=n)))break}}return 0|b}function N(n,f,a){var e=0,t=0,b=0;if(!(32&w[0|n]))i:{if(!(e=i[n+16>>2])){if(r1(n))break i;e=i[n+16>>2]}if(e-(t=i[n+20>>2])>>>0>>0)R[i[n+36>>2]](n,f,a);else{f:{a:if(!(!a|i[n+80>>2]<0)){for(e=a;;){if(w[(b=f+e|0)-1|0]!=10){if(e=e-1|0)continue;break a}break}if(R[i[n+36>>2]](n,f,e)>>>0>>0)break i;a=a-e|0,t=i[n+20>>2];break f}b=f}q0(t,b,a),i[n+20>>2]=i[n+20>>2]+a}}}function o1(n,f){var a=0,e=0,t=0;(a=j(16))&&(t=s0(i[n+8>>2]))&&(e=i[t+16>>2],c[e+32>>2]=f,i[e+28>>2]=2112929218,e=i[i[t+4>>2]+16>>2],c[e+32>>2]=f,i[e+28>>2]=-34554430,i[n+72>>2]=e,d[a+15|0]=0,d[a+12|0]=0,i[a+8>>2]=0,i[a>>2]=t,d[a+13|0]=1,d[a+14|0]=0,e=a,a=w0(t=i[n+64>>2],t,a),i[e+4>>2]=a,a)||(k2(n+1740|0,1),b2())}function d0(n){var f=0,a=0,e=0;if((0|(f=i[40+(n|=0)>>2]))!=(0|(a=n+40|0)))for(;e=i[f>>2],Q(f),(0|a)!=(0|(f=e)););if((0|(f=i[n>>2]))!=(0|n))for(;e=i[f>>2],Q(f),(0|(f=e))!=(0|n););if((0|(f=i[n+64>>2]))!=(0|(a=n- -64|0)))for(;e=i[f>>2],Q(f),(0|a)!=(0|(f=e)););Q(n)}function b1(n){var f=0,a=u(0),e=u(0);if(!(f=i[n+12>>2]))return n=i[n>>2],i[i[n+4>>2]+(i[i[n>>2]+4>>2]<<3)>>2];f=i[i[(i[n+8>>2]+(f<<2)|0)-4>>2]>>2],n=i[n>>2];i:{if(i[n+8>>2]&&(n=i[i[n+4>>2]+(i[i[n>>2]+4>>2]<<3)>>2],(a=c[n+28>>2])<(e=c[f+28>>2])||a==e&&c[n+32>>2]<=c[f+32>>2]))break i;n=f}return n}function v4(n,f,a,e){n|=0,f|=0,a|=0,e|=0,a=0;i:{if(f=i[456]){if(!((a=i[f>>2])>>>0<100001)){f=j(12);break i}}else f=j(1200008),i[f+4>>2]=12,i[f>>2]=0,i[456]=f;i[f>>2]=a+1,f=8+(L(a,12)+f|0)|0}c[f>>2]=c[n>>2],c[f+4>>2]=c[n+4>>2],c[f+8>>2]=c[n+8>>2],i[e>>2]=f}function Q2(n,f,a){var e=0,t=0,b=0,o=0;if(f)for(;b=a=a-1|0,o=(t=n)-h0(n=i1(n,f,10),e=r2,10,0)|48,d[0|b]=o,t=f>>>0>9,f=e,t;);if(n)for(;f=(n>>>0)/10|0,d[0|(a=a-1|0)]=n-L(f,10)|48,e=n>>>0>9,n=f,e;);return a}function k1(n,f,a,e){var t=0,b=0,o=0;if(b=i[980]+1|0,i[980]=b,i[n>>2]=b,e)for(;;){if(!i[(t=(o<<3)+a|0)>>2])return i[t>>2]=b,i[t+4>>2]=f,i[t+8>>2]=0,W=e,a;if((0|(o=o+1|0))==(0|e))break}return t=n,n=e<<1,f=k1(t,f,n0(a,e<<4|8),n),W=n,f}function u1(n,f){var a=0,e=0,t=0;if(u0(+n),e=0|c2(1),t=0|c2(0),(0|(a=e>>>20&2047))!=2047){if(!a)return n==0?a=0:(n=u1(18446744073709552e3*n,f),a=i[f>>2]+-64|0),i[f>>2]=a,n;i[f>>2]=a-1022,L0(0,0|t),L0(1,-2146435073&e|1071644672),n=+K1()}return n}function c1(n){var f=0,a=0,e=0;if(d[i[n>>2]]-48>>>0>=10)return 0;for(;e=i[n>>2],a=-1,f>>>0<=214748364&&(a=(0|(a=d[0|e]-48|0))>(2147483647^(f=L(f,10)))?-1:a+f|0),i[n>>2]=e+1,f=a,d[e+1|0]-48>>>0<10;);return f}function s1(n,f,a){var e=u(0),t=u(0),b=0,o=u(0),k=u(0);return e=c[f+28>>2],t=u(e-c[n+28>>2]),e=u(c[a+28>>2]-e),(o=u(t+e))>u(0)?(k=c[((b=e>t)?n:a)+32>>2],e=u(u(u(k-c[(b?a:n)+32>>2])*u((b?t:e)/o))+u(c[f+32>>2]-k))):e=u(0),e}function h0(n,f,a,e){var t=0,b=0,o=0,k=0,s=0,r=0;return r=L(t=a>>>16|0,b=n>>>16|0),t=(65535&(b=((s=L(o=65535&a,k=65535&n))>>>16|0)+L(b,o)|0))+L(t,k)|0,r2=(L(f,a)+r|0)+L(n,e)+(b>>>16)+(t>>>16)|0,65535&s|t<<16}function w0(n,f,a){for(var e=0;f=i[f+8>>2],(e=i[f>>2])&&!(0|R[i[n+16>>2]](i[n+12>>2],e,a)););return(n=j(12))&&(i[n>>2]=a,a=i[f+4>>2],i[n+4>>2]=a,i[a+8>>2]=n,i[n+8>>2]=f,i[f+4>>2]=n),n}function z(n,f,a,e,t){var b=0;if(_=b=_-256|0,!(73728&t|(0|a)<=(0|e))){if(n1(b,255&f,(a=(e=a-e|0)>>>0<256)?e:256),!a)for(;N(n,b,256),(e=e-256|0)>>>0>255;);N(n,b,e)}_=b+256|0}function r1(n){var f=0;return f=i[n+72>>2],i[n+72>>2]=f-1|f,8&(f=i[n>>2])?(i[n>>2]=32|f,-1):(i[n+4>>2]=0,i[n+8>>2]=0,f=i[n+44>>2],i[n+28>>2]=f,i[n+20>>2]=f,i[n+16>>2]=f+i[n+48>>2],0)}function X(n,f,a){var e=0,t=0,b=0;i:if(a)for(;;){if(!(b=i[(t=(e<<3)+f|0)>>2]))break i;if((0|n)==(0|b))return i[t+4>>2];if((0|(e=e+1|0))==(0|a))break}return 0}function T2(n){var f=0,a=0;i:{if(!((n=(f=i[440])+(a=n+7&-8)|0)>>>0<=f>>>0&&a)&&(n>>>0<=v1()<<16>>>0||0|i4(0|n)))break i;return i[806]=48,-1}return i[440]=n,f}function d4(n,f){n|=0;var a=0,e=0;(0|(a=i[4+(f|=0)>>2]))>2]&&(e=i[f>>2]+(L(i[f+12>>2],a)<<2)|0,c[e>>2]=c[n>>2],c[e+4>>2]=c[n+4>>2],i[f+4>>2]=a+1)}function h4(n,f){n|=0,f|=0;var a=u(0),e=u(0);if((a=c[n+28>>2])<(e=c[f+28>>2]))n=1;else{if(a!=e)return 0;n=c[n+32>>2]<=c[f+32>>2]}return 0|n}function y0(n){var f=0;(f=i[n>>2])&&(Q(i[f+4>>2]),Q(i[f>>2]),Q(f)),(f=i[n+8>>2])&&Q(f),(f=i[n+4>>2])&&Q(f),Q(n)}function w4(n){n|=0;var f=0;_=f=_-16|0,i[f>>2]=n,_=n=_-16|0,i[n+12>>2]=f,e1(1078,f,0),_=n+16|0,_=f+16|0}function y4(n,f,a){n|=0,f=i[20+(f|=0)>>2],i[f+16>>2]=i[n+84>>2],i[n+84>>2]=f,d[f+20|0]=1}function m2(n){var f=0,a=0;f=i[n+4>>2],a=i[n+8>>2],i[f+8>>2]=a,i[a+4>>2]=f,Q(n)}function i2(n){var f=0;return(-1>>>(f=31&n)&-2)<>>n}function A1(n,f){var a=0;_=a=_-16|0,i[a+12>>2]=f,e1(n,f,40),_=a+16|0}function k2(n,f){n|=0,f|=0,i[978]||(i[978]=n,i[979]=f),X1()}function p4(n,f){n|=0,f|=0,i[978]||(i[978]=n,i[979]=f)}function m4(n,f,a,e){return r2=0,0}function g4(n,f,a,e,t){}function e0(n){return n?31-s2(n-1^n)|0:32}function E4(n,f,a,e){}function C4(){i[845]=3260,i[827]=42}function R4(n){return 0}function t0(n,f){}function I4(){return 0|_}function S4(n){_=n|=0}function g2(n){}function l1(){}F=w,e2();var R=U([null,y4,s4,t0,t0,t0,g2,u4,h4,A4,g4,t0,l1,g2,g2,g2,g2,E4,g2,p2,b4,r0,k2,V0,t4,l4,k4,r4,o4,$0,d0,d4,g2,l1,v4,w4,g2,R4,c4,m4,e4]);function v1(){return a2.byteLength/65536|0}function M4(n){n|=0;var f=0|v1(),a=f+n|0;if(fp.startsWith(T0);function W0(p){if(p==x2&&U2)return new Uint8Array(U2);var C=E1(p);if(C)return C;if(o0)return o0(p);throw"both async and sync fetching of the wasm failed"}function F1(p){return U2||N2(p)||!P2&&!Y2||typeof fetch!="function"?Promise.resolve().then(()=>W0(p)):fetch(p,{credentials:"same-origin"}).then(C=>{if(!C.ok)throw"failed to load wasm binary file at '"+p+"'";return C.arrayBuffer()}).catch(()=>W0(p))}function H0(p,C,B){return F1(p).then(U=>h2.instantiate(U,C)).then(U=>U).then(B,U=>{_2(`failed to asynchronously prepare wasm: ${U}`),Q0(U)})}function B1(p,C,B,U){return p||typeof h2.instantiateStreaming!="function"||N2(C)||typeof fetch!="function"?H0(C,B,U):fetch(C,{credentials:"same-origin"}).then(F=>h2.instantiateStreaming(F,B).then(U,function(H){return _2(`wasm streaming compile failed: ${H}`),_2("falling back to ArrayBuffer instantiation"),H0(C,B,U)}))}function Q1(){var p={a:L1};function C(U,F){return u2=U.exports,x0=u2.m,M1(u2.j),_1(),u2}function B(U){C(U.instance)}if(U1(),E.instantiateWasm)try{return E.instantiateWasm(p,C)}catch(U){_2(`Module.instantiateWasm callback failed with error: ${U}`),v2(U)}return B1(U2,x2,p,B).catch(v2),{}}N2(x2="libtess-asm.wasm")||(x2=p1(x2));var b0=p=>{for(;p.length>0;)p.shift()(E)};E.noExitRuntime;var x0,T1=()=>{throw 1/0},W1=(p,C,B)=>Z2.copyWithin(p,C,C+B),H1=()=>2147483648,x1=p=>{var C=(p-F2.buffer.byteLength+65535)/65536;try{return F2.grow(C),P0(),1}catch{}},O1=p=>{var C=Z2.length;p>>>=0;var B=H1();if(p>B)return!1;for(var U=(x,e2)=>x+(e2-x%e2)%e2,F=1;F<=4;F*=2){var H=C*(1+.2/F);H=Math.min(H,p+100663296);var D=Math.min(B,U(Math.max(p,H),65536));if(x1(D))return!0}return!1},j1=[null,[],[]],O0=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,D1=(p,C,B)=>{for(var U=C+B,F=C;p[F]&&!(F>=U);)++F;if(F-C>16&&p.buffer&&O0)return O0.decode(p.subarray(C,F));for(var H="";C>10,56320|1023&y2)}}else H+=String.fromCharCode((31&D)<<6|x)}else H+=String.fromCharCode(D)}return H},G1=(p,C)=>{var B=j1[p];C===0||C===10?((p===1?m1:_2)(D1(B,0)),B.length=0):B.push(C)},V2=[],z2=p=>{var C=V2[p];return C||(p>=V2.length&&(V2.length=p+1),V2[p]=C=x0.get(p)),C},L1={f:T1,h:W1,g:O1,d:(p,C,B,U)=>{for(var F=0,H=0;H>2],x=J2[C+4>>2];C+=8;for(var e2=0;e2>2]=F,0},c:J1,i:N1,e:Z1,b:Y1,a:F2},u2=Q1();E._malloc=p=>(E._malloc=u2.k)(p),E._free=p=>(E._free=u2.l)(p),E._triangulate=(p,C,B,U,F,H)=>(E._triangulate=u2.n)(p,C,B,U,F,H);var K2,O2=(p,C)=>(O2=u2.o)(p,C),j2=()=>(j2=u2.p)(),D2=p=>(D2=u2.q)(p);function Y1(p,C,B){var U=j2();try{z2(p)(C,B)}catch(F){if(D2(U),F!==F+0)throw F;O2(1,0)}}function Z1(p,C){var B=j2();try{z2(p)(C)}catch(U){if(D2(B),U!==U+0)throw U;O2(1,0)}}function J1(p,C){var B=j2();try{return z2(p)(C)}catch(U){if(D2(B),U!==U+0)throw U;O2(1,0)}}function N1(p,C,B,U){var F=j2();try{return z2(p)(C,B,U)}catch(H){if(D2(F),H!==H+0)throw H;O2(1,0)}}function j0(){function p(){K2||(K2=!0,E.calledRun=!0,M0||(R1(),W2(E),E.onRuntimeInitialized&&E.onRuntimeInitialized(),I1()))}C2>0||(C1(),C2>0||(E.setStatus?(E.setStatus("Running..."),setTimeout(function(){setTimeout(function(){E.setStatus("")},1),p()},1)):p()))}if(H2=function p(){K2||j0(),K2||(H2=p)},E.preInit)for(typeof E.preInit=="function"&&(E.preInit=[E.preInit]);E.preInit.length>0;)E.preInit.pop()();j0();let k0=null,w2=null,R2=null,q2=null;const V1=2,D0=4e3;let G0=0;const z1=(p,C,B)=>{k0||(k0=E._triangulate);let U=E.HEAPF32;const F=E.HEAP32.BYTES_PER_ELEMENT,H=2,D=U.BYTES_PER_ELEMENT;B>G0&&(G0=B,R2&&(E._free(R2),R2=0),w2&&(E._free(w2),w2=0)),R2||(R2=E._malloc(B*D)),q2||(q2=E._malloc(D0*F));const x=B*V1;w2||(w2=E._malloc(x*D)),U=E.HEAPF32,U.set(p,R2/D),E.HEAP32.set(C,q2/F);const e2=x/H,y2=k0(R2,q2,Math.min(C.length,D0),H,w2,e2),$2=y2*H;U=E.HEAPF32;const X2=U.slice(w2/D,w2/D+$2),c2={};return c2.buffer=X2,c2.vertexCount=y2,c2};return E.triangulate=z1,M2.ready},d1.exports=h1;var w1=y1.exports;const F4=U4({__proto__:null,default:P4(w1)},[w1]);export{F4 as l}; diff --git a/build/assets/lineSegment-3ivVGQNc.js b/build/assets/lineSegment-3ivVGQNc.js new file mode 100644 index 0000000..343cd71 --- /dev/null +++ b/build/assets/lineSegment-3ivVGQNc.js @@ -0,0 +1 @@ +import{c0 as t,au as e,c1 as g,c2 as a,aq as p,c3 as b,c4 as h,c5 as q,c6 as w}from"./index-DKOmzAMm.js";import{s as x}from"./sphere-DoGSV0K5.js";import{c as A}from"./plane-aHrUkISy.js";function s(r){return r?{origin:t(r.origin),vector:t(r.vector)}:{origin:e(),vector:e()}}function k(r,n,o=s()){return g(o.origin,r),a(o.vector,n,r),o}function l(r,n,o){return M(r,n,0,1,o)}function M(r,n,o,u,i){const{vector:c,origin:v}=r,f=a(A.get(),n,v),m=p(c,f)/b(c);return h(i,c,q(m,o,u)),w(i,i,r.origin)}new x(()=>s());export{l as M,k as h,s as v}; diff --git a/build/assets/loadAll-Cm5pWAv4.js b/build/assets/loadAll-Cm5pWAv4.js new file mode 100644 index 0000000..bd3ce91 --- /dev/null +++ b/build/assets/loadAll-Cm5pWAv4.js @@ -0,0 +1 @@ +import{aM as c,a7 as f,aN as u,aO as e}from"./index-DKOmzAMm.js";async function A(n,t){return await n.load(),d(n,t)}async function d(n,t){const i=[],r=(...o)=>{for(const a of o)a!=null&&(Array.isArray(a)?r(...a):f.isCollection(a)?a.forEach(s=>r(s)):u.isLoadable(a)&&i.push(a))};t(r);let l=null;if(await c(i,async o=>{const a=await e(y(o)?o.loadAll():o.load());a.ok!==!1||l||(l=a)}),l)throw l.error;return n}function y(n){return"loadAll"in n&&typeof n.loadAll=="function"}export{d as a,A as t}; diff --git a/build/assets/loadGLTFMesh-DzrF9DGl.js b/build/assets/loadGLTFMesh-DzrF9DGl.js new file mode 100644 index 0000000..8715fc9 --- /dev/null +++ b/build/assets/loadGLTFMesh-DzrF9DGl.js @@ -0,0 +1,8 @@ +import{s as L,U as P,d1 as _,gR as v,bl as B,gk as z,av as D,cI as G}from"./index-DKOmzAMm.js";import{j as U,n as N}from"./mat3-BNGRf_pC.js";import{e as C}from"./mat3f64-q3fE-ZOt.js";import{w as k,m as q,h as K,c as Q}from"./Mesh-DkA8R2dF.js";import{l as V}from"./MeshVertexAttributes-CfiMg9vN.js";import{s as M}from"./meshVertexSpaceUtils-CMKdridq.js";import{c as O,x as F,L as H,O as R,i as I,E as J,T as W,u as X}from"./BufferView-DOhKdt-N.js";import{t as Y,r as Z,u as ee,n as S}from"./vec3-C6eb5QY9.js";import{f as te,o as re,u as E}from"./vec4-n1PBj5SL.js";import{e as oe}from"./types-D0PSWh4d.js";import{n as ne,l as se,o as ae,f as ie,a as h,b as le,c as ue,e as ce,d as fe,g as me}from"./DefaultMaterial_COLOR_GAMMA-C6si8ymn.js";import{M as pe}from"./vertexSpaceConversion-DdxiyRap.js";import{r as de}from"./resourceUtils-CxnhUS9W.js";import{D as w}from"./enums-CxXC-vJk.js";import"./MeshTransform-CnKLNqg-.js";import"./infoFor3D-DsOdlPuA.js";import"./mat4f64-CSKppSlJ.js";import"./quat-BYKy26Om.js";import"./quatf64-Bdb9ZJJK.js";import"./imageUtils-D81CeaJ0.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./earcut-BqgeR2O3.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./DoubleArray-D2IDWC15.js";import"./Indices-BhOjxL0t.js";import"./plane-aHrUkISy.js";import"./vec2f64-DA6GkJuH.js";import"./deduplicate-B_YKqNj1.js";import"./projection-Ch_noS-l.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./vec2-CurFBDJu.js";function ge(e,t,r){const u=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,c=t.typedBufferStride,l=r?r.count:t.count;let s=((r==null?void 0:r.dstIndex)??0)*n,m=((r==null?void 0:r.srcIndex)??0)*c;for(let i=0;ic.set(y,he(x))),n.materials.forEach((x,y)=>l.set(y,we(x,c)));const s=ye(a);for(const x of s.parts)be(s,x,l);const{position:m,normal:i,tangent:o,color:f,texCoord0:p}=s.vertexAttributes,g=M(e,r),j=e.spatialReference.isGeographic?M(e):g,b=pe({vertexAttributes:{position:m.typedBuffer,normal:i==null?void 0:i.typedBuffer,tangent:o==null?void 0:o.typedBuffer},vertexSpace:j,spatialReference:e.spatialReference},g,{allowBufferReuse:!0,sourceUnit:"meters"});if(!b)throw new L("loadGLTFMesh()","Failed to load mesh from glTF due to projection errors");return{transform:null,vertexSpace:g,components:s.components,spatialReference:e.spatialReference,vertexAttributes:new V({...b,color:f==null?void 0:f.typedBuffer,uv:p==null?void 0:p.typedBuffer})}}function $e(e){const t=e==null?void 0:e.resolveFile;return t?{busy:!1,request:async(r,u,n)=>{const a=(t==null?void 0:t(r))??r;return(await P(a,{responseType:u==="image"?"image":u==="binary"||u==="image+type"?"array-buffer":"json",signal:n==null?void 0:n.signal,timeout:0})).data}}:null}function T(e,t){if(e==null)return"-";const r=e.typedBuffer;return`${_(t,r.buffer,()=>t.size)}/${r.byteOffset}/${r.byteLength}`}function Te(e){return e!=null?e.toString():"-"}function ye(e){let t=0;const r={color:!1,tangent:!1,normal:!1,texCoord0:!1},u=new Map,n=new Map,a=[];for(const c of e.parts){const{attributes:{position:l,normal:s,color:m,tangent:i,texCoord0:o}}=c,f=` + ${T(l,u)}/ + ${T(s,u)}/ + ${T(m,u)}/ + ${T(i,u)}/ + ${T(o,u)}/ + ${Te(c.transform)} + `;let p=!1;const g=_(n,f,()=>(p=!0,{start:t,length:l.count}));p&&(t+=l.count),s&&(r.normal=!0),m&&(r.color=!0),i&&(r.tangent=!0),o&&(r.texCoord0=!0),a.push({gltf:c,writeVertices:p,region:g})}return{vertexAttributes:{position:$(W,t),normal:r.normal?$(I,t):null,tangent:r.tangent?$(O,t):null,color:r.color?$(F,t):null,texCoord0:r.texCoord0?$(X,t):null},parts:a,components:[]}}function he(e){return new k({data:(de(e.data),e.data),wrap:Ce(e.parameters.wrap)})}function we(e,t){const r=new v(Me(e.color,e.opacity)),u=e.emissiveFactor?new v(Re(e.emissiveFactor)):null,n=a=>a?new Q({scale:a.scale?[a.scale[0],a.scale[1]]:[1,1],rotation:G(a.rotation??0),offset:a.offset?[a.offset[0],a.offset[1]]:[0,0]}):null;return new q({color:r,colorTexture:t.get(e.textureColor),normalTexture:t.get(e.textureNormal),emissiveColor:u,emissiveTexture:t.get(e.textureEmissive),occlusionTexture:t.get(e.textureOcclusion),alphaMode:Be(e.alphaMode),alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,metallic:e.metallicFactor,roughness:e.roughnessFactor,metallicRoughnessTexture:t.get(e.textureMetallicRoughness),colorTextureTransform:n(e.colorTextureTransform),normalTextureTransform:n(e.normalTextureTransform),occlusionTextureTransform:n(e.occlusionTextureTransform),emissiveTextureTransform:n(e.emissiveTextureTransform),metallicRoughnessTextureTransform:n(e.metallicRoughnessTextureTransform)})}function be(e,t,r){t.writeVertices&&ve(e,t);const{indices:u,attributes:n,primitiveType:a,material:c}=t.gltf;let l=ae(u||n.position.count,a);const s=t.region.start;if(s){const m=new Uint32Array(l);for(let i=0;i`${t.loaderPart}--${n}`,loaderText:"loader__text",loaderPercentage:"loader__percentage"},S='@charset "UTF-8";@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:host{position:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-color-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem);will-change:contents}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--3);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem;--calcite-internal-loader-value-line-height:0.625rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem;--calcite-internal-loader-value-line-height:1.375rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem;--calcite-internal-loader-value-line-height:1.71875rem}:host([no-padding]){padding-block:0px}:host{display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-color-text-1);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{display:block;text-align:center;color:var(--calcite-color-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);line-height:var(--calcite-internal-loader-value-line-height);align-self:center}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 6.66 / var(--calcite-internal-duration-factor));animation-name:loader-clockwise;display:flex}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear}.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}:host([type=determinate]),:host([type=determinate-value]){animation:none;stroke:var(--calcite-color-border-3)}:host([type=determinate]) .loader__svgs,:host([type=determinate-value]) .loader__svgs{animation:none}:host([type=determinate]) .loader__svg--3,:host([type=determinate-value]) .loader__svg--3{animation:none;stroke:var(--calcite-color-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-color-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 4.8 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444 251.3272;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-83.7757333333}100%{stroke-dasharray:27.9252444444 251.3272;stroke-dashoffset:-279.2524444444}}.loader__svg--2{stroke-dasharray:55.8504888889 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 6.4 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889 223.4019555556;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-97.7383555556}100%{stroke-dasharray:55.8504888889 223.4019555556;stroke-dashoffset:-279.2524444444}}.loader__svg--3{stroke-dasharray:13.9626222222 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 7.734 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222 265.2898222222;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-76.7944222222}100%{stroke-dasharray:13.9626222222 265.2898222222;stroke-dashoffset:-279.2524444444}}@keyframes loader-color-shift{0%{stroke:var(--calcite-color-brand)}33%{stroke:var(--calcite-color-brand-press)}66%{stroke:var(--calcite-color-brand-hover)}100%{stroke:var(--calcite-color-brand)}}@keyframes loader-clockwise{100%{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}',H=S,$=_(class extends x{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.formatValue=()=>this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100),this.complete=!1,this.inline=!1,this.label=void 0,this.scale="m",this.type="indeterminate",this.value=0,this.text="",this.effectiveLocale=""}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}connectedCallback(){P(this),this.updateFormatter()}disconnectedCallback(){L(this)}componentWillLoad(){requestAnimationFrame(()=>this.valueChangeHandler())}render(){const{el:e,inline:v,label:h,scale:l,text:s,type:u,value:c}=this,g=e.id||C(),p=.45,i=v?this.getInlineSize(l):this.getSize(l),d=i*p,k=`0 0 ${i} ${i}`,r=u.startsWith("determinate"),m=2*d*Math.PI,f=c/100*m,y=m-f,z=Math.floor(c),b={"stroke-dasharray":`${f} ${y}`};return a(w,{key:"8272bdfae9fff51b19ed8fa66197eb93b53feb4c","aria-label":h,"aria-valuemax":r?"100":void 0,"aria-valuemin":r?"0":void 0,"aria-valuenow":r?z.toString():void 0,id:g,role:"progressbar"},a("div",{key:"3d410c178af39bb57cc478bdd06c0392f6ba71a3",class:t.loaderParts},[1,2,3].map(o=>a("svg",{"aria-hidden":"true",class:{[t.loaderPart]:!0,[t.loaderPartId(o)]:!0},key:o,style:r&&o===3?b:void 0,viewBox:k},a("circle",{cx:i/2,cy:i/2,r:d}))),r&&a("div",{key:"4ccc633930dee031bf769908d712df39e0677bbb",class:t.loaderPercentage},this.formatValue())),s&&a("div",{key:"6d0d51988bdfafee2a19faed9e14d3bda06d79b5",class:t.loaderText},s))}formatterPropsChange(){this.updateFormatter()}getSize(e){return{s:32,m:56,l:80}[e]}getInlineSize(e){return{s:12,m:16,l:20}[e]}updateFormatter(){var e;this.type!=="determinate-value"||((e=this.formatter)==null?void 0:e.resolvedOptions().locale)===this.effectiveLocale||(this.formatter=new Intl.NumberFormat(this.effectiveLocale,{style:"percent"}))}get el(){return this}static get watchers(){return{value:["valueChangeHandler"],effectiveLocale:["formatterPropsChange"],type:["formatterPropsChange"]}}static get style(){return H}},[1,"calcite-loader",{complete:[1540],inline:[516],label:[1],scale:[513],type:[513],value:[2],text:[1],effectiveLocale:[32]},void 0,{value:["valueChangeHandler"],effectiveLocale:["formatterPropsChange"],type:["formatterPropsChange"]}]);function E(){if(typeof customElements>"u")return;["calcite-loader"].forEach(e=>{switch(e){case"calcite-loader":customElements.get(e)||customElements.define(e,$);break}})}E();export{E as d}; diff --git a/build/assets/lyr3DWorker-XDXl96FL.js b/build/assets/lyr3DWorker-XDXl96FL.js new file mode 100644 index 0000000..6859868 --- /dev/null +++ b/build/assets/lyr3DWorker-XDXl96FL.js @@ -0,0 +1,5 @@ +import{o as Qn,e as zr}from"./_commonjsHelpers-DCkdB7M8.js";var De,Nr,Pe,Se={exports:{}};De=Se,Nr=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,Pe=function(Br={}){var Lr,cr,l=Br;l.ready=new Promise((r,e)=>{Lr=r,cr=e});var br,Ur,Hr=Object.assign({},l),Ir="./this.program",Vr=(r,e)=>{throw e},$e=!0,V="";function Te(r){return l.locateFile?l.locateFile(r,V):V+r}typeof document<"u"&&document.currentScript&&(V=document.currentScript.src),Nr&&(V=Nr),V=V.indexOf("blob:")!==0?V.substr(0,V.replace(/[?#].*/,"").lastIndexOf("/")+1):"",br=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},Ur=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{n.status==200||n.status==0&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var or,fr,Yr=l.print||console.log.bind(console),Y=l.printErr||console.error.bind(console);Object.assign(l,Hr),Hr=null,l.arguments&&l.arguments,l.thisProgram&&(Ir=l.thisProgram),l.quit&&(Vr=l.quit),l.wasmBinary&&(or=l.wasmBinary),typeof WebAssembly!="object"&&Q("no native wasm support detected");var P,C,q,mr,y,w,qr,Xr,kr=!1;function Gr(r,e){r||Q(e)}function Jr(){var r=fr.buffer;l.HEAP8=P=new Int8Array(r),l.HEAP16=q=new Int16Array(r),l.HEAPU8=C=new Uint8Array(r),l.HEAPU16=mr=new Uint16Array(r),l.HEAP32=y=new Int32Array(r),l.HEAPU32=w=new Uint32Array(r),l.HEAPF32=qr=new Float32Array(r),l.HEAPF64=Xr=new Float64Array(r)}var Zr=[],Kr=[],Qr=[];function Ce(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)xe(l.preRun.shift());Fr(Zr)}function Me(){l.noFSInit||o.init.initialized||o.init(),o.ignorePermissions=!1,Fr(Kr)}function je(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Re(l.postRun.shift());Fr(Qr)}function xe(r){Zr.unshift(r)}function Oe(r){Kr.unshift(r)}function Re(r){Qr.unshift(r)}var G=0,ar=null;function eo(r){return r}function hr(r){G++,l.monitorRunDependencies&&l.monitorRunDependencies(G)}function ir(r){if(G--,l.monitorRunDependencies&&l.monitorRunDependencies(G),G==0&&ar){var e=ar;ar=null,e()}}function Q(r){l.onAbort&&l.onAbort(r),Y(r="Aborted("+r+")"),kr=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw cr(e),e}var sr,E,S,We="data:application/octet-stream;base64,",re=r=>r.startsWith(We);function ee(r){if(r==sr&&or)return new Uint8Array(or);throw"both async and sync fetching of the wasm failed"}function ze(r){return!or&&$e&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()}).catch(()=>ee(r)):Promise.resolve().then(()=>ee(r))}function te(r,e,t){return ze(r).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(t,n=>{Y(`failed to asynchronously prepare wasm: ${n}`),Q(n)})}function Ne(r,e,t,n){return r||typeof WebAssembly.instantiateStreaming!="function"||re(e)||typeof fetch!="function"?te(e,t,n):fetch(e,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,t).then(n,function(i){return Y(`wasm streaming compile failed: ${i}`),Y("falling back to ArrayBuffer instantiation"),te(e,t,n)}))}function Be(){var r={a:Ln};function e(n,a){return A=n.exports,fr=A._,Jr(),K=A.aa,Oe(A.$),ir(),A}function t(n){e(n.instance)}if(hr(),l.instantiateWasm)try{return l.instantiateWasm(r,e)}catch(n){Y(`Module.instantiateWasm callback failed with error: ${n}`),cr(n)}return Ne(or,sr,r,t).catch(cr),{}}function Le(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}re(sr="lyr3DWorker.wasm")||(sr=Te(sr));var Fr=r=>{for(;r.length>0;)r.shift()(l)},Ue=l.noExitRuntime||!0;function He(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(e){w[this.ptr+4>>2]=e},this.get_type=function(){return w[this.ptr+4>>2]},this.set_destructor=function(e){w[this.ptr+8>>2]=e},this.get_destructor=function(){return w[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,P[this.ptr+12|0]=e},this.get_caught=function(){return P[this.ptr+12|0]!=0},this.set_rethrown=function(e){e=e?1:0,P[this.ptr+13|0]=e},this.get_rethrown=function(){return P[this.ptr+13|0]!=0},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){w[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return w[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Fe(this.get_type()))return w[this.excPtr>>2];var e=this.get_adjusted_ptr();return e!==0?e:this.excPtr}}var Ie=(r,e,t)=>{throw new He(r).init(e,t),r},Ve=r=>(y[be()>>2]=r,r),b={isAbs:r=>r.charAt(0)==="/",splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var a=r[n];a==="."?r.splice(n,1):a===".."?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=b.isAbs(r),t=r.substr(-1)==="/";return(r=b.normalizeArray(r.split("/").filter(n=>!!n),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=b.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if(r==="/")return"/";var e=(r=(r=b.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return e===-1?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return b.normalize(r.join("/"))},join2:(r,e)=>b.normalize(r+"/"+e)},Ye=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return r=>crypto.getRandomValues(r);Q("initRandomDevice")},ne=r=>(ne=Ye())(r),L={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:o.cwd();if(typeof n!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=b.isAbs(n)}return(e?"/":"")+(r=b.normalizeArray(r.split("/").filter(a=>!!a),!e).join("/"))||"."},relative:(r,e)=>{function t(c){for(var m=0;m=0&&c[h]==="";h--);return m>h?[]:c.slice(m,h-m+1)}r=L.resolve(r).substr(1),e=L.resolve(e).substr(1);for(var n=t(r.split("/")),a=t(e.split("/")),i=Math.min(n.length,a.length),s=i,u=0;u{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&oe)return oe.decode(r.subarray(e,a));for(var i="";e>10,56320|1023&c)}}else i+=String.fromCharCode((31&s)<<6|u)}else i+=String.fromCharCode(s)}return i},Ar=[],Dr=r=>{for(var e=0,t=0;t=55296&&n<=57343?(e+=4,++t):e+=3}return e},Pr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,i=t+n-1,s=0;s=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&r.charCodeAt(++s)),u<=127){if(t>=i)break;e[t++]=u}else if(u<=2047){if(t+1>=i)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=i)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=i)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u}}return e[t]=0,t-a};function Sr(r,e,t){var n=Dr(r)+1,a=new Array(n),i=Pr(r,a,0,a.length);return e&&(a.length=i),a}var qe=()=>{if(!Ar.length){var r=null;if(typeof window<"u"&&typeof window.prompt=="function"?(r=window.prompt("Input: "))!==null&&(r+=` +`):typeof readline=="function"&&(r=readline())!==null&&(r+=` +`),!r)return null;Ar=Sr(r,!0)}return Ar.shift()},J={ttys:[],init(){},shutdown(){},register(r,e){J.ttys[r]={input:[],output:[],ops:e},o.registerDevice(r,J.stream_ops)},stream_ops:{open(r){var e=J.ttys[r.node.rdev];if(!e)throw new o.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,a){if(!r.tty||!r.tty.ops.get_char)throw new o.ErrnoError(60);for(var i=0,s=0;sqe(),put_char(r,e){e===null||e===10?(Yr(rr(r.output,0)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(Yr(rr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){e===null||e===10?(Y(rr(r.output,0)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(Y(rr(r.output,0)),r.output=[])}}},ae=r=>{Q()},g={ops_table:null,mount:r=>g.createNode(null,"/",16895,0),createNode(r,e,t,n){if(o.isBlkdev(t)||o.isFIFO(t))throw new o.ErrnoError(63);g.ops_table||(g.ops_table={dir:{node:{getattr:g.node_ops.getattr,setattr:g.node_ops.setattr,lookup:g.node_ops.lookup,mknod:g.node_ops.mknod,rename:g.node_ops.rename,unlink:g.node_ops.unlink,rmdir:g.node_ops.rmdir,readdir:g.node_ops.readdir,symlink:g.node_ops.symlink},stream:{llseek:g.stream_ops.llseek}},file:{node:{getattr:g.node_ops.getattr,setattr:g.node_ops.setattr},stream:{llseek:g.stream_ops.llseek,read:g.stream_ops.read,write:g.stream_ops.write,allocate:g.stream_ops.allocate,mmap:g.stream_ops.mmap,msync:g.stream_ops.msync}},link:{node:{getattr:g.node_ops.getattr,setattr:g.node_ops.setattr,readlink:g.node_ops.readlink},stream:{}},chrdev:{node:{getattr:g.node_ops.getattr,setattr:g.node_ops.setattr},stream:o.chrdev_stream_ops}});var a=o.createNode(r,e,t,n);return o.isDir(a.mode)?(a.node_ops=g.ops_table.dir.node,a.stream_ops=g.ops_table.dir.stream,a.contents={}):o.isFile(a.mode)?(a.node_ops=g.ops_table.file.node,a.stream_ops=g.ops_table.file.stream,a.usedBytes=0,a.contents=null):o.isLink(a.mode)?(a.node_ops=g.ops_table.link.node,a.stream_ops=g.ops_table.link.stream):o.isChrdev(a.mode)&&(a.node_ops=g.ops_table.chrdev.node,a.stream_ops=g.ops_table.chrdev.stream),a.timestamp=Date.now(),r&&(r.contents[e]=a,r.timestamp=a.timestamp),a},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t>>0),t!=0&&(e=Math.max(e,256));var a=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(a.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(e==0)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=o.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,o.isDir(r.mode)?e.size=4096:o.isFile(r.mode)?e.size=r.usedBytes:o.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){e.mode!==void 0&&(r.mode=e.mode),e.timestamp!==void 0&&(r.timestamp=e.timestamp),e.size!==void 0&&g.resizeFileStorage(r,e.size)},lookup(r,e){throw o.genericErrors[44]},mknod:(r,e,t,n)=>g.createNode(r,e,t,n),rename(r,e,t){if(o.isDir(r.mode)){var n;try{n=o.lookupNode(e,t)}catch{}if(n)for(var a in n.contents)throw new o.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=o.lookupNode(r,e);for(var n in t.contents)throw new o.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink(r,e,t){var n=g.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!o.isLink(r.mode))throw new o.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,a){var i=r.node.contents;if(a>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-a,n);if(s>8&&i.subarray)e.set(i.subarray(a,a+s),t);else for(var u=0;u0||t+e(g.stream_ops.write(r,e,0,n,t,!1),0)}},Xe=(r,e,t,n)=>{var a=`al ${r}`;Ur(r,i=>{Gr(i,`Loading data file "${r}" failed (no arrayBuffer).`),e(new Uint8Array(i)),a&&ir()},i=>{if(!t)throw`Loading data file "${r}" failed.`;t()}),a&&hr()},Ge=(r,e,t,n,a,i)=>o.createDataFile(r,e,t,n,a,i),Je=l.preloadPlugins||[],Ze=(r,e,t,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return Je.forEach(i=>{a||i.canHandle(e)&&(i.handle(r,e,t,n),a=!0)}),a},Ke=(r,e,t,n,a,i,s,u,d,c)=>{var m=e?L.resolve(b.join2(r,e)):r;function h(p){function _(k){c&&c(),u||Ge(r,e,k,n,a,d),i&&i(),ir()}Ze(p,m,_,()=>{s&&s(),ir()})||_(p)}hr(),typeof t=="string"?Xe(t,p=>h(p),s):h(t)},Qe=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(e===void 0)throw new Error(`Unknown file open mode: ${r}`);return e},$r=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},o={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,e={}){if(!(r=L.resolve(r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((e=Object.assign(t,e)).recurse_count>8)throw new o.ErrnoError(32);for(var n=r.split("/").filter(m=>!!m),a=o.root,i="/",s=0;s40)throw new o.ErrnoError(32)}}return{path:i,node:a}},getPath(r){for(var e;;){if(o.isRoot(r)){var t=r.mount.mountpoint;return e?t[t.length-1]!=="/"?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n>>0)%o.nameTable.length},hashAddNode(r){var e=o.hashName(r.parent.id,r.name);r.name_next=o.nameTable[e],o.nameTable[e]=r},hashRemoveNode(r){var e=o.hashName(r.parent.id,r.name);if(o.nameTable[e]===r)o.nameTable[e]=r.name_next;else for(var t=o.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=o.mayLookup(r);if(t)throw new o.ErrnoError(t,r);for(var n=o.hashName(r.id,e),a=o.nameTable[n];a;a=a.name_next){var i=a.name;if(a.parent.id===r.id&&i===e)return a}return o.lookup(r,e)},createNode(r,e,t,n){var a=new o.FSNode(r,e,t,n);return o.hashAddNode(a),a},destroyNode(r){o.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>(61440&r)==32768,isDir:r=>(61440&r)==16384,isLink:r=>(61440&r)==40960,isChrdev:r=>(61440&r)==8192,isBlkdev:r=>(61440&r)==24576,isFIFO:r=>(61440&r)==4096,isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>o.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){var e=o.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{return o.lookupNode(r,e),20}catch{}return o.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=o.lookupNode(r,e)}catch(i){return i.errno}var a=o.nodePermissions(r,"wx");if(a)return a;if(t){if(!o.isDir(n.mode))return 54;if(o.isRoot(n)||o.getPath(n)===o.cwd())return 10}else if(o.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?o.isLink(r.mode)?32:o.isDir(r.mode)&&(o.flagsToPermissionString(e)!=="r"||512&e)?31:o.nodePermissions(r,o.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=o.MAX_OPEN_FDS;r++)if(!o.streams[r])return r;throw new o.ErrnoError(33)},getStreamChecked(r){var e=o.getStream(r);if(!e)throw new o.ErrnoError(8);return e},getStream:r=>o.streams[r],createStream:(r,e=-1)=>(o.FSStream||(o.FSStream=function(){this.shared={}},o.FSStream.prototype={},Object.defineProperties(o.FSStream.prototype,{object:{get(){return this.node},set(t){this.node=t}},isRead:{get(){return(2097155&this.flags)!=1}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(t){this.shared.flags=t}},position:{get(){return this.shared.position},set(t){this.shared.position=t}}})),r=Object.assign(new o.FSStream,r),e==-1&&(e=o.nextfd()),r.fd=e,o.streams[e]=r,r),closeStream(r){o.streams[r]=null},chrdev_stream_ops:{open(r){var e=o.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new o.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){o.devices[r]={stream_ops:e}},getDevice:r=>o.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs(r,e){typeof r=="function"&&(e=r,r=!1),o.syncFSRequests++,o.syncFSRequests>1&&Y(`warning: ${o.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=o.getMounts(o.root.mount),n=0;function a(s){return o.syncFSRequests--,e(s)}function i(s){if(s)return i.errored?void 0:(i.errored=!0,a(s));++n>=t.length&&a(null)}t.forEach(s=>{if(!s.type.syncfs)return i(null);s.type.syncfs(s,r,i)})},mount(r,e,t){var n,a=t==="/",i=!t;if(a&&o.root)throw new o.ErrnoError(10);if(!a&&!i){var s=o.lookupPath(t,{follow_mount:!1});if(t=s.path,n=s.node,o.isMountpoint(n))throw new o.ErrnoError(10);if(!o.isDir(n.mode))throw new o.ErrnoError(54)}var u={type:r,opts:e,mountpoint:t,mounts:[]},d=r.mount(u);return d.mount=u,u.root=d,a?o.root=d:n&&(n.mounted=u,n.mount&&n.mount.mounts.push(u)),d},unmount(r){var e=o.lookupPath(r,{follow_mount:!1});if(!o.isMountpoint(e.node))throw new o.ErrnoError(28);var t=e.node,n=t.mounted,a=o.getMounts(n);Object.keys(o.nameTable).forEach(s=>{for(var u=o.nameTable[s];u;){var d=u.name_next;a.includes(u.mount)&&o.destroyNode(u),u=d}}),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=o.lookupPath(r,{parent:!0}).node,a=b.basename(r);if(!a||a==="."||a==="..")throw new o.ErrnoError(28);var i=o.mayCreate(n,a);if(i)throw new o.ErrnoError(i);if(!n.node_ops.mknod)throw new o.ErrnoError(63);return n.node_ops.mknod(n,a,e,t)},create:(r,e)=>(e=e!==void 0?e:438,e&=4095,e|=32768,o.mknod(r,e,0)),mkdir:(r,e)=>(e=e!==void 0?e:511,e&=1023,e|=16384,o.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",a=0;a(t===void 0&&(t=e,e=438),e|=8192,o.mknod(r,e,t)),symlink(r,e){if(!L.resolve(r))throw new o.ErrnoError(44);var t=o.lookupPath(e,{parent:!0}).node;if(!t)throw new o.ErrnoError(44);var n=b.basename(e),a=o.mayCreate(t,n);if(a)throw new o.ErrnoError(a);if(!t.node_ops.symlink)throw new o.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,a=b.dirname(r),i=b.dirname(e),s=b.basename(r),u=b.basename(e);if(t=o.lookupPath(r,{parent:!0}).node,n=o.lookupPath(e,{parent:!0}).node,!t||!n)throw new o.ErrnoError(44);if(t.mount!==n.mount)throw new o.ErrnoError(75);var d,c=o.lookupNode(t,s),m=L.relative(r,i);if(m.charAt(0)!==".")throw new o.ErrnoError(28);if((m=L.relative(e,a)).charAt(0)!==".")throw new o.ErrnoError(55);try{d=o.lookupNode(n,u)}catch{}if(c!==d){var h=o.isDir(c.mode),p=o.mayDelete(t,s,h);if(p)throw new o.ErrnoError(p);if(p=d?o.mayDelete(n,u,h):o.mayCreate(n,u))throw new o.ErrnoError(p);if(!t.node_ops.rename)throw new o.ErrnoError(63);if(o.isMountpoint(c)||d&&o.isMountpoint(d))throw new o.ErrnoError(10);if(n!==t&&(p=o.nodePermissions(t,"w")))throw new o.ErrnoError(p);o.hashRemoveNode(c);try{t.node_ops.rename(c,n,u)}catch(_){throw _}finally{o.hashAddNode(c)}}},rmdir(r){var e=o.lookupPath(r,{parent:!0}).node,t=b.basename(r),n=o.lookupNode(e,t),a=o.mayDelete(e,t,!0);if(a)throw new o.ErrnoError(a);if(!e.node_ops.rmdir)throw new o.ErrnoError(63);if(o.isMountpoint(n))throw new o.ErrnoError(10);e.node_ops.rmdir(e,t),o.destroyNode(n)},readdir(r){var e=o.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new o.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=o.lookupPath(r,{parent:!0}).node;if(!e)throw new o.ErrnoError(44);var t=b.basename(r),n=o.lookupNode(e,t),a=o.mayDelete(e,t,!1);if(a)throw new o.ErrnoError(a);if(!e.node_ops.unlink)throw new o.ErrnoError(63);if(o.isMountpoint(n))throw new o.ErrnoError(10);e.node_ops.unlink(e,t),o.destroyNode(n)},readlink(r){var e=o.lookupPath(r).node;if(!e)throw new o.ErrnoError(44);if(!e.node_ops.readlink)throw new o.ErrnoError(28);return L.resolve(o.getPath(e.parent),e.node_ops.readlink(e))},stat(r,e){var t=o.lookupPath(r,{follow:!e}).node;if(!t)throw new o.ErrnoError(44);if(!t.node_ops.getattr)throw new o.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>o.stat(r,!0),chmod(r,e,t){var n;if(!(n=typeof r=="string"?o.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new o.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){o.chmod(r,e,!0)},fchmod(r,e){var t=o.getStreamChecked(r);o.chmod(t.node,e)},chown(r,e,t,n){var a;if(!(a=typeof r=="string"?o.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new o.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(r,e,t){o.chown(r,e,t,!0)},fchown(r,e,t){var n=o.getStreamChecked(r);o.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new o.ErrnoError(28);var t;if(!(t=typeof r=="string"?o.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new o.ErrnoError(63);if(o.isDir(t.mode))throw new o.ErrnoError(31);if(!o.isFile(t.mode))throw new o.ErrnoError(28);var n=o.nodePermissions(t,"w");if(n)throw new o.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=o.getStreamChecked(r);if(!(2097155&t.flags))throw new o.ErrnoError(28);o.truncate(t.node,e)},utime(r,e,t){var n=o.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t){if(r==="")throw new o.ErrnoError(44);var n;if(t=t===void 0?438:t,t=64&(e=typeof e=="string"?Qe(e):e)?4095&t|32768:0,typeof r=="object")n=r;else{r=b.normalize(r);try{n=o.lookupPath(r,{follow:!(131072&e)}).node}catch{}}var a=!1;if(64&e)if(n){if(128&e)throw new o.ErrnoError(20)}else n=o.mknod(r,t,0),a=!0;if(!n)throw new o.ErrnoError(44);if(o.isChrdev(n.mode)&&(e&=-513),65536&e&&!o.isDir(n.mode))throw new o.ErrnoError(54);if(!a){var i=o.mayOpen(n,e);if(i)throw new o.ErrnoError(i)}512&e&&!a&&o.truncate(n,0),e&=-131713;var s=o.createStream({node:n,path:o.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!l.logReadFiles||1&e||(o.readFiles||(o.readFiles={}),r in o.readFiles||(o.readFiles[r]=1)),s},close(r){if(o.isClosed(r))throw new o.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{o.closeStream(r.fd)}r.fd=null},isClosed:r=>r.fd===null,llseek(r,e,t){if(o.isClosed(r))throw new o.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new o.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new o.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,a){if(n<0||a<0)throw new o.ErrnoError(28);if(o.isClosed(r))throw new o.ErrnoError(8);if((2097155&r.flags)==1)throw new o.ErrnoError(8);if(o.isDir(r.node.mode))throw new o.ErrnoError(31);if(!r.stream_ops.read)throw new o.ErrnoError(28);var i=a!==void 0;if(i){if(!r.seekable)throw new o.ErrnoError(70)}else a=r.position;var s=r.stream_ops.read(r,e,t,n,a);return i||(r.position+=s),s},write(r,e,t,n,a,i){if(n<0||a<0)throw new o.ErrnoError(28);if(o.isClosed(r))throw new o.ErrnoError(8);if(!(2097155&r.flags))throw new o.ErrnoError(8);if(o.isDir(r.node.mode))throw new o.ErrnoError(31);if(!r.stream_ops.write)throw new o.ErrnoError(28);r.seekable&&1024&r.flags&&o.llseek(r,0,2);var s=a!==void 0;if(s){if(!r.seekable)throw new o.ErrnoError(70)}else a=r.position;var u=r.stream_ops.write(r,e,t,n,a,i);return s||(r.position+=u),u},allocate(r,e,t){if(o.isClosed(r))throw new o.ErrnoError(8);if(e<0||t<=0)throw new o.ErrnoError(28);if(!(2097155&r.flags))throw new o.ErrnoError(8);if(!o.isFile(r.node.mode)&&!o.isDir(r.node.mode))throw new o.ErrnoError(43);if(!r.stream_ops.allocate)throw new o.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,a){if(2&n&&!(2&a)&&(2097155&r.flags)!=2)throw new o.ErrnoError(2);if((2097155&r.flags)==1)throw new o.ErrnoError(2);if(!r.stream_ops.mmap)throw new o.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,a)},msync:(r,e,t,n,a)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,a):0,munmap:r=>0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new o.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary",e.encoding!=="utf8"&&e.encoding!=="binary")throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=o.open(r,e.flags),a=o.stat(r).size,i=new Uint8Array(a);return o.read(n,i,0,a,0),e.encoding==="utf8"?t=rr(i,0):e.encoding==="binary"&&(t=i),o.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=o.open(r,t.flags,t.mode);if(typeof e=="string"){var a=new Uint8Array(Dr(e)+1),i=Pr(e,a,0,a.length);o.write(n,a,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");o.write(n,e,0,e.byteLength,void 0,t.canOwn)}o.close(n)},cwd:()=>o.currentPath,chdir(r){var e=o.lookupPath(r,{follow:!0});if(e.node===null)throw new o.ErrnoError(44);if(!o.isDir(e.node.mode))throw new o.ErrnoError(54);var t=o.nodePermissions(e.node,"x");if(t)throw new o.ErrnoError(t);o.currentPath=e.path},createDefaultDirectories(){o.mkdir("/tmp"),o.mkdir("/home"),o.mkdir("/home/web_user")},createDefaultDevices(){o.mkdir("/dev"),o.registerDevice(o.makedev(1,3),{read:()=>0,write:(n,a,i,s,u)=>s}),o.mkdev("/dev/null",o.makedev(1,3)),J.register(o.makedev(5,0),J.default_tty_ops),J.register(o.makedev(6,0),J.default_tty1_ops),o.mkdev("/dev/tty",o.makedev(5,0)),o.mkdev("/dev/tty1",o.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(e===0&&(e=ne(r).byteLength),r[--e]);o.createDevice("/dev","random",t),o.createDevice("/dev","urandom",t),o.mkdir("/dev/shm"),o.mkdir("/dev/shm/tmp")},createSpecialDirectories(){o.mkdir("/proc");var r=o.mkdir("/proc/self");o.mkdir("/proc/self/fd"),o.mount({mount(){var e=o.createNode(r,"fd",16895,73);return e.node_ops={lookup(t,n){var a=+n,i=o.getStreamChecked(a),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return s.parent=s,s}},e}},{},"/proc/self/fd")},createStandardStreams(){l.stdin?o.createDevice("/dev","stdin",l.stdin):o.symlink("/dev/tty","/dev/stdin"),l.stdout?o.createDevice("/dev","stdout",null,l.stdout):o.symlink("/dev/tty","/dev/stdout"),l.stderr?o.createDevice("/dev","stderr",null,l.stderr):o.symlink("/dev/tty1","/dev/stderr"),o.open("/dev/stdin",0),o.open("/dev/stdout",1),o.open("/dev/stderr",1)},ensureErrnoError(){o.ErrnoError||(o.ErrnoError=function(r,e){this.name="ErrnoError",this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(r),this.message="FS error"},o.ErrnoError.prototype=new Error,o.ErrnoError.prototype.constructor=o.ErrnoError,[44].forEach(r=>{o.genericErrors[r]=new o.ErrnoError(r),o.genericErrors[r].stack=""}))},staticInit(){o.ensureErrnoError(),o.nameTable=new Array(4096),o.mount(g,{},"/"),o.createDefaultDirectories(),o.createDefaultDevices(),o.createSpecialDirectories(),o.filesystems={MEMFS:g}},init(r,e,t){o.init.initialized=!0,o.ensureErrnoError(),l.stdin=r||l.stdin,l.stdout=e||l.stdout,l.stderr=t||l.stderr,o.createStandardStreams()},quit(){o.init.initialized=!1;for(var r=0;r=k.length)return 0;var T=Math.min(k.length-_,p);if(k.slice)for(var D=0;D{var m=s.stream_ops[c];u[c]=function(){return o.forceLoadFile(s),m.apply(null,arguments)}}),u.read=(c,m,h,p,_)=>(o.forceLoadFile(s),d(c,m,h,p,_)),u.mmap=(c,m,h,p,_)=>{o.forceLoadFile(s);var k=ae();if(!k)throw new o.ErrnoError(48);return d(c,P,k,m,h),{ptr:k,allocated:!0}},s.stream_ops=u,s}},er=(r,e)=>r?rr(C,r,e):"",F={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(b.isAbs(e))return e;var n;if(n=r===-100?o.cwd():F.getStreamFromFD(r).path,e.length==0){if(!t)throw new o.ErrnoError(44);return n}return b.join2(n,e)},doStat(r,e,t){try{var n=r(e)}catch(u){if(u&&u.node&&b.normalize(e)!==b.normalize(o.getPath(u.node)))return-54;throw u}y[t>>2]=n.dev,y[t+4>>2]=n.mode,w[t+8>>2]=n.nlink,y[t+12>>2]=n.uid,y[t+16>>2]=n.gid,y[t+20>>2]=n.rdev,S=[n.size>>>0,(E=n.size,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[t+24>>2]=S[0],y[t+28>>2]=S[1],y[t+32>>2]=4096,y[t+36>>2]=n.blocks;var a=n.atime.getTime(),i=n.mtime.getTime(),s=n.ctime.getTime();return S=[Math.floor(a/1e3)>>>0,(E=Math.floor(a/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[t+40>>2]=S[0],y[t+44>>2]=S[1],w[t+48>>2]=a%1e3*1e3,S=[Math.floor(i/1e3)>>>0,(E=Math.floor(i/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[t+56>>2]=S[0],y[t+60>>2]=S[1],w[t+64>>2]=i%1e3*1e3,S=[Math.floor(s/1e3)>>>0,(E=Math.floor(s/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[t+72>>2]=S[0],y[t+76>>2]=S[1],w[t+80>>2]=s%1e3*1e3,S=[n.ino>>>0,(E=n.ino,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[t+88>>2]=S[0],y[t+92>>2]=S[1],0},doMsync(r,e,t,n,a){if(!o.isFile(e.node.mode))throw new o.ErrnoError(43);if(2&n)return 0;var i=C.slice(r,r+t);o.msync(e,i,a,t,n)},varargs:void 0,get(){var r=y[+F.varargs>>2];return F.varargs+=4,r},getp:()=>F.get(),getStr:r=>er(r),getStreamFromFD:r=>o.getStreamChecked(r)};function rt(r,e,t){F.varargs=t;try{var n=F.getStreamFromFD(r);switch(e){case 0:if((a=F.get())<0)return-28;for(;o.streams[a];)a++;return o.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=F.get();return n.flags|=a,0;case 5:return a=F.getp(),q[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return Ve(28),-1}}catch(i){if(o===void 0||i.name!=="ErrnoError")throw i;return-i.errno}}function et(r,e,t){F.varargs=t;try{var n=F.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),i=F.getp();y[i>>2]=a.c_iflag||0,y[i+4>>2]=a.c_oflag||0,y[i+8>>2]=a.c_cflag||0,y[i+12>>2]=a.c_lflag||0;for(var s=0;s<32;s++)P[i+s+17|0]=a.c_cc[s]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){i=F.getp();var u=y[i>>2],d=y[i+4>>2],c=y[i+8>>2],m=y[i+12>>2],h=[];for(s=0;s<32;s++)h.push(P[i+s+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:u,c_oflag:d,c_cflag:c,c_lflag:m,c_cc:h})}return 0;case 21519:return n.tty?(i=F.getp(),y[i>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return i=F.getp(),o.ioctl(n,e,i);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var p=n.tty.ops.ioctl_tiocgwinsz(n.tty);i=F.getp(),q[i>>1]=p[0],q[i+2>>1]=p[1]}return 0;default:return-28}}catch(_){if(o===void 0||_.name!=="ErrnoError")throw _;return-_.errno}}function tt(r,e,t,n){F.varargs=n;try{e=F.getStr(e),e=F.calculateAt(r,e);var a=n?F.get():0;return o.open(e,t,a).fd}catch(i){if(o===void 0||i.name!=="ErrnoError")throw i;return-i.errno}}var pr={},Tr=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Cr(r){return this.fromWireType(y[r>>2])}var ie,se,ue,tr={},Z={},vr={},le=r=>{throw new ie(r)},de=(r,e,t)=>{function n(u){var d=t(u);d.length!==r.length&&le("Mismatched type converter count");for(var c=0;c{Z.hasOwnProperty(u)?a[d]=Z[u]:(i.push(u),tr.hasOwnProperty(u)||(tr[u]=[]),tr[u].push(()=>{a[d]=Z[u],++s===i.length&&n(a)}))}),i.length===0&&n(a)},nt=r=>{var e=pr[r];delete pr[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,i=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));de([r],i,s=>{var u={};return a.forEach((d,c)=>{var m=d.fieldName,h=s[c],p=d.getter,_=d.getterContext,k=s[c+a.length],T=d.setter,D=d.setterContext;u[m]={read:I=>h.fromWireType(p(_,I)),write:(I,f)=>{var v=[];T(D,I,k.toWireType(v,f)),Tr(v)}}}),[{name:e.name,fromWireType:d=>{var c={};for(var m in u)c[m]=u[m].read(d);return n(d),c},toWireType:(d,c)=>{for(var m in u)if(!(m in c))throw new TypeError(`Missing field: "${m}"`);var h=t();for(m in u)u[m].write(h,c[m]);return d!==null&&d.push(n,h),h},argPackAdvance:X,readValueFromPointer:Cr,destructorFunction:n}]})},ot=(r,e,t,n,a)=>{},at=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);se=r},M=r=>{for(var e="",t=r;C[t];)e+=se[C[t++]];return e},O=r=>{throw new ue(r)};function it(r,e,t={}){var n=e.name;if(r||O(`type "${n}" must have a positive integer typeid pointer`),Z.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;O(`Cannot register type '${n}' twice`)}if(Z[r]=e,delete vr[r],tr.hasOwnProperty(r)){var a=tr[r];delete tr[r],a.forEach(i=>i())}}function U(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return it(r,e,t)}var X=8,st=(r,e,t,n)=>{U(r,{name:e=M(e),fromWireType:function(a){return!!a},toWireType:function(a,i){return i?t:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(C[a])},destructorFunction:null})};function ut(){Object.assign(ce.prototype,{get(r){return this.allocated[r]},has(r){return this.allocated[r]!==void 0},allocate(r){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=r,e},free(r){this.allocated[r]=void 0,this.freelist.push(r)}})}function ce(){this.allocated=[void 0],this.freelist=[]}var W=new ce,Mr=r=>{r>=W.reserved&&--W.get(r).refcount==0&&W.free(r)},lt=()=>{for(var r=0,e=W.reserved;e{W.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),W.reserved=W.allocated.length,l.count_emval_handles=lt},$={toValue:r=>(r||O("Cannot use deleted val. handle = "+r),W.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return W.allocate({refcount:1,value:r})}}},ct=(r,e)=>{U(r,{name:e=M(e),fromWireType:t=>{var n=$.toValue(t);return Mr(t),n},toWireType:(t,n)=>$.toHandle(n),argPackAdvance:X,readValueFromPointer:Cr,destructorFunction:null})},ft=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType(qr[t>>2])};case 8:return function(t){return this.fromWireType(Xr[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},mt=(r,e,t)=>{U(r,{name:e=M(e),fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:ft(e,t),destructorFunction:null})},ht=48,pt=57,vt=r=>{if(r===void 0)return"_unknown";var e=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ht&&e<=pt?`_${r}`:r};function yt(r,e,t,n,a,i){var s=e.length;s<2&&O("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=e[1]!==null&&t!==null,d=!1,c=1;c{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(){return r[e].overloadTable.hasOwnProperty(arguments.length)||O(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[arguments.length].apply(this,arguments)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},wt=(r,e,t)=>{l.hasOwnProperty(r)?((t===void 0||l[r].overloadTable!==void 0&&l[r].overloadTable[t]!==void 0)&&O(`Cannot register public name '${r}' twice`),gt(l,r,r),l.hasOwnProperty(t)&&O(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),l[r].overloadTable[t]=e):(l[r]=e,t!==void 0&&(l[r].numArguments=t))},_t=(r,e)=>{for(var t=[],n=0;n>2]);return t},Et=(r,e,t)=>{l.hasOwnProperty(r)||le("Replacing nonexistant public symbol"),l[r].overloadTable!==void 0&&t!==void 0?l[r].overloadTable[t]=e:(l[r]=e,l[r].argCount=t)},bt=(r,e,t)=>{var n=l["dynCall_"+r];return t&&t.length?n.apply(null,[e].concat(t)):n.call(null,e)},ur=[],R=r=>{var e=ur[r];return e||(r>=ur.length&&(ur.length=r+1),ur[r]=e=K.get(r)),e},kt=(r,e,t)=>r.includes("j")?bt(r,e,t):R(e).apply(null,t),Ft=(r,e)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),kt(r,e,t)}},lr=(r,e)=>{function t(){return r.includes("j")?Ft(r,e):R(e)}r=M(r);var n=t();return typeof n!="function"&&O(`unknown function pointer with signature ${r}: ${e}`),n};function At(r,e){return r=vt(r),{[r]:function(){return e.apply(this,arguments)}}[r]}var fe,Dt=(r,e)=>{var t=At(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` +`+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},me=r=>{var e=ke(r),t=M(e);return H(e),t},Pt=(r,e)=>{var t=[],n={};function a(i){n[i]||Z[i]||(vr[i]?vr[i].forEach(a):(t.push(i),n[i]=!0))}throw e.forEach(a),new fe(`${r}: `+t.map(me).join([", "]))},St=r=>{const e=(r=r.trim()).indexOf("(");return e!==-1?(Gr(r[r.length-1]==")","Parentheses for argument names should match."),r.substr(0,e)):r},$t=(r,e,t,n,a,i,s)=>{var u=_t(e,t);r=M(r),r=St(r),a=lr(n,a),wt(r,function(){Pt(`Cannot call ${r} due to unbound types`,u)},e-1),de([],u,function(d){var c=[d[0],null].concat(d.slice(1));return Et(r,yt(r,c,null,a,i),e-1),[]})},Tt=(r,e,t)=>{switch(e){case 1:return t?n=>P[0|n]:n=>C[0|n];case 2:return t?n=>q[n>>1]:n=>mr[n>>1];case 4:return t?n=>y[n>>2]:n=>w[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Ct=(r,e,t,n,a)=>{e=M(e);var i=c=>c;if(n===0){var s=32-8*t;i=c=>c<>>s}var u=e.includes("unsigned"),d=(c,m)=>{};U(r,{name:e,fromWireType:i,toWireType:u?function(c,m){return d(m,this.name),m>>>0}:function(c,m){return d(m,this.name),m},argPackAdvance:X,readValueFromPointer:Tt(e,t,n!==0),destructorFunction:null})},Mt=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(i){var s=w[i>>2],u=w[i+4>>2];return new n(P.buffer,u,s)}U(r,{name:t=M(t),fromWireType:a,argPackAdvance:X,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})};function jt(r){return this.fromWireType(w[r>>2])}var xt=(r,e,t)=>Pr(r,C,e,t),Ot=(r,e)=>{var t=(e=M(e))==="std::string";U(r,{name:e,fromWireType(n){var a,i=w[n>>2],s=n+4;if(t)for(var u=s,d=0;d<=i;++d){var c=s+d;if(d==i||C[c]==0){var m=er(u,c-u);a===void 0?a=m:(a+="\0",a+=m),u=c+1}}else{var h=new Array(i);for(d=0;d>2]=i,t&&s)xt(a,d,i+1);else if(s)for(var c=0;c255&&(H(d),O("String has UTF-16 code units that do not fit in 8 bits")),C[d+c]=m}else for(c=0;c{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&mr[n];)++n;if((t=n<<1)-r>32&&he)return he.decode(C.subarray(r,t));for(var i="",s=0;!(s>=e/2);++s){var u=q[r+2*s>>1];if(u==0)break;i+=String.fromCharCode(u)}return i},Wt=(r,e,t)=>{if(t===void 0&&(t=2147483647),t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,i=0;i>1]=s,e+=2}return q[e>>1]=0,e-n},zt=r=>2*r.length,Nt=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=y[r+4*t>>2];if(a==0)break;if(++t,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(a)}return n},Bt=(r,e,t)=>{if(t===void 0&&(t=2147483647),t<4)return 0;for(var n=e,a=n+t-4,i=0;i=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),y[e>>2]=s,(e+=4)+4>a)break}return y[e>>2]=0,e-n},Lt=r=>{for(var e=0,t=0;t=55296&&n<=57343&&++t,e+=4}return e},Ut=(r,e,t)=>{var n,a,i,s,u;t=M(t),e===2?(n=Rt,a=Wt,s=zt,i=()=>mr,u=1):e===4&&(n=Nt,a=Bt,s=Lt,i=()=>w,u=2),U(r,{name:t,fromWireType:d=>{for(var c,m=w[d>>2],h=i(),p=d+4,_=0;_<=m;++_){var k=d+4+_*e;if(_==m||h[k>>u]==0){var T=n(p,k-p);c===void 0?c=T:(c+="\0",c+=T),p=k+e}}return H(d),c},toWireType:(d,c)=>{typeof c!="string"&&O(`Cannot pass non-string to C++ string type ${t}`);var m=s(c),h=Wr(4+m+e);return w[h>>2]=m>>u,a(c,h+4,m+e),d!==null&&d.push(H,h),h},argPackAdvance:X,readValueFromPointer:Cr,destructorFunction(d){H(d)}})},Ht=(r,e,t,n,a,i)=>{pr[r]={name:M(e),rawConstructor:lr(t,n),rawDestructor:lr(a,i),fields:[]}},It=(r,e,t,n,a,i,s,u,d,c)=>{pr[r].fields.push({fieldName:M(e),getterReturnType:t,getter:lr(n,a),getterContext:i,setterArgumentType:s,setter:lr(u,d),setterContext:c})},Vt=(r,e)=>{U(r,{isVoid:!0,name:e=M(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})},Yt=r=>{do{var e=w[r>>2],t=w[(r+=4)>>2],n=w[(r+=4)>>2];r+=4;var a=er(e);o.createPath("/",b.dirname(a),!0,!0),o.createDataFile(a,null,P.subarray(n,n+t),!0,!0,!0)}while(w[r>>2])},qt=()=>{throw 1/0},jr=(r,e)=>{var t=Z[r];return t===void 0&&O(e+" has unknown type "+me(r)),t},Xt=(r,e,t)=>{r=$.toValue(r),e=jr(e,"emval::as");var n=[],a=$.toHandle(n);return w[t>>2]=a,e.toWireType(n,r)},Gt={},xr=r=>{var e=Gt[r];return e===void 0?M(r):e},Or=[],Jt=(r,e,t,n,a)=>{var i=[],s=(r=Or[r])(e=$.toValue(e),t=xr(t),i,a);return i.length&&(w[n>>2]=$.toHandle(i)),s},pe=()=>{if(typeof globalThis=="object")return globalThis;function r(e){e.$$$embind_global$$$=e;var t=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof zr=="object"&&r(zr)?$$$embind_global$$$=zr:typeof self=="object"&&r(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Zt=r=>r===0?$.toHandle(pe()):(r=xr(r),$.toHandle(pe()[r])),Kt=r=>{var e=Or.length;return Or.push(r),e},Qt=(r,e)=>{for(var t=new Array(r),n=0;n>2],"parameter "+n);return t},rn=(r,e)=>{var t=Qt(r,e),n=t.shift();r--;var a=new Array(r);return Kt((i,s,u,d)=>{for(var c=0,m=0;m(r=$.toValue(r),e=$.toValue(e),$.toHandle(r[e])),tn=r=>{r>4&&(W.get(r).refcount+=1)},nn=()=>$.toHandle([]),on=r=>$.toHandle(xr(r)),an=r=>{var e=$.toValue(r);Tr(e),Mr(r)},sn=(r,e,t)=>{r=$.toValue(r),e=$.toValue(e),t=$.toValue(t),r[e]=t},un=(r,e)=>{var t=(r=jr(r,"_emval_take_value")).readValueFromPointer(e);return $.toHandle(t)},ln=()=>{Q("")},dn=(r,e,t)=>C.copyWithin(r,e,e+t),cn=()=>2147483648,fn=r=>{var e=(r-fr.buffer.byteLength+65535)/65536;try{return fr.grow(e),Jr(),1}catch{}},mn=r=>{var e=C.length;r>>>=0;var t=cn();if(r>t)return!1;for(var n=(u,d)=>u+(d-u%d)%d,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,r+100663296);var s=Math.min(t,n(Math.max(r,i),65536));if(fn(s))return!0}return!1},Rr={},hn=()=>Ir||"./this.program",dr=()=>{if(!dr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:hn()};for(var e in Rr)Rr[e]===void 0?delete r[e]:r[e]=Rr[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);dr.strings=t}return dr.strings},pn=(r,e)=>{for(var t=0;t{var t=0;return dr().forEach((n,a)=>{var i=e+t;w[r+4*a>>2]=i,pn(n,i),t+=n.length+1}),0},yn=(r,e)=>{var t=dr();w[r>>2]=t.length;var n=0;return t.forEach(a=>n+=a.length+1),w[e>>2]=n,0},gn=0,wn=()=>Ue||gn>0,_n=r=>{wn()||(l.onExit&&l.onExit(r),kr=!0),Vr(r,new Le(r))},En=(r,e)=>{_n(r)};function bn(r){try{var e=F.getStreamFromFD(r);return o.close(e),0}catch(t){if(o===void 0||t.name!=="ErrnoError")throw t;return t.errno}}var kn=(r,e,t,n)=>{for(var a=0,i=0;i>2],u=w[e+4>>2];e+=8;var d=o.read(r,P,s,u,n);if(d<0)return-1;if(a+=d,d>2]=i,0}catch(s){if(o===void 0||s.name!=="ErrnoError")throw s;return s.errno}}var An=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function Dn(r,e,t,n,a){var i=An(e,t);try{if(isNaN(i))return 61;var s=F.getStreamFromFD(r);return o.llseek(s,i,n),S=[s.position>>>0,(E=s.position,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],y[a>>2]=S[0],y[a+4>>2]=S[1],s.getdents&&i===0&&n===0&&(s.getdents=null),0}catch(u){if(o===void 0||u.name!=="ErrnoError")throw u;return u.errno}}var Pn=(r,e,t,n)=>{for(var a=0,i=0;i>2],u=w[e+4>>2];e+=8;var d=o.write(r,P,s,u,n);if(d<0)return-1;a+=d}return a};function Sn(r,e,t,n){try{var a=F.getStreamFromFD(r),i=Pn(a,e,t);return w[n>>2]=i,0}catch(s){if(o===void 0||s.name!=="ErrnoError")throw s;return s.errno}}var nr,yr=r=>r%4==0&&(r%100!=0||r%400==0),$n=(r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t},ve=[31,29,31,30,31,30,31,31,30,31,30,31],ye=[31,28,31,30,31,30,31,31,30,31,30,31],Tn=(r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=yr(t.getFullYear()),a=t.getMonth(),i=(n?ve:ye)[a];if(!(e>i-t.getDate()))return t.setDate(t.getDate()+e),t;e-=i-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t},Cn=(r,e)=>{P.set(r,e)},Mn=(r,e,t,n)=>{var a=w[n+40>>2],i={tm_sec:y[n>>2],tm_min:y[n+4>>2],tm_hour:y[n+8>>2],tm_mday:y[n+12>>2],tm_mon:y[n+16>>2],tm_year:y[n+20>>2],tm_wday:y[n+24>>2],tm_yday:y[n+28>>2],tm_isdst:y[n+32>>2],tm_gmtoff:y[n+36>>2],tm_zone:a?er(a):""},s=er(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var d in u)s=s.replace(new RegExp(d,"g"),u[d]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(f,v,j){for(var x=typeof f=="number"?f.toString():f||"";x.length0?1:0}var x;return(x=j(f.getFullYear()-v.getFullYear()))===0&&(x=j(f.getMonth()-v.getMonth()))===0&&(x=j(f.getDate()-v.getDate())),x}function k(f){switch(f.getDay()){case 0:return new Date(f.getFullYear()-1,11,29);case 1:return f;case 2:return new Date(f.getFullYear(),0,3);case 3:return new Date(f.getFullYear(),0,2);case 4:return new Date(f.getFullYear(),0,1);case 5:return new Date(f.getFullYear()-1,11,31);case 6:return new Date(f.getFullYear()-1,11,30)}}function T(f){var v=Tn(new Date(f.tm_year+1900,0,1),f.tm_yday),j=new Date(v.getFullYear(),0,4),x=new Date(v.getFullYear()+1,0,4),Er=k(j),Kn=k(x);return _(Er,v)<=0?_(Kn,v)<=0?v.getFullYear()+1:v.getFullYear():v.getFullYear()-1}var D={"%a":f=>c[f.tm_wday].substring(0,3),"%A":f=>c[f.tm_wday],"%b":f=>m[f.tm_mon].substring(0,3),"%B":f=>m[f.tm_mon],"%C":f=>p((f.tm_year+1900)/100|0,2),"%d":f=>p(f.tm_mday,2),"%e":f=>h(f.tm_mday,2," "),"%g":f=>T(f).toString().substring(2),"%G":f=>T(f),"%H":f=>p(f.tm_hour,2),"%I":f=>{var v=f.tm_hour;return v==0?v=12:v>12&&(v-=12),p(v,2)},"%j":f=>p(f.tm_mday+$n(yr(f.tm_year+1900)?ve:ye,f.tm_mon-1),3),"%m":f=>p(f.tm_mon+1,2),"%M":f=>p(f.tm_min,2),"%n":()=>` +`,"%p":f=>f.tm_hour>=0&&f.tm_hour<12?"AM":"PM","%S":f=>p(f.tm_sec,2),"%t":()=>" ","%u":f=>f.tm_wday||7,"%U":f=>{var v=f.tm_yday+7-f.tm_wday;return p(Math.floor(v/7),2)},"%V":f=>{var v=Math.floor((f.tm_yday+7-(f.tm_wday+6)%7)/7);if((f.tm_wday+371-f.tm_yday-2)%7<=2&&v++,v){if(v==53){var j=(f.tm_wday+371-f.tm_yday)%7;j==4||j==3&&yr(f.tm_year)||(v=1)}}else{v=52;var x=(f.tm_wday+7-f.tm_yday-1)%7;(x==4||x==5&&yr(f.tm_year%400-1))&&v++}return p(v,2)},"%w":f=>f.tm_wday,"%W":f=>{var v=f.tm_yday+7-(f.tm_wday+6)%7;return p(Math.floor(v/7),2)},"%y":f=>(f.tm_year+1900).toString().substring(2),"%Y":f=>f.tm_year+1900,"%z":f=>{var v=f.tm_gmtoff,j=v>=0;return v=(v=Math.abs(v)/60)/60*100+v%60,(j?"+":"-")+("0000"+v).slice(-4)},"%Z":f=>f.tm_zone,"%%":()=>"%"};for(var d in s=s.replace(/%%/g,"\0\0"),D)s.includes(d)&&(s=s.replace(new RegExp(d,"g"),D[d](i)));var I=Sr(s=s.replace(/\0\0/g,"%"),!1);return I.length>e?0:(Cn(I,r),I.length-1)},jn=(r,e,t,n,a)=>Mn(r,e,t,n),ge=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},xn=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:r[0]=="v"?[]:[e[r[0]]]},n=1;n{var t=r.slice(0,1),n=r.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96),ge(n.length,e);for(var i=0;i{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(xn(e),r);var t=[1];On(e,t);var n=[0,97,115,109,1,0,0,0,1];ge(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(a,{e:{f:r}}).exports.f},Wn=(r,e)=>{if(nr)for(var t=r;t(nr||(nr=new WeakMap,Wn(0,K.length)),nr.get(r)||0),we=[],Nn=()=>{if(we.length)return we.pop();try{K.grow(1)}catch(r){throw r instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":r}return K.length-1},_e=(r,e)=>{K.set(r,e),ur[r]=K.get(r)},Bn=(r,e)=>{var t=zn(r);if(t)return t;var n=Nn();try{_e(n,r)}catch(i){if(!(i instanceof TypeError))throw i;var a=Rn(r,e);_e(n,a)}return nr.set(r,n),n},Ee=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=o.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},gr=365,wr=146;Object.defineProperties(Ee.prototype,{read:{get:function(){return(this.mode&gr)===gr},set:function(r){r?this.mode|=gr:this.mode&=~gr}},write:{get:function(){return(this.mode&wr)===wr},set:function(r){r?this.mode|=wr:this.mode&=~wr}},isFolder:{get:function(){return o.isDir(this.mode)}},isDevice:{get:function(){return o.isChrdev(this.mode)}}}),o.FSNode=Ee,o.createPreloadedFile=Ke,o.staticInit(),l.FS_createPath=o.createPath,l.FS_createDataFile=o.createDataFile,l.FS_createPreloadedFile=o.createPreloadedFile,l.FS_unlink=o.unlink,l.FS_createLazyFile=o.createLazyFile,l.FS_createDevice=o.createDevice,ie=l.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},at(),ue=l.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},ut(),dt(),fe=l.UnboundTypeError=Dt(Error,"UnboundTypeError");var Ln={m:Ie,x:rt,N:et,O:tt,V:nt,G:ot,R:st,Q:ct,z:mt,r:$t,d:Ct,b:Mt,y:Ot,p:Ut,W:Ht,j:It,S:Vt,U:Yt,I:qt,Y:Xt,A:Jt,a:Mr,Z:Zt,B:rn,l:en,g:tn,C:nn,h:on,s:an,X:sn,k:un,q:ln,P:dn,J:mn,K:vn,L:yn,T:En,v:bn,M:Fn,F:Dn,w:Sn,n:Un,i:Vn,o:qn,t:Xn,E:Jn,u:Yn,c:Hn,D:Zn,e:Gn,f:In,H:jn},A=Be(),H=l._free=r=>(H=l._free=A.ba)(r),Wr=l._malloc=r=>(Wr=l._malloc=A.ca)(r),be=()=>(be=A.da)(),ke=r=>(ke=A.ea)(r);l.__embind_initialize_bindings=()=>(l.__embind_initialize_bindings=A.fa)();var _r,z=(r,e)=>(z=A.ga)(r,e),N=()=>(N=A.ha)(),B=r=>(B=A.ia)(r),Fe=r=>(Fe=A.ja)(r);function Un(r,e){var t=N();try{return R(r)(e)}catch(n){if(B(t),n!==n+0)throw n;z(1,0)}}function Hn(r,e){var t=N();try{R(r)(e)}catch(n){if(B(t),n!==n+0)throw n;z(1,0)}}function In(r,e,t,n){var a=N();try{R(r)(e,t,n)}catch(i){if(B(a),i!==i+0)throw i;z(1,0)}}function Vn(r,e,t){var n=N();try{return R(r)(e,t)}catch(a){if(B(n),a!==a+0)throw a;z(1,0)}}function Yn(r){var e=N();try{R(r)()}catch(t){if(B(e),t!==t+0)throw t;z(1,0)}}function qn(r,e,t,n){var a=N();try{return R(r)(e,t,n)}catch(i){if(B(a),i!==i+0)throw i;z(1,0)}}function Xn(r,e,t,n,a){var i=N();try{return R(r)(e,t,n,a)}catch(s){if(B(i),s!==s+0)throw s;z(1,0)}}function Gn(r,e,t){var n=N();try{R(r)(e,t)}catch(a){if(B(n),a!==a+0)throw a;z(1,0)}}function Jn(r,e,t,n,a,i,s,u,d,c){var m=N();try{return R(r)(e,t,n,a,i,s,u,d,c)}catch(h){if(B(m),h!==h+0)throw h;z(1,0)}}function Zn(r,e,t,n){var a=N();try{R(r)(e,t,n)}catch(i){if(B(a),i!==i+0)throw i;z(1,0)}}function Ae(){function r(){_r||(_r=!0,l.calledRun=!0,kr||(Me(),Lr(l),l.onRuntimeInitialized&&l.onRuntimeInitialized(),je()))}G>0||(Ce(),G>0||(l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),r()},1)):r()))}if(l.dynCall_viji=(r,e,t,n,a)=>(l.dynCall_viji=A.ka)(r,e,t,n,a),l.dynCall_ji=(r,e)=>(l.dynCall_ji=A.la)(r,e),l.dynCall_jiji=(r,e,t,n,a)=>(l.dynCall_jiji=A.ma)(r,e,t,n,a),l.dynCall_viijii=(r,e,t,n,a,i,s)=>(l.dynCall_viijii=A.na)(r,e,t,n,a,i,s),l.dynCall_iiiiij=(r,e,t,n,a,i,s)=>(l.dynCall_iiiiij=A.oa)(r,e,t,n,a,i,s),l.dynCall_iiiiijj=(r,e,t,n,a,i,s,u,d)=>(l.dynCall_iiiiijj=A.pa)(r,e,t,n,a,i,s,u,d),l.dynCall_iiiiiijj=(r,e,t,n,a,i,s,u,d,c)=>(l.dynCall_iiiiiijj=A.qa)(r,e,t,n,a,i,s,u,d,c),l.___emscripten_embedded_file_data=1273528,l.addRunDependency=hr,l.removeRunDependency=ir,l.FS_createPath=o.createPath,l.FS_createLazyFile=o.createLazyFile,l.FS_createDevice=o.createDevice,l.addFunction=Bn,l.UTF8ToString=er,l.FS_createPreloadedFile=o.createPreloadedFile,l.FS_createDataFile=o.createDataFile,l.FS_unlink=o.unlink,ar=function r(){_r||Ae(),_r||(ar=r)},l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return Ae(),Br.ready},De.exports=Pe;const ro=Qn(Se.exports),no=Object.freeze(Object.defineProperty({__proto__:null,default:ro},Symbol.toStringTag,{value:"Module"}));export{no as l}; diff --git a/build/assets/mat3-BNGRf_pC.js b/build/assets/mat3-BNGRf_pC.js new file mode 100644 index 0000000..cb46320 --- /dev/null +++ b/build/assets/mat3-BNGRf_pC.js @@ -0,0 +1 @@ +import{ae as L}from"./index-DKOmzAMm.js";function Q(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[4],r[4]=o[5],r[5]=o[6],r[6]=o[8],r[7]=o[9],r[8]=o[10],r}function R(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],r}function V(r,o,u,s,a,e,c,i,M,h){return r[0]=o,r[1]=u,r[2]=s,r[3]=a,r[4]=e,r[5]=c,r[6]=i,r[7]=M,r[8]=h,r}function $(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function k(r,o){if(r===o){const u=o[1],s=o[2],a=o[5];r[1]=o[3],r[2]=o[6],r[3]=u,r[5]=o[7],r[6]=s,r[7]=a}else r[0]=o[0],r[1]=o[3],r[2]=o[6],r[3]=o[1],r[4]=o[4],r[5]=o[7],r[6]=o[2],r[7]=o[5],r[8]=o[8];return r}function w(r,o){const u=o[0],s=o[1],a=o[2],e=o[3],c=o[4],i=o[5],M=o[6],h=o[7],f=o[8],x=f*c-i*h,l=-f*e+i*M,m=h*e-c*M;let b=u*x+s*l+a*m;return b?(b=1/b,r[0]=x*b,r[1]=(-f*s+a*h)*b,r[2]=(i*s-a*c)*b,r[3]=l*b,r[4]=(f*u-a*M)*b,r[5]=(-i*u+a*e)*b,r[6]=m*b,r[7]=(-h*u+s*M)*b,r[8]=(c*u-s*e)*b,r):null}function C(r,o){const u=o[0],s=o[1],a=o[2],e=o[3],c=o[4],i=o[5],M=o[6],h=o[7],f=o[8];return r[0]=c*f-i*h,r[1]=a*h-s*f,r[2]=s*i-a*c,r[3]=i*M-e*f,r[4]=u*f-a*M,r[5]=a*e-u*i,r[6]=e*h-c*M,r[7]=s*M-u*h,r[8]=u*c-s*e,r}function D(r){const o=r[0],u=r[1],s=r[2],a=r[3],e=r[4],c=r[5],i=r[6],M=r[7],h=r[8];return o*(h*e-c*M)+u*(-h*a+c*i)+s*(M*a-e*i)}function N(r,o,u){const s=o[0],a=o[1],e=o[2],c=o[3],i=o[4],M=o[5],h=o[6],f=o[7],x=o[8],l=u[0],m=u[1],b=u[2],d=u[3],j=u[4],y=u[5],g=u[6],_=u[7],p=u[8];return r[0]=l*s+m*c+b*h,r[1]=l*a+m*i+b*f,r[2]=l*e+m*M+b*x,r[3]=d*s+j*c+y*h,r[4]=d*a+j*i+y*f,r[5]=d*e+j*M+y*x,r[6]=g*s+_*c+p*h,r[7]=g*a+_*i+p*f,r[8]=g*e+_*M+p*x,r}function G(r,o,u){const s=o[0],a=o[1],e=o[2],c=o[3],i=o[4],M=o[5],h=o[6],f=o[7],x=o[8],l=u[0],m=u[1];return r[0]=s,r[1]=a,r[2]=e,r[3]=c,r[4]=i,r[5]=M,r[6]=l*s+m*c+h,r[7]=l*a+m*i+f,r[8]=l*e+m*M+x,r}function H(r,o,u){const s=o[0],a=o[1],e=o[2],c=o[3],i=o[4],M=o[5],h=o[6],f=o[7],x=o[8],l=Math.sin(u),m=Math.cos(u);return r[0]=m*s+l*c,r[1]=m*a+l*i,r[2]=m*e+l*M,r[3]=m*c-l*s,r[4]=m*i-l*a,r[5]=m*M-l*e,r[6]=h,r[7]=f,r[8]=x,r}function I(r,o,u){const s=u[0],a=u[1],e=u[2];return r[0]=s*o[0],r[1]=s*o[1],r[2]=s*o[2],r[3]=a*o[3],r[4]=a*o[4],r[5]=a*o[5],r[6]=e*o[6],r[7]=e*o[7],r[8]=e*o[8],r}function J(r,o,u){const s=u[0],a=u[1];return r[0]=s*o[0],r[1]=s*o[1],r[2]=s*o[2],r[3]=a*o[3],r[4]=a*o[4],r[5]=a*o[5],r}function K(r,o){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=o[0],r[7]=o[1],r[8]=1,r}function U(r,o){const u=Math.sin(o),s=Math.cos(o);return r[0]=s,r[1]=u,r[2]=0,r[3]=-u,r[4]=s,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function W(r,o){return r[0]=o[0],r[1]=0,r[2]=0,r[3]=0,r[4]=o[1],r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function X(r,o){return r[0]=o[0],r[1]=o[1],r[2]=0,r[3]=o[2],r[4]=o[3],r[5]=0,r[6]=o[4],r[7]=o[5],r[8]=1,r}function Y(r,o){const u=o[0],s=o[1],a=o[2],e=o[3],c=u+u,i=s+s,M=a+a,h=u*c,f=s*c,x=s*i,l=a*c,m=a*i,b=a*M,d=e*c,j=e*i,y=e*M;return r[0]=1-x-b,r[3]=f-y,r[6]=l+j,r[1]=f+y,r[4]=1-h-b,r[7]=m-d,r[2]=l-j,r[5]=m+d,r[8]=1-h-x,r}function Z(r,o){const u=o[0],s=o[1],a=o[2],e=o[4],c=o[5],i=o[6],M=o[8],h=o[9],f=o[10],x=f*c-i*h,l=-f*e+i*M,m=h*e-c*M,b=u*x+s*l+a*m;if(!b)return null;const d=1/b;return r[0]=x*d,r[1]=(-f*s+a*h)*d,r[2]=(i*s-a*c)*d,r[3]=l*d,r[4]=(f*u-a*M)*d,r[5]=(-i*u+a*e)*d,r[6]=m*d,r[7]=(-h*u+s*M)*d,r[8]=(c*u-s*e)*d,r}function n(r,o){const u=o[0],s=o[1],a=o[2],e=o[3],c=o[4],i=o[5],M=o[6],h=o[7],f=o[8],x=o[9],l=o[10],m=o[11],b=o[12],d=o[13],j=o[14],y=o[15],g=u*i-s*c,_=u*M-a*c,p=u*h-e*c,E=s*M-a*i,A=s*h-e*i,F=a*h-e*M,T=f*d-x*b,z=f*j-l*b,q=f*y-m*b,B=x*j-l*d,O=x*y-m*d,v=l*y-m*j;let S=g*v-_*O+p*B+E*q-A*z+F*T;return S?(S=1/S,r[0]=(i*v-M*O+h*B)*S,r[1]=(M*q-c*v-h*z)*S,r[2]=(c*O-i*q+h*T)*S,r[3]=(a*O-s*v-e*B)*S,r[4]=(u*v-a*q+e*z)*S,r[5]=(s*q-u*O-e*T)*S,r[6]=(d*F-j*A+y*E)*S,r[7]=(j*p-b*F-y*_)*S,r[8]=(b*A-d*p+y*g)*S,r):null}function t(r,o,u){return r[0]=2/o,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/u,r[5]=0,r[6]=-1,r[7]=1,r[8]=1,r}function rr(r){return"mat3("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+")"}function or(r){return Math.sqrt(r[0]**2+r[1]**2+r[2]**2+r[3]**2+r[4]**2+r[5]**2+r[6]**2+r[7]**2+r[8]**2)}function ur(r,o,u){return r[0]=o[0]+u[0],r[1]=o[1]+u[1],r[2]=o[2]+u[2],r[3]=o[3]+u[3],r[4]=o[4]+u[4],r[5]=o[5]+u[5],r[6]=o[6]+u[6],r[7]=o[7]+u[7],r[8]=o[8]+u[8],r}function P(r,o,u){return r[0]=o[0]-u[0],r[1]=o[1]-u[1],r[2]=o[2]-u[2],r[3]=o[3]-u[3],r[4]=o[4]-u[4],r[5]=o[5]-u[5],r[6]=o[6]-u[6],r[7]=o[7]-u[7],r[8]=o[8]-u[8],r}function sr(r,o,u){return r[0]=o[0]*u,r[1]=o[1]*u,r[2]=o[2]*u,r[3]=o[3]*u,r[4]=o[4]*u,r[5]=o[5]*u,r[6]=o[6]*u,r[7]=o[7]*u,r[8]=o[8]*u,r}function ar(r,o,u,s){return r[0]=o[0]+u[0]*s,r[1]=o[1]+u[1]*s,r[2]=o[2]+u[2]*s,r[3]=o[3]+u[3]*s,r[4]=o[4]+u[4]*s,r[5]=o[5]+u[5]*s,r[6]=o[6]+u[6]*s,r[7]=o[7]+u[7]*s,r[8]=o[8]+u[8]*s,r}function er(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]&&r[3]===o[3]&&r[4]===o[4]&&r[5]===o[5]&&r[6]===o[6]&&r[7]===o[7]&&r[8]===o[8]}function cr(r,o){const u=r[0],s=r[1],a=r[2],e=r[3],c=r[4],i=r[5],M=r[6],h=r[7],f=r[8],x=o[0],l=o[1],m=o[2],b=o[3],d=o[4],j=o[5],y=o[6],g=o[7],_=o[8],p=L();return Math.abs(u-x)<=p*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(s-l)<=p*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(a-m)<=p*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(e-b)<=p*Math.max(1,Math.abs(e),Math.abs(b))&&Math.abs(c-d)<=p*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(i-j)<=p*Math.max(1,Math.abs(i),Math.abs(j))&&Math.abs(M-y)<=p*Math.max(1,Math.abs(M),Math.abs(y))&&Math.abs(h-g)<=p*Math.max(1,Math.abs(h),Math.abs(g))&&Math.abs(f-_)<=p*Math.max(1,Math.abs(f),Math.abs(_))}function ir(r){const o=L(),u=r[0],s=r[1],a=r[2],e=r[3],c=r[4],i=r[5],M=r[6],h=r[7],f=r[8];return Math.abs(1-(u*u+e*e+M*M))<=o&&Math.abs(1-(s*s+c*c+h*h))<=o&&Math.abs(1-(a*a+i*i+f*f))<=o}const Mr=N,hr=P;Object.freeze(Object.defineProperty({__proto__:null,add:ur,adjoint:C,copy:R,determinant:D,equals:cr,exactEquals:er,frob:or,fromMat2d:X,fromMat4:Q,fromQuat:Y,fromRotation:U,fromScaling:W,fromTranslation:K,identity:$,invert:w,isOrthoNormal:ir,mul:Mr,multiply:N,multiplyScalar:sr,multiplyScalarAndAdd:ar,normalFromMat4:n,normalFromMat4Legacy:Z,projection:t,rotate:H,scale:I,scaleByVec2:J,set:V,str:rr,sub:hr,subtract:P,translate:G,transpose:k},Symbol.toStringTag,{value:"Module"}));export{C as c,I as f,N as i,n as j,Q as n,Y as p,V as r,w as s,k as u}; diff --git a/build/assets/mat3f64-q3fE-ZOt.js b/build/assets/mat3f64-q3fE-ZOt.js new file mode 100644 index 0000000..c4018c9 --- /dev/null +++ b/build/assets/mat3f64-q3fE-ZOt.js @@ -0,0 +1 @@ +function n(){return[1,0,0,0,1,0,0,0,1]}function i(r){return[r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8]]}function _(r,t,e,o,u,c,l,a,f){return[r,t,e,o,u,c,l,a,f]}function b(r,t){return new Float64Array(r,t,9)}const p=n();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:p,clone:i,create:n,createView:b,fromValues:_},Symbol.toStringTag,{value:"Module"}));export{n as e,p as o,_ as t}; diff --git a/build/assets/mat4f64-CSKppSlJ.js b/build/assets/mat4f64-CSKppSlJ.js new file mode 100644 index 0000000..0ee504a --- /dev/null +++ b/build/assets/mat4f64-CSKppSlJ.js @@ -0,0 +1 @@ +function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function g(r){return[r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]]}function j(r,t,o,u,c,e,l,a,f,i,_,b,p,y,T,d){return[r,t,o,u,c,e,l,a,f,i,_,b,p,y,T,d]}function m(r,t){return new Float64Array(r,t,16)}const s=n();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:g,create:n,createView:m,fromValues:j},Symbol.toStringTag,{value:"Module"}));export{n as e,s as o,g as r}; diff --git a/build/assets/mediaLayerUtils-MA8Smwz2.js b/build/assets/mediaLayerUtils-MA8Smwz2.js new file mode 100644 index 0000000..6f3d86e --- /dev/null +++ b/build/assets/mediaLayerUtils-MA8Smwz2.js @@ -0,0 +1 @@ +import{$ as c,j as f}from"./utils-V4fw_T9z.js";import{o as y}from"./jsonContext-SE-5k22x.js";import{l as d,a as v,f as x}from"./index-DKOmzAMm.js";import{p as o}from"./resourceUtils-CwAv7wd8.js";import"./originUtils-D69mHv66.js";import"./multiOriginJSONSupportUtils-C0wm8_Yw.js";import"./saveAPIKeyUtils-CqAN5-r5.js";import"./saveUtils-oCA1ZjYH.js";import"./resourceUtils-Cz4P0EKM.js";const s="Media Layer",E="media-layer-save",I="media-layer-save-as",i=["media-layer:unsupported-source"];function n(e){return{isValid:e.type==="media",errorMessage:"Layer.type should be 'media'"}}function m(e){return y(e,"portal-item",!0)}function p(e){return e.layerJSON}async function u(e,t){t.extent=e.fullExtent?await d(e.fullExtent):null}async function N(e,t){t.title||(t.title=e.title),await u(e,t),v(t,x.METADATA)}async function M(e,t){return c({layer:e,itemType:s,validateLayer:n,createJSONContext:r=>m(r),createItemData:p,errorNamePrefix:E,supplementalUnsupportedErrors:i,setItemProperties:u,saveResources:(r,a)=>o(e.resourceReferences,a)},t)}async function O(e,t,r){return f({layer:e,itemType:s,validateLayer:n,createJSONContext:a=>m(a),createItemData:p,errorNamePrefix:I,supplementalUnsupportedErrors:i,newItem:t,setItemProperties:N,saveResources:(a,l)=>o(e.resourceReferences,l)},r)}export{M as save,O as saveAs}; diff --git a/build/assets/meshFeatureSet-x5YtiVvA.js b/build/assets/meshFeatureSet-x5YtiVvA.js new file mode 100644 index 0000000..3f0ed13 --- /dev/null +++ b/build/assets/meshFeatureSet-x5YtiVvA.js @@ -0,0 +1 @@ +import{da as E,ay as h,a8 as y,aZ as S,Q as N,d1 as l,V as D}from"./index-DKOmzAMm.js";import{$ as d}from"./Mesh-DkA8R2dF.js";import{N as M,o as w,i as F}from"./MeshTransform-CnKLNqg-.js";import{s as T}from"./infoFor3D-DsOdlPuA.js";import"./imageUtils-D81CeaJ0.js";import"./MeshVertexAttributes-CfiMg9vN.js";import"./MeshLocalVertexSpace-CZ-FLKyC.js";import"./meshVertexSpaceUtils-CMKdridq.js";import"./earcut-BqgeR2O3.js";import"./_commonjsHelpers-DCkdB7M8.js";import"./DoubleArray-D2IDWC15.js";import"./Indices-BhOjxL0t.js";import"./plane-aHrUkISy.js";import"./mat3f64-q3fE-ZOt.js";import"./mat4f64-CSKppSlJ.js";import"./quatf64-Bdb9ZJJK.js";import"./vec2f64-DA6GkJuH.js";import"./deduplicate-B_YKqNj1.js";import"./projection-Ch_noS-l.js";import"./mat3-BNGRf_pC.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./BufferView-DOhKdt-N.js";import"./vec2-CurFBDJu.js";import"./vec3-C6eb5QY9.js";import"./vec4-n1PBj5SL.js";import"./vertexSpaceConversion-DdxiyRap.js";import"./quat-BYKy26Om.js";const I=()=>D.getLogger("esri.rest.support.meshFeatureSet");function ut(t,r,e){const o=e.features;e.features=[],delete e.geometryType;const n=E.fromJSON(e);if(n.geometryType="mesh",!e.assetMaps)return n;const s=P(r,e.assetMaps),i=t.sourceSpatialReference??h.WGS84,m=e.globalIdFieldName,{outFields:a}=t,c=a!=null&&a.length>0?L(a.includes("*")?null:new Set(a)):()=>({});for(const u of o){const p=O(u,m,i,r,s);n.features.push(new y({geometry:p,attributes:c(u)}))}return n}function L(t){return({attributes:r})=>{if(!r)return{};if(!t)return r;for(const e in r)t.has(e)||delete r[e];return r}}function O(t,r,e,o,n){const s=t.attributes[r],i=n.get(s);if(i==null||!t.geometry)return null;const m=x(t,e,o),a=S.fromJSON(t.geometry);a.spatialReference=e;const c=A(t.attributes,o),u=e.isGeographic?"local":"georeferenced",p=$(i);return p?d.createWithExternalSource(m,p,{extent:a,transform:c,vertexSpace:u}):d.createIncomplete(m,{extent:a,transform:c,vertexSpace:u})}function x({attributes:t},r,{transformFieldRoles:e}){const o=t[e.originX],n=t[e.originY],s=t[e.originZ];return new N({x:o,y:n,z:s,spatialReference:r})}function A(t,{transformFieldRoles:r}){return new M({translation:[t[r.translationX],-t[r.translationZ],t[r.translationY]],rotationAxis:[t[r.rotationX],-t[r.rotationZ],t[r.rotationY]],rotationAngle:t[r.rotationDeg],scale:[t[r.scaleX],t[r.scaleZ],t[r.scaleY]]})}var f;function P(t,r){const e=new Map;for(const o of r){const n=o.parentGlobalId;if(n==null)continue;const s=o.assetName,i=o.assetType,m=o.assetHash,a=o.assetURL,c=o.conversionStatus,u=o.seqNo,p=T(i,t.supportedFormats);if(!p){I().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const g=l(e,n,()=>({files:new Map}));l(g.files,s,()=>({name:s,type:i,mimeType:p,status:b(c),parts:[]})).parts[u]={hash:m,url:a}}return e}function $(t){const r=Array.from(t.files.values()),e=new Array;for(const o of r){if(o.status!==f.COMPLETED)return null;const n=new Array;for(const s of o.parts){if(!s)return null;n.push(new w(s.url,s.hash))}e.push(new F(o.name,o.mimeType,n))}return e}function b(t){switch(t){case"COMPLETED":case"SUBMITTED":return f.COMPLETED;case"INPROGRESS":return f.PENDING;default:return f.FAILED}}(function(t){t[t.FAILED=0]="FAILED",t[t.PENDING=1]="PENDING",t[t.COMPLETED=2]="COMPLETED"})(f||(f={}));export{P as assetMapFromAssetMapsJSON,O as extractMesh,ut as meshFeatureSetFromJSON}; diff --git a/build/assets/meshVertexSpaceUtils-CMKdridq.js b/build/assets/meshVertexSpaceUtils-CMKdridq.js new file mode 100644 index 0000000..47f2d7e --- /dev/null +++ b/build/assets/meshVertexSpaceUtils-CMKdridq.js @@ -0,0 +1 @@ +import{Q as p,T as u,V as l,W as s}from"./index-DKOmzAMm.js";import{a as f,i as d}from"./MeshLocalVertexSpace-CZ-FLKyC.js";function a(){return l.getLogger("esri.geometry.Mesh")}function c(e){return e.origin!=null}function w(e){return c(e.vertexSpace)}function y(e,r){if(!c(e))return null;const[i,o,n]=e.origin;return new p({x:i,y:o,z:n,spatialReference:r})}function S(e,r){const{x:i,y:o,z:n,spatialReference:g}=e,t=[i,o,n??0];return(r==null?void 0:r.geographic)!==void 0&&(u(a(),"option: geographic",{replacement:"Use the `vertexSpace` option instead.",version:"4.29",warnOnce:!0}),r.vertexSpace&&a().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")),((r==null?void 0:r.vertexSpace)??x(r==null?void 0:r.geographic)??v(g))==="local"?new f({origin:t}):new d({origin:t})}function v(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function x(e){return e==null?void 0:e?"local":"georeferenced"}function $(e,r){return e.type===r.type&&(e.origin===r.origin||e.origin!=null&&r.origin!=null&&s(e.origin,r.origin))}export{c as a,w as g,$ as m,S as s,y as u}; diff --git a/build/assets/multiOriginJSONSupportUtils-C0wm8_Yw.js b/build/assets/multiOriginJSONSupportUtils-C0wm8_Yw.js new file mode 100644 index 0000000..fe8aa5b --- /dev/null +++ b/build/assets/multiOriginJSONSupportUtils-C0wm8_Yw.js @@ -0,0 +1 @@ +function i(n){return n&&"getAtOrigin"in n&&"originOf"in n}export{i}; diff --git a/build/assets/normalizeUtils-DIcj7CYy.js b/build/assets/normalizeUtils-DIcj7CYy.js new file mode 100644 index 0000000..3f16f99 --- /dev/null +++ b/build/assets/normalizeUtils-DIcj7CYy.js @@ -0,0 +1 @@ +import{df as T,aH as X,U as v,dh as D,I as H,N as V,dR as W,ax as F,fn as z,aX as U,V as _,fo as B,s as E}from"./index-DKOmzAMm.js";import{r as L,o as P,i as N,s as C}from"./normalizeUtilsCommon-BatUY1sD.js";import{f as G}from"./utils-CF4bGKhW.js";import{r as K,o as Q}from"./utils-BCmi3vQB.js";async function Y(e,s,f,n){const t=G(e),c=s[0].spatialReference,l={...n,responseType:"json",query:{...t.query,f:"json",sr:T(c),target:JSON.stringify({geometryType:X(s[0]),geometries:s}),cutter:JSON.stringify(f)}},o=await v(t.path+"/cut",l),{cutIndexes:u,geometries:m=[]}=o.data;return{cutIndexes:u,geometries:m.map(h=>{const x=D(h);return x.spatialReference=c,x})}}async function Z(e,s,f){const n=typeof e=="string"?H(e):e,t=s[0].spatialReference,c=X(s[0]),l={...f,query:{...n.query,f:"json",sr:T(t),geometries:JSON.stringify(K(s))}},{data:o}=await v(n.path+"/simplify",l);return Q(o.geometries,c,t)}const k=()=>_.getLogger("esri.geometry.support.normalizeUtils");function ee(e){return e.type==="polygon"}function te(e){return e[0].type==="polygon"}function se(e){return e[0].type==="polyline"}function ne(e,s){if(!(e instanceof F||e instanceof U)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw k().error(t),new E(t)}const f=P(e),n=[];for(const t of f){const c=[];n.push(c),c.push([t[0][0],t[0][1]]);for(let l=0;l1){for(let b=1;b<=p-1;b++){const j=b*s,r=d*j+o,i=a*j+u;c.push([r,i])}const w=(x+Math.floor(p-1)*s)/2,M=d*w+o,S=a*w+u;c.push([M,S])}c.push([m,h])}}return ee(e)?new U({rings:n,spatialReference:e.spatialReference}):new F({paths:n,spatialReference:e.spatialReference})}function J(e,s,f){if(s){const n=ne(e,1e6);e=B(n,!0)}return f&&(e=C(e,f)),e}function O(e,s,f){if(Array.isArray(e)){const n=e[0];if(n>s){const t=N(n,s);e[0]=n+t*(-2*s)}else if(ns){const t=N(n,s);e=e.clone().offset(t*(-2*s),0)}else if(n{if(m[0]<180)return!0;{let h=0;for(let a=0;ah?d:h}h=Number(h.toFixed(9));const x=-360*N(h,180);for(let a=0;aO(y,o,u)),p.push(i)}else if(r.type==="extent"){const i=r.clone()._normalize(!1,!1,c);p.push(i.rings?new U(i):i)}else if(r.extent){const i=r.extent,y=N(i.xmin,u)*(2*o);let $=y===0?r.clone():C(r.clone(),y);i.offset(y,0);let{xmin:R,xmax:g}=i;R=Number(R.toFixed(9)),g=Number(g.toFixed(9)),i.intersects(h)&&g!==o?(a=g>a?g:a,$=J($,l),d.push($),p.push("cut")):i.intersects(x)&&R!==u?(a=g*(2*o)>a?g*(2*o):a,$=J($,l,360),d.push($),p.push("cut")):p.push($)}else p.push(r.clone());else p.push(r);else p.push(r);let w=N(a,o),M=-90;const S=w,b=new F;for(;w>0;){const r=360*w-180;b.addPath([[r,M],[r,-1*M]]),M*=-1,w--}if(d.length>0&&S>0){const r=oe(d,await Y(n,d,b,f)),i=[],y=[];for(let g=0;g1&&I.rings.length>=A.rings.length?(i.push(I),y.push("simplify")):y.push(l?z(I):I)}}if(!i.length)return y;const $=await Z(n,i,f),R=[];for(let g=0;g1&&l[0]in x&&(e=l[0],t=!0),t||(e="en")}const[r,n,s="#,##0.###"]=x[e];return{decimal:r,group:n,pattern:s}}function A(e,t){const r=w((t={...t}).locale);t.customs=r;const n=t.pattern||r.pattern;return isNaN(e)||Math.abs(e)===1/0?null:v(e,n,t)}const N=/[#0,]*[#0](?:\.0*#*)?/;function v(e,t,r){const n=(r=r||{}).customs.group,s=r.customs.decimal,l=t.split(";"),o=l[0];if((t=l[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const d=N,u=o.match(d);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return r.fractional===!1&&(r.places=0),t.replace(d,z(e,u[0],{decimal:s,group:n,places:r.places,round:r.round}))}function z(e,t,r){(r=r||{}).places===!0&&(r.places=0),r.places===1/0&&(r.places=6);const n=t.split("."),s=typeof r.places=="string"&&r.places.indexOf(",");let l=r.places;s?l=r.places.substring(s+1):+l>=0||(l=(n[1]||[]).length),r.round<0||(e=Number(e.toFixed(Number(l))));const o=String(Math.abs(e)).split("."),d=o[1]||"";if(n[1]||r.places){s&&(r.places=r.places.substring(0,s));const c=r.places!==void 0?r.places:n[1]&&n[1].lastIndexOf("0")+1;+c>d.length&&(o[1]=d.padEnd(Number(c),"0")),+lo[0].length&&(o[0]=o[0].padStart(g,"0")),u.includes("#")||(o[0]=o[0].substr(o[0].length-g)));let p,i,a=n[0].lastIndexOf(",");if(a!==-1){p=n[0].length-a-1;const c=n[0].substr(0,a);a=c.lastIndexOf(","),a!==-1&&(i=c.length-a-1)}const f=[];for(let c=o[0];c;){const m=c.length-p;f.push(m>0?c.substr(m):c),c=m>0?c.slice(0,m):"",i&&(p=i,i=void 0)}return o[0]=f.reverse().join(r.group||","),o.join(r.decimal||".")}function y(e){const t=w((e=e||{}).locale),r=e.pattern||t.pattern,n=t.group,s=t.decimal;let l=1;if(r.includes("%"))l/=100;else if(r.includes("‰"))l/=1e3;else if(r.includes("¤"))throw new Error("currency notation not supported");const o=r.split(";");return o.length===1&&o.push("-"+o[0]),{regexp:h(o,u=>(u="(?:"+S(u,".")+")").replace(N,g=>{const p={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:s,exponent:!1},i=g.split(".");let a=e.places;i.length===1&&l!==1&&(i[1]="###"),i.length===1||a===0?p.fractional=!1:(a===void 0&&(a=e.pattern?i[1].lastIndexOf("0")+1:1/0),a&&e.fractional==null&&(p.fractional=!0),!e.places&&+a1&&(p.groupSize=f.pop().length,f.length>1&&(p.groupSize2=f.pop().length)),"("+O(p)+")"}),!0).replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:s,factor:l}}function I(e,t){const r=y(t),n=new RegExp("^"+r.regexp+"$").exec(e);if(!n)return NaN;let s=n[1];if(!n[1]){if(!n[2])return NaN;s=n[2],r.factor*=-1}return s=s.replaceAll(new RegExp("["+r.group+"\\s\\xa0]","g"),"").replace(r.decimal,"."),Number(s)*r.factor}function O(e){"places"in(e=e||{})||(e.places=1/0),typeof e.decimal!="string"&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=b(e),r=h(e.fractional,s=>{let l="";return s&&e.places!==0&&(l="\\"+e.decimal,e.places===1/0?l="(?:"+l+"\\d+)?":l+="\\d{"+e.places+"}"),l},!0);let n=t+r;return r&&(n="(?:(?:"+n+")|(?:"+r+"))"),n+h(e.exponent,s=>s?"([eE]"+b({signed:e.eSigned})+")":"")}function b(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",h(e.signed,t=>t?"[-+]":"",!0)+h(e.separator,t=>{if(!t)return"(?:\\d+)";(t=S(t))===" "?t="\\s":t===" "&&(t="\\s\\xa0");const r=e.groupSize,n=e.groupSize2;if(n){const s="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+r+"})";return r-n>0?"(?:"+s+"|(?:0|[1-9]\\d{0,"+(r-1)+"}))":s}return"(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*)"},!0)}const h=(e,t,r)=>{if(!Array.isArray(e))return t(e);const n=[];for(let s=0;s"("+(t?"?:":"")+e+")";export{y as c,I as p,A as s}; diff --git a/build/assets/objectIdUtils-4dd1rf9p.js b/build/assets/objectIdUtils-4dd1rf9p.js new file mode 100644 index 0000000..2831ba1 --- /dev/null +++ b/build/assets/objectIdUtils-4dd1rf9p.js @@ -0,0 +1 @@ +const s=1;function c(e,r){var o;let t=0;for(const i of r){const n=(o=i.attributes)==null?void 0:o[e];typeof n=="number"&&isFinite(n)&&(t=Math.max(t,n))}return t}export{c as n,s as t}; diff --git a/build/assets/objectResourceUtils-fV3U3Nm6.js b/build/assets/objectResourceUtils-fV3U3Nm6.js new file mode 100644 index 0000000..01a04cf --- /dev/null +++ b/build/assets/objectResourceUtils-fV3U3Nm6.js @@ -0,0 +1,1095 @@ +import{a as va}from"./devEnvironmentUtils-D6qIi8Ky.js";import{bd as $i,U as Ii,bc as ga,jV as xa,b5 as Pi,av as Ue,c0 as zt,gq as br,au as M,gp as _a,fB as Ni,c2 as Re,gf as fe,ar as Rr,g7 as j,c6 as me,c4 as pe,jW as Ta,cJ as $e,_ as At,fr as ba,V as $r,s as wt,b1 as Sa,cW as ti,hQ as Ea,fC as pt,ic as vt,c7 as ri,jX as ya,bV as Aa,bX as wa,jY as Ut,bU as Ma,fA as Mt,g0 as Fe,bY as Ca,iT as Oa,c5 as Li,jZ as Ra,b0 as $a,cM as nt,j_ as Ia,j$ as Pa,c1 as Vt,at as Zt,gg as Qe,k0 as Di,k1 as Fi,W as Na,bo as Kt,i9 as Sr,B as m,ag as oe,fF as Ir,gk as Pr,D as V,E as Nr,bw as Bi,bx as zi,fx as La,gl as Da,dn as It,fl as Er,aq as Fa,bm as Ba,M as za,k2 as Va,aO as Vi,aK as Gi,gr as Ui,k3 as ji,g_ as jt,bl as ii,bv as Ga,iV as oi}from"./index-DKOmzAMm.js";import{i as ai,j as Wi,n as Ua}from"./mat3-BNGRf_pC.js";import{t as ur,e as Ct,o as ht}from"./mat3f64-q3fE-ZOt.js";import{o as Wt,r as ja,e as Qt}from"./mat4f64-CSKppSlJ.js";import{l as Hi,n as er}from"./vec2f64-DA6GkJuH.js";import{x as tr,c as yr,y as Wa,u as Ha,q as ka,i as Ht,L as qa,O as Ya,E as Xa}from"./BufferView-DOhKdt-N.js";import{e as Ja,f as Za,l as ni,o as si}from"./vec3-C6eb5QY9.js";import{n as Ka,s as li}from"./vec4-n1PBj5SL.js";import{l as Qa,n as en,g as Ye,o as tn,h as rn,t as on,i as an}from"./DefaultMaterial_COLOR_GAMMA-C6si8ymn.js";import{a as nn,u as _t,b as Ar,i as sn,e as ve,N as Ie,s as J,O as ki,c as Ot,r as hr}from"./resourceUtils-CxnhUS9W.js";import{i as ln,f as cn,c as st,u as dn,e as qi,b as un}from"./vec2f32-DxfkRbjY.js";import{t as hn,l as Yi}from"./Indices-BhOjxL0t.js";import{I as mn,L as fn,l as kt,t as Ze}from"./orientedBoundingBox-RPlI7sU4.js";import{s as k}from"./Util-DRlRfUCu.js";import{s as Xi,_ as Ji,V as Ce}from"./sphere-DoGSV0K5.js";import{v as pn}from"./lineSegment-3ivVGQNc.js";import"./plane-aHrUkISy.js";import{e as f}from"./VertexAttribute-BlT9lbVY.js";import{c as we,G as ze,L as ct,D as je,N as Zi,S as Ki,T as ci,R as Oe,O as ge,X as di,E as vn,I as ne,t as gn,_ as xn,f as _n}from"./enums-CxXC-vJk.js";import{H as Tn}from"./InterleavedLayout-DiAet0DN.js";import{o as s,n as ye,a as Rt,b as K,t as rr,c as B,d as mr,r as fr}from"./NormalAttribute.glsl-DMc-kXcx.js";import{a as D}from"./BindType-BmZEZMMh.js";import{o as We}from"./vec2-CurFBDJu.js";import"./quat-BYKy26Om.js";import"./quatf64-Bdb9ZJJK.js";import"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import"./types-D0PSWh4d.js";function Pt(t,e=!1){return t<=$i?e?new Array(t).fill(0):new Array(t):new Float32Array(t)}function bn(t){t.vertex.code.add(s` + vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) { + float symbolAlpha = 0.0; + + const float maxTint = 85.0; + const float maxReplace = 170.0; + const float scaleAlpha = 3.0; + + if (symbolColor.a > maxReplace) { + colorMixMode = ${s.int(ye.Multiply)}; + symbolAlpha = scaleAlpha * (symbolColor.a - maxReplace); + } else if (symbolColor.a > maxTint) { + colorMixMode = ${s.int(ye.Replace)}; + symbolAlpha = scaleAlpha * (symbolColor.a - maxTint); + } else if (symbolColor.a > 0.0) { + colorMixMode = ${s.int(ye.Tint)}; + symbolAlpha = scaleAlpha * symbolColor.a; + } else { + colorMixMode = ${s.int(ye.Multiply)}; + symbolAlpha = 0.0; + } + + return vec4(symbolColor.r, symbolColor.g, symbolColor.b, symbolAlpha); + } + `)}let ee=class{constructor(e,r,i,a,o=null){if(this.name=e,this.type=r,this.arraySize=o,this.bind={[D.Pass]:null,[D.Draw]:null},a)switch(i){case D.Pass:this.bind[D.Pass]=a;break;case D.Draw:this.bind[D.Draw]=a}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}},Tt=class extends ee{constructor(e,r){super(e,"sampler2D",D.Draw,(i,a,o)=>i.bindTexture(e,r(a,o)))}};function Qi({code:t},e){e.doublePrecisionRequiresObfuscation?t.add(s`vec3 dpPlusFrc(vec3 a, vec3 b) { +return mix(a, a + b, vec3(notEqual(b, vec3(0)))); +} +vec3 dpMinusFrc(vec3 a, vec3 b) { +return mix(vec3(0), a - b, vec3(notEqual(a, b))); +} +vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) { +vec3 t1 = dpPlusFrc(hiA, hiB); +vec3 e = dpMinusFrc(t1, hiA); +vec3 t2 = dpMinusFrc(hiB, e) + dpMinusFrc(hiA, dpMinusFrc(t1, e)) + loA + loB; +return t1 + t2; +}`):t.add(s`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) { +vec3 t1 = hiA + hiB; +vec3 e = t1 - hiA; +vec3 t2 = ((hiB - e) + (hiA - (t1 - e))) + loA + loB; +return t1 + t2; +}`)}let de=class extends ee{constructor(e,r){super(e,"vec3",D.Draw,(i,a,o,n)=>i.setUniform3fv(e,r(a,o,n)))}},Z=class extends ee{constructor(e,r){super(e,"vec3",D.Pass,(i,a,o)=>i.setUniform3fv(e,r(a,o)))}},se=class extends ee{constructor(e,r){super(e,"float",D.Pass,(i,a,o)=>i.setUniform1f(e,r(a,o)))}},eo=class extends ee{constructor(e,r){super(e,"mat3",D.Draw,(i,a,o)=>i.setUniformMatrix3fv(e,r(a,o)))}},xe=class extends ee{constructor(e,r){super(e,"mat3",D.Pass,(i,a,o)=>i.setUniformMatrix3fv(e,r(a,o)))}},lt=class extends ee{constructor(e,r){super(e,"mat4",D.Pass,(i,a,o)=>i.setUniformMatrix4fv(e,r(a,o)))}};function mt(t){if(t==null)return null;const e=t.offset!=null?t.offset:ln,r=t.rotation!=null?t.rotation:0,i=t.scale!=null?t.scale:cn,a=ur(1,0,0,0,1,0,e[0],e[1],1),o=ur(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),n=ur(i[0],0,0,0,i[1],0,0,0,1),c=Ct();return ai(c,o,n),ai(c,a,c),c}let Sn=class{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}},En=class{constructor(e,r,i){this.name=e,this.lodThreshold=r,this.pivotOffset=i,this.stageResources=new Sn,this.numberOfVertices=0}},yn=class{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return this._outer.size===0}get(e,r){var i;return(i=this._outer.get(e))==null?void 0:i.get(r)}set(e,r,i){const a=this._outer.get(e);a?a.set(r,i):this._outer.set(e,new Map([[r,i]]))}delete(e,r){const i=this._outer.get(e);i&&(i.delete(r),i.size===0&&this._outer.delete(e))}forEach(e){this._outer.forEach((r,i)=>e(r,i))}};async function to(t,e){const{data:r}=await Ii(t,{responseType:"image",...e});return r}function An(t){if(t.length<$i)return Array.from(t);if(ga(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return xa(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}let wn=class ro{constructor(e,r,i){this.primitiveIndices=e,this._numIndexPerPrimitive=r,this.position=i,this._children=void 0,k(e.length>=1),k(i.size===3||i.size===4);const{data:a,size:o,indices:n}=i;k(n.length%this._numIndexPerPrimitive==0),k(n.length>=e.length*this._numIndexPerPrimitive);const c=e.length;let l=o*n[this._numIndexPerPrimitive*e[0]];Be.clear(),Be.push(l);const u=Ue(a[l],a[l+1],a[l+2]),d=zt(u);for(let v=0;v0&&++l;if(l<2)return;const u=new Array(8);for(let d=0;d<8;++d)u[d]=a[d]>0?new Uint32Array(a[d]):void 0;for(let d=0;d<8;++d)a[d]=0;for(let d=0;dMn());const pr=M(),ui=M();function On(t,e){if(!t)return!1;const{size:r,data:i,indices:a}=t;j(e,0,0,0),j(ae,0,0,0);let o=0,n=0;for(let c=0;c1&&pe(e,e,1/n),n>0}function $n(t,e,r){if(!t)return!1;j(r,0,0,0),j(ae,0,0,0);let i=0,a=0;const{size:o,data:n,indices:c}=t,l=c.length-1,u=l+(e?2:0);for(let d=0;d0?(me(r,r,pe(X,X,x)),i+=x):i===0&&(me(ae,ae,X),a++)}return i!==0?(pe(r,r,1/i),!0):a!==0&&(pe(r,ae,1/a),!0)}const X=M(),Ae=M(),Nt=M(),ae=M();let In=class{constructor(e){this.channel=e,this.id=Ni()}};function Pn(t,e){const r=t.length;for(let i=0;ii!==e);return r.length===0?null:r}let io=class oo extends Lr{constructor(e,r,i=null,a=Me.Mesh,o=null,n=-1){super(),this.material=e,this.mapPositions=i,this.type=a,this.objectAndLayerIdColor=o,this.edgeIndicesLength=n,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[c,l]of r)this._attributes.set(c,{...l,indices:hn(l.indices)}),c===f.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(c).indices.length:this.edgeIndicesLength)}instantiate(e={}){const r=new oo(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach((i,a)=>{i.exclusive=!1,r._attributes.set(a,i)}),r._boundingInfo=this._boundingInfo,r.transformation=e.transformation||this.transformation,r}get attributes(){return this._attributes}getMutableAttribute(e){let r=this._attributes.get(e);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:An(r.data)},this._attributes.set(e,r)),r}setAttributeData(e,r){const i=this._attributes.get(e);i&&this._attributes.set(e,{...i,exclusive:!0,data:r})}get indexCount(){const e=this._attributes.values().next().value.indices;return(e==null?void 0:e.length)??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo==null&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===Me.Mesh?this._computeAttachmentOriginTriangles(e):this.type===Me.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(this._transformation!=null&&$e(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){const r=this.attributes.get(f.POSITION);return On(r,e)}_computeAttachmentOriginLines(e){const r=this.attributes.get(f.POSITION);return $n(r,Fn(this.material.parameters,r),e)}_computeAttachmentOriginPoints(e){const r=this.attributes.get(f.POSITION);return Rn(r,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(f.POSITION);if(!e||e.indices.length===0)return null;const r=this.type===Me.Mesh?3:1;k(e.indices.length%r==0,"Indexing error: "+e.indices.length+" not divisible by "+r);const i=Yi(e.indices.length/r);return new wn(i,r,e)}get transformation(){return this._transformation??Wt}set transformation(e){this._transformation=e&&e!==Wt?ja(e):null}addHighlight(){const e=new In(nn.Highlight);return this.highlights=Ln(this.highlights,e),e}removeHighlight(e){this.highlights=Dn(this.highlights,e)}};function Fn(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e.indices.length>2}function Bn(){return hi??(hi=(async()=>{const t=await At(()=>import("./basis_transcoder-B40h2JNH.js"),[]),e=await t.default({locateFile:r=>ba(`esri/libs/basisu/${r}`)});return e.initializeBasis(),e})()),hi}let hi;var Ve;(function(t){t[t.ETC1_RGB=0]="ETC1_RGB",t[t.ETC2_RGBA=1]="ETC2_RGBA",t[t.BC1_RGB=2]="BC1_RGB",t[t.BC3_RGBA=3]="BC3_RGBA",t[t.BC4_R=4]="BC4_R",t[t.BC5_RG=5]="BC5_RG",t[t.BC7_M6_RGB=6]="BC7_M6_RGB",t[t.BC7_M5_RGBA=7]="BC7_M5_RGBA",t[t.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",t[t.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",t[t.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",t[t.ATC_RGB=11]="ATC_RGB",t[t.ATC_RGBA=12]="ATC_RGBA",t[t.FXT1_RGB=17]="FXT1_RGB",t[t.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",t[t.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",t[t.ETC2_EAC_R11=20]="ETC2_EAC_R11",t[t.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",t[t.RGBA32=13]="RGBA32",t[t.RGB565=14]="RGB565",t[t.BGR565=15]="BGR565",t[t.RGBA4444=16]="RGBA4444"})(Ve||(Ve={}));let ue=null,Lt=null;async function ao(){return Lt==null&&(Lt=Bn(),ue=await Lt),Lt}function zn(t,e){if(ue==null)return t.byteLength;const r=new ue.BasisFile(new Uint8Array(t)),i=so(r)?no(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),e):0;return r.close(),r.delete(),i}function Vn(t,e){if(ue==null)return t.byteLength;const r=new ue.KTX2File(new Uint8Array(t)),i=lo(r)?no(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),e):0;return r.close(),r.delete(),i}function no(t,e,r,i,a){const o=dn(e?we.COMPRESSED_RGBA8_ETC2_EAC:we.COMPRESSED_RGB8_ETC2),n=a&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(r*i*o*n)}function so(t){return t.getNumImages()>=1&&!t.isUASTC()}function lo(t){return t.getFaces()>=1&&t.isETC1S()}async function Gn(t,e,r){ue==null&&(ue=await ao());const i=new ue.BasisFile(new Uint8Array(r));if(!so(i))return null;i.startTranscoding();const a=co(t,e,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(o,n)=>i.getImageTranscodedSizeInBytes(0,o,n),(o,n,c)=>i.transcodeImage(c,0,o,n,0,0));return i.close(),i.delete(),a}async function Un(t,e,r){ue==null&&(ue=await ao());const i=new ue.KTX2File(new Uint8Array(r));if(!lo(i))return null;i.startTranscoding();const a=co(t,e,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(o,n)=>i.getImageTranscodedSizeInBytes(o,0,0,n),(o,n,c)=>i.transcodeImage(c,o,0,0,n,0,-1,-1));return i.close(),i.delete(),a}function co(t,e,r,i,a,o,n,c){const{compressedTextureETC:l,compressedTextureS3TC:u}=t.capabilities,[d,h]=l?i?[Ve.ETC2_RGBA,we.COMPRESSED_RGBA8_ETC2_EAC]:[Ve.ETC1_RGB,we.COMPRESSED_RGB8_ETC2]:u?i?[Ve.BC3_RGBA,we.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[Ve.BC1_RGB,we.COMPRESSED_RGB_S3TC_DXT1_EXT]:[Ve.RGBA32,ze.RGBA],p=e.hasMipmap?r:Math.min(1,r),v=[];for(let x=0;x1,e.samplingMode=e.hasMipmap?ct.LINEAR_MIPMAP_LINEAR:ct.LINEAR,e.width=a,e.height=o,new st(t,e,{type:"compressed",levels:v})}const Dt=()=>$r.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil"),jn=542327876,Wn=131072,Hn=4;function Dr(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}function kn(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}const qn=Dr("DXT1"),Yn=Dr("DXT3"),Xn=Dr("DXT5"),Jn=31,Zn=0,Kn=1,Qn=2,es=3,ts=4,rs=7,is=20,os=21;function as(t,e,r){const i=ns(r,e.hasMipmap??!1);if(i==null)throw new Error("DDS texture data is null");const{textureData:a,internalFormat:o,width:n,height:c}=i;return e.samplingMode=a.levels.length>1?ct.LINEAR_MIPMAP_LINEAR:ct.LINEAR,e.hasMipmap=a.levels.length>1,e.internalFormat=o,e.width=n,e.height=c,new st(t,e,a)}function ns(t,e){const r=new Int32Array(t,0,Jn);if(r[Zn]!==jn)return Dt().error("Invalid magic number in DDS header"),null;if(!(r[is]&Hn))return Dt().error("Unsupported format, must contain a FourCC code"),null;const i=r[os];let a,o;switch(i){case qn:a=8,o=we.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Yn:a=16,o=we.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Xn:a=16,o=we.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Dt().error("Unsupported FourCC code:",kn(i)),null}let n=1,c=r[ts],l=r[es];(3&c||3&l)&&(Dt().warn("Rounding up compressed texture size to nearest multiple of 4."),c=c+3&-4,l=l+3&-4);const u=c,d=l;let h,p;r[Qn]&Wn&&e!==!1&&(n=Math.max(1,r[rs]));let v=r[Kn]+4;const x=[];for(let _=0;_>2)*(l+3>>2)*a,h=new Uint8Array(t,v,p),x.push(h),v+=p,c=Math.max(1,c>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:x},internalFormat:o,width:u,height:d}}function ss(t,e){let o=t.width*t.height;if(o<4096)return t instanceof ImageData?uo(t):t;let n=t.width,c=t.height;do n=Math.ceil(n/2),c=Math.ceil(c/2),o=n*c;while(o>1048576||e!=null&&(n>e||c>e));return Fr(t,n,c)}function ls(t,e){const r=Math.max(t.width,t.height);if(r<=e)return t;const i=e/r;return Fr(t,Math.round(t.width*i),Math.round(t.height*i))}function Fr(t,e,r){if(t instanceof ImageData)return Fr(uo(t),e,r);const i=document.createElement("canvas");return i.width=e,i.height=r,i.getContext("2d").drawImage(t,0,0,i.width,i.height),i}function uo(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(r==null)throw new wt("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(t,0,0),e}let ho=class extends Lr{get parameters(){return this._parameters}constructor(e,r){super(),this._data=e,this.type=Me.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new Sa,this._parameters={...ds,...r},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){e!=null&&(e instanceof HTMLVideoElement?(this.frameUpdate=r=>this._frameUpdate(e,r),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!(ti(e.src)||e.preload==="auto"&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const r=!e.paused;if(e.src=e.src,r&&e.autoplay){const i=()=>{e.removeEventListener("canplay",i),e.play()};e.addEventListener("canplay",i)}}}_startPreloadImageElement(e){Ea(e.src)||ti(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const r=new qi;return r.wrapMode=this._parameters.wrap??je.REPEAT,r.flipped=!this._parameters.noUnpackFlip,r.samplingMode=this._parameters.mipmap?ct.LINEAR_MIPMAP_LINEAR:ct.LINEAR,r.hasMipmap=!!this._parameters.mipmap,r.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,r.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),r}get glTexture(){return this._glTexture}get memoryEstimate(){var e;return((e=this._glTexture)==null?void 0:e.usedMemory)||cs(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const r=this._data;return r==null?(this._glTexture=new st(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),typeof r=="string"?this._loadFromURL(e,r):r instanceof Image?this._loadFromImageElement(e,r):r instanceof HTMLVideoElement?this._loadFromVideoElement(e,r):r instanceof ImageData||r instanceof HTMLCanvasElement?this._loadFromImage(e,r):(pt(r)||vt(r))&&this._parameters.encoding===_t.DDS_ENCODING?this._loadFromDDSData(e,r):(pt(r)||vt(r))&&this._parameters.encoding===_t.KTX2_ENCODING?this._loadFromKTX2(e,r):(pt(r)||vt(r))&&this._parameters.encoding===_t.BASIS_ENCODING?this._loadFromBasis(e,r):vt(r)?this._loadFromPixelData(e,r):pt(r)?this._loadFromPixelData(e,new Uint8Array(r)):null)}_frameUpdate(e,r){return this._glTexture==null||e.readyStateUn(e,this._createDescriptor(e),r).then(i=>(this._glTexture=i,i)))}_loadFromBasis(e,r){return this._loadAsync(()=>Gn(e,this._createDescriptor(e),r).then(i=>(this._glTexture=i,i)))}_loadFromPixelData(e,r){k(this._parameters.width>0&&this._parameters.height>0);const i=this._createDescriptor(e);return i.pixelFormat=this._parameters.components===1?ze.LUMINANCE:this._parameters.components===3?ze.RGB:ze.RGBA,i.width=this._parameters.width??0,i.height=this._parameters.height??0,this._glTexture=new st(e,i,r),this._glTexture}_loadFromURL(e,r){return this._loadAsync(async i=>{const a=await to(r,{signal:i});return ri(i),this._loadFromImage(e,a)})}_loadFromImageElement(e,r){return r.complete?this._loadFromImage(e,r):this._loadAsync(async i=>{const a=await ya(r,r.src,!1,i);return ri(i),this._loadFromImage(e,a)})}_loadFromVideoElement(e,r){return r.readyState>=bt.HAVE_CURRENT_DATA?this._loadFromImage(e,r):this._loadFromVideoElementAsync(e,r)}_loadFromVideoElementAsync(e,r){return this._loadAsync(i=>new Promise((a,o)=>{const n=()=>{r.removeEventListener("loadeddata",c),r.removeEventListener("error",l),Ma(u)},c=()=>{r.readyState>=bt.HAVE_CURRENT_DATA&&(n(),a(this._loadFromImage(e,r)))},l=d=>{n(),o(d||new wt("Failed to load video"))};r.addEventListener("loadeddata",c),r.addEventListener("error",l);const u=Aa(i,()=>l(wa()))}))}_loadFromImage(e,r){let i=r;if(!(i instanceof HTMLVideoElement)){const{maxTextureSize:n}=e.parameters;i=this._parameters.downsampleUncompressed?ss(i,n):ls(i,n)}const a=mo(i);this._parameters.width=a.width,this._parameters.height=a.height;const o=this._createDescriptor(e);return o.pixelFormat=this._parameters.components===3?ze.RGB:ze.RGBA,o.width=a.width,o.height=a.height,this._glTexture=new st(e,o,i),this._glTexture}_loadAsync(e){const r=new AbortController;this._loadingController=r;const i=e(r.signal);this._loadingPromise=i;const a=()=>{this._loadingController===r&&(this._loadingController=null),this._loadingPromise===i&&(this._loadingPromise=null)};return i.then(a,a),i}unload(){if(this._glTexture=Ut(this._glTexture),this._loadingController!=null){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}};function cs(t,e){if(t==null)return 0;if(pt(t)||vt(t))return e.encoding===_t.KTX2_ENCODING?Vn(t,!!e.mipmap):e.encoding===_t.BASIS_ENCODING?zn(t,!!e.mipmap):t.byteLength;const{width:r,height:i}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?mo(t):e;return(e.mipmap?4/3:1)*r*i*(e.components||4)||0}function mo(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}var bt;(function(t){t[t.HAVE_NOTHING=0]="HAVE_NOTHING",t[t.HAVE_METADATA=1]="HAVE_METADATA",t[t.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",t[t.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",t[t.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"})(bt||(bt={}));const ds={wrap:{s:je.REPEAT,t:je.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};function us(t,e){const r=t.fragment;switch(r.code.add(s`struct ShadingNormalParameters { +vec3 normalView; +vec3 viewDirection; +} shadingParams;`),e.doubleSidedMode){case re.None:r.code.add(s`vec3 shadingNormal(ShadingNormalParameters params) { +return normalize(params.normalView); +}`);break;case re.View:r.code.add(s`vec3 shadingNormal(ShadingNormalParameters params) { +return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView); +}`);break;case re.WindingOrder:r.code.add(s`vec3 shadingNormal(ShadingNormalParameters params) { +return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView); +}`);break;default:Mt(e.doubleSidedMode);case re.COUNT:}}var re;(function(t){t[t.None=0]="None",t[t.View=1]="View",t[t.WindingOrder=2]="WindingOrder",t[t.COUNT=3]="COUNT"})(re||(re={}));var Y;function Ge(t,e){switch(e.textureCoordinateType){case Y.Default:return t.attributes.add(f.UV0,"vec2"),t.varyings.add("vuv0","vec2"),void t.vertex.code.add(s`void forwardTextureCoordinates() { +vuv0 = uv0; +}`);case Y.Compressed:return t.attributes.add(f.UV0,"vec2"),t.varyings.add("vuv0","vec2"),void t.vertex.code.add(s`vec2 getUV0() { +return uv0 / 16384.0; +} +void forwardTextureCoordinates() { +vuv0 = getUV0(); +}`);case Y.Atlas:return t.attributes.add(f.UV0,"vec2"),t.varyings.add("vuv0","vec2"),t.attributes.add(f.UVREGION,"vec4"),t.varyings.add("vuvRegion","vec4"),void t.vertex.code.add(s`void forwardTextureCoordinates() { +vuv0 = uv0; +vuvRegion = uvRegion; +}`);default:Mt(e.textureCoordinateType);case Y.None:return void t.vertex.code.add(s`void forwardTextureCoordinates() {}`);case Y.COUNT:return}}(function(t){t[t.None=0]="None",t[t.Default=1]="Default",t[t.Atlas=2]="Atlas",t[t.Compressed=3]="Compressed",t[t.COUNT=4]="COUNT"})(Y||(Y={}));function hs(t){t.fragment.code.add(s`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) { +vec2 atlasScale = atlasRegion.zw - atlasRegion.xy; +vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy; +float maxdUV = 0.125; +vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale; +vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale; +return textureGrad(tex, uvAtlas, dUVdx, dUVdy); +}`)}function fo(t,e){switch(t.include(Ge,e),e.textureCoordinateType){case Y.Default:case Y.Compressed:return void t.fragment.code.add(s`vec4 textureLookup(sampler2D tex, vec2 uv) { +return texture(tex, uv); +}`);case Y.Atlas:return t.include(hs),void t.fragment.code.add(s`vec4 textureLookup(sampler2D tex, vec2 uv) { +return textureAtlasLookup(tex, uv, vuvRegion); +}`);default:Mt(e.textureCoordinateType);case Y.None:case Y.COUNT:return}}let Q=class extends ee{constructor(e,r){super(e,"sampler2D",D.Pass,(i,a,o)=>i.bindTexture(e,r(a,o)))}},ms=class{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){this._techniques.release(this._technique)}get technique(){return this._technique}get _stippleTextures(){return this._techniques.constructionContext.stippleTextures}get _markerTextures(){return this._techniques.constructionContext.markerTextures}ensureTechnique(e,r){return this._technique=this._techniques.releaseAndAcquire(e,this._material.getConfiguration(this._output,r),this._technique),this._technique}ensureResources(e){return Ar.LOADED}},fs=class extends ms{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this._textureId=e.textureId,this._acquire(e.textureId,r=>this._texture=r),this._acquire(e.normalTextureId,r=>this._textureNormal=r),this._acquire(e.emissiveTextureId,r=>this._textureEmissive=r),this._acquire(e.occlusionTextureId,r=>this._textureOcclusion=r),this._acquire(e.metallicRoughnessTextureId,r=>this._textureMetallicRoughness=r)}dispose(){this._texture=Fe(this._texture),this._textureNormal=Fe(this._textureNormal),this._textureEmissive=Fe(this._textureEmissive),this._textureOcclusion=Fe(this._textureOcclusion),this._textureMetallicRoughness=Fe(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return this._numLoading===0?Ar.LOADED:Ar.LOADING}get textureBindParameters(){return new ps(this._texture!=null?this._texture.glTexture:null,this._textureNormal!=null?this._textureNormal.glTexture:null,this._textureEmissive!=null?this._textureEmissive.glTexture:null,this._textureOcclusion!=null?this._textureOcclusion.glTexture:null,this._textureMetallicRoughness!=null?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){this._texture!=null&&e===this._texture.id||(this._texture=Fe(this._texture),this._textureId=e,this._acquire(this._textureId,r=>this._texture=r))}_acquire(e,r){if(e==null)return void r(null);const i=this._textures.acquire(e);if(Ca(i))return++this._numLoading,void i.then(a=>{if(this._disposed)return Fe(a),void r(null);r(a)}).finally(()=>--this._numLoading);r(i)}},ps=class extends Rt{constructor(e=null,r=null,i=null,a=null,o=null,n,c){super(),this.texture=e,this.textureNormal=r,this.textureEmissive=i,this.textureOcclusion=a,this.textureMetallicRoughness=o,this.scale=n,this.normalTextureTransformMatrix=c}};var N;(function(t){t[t.Disabled=0]="Disabled",t[t.Normal=1]="Normal",t[t.Schematic=2]="Schematic",t[t.Water=3]="Water",t[t.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",t[t.Simplified=5]="Simplified",t[t.TerrainWithWater=6]="TerrainWithWater",t[t.COUNT=7]="COUNT"})(N||(N={}));function po(t,e){const r=t.fragment,i=e.hasMetallicRoughnessTexture||e.hasEmissionTexture||e.hasOcclusionTexture;if(e.pbrMode===N.Normal&&i&&t.include(fo,e),e.pbrMode!==N.Schematic)if(e.pbrMode!==N.Disabled){if(e.pbrMode===N.Normal){r.code.add(s`vec3 mrr; +vec3 emission; +float occlusion;`);const a=e.pbrTextureBindType;e.hasMetallicRoughnessTexture&&(r.uniforms.add(a===D.Pass?new Q("texMetallicRoughness",o=>o.textureMetallicRoughness):new Tt("texMetallicRoughness",o=>o.textureMetallicRoughness)),r.code.add(s`void applyMetallnessAndRoughness(vec2 uv) { +vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb; +mrr[0] *= metallicRoughness.b; +mrr[1] *= metallicRoughness.g; +}`)),e.hasEmissionTexture&&(r.uniforms.add(a===D.Pass?new Q("texEmission",o=>o.textureEmissive):new Tt("texEmission",o=>o.textureEmissive)),r.code.add(s`void applyEmission(vec2 uv) { +emission *= textureLookup(texEmission, uv).rgb; +}`)),e.hasOcclusionTexture?(r.uniforms.add(a===D.Pass?new Q("texOcclusion",o=>o.textureOcclusion):new Tt("texOcclusion",o=>o.textureOcclusion)),r.code.add(s`void applyOcclusion(vec2 uv) { +occlusion *= textureLookup(texOcclusion, uv).r; +} +float getBakedOcclusion() { +return occlusion; +}`)):r.code.add(s`float getBakedOcclusion() { return 1.0; }`),a===D.Pass?r.uniforms.add(new Z("emissionFactor",o=>o.emissiveFactor),new Z("mrrFactors",o=>o.mrrFactors)):r.uniforms.add(new de("emissionFactor",o=>o.emissiveFactor),new de("mrrFactors",o=>o.mrrFactors)),r.code.add(s` + void applyPBRFactors() { + mrr = mrrFactors; + emission = emissionFactor; + occlusion = 1.0; + + ${e.hasMetallicRoughnessTexture?s`applyMetallnessAndRoughness(${e.hasMetallicRoughnessTextureTransform?s`metallicRoughnessUV`:"vuv0"});`:""} + + ${e.hasEmissionTexture?s`applyEmission(${e.hasEmissiveTextureTransform?s`emissiveUV`:"vuv0"});`:""} + + ${e.hasOcclusionTexture?s`applyOcclusion(${e.hasOcclusionTextureTransform?s`occlusionUV`:"vuv0"});`:""} + } + `)}}else r.code.add(s`float getBakedOcclusion() { return 1.0; }`);else r.code.add(s`vec3 mrr = vec3(0.0, 0.6, 0.2); +vec3 emission = vec3(0.0); +float occlusion = 1.0; +void applyPBRFactors() {} +float getBakedOcclusion() { return 1.0; }`)}const ir=new Map([[f.POSITION,0],[f.NORMAL,1],[f.NORMALCOMPRESSED,1],[f.UV0,2],[f.COLOR,3],[f.COLORFEATUREATTRIBUTE,3],[f.SIZE,4],[f.TANGENT,4],[f.CENTEROFFSETANDDISTANCE,5],[f.SYMBOLCOLOR,5],[f.FEATUREATTRIBUTE,6],[f.INSTANCEFEATUREATTRIBUTE,6],[f.INSTANCECOLOR,7],[f.OBJECTANDLAYERIDCOLOR,7],[f.INSTANCEOBJECTANDLAYERIDCOLOR,7],[f.INSTANCEMODEL,8],[f.INSTANCEMODELNORMAL,12],[f.INSTANCEMODELORIGINHI,11],[f.INSTANCEMODELORIGINLO,15]]);function vs(t){return Math.abs(t*t*t)}function gs(t,e,r){const i=r.parameters;return vr.scale=Math.min(i.divisor/(e-i.offset),1),vr.factor=vs(t),vr}function xs(t,e){return Oa(t*Math.max(e.scale,e.minScaleFactor),t,e.factor)}function _s(t,e,r,i){return xs(t,gs(e,r,i))}const vr={scale:0,factor:0,minScaleFactor:0};function Ts(t,e,r,i,a){let o=(r.screenLength||0)*t.pixelRatio;a!=null&&(o=_s(o,i,e,a));const n=o*Math.tan(.5*t.fovY)/(.5*t.fullHeight);return Li(n*e,r.minWorldLength||0,r.maxWorldLength!=null?r.maxWorldLength:1/0)}function vo(t,e){const r=e?vo(e):{};for(const i in t){let a=t[i];a!=null&&a.forEach&&(a=Ss(a)),a==null&&i in r||(r[i]=a)}return r}function bs(t,e){let r=!1;for(const i in e){const a=e[i];a!==void 0&&(Array.isArray(a)?t[i]===null?(t[i]=a.slice(),r=!0):Ra(t[i],a)&&(r=!0):t[i]!==a&&(r=!0,t[i]=a))}return r}function Ss(t){const e=[];return t.forEach(r=>e.push(r)),e}const Es={multiply:1,ignore:2,replace:3,tint:4};let ys=class extends Lr{constructor(e,r){super(),this.type=Me.Material,this.supportsEdges=!1,this._visible=!0,this._renderPriority=0,this._vertexAttributeLocations=ir,this._pp0=Ue(0,0,1),this._pp1=Ue(0,0,0),this._parameters=vo(e,r),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){bs(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this.parametersChanged())}validateParameters(e){}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.parametersChanged())}shouldRender(e){return this.isVisible()&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bindParameters.decorations===sn.ON)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this.parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}isVisible(){return this._visible}parametersChanged(){var e;(e=this.repository)==null||e.materialChanged(this)}queryRenderOccludedState(e){return this.isVisible()&&this.parameters.renderOccluded===e}intersectDraped(e,r,i,a,o,n){return this._pp0[0]=this._pp1[0]=a[0],this._pp0[1]=this._pp1[1]=a[1],this.intersect(e,r,i,this._pp0,this._pp1,o)}};var wr;(function(t){t[t.None=0]="None",t[t.Occlude=1]="Occlude",t[t.Transparent=2]="Transparent",t[t.OccludeAndTransparent=4]="OccludeAndTransparent",t[t.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",t[t.Opaque=16]="Opaque"})(wr||(wr={}));var ie;(function(t){t[t.ColorAlpha=0]="ColorAlpha",t[t.FrontFace=1]="FrontFace",t[t.NONE=2]="NONE",t[t.COUNT=3]="COUNT"})(ie||(ie={}));function go(t,e,r,i,a=ci.ADD,o=ci.ADD,n=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:r,dstAlpha:i,opRgb:a,opAlpha:o,color:{r:n[0],g:n[1],b:n[2],a:n[3]}}}const As={face:Zi.BACK,mode:Ki.CCW},ws={face:Zi.FRONT,mode:Ki.CCW},Ms=t=>t===ve.Back?As:t===ve.Front?ws:null,Cs={zNear:0,zFar:1},Br={r:!0,g:!0,b:!0,a:!0};function Os(t){return Bs.intern(t)}function Rs(t){return zs.intern(t)}function $s(t){return Vs.intern(t)}function Is(t){return Gs.intern(t)}function Ps(t){return Us.intern(t)}function Ns(t){return js.intern(t)}function Ls(t){return Ws.intern(t)}function Ds(t){return Hs.intern(t)}function Fs(t){return ks.intern(t)}function zr(t){return qs.intern(t)}let _e=class{constructor(e,r){this._makeKey=e,this._makeRef=r,this._interns=new Map}intern(e){if(!e)return null;const r=this._makeKey(e),i=this._interns;return i.has(r)||i.set(r,this._makeRef(e)),i.get(r)??null}};function Te(t){return"["+t.join(",")+"]"}const Bs=new _e(xo,t=>({__tag:"Blending",...t}));function xo(t){return t?Te([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const zs=new _e(_o,t=>({__tag:"Culling",...t}));function _o(t){return t?Te([t.face,t.mode]):null}const Vs=new _e(To,t=>({__tag:"PolygonOffset",...t}));function To(t){return t?Te([t.factor,t.units]):null}const Gs=new _e(bo,t=>({__tag:"DepthTest",...t}));function bo(t){return t?Te([t.func]):null}const Us=new _e(So,t=>({__tag:"StencilTest",...t}));function So(t){return t?Te([t.function.func,t.function.ref,t.function.mask,t.operation.fail,t.operation.zFail,t.operation.zPass]):null}const js=new _e(Eo,t=>({__tag:"DepthWrite",...t}));function Eo(t){return t?Te([t.zNear,t.zFar]):null}const Ws=new _e(yo,t=>({__tag:"ColorWrite",...t}));function yo(t){return t?Te([t.r,t.g,t.b,t.a]):null}const Hs=new _e(Ao,t=>({__tag:"StencilWrite",...t}));function Ao(t){return t?Te([t.mask]):null}const ks=new _e(wo,t=>({__tag:"DrawBuffers",...t}));function wo(t){return t?Te(t.buffers):null}const qs=new _e(Ys,t=>({blending:Os(t.blending),culling:Rs(t.culling),polygonOffset:$s(t.polygonOffset),depthTest:Is(t.depthTest),stencilTest:Ps(t.stencilTest),depthWrite:Ns(t.depthWrite),colorWrite:Ls(t.colorWrite),stencilWrite:Ds(t.stencilWrite),drawBuffers:Fs(t.drawBuffers)}));function Ys(t){return t?Te([xo(t.blending),_o(t.culling),To(t.polygonOffset),bo(t.depthTest),So(t.stencilTest),Eo(t.depthWrite),yo(t.colorWrite),Ao(t.stencilWrite),wo(t.drawBuffers)]):null}const Xs=go(Oe.SRC_ALPHA,Oe.ONE,Oe.ONE_MINUS_SRC_ALPHA,Oe.ONE_MINUS_SRC_ALPHA),Js=go(Oe.ONE,Oe.ZERO,Oe.ONE,Oe.ONE_MINUS_SRC_ALPHA);function Zs(t){return t===ie.FrontFace?null:Js}const Ks=5e5,Qs={factor:-1,units:-2};function el(t){return t?Qs:null}function tl(t,e=ge.LESS){return t===ie.NONE||t===ie.FrontFace?e:ge.LEQUAL}function rl(t){return t===ie.ColorAlpha?{buffers:[di.COLOR_ATTACHMENT0,di.COLOR_ATTACHMENT1]}:null}let il=class{constructor(e=!1,r=!0){this.isVerticalRay=e,this.normalRequired=r}};const Ft=$a();function ol(t,e,r,i,a,o){if(!t.visible)return;const n=nt(xl,i,r),c=(u,d,h)=>{o(u,h,d,!1)},l=new il(!1,e.options.normalRequired);if(t.boundingInfo){k(t.type===Me.Mesh);const u=e.tolerance;Mo(t.boundingInfo,r,n,u,a,l,c)}else{const u=t.attributes.get(f.POSITION),d=u.indices;sl(r,n,0,d.length/3,d,u.data,u.stride,a,l,c)}}const al=M();function Mo(t,e,r,i,a,o,n){if(t==null)return;const c=ml(r,al);if(Ia(Ft,t.bbMin),Pa(Ft,t.bbMax),a!=null&&a.applyToAabb(Ft),fl(Ft,e,c,i)){const{primitiveIndices:l,position:u}=t,d=l?l.length:u.indices.length/3;if(d>vl){const h=t.getChildren();if(h!==void 0){for(const p of h)Mo(p,e,r,i,a,o,n);return}}nl(e,r,0,d,u.indices,u.data,u.stride,l,a,o,n)}}const gt=M();function nl(t,e,r,i,a,o,n,c,l,u,d){const h=t[0],p=t[1],v=t[2],x=e[0],_=e[1],g=e[2],{normalRequired:$}=u;for(let C=r;C0){if(qe<0||qe>ce)continue}else if(qe>0||qe0){if($t<0||qe+$t>ce)continue}else if($t>0||qe+$t=0&&d(ei,P,$?ul(W,le,he,Pe,Ne,be,gt):null)}}function sl(t,e,r,i,a,o,n,c,l,u){const d=e,h=_l,p=Math.abs(d[0]),v=Math.abs(d[1]),x=Math.abs(d[2]),_=p>=v?p>=x?0:2:v>=x?1:2,g=_,$=d[g]<0?2:1,C=(_+$)%3,P=(_+(3-$))%3,L=d[C]/d[g],G=d[P]/d[g],z=1/d[g],w=ll,b=cl,A=dl,{normalRequired:R}=l;for(let S=r;S0||Le>0||De>0))continue;const He=be+Le+De;if(He===0)continue;const ce=be*(z*w[g])+Le*(z*b[g])+De*(z*A[g]);if(ce*Math.sign(He)<0)continue;const ke=ce/He;ke>=0&&u(ke,S,R?hl(h):null)}}const ll=M(),cl=M(),dl=M();function ul(t,e,r,i,a,o,n){return j(qt,t,e,r),j(Yt,i,a,o),Rr(n,qt,Yt),Zt(n,n),n}function hl(t){return nt(qt,t[1],t[0]),nt(Yt,t[2],t[0]),Rr(gt,qt,Yt),Zt(gt,gt),gt}const qt=M(),Yt=M();function ml(t,e){return j(e,1/t[0],1/t[1],1/t[2])}function fl(t,e,r,i){return pl(t,e,r,i,1/0)}function pl(t,e,r,i,a){const o=(t[0]-i-e[0])*r[0],n=(t[3]+i-e[0])*r[0];let c=Math.min(o,n),l=Math.max(o,n);const u=(t[1]-i-e[1])*r[1],d=(t[4]+i-e[1])*r[1];if(l=Math.min(l,Math.max(u,d)),l<0||(c=Math.max(c,Math.min(u,d)),c>l))return!1;const h=(t[2]-i-e[2])*r[2],p=(t[5]+i-e[2])*r[2];return l=Math.min(l,Math.max(h,p)),!(l<0)&&(c=Math.max(c,Math.min(h,p)),!(c>l)&&c{z=o[R]+P,w=o[R+1]+L,b=o[R+2]+G}:R=>{const S=o[R],E=o[R+1],O=o[R+2];z=d*S+v*E+g*O+P,w=h*S+x*E+$*O+L,b=p*S+_*E+C*O+G};if(a===1)for(let R=0;R{w=o[S],b=o[S+1],A=o[S+2]}:S=>{const E=o[S],O=o[S+1],U=o[S+2];w=h*E+x*O+$*U,b=p*E+_*O+C*U,A=v*E+g*O+P*U};if(a===1)if(L)for(let S=0;SG){const O=1/Math.sqrt(E);l[i]=w*O,l[i+1]=b*O,l[i+2]=A*O}else l[i]=w,l[i+1]=b,l[i+2]=A;i+=u}else for(let S=0;SG){const O=1/Math.sqrt(E);w*=O,b*=O,A*=O}}for(let E=0;EG){const W=1/Math.sqrt(F);O*=W,U*=W,I*=W}}l[i]=O,l[i+1]=U,l[i+2]=I,l[i+3]=E,i+=u}else for(let w=0;wG){const W=1/Math.sqrt(F);O*=W,U*=W,I*=W}}for(let F=0;Fi.transformWorldFromViewTH),new Z("transformWorldFromViewTL",i=>i.transformWorldFromViewTL),new xe("transformViewFromCameraRelativeRS",i=>i.transformViewFromCameraRelativeRS),new lt("transformProjFromView",i=>i.transformProjFromView),new eo("transformWorldFromModelRS",i=>i.transformWorldFromModelRS),new de("transformWorldFromModelTH",i=>i.transformWorldFromModelTH),new de("transformWorldFromModelTL",i=>i.transformWorldFromModelTL)),r.code.add(s`vec3 positionWorldCameraRelative() { +vec3 rotatedModelPosition = transformWorldFromModelRS * positionModel(); +vec3 transform_CameraRelativeFromModel = dpAdd( +transformWorldFromModelTL, +transformWorldFromModelTH, +-transformWorldFromViewTL, +-transformWorldFromViewTH +); +return transform_CameraRelativeFromModel + rotatedModelPosition; +}`),r.code.add(s` + void forwardPosition(float fOffset) { + vPositionWorldCameraRelative = positionWorldCameraRelative(); + if (fOffset != 0.0) { + vPositionWorldCameraRelative += fOffset * ${e.spherical?s`normalize(transformWorldFromViewTL + vPositionWorldCameraRelative)`:s`vec3(0.0, 0.0, 1.0)`}; + } + + vPosition_view = transformViewFromCameraRelativeRS * vPositionWorldCameraRelative; + gl_Position = transformProjFromView * vec4(vPosition_view, 1.0); + } + `),t.fragment.uniforms.add(new Z("transformWorldFromViewTL",i=>i.transformWorldFromViewTL)),r.code.add(s`vec3 positionWorld() { +return transformWorldFromViewTL + vPositionWorldCameraRelative; +}`),t.fragment.code.add(s`vec3 positionWorld() { +return transformWorldFromViewTL + vPositionWorldCameraRelative; +}`)}class Pl extends Rt{constructor(){super(...arguments),this.transformWorldFromViewTH=M(),this.transformWorldFromViewTL=M(),this.transformViewFromCameraRelativeRS=Ct(),this.transformProjFromView=Qt()}}function Io(t,e){switch(e.normalType){case K.Attribute:case K.Compressed:t.include(rr,e),t.varyings.add("vNormalWorld","vec3"),t.varyings.add("vNormalView","vec3"),t.vertex.uniforms.add(new eo("transformNormalGlobalFromModel",r=>r.transformNormalGlobalFromModel),new xe("transformNormalViewFromGlobal",r=>r.transformNormalViewFromGlobal)),t.vertex.code.add(s`void forwardNormal() { +vNormalWorld = transformNormalGlobalFromModel * normalModel(); +vNormalView = transformNormalViewFromGlobal * vNormalWorld; +}`);break;case K.Ground:t.include($o,e),t.varyings.add("vNormalWorld","vec3"),t.vertex.code.add(s` + void forwardNormal() { + vNormalWorld = ${e.spherical?s`normalize(vPositionWorldCameraRelative);`:s`vec3(0.0, 0.0, 1.0);`} + } + `);break;case K.ScreenDerivative:t.vertex.code.add(s`void forwardNormal() {}`);break;default:Mt(e.normalType);case K.COUNT:}}let Nl=class extends Pl{constructor(){super(...arguments),this.transformNormalViewFromGlobal=Ct()}};const Ll=.1,Gr=.001;let or=class{constructor(e,r){this._module=e,this._loadModule=r}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}},Ur=class{constructor(e,r,i){this.release=i,this.initializeConfiguration(e,r),this._configuration=r.snapshot(),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=Ut(this._program),this._pipeline=this._configuration=null}reload(e){Ut(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get compiled(){return this.program.compiled}get key(){return this._configuration.key}get configuration(){return this._configuration}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return vn.TRIANGLES}getPipeline(e,r,i){return this._pipeline}initializeConfiguration(e,r){}},jr=class{constructor(e,r,i){this._context=e,this._locations=i,this._textures=new Map,this._freeTextureUnits=new Pi({deallocator:null}),this._glProgram=e.programCache.acquire(r.generate("vertex"),r.generate("fragment"),i),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=r.generateBindPass(this),this.bindDraw=r.generateBindDraw(this),this._fragmentUniforms=un()?r.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,r){this._glProgram.setUniform1i(e,r?1:0)}setUniform1i(e,r){this._glProgram.setUniform1i(e,r)}setUniform1f(e,r){this._glProgram.setUniform1f(e,r)}setUniform2fv(e,r){this._glProgram.setUniform2fv(e,r)}setUniform3fv(e,r){this._glProgram.setUniform3fv(e,r)}setUniform4fv(e,r){this._glProgram.setUniform4fv(e,r)}setUniformMatrix3fv(e,r){this._glProgram.setUniformMatrix3fv(e,r)}setUniformMatrix4fv(e,r){this._glProgram.setUniformMatrix4fv(e,r)}setUniform1fv(e,r){this._glProgram.setUniform1fv(e,r)}setUniform1iv(e,r){this._glProgram.setUniform1iv(e,r)}setUniform2iv(e,r){this._glProgram.setUniform3iv(e,r)}setUniform3iv(e,r){this._glProgram.setUniform3iv(e,r)}setUniform4iv(e,r){this._glProgram.setUniform4iv(e,r)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,r){if((r==null?void 0:r.glName)==null){const a=this._textures.get(e);return a&&(this._context.bindTexture(null,a.unit),this._freeTextureUnit(a),this._textures.delete(e)),null}let i=this._textures.get(e);return i==null?(i=this._allocTextureUnit(r),this._textures.set(e,i)):i.texture=r,this._context.useProgram(this),this.setUniform1i(e,i.unit),this._context.bindTexture(r,i.unit),i.unit}rebindTextures(){var e;this._context.useProgram(this),this._textures.forEach((r,i)=>{this._context.bindTexture(r.texture,r.unit),this.setUniform1i(i,r.unit)}),(e=this._fragmentUniforms)==null||e.forEach(r=>{r.type!=="sampler2D"&&r.type!=="samplerCube"||this._textures.has(r.name)||console.error(`Texture sampler ${r.name} has no bound texture`)})}_allocTextureUnit(e){return{texture:e,unit:this._freeTextureUnits.length===0?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}};ge.LESS;ge.ALWAYS;const Dl={mask:255},Fl={function:{func:ge.ALWAYS,ref:Ie.OutlineVisualElementMask,mask:Ie.OutlineVisualElementMask},operation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.ZERO}},Bl={function:{func:ge.ALWAYS,ref:Ie.OutlineVisualElementMask,mask:Ie.OutlineVisualElementMask},operation:{fail:ne.KEEP,zFail:ne.KEEP,zPass:ne.REPLACE}};ge.EQUAL,Ie.OutlineVisualElementMask,Ie.OutlineVisualElementMask,ne.KEEP,ne.KEEP,ne.KEEP;ge.NOTEQUAL,Ie.OutlineVisualElementMask,Ie.OutlineVisualElementMask,ne.KEEP,ne.KEEP,ne.KEEP;function zl({normalTexture:t,metallicRoughnessTexture:e,metallicFactor:r,roughnessFactor:i,emissiveTexture:a,emissiveFactor:o,occlusionTexture:n}){return t==null&&e==null&&a==null&&(o==null||Na(o,Kt))&&n==null&&(i==null||i===1)&&(r==null||r===1)}const Po=[1,1,.5],Vl=[0,.6,.2],Gl=[0,1,.2];let dt=class extends ee{constructor(e,r){super(e,"vec2",D.Pass,(i,a,o)=>i.setUniform2fv(e,r(a,o)))}};function pi(t){t.varyings.add("linearDepth","float")}function No(t){t.vertex.uniforms.add(new dt("nearFar",(e,r)=>r.camera.nearFar))}function Lo(t){t.vertex.code.add(s`float calculateLinearDepth(vec2 nearFar,float z) { +return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]); +}`)}function Do(t,e){const{vertex:r}=t;switch(e.output){case B.Color:if(e.receiveShadows)return pi(t),void r.code.add(s`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case B.Shadow:case B.ShadowHighlight:case B.ShadowExcludeHighlight:case B.ViewshedShadow:return t.include($o,e),pi(t),No(t),Lo(t),void r.code.add(s`void forwardLinearDepth() { +linearDepth = calculateLinearDepth(nearFar, vPosition_view.z); +}`)}r.code.add(s`void forwardLinearDepth() {}`)}function Fo(t){t.vertex.code.add(s`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) { +vec3 camToVert = posWorld - camPosWorld; +bool isBackface = dot(camToVert, normalWorld) > 0.0; +if (isBackface) { +posClip.z += 0.0000003 * posClip.w; +} +return posClip; +}`)}function tt(t,e){Ul(t,e,new de("slicePlaneOrigin",(r,i)=>jl(e,r,i)),new de("slicePlaneBasis1",(r,i)=>{var a;return vi(e,r,i,(a=i.slicePlane)==null?void 0:a.basis1)}),new de("slicePlaneBasis2",(r,i)=>{var a;return vi(e,r,i,(a=i.slicePlane)==null?void 0:a.basis2)}))}function Ul(t,e,...r){if(!e.hasSlicePlane){const n=s`#define rejectBySlice(_pos_) false +#define discardBySlice(_pos_) {} +#define highlightSlice(_color_, _pos_) (_color_)`;return e.hasSliceInVertexProgram&&t.vertex.code.add(n),void t.fragment.code.add(n)}e.hasSliceInVertexProgram&&t.vertex.uniforms.add(...r),t.fragment.uniforms.add(...r);const i=s`struct SliceFactors { +float front; +float side0; +float side1; +float side2; +float side3; +}; +SliceFactors calculateSliceFactors(vec3 pos) { +vec3 rel = pos - slicePlaneOrigin; +vec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2); +float slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin); +float basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1); +float basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2); +float basis1Dot = dot(slicePlaneBasis1, rel); +float basis2Dot = dot(slicePlaneBasis2, rel); +return SliceFactors( +dot(slicePlaneNormal, pos) + slicePlaneW, +-basis1Dot - basis1Len2, +basis1Dot - basis1Len2, +-basis2Dot - basis2Len2, +basis2Dot - basis2Len2 +); +} +bool sliceByFactors(SliceFactors factors) { +return factors.front < 0.0 +&& factors.side0 < 0.0 +&& factors.side1 < 0.0 +&& factors.side2 < 0.0 +&& factors.side3 < 0.0; +} +bool sliceEnabled() { +return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0; +} +bool sliceByPlane(vec3 pos) { +return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos)); +} +#define rejectBySlice(_pos_) sliceByPlane(_pos_) +#define discardBySlice(_pos_) { if (sliceByPlane(_pos_)) discard; }`,a=s`vec4 applySliceHighlight(vec4 color, vec3 pos) { +SliceFactors factors = calculateSliceFactors(pos); +const float HIGHLIGHT_WIDTH = 1.0; +const vec4 HIGHLIGHT_COLOR = vec4(0.0, 0.0, 0.0, 0.3); +factors.front /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.front); +factors.side0 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side0); +factors.side1 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side1); +factors.side2 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side2); +factors.side3 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side3); +if (sliceByFactors(factors)) { +return color; +} +float highlightFactor = (1.0 - step(0.5, factors.front)) +* (1.0 - step(0.5, factors.side0)) +* (1.0 - step(0.5, factors.side1)) +* (1.0 - step(0.5, factors.side2)) +* (1.0 - step(0.5, factors.side3)); +return mix(color, vec4(HIGHLIGHT_COLOR.rgb, color.a), highlightFactor * HIGHLIGHT_COLOR.a); +}`,o=e.hasSliceHighlight?s` + ${a} + #define highlightSlice(_color_, _pos_) (sliceEnabled() ? applySliceHighlight(_color_, _pos_) : (_color_)) + `:s`#define highlightSlice(_color_, _pos_) (_color_)`;e.hasSliceInVertexProgram&&t.vertex.code.add(i),t.fragment.code.add(i),t.fragment.code.add(o)}function Bo(t,e,r){return t.instancedDoublePrecision?j(Wl,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):e.slicePlaneLocalOrigin}function zo(t,e){return t!=null?Re(Xt,e.origin,t):e.origin}function Vo(t,e,r){return t.hasSliceTranslatedView?e!=null?Sr(Hl,r.camera.viewMatrix,e):r.camera.viewMatrix:null}function jl(t,e,r){if(r.slicePlane==null)return Kt;const i=Bo(t,e,r),a=zo(i,r.slicePlane),o=Vo(t,i,r);return o!=null?$e(Xt,a,o):a}function vi(t,e,r,i){if(i==null||r.slicePlane==null)return Kt;const a=Bo(t,e,r),o=zo(a,r.slicePlane),n=Vo(t,a,r);return n!=null?(me(ft,i,o),$e(Xt,o,n),$e(ft,ft,n),Re(ft,ft,Xt)):i}const Wl=M(),Xt=M(),ft=M(),Hl=Qt();function rt(t){Lo(t),t.vertex.code.add(s`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) { +vec4 eye = view * vec4(pos, 1.0); +depth = calculateLinearDepth(nearFar,eye.z); +return proj * eye; +}`),t.vertex.code.add(s`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) { +return proj * (view * vec4(pos, 1.0)); +}`)}let kl=class extends ee{constructor(e,r){super(e,"mat4",D.Draw,(i,a,o)=>i.setUniformMatrix4fv(e,r(a,o)))}};function yt(t,e){e.instancedDoublePrecision?t.constants.add("cameraPosition","vec3",Kt):t.uniforms.add(new de("cameraPosition",(r,i)=>j(Go,i.camera.viewInverseTransposeMatrix[3]-r.origin[0],i.camera.viewInverseTransposeMatrix[7]-r.origin[1],i.camera.viewInverseTransposeMatrix[11]-r.origin[2])))}function it(t,e){if(!e.instancedDoublePrecision)return void t.uniforms.add(new lt("proj",(i,a)=>a.camera.projectionMatrix),new kl("view",(i,a)=>Sr(gi,a.camera.viewMatrix,i.origin)),new de("localOrigin",i=>i.origin));const r=i=>j(Go,i.camera.viewInverseTransposeMatrix[3],i.camera.viewInverseTransposeMatrix[7],i.camera.viewInverseTransposeMatrix[11]);t.uniforms.add(new lt("proj",(i,a)=>a.camera.projectionMatrix),new lt("view",(i,a)=>Sr(gi,a.camera.viewMatrix,r(a))),new Z("localOrigin",(i,a)=>r(a)))}const gi=Qt(),Go=M();function ql(t){t.uniforms.add(new lt("viewNormal",(e,r)=>r.camera.viewInverseTransposeMatrix))}let Yl=class extends Rt{constructor(){super(),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?this._parameterBits.map(()=>0):[],this._parameterNames||(this._parameterNames=[])}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,r={key:this.key};for(const i of e)r[i]=this[i];return r}};function T(t={}){return(e,r)=>{if(e._parameterNames=e._parameterNames??[],e._parameterNames.push(r),t.constValue!=null)Object.defineProperty(e,r,{get:()=>t.constValue});else{const i=e._parameterNames.length-1,a=t.count||2,o=Math.ceil(Math.log2(a)),n=e._parameterBits??[0];let c=0;for(;n[c]+o>16;)c++,c>=n.length&&n.push(0);e._parameterBits=n;const l=n[c],u=(1<o.modelTransformation??Wt)),t.vertex.uniforms.add(new xe("normalLocalOriginFromModel",o=>(Wi(xi,o.modelTransformation??Wt),xi)))),e.instanced&&i&&(t.attributes.add(f.INSTANCEMODELORIGINHI,"vec3"),t.attributes.add(f.INSTANCEMODELORIGINLO,"vec3"),t.attributes.add(f.INSTANCEMODEL,"mat3"),t.attributes.add(f.INSTANCEMODELNORMAL,"mat3"));const a=t.vertex;i&&(a.include(Qi,e),a.uniforms.add(new de("viewOriginHi",(o,n)=>Pn(j(Bt,n.camera.viewInverseTransposeMatrix[3],n.camera.viewInverseTransposeMatrix[7],n.camera.viewInverseTransposeMatrix[11]),Bt)),new de("viewOriginLo",(o,n)=>Nn(j(Bt,n.camera.viewInverseTransposeMatrix[3],n.camera.viewInverseTransposeMatrix[7],n.camera.viewInverseTransposeMatrix[11]),Bt)))),a.code.add(s` + vec3 getVertexInLocalOriginSpace() { + return ${r?i?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":i?"instanceModel * localPosition().xyz":"localPosition().xyz"}; + } + + vec3 subtractOrigin(vec3 _pos) { + ${i?s` + // Negated inputs are intentionally the first two arguments. The other way around the obfuscation in dpAdd() stopped + // working for macOS 14+ and iOS 17+. + // Issue: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280 + vec3 originDelta = dpAdd(-instanceModelOriginHi, -instanceModelOriginLo, viewOriginHi, viewOriginLo); + return _pos - originDelta;`:"return vpos;"} + } + `),a.code.add(s` + vec3 dpNormal(vec4 _normal) { + return normalize(${r?i?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":i?"instanceModelNormal * _normal.xyz":"_normal.xyz"}); + } + `),e.output===B.Normal&&(ql(a),a.code.add(s` + vec3 dpNormalView(vec4 _normal) { + return normalize((viewNormal * ${r?i?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":i?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz); + } + `)),e.hasVertexTangents&&a.code.add(s` + vec4 dpTransformVertexTangent(vec4 _tangent) { + ${r?i?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":i?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"} + }`)}const Bt=M();let jo=class extends ee{constructor(e,r){super(e,"int",D.Pass,(i,a,o)=>i.setUniform1i(e,r(a,o)))}};function Wo(t,e){e.hasSymbolColors?(t.include(bn),t.attributes.add(f.SYMBOLCOLOR,"vec4"),t.varyings.add("colorMixMode","mediump float"),t.vertex.code.add(s`int symbolColorMixMode; +vec4 getSymbolColor() { +return decodeSymbolColor(symbolColor, symbolColorMixMode) * 0.003921568627451; +} +void forwardColorMixMode() { +colorMixMode = float(symbolColorMixMode) + 0.5; +}`)):(t.fragment.uniforms.add(new jo("colorMixMode",r=>Es[r.colorMixMode])),t.vertex.code.add(s`vec4 getSymbolColor() { return vec4(1.0); } +void forwardColorMixMode() {}`))}function Ho(t,e){e.hasVertexColors?(t.attributes.add(f.COLOR,"vec4"),t.varyings.add("vColor","vec4"),t.vertex.code.add(s`void forwardVertexColor() { vColor = color; }`),t.vertex.code.add(s`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):t.vertex.code.add(s`void forwardVertexColor() {} +void forwardNormalizedVertexColor() {}`)}function Xl(t){t.vertex.code.add(s`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) { +return absCosAngle * absCosAngle * absCosAngle; +}`),t.vertex.code.add(s`vec3 screenSizePerspectiveScaleFactor(float absCosAngle, float distanceToCamera, vec3 params) { +return vec3( +min(params.x / (distanceToCamera - params.y), 1.0), +screenSizePerspectiveViewAngleDependentFactor(absCosAngle), +params.z +); +}`),t.vertex.code.add(s`float applyScreenSizePerspectiveScaleFactorFloat(float size, vec3 factor) { +return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y); +}`),t.vertex.code.add(s`float screenSizePerspectiveScaleFloat(float size, float absCosAngle, float distanceToCamera, vec3 params) { +return applyScreenSizePerspectiveScaleFactorFloat( +size, +screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params) +); +}`),t.vertex.code.add(s`vec2 applyScreenSizePerspectiveScaleFactorVec2(vec2 size, vec3 factor) { +return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y); +}`),t.vertex.code.add(s`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) { +return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)); +}`)}function Jl(t){t.uniforms.add(new Z("screenSizePerspectiveAlignment",e=>Zl(e.screenSizePerspectiveAlignment||e.screenSizePerspective)))}function Zl(t){return j(Kl,t.parameters.divisor,t.parameters.offset,t.minScaleFactor)}const Kl=M();let te=class extends ee{constructor(e,r){super(e,"vec4",D.Pass,(i,a,o)=>i.setUniform4fv(e,r(a,o)))}};function ko(t,e){const r=t.vertex;e.hasVerticalOffset?(ec(r),e.hasScreenSizePerspective&&(t.include(Xl),Jl(r),yt(t.vertex,e)),r.code.add(s` + vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) { + float viewDistance = length((view * vec4(worldPos, 1.0)).xyz); + ${e.spherical?s`vec3 worldNormal = normalize(worldPos + localOrigin);`:s`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`} + ${e.hasScreenSizePerspective?s` + float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition)); + float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:s` + float verticalOffsetScreenHeight = verticalOffset.x;`} + // Screen sized offset in world space, used for example for line callouts + float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w); + return worldNormal * worldOffset; + } + + vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { + return worldPos + calculateVerticalOffset(worldPos, localOrigin); + } + `)):r.code.add(s`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const Ql=Ir();function ec(t){t.uniforms.add(new te("verticalOffset",(e,r)=>{const{minWorldLength:i,maxWorldLength:a,screenLength:o}=e.verticalOffset,n=Math.tan(.5*r.camera.fovY)/(.5*r.camera.fullViewport[3]),c=r.camera.pixelRatio||1;return oe(Ql,o*c,n,i,a)}))}function tc(t,e){const r=e.output===B.ObjectAndLayerIdColor,i=e.objectAndLayerIdColorInstanced;r&&(t.varyings.add("objectAndLayerIdColorVarying","vec4"),i?t.attributes.add(f.INSTANCEOBJECTANDLAYERIDCOLOR,"vec4"):t.attributes.add(f.OBJECTANDLAYERIDCOLOR,"vec4")),t.vertex.code.add(s` + void forwardObjectAndLayerIdColor() { + ${r?i?s`objectAndLayerIdColorVarying = instanceObjectAndLayerIdColor * 0.003921568627451;`:s`objectAndLayerIdColorVarying = objectAndLayerIdColor * 0.003921568627451;`:s``} }`),t.fragment.code.add(s` + void outputObjectAndLayerIdColor() { + ${r?s`fragColor = objectAndLayerIdColorVarying;`:s``} }`)}function qo(t){t.code.add(s`const float MAX_RGBA4_FLOAT = +15.0 / 16.0 + +15.0 / 16.0 / 16.0 + +15.0 / 16.0 / 16.0 / 16.0 + +15.0 / 16.0 / 16.0 / 16.0 / 16.0; +const vec4 FIXED_POINT_FACTORS_RGBA4 = vec4(1.0, 16.0, 16.0 * 16.0, 16.0 * 16.0 * 16.0); +vec4 floatToRgba4(const float value) { +float valueInValidDomain = clamp(value, 0.0, MAX_RGBA4_FLOAT); +vec4 fixedPointU4 = floor(fract(valueInValidDomain * FIXED_POINT_FACTORS_RGBA4) * 16.0); +const float toU4AsFloat = 1.0 / 15.0; +return fixedPointU4 * toU4AsFloat; +} +const vec4 RGBA4_2_FLOAT_FACTORS = vec4( +15.0 / (16.0), +15.0 / (16.0 * 16.0), +15.0 / (16.0 * 16.0 * 16.0), +15.0 / (16.0 * 16.0 * 16.0 * 16.0) +); +float rgba4ToFloat(vec4 rgba) { +return dot(rgba, RGBA4_2_FLOAT_FACTORS); +}`)}function rc(t,e){switch(e.output){case B.Shadow:case B.ShadowHighlight:case B.ShadowExcludeHighlight:case B.ViewshedShadow:t.fragment.include(qo),t.fragment.code.add(s`float _calculateFragDepth(const in float depth) { +const float SLOPE_SCALE = 2.0; +const float BIAS = 20.0 * .000015259; +float m = max(abs(dFdx(depth)), abs(dFdy(depth))); +return depth + SLOPE_SCALE * m + BIAS; +} +void outputDepth(float _linearDepth) { +fragColor = floatToRgba4(_calculateFragDepth(_linearDepth)); +}`)}}const ic=Pr(1,1,0,1),oc=Pr(1,0,1,1);function ac(t){t.fragment.uniforms.add(new Q("depthTexture",(e,r)=>r.mainDepth)),t.fragment.constants.add("occludedHighlightFlag","vec4",ic).add("unoccludedHighlightFlag","vec4",oc),t.fragment.code.add(s`void outputHighlight() { +float sceneDepth = float(texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x); +if (gl_FragCoord.z > sceneDepth + 5e-7) { +fragColor = occludedHighlightFlag; +} else { +fragColor = unoccludedHighlightFlag; +} +}`)}let nc=class extends ee{constructor(e,r,i){super(e,"vec4",D.Pass,(a,o,n)=>a.setUniform4fv(e,r(o,n)),i)}},sc=class extends ee{constructor(e,r,i){super(e,"float",D.Pass,(a,o,n)=>a.setUniform1fv(e,r(o,n)),i)}},H=class extends Bi{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};m([V()],H.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),m([V()],H.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),m([V()],H.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),m([V()],H.prototype,"DECONFLICTOR_SHOW_GRID",void 0),m([V()],H.prototype,"LABELS_SHOW_BORDER",void 0),m([V()],H.prototype,"TEXT_SHOW_BASELINE",void 0),m([V()],H.prototype,"TEXT_SHOW_BORDER",void 0),m([V()],H.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),m([V()],H.prototype,"OVERLAY_SHOW_CENTER",void 0),m([V()],H.prototype,"SHOW_POI",void 0),m([V()],H.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),m([V()],H.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),m([V()],H.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),m([V()],H.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),m([V()],H.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),m([V()],H.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),m([V()],H.prototype,"I3S_TREE_SHOW_TILES",void 0),m([V()],H.prototype,"I3S_SHOW_MODIFICATIONS",void 0),m([V()],H.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),m([V()],H.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),m([V()],H.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),m([V()],H.prototype,"LINE_WIREFRAMES",void 0),H=m([Nr("esri.views.3d.support.debugFlags")],H);new H;var _i,Ti;(function(t){t[t.Undefined=0]="Undefined",t[t.DefinedSize=1]="DefinedSize",t[t.DefinedScale=2]="DefinedScale"})(_i||(_i={})),function(t){t[t.Undefined=0]="Undefined",t[t.DefinedAngle=1]="DefinedAngle"}(Ti||(Ti={}));const gr=8;function Et(t,e){const{vertex:r,attributes:i}=t;e.hasVvInstancing&&(e.vvSize||e.vvColor)&&i.add(f.INSTANCEFEATUREATTRIBUTE,"vec4"),e.vvSize?(r.uniforms.add(new Z("vvSizeMinSize",a=>a.vvSize.minSize)),r.uniforms.add(new Z("vvSizeMaxSize",a=>a.vvSize.maxSize)),r.uniforms.add(new Z("vvSizeOffset",a=>a.vvSize.offset)),r.uniforms.add(new Z("vvSizeFactor",a=>a.vvSize.factor)),r.uniforms.add(new xe("vvSymbolRotationMatrix",a=>a.vvSymbolRotationMatrix)),r.uniforms.add(new Z("vvSymbolAnchor",a=>a.vvSymbolAnchor)),r.code.add(s`vec3 vvScale(vec4 _featureAttribute) { +return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize); +} +vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) { +return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0); +}`),r.code.add(s` + const float eps = 1.192092896e-07; + vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) { + vec3 vvScale = clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize + eps, vvSizeMaxSize); + return vec4(vvSymbolRotationMatrix * _normal / vvScale, 1.0); + } + + ${e.hasVvInstancing?s` + vec4 vvLocalNormal(vec3 _normal) { + return vvTransformNormal(_normal, instanceFeatureAttribute); + } + + vec4 localPosition() { + return vvTransformPosition(position, instanceFeatureAttribute); + }`:""} + `)):r.code.add(s`vec4 localPosition() { return vec4(position, 1.0); } +vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),e.vvColor?(r.constants.add("vvColorNumber","int",gr),r.uniforms.add(new sc("vvColorValues",a=>a.vvColor.values,gr),new nc("vvColorColors",a=>a.vvColor.colors,gr)),r.code.add(s` + vec4 interpolateVVColor(float value) { + if (value <= vvColorValues[0]) { + return vvColorColors[0]; + } + + for (int i = 1; i < vvColorNumber; ++i) { + if (vvColorValues[i] >= value) { + float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]); + return mix(vvColorColors[i-1], vvColorColors[i], f); + } + } + return vvColorColors[vvColorNumber - 1]; + } + + vec4 vvGetColor(vec4 featureAttribute) { + return interpolateVVColor(featureAttribute.y); + } + + ${e.hasVvInstancing?s` + vec4 vvColor() { + return vvGetColor(instanceFeatureAttribute); + }`:"vec4 vvColor() { return vec4(1.0); }"} + `)):r.code.add(s`vec4 vvColor() { return vec4(1.0); }`)}function lc(t){t.fragment.code.add(s` + #define discardOrAdjustAlpha(color) { if (color.a < ${s.float(Gr)}) { discard; } } + `)}function ot(t,e){cc(t,e,new se("textureAlphaCutoff",r=>r.textureAlphaCutoff))}function cc(t,e,r){const i=t.fragment;switch(e.alphaDiscardMode!==J.Mask&&e.alphaDiscardMode!==J.MaskBlend||i.uniforms.add(r),e.alphaDiscardMode){case J.Blend:return t.include(lc);case J.Opaque:i.code.add(s`void discardOrAdjustAlpha(inout vec4 color) { +color.a = 1.0; +}`);break;case J.Mask:i.code.add(s`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } else { color.a = 1.0; } }`);break;case J.MaskBlend:t.fragment.code.add(s`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } }`)}}function Yo(t,e){const{vertex:r,fragment:i}=t,a=e.hasColorTexture&&e.alphaDiscardMode!==J.Opaque;switch(e.output){case B.Depth:it(r,e),t.include(rt,e),t.include(tt,e),t.include(Ge,e),a&&i.uniforms.add(new Q("tex",o=>o.texture)),r.code.add(s`void main(void) { +vpos = getVertexInLocalOriginSpace(); +vpos = subtractOrigin(vpos); +vpos = addVerticalOffset(vpos, localOrigin); +gl_Position = transformPosition(proj, view, vpos); +forwardTextureCoordinates(); +}`),t.include(ot,e),i.code.add(s` + void main(void) { + discardBySlice(vpos); + ${a?s` + vec4 texColor = texture(tex, ${e.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + discardOrAdjustAlpha(texColor);`:""} + } + `);break;case B.Shadow:case B.ShadowHighlight:case B.ShadowExcludeHighlight:case B.ViewshedShadow:case B.ObjectAndLayerIdColor:it(r,e),t.include(rt,e),t.include(Ge,e),t.include(Et,e),t.include(rc,e),t.include(tt,e),t.include(tc,e),No(t),t.varyings.add("depth","float"),a&&i.uniforms.add(new Q("tex",o=>o.texture)),r.code.add(s`void main(void) { +vpos = getVertexInLocalOriginSpace(); +vpos = subtractOrigin(vpos); +vpos = addVerticalOffset(vpos, localOrigin); +gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth); +forwardTextureCoordinates(); +forwardObjectAndLayerIdColor(); +}`),t.include(ot,e),i.code.add(s` + void main(void) { + discardBySlice(vpos); + ${a?s` + vec4 texColor = texture(tex, ${e.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + discardOrAdjustAlpha(texColor);`:""} + ${e.output===B.ObjectAndLayerIdColor?s`outputObjectAndLayerIdColor();`:s`outputDepth(depth);`} + } + `);break;case B.Normal:{it(r,e),t.include(rt,e),t.include(rr,e),t.include(Io,e),t.include(Ge,e),t.include(Et,e),a&&i.uniforms.add(new Q("tex",n=>n.texture)),e.normalType===K.ScreenDerivative&&t.varyings.add("vPositionView","vec3");const o=e.normalType===K.Attribute||e.normalType===K.Compressed;r.code.add(s` + void main(void) { + vpos = getVertexInLocalOriginSpace(); + + ${o?s`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:s` + // Get vertex position in camera space for screen-space derivative normals + vPositionView = (view * vec4(vpos, 1.0)).xyz; + `} + vpos = subtractOrigin(vpos); + vpos = addVerticalOffset(vpos, localOrigin); + gl_Position = transformPosition(proj, view, vpos); + forwardTextureCoordinates(); + } + `),t.include(tt,e),t.include(ot,e),i.code.add(s` + void main() { + discardBySlice(vpos); + ${a?s` + vec4 texColor = texture(tex, ${e.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + discardOrAdjustAlpha(texColor);`:""} + + ${e.normalType===K.ScreenDerivative?s`vec3 normal = screenDerivativeNormal(vPositionView);`:s` + vec3 normal = normalize(vNormalWorld); + if (gl_FrontFacing == false){ + normal = -normal; + }`} + fragColor = vec4(0.5 + 0.5 * normal, 1.0); + } + `);break}case B.Highlight:it(r,e),t.include(rt,e),t.include(Ge,e),t.include(Et,e),a&&i.uniforms.add(new Q("tex",o=>o.texture)),r.code.add(s`void main(void) { +vpos = getVertexInLocalOriginSpace(); +vpos = subtractOrigin(vpos); +vpos = addVerticalOffset(vpos, localOrigin); +gl_Position = transformPosition(proj, view, vpos); +forwardTextureCoordinates(); +}`),t.include(tt,e),t.include(ot,e),t.include(ac,e),i.code.add(s` + void main() { + discardBySlice(vpos); + ${a?s` + vec4 texColor = texture(tex, ${e.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + discardOrAdjustAlpha(texColor);`:""} + outputHighlight(); + } + `)}}function dc(t,e){const r=t.fragment;e.hasVertexTangents?(t.attributes.add(f.TANGENT,"vec4"),t.varyings.add("vTangent","vec4"),e.doubleSidedMode===re.WindingOrder?r.code.add(s`mat3 computeTangentSpace(vec3 normal) { +float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w; +vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz); +vec3 bitangent = cross(normal, tangent) * tangentHeadedness; +return mat3(tangent, bitangent, normal); +}`):r.code.add(s`mat3 computeTangentSpace(vec3 normal) { +float tangentHeadedness = vTangent.w; +vec3 tangent = normalize(vTangent.xyz); +vec3 bitangent = cross(normal, tangent) * tangentHeadedness; +return mat3(tangent, bitangent, normal); +}`)):r.code.add(s`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) { +vec3 Q1 = dFdx(pos); +vec3 Q2 = dFdy(pos); +vec2 stx = dFdx(st); +vec2 sty = dFdy(st); +float det = stx.t * sty.s - sty.t * stx.s; +vec3 T = stx.t * Q2 - sty.t * Q1; +T = T - normal * dot(normal, T); +T *= inversesqrt(max(dot(T,T), 1.e-10)); +vec3 B = sign(det) * cross(normal, T); +return mat3(T, B, normal); +}`),e.textureCoordinateType!==Y.None&&(t.include(fo,e),r.uniforms.add(e.pbrTextureBindType===D.Pass?new Q("normalTexture",i=>i.textureNormal):new Tt("normalTexture",i=>i.textureNormal)),e.hasNormalTextureTransform&&(r.uniforms.add(new dt("scale",i=>i.scale??Hi)),r.uniforms.add(new xe("normalTextureTransformMatrix",i=>i.normalTextureTransformMatrix??ht))),r.code.add(s`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) { +vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),e.hasNormalTextureTransform&&r.code.add(s`mat3 normalTextureRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0, +normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0, +0.0, 0.0, 0.0 ); +rawNormal.xy = (normalTextureRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(s`return tangentSpace * rawNormal; +}`))}var at,bi;(function(t){t[t.RED=0]="RED",t[t.RG=1]="RG",t[t.RGBA4=2]="RGBA4",t[t.RGBA=3]="RGBA",t[t.RGBA_MIPMAP=4]="RGBA_MIPMAP",t[t.R16F=5]="R16F",t[t.RGBA16F=6]="RGBA16F"})(at||(at={})),function(t){t[t.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",t[t.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(bi||(bi={}));let Ke=class extends Bi{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this._context=null,this._dirty=!0}initialize(){this.addHandles([zi(()=>this.view.ready,e=>{var r;e&&((r=this.view._stage)==null||r.renderer.addRenderNode(this))},La)])}destroy(){var e,r;(r=(e=this.view._stage)==null?void 0:e.renderer)==null||r.removeRenderNode(this)}render(){throw new wt("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view._stage.renderView.renderingContext.gl}acquireOutputFramebuffer(){var i,a,o;const e=(a=(i=this._frameBuffer)==null?void 0:i.getTexture())==null?void 0:a.descriptor,r=this.view._stage.renderer.fboCache.acquire((e==null?void 0:e.width)??640,(e==null?void 0:e.height)??480,this.produces);return(o=r.fbo)==null||o.initializeAndBind(),r}bindRenderTarget(){var e,r;return(r=(e=this._frameBuffer)==null?void 0:e.fbo)==null||r.initializeAndBind(),this._frameBuffer}requestRender(e){var r;e===ki.UPDATE&&((r=this.view._stage)==null||r.renderView.requestRender(e)),this._dirty=!0}resetWebGLState(){var e;this.renderingContext.resetState(),this.renderingContext.bindFramebuffer((e=this._frameBuffer)==null?void 0:e.fbo)}get fboCache(){return this.view._stage.renderer.fboCache}get bindParameters(){return this._context.bindParameters}get renderingContext(){return this.view._stage.renderView.renderingContext}updateAnimation(){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e,r){this._context=r,this._frameBuffer=e.find(({name:i})=>i===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};m([V({constructOnly:!0})],Ke.prototype,"view",void 0),m([V({constructOnly:!0})],Ke.prototype,"consumes",void 0),m([V()],Ke.prototype,"produces",void 0),Ke=m([Nr("esri.views.3d.webgl.RenderNode")],Ke);const uc=Ke,hc=3e5,Si=5e5;function Xo(t,e=!0){t.attributes.add(f.POSITION,"vec2"),e&&t.varyings.add("uv","vec2"),t.vertex.code.add(s` + void main(void) { + gl_Position = vec4(position, 0.0, 1.0); + ${e?s`uv = position * 0.5 + vec2(0.5);`:""} + } + `)}function Wr(t){t.uniforms.add(new dt("zProjectionMap",(e,r)=>mc(r.camera))),t.code.add(s`float linearizeDepth(float depth) { +float depthNdc = depth * 2.0 - 1.0; +float c1 = zProjectionMap[0]; +float c2 = zProjectionMap[1]; +return -(c1 / (depthNdc + c2 + 1e-7)); +}`),t.code.add(s`float depthFromTexture(sampler2D depthTexture, vec2 uv) { +ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0))); +float depth = texelFetch(depthTexture, iuv, 0).r; +return depth; +}`),t.code.add(s`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) { +return linearizeDepth(depthFromTexture(depthTexture, uv)); +}`)}function mc(t){const e=t.projectionMatrix;return We(fc,e[14],e[10])}const fc=er();let pc=class extends ee{constructor(e,r){super(e,"vec2",D.Draw,(i,a,o,n)=>i.setUniform2fv(e,r(a,o,n)))}};const vc=()=>$r.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");let Jo=class{constructor(){this._includedModules=new Map}include(e,r){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,r),e(this.builder,r))}},ar=class extends Jo{constructor(){super(...arguments),this.vertex=new Ei,this.fragment=new Ei,this.attributes=new _c,this.varyings=new Tc,this.extensions=new ut,this.constants=new Zo,this.outputs=new Cr}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const r=this.extensions.generateSource(e),i=this.attributes.generateSource(e),a=this.varyings.generateSource(e),o=e==="vertex"?this.vertex:this.fragment,n=o.uniforms.generateSource(),c=o.code.generateSource(),l=e==="vertex"?Sc:bc,u=this.constants.generateSource().concat(o.constants.generateSource()),d=this.outputs.generateSource(e);return`#version 300 es +${r.join(` +`)} + +${l} + +${u.join(` +`)} + +${n.join(` +`)} + +${i.join(` +`)} + +${a.join(` +`)} + +${d.join(` +`)} + +${c.join(` +`)}`}generateBindPass(e){const r=new Map;this.vertex.uniforms.entries.forEach(o=>{const n=o.bind[D.Pass];n&&r.set(o.name,n)}),this.fragment.uniforms.entries.forEach(o=>{const n=o.bind[D.Pass];n&&r.set(o.name,n)});const i=Array.from(r.values()),a=i.length;return(o,n)=>{for(let c=0;c{const n=o.bind[D.Draw];n&&r.set(o.name,n)}),this.fragment.uniforms.entries.forEach(o=>{const n=o.bind[D.Draw];n&&r.set(o.name,n)});const i=Array.from(r.values()),a=i.length;return(o,n,c)=>{for(let l=0;le.arraySize!=null?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`)}get entries(){return Array.from(this._entries.values())}},xc=class{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}},Ei=class extends Jo{constructor(){super(...arguments),this.uniforms=new gc(this),this.code=new xc(this),this.constants=new Zo}get builder(){return this}},_c=class{constructor(){this._entries=new Array}add(e,r){this._entries.push([e,r])}generateSource(e){return e==="fragment"?[]:this._entries.map(r=>`in ${r[1]} ${r[0]};`)}},Tc=class{constructor(){this._entries=new Map}add(e,r){this._entries.has(e)&&k(this._entries.get(e)===r),this._entries.set(e,r)}generateSource(e){const r=new Array;return this._entries.forEach((i,a)=>r.push(e==="vertex"?`out ${i} ${a};`:`in ${i} ${a};`)),r}};class ut{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const r=e==="vertex"?ut.ALLOWLIST_VERTEX:ut.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(i=>r.includes(i)).map(i=>`#extension ${i} : enable`)}}ut.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],ut.ALLOWLIST_VERTEX=[];let Cr=class Or{constructor(){this._entries=new Map}add(e,r,i=0){const a=this._entries.get(i);a?k(a.name===e&&a.type===r,`Fragment shader output location ${i} occupied`):this._entries.set(i,{name:e,type:r})}generateSource(e){if(e==="vertex")return[];this._entries.size===0&&this._entries.set(0,{name:Or.DEFAULT_NAME,type:Or.DEFAULT_TYPE});const r=new Array;return this._entries.forEach((i,a)=>r.push(`layout(location = ${a}) out ${i.type} ${i.name};`)),r}};Cr.DEFAULT_TYPE="vec4",Cr.DEFAULT_NAME="fragColor";let Zo=class q{constructor(){this._entries=new Set}add(e,r,i){let a="ERROR_CONSTRUCTOR_STRING";switch(r){case"float":a=q._numberToFloatStr(i);break;case"int":a=q._numberToIntStr(i);break;case"bool":a=i.toString();break;case"vec2":a=`vec2(${q._numberToFloatStr(i[0])}, ${q._numberToFloatStr(i[1])})`;break;case"vec3":a=`vec3(${q._numberToFloatStr(i[0])}, ${q._numberToFloatStr(i[1])}, ${q._numberToFloatStr(i[2])})`;break;case"vec4":a=`vec4(${q._numberToFloatStr(i[0])}, ${q._numberToFloatStr(i[1])}, ${q._numberToFloatStr(i[2])}, ${q._numberToFloatStr(i[3])})`;break;case"ivec2":a=`ivec2(${q._numberToIntStr(i[0])}, ${q._numberToIntStr(i[1])})`;break;case"ivec3":a=`ivec3(${q._numberToIntStr(i[0])}, ${q._numberToIntStr(i[1])}, ${q._numberToIntStr(i[2])})`;break;case"ivec4":a=`ivec4(${q._numberToIntStr(i[0])}, ${q._numberToIntStr(i[1])}, ${q._numberToIntStr(i[2])}, ${q._numberToIntStr(i[3])})`;break;case"mat2":case"mat3":case"mat4":a=`${r}(${Array.prototype.map.call(i,o=>q._numberToFloatStr(o)).join(", ")})`}return this._entries.add(`const ${r} ${e} = ${a};`),this}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}};const bc=`#ifdef GL_FRAGMENT_PRECISION_HIGH + precision highp float; + precision highp sampler2D; +#else + precision mediump float; + precision mediump sampler2D; +#endif`,Sc=`precision highp float; +precision highp sampler2D;`,xr=4;function Ko(){const t=new ar,e=t.fragment;t.include(Xo);const r=(xr+1)/2,i=1/(2*r*r);return e.include(Wr),e.uniforms.add(new Q("depthMap",a=>a.depthTexture),new Tt("tex",a=>a.colorTexture),new pc("blurSize",a=>a.blurSize),new se("projScale",(a,o)=>{const n=Da(o.camera.eye,o.camera.center);return n>5e4?Math.max(0,a.projScale-(n-5e4)):a.projScale})),e.code.add(s` + void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) { + float c = texture(tex, uv).r; + float d = linearDepthFromTexture(depthMap, uv); + + float ddiff = d - center_d; + + float w = exp(-r * r * ${s.float(i)} - ddiff * ddiff * sharpness); + wTotal += w; + bTotal += w * c; + } + `),t.outputs.add("fragBlur","float"),e.code.add(s` + void main(void) { + float b = 0.0; + float w_total = 0.0; + + float center_d = linearDepthFromTexture(depthMap, uv); + + float sharpness = -0.05 * projScale / center_d; + for (int r = -${s.int(xr)}; r <= ${s.int(xr)}; ++r) { + float rf = float(r); + vec2 uvOffset = uv + rf * blurSize; + blurFunction(uvOffset, rf, center_d, sharpness, w_total, b); + } + + fragBlur = b / w_total; + } + `),t}const Ec=Object.freeze(Object.defineProperty({__proto__:null,build:Ko},Symbol.toStringTag,{value:"Module"}));let Qo=class ea extends Ur{initializeProgram(e){return new jr(e.rctx,ea.shader.get().build(),ir)}initializePipeline(){return zr({colorWrite:Br})}};Qo.shader=new or(Ec,()=>At(()=>Promise.resolve().then(()=>Td),void 0));const yc="eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM";let Ac=class extends Rt{constructor(){super(...arguments),this.projScale=1}},wc=class extends Ac{constructor(){super(...arguments),this.intensity=1}},Mc=class extends Rt{},Cc=class extends Mc{constructor(){super(...arguments),this.blurSize=er()}};function Oc(t){t.fragment.uniforms.add(new te("projInfo",(e,r)=>Rc(r.camera))),t.fragment.uniforms.add(new dt("zScale",(e,r)=>$c(r.camera))),t.fragment.code.add(s`vec3 reconstructPosition(vec2 fragCoord, float depth) { +return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth); +}`)}function Rc(t){const e=t.projectionMatrix;return e[11]===0?oe(yi,2/(t.fullWidth*e[0]),2/(t.fullHeight*e[5]),(1+e[12])/e[0],(1+e[13])/e[5]):oe(yi,-2/(t.fullWidth*e[0]),-2/(t.fullHeight*e[5]),(1-e[8])/e[0],(1-e[9])/e[5])}const yi=Ir();function $c(t){return t.projectionMatrix[11]===0?We(Ai,0,1):We(Ai,1,0)}const Ai=er(),wi=16;function ta(){const t=new ar,e=t.fragment;return t.include(Xo),t.include(Oc),e.include(Wr),e.uniforms.add(new se("radius",(r,i)=>nr(i.camera))).code.add(s`vec3 sphere[16] = vec3[16]( +vec3(0.186937, 0.0, 0.0), +vec3(0.700542, 0.0, 0.0), +vec3(-0.864858, -0.481795, -0.111713), +vec3(-0.624773, 0.102853, -0.730153), +vec3(-0.387172, 0.260319, 0.007229), +vec3(-0.222367, -0.642631, -0.707697), +vec3(-0.01336, -0.014956, 0.169662), +vec3(0.122575, 0.1544, -0.456944), +vec3(-0.177141, 0.85997, -0.42346), +vec3(-0.131631, 0.814545, 0.524355), +vec3(-0.779469, 0.007991, 0.624833), +vec3(0.308092, 0.209288,0.35969), +vec3(0.359331, -0.184533, -0.377458), +vec3(0.192633, -0.482999, -0.065284), +vec3(0.233538, 0.293706, -0.055139), +vec3(0.417709, -0.386701, 0.442449) +); +float fallOffFunction(float vv, float vn, float bias) { +float f = max(radius * radius - vv, 0.0); +return f * f * f * max(vn - bias, 0.0); +}`),e.code.add(s`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) { +vec3 v = Q - C; +float vv = dot(v, v); +float vn = dot(normalize(v), n_C); +return fallOffFunction(vv, vn, 0.1); +}`),e.uniforms.add(new Q("normalMap",r=>r.normalTexture),new Q("depthMap",r=>r.depthTexture),new se("projScale",r=>r.projScale),new Q("rnm",r=>r.noiseTexture),new dt("rnmScale",(r,i)=>We(Mi,i.camera.fullWidth/r.noiseTexture.descriptor.width,i.camera.fullHeight/r.noiseTexture.descriptor.height)),new se("intensity",r=>r.intensity),new dt("screenSize",(r,i)=>We(Mi,i.camera.fullWidth,i.camera.fullHeight))),t.outputs.add("fragOcclusion","float"),e.code.add(s` + void main(void) { + float depth = depthFromTexture(depthMap, uv); + + // Early out if depth is out of range, such as in the sky + if (depth >= 1.0 || depth <= 0.0) { + fragOcclusion = 1.0; + return; + } + + // get the normal of current fragment + vec4 norm4 = texture(normalMap, uv); + if(norm4.a != 1.0) { + fragOcclusion = 1.0; + return; + } + vec3 norm = vec3(-1.0) + 2.0 * norm4.xyz; + + float currentPixelDepth = linearizeDepth(depth); + vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth); + + float sum = 0.0; + vec3 tapPixelPos; + + vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0); + + // note: the factor 2.0 should not be necessary, but makes ssao much nicer. + // bug or deviation from CE somewhere else? + float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y); + + for(int i = 0; i < ${s.int(wi)}; ++i) { + vec2 unitOffset = reflect(sphere[i], fres).xy; + vec2 offset = vec2(-unitOffset * radius * ps); + + // don't use current or very nearby samples + if( abs(offset.x) < 2.0 || abs(offset.y) < 2.0){ + continue; + } + + vec2 tc = vec2(gl_FragCoord.xy + offset); + if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenSize.x || tc.y > screenSize.y) continue; + vec2 tcTap = tc / screenSize; + float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap); + + tapPixelPos = reconstructPosition(tc, occluderFragmentDepth); + + sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos); + } + + // output the result + float A = max(1.0 - sum * intensity / float(${s.int(wi)}), 0.0); + + // Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2 + A = (pow(A, 0.2) + 1.2 * A*A*A*A) / 2.2; + + fragOcclusion = A; + } + `),t}function nr(t){return Math.max(10,20*t.computeScreenPixelSizeAtDist(Math.abs(4*t.relativeElevation)))}const Mi=er(),Ic=Object.freeze(Object.defineProperty({__proto__:null,build:ta,getRadius:nr},Symbol.toStringTag,{value:"Module"}));let ra=class ia extends Ur{initializeProgram(e){return new jr(e.rctx,ia.shader.get().build(),ir)}initializePipeline(){return zr({colorWrite:Br})}};ra.shader=new or(Ic,()=>At(()=>Promise.resolve().then(()=>bd),void 0));const xt=2;let Xe=class extends uc{constructor(t){super(t),this.consumes={required:["normals"]},this.produces="ssao",this.isEnabled=()=>!1,this._enableTime=It(0),this._passParameters=new wc,this._drawParameters=new Cc}initialize(){const t=Uint8Array.from(atob(yc),r=>r.charCodeAt(0)),e=new qi;e.wrapMode=je.CLAMP_TO_EDGE,e.pixelFormat=ze.RGB,e.wrapMode=je.REPEAT,e.hasMipmap=!0,e.width=32,e.height=32,this._passParameters.noiseTexture=new st(this.renderingContext,e,t),this._ssaoTechnique=this.techniques.acquire(ra),this._blurTechnique=this.techniques.acquire(Qo),this.addHandles(zi(()=>this.isEnabled(),()=>this._enableTime=It(0)))}destroy(){this._passParameters.noiseTexture=Ut(this._passParameters.noiseTexture),this._blurTechnique.release(),this._ssaoTechnique.release()}render(t){const e=this.bindParameters,r=t.find(({name:L})=>L==="normals"),i=r==null?void 0:r.getTexture(),a=r==null?void 0:r.getTexture(gn),o=this.fboCache,n=e.camera,c=n.fullViewport[2],l=n.fullViewport[3],u=Math.round(c/xt),d=Math.round(l/xt);if(!this._ssaoTechnique.compiled||!this._blurTechnique.compiled)return this._enableTime=It(performance.now()),this.requestRender(),o.acquire(u,d,"ssao",at.RED);this._enableTime===0&&(this._enableTime=It(performance.now()));const h=this.renderingContext,p=this.view.qualitySettings.fadeDuration,v=n.relativeElevation,x=Li((Si-v)/(Si-hc),0,1),_=p>0?Math.min(p,performance.now()-this._enableTime)/p:1,g=_*x;this._passParameters.normalTexture=i,this._passParameters.depthTexture=a,this._passParameters.projScale=1/n.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*Pc/nr(n)**6*g;const $=o.acquire(c,l,"ssao input",at.RG);h.unbindTexture($.fbo.colorTexture),h.bindFramebuffer($.fbo),h.setViewport(0,0,c,l),h.bindTechnique(this._ssaoTechnique,e,this._passParameters,this._drawParameters),h.screen.draw();const C=o.acquire(u,d,"ssao blur",at.RED);h.unbindTexture(C.fbo.colorTexture),h.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=$.getTexture(),We(this._drawParameters.blurSize,0,xt/l),h.bindTechnique(this._blurTechnique,e,this._passParameters,this._drawParameters),h.setViewport(0,0,u,d),h.screen.draw(),$.release();const P=o.acquire(u,d,"ssao",at.RED);return h.unbindTexture(P.fbo.colorTexture),h.bindFramebuffer(P.fbo),h.setViewport(0,0,c,l),h.setClearColor(1,1,1,0),h.clear(xn.COLOR_BUFFER_BIT),this._drawParameters.colorTexture=C.getTexture(),We(this._drawParameters.blurSize,xt/c,0),h.bindTechnique(this._blurTechnique,e,this._passParameters,this._drawParameters),h.setViewport(0,0,u,d),h.screen.draw(),h.setViewport4fv(n.fullViewport),C.release(),_<1&&this.requestRender(ki.UPDATE),P}};m([V()],Xe.prototype,"consumes",void 0),m([V()],Xe.prototype,"produces",void 0),m([V({constructOnly:!0})],Xe.prototype,"techniques",void 0),m([V({constructOnly:!0})],Xe.prototype,"isEnabled",void 0),Xe=m([Nr("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Xe);const Pc=.5;function Hr(t,e){const r=t.fragment;e.receiveAmbientOcclusion?(r.uniforms.add(new Q("ssaoTex",(i,a)=>{var o;return(o=a.ssao)==null?void 0:o.getTexture()})),r.constants.add("blurSizePixelsInverse","float",1/xt),r.code.add(s`float evaluateAmbientOcclusionInverse() { +vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0)); +return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r; +} +float evaluateAmbientOcclusion() { +return 1.0 - evaluateAmbientOcclusionInverse(); +}`)):r.code.add(s`float evaluateAmbientOcclusionInverse() { return 1.0; } +float evaluateAmbientOcclusion() { return 0.0; }`)}function Nc(t,e){const r=t.fragment,i=e.lightingSphericalHarmonicsOrder!==void 0?e.lightingSphericalHarmonicsOrder:2;i===0?(r.uniforms.add(new Z("lightingAmbientSH0",(a,o)=>j(Ci,o.lighting.sh.r[0],o.lighting.sh.g[0],o.lighting.sh.b[0]))),r.code.add(s`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) { +vec3 ambientLight = 0.282095 * lightingAmbientSH0; +return ambientLight * (1.0 - ambientOcclusion); +}`)):i===1?(r.uniforms.add(new te("lightingAmbientSH_R",(a,o)=>oe(Se,o.lighting.sh.r[0],o.lighting.sh.r[1],o.lighting.sh.r[2],o.lighting.sh.r[3])),new te("lightingAmbientSH_G",(a,o)=>oe(Se,o.lighting.sh.g[0],o.lighting.sh.g[1],o.lighting.sh.g[2],o.lighting.sh.g[3])),new te("lightingAmbientSH_B",(a,o)=>oe(Se,o.lighting.sh.b[0],o.lighting.sh.b[1],o.lighting.sh.b[2],o.lighting.sh.b[3]))),r.code.add(s`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) { +vec4 sh0 = vec4( +0.282095, +0.488603 * normal.x, +0.488603 * normal.z, +0.488603 * normal.y +); +vec3 ambientLight = vec3( +dot(lightingAmbientSH_R, sh0), +dot(lightingAmbientSH_G, sh0), +dot(lightingAmbientSH_B, sh0) +); +return ambientLight * (1.0 - ambientOcclusion); +}`)):i===2&&(r.uniforms.add(new Z("lightingAmbientSH0",(a,o)=>j(Ci,o.lighting.sh.r[0],o.lighting.sh.g[0],o.lighting.sh.b[0])),new te("lightingAmbientSH_R1",(a,o)=>oe(Se,o.lighting.sh.r[1],o.lighting.sh.r[2],o.lighting.sh.r[3],o.lighting.sh.r[4])),new te("lightingAmbientSH_G1",(a,o)=>oe(Se,o.lighting.sh.g[1],o.lighting.sh.g[2],o.lighting.sh.g[3],o.lighting.sh.g[4])),new te("lightingAmbientSH_B1",(a,o)=>oe(Se,o.lighting.sh.b[1],o.lighting.sh.b[2],o.lighting.sh.b[3],o.lighting.sh.b[4])),new te("lightingAmbientSH_R2",(a,o)=>oe(Se,o.lighting.sh.r[5],o.lighting.sh.r[6],o.lighting.sh.r[7],o.lighting.sh.r[8])),new te("lightingAmbientSH_G2",(a,o)=>oe(Se,o.lighting.sh.g[5],o.lighting.sh.g[6],o.lighting.sh.g[7],o.lighting.sh.g[8])),new te("lightingAmbientSH_B2",(a,o)=>oe(Se,o.lighting.sh.b[5],o.lighting.sh.b[6],o.lighting.sh.b[7],o.lighting.sh.b[8]))),r.code.add(s`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) { +vec3 ambientLight = 0.282095 * lightingAmbientSH0; +vec4 sh1 = vec4( +0.488603 * normal.x, +0.488603 * normal.z, +0.488603 * normal.y, +1.092548 * normal.x * normal.y +); +vec4 sh2 = vec4( +1.092548 * normal.y * normal.z, +0.315392 * (3.0 * normal.z * normal.z - 1.0), +1.092548 * normal.x * normal.z, +0.546274 * (normal.x * normal.x - normal.y * normal.y) +); +ambientLight += vec3( +dot(lightingAmbientSH_R1, sh1), +dot(lightingAmbientSH_G1, sh1), +dot(lightingAmbientSH_B1, sh1) +); +ambientLight += vec3( +dot(lightingAmbientSH_R2, sh2), +dot(lightingAmbientSH_G2, sh2), +dot(lightingAmbientSH_B2, sh2) +); +return ambientLight * (1.0 - ambientOcclusion); +}`),e.pbrMode!==N.Normal&&e.pbrMode!==N.Schematic||r.code.add(s`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0); +vec3 calculateAmbientRadiance(float ambientOcclusion) +{ +vec3 ambientLight = 1.2 * (0.282095 * lightingAmbientSH0) - 0.2; +return ambientLight *= (1.0 - ambientOcclusion) * skyTransmittance; +}`))}const Ci=M(),Se=Ir();function kr(t){t.uniforms.add(new Z("mainLightDirection",(e,r)=>r.lighting.mainLight.direction))}function sr(t){t.uniforms.add(new Z("mainLightIntensity",(e,r)=>r.lighting.mainLight.intensity))}function Oi(t){kr(t.fragment),sr(t.fragment),t.fragment.code.add(s`vec3 evaluateMainLighting(vec3 normal_global, float shadowing) { +float dotVal = clamp(dot(normal_global, mainLightDirection), 0.0, 1.0); +return mainLightIntensity * ((1.0 - shadowing) * dotVal); +}`)}function Lc(t){const e=t.fragment.code;e.add(s`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) +{ +return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5; +}`),e.add(s`float integratedRadiance(float cosTheta2, float roughness) +{ +return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0); +}`),e.add(s`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness) +{ +float cosTheta2 = 1.0 - RdotNG * RdotNG; +float intRadTheta = integratedRadiance(cosTheta2, roughness); +float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta; +float sky = 2.0 - ground; +return (ground * ambientGround + sky * ambientSky) * 0.5; +}`)}function oa(t){t.vertex.code.add(s`const float PI = 3.141592653589793;`),t.fragment.code.add(s`const float PI = 3.141592653589793; +const float LIGHT_NORMALIZATION = 1.0 / PI; +const float INV_PI = 0.3183098861837907; +const float HALF_PI = 1.570796326794897;`)}function qr(t,e){const r=t.fragment.code;t.include(oa),e.pbrMode!==N.Normal&&e.pbrMode!==N.Schematic&&e.pbrMode!==N.Simplified&&e.pbrMode!==N.TerrainWithWater||(r.add(s`float normalDistribution(float NdotH, float roughness) +{ +float a = NdotH * roughness; +float b = roughness / (1.0 - NdotH * NdotH + a * a); +return b * b * INV_PI; +}`),r.add(s`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); +const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040); +const vec2 c2 = vec2(-1.04, 1.04); +vec2 prefilteredDFGAnalytical(float roughness, float NdotV) { +vec4 r = roughness * c0 + c1; +float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y; +return c2 * a004 + r.zw; +}`)),e.pbrMode!==N.Normal&&e.pbrMode!==N.Schematic||(t.include(Lc),r.add(s`struct PBRShadingInfo +{ +float NdotL; +float NdotV; +float NdotH; +float VdotH; +float LdotH; +float NdotNG; +float RdotNG; +float NdotAmbDir; +float NdotH_Horizon; +vec3 skyRadianceToSurface; +vec3 groundRadianceToSurface; +vec3 skyIrradianceToSurface; +vec3 groundIrradianceToSurface; +float averageAmbientRadiance; +float ssao; +vec3 albedoLinear; +vec3 f0; +vec3 f90; +vec3 diffuseColor; +float metalness; +float roughness; +};`),r.add(s`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) { +vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotNG); +vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotNG, inputs.roughness); +vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI; +vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV); +vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y; +vec3 specularComponent = specularColor * indirectSpecular; +return (diffuseComponent + specularComponent); +}`),r.add(s`float gamutMapChanel(float x, vec2 p){ +return (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) ); +}`),r.add(s`vec3 blackLevelSoftCompression(vec3 inColor, PBRShadingInfo inputs){ +vec3 outColor; +vec2 p = vec2(0.02 * (inputs.averageAmbientRadiance), 0.0075 * (inputs.averageAmbientRadiance)); +outColor.x = gamutMapChanel(inColor.x, p) ; +outColor.y = gamutMapChanel(inColor.y, p) ; +outColor.z = gamutMapChanel(inColor.z, p) ; +return outColor; +}`))}let Dc=class extends ee{constructor(e,r){super(e,"bool",D.Pass,(i,a,o)=>i.setUniform1b(e,r(a,o)))}};const Fc=.4;function Yr(t){t.constants.add("ambientBoostFactor","float",Fc)}function Xr(t){t.uniforms.add(new se("lightingGlobalFactor",(e,r)=>r.lighting.globalFactor))}function aa(t,e){const r=t.fragment;switch(t.include(Hr,e),e.pbrMode!==N.Disabled&&t.include(qr,e),t.include(Nc,e),t.include(oa),r.code.add(s` + const float GAMMA_SRGB = 2.1; + const float INV_GAMMA_SRGB = 0.4761904; + ${e.pbrMode===N.Disabled?"":"const vec3 GROUND_REFLECTANCE = vec3(0.2);"} + `),Yr(r),Xr(r),kr(r),r.code.add(s` + float additionalDirectedAmbientLight(vec3 vPosWorld) { + float vndl = dot(${e.spherical?s`normalize(vPosWorld)`:s`vec3(0.0, 0.0, 1.0)`}, mainLightDirection); + return smoothstep(0.0, 1.0, clamp(vndl * 2.5, 0.0, 1.0)); + } + `),sr(r),r.code.add(s`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) { +float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld); +return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity; +}`),e.pbrMode){case N.Disabled:case N.WaterOnIntegratedMesh:case N.Water:t.include(Oi),r.code.add(s`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight) +{ +vec3 mainLighting = evaluateMainLighting(normalWorld, shadow); +vec3 ambientLighting = calculateAmbientIrradiance(normalWorld, ssao); +vec3 albedoLinear = pow(albedo, vec3(GAMMA_SRGB)); +vec3 totalLight = mainLighting + ambientLighting + additionalLight; +totalLight = min(totalLight, vec3(PI)); +vec3 outColor = vec3((albedoLinear / PI) * totalLight); +return pow(outColor, vec3(INV_GAMMA_SRGB)); +}`);break;case N.Normal:case N.Schematic:r.code.add(s`const float fillLightIntensity = 0.25; +const float horizonLightDiffusion = 0.4; +const float additionalAmbientIrradianceFactor = 0.02; +vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDir, vec3 normalGround, vec3 mrr, vec3 _emission, float additionalAmbientIrradiance) +{ +vec3 viewDirection = -viewDir; +vec3 h = normalize(viewDirection + mainLightDirection); +PBRShadingInfo inputs; +inputs.NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0); +inputs.NdotV = clamp(abs(dot(normal, viewDirection)), 0.001, 1.0); +inputs.NdotH = clamp(dot(normal, h), 0.0, 1.0); +inputs.VdotH = clamp(dot(viewDirection, h), 0.0, 1.0); +inputs.NdotNG = clamp(dot(normal, normalGround), -1.0, 1.0); +vec3 reflectedView = normalize(reflect(viewDirection, normal)); +inputs.RdotNG = clamp(dot(reflectedView, normalGround), -1.0, 1.0); +inputs.albedoLinear = pow(albedo, vec3(GAMMA_SRGB)); +inputs.ssao = ssao; +inputs.metalness = mrr[0]; +inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);`),r.code.add(s`inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness; +inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0)); +inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);`),e.useFillLights?r.uniforms.add(new Dc("hasFillLights",(i,a)=>a.enableFillLights)):r.constants.add("hasFillLights","bool",!1),r.code.add(s`vec3 ambientDir = vec3(5.0 * normalGround[1] - normalGround[0] * normalGround[2], - 5.0 * normalGround[0] - normalGround[2] * normalGround[1], normalGround[1] * normalGround[1] + normalGround[0] * normalGround[0]); +ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0)); +inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0; +vec3 mainLightIrradianceComponent = inputs.NdotL * (1.0 - shadow) * mainLightIntensity; +vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity; +vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(normal, ssao) + additionalLight; +inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ; +inputs.groundIrradianceToSurface = GROUND_REFLECTANCE * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;`),r.uniforms.add(new se("lightingSpecularStrength",(i,a)=>a.lighting.mainLight.specularStrength),new se("lightingEnvironmentStrength",(i,a)=>a.lighting.mainLight.environmentStrength)),r.code.add(s`vec3 horizonRingDir = inputs.RdotNG * normalGround - reflectedView; +vec3 horizonRingH = normalize(viewDirection + horizonRingDir); +inputs.NdotH_Horizon = dot(normal, horizonRingH); +vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * mainLightIntensity * (1.0 - shadow); +vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * mainLightIntensity * fillLightIntensity; +vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance(ssao) + additionalLight; +float normalDirectionModifier = mix(1., min(mix(0.1, 2.0, (inputs.NdotNG + 1.) * 0.5), 1.0), clamp(inputs.roughness * 5.0, 0.0 , 1.0)); +inputs.skyRadianceToSurface = (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent; +inputs.groundRadianceToSurface = 0.5 * GROUND_REFLECTANCE * (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent; +inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE[1]);`),r.code.add(s` + vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs); + vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance; + vec3 emissionComponent = _emission == vec3(0.0) ? _emission : pow(_emission, vec3(GAMMA_SRGB)); + vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent + emissionComponent; + ${e.pbrMode!==N.Schematic||e.hasColorTexture?s`vec3 outColor = pow(blackLevelSoftCompression(outColorLinear, inputs), vec3(INV_GAMMA_SRGB));`:s`vec3 outColor = pow(max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`} + return outColor; + } + `);break;case N.Simplified:case N.TerrainWithWater:t.include(Oi),r.code.add(s`const float roughnessTerrain = 0.5; +const float specularityTerrain = 0.5; +const vec3 fresnelReflectionTerrain = vec3(0.04); +vec3 evaluatePBRSimplifiedLighting(vec3 n, vec3 c, float shadow, float ssao, vec3 al, vec3 vd, vec3 nup) { +vec3 viewDirection = -vd; +vec3 h = normalize(viewDirection + mainLightDirection); +float NdotL = clamp(dot(n, mainLightDirection), 0.001, 1.0); +float NdotV = clamp(abs(dot(n, viewDirection)), 0.001, 1.0); +float NdotH = clamp(dot(n, h), 0.0, 1.0); +float NdotNG = clamp(dot(n, nup), -1.0, 1.0); +vec3 albedoLinear = pow(c, vec3(GAMMA_SRGB)); +float lightness = 0.3 * albedoLinear[0] + 0.5 * albedoLinear[1] + 0.2 * albedoLinear[2]; +vec3 f0 = (0.85 * lightness + 0.15) * fresnelReflectionTerrain; +vec3 f90 = vec3(clamp(dot(f0, vec3(50.0 * 0.33)), 0.0, 1.0)); +vec3 mainLightIrradianceComponent = (1. - shadow) * NdotL * mainLightIntensity; +vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(n, ssao) + al; +vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent; +vec3 indirectDiffuse = ((1.0 - NdotNG) * mainLightIrradianceComponent + (1.0 + NdotNG ) * ambientSky) * 0.5; +vec3 outDiffColor = albedoLinear * (1.0 - f0) * indirectDiffuse / PI; +vec3 mainLightRadianceComponent = normalDistribution(NdotH, roughnessTerrain) * mainLightIntensity; +vec2 dfg = prefilteredDFGAnalytical(roughnessTerrain, NdotV); +vec3 specularColor = f0 * dfg.x + f90 * dfg.y; +vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceComponent; +vec3 outColorLinear = outDiffColor + specularComponent; +vec3 outColor = pow(outColorLinear, vec3(INV_GAMMA_SRGB)); +return outColor; +}`);break;default:Mt(e.pbrMode);case N.COUNT:}}function na(t,e){if(!e.multipassEnabled)return;t.fragment.include(Wr),t.fragment.uniforms.add(new Q("terrainDepthTexture",(i,a)=>{var o;return(o=a.multipassTerrain.depth)==null?void 0:o.attachment}));const r=e.occlusionPass;t.fragment.code.add(s` + ${r?"bool":"void"} terrainDepthTest(float fragmentDepth) { + float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r; + float linearDepth = linearizeDepth(depth); + ${r?s`return fragmentDepth < linearDepth && depth < 1.0;`:s` + if(fragmentDepth ${e.cullAboveGround?">":"<="} linearDepth){ + discard; + }`} + }`)}class Bc extends ee{constructor(e,r,i){super(e,"mat4",D.Draw,(a,o,n,c)=>a.setUniformMatrix4fv(e,r(o,n,c)),i)}}let zc=class extends ee{constructor(e,r,i){super(e,"mat4",D.Pass,(a,o,n)=>a.setUniformMatrix4fv(e,r(o,n)),i)}};function sa(t,e){e.receiveShadows&&(t.fragment.uniforms.add(new zc("shadowMapMatrix",(r,i)=>i.shadowMap.getShadowMapMatrices(r.origin),4)),ca(t))}function la(t,e){e.receiveShadows&&(t.fragment.uniforms.add(new Bc("shadowMapMatrix",(r,i)=>i.shadowMap.getShadowMapMatrices(r.origin),4)),ca(t))}function ca(t){const e=t.fragment;e.include(qo),e.uniforms.add(new Q("shadowMap",(r,i)=>i.shadowMap.depthTexture),new jo("numCascades",(r,i)=>i.shadowMap.numCascades),new te("cascadeDistances",(r,i)=>i.shadowMap.cascadeDistances)),e.code.add(s`int chooseCascade(float depth, out mat4 mat) { +vec4 distance = cascadeDistances; +int i = depth < distance[1] ? 0 : depth < distance[2] ? 1 : depth < distance[3] ? 2 : 3; +mat = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3]; +return i; +} +vec3 lightSpacePosition(vec3 _vpos, mat4 mat) { +vec4 lv = mat * vec4(_vpos, 1.0); +lv.xy /= lv.w; +return 0.5 * lv.xyz + vec3(0.5); +} +vec2 cascadeCoordinates(int i, ivec2 textureSize, vec3 lvpos) { +float xScale = float(textureSize.y) / float(textureSize.x); +return vec2((float(i) + lvpos.x) * xScale, lvpos.y); +} +float readShadowMapDepth(ivec2 uv, sampler2D _depthTex) { +return rgba4ToFloat(texelFetch(_depthTex, uv, 0)); +} +float posIsInShadow(ivec2 uv, vec3 lvpos, sampler2D _depthTex) { +return readShadowMapDepth(uv, _depthTex) < lvpos.z ? 1.0 : 0.0; +} +float filterShadow(vec2 uv, vec3 lvpos, ivec2 texSize, sampler2D _depthTex) { +vec2 st = fract(uv * vec2(texSize) + vec2(0.5)); +ivec2 base = ivec2(uv * vec2(texSize) - vec2(0.5)); +float s00 = posIsInShadow(ivec2(base.x, base.y), lvpos, _depthTex); +float s10 = posIsInShadow(ivec2(base.x + 1, base.y), lvpos, _depthTex); +float s11 = posIsInShadow(ivec2(base.x + 1, base.y + 1), lvpos, _depthTex); +float s01 = posIsInShadow(ivec2(base.x, base.y + 1), lvpos, _depthTex); +return mix(mix(s00, s10, st.x), mix(s01, s11, st.x), st.y); +} +float readShadowMap(const in vec3 _vpos, float _linearDepth) { +mat4 mat; +int i = chooseCascade(_linearDepth, mat); +if (i >= numCascades) { return 0.0; } +vec3 lvpos = lightSpacePosition(_vpos, mat); +if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) { return 0.0; } +ivec2 size = textureSize(shadowMap, 0); +vec2 uv = cascadeCoordinates(i, size, lvpos); +return filterShadow(uv, lvpos, size, shadowMap); +}`)}function Vc(t,e){e.hasColorTextureTransform?(t.vertex.uniforms.add(new xe("colorTextureTransformMatrix",r=>r.colorTextureTransformMatrix??ht)),t.varyings.add("colorUV","vec2"),t.vertex.code.add(s`void forwardColorUV(){ +colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy; +}`)):t.vertex.code.add(s`void forwardColorUV(){}`)}function Gc(t,e){e.hasNormalTextureTransform&&e.textureCoordinateType!==Y.None?(t.vertex.uniforms.add(new xe("normalTextureTransformMatrix",r=>r.normalTextureTransformMatrix??ht)),t.varyings.add("normalUV","vec2"),t.vertex.code.add(s`void forwardNormalUV(){ +normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy; +}`)):t.vertex.code.add(s`void forwardNormalUV(){}`)}function Uc(t,e){e.hasEmissionTextureTransform&&e.textureCoordinateType!==Y.None?(t.vertex.uniforms.add(new xe("emissiveTextureTransformMatrix",r=>r.emissiveTextureTransformMatrix??ht)),t.varyings.add("emissiveUV","vec2"),t.vertex.code.add(s`void forwardEmissiveUV(){ +emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy; +}`)):t.vertex.code.add(s`void forwardEmissiveUV(){}`)}function jc(t,e){e.hasOcclusionTextureTransform&&e.textureCoordinateType!==Y.None?(t.vertex.uniforms.add(new xe("occlusionTextureTransformMatrix",r=>r.occlusionTextureTransformMatrix??ht)),t.varyings.add("occlusionUV","vec2"),t.vertex.code.add(s`void forwardOcclusionUV(){ +occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy; +}`)):t.vertex.code.add(s`void forwardOcclusionUV(){}`)}function Wc(t,e){e.hasMetallicRoughnessTextureTransform&&e.textureCoordinateType!==Y.None?(t.vertex.uniforms.add(new xe("metallicRoughnessTextureTransformMatrix",r=>r.metallicRoughnessTextureTransformMatrix??ht)),t.varyings.add("metallicRoughnessUV","vec2"),t.vertex.code.add(s`void forwardMetallicRoughnessUV(){ +metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy; +}`)):t.vertex.code.add(s`void forwardMetallicRoughnessUV(){}`)}function Hc(t){t.code.add(s`vec4 premultiplyAlpha(vec4 v) { +return vec4(v.rgb * v.a, v.a); +} +vec3 rgb2hsv(vec3 c) { +vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); +vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy); +vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx); +float d = q.x - min(q.w, q.y); +float e = 1.0e-10; +return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x); +} +vec3 hsv2rgb(vec3 c) { +vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); +vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); +return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} +float rgb2v(vec3 c) { +return max(c.x, max(c.y, c.z)); +}`)}function da(t){t.include(Hc),t.code.add(s` + vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) { + // workaround for artifacts in OSX using Intel Iris Pro + // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475 + vec3 internalMixed = internalColor * textureColor; + vec3 allMixed = internalMixed * externalColor; + + if (mode == ${s.int(ye.Multiply)}) { + return allMixed; + } + if (mode == ${s.int(ye.Ignore)}) { + return internalMixed; + } + if (mode == ${s.int(ye.Replace)}) { + return externalColor; + } + + // tint (or something invalid) + float vIn = rgb2v(internalMixed); + vec3 hsvTint = rgb2hsv(externalColor); + vec3 hsvOut = vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z); + return hsv2rgb(hsvOut); + } + + float mixExternalOpacity(float internalOpacity, float textureOpacity, float externalOpacity, int mode) { + // workaround for artifacts in OSX using Intel Iris Pro + // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475 + float internalMixed = internalOpacity * textureOpacity; + float allMixed = internalMixed * externalOpacity; + + if (mode == ${s.int(ye.Ignore)}) { + return internalMixed; + } + if (mode == ${s.int(ye.Replace)}) { + return externalOpacity; + } + + // multiply or tint (or something invalid) + return allMixed; + } + `)}function ua(t){const e=new ar,{vertex:r,fragment:i,varyings:a}=e;if(it(r,t),e.include(Vr),a.add("vpos","vec3"),e.include(Et,t),e.include(Uo,t),e.include(ko,t),e.include(Vc,t),t.output===B.Color){e.include(Gc,t),e.include(Uc,t),e.include(jc,t),e.include(Wc,t),yt(r,t),e.include(rr,t),e.include(rt,t);const o=t.normalType===K.Attribute||t.normalType===K.Compressed;o&&t.offsetBackfaces&&e.include(Fo),e.include(dc,t),e.include(Io,t),t.instancedColor&&e.attributes.add(f.INSTANCECOLOR,"vec4"),a.add("vPositionLocal","vec3"),e.include(Ge,t),e.include(Do,t),e.include(Wo,t),e.include(Ho,t),r.uniforms.add(new te("externalColor",n=>n.externalColor)),a.add("vcolorExt","vec4"),t.multipassEnabled&&a.add("depth","float"),r.code.add(s` + void main(void) { + forwardNormalizedVertexColor(); + vcolorExt = externalColor; + ${t.instancedColor?"vcolorExt *= instanceColor * 0.003921568627451;":""} + vcolorExt *= vvColor(); + vcolorExt *= getSymbolColor(); + forwardColorMixMode(); + + if (vcolorExt.a < ${s.float(Gr)}) { + gl_Position = vec4(1e38, 1e38, 1e38, 1.0); + } else { + vpos = getVertexInLocalOriginSpace(); + vPositionLocal = vpos - view[3].xyz; + vpos = subtractOrigin(vpos); + ${o?s`vNormalWorld = dpNormal(vvLocalNormal(normalModel()));`:""} + vpos = addVerticalOffset(vpos, localOrigin); + ${t.hasVertexTangents?"vTangent = dpTransformVertexTangent(tangent);":""} + gl_Position = transformPosition(proj, view, vpos); + ${o&&t.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""} + } + + ${t.multipassEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""} + forwardLinearDepth(); + forwardTextureCoordinates(); + forwardColorUV(); + forwardNormalUV(); + forwardEmissiveUV(); + forwardOcclusionUV(); + forwardMetallicRoughnessUV(); + } + `),e.include(tt,t),e.include(aa,t),e.include(Hr,t),e.include(ot,t),e.include(t.instancedDoublePrecision?sa:la,t),e.include(na,t),yt(i,t),i.uniforms.add(r.uniforms.get("localOrigin"),new Z("ambient",n=>n.ambient),new Z("diffuse",n=>n.diffuse),new se("opacity",n=>n.opacity),new se("layerOpacity",n=>n.layerOpacity)),t.hasColorTexture&&i.uniforms.add(new Q("tex",n=>n.texture)),e.include(po,t),e.include(qr,t),i.include(da),e.include(us,t),Yr(i),Xr(i),sr(i),t.transparencyPassType===ie.ColorAlpha&&(e.outputs.add("fragColor","vec4",0),e.outputs.add("fragAlpha","float",1)),i.code.add(s` + void main() { + discardBySlice(vpos); + ${t.multipassEnabled?"terrainDepthTest(depth);":""} + ${t.hasColorTexture?s` + vec4 texColor = texture(tex, ${t.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + ${t.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""} + discardOrAdjustAlpha(texColor);`:s`vec4 texColor = vec4(1.0);`} + shadingParams.viewDirection = normalize(vpos - cameraPosition); + ${t.normalType===K.ScreenDerivative?s` + vec3 normal = screenDerivativeNormal(vPositionLocal);`:s` + shadingParams.normalView = vNormalWorld; + vec3 normal = shadingNormal(shadingParams);`} + ${t.pbrMode===N.Normal?"applyPBRFactors();":""} + float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion(); + + vec3 posWorld = vpos + localOrigin; + + float additionalAmbientScale = additionalDirectedAmbientLight(posWorld); + float shadow = ${t.receiveShadows?"readShadowMap(vpos, linearDepth)":t.spherical?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"}; + + vec3 matColor = max(ambient, diffuse); + ${t.hasVertexColors?s` + vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode)); + float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:s` + vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode)); + float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`} + ${t.hasNormalTexture?s` + mat3 tangentSpace = ${t.hasVertexTangents?"computeTangentSpace(normal);":"computeTangentSpace(normal, vpos, vuv0);"} + vec3 shadingNormal = computeTextureNormal(tangentSpace, ${t.hasNormalTextureTransform?s`normalUV`:"vuv0"});`:s`vec3 shadingNormal = normal;`} + vec3 normalGround = ${t.spherical?s`normalize(posWorld);`:s`vec3(0.0, 0.0, 1.0);`} + + ${t.snowCover?s` + float snow = smoothstep(0.5, 0.55, dot(normal, normalGround)); + albedo = mix(albedo, vec3(1), snow); + shadingNormal = mix(shadingNormal, normal, snow); + ssao = mix(ssao, 1.0, snow);`:""} + + vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor; + + ${t.pbrMode===N.Normal||t.pbrMode===N.Schematic?s` + float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2]; + ${t.snowCover?s` + mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow); + emission = mix(emission, vec3(0.0), snow);`:""} + + vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:s`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`} + fragColor = highlightSlice(vec4(shadedColor, opacity_), vpos); + ${t.transparencyPassType===ie.ColorAlpha?s` + fragColor = premultiplyAlpha(fragColor); + fragAlpha = fragColor.a;`:""} + } + `)}return e.include(Yo,t),e}const kc=Object.freeze(Object.defineProperty({__proto__:null,build:ua},Symbol.toStringTag,{value:"Module"}));let qc=class extends Nl{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Er(Po),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=ve.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=Ue(0,0,0),this.instancedDoublePrecision=!1,this.normalType=K.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=Ue(.2,.2,.2),this.diffuse=Ue(.8,.8,.8),this.externalColor=Pr(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=M(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=Ot.Less,this.textureAlphaMode=J.Blend,this.textureAlphaCutoff=Ll,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=wr.Occlude,this.isDecoration=!1}},Jr=class ha extends Ur{initializeConfiguration(e,r){r.spherical=e.viewingMode===kt.Global,r.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,r.textureCoordinateType=r.hasColorTexture||r.hasMetallicRoughnessTexture||r.hasEmissionTexture||r.hasOcclusionTexture||r.hasNormalTexture?Y.Default:Y.None,r.objectAndLayerIdColorInstanced=r.instanced}initializeProgram(e){return this._initializeProgram(e,ha.shader)}_initializeProgram(e,r){return new jr(e.rctx,r.get().build(this.configuration),ir)}_makePipeline(e,r){const i=this.configuration,a=e===ie.NONE,o=e===ie.FrontFace;return zr({blending:i.output===B.Color&&i.transparent?a?Xs:Zs(e):null,culling:Xc(i)?Ms(i.cullFace):null,depthTest:{func:tl(e,Yc(i.customDepthTest))},depthWrite:(a||o)&&i.writeDepth?Cs:null,drawBuffers:i.output===B.Depth?{buffers:[_n.NONE]}:rl(e),colorWrite:Br,stencilWrite:i.hasOccludees?Dl:null,stencilTest:i.hasOccludees?r?Bl:Fl:null,polygonOffset:a||o?null:el(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};function Yc(t){return t===Ot.Lequal?ge.LEQUAL:ge.LESS}function Xc(t){return t.cullFace!==ve.None||!t.hasSlicePlane&&!t.transparent&&!t.doubleSidedMode}Jr.shader=new or(kc,()=>At(()=>Promise.resolve().then(()=>Sd),void 0));let Gt=class extends Mr{};m([T({constValue:!0})],Gt.prototype,"hasSliceHighlight",void 0),m([T({constValue:!1})],Gt.prototype,"hasSliceInVertexProgram",void 0),m([T({constValue:D.Pass})],Gt.prototype,"pbrTextureBindType",void 0);class y extends Gt{constructor(){super(...arguments),this.output=B.Color,this.alphaDiscardMode=J.Opaque,this.doubleSidedMode=re.None,this.pbrMode=N.Disabled,this.cullFace=ve.None,this.transparencyPassType=ie.NONE,this.normalType=K.Attribute,this.textureCoordinateType=Y.None,this.customDepthTest=Ot.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}m([T({count:B.COUNT})],y.prototype,"output",void 0),m([T({count:J.COUNT})],y.prototype,"alphaDiscardMode",void 0),m([T({count:re.COUNT})],y.prototype,"doubleSidedMode",void 0),m([T({count:N.COUNT})],y.prototype,"pbrMode",void 0),m([T({count:ve.COUNT})],y.prototype,"cullFace",void 0),m([T({count:ie.COUNT})],y.prototype,"transparencyPassType",void 0),m([T({count:K.COUNT})],y.prototype,"normalType",void 0),m([T({count:Y.COUNT})],y.prototype,"textureCoordinateType",void 0),m([T({count:Ot.COUNT})],y.prototype,"customDepthTest",void 0),m([T()],y.prototype,"spherical",void 0),m([T()],y.prototype,"hasVertexColors",void 0),m([T()],y.prototype,"hasSymbolColors",void 0),m([T()],y.prototype,"hasVerticalOffset",void 0),m([T()],y.prototype,"hasSlicePlane",void 0),m([T()],y.prototype,"hasSliceHighlight",void 0),m([T()],y.prototype,"hasColorTexture",void 0),m([T()],y.prototype,"hasMetallicRoughnessTexture",void 0),m([T()],y.prototype,"hasEmissionTexture",void 0),m([T()],y.prototype,"hasOcclusionTexture",void 0),m([T()],y.prototype,"hasNormalTexture",void 0),m([T()],y.prototype,"hasScreenSizePerspective",void 0),m([T()],y.prototype,"hasVertexTangents",void 0),m([T()],y.prototype,"hasOccludees",void 0),m([T()],y.prototype,"multipassEnabled",void 0),m([T()],y.prototype,"hasModelTransformation",void 0),m([T()],y.prototype,"offsetBackfaces",void 0),m([T()],y.prototype,"vvSize",void 0),m([T()],y.prototype,"vvColor",void 0),m([T()],y.prototype,"receiveShadows",void 0),m([T()],y.prototype,"receiveAmbientOcclusion",void 0),m([T()],y.prototype,"textureAlphaPremultiplied",void 0),m([T()],y.prototype,"instanced",void 0),m([T()],y.prototype,"instancedColor",void 0),m([T()],y.prototype,"objectAndLayerIdColorInstanced",void 0),m([T()],y.prototype,"instancedDoublePrecision",void 0),m([T()],y.prototype,"doublePrecisionRequiresObfuscation",void 0),m([T()],y.prototype,"writeDepth",void 0),m([T()],y.prototype,"transparent",void 0),m([T()],y.prototype,"enableOffset",void 0),m([T()],y.prototype,"cullAboveGround",void 0),m([T()],y.prototype,"snowCover",void 0),m([T()],y.prototype,"hasColorTextureTransform",void 0),m([T()],y.prototype,"hasEmissionTextureTransform",void 0),m([T()],y.prototype,"hasNormalTextureTransform",void 0),m([T()],y.prototype,"hasOcclusionTextureTransform",void 0),m([T()],y.prototype,"hasMetallicRoughnessTextureTransform",void 0),m([T({constValue:!1})],y.prototype,"occlusionPass",void 0),m([T({constValue:!0})],y.prototype,"hasVvInstancing",void 0),m([T({constValue:!1})],y.prototype,"useCustomDTRExponentForWater",void 0),m([T({constValue:!1})],y.prototype,"supportsTextureAtlas",void 0),m([T({constValue:!0})],y.prototype,"useFillLights",void 0);function ma(t){const e=new ar,{vertex:r,fragment:i,varyings:a}=e;return it(r,t),e.include(Vr),a.add("vpos","vec3"),e.include(Et,t),e.include(Uo,t),e.include(ko,t),t.output===B.Color&&(yt(e.vertex,t),e.include(rr,t),e.include(rt,t),t.offsetBackfaces&&e.include(Fo),t.instancedColor&&e.attributes.add(f.INSTANCECOLOR,"vec4"),a.add("vNormalWorld","vec3"),a.add("localvpos","vec3"),t.multipassEnabled&&a.add("depth","float"),e.include(Ge,t),e.include(Do,t),e.include(Wo,t),e.include(Ho,t),r.uniforms.add(new te("externalColor",o=>o.externalColor)),a.add("vcolorExt","vec4"),r.code.add(s` + void main(void) { + forwardNormalizedVertexColor(); + vcolorExt = externalColor; + ${t.instancedColor?"vcolorExt *= instanceColor * 0.003921568627451;":""} + vcolorExt *= vvColor(); + vcolorExt *= getSymbolColor(); + forwardColorMixMode(); + + if (vcolorExt.a < ${s.float(Gr)}) { + gl_Position = vec4(1e38, 1e38, 1e38, 1.0); + } else { + vpos = getVertexInLocalOriginSpace(); + localvpos = vpos - view[3].xyz; + vpos = subtractOrigin(vpos); + vNormalWorld = dpNormal(vvLocalNormal(normalModel())); + vpos = addVerticalOffset(vpos, localOrigin); + gl_Position = transformPosition(proj, view, vpos); + ${t.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""} + } + ${t.multipassEnabled?s`depth = (view * vec4(vpos, 1.0)).z;`:""} + forwardLinearDepth(); + forwardTextureCoordinates(); + } + `)),t.output===B.Color&&(e.include(tt,t),e.include(aa,t),e.include(Hr,t),e.include(ot,t),e.include(t.instancedDoublePrecision?sa:la,t),e.include(na,t),yt(e.fragment,t),kr(i),Yr(i),Xr(i),i.uniforms.add(r.uniforms.get("localOrigin"),r.uniforms.get("view"),new Z("ambient",o=>o.ambient),new Z("diffuse",o=>o.diffuse),new se("opacity",o=>o.opacity),new se("layerOpacity",o=>o.layerOpacity)),t.hasColorTexture&&i.uniforms.add(new Q("tex",o=>o.texture)),e.include(po,t),e.include(qr,t),i.include(da),t.transparencyPassType===ie.ColorAlpha&&(e.outputs.add("fragColor","vec4",0),e.outputs.add("fragAlpha","float",1)),sr(i),i.code.add(s` + void main() { + discardBySlice(vpos); + ${t.multipassEnabled?s`terrainDepthTest(depth);`:""} + ${t.hasColorTexture?s` + vec4 texColor = texture(tex, ${t.hasColorTextureTransform?s`colorUV`:s`vuv0`}); + ${t.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""} + discardOrAdjustAlpha(texColor);`:s`vec4 texColor = vec4(1.0);`} + vec3 viewDirection = normalize(vpos - cameraPosition); + ${t.pbrMode===N.Normal?"applyPBRFactors();":""} + float ssao = evaluateAmbientOcclusionInverse(); + ssao *= getBakedOcclusion(); + + float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin); + vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor; + ${t.receiveShadows?"float shadow = readShadowMap(vpos, linearDepth);":t.spherical?"float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);":"float shadow = 0.0;"} + vec3 matColor = max(ambient, diffuse); + ${t.hasVertexColors?s` + vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode)); + float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:s` + vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode)); + float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`} + ${t.snowCover?s`albedo = mix(albedo, vec3(1), 0.9);`:s``} + ${s` + vec3 shadingNormal = normalize(vNormalWorld); + albedo *= 1.2; + vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]); + float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0); + float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0); + float treeRadialFalloff = vColor.r; + float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow); + additionalLight += backLightFactor * mainLightIntensity;`} + ${t.pbrMode===N.Normal||t.pbrMode===N.Schematic?t.spherical?s`vec3 normalGround = normalize(vpos + localOrigin);`:s`vec3 normalGround = vec3(0.0, 0.0, 1.0);`:s``} + ${t.pbrMode===N.Normal||t.pbrMode===N.Schematic?s` + float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2]; + ${t.snowCover?s` + mrr = vec3(0.0, 1.0, 0.04); + emission = vec3(0.0);`:""} + + vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:s`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`} + fragColor = highlightSlice(vec4(shadedColor, opacity_), vpos); + ${t.transparencyPassType===ie.ColorAlpha?s` + fragColor = premultiplyAlpha(fragColor); + fragAlpha = fragColor.a;`:""} + } + `)),e.include(Yo,t),e}const Jc=Object.freeze(Object.defineProperty({__proto__:null,build:ma},Symbol.toStringTag,{value:"Module"}));class lr extends Jr{initializeConfiguration(e,r){super.initializeConfiguration(e,r),r.hasMetallicRoughnessTexture=!1,r.hasEmissionTexture=!1,r.hasOcclusionTexture=!1,r.hasNormalTexture=!1,r.hasModelTransformation=!1,r.normalType=K.Attribute,r.doubleSidedMode=re.WindingOrder,r.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,lr.shader)}}lr.shader=new or(Jc,()=>At(()=>Promise.resolve().then(()=>Ed),void 0));let Jt=class extends ys{constructor(e){super(e,Qc),this.supportsEdges=!0,this.produces=new Map([[St.OPAQUE_MATERIAL,r=>(mr(r)||fr(r))&&!this.parameters.transparent],[St.TRANSPARENT_MATERIAL,r=>(mr(r)||fr(r))&&this.parameters.transparent&&this.parameters.writeDepth],[St.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,r=>(mr(r)||fr(r))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new y,this._vertexBufferLayout=ed(this.parameters)}isVisibleForOutput(e){return e!==B.Shadow&&e!==B.ShadowExcludeHighlight&&e!==B.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||e.layerOpacity===0)return!1;const{hasInstancedColor:r,hasVertexColors:i,hasSymbolColors:a,vvColor:o}=e,n=e.colorMixMode==="replace",c=e.opacity>0,l=e.externalColor&&e.externalColor[3]>0,u=r||o||a;return i&&u?n||c:i?n?l:c:u?n||c:n?l:c}getConfiguration(e,r){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=this.parameters.verticalOffset!=null,this._configuration.hasScreenSizePerspective=this.parameters.screenSizePerspective!=null,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this.parameters.customDepthTest!=null&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?ve.None:this.parameters.cullFace,this._configuration.multipassEnabled=r.multipassEnabled,this._configuration.cullAboveGround=r.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=this.parameters.modelTransformation!=null,e===B.Color&&(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=re.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&this.parameters.doubleSidedType==="normal"?re.View:this.parameters.doubleSided&&this.parameters.doubleSidedType==="winding-order"?re.WindingOrder:re.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&r.ssao!=null,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?N.Schematic:N.Normal:N.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=r.transparencyPassType,this._configuration.enableOffset=r.camera.relativeElevation$r.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");async function ad(t,e){const r=await nd(t,e),i=await ud(r.textureDefinitions??{},e);let a=0;for(const o in i)if(i.hasOwnProperty(o)){const n=i[o];a+=n!=null&&n.image?n.image.width*n.image.height*4:0}return{resource:r,textures:i,size:a+Va(r)}}async function nd(t,e){const r=e==null?void 0:e.streamDataRequester;if(r)return sd(t,r,e);const i=await Vi(Ii(t,e));if(i.ok===!0)return i.value.data;Gi(i.error),fa(i.error)}async function sd(t,e,r){const i=await Vi(e.request(t,"json",r));if(i.ok===!0)return i.value;Gi(i.error),fa(i.error.details.url)}function fa(t){throw new wt("",`Request for object resource failed: ${t}`)}function ld(t){const e=t.params,r=e.topology;let i=!0;switch(e.vertexAttributes||(Ee().warn("Geometry must specify vertex attributes"),i=!1),e.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const o=e.faces;if(o){if(e.vertexAttributes)for(const n in e.vertexAttributes){const c=o[n];c!=null&&c.values?(c.valueType!=null&&c.valueType!=="UInt32"&&(Ee().warn(`Unsupported indexed geometry indices type '${c.valueType}', only UInt32 is currently supported`),i=!1),c.valuesPerElement!=null&&c.valuesPerElement!==1&&(Ee().warn(`Unsupported indexed geometry values per element '${c.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ee().warn(`Indexed geometry does not specify face indices for '${n}' attribute`),i=!1)}}else Ee().warn("Indexed geometries must specify faces"),i=!1;break}default:Ee().warn(`Unsupported topology '${r}'`),i=!1}t.params.material||(Ee().warn("Geometry requires material"),i=!1);const a=t.params.vertexAttributes;for(const o in a)a[o].values||(Ee().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function cd(t,e){var x,_;const r=new Array,i=new Array,a=new Array,o=new yn,n=t.resource,c=Ui.parse(n.version||"1.0","wosr");md.validate(c);const l=n.model.name,u=n.model.geometries,d=n.materialDefinitions??{},h=t.textures;let p=0;const v=new Map;for(let g=0;g{if($.params.topology==="PerAttributeArray")return null;const F=$.params.faces;for(const W in F)if(W===I)return F[W].values;return null},z=P[f.POSITION],w=z.values.length/z.valuesPerElement;for(const I in P){const F=P[I],W=F.values,le=G(I)??Yi(w);L.push([I,new Ze(W,le,F.valuesPerElement,!0)])}const b=C.texture,A=h&&h[b];if(A&&!v.has(b)){const{image:I,parameters:F}=A,W=new ho(I,F);i.push(W),v.set(b,W)}const R=v.get(b),S=R?R.id:void 0,E=C.material;let O=o.get(E,b);if(O==null){const I=d[E.substring(E.lastIndexOf("/")+1)].params;I.transparency===1&&(I.transparency=0);const F=A&&A.alphaChannelUsage,W=I.transparency>0||F==="transparency"||F==="maskAndTransparency",le=A?pa(A.alphaChannelUsage):void 0,he={ambient:Er(I.diffuse),diffuse:Er(I.diffuse),opacity:1-(I.transparency||0),transparent:W,textureAlphaMode:le,textureAlphaCutoff:.33,textureId:S,initTextureTransparent:!0,doubleSided:!0,cullFace:ve.None,colorMixMode:I.externalColorMixMode||"tint",textureAlphaPremultiplied:(A==null?void 0:A.parameters.preMultiplyAlpha)??!1};e!=null&&e.materialParameters&&Object.assign(he,e.materialParameters),O=new Jt(he),o.set(E,b,O)}a.push(O);const U=new io(O,L);p+=((_=(x=L.find(I=>I[0]===f.POSITION))==null?void 0:x[1])==null?void 0:_.indices.length)??0,r.push(U)}return{engineResources:[{name:l,stageResources:{textures:i,materials:a,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:p,lodThreshold:null}],referenceBoundingBox:dd(r)}}function dd(t){const e=ji();return t.forEach(r=>{const i=r.boundingInfo;i!=null&&(jt(e,i.bbMin),jt(e,i.bbMax))}),e}async function ud(t,e){const r=new Array;for(const o in t){const n=t[o],c=n.images[0].data;if(!c){Ee().warn("Externally referenced texture data is not yet supported");continue}const l=n.encoding+";base64,"+c,u="/textureDefinitions/"+o,d=n.channels==="rgba"?n.alphaChannelUsage||"transparency":"none",h={noUnpackFlip:!0,wrap:{s:je.REPEAT,t:je.REPEAT},preMultiplyAlpha:pa(d)!==J.Opaque},p=e!=null&&e.disableTextures?Promise.resolve(null):to(l,e);r.push(p.then(v=>({refId:u,image:v,parameters:h,alphaChannelUsage:d})))}const i=await Promise.all(r),a={};for(const o of i)a[o.refId]=o;return a}function pa(t){switch(t){case"mask":return J.Mask;case"maskAndTransparency":return J.MaskBlend;case"none":return J.Opaque;default:return J.Blend}}function hd(t){const e=t.params;return{id:1,material:e.material,texture:e.texture,region:e.texture}}const md=new Ui(1,2,"wosr");async function th(t,e){var h;const r=fd(va(t));if(r.fileType==="wosr"){const p=await(e.cache?e.cache.loadWOSR(r.url,e):ad(r.url,e)),{engineResources:v,referenceBoundingBox:x}=cd(p,e);return{lods:v,referenceBoundingBox:x,isEsriSymbolResource:!1,isWosr:!0}}const i=await(e.cache?e.cache.loadGLTF(r.url,e,!!e.usePBR):Qa(new en(e.streamDataRequester),r.url,e,e.usePBR)),a=(h=i.model.meta)==null?void 0:h.ESRI_proxyEllipsoid,o=i.meta.isEsriSymbolResource&&a!=null&&i.meta.ESRI_webstyle==="EsriRealisticTreesStyle";o&&!i.customMeta.esriTreeRendering&&(i.customMeta.esriTreeRendering=!0,_d(i,a));const n=!!e.usePBR,c=i.meta.isEsriSymbolResource?{usePBR:n,isSchematic:!1,treeRendering:o,mrrFactors:[...Gl]}:{usePBR:n,isSchematic:!1,treeRendering:!1,mrrFactors:[...Po]},l={...e.materialParameters,treeRendering:o},{engineResources:u,referenceBoundingBox:d}=pd(i,c,l,e.skipHighLods&&r.specifiedLodIndex==null?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:u,referenceBoundingBox:d,isEsriSymbolResource:i.meta.isEsriSymbolResource,isWosr:!1}}function fd(t){const e=t.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return e?{fileType:"gltf",url:e[1],specifiedLodIndex:e[4]!=null?Number(e[4]):null}:t.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:t,specifiedLodIndex:null}:{fileType:"unknown",url:t,specifiedLodIndex:null}}function pd(t,e,r,i){const a=t.model,o=new Array,n=new Map,c=new Map,l=a.lods.length,u=ji();return a.lods.forEach((d,h)=>{const p=i.skipHighLods===!0&&(l>1&&h===0||l>3&&h===1)||i.skipHighLods===!1&&i.singleLodIndex!=null&&h!==i.singleLodIndex;if(p&&h!==0)return;const v=new En(d.name,d.lodThreshold,[0,0,0]);d.parts.forEach(x=>{const _=p?new Jt({}):vd(a,x,v,e,r,n,c),{geometry:g,vertexCount:$}=gd(x,_??new Jt({})),C=g.boundingInfo;C!=null&&h===0&&(jt(u,C.bbMin),jt(u,C.bbMax)),_!=null&&(v.stageResources.geometries.push(g),v.numberOfVertices+=$)}),p||o.push(v)}),{engineResources:o,referenceBoundingBox:u}}function vd(t,e,r,i,a,o,n){var v,x;const c=e.material+(e.attributes.normal?"_normal":"")+(e.attributes.color?"_color":"")+(e.attributes.texCoord0?"_texCoord0":"")+(e.attributes.tangent?"_tangent":""),l=t.materials.get(e.material),u=e.attributes.texCoord0!=null,d=e.attributes.normal!=null;if(l==null)return null;const h=xd(l.alphaMode);if(!o.has(c)){if(u){const b=(A,R=!1)=>{if(A!=null&&!n.has(A)){const S=t.textures.get(A);if(S!=null){const E=S.data;n.set(A,new ho(hr(E)?E.data:E,{...S.parameters,preMultiplyAlpha:!hr(E)&&R,encoding:hr(E)&&E.encoding!=null?E.encoding:void 0}))}}};b(l.textureColor,h!==J.Opaque),b(l.textureNormal),b(l.textureOcclusion),b(l.textureEmissive),b(l.textureMetallicRoughness)}const _=l.color[0]**(1/Ye),g=l.color[1]**(1/Ye),$=l.color[2]**(1/Ye),C=l.emissiveFactor[0]**(1/Ye),P=l.emissiveFactor[1]**(1/Ye),L=l.emissiveFactor[2]**(1/Ye),G=l.textureColor!=null&&u?n.get(l.textureColor):null,z=zl({normalTexture:l.textureNormal,metallicRoughnessTexture:l.textureMetallicRoughness,metallicFactor:l.metallicFactor,roughnessFactor:l.roughnessFactor,emissiveTexture:l.textureEmissive,emissiveFactor:l.emissiveFactor,occlusionTexture:l.textureOcclusion}),w=((v=l.normalTextureTransform)==null?void 0:v.scale)!=null?(x=l.normalTextureTransform)==null?void 0:x.scale:Hi;o.set(c,new Jt({...i,transparent:h===J.Blend,customDepthTest:Ot.Lequal,textureAlphaMode:h,textureAlphaCutoff:l.alphaCutoff,diffuse:[_,g,$],ambient:[_,g,$],opacity:l.opacity,doubleSided:l.doubleSided,doubleSidedType:"winding-order",cullFace:l.doubleSided?ve.None:ve.Back,hasVertexColors:!!e.attributes.color,hasVertexTangents:!!e.attributes.tangent,normalType:d?K.Attribute:K.ScreenDerivative,castShadows:!0,receiveShadows:l.receiveShadows,receiveAmbientOcclusion:l.receiveAmbientOcclustion,textureId:G!=null?G.id:void 0,colorMixMode:l.colorMixMode,normalTextureId:l.textureNormal!=null&&u?n.get(l.textureNormal).id:void 0,textureAlphaPremultiplied:G!=null&&!!G.parameters.preMultiplyAlpha,occlusionTextureId:l.textureOcclusion!=null&&u?n.get(l.textureOcclusion).id:void 0,emissiveTextureId:l.textureEmissive!=null&&u?n.get(l.textureEmissive).id:void 0,metallicRoughnessTextureId:l.textureMetallicRoughness!=null&&u?n.get(l.textureMetallicRoughness).id:void 0,emissiveFactor:[C,P,L],mrrFactors:z?[...Vl]:[l.metallicFactor,l.roughnessFactor,i.mrrFactors[2]],isSchematic:z,colorTextureTransformMatrix:mt(l.colorTextureTransform),normalTextureTransformMatrix:mt(l.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:mt(l.occlusionTextureTransform),emissiveTextureTransformMatrix:mt(l.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:mt(l.metallicRoughnessTextureTransform),...a}))}const p=o.get(c);if(r.stageResources.materials.push(p),u){const _=g=>{g!=null&&r.stageResources.textures.push(n.get(g))};_(l.textureColor),_(l.textureNormal),_(l.textureOcclusion),_(l.textureEmissive),_(l.textureMetallicRoughness)}return p}function gd(t,e){const r=t.attributes.position.count,i=tn(t.indices||r,t.primitiveType),a=Pt(3*r),{typedBuffer:o,typedBufferStride:n}=t.attributes.position;Ja(a,o,t.transform,3,n);const c=[[f.POSITION,new Ze(a,i,3,!0)]];if(t.attributes.normal!=null){const u=Pt(3*r),{typedBuffer:d,typedBufferStride:h}=t.attributes.normal;Wi(Je,t.transform),Za(u,d,Je,3,h),ii(Je)&&ni(u,u),c.push([f.NORMAL,new Ze(u,i,3,!0)])}if(t.attributes.tangent!=null){const u=Pt(4*r),{typedBuffer:d,typedBufferStride:h}=t.attributes.tangent;Ua(Je,t.transform),Ka(u,d,Je,4,h),ii(Je)&&ni(u,u,4),c.push([f.TANGENT,new Ze(u,i,4,!0)])}if(t.attributes.texCoord0!=null){const u=Pt(2*r),{typedBuffer:d,typedBufferStride:h}=t.attributes.texCoord0;rn(u,d,2,h),c.push([f.UV0,new Ze(u,i,2,!0)])}const l=t.attributes.color;if(l!=null){const u=new Uint8Array(4*r);l.elementCount===4?l instanceof yr?li(u,l,255):l instanceof tr?on(u,l):l instanceof qa&&li(u,l,1/256):(u.fill(255),l instanceof Ht?si(u,l.typedBuffer,255,4,l.typedBufferStride):t.attributes.color instanceof Ya?an(u,l.typedBuffer,4,t.attributes.color.typedBufferStride):t.attributes.color instanceof Xa&&si(u,l.typedBuffer,1/256,4,l.typedBufferStride)),c.push([f.COLOR,new Ze(u,i,4,!0)])}return{geometry:new io(e,c),vertexCount:r}}const Je=Ct();function xd(t){switch(t){case"BLEND":return J.Blend;case"MASK":return J.Mask;case"OPAQUE":case null:case void 0:return J.Opaque}}function _d(t,e){for(let r=0;r1&&br(d,d,l,$>-1?.2:Math.min(-4*$-3.8,1)),p[x]=d[0],p[x+1]=d[1],p[x+2]=d[2],x+=3,h[_]=255*P,h[_+1]=255*P,h[_+2]=255*P,h[_+3]=255,_+=4}a.attributes.normal=new Ht(p),a.attributes.color=new tr(h)}}}const Td=Object.freeze(Object.defineProperty({__proto__:null,build:Ko},Symbol.toStringTag,{value:"Module"})),bd=Object.freeze(Object.defineProperty({__proto__:null,build:ta,getRadius:nr},Symbol.toStringTag,{value:"Module"})),Sd=Object.freeze(Object.defineProperty({__proto__:null,build:ua},Symbol.toStringTag,{value:"Module"})),Ed=Object.freeze(Object.defineProperty({__proto__:null,build:ma},Symbol.toStringTag,{value:"Module"}));export{th as fetch,pd as gltfToEngineResources,fd as parseUrl}; diff --git a/build/assets/ogcFeatureUtils-CuyMjEno.js b/build/assets/ogcFeatureUtils-CuyMjEno.js new file mode 100644 index 0000000..bcf35e4 --- /dev/null +++ b/build/assets/ogcFeatureUtils-CuyMjEno.js @@ -0,0 +1 @@ +import{s as j,bZ as q,b_ as Y,U as $,bF as ee,bE as E,bI as ne,ay as x,b$ as L,bD as te,I as A,V as ie}from"./index-DKOmzAMm.js";import{l as ae,r as re,o as se}from"./featureConversionUtils-CCATessr.js";import{e as oe}from"./OptimizedFeatureSet-Blu9Ckm7.js";import{E as le,I as ce,N as ue}from"./geojson-BRJeQduY.js";import{o as de}from"./clientSideDefaults-B7fGShzo.js";import{p as fe}from"./sourceUtils-DYgU-2mb.js";const G=()=>ie.getLogger("esri.layers.ogc.ogcFeatureUtils"),J="startindex",me=new Set([J,"offset"]),_="http://www.opengis.net/def/crs/",Se=`${_}OGC/1.3/CRS84`;var l;async function ve(e,n,t={},i=5){const{links:a}=e,o=p(a,"items",l.geojson)||p(a,"http://www.opengis.net/def/rel/ogc/1.0/items",l.geojson);if(o==null)throw new j("ogc-feature-layer:missing-items-page","Missing items url");const{apiKey:d,customParameters:c,signal:g}=t,f=q(o.href,e.landingPage.url),y={limit:i,...c,token:d},T=Y(f,y),D={accept:l.geojson},{data:S}=await $(T,{signal:g,headers:D}),v=Ie(T,i,S.links)??J;le(S);const m=ce(S,{geometryType:n.geometryType}),I=n.fields||m.fields||[],W=n.hasZ!=null?n.hasZ:m.hasZ,w=m.geometryType,b=n.objectIdField||m.objectIdFieldName||"OBJECTID";let s=n.timeInfo;const N=I.find(({name:r})=>r===b);if(N)N.editable=!1,N.nullable=!1;else{if(!m.objectIdFieldType)throw new j("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");I.unshift({name:b,alias:b,type:m.objectIdFieldType==="number"?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(b!==m.objectIdFieldName){const r=I.find(({name:u})=>u===m.objectIdFieldName);r&&(r.type="esriFieldTypeInteger")}I===m.fields&&m.unknownFields.length>0&&G().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:m.unknownFields}});for(const r of I){if(r.name==null&&(r.name=r.alias),r.alias==null&&(r.alias=r.name),r.type!=="esriFieldTypeOID"&&r.type!=="esriFieldTypeGlobalID"&&(r.editable=r.editable==null||!!r.editable,r.nullable=r.nullable==null||!!r.nullable),!r.name)throw new j("ogc-feature-layer:invalid-field-name","field name is missing",{field:r});if(!ee.jsonValues.includes(r.type))throw new j("ogc-feature-layer:invalid-field-type",`invalid type for field "${r.name}"`,{field:r})}if(s){const r=new E(I);if(s.startTimeField){const u=r.get(s.startTimeField);u?(s.startTimeField=u.name,u.type="esriFieldTypeDate"):s.startTimeField=null}if(s.endTimeField){const u=r.get(s.endTimeField);u?(s.endTimeField=u.name,u.type="esriFieldTypeDate"):s.endTimeField=null}if(s.trackIdField){const u=r.get(s.trackIdField);u?s.trackIdField=u.name:(s.trackIdField=null,G().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:s}}))}s.timeReference||(s.timeReference={timeZoneIANA:ne}),s.startTimeField||s.endTimeField||(G().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:s}}),s=void 0)}return{drawingInfo:w?de(w):null,extent:he(e),geometryType:w,fields:I,hasZ:!!W,objectIdField:b,paginationParameter:v,timeInfo:s}}async function Ne(e,n={}){const{links:t,url:i}=e,a=p(t,"data",l.json)||p(t,"http://www.opengis.net/def/rel/ogc/1.0/data",l.json);if(a==null)throw new j("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:o,customParameters:d,signal:c}=n,g=q(a.href,i),{data:f}=await $(g,{signal:c,headers:{accept:l.json},query:{...d,token:o}});for(const y of f.collections)y.landingPage=e;return f}async function Pe(e,n={}){const{links:t,url:i}=e,a=p(t,"conformance",l.json)||p(t,"http://www.opengis.net/def/rel/ogc/1.0/conformance",l.json);if(a==null)throw new j("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:o,customParameters:d,signal:c}=n,g=q(a.href,i),{data:f}=await $(g,{signal:c,headers:{accept:l.json},query:{...d,token:o}});return f}async function Oe(e,n={}){const{apiKey:t,customParameters:i,signal:a}=n,{data:o}=await $(e,{signal:a,headers:{accept:l.json},query:{...i,token:t}});return o.url=e,o}async function qe(e,n={}){const{links:t,url:i}=e,a=p(t,"service-desc",l.openapi);if(a==null)return G().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:o,customParameters:d,signal:c}=n,g=q(a.href,i),{data:f}=await $(g,{signal:c,headers:{accept:l.openapi},query:{...d,token:o}});return f}function Ce(e){const n=/^http:\/\/www\.opengis.net\/def\/crs\/(?.*)\/(?.*)\/(?.*)$/i.exec(e),t=n==null?void 0:n.groups;if(!t)return null;const{authority:i,code:a}=t;switch(i.toLowerCase()){case"ogc":switch(a.toLowerCase()){case"crs27":return x.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return x.WGS84.wkid;default:return null}case"esri":case"epsg":{const o=Number.parseInt(a,10);return Number.isNaN(o)?null:o}default:return null}}async function Ge(e,n,t){const i=await pe(e,n,t);return ae(i)}async function pe(e,n,t){const{collection:{links:i,landingPage:{url:a}},layerDefinition:o,maxRecordCount:d,queryParameters:{apiKey:c,customParameters:g},spatialReference:f,supportedCrs:y}=e,T=p(i,"items",l.geojson)||p(i,"http://www.opengis.net/def/rel/ogc/1.0/items",l.geojson);if(T==null)throw new j("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:D,num:S,start:v,timeExtent:m,where:I}=n;if(n.objectIds)throw new j("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");const W=x.fromJSON(f),w=n.outSpatialReference??W,b=w.isWGS84?null:U(w,y),s=be(D,y),N=ye(m),r=we(I),u=S??(v==null?d:10),z=v===0?void 0:v,{fields:M,geometryType:C,hasZ:Z,objectIdField:P,paginationParameter:V}=o,B=q(T.href,a),{data:K}=await $(B,{...t,query:{...g,...s,crs:b,datetime:N,query:r,limit:u,[V]:z,token:c},headers:{accept:l.geojson}}),O=ue(K,{geometryType:C,hasZ:Z,objectIdField:P}),Q=O.length===u&&!!p(K.links??[],"next",l.geojson),H=new E(M);for(const h of O){const k={};fe(H,k,h.attributes),k[P]=h.attributes[P],h.attributes=k}if(!b&&w.isWebMercator){for(const h of O)if(h.geometry!=null&&C!=null){const k=re(h.geometry,C,Z,!1);k.spatialReference=x.WGS84,h.geometry=se(L(k,w))}}for(const h of O)h.objectId=h.attributes[P];const X=b||!b&&w.isWebMercator?w.toJSON():te,F=new oe;return F.exceededTransferLimit=Q,F.features=O,F.fields=M,F.geometryType=C,F.hasZ=Z,F.objectIdFieldName=P,F.spatialReference=X,F}function ge(e){return e!=null&&e.type==="extent"}function U(e,n){const{isWebMercator:t,wkid:i}=e;if(!i)return null;const a=t?n[3857]??n[102100]??n[102113]??n[900913]:n[e.wkid];return a?`${_}${a}`:null}function R(e){if(e==null)return"";const{xmin:n,ymin:t,xmax:i,ymax:a}=e;return`${n},${t},${i},${a}`}function ye(e){if(e==null)return null;const{start:n,end:t}=e;return`${n!=null?n.toISOString():".."}/${t!=null?t.toISOString():".."}`}function we(e){return e!=null&&e&&e!=="1=1"?e:null}function be(e,n){if(!ge(e))return null;const{spatialReference:t}=e;if(!t||t.isWGS84)return{bbox:R(e)};const i=U(t,n);return i!=null?{bbox:R(e),"bbox-crs":i}:t.isWebMercator?{bbox:R(L(e,x.WGS84))}:null}function he(e){var c;const n=(c=e.extent)==null?void 0:c.spatial;if(!n)return null;const t=n.bbox[0],i=t.length===4,[a,o]=t,d=i?void 0:t[2];return{xmin:a,ymin:o,xmax:i?t[2]:t[3],ymax:i?t[3]:t[4],zmin:d,zmax:i?void 0:t[5],spatialReference:x.WGS84.toJSON()}}function p(e,n,t){return e.find(({rel:i,type:a})=>i===n&&a===t)??e.find(({rel:i,type:a})=>i===n&&!a)}function Ie(e,n,t){var f;if(!t)return;const i=p(t,"next",l.geojson),a=(f=A(i==null?void 0:i.href))==null?void 0:f.query;if(!a)return;const o=A(e).query,d=Object.keys(o??{}),c=Object.entries(a).filter(([y])=>!d.includes(y)).find(([y,T])=>me.has(y.toLowerCase())&&Number.parseInt(T,10)===n);return c==null?void 0:c[0]}(function(e){e.json="application/json",e.geojson="application/geo+json",e.openapi="application/vnd.oai.openapi+json;version=3.0"})(l||(l={}));export{pe as $,Ce as C,Ne as N,Pe as O,Oe as P,Ge as R,_ as k,qe as q,ve as v,Se as x}; diff --git a/build/assets/openCloseComponent-A5NL68VL.js b/build/assets/openCloseComponent-A5NL68VL.js new file mode 100644 index 0000000..25802ab --- /dev/null +++ b/build/assets/openCloseComponent-A5NL68VL.js @@ -0,0 +1,9 @@ +import{dp as r,ds as s}from"./index-DKOmzAMm.js";import{b as t}from"./icon-ifbWMk17.js";import{w as a}from"./component-BUnDTGFH.js";/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */let o;const l={childList:!0};function c(e){o||(o=t("mutation",f)),o.observe(e.el,l)}function O(e){o.unobserve(e.el)}function f(e){e.forEach(({target:i})=>{r(i)})}/*! + * All material copyright ESRI, All Rights Reserved, unless otherwise specified. + * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. + * v2.13.0 + */const d=s;function n(e){return"opened"in e?e.opened:e.open}function b(e){d(()=>{e.transitionEl&&a(e.transitionEl,e.openTransitionProp,()=>{n(e)?e.onBeforeOpen():e.onBeforeClose()},()=>{n(e)?e.onOpen():e.onClose()})})}export{c,O as d,b as o}; diff --git a/build/assets/orientedBoundingBox-RPlI7sU4.js b/build/assets/orientedBoundingBox-RPlI7sU4.js new file mode 100644 index 0000000..10f2008 --- /dev/null +++ b/build/assets/orientedBoundingBox-RPlI7sU4.js @@ -0,0 +1 @@ +import{p as It,f as kt}from"./mat3-BNGRf_pC.js";import{t as Ut,e as ta}from"./mat3f64-q3fE-ZOt.js";import{e as aa}from"./mat4f64-CSKppSlJ.js";import{X as sa,O as U,x as ia}from"./quat-BYKy26Om.js";import{o as Rt,e as xt}from"./quatf64-Bdb9ZJJK.js";import{c4 as et,c6 as lt,au as d,av as Pt,bo as ea,g7 as W,fD as y,g8 as mt,g9 as Ft,ga as na,bm as oa,gb as ra,gc as Ct,bk as St,gd as Bt,fF as ha,cM as Dt,cL as ca,ge as ua,cK as da,gf as vt,gg as gt,gh as fa,gi as la,fj as Qt}from"./index-DKOmzAMm.js";import{a as _t}from"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import{u as ma}from"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import{c as Tt,o as _a,F as pt}from"./plane-aHrUkISy.js";import{n as ga}from"./vec2f64-DA6GkJuH.js";var qt;(function(i){i[i.Global=1]="Global",i[i.Local=2]="Local"})(qt||(qt={}));class Vt{constructor(t,a,s=a){this.data=t,this.size=a,this.stride=s}}class Ka extends Vt{constructor(t,a,s,n=!1,o=s){super(t,s,o),this.indices=a,this.exclusive=n}}const nt=1e-6,ot=d(),bt=d();function ba(i,t){const{data:a,size:s}=i,n=a.length/s;if(n<=0)return;const o=new qa(i);yt(ot,o.minProj,o.maxProj),dt(ot,ot,.5),N(bt,o.maxProj,o.minProj);const r=wt(bt),c=new wa;c.quality=r,n<14&&(i=new Vt(new Float64Array(o.buffer,112,42),3));const e=d(),h=d(),b=d(),m=d(),z=d(),A=d(),M=d();switch(Ma(o,i,M,e,h,b,m,z,A,c)){case 1:return void Ht(ot,bt,t);case 2:return void pa(i,m,t)}$a(i,M,e,h,b,m,z,A,c),Lt(i,c.b0,c.b1,c.b2,at,st);const E=d();N(E,st,at),c.quality=wt(E),c.qualitys&&(s=r,n=o)}S(t,i.minVert[n]),S(a,i.maxVert[n])}const w=[0,0,0];function ja(i,t,a,s){const{data:n,size:o}=i;let r=Number.NEGATIVE_INFINITY,c=0;for(let e=0;er&&(r=m,c=e)}return S(s,n,c),r}const _=ga();function xa(i,t,a,s,n){za(i,t,_,n,s);const o=Kt(a,t);_[1]-nt<=o&&(s[0]=void 0),_[0]+nt>=o&&(n[0]=void 0)}const Et=d(),Gt=d(),Yt=d(),Z=d(),K=d(),Mt=d();function L(i,t,a,s,n,o){if(Zt(t)a[1]&&(a[1]=e,S(n,o,c))}}function Ht(i,t,a){a.center=i,a.halfSize=et(t,t,.5),a.quaternion=Rt}const G=d(),J=d(),ct=d(),at=d(),st=d(),Ot=d();function pa(i,t,a){S(G,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?G[0]=0:Math.abs(t[1])>Math.abs(t[2])?G[1]=0:G[2]=0,Zt(G)this.maxProj[0]&&(this.maxProj[0]=h,o[0]=e),h=r[e+1],hthis.maxProj[1]&&(this.maxProj[1]=h,o[1]=e),h=r[e+2],hthis.maxProj[2]&&(this.maxProj[2]=h,o[2]=e),h=r[e]+r[e+1]+r[e+2],hthis.maxProj[3]&&(this.maxProj[3]=h,o[3]=e),h=r[e]+r[e+1]-r[e+2],hthis.maxProj[4]&&(this.maxProj[4]=h,o[4]=e),h=r[e]-r[e+1]+r[e+2],hthis.maxProj[5]&&(this.maxProj[5]=h,o[5]=e),h=r[e]-r[e+1]-r[e+2],hthis.maxProj[6]&&(this.maxProj[6]=h,o[6]=e)}for(let e=0;e0){const s=1/Math.sqrt(a);i[0]=t[0]*s,i[1]=t[1]*s,i[2]=t[2]*s}}function Zt(i){return i[0]*i[0]+i[1]*i[1]+i[2]*i[2]}function Nt(i,t){const a=t[0]-i[0],s=t[1]-i[1],n=t[2]-i[2];return a*a+s*s+n*n}function Kt(i,t){return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]}function ya(i,t){const a=t[0]+t[4]+t[8];if(a>0){let s=Math.sqrt(a+1);i[3]=.5*s,s=.5/s,i[0]=(t[5]-t[7])*s,i[1]=(t[6]-t[2])*s,i[2]=(t[1]-t[3])*s}else{let s=0;t[4]>t[0]&&(s=1),t[8]>t[3*s+s]&&(s=2);const n=(s+1)%3,o=(s+2)%3;let r=Math.sqrt(t[3*s+s]-t[3*n+n]-t[3*o+o]+1);i[s]=.5*r,r=.5/r,i[3]=(t[3*n+o]-t[3*o+n])*r,i[n]=(t[3*n+s]+t[3*s+n])*r,i[o]=(t[3*o+s]+t[3*s+o])*r}return i}class ft{constructor(t=ea,a=Ga,s=Rt){this._data=[t[0],t[1],t[2],a[0],a[1],a[2],s[0],s[1],s[2],s[3]]}clone(){const t=new ft;return t._data=this._data.slice(),t}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const a=new ft;return a._data=t.slice(),a}static fromJSON(t){return new ft(t.center,t.halfSize,t.quaternion)}copy(t){this._data=t.data.slice()}get center(){return W(Tt.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,a,s){this._data[0]=t,this._data[1]=a,this._data[2]=s}get halfSize(){return W(Tt.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return sa(_a.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const a=l,s=this._data;a[0]=s[6],a[1]=s[7],a[2]=s[8],a[3]=s[9];for(let n=0;n<8;++n){const o=t[n];o[0]=(1&n?-1:1)*s[3],o[1]=(2&n?-1:1)*s[4],o[2]=(4&n?-1:1)*s[5],y(o,o,a),o[0]+=s[0],o[1]+=s[1],o[2]+=s[2]}}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],a=this._data[4],s=this._data[5];return Math.sqrt(t*t+a*a+s*s)}intersectSphere(t){u[0]=this._data[0]-t[0],u[1]=this._data[1]-t[1],u[2]=this._data[2]-t[2];const a=this.getQuaternion(H);return U(l,a),y(u,u,l),mt(u,u),Y[0]=Math.min(u[0],this._data[3]),Y[1]=Math.min(u[1],this._data[4]),Y[2]=Math.min(u[2],this._data[5]),Ft(Y,u)o*o)&&(l[0]=-s[6],l[1]=-s[7],l[2]=-s[8],l[3]=s[9],y(u,u,l),mt(u,u),Y[0]=Math.min(u[0],s[3]),Y[1]=Math.min(u[1],s[4]),Y[2]=Math.min(u[2],s[5]),Ft(Y,u)s?1:a<-s?-1:0}intersectRay(t,a,s=0){const n=this._data,o=l;o[0]=-n[6],o[1]=-n[7],o[2]=-n[8],o[3]=n[9],u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2];const r=y(u,u,l),c=y(Y,a,l);let e=-1/0,h=1/0;const b=this.getHalfSize(it);for(let m=0;m<3;m++){const z=r[m],A=c[m],M=b[m]+s;if(Math.abs(A)>1e-6){const E=(M-z)/A,$=(-M-z)/A;e=Math.max(e,Math.min(E,$)),h=Math.min(h,Math.max(E,$))}else if(z>M||z<-M)return!1}return e<=h}projectedArea(t,a,s,n){const o=this.getQuaternion(H);U(l,o),u[0]=t[0]-this._data[0],u[1]=t[1]-this._data[1],u[2]=t[2]-this._data[2],y(u,u,l);const r=this.getHalfSize(it),c=u[0]<-r[0]?-1:u[0]>r[0]?1:0,e=u[1]<-r[1]?-1:u[1]>r[1]?1:0,h=u[2]<-r[2]?-1:u[2]>r[2]?1:0,b=Math.abs(c)+Math.abs(e)+Math.abs(h);if(b===0)return 1/0;const m=b===1?4:6,z=6*(c+3*e+9*h+13);It(k,o),kt(k,k,r);const A=this.getCenter(v);for(let $=0;$>1)-1),oa(u,u,k),lt(D,A,u),D[3]=1,ra(D,D,a);const At=1/Math.max(1e-6,D[3]);F[2*$]=D[0]*At,F[2*$+1]=D[1]*At}const M=2*m-2;let E=F[0]*(F[3]-F[M+1])+F[M]*(F[1]-F[M-1]);for(let $=2;${const i=new Int8Array(162);let t=0;const a=s=>{for(let n=0;n0?1+t/h:1,m=e>0?1+a/e:1,z=(m+b)/2,A=(m-b)/2;et(x,C,A),n.halfSize=gt(x,x,c,z),et(x,C,z),gt(x,x,c,A),fa(f,f),la(f,x,f);const M=i.getQuaternion(Na);n.center=y(f,f,M)}}else{n.center=gt(f,r,Qt,(a+t)/2);const e=y(f,Qt,l);mt(e,e),n.halfSize=gt(C,c,e,(a-t)/2)}return n}function Fa(i,t,a,s,n){t.getCenter(v),v[2]+=n;const o=_t(a);St(v,i,0,v,o,0,1),Jt(o,t,v,a,s)}function Ca(i,t,a,s,n){t.getCenter(v),v[2]+=n,Jt(i,t,v,a,s)}function Jt(i,t,a,s,n){const o=t.getQuaternion(H),r=It(k,o),c=t.getHalfSize(it);for(let e=0;e<8;++e){for(let h=0;h<3;++h)T[h]=c[h]*(e&1<{i(t)&&e&&t.originOf(o)!==e&&t.updateOrigin(o,e)})}export{p as i}; diff --git a/build/assets/pbf-DwSF5Y_G.js b/build/assets/pbf-DwSF5Y_G.js new file mode 100644 index 0000000..ce82c41 --- /dev/null +++ b/build/assets/pbf-DwSF5Y_G.js @@ -0,0 +1 @@ +import{M as d,aJ as g}from"./index-DKOmzAMm.js";var h;(function(n){n[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown"})(h||(h={}));const p=4294967296,u=new TextDecoder("utf-8"),f=d("safari")||d("ios")?6:d("ff")?12:32;class o{constructor(t,i,s=0,e=t?t.byteLength:0){this._tag=0,this._dataType=h.unknown,this._init(t,i,s,e)}_init(t,i,s,e){this._data=t,this._dataView=i,this._pos=s,this._end=e}asUnsafe(){return this}clone(){return new o(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const i=this._decodeVarint();if(this._tag=i>>3,this._dataType=7&i,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128||(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)||(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)||(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)||(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128))return t;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=this._data[this._pos]!==0;return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,i=this._pos,s=t.getUint32(i,!0)+t.getUint32(i+4,!0)*p;return this._skip(8),s}getSFixed64(){const t=this._dataView,i=this._pos,s=t.getUint32(i,!0)+t.getInt32(i+4,!0)*p;return this._skip(8),s}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),i=this._pos,s=this._toString(this._data,i,i+t);return this._skip(t),s}getBytes(){const t=this._getLength(),i=this._pos,s=this._toBytes(this._data,i,i+t);return this._skip(t),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,i,s,e){const r=this.getMessage(),a=t(r,i,s,e);return r.release(),a}processMessage(t){const i=this.getMessage(),s=t(i);return i.release(),s}getMessage(){const t=this._getLength(),i=o.pool.acquire();return i._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),i}release(){o.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case h.varint:this._decodeVarint();break;case h.fixed64:this._skip(8);break;case h.delimited:this._skip(this._getLength());break;case h.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let i=this._pos,s=0,e=0;if(this._end-i>=10)do{if(e=t[i++],s|=127&e,!(128&e)||(e=t[i++],s|=(127&e)<<7,!(128&e))||(e=t[i++],s|=(127&e)<<14,!(128&e))||(e=t[i++],s|=(127&e)<<21,!(128&e))||(e=t[i++],s+=268435456*(127&e),!(128&e))||(e=t[i++],s+=34359738368*(127&e),!(128&e))||(e=t[i++],s+=4398046511104*(127&e),!(128&e))||(e=t[i++],s+=562949953421312*(127&e),!(128&e))||(e=t[i++],s+=72057594037927940*(127&e),!(128&e))||(e=t[i++],s+=9223372036854776e3*(127&e),!(128&e)))break;throw new Error("Varint too long!")}while(!1);else{let r=1;for(;i!==this._end&&(e=t[i],128&e);)++i,s+=(127&e)*r,r*=128;if(i===this._end)throw new Error("Varint overrun!");++i,s+=e*r}return this._pos=i,s}_decodeSVarint(){const t=this._data;let i,s=0,e=0;const r=1&t[this._pos];if(e=t[this._pos++],s|=127&e,!(128&e)||(e=t[this._pos++],s|=(127&e)<<7,!(128&e))||(e=t[this._pos++],s|=(127&e)<<14,!(128&e))||(e=t[this._pos++],s|=(127&e)<<21,!(128&e))||(e=t[this._pos++],s+=268435456*(127&e),!(128&e))||(e=t[this._pos++],s+=34359738368*(127&e),!(128&e))||(e=t[this._pos++],s+=4398046511104*(127&e),!(128&e)))return r?-(s+1)/2:s/2;if(i=BigInt(s),e=t[this._pos++],i+=0x2000000000000n*BigInt(127&e),!(128&e)||(e=t[this._pos++],i+=0x100000000000000n*BigInt(127&e),!(128&e))||(e=t[this._pos++],i+=0x8000000000000000n*BigInt(127&e),!(128&e)))return Number(r?-(i+1n)/2n:i/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==h.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,i,s){if((s=Math.min(this._end,s))-i>f){const a=t.subarray(i,s);return u.decode(a)}let e="",r="";for(let a=i;a{n._data=null,n._dataView=null});export{o as n}; diff --git a/build/assets/pbfQueryUtils-D2YxxSfN.js b/build/assets/pbfQueryUtils-D2YxxSfN.js new file mode 100644 index 0000000..59717f5 --- /dev/null +++ b/build/assets/pbfQueryUtils-D2YxxSfN.js @@ -0,0 +1 @@ +import{ab as I,fp as d,s as w}from"./index-DKOmzAMm.js";import{n as S}from"./pbf-DwSF5Y_G.js";import{s as U,a as G,e as y}from"./OptimizedFeature-DDMKj8Vq.js";import{e as D}from"./OptimizedFeatureSet-Blu9Ckm7.js";const F=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];let Y=class{constructor(e){this._options=e,this.geometryTypes=F,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new D}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!(e!=null&&e.features)||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||I(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const a=d(this._options.sourceSpatialReference)/d(e.spatialReference);if(a!==1)for(const n of e.features){if(!U(n))continue;const s=n.geometry.coords;for(let r=2;ra+n,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,a){e.coords[this._coordinatePtr++]=a}addCoordinatePoint(e,a){e.coords.push(a)}addLength(e,a){e.lengths.push(a)}addQueryGeometry(e,a){e.queryGeometry=a.queryGeometry,e.queryGeometryType=a.queryGeometryType}createPointGeometry(){return new y}};const b=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],h=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],m=["upperLeft","lowerLeft"];function k(t){return t>=b.length?null:b[t]}function R(t){return t>=h.length?null:h[t]}function T(t){return t>=m.length?null:m[t]}function q(t,e){return e>=t.geometryTypes.length?null:t.geometryTypes[e]}function x(t,e,a){const s=t.asUnsafe(),r=e.createPointGeometry(a);for(;s.next();)switch(s.tag()){case 3:{const o=s.getUInt32(),i=s.pos()+o;let c=0;for(;s.pos(){fe=e,se=_}),Ee=typeof window=="object",J=typeof importScripts=="function",be=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",me=Object.assign({},t),Te="./this.program",Y="";function fr(e){return t.locateFile?t.locateFile(e,Y):Y+e}if(be){var Oe=require("fs"),Se=require("path");Y=__dirname+"/",Pe=(e,_)=>(e=ne(e)?new URL(e):Se.normalize(e),Oe.readFileSync(e,_?void 0:"utf8")),$=e=>{var _=Pe(e,!0);return _.buffer||(_=new Uint8Array(_)),_},k=(e,_,o,p=!0)=>{e=ne(e)?new URL(e):Se.normalize(e),Oe.readFile(e,p?void 0:"utf8",(i,s)=>{i?o(i):_(p?s.buffer:s)})},!t.thisProgram&&process.argv.length>1&&(Te=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else(Ee||J)&&(J?Y=self.location.href:typeof document<"u"&&document.currentScript&&(Y=document.currentScript.src),ce&&(Y=ce),Y=Y.startsWith("blob:")?"":Y.substr(0,Y.replace(/[?#].*/,"").lastIndexOf("/")+1),Pe=e=>{var _=new XMLHttpRequest;return _.open("GET",e,!1),_.send(null),_.responseText},J&&($=e=>{var _=new XMLHttpRequest;return _.open("GET",e,!1),_.responseType="arraybuffer",_.send(null),new Uint8Array(_.response)}),k=(e,_,o)=>{var p=new XMLHttpRequest;p.open("GET",e,!0),p.responseType="arraybuffer",p.onload=()=>{p.status==200||p.status==0&&p.response?_(p.response):o()},p.onerror=o,p.send(null)});var ae,Q,Er=console.log.bind(console),W=console.error.bind(console);Object.assign(t,me),me=null;var X,z,ee,R,w,te,_e,Ne=!1;function ge(e,_){e||K(_)}function he(){var e=Q.buffer;t.HEAP8=X=new Int8Array(e),t.HEAP16=ee=new Int16Array(e),t.HEAPU8=z=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAP32=R=new Int32Array(e),t.HEAPU32=w=new Uint32Array(e),t.HEAPF32=te=new Float32Array(e),t.HEAPF64=_e=new Float64Array(e)}var br=[],le=[],mr=[];function Tr(){ye(br)}function Or(){ye(le)}function Sr(){ye(mr)}function Nr(e){le.unshift(e)}var re=0,B=null;function hr(e){re++}function lr(e){if(--re==0&&B){var _=B;B=null,_()}}function K(e){W(e="Aborted("+e+")"),Ne=!0,e+=". Build with -sASSERTIONS for more info.";var _=new WebAssembly.RuntimeError(e);throw se(_),_}var oe,Mr="data:application/octet-stream;base64,",Me=e=>e.startsWith(Mr),ne=e=>e.startsWith("file://");function Dr(){var e="pe-wasm.wasm";return Me(e)?e:fr(e)}function De(e){if(e==oe&&ae)return new Uint8Array(ae);if($)return $(e);throw"both async and sync fetching of the wasm failed"}function vr(e){if(Ee||J){if(typeof fetch=="function"&&!ne(e))return fetch(e,{credentials:"same-origin"}).then(_=>{if(!_.ok)throw`failed to load wasm binary file at '${e}'`;return _.arrayBuffer()}).catch(()=>De(e));if(k)return new Promise((_,o)=>{k(e,p=>_(new Uint8Array(p)),o)})}return Promise.resolve().then(()=>De(e))}function ve(e,_,o){return vr(e).then(p=>WebAssembly.instantiate(p,_)).then(o,p=>{W(`failed to asynchronously prepare wasm: ${p}`),K(p)})}function Rr(e,_,o,p){return typeof WebAssembly.instantiateStreaming!="function"||Me(_)||ne(_)||be||typeof fetch!="function"?ve(_,o,p):fetch(_,{credentials:"same-origin"}).then(i=>WebAssembly.instantiateStreaming(i,o).then(p,function(s){return W(`wasm streaming compile failed: ${s}`),W("falling back to ArrayBuffer instantiation"),ve(_,o,p)}))}function Ar(){return{a:Jr}}function Gr(){var e=Ar();function _(p,i){return r=p.exports,Q=r.t,he(),Nr(r.u),lr(),r}function o(p){_(p.instance)}return hr(),oe||(oe=Dr()),Rr(ae,oe,e,o).catch(se),{}}var ye=e=>{for(;e.length>0;)e.shift()(t)};function Cr(e,_="i8"){switch(_.endsWith("*")&&(_="*"),_){case"i1":case"i8":return X[e];case"i16":return ee[e>>1];case"i32":return R[e>>2];case"i64":K("to do getValue(i64) use WASM_BIGINT");case"float":return te[e>>2];case"double":return _e[e>>3];case"*":return w[e>>2];default:K(`invalid type for getValue: ${_}`)}}var Re=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ae=(e,_,o)=>{for(var p=_+o,i=_;e[i]&&!(i>=p);)++i;if(i-_>16&&e.buffer&&Re)return Re.decode(e.subarray(_,i));for(var s="";_>10,56320|1023&Z)}}else s+=String.fromCharCode((31&g)<<6|a)}else s+=String.fromCharCode(g)}return s},L=(e,_)=>e?Ae(z,e,_):"";function Ir(e,_,o){return 0}var Ge=(e,_,o,p)=>{if(!(p>0))return 0;for(var i=o,s=o+p-1,g=0;g=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++g)),a<=127){if(o>=s)break;_[o++]=a}else if(a<=2047){if(o+1>=s)break;_[o++]=192|a>>6,_[o++]=128|63&a}else if(a<=65535){if(o+2>=s)break;_[o++]=224|a>>12,_[o++]=128|a>>6&63,_[o++]=128|63&a}else{if(o+3>=s)break;_[o++]=240|a>>18,_[o++]=128|a>>12&63,_[o++]=128|a>>6&63,_[o++]=128|63&a}}return _[o]=0,o-i},pe=(e,_,o)=>Ge(e,z,_,o);function jr(e,_,o){return 0}function Lr(e,_,o,p){}var Ur=e=>e%4==0&&(e%100!=0||e%400==0),Fr=[0,31,60,91,121,152,182,213,244,274,305,335],Yr=[0,31,59,90,120,151,181,212,243,273,304,334],wr=e=>(Ur(e.getFullYear())?Fr:Yr)[e.getMonth()]+e.getDate()-1,xr=(e,_)=>_+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*_:NaN;function Hr(e,_,o){var p=xr(e,_),i=new Date(1e3*p);R[o>>2]=i.getSeconds(),R[o+4>>2]=i.getMinutes(),R[o+8>>2]=i.getHours(),R[o+12>>2]=i.getDate(),R[o+16>>2]=i.getMonth(),R[o+20>>2]=i.getFullYear()-1900,R[o+24>>2]=i.getDay();var s=0|wr(i);R[o+28>>2]=s,R[o+36>>2]=-60*i.getTimezoneOffset();var g=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),M=g.getTimezoneOffset(),Z=0|(a!=M&&i.getTimezoneOffset()==Math.min(M,a));R[o+32>>2]=Z}var Xr=()=>2147483648,zr=e=>{var _=(e-Q.buffer.byteLength+65535)/65536;try{return Q.grow(_),he(),1}catch{}},ue={},Zr=()=>Te||"./this.program",V=()=>{if(!V.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Zr()};for(var _ in ue)ue[_]===void 0?delete e[_]:e[_]=ue[_];var o=[];for(var _ in e)o.push(`${_}=${e[_]}`);V.strings=o}return V.strings},Wr=(e,_)=>{for(var o=0;o{var o=Kr[e];_===0||_===10?((e===1?Er:W)(Ae(o,0)),o.length=0):o.push(_)},qr=e=>{for(var _=0,o=0;o=55296&&p<=57343?(_+=4,++o):_+=3}return _};function kr(e,_,o){var p=qr(e)+1,i=new Array(p);return Ge(e,i,0,i.length),i}var $r=(e,_)=>Math.ceil(e/_)*_,Jr={c:Ir,r:(e,_,o)=>{},h:jr,d:Lr,p:e=>{},o:(e,_)=>{},q:(e,_,o)=>{},l:()=>{K("")},s:(e,_,o)=>z.copyWithin(e,_,_+o),j:Hr,n:(e,_,o,p)=>{var i=new Date().getFullYear(),s=new Date(i,0,1),g=new Date(i,6,1),a=s.getTimezoneOffset(),M=g.getTimezoneOffset(),Z=Math.max(a,M);w[e>>2]=60*Z,R[_>>2]=+(a!=M);var ir=co=>co.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],cr=ir(s),sr=ir(g);MDate.now(),m:e=>{var _=z.length;e>>>=0;var o=Xr();if(e>o)return!1;for(var p=(a,M)=>a+(M-a%M)%M,i=1;i<=4;i*=2){var s=_*(1+.2/i);s=Math.min(s,e+100663296);var g=Math.min(o,p(Math.max(e,s),65536));if(zr(g))return!0}return!1},e:(e,_)=>{var o=0;return V().forEach((p,i)=>{var s=_+o;w[e+4*i>>2]=s,Wr(p,s),o+=p.length+1}),0},f:(e,_)=>{var o=V();w[e>>2]=o.length;var p=0;return o.forEach(i=>p+=i.length+1),w[_>>2]=p,0},a:e=>52,g:(e,_,o,p)=>52,k:Br,b:(e,_,o,p)=>{for(var i=0,s=0;s>2],a=w[_+4>>2];_+=8;for(var M=0;M>2]=i,0}},r=Gr();t._webidl_free=e=>(t._webidl_free=r.v)(e),t._webidl_malloc=e=>(t._webidl_malloc=r.w)(e);var ie,Ce=t._emscripten_bind_PeObject_getCode_0=e=>(Ce=t._emscripten_bind_PeObject_getCode_0=r.x)(e),Ie=t._emscripten_bind_PeObject_getName_1=(e,_)=>(Ie=t._emscripten_bind_PeObject_getName_1=r.y)(e,_),je=t._emscripten_bind_PeObject_getType_0=e=>(je=t._emscripten_bind_PeObject_getType_0=r.z)(e),Le=t._emscripten_bind_PeCoordsys_getCode_0=e=>(Le=t._emscripten_bind_PeCoordsys_getCode_0=r.A)(e),Ue=t._emscripten_bind_PeCoordsys_getName_1=(e,_)=>(Ue=t._emscripten_bind_PeCoordsys_getName_1=r.B)(e,_),Fe=t._emscripten_bind_PeCoordsys_getType_0=e=>(Fe=t._emscripten_bind_PeCoordsys_getType_0=r.C)(e),Ye=t._emscripten_bind_VoidPtr___destroy___0=e=>(Ye=t._emscripten_bind_VoidPtr___destroy___0=r.D)(e),we=t._emscripten_bind_PeDatum_getSpheroid_0=e=>(we=t._emscripten_bind_PeDatum_getSpheroid_0=r.E)(e),xe=t._emscripten_bind_PeDatum_getCode_0=e=>(xe=t._emscripten_bind_PeDatum_getCode_0=r.F)(e),He=t._emscripten_bind_PeDatum_getName_1=(e,_)=>(He=t._emscripten_bind_PeDatum_getName_1=r.G)(e,_),Xe=t._emscripten_bind_PeDatum_getType_0=e=>(Xe=t._emscripten_bind_PeDatum_getType_0=r.H)(e),ze=t._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=e=>(ze=t._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=r.I)(e),Ze=t._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=e=>(Ze=t._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=r.J)(e),We=t._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=e=>(We=t._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=r.K)(e),Be=t._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=e=>(Be=t._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=r.L)(e),Ke=t._emscripten_bind_PeDefs_get_PE_DD_MAX_0=e=>(Ke=t._emscripten_bind_PeDefs_get_PE_DD_MAX_0=r.M)(e),Ve=t._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=e=>(Ve=t._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=r.N)(e),qe=t._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=e=>(qe=t._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=r.O)(e),ke=t._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=e=>(ke=t._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=r.P)(e),$e=t._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=e=>($e=t._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=r.Q)(e),Je=t._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=e=>(Je=t._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=r.R)(e),Qe=t._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=e=>(Qe=t._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=r.S)(e),et=t._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=e=>(et=t._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=r.T)(e),tt=t._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=e=>(tt=t._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=r.U)(e),_t=t._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=e=>(_t=t._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=r.V)(e),rt=t._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=e=>(rt=t._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=r.W)(e),ot=t._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=e=>(ot=t._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=r.X)(e),nt=t._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=e=>(nt=t._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=r.Y)(e),pt=t._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=e=>(pt=t._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=r.Z)(e),it=t._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=e=>(it=t._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=r._)(e),ct=t._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=e=>(ct=t._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=r.$)(e),st=t._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=e=>(st=t._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=r.aa)(e),Pt=t._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=e=>(Pt=t._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=r.ba)(e),at=t._emscripten_bind_PeDefs_get_PE_PARM_X0_0=e=>(at=t._emscripten_bind_PeDefs_get_PE_PARM_X0_0=r.ca)(e),gt=t._emscripten_bind_PeDefs_get_PE_PARM_ND_0=e=>(gt=t._emscripten_bind_PeDefs_get_PE_PARM_ND_0=r.da)(e),yt=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=e=>(yt=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=r.ea)(e),ut=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=e=>(ut=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=r.fa)(e),dt=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=e=>(dt=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=r.ga)(e),ft=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=e=>(ft=t._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=r.ha)(e),Et=t._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=e=>(Et=t._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=r.ia)(e),bt=t._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=e=>(bt=t._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=r.ja)(e),mt=t._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=e=>(mt=t._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=r.ka)(e),Tt=t._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=e=>(Tt=t._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=r.la)(e),Ot=t._emscripten_bind_PeFactory_initialize_1=e=>(Ot=t._emscripten_bind_PeFactory_initialize_1=r.ma)(e),St=t._emscripten_bind_PeFactory_factoryByType_2=(e,_)=>(St=t._emscripten_bind_PeFactory_factoryByType_2=r.na)(e,_),Nt=t._emscripten_bind_PeFactory_fromString_2=(e,_)=>(Nt=t._emscripten_bind_PeFactory_fromString_2=r.oa)(e,_),ht=t._emscripten_bind_PeFactory_getCode_1=e=>(ht=t._emscripten_bind_PeFactory_getCode_1=r.pa)(e),lt=t._emscripten_bind_PeGCSExtent_PeGCSExtent_6=(e,_,o,p,i,s)=>(lt=t._emscripten_bind_PeGCSExtent_PeGCSExtent_6=r.qa)(e,_,o,p,i,s),Mt=t._emscripten_bind_PeGCSExtent_getLLon_0=e=>(Mt=t._emscripten_bind_PeGCSExtent_getLLon_0=r.ra)(e),Dt=t._emscripten_bind_PeGCSExtent_getSLat_0=e=>(Dt=t._emscripten_bind_PeGCSExtent_getSLat_0=r.sa)(e),vt=t._emscripten_bind_PeGCSExtent_getRLon_0=e=>(vt=t._emscripten_bind_PeGCSExtent_getRLon_0=r.ta)(e),Rt=t._emscripten_bind_PeGCSExtent_getNLat_0=e=>(Rt=t._emscripten_bind_PeGCSExtent_getNLat_0=r.ua)(e),At=t._emscripten_bind_PeGCSExtent___destroy___0=e=>(At=t._emscripten_bind_PeGCSExtent___destroy___0=r.va)(e),Gt=t._emscripten_bind_PeGeogcs_getDatum_0=e=>(Gt=t._emscripten_bind_PeGeogcs_getDatum_0=r.wa)(e),Ct=t._emscripten_bind_PeGeogcs_getPrimem_0=e=>(Ct=t._emscripten_bind_PeGeogcs_getPrimem_0=r.xa)(e),It=t._emscripten_bind_PeGeogcs_getUnit_0=e=>(It=t._emscripten_bind_PeGeogcs_getUnit_0=r.ya)(e),jt=t._emscripten_bind_PeGeogcs_getCode_0=e=>(jt=t._emscripten_bind_PeGeogcs_getCode_0=r.za)(e),Lt=t._emscripten_bind_PeGeogcs_getName_1=(e,_)=>(Lt=t._emscripten_bind_PeGeogcs_getName_1=r.Aa)(e,_),Ut=t._emscripten_bind_PeGeogcs_getType_0=e=>(Ut=t._emscripten_bind_PeGeogcs_getType_0=r.Ba)(e),Ft=t._emscripten_bind_PeGeogtran_isEqual_1=(e,_)=>(Ft=t._emscripten_bind_PeGeogtran_isEqual_1=r.Ca)(e,_),Yt=t._emscripten_bind_PeGeogtran_getGeogcs1_0=e=>(Yt=t._emscripten_bind_PeGeogtran_getGeogcs1_0=r.Da)(e),wt=t._emscripten_bind_PeGeogtran_getGeogcs2_0=e=>(wt=t._emscripten_bind_PeGeogtran_getGeogcs2_0=r.Ea)(e),xt=t._emscripten_bind_PeGeogtran_getParameters_0=e=>(xt=t._emscripten_bind_PeGeogtran_getParameters_0=r.Fa)(e),Ht=t._emscripten_bind_PeGeogtran_loadConstants_0=e=>(Ht=t._emscripten_bind_PeGeogtran_loadConstants_0=r.Ga)(e),Xt=t._emscripten_bind_PeGeogtran_getCode_0=e=>(Xt=t._emscripten_bind_PeGeogtran_getCode_0=r.Ha)(e),zt=t._emscripten_bind_PeGeogtran_getName_1=(e,_)=>(zt=t._emscripten_bind_PeGeogtran_getName_1=r.Ia)(e,_),Zt=t._emscripten_bind_PeGeogtran_getType_0=e=>(Zt=t._emscripten_bind_PeGeogtran_getType_0=r.Ja)(e),Wt=t._emscripten_bind_PeGTlistExtended_getGTlist_6=(e,_,o,p,i,s)=>(Wt=t._emscripten_bind_PeGTlistExtended_getGTlist_6=r.Ka)(e,_,o,p,i,s),Bt=t._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=e=>(Bt=t._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=r.La)(e),Kt=t._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=e=>(Kt=t._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=r.Ma)(e),Vt=t._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=e=>(Vt=t._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=r.Na)(e),qt=t._emscripten_bind_PeGTlistExtendedEntry_Delete_1=e=>(qt=t._emscripten_bind_PeGTlistExtendedEntry_Delete_1=r.Oa)(e),kt=t._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=e=>(kt=t._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=r.Pa)(e),$t=t._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=e=>($t=t._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=r.Qa)(e),Jt=t._emscripten_bind_PeHorizon_getNump_0=e=>(Jt=t._emscripten_bind_PeHorizon_getNump_0=r.Ra)(e),Qt=t._emscripten_bind_PeHorizon_getKind_0=e=>(Qt=t._emscripten_bind_PeHorizon_getKind_0=r.Sa)(e),e_=t._emscripten_bind_PeHorizon_getInclusive_0=e=>(e_=t._emscripten_bind_PeHorizon_getInclusive_0=r.Ta)(e),t_=t._emscripten_bind_PeHorizon_getSize_0=e=>(t_=t._emscripten_bind_PeHorizon_getSize_0=r.Ua)(e),__=t._emscripten_bind_PeHorizon_getCoord_0=e=>(__=t._emscripten_bind_PeHorizon_getCoord_0=r.Va)(e),r_=t._emscripten_bind_PeInteger_PeInteger_1=e=>(r_=t._emscripten_bind_PeInteger_PeInteger_1=r.Wa)(e),o_=t._emscripten_bind_PeInteger_get_val_0=e=>(o_=t._emscripten_bind_PeInteger_get_val_0=r.Xa)(e),n_=t._emscripten_bind_PeInteger_set_val_1=(e,_)=>(n_=t._emscripten_bind_PeInteger_set_val_1=r.Ya)(e,_),p_=t._emscripten_bind_PeInteger___destroy___0=e=>(p_=t._emscripten_bind_PeInteger___destroy___0=r.Za)(e),i_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=e=>(i_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=r._a)(e),c_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=e=>(c_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=r.$a)(e),s_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=e=>(s_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=r.ab)(e),P_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=e=>(P_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=r.bb)(e),a_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=e=>(a_=t._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=r.cb)(e),g_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=e=>(g_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=r.db)(e),y_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=e=>(y_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=r.eb)(e),u_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=e=>(u_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=r.fb)(e),d_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=e=>(d_=t._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=r.gb)(e),f_=t._emscripten_bind_PeParameter_getValue_0=e=>(f_=t._emscripten_bind_PeParameter_getValue_0=r.hb)(e),E_=t._emscripten_bind_PeParameter_getCode_0=e=>(E_=t._emscripten_bind_PeParameter_getCode_0=r.ib)(e),b_=t._emscripten_bind_PeParameter_getName_1=(e,_)=>(b_=t._emscripten_bind_PeParameter_getName_1=r.jb)(e,_),m_=t._emscripten_bind_PeParameter_getType_0=e=>(m_=t._emscripten_bind_PeParameter_getType_0=r.kb)(e),T_=t._emscripten_bind_PePCSInfo_getCentralMeridian_0=e=>(T_=t._emscripten_bind_PePCSInfo_getCentralMeridian_0=r.lb)(e),O_=t._emscripten_bind_PePCSInfo_getDomainMinx_0=e=>(O_=t._emscripten_bind_PePCSInfo_getDomainMinx_0=r.mb)(e),S_=t._emscripten_bind_PePCSInfo_getDomainMiny_0=e=>(S_=t._emscripten_bind_PePCSInfo_getDomainMiny_0=r.nb)(e),N_=t._emscripten_bind_PePCSInfo_getDomainMaxx_0=e=>(N_=t._emscripten_bind_PePCSInfo_getDomainMaxx_0=r.ob)(e),h_=t._emscripten_bind_PePCSInfo_getDomainMaxy_0=e=>(h_=t._emscripten_bind_PePCSInfo_getDomainMaxy_0=r.pb)(e),l_=t._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=e=>(l_=t._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=r.qb)(e),M_=t._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=e=>(M_=t._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=r.rb)(e),D_=t._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=e=>(D_=t._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=r.sb)(e),v_=t._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=e=>(v_=t._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=r.tb)(e),R_=t._emscripten_bind_PePCSInfo_isDensificationNeeded_0=e=>(R_=t._emscripten_bind_PePCSInfo_isDensificationNeeded_0=r.ub)(e),A_=t._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=e=>(A_=t._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=r.vb)(e),G_=t._emscripten_bind_PePCSInfo_isPannableRectangle_0=e=>(G_=t._emscripten_bind_PePCSInfo_isPannableRectangle_0=r.wb)(e),C_=t._emscripten_bind_PePCSInfo_generate_2=(e,_)=>(C_=t._emscripten_bind_PePCSInfo_generate_2=r.xb)(e,_),I_=t._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=e=>(I_=t._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=r.yb)(e),j_=t._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=e=>(j_=t._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=r.zb)(e),L_=t._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=e=>(L_=t._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=r.Ab)(e),U_=t._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=e=>(U_=t._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=r.Bb)(e),F_=t._emscripten_bind_PePrimem_getLongitude_0=e=>(F_=t._emscripten_bind_PePrimem_getLongitude_0=r.Cb)(e),Y_=t._emscripten_bind_PePrimem_getCode_0=e=>(Y_=t._emscripten_bind_PePrimem_getCode_0=r.Db)(e),w_=t._emscripten_bind_PePrimem_getName_1=(e,_)=>(w_=t._emscripten_bind_PePrimem_getName_1=r.Eb)(e,_),x_=t._emscripten_bind_PePrimem_getType_0=e=>(x_=t._emscripten_bind_PePrimem_getType_0=r.Fb)(e),H_=t._emscripten_bind_PeProjcs_getGeogcs_0=e=>(H_=t._emscripten_bind_PeProjcs_getGeogcs_0=r.Gb)(e),X_=t._emscripten_bind_PeProjcs_getParameters_0=e=>(X_=t._emscripten_bind_PeProjcs_getParameters_0=r.Hb)(e),z_=t._emscripten_bind_PeProjcs_getUnit_0=e=>(z_=t._emscripten_bind_PeProjcs_getUnit_0=r.Ib)(e),Z_=t._emscripten_bind_PeProjcs_loadConstants_0=e=>(Z_=t._emscripten_bind_PeProjcs_loadConstants_0=r.Jb)(e),W_=t._emscripten_bind_PeProjcs_horizonGcsGenerate_0=e=>(W_=t._emscripten_bind_PeProjcs_horizonGcsGenerate_0=r.Kb)(e),B_=t._emscripten_bind_PeProjcs_horizonPcsGenerate_0=e=>(B_=t._emscripten_bind_PeProjcs_horizonPcsGenerate_0=r.Lb)(e),K_=t._emscripten_bind_PeProjcs_getCode_0=e=>(K_=t._emscripten_bind_PeProjcs_getCode_0=r.Mb)(e),V_=t._emscripten_bind_PeProjcs_getName_1=(e,_)=>(V_=t._emscripten_bind_PeProjcs_getName_1=r.Nb)(e,_),q_=t._emscripten_bind_PeProjcs_getType_0=e=>(q_=t._emscripten_bind_PeProjcs_getType_0=r.Ob)(e),k_=t._emscripten_bind_PeSpheroid_getAxis_0=e=>(k_=t._emscripten_bind_PeSpheroid_getAxis_0=r.Pb)(e),$_=t._emscripten_bind_PeSpheroid_getFlattening_0=e=>($_=t._emscripten_bind_PeSpheroid_getFlattening_0=r.Qb)(e),J_=t._emscripten_bind_PeSpheroid_getCode_0=e=>(J_=t._emscripten_bind_PeSpheroid_getCode_0=r.Rb)(e),Q_=t._emscripten_bind_PeSpheroid_getName_1=(e,_)=>(Q_=t._emscripten_bind_PeSpheroid_getName_1=r.Sb)(e,_),er=t._emscripten_bind_PeSpheroid_getType_0=e=>(er=t._emscripten_bind_PeSpheroid_getType_0=r.Tb)(e),tr=t._emscripten_bind_PeUnit_getUnitFactor_0=e=>(tr=t._emscripten_bind_PeUnit_getUnitFactor_0=r.Ub)(e),_r=t._emscripten_bind_PeUnit_getCode_0=e=>(_r=t._emscripten_bind_PeUnit_getCode_0=r.Vb)(e),rr=t._emscripten_bind_PeUnit_getName_1=(e,_)=>(rr=t._emscripten_bind_PeUnit_getName_1=r.Wb)(e,_),or=t._emscripten_bind_PeUnit_getType_0=e=>(or=t._emscripten_bind_PeUnit_getType_0=r.Xb)(e),nr=t._emscripten_bind_PeVersion_version_string_0=e=>(nr=t._emscripten_bind_PeVersion_version_string_0=r.Yb)(e);function pr(){function e(){ie||(ie=!0,t.calledRun=!0,Ne||(Or(),fe(t),Sr()))}re>0||(Tr(),re>0||e())}function d(){}function q(e){return(e||d).__cache__}function T(e,_){var o=q(_),p=o[e];return p||((p=Object.create((_||d).prototype)).ptr=e,o[e]=p)}function Qr(e,_){return T(e.ptr,_)}function eo(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete q(e.__class__)[e.ptr]}function to(e,_){return e.ptr===_.ptr}function _o(e){return e.ptr}function ro(e){return e.__class__}t._pe_getPeGTlistExtendedEntrySize=()=>(t._pe_getPeGTlistExtendedEntrySize=r.Zb)(),t._pe_getPeGTlistExtendedGTsSize=()=>(t._pe_getPeGTlistExtendedGTsSize=r._b)(),t._pe_getPeHorizonSize=()=>(t._pe_getPeHorizonSize=r.$b)(),t._pe_geog_to_geog=(e,_,o,p,i)=>(t._pe_geog_to_geog=r.bc)(e,_,o,p,i),t._pe_geog_to_proj=(e,_,o)=>(t._pe_geog_to_proj=r.cc)(e,_,o),t._pe_geog_to_dd=(e,_,o,p,i)=>(t._pe_geog_to_dd=r.dc)(e,_,o,p,i),t._pe_dd_to_geog=(e,_,o,p)=>(t._pe_dd_to_geog=r.ec)(e,_,o,p),t._pe_geog_to_ddm=(e,_,o,p,i)=>(t._pe_geog_to_ddm=r.fc)(e,_,o,p,i),t._pe_ddm_to_geog=(e,_,o,p)=>(t._pe_ddm_to_geog=r.gc)(e,_,o,p),t._pe_geog_to_dms=(e,_,o,p,i)=>(t._pe_geog_to_dms=r.hc)(e,_,o,p,i),t._pe_dms_to_geog=(e,_,o,p)=>(t._pe_dms_to_geog=r.ic)(e,_,o,p),t._pe_geog_to_mgrs_extended=(e,_,o,p,i,s,g)=>(t._pe_geog_to_mgrs_extended=r.jc)(e,_,o,p,i,s,g),t._pe_mgrs_to_geog_extended=(e,_,o,p,i)=>(t._pe_mgrs_to_geog_extended=r.kc)(e,_,o,p,i),t._pe_geog_to_usng=(e,_,o,p,i,s,g)=>(t._pe_geog_to_usng=r.lc)(e,_,o,p,i,s,g),t._pe_usng_to_geog=(e,_,o,p)=>(t._pe_usng_to_geog=r.mc)(e,_,o,p),t._pe_geog_to_utm=(e,_,o,p,i)=>(t._pe_geog_to_utm=r.nc)(e,_,o,p,i),t._pe_utm_to_geog=(e,_,o,p,i)=>(t._pe_utm_to_geog=r.oc)(e,_,o,p,i),t._pe_object_to_string_ext=(e,_,o)=>(t._pe_object_to_string_ext=r.pc)(e,_,o),t._pe_proj_to_geog_center=(e,_,o,p)=>(t._pe_proj_to_geog_center=r.qc)(e,_,o,p),t.getValue=Cr,t.UTF8ToString=L,B=function e(){ie||pr(),ie||(B=e)},pr(),d.prototype=Object.create(d.prototype),d.prototype.constructor=d,d.prototype.__class__=d,d.__cache__={},t.WrapperObject=d,t.getCache=q,t.wrapPointer=T,t.castObject=Qr,t.NULL=T(0),t.destroy=eo,t.compare=to,t.getPointer=_o,t.getClass=ro;var P={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(P.needed){for(var e=0;e=P.size?(ge(i>0),P.needed+=i,o=t._webidl_malloc(i),P.temps.push(o)):(o=P.buffer+P.pos,P.pos+=i),o},copy(e,_,o){o/=_.BYTES_PER_ELEMENT;for(var p=0;p{const s=k(e,t,n);for(const c of o){const i=j(t,c,n);for(const r in s)i[r]=s[r]}}}function k(e,o,t){if((e==null?void 0:e.type)==="resource")return z(e,o,t);switch((e==null?void 0:e.type)??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:n,write:s}=Y;return{read:n,write:s}}}}function z(e,o,t){const n=N(o,t);return{type:String,read:(s,c,i)=>{const r=x(s,c,i);return n.type===String?r:typeof n.type=="function"?new n.type({url:r}):void 0},write:{writer(s,c,i,r){if(!(r!=null&&r.resources))return typeof s=="string"?void(c[i]=v(s,r)):void(c[i]=s.write({},r));const a=Q(s),p=v(a,{...r,verifyItemRelativeUrls:r!=null&&r.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},S.NO),d=n.type!==String&&(!Z(this)||(r==null?void 0:r.origin)&&this.originIdOf(t)>b(r.origin)),l={object:this,propertyName:t,value:s,targetUrl:p,dest:c,targetPropertyName:i,context:r,params:e};r!=null&&r.portalItem&&p&&!A(p)?d&&(e!=null&&e.contentAddressed)?g(l):d?C(l):H(l):r!=null&&r.portalItem&&(p==null||O(p)!=null||U(p)||d)?g(l):c[i]=p}}}}function g(e){var h;const{targetUrl:o,params:t,value:n,context:s,dest:c,targetPropertyName:i}=e;if(!s.portalItem)return;const r=R(o),a=I(n,o,s);if(t!=null&&t.contentAddressed&&a.type!=="json")return void((h=s.messages)==null?void 0:h.push(new F("persistable:contentAddressingUnsupported",`Property "${i}" is trying to serializing a resource with content of type ${a.type} with content addressing. Content addressing is only supported for json resources.`,{content:a})));const p=t!=null&&t.contentAddressed&&a.type==="json"?V(a.jsonString):(r==null?void 0:r.filename)??$(),d=J((t==null?void 0:t.prefix)??(r==null?void 0:r.prefix),p),l=`${d}.${y(a)}`;if(t!=null&&t.contentAddressed&&s.resources&&a.type==="json"){const m=s.resources.toKeep.find(({resource:f})=>f.path===l)??s.resources.toAdd.find(({resource:f})=>f.path===l);if(m)return void(c[i]=m.resource.itemRelativeUrl)}const u=s.portalItem.resourceFromPath(l);U(o)&&s.resources&&s.resources.pendingOperations.push(K(o).then(m=>{u.path=`${d}.${y({type:"blob",blob:m})}`,c[i]=u.itemRelativeUrl}).catch(()=>{}));const P=(t==null?void 0:t.compress)??!1;s.resources&&w({...e,resource:u,content:a,compress:P,updates:s.resources.toAdd}),c[i]=u.itemRelativeUrl}function C(e){const{context:o,targetUrl:t,params:n,value:s,dest:c,targetPropertyName:i}=e;if(!o.portalItem)return;const r=o.portalItem.resourceFromPath(t),a=I(s,t,o),p=y(a),d=W(r.path),l=(n==null?void 0:n.compress)??!1;p===d?(o.resources&&w({...e,resource:r,content:a,compress:l,updates:o.resources.toUpdate}),c[i]=t):g(e)}function H({context:e,targetUrl:o,dest:t,targetPropertyName:n}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(o),compress:!1}),t[n]=o)}function w({object:e,propertyName:o,updates:t,resource:n,content:s,compress:c}){const i=r=>{T(e,o,r)};t.push({resource:n,content:s,compress:c,finish:i})}function I(e,o,t){return typeof e=="string"?{type:"url",url:o}:{type:"json",jsonString:JSON.stringify(e.toJSON(t))}}function Q(e){return e==null?null:typeof e=="string"?e:e.url}function T(e,o,t){typeof e[o]=="string"?e[o]=t.url:e[o].url=t.url}export{B as j}; diff --git a/build/assets/plane-aHrUkISy.js b/build/assets/plane-aHrUkISy.js new file mode 100644 index 0000000..22033e4 --- /dev/null +++ b/build/assets/plane-aHrUkISy.js @@ -0,0 +1 @@ +import{fE as V,au as f,fF as g,W as p,c2 as T,at as $,aq as X}from"./index-DKOmzAMm.js";import{e as b}from"./mat3f64-q3fE-ZOt.js";import{e as x}from"./mat4f64-CSKppSlJ.js";import{e as C}from"./quatf64-Bdb9ZJJK.js";import{n as L}from"./vec2f64-DA6GkJuH.js";class r{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return this._itemsPtr===0&&V(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new r(L)}static createVec3f64(){return new r(f)}static createVec4f64(){return new r(g)}static createMat3f64(){return new r(b)}static createMat4f64(){return new r(x)}static createQuatf64(){return new r(C)}get test(){}}r.createVec2f64();const Z=r.createVec3f64();r.createVec4f64();r.createMat3f64();const d=r.createMat4f64(),j=r.createQuatf64();function q(t=k){return[t[0],t[1],t[2],t[3]]}function B(t){return t}function y(t,e,i,s=q()){const I=i[0]-e[0],h=i[1]-e[1],a=i[2]-e[2],c=t[0]-e[0],w=t[1]-e[1],A=t[2]-e[2],_=h*A-a*w,E=a*c-I*A,P=I*w-h*c,F=_*_+E*E+P*P,l=Math.abs(F-1)>1e-5&&F>1e-12?1/Math.sqrt(F):1;return s[0]=_*l,s[1]=E*l,s[2]=P*l,s[3]=-(s[0]*t[0]+s[1]*t[1]+s[2]*t[2]),s}function O(t,e,i,s=0,I=Math.floor(i*(1/3)),h=Math.floor(i*(2/3))){if(i<3)return!1;e(o,s);let a=I,c=!1;for(;a{var d;const{keyField:r}=m;t&&r&&((d=s.fieldsIndex)!=null&&d.has(r))&&!t.includes(r)&&t.push(r)}),t}function g(s,p){return s.popupTemplate?s.popupTemplate:p!=null&&p.defaultPopupTemplateEnabled&&s.defaultPopupTemplate!=null?s.defaultPopupTemplate:null}export{x as n,g as p,S as s}; diff --git a/build/assets/portalLayers-CSGJfvg_.js b/build/assets/portalLayers-CSGJfvg_.js new file mode 100644 index 0000000..1d2d19d --- /dev/null +++ b/build/assets/portalLayers-CSGJfvg_.js @@ -0,0 +1 @@ +import{S as w,s as v,k as f,m as p}from"./index-DKOmzAMm.js";import{s as S}from"./associatedFeatureServiceUtils-D9v5WjkL.js";import{b as I,i as h,a as M}from"./lazyLayerLoader-BkbwrjyD.js";class P{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(a,t){const r=this._serviceMetadatas.get(a);if(r)return r;const s=await I(a,t);return this._serviceMetadatas.set(a,s),s}async fetchItemData(a){const{id:t}=a;if(!t)return null;const{_itemDatas:r}=this;if(r.has(t))return r.get(t);const s=await a.fetchData();return r.set(t,s),s}async fetchCustomParameters(a,t){const r=await this.fetchItemData(a);return r&&typeof r=="object"&&(t?t(r):r.customParameters)||null}}function m(e){const a={id:e.id,name:e.name},t=h(e.type);return t!=="FeatureLayer"&&(a.layerType=t),a}async function T(e,a,t){var r,s,n;if((e==null?void 0:e.layers)==null||(e==null?void 0:e.tables)==null){const c=await t.fetchServiceMetadata(a,{customParameters:(r=y(e))==null?void 0:r.customParameters});(e=e||{}).layers=e.layers||((s=c==null?void 0:c.layers)==null?void 0:s.map(m)),e.tables=e.tables||((n=c==null?void 0:c.tables)==null?void 0:n.map(m))}return e}function y(e){if(!e)return null;const{layers:a,tables:t}=e;return a!=null&&a.length?a[0]:t!=null&&t.length?t[0]:null}function G(e,a){return a==null?null:[...e.layers||[],...e.tables||[]].find(t=>t.id===a)}function te(e,a){return[...e.layers||[],...e.tables||[]].filter(({layerType:t})=>t?t===a:a==="ArcGISFeatureLayer")}function L(e){var a,t;return(((a=e==null?void 0:e.layers)==null?void 0:a.length)??0)+(((t=e==null?void 0:e.tables)==null?void 0:t.length)??0)}function re(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function C(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function F(e,a,t){var n,c,l,i;if(!(e!=null&&e.url))return a??{};if(a??(a={}),!a.layers){const u=await t.fetchServiceMetadata(e.url);a.layers=(n=u.layers)==null?void 0:n.map(m)}const{serverUrl:r,portalItem:s}=await S(e.url,{sceneLayerItem:e,customParameters:(c=y(a))==null?void 0:c.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(r==null)return a.tables=[],a;if(!a.tables&&s){const u=await s.fetchData();if(u!=null&&u.tables)a.tables=u.tables.map(m);else{const o=await t.fetchServiceMetadata(r,{customParameters:(l=y(u))==null?void 0:l.customParameters});a.tables=(i=o==null?void 0:o.tables)==null?void 0:i.map(m)}}if(a.tables)for(const u of a.tables)u.url=`${r}/${u.id}`;return a}async function D(e){let{portalItem:a}=e;!a||a instanceof w||(a=new w(a));const t=await O(a);return new t.constructor({portalItem:a,...t.properties})}async function O(e){await e.load();const a=new P;return _(await N(e,a))}async function N(e,a){switch(e.type){case"3DTiles Service":return A();case"CSV":return x();case"Feature Collection":return V(e);case"Feature Service":return j(e,a);case"Feed":return H();case"GeoJson":return U();case"Group Layer":return Q();case"Image Service":return W(e,a);case"KML":return R();case"Knowledge Graph Layer":return z();case"Map Service":return $(e,a);case"Media Layer":return X();case"Scene Service":return K(e,a);case"Stream Service":return J();case"Vector Tile Service":return k();case"WFS":return E();case"WMS":return q();case"WMTS":return B();default:throw new v("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function _(e){const a=e.className,t=M[a];return{constructor:await t(),properties:e.properties}}async function $(e,a){return await Y(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function j(e,a){const t=await b(e,a);if(typeof t=="object"){const{sourceJSON:r,className:s}=t,n={sourceJSON:r};return t.id!=null&&(n.layerId=t.id),{className:s||"FeatureLayer",properties:n}}return{className:"GroupLayer"}}async function K(e,a){var r;const t=await b(e,a,async()=>{try{if(!e.url)return[];const{serverUrl:s}=await S(e.url,{sceneLayerItem:e}),n=await a.fetchServiceMetadata(s);return(n==null?void 0:n.tables)??[]}catch{return[]}});if(typeof t=="object"){const s={};let n;if(t.id!=null?(s.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,(r=e.typeKeywords)==null?void 0:r.length){for(const l of Object.keys(f))if(e.typeKeywords.includes(l))return{className:f[l]}}const c=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,l=>{var i;return(i=y(l))==null?void 0:i.customParameters})});return{className:f[c==null?void 0:c.layerType]||"SceneLayer",properties:s}}if(t===!1){const s=await a.fetchServiceMetadata(e.url);if((s==null?void 0:s.layerType)==="Voxel")return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function V(e){await e.load();const a=p(e,"Map Notes"),t=p(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if(p(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return L(r)===1?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function W(e,a){var i,u,o;await e.load();const t=((i=e.typeKeywords)==null?void 0:i.map(g=>g.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),s=r==null?void 0:r.layerType;if(s==="ArcGISTiledImageServiceLayer")return{className:"ImageryTileLayer"};if(s==="ArcGISImageServiceLayer")return{className:"ImageryLayer"};const n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),c=(u=n.cacheType)==null?void 0:u.toLowerCase(),l=(o=n.capabilities)==null?void 0:o.toLowerCase().includes("tilesonly");return c==="map"||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function J(){return{className:"StreamLayer"}}function k(){return{className:"VectorTileLayer"}}function U(){return{className:"GeoJSONLayer"}}function A(){return{className:"IntegratedMesh3DTilesLayer"}}function x(){return{className:"CSVLayer"}}function R(){return{className:"KMLLayer"}}function z(){return{className:"KnowledgeGraphLayer"}}function E(){return{className:"WFSLayer"}}function q(){return{className:"WMSLayer"}}function B(){return{className:"WMTSLayer"}}function H(){return{className:"StreamLayer"}}function Q(){return{className:"GroupLayer"}}function X(){return{className:"MediaLayer"}}async function Y(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}async function b(e,a,t){const{url:r,type:s}=e,n=s==="Feature Service";if(!r)return{};if(/\/\d+$/.test(r)){if(n){const i=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,u=>{var o;return(o=y(u))==null?void 0:o.customParameters})});return{id:i.id,className:h(i.type),sourceJSON:i}}return{}}await e.load();let c=await a.fetchItemData(e);if(n){const i=await T(c,r,a),u=d(i);if(typeof u=="object"){const o=G(i,u.id);u.className=C(o==null?void 0:o.layerType)}return u}if(s==="Scene Service"&&(c=await F(e,c,a)),L(c)>0)return d(c);const l=await a.fetchServiceMetadata(r);return t&&(l.tables=await t()),d(l)}function d(e){var a;return L(e)===1&&{id:(a=y(e))==null?void 0:a.id}}const se=Object.freeze(Object.defineProperty({__proto__:null,fromItem:D,selectLayerClassPath:N},Symbol.toStringTag,{value:"Module"}));export{T as a,re as c,N as d,P as e,C as i,te as n,F as o,se as p,y as s,m as t,L as u}; diff --git a/build/assets/portalUtils-DDekVd1c.js b/build/assets/portalUtils-DDekVd1c.js new file mode 100644 index 0000000..66a0123 --- /dev/null +++ b/build/assets/portalUtils-DDekVd1c.js @@ -0,0 +1 @@ +import{C as u}from"./index-DKOmzAMm.js";function l(r,n){return r===null?n:new u({url:r.field("url")})}export{l}; diff --git a/build/assets/projection-Ch_noS-l.js b/build/assets/projection-Ch_noS-l.js new file mode 100644 index 0000000..4c7b1c5 --- /dev/null +++ b/build/assets/projection-Ch_noS-l.js @@ -0,0 +1 @@ +import{bk as C,bl as b,bm as R,bn as v,at as w,bo as O,bp as x,bq as $,br as B,W,bs as Y,bt as q,bu as z,au as j,bv as J}from"./index-DKOmzAMm.js";import{j as h,n as S}from"./mat3-BNGRf_pC.js";import{e as D}from"./mat3f64-q3fE-ZOt.js";import{o as g,e as H}from"./mat4f64-CSKppSlJ.js";import{a as E}from"./spatialReferenceEllipsoidUtils-BKSgV6gI.js";import{u as G}from"./computeTranslationToOriginAndRotation-BxPeFPaY.js";import{t as L,o as I}from"./DoubleArray-D2IDWC15.js";import{i as P,T as y}from"./BufferView-DOhKdt-N.js";import{f as K,l as V,e as k}from"./vec3-C6eb5QY9.js";import{n as Q}from"./vec4-n1PBj5SL.js";import"./vec2-CurFBDJu.js";const ur="Projection may be possible after calling projection.load().";function mr(r,o,e,t){r.error(`Failed to project from (wkid:${o.wkid}) to (wkid:${e.wkid}).${t?" ":""}${t}`)}function pr(r,o,e,t,n){return M(T.TO_PCPF,P.fromTypedArray(r),p.NORMAL,y.fromTypedArray(o),y.fromTypedArray(e),t,P.fromTypedArray(n))?n:null}function Tr(r,o,e,t,n){return M(T.FROM_PCPF,P.fromTypedArray(r),p.NORMAL,y.fromTypedArray(o),y.fromTypedArray(e),t,P.fromTypedArray(n))?n:null}function Pr(r,o,e){return C(r,o,0,e,E(o),0,r.length/3)?e:null}function yr(r,o,e){return C(r,E(e),0,o,e,0,r.length/3)?o:null}function Ar(r,o,e){return h(i,e),K(o,r,i),b(i)&&V(o,o),o}function Fr(r,o,e){return S(i,e),Q(o,r,i),b(i)&&V(o,o,4),o}function dr(r,o,e,t,n){if(!M(T.TO_PCPF,P.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),p.TANGENT,y.fromTypedArray(o),y.fromTypedArray(e),t,P.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let f=3;fj()?(a[0]=o[0]/e,a[1]=o[1]/e,a[2]=o[2]/e):(a[0]=1,a[1]=0,a[2]=0),s}function b(a,o,s){const e=o[0],r=o[1],c=o[2],t=o[3],i=s[0],u=s[1],n=s[2],h=s[3];return a[0]=e*h+t*i+r*n-c*u,a[1]=r*h+t*u+c*i-e*n,a[2]=c*h+t*n+e*u-r*i,a[3]=t*h-e*i-r*u-c*n,a}function Q(a,o,s){s*=.5;const e=o[0],r=o[1],c=o[2],t=o[3],i=Math.sin(s),u=Math.cos(s);return a[0]=e*u+t*i,a[1]=r*u+c*i,a[2]=c*u-r*i,a[3]=t*u-e*i,a}function R(a,o,s){s*=.5;const e=o[0],r=o[1],c=o[2],t=o[3],i=Math.sin(s),u=Math.cos(s);return a[0]=e*u-c*i,a[1]=r*u+t*i,a[2]=c*u+e*i,a[3]=t*u-r*i,a}function U(a,o,s){s*=.5;const e=o[0],r=o[1],c=o[2],t=o[3],i=Math.sin(s),u=Math.cos(s);return a[0]=e*u+r*i,a[1]=r*u-e*i,a[2]=c*u+t*i,a[3]=t*u-c*i,a}function V(a,o){const s=o[0],e=o[1],r=o[2];return a[0]=s,a[1]=e,a[2]=r,a[3]=Math.sqrt(Math.abs(1-s*s-e*e-r*r)),a}function g(a,o,s,e){const r=o[0],c=o[1],t=o[2],i=o[3];let u,n,h,f,l,m=s[0],p=s[1],q=s[2],$=s[3];return n=r*m+c*p+t*q+i*$,n<0&&(n=-n,m=-m,p=-p,q=-q,$=-$),1-n>j()?(u=Math.acos(n),h=Math.sin(u),f=Math.sin((1-e)*u)/h,l=Math.sin(e*u)/h):(f=1-e,l=e),a[0]=f*r+l*m,a[1]=f*c+l*p,a[2]=f*t+l*q,a[3]=f*i+l*$,a}function aa(a){const o=J,s=o(),e=o(),r=o(),c=Math.sqrt(1-s),t=Math.sqrt(s);return a[0]=c*Math.sin(2*Math.PI*e),a[1]=c*Math.cos(2*Math.PI*e),a[2]=t*Math.sin(2*Math.PI*r),a[3]=t*Math.cos(2*Math.PI*r),a}function oa(a,o){const s=o[0],e=o[1],r=o[2],c=o[3],t=s*s+e*e+r*r+c*c,i=t?1/t:0;return a[0]=-s*i,a[1]=-e*i,a[2]=-r*i,a[3]=c*i,a}function ea(a,o){return a[0]=-o[0],a[1]=-o[1],a[2]=-o[2],a[3]=o[3],a}function v(a,o){const s=o[0]+o[4]+o[8];let e;if(s>0)e=Math.sqrt(s+1),a[3]=.5*e,e=.5/e,a[0]=(o[5]-o[7])*e,a[1]=(o[6]-o[2])*e,a[2]=(o[1]-o[3])*e;else{let r=0;o[4]>o[0]&&(r=1),o[8]>o[3*r+r]&&(r=2);const c=(r+1)%3,t=(r+2)%3;e=Math.sqrt(o[3*r+r]-o[3*c+c]-o[3*t+t]+1),a[r]=.5*e,e=.5/e,a[3]=(o[3*c+t]-o[3*t+c])*e,a[c]=(o[3*c+r]+o[3*r+c])*e,a[t]=(o[3*t+r]+o[3*r+t])*e}return a}function ra(a,o,s,e){const r=.5*Math.PI/180;o*=r,s*=r,e*=r;const c=Math.sin(o),t=Math.cos(o),i=Math.sin(s),u=Math.cos(s),n=Math.sin(e),h=Math.cos(e);return a[0]=c*u*h-t*i*n,a[1]=t*i*h+c*u*n,a[2]=t*u*n-c*i*h,a[3]=t*u*h+c*i*n,a}function sa(a){return"quat("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"}const ca=O,ta=S,ia=T,ua=b,na=Y,ha=k,Ma=w,z=W,fa=z,E=X,la=E,P=Z,ma=B,pa=C;function qa(a,o,s){const e=D(o,s);return e<-.999999?(d(M,$a,o),F(M)<1e-6&&d(M,ga,o),G(M,M),A(a,M,Math.PI),a):e>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(d(M,o,s),a[0]=M[0],a[1]=M[1],a[2]=M[2],a[3]=1+e,P(a,a))}const M=H(),$a=x(1,0,0),ga=x(0,1,0);function da(a,o,s,e,r,c){return g(y,o,r,c),g(I,s,e,c),g(a,y,I,2*c*(1-c)),a}const y=_(),I=_();function Pa(a,o,s,e){const r=ya;return r[0]=s[0],r[3]=s[1],r[6]=s[2],r[1]=e[0],r[4]=e[1],r[7]=e[2],r[2]=-o[0],r[5]=-o[1],r[8]=-o[2],P(a,v(a,r))}const ya=L();Object.freeze(Object.defineProperty({__proto__:null,add:ia,calculateW:V,conjugate:ea,copy:ca,dot:ha,equals:pa,exactEquals:ma,fromEuler:ra,fromMat3:v,getAxisAngle:N,identity:K,invert:oa,len:fa,length:z,lerp:Ma,mul:ua,multiply:b,normalize:P,random:aa,rotateX:Q,rotateY:R,rotateZ:U,rotationTo:qa,scale:na,set:ta,setAxes:Pa,setAxisAngle:A,slerp:g,sqlerp:da,sqrLen:la,squaredLength:E,str:sa},Symbol.toStringTag,{value:"Module"}));export{A as I,ma as N,ea as O,ra as T,ta as X,N as v,b as x}; diff --git a/build/assets/quatf64-Bdb9ZJJK.js b/build/assets/quatf64-Bdb9ZJJK.js new file mode 100644 index 0000000..cf88728 --- /dev/null +++ b/build/assets/quatf64-Bdb9ZJJK.js @@ -0,0 +1 @@ +function t(){return[0,0,0,1]}function u(e){return[e[0],e[1],e[2],e[3]]}function c(e,r,n,o){return[e,r,n,o]}function a(e,r){return new Float64Array(e,r,4)}const l=t();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:l,clone:u,create:t,createView:a,fromValues:c},Symbol.toStringTag,{value:"Module"}));export{t as e,l as o,u as r}; diff --git a/build/assets/query-CQvaiR4K.js b/build/assets/query-CQvaiR4K.js new file mode 100644 index 0000000..acb786a --- /dev/null +++ b/build/assets/query-CQvaiR4K.js @@ -0,0 +1 @@ +import{de as S,I as x,U as E,aV as O,df as f,aH as g}from"./index-DKOmzAMm.js";import{R}from"./normalizeUtils-DIcj7CYy.js";import{t as F}from"./pbfQueryUtils-D2YxxSfN.js";function p(r){const e={};for(const i in r){if(i==="declaredClass")continue;const t=r[i];if(t!=null&&typeof t!="function")if(Array.isArray(t)){e[i]=[];for(let n=0;ne.data.attachmentGroups)}async function T(n,t,o){const{objectIds:a}=t,e=[];for(const s of a)e.push(p(n.path+"/"+s+"/attachments",o));return Promise.all(e).then(s=>a.map((c,r)=>({parentObjectId:c,attachmentInfos:s[r].data.attachmentInfos})))}export{S as executeAttachmentQuery,T as fetchAttachments,G as processAttachmentQueryResult}; diff --git a/build/assets/queryTopFeatures-De5r1rPC.js b/build/assets/queryTopFeatures-De5r1rPC.js new file mode 100644 index 0000000..f1f361f --- /dev/null +++ b/build/assets/queryTopFeatures-De5r1rPC.js @@ -0,0 +1 @@ +import{de as p,I as c,U as F,aV as f,aH as E,df as a}from"./index-DKOmzAMm.js";import{R as x}from"./normalizeUtils-DIcj7CYy.js";import{t as j}from"./query-CQvaiR4K.js";const m="Layer does not support extent calculation.";function O(o,e){var l,y;const n=o.geometry,t=o.toJSON(),r=t;if(n!=null&&(r.geometry=JSON.stringify(n),r.geometryType=E(n),r.inSR=a(n.spatialReference)),(l=t.topFilter)!=null&&l.groupByFields&&(r.topFilter.groupByFields=t.topFilter.groupByFields.join(",")),(y=t.topFilter)!=null&&y.orderByFields&&(r.topFilter.orderByFields=t.topFilter.orderByFields.join(",")),t.topFilter&&(r.topFilter=JSON.stringify(r.topFilter)),t.objectIds&&(r.objectIds=t.objectIds.join(",")),t.orderByFields&&(r.orderByFields=t.orderByFields.join(",")),t.outFields&&!(e!=null&&e.returnCountOnly||e!=null&&e.returnExtentOnly||e!=null&&e.returnIdsOnly)?t.outFields.includes("*")?r.outFields="*":r.outFields=t.outFields.join(","):delete r.outFields,t.outSR?r.outSR=a(t.outSR):n&&t.returnGeometry&&(r.outSR=r.inSR),t.returnGeometry&&delete t.returnGeometry,t.timeExtent){const s=t.timeExtent,{start:i,end:u}=s;i==null&&u==null||(r.time=i===u?i:`${i??"null"},${u??"null"}`),delete t.timeExtent}return r}async function I(o,e,n,t){const r=await d(o,e,"json",t);return p(e,n,r.data),r}async function R(o,e,n){return e.timeExtent!=null&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:d(o,e,"json",n,{returnIdsOnly:!0})}async function h(o,e,n){return e.timeExtent!=null&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:d(o,e,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}).then(t=>{const r=t.data;if(r.hasOwnProperty("extent"))return t;if(r.features)throw new Error(m);if(r.hasOwnProperty("count"))throw new Error(m);return t})}function w(o,e,n){return e.timeExtent!=null&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):d(o,e,"json",n,{returnIdsOnly:!0,returnCountOnly:!0})}function d(o,e,n,t={},r={}){const l=typeof o=="string"?c(o):o,y=e.geometry?[e.geometry]:[];return t.responseType="json",x(y,null,t).then(s=>{const i=s==null?void 0:s[0];i!=null&&((e=e.clone()).geometry=i);const u=j({...l.query,f:n,...r,...O(e,r)});return F(f(l.path,"queryTopFeatures"),{...t,query:{...u,...t.query}})})}export{w as c,h as d,R as m,I as p}; diff --git a/build/assets/quickselect-D0_cvEX6.js b/build/assets/quickselect-D0_cvEX6.js new file mode 100644 index 0000000..e4888b1 --- /dev/null +++ b/build/assets/quickselect-D0_cvEX6.js @@ -0,0 +1 @@ +import{o as k}from"./_commonjsHelpers-DCkdB7M8.js";var M,g,d,q={exports:{}};M=q,g=function(){function b(t,r,n,o,i){u(t,r,n||0,o||t.length-1,i||j)}function u(t,r,n,o,i){for(;o>n;){if(o-n>600){var f=o-n+1,l=r-n+1,a=Math.log(f),v=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*v*(f-v)/f)*(l-f/2<0?-1:1);u(t,r,Math.max(n,Math.floor(r-l*v/f+c)),Math.min(o,Math.floor(r+(f-l)*v/f+c)),i)}var e=t[r],p=n,h=o;for(x(t,n,r),i(t[o],e)>0&&x(t,n,o);p0;)h--}i(t[n],e)===0?x(t,n,h):x(t,++h,o),h<=r&&(n=h+1),r<=h&&(o=h-1)}}function x(t,r,n){var o=t[r];t[r]=t[n],t[n]=o}function j(t,r){return tr?1:0}return b},(d=g())!==void 0&&(M.exports=d);const y=k(q.exports);export{y as f}; diff --git a/build/assets/request-CIjms0zq.js b/build/assets/request-CIjms0zq.js new file mode 100644 index 0000000..5f09613 --- /dev/null +++ b/build/assets/request-CIjms0zq.js @@ -0,0 +1 @@ +import{s as p}from"./index-DKOmzAMm.js";function d(o,a){let t=a.responseType;t?t!=="array-buffer"&&t!=="blob"&&t!=="json"&&t!=="native"&&t!=="native-request-init"&&t!=="text"&&(t="text"):t="json",a.responseType=t;const c=a.signal;return delete a.signal,globalThis.invokeStaticMessage("request",{url:o,options:a},{signal:c}).then(async e=>{let n,r,l,u,s;if(e.data)if(e.data instanceof ArrayBuffer){if(!(t!=="json"&&t!=="text"&&t!=="blob"||(n=new Blob([e.data]),t!=="json"&&t!=="text"||(u=await n.text(),t!=="json")))){try{r=JSON.parse(u||null)}catch(i){const b={...i,url:o,requestOptions:a};throw new p("request:server",i.message,b)}if(r.error){const i={...r.error,url:o,requestOptions:a};throw new p("request:server",r.error.message,i)}}}else t==="native"&&(e.data.signal=c,l=await fetch(e.data.url,e.data),e.httpStatus=l.status);switch(t){case"blob":s=n;break;case"json":s=r;break;case"native":s=l;break;case"text":s=u;break;default:s=e.data}return{data:s,httpStatus:e.httpStatus,requestOptions:a,ssl:e.ssl,url:o}})}export{d as execute}; diff --git a/build/assets/resourceExtension-D3awQbhZ.js b/build/assets/resourceExtension-D3awQbhZ.js new file mode 100644 index 0000000..053e693 --- /dev/null +++ b/build/assets/resourceExtension-D3awQbhZ.js @@ -0,0 +1 @@ +import{aW as o}from"./index-DKOmzAMm.js";function m(p){return i[e(p)]||l}function e(p){return p.type==="json"?"application/json":p.type==="blob"?p.blob.type:g(p.url)}function g(p){const a=o(p);return t[a]||n}const i={},n="text/plain",l=i[n],t={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const p in t)i[t[p]]=p;export{m as p}; diff --git a/build/assets/resourceUtils-CwAv7wd8.js b/build/assets/resourceUtils-CwAv7wd8.js new file mode 100644 index 0000000..aa4a3bf --- /dev/null +++ b/build/assets/resourceUtils-CwAv7wd8.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/resourceUtils-Cz4P0EKM.js","assets/index-DKOmzAMm.js","assets/index-6Ap435l7.css"])))=>i.map(i=>d[i]); +import{ck as g,_ as v,cl as S,c7 as y,s as E,cm as P}from"./index-DKOmzAMm.js";import{getSiblingOfSameTypeI as $,contentToBlob as m}from"./resourceUtils-Cz4P0EKM.js";async function T(s,t,o){const r=await w(s,t,o);await I(r,t,o)}async function b(s,t,o,r,a){const c=await w(o,r,a);await s.update({data:t}),await I(c,r,a)}async function w(s,t,o){if(!(t!=null&&t.resources))return;const r=t.portalItem===s.portalItem?new Set(s.paths):new Set;s.paths.length=0,s.portalItem=t.portalItem;const a=new Set(t.resources.toKeep.map(e=>e.resource.path)),c=new Set,f=[];a.forEach(e=>{r.delete(e),s.paths.push(e)});const u=[],h=[],p=[];for(const e of t.resources.toUpdate)if(r.delete(e.resource.path),a.has(e.resource.path)||c.has(e.resource.path)){const{resource:n,content:_,finish:d}=e,i=$(n,g());s.paths.push(i.path),u.push({resource:i,content:await m(_),compress:e.compress}),d&&p.push(()=>d(i))}else{s.paths.push(e.resource.path),h.push({resource:e.resource,content:await m(e.content),compress:e.compress});const n=e.finish;n&&p.push(()=>n(e.resource)),c.add(e.resource.path)}for(const e of t.resources.toAdd)if(s.paths.push(e.resource.path),r.has(e.resource.path))r.delete(e.resource.path);else{u.push({resource:e.resource,content:await m(e.content),compress:e.compress});const n=e.finish;n&&p.push(()=>n(e.resource))}if(u.length||h.length){const{addOrUpdateResources:e}=await v(()=>import("./resourceUtils-Cz4P0EKM.js"),__vite__mapDeps([0,1,2]));await e(t.portalItem,u,"add",o),await e(t.portalItem,h,"update",o)}if(p.forEach(e=>e()),f.length===0)return r;const l=await S(f);if(y(o),l.length>0)throw new E("save:resources","Failed to save one or more resources",{errors:l});return r}async function I(s,t,o){if(!s||!t.portalItem)return;const r=[];for(const a of s){const c=t.portalItem.resourceFromPath(a);r.push(c.portalItem.removeResource(c,o))}await P(r)}export{b as n,T as p}; diff --git a/build/assets/resourceUtils-CxnhUS9W.js b/build/assets/resourceUtils-CxnhUS9W.js new file mode 100644 index 0000000..bb614e7 --- /dev/null +++ b/build/assets/resourceUtils-CxnhUS9W.js @@ -0,0 +1 @@ +import{M as f}from"./index-DKOmzAMm.js";var u,d,N,l,D,L,E,U,s;(function(n){n[n.None=0]="None",n[n.Front=1]="Front",n[n.Back=2]="Back",n[n.COUNT=3]="COUNT"})(u||(u={})),function(n){n[n.Less=0]="Less",n[n.Lequal=1]="Lequal",n[n.COUNT=2]="COUNT"}(d||(d={})),function(n){n[n.BACKGROUND=0]="BACKGROUND",n[n.UPDATE=1]="UPDATE"}(N||(N={})),function(n){n[n.NOT_LOADED=0]="NOT_LOADED",n[n.LOADING=1]="LOADING",n[n.LOADED=2]="LOADED"}(l||(l={})),function(n){n[n.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",n[n.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(D||(D={})),function(n){n[n.Highlight=0]="Highlight",n[n.MaskOccludee=1]="MaskOccludee",n[n.COUNT=2]="COUNT"}(L||(L={})),function(n){n[n.Blend=0]="Blend",n[n.Opaque=1]="Opaque",n[n.Mask=2]="Mask",n[n.MaskBlend=3]="MaskBlend",n[n.COUNT=4]="COUNT"}(E||(E={})),function(n){n[n.OFF=0]="OFF",n[n.ON=1]="ON"}(U||(U={})),function(n){n.DDS_ENCODING="image/vnd-ms.dds",n.KTX2_ENCODING="image/ktx2",n.BASIS_ENCODING="image/x.basis"}(s||(s={}));class k{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=s.KTX2_ENCODING}}function h(n){return(n==null?void 0:n.type)==="encoded-mesh-texture"}async function M(n){const e=new Blob([n]),o=await e.text();return JSON.parse(o)}async function g(n,e){if(e===s.KTX2_ENCODING)return new k(n);const o=new Blob([n],{type:e}),a=URL.createObjectURL(o),t=new Image;if(f("esri-iPhone"))return new Promise((r,m)=>{const c=()=>{O(),r(t)},i=T=>{O(),m(T)},O=()=>{URL.revokeObjectURL(a),t.removeEventListener("load",c),t.removeEventListener("error",i)};t.addEventListener("load",c),t.addEventListener("error",i),t.src=a});try{t.src=a,await t.decode()}catch{console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),t}export{D as N,N as O,L as a,l as b,d as c,u as e,U as i,M as n,g as o,h as r,E as s,k as t,s as u}; diff --git a/build/assets/resourceUtils-Cz4P0EKM.js b/build/assets/resourceUtils-Cz4P0EKM.js new file mode 100644 index 0000000..6cb36ea --- /dev/null +++ b/build/assets/resourceUtils-Cz4P0EKM.js @@ -0,0 +1 @@ +import{aV as p,s as h,aW as R,U as x}from"./index-DKOmzAMm.js";async function q(e,t={},s){await e.load(s);const r=p(e.itemUrl,"resources"),{start:a=1,num:m=10,sortOrder:n="asc",sortField:f="resource"}=t,l={query:{start:a,num:m,sortOrder:n,sortField:f,token:e.apiKey},signal:s==null?void 0:s.signal},o=await e.portal.request(r,l);return{total:o.total,nextStart:o.nextStart,resources:o.resources.map(({created:d,size:c,resource:i})=>({created:new Date(d),size:c,resource:e.resourceFromPath(i)}))}}async function F(e,t,s,r){const a=new Map;for(const{resource:n,content:f,compress:l,access:o}of t){if(!n.hasPath())throw new h(`portal-item-resource-${s}:invalid-path`,"Resource does not have a valid path");const[d,c]=g(n.path),i=`${d}/${l??""}/${o??""}`;a.has(i)||a.set(i,{prefix:d,compress:l,access:o,files:[]}),a.get(i).files.push({fileName:c,content:f})}await e.load(r);const m=p(e.userItemUrl,s==="add"?"addResources":"updateResources");for(const{prefix:n,compress:f,access:l,files:o}of a.values())for(let c=0;cr==="error").map(({name:r,message:p,details:a})=>new l(r,p,a));if(t.blockedRelativeUrls&&(e=e.concat(t.blockedRelativeUrls.map(r=>new l("url:unsupported",`Relative url '${r}' is not supported`)))),o){const{ignoreUnsupported:r,supplementalUnsupportedErrors:p=[],requiredPropertyChecksDisabled:a}=o;r&&(e=e.filter(({name:n})=>!(i.has(n)||p.includes(n)))),a&&(e=e.filter(n=>n.name!=="web-document-write:property-required"))}if(e.length>0)throw new l(s.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:e})}export{d as r,f as t}; diff --git a/build/assets/scaleUtils-BN5HVCVS.js b/build/assets/scaleUtils-BN5HVCVS.js new file mode 100644 index 0000000..d0b56b7 --- /dev/null +++ b/build/assets/scaleUtils-BN5HVCVS.js @@ -0,0 +1 @@ +import{d3 as c,d4 as e,d5 as o}from"./index-DKOmzAMm.js";const a=96;function p(t,n){const r=t.extent,i=t.width,u=c(r==null?void 0:r.spatialReference);return r&&i?r.width/i*u*e*a:0}function h(t,n,r){return d(t,n)&&f(t,r)}function d(t,n){return n===0||o(t,n)||tn}export{h as d,p as i}; diff --git a/build/assets/signal-swyOrDkM.js b/build/assets/signal-swyOrDkM.js new file mode 100644 index 0000000..01118cb --- /dev/null +++ b/build/assets/signal-swyOrDkM.js @@ -0,0 +1 @@ +import{b8 as i,b9 as a,ba as u}from"./index-DKOmzAMm.js";class l{constructor(t,s){this._observable=new a,this._value=t,this._equalityFunction=s}get value(){return u(this._observable),this._value}set value(t){this._equalityFunction(t,this._value)||(this._value=t,this._observable.notify())}mutate(t){t(this._value),this._observable.notify()}}function r(e,t=i){return new l(e,t)}export{r}; diff --git a/build/assets/sourceUtils-DYgU-2mb.js b/build/assets/sourceUtils-DYgU-2mb.js new file mode 100644 index 0000000..5f1b111 --- /dev/null +++ b/build/assets/sourceUtils-DYgU-2mb.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/geometryEngineWorker-ClddcLz0.js","assets/geometryEngineBase-RmbNeFm7.js","assets/_commonjsHelpers-DCkdB7M8.js","assets/json-Wa8cmqdu.js"])))=>i.map(i=>d[i]); +import{bM as d,bN as h,bL as g,bO as m,bP as p,bQ as y,bR as a,_ as b}from"./index-DKOmzAMm.js";import{n as w}from"./date-M6n_RqpC.js";class _{constructor(){this.code=null,this.description=null}}class I{constructor(r){this.error=new _,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=r}}function c(n){return new I(n)}class P{constructor(r){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=r}}function A(n){return new P(n)}const u=new Set;function F(n,r,e,f=!1){u.clear();for(const i in e){const t=n.get(i);if(!t)continue;const o=q(t,e[i]);if(u.add(t.name),t&&(f||t.editable)){const l=d(t,o);if(l)return c(h(l,t,o));r[t.name]=o}}for(const i of(n==null?void 0:n.requiredFields)??[])if(!u.has(i.name))return c(`missing required field "${i.name}"`);return null}function q(n,r){let e=r;return g(n)&&typeof r=="string"?e=parseFloat(r):m(n)&&r!=null&&typeof r!="string"?e=String(r):p(n)&&typeof r=="string"&&(e=w(r)),y(e)}let s;function G(n,r){if(!n||!a(r))return n;if("rings"in n||"paths"in n){if(s==null)throw new TypeError("geometry engine not loaded");return s.simplify(r,n)}return n}async function j(){return s==null&&(s=await b(()=>import("./geometryEngineWorker-ClddcLz0.js").then(n=>n.g),__vite__mapDeps([0,1,2,3]))),s}async function L(n,r){!a(n)||r!=="esriGeometryPolygon"&&r!=="esriGeometryPolyline"||await j()}export{A as d,c as f,L as j,F as p,G as y}; diff --git a/build/assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js b/build/assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js new file mode 100644 index 0000000..6301583 --- /dev/null +++ b/build/assets/spatialReferenceEllipsoidUtils-BKSgV6gI.js @@ -0,0 +1 @@ +import{ay as a,be as k,bf as b,bg as u,bh as m,bi as l,bj as r}from"./index-DKOmzAMm.js";const C=new a(k),e=new a(b),n=new a(u),$=new a(m);function h(t){const i=c.get(t);if(i)return i;let s=C;if(t)if(t===e)s=e;else if(t===n)s=n;else{const o=t.wkid,f=t.latestWkid;if(o!=null||f!=null)l(o)||l(f)?s=e:(r(o)||r(f))&&(s=n);else{const p=t.wkt2??t.wkt;if(p){const w=p.toUpperCase();w===U?s=e:w===d&&(s=n)}}}return c.set(t,s),s}const c=new Map,U=e.wkt.toUpperCase(),d=n.wkt.toUpperCase();export{h as a,$ as w}; diff --git a/build/assets/sphere-DoGSV0K5.js b/build/assets/sphere-DoGSV0K5.js new file mode 100644 index 0000000..ab012de --- /dev/null +++ b/build/assets/sphere-DoGSV0K5.js @@ -0,0 +1 @@ +import{aq as E,gf as a,gj as L,fE as B,c0 as y,au as h,c1 as D,c2 as g,c6 as M,c4 as l,fF as T,ap as k,af as q,gk as v,ae as G,gl as z,ar as A,gm as H,cJ as I,c3 as K,gn as _,at as Q,go as R,g7 as j,gp as U,gq as W,gg as tt}from"./index-DKOmzAMm.js";import{c as f,f as nt}from"./plane-aHrUkISy.js";function et(t,e){const n=E(t,e)/(a(t)*a(e));return-L(n)}class it{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return this._itemsPtr===0&&B(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*O);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;eZ()),ct=x();function x(){return T()}const ut=k,at=k;function F(t,e){return q(e,t)}function ft(t,e){return v(t[0],t[1],t[2],e)}function gt(t){return t}function ht(t){t[0]=t[1]=t[2]=t[3]=0}function lt(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t}function p(t){return t[3]}function mt(t){return t}function _t(t,e,n,i){return v(t,e,n,i)}function dt(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n}function Mt(t,e,n){return t!==n&&F(t,n),n}function $(t,e,n){if(e==null||!J(t,e,d))return!1;let{t0:i,t1:s}=d;if((i<0||s0)&&(i=s),i<0)return!1;if(n){const{origin:r,direction:o}=e;n[0]=r[0]+o[0]*i,n[1]=r[1]+o[1]*i,n[2]=r[2]+o[2]*i}return!0}function pt(t,e,n){const i=st(e,n);if(!J(t,i,d))return[];const{origin:s,direction:r}=i,{t0:o,t1:c}=d,u=m=>{const P=h();return tt(P,s,r,m),b(t,P,P)};return Math.abs(o-c)i.map(i=>d[i]); +import{dk as v,s,U as y,_ as p,dl as l,b0 as b,dm as w,au as f}from"./index-DKOmzAMm.js";let a=h();function h(){return new v(50)}function T(){a=h()}async function x(e,r){var o,t;if((o=e.resource)!=null&&o.href)return _(e.resource.href).then(n=>[n.width,n.height]);if((t=e.resource)!=null&&t.primitive)return r!=null?[r,r]:[256,256];throw new s("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function _(e){return y(e,{responseType:"image"}).then(r=>r.data)}async function B(e,r=null){var t,n;if(!e.isPrimitive){const i=(t=e.resource)==null?void 0:t.href;if(!i)throw new s("symbol:invalid-resource","The symbol does not have a valid resource");const u=a.get(i);if(u!==void 0)return u;const{fetch:m}=await p(()=>import("./objectResourceUtils-fV3U3Nm6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])),d=await m(i,{disableTextures:!0}),c=l(d.referenceBoundingBox,f());return a.put(i,c),c}if(!((n=e.resource)!=null&&n.primitive))throw new s("symbol:invalid-resource","The symbol does not have a valid resource");const o=b(w(e.resource.primitive));if(r!=null)for(let i=0;inew Error;class p extends s{constructor(){super(`${o}:unsupported`,"Layer does not support asset uploads.",r())}}class a extends s{constructor(){super(`${o}:no-glb-support`,"Layer does not support glb.",r())}}class d extends s{constructor(){super(`${o}:no-supported-source`,"No supported external source found",r())}}class l extends s{constructor(){super(`${o}:not-base-64`,"Expected gltf data in base64 format after conversion.",r())}}class c extends s{constructor(){super(`${o}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",r())}}class i extends s{constructor(n,t){super(`${o}:bad-response`,`Bad response. Uploaded ${n} items and received ${t} results.`,r())}}class m extends s{constructor(n,t){super(`${o}-layer:upload-failed`,`Failed to upload mesh file ${n}. Error code: ${(t==null?void 0:t.code)??"-1"}. Error message: ${(t==null?void 0:t.messages)??"unknown"}`,r())}}class $ extends s{constructor(n){super(`${o}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${n}, but it does not list it in its supported formats.`,r())}}class f extends s{constructor(){super(`${o}:convert3D-failed`,"convert3D failed.")}}class x extends s{constructor(){super("invalid-input:no-model","No supported model found")}}class b extends s{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}export{i as a,$ as c,m as d,x as i,f as l,b as m,d as n,c as p,p as r,a as t,l as u}; diff --git a/build/assets/uploadAssets-DaOQPv-z.js b/build/assets/uploadAssets-DaOQPv-z.js new file mode 100644 index 0000000..4c4349f --- /dev/null +++ b/build/assets/uploadAssets-DaOQPv-z.js @@ -0,0 +1 @@ +import{M as I,d1 as X,bB as Y,gM as _,dn as A,gN as E,aV as g,U as d,c7 as u,d9 as Z,a6 as ss,dI as es,aK as ts,dy as os,V as as}from"./index-DKOmzAMm.js";import{h as ns,a as rs,i as S,o as x,A as is}from"./MeshTransform-CnKLNqg-.js";import{r as cs,n as ls,a as us,d as ps,c as U,l as ms,t as ds,u as fs,p as gs}from"./uploadAssetErrors-Bg66aMSE.js";import{s as hs,u as k,i as ws}from"./infoFor3D-DsOdlPuA.js";import"./mat4f64-CSKppSlJ.js";import"./quat-BYKy26Om.js";import"./mat3f64-q3fE-ZOt.js";import"./quatf64-Bdb9ZJJK.js";const M={upload:{createFromFiles:.8,loadMesh:.2},uploadAssetBlobs:{prepareAssetItems:.9,uploadAssetItems:.1},uploadConvertibleSource:{uploadEditSource:.5,serviceAssetsToGlb:.5},uploadLocalMesh:{meshToAssetBlob:.5,uploadAssetBlobs:.5}};function h(t,e=o=>{},s){return new ys(t,e,s)}let ys=class{constructor(e,s=a=>{},o){if(this.onProgress=s,this.taskName=o,this._progressMap=new Map,this._startTime=void 0,this._timingsMap=new Map,typeof e=="number"){this._weights={};for(let a=0;a({start:o,end:0}));s===1&&(a.end=o)}this.emitProgress()}simulate(e,s){return D(o=>this.setProgress(e,o),s)}makeOnProgress(e){return s=>this.setProgress(e,s)}};function D(t=s=>{},e=$s){const s=performance.now();t(0);const o=setInterval(()=>{const a=performance.now()-s,n=1-Math.exp(-a/e);t(n)},Ms);return Y(()=>{clearInterval(o),t(1)})}function Ps(t,e=bs){return _(E(t*B/e))}function Ts(t,e=As){return _(E(t*B/e))}const bs=10,As=10,B=8e-6,Ms=A(50),$s=A(1e3),O=1e6,N=20*O,Fs=2e9,js=3;async function vs({data:t,name:e,description:s},o,a){let n=null;try{const r=g(o,"uploads"),i=g(r,"info"),{data:c}=await d(i,{query:{f:"json"},responseType:"json"});u(a);const p=Z(o),l=c.maxUploadFileSize*O,f=p?Fs:l,b=p?Math.min(N,l):N;if(t.size>f)throw new Error("Data too large");const L=g(r,"register"),{data:$}=await d(L,{query:{f:"json",itemName:Is(e),description:s},responseType:"json",method:"post"});if(u(a),!$.success)throw new Error("Registration failed");const{itemID:H}=$.item;n=g(r,H);const G=g(n,"uploadPart"),F=Math.ceil(t.size/b),w=new Array;for(let m=0;m{for(;y.length!==0;){const m=w.length-y.length,P=y.pop(),T=new FormData,W=V.simulate(m,Ps(P.size));try{T.append("f","json"),T.append("file",P),T.append("partId",`${m}`);const{data:Q}=await d(G,{timeout:0,body:T,responseType:"json",method:"post"});if(u(a),!Q.success)throw new Error("Part upload failed")}finally{W.remove()}}};for(let m=0;mP).join(",")},responseType:"json",method:"post"});if(u(a),!v.success)throw new Error("Commit failed");return v.item}catch(r){if(n!=null){const i=g(n,"delete");await d(i,{query:{f:"json"},responseType:"json",method:"post"})}throw r}}function Is(t){return t.replaceAll("/","_").replaceAll("\\","_")}async function ae(t,e,s){var n;const o=t.length;if(!o)return(n=s==null?void 0:s.onProgress)==null||n.call(s,1),[];const a=h(o,s==null?void 0:s.onProgress,"uploadAssets");return Promise.all(t.map((r,i)=>Ns(r,e,{...s,onProgress:a.makeOnProgress(i)})))}async function Ns(t,{layer:e,ongoingUploads:s},o){var r;const a=s.get(t);if(a)return a;if(!Vs(e))throw new cs;if(_s(t,e))return(r=o==null?void 0:o.onProgress)==null||r.call(o,1),t;const n=Es(t,e,o);s.set(t,n);try{await n}finally{s.delete(t)}return t}function _s(t,e){const{parsedUrl:s}=e;return s!=null&&t.metadata.externalSources.some(o=>ns(o,s))}async function Es(t,e,s){const{metadata:o}=t,{displaySource:a}=o,n=C(a==null?void 0:a.source,e),r=!!n,i=o.externalSources.length>0,c=r?Ss(n,e,s):i?xs(t,e,s):Us(t,e,s),p=await c;return u(s),t.addExternalSources([p]),t}async function Ss(t,e,s){return{source:await q(t,e,s),original:!0}}async function xs(t,e,s){const o=z(e),{externalSources:a}=t.metadata,n=Ds(a,e);if(!n)throw new ls;const r=h(M.uploadConvertibleSource,s==null?void 0:s.onProgress,"uploadConvertibleSource"),i=await q(n,e,{onProgress:r.makeOnProgress("uploadEditSource")});t.addExternalSources([{source:i,original:!0}]);const c=n.reduce((l,{asset:f})=>f instanceof File?l+f.size:l,0),p=r.simulate("serviceAssetsToGlb",Ts(c));try{return{source:await Ls(i,e,o)}}finally{p.remove()}}async function Us(t,e,s){const o=h(M.uploadLocalMesh,s==null?void 0:s.onProgress,"uploadLocalMesh"),a=ks(t,e,{...s,onProgress:o.makeOnProgress("meshToAssetBlob")});return{source:await R([a],e,{...s,onProgress:o.makeOnProgress("uploadAssetBlobs")}),extent:t.extent.clone(),original:!0}}async function ks(t,e,s){const o=z(e),a=await t.load(s),n=await a.toBinaryGLTF({origin:a.origin,signal:s==null?void 0:s.signal,ignoreLocalTransform:!0});return u(s),{blob:new Blob([n],{type:"model/gltf-binary"}),assetName:`${ss()}.glb`,assetType:o}}function Ds(t,e){for(const s of t){const o=C(s.source,e);if(o)return o}return null}function C(t,e){if(!t)return null;const{infoFor3D:{supportedFormats:s,editFormats:o}}=e,a=is(t),n=new Array;let r=!1;for(let i=0;iOs(o,s)),e,s)}async function R(t,e,s){const o=h(M.uploadAssetBlobs,s==null?void 0:s.onProgress,"uploadAssetBlobs"),a=await qs(t,e,{...s,onProgress:o.makeOnProgress("prepareAssetItems")});u(s);const n=a.map(({item:i})=>i),{uploadResults:r}=await Rs(n,e,{...s,onProgress:o.makeOnProgress("uploadAssetItems")});return u(s),t.map((i,c)=>zs(a[c],r[c],e))}async function Os(t,e){const{asset:s,assetType:o}=t;if(s instanceof File)return{blob:s,assetName:s.name,assetType:o};const a=await s.toBlob(e);return u(e),{blob:a,assetName:s.assetName,assetType:o}}async function Cs(t,e,s){const{blob:o,assetType:a,assetName:n}=t;let r=null;try{const i=await vs({data:o,name:n},e.url,s);u(s),r={assetType:a,assetUploadId:i.itemID}}catch(i){ts(i),Js().warnOnce(`Service ${e.url} does not support the REST Uploads API.`)}if(!r){const i=await os(o);if(u(s),!i.isBase64)throw new fs;r={assetType:a,assetData:i.data}}if(!r)throw new gs;return{item:r,assetName:n}}function qs(t,e,s){const o=h(t.length,s==null?void 0:s.onProgress,"prepareAssetItems");return Promise.all(t.map(async(a,n)=>{const r=Cs(await a,e,{...s,onProgress:o.makeOnProgress(n)});return u(s),r}))}async function Rs(t,e,s){const o=D(s==null?void 0:s.onProgress);try{const a=await d(g(e.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(t)},method:"post",responseType:"json"});if(u(s),a.data.uploadResults.length!==t.length)throw new us(t.length,a.data.uploadResults.length);return a.data}finally{o.remove()}}function zs(t,e,s){const{success:o}=e;if(!o){const{error:p}=e;throw new ps(t.assetName,p)}const{assetHash:a}=e,{assetName:n,item:{assetType:r}}=t,{infoFor3D:{supportedFormats:i}}=s,c=hs(r,i);if(!c)throw new U(r);return new S(n,c,[new x(`${s.parsedUrl.path}/assets/${a}`,a)])}async function Ls(t,e,s){var p;const o=t.map(({assetName:l,parts:f})=>({assetName:l,assetHash:f[0].partHash})),a=(p=e.capabilities)==null?void 0:p.operations.supportsAsyncConvert3D,n={f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:s,async:a},r=g(e.parsedUrl.path,"convert3D");let i;try{i=(await(a?Gs:Hs)(r,{query:n,responseType:"json",timeout:0})).data}catch{throw new ms}const{supportedFormats:c}=e.infoFor3D;return i.assets.map(l=>{const f=k(l.contentType,c);if(!f)throw new U(f);return new S(l.assetName,l.contentType,[new x(l.assetURL,l.assetHash)])})}function Hs(t,e){return d(t,e)}async function Gs(t,e){const s=(await d(t,e)).data.statusUrl;for(;;){const o=(await d(s,{query:{f:"json"},responseType:"json"})).data;switch(o.status){case"Completed":return d(o.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new Error(o.status);case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new Error}await es(Ks)}}function Vs(t){return!!t.infoFor3D&&!!t.url}function z(t){const{infoFor3D:e}=t,s=k("model/gltf-binary",e.supportedFormats)??ws("glb",e.supportedFormats);if(!s)throw new ds;return s}function Js(){return as.getLogger("esri.layers.graphics.sources.support.uploadAssets")}const Ks=A(1e3);export{ae as uploadAssets}; diff --git a/build/assets/utils-BCmi3vQB.js b/build/assets/utils-BCmi3vQB.js new file mode 100644 index 0000000..0c36a31 --- /dev/null +++ b/build/assets/utils-BCmi3vQB.js @@ -0,0 +1 @@ +import{aH as m,aI as p}from"./index-DKOmzAMm.js";function c(e){return{geometryType:m(e[0]),geometries:e.map(r=>r.toJSON())}}function f(e,r,o){const n=p(r);return e.map(a=>{const t=n.fromJSON(a);return t.spatialReference=o,t})}export{f as o,c as r}; diff --git a/build/assets/utils-C0Bk6fkM.js b/build/assets/utils-C0Bk6fkM.js new file mode 100644 index 0000000..eadc913 --- /dev/null +++ b/build/assets/utils-C0Bk6fkM.js @@ -0,0 +1 @@ +import{d as N}from"./ClassBreaksDefinition-yZL3mlhg.js";import{V as k}from"./index-DKOmzAMm.js";const q=()=>k.getLogger("esri.rest.support.generateRendererUtils");function g(t,e){return Number(t.toFixed(e))}function C(t){const{normalizationTotal:e}=t;return{classBreaks:w(t),normalizationTotal:e}}function w(t){const e=t.definition,{classificationMethod:l,normalizationType:n,definedInterval:u}=e,i=e.breakCount??1,c=[];let o=t.values;if(o.length===0)return[];o=o.sort((m,d)=>m-d);const f=o[0],p=o[o.length-1];if(l==="equal-interval")if(o.length>=i){const m=(p-f)/i;let d=f;for(let r=1;r{c.push({minValue:m,maxValue:m,label:b(m,m,n)})});else if(l==="natural-breaks"){const m=E(o),d=t.valueFrequency||m.valueFrequency,r=B(m.uniqueValues,d,i);let a=f;for(let s=1;ss){const h=g(m.uniqueValues[r[s]],6);c.push({minValue:a,maxValue:h,label:b(a,h,n)}),a=h}c.push({minValue:a,maxValue:p,label:b(a,p,n)})}else if(l==="quantile")if(o.length>=i&&f!==p){let m=f,d=Math.ceil(o.length/i),r=0;for(let a=1;ao.length&&(s=o.length-1),s<0&&(s=0),c.push({minValue:m,maxValue:o[s],label:b(m,o[s],n)}),m=o[s],r+=d,d=Math.ceil((o.length-r)/(i-a))}c.push({minValue:m,maxValue:p,label:b(m,p,n)})}else{let m=-1;for(let d=0;d=1;V--){const F=g(m-(V-.5)*r,6);c.push({minValue:s,maxValue:F,label:b(s,F,n)}),s=F,a++}let h=g(m+.5*r,6);c.push({minValue:s,maxValue:h,label:b(s,h,n)}),s=h,a++;for(let V=1;V<=i;V++)h=a===2*i?p:g(m+(V+.5)*r,6),c.push({minValue:s,maxValue:h,label:b(s,h,n)}),s=h,a++}}else if(l==="defined-interval"){if(!u)return c;const m=o[0],d=o[o.length-1],r=Math.ceil((d-m)/u);let a=m;for(let s=1;sn&&(l=n);for(let c=0;c0&&s!==t[a+1]&&Math.abs(m-f[a])>Math.abs(m-f[a-1]))t[a]=s;else if(aMath.abs(m-f[a+1])){t[a+1]=s-1;break}d=o,o=0,i=[],c=[];for(let a=0;ad){for(let a=0;a0;r--)for(;l[r]!==l[r-1]+1;){l[r]=l[r]-1;const a=v(r-1,l,n,u);f=a.sbMean,c=a.sbSdcm;const s=v(r,l,n,u);if(p=s.sbMean,o=s.sbSdcm,!(c+o=1?1:i>=.5?.5:.25,i}function P(t){let e=0;for(let l=0;li!=null).sort(),n=l.length,u={count:n,min:l[0],max:l[n-1]};return t.supportsNullCount&&(u.nullcount=e.length-n),t.percentileParams&&(u.median=$(e,t.percentileParams)),u}function W(t){const{values:e,useSampleStdDev:l,supportsNullCount:n}=t;let u=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,c=null,o=null,f=null,p=null,m=0;const d=t.minValue==null?-1/0:t.minValue,r=t.maxValue==null?1/0:t.maxValue;for(const s of e)Number.isFinite(s)?s>=d&&s<=r&&(c=c===null?s:c+s,u=Math.min(u,s),i=Math.max(i,s),m++):typeof s=="string"&&m++;if(m&&c!=null){o=c/m;let s=0;for(const h of e)Number.isFinite(h)&&h>=d&&h<=r&&(s+=(h-o)**2);p=l?m>1?s/(m-1):0:m>0?s/m:0,f=Math.sqrt(p)}else u=null,i=null;const a={avg:o,count:m,max:i,min:u,stddev:f,sum:c,variance:p};return n&&(a.nullcount=e.length-m),t.percentileParams&&(a.median=$(e,t.percentileParams)),a}function $(t,e){const{fieldType:l,value:n,orderBy:u,isDiscrete:i}=e,c=X(l,u==="desc");if((t=[...t].filter(a=>a!=null).sort((a,s)=>c(a,s))).length===0)return null;if(n<=0)return t[0];if(n>=1)return t[t.length-1];const o=(t.length-1)*n,f=Math.floor(o),p=f+1,m=o%1,d=t[f],r=t[p];return p>=t.length||i||typeof d=="string"||typeof r=="string"?d:d*(1-m)+r*m}function X(t,e){if(t){if(R.has(t))return S(e);if(H.has(t))return M(e,!1);if(t==="esriFieldTypeTimestampOffset")return lt(e);const i=M(e,!0);if(t==="esriFieldTypeString")return i;if(t==="esriFieldTypeGUID"||t==="esriFieldTypeGlobalID")return(c,o)=>i(I(c),I(o))}const l=e?1:-1,n=S(e),u=M(e,!0);return(i,c)=>typeof i=="number"&&typeof c=="number"?n(i,c):typeof i=="string"&&typeof c=="string"?u(i,c):l}const T=(t,e)=>t==null?e==null?0:1:e==null?-1:null,y=(t,e)=>t==null?e==null?0:-1:e==null?1:null;function Z(t){return t?T:y}const tt=(t,e)=>y(t,e)??(t===e?0:new Date(t).getTime()-new Date(e).getTime()),et=(t,e)=>T(t,e)??(t===e?0:new Date(e).getTime()-new Date(t).getTime());function lt(t){return t?et:tt}const nt=(t,e)=>y(t,e)??(t===e?0:tT(t,e)??(t===e?0:t{const i=l(n,u);return i??((n=n.toUpperCase())>(u=u.toUpperCase())?-1:n{const i=l(n,u);return i??((n=n.toUpperCase())<(u=u.toUpperCase())?-1:n>u?1:0)}}const it=(t,e)=>T(t,e)??e-t,ut=(t,e)=>y(t,e)??t-e;function S(t){return t?it:ut}function I(t){return t.substr(24,12)+t.substr(19,4)+t.substr(16,2)+t.substr(14,2)+t.substr(11,2)+t.substr(9,2)+t.substr(6,2)+t.substr(4,2)+t.substr(2,2)+t.substr(0,2)}function bt(t,e){let l;for(l in t)J.includes(l)&&(Number.isFinite(t[l])||(t[l]=null));return e&&["avg","stddev","variance"].forEach(n=>{t[n]!=null&&(t[n]=Math.ceil(t[n]??0))}),t}function Vt(t){const e={};for(let l of t)(l==null||typeof l=="string"&&l.trim()==="")&&(l=null),e[l]==null?e[l]={count:1,data:l}:e[l].count++;return{count:e}}function z(t){return(t==null?void 0:t.type)!=="coded-value"?[]:t.codedValues.map(e=>e.code)}function gt(t,e,l,n){const u=t.count,i=[];if(l&&e){const c=[],o=z(e[0]);for(const f of o)if(e[1]){const p=z(e[1]);for(const m of p)if(e[2]){const d=z(e[2]);for(const r of d)c.push(`${x(f)}${n}${x(m)}${n}${x(r)}`)}else c.push(`${x(f)}${n}${x(m)}`)}else c.push(f);for(const f of c)u.hasOwnProperty(f)||(u[f]={data:f,count:0})}for(const c in u){const o=u[c];i.push({value:o.data,count:o.count,label:o.label})}return{uniqueValueInfos:i}}function vt(t,e,l,n){let u=null;switch(e){case"log":t!==0&&(u=Math.log(t)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(n)&&n!==0&&(u=t/n*100);break;case"field":Number.isFinite(l)&&l!==0&&(u=t/l);break;case"natural-log":t>0&&(u=Math.log(t));break;case"square-root":t>0&&(u=t**.5)}return u}function ot(t,e){const l=st({field:e.field,normalizationType:e.normalizationType,normalizationField:e.normalizationField,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,breakCount:e.numClasses||Y});return t=rt(t,e.minValue,e.maxValue),C({definition:l,values:t,normalizationTotal:e.normalizationTotal})}function rt(t,e,l){const n=e??-1/0,u=l??1/0;return t.filter(i=>Number.isFinite(i)&&i>=n&&i<=u)}function st(t){const{breakCount:e,field:l,normalizationField:n,normalizationType:u}=t,i=t.classificationMethod||A,c=i==="standard-deviation"?t.standardDeviationInterval||_:void 0;return new N({breakCount:e,classificationField:l,classificationMethod:i,normalizationField:u==="field"?n:void 0,normalizationType:u,standardDeviationInterval:c})}function xt(t,e){var f,p;let l=t.classBreaks;const n=l.length,u=(f=l[0])==null?void 0:f.minValue,i=(p=l[n-1])==null?void 0:p.maxValue,c=e==="standard-deviation",o=Q;return l=l.map(m=>{const d=m.label,r={minValue:m.minValue,maxValue:m.maxValue,label:d};if(c&&d){const a=d.match(o),s=(a==null?void 0:a.map(h=>+h.trim()))??[];s.length===2?(r.minStdDev=s[0],r.maxStdDev=s[1],s[0]<0&&s[1]>0&&(r.hasAvg=!0)):s.length===1&&(d.includes("<")?(r.minStdDev=null,r.maxStdDev=s[0]):d.includes(">")&&(r.minStdDev=s[0],r.maxStdDev=null))}return r}),{minValue:u,maxValue:i,classBreakInfos:l,normalizationTotal:t.normalizationTotal}}function Tt(t,e){const l=ct(t,e);if(l.min==null&&l.max==null)return{bins:[],minValue:l.min,maxValue:l.max,normalizationTotal:e.normalizationTotal};const n=l.intervals,u=l.min??0,i=l.max??0,c=n.map((o,f)=>({minValue:n[f][0],maxValue:n[f][1],count:0}));for(const o of t)if(o!=null&&o>=u&&o<=i){const f=mt(n,o);f>-1&&c[f].count++}return{bins:c,minValue:u,maxValue:i,normalizationTotal:e.normalizationTotal}}function ct(t,e){const{field:l,classificationMethod:n,standardDeviationInterval:u,normalizationType:i,normalizationField:c,normalizationTotal:o,minValue:f,maxValue:p}=e,m=e.numBins||j;let d=null,r=null,a=null;if((!n||n==="equal-interval")&&!i){if(f!=null&&p!=null)d=f,r=p;else{const s=W({values:t,minValue:f,maxValue:p,useSampleStdDev:!i,supportsNullCount:K({normalizationType:i,normalizationField:c,minValue:f,maxValue:p})});d=s.min??null,r=s.max??null}a=ft(d??0,r??0,m)}else{const{classBreaks:s}=ot(t,{field:l,normalizationType:i,normalizationField:c,normalizationTotal:o,classificationMethod:n,standardDeviationInterval:u,minValue:f,maxValue:p,numClasses:m});d=s[0].minValue,r=s[s.length-1].maxValue,a=s.map(h=>[h.minValue,h.maxValue])}return{min:d,max:r,intervals:a}}function mt(t,e){let l=-1;for(let n=t.length-1;n>=0;n--)if(e>=t[n][0]){l=n;break}return l}function ft(t,e,l){const n=(e-t)/l,u=[];let i,c=t;for(let o=1;o<=l;o++)i=c+n,i=Number(i.toFixed(16)),u.push([c,o===l?e:i]),c=i;return u}export{gt as $,vt as B,bt as C,ot as E,xt as P,X as T,Tt as U,x as c,ht as d,K as f,Vt as k,W as p,$ as v}; diff --git a/build/assets/utils-CF4bGKhW.js b/build/assets/utils-CF4bGKhW.js new file mode 100644 index 0000000..60b5daa --- /dev/null +++ b/build/assets/utils-CF4bGKhW.js @@ -0,0 +1 @@ +import{I as s,$ as u}from"./index-DKOmzAMm.js";function a(n,r){return r?{...r,query:{...n??{},...r.query}}:{query:n}}function l(n){return typeof n=="string"?s(n):u(n)}function c(n,r,f){const i={};for(const e in n){if(e==="declaredClass")continue;const t=n[e];if(t!=null&&typeof t!="function")if(Array.isArray(t))i[e]=t.map(o=>c(o));else if(typeof t=="object")if(t.toJSON){const o=t.toJSON(f==null?void 0:f[e]);i[e]=JSON.stringify(o)}else i[e]=JSON.stringify(t);else i[e]=t}return i}export{l as f,a as i,c as s}; diff --git a/build/assets/utils-CqM6vUbj.js b/build/assets/utils-CqM6vUbj.js new file mode 100644 index 0000000..23a8d13 --- /dev/null +++ b/build/assets/utils-CqM6vUbj.js @@ -0,0 +1 @@ +import{bP as G,dO as O,dP as P,dQ as V,dR as j,Q as z,dS as R,dT as U,dU as v,dV as Y,dW as _,ay as A,dX as D,dY as L}from"./index-DKOmzAMm.js";import"./Basemap-drllXW5h.js";import{c as E,B as Q}from"./utils-C0Bk6fkM.js";function S(e){return G(e)||O(e)||P(e)}let m=null;const W=/^(?([0-1][0-9])|([2][0-3])):(?[0-5][0-9])(:(?[0-5][0-9]))?([.](?\d+))?$/;function Z(e,t,o){return e.x<0?e.x+=t:e.x>o&&(e.x-=t),e}function H(e,t,o,r){const a=V(o)?j(o):null,u=a?Math.round((a.valid[1]-a.valid[0])/t.scale[0]):null;return e.map(i=>{const s=new z(i.geometry);return R(t,s,s),i.geometry=a?Z(s,u??0,r[0]):s,i})}function J(e,t=18,o,r,a){const u=new Float64Array(r*a);t=Math.round(D(t));let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const g=L(o);for(const{geometry:h,attributes:N}of e){const{x:I,y:c}=h,$=Math.max(0,I-t),M=Math.max(0,c-t),F=Math.min(a,c+t),y=Math.min(r,I+t),p=+g(N);for(let f=M;fl.name.toLowerCase()===r.toLowerCase())),N=!!h&&Y(h),I=!!h&&S(h),c=e.valueExpression,$=e.normalizationType,M=e.normalizationField,F=e.normalizationTotal,y=[],p=e.viewInfoParams;let f=null,d=null;if(c){if(!m){const{arcadeUtils:l}=await _();m=l}m.hasGeometryOperations(c)&&await m.enableGeometryOperations(),f=m.createFunction(c),d=p?m.getViewInfo({viewingMode:p.viewingMode,scale:p.scale,spatialReference:new A(p.spatialReference)}):null}const b=e.fieldInfos,w=!(t[0]&&"declaredClass"in t[0]&&t[0].declaredClass==="esri.Graphic")&&b?{fields:b}:null;return t.forEach(l=>{const x=l.attributes;let n;if(c){const T=w?{...l,layer:w}:l,C=m.createExecContext(T,d,g);n=m.executeFunction(f,C)}else x&&(n=x[r],a?(n=`${E(n)}${i}${E(x[a])}`,u&&(n=`${n}${i}${E(x[u])}`)):typeof n=="string"&&o&&(I?n=n?new Date(n).getTime():null:N&&(n=n?B(n):null)));if($&&typeof n=="number"&&isFinite(n)){const T=x&&parseFloat(x[M]);n=Q(n,$,T,F)}y.push(n)}),y}export{K as b,H as j,B as w,J as x}; diff --git a/build/assets/utils-V4fw_T9z.js b/build/assets/utils-V4fw_T9z.js new file mode 100644 index 0000000..cd44b40 --- /dev/null +++ b/build/assets/utils-V4fw_T9z.js @@ -0,0 +1 @@ +import{S as P,C as h,i as x,s as m,f as N}from"./index-DKOmzAMm.js";import{i as d}from"./originUtils-D69mHv66.js";import{o as S}from"./jsonContext-SE-5k22x.js";import{i as b}from"./saveAPIKeyUtils-CqAN5-r5.js";import{t as g}from"./saveUtils-oCA1ZjYH.js";function O(e,a,r){const t=r(e);if(!t.isValid)throw new m(`${a}:invalid-parameters`,t.errorMessage,{layer:e})}async function y(e){const{layer:a,errorNamePrefix:r,validateLayer:t}=e;await a.load(),O(a,r,t)}function u(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function w(e){const{item:a,errorNamePrefix:r,layer:t,validateItem:i}=e;if(b(a),J(e),i){const s=i(a);if(!s.isValid)throw new m(`${r}:invalid-parameters`,s.errorMessage,{layer:t})}}function J(e){const{item:a,itemType:r,additionalItemType:t,errorNamePrefix:i,layer:s}=e,n=[r];if(t&&n.push(t),!n.includes(a.type)){const p=n.map(o=>`'${o}'`).join(", ");throw new m(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${p}"`,{item:a,layer:s})}}function C(e){const{layer:a,errorNamePrefix:r}=e,{portalItem:t}=a;if(!t)throw new m(`${r}:portal-item-not-set`,u(a,"requires the portalItem property to be set"));if(!t.loaded)throw new m(`${r}:portal-item-not-loaded`,u(a,"cannot be saved to a portal item that does not exist or is inaccessible"));w({...e,item:t})}function E(e){const{newItem:a,itemType:r}=e;let t=P.from(a);return t.id&&(t=t.clone(),t.id=null),t.type??(t.type=r),t.portal??(t.portal=h.getDefault()),w({...e,item:t}),t}function I(e){return S(e,"portal-item")}async function $(e,a,r){var i;"beforeSave"in e&&typeof e.beforeSave=="function"&&await e.beforeSave();const t=e.write({},a);return await Promise.all(((i=a.resources)==null?void 0:i.pendingOperations)??[]),g(a,{errorName:"layer-write:unsupported"},r),t}function v(e){x(e,N.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((a,r,t)=>t.indexOf(a)===r))}async function U(e,a,r){var i;const t=e.portal;await t.signIn(),await((i=t.user)==null?void 0:i.addItem({item:e,data:a,folder:r==null?void 0:r.folder}))}async function M(e,a){const{layer:r,createItemData:t,createJSONContext:i,setItemProperties:s,saveResources:n,supplementalUnsupportedErrors:p}=e;await y(e),C(e);const o=r.portalItem,l=i?i(o):I(o),c=await $(r,l,{...a,supplementalUnsupportedErrors:p}),f=await t({layer:r,layerJSON:c},o);return await(s==null?void 0:s(r,o)),v(o),await o.update({data:f}),d(l),await(n==null?void 0:n(o,l)),o}async function R(e,a){const{layer:r,createItemData:t,createJSONContext:i,setItemProperties:s,saveResources:n,supplementalUnsupportedErrors:p}=e;await y(e);const o=E(e),l=i?i(o):I(o),c=await $(r,l,{...a,supplementalUnsupportedErrors:p}),f=await t({layer:r,layerJSON:c},o);return await s(r,o),v(o),await U(o,f,a),r.portalItem=o,d(l),await(n==null?void 0:n(o,l)),o}export{M as $,$ as I,U as P,u as c,C as d,R as j,O as l,v,I as w,E as y}; diff --git a/build/assets/vec2-CurFBDJu.js b/build/assets/vec2-CurFBDJu.js new file mode 100644 index 0000000..3feca55 --- /dev/null +++ b/build/assets/vec2-CurFBDJu.js @@ -0,0 +1 @@ +import{aw as b,ae as q}from"./index-DKOmzAMm.js";function p(n,t){return n[0]=t[0],n[1]=t[1],n}function x(n,t,u){return n[0]=t,n[1]=u,n}function g(n,t,u){return n[0]=t[0]+u[0],n[1]=t[1]+u[1],n}function i(n,t,u){return n[0]=t[0]-u[0],n[1]=t[1]-u[1],n}function f(n,t,u){return n[0]=t[0]*u[0],n[1]=t[1]*u[1],n}function M(n,t,u){return n[0]=t[0]/u[0],n[1]=t[1]/u[1],n}function v(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n}function y(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n}function _(n,t,u){return n[0]=Math.min(t[0],u[0]),n[1]=Math.min(t[1],u[1]),n}function j(n,t,u){return n[0]=Math.max(t[0],u[0]),n[1]=Math.max(t[1],u[1]),n}function A(n,t){return n[0]=Math.round(t[0]),n[1]=Math.round(t[1]),n}function P(n,t,u){return n[0]=t[0]*u,n[1]=t[1]*u,n}function S(n,t,u,o){return n[0]=t[0]+u[0]*o,n[1]=t[1]+u[1]*o,n}function h(n,t){const u=t[0]-n[0],o=t[1]-n[1];return Math.sqrt(u*u+o*o)}function l(n,t){const u=t[0]-n[0],o=t[1]-n[1];return u*u+o*o}function d(n){const t=n[0],u=n[1];return Math.sqrt(t*t+u*u)}function m(n){const t=n[0],u=n[1];return t*t+u*u}function z(n,t){return n[0]=-t[0],n[1]=-t[1],n}function D(n,t){return n[0]=1/t[0],n[1]=1/t[1],n}function I(n,t){const u=t[0],o=t[1];let e=u*u+o*o;return e>0&&(e=1/Math.sqrt(e),n[0]=t[0]*e,n[1]=t[1]*e),n}function L(n,t){return n[0]*t[0]+n[1]*t[1]}function O(n,t,u){const o=t[0]*u[1]-t[1]*u[0];return n[0]=n[1]=0,n[2]=o,n}function w(n,t,u,o){const e=t[0],r=t[1];return n[0]=e+o*(u[0]-e),n[1]=r+o*(u[1]-r),n}function E(n,t){t=t||1;const u=2*b()*Math.PI;return n[0]=Math.cos(u)*t,n[1]=Math.sin(u)*t,n}function T(n,t,u){const o=t[0],e=t[1];return n[0]=u[0]*o+u[2]*e,n[1]=u[1]*o+u[3]*e,n}function $(n,t,u){const o=t[0],e=t[1];return n[0]=u[0]*o+u[2]*e+u[4],n[1]=u[1]*o+u[3]*e+u[5],n}function k(n,t,u){const o=t[0],e=t[1];return n[0]=u[0]*o+u[3]*e+u[6],n[1]=u[1]*o+u[4]*e+u[7],n}function B(n,t,u){const o=t[0],e=t[1];return n[0]=u[0]*o+u[4]*e+u[12],n[1]=u[1]*o+u[5]*e+u[13],n}function C(n,t,u,o){const e=t[0]-u[0],r=t[1]-u[1],a=Math.sin(o),c=Math.cos(o);return n[0]=e*c-r*a+u[0],n[1]=e*a+r*c+u[1],n}function F(n,t){const u=n[0],o=n[1],e=t[0],r=t[1];let a=u*u+o*o;a>0&&(a=1/Math.sqrt(a));let c=e*e+r*r;c>0&&(c=1/Math.sqrt(c));const s=(u*e+o*r)*a*c;return s>1?0:s<-1?Math.PI:Math.acos(s)}function G(n){return"vec2("+n[0]+", "+n[1]+")"}function H(n,t){return n[0]===t[0]&&n[1]===t[1]}function J(n,t){const u=n[0],o=n[1],e=t[0],r=t[1],a=q();return Math.abs(u-e)<=a*Math.max(1,Math.abs(u),Math.abs(e))&&Math.abs(o-r)<=a*Math.max(1,Math.abs(o),Math.abs(r))}function K(n,t,u,o,e){let r=t[0]-u[0],a=t[1]-u[1];const c=(o[0]*r+o[1]*a)*(e-1);return r=o[0]*c,a=o[1]*c,n[0]=t[0]+r,n[1]=t[1]+a,n}const N=d,Q=i,R=f,U=M,V=h,W=l,X=m;Object.freeze(Object.defineProperty({__proto__:null,add:g,angle:F,ceil:v,copy:p,cross:O,dist:V,distance:h,div:U,divide:M,dot:L,equals:J,exactEquals:H,floor:y,inverse:D,len:N,length:d,lerp:w,max:j,min:_,mul:R,multiply:f,negate:z,normalize:I,projectAndScale:K,random:E,rotate:C,round:A,scale:P,scaleAndAdd:S,set:x,sqrDist:W,sqrLen:X,squaredDistance:l,squaredLength:m,str:G,sub:Q,subtract:i,transformMat2:T,transformMat2d:$,transformMat3:k,transformMat4:B},Symbol.toStringTag,{value:"Module"}));export{Q as B,C as I,$ as S,w as _,P as l,h as m,x as o,g as u,I as v}; diff --git a/build/assets/vec2f32-DxfkRbjY.js b/build/assets/vec2f32-DxfkRbjY.js new file mode 100644 index 0000000..d035ad5 --- /dev/null +++ b/build/assets/vec2f32-DxfkRbjY.js @@ -0,0 +1 @@ +import{M as Z,s as d,V as q}from"./index-DKOmzAMm.js";import{c as R,P as i,B as f,G as _,M as I,U as b,L as m,D as J,V as F}from"./enums-CxXC-vJk.js";const Q=()=>q.getLogger("esri.views.webgl.checkWebGLError");function ee(t,e){switch(e){case t.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case t.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case t.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case t.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case t.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case t.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const v=!!Z("enable-feature:webgl-debug");function te(){return v}function ge(){return v}function D(t){if(te()){const e=t.getError();if(e){const r=ee(t,e),a=new Error().stack;Q().error(new d("webgl-error","WebGL error occurred",{message:r,stack:a}))}}}var C;(function(t){t[t.Texture=0]="Texture",t[t.RenderBuffer=1]="RenderBuffer"})(C||(C={}));function re(t){switch(t){case _.ALPHA:case _.LUMINANCE:case _.RED:case _.RED_INTEGER:case i.R8:case i.R8I:case i.R8UI:case i.R8_SNORM:case f.STENCIL_INDEX8:return 1;case _.LUMINANCE_ALPHA:case _.RG:case _.RG_INTEGER:case i.RGBA4:case i.R16F:case i.R16I:case i.R16UI:case i.RG8:case i.RG8I:case i.RG8UI:case i.RG8_SNORM:case i.RGB565:case i.RGB5_A1:case f.DEPTH_COMPONENT16:return 2;case _.DEPTH_COMPONENT:case _.RGB:case _.RGB_INTEGER:case i.RGB8:case i.RGB8I:case i.RGB8UI:case i.RGB8_SNORM:case i.SRGB8:case f.DEPTH_COMPONENT24:return 3;case _.DEPTH_STENCIL:case _.DEPTH24_STENCIL8:case _.RGBA:case _.RGBA_INTEGER:case i.RGBA8:case i.R32F:case i.R11F_G11F_B10F:case i.RG16F:case i.R32I:case i.R32UI:case i.RG16I:case i.RG16UI:case i.RGBA8I:case i.RGBA8UI:case i.RGBA8_SNORM:case i.SRGB8_ALPHA8:case i.RGB9_E5:case i.RGB10_A2UI:case i.RGB10_A2:case f.DEPTH_STENCIL:case f.DEPTH_COMPONENT32F:case f.DEPTH24_STENCIL8:return 4;case f.DEPTH32F_STENCIL8:return 5;case i.RGB16F:case i.RGB16I:case i.RGB16UI:return 6;case i.RG32F:case i.RG32I:case i.RG32UI:case i.RGBA16F:case i.RGBA16I:case i.RGBA16UI:return 8;case i.RGB32F:case i.RGB32I:case i.RGB32UI:return 12;case i.RGBA32F:case i.RGBA32I:case i.RGBA32UI:return 16;case R.COMPRESSED_RGB_S3TC_DXT1_EXT:case R.COMPRESSED_RGBA_S3TC_DXT1_EXT:return .5;case R.COMPRESSED_RGBA_S3TC_DXT3_EXT:case R.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case R.COMPRESSED_R11_EAC:case R.COMPRESSED_SIGNED_R11_EAC:case R.COMPRESSED_RGB8_ETC2:case R.COMPRESSED_SRGB8_ETC2:case R.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case R.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return .5;case R.COMPRESSED_RG11_EAC:case R.COMPRESSED_SIGNED_RG11_EAC:case R.COMPRESSED_RGBA8_ETC2_EAC:case R.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}let se=class{constructor(e=0,r=e){this.width=e,this.height=r,this.target=I.TEXTURE_2D,this.pixelFormat=_.RGBA,this.dataType=b.UNSIGNED_BYTE,this.samplingMode=m.LINEAR,this.wrapMode=J.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}};function ie(t){return t.width<=0||t.height<=0?0:Math.round(t.width*t.height*(t.hasMipmap?4/3:1)*(t.internalFormat==null?4:re(t.internalFormat)))}let ae=class H extends se{constructor(e,r){switch(super(),this.context=e,Object.assign(this,r),this.internalFormat){case i.R16F:case i.R16I:case i.R16UI:case i.R32F:case i.R32I:case i.R32UI:case i.R8_SNORM:case i.R8:case i.R8I:case i.R8UI:this.pixelFormat=_.RED}}static validate(e,r){return new H(e,r)}};const B=4;let ne=class A{constructor(e,r=null,a=null){if(this.type=C.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,a=r;else{const s=ae.validate(e,r);if(!s)throw new d("Texture descriptor invalid");this._descriptor=s}this._descriptor.target===I.TEXTURE_CUBE_MAP?this._setDataCubeMap(a):this.setData(a)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return ie(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(F.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,r){const a=this._descriptor;if(a.width!==e||a.height!==r){if(this._wasImmutablyAllocated)throw new d("Immutable textures can't be resized!");a.width=e,a.height=r,this._descriptor.target===I.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let r=I.TEXTURE_CUBE_MAP_POSITIVE_X;r<=I.TEXTURE_CUBE_MAP_NEGATIVE_Z;r++)this._setData(e,r)}setData(e){this._setData(e)}_setData(e,r){var u;if(!((u=this._descriptor.context)!=null&&u.gl))return;const a=this._descriptor.context.gl;D(a),this._glName||(this._glName=a.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(F.Texture,this)),e===void 0&&(e=null);const s=this._descriptor,n=r??s.target,c=N(n);e===null&&(s.width=s.width||B,s.height=s.height||B,c&&(s.depth=s.depth??1));const l=this._descriptor.context.bindTexture(this,A.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(A.TEXTURE_UNIT_FOR_UPDATES),P(s),this._configurePixelStorage(),D(a);const o=this._deriveInternalFormat();if(y(e)){let E="width"in e?e.width:e.codedWidth,h="height"in e?e.height:e.codedHeight;const p=1;e instanceof HTMLVideoElement&&(E=e.videoWidth,h=e.videoHeight),s.width&&s.height,c&&s.depth,s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,o,s.hasMipmap,E,h,p),this._texImage(n,0,o,E,h,p,e),D(a),s.hasMipmap&&this.generateMipmap(),s.width||(s.width=E),s.height||(s.height=h),c&&!s.depth&&(s.depth=p)}else{const{width:E,height:h,depth:p}=s;if(E==null||h==null)throw new d("Width and height must be specified!");if(c&&p==null)throw new d("Depth must be specified!");if(s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,o,s.hasMipmap,E,h,p),w(e)){const T=e.levels,x=X(n,E,h,p),M=Math.min(x-1,T.length-1);a.texParameteri(s.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,M);const g=o;if(!le(g))throw new d("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel((S,G,K,k)=>{const j=T[Math.min(S,T.length-1)];this._compressedTexImage(n,S,g,G,K,k,j)},M)}else this._texImage(n,0,o,E,h,p,e),D(a),s.hasMipmap&&this.generateMipmap()}O(a,this._descriptor),L(a,this._descriptor),oe(this._descriptor.context,this._descriptor),D(a),this._descriptor.context.bindTexture(l,A.TEXTURE_UNIT_FOR_UPDATES)}updateData(e,r,a,s,n,c,l=0){c||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const o=this._descriptor,u=this._deriveInternalFormat(),{context:E,pixelFormat:h,dataType:p,target:T,isImmutable:x}=o;if(x&&!this._wasImmutablyAllocated)throw new d("Cannot update immutable texture before allocation!");const M=E.bindTexture(this,A.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||a<0||r+s>o.width||a+n>o.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:g}=E;l&&g.pixelStorei(g.UNPACK_SKIP_ROWS,l),y(c)?g.texSubImage2D(T,e,r,a,s,n,h,p,c):w(c)?g.compressedTexSubImage2D(T,e,r,a,s,n,u,c.levels[e]):g.texSubImage2D(T,e,r,a,s,n,h,p,c),l&&g.pixelStorei(g.UNPACK_SKIP_ROWS,0),E.bindTexture(M,A.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,r,a,s,n,c,l,o){o||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const u=this._descriptor,E=this._deriveInternalFormat(),{context:h,pixelFormat:p,dataType:T,isImmutable:x,target:M}=u;if(x&&!this._wasImmutablyAllocated)throw new d("Cannot update immutable texture before allocation!");N(M)||console.warn("Attempting to set 3D texture data on a non-3D texture");const g=h.bindTexture(this,A.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(A.TEXTURE_UNIT_FOR_UPDATES),(r<0||a<0||s<0||r+n>u.width||a+c>u.height||s+l>u.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:S}=h;if(w(o))o=o.levels[e],S.compressedTexSubImage3D(M,e,r,a,s,n,c,l,E,o);else{const G=o;S.texSubImage3D(M,e,r,a,s,n,c,l,p,T,G)}h.bindTexture(g,A.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new d("Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,P(e)}e.samplingMode===m.LINEAR?(this._samplingModeDirty=!0,e.samplingMode=m.LINEAR_MIPMAP_NEAREST):e.samplingMode===m.NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=m.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,A.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(A.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(r,A.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new d("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,P(e)}e.samplingMode===m.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=m.LINEAR):e.samplingMode===m.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=m.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,P(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,r=e.context.gl;this._samplingModeDirty&&(O(r,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(L(r,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(this._descriptor.internalFormat!=null)return this._descriptor.internalFormat===_.DEPTH_STENCIL&&(this._descriptor.internalFormat=_.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case b.FLOAT:switch(this._descriptor.pixelFormat){case _.RGBA:return this._descriptor.internalFormat=i.RGBA32F;case _.RGB:return this._descriptor.internalFormat=i.RGB32F;default:throw new d("Unable to derive format")}case b.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case _.RGBA:return this._descriptor.internalFormat=i.RGBA8;case _.RGB:return this._descriptor.internalFormat=i.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===_.DEPTH_STENCIL?_.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:r,flipped:a,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,a?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_texStorage(e,r,a,s,n,c){const{gl:l}=this._descriptor.context;if(!ce(r))throw new d("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const o=a?X(e,s,n,c):1;if(N(e)){if(c==null)throw new d("Missing depth dimension for 3D texture upload");l.texStorage3D(e,o,r,s,n,c)}else l.texStorage2D(e,o,r,s,n);this._wasImmutablyAllocated=!0}_texImage(e,r,a,s,n,c,l){const o=this._descriptor.context.gl,u=N(e),{isImmutable:E,pixelFormat:h,dataType:p}=this._descriptor;if(E){if(l!=null){const T=l;if(u){if(c==null)throw new d("Missing depth dimension for 3D texture upload");o.texSubImage3D(e,r,0,0,0,s,n,c,h,p,T)}else o.texSubImage2D(e,r,0,0,s,n,h,p,T)}}else{const T=l;if(u){if(c==null)throw new d("Missing depth dimension for 3D texture upload");o.texImage3D(e,r,a,s,n,c,0,h,p,T)}else o.texImage2D(e,r,a,s,n,0,h,p,T)}}_compressedTexImage(e,r,a,s,n,c,l){const o=this._descriptor.context.gl,u=N(e);if(this._descriptor.isImmutable){if(l!=null)if(u){if(c==null)throw new d("Missing depth dimension for 3D texture upload");o.compressedTexSubImage3D(e,r,0,0,0,s,n,c,a,l)}else o.compressedTexSubImage2D(e,r,0,0,s,n,a,l)}else if(u){if(c==null)throw new d("Missing depth dimension for 3D texture upload");o.compressedTexImage3D(e,r,a,s,n,c,0,l)}else o.compressedTexImage2D(e,r,a,s,n,0,l)}_forEachMipmapLevel(e,r=1/0){let{width:a,height:s,depth:n,hasMipmap:c,target:l}=this._descriptor;const o=l===I.TEXTURE_3D;if(a==null||s==null||o&&n==null)throw new d("Missing texture dimensions for mipmap calculation");for(let u=0;e(u,a,s,n),c&&(a!==1||s!==1||o&&n!==1)&&!(u>=r);++u)a=Math.max(1,a>>1),s=Math.max(1,s>>1),o&&(n=Math.max(1,n>>1))}};function P(t){(t.width!=null&&t.width<0||t.height!=null&&t.height<0||t.depth!=null&&t.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function O(t,e){let r=e.samplingMode,a=e.samplingMode;r===m.LINEAR_MIPMAP_NEAREST||r===m.LINEAR_MIPMAP_LINEAR?(r=m.LINEAR,e.hasMipmap||(a=m.LINEAR)):r!==m.NEAREST_MIPMAP_NEAREST&&r!==m.NEAREST_MIPMAP_LINEAR||(r=m.NEAREST,e.hasMipmap||(a=m.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,a)}function L(t,e){typeof e.wrapMode=="number"?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}function oe(t,e){const r=t.capabilities.textureFilterAnisotropic;r&&t.gl.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}function ce(t){return t in i}function le(t){return t in R}function w(t){return t!=null&&"type"in t&&t.type==="compressed"}function _e(t){return t!=null&&"byteLength"in t}function y(t){return t!=null&&!w(t)&&!_e(t)}function N(t){return t===I.TEXTURE_3D||t===I.TEXTURE_2D_ARRAY}function X(t,e,r,a=1){let s=Math.max(e,r);return t===I.TEXTURE_3D&&(s=Math.max(s,a)),Math.round(Math.log(s)/Math.LN2)+1}ne.TEXTURE_UNIT_FOR_UPDATES=0;function $(){return new Float32Array(2)}function he(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e}function U(t,e){const r=new Float32Array(2);return r[0]=t,r[1]=e,r}function ue(t,e){return new Float32Array(t,e,2)}function W(){return $()}function V(){return U(1,1)}function z(){return U(1,0)}function Y(){return U(0,1)}const pe=W(),de=V(),Ee=z(),me=Y();Object.freeze(Object.defineProperty({__proto__:null,ONES:de,UNIT_X:Ee,UNIT_Y:me,ZEROS:pe,clone:he,create:$,createView:ue,fromValues:U,ones:V,unitX:z,unitY:Y,zeros:W},Symbol.toStringTag,{value:"Module"}));export{ge as a,te as b,ne as c,se as e,de as f,pe as i,$ as n,U as t,re as u}; diff --git a/build/assets/vec2f64-DA6GkJuH.js b/build/assets/vec2f64-DA6GkJuH.js new file mode 100644 index 0000000..3b388c0 --- /dev/null +++ b/build/assets/vec2f64-DA6GkJuH.js @@ -0,0 +1 @@ +function o(){return[0,0]}function a(n){return[n[0],n[1]]}function r(n,t){return[n,t]}function _(n,t=o()){const l=Math.min(2,n.length);for(let e=0;e0){const y=1/Math.sqrt(h);e[o]=y*i,e[o+1]=y*d,e[o+2]=y*c}r+=f,o+=t}}function T(e,n,t){const f=Math.min(e.count,n.count),l=e.typedBuffer,r=e.typedBufferStride,o=n.typedBuffer,u=n.typedBufferStride;let i=0,d=0;for(let c=0;c>t,l[d+1]=o[i+1]>>t,l[d+2]=o[i+2]>>t,i+=u,d+=r}Object.freeze(Object.defineProperty({__proto__:null,normalize:O,normalizeView:R,scale:j,scaleView:x,shiftRight:T,transformMat3:z,transformMat3View:v,transformMat4:b,transformMat4View:q,translate:P},Symbol.toStringTag,{value:"Module"}));export{b as e,z as f,P as i,O as l,x as n,j as o,v as r,q as t,R as u}; diff --git a/build/assets/vec4-n1PBj5SL.js b/build/assets/vec4-n1PBj5SL.js new file mode 100644 index 0000000..e386c69 --- /dev/null +++ b/build/assets/vec4-n1PBj5SL.js @@ -0,0 +1 @@ +import{V as P}from"./index-DKOmzAMm.js";const T=()=>P.getLogger("esri.views.3d.support.buffer.math");function k(t,n,e){if(t.count!==n.count)return;const o=t.count,c=e[0],i=e[1],l=e[2],u=e[3],f=e[4],r=e[5],a=e[6],p=e[7],y=e[8],v=e[9],B=e[10],h=e[11],m=e[12],z=e[13],w=e[14],_=e[15],d=t.typedBuffer,O=t.typedBufferStride,s=n.typedBuffer,V=n.typedBufferStride;for(let j=0;j0){const B=1/Math.sqrt(v);o[f]=B*a,o[f+1]=B*p,o[f+2]=B*y}}}function E(t,n,e){L(t.typedBuffer,n,e,t.typedBufferStride)}function L(t,n,e,o=4){const c=Math.min(t.length/o,n.count),i=n.typedBuffer,l=n.typedBufferStride;let u=0,f=0;for(let r=0;rK.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function Nn(n,t,{vertexSpace:o,spatialReference:e}){if(o.type==="georeferenced"){const u=n;if(!O(t,u,e))return!1;const{origin:c}=o;return Q(n,u,c),!0}const r=x(e),a=n;if(!O(t,a,r))return!1;const{origin:l}=o,s=U;if(!v(e,l,s,r))return!1;const i=h(U,s);return i!=null&&(W(n,a,i),!0)}function On(n,t,o){const{vertexSpace:e,transform:r,vertexAttributes:a}=n,l=y(n.spatialReference,o,g.SOURCE|g.TARGET);if(rn(e,t)&&(!r||Z(r.localMatrix,tn))&&_(l,1)){const{position:s,normal:i,tangent:u}=a,c=o==null?void 0:o.allowBufferReuse;return{position:c?s:s.slice(),normal:c?i:i==null?void 0:i.slice(),tangent:c?u:u==null?void 0:u.slice()}}switch(n.vertexSpace.type){case"local":return t.type==="local"?mn(n,n.vertexSpace,t.origin,o):fn(n,n.vertexSpace,t.origin,o);case"georeferenced":return t.type==="local"?pn(n,n.vertexSpace,t.origin,o):un(n,n.vertexSpace,t.origin,o)}}function un({vertexAttributes:n,transform:t,spatialReference:o},{origin:e},r,a){const{position:l,normal:s,tangent:i}=t?P(n,t.localMatrix):n,u=new Float64Array(l.length);let c=l;if(e&&(c=F(u,c,e)),r){const A=M(V,r);c=F(u,c,A)}y(o,a,g.NONE);const m=a==null?void 0:a.allowBufferReuse;return{position:c!==n.position||m?c:c.slice(),normal:s!==n.normal||m?s:s==null?void 0:s.slice(),tangent:i!==n.tangent||m?i:i==null?void 0:i.slice()}}function fn({spatialReference:n,vertexAttributes:t,transform:o},{origin:e},r,a){const l=x(n);if(!v(n,e,f,l))return $(p(),n,l),null;o&&T(f,f,o.localMatrix),J(f,n,a,g.SOURCE);const s=new Float64Array(t.position.length),i=$n(t.position,f,n,s);if(!i)return null;const u=xn(i,s,t.normal,f,n);if(t.normal&&!u)return null;const c=An(i,s,t.tangent,f,n);if(t.tangent&&!c)return null;if(r){const m=M(V,r);F(i,i,m)}return{position:i,normal:u,tangent:c}}function pn({vertexAttributes:n,spatialReference:t,transform:o},{origin:e},r,a){const l=x(t);if(!v(t,r,f,l))return $(p(),t,l),null;const s=1/y(t,a,g.TARGET);B(f,f,[s,s,s]);const i=h(R,f),{position:u,normal:c,tangent:m}=gn(n,e,o),A=new Float64Array(u.length),C=Rn(u,t,i,A);if(!C)return null;const j=X(wn,i),d=vn(c,u,A,t,j,c!==n.normal?c:void 0);if(!d&&c)return null;const N=Fn(m,u,A,t,j,m!==n.tangent?m:void 0);return!N&&m?null:{position:C,normal:d,tangent:N}}function gn(n,t,o){if(!t)return n;if(!o){const{position:r,normal:a,tangent:l}=n;return{position:F(new Float64Array(r.length),r,t),tangent:l,normal:a}}const e=P(n,o.localMatrix);return F(e.position,e.position,t),e}function mn({vertexAttributes:n,spatialReference:t,transform:o},{origin:e},r,a){const l=x(t);if(!v(t,e,f,l))return $(p(),t,l),null;if(o&&T(f,f,o.localMatrix),!v(t,r,R,l))return $(p(),l,t),null;h(R,R);const s=T(f,R,f);return J(s,t,a,g.SOURCE|g.TARGET),P(n,s)}function P(n,t){const o=new Float64Array(n.position.length);S(o,n.position,t);const e=n.normal?new Float32Array(n.normal.length):null,r=n.tangent?new Float32Array(n.tangent.length):null;return e&&n.normal&&k(n.normal,e,t),r&&n.tangent&&q(n.tangent,r,t),{position:o,normal:e,tangent:r}}function $n(n,t,o,e){S(e,n,t);const r=new Float64Array(n.length);return on(e,r,o)?r:($(p(),x(o),o),null)}function xn(n,t,o,e,r){if(o==null)return null;const a=new Float32Array(o.length);return k(o,a,e),en(a,n,t,r,a)?a:($(p(),x(r),r),null)}function An(n,t,o,e,r){if(o==null)return null;const a=new Float32Array(o.length);return q(o,a,e),an(a,n,t,r,a)?a:($(p(),x(r),r),null)}function J(n,t,o,e){const r=y(t,o,e);r!==1&&B(n,n,[r,r,r])}function y(n,t,o){const e=!!(o&g.SOURCE),r=!!(o&g.TARGET),a=t==null?void 0:t.sourceUnit,l=t==null?void 0:t.targetUnit;if(!a&&!l)return 1;let s=b(a,n);!e&&a&&s!==1&&(p().warn("source unit conversion not supported"),s=1);let i=1/b(l,n);return!r&&l&&i!==1&&(p().warn("target unit conversion not supported"),i=1),s*i}function Rn(n,t,o,e){const r=ln(n,t,e);if(!r)return $(p(),t,x(t)),null;const a=new Float64Array(r.length);return S(a,r,o),a}function vn(n,t,o,e,r,a){if(n==null)return null;const l=a??new Float32Array(n.length);return sn(n,t,o,e,l)?(z(l,l,r),l):($(p(),e,x(e)),null)}function Fn(n,t,o,e,r,a){if(n==null)return null;const l=a??new Float32Array(n.length);return cn(n,t,o,e,l)?(z(l,l,r,4),l):($(p(),e,x(e)),null)}function b(n,t){if(n==null)return 1;const o=D(t);return 1/I(o,"meters",n)}const f=E(),R=E(),wn=nn(),V=G(),U=E();var g;(function(n){n[n.NONE=0]="NONE",n[n.SOURCE=1]="SOURCE",n[n.TARGET=2]="TARGET"})(g||(g={}));export{On as M,Nn as N,b as X,O as c}; diff --git a/build/assets/webStyleSymbolUtils-Bnn0aSrt.js b/build/assets/webStyleSymbolUtils-Bnn0aSrt.js new file mode 100644 index 0000000..6947d34 --- /dev/null +++ b/build/assets/webStyleSymbolUtils-Bnn0aSrt.js @@ -0,0 +1 @@ +import{s as N,y as A,C as D,I as b,n as d,R as U,o as P,q as j,r as O,x as F,v as h,w as S,z as I,A as q}from"./index-DKOmzAMm.js";import{c as z,a as w}from"./devEnvironmentUtils-D6qIi8Ky.js";function k(e,t,l,n){const a=e.name;return a==null?Promise.reject(new N("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference")):e.styleName&&e.styleName==="Esri2DPointSymbolsStyle"?M(a,t,n):A(e,t,n).then(s=>E(s,a,t,l,q,n))}function C(e,t){return t.items.find(l=>l.name===e)}function E(e,t,l,n,a,s){var c,g;const o=(l==null?void 0:l.portal)!=null?l.portal:D.getDefault(),p={portal:o,url:b(e.baseUrl),origin:"portal-item"},m=C(t,e.data);if(!m){const u=`The symbol name '${t}' could not be found`;return Promise.reject(new N("symbolstyleutils:symbol-name-not-found",u,{symbolName:t}))}let i=d(a(m,n),p),y=((c=m.thumbnail)==null?void 0:c.href)??null;const f=(g=m.thumbnail)==null?void 0:g.imageData;z()&&(i=w(i)??"",y=w(y));const R={portal:o,url:b(U(i)),origin:"portal-item"};return P(i,s).then(u=>{const v=n==="cimRef"?j(u.data):u.data,r=O(v,R);if(r&&F(r)){if(y){const x=d(y,p);r.thumbnail=new h({url:x})}else f&&(r.thumbnail=new h({url:`data:image/png;base64,${f}`}));e.styleUrl?r.styleOrigin=new S({portal:l.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(r.styleOrigin=new S({portal:l.portal,styleName:e.styleName,name:t}))}return r})}function M(e,t,l){const n=I.replaceAll(/\{SymbolName\}/gi,e),a=t.portal!=null?t.portal:D.getDefault();return P(n,l).then(s=>{const o=j(s.data);return O(o,{portal:a,url:b(U(n)),origin:"portal-item"})})}export{E as fetchSymbolFromStyle,C as getStyleItemFromStyle,k as resolveWebStyleSymbol}; diff --git a/build/assets/wfsUtils-tW6kf0DT.js b/build/assets/wfsUtils-tW6kf0DT.js new file mode 100644 index 0000000..dc2f318 --- /dev/null +++ b/build/assets/wfsUtils-tW6kf0DT.js @@ -0,0 +1 @@ +import{U as b,c9 as M,s as c,ca as V,cb as E,cc as R,cd as S,ay as A,ab as j,ce as L,cf as O,cg as f,ch as Y,ci as W,aZ as X,bD as q,bH as F}from"./index-DKOmzAMm.js";import{u as z}from"./geojson-BRJeQduY.js";import{o as x,n as g}from"./xmlUtils-CtUoQO7q.js";const C="xlink:href",d="2.0.0",k="__esri_wfs_id__",_="wfs-layer:getWFSLayerTypeInfo-error",H="wfs-layer:empty-service",N="wfs-layer:feature-type-not-found",J="wfs-layer:geojson-not-supported",K="wfs-layer:kvp-encoding-not-supported",Q="wfs-layer:malformed-json",G="wfs-layer:unknown-geometry-type",B="wfs-layer:unknown-field-type",Z="wfs-layer:unsupported-spatial-reference",ee="wfs-layer:unsupported-wfs-version";async function Se(r,t){const e=te((await b(r,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:d,...t==null?void 0:t.customParameters},signal:t==null?void 0:t.signal})).data);return ne(r,e),e}function te(r){const t=U(r);we(t),I(t);const e=t.firstElementChild,a=M(oe(e));return{operations:re(e),get featureTypes(){return Array.from(a())},readFeatureTypes:a}}const ae=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function P(r){for(const t of ae){const e=r.findIndex(a=>a.toLowerCase()===t);if(e>=0)return r[e]}return null}function re(r){let t=!1;const e={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},a=[],n=[];if(x(r,{OperationsMetadata:{Parameter:o=>{if(o.getAttribute("name")==="outputFormat")return{AllowedValues:{Value:({textContent:s})=>{s&&a.push(s)}}}},Operation:o=>{switch(o.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:s=>{e.GetCapabilities.url=s.getAttribute(C)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:s=>{e.DescribeFeatureType.url=s.getAttribute(C)}}}};case"GetFeature":return{DCP:{HTTP:{Get:s=>{e.GetFeature.url=s.getAttribute(C)}}},Parameter:s=>{if(s.getAttribute("name")==="outputFormat")return{AllowedValues:{Value:({textContent:i})=>{i&&n.push(i)}}}}}}},Constraint:o=>{switch(o.getAttribute("name")){case"KVPEncoding":return{DefaultValue:s=>{t=s.textContent.toLowerCase()==="true"}};case"ImplementsResultPaging":return{DefaultValue:s=>{e.GetFeature.supportsPagination=s.textContent.toLowerCase()==="true"}}}}}}),e.GetFeature.outputFormat=P(n)??P(a),!t)throw new c(K,"WFS service doesn't support key/value pair (KVP) encoding");if(e.GetFeature.outputFormat==null)throw new c(J,"WFS service doesn't support GeoJSON output format");return e}function ne(r,t){V(r)&&(E(r,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=R(t.operations.DescribeFeatureType.url)),E(r,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=R(t.operations.GetFeature.url)))}function $(r){var e,a,n;const t=parseInt(((n=(a=(e=r.textContent)==null?void 0:e.match(/(?\d+$)/i))==null?void 0:a.groups)==null?void 0:n.wkid)??"",10);if(!Number.isNaN(t))return t}function oe(r){return g(r,{FeatureTypeList:{FeatureType:t=>{const e={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},a=new Set;return x(t,{Name:n=>{const{name:o,prefix:s}=w(n.textContent);e.typeName=`${s}:${o}`,e.name=o,e.namespacePrefix=s,e.namespaceUri=n.lookupNamespaceURI(s)},Abstract:n=>{e.description=n.textContent},Title:n=>{e.title=n.textContent},WGS84BoundingBox:n=>{e.extent=X.fromJSON(se(n))},DefaultCRS:n=>{const o=$(n);o&&(e.defaultSpatialReference=o,a.add(o))},OtherCRS:n=>{const o=$(n);o&&a.add(o)}}),e.title||(e.title=e.name),a.add(4326),e.supportedSpatialReferences.push(...a),e}}})}function se(r){let t,e,a,n;for(const o of r.children)switch(o.localName){case"LowerCorner":[t,e]=o.textContent.split(" ").map(s=>Number.parseFloat(s));break;case"UpperCorner":[a,n]=o.textContent.split(" ").map(s=>Number.parseFloat(s))}return{xmin:t,ymin:e,xmax:a,ymax:n,spatialReference:q}}function ie(r,t,e){return S(r,a=>e?a.name===t&&a.namespaceUri===e:a.typeName===t||a.name===t)}async function xe(r,t,e,a={}){const{featureType:n,extent:o}=await ue(r,t,e,a),{spatialReference:s}=be(r.operations.GetFeature.url,n,a.spatialReference),{fields:i,geometryType:p,swapXY:l,objectIdField:u,geometryField:y}=await pe(r,n,s,a);return{url:r.operations.GetCapabilities.url,name:n.name,namespaceUri:n.namespaceUri,fields:i,geometryField:y,geometryType:p,objectIdField:u,spatialReference:a.spatialReference??new A({wkid:n.defaultSpatialReference}),extent:o,swapXY:l,wfsCapabilities:r,customParameters:a.customParameters}}async function ue(r,t,e,a={}){const n=r.readFeatureTypes(),o=t?ie(n,t,e):n.next().value,{spatialReference:s=new A({wkid:o==null?void 0:o.defaultSpatialReference})}=a;if(o==null)throw t?new c(N,`The type '${t}' could not be found in the service`):new c(H,"The service is empty");let i=o.extent;if(i&&!j(i.spatialReference,s))try{await L(i.spatialReference,s,void 0,a),i=O(i,s)}catch{throw new c(Z,"Projection not supported")}return{extent:i,spatialReference:s,featureType:o}}async function pe(r,t,e,a={}){var m,T,h;const{typeName:n}=t,[o,s]=await Promise.allSettled([ye(r.operations.DescribeFeatureType.url,n,a),le(r,n,e,a)]),i=D=>new c(_,`An error occurred while getting info about the feature type '${n}'`,{error:D});if(o.status==="rejected")throw i(o.reason);if(s.status==="rejected")throw i(s.reason);const{fields:p,errors:l}=o.value??{},u=((m=o.value)==null?void 0:m.geometryType)||((T=s.value)==null?void 0:T.geometryType),y=((h=s.value)==null?void 0:h.swapXY)??!1;if(u==null)throw new c(G,`The geometry type could not be determined for type '${n}`,{typeName:n,geometryType:u,fields:p,errors:l});return{...ce(p??[]),geometryType:u,swapXY:y}}function ce(r){const t=r.find(a=>a.type==="geometry");let e=r.find(a=>a.type==="oid");return r=r.filter(a=>a.type!=="geometry"),e||(e=new f({name:k,type:"oid",alias:k}),r.unshift(e)),{geometryField:(t==null?void 0:t.name)??null,objectIdField:e.name,fields:r}}async function le(r,t,e,a={}){var l;let n,o=!1;const[s,i]=await Promise.all([ge(r.operations.GetFeature.url,t,e,r.operations.GetFeature.outputFormat,{...a,count:1}),b(r.operations.GetFeature.url,{responseType:"text",query:v(t,e,void 0,{...a,count:1}),signal:a==null?void 0:a.signal})]),p=s.type==="FeatureCollection"&&((l=s.features[0])==null?void 0:l.geometry);if(p){let u;switch(n=Y.fromJSON(z(p.type)),p.type){case"Point":u=p.coordinates;break;case"LineString":case"MultiPoint":u=p.coordinates[0];break;case"MultiLineString":case"Polygon":u=p.coordinates[0][0];break;case"MultiPolygon":u=p.coordinates[0][0][0]}const y=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(i.data);if(y){const m=u[0].toFixed(3),T=u[1].toFixed(3),h=parseFloat(y[1]).toFixed(3);m===parseFloat(y[2]).toFixed(3)&&T===h&&(o=!0)}}return{geometryType:n,swapXY:o}}async function ye(r,t,e){return me(t,(await b(r,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:d,TYPENAME:t,TYPENAMES:t,...e==null?void 0:e.customParameters},signal:e==null?void 0:e.signal})).data)}function me(r,t){const{name:e}=w(r),a=U(t);I(a);const n=S(g(a.firstElementChild,{element:o=>o}),o=>o.getAttribute("name")===e);if(n!=null){const o=n.getAttribute("type"),s=o?S(g(a.firstElementChild,{complexType:i=>i}),i=>i.getAttribute("name")===w(o).name):S(g(n,{complexType:i=>i}),()=>!0);if(s)return de(s)}throw new c(N,`Type '${r}' not found in document`,{document:new XMLSerializer().serializeToString(a)})}const fe=new Set(["objectid","fid"]);function de(r){const t=[],e=[];let a;const n=g(r,{complexContent:{extension:{sequence:{element:o=>o}}}});for(const o of n){const s=o.getAttribute("name");if(!s)continue;let i,p;if(o.hasAttribute("type")?i=w(o.getAttribute("type")).name:x(o,{simpleType:{restriction:y=>(i=w(y.getAttribute("base")).name,{maxLength:m=>{p=+m.getAttribute("value")}})}}),!i)continue;const l=o.getAttribute("nillable")==="true";let u=!1;switch(i.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":e.push(new f({name:s,alias:s,type:"integer",nullable:l,length:F("integer")}));break;case"float":case"double":case"decimal":e.push(new f({name:s,alias:s,type:"double",nullable:l,length:F("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":e.push(new f({name:s,alias:s,type:"string",nullable:l,length:p??F("string")}));break;case"datetime":case"date":e.push(new f({name:s,alias:s,type:"date",nullable:l,length:p??F("date")}));break;case"pointpropertytype":a="point",u=!0;break;case"multipointpropertytype":a="multipoint",u=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":a="polyline",u=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":a="polygon",u=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":u=!0,t.push(new c(G,`geometry type '${i}' is not supported`,{type:new XMLSerializer().serializeToString(r)}));break;default:t.push(new c(B,`Unknown field type '${i}'`,{type:new XMLSerializer().serializeToString(r)}))}u&&e.push(new f({name:s,alias:s,type:"geometry",nullable:l}))}for(const o of e)if(o.type==="integer"&&!o.nullable&&fe.has(o.name.toLowerCase())){o.type="oid";break}return{geometryType:a,fields:e,errors:t}}async function ge(r,t,e,a,n){let{data:o}=await b(r,{responseType:"text",query:v(t,e,a,n),signal:n==null?void 0:n.signal});o=o.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(o)}catch(s){throw new c(Q,"Error while parsing the response",{response:o,error:s})}}function v(r,t,e,a){const n=typeof t=="number"?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:d,TYPENAMES:r,OUTPUTFORMAT:e,SRSNAME:"EPSG:"+n,STARTINDEX:a==null?void 0:a.startIndex,COUNT:a==null?void 0:a.count,...a==null?void 0:a.customParameters}}async function Ce(r,t,e){const a=await b(r,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:d,TYPENAMES:t,RESULTTYPE:"hits",...e==null?void 0:e.customParameters},signal:e==null?void 0:e.signal}),n=/numberMatched=["'](?\d+)["']/gi.exec(a.data);if(n!=null&&n.groups)return+n.groups.numberMatched}function U(r){return new DOMParser().parseFromString(r.trim(),"text/xml")}function w(r){const[t,e]=r.split(":");return{prefix:e?t:"",name:e??t}}function we(r){var e;const t=(e=r.firstElementChild)==null?void 0:e.getAttribute("version");if(t&&t!==d)throw new c(ee,`Unsupported WFS version ${t}. Supported version: ${d}`)}function I(r){let t="",e="";if(x(r.firstElementChild,{Exception:a=>(t=a.getAttribute("exceptionCode"),{ExceptionText:n=>{e=n.textContent}})}),t)throw new c(`wfs-layer:${t}`,e)}function be(r,t,e){const a={wkid:t.defaultSpatialReference},n=(e==null?void 0:e.wkid)!=null?{wkid:e.wkid}:a;return{spatialReference:n,getFeatureSpatialReference:W(r)||n.wkid&&t.supportedSpatialReferences.includes(n.wkid)?{wkid:n.wkid}:{wkid:t.defaultSpatialReference}}}export{ge as K,k as S,xe as W,ie as Y,Ce as e,be as o,Se as v,ce as z}; diff --git a/build/assets/writeUtils-VdcK5efY.js b/build/assets/writeUtils-VdcK5efY.js new file mode 100644 index 0000000..f4500aa --- /dev/null +++ b/build/assets/writeUtils-VdcK5efY.js @@ -0,0 +1 @@ +import{s as o,aP as l,$ as u,aQ as t,aR as d}from"./index-DKOmzAMm.js";const p=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),m=new Set(["catalog","csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","knowledge-graph","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function c(e){return e.layerContainerType==="basemap"?p:e.layerContainerType==="operational-layers"?m:null}function f(e,i){if(i.restrictedWebMapWriting){const n=c(i);return n==null||n.has(e.type)&&!l(e)}return!0}function g(e,i){var n;if(i)if(l(e)){const a=d("featureCollection.layers",i),r=(n=a==null?void 0:a[0])==null?void 0:n.layerDefinition;r&&s(e,r)}else e.type!=="group"&&s(e,i)}function s(e,i){"maxScale"in e&&(i.maxScale=t(e.maxScale)??void 0),"minScale"in e&&(i.minScale=t(e.minScale)??void 0)}function y(e,i){if(g(e,i),i&&(i.id=e.id,"blendMode"in e&&(i.blendMode=e.blendMode,i.blendMode==="normal"&&delete i.blendMode),i.opacity=t(e.opacity)??void 0,i.title=e.title||"Layer",i.visibility=e.visible,"legendEnabled"in e&&e.type!=="wmts"))if(l(e)){const n=i.featureCollection;n&&(n.showLegend=e.legendEnabled)}else i.showLegend=e.legendEnabled}function b(e,i,n){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return n!=null&&n.messages&&n.messages.push(new o("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(l(e)&&!e.isTable)i=e.resourceInfo;else if(f(e,n)){const a={};return e.write(a,n)?a:null}return i!=null&&y(e,i=u(i)),i}export{b as f}; diff --git a/build/assets/xmlUtils-CtUoQO7q.js b/build/assets/xmlUtils-CtUoQO7q.js new file mode 100644 index 0000000..282c8f5 --- /dev/null +++ b/build/assets/xmlUtils-CtUoQO7q.js @@ -0,0 +1 @@ +function e(i,f){if(i&&f){for(const o of i.children)if(o.localName in f){const n=f[o.localName];if(typeof n=="function"){const c=n(o);c&&e(o,c)}else e(o,n)}}}function*l(i,f){for(const o of i.children)if(o.localName in f){const n=f[o.localName];typeof n=="function"?yield n(o):yield*l(o,n)}}export{l as n,e as o}; diff --git a/build/assets/zipjs-wrapper-DnezS2lx.js b/build/assets/zipjs-wrapper-DnezS2lx.js new file mode 100644 index 0000000..51cbe82 --- /dev/null +++ b/build/assets/zipjs-wrapper-DnezS2lx.js @@ -0,0 +1,2 @@ +function bt(t){return vt(t.map(([n,e])=>new Array(n).fill(e,0,n)))}function vt(t){return t.reduce((n,e)=>n.concat(Array.isArray(e)?vt(e):e),[])}const sn=[0,1,2,3].concat(...bt([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function $(){const t=this;function n(r){const s=t.dyn_tree,a=t.stat_desc.static_tree,d=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,x=t.stat_desc.max_length;let u,p,m,v,D,f,c=0;for(v=0;v<=15;v++)r.bl_count[v]=0;for(s[r.heap[r.heap_max]*2+1]=0,u=r.heap_max+1;u<573;u++)p=r.heap[u],v=s[s[p*2+1]*2+1]+1,v>x&&(v=x,c++),s[p*2+1]=v,!(p>t.max_code)&&(r.bl_count[v]++,D=0,p>=o&&(D=d[p-o]),f=s[p*2],r.opt_len+=f*(v+D),a&&(r.static_len+=f*(a[p*2+1]+D)));if(c!==0){do{for(v=x-1;r.bl_count[v]===0;)v--;r.bl_count[v]--,r.bl_count[v+1]+=2,r.bl_count[x]--,c-=2}while(c>0);for(v=x;v!==0;v--)for(p=r.bl_count[v];p!==0;)m=r.heap[--u],!(m>t.max_code)&&(s[m*2+1]!=v&&(r.opt_len+=(v-s[m*2+1])*s[m*2],s[m*2+1]=v),p--)}}function e(r,s){let a=0;do a|=r&1,r>>>=1,a<<=1;while(--s>0);return a>>>1}function i(r,s,a){const d=[];let o=0,x,u,p;for(x=1;x<=15;x++)d[x]=o=o+a[x-1]<<1;for(u=0;u<=s;u++)p=r[u*2+1],p!==0&&(r[u*2]=e(d[p]++,p))}t.build_tree=function(r){const s=t.dyn_tree,a=t.stat_desc.static_tree,d=t.stat_desc.elems;let o,x,u=-1,p;for(r.heap_len=0,r.heap_max=573,o=0;o=1;o--)r.pqdownheap(s,o);p=d;do o=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(s,1),x=r.heap[1],r.heap[--r.heap_max]=o,r.heap[--r.heap_max]=x,s[p*2]=s[o*2]+s[x*2],r.depth[p]=Math.max(r.depth[o],r.depth[x])+1,s[o*2+1]=s[x*2+1]=p,r.heap[1]=p++,r.pqdownheap(s,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],n(r),i(s,t.max_code,r.bl_count)}}$._length_code=[0,1,2,3,4,5,6,7].concat(...bt([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));$.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];$.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];$.d_code=function(t){return t<256?sn[t]:sn[256+(t>>>7)]};$.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];$.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];$.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];$.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function z(t,n,e,i,r){const s=this;s.static_tree=t,s.extra_bits=n,s.extra_base=e,s.elems=i,s.max_length=r}const Vi=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Xi=bt([[144,8],[112,9],[24,7],[8,8]]);z.static_ltree=vt(Vi.map((t,n)=>[t,Xi[n]]));const Qi=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Ji=bt([[30,5]]);z.static_dtree=vt(Qi.map((t,n)=>[t,Ji[n]]));z.static_l_desc=new z(z.static_ltree,$.extra_lbits,257,286,15);z.static_d_desc=new z(z.static_dtree,$.extra_dbits,0,30,15);z.static_bl_desc=new z(null,$.extra_blbits,0,19,7);const zi=9,er=8;function he(t,n,e,i,r){const s=this;s.good_length=t,s.max_lazy=n,s.nice_length=e,s.max_chain=i,s.func=r}const zn=0,ut=1,Le=2,_e=[new he(0,0,0,0,zn),new he(4,4,8,4,ut),new he(4,5,16,8,ut),new he(4,6,32,32,ut),new he(4,4,16,16,Le),new he(8,16,32,32,Le),new he(8,16,128,128,Le),new he(8,32,128,256,Le),new he(32,128,258,1024,Le),new he(32,258,258,4096,Le)],rt=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],ue=0,st=1,Ye=2,at=3,tr=32,At=42,ot=113,Ve=666,Tt=8,nr=0,Rt=1,ir=2,Y=3,mt=258,fe=mt+Y+1;function an(t,n,e,i){const r=t[n*2],s=t[e*2];return r=3&&B[$.bl_order[y]*2+1]===0;y--);return t.opt_len+=3*(y+1)+5+5+4,y}function be(y){t.pending_buf[t.pending++]=y}function Ee(y){be(y&255),be(y>>>8&255)}function kt(y){be(y>>8&255),be(y&255&255)}function re(y,C){let S;const O=C;X>16-O?(S=y,ie|=S<>>16-X,X+=O-16):(ie|=y<=8&&(be(ie&255),ie>>>=8,X-=8)}function qi(){re(Rt<<1,3),pe(256,z.static_ltree),Qt(),1+ke+10-X<9&&(re(Rt<<1,3),pe(256,z.static_ltree),Qt()),ke=7}function Ke(y,C){let S,O,I;if(t.dist_buf[Z]=y,t.lc_buf[Z]=C&255,Z++,y===0?N[C*2]++:(H++,y--,N[($._length_code[C]+256+1)*2]++,L[$.d_code(y)*2]++),!(Z&8191)&&k>2){for(S=Z*8,O=w-l,I=0;I<30;I++)S+=L[I*2]*(5+$.extra_dbits[I]);if(S>>>=3,H8?Ee(ie):X>0&&be(ie&255),ie=0,X=0}function Wi(y,C,S){zt(),ke=8,Ee(C),Ee(~C),t.pending_buf.set(o.subarray(y,y+C),t.pending),t.pending+=C}function en(y,C,S){re((nr<<1)+(S?1:0),3),Wi(y,C)}function Gi(y,C,S){let O,I,P=0;k>0?(q.build_tree(t),ee.build_tree(t),P=$e(),O=t.opt_len+3+7>>>3,I=t.static_len+3+7>>>3,I<=O&&(O=I)):O=I=C+5,C+4<=O&&y!=-1?en(y,C,S):I==O?(re((Rt<<1)+(S?1:0),3),Jt(z.static_ltree,z.static_dtree)):(re((ir<<1)+(S?1:0),3),Bi(q.max_code+1,ee.max_code+1,P+1),Jt(N,L)),He(),S&&zt()}function Se(y){Gi(l>=0?l:-1,w-l,y),l=w,n.flush_pending()}function Et(){let y,C,S,O;do{if(O=x-g-w,O===0&&w===0&&g===0)O=s;else if(O==-1)O--;else if(w>=s+s-fe){o.set(o.subarray(s,s+s),0),h-=s,w-=s,l-=s,y=v,S=y;do C=p[--S]&65535,p[S]=C>=s?C-s:0;while(--y!==0);y=s,S=y;do C=u[--S]&65535,u[S]=C>=s?C-s:0;while(--y!==0);O+=s}if(n.avail_in===0)return;y=n.read_buf(o,w+g,O),g+=y,g>=Y&&(m=o[w]&255,m=(m<i-5&&(C=i-5);;){if(g<=1){if(Et(),g===0&&y==0)return ue;if(g===0)break}if(w+=g,g=0,S=l+C,(w===0||w>=S)&&(g=w-S,w=S,Se(!1),n.avail_out===0)||w-l>=s-fe&&(Se(!1),n.avail_out===0))return ue}return Se(y==4),n.avail_out===0?y==4?Ye:ue:y==4?at:st}function tn(y){let C=R,S=w,O,I,P=E;const W=w>s-fe?w-(s-fe):0;let se=M;const xe=d,St=w+mt;let nn=o[S+P-1],rn=o[S+P];E>=F&&(C>>=2),se>g&&(se=g);do if(O=y,!(o[O+P]!=rn||o[O+P-1]!=nn||o[O]!=o[S]||o[++O]!=o[S+1])){S+=2,O++;do;while(o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&o[++S]==o[++O]&&SP){if(h=y,P=I,I>=se)break;nn=o[S+P-1],rn=o[S+P]}}while((y=u[y&xe]&65535)>W&&--C!==0);return P<=g?P:g}function $i(y){let C=0,S;for(;;){if(g=Y&&(m=(m<=Y)if(S=Ke(w-h,_-Y),g-=_,_<=T&&g>=Y){_--;do w++,m=(m<=Y&&(m=(m<4096)&&(_=Y-1)),E>=Y&&_<=E){O=w+g-Y,S=Ke(w-1-b,E-Y),g-=E-1,E-=2;do++w<=O&&(m=(m<zi||O!=Tt||S<9||S>15||C<0||C>9||P<0||P>2?-2:(y.dstate=t,a=S,s=1<9||S<0||S>2?-2:(_e[k].func!=_e[C].func&&y.total_in!==0&&(O=y.deflate(1)),k!=C&&(k=C,T=_e[k].max_lazy,F=_e[k].good_length,M=_e[k].nice_length,R=_e[k].max_chain),j=S,O)},t.deflateSetDictionary=function(y,C,S){let O=S,I,P=0;if(!C||e!=At)return-2;if(Os-fe&&(O=s-fe,P=S-O),o.set(C.subarray(P,P+O),0),w=O,l=O,m=o[0]&255,m=(m<4||C<0)return-2;if(!y.next_out||!y.next_in&&y.avail_in!==0||e==Ve&&C!=4)return y.msg=rt[4],-2;if(y.avail_out===0)return y.msg=rt[7],-5;if(n=y,P=r,r=C,e==At&&(O=Tt+(a-8<<4)<<8,I=(k-1&255)>>1,I>3&&(I=3),O|=I<<6,w!==0&&(O|=tr),O+=31-O%31,e=ot,kt(O)),t.pending!==0){if(n.flush_pending(),n.avail_out===0)return r=-1,0}else if(n.avail_in===0&&C<=P&&C!=4)return n.msg=rt[7],-5;if(e==Ve&&n.avail_in!==0)return y.msg=rt[7],-5;if(n.avail_in!==0||g!==0||C!=0&&e!=Ve){switch(W=-1,_e[k].func){case zn:W=Hi(C);break;case ut:W=$i(C);break;case Le:W=Ki(C);break}if((W==Ye||W==at)&&(e=Ve),W==ue||W==Ye)return n.avail_out===0&&(r=-1),0;if(W==st){if(C==1)qi();else if(en(0,0,!1),C==3)for(S=0;Se&&(r=e),r===0?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),n),i.next_in_index+=r,i.total_in+=r,r)},flush_pending(){const t=this;let n=t.dstate.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+n),t.next_out_index),t.next_out_index+=n,t.dstate.pending_out+=n,t.total_out+=n,t.avail_out-=n,t.dstate.pending-=n,t.dstate.pending===0&&(t.dstate.pending_out=0))}};function sr(t){const n=this,e=new ei,i=ar(t&&t.chunkSize?t.chunkSize:64*1024),r=0,s=new Uint8Array(i);let a=t?t.level:-1;typeof a>"u"&&(a=-1),e.deflateInit(a),e.next_out=s,n.append=function(d,o){let x,u,p=0,m=0,v=0;const D=[];if(d.length){e.next_in_index=0,e.next_in=d,e.avail_in=d.length;do{if(e.next_out_index=0,e.avail_out=i,x=e.deflate(r),x!=0)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==i?D.push(new Uint8Array(s)):D.push(s.subarray(0,e.next_out_index))),v+=e.next_out_index,o&&e.next_in_index>0&&e.next_in_index!=p&&(o(e.next_in_index),p=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return D.length>1?(u=new Uint8Array(v),D.forEach(function(f){u.set(f,m),m+=f.length})):u=D[0]?new Uint8Array(D[0]):new Uint8Array,u}},n.flush=function(){let d,o,x=0,u=0;const p=[];do{if(e.next_out_index=0,e.avail_out=i,d=e.deflate(4),d!=1&&d!=0)throw new Error("deflating: "+e.msg);i-e.avail_out>0&&p.push(s.slice(0,e.next_out_index)),u+=e.next_out_index}while(e.avail_in>0||e.avail_out===0);return e.deflateEnd(),o=new Uint8Array(u),p.forEach(function(m){o.set(m,x),x+=m.length}),o}}function ar(t){return t+5*(Math.floor(t/16383)+1)}const or=15,G=0,ve=1,cr=2,le=-2,K=-3,on=-4,ye=-5,de=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ti=1440,lr=0,fr=4,dr=9,ur=5,mr=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],pr=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],xr=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],_r=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],hr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wr=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ae=15;function Zt(){const t=this;let n,e,i,r,s,a;function d(x,u,p,m,v,D,f,c,l,_,b){let A,w,h,g,E,R,T,k,j,F,M,N,L,B,q;F=0,E=p;do i[x[u+F]]++,F++,E--;while(E!==0);if(i[0]==p)return f[0]=-1,c[0]=0,G;for(k=c[0],R=1;R<=Ae&&i[R]===0;R++);for(T=R,kE&&(k=E),c[0]=k,B=1<N+k;){if(g++,N+=k,q=h-N,q=q>k?k:q,(w=1<<(R=T-N))>A+1&&(w-=A+1,L=T,Rti)return K;s[g]=M=_[0],_[0]+=q,g!==0?(a[g]=E,r[0]=R,r[1]=k,R=E>>>N-k,r[2]=M-s[g-1]-R,l.set(r,(s[g-1]+R)*3)):f[0]=M}for(r[1]=T-N,F>=p?r[0]=192:b[F]>>N;R>>=1)E^=R;for(E^=R,j=(1<257?(_==K?l.msg="oversubscribed distance tree":_==ye?(l.msg="incomplete distance tree",_=K):_!=on&&(l.msg="empty distance tree with lengths",_=K),_):G)}}Zt.inflate_trees_fixed=function(t,n,e,i){return t[0]=dr,n[0]=ur,e[0]=mr,i[0]=pr,G};const ct=0,cn=1,ln=2,fn=3,dn=4,un=5,mn=6,Ct=7,pn=8,lt=9;function gr(){const t=this;let n,e=0,i,r=0,s=0,a=0,d=0,o=0,x=0,u=0,p,m=0,v,D=0;function f(c,l,_,b,A,w,h,g){let E,R,T,k,j,F,M,N,L,B,q,ee,U,ne,Z,H;M=g.next_in_index,N=g.avail_in,j=h.bitb,F=h.bitk,L=h.write,B=L>=R[H+1],F-=R[H+1],h.win[L++]=R[H+2],B--;continue}do{if(j>>=R[H+1],F-=R[H+1],k&16){for(k&=15,U=R[H+2]+(j&de[k]),j>>=k,F-=k;F<15;)N--,j|=(g.read_byte(M++)&255)<>=R[H+1],F-=R[H+1],k&16){for(k&=15;F>=k,F-=k,B-=U,L>=ne)Z=L-ne,L-Z>0&&2>L-Z?(h.win[L++]=h.win[Z++],h.win[L++]=h.win[Z++],U-=2):(h.win.set(h.win.subarray(Z,Z+2),L),L+=2,Z+=2,U-=2);else{Z=L-ne;do Z+=h.end;while(Z<0);if(k=h.end-Z,U>k){if(U-=k,L-Z>0&&k>L-Z)do h.win[L++]=h.win[Z++];while(--k!==0);else h.win.set(h.win.subarray(Z,Z+k),L),L+=k,Z+=k,k=0;Z=0}}if(L-Z>0&&U>L-Z)do h.win[L++]=h.win[Z++];while(--U!==0);else h.win.set(h.win.subarray(Z,Z+U),L),L+=U,Z+=U,U=0;break}else if(!(k&64))E+=R[H+2],E+=j&de[k],H=(T+E)*3,k=R[H];else return g.msg="invalid distance code",U=g.avail_in-N,U=F>>3>3:U,N+=U,M-=U,F-=U<<3,h.bitb=j,h.bitk=F,g.avail_in=N,g.total_in+=M-g.next_in_index,g.next_in_index=M,h.write=L,K;while(!0);break}if(k&64)return k&32?(U=g.avail_in-N,U=F>>3>3:U,N+=U,M-=U,F-=U<<3,h.bitb=j,h.bitk=F,g.avail_in=N,g.total_in+=M-g.next_in_index,g.next_in_index=M,h.write=L,ve):(g.msg="invalid literal/length code",U=g.avail_in-N,U=F>>3>3:U,N+=U,M-=U,F-=U<<3,h.bitb=j,h.bitk=F,g.avail_in=N,g.total_in+=M-g.next_in_index,g.next_in_index=M,h.write=L,K);if(E+=R[H+2],E+=j&de[k],H=(T+E)*3,(k=R[H])===0){j>>=R[H+1],F-=R[H+1],h.win[L++]=R[H+2],B--;break}}while(!0)}while(B>=258&&N>=10);return U=g.avail_in-N,U=F>>3>3:U,N+=U,M-=U,F-=U<<3,h.bitb=j,h.bitk=F,g.avail_in=N,g.total_in+=M-g.next_in_index,g.next_in_index=M,h.write=L,G}t.init=function(c,l,_,b,A,w){n=ct,x=c,u=l,p=_,m=b,v=A,D=w,i=null},t.proc=function(c,l,_){let b,A,w,h=0,g=0,E=0,R,T,k,j;for(E=l.next_in_index,R=l.avail_in,h=c.bitb,g=c.bitk,T=c.write,k=T=258&&R>=10&&(c.bitb=h,c.bitk=g,l.avail_in=R,l.total_in+=E-l.next_in_index,l.next_in_index=E,c.write=T,_=f(x,u,p,m,v,D,c,l),E=l.next_in_index,R=l.avail_in,h=c.bitb,g=c.bitk,T=c.write,k=T>>=i[A+1],g-=i[A+1],w=i[A],w===0){a=i[A+2],n=mn;break}if(w&16){d=w&15,e=i[A+2],n=ln;break}if(!(w&64)){s=w,r=A/3+i[A+2];break}if(w&32){n=Ct;break}return n=lt,l.msg="invalid literal/length code",_=K,c.bitb=h,c.bitk=g,l.avail_in=R,l.total_in+=E-l.next_in_index,l.next_in_index=E,c.write=T,c.inflate_flush(l,_);case ln:for(b=d;g>=b,g-=b,s=u,i=v,r=D,n=fn;case fn:for(b=s;g>=i[A+1],g-=i[A+1],w=i[A],w&16){d=w&15,o=i[A+2],n=dn;break}if(!(w&64)){s=w,r=A/3+i[A+2];break}return n=lt,l.msg="invalid distance code",_=K,c.bitb=h,c.bitk=g,l.avail_in=R,l.total_in+=E-l.next_in_index,l.next_in_index=E,c.write=T,c.inflate_flush(l,_);case dn:for(b=d;g>=b,g-=b,n=un;case un:for(j=T-o;j<0;)j+=c.end;for(;e!==0;){if(k===0&&(T==c.end&&c.read!==0&&(T=0,k=T7&&(g-=8,R++,E--),c.write=T,_=c.inflate_flush(l,_),T=c.write,k=Tf.avail_out&&(l=f.avail_out),l!==0&&c==ye&&(c=G),f.avail_out-=l,f.total_out+=l,f.next_out.set(e.win.subarray(b,b+l),_),_+=l,b+=l,b==e.end&&(b=0,e.write==e.end&&(e.write=0),l=e.write-b,l>f.avail_out&&(l=f.avail_out),l!==0&&c==ye&&(c=G),f.avail_out-=l,f.total_out+=l,f.next_out.set(e.win.subarray(b,b+l),_),_+=l,b+=l),f.next_out_index=_,e.read=b,c},e.proc=function(f,c){let l,_,b,A,w,h,g,E;for(A=f.next_in_index,w=f.avail_in,_=e.bitb,b=e.bitk,h=e.write,g=h>>1){case 0:_>>>=3,b-=3,l=b&7,_>>>=l,b-=l,i=Ot;break;case 1:R=[],T=[],k=[[]],j=[[]],Zt.inflate_trees_fixed(R,T,k,j),u.init(R[0],T[0],k[0],0,j[0],0),_>>>=3,b-=3,i=ft;break;case 2:_>>>=3,b-=3,i=hn;break;case 3:return _>>>=3,b-=3,i=Ie,f.msg="invalid block type",c=K,e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c)}break;case Ot:for(;b<32;){if(w!==0)c=G;else return e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);w--,_|=(f.read_byte(A++)&255)<>>16&65535)!=(_&65535))return i=Ie,f.msg="invalid stored block lengths",c=K,e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);r=_&65535,_=b=0,i=r!==0?_n:p!==0?dt:Ze;break;case _n:if(w===0||g===0&&(h==e.end&&e.read!==0&&(h=0,g=hw&&(l=w),l>g&&(l=g),e.win.set(f.read_buf(A,l),h),A+=l,w-=l,h+=l,g-=l,(r-=l)!==0)break;i=p!==0?dt:Ze;break;case hn:for(;b<14;){if(w!==0)c=G;else return e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);w--,_|=(f.read_byte(A++)&255)<29||(l>>5&31)>29)return i=Ie,f.msg="too many length or distance symbols",c=K,e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);if(l=258+(l&31)+(l>>5&31),!d||d.length>>=14,b-=14,a=0,i=wn;case wn:for(;a<4+(s>>>10);){for(;b<3;){if(w!==0)c=G;else return e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);w--,_|=(f.read_byte(A++)&255)<>>=3,b-=3}for(;a<19;)d[xn[a++]]=0;if(o[0]=7,l=D.inflate_trees_bits(d,o,x,m,f),l!=G)return c=l,c==K&&(d=null,i=Ie),e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);a=0,i=gn;case gn:for(;l=s,!(a>=258+(l&31)+(l>>5&31));){let B,q;for(l=o[0];b>>=l,b-=l,d[a++]=q;else{for(E=q==18?7:q-14,B=q==18?11:3;b>>=l,b-=l,B+=_&de[E],_>>>=E,b-=E,E=a,l=s,E+B>258+(l&31)+(l>>5&31)||q==16&&E<1)return d=null,i=Ie,f.msg="invalid bit length repeat",c=K,e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);q=q==16?d[E-1]:0;do d[E++]=q;while(--B!==0);a=E}}if(x[0]=-1,F=[],M=[],N=[],L=[],F[0]=9,M[0]=6,l=s,l=D.inflate_trees_dynamic(257+(l&31),1+(l>>5&31),d,F,M,N,L,m,f),l!=G)return l==K&&(d=null,i=Ie),c=l,e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,e.inflate_flush(f,c);u.init(F[0],M[0],m,N[0],m,L[0]),i=ft;case ft:if(e.bitb=_,e.bitk=b,f.avail_in=w,f.total_in+=A-f.next_in_index,f.next_in_index=A,e.write=h,(c=u.proc(e,f,c))!=ve)return e.inflate_flush(f,c);if(c=G,u.free(f),A=f.next_in_index,w=f.avail_in,_=e.bitb,b=e.bitk,h=e.write,g=h15?(t.inflateEnd(e),le):(t.wbits=i,e.istate.blocks=new br(e,1<>4)+8>a.wbits){a.mode=Te,e.msg="invalid win size",a.marker=5;break}a.mode=vn;case vn:if(e.avail_in===0)return r;if(r=i,e.avail_in--,e.total_in++,s=e.read_byte(e.next_in_index++)&255,((a.method<<8)+s)%31!==0){a.mode=Te,e.msg="incorrect header check",a.marker=5;break}if(!(s&vr)){a.mode=Xe;break}a.mode=yn;case yn:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=kn;case kn:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=En;case En:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=Sn;case Sn:return e.avail_in===0?r:(r=i,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=Dt,cr);case Dt:return a.mode=Te,e.msg="need dictionary",a.marker=0,le;case Xe:if(r=a.blocks.proc(e,r),r==K){a.mode=Te,a.marker=0;break}if(r==G&&(r=i),r!=ve)return r;r=i,a.blocks.reset(e,a.was),a.mode=An;case An:return e.avail_in=0,ve;case Te:return K;default:return le}},t.inflateSetDictionary=function(e,i,r){let s=0,a=r;if(!e||!e.istate||e.istate.mode!=Dt)return le;const d=e.istate;return a>=1<0&&e.next_in_index!=m&&(o(e.next_in_index),m=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return x.length>1?(p=new Uint8Array(D),x.forEach(function(f){p.set(f,v),v+=f.length})):p=x[0]?new Uint8Array(x[0]):new Uint8Array,p}},n.flush=function(){e.inflateEnd()}}const Ne=4294967295,Oe=65535,Tr=8,Rr=0,Cr=99,Or=67324752,Dr=134695760,Tn=33639248,Fr=101010256,Rn=101075792,Ir=117853008,Be=22,Ft=20,It=56,Lr=1,jr=39169,Nr=10,Pr=1,Ur=21589,Mr=28789,Zr=25461,Br=6534,Cn=1,qr=6,On=8,Dn=2048,Fn=16,Wr="/",ce=void 0,Fe="undefined",tt="function";class In{constructor(n){return class extends TransformStream{constructor(e,i){const r=new n(i);super({transform(s,a){a.enqueue(r.append(s))},flush(s){const a=r.flush();a&&s.enqueue(a)}})}}}}const Gr=64;let ii=2;try{typeof navigator!=Fe&&navigator.hardwareConcurrency&&(ii=navigator.hardwareConcurrency)}catch{}const Hr={chunkSize:512*1024,maxWorkers:ii,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ce,CompressionStreamNative:typeof CompressionStream!=Fe&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Fe&&DecompressionStream},De=Object.assign({},Hr);function $r(){return De}function Kr(t){return Math.max(t.chunkSize,Gr)}function Ht(t){const{baseURL:n,chunkSize:e,maxWorkers:i,terminateWorkerTimeout:r,useCompressionStream:s,useWebWorkers:a,Deflate:d,Inflate:o,CompressionStream:x,DecompressionStream:u,workerScripts:p}=t;if(Re("baseURL",n),Re("chunkSize",e),Re("maxWorkers",i),Re("terminateWorkerTimeout",r),Re("useCompressionStream",s),Re("useWebWorkers",a),d&&(De.CompressionStream=new In(d)),o&&(De.DecompressionStream=new In(o)),Re("CompressionStream",x),Re("DecompressionStream",u),p!==ce){const{deflate:m,inflate:v}=p;if((m||v)&&(De.workerScripts||(De.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");De.workerScripts.deflate=m}if(v){if(!Array.isArray(v))throw new Error("workerScripts.inflate must be an array");De.workerScripts.inflate=v}}}function Re(t,n){n!==ce&&(De[t]=n)}const Lt={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const t={};for(const n of Object.keys(Lt))for(const e of Object.keys(Lt[n])){const i=Lt[n][e];if(typeof i=="string")t[i]=n+"/"+e;else for(let r=0;r>>1^3988292384:n=n>>>1;ri[t]=n}class ht{constructor(n){this.crc=n||-1}append(n){let e=this.crc|0;for(let i=0,r=n.length|0;i>>8^ri[(e^n[i])&255];this.crc=e}get(){return~this.crc}}class si extends TransformStream{constructor(){let n;const e=new ht;super({transform(i,r){e.append(i),r.enqueue(i)},flush(){const i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,e.get()),n.value=i}}),n=this}}function Yr(t){if(typeof TextEncoder==Fe){t=unescape(encodeURIComponent(t));const n=new Uint8Array(t.length);for(let e=0;e0&&n&&(t[e-1]=oe.partial(n,t[e-1]&2147483648>>n-1,1)),t},partial(t,n,e){return t===32?n:(e?n|0:n<<32-t)+t*1099511627776},getPartial(t){return Math.round(t/1099511627776)||32},_shiftRight(t,n,e,i){for(i===void 0&&(i=[]);n>=32;n-=32)i.push(e),e=0;if(n===0)return i.concat(t);for(let a=0;a>>n),e=t[a]<<32-n;const r=t.length?t[t.length-1]:0,s=oe.getPartial(r);return i.push(oe.partial(n+s&31,n+s>32?e:i.pop(),1)),i}},wt={bytes:{fromBits(t){const e=oe.bitLength(t)/8,i=new Uint8Array(e);let r;for(let s=0;s>>24,r<<=8;return i},toBits(t){const n=[];let e,i=0;for(e=0;e9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(e);let a=0;for(let d=n.blockSize+i-(n.blockSize+i&n.blockSize-1);d<=r;d+=n.blockSize)n._block(s.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),n}finalize(){const t=this;let n=t._buffer;const e=t._h;n=oe.concat(n,[oe.partial(1,1)]);for(let i=n.length+2;i&15;i++)n.push(0);for(n.push(Math.floor(t._length/4294967296)),n.push(t._length|0);n.length;)t._block(n.splice(0,16));return t.reset(),e}_f(t,n,e,i){if(t<=19)return n&e|~n&i;if(t<=39)return n^e^i;if(t<=59)return n&e|n&i|e&i;if(t<=79)return n^e^i}_S(t,n){return n<>>32-t}_block(t){const n=this,e=n._h,i=Array(80);for(let x=0;x<16;x++)i[x]=t[x];let r=e[0],s=e[1],a=e[2],d=e[3],o=e[4];for(let x=0;x<=79;x++){x>=16&&(i[x]=n._S(1,i[x-3]^i[x-8]^i[x-14]^i[x-16]));const u=n._S(5,r)+n._f(x,s,a,d)+o+i[x]+n._key[Math.floor(x/20)]|0;o=d,d=a,a=n._S(30,s),s=r,r=u}e[0]=e[0]+r|0,e[1]=e[1]+s|0,e[2]=e[2]+a|0,e[3]=e[3]+d|0,e[4]=e[4]+o|0}};const oi={};oi.aes=class{constructor(t){const n=this;n._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],n._tables[0][0][0]||n._precompute();const e=n._tables[0][4],i=n._tables[1],r=t.length;let s,a,d,o=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(n._key=[a=t.slice(0),d=[]],s=r;s<4*r+28;s++){let x=a[s-1];(s%r===0||r===8&&s%r===4)&&(x=e[x>>>24]<<24^e[x>>16&255]<<16^e[x>>8&255]<<8^e[x&255],s%r===0&&(x=x<<8^x>>>24^o<<24,o=o<<1^(o>>7)*283)),a[s]=a[s-r]^x}for(let x=0;s;x++,s--){const u=a[x&3?s:s-4];s<=4||x<4?d[x]=u:d[x]=i[0][e[u>>>24]]^i[1][e[u>>16&255]]^i[2][e[u>>8&255]]^i[3][e[u&255]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],n=this._tables[1],e=t[4],i=n[4],r=[],s=[];let a,d,o,x;for(let u=0;u<256;u++)s[(r[u]=u<<1^(u>>7)*283)^u]=u;for(let u=a=0;!e[u];u^=d||1,a=s[a]||1){let p=a^a<<1^a<<2^a<<3^a<<4;p=p>>8^p&255^99,e[u]=p,i[p]=u,x=r[o=r[d=r[u]]];let m=x*16843009^o*65537^d*257^u*16843008,v=r[p]*257^p*16843008;for(let D=0;D<4;D++)t[D][u]=v=v<<24^v>>>8,n[D][p]=m=m<<24^m>>>8}for(let u=0;u<5;u++)t[u]=t[u].slice(0),n[u]=n[u].slice(0)}_crypt(t,n){if(t.length!==4)throw new Error("invalid aes block size");const e=this._key[n],i=e.length/4-2,r=[0,0,0,0],s=this._tables[n],a=s[0],d=s[1],o=s[2],x=s[3],u=s[4];let p=t[0]^e[0],m=t[n?3:1]^e[1],v=t[2]^e[2],D=t[n?1:3]^e[3],f=4,c,l,_;for(let b=0;b>>24]^d[m>>16&255]^o[v>>8&255]^x[D&255]^e[f],l=a[m>>>24]^d[v>>16&255]^o[D>>8&255]^x[p&255]^e[f+1],_=a[v>>>24]^d[D>>16&255]^o[p>>8&255]^x[m&255]^e[f+2],D=a[D>>>24]^d[p>>16&255]^o[m>>8&255]^x[v&255]^e[f+3],f+=4,p=c,m=l,v=_;for(let b=0;b<4;b++)r[n?3&-b:b]=u[p>>>24]<<24^u[m>>16&255]<<16^u[v>>8&255]<<8^u[D&255]^e[f++],c=p,p=m,m=v,v=D,D=c;return r}};const Vr={getRandomValues(t){const n=new Uint32Array(t.buffer),e=i=>{let r=987654321;const s=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&s,i=18e3*(i&65535)+(i>>16)&s,(((r<<16)+i&s)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,r;i>24&255)===255){let n=t>>16&255,e=t>>8&255,i=t&255;n===255?(n=0,e===255?(e=0,i===255?i=0:++i):++e):++n,t=0,t+=n<<16,t+=e<<8,t+=i}else t+=1<<24;return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,n,e){let i;if(!(i=n.length))return[];const r=oe.bitLength(n);for(let s=0;s>5)+1<<2;let s,a,d,o,x;const u=new ArrayBuffer(r),p=new DataView(u);let m=0;const v=oe;for(n=wt.bytes.toBits(n),x=1;m<(r||1);x++){for(s=a=t.encrypt(v.concat(n,[x])),d=1;dr&&(t=new e().update(t).finalize());for(let s=0;sthis.resolveReady=a),password:_i(n,e),signed:i,strength:r-1,pending:new Uint8Array})},async transform(a,d){const o=this,{password:x,strength:u,resolveReady:p,ready:m}=o;x?(await cs(o,u,x,me(a,0,Je[u]+2)),a=me(a,Je[u]+2),s?d.error(new Error($t)):p()):await m;const v=new Uint8Array(a.length-Ce-(a.length-Ce)%qe);d.enqueue(pi(o,a,v,0,Ce,!0))},async flush(a){const{signed:d,ctr:o,hmac:x,pending:u,ready:p}=this;if(x&&o){await p;const m=me(u,0,u.length-Ce),v=me(u,u.length-Ce);let D=new Uint8Array;if(m.length){const f=et(we,m);x.update(f);const c=o.update(f);D=ze(we,c)}if(d){const f=me(ze(we,x.digest()),0,Ce);for(let c=0;cthis.resolveReady=s),password:_i(n,e),strength:i-1,pending:new Uint8Array})},async transform(s,a){const d=this,{password:o,strength:x,resolveReady:u,ready:p}=d;let m=new Uint8Array;o?(m=await ls(d,x,o),u()):await p;const v=new Uint8Array(m.length+s.length-s.length%qe);v.set(m,0),a.enqueue(pi(d,s,v,m.length,0))},async flush(s){const{ctr:a,hmac:d,pending:o,ready:x}=this;if(d&&a){await x;let u=new Uint8Array;if(o.length){const p=a.update(et(we,o));d.update(p),u=ze(we,p)}r.signature=ze(we,d.digest()).slice(0,Ce),s.enqueue(Kt(u,r.signature))}}}),r=this}}function pi(t,n,e,i,r,s){const{ctr:a,hmac:d,pending:o}=t,x=n.length-r;o.length&&(n=Kt(o,n),e=us(e,x-x%qe));let u;for(u=0;u<=x-qe;u+=qe){const p=et(we,me(n,u,u+qe));s&&d.update(p);const m=a.update(p);s||d.update(m),e.set(ze(we,m),u+i)}return t.pending=me(n,u),e}async function cs(t,n,e,i){const r=await xi(t,n,e,me(i,0,Je[n])),s=me(i,Je[n]);if(r[0]!=s[0]||r[1]!=s[1])throw new Error(li)}async function ls(t,n,e){const i=di(new Uint8Array(Je[n])),r=await xi(t,n,e,i);return Kt(i,r)}async function xi(t,n,e,i){t.password=null;const r=await fs(Qr,e,es,!1,ts),s=await ds(Object.assign({salt:i},Bt),r,8*(Qe[n]*2+2)),a=new Uint8Array(s),d=et(we,me(a,0,Qe[n])),o=et(we,me(a,Qe[n],Qe[n]*2)),x=me(a,Qe[n]*2);return Object.assign(t,{keys:{key:d,authentication:o,passwordVerification:x},ctr:new rs(new is(d),Array.from(ns)),hmac:new ss(o)}),x}async function fs(t,n,e,i,r){if(Ln)try{return await nt.importKey(t,n,e,i,r)}catch{return Ln=!1,Pe.importKey(n)}else return Pe.importKey(n)}async function ds(t,n,e){if(jn)try{return await nt.deriveBits(t,n,e)}catch{return jn=!1,Pe.pbkdf2(n,t.salt,Bt.iterations,e)}else return Pe.pbkdf2(n,t.salt,Bt.iterations,e)}function _i(t,n){return n===ce?Yr(t):n}function Kt(t,n){let e=t;return t.length+n.length&&(e=new Uint8Array(t.length+n.length),e.set(t,0),e.set(n,t.length)),e}function us(t,n){if(n&&n>t.length){const e=t;t=new Uint8Array(n),t.set(e,0)}return t}function me(t,n,e){return t.subarray(n,e)}function ze(t,n){return t.fromBits(n)}function et(t,n){return t.toBits(n)}const We=12;class ms extends TransformStream{constructor({password:n,passwordVerification:e,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:n,passwordVerification:e}),hi(this,n)},transform(r,s){const a=this;if(a.password){const d=Nn(a,r.subarray(0,We));if(a.password=null,d[We-1]!=a.passwordVerification)throw new Error(li);r=r.subarray(We)}i?s.error(new Error($t)):s.enqueue(Nn(a,r))}})}}class ps extends TransformStream{constructor({password:n,passwordVerification:e}){super({start(){Object.assign(this,{password:n,passwordVerification:e}),hi(this,n)},transform(i,r){const s=this;let a,d;if(s.password){s.password=null;const o=di(new Uint8Array(We));o[We-1]=s.passwordVerification,a=new Uint8Array(i.length+o.length),a.set(Pn(s,o),0),d=We}else a=new Uint8Array(i.length),d=0;a.set(Pn(s,i),d),r.enqueue(a)}})}}function Nn(t,n){const e=new Uint8Array(n.length);for(let i=0;i>>24]),r=~t.crcKey2.get(),t.keys=[e,i,r]}function wi(t){const n=t.keys[2]|2;return gi(Math.imul(n,n^1)>>>8)}function gi(t){return t&255}function Un(t){return t&4294967295}const Mn="deflate-raw";class xs extends TransformStream{constructor(n,{chunkSize:e,CompressionStream:i,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:d,zipCrypto:o,signed:x,level:u}=n,p=this;let m,v,D=bi(super.readable);(!a||o)&&x&&(m=new si,D=ge(D,m)),s&&(D=yi(D,d,{level:u,chunkSize:e},r,i)),a&&(o?D=ge(D,new ps(n)):(v=new os(n),D=ge(D,v))),vi(p,D,()=>{let f;a&&!o&&(f=v.signature),(!a||o)&&x&&(f=new DataView(m.value.buffer).getUint32(0)),p.signature=f})}}class _s extends TransformStream{constructor(n,{chunkSize:e,DecompressionStream:i,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:a,signed:d,signature:o,compressed:x,useCompressionStream:u}=n;let p,m,v=bi(super.readable);a&&(s?v=ge(v,new ms(n)):(m=new as(n),v=ge(v,m))),x&&(v=yi(v,u,{chunkSize:e},r,i)),(!a||s)&&d&&(p=new si,v=ge(v,p)),vi(this,v,()=>{if((!a||s)&&d){const D=new DataView(p.value.buffer);if(o!=D.getUint32(0,!1))throw new Error(fi)}})}}function bi(t){return ge(t,new TransformStream({transform(n,e){n&&n.length&&e.enqueue(n)}}))}function vi(t,n,e){n=ge(n,new TransformStream({flush:e})),Object.defineProperty(t,"readable",{get(){return n}})}function yi(t,n,e,i,r){try{const s=n&&i?i:r;t=ge(t,new s(Mn,e))}catch{if(n)try{t=ge(t,new r(Mn,e))}catch{return t}else return t}return t}function ge(t,n){return t.pipeThrough(n)}const hs="message",ws="start",gs="pull",Zn="data",bs="ack",Bn="close",vs="deflate",ki="inflate";class ys extends TransformStream{constructor(n,e){super({});const i=this,{codecType:r}=n;let s;r.startsWith(vs)?s=xs:r.startsWith(ki)&&(s=_s);let a=0,d=0;const o=new s(n,e),x=super.readable,u=new TransformStream({transform(m,v){m&&m.length&&(d+=m.length,v.enqueue(m))},flush(){Object.assign(i,{inputSize:d})}}),p=new TransformStream({transform(m,v){m&&m.length&&(a+=m.length,v.enqueue(m))},flush(){const{signature:m}=o;Object.assign(i,{signature:m,outputSize:a,inputSize:d})}});Object.defineProperty(i,"readable",{get(){return x.pipeThrough(u).pipeThrough(o).pipeThrough(p)}})}}class ks extends TransformStream{constructor(n){let e;super({transform:i,flush(r){e&&e.length&&r.enqueue(e)}});function i(r,s){if(e){const a=new Uint8Array(e.length+r.length);a.set(e),a.set(r,e.length),r=a,e=null}r.length>n?(s.enqueue(r.slice(0,n)),i(r.slice(n),s)):e=r}}}let Ei=typeof Worker!=Fe;class jt{constructor(n,{readable:e,writable:i},{options:r,config:s,streamOptions:a,useWebWorkers:d,transferStreams:o,scripts:x},u){const{signal:p}=a;return Object.assign(n,{busy:!0,readable:e.pipeThrough(new ks(s.chunkSize)).pipeThrough(new Es(e,a),{signal:p}),writable:i,options:Object.assign({},r),scripts:x,transferStreams:o,terminate(){return new Promise(m=>{const{worker:v,busy:D}=n;v?(D?n.resolveTerminated=m:(v.terminate(),m()),n.interface=null):m()})},onTaskFinished(){const{resolveTerminated:m}=n;m&&(n.resolveTerminated=null,n.terminated=!0,n.worker.terminate(),m()),n.busy=!1,u(n)}}),(d&&Ei?Ss:Si)(n,s)}}class Es extends TransformStream{constructor(n,{onstart:e,onprogress:i,size:r,onend:s}){let a=0;super({async start(){e&&await Nt(e,r)},async transform(d,o){a+=d.length,i&&await Nt(i,a,r),o.enqueue(d)},async flush(){n.size=a,s&&await Nt(s,a)}})}}async function Nt(t,...n){try{await t(...n)}catch{}}function Si(t,n){return{run:()=>As(t,n)}}function Ss(t,n){const{baseURL:e,chunkSize:i}=n;if(!t.interface){let r;try{r=Cs(t.scripts[0],e,t)}catch{return Ei=!1,Si(t,n)}Object.assign(t,{worker:r,interface:{run:()=>Ts(t,{chunkSize:i})}})}return t.interface}async function As({options:t,readable:n,writable:e,onTaskFinished:i},r){try{const s=new ys(t,r);await n.pipeThrough(s).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:d,outputSize:o}=s;return{signature:a,inputSize:d,outputSize:o}}finally{i()}}async function Ts(t,n){let e,i;const r=new Promise((m,v)=>{e=m,i=v});Object.assign(t,{reader:null,writer:null,resolveResult:e,rejectResult:i,result:r});const{readable:s,options:a,scripts:d}=t,{writable:o,closed:x}=Rs(t.writable),u=pt({type:ws,scripts:d.slice(1),options:a,config:n,readable:s,writable:o},t);u||Object.assign(t,{reader:s.getReader(),writer:o.getWriter()});const p=await r;return u||await o.getWriter().close(),await x,p}function Rs(t){let n;const e=new Promise(r=>n=r);return{writable:new WritableStream({async write(r){const s=t.getWriter();await s.ready,await s.write(r),s.releaseLock()},close(){n()},abort(r){return t.getWriter().abort(r)}}),closed:e}}let qn=!0,Wn=!0;function Cs(t,n,e){const i={type:"module"};let r,s;typeof t==tt&&(t=t());try{r=new URL(t,n)}catch{r=t}if(qn)try{s=new Worker(r)}catch{qn=!1,s=new Worker(r,i)}else s=new Worker(r,i);return s.addEventListener(hs,a=>Os(a,e)),s}function pt(t,{worker:n,writer:e,onTaskFinished:i,transferStreams:r}){try{let{value:s,readable:a,writable:d}=t;const o=[];if(s&&(s.byteLength!l.busy);if(c)return Hn(c),new jt(c,t,n,f);if(je.lengthPt.push({resolve:l,stream:t,workerOptions:n}))}function f(c){if(Pt.length){const[{resolve:l,stream:_,workerOptions:b}]=Pt.splice(0,1);l(new jt(c,_,b,f))}else c.worker?(Hn(c),Fs(c,n)):je=je.filter(l=>l!=c)}}function Fs(t,n){const{config:e}=n,{terminateWorkerTimeout:i}=e;Number.isFinite(i)&&i>=0&&(t.terminated?t.terminated=!1:t.terminateTimeout=setTimeout(async()=>{je=je.filter(r=>r!=t);try{await t.terminate()}catch{}},i))}function Hn(t){const{terminateTimeout:n}=t;n&&(clearTimeout(n),t.terminateTimeout=null)}function Is(t,n={}){const e=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},k(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}R(e,t){return t<>>32-e}P(t){const n=this,s=n.C,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.B(I.p.k(e)),M(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.k(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.S=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}j(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.B;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=15,Te=573,We=-2;function je(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Le=[0,1,2,3].concat(...je([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Fe(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=Te,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;Oe>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;Te>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;Oe>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function qe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Fe.ke=[0,1,2,3,4,5,6,7].concat(...je([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Fe.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Fe.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Fe.ze=e=>256>e?Le[e]:Le[256+(e>>>7)],Fe.Ce=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Fe.xe=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Fe.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Fe._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ge=je([[144,8],[112,9],[24,7],[8,8]]);qe.Ie=He([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ge[t]])));const Je=je([[30,5]]);function Qe(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}qe.Ee=He([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Je[t]]))),qe.Me=new qe(qe.Ie,Fe.Ce,257,286,Oe),qe.Ue=new qe(qe.Ee,Fe.xe,0,30,Oe),qe.Ke=new qe(null,Fe.Ae,0,19,7);const Xe=[new Qe(0,0,0,0,0),new Qe(4,4,8,4,1),new Qe(4,5,16,8,1),new Qe(4,6,32,32,1),new Qe(4,4,16,16,2),new Qe(8,16,32,32,2),new Qe(8,16,128,128,2),new Qe(8,32,128,256,2),new Qe(32,128,258,1024,2),new Qe(32,258,258,4096,2)],Ye=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ze=113,$e=666,et=262;function tt(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function nt(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new Fe,N=new Fe,O=new Fe;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.we=e.he=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Fe.ke[n]+256+1)]++,M[2*Fe.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Fe.xe[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*Fe._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(qe.Ie,qe.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*Fe._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-et){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-et?C-(f-et):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?We:(t.qe=e,a=x,f=1<(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Ze,c=0,K.se=E,K.oe=qe.Me,N.se=M,N.oe=qe.Ue,O.se=U,O.oe=qe.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Ze&&n!=$e?We:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Ze?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?We:(Xe[D].Be!=Xe[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return We;if(3>i)return 0;for(i>f-et&&(i=f-et,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return We;if(!r.et||!r.tt&&0!==r.je||n==$e&&4!=i)return r.Fe=Ye[4],We;if(0===r.nt)return r.Fe=Ye[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Ze,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Ye[7],-5;if(n==$e&&0!==t.je)return r.Fe=Ye[7],-5;if(0!==t.je||0!==A||0!=i&&n!=$e){switch(R=-1,Xe[D].Be){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.nt))return 0;if(C-k>=f-et&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(et>A){if(ie(),et>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-et||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(et>A){if(ie(),et>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-et>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.nt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,qe.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function rt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function st(e){const t=new rt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}rt.prototype={Le(e,t){const n=this;return n.qe=new nt,t||(t=Oe),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):We},Xe(){const e=this;if(!e.qe)return We;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):We},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):We},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const it=0,ot=1,ct=-2,ft=-3,at=-4,lt=-5,ut=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wt=1440,ht=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],dt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],pt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],yt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],mt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],bt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],gt=15;function kt(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,it;for(S=u[0],k=1;gt>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=gt;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return ft;if(0>(I-=n[g]))return ft;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<wt)return ft;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;gt+1>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,gt),0),i.set(n.subarray(0,gt+1),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==ft?f.Fe="oversubscribed dynamic bit lengths tree":a!=lt&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=ft),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,pt,yt,a,i,u,e,t),h!=it||0===i[0]?(h==ft?w.Fe="oversubscribed literal/length tree":h!=at&&(w.Fe="incomplete literal/length tree",h=ft),h):(c(288),h=o(s,n,r,0,mt,bt,l,f,u,e,t),h!=it||0===f[0]&&n>257?(h==ft?w.Fe="oversubscribed distance tree":h==lt?(w.Fe="incomplete distance tree",h=ft):h!=at&&(w.Fe="empty distance tree with lengths",h=ft),h):it)}}kt.ct=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ht,r[0]=dt,it);const vt=0,St=1,zt=2,Ct=3,xt=4,At=5,_t=6,It=7,Pt=8,Dt=9;function Vt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.je,w=o.ft,h=o.lt,y=o.write,m=yh;)p--,w|=(255&c.ut(d++))<>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ut[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ut(d++))<>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ut(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--u);else o.wt.set(o.wt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.wt[y++]=o.wt[S++],o.wt[y++]=o.wt[S++],k-=2):(o.wt.set(o.wt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--k);else o.wt.set(o.wt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe="invalid distance code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft;f+=a[z+2],f+=w&ut[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ot):(c.Fe="invalid literal/length code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft);if(f+=a[z+2],f+=w&ut[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,it}e.init=(e,i,o,c,f,a)=>{t=vt,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ht=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S=258&&v>=10&&(e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=SA;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=_t;break}if(16&k){a=15&k,i=n[g+2],t=zt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=It;break}return t=Dt,y.Fe="invalid literal/length code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case zt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<>=b,A-=b,c=w,n=s,o=d,t=Ct;case Ct:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=xt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=Dt,y.Fe="invalid distance code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case xt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<>=b,A-=b,t=At;case At:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.dt(y,m),S=e.write,z=S{}}const Rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bt=0,Et=1,Mt=2,Ut=3,Kt=4,Nt=5,Ot=6,Tt=7,Wt=8,jt=9;function Ht(e,t){const n=this;let r,s=Bt,o=0,c=0,a=0;const l=[0],u=[0],w=new Vt;let h=0,d=new f(3*wt);const p=new kt;n.lt=0,n.ft=0,n.wt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),s==Ot&&w.yt(e),s=Bt,n.lt=0,n.ft=0,n.read=n.write=0},n.reset(e,null),n.dt=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.ht=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=gy;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=Et;break;case 1:S=[],z=[],C=[[]],x=[[]],kt.ct(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=Ot;break;case 2:f>>>=3,y-=3,s=Ut;break;case 3:return f>>>=3,y-=3,s=jt,e.Fe="invalid block type",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}break;case Et:for(;32>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<>>16&65535)!=(65535&f))return s=jt,e.Fe="invalid stored block lengths",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);o=65535&f,f=y=0,s=0!==o?Mt:0!==h?Tt:Bt;break;case Mt:if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.wt.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?Tt:Bt;break;case Ut:for(;14>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<29||(i>>5&31)>29)return s=jt,e.Fe="too many length or distance symbols",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=Kt;case Kt:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<>>=3,y-=3}for(;19>a;)r[Rt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),i!=it)return(t=i)==ft&&(r=null,s=jt),n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);a=0,s=Nt;case Nt:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<>>=i,y-=i,o+=f&ut[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=jt,e.Fe="invalid bit length repeat",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),i!=it)return i==ft&&(r=null,s=jt),t=i,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=Ot;case Ot:if(n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,(t=w.ht(n,e,t))!=ot)return n.dt(e,t);if(t=it,w.yt(e),m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=g{n.reset(e,null),n.wt=null,d=null},n.bt=(e,t,r)=>{n.wt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>s==Et?1:0}const Lt=13,Ft=[0,0,255,255];function qt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),it):ct}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.yt(t),e.vt=null,it),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),ct):(e.Ct=r,n.kt.vt=new Ht(n,1<{let n,r;if(!e||!e.kt||!e.tt)return ct;const s=e.kt;for(t=4==t?lt:it,n=lt;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.ut(e.rt++)))){s.mode=Lt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=Lt,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.ut(e.rt++),((s.method<<8)+r)%31!=0){s.mode=Lt,e.Fe="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.ut(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.ut(e.rt++),s.mode=6,2);case 6:return s.mode=Lt,e.Fe="need dictionary",s.marker=0,ct;case 7:if(n=s.vt.ht(e,n),n==ft){s.mode=Lt,s.marker=0;break}if(n==it&&(n=t),n!=ot)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,ot;case Lt:return ft;default:return ct}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return ct;const i=e.kt;return s<1<{let n,r,s,i,o;if(!e||!e.kt)return ct;const c=e.kt;if(c.mode!=Lt&&(c.mode=Lt,c.marker=0),0===(n=e.je))return lt;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.ut(r)==Ft[s]?s++:s=0!==e.ut(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?ft:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,it)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():ct}function Gt(){}function Jt(e){const t=new Gt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===lt){if(0!==t.je)throw new s("inflating: bad input")}else if(a!==it&&a!==ot)throw new s("inflating: "+t.Fe);if((c||a===ot)&&t.je===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.xt()}}Gt.prototype={At(e){const t=this;return t.kt=new qt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):ct},xt(){const e=this;if(!e.kt)return ct;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):ct},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):ct},ut(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=st,self.Inflate=Jt}; +`,i=()=>n.useDataURI?"data:text/javascript,"+encodeURIComponent(e):URL.createObjectURL(new Blob([e],{type:"text/javascript"}));t({workerScripts:{inflate:[i],deflate:[i]}})}const Ls="Writer iterator completed too soon",js="Content-Type",Ns=64*1024,Ai="writable";class Vt{constructor(){this.size=0}init(){this.initialized=!0}}class Ti extends Vt{get readable(){const n=this,{chunkSize:e=Ns}=n,i=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:d}=i,{chunkOffset:o}=this;r.enqueue(await te(n,s+o,Math.min(e,a-o),d)),o+e>a?r.close():this.chunkOffset+=e}});return i}}class Ps extends Ti{constructor(n){super(),Object.assign(this,{blob:n,size:n.size})}async readUint8Array(n,e){const i=this,r=n+e;let a=await(n||re&&(a=a.slice(n,r)),new Uint8Array(a)}}class ha extends Vt{constructor(n){super();const e=this,i=new TransformStream,r=[];n&&r.push([js,n]),Object.defineProperty(e,Ai,{get(){return i.writable}}),e.blob=new Response(i.readable,{headers:r}).blob()}getData(){return this.blob}}class Us extends Ti{constructor(n){super(),this.readers=n}async init(){const n=this,{readers:e}=n;n.lastDiskNumber=0,n.lastDiskOffset=0,await Promise.all(e.map(async(i,r)=>{await i.init(),r!=e.length-1&&(n.lastDiskOffset+=i.size),n.size+=i.size})),super.init()}async readUint8Array(n,e,i=0){const r=this,{readers:s}=this;let a,d=i;d==-1&&(d=s.length-1);let o=n;for(;o>=s[d].size;)o-=s[d].size,d++;const x=s[d],u=x.size;if(o+e<=u)a=await te(x,o,e);else{const p=u-o;a=new Uint8Array(e),a.set(await te(x,o,p)),a.set(await r.readUint8Array(n+p,e-p,i),p)}return r.lastDiskNumber=Math.max(d,r.lastDiskNumber),a}}class $n extends Vt{constructor(n,e=4294967295){super();const i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,s,a;const d=new WritableStream({async write(u){const{availableSize:p}=i;if(a)u.length>=p?(await o(u.slice(0,p)),await x(),i.diskOffset+=r.size,i.diskNumber++,a=null,await this.write(u.slice(p))):await o(u);else{const{value:m,done:v}=await n.next();if(v&&!m)throw new Error(Ls);r=m,r.size=0,r.maxSize&&(i.maxSize=r.maxSize),i.availableSize=i.maxSize,await gt(r),s=m.writable,a=s.getWriter(),await this.write(u)}},async close(){await a.ready,await x()}});Object.defineProperty(i,Ai,{get(){return d}});async function o(u){const p=u.length;p&&(await a.ready,await a.write(u),r.size+=p,i.size+=p,i.availableSize-=p)}async function x(){s.size=r.size,await a.close()}}}async function gt(t,n){if(t.init&&!t.initialized)await t.init(n);else return Promise.resolve()}function Ms(t){return Array.isArray(t)&&(t=new Us(t)),t instanceof ReadableStream&&(t={readable:t}),t}function Zs(t){t.writable===ce&&typeof t.next==tt&&(t=new $n(t)),t instanceof WritableStream&&(t={writable:t});const{writable:n}=t;return n.size===ce&&(n.size=0),t instanceof $n||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}function te(t,n,e,i){return t.readUint8Array(n,e,i)}const Ri="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Bs=Ri.length==256;function qs(t){if(Bs){let n="";for(let e=0;ethis[e]=n[e])}}const Ut="File format is not recognized",ea="End of central directory not found",ta="End of Zip64 central directory locator not found",na="Central directory header not found",ia="Local file header not found",ra="Zip64 extra field not found",sa="File contains encrypted entry",aa="Encryption method not supported",Yn="Compression method not supported",Vn="Split zip file",Xn="utf-8",Qn="cp437",oa=[[Ii,Ne],[Li,Ne],[ji,Ne],[qt,Oe]],ca={[Oe]:{getValue:V,bytes:4},[Ne]:{getValue:_t,bytes:8}};class wa{constructor(n,e={}){Object.assign(this,{reader:Ms(n),options:e,config:$r()})}async*getEntriesGenerator(n={}){const e=this;let{reader:i}=e;const{config:r}=e;if(await gt(i),(i.size===ce||!i.readUint8Array)&&(i=new Ps(await new Response(i.readable).blob()),await gt(i)),i.size=i.size&&(c=i.size-o-d-Be,o=i.size-d-Be),v!=m)throw new Error(Vn);if(o<0)throw new Error(Ut);let _=0,b=await te(i,o,d,D),A=J(b);if(d){const T=s.offset-d;if(V(A,_)!=Tn&&o!=T){const k=o;o=T,c+=o-k,b=await te(i,o,d,D),A=J(b)}}const w=s.offset-o-(i.lastDiskOffset||0);if(d!=w&&w>=0&&(d=w,b=await te(i,o,d,D),A=J(b)),o<0||o>=i.size)throw new Error(Ut);const h=ae(e,n,"filenameEncoding"),g=ae(e,n,"commentEncoding");for(let T=0;Tk.getData(Ee,$e,kt),_=U;const{onprogress:be}=n;if(be)try{await be(T+1,f,new Kn(k))}catch{}yield $e}const E=ae(e,n,"extractPrependedData"),R=ae(e,n,"extractAppendedData");return E&&(e.prependedData=l>0?await te(i,0,l):new Uint8Array),e.comment=u?await te(i,x+Be,u):new Uint8Array,R&&(e.appendedData=p>>8&255:m>>>24&255),signature:m,compressed:x!=0&&!w,encrypted:r.encrypted&&!w,useWebWorkers:ae(r,i,"useWebWorkers"),useCompressionStream:ae(r,i,"useCompressionStream"),transferStreams:ae(r,i,"transferStreams"),checkPasswordOnly:j},config:u,streamOptions:{signal:k,size:R,onstart:M,onprogress:N,onend:L}};let q=0;try{({outputSize:q}=await Ds({readable:T,writable:F},B))}catch(ee){if(!j||ee.message!=$t)throw ee}finally{const ee=ae(r,i,"preventClose");F.size+=q,!ee&&!F.locked&&await F.getWriter().close()}return j?ce:n.getData?n.getData():F}}function Ui(t,n,e){const i=t.rawBitFlag=Q(n,e+2),r=(i&Cn)==Cn,s=V(n,e+6);Object.assign(t,{encrypted:r,version:Q(n,e),bitFlag:{level:(i&qr)>>1,dataDescriptor:(i&On)==On,languageEncodingFlag:(i&Dn)==Dn},rawLastModDate:s,lastModDate:xa(s),filenameLength:Q(n,e+22),extraFieldLength:Q(n,e+24)})}async function Mi(t,n,e,i,r){const{rawExtraField:s}=n,a=n.extraField=new Map,d=J(new Uint8Array(s));let o=0;try{for(;on[r]==s);for(let r=0,s=0;r=5&&(s.push(Wt),a.push(Gt));let d=1;s.forEach((o,x)=>{if(t.data.length>=d+4){const u=V(i,d);n[o]=t[o]=new Date(u*1e3);const p=a[x];t[p]=u}d+=4})}async function pa(t,n,e,i,r){const s=new Uint8Array(4),a=J(s);_a(a,0,n);const d=i+r;return await o(i)||await o(Math.min(d,e));async function o(x){const u=e-x,p=await te(t,u,x);for(let m=p.length-i;m>=0;m--)if(p[m]==s[0]&&p[m+1]==s[1]&&p[m+2]==s[2]&&p[m+3]==s[3])return{offset:u+m,buffer:p.slice(m,m+i).buffer}}}function ae(t,n,e){return n[e]===ce?t.options[e]:n[e]}function xa(t){const n=(t&4294901760)>>16,e=t&65535;try{return new Date(1980+((n&65024)>>9),((n&480)>>5)-1,n&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function Mt(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Ge(t,n){return t.getUint8(n)}function Q(t,n){return t.getUint16(n,!0)}function V(t,n){return t.getUint32(n,!0)}function _t(t,n){return Number(t.getBigUint64(n,!0))}function _a(t,n,e){t.setUint32(n,e,!0)}function J(t){return new DataView(t.buffer)}let Zi;try{Zi=import.meta.url}catch{}Ht({baseURL:Zi});Is(Ht);Ht({Deflate:sr,Inflate:Ar});export{Ps as BlobReader,ha as BlobWriter,wa as ZipReader}; diff --git a/build/favicon.ico b/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..c163c41 --- /dev/null +++ b/build/index.html @@ -0,0 +1,14 @@ + + + + + + + Base Unit Tools + + + + +

+ + \ No newline at end of file diff --git a/build/logo192.png b/build/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..fc44b0a3796c0e0a64c3d858ca038bd4570465d9 GIT binary patch literal 5347 zcmZWtbyO6NvR-oO24RV%BvuJ&=?+<7=`LvyB&A_#M7mSDYw1v6DJkiYl9XjT!%$dLEBTQ8R9|wd3008in6lFF3GV-6mLi?MoP_y~}QUnaDCHI#t z7w^m$@6DI)|C8_jrT?q=f8D?0AM?L)Z}xAo^e^W>t$*Y0KlT5=@bBjT9kxb%-KNdk zeOS1tKO#ChhG7%{ApNBzE2ZVNcxbrin#E1TiAw#BlUhXllzhN$qWez5l;h+t^q#Eav8PhR2|T}y5kkflaK`ba-eoE+Z2q@o6P$)=&` z+(8}+-McnNO>e#$Rr{32ngsZIAX>GH??tqgwUuUz6kjns|LjsB37zUEWd|(&O!)DY zQLrq%Y>)Y8G`yYbYCx&aVHi@-vZ3|ebG!f$sTQqMgi0hWRJ^Wc+Ibv!udh_r%2|U) zPi|E^PK?UE!>_4`f`1k4hqqj_$+d!EB_#IYt;f9)fBOumGNyglU(ofY`yHq4Y?B%- zp&G!MRY<~ajTgIHErMe(Z8JG*;D-PJhd@RX@QatggM7+G(Lz8eZ;73)72Hfx5KDOE zkT(m}i2;@X2AT5fW?qVp?@WgN$aT+f_6eo?IsLh;jscNRp|8H}Z9p_UBO^SJXpZew zEK8fz|0Th%(Wr|KZBGTM4yxkA5CFdAj8=QSrT$fKW#tweUFqr0TZ9D~a5lF{)%-tTGMK^2tz(y2v$i%V8XAxIywrZCp=)83p(zIk6@S5AWl|Oa2hF`~~^W zI;KeOSkw1O#TiQ8;U7OPXjZM|KrnN}9arP)m0v$c|L)lF`j_rpG(zW1Qjv$=^|p*f z>)Na{D&>n`jOWMwB^TM}slgTEcjxTlUby89j1)|6ydRfWERn3|7Zd2&e7?!K&5G$x z`5U3uFtn4~SZq|LjFVrz$3iln-+ucY4q$BC{CSm7Xe5c1J<=%Oagztj{ifpaZk_bQ z9Sb-LaQMKp-qJA*bP6DzgE3`}*i1o3GKmo2pn@dj0;He}F=BgINo};6gQF8!n0ULZ zL>kC0nPSFzlcB7p41doao2F7%6IUTi_+!L`MM4o*#Y#0v~WiO8uSeAUNp=vA2KaR&=jNR2iVwG>7t%sG2x_~yXzY)7K& zk3p+O0AFZ1eu^T3s};B%6TpJ6h-Y%B^*zT&SN7C=N;g|#dGIVMSOru3iv^SvO>h4M=t-N1GSLLDqVTcgurco6)3&XpU!FP6Hlrmj}f$ zp95;b)>M~`kxuZF3r~a!rMf4|&1=uMG$;h^g=Kl;H&Np-(pFT9FF@++MMEx3RBsK?AU0fPk-#mdR)Wdkj)`>ZMl#^<80kM87VvsI3r_c@_vX=fdQ`_9-d(xiI z4K;1y1TiPj_RPh*SpDI7U~^QQ?%0&!$Sh#?x_@;ag)P}ZkAik{_WPB4rHyW#%>|Gs zdbhyt=qQPA7`?h2_8T;-E6HI#im9K>au*(j4;kzwMSLgo6u*}-K`$_Gzgu&XE)udQ zmQ72^eZd|vzI)~!20JV-v-T|<4@7ruqrj|o4=JJPlybwMg;M$Ud7>h6g()CT@wXm` zbq=A(t;RJ^{Xxi*Ff~!|3!-l_PS{AyNAU~t{h;(N(PXMEf^R(B+ZVX3 z8y0;0A8hJYp@g+c*`>eTA|3Tgv9U8#BDTO9@a@gVMDxr(fVaEqL1tl?md{v^j8aUv zm&%PX4^|rX|?E4^CkplWWNv*OKM>DxPa z!RJ)U^0-WJMi)Ksc!^ixOtw^egoAZZ2Cg;X7(5xZG7yL_;UJ#yp*ZD-;I^Z9qkP`} zwCTs0*%rIVF1sgLervtnUo&brwz?6?PXRuOCS*JI-WL6GKy7-~yi0giTEMmDs_-UX zo=+nFrW_EfTg>oY72_4Z0*uG>MnXP=c0VpT&*|rvv1iStW;*^={rP1y?Hv+6R6bxFMkxpWkJ>m7Ba{>zc_q zEefC3jsXdyS5??Mz7IET$Kft|EMNJIv7Ny8ZOcKnzf`K5Cd)&`-fTY#W&jnV0l2vt z?Gqhic}l}mCv1yUEy$%DP}4AN;36$=7aNI^*AzV(eYGeJ(Px-j<^gSDp5dBAv2#?; zcMXv#aj>%;MiG^q^$0MSg-(uTl!xm49dH!{X0){Ew7ThWV~Gtj7h%ZD zVN-R-^7Cf0VH!8O)uUHPL2mO2tmE*cecwQv_5CzWeh)ykX8r5Hi`ehYo)d{Jnh&3p z9ndXT$OW51#H5cFKa76c<%nNkP~FU93b5h-|Cb}ScHs@4Q#|}byWg;KDMJ#|l zE=MKD*F@HDBcX@~QJH%56eh~jfPO-uKm}~t7VkHxHT;)4sd+?Wc4* z>CyR*{w@4(gnYRdFq=^(#-ytb^5ESD?x<0Skhb%Pt?npNW1m+Nv`tr9+qN<3H1f<% zZvNEqyK5FgPsQ`QIu9P0x_}wJR~^CotL|n zk?dn;tLRw9jJTur4uWoX6iMm914f0AJfB@C74a;_qRrAP4E7l890P&{v<}>_&GLrW z)klculcg`?zJO~4;BBAa=POU%aN|pmZJn2{hA!d!*lwO%YSIzv8bTJ}=nhC^n}g(ld^rn#kq9Z3)z`k9lvV>y#!F4e{5c$tnr9M{V)0m(Z< z#88vX6-AW7T2UUwW`g<;8I$Jb!R%z@rCcGT)-2k7&x9kZZT66}Ztid~6t0jKb&9mm zpa}LCb`bz`{MzpZR#E*QuBiZXI#<`5qxx=&LMr-UUf~@dRk}YI2hbMsAMWOmDzYtm zjof16D=mc`^B$+_bCG$$@R0t;e?~UkF?7<(vkb70*EQB1rfUWXh$j)R2)+dNAH5%R zEBs^?N;UMdy}V};59Gu#0$q53$}|+q7CIGg_w_WlvE}AdqoS<7DY1LWS9?TrfmcvT zaypmplwn=P4;a8-%l^e?f`OpGb}%(_mFsL&GywhyN(-VROj`4~V~9bGv%UhcA|YW% zs{;nh@aDX11y^HOFXB$a7#Sr3cEtNd4eLm@Y#fc&j)TGvbbMwze zXtekX_wJqxe4NhuW$r}cNy|L{V=t#$%SuWEW)YZTH|!iT79k#?632OFse{+BT_gau zJwQcbH{b}dzKO?^dV&3nTILYlGw{27UJ72ZN){BILd_HV_s$WfI2DC<9LIHFmtyw? zQ;?MuK7g%Ym+4e^W#5}WDLpko%jPOC=aN)3!=8)s#Rnercak&b3ESRX3z{xfKBF8L z5%CGkFmGO@x?_mPGlpEej!3!AMddChabyf~nJNZxx!D&{@xEb!TDyvqSj%Y5@A{}9 zRzoBn0?x}=krh{ok3Nn%e)#~uh;6jpezhA)ySb^b#E>73e*frBFu6IZ^D7Ii&rsiU z%jzygxT-n*joJpY4o&8UXr2s%j^Q{?e-voloX`4DQyEK+DmrZh8A$)iWL#NO9+Y@!sO2f@rI!@jN@>HOA< z?q2l{^%mY*PNx2FoX+A7X3N}(RV$B`g&N=e0uvAvEN1W^{*W?zT1i#fxuw10%~))J zjx#gxoVlXREWZf4hRkgdHx5V_S*;p-y%JtGgQ4}lnA~MBz-AFdxUxU1RIT$`sal|X zPB6sEVRjGbXIP0U+?rT|y5+ev&OMX*5C$n2SBPZr`jqzrmpVrNciR0e*Wm?fK6DY& zl(XQZ60yWXV-|Ps!A{EF;=_z(YAF=T(-MkJXUoX zI{UMQDAV2}Ya?EisdEW;@pE6dt;j0fg5oT2dxCi{wqWJ<)|SR6fxX~5CzblPGr8cb zUBVJ2CQd~3L?7yfTpLNbt)He1D>*KXI^GK%<`bq^cUq$Q@uJifG>p3LU(!H=C)aEL zenk7pVg}0{dKU}&l)Y2Y2eFMdS(JS0}oZUuVaf2+K*YFNGHB`^YGcIpnBlMhO7d4@vV zv(@N}(k#REdul8~fP+^F@ky*wt@~&|(&&meNO>rKDEnB{ykAZ}k>e@lad7to>Ao$B zz<1(L=#J*u4_LB=8w+*{KFK^u00NAmeNN7pr+Pf+N*Zl^dO{LM-hMHyP6N!~`24jd zXYP|Ze;dRXKdF2iJG$U{k=S86l@pytLx}$JFFs8e)*Vi?aVBtGJ3JZUj!~c{(rw5>vuRF$`^p!P8w1B=O!skwkO5yd4_XuG^QVF z`-r5K7(IPSiKQ2|U9+`@Js!g6sfJwAHVd|s?|mnC*q zp|B|z)(8+mxXyxQ{8Pg3F4|tdpgZZSoU4P&9I8)nHo1@)9_9u&NcT^FI)6|hsAZFk zZ+arl&@*>RXBf-OZxhZerOr&dN5LW9@gV=oGFbK*J+m#R-|e6(Loz(;g@T^*oO)0R zN`N=X46b{7yk5FZGr#5&n1!-@j@g02g|X>MOpF3#IjZ_4wg{dX+G9eqS+Es9@6nC7 zD9$NuVJI}6ZlwtUm5cCAiYv0(Yi{%eH+}t)!E^>^KxB5^L~a`4%1~5q6h>d;paC9c zTj0wTCKrhWf+F#5>EgX`sl%POl?oyCq0(w0xoL?L%)|Q7d|Hl92rUYAU#lc**I&^6p=4lNQPa0 znQ|A~i0ip@`B=FW-Q;zh?-wF;Wl5!+q3GXDu-x&}$gUO)NoO7^$BeEIrd~1Dh{Tr` z8s<(Bn@gZ(mkIGnmYh_ehXnq78QL$pNDi)|QcT*|GtS%nz1uKE+E{7jdEBp%h0}%r zD2|KmYGiPa4;md-t_m5YDz#c*oV_FqXd85d@eub?9N61QuYcb3CnVWpM(D-^|CmkL z(F}L&N7qhL2PCq)fRh}XO@U`Yn<?TNGR4L(mF7#4u29{i~@k;pLsgl({YW5`Mo+p=zZn3L*4{JU;++dG9 X@eDJUQo;Ye2mwlRs?y0|+_a0zY+Zo%Dkae}+MySoIppb75o?vUW_?)>@g{U2`ERQIXV zeY$JrWnMZ$QC<=ii4X|@0H8`si75jB(ElJb00HAB%>SlLR{!zO|C9P3zxw_U8?1d8uRZ=({Ga4shyN}3 zAK}WA(ds|``G4jA)9}Bt2Hy0+f3rV1E6b|@?hpGA=PI&r8)ah|)I2s(P5Ic*Ndhn^ z*T&j@gbCTv7+8rpYbR^Ty}1AY)YH;p!m948r#%7x^Z@_-w{pDl|1S4`EM3n_PaXvK z1JF)E3qy$qTj5Xs{jU9k=y%SQ0>8E$;x?p9ayU0bZZeo{5Z@&FKX>}s!0+^>C^D#z z>xsCPvxD3Z=dP}TTOSJhNTPyVt14VCQ9MQFN`rn!c&_p?&4<5_PGm4a;WS&1(!qKE z_H$;dDdiPQ!F_gsN`2>`X}$I=B;={R8%L~`>RyKcS$72ai$!2>d(YkciA^J0@X%G4 z4cu!%Ps~2JuJ8ex`&;Fa0NQOq_nDZ&X;^A=oc1&f#3P1(!5il>6?uK4QpEG8z0Rhu zvBJ+A9RV?z%v?!$=(vcH?*;vRs*+PPbOQ3cdPr5=tOcLqmfx@#hOqX0iN)wTTO21jH<>jpmwRIAGw7`a|sl?9y9zRBh>(_%| zF?h|P7}~RKj?HR+q|4U`CjRmV-$mLW>MScKnNXiv{vD3&2@*u)-6P@h0A`eeZ7}71 zK(w%@R<4lLt`O7fs1E)$5iGb~fPfJ?WxhY7c3Q>T-w#wT&zW522pH-B%r5v#5y^CF zcC30Se|`D2mY$hAlIULL%-PNXgbbpRHgn<&X3N9W!@BUk@9g*P5mz-YnZBb*-$zMM z7Qq}ic0mR8n{^L|=+diODdV}Q!gwr?y+2m=3HWwMq4z)DqYVg0J~^}-%7rMR@S1;9 z7GFj6K}i32X;3*$SmzB&HW{PJ55kT+EI#SsZf}bD7nW^Haf}_gXciYKX{QBxIPSx2Ma? zHQqgzZq!_{&zg{yxqv3xq8YV+`S}F6A>Gtl39_m;K4dA{pP$BW0oIXJ>jEQ!2V3A2 zdpoTxG&V=(?^q?ZTj2ZUpDUdMb)T?E$}CI>r@}PFPWD9@*%V6;4Ag>D#h>!s)=$0R zRXvdkZ%|c}ubej`jl?cS$onl9Tw52rBKT)kgyw~Xy%z62Lr%V6Y=f?2)J|bZJ5(Wx zmji`O;_B+*X@qe-#~`HFP<{8$w@z4@&`q^Q-Zk8JG3>WalhnW1cvnoVw>*R@c&|o8 zZ%w!{Z+MHeZ*OE4v*otkZqz11*s!#s^Gq>+o`8Z5 z^i-qzJLJh9!W-;SmFkR8HEZJWiXk$40i6)7 zZpr=k2lp}SasbM*Nbn3j$sn0;rUI;%EDbi7T1ZI4qL6PNNM2Y%6{LMIKW+FY_yF3) zSKQ2QSujzNMSL2r&bYs`|i2Dnn z=>}c0>a}>|uT!IiMOA~pVT~R@bGlm}Edf}Kq0?*Af6#mW9f9!}RjW7om0c9Qlp;yK z)=XQs(|6GCadQbWIhYF=rf{Y)sj%^Id-ARO0=O^Ad;Ph+ z0?$eE1xhH?{T$QI>0JP75`r)U_$#%K1^BQ8z#uciKf(C701&RyLQWBUp*Q7eyn76} z6JHpC9}R$J#(R0cDCkXoFSp;j6{x{b&0yE@P7{;pCEpKjS(+1RQy38`=&Yxo%F=3y zCPeefABp34U-s?WmU#JJw23dcC{sPPFc2#J$ZgEN%zod}J~8dLm*fx9f6SpO zn^Ww3bt9-r0XaT2a@Wpw;C23XM}7_14#%QpubrIw5aZtP+CqIFmsG4`Cm6rfxl9n5 z7=r2C-+lM2AB9X0T_`?EW&Byv&K?HS4QLoylJ|OAF z`8atBNTzJ&AQ!>sOo$?^0xj~D(;kS$`9zbEGd>f6r`NC3X`tX)sWgWUUOQ7w=$TO&*j;=u%25ay-%>3@81tGe^_z*C7pb9y*Ed^H3t$BIKH2o+olp#$q;)_ zfpjCb_^VFg5fU~K)nf*d*r@BCC>UZ!0&b?AGk_jTPXaSnCuW110wjHPPe^9R^;jo3 zwvzTl)C`Zl5}O2}3lec=hZ*$JnkW#7enKKc)(pM${_$9Hc=Sr_A9Biwe*Y=T?~1CK z6eZ9uPICjy-sMGbZl$yQmpB&`ouS8v{58__t0$JP%i3R&%QR3ianbZqDs<2#5FdN@n5bCn^ZtH992~5k(eA|8|@G9u`wdn7bnpg|@{m z^d6Y`*$Zf2Xr&|g%sai#5}Syvv(>Jnx&EM7-|Jr7!M~zdAyjt*xl;OLhvW-a%H1m0 z*x5*nb=R5u><7lyVpNAR?q@1U59 zO+)QWwL8t zyip?u_nI+K$uh{y)~}qj?(w0&=SE^8`_WMM zTybjG=999h38Yes7}-4*LJ7H)UE8{mE(6;8voE+TYY%33A>S6`G_95^5QHNTo_;Ao ztIQIZ_}49%{8|=O;isBZ?=7kfdF8_@azfoTd+hEJKWE!)$)N%HIe2cplaK`ry#=pV z0q{9w-`i0h@!R8K3GC{ivt{70IWG`EP|(1g7i_Q<>aEAT{5(yD z=!O?kq61VegV+st@XCw475j6vS)_z@efuqQgHQR1T4;|-#OLZNQJPV4k$AX1Uk8Lm z{N*b*ia=I+MB}kWpupJ~>!C@xEN#Wa7V+7{m4j8c?)ChV=D?o~sjT?0C_AQ7B-vxqX30s0I_`2$in86#`mAsT-w?j{&AL@B3$;P z31G4(lV|b}uSDCIrjk+M1R!X7s4Aabn<)zpgT}#gE|mIvV38^ODy@<&yflpCwS#fRf9ZX3lPV_?8@C5)A;T zqmouFLFk;qIs4rA=hh=GL~sCFsXHsqO6_y~*AFt939UYVBSx1s(=Kb&5;j7cSowdE;7()CC2|-i9Zz+_BIw8#ll~-tyH?F3{%`QCsYa*b#s*9iCc`1P1oC26?`g<9))EJ3%xz+O!B3 zZ7$j~To)C@PquR>a1+Dh>-a%IvH_Y7^ys|4o?E%3`I&ADXfC8++hAdZfzIT#%C+Jz z1lU~K_vAm0m8Qk}K$F>|>RPK%<1SI0(G+8q~H zAsjezyP+u!Se4q3GW)`h`NPSRlMoBjCzNPesWJwVTY!o@G8=(6I%4XHGaSiS3MEBK zhgGFv6Jc>L$4jVE!I?TQuwvz_%CyO!bLh94nqK11C2W$*aa2ueGopG8DnBICVUORP zgytv#)49fVXDaR$SukloYC3u7#5H)}1K21=?DKj^U)8G;MS)&Op)g^zR2($<>C*zW z;X7`hLxiIO#J`ANdyAOJle4V%ppa*(+0i3w;8i*BA_;u8gOO6)MY`ueq7stBMJTB; z-a0R>hT*}>z|Gg}@^zDL1MrH+2hsR8 zHc}*9IvuQC^Ju)^#Y{fOr(96rQNPNhxc;mH@W*m206>Lo<*SaaH?~8zg&f&%YiOEG zGiz?*CP>Bci}!WiS=zj#K5I}>DtpregpP_tfZtPa(N<%vo^#WCQ5BTv0vr%Z{)0q+ z)RbfHktUm|lg&U3YM%lMUM(fu}i#kjX9h>GYctkx9Mt_8{@s%!K_EI zScgwy6%_fR?CGJQtmgNAj^h9B#zmaMDWgH55pGuY1Gv7D z;8Psm(vEPiwn#MgJYu4Ty9D|h!?Rj0ddE|&L3S{IP%H4^N!m`60ZwZw^;eg4sk6K{ ziA^`Sbl_4~f&Oo%n;8Ye(tiAdlZKI!Z=|j$5hS|D$bDJ}p{gh$KN&JZYLUjv4h{NY zBJ>X9z!xfDGY z+oh_Z&_e#Q(-}>ssZfm=j$D&4W4FNy&-kAO1~#3Im;F)Nwe{(*75(p=P^VI?X0GFakfh+X-px4a%Uw@fSbmp9hM1_~R>?Z8+ ziy|e9>8V*`OP}4x5JjdWp}7eX;lVxp5qS}0YZek;SNmm7tEeSF*-dI)6U-A%m6YvCgM(}_=k#a6o^%-K4{`B1+}O4x zztDT%hVb;v#?j`lTvlFQ3aV#zkX=7;YFLS$uIzb0E3lozs5`Xy zi~vF+%{z9uLjKvKPhP%x5f~7-Gj+%5N`%^=yk*Qn{`> z;xj&ROY6g`iy2a@{O)V(jk&8#hHACVDXey5a+KDod_Z&}kHM}xt7}Md@pil{2x7E~ zL$k^d2@Ec2XskjrN+IILw;#7((abu;OJii&v3?60x>d_Ma(onIPtcVnX@ELF0aL?T zSmWiL3(dOFkt!x=1O!_0n(cAzZW+3nHJ{2S>tgSK?~cFha^y(l@-Mr2W$%MN{#af8J;V*>hdq!gx=d0h$T7l}>91Wh07)9CTX zh2_ZdQCyFOQ)l(}gft0UZG`Sh2`x-w`5vC2UD}lZs*5 zG76$akzn}Xi))L3oGJ75#pcN=cX3!=57$Ha=hQ2^lwdyU#a}4JJOz6ddR%zae%#4& za)bFj)z=YQela(F#Y|Q#dp}PJghITwXouVaMq$BM?K%cXn9^Y@g43$=O)F&ZlOUom zJiad#dea;-eywBA@e&D6Pdso1?2^(pXiN91?jvcaUyYoKUmvl5G9e$W!okWe*@a<^ z8cQQ6cNSf+UPDx%?_G4aIiybZHHagF{;IcD(dPO!#=u zWfqLcPc^+7Uu#l(Bpxft{*4lv#*u7X9AOzDO z1D9?^jIo}?%iz(_dwLa{ex#T}76ZfN_Z-hwpus9y+4xaUu9cX}&P{XrZVWE{1^0yw zO;YhLEW!pJcbCt3L8~a7>jsaN{V3>tz6_7`&pi%GxZ=V3?3K^U+*ryLSb)8^IblJ0 zSRLNDvIxt)S}g30?s_3NX>F?NKIGrG_zB9@Z>uSW3k2es_H2kU;Rnn%j5qP)!XHKE zPB2mHP~tLCg4K_vH$xv`HbRsJwbZMUV(t=ez;Ec(vyHH)FbfLg`c61I$W_uBB>i^r z&{_P;369-&>23R%qNIULe=1~T$(DA`ev*EWZ6j(B$(te}x1WvmIll21zvygkS%vwG zzkR6Z#RKA2!z!C%M!O>!=Gr0(J0FP=-MN=5t-Ir)of50y10W}j`GtRCsXBakrKtG& zazmITDJMA0C51&BnLY)SY9r)NVTMs);1<=oosS9g31l{4ztjD3#+2H7u_|66b|_*O z;Qk6nalpqdHOjx|K&vUS_6ITgGll;TdaN*ta=M_YtyC)I9Tmr~VaPrH2qb6sd~=AcIxV+%z{E&0@y=DPArw zdV7z(G1hBx7hd{>(cr43^WF%4Y@PXZ?wPpj{OQ#tvc$pABJbvPGvdR`cAtHn)cSEV zrpu}1tJwQ3y!mSmH*uz*x0o|CS<^w%&KJzsj~DU0cLQUxk5B!hWE>aBkjJle8z~;s z-!A=($+}Jq_BTK5^B!`R>!MulZN)F=iXXeUd0w5lUsE5VP*H*oCy(;?S$p*TVvTxwAeWFB$jHyb0593)$zqalVlDX=GcCN1gU0 zlgU)I$LcXZ8Oyc2TZYTPu@-;7<4YYB-``Qa;IDcvydIA$%kHhJKV^m*-zxcvU4viy&Kr5GVM{IT>WRywKQ9;>SEiQD*NqplK-KK4YR`p0@JW)n_{TU3bt0 zim%;(m1=#v2}zTps=?fU5w^(*y)xT%1vtQH&}50ZF!9YxW=&7*W($2kgKyz1mUgfs zfV<*XVVIFnohW=|j+@Kfo!#liQR^x>2yQdrG;2o8WZR+XzU_nG=Ed2rK?ntA;K5B{ z>M8+*A4!Jm^Bg}aW?R?6;@QG@uQ8&oJ{hFixcfEnJ4QH?A4>P=q29oDGW;L;= z9-a0;g%c`C+Ai!UmK$NC*4#;Jp<1=TioL=t^YM)<<%u#hnnfSS`nq63QKGO1L8RzX z@MFDqs1z ztYmxDl@LU)5acvHk)~Z`RW7=aJ_nGD!mOSYD>5Odjn@TK#LY{jf?+piB5AM-CAoT_ z?S-*q7}wyLJzK>N%eMPuFgN)Q_otKP;aqy=D5f!7<=n(lNkYRXVpkB{TAYLYg{|(jtRqYmg$xH zjmq?B(RE4 zQx^~Pt}gxC2~l=K$$-sYy_r$CO(d=+b3H1MB*y_5g6WLaWTXn+TKQ|hNY^>Mp6k*$ zwkovomhu776vQATqT4blf~g;TY(MWCrf^^yfWJvSAB$p5l;jm@o#=!lqw+Lqfq>X= z$6~kxfm7`3q4zUEB;u4qa#BdJxO!;xGm)wwuisj{0y2x{R(IGMrsIzDY9LW>m!Y`= z04sx3IjnYvL<4JqxQ8f7qYd0s2Ig%`ytYPEMKI)s(LD}D@EY>x`VFtqvnADNBdeao zC96X+MxnwKmjpg{U&gP3HE}1=s!lv&D{6(g_lzyF3A`7Jn*&d_kL<;dAFx!UZ>hB8 z5A*%LsAn;VLp>3${0>M?PSQ)9s3}|h2e?TG4_F{}{Cs>#3Q*t$(CUc}M)I}8cPF6% z=+h(Kh^8)}gj(0}#e7O^FQ6`~fd1#8#!}LMuo3A0bN`o}PYsm!Y}sdOz$+Tegc=qT z8x`PH$7lvnhJp{kHWb22l;@7B7|4yL4UOOVM0MP_>P%S1Lnid)+k9{+3D+JFa#Pyf zhVc#&df87APl4W9X)F3pGS>@etfl=_E5tBcVoOfrD4hmVeTY-cj((pkn%n@EgN{0f zwb_^Rk0I#iZuHK!l*lN`ceJn(sI{$Fq6nN& zE<-=0_2WN}m+*ivmIOxB@#~Q-cZ>l136w{#TIJe478`KE7@=a{>SzPHsKLzYAyBQO zAtuuF$-JSDy_S@6GW0MOE~R)b;+0f%_NMrW(+V#c_d&U8Z9+ec4=HmOHw?gdjF(Lu zzra83M_BoO-1b3;9`%&DHfuUY)6YDV21P$C!Rc?mv&{lx#f8oc6?0?x zK08{WP65?#>(vPfA-c=MCY|%*1_<3D4NX zeVTi-JGl2uP_2@0F{G({pxQOXt_d{g_CV6b?jNpfUG9;8yle-^4KHRvZs-_2siata zt+d_T@U$&t*xaD22(fH(W1r$Mo?3dc%Tncm=C6{V9y{v&VT#^1L04vDrLM9qBoZ4@ z6DBN#m57hX7$C(=#$Y5$bJmwA$T8jKD8+6A!-IJwA{WOfs%s}yxUw^?MRZjF$n_KN z6`_bGXcmE#5e4Ym)aQJ)xg3Pg0@k`iGuHe?f(5LtuzSq=nS^5z>vqU0EuZ&75V%Z{ zYyhRLN^)$c6Ds{f7*FBpE;n5iglx5PkHfWrj3`x^j^t z7ntuV`g!9Xg#^3!x)l*}IW=(Tz3>Y5l4uGaB&lz{GDjm2D5S$CExLT`I1#n^lBH7Y zDgpMag@`iETKAI=p<5E#LTkwzVR@=yY|uBVI1HG|8h+d;G-qfuj}-ZR6fN>EfCCW z9~wRQoAPEa#aO?3h?x{YvV*d+NtPkf&4V0k4|L=uj!U{L+oLa(z#&iuhJr3-PjO3R z5s?=nn_5^*^Rawr>>Nr@K(jwkB#JK-=+HqwfdO<+P5byeim)wvqGlP-P|~Nse8=XF zz`?RYB|D6SwS}C+YQv+;}k6$-%D(@+t14BL@vM z2q%q?f6D-A5s$_WY3{^G0F131bbh|g!}#BKw=HQ7mx;Dzg4Z*bTLQSfo{ed{4}NZW zfrRm^Ca$rlE{Ue~uYv>R9{3smwATcdM_6+yWIO z*ZRH~uXE@#p$XTbCt5j7j2=86e{9>HIB6xDzV+vAo&B?KUiMP|ttOElepnl%|DPqL b{|{}U^kRn2wo}j7|0ATu<;8xA7zX}7|B6mN literal 0 HcmV?d00001 diff --git a/build/manifest.json b/build/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/build/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/build/robots.txt b/build/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/package.json b/package.json index d9e9fe4..19dbcce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "base-unit-tools-two", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@arcgis/core": "^4.30.9",